Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 6814

Other • How to write boot command in uboot for my FIT image to boot in /dev/ram

$
0
0
Used board : raspberry compute module 4 (with IO board) FIT image is generated through a yocto process (with meta-raspberry). My project used to work on a different SOM and I'm trying to move it to raspberry. Uboot version : 2022.01

Here is a description of my FitImage.

Code:

$ fitImage-rescue-image-initramfsFIT description: Kernel fitImage for MyProject/5.15.92+gitAUTOINC+509f4b9d68_14b35093ca/mmp2-picm4Created:         Wed Feb  8 17:47:50 2023 Image 0 (kernel-1)  Description:  Linux kernel  Created:      Wed Feb  8 17:47:50 2023  Type:         Kernel Image  Compression:  gzip compressed  Data Size:    8522346 Bytes = 8322.60 KiB = 8.13 MiB  Architecture: AArch64  OS:           Linux  Load Address: 0x00008000  Entry Point:  0x00008000  Hash algo:    sha256  Hash value:   3d207890a749320c1963cc6cdca613845d3f76041824a21641403d8c4e358a0b Image 1 (fdt-broadcom_bcm2711-rpi-cm4.dtb)  Description:  Flattened Device Tree blob  Created:      Wed Feb  8 17:47:50 2023  Type:         Flat Device Tree  Compression:  uncompressed  Data Size:    55722 Bytes = 54.42 KiB = 0.05 MiB  Architecture: AArch64  Hash algo:    sha256  Hash value:   994ff85a1b6fc062952a998b509f90e1883b7b339cdc4488891931139148bb54 Image 2 (ramdisk-1)  Description:  mmp2-rescue-image-initramfs  Created:      Wed Feb  8 17:47:50 2023  Type:         RAMDisk Image  Compression:  uncompressed  Data Size:    47204216 Bytes = 46097.87 KiB = 45.02 MiB  Architecture: AArch64  OS:           Linux  Load Address: unavailable  Entry Point:  unavailable  Hash algo:    sha256  Hash value:   c4b72b975247100ba23bc478338b826857cf1fbe76e0395bcc5b4ae78c57dc71 Default Configuration: 'conf-broadcom_bcm2711-rpi-cm4.dtb' Configuration 0 (conf-broadcom_bcm2711-rpi-cm4.dtb)  Description:  1 Linux kernel, FDT blob, ramdisk  Kernel:       kernel-1  Init Ramdisk: ramdisk-1  FDT:          fdt-broadcom_bcm2711-rpi-cm4.dtb  Hash algo:    sha256  Hash value:   unavailable
The image I'm flashing on my raspberry with rpi-imager is divided in 5 partitions (gpt table) : part 1 is uboot part 2 is a rescue partition part 3 is my main rootfs part 4 is the rootfs partition for update (with swupdate) part 5 is a shared partition data.

I'm booting my partition through extlinux script and it's working fine. I want to boot a different fitimage-rescue stored in partition 3 in /boot/fitImage-rescue on /dev/ram in case I need to make a safe boot. This fitImage is working fine with my other board.

To boot this image, the command used in uboot is :

Code:

bootcmd_rescue=setenv bootargs "root=/dev/ram rw panic=5 coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=0 console=ttyS0,115200 " ; load mmc 0:3 0x00080000 boot/fitImage-rescue && bootm 0x00080000
Then the uncompression of the kernel doesn't behave well. I fear I misunderstand something with load address or uboot/fitImage usage. Does anyone have a tip ? Here are the logs :

Code:

55784504 bytes read in 2336 ms (22.8 MiB/s)## Loading kernel from FIT Image at 00080000 ...   Using 'conf-broadcom_bcm2711-rpi-cm4.dtb' configuration   Verifying Hash Integrity ... OK   Trying 'kernel-1' kernel subimage     Description:  Linux kernel     Type:         Kernel Image     Compression:  gzip compressed     Data Start:   0x0008010c     Data Size:    8522346 Bytes = 8.1 MiB     Architecture: AArch64     OS:           Linux     Load Address: 0x00008000     Entry Point:  0x00008000     Hash algo:    sha256     Hash value:   3d207890a749320c1963cc6cdca613845d3f76041824a21641403d8c4e358a0b   Verifying Hash Integrity ... sha256+ OK## Loading ramdisk from FIT Image at 00080000 ...   Using 'conf-broadcom_bcm2711-rpi-cm4.dtb' configuration   Verifying Hash Integrity ... OK   Trying 'ramdisk-1' ramdisk subimage     Description:  mmp2-rescue-image-initramfs     Type:         RAMDisk Image     Compression:  uncompressed     Data Start:   0x008ae718     Data Size:    47204216 Bytes = 45 MiB     Architecture: AArch64     OS:           Linux     Load Address: unavailable     Entry Point:  unavailable     Hash algo:    sha256     Hash value:   c4b72b975247100ba23bc478338b826857cf1fbe76e0395bcc5b4ae78c57dc71   Verifying Hash Integrity ... sha256+ OK## Loading fdt from FIT Image at 00080000 ...   Using 'conf-broadcom_bcm2711-rpi-cm4.dtb' configuration   Verifying Hash Integrity ... OK   Trying 'fdt-broadcom_bcm2711-rpi-cm4.dtb' fdt subimage     Description:  Flattened Device Tree blob     Type:         Flat Device Tree     Compression:  uncompressed     Data Start:   0x008a0c98     Data Size:    55722 Bytes = 54.4 KiB     Architecture: AArch64     Hash algo:    sha256     Hash value:   994ff85a1b6fc062952a998b509f90e1883b7b339cdc4488891931139148bb54   Verifying Hash Integrity ... sha256+ OK   Booting using the fdt blob at 0x8a0c98   Uncompressing Kernel ImageError: inflate() returned -3gzip compressed: uncompress error -1Must RESET board to recoverresetting ...

Statistics: Posted by turcantn — Mon Aug 25, 2025 11:05 am — Replies 0 — Views 141



Viewing all articles
Browse latest Browse all 6814

Trending Articles