Hi!
I have a running/working imx93 A0 EVK running a typical "freescale imx93evk defconfig" combination of U-Boot, Kernel, and Buildroot. I have - on a previous ARM32-based platform used the following to combine kernel, rootfs, and DTB into a multi-image ("mxImage");
mkimage -A arm -O linux -T multi -a $ADDR -e $ADDR -C gzip -n "$MX_IMAGE_VERSION" -d zImage.gz:rootfs.ext2.zst:socfpga.dtb mxImage
Works great.
Now trying the same for the imx93 A0 EVK with the following combination
mkimage -A arm64 -O linux -T multi -a $ADDR -e $ADDR -C gzip -n "$MX_IMAGE_VERSION" -d Image.gz:rootfs.ext2.zst:imx93-11x11-evk.dtb mxImage
Results in the following error (note: mxImage resides on the boot'ed MMC-card)
u-boot=> run mmcboot-imx93
42832604 bytes read in 451 ms (90.6 MiB/s)
## Booting kernel from Legacy Image at 80100000 ...
Image Name: IMX93 BSP ** preliminary **
Created: 2024-04-07 9:37:36 UTC
Image Type: ARM Linux Multi-File Image (gzip compressed)
Data Size: 42832540 Bytes = 40.8 MiB
Load Address: 00008000
Entry Point: 00008000
Contents:
Image 0: 13759602 Bytes = 13.1 MiB
Image 1: 29025887 Bytes = 27.7 MiB
Image 2: 47032 Bytes = 45.9 KiB
Verifying Checksum ... OK
## Loading init Ramdisk from multi component Legacy Image at 80100000 ...
## Flattened Device Tree from multi component Image at 80100000
Booting using the fdt at 0x00000000829cdb24
Working FDT set to 829cdb24
Uncompressing Multi-File Image
"Error" handler, esr 0xbe000011
elr: 00000000802a1570 lr : ffffffff81320000 (reloc)
elr: 00000000fef81570 lr : 0000000000000000
x0 : 00000000fced31d8 x1 : 0000000000000012
x2 : 0000000000040002 x3 : 0000000080113297
x4 : 00000000fcf26208 x5 : 000000000001d75e
x6 : 0000000000000000 x7 : 00000000fcf25720
x8 : 0000000080e1f4bc x9 : 0000000099a69993
x10: 0000000000000000 x11: 0000000004007efe
x12: 0000000000007fff x13: 000000000000003f
x14: 00000000000001ff x15: 00000000fcf25c70
x16: 00000000fcf26748 x17: 0000000000000001
x18: 00000000fcedfd70 x19: 0000000000000000
x20: 0000000000000000 x21: 0000000000000007
x22: 0000000000000007 x23: 0000000000000000
x24: 000000000003fff8 x25: 000000000000aa16
x26: 0000000000000016 x27: 0000000000d12d2b
x28: 00000000fcf257b0 x29: 00000000fced30a0
Code: 510005ce cb0c004c 8b0b004b 7100383f (54000148)
Resetting CPU ...
resetting ...
Anyone got this to work? If so - how?
Thanks.
Hi @eldorr
Please refer 4.5.13 How to build imx-boot image by using imx-mkimage in https://www.nxp.com/docs/en/user-guide/IMX_LINUX_USERS_GUIDE.pdf to understand the image build process on i.MX93, you can open the imx-boot in Yocto project, that's original scripts to combine images.
Hi!
Thank you for the reply.
I will try to explain better ... OK; so I have a working uSD/MMC card boot'ing as expected. Kernel, DTB, rootfs ... all good.
Then - on that same uSD/MMC card I have a partition where I have copied a so-called "multi-image" consisting of a container packed with the same three components but then bundled into a standard multi-image with the command outlined in my original post. Let us call that image "mxImage". Then we look into that image structure it looks like this:
Image Name: IMX93 BSP ** preliminary **
Created: Mon Apr 8 09:43:35 2024
Image Type: AArch64 Linux Multi-File Image (gzip compressed)
Data Size: 42832540 Bytes = 41828.65 KiB = 40.85 MiB
Load Address: 00008000
Entry Point: 00008000
Contents:
Image 0: 13759602 Bytes = 13437.11 KiB = 13.12 MiB
Image 1: 29025887 Bytes = 28345.59 KiB = 27.68 MiB
Image 2: 47032 Bytes = 45.93 KiB = 0.04 MiB
"Image 0" is the kernel, "Image 1" is the rootfs, and finally "Image 2" is the DTB.
I was hoping that the following can be done:
1. From U-Boot; use "fatload" to fetch this "mxImage" from the corresponding FAT32-partition on uSD/MMC card into the "loadaddr" memory location
2. Use the "bootm <loadaddr>" command to kick-start that image into a fully running BSP
I have done his for an ARM32 but then of course using a different version of more-or-less every SW-part. I was hoping for the same possibility on my imx93 A0 EVK, but am not sure how to bundle these components into a valid "mxImage".
I can see (in the makefile of imx-mkimage" an example for "flash_kernel" the following
flash_kernel: $(MKIMG) Image imx93-11x11-evk.dtb
./$(MKIMG) -soc IMX9 -c -ap Image a35 0x80400000 --data imx93-11x11-evk.dtb a35 0x83000000 -out flash.bin
Is tried something similar but U-Boot complains about
Wrong Image Format for bootm command
ERROR: can't get kernel image!
... so I obviously am doing something wrong.
Any input appreciated - thanks.