Skip to content

Instantly share code, notes, and snippets.

@lawik
Last active July 7, 2024 15:07
Show Gist options
  • Save lawik/82c52aa8b02d3f3ed9a85d66b677a9a9 to your computer and use it in GitHub Desktop.
Save lawik/82c52aa8b02d3f3ed9a85d66b677a9a9 to your computer and use it in GitHub Desktop.
RPi4 Secure Boot Kernel Panic, again
RPi: BOOTLOADER release VERSION:e608a69d DATE: 2024/04/15 TIME: 14:12:14
BOOTMODE: 0x06 partition 0 build-ts BUILD_TIMESTAMP=1713186734 serial 2f2a72cf boardrev b03141 stc 477024
PM_RSTS: 0x00001000
part 00000000 reset_info 00000000
uSD voltage 3.3V
Initialising SDRAM 'Samsung' 16Gb x1 total-size: 16 Gbit 3200
DDR 3200 0 0 16 152
Boot mode: SD (01) order f2564
SD HOST: 200000000 CTL0: 0x00800000 BUS: 400000 Hz actual: 390625 HZ div: 512 (256) status: 0x1fff0000 delay: 276
SD HOST: 200000000 CTL0: 0x00800f00 BUS: 400000 Hz actual: 390625 HZ div: 512 (256) status: 0x1fff0000 delay: 276
EMMC
SD retry 1 oc 0
SD HOST: 200000000 CTL0: 0x00800000 BUS: 400000 Hz actual: 390625 HZ div: 512 (256) status: 0x1fff0000 delay: 276
OCR c0ff8080 [0]
CID: 001501003847544634520680754ad9ca
SD HOST: 200000000 CTL0: 0x00800f04 BUS: 25000000 Hz actual: 25000000 HZ div: 8 (4) status: 0x1fff0000 delay: 4
SD HOST: 200000000 CTL0: 0x00800f04 BUS: 50000000 Hz actual: 50000000 HZ div: 4 (2) status: 0x1fff0000 delay: 2
MBR: 0x0000003f, 716800 type: 0x0c
MBR: 0x00168000, 289044 type: 0x83
MBR: 0x001f5228,13217240 type: 0x83
MBR: 0x00000000, 0 type: 0x00
Trying partition: 0
type: 32 lba: 63 oem: 'MSDOS5.0' volume: ' NO NAME '
rsc 32 fat-sectors 5601 c-count 705566 c-size 1
root dir cluster 2 sectors 0 entries 0
FAT32 clusters 705566
Trying partition: 0
type: 32 lba: 63 oem: 'MSDOS5.0' volume: ' NO NAME '
rsc 32 fat-sectors 5601 c-count 705566 c-size 1
root dir cluster 2 sectors 0 entries 0
FAT32 clusters 705566
secure-boot
Loading boot.img ...
SIG boot.sig ab05447363c2db2f89732ea3522b4768873f3494a03603e85f75558df781dce4 1720362482
Verifying
RSA verify
rsa-verify pass (0x0)
MBR: 0x00000000, 0 type: 0x00
MBR: 0x00000000, 0 type: 0x00
MBR: 0x00000000, 0 type: 0x00
MBR: 0x00000000, 0 type: 0x00
Trying partition: 0
type: 16 lba: 0 oem: 'mkfs.fat' volume: ' V ^ '
rsc 4 fat-sectors 64 c-count 16343 c-size 4
root dir cluster 1 sectors 32 entries 512
FAT16 clusters 16343
Read config.txt bytes 2108 hnd 0x54
Read start4x.elf bytes 3002536 hnd 0x3251
Read fixup4x.dat bytes 8399 hnd 0x324c
0x00b03141 0x00000000 0x00001fff
MEM GPU: 192 ARM: 832 TOTAL: 1024
Firmware: 30f0c5e4d076da3ab4f341d88e7d505760b93ad7 Oct 17 2023 15:40:00
Starting start4x.elf @ 0xfec00200 partition 0
+
MESS:00:00:08.815512:0: brfs: File read: /mfs/sd/config.txt
MESS:00:00:08.819040:0: brfs: File read: 2108 bytes
MESS:00:00:08.843228:0: HDMI0:EDID error reading EDID block 0 attempt 0
MESS:00:00:08.847732:0: HDMI0:EDID giving up on reading EDID block 0
MESS:00:00:08.864424:0: HDMI1:EDID error reading EDID block 0 attempt 0
MESS:00:00:08.868931:0: HDMI1:EDID giving up on reading EDID block 0
MESS:00:00:08.874423:0: brfs: File read: /mfs/sd/config.txt
MESS:00:00:08.880324:0: gpioman: gpioman_get_pin_num: pin DISPLAY_SDA not defined
MESS:00:00:08.886511:0: gpioman: gpioman_get_pin_num: pin LEDS_PWR_OK not defined
MESS:00:00:09.057842:0: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
MESS:00:00:09.062482:0: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
MESS:00:00:09.070223:0: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
MESS:00:00:09.077673:0: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
MESS:00:00:09.383377:0: gpioman: gpioman_get_pin_num: pin LEDS_PWR_OK not defined
MESS:00:00:09.389026:0: *** Restart logging
MESS:00:00:09.391667:0: brfs: File read: 2108 bytes
MESS:00:00:09.401546:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 0
MESS:00:00:09.406572:0: hdmi: HDMI0:EDID giving up on reading EDID block 0
MESS:00:00:09.417196:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 0
MESS:00:00:09.422225:0: hdmi: HDMI0:EDID giving up on reading EDID block 0
MESS:00:00:09.427824:0: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
MESS:00:00:09.441614:0: hdmi: HDMI1:EDID error reading EDID block 0 attempt 0
MESS:00:00:09.446644:0: hdmi: HDMI1:EDID giving up on reading EDID block 0
MESS:00:00:09.457266:0: hdmi: HDMI1:EDID error reading EDID block 0 attempt 0
MESS:00:00:09.462290:0: hdmi: HDMI1:EDID giving up on reading EDID block 0
MESS:00:00:09.467888:0: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
MESS:00:00:09.476653:0: HDMI0: hdmi_pixel_encoding: 300000000
MESS:00:00:09.482126:0: HDMI1: hdmi_pixel_encoding: 300000000
MESS:00:00:09.689919:0: brfs: File read: /mfs/sd/rootfs.cpio.zst
MESS:00:00:09.692819:0: Loaded 'rootfs.cpio.zst' to 0x0 size 0x13d65c0
MESS:00:00:09.715711:0: initramfs loaded to 0x2dc29000 (size 0x13d65c0)
MESS:00:00:09.719232:0: gpioman: gpioman_get_pin_num: pin CAMERA_0_I2C_PORT not defined
MESS:00:00:09.731200:0: dtb_file 'bcm2711-rpi-cm4.dtb'
MESS:00:00:09.733229:0: brfs: File read: 20800960 bytes
MESS:00:00:09.738688:0: brfs: File read: /mfs/sd/bcm2711-rpi-cm4.dtb
MESS:00:00:09.744251:0: Loaded 'bcm2711-rpi-cm4.dtb' to 0x100 size 0xd84f
MESS:00:00:09.764401:0: brfs: File read: 55375 bytes
MESS:00:00:09.768390:0: brfs: File read: /mfs/sd/overlays/overlay_map.dtb
MESS:00:00:09.799685:0: brfs: File read: 4775 bytes
MESS:00:00:09.801559:0: brfs: File read: /mfs/sd/config.txt
MESS:00:00:09.807090:0: dtparam: i2c_arm=on
MESS:00:00:09.819411:0: dtparam: spi=on
MESS:00:00:09.828351:0: dtparam: audio=on
MESS:00:00:09.834276:0: brfs: File read: 2108 bytes
MESS:00:00:09.837462:0: brfs: File read: /mfs/sd/overlays/vc4-kms-v3d-pi4.dtbo
MESS:00:00:09.905299:0: Loaded overlay 'vc4-kms-v3d'
MESS:00:00:10.058491:0: brfs: File read: 3913 bytes
MESS:00:00:10.062657:0: brfs: File read: /mfs/sd/overlays/dwc2.dtbo
MESS:00:00:10.072353:0: Loaded overlay 'dwc2'
MESS:00:00:10.084443:0: brfs: File read: 801 bytes
MESS:00:00:10.086849:0: brfs: File read: /mfs/sd/overlays/ramoops-pi4.dtbo
MESS:00:00:10.096586:0: Loaded overlay 'ramoops'
MESS:00:00:10.105550:0: brfs: File read: 741 bytes
MESS:00:00:10.109613:0: brfs: File read: /mfs/sd/overlays/dwc2.dtbo
MESS:00:00:10.119442:0: Loaded overlay 'dwc2'
MESS:00:00:10.120685:0: dtparam: dr_mode=host
MESS:00:00:10.143004:0: brfs: File read: 801 bytes
MESS:00:00:10.144783:0: brfs: File read: /mfs/sd/cmdline.txt
MESS:00:00:10.150203:0: Read command line from file 'cmdline.txt':
MESS:00:00:10.155965:0: 'rootwait dwc_otg.lpm_enable=0 console=serial0,115200 root=/dev/ram0'
MESS:00:00:10.275165:0: brfs: File read: 739 bytes
MESS:00:00:10.320150:0: brfs: File read: /mfs/sd/zImage
MESS:00:00:10.322267:0: Loaded 'zImage' to 0x80000 size 0x5236d8
MESS:00:00:11.051701:0: Kernel relocated to 0x200000
MESS:00:00:11.053556:0: Device tree loaded to 0x2dc1b200 (size 0xdd7b)
MESS:00:00:11.061740:0: uart: Set PL011 baud rate to 103448.300000 Hz
MESS:00:00:11.068881:0: uart: Baud rate change done...
MESS:00:00:11.070903:0:[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083]
[ 0.000000] Linux version 6.1.73-v8 (buildroot@buildroot) (aarch64-nerves-linux-gnu-gcc (crosstool-NG UNKNOWN) 13.2.0, GNU ld (crosstool-NG UNKNOWN) 2.40) #1 SMP PREEMPT Sun Jul 7 14:28:02 UTC 2024
[ 0.000000] random: crng init done
[ 0.000000] Machine model: Raspberry Pi Compute Module 4 Rev 1.1
[ 0.000000] Reserved memory: created CMA memory pool at 0x000000000dc00000, size 512 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000000000-0x000000003fffffff]
[ 0.000000] DMA32 [mem 0x0000000040000000-0x000000007fffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000033ffffff]
[ 0.000000] node 0: [mem 0x0000000040000000-0x000000007fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] On node 0, zone DMA32: 16384 pages in unavailable ranges
[ 0.000000] percpu: Embedded 25 pages/cpu s64680 r8192 d29528 u102400
[ 0.000000] Detected PIPT I-cache on CPU0
[ 0.000000] CPU features: detected: Spectre-v2
[ 0.000000] CPU features: detected: Spectre-v4
[ 0.000000] CPU features: detected: Spectre-BHB
[ 0.000000] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
[ 0.000000] alternatives: applying boot alternatives
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 467712
[ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0 smsc95xx.macaddr=2C:CF:67:0A:8A:F7 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 rootwait dwc_otg.lpm_enable=0 console=ttyS0,115200 root=/dev/ram0
[ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[ 0.000000] software IO TLB: area num 4.
[ 0.000000] software IO TLB: mapped [mem 0x0000000030000000-0x0000000034000000] (64MB)
[ 0.000000] Memory: 1237584K/1900544K available (7872K kernel code, 1270K rwdata, 2036K rodata, 1728K init, 597K bss, 138672K reserved, 524288K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] trace event string verifier disabled
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] Trampoline variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] Root IRQ handler: gic_handle_irq
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[ 0.000000] arch_timer: cp15 timer(s) running at 54.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xc743ce346, max_idle_ns: 440795203123 ns
[ 0.000001] sched_clock: 56 bits at 54MHz, resolution 18ns, wraps every 4398046511102ns
[ 0.000210] Console: colour dummy device 80x25
[ 0.000258] Calibrating delay loop (skipped), value calculated using timer frequency.. 108.00 BogoMIPS (lpj=216000)
[ 0.000273] pid_max: default: 32768 minimum: 301
[ 0.000482] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.000512] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.001303] cgroup: Disabling memory control group subsystem
[ 0.002258] cblist_init_generic: Setting adjustable number of callback queues.
[ 0.002266] cblist_init_generic: Setting shift to 2 and lim to 1.
[ 0.002471] rcu: Hierarchical SRCU implementation.
[ 0.002476] rcu: Max phase no-delay instances is 1000.
[ 0.003421] smp: Bringing up secondary CPUs ...
[ 0.003937] Detected PIPT I-cache on CPU1
[ 0.004078] CPU1: Booted secondary processor 0x0000000001 [0x410fd083]
[ 0.004620] Detected PIPT I-cache on CPU2
[ 0.004737] CPU2: Booted secondary processor 0x0000000002 [0x410fd083]
[ 0.005238] Detected PIPT I-cache on CPU3
[ 0.005363] CPU3: Booted secondary processor 0x0000000003 [0x410fd083]
[ 0.005445] smp: Brought up 1 node, 4 CPUs
[ 0.005456] SMP: Total of 4 processors activated.
[ 0.005463] CPU features: detected: 32-bit EL0 Support
[ 0.005469] CPU features: detected: CRC32 instructions
[ 0.005547] CPU: All CPU(s) started at EL2
[ 0.005551] alternatives: applying system-wide alternatives
[ 0.006623] devtmpfs: initialized
[ 0.015406] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.015437] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 0.027907] pinctrl core: initialized pinctrl subsystem
[ 0.028779] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.030303] DMA: preallocated 1024 KiB GFP_KERNEL pool for atomic allocations
[ 0.030543] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 0.030957] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[ 0.031346] thermal_sys: Registered thermal governor 'step_wise'
[ 0.031389] cpuidle: using governor menu
[ 0.031523] ASID allocator initialised with 65536 entries
[ 0.031592] Serial: AMBA PL011 UART driver
[ 0.031989] pstore: Registered ramoops as persistent store backend
[ 0.031996] ramoops: using 0x10000@0xb000000, ecc: 0
[ 0.039314] bcm2835-mbox fe00b880.mailbox: mailbox enabled
[ 0.052102] raspberrypi-firmware soc:firmware: Attached to firmware from 2023-10-17T15:40:00, variant start_x
[ 0.056111] raspberrypi-firmware soc:firmware: Firmware hash is 30f0c5e4d076da3ab4f341d88e7d505760b93ad7
[ 0.089929] bcm2835-dma fe007000.dma: DMA legacy API manager, dmachans=0x1
[ 0.092524] SCSI subsystem initialized
[ 0.092669] usbcore: registered new interface driver usbfs
[ 0.092710] usbcore: registered new interface driver hub
[ 0.092744] usbcore: registered new device driver usb
[ 0.092930] usb_phy_generic phy: supply vcc not found, using dummy regulator
[ 0.093161] pps_core: LinuxPPS API ver. 1 registered
[ 0.093167] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[ 0.093182] PTP clock support registered
[ 0.094043] vgaarb: loaded
[ 0.094355] clocksource: Switched to clocksource arch_sys_counter
[ 0.101340] NET: Registered PF_INET protocol family
[ 0.101618] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[ 0.104024] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[ 0.104055] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.104074] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 0.104226] TCP bind hash table entries: 16384 (order: 7, 524288 bytes, linear)
[ 0.104738] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.104886] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.104920] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.105058] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.105090] PCI: CLS 0 bytes, default 64
[ 0.105586] Trying to unpack rootfs image as initramfs...
[ 0.106082] Initialise system trusted keyrings
[ 0.106232] workingset: timestamp_bits=46 max_order=19 bucket_order=0
[ 0.111627] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.112887] Key type asymmetric registered
[ 0.112899] Asymmetric key parser 'x509' registered
[ 0.112955] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[ 0.113510] irq_brcmstb_l2: registered L2 intc (/soc/interrupt-controller@7ef00100, parent irq: 23)
[ 0.118117] gpio-507 (ant1): hogged as output/high
[ 0.119471] gpio-511 (ant2): hogged as output/low
[ 0.120525] brcm-pcie fd500000.pcie: host bridge /scb/pcie@7d500000 ranges:
[ 0.120553] brcm-pcie fd500000.pcie: No bus range found for /scb/pcie@7d500000, using [bus 00-ff]
[ 0.120592] brcm-pcie fd500000.pcie: MEM 0x0600000000..0x063fffffff -> 0x00c0000000
[ 0.120626] brcm-pcie fd500000.pcie: IB MEM 0x0000000000..0x007fffffff -> 0x0400000000
[ 0.121165] brcm-pcie fd500000.pcie: setting SCB_ACCESS_EN, READ_UR_MODE, MAX_BURST_SIZE
[ 0.121463] brcm-pcie fd500000.pcie: PCI host bridge to bus 0000:00
[ 0.121475] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 0.121494] pci_bus 0000:00: root bus resource [mem 0x600000000-0x63fffffff] (bus address [0xc0000000-0xffffffff])
[ 0.121540] pci 0000:00:00.0: [14e4:2711] type 01 class 0x060400
[ 0.121626] pci 0000:00:00.0: PME# supported from D0 D3hot
[ 0.125431] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 0.125653] pci_bus 0000:01: supply vpcie3v3 not found, using dummy regulator
[ 0.125750] pci_bus 0000:01: supply vpcie3v3aux not found, using dummy regulator
[ 0.125772] pci_bus 0000:01: supply vpcie12v not found, using dummy regulator
[ 0.550403] brcm-pcie fd500000.pcie: link down
[ 0.550662] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[ 0.550697] pci 0000:00:00.0: PCI bridge to [bus 01]
[ 0.550763] pci_bus 0000:01: busn_res: [bus 01] is released
[ 0.551199] pci_bus 0000:00: busn_res: [bus 00-ff] is released
[ 0.556595] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[ 0.558091] iproc-rng200 fe104000.rng: hwrng registered
[ 0.558274] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[ 0.566127] brd: module loaded
[ 0.569792] loop: module loaded
[ 0.570380] Loading iSCSI transport class v2.0-870.
[ 0.572812] bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000
[ 1.338153] Freeing initrd memory: 20312K
[ 1.406429] unimac-mdio unimac-mdio.-19: Broadcom UniMAC MDIO bus
[ 1.407501] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[ 1.407833] usbcore: registered new interface driver usb-storage
[ 1.407951] UDC core: g_ether: couldn't find an available UDC
[ 1.407961] i2c_dev: i2c /dev entries driver
[ 1.408662] brcmstb-i2c fef04500.i2c: @97500hz registered in polling mode
[ 1.409005] brcmstb-i2c fef09500.i2c: @97500hz registered in polling mode
[ 1.410580] sdhci: Secure Digital Host Controller Interface driver
[ 1.410588] sdhci: Copyright(c) Pierre Ossman
[ 1.410798] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.412980] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.413098] hid: raw HID events driver (C) Jiri Kosina
[ 1.413213] usbcore: registered new interface driver usbhid
[ 1.413219] usbhid: USB HID core driver
[ 1.413357] bcm2835_vchiq fe00b840.mailbox: there is not valid maps for state default
[ 1.418221] NET: Registered PF_INET6 protocol family
[ 1.419267] Segment Routing with IPv6
[ 1.419291] In-situ OAM (IOAM) with IPv6
[ 1.419362] NET: Registered PF_PACKET protocol family
[ 1.419684] Loading compiled-in X.509 certificates
[ 1.420118] pstore: Using crash dump compression: deflate
[ 1.422802] uart-pl011 fe201000.serial: there is not valid maps for state default
[ 1.423088] uart-pl011 fe201000.serial: cts_event_workaround enabled
[ 1.423184] fe201000.serial: ttyAMA1 at MMIO 0xfe201000 (irq = 30, base_baud = 0) is a PL011 rev2
[ 1.429030] bcm2835-aux-uart fe215040.serial: there is not valid maps for state default
[ 1.429398] printk: console [ttyS0] disabled
[ 1.429460] fe215040.serial: ttyS0 at MMIO 0xfe215040 (irq = 31, base_baud = 62500000) is a 16550
[ 2.502526] printk: console [ttyS0] enabled
[ 2.507111] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[ 2.513678] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
[ 2.522325] mmc-bcm2835 fe300000.mmcnr: mmc_debug:0 mmc_debug2:0
[ 2.528449] mmc-bcm2835 fe300000.mmcnr: DMA channel allocated
[ 2.559609] of_cfs_init
[ 2.562104] of_cfs_init: OK
[ 2.600974] mmc0: SDHCI controller on fe340000.mmc [fe340000.mmc] using ADMA
[ 2.609194] Freeing unused kernel memory: 1728K
[ 2.613898] Run /init as init process
======================= Running init from rootfs_overlay
Waiting for /dev/mmcblk0p2...
[ 2.674772] mmc0: new DDR MMC card at address 0001
[ 2.680546] mmcblk0: mmc0:0001 8GTF4R 7.28 GiB
[ 2.687214] mmcblk0: p1 p2 p3
[ 2.690527] mmcblk0: mmc0:0001 8GTF4R 7.28 GiB
[ 2.695304] mmcblk0boot0: mmc0:0001 8GTF4R 4.00 MiB
[ 2.700823] mmcblk0boot1: mmc0:0001 8GTF4R 4.00 MiB
[ 2.706088] mmcblk0rpmb: mmc0:0001 8GTF4R 512 KiB, chardev (246:0)
Mounting /dev/mmcblk0p2...
Mounted [ 7.631884] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
/media/m[ 7.639892] CPU: 2 PID: 1 Comm: init Not tainted 6.1.73-v8 #1
mcblk0p2[ 7.646412] Hardware name: Raspberry Pi Compute Module 4 Rev 1.1 (DT)
Switch[ 7.653641] Call trace:
ing root[ 7.656816] dump_backtrace.part.0+0xdc/0xf0
:)
/in[ 7.661841] show_stack+0x18/0x30
it: exec[ 7.665896] dump_stack_lvl+0x64/0x80
: line 3[ 7.670304] dump_stack+0x18/0x34
6: switc[ 7.674360] panic+0x188/0x344
h_root: [ 7.678150] do_exit+0x904/0x910
not foun[ 7.682118] do_group_exit+0x34/0x90
d
[ 7.686438] __arm64_sys_exit_group+0x18/0x20
[ 7.691112] invoke_syscall.constprop.0+0x50/0xf0
[ 7.695883] do_el0_svc+0x58/0x180
[ 7.699328] el0_svc+0x34/0xf0
[ 7.702421] el0t_64_sync_handler+0x114/0x120
[ 7.706836] el0t_64_sync+0x18c/0x190
[ 7.710547] SMP: stopping secondary CPUs
[ 7.714521] Kernel Offset: disabled
[ 7.718051] CPU features: 0x80000,00034080,0000420b
[ 7.722993] Memory Limit: none
[ 7.728321] Rebooting in 10 seconds..
@lawik
Copy link
Author

lawik commented Jul 7, 2024

My init was wrong, rebuilding now to see if it helps:

#!/bin/sh
echo "======================= Running init from rootfs_overlay"

mount -t devtmpfs none /dev
mount -t proc proc /proc
mount -t sysfs sysfs /sys

echo "Waiting for /dev/mmcblk0p2..."
until  [ -b "/dev/mmcblk0p2" ]; do
  sleep 5
done

#rpi-otp-private-key -b > key.bin
KEY_PATH="test-key.bin"
#if cryptsetup open --type=luks2 --key-file "$KEY_PATH" /dev/mmcblk0p2 appfs; then
mkdir /media/mmcblk0p2
echo "Mounting /dev/mmcblk0p2..."
mount /dev/mmcblk0p2 /media/mmcblk0p2
echo "Mounted /media/mmcblk0p2"

#mount /dev/mapper/appfs /media/mmcblk0p2
# else
#     mkdir /media/mmcblk0p2
#     mount /dev/mmcblk0p2 /media/mmcblk0p2
#     mkdir /root/mmcblk0p2
#     cp -r /media/mmcblk0p2/* /root/mmcblk0p2/
#     umount /media/mmcblk0p2
#     cryptsetup -q luksFormat --type=luks2 --key-file="$KEY_PATH" --pbkdf argon2id /dev/mmcblk0p2
#     cryptsetup open --type=luks2 --key-file "$KEY_PATH" /dev/mmcblk0p2 appfs
#     /usr/sbin/mke2fs -t ext4 /dev/mapper/appfs
#     mount /dev/mapper/appfs /media/mmcblk0p2
#     cp -r /root/mmcblk0p2/* /media/mmcblk0p2/
# fi

echo "Switching root :)"
exec switch_root /media/mmcblk0p2/ /init

I needed /sbin/init at the end there as I'm trying to switch into erlinit from Nerves. Which uses /sbin/init. Another build cycle and we'll see...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment