iMX8 Wrong Ramdisk Image format

Hi everyone,

It seems that I have a problem with my iMX8 board, u-boot on the device does not have the bootz command, so I had to make a few changes:
my kernel snap’s kernel-image-target set to Image.

The u-boot on the device loads all the images from my boot.scr file (kernel, initrd) but conks out on the following: (marked the debug comments with ~)
## Executing script at 40480000
8192 bytes read in 3 ms (2.6 MiB/s)
~Loaded uboot.env file.
39043 bytes read in 8 ms (4.7 MiB/s)
~Loaded dtb: sb-iotgimx8.dtb
24316416 bytes read in 924 ms (25.1 MiB/s)
~Loaded kernel: /iotgateimx8-kernel_x1.snap/kernel.img
4873629 bytes read in 184 ms (25.3 MiB/s)
~Loaded initrd: /iotgateimx8-kernel_x1.snap/initrd.img
~Booting.
Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid
~Error loading/booting kernel image…

Snippet of my bootscript:
iface is “usb” (booting from USB, for rapid development)
if load ${iface} ${dev}:${part} ${a_zImage} ${bootdir}kernel.img ; then echo "Loaded kernel: ${bootdir}kernel.img" if load ${iface} ${dev}:${part} ${a_initrd} ${bootdir}initrd.img ; then echo "Loaded initrd: ${bootdir}initrd.img" echo "Booting." ${bootcommand} ${a_zImage} ${a_initrd}:${filesize} ${a_fdt} ; else echo "Failed to load ${bootdir}initrd.img, booting without initrd..." setenv bootargs ${bootargs} rw ${bootcommand} ${a_zImage} - ${a_fdt} fi else echo "Error, could not load ${bootdir}kernel.img" fi echo "Error loading/booting kernel image..."

So it seems that my u-boot is too old?
Needs to be compiled to have the “CONFIG_LEGACY_IMAGE_FORMAT” option enabled and maybe add the the bootz supported command as well?

do you have CONFIG_SUPPORT_RAW_INITRD set ?

This for u-boot or linux kernel?

EDIT: Oh, I see, it’s for U-boot. I’ll go check on the sources of the manufacturer’s u-boot sources.
It’s for the IOT-GATE-iMX8 from Compulab.

this is for u-boot (your log is far before anything gets to the kernel)

Booti can work for you on imx8 platform.

As Ogra suggested, you can confirm the CONFIG_SUPPORT_RAW_INITRD on your bootloader code.

1 Like

Hello. I checked through the config of the u-boot sources, and added the CONFIG_SUPPORT_RAW_INITRD=y config, and rebuilt the u-boot image.
Flashing was easy, and Ubuntu Core now boots.
I also suggested this change to the manufacturer, so if they release a new u-boot image, that it has raw initrd support.

Thanks for quick response and support.

So all in all, if your device has the same error, ensure that CONFIG_SUPPORT_RAW_INITRD is at least set for U-Boot.

2 Likes