How to load raw disk image in u-boot?

Sourabh Hegde hrsourabh011 at gmail.com
Thu Feb 15 12:13:20 CET 2024


Hello,

I am working on the secure boot for raspberry pi topic as described here
https://github.com/raspberrypi/usbboot/tree/master?tab=readme-ov-file#secure-boot---image-creation
The
boot.img file contains u-boot.bin, config.txt, boot.scr, Image, DTB and
other raspberry pi necessary files.
But when I try to integrate this with u-boot, the boot.img is not being
parsed and I see below errors

libfdt fdt_check_header(): FDT_ERR_BADMAGIC
No EFI system partition
BootOrder not defined
EFI boot manager: Cannot load any image

I tried to manually load it using:
fatload mmc 0:1 ${kernel_addr_r} boot.img

this works but, booty is not able to run it
booti ${kernel_addr_r} - ${fdt_addr}

Bad Linux ARM64 Image magic!

I believe first we need to uncompress the raw disk image and then load it.
However with unzip it is not possible to do it.
unzip ${kernel_addr_r} 0x83000000
Error: Bad gzipped data

So, how can we load the raw disk image in U-boot?


More information about the U-Boot mailing list