Hi everyone
I'm desperately trying to boot my initramfs image with Uboot on a compute module 4. Everything is generated from yocto with meta-raspberry.
I'm trying to boot with these commands :The kernel starts and then hangs here :The fitimage-rescue is an image which should be started to make reset-factory or an update through usb. A simple script is launched to wait for input buttons. The fitimage is built like this :In my yocto build, I included the following, according to documentation, but nothing changed :And here is the recipe for the initramfs image :Any help or advice is welcome, I'm struggling on this for a long time now.
Best regards
I'm desperately trying to boot my initramfs image with Uboot on a compute module 4. Everything is generated from yocto with meta-raspberry.
I'm trying to boot with these commands :
Code:
setenv kernel_addr_r 0x08000000;setenv bootargs "root=/dev/ram0 rootfstype=ramfs ro 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 ${kernel_addr_r} boot/fitImage-rescuebootm ${kernel_addr_r} I analyzed the initramfs.cpio.gz with the following command and there is the correct link /init -> /sbin/init, which is a link to my /sbin/custom_script :[ 0.877608] printk: console [ttyS0] disabled
[ 0.877660] fe215040.serial: ttyS0 at MMIO 0xfe215040 (irq = 19, base_baud = 62500000) is a 16550
[ 2.012345] printk: console [ttyS0] enabled
[ 2.017220] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[ 2.023880] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
[ 2.032269] mmc-bcm2835 fe300000.mmcnr: mmc_debug:0 mmc_debug2:0
[ 2.038376] mmc-bcm2835 fe300000.mmcnr: DMA channel allocated
[ 2.069994] sdhost: log_buf @ (____ptrval____) (c5700000)
[ 2.125244] mmc2: sdhost-bcm2835 loaded - DMA enabled (>1)
[ 2.152533] of_cfs_init
[ 2.155116] of_cfs_init: OK
[ 2.158227] OF: fdt: not creating '/sys/firmware/fdt': CRC check failed
[ 2.190963] mmc1: new high speed SDIO card at address 0001
[ 2.200608] mmc0: SDHCI controller on fe340000.mmc [fe340000.mmc] using ADMA
[ 2.220839] ALSA device list:
[ 2.223865] No soundcards found.
[ 2.227617] RAMDISK: Couldn't find valid RAM disk image starting at 0.
[ 2.234362] VFS: Mounted root (ramfs filesystem) readonly on device 0:17.
[ 2.246839] devtmpfs: error mounting -2
[ 2.256142] Freeing unused kernel memory: 3904K
[ 2.266866] Run /sbin/init as init process
[ 2.271276] Run /etc/init as init process
[ 2.275483] Run /bin/init as init process
[ 2.279660] Run /bin/sh as init process
[ 2.283797] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See L
inux Documentation/admin-guide/init.rst for guidance.
[ 2.298170] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.15.92-v8 #1
[ 2.304524] Hardware name: Raspberry Pi Compute Module 4 (DT)
[ 2.310345] Call trace:
[ 2.312816] dump_backtrace+0x0/0x1d0
[ 2.316540] show_stack+0x20/0x30
[ 2.319897] dump_stack_lvl+0x8c/0xb8
[ 2.323608] dump_stack+0x18/0x34
[ 2.326962] panic+0x1a4/0x37c
[ 2.330056] _cpu_down+0x0/0x4c0
[ 2.333326] ret_from_fork+0x10/0x20
[ 2.336946] SMP: stopping secondary CPUs
[ 2.340919] Kernel Offset: 0x8000 from 0xffffffc008000000
[ 2.346388] PHYS_OFFSET: 0x0
[ 2.349300] CPU features: 0x800804f1,00000846
[ 2.353712] Memory Limit: none
[ 2.356806] Rebooting in 5 seconds..
Code:
$ file initramfs.cpio.gz initramfs.cpio.gz: gzip compressed data, max compression, from Unix, original size modulo 2^32 80785408$ gunzip initramfs.cpio.gz$ mkdir cpio_content && cd cpio_content$ cpio -idmv < ../initramfs.cpioCode:
dumpimage -l fitImage-rescue FIT description: Kernel fitImage 5.15.92+gitAUTOINC+509f4b9d68_14b35093ca/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: 683de5d310d92b34a95a5246ebde5f705919548b0dbbb367f6a7b36cc42352b4 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: 55773 Bytes = 54.47 KiB = 0.05 MiB Architecture: AArch64 Hash algo: sha256 Hash value: 3edf9dc049e028d494a88fd5fb3184b10b007c3840a9c1e487eb676efd9d6a9f Image 2 (ramdisk-1) Description: rescue-image-initramfs Created: Wed Feb 8 17:47:50 2023 Type: RAMDisk Image Compression: uncompressed Data Size: 47197424 Bytes = 46091.23 KiB = 45.01 MiB Architecture: AArch64 OS: Linux Load Address: unavailable Entry Point: unavailable Hash algo: sha256 Hash value: e14b308e79fc3ca47204b88b1bf582a01737a2177a30555a7e2a40bdceb584d4 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: unavailableCode:
in linux-raspberry config :CONFIG_BLK_DEV_INITRD=yCONFIG_INITRAMFS_SOURCE=""CONFIG_RD_GZIP=yin local.conf:INITRAMFS_FSTYPES = " cpio.gz "INITRAMFS_IMAGE = "rescue-image-initramfs"INITRAMFS_IMAGE_BUNDLE = "1"BOOT_SPACE = "1073741"INITRAMFS_MAXSIZE = "315400"IMAGE_FSTYPES:pn-${INITRAMFS_IMAGE} = "${INITRAMFS_FSTYPES}"Code:
USE_DEVFS = "1"export SYSVINIT = "no"IMAGE_INSTALL = "\ base-files \ base-passwd \ busybox \ mtd-utils \ mtd-utils-ubifs \ libconfig \ swupdate \ virtual/initscripts-swupdate \ util-linux-sfdisk \ init-ifupdown \ lua \ luafilesystem \ swupdate-tools \ u-boot-fw-utils \ udev \ udev-extraconf \ u-boot-env \ upgrade-tools \ kernel-modules \ setsysfs \ swupdate-progress \ e2fsprogs-mke2fs \ libgcc \"IMAGE_FEATURES += " read-only-rootfs"IMAGE_FSTYPES = "cpio.gz"IMAGE_LINGUAS = " "inherit imageBest regards
Statistics: Posted by turcantn — Wed Oct 29, 2025 1:41 pm