All Collections
Custom Firmware
Firmware
Package i.MX 93 Firmware for AVH
Package i.MX 93 Firmware for AVH
avhsupport avatar
Written by avhsupport
Updated over a week ago

In this article, we share the process for creating your own custom firmware for the i.MX 93 virtual board.

This packaging process follows the Understanding Firmware on AVH knowledge base article and uses the i.MX 93 image version 6.1.1, available directly from NXP.

Firmware Package Contents

A proper Ubuntu Server firmware package file contains the following:

  • Info.plist - the version, type, build, unique identifier, and device identifier

  • nand - the preinstalled i.MX93 arm64 image file from NXP

  • devicetree - hardware components data for the Linux kernel

  • kernel - the Linux kernel file

Firmware Packaging Script

The following script creates a custom firmware package in your working directory.

Run the script as a superuser.

#!/bin/bash
set -e

dir_name="imx93_package"
output_filename="imx93_yocto_firmware.zip"
firmware_name="LF_v6.1.1_1.0.0_images_IMX93EVK.zip"
image_name="imx-image-full-imx93evk.wic"

# Create a temporary directory and extract the image
[ -d ${dir_name} ] || mkdir ${dir_name}
cd ${dir_name}
unzip -d . ../${firmware_name} ${image_name}
mv ${image_name} nand

# Mount the boot partition and extract the kernel and device tree
LO="$(losetup -f)"
losetup -P ${LO} nand
mkdir boot/
mount ${LO}p1 boot/
cp boot/Image kernel
cp boot/imx93-14x14-evk.dtb devicetree
umount boot/
rm -r boot/

# Mount the root filesystem to make any custom modifications
mkdir rootfs/
mount ${LO}p2 rootfs/
touch rootfs/custom_file_on_filesystem
umount rootfs/
rm -r rootfs/
losetup -D ${LO}

# Create the metadata file Info.plist
cat << EOF > Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Type</key>
<string>iot</string>
<key>UniqueIdentifier</key>
<string>i.MX 93 Yocto</string>
<key>DeviceIdentifier</key>
<string>imx93</string>
<key>Version</key>
<string>1.1.0</string>
<key>Build</key>
<string>6.1.1_1.0.0</string>
</dict>
</plist>
EOF

# Zip the contents and remove the packaging directory
zip ../${output_filename} nand kernel devicetree Info.plist
cd ..
rm -r ${dir_name}


​


​


​


​

Did this answer your question?