imx93 AVH image creation - MarekBykowski/readme GitHub Wiki

One of the ways to boot your image on AVH is to download pre-built image from Correlium, uncompress, replace and compress back. Probably Yocto WIC can create such an image but I had no time to investigate into it.

Download an image from Correlium

The Image I have at the time of the write-up is imx-image-full-imx93evk-5.15.52-2.1.0.zip

mkdir -p $HOME/imx93-components; cd !$
[ -d pi ] || mkdir imx93
cd imx93; rm -rf *
cp ../imx-image-full-imx93evk-5.15.52-2.1.0.zip .
unzip imx-image-full-imx93evk-5.15.52-2.1.0.zip

Use losetup to replace the artifacts

The zip contains nand. It is storage containing the artifacts to replace. losetup is a tool for creating and managing loopback devices. Your typically work cycle is

losetup -P /dev/<loop device> /path/to/your/img
mkdir <dir_partitionX>
mount /dev/<loop device><partitionX> <dir_partitionX>
<modify here>
umount /dev/<loop device><partitionX>
rm -rf <dir_partitionX>    
losetup -d /dev/<loop device>

Mount the boot and rootfs partions

LO="$(losetup -f)"; echo $LO
sudo losetup -P "${LO}" nand
mkdir boot; sudo mount "${LO}p1" boot
mkdir rootfs; sudo mount "${LO}p2" rootfs

Replace what ever you want

...

Umount and remove the loop device

# find where your device is
losetup -l
#to see what to umount
mount 
sudo umount "${LO}p1"; sudo umount "${LO}p2"
rm -rf boot rootfs
sudo losetup -d ${LO}

Create the Info plist that describes the model image

...

Zip image and its ready for use

zip -r imx-image-full-imx93evk-5.15.52-2.1.0.zip Info.plist nand devicetree kernel
⚠️ **GitHub.com Fallback** ⚠️