I'm using a CM4 (with the console being a serial console). Everything is working EXCEPT getting control of the console in initramfs -- I can't echo (much less get a shell).
I'm using ubuntu 20.04 server.
I'm booting with "verbose debug" (not quiet). Looking at the init script, the printf (log_msg) never come out).
When I add echos or printfs are certain points in my initramfs init script, it just stops there.
I really want to do something like break=init -- it works fine on intel platforms (I tried ubuntu 21.04 with vbox) -- but I don't know why rpi isn't working.
I commented out run-init -- and this shows on the console:
[ 6.841542] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null) [ 6.985488] printk: systemd-udevd: 27 output lines suppressed due to ratelimiting [ 7.042109] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000200 [ 7.049889] CPU: 2 PID: 1 Comm: sh Not tainted 5.4.0-1068-raspi #78-Ubuntu [ 7.056860] Hardware name: Raspberry Pi Compute Module 4 Rev 1.0 (DT) [ 7.063389] Call trace: [ 7.065869] dump_backtrace+0x0/0x198 [ 7.069577] show_stack+0x28/0x38 [ 7.072933] dump_stack+0xd8/0x134 [ 7.076378] panic+0x160/0x35c [ 7.079469] complete_and_exit+0x0/0x38 [ 7.083353] do_group_exit+0x4c/0xa8 [ 7.086973] __wake_up_parent+0x0/0x48 [ 7.090769] el0_svc_common.constprop.0+0x84/0x230 [ 7.095622] el0_svc_handler+0x38/0xa0 [ 7.099419] el0_svc+0x10/0x140 [ 7.102602] SMP: stopping secondary CPUs [ 7.106578] Kernel Offset: 0x28347d800000 from 0xffff800010000000 [ 7.112753] PHYS_OFFSET: 0xffffacd080000000 [ 7.116990] CPU features: 0x10002,20806000 [ 7.121139] Memory Limit: none [ 7.124236] ---[ end Kernel panic - not syncing: And the init script has:
shellcheck disable=SC2086,SC2094 exec run-init ${drop_caps} "${rootmnt}" "${init}" "$@" <"${rootmnt}/dev/console" >"${rootmnt}/dev/console" 2>&1 echo "Something went badly wrong in the initramfs." panic "Please file a bug on initramfs-tools."