diff options
author | Tom Hochstein <tom.hochstein@nxp.com> | 2022-01-13 17:56:08 -0600 |
---|---|---|
committer | Tom Hochstein <tom.hochstein@nxp.com> | 2022-01-19 15:50:12 -0600 |
commit | 92acf99a6124df0d2e10bf10f296962ab9383ba1 (patch) | |
tree | dc2e1db48c353f686c25aaa7197b713ae6448c04 | |
parent | 1f270dc776dc70856d645da5cdf1096edf2f369e (diff) | |
download | meta-freescale-92acf99a6124df0d2e10bf10f296962ab9383ba1.tar.gz |
imx-boot,u-boot-imx: Add bootloader image size to SD card image
Append a tag to the bootloader image used in the SD card image. The tag
contains the size of the bootloader image so UUU can easily find the end of
the bootloader in the SD card image.
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
-rw-r--r-- | classes/uuu_bootloader_tag.bbclass | 11 | ||||
-rw-r--r-- | recipes-bsp/imx-mkimage/imx-boot_1.0.bb | 10 | ||||
-rw-r--r-- | recipes-bsp/u-boot/u-boot-imx-mfgtool_2021.04.bb | 4 | ||||
-rw-r--r-- | recipes-bsp/u-boot/u-boot-imx_2021.04.bb | 9 |
4 files changed, 30 insertions, 4 deletions
diff --git a/classes/uuu_bootloader_tag.bbclass b/classes/uuu_bootloader_tag.bbclass new file mode 100644 index 00000000..fb6acd72 --- /dev/null +++ b/classes/uuu_bootloader_tag.bbclass | |||
@@ -0,0 +1,11 @@ | |||
1 | # Append a tag to the bootloader image used in the SD card image. The tag | ||
2 | # contains the size of the bootloader image so UUU can easily find the end of | ||
3 | # the bootloader in the SD card image. | ||
4 | do_deploy:append() { | ||
5 | if [ "${UUU_BOOTLOADER}" != "" ]; then | ||
6 | cp ${DEPLOYDIR}/${UUU_BOOTLOADER} ${DEPLOYDIR}/${UUU_BOOTLOADER_TAGGED} | ||
7 | ln -sf ${UUU_BOOTLOADER_TAGGED} ${DEPLOYDIR}/${UUU_BOOTLOADER} | ||
8 | stat -L -cUUUBURNXXOEUZX7+A-XY5601QQWWZ%sEND ${DEPLOYDIR}/${UUU_BOOTLOADER} \ | ||
9 | >> ${DEPLOYDIR}/${UUU_BOOTLOADER} | ||
10 | fi | ||
11 | } | ||
diff --git a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb index f8ebb730..b332e079 100644 --- a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb +++ b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb | |||
@@ -24,7 +24,10 @@ DEPENDS:append:mx8m = " u-boot-mkimage-native dtc-native" | |||
24 | BOOT_NAME = "imx-boot" | 24 | BOOT_NAME = "imx-boot" |
25 | PROVIDES = "${BOOT_NAME}" | 25 | PROVIDES = "${BOOT_NAME}" |
26 | 26 | ||
27 | inherit deploy | 27 | inherit deploy uuu_bootloader_tag |
28 | |||
29 | UUU_BOOTLOADER = "${BOOT_NAME}" | ||
30 | UUU_BOOTLOADER_TAGGED = "${BOOT_NAME}-tagged" | ||
28 | 31 | ||
29 | # Add CFLAGS with native INCDIR & LIBDIR for imx-mkimage build | 32 | # Add CFLAGS with native INCDIR & LIBDIR for imx-mkimage build |
30 | CFLAGS = "-O2 -Wall -std=c99 -I ${STAGING_INCDIR_NATIVE} -L ${STAGING_LIBDIR_NATIVE}" | 33 | CFLAGS = "-O2 -Wall -std=c99 -I ${STAGING_INCDIR_NATIVE} -L ${STAGING_LIBDIR_NATIVE}" |
@@ -190,9 +193,8 @@ do_deploy() { | |||
190 | fi | 193 | fi |
191 | install -m 0644 ${S}/${BOOT_CONFIG_MACHINE}-${target} ${DEPLOYDIR} | 194 | install -m 0644 ${S}/${BOOT_CONFIG_MACHINE}-${target} ${DEPLOYDIR} |
192 | done | 195 | done |
193 | cd ${DEPLOYDIR} | 196 | |
194 | ln -sf ${BOOT_CONFIG_MACHINE}-${IMAGE_IMXBOOT_TARGET} ${BOOT_NAME} | 197 | ln -sf ${BOOT_CONFIG_MACHINE}-${IMAGE_IMXBOOT_TARGET} ${DEPLOYDIR}/${BOOT_NAME} |
195 | cd - | ||
196 | } | 198 | } |
197 | addtask deploy before do_build after do_compile | 199 | addtask deploy before do_build after do_compile |
198 | 200 | ||
diff --git a/recipes-bsp/u-boot/u-boot-imx-mfgtool_2021.04.bb b/recipes-bsp/u-boot/u-boot-imx-mfgtool_2021.04.bb index af502889..5443ceac 100644 --- a/recipes-bsp/u-boot/u-boot-imx-mfgtool_2021.04.bb +++ b/recipes-bsp/u-boot/u-boot-imx-mfgtool_2021.04.bb | |||
@@ -6,3 +6,7 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot-imx:" | |||
6 | 6 | ||
7 | require u-boot-imx_${PV}.bb | 7 | require u-boot-imx_${PV}.bb |
8 | require u-boot-mfgtool.inc | 8 | require u-boot-mfgtool.inc |
9 | |||
10 | UUU_BOOTLOADER_TAGGED = "" | ||
11 | UUU_BOOTLOADER_TAGGED:mx6 = "u-boot-mfgtool-tagged.${UBOOT_SUFFIX}" | ||
12 | UUU_BOOTLOADER_TAGGED:mx7 = "u-boot-mfgtool-tagged.${UBOOT_SUFFIX}" | ||
diff --git a/recipes-bsp/u-boot/u-boot-imx_2021.04.bb b/recipes-bsp/u-boot/u-boot-imx_2021.04.bb index bb5809e2..96552eef 100644 --- a/recipes-bsp/u-boot/u-boot-imx_2021.04.bb +++ b/recipes-bsp/u-boot/u-boot-imx_2021.04.bb | |||
@@ -7,6 +7,15 @@ require u-boot-imx-common_${PV}.inc | |||
7 | 7 | ||
8 | PROVIDES += "u-boot" | 8 | PROVIDES += "u-boot" |
9 | 9 | ||
10 | inherit uuu_bootloader_tag | ||
11 | |||
12 | UUU_BOOTLOADER = "" | ||
13 | UUU_BOOTLOADER:mx6 = "${UBOOT_BINARY}" | ||
14 | UUU_BOOTLOADER:mx7 = "${UBOOT_BINARY}" | ||
15 | UUU_BOOTLOADER_TAGGED = "" | ||
16 | UUU_BOOTLOADER_TAGGED:mx6 = "u-boot-tagged.${UBOOT_SUFFIX}" | ||
17 | UUU_BOOTLOADER_TAGGED:mx7 = "u-boot-tagged.${UBOOT_SUFFIX}" | ||
18 | |||
10 | do_deploy:append:mx8m() { | 19 | do_deploy:append:mx8m() { |
11 | # Deploy u-boot-nodtb.bin and fsl-imx8m*-XX.dtb for mkimage to generate boot binary | 20 | # Deploy u-boot-nodtb.bin and fsl-imx8m*-XX.dtb for mkimage to generate boot binary |
12 | if [ -n "${UBOOT_CONFIG}" ] | 21 | if [ -n "${UBOOT_CONFIG}" ] |