From d2bff417fa7953303f3111731638f8c0d2336510 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Tue, 3 Jul 2018 19:13:51 -0300 Subject: [PATCH] image_types_fsl.bbclass: Use IMAGE_LINK_NAME for mxs binaries The binary is generated as part of the image build so it should use the same naming schema to provide consistency. This also fixes the wks templates which use it. Signed-off-by: Otavio Salvador --- classes/image_types_fsl.bbclass | 18 +++++++++++++----- wic/imx-uboot-mxs-bootpart.wks.in | 2 +- wic/imx-uboot-mxs.wks.in | 2 +- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/classes/image_types_fsl.bbclass b/classes/image_types_fsl.bbclass index 5e50f476..c49c51b7 100644 --- a/classes/image_types_fsl.bbclass +++ b/classes/image_types_fsl.bbclass @@ -11,15 +11,23 @@ MXSBOOT_NAND_ARGS ?= "" # U-Boot mxsboot generation for uSD do_image_uboot_mxsboot_sdcard[depends] += "u-boot-mxsboot-native:do_populate_sysroot \ u-boot:do_deploy" -IMAGE_CMD_uboot-mxsboot-sdcard = "mxsboot sd ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX} \ - ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.uboot-mxsboot-sdcard" +IMAGE_CMD_uboot-mxsboot-sdcard() { + mxsboot sd ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX} \ + ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.uboot-mxsboot-sdcard + ln -sf ${IMAGE_NAME}.rootfs.uboot-mxsboot-sdcard \ + ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.uboot-mxsboot-sdcard +} # U-Boot mxsboot generation for NAND do_image_uboot_mxsboot_nand[depends] += "u-boot-mxsboot-native:do_populate_sysroot \ u-boot:do_deploy" -IMAGE_CMD_uboot-mxsboot-nand = "mxsboot ${MXSBOOT_NAND_ARGS} nand \ - ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX} \ - ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.uboot-mxsboot-nand" +IMAGE_CMD_uboot-mxsboot-nand() { + mxsboot ${MXSBOOT_NAND_ARGS} nand \ + ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX} \ + ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.uboot-mxsboot-nand + ln -sf ${IMAGE_NAME}.rootfs.uboot-mxsboot-nand \ + ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.uboot-mxsboot-nand +} # In case we are building for i.MX23 or i.MX28 we need to have the # image stream built before the wic generation diff --git a/wic/imx-uboot-mxs-bootpart.wks.in b/wic/imx-uboot-mxs-bootpart.wks.in index 8b5bdd48..01eb88cc 100644 --- a/wic/imx-uboot-mxs-bootpart.wks.in +++ b/wic/imx-uboot-mxs-bootpart.wks.in @@ -12,7 +12,7 @@ # | | | | # 0 1kiB 4MiB 16MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB) # -part u-boot --source rawcopy --sourceparams="file=${IMAGE_NAME}.rootfs.uboot-mxsboot-sdcard" --ondisk mmcblk --align 1024 +part u-boot --source rawcopy --sourceparams="file=${IMAGE_LINK_NAME}.rootfs.uboot-mxsboot-sdcard" --ondisk mmcblk --align 1024 part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 16 part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096 diff --git a/wic/imx-uboot-mxs.wks.in b/wic/imx-uboot-mxs.wks.in index 44b6f931..8d82b7b8 100644 --- a/wic/imx-uboot-mxs.wks.in +++ b/wic/imx-uboot-mxs.wks.in @@ -12,7 +12,7 @@ # | | | | # 0 1kiB 4MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB) # -part u-boot --source rawcopy --sourceparams="file=${IMAGE_NAME}.rootfs.uboot-mxsboot-sdcard" --ondisk mmcblk --align 1024 +part u-boot --source rawcopy --sourceparams="file=${IMAGE_LINK_NAME}.rootfs.uboot-mxsboot-sdcard" --ondisk mmcblk --align 1024 part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096 bootloader --ptable msdos -- 2.40.1