Packaging an .img or .iso image

Hello all,
I am using meta-ti to build a customized image for my pocketbeagle (MACHINE?=beaglebone) with meta-ti. I successfully built without any errors and got following files:

~/ti/poky/build/deploy-ti/images/beaglebone$ ls
AM335X-PRU-UIO-00A0--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo           M-BB-BBGG-00A0--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo
AM335X-PRU-UIO-00A0-beaglebone.dtbo                                                     M-BB-BBGG-00A0-beaglebone.dtbo
AM335X-PRU-UIO-00A0.dtbo                                                                M-BB-BBGG-00A0.dtbo
BB-ADC-00A0--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo                   MLO
BB-ADC-00A0-beaglebone.dtbo                                                             MLO-beaglebone
BB-ADC-00A0.dtbo                                                                        MLO-beaglebone-2023.04+git-r0
BB-BBBW-WL1835-00A0--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo           PB-MIKROBUS-0--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo
BB-BBBW-WL1835-00A0-beaglebone.dtbo                                                     PB-MIKROBUS-0-beaglebone.dtbo
BB-BBBW-WL1835-00A0.dtbo                                                                PB-MIKROBUS-0.dtbo
BB-BBGG-WL1835-00A0--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo           PB-MIKROBUS-1--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo
BB-BBGG-WL1835-00A0-beaglebone.dtbo                                                     PB-MIKROBUS-1-beaglebone.dtbo
BB-BBGG-WL1835-00A0.dtbo                                                                PB-MIKROBUS-1.dtbo
BB-BBGW-WL1835-00A0--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo           am335x-bone--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtb
BB-BBGW-WL1835-00A0-beaglebone.dtbo                                                     am335x-bone-beaglebone.dtb
BB-BBGW-WL1835-00A0.dtbo                                                                am335x-bone.dtb
BB-BONE-4D5R-01-00A1--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo          am335x-boneblack--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtb
BB-BONE-4D5R-01-00A1-beaglebone.dtbo                                                    am335x-boneblack-beaglebone.dtb
BB-BONE-4D5R-01-00A1.dtbo                                                               am335x-boneblack-pps--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtb
BB-BONE-LCD4-01-00A1--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo          am335x-boneblack-pps-beaglebone.dtb
BB-BONE-LCD4-01-00A1-beaglebone.dtbo                                                    am335x-boneblack-pps.dtb
BB-BONE-LCD4-01-00A1.dtbo                                                               am335x-boneblack-uboot--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtb
BB-BONE-NH7C-01-A0--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo            am335x-boneblack-uboot-beaglebone.dtb
BB-BONE-NH7C-01-A0-beaglebone.dtbo                                                      am335x-boneblack-uboot-univ--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtb
BB-BONE-NH7C-01-A0.dtbo                                                                 am335x-boneblack-uboot-univ-beaglebone.dtb
BB-BONE-eMMC1-01-00A0--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo         am335x-boneblack-uboot-univ.dtb
BB-BONE-eMMC1-01-00A0-beaglebone.dtbo                                                   am335x-boneblack-uboot.dtb
BB-BONE-eMMC1-01-00A0.dtbo                                                              am335x-boneblack-wireless--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtb
BB-CAPE-DISP-CT4-00A0--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo         am335x-boneblack-wireless-beaglebone.dtb
BB-CAPE-DISP-CT4-00A0-beaglebone.dtbo                                                   am335x-boneblack-wireless.dtb
BB-CAPE-DISP-CT4-00A0.dtbo                                                              am335x-boneblack.dtb
BB-HDMI-TDA998x-00A0--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo          am335x-boneblue--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtb
BB-HDMI-TDA998x-00A0-beaglebone.dtbo                                                    am335x-boneblue-beaglebone.dtb
BB-HDMI-TDA998x-00A0.dtbo                                                               am335x-boneblue.dtb
BB-I2C1-MCP7940X-00A0--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo         am335x-bonegreen--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtb
BB-I2C1-MCP7940X-00A0-beaglebone.dtbo                                                   am335x-bonegreen-beaglebone.dtb
BB-I2C1-MCP7940X-00A0.dtbo                                                              am335x-bonegreen-gateway--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtb
BB-I2C1-RTC-DS3231--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo            am335x-bonegreen-gateway-beaglebone.dtb
BB-I2C1-RTC-DS3231-beaglebone.dtbo                                                      am335x-bonegreen-gateway.dtb
BB-I2C1-RTC-DS3231.dtbo                                                                 am335x-bonegreen-wireless--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtb
BB-I2C1-RTC-PCF8563--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo           am335x-bonegreen-wireless-beaglebone.dtb
BB-I2C1-RTC-PCF8563-beaglebone.dtbo                                                     am335x-bonegreen-wireless-uboot-univ--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtb
BB-I2C1-RTC-PCF8563.dtbo                                                                am335x-bonegreen-wireless-uboot-univ-beaglebone.dtb
BB-I2C2-BME680--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo                am335x-bonegreen-wireless-uboot-univ.dtb
BB-I2C2-BME680-beaglebone.dtbo                                                          am335x-bonegreen-wireless.dtb
BB-I2C2-BME680.dtbo                                                                     am335x-bonegreen.dtb
BB-I2C2-MPU6050--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo               am335x-pocketbeagle--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtb
BB-I2C2-MPU6050-beaglebone.dtbo                                                         am335x-pocketbeagle-beaglebone.dtb
BB-I2C2-MPU6050.dtbo                                                                    am335x-pocketbeagle.dtb
BB-LCD-ADAFRUIT-24-SPI1-00A0--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo  am335x-sancloud-bbe--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtb
BB-LCD-ADAFRUIT-24-SPI1-00A0-beaglebone.dtbo                                            am335x-sancloud-bbe-beaglebone.dtb
BB-LCD-ADAFRUIT-24-SPI1-00A0.dtbo                                                       am335x-sancloud-bbe-extended-wifi--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtb
BB-NHDMI-TDA998x-00A0--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo         am335x-sancloud-bbe-extended-wifi-beaglebone.dtb
BB-NHDMI-TDA998x-00A0-beaglebone.dtbo                                                   am335x-sancloud-bbe-extended-wifi.dtb
BB-NHDMI-TDA998x-00A0.dtbo                                                              am335x-sancloud-bbe-lite--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtb
BB-SPIDEV0-00A0--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo               am335x-sancloud-bbe-lite-beaglebone.dtb
BB-SPIDEV0-00A0-beaglebone.dtbo                                                         am335x-sancloud-bbe-lite.dtb
BB-SPIDEV0-00A0.dtbo                                                                    am335x-sancloud-bbe.dtb
BB-SPIDEV1-00A0--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo               core-image-base-beaglebone.rootfs-20240505005051.manifest
BB-SPIDEV1-00A0-beaglebone.dtbo                                                         core-image-base-beaglebone.rootfs-20240505005051.spdx.tar.zst
BB-SPIDEV1-00A0.dtbo                                                                    core-image-base-beaglebone.rootfs-20240505005051.tar.xz
BB-UART1-00A0--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo                 core-image-base-beaglebone.rootfs-20240505005051.testdata.json
BB-UART1-00A0-beaglebone.dtbo                                                           core-image-base-beaglebone.rootfs-20240505005051.wic.bmap
BB-UART1-00A0.dtbo                                                                      core-image-base-beaglebone.rootfs-20240505005051.wic.xz
BB-UART2-00A0--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo                 core-image-base-beaglebone.rootfs.manifest
BB-UART2-00A0-beaglebone.dtbo                                                           core-image-base-beaglebone.rootfs.spdx.tar.zst
BB-UART2-00A0.dtbo                                                                      core-image-base-beaglebone.rootfs.tar.xz
BB-UART4-00A0--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo                 core-image-base-beaglebone.rootfs.testdata.json
BB-UART4-00A0-beaglebone.dtbo                                                           core-image-base-beaglebone.rootfs.wic.bmap
BB-UART4-00A0.dtbo                                                                      core-image-base-beaglebone.rootfs.wic.xz
BB-W1-P9.12-00A0--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo              core-image-base.env
BB-W1-P9.12-00A0-beaglebone.dtbo                                                        extlinux.conf
BB-W1-P9.12-00A0.dtbo                                                                   extlinux.conf-beaglebone
BBORG_COMMS-00A2--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo              extlinux.conf-beaglebone-r0
BBORG_COMMS-00A2-beaglebone.dtbo                                                        modules--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.tgz
BBORG_COMMS-00A2.dtbo                                                                   modules-beaglebone.tgz
BBORG_FAN-A000--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo                u-boot-beaglebone-2023.04+git-r0.img
BBORG_FAN-A000-beaglebone.dtbo                                                          u-boot-beaglebone.img
BBORG_FAN-A000.dtbo                                                                     u-boot-spl.bin
BBORG_RELAY-00A2--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo              u-boot-spl.bin-beaglebone
BBORG_RELAY-00A2-beaglebone.dtbo                                                        u-boot-spl.bin-beaglebone-2023.04+git-r0
BBORG_RELAY-00A2.dtbo                                                                   u-boot-ti-staging-initial-env
BONE-ADC--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo                      u-boot-ti-staging-initial-env-beaglebone
BONE-ADC-beaglebone.dtbo                                                                u-boot-ti-staging-initial-env-beaglebone-2023.04+git-r0
BONE-ADC.dtbo                                                                           u-boot.img
M-BB-BBG-00A0--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.dtbo                 zImage
M-BB-BBG-00A0-beaglebone.dtbo                                                           zImage--6.1.69+git0+a1f26a1958-r0-beaglebone-20240505005051.bin
M-BB-BBG-00A0.dtbo                                                                      zImage-beaglebone.bin

Since the built machine is a remote server so I have to ssh files to my computer which is macOS. I prefer using an all-in-one image such as .img or .iso (or .wic) to create an SDCard using balenaEtcher. May I ask are there any commands or configuration to create an all-in-one image?

Thanks and Best Regard,
Duy

so what yocto version ??
did it generate a .wic image ??

I am using the master poky + master meta-ti.

DISTRO = "poky"
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
DISTRO_VERSION = "5.0+snapshot-${METADATA_REVISION}"
DISTRO_CODENAME = "styhead"

It generated only the .wic for rootfs, not the whole image.

here is a recent wic built by my setup
core-image-minimal-beaglebone-20240511120146.rootfs.wic.xz
i install it on an sdcard with
sudo xzcat core-image-minimal-beaglebone.wic.xz | sudo dd of=/dev/sdd bs=1M
and it boots
or you can just use Etcher

FYI a few people have been having issue with the
MACHINE?=beaglebone
and have move to
MACHINE?=beaglebone-yocto
not sure what’s in meta-ti that you need.

@amf99 so there is no way I can package my core-image-base-beaglebone.rootfs-20240505005051.wic.xz + am335x-pocketbeagle.dtb + u-boot.img + zImage into 1 single package as planned?
Thanks for your advice about the machine config. Let me try with beaglebone-yocto to see if it can boot on my Pocketbeagle with minimum modification.

the .wic contains zImage and all, that is unless your building with/for uImage, but that should be there also.
everything is in the .wic file, unless you messed with the meta data that creates the .wic file.
Etcher will extract the .wic.xz file and install on sdcard, if you want a .img file, then
sudo xzcat core-image-minimal-beaglebone.wic.xz > core-image-minimal-beaglebone.img
will give you the .img which Etcher will install on sdcard, i verified this.

so there is no way I can package my core-image-base-beaglebone.rootfs-20240505005051.wic.xz + am335x-pocketbeagle.dtb + u-boot.img + zImage into 1 single package as planned?
The .wic.xz file contains all of this, install it to an sdcard and remount the sdcard, you should see the boot and rootfs partition.
on my wic image, am335x-pocketbeagle.dtb is in boot partition.
i’m not using master branch, have tested on kirkstone and nenm??? branches, so maybe master branch has an issue.
try the install on sdcard and check from there.

@amf99 sorry for my late reply, your suggestion about the .wic file is correct. I just need to pull the file to my PC and load it. Now I have to face another problem the U-boot not working, I will create a new topic for it. Many thanks for your support.

1 Like