eclipse-leda / leda-distro

Eclipse Leda provides a Yocto-based build setup for SDV.EDGE components
https://eclipse-leda.github.io/leda/
Apache License 2.0
14 stars 8 forks source link

Raspi4 doesn't boot with release 0.0.3 #24

Closed OlavHerbst closed 1 year ago

OlavHerbst commented 1 year ago

Raspberry doesn't boot. With leda-distro 0.0.3 the "Raspberry Pi 4 Model B 8GB" doesn't boot due to "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)"

To Reproduce

  1. download eclipse-leda-raspberrypi.tar.xz from https://github.com/eclipse-leda/leda-distro/releases/tag/0.0.3
  2. extract contained image file sdv-image-all-raspberrypi4-64.wic
  3. flash it on a 32GB-microSD card using Win32DiskImager 6 partitions exist: boot.fat, grubenv.fat, rescue.img, root_a.img, root_b.img, data.img (The first two appear as new drives in Win10.)
  4. Insert card into Raspi (connected are a USB keyboard and a wireless USB mouse, no Ethernet cable) and switch it on. U-Boot starts and boots the kernel HDMI-Monitor shows 4 Raspi logos. The kernel logs via serial connection: ...
    [    3.273058] No filesystem could mount root, tried: 
    [    3.273067]  ext4
    [    3.278038] 
    [    3.281509] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
    [    3.290071] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.15.34-v8 #1
    [    3.296434] Hardware name: Raspberry Pi 4 Model B Rev 1.5 (DT)
    [    3.302349] Call trace:
    [    3.304825]  dump_backtrace+0x0/0x1b0
    [    3.308556]  show_stack+0x24/0x30
    [    3.309068] usb 1-1.3: new full-speed USB device number 4 using xhci_hcd
    [    3.311925]  dump_stack_lvl+0x8c/0xb8
    [    3.322427]  dump_stack+0x18/0x34
    [    3.325791]  panic+0x178/0x370
    [    3.328889]  mount_block_root+0x224/0x240
    [    3.332962]  mount_root+0x210/0x24c
    [    3.336503]  prepare_namespace+0x13c/0x17c
    [    3.340661]  kernel_init_freeable+0x290/0x2d4
    [    3.345084]  kernel_init+0x30/0x140
    [    3.348626]  ret_from_fork+0x10/0x20
    [    3.352256] SMP: stopping secondary CPUs
    [    3.356240] Kernel Offset: 0x2909000000 from 0xffffffc008000000
    [    3.362243] PHYS_OFFSET: 0x0
    [    3.365161] CPU features: 0x200004f1,00000846
    [    3.369579] Memory Limit: none
    [    3.372680] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2) ]---

Expected behaviour The Raspi boots whole Linux system, running Leda.

Screenshots / Logfiles The log file can be requested.

Leda Version (please complete the following information):

Additional context

mikehaller commented 1 year ago

Had a quick look on what's going wrong and I have a first theory.

I think we forgot to add the meta-rauc-community/meta-rauc-raspberrypi4 layer in our new kas configuration files, which leads to the wrong boot.scr for u-boot being deployed on the WIC disk image. The source of this file is boot.cmd.in and meta-leda is supposed to override this u-boot script.

As a workaround, until we fix this in the main repository, you may want to try out to add the layer in your kas configuration manually. It may be a good idea to separate the kas configuration per machine and replace the existing "meta-rauc-qemux86-64" with the one for "meta-rauc-raspberrypi" like this:

  meta-rauc-community:
    url: "https://github.com/rauc/meta-rauc-community.git"
    refspec: kirkstone
    layers:
      meta-rauc-raspberrypi: