classes: Add support image_types_uuu (tarball)
PATCH 1/1 classes: Add support image_types_uuu (tarball)
From: Anibal Limon <[email protected]>
Often is needed to generate a tarball with proper image and uuu binary, and lst files to flash boards via USB.
Can be enabled at bsp or distro level with:
``` IMAGE_CLASSES += "image_types_uuu" ```
--- classes/image_types_uuu.bbclass | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 classes/image_types_uuu.bbclass
classes/image_types_uuu.bbclass new file +32 -0
@@ -0,0 +1,32 @@ +inherit image_types + +UUU_IMAGE_DIR ?= "${WORKDIR}/uuuimage" +create_uuu_image() { + rm -rf ${UUU_IMAGE_DIR} + mkdir -p ${UUU_IMAGE_DIR} + + # Copy tools + install -m0755 "${RECIPE_SYSROOT}${libdir}/uuu/uuu" ${UUU_IMAGE_DIR} + install -m0755 "${RECIPE_SYSROOT_NATIVE}${datadir}/uuu/emmc_burn_all.lst" ${UUU_IMAGE_DIR} + install -m0755 "${RECIPE_SYSROOT_NATIVE}${datadir}/uuu/spl_boot.lst" ${UUU_IMAGE_DIR} + + # Copy images over with filenames needed by upstream emmc_burn_all + # Flash execute (after extract): + # sudo ./uuu ./emmc_burn_all.lst + cp ${DEPLOY_DIR_IMAGE}/imx-boot ${UUU_IMAGE_DIR}/_flash.bin + cp ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.wic ${UUU_IMAGE_DIR}/_image + + cd ${UUU_IMAGE_DIR} + ${IMAGE_CMD_TAR} --sparse --numeric-owner --transform="s,^\./,," -cf- . | gzip -f -9 -n -c --rsyncable > ${IMGDEPLOYDIR}/${IMAGE_NAME}.uuu.tar.gz + ln -sf ${IMAGE_NAME}.uuu.tar.gz ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.uuu.tar.gz +} + +IMAGE_CMD:uuu = "create_uuu_image" +do_image_uuu[depends] += "imx-boot:do_deploy" + +IMAGE_TYPEDEP:uuu += "wic" +IMAGE_FSTYPES:append = " uuu" + +# uuu-bin is a prebuilt binary suitable to pack +# uuu-native is used to get emmc_burn_all.lst +DEPENDS:append = " uuu-bin uuu-native"
Signature · 1 line
2.39.5
Quoted 6 lines · Anibal Limon
From: Anibal Limon <[email protected]>
Often is needed to generate a tarball with proper image and uuu binary, and lst files to flash boards via USB.
Quoted 8 lines
Can be enabled at bsp or distro level with:
``` IMAGE_CLASSES += "image_types_uuu" ```Signed-off-by Anibal Limon <[email protected]>---
Could you, please, send this as a GitHub PR?
Daiane
Quoted 54 lines
classes/image_types_uuu.bbclass | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 classes/image_types_uuu.bbclassclasses/image_types_uuu.bbclass new file +32
-1@@ -0,0 +1,32 @@ +inherit image_types + +UUU_IMAGE_DIR ?= "${WORKDIR}/uuuimage" +create_uuu_image() { + rm -rf ${UUU_IMAGE_DIR} + mkdir -p ${UUU_IMAGE_DIR} + + # Copy tools + install -m0755 "${RECIPE_SYSROOT}${libdir}/uuu/uuu" ${UUU_IMAGE_DIR} + install -m0755 "${RECIPE_SYSROOT_NATIVE}${datadir}/uuu/emmc_burn_all.lst" ${UUU_IMAGE_DIR} + install -m0755 "${RECIPE_SYSROOT_NATIVE}${datadir}/uuu/spl_boot.lst" ${UUU_IMAGE_DIR} + + # Copy images over with filenames needed by upstream emmc_burn_all + # Flash execute (after extract): + # sudo ./uuu ./emmc_burn_all.lst + cp ${DEPLOY_DIR_IMAGE}/imx-boot ${UUU_IMAGE_DIR}/_flash.bin + cp ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.wic ${UUU_IMAGE_DIR}/_image + + cd ${UUU_IMAGE_DIR} + ${IMAGE_CMD_TAR} --sparse --numeric-owner --transform="s,^\./,," -cf- . | gzip -f -9 -n -c --rsyncable > ${IMGDEPLOYDIR}/${IMAGE_NAME}.uuu.tar.gz + ln -sf ${IMAGE_NAME}.uuu.tar.gz ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.uuu.tar.gz +} + +IMAGE_CMD:uuu = "create_uuu_image" +do_image_uuu[depends] += "imx-boot:do_deploy" + +IMAGE_TYPEDEP:uuu += "wic" +IMAGE_FSTYPES:append = " uuu" + +# uuu-bin is a prebuilt binary suitable to pack +# uuu-native is used to get emmc_burn_all.lst +DEPENDS:append = " uuu-bin uuu-native" --2.39.5
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#24973): https://lists.yoctoproject.org/g/meta-freescale/message/24973
Mute This Topic: https://lists.yoctoproject.org/mt/114625531/5992125
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-freescale/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
HI Daiane,
Right, I got a response from Otavio and there is already a class that does same thing.
Thanks!,
Anibal
Quoted 85 lines · Daiane Angolini
Quoted 6 lines · Anibal Limon
From: Anibal Limon <[email protected]>
Often is needed to generate a tarball with proper image and uuu binary, and lst files to flash boards via USB.
Quoted 8 lines
Can be enabled at bsp or distro level with:
``` IMAGE_CLASSES += "image_types_uuu" ```Signed-off-by Anibal Limon <[email protected]>---
Could you, please, send this as a GitHub PR?
Daiane
Review
Quoted 5 lines
classes/image_types_uuu.bbclass | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 classes/image_types_uuu.bbclass(quoted diff) +0
-0b/classes/image_types_uuu.bbclass
Quoted 5 lines
new file mode 100644
index 00000000..10de74dfclasses/image_types_uuu.bbclass line 9
Quoted 9 lines
classes/image_types_uuu.bbclass new file +9
-0@@ -0,0 +1,32 @@ +inherit image_types + +UUU_IMAGE_DIR ?= "${WORKDIR}/uuuimage" +create_uuu_image() { + rm -rf ${UUU_IMAGE_DIR} + mkdir -p ${UUU_IMAGE_DIR} + + # Copy tools + install -m0755 "${RECIPE_SYSROOT}${libdir}/uuu/uuu"${UUU_IMAGE_DIR}
classes/image_types_uuu.bbclass line 10
Quoted 1 line
classes/image_types_uuu.bbclass new file +1
-0+ install -m0755"${RECIPE_SYSROOT_NATIVE}${datadir}/uuu/emmc_burn_all.lst" ${UUU_IMAGE_DIR}
classes/image_types_uuu.bbclass line 11
Quoted 1 line
classes/image_types_uuu.bbclass new file +1
-0+ install -m0755"${RECIPE_SYSROOT_NATIVE}${datadir}/uuu/spl_boot.lst" ${UUU_IMAGE_DIR}
classes/image_types_uuu.bbclass line 13
Quoted 2 lines
classes/image_types_uuu.bbclass new file +2
-0+ + # Copy images over with filenames needed by upstream
emmc_burn_allclasses/image_types_uuu.bbclass
Quoted 7 lines
classes/image_types_uuu.bbclass new file +7
-0+ # Flash execute (after extract): + # sudo ./uuu ./emmc_burn_all.lst + cp ${DEPLOY_DIR_IMAGE}/imx-boot ${UUU_IMAGE_DIR}/_flash.bin + cp ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.wic ${UUU_IMAGE_DIR}/_image + + cd ${UUU_IMAGE_DIR} + ${IMAGE_CMD_TAR} --sparse --numeric-owner--transform="s,^\./,," -cf- . | gzip -f -9 -n -c --rsyncable > ${IMGDEPLOYDIR}/${IMAGE_NAME}.uuu.tar.gz
classes/image_types_uuu.bbclass line 21
Quoted 1 line
classes/image_types_uuu.bbclass new file +1
-0+ ln -sf ${IMAGE_NAME}.uuu.tar.gz${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.uuu.tar.gz
Quoted 15 lines
classes/image_types_uuu.bbclass new file +11
-1+} + +IMAGE_CMD:uuu = "create_uuu_image" +do_image_uuu[depends] += "imx-boot:do_deploy" + +IMAGE_TYPEDEP:uuu += "wic" +IMAGE_FSTYPES:append = " uuu" + +# uuu-bin is a prebuilt binary suitable to pack +# uuu-native is used to get emmc_burn_all.lst +DEPENDS:append = " uuu-bin uuu-native" --2.39.5
Quoted 3 lines
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#24973):https://lists.yoctoproject.org/g/meta-freescale/message/24973
Quoted 3 lines
Mute This Topic: https://lists.yoctoproject.org/mt/114625531/5992125
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-freescale/unsub [Quoted 2 lines
-=-=-=-=-=-=-=-=-=-=-=-