diff mbox series

classes: Add support image_types_uuu (tarball)

Message ID 20250810021930.18670-1-anibal@limonsoftware.com
State New
Headers show
Series classes: Add support image_types_uuu (tarball) | expand

Commit Message

Anibal Limon Aug. 10, 2025, 2:19 a.m. UTC
From: Anibal Limon <limon.anibal@gmail.com>

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"
```

Signed-off-by: Anibal Limon <limon.anibal@gmail.com>
---
 classes/image_types_uuu.bbclass | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 classes/image_types_uuu.bbclass

Comments

Daiane Angolini Aug. 14, 2025, 12:10 p.m. UTC | #1
On Sat, Aug 9, 2025 at 11:19 PM Anibal Limon <anibal@limonsoftware.com> wrote:
>
> From: Anibal Limon <limon.anibal@gmail.com>
>
> 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"
> ```
>
> Signed-off-by: Anibal Limon <limon.anibal@gmail.com>
> ---

Could you, please, send this as a GitHub PR?

Daiane
>  classes/image_types_uuu.bbclass | 32 ++++++++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
>  create mode 100644 classes/image_types_uuu.bbclass
>
> diff --git a/classes/image_types_uuu.bbclass b/classes/image_types_uuu.bbclass
> new file mode 100644
> index 00000000..10de74df
> --- /dev/null
> +++ b/classes/image_types_uuu.bbclass
> @@ -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: meta-freescale+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-freescale/unsub [daiane.angolini@foundries.io]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Anibal Limon Aug. 14, 2025, 3:47 p.m. UTC | #2
HI Daiane,

Right, I got a response from Otavio and there is already a class that does
same thing.

Thanks!,
Anibal

On Thu, Aug 14, 2025 at 6:10 AM Daiane Angolini <
daiane.angolini@foundries.io> wrote:

> On Sat, Aug 9, 2025 at 11:19 PM Anibal Limon <anibal@limonsoftware.com>
> wrote:
> >
> > From: Anibal Limon <limon.anibal@gmail.com>
> >
> > 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"
> > ```
> >
> > Signed-off-by: Anibal Limon <limon.anibal@gmail.com>
> > ---
>
> Could you, please, send this as a GitHub PR?
>
> Daiane
> >  classes/image_types_uuu.bbclass | 32 ++++++++++++++++++++++++++++++++
> >  1 file changed, 32 insertions(+)
> >  create mode 100644 classes/image_types_uuu.bbclass
> >
> > diff --git a/classes/image_types_uuu.bbclass
> b/classes/image_types_uuu.bbclass
> > new file mode 100644
> > index 00000000..10de74df
> > --- /dev/null
> > +++ b/classes/image_types_uuu.bbclass
> > @@ -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: meta-freescale+owner@lists.yoctoproject.org
> > Unsubscribe: https://lists.yoctoproject.org/g/meta-freescale/unsub [
> daiane.angolini@foundries.io]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>
diff mbox series

Patch

diff --git a/classes/image_types_uuu.bbclass b/classes/image_types_uuu.bbclass
new file mode 100644
index 00000000..10de74df
--- /dev/null
+++ b/classes/image_types_uuu.bbclass
@@ -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"