From 92acf99a6124df0d2e10bf10f296962ab9383ba1 Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Thu, 13 Jan 2022 17:56:08 -0600 Subject: 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 --- classes/uuu_bootloader_tag.bbclass | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 classes/uuu_bootloader_tag.bbclass (limited to 'classes') diff --git a/classes/uuu_bootloader_tag.bbclass b/classes/uuu_bootloader_tag.bbclass new file mode 100644 index 000000000..fb6acd72c --- /dev/null +++ b/classes/uuu_bootloader_tag.bbclass @@ -0,0 +1,11 @@ +# 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. +do_deploy:append() { + if [ "${UUU_BOOTLOADER}" != "" ]; then + cp ${DEPLOYDIR}/${UUU_BOOTLOADER} ${DEPLOYDIR}/${UUU_BOOTLOADER_TAGGED} + ln -sf ${UUU_BOOTLOADER_TAGGED} ${DEPLOYDIR}/${UUU_BOOTLOADER} + stat -L -cUUUBURNXXOEUZX7+A-XY5601QQWWZ%sEND ${DEPLOYDIR}/${UUU_BOOTLOADER} \ + >> ${DEPLOYDIR}/${UUU_BOOTLOADER} + fi +} -- cgit v1.2.3-54-g00ecf