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

RAUC can not install in stream-mode on Raspberry Pi #64

Closed OlavHerbst closed 1 year ago

OlavHerbst commented 1 year ago

Describe the bug RAUC fails if a local bundle or a bundle from a file server in verity format shall be installed. The kernel config to enable this is missing even the config file is contained.

To Reproduce Preparation: Flash wic file on a Raspi4 from eclipse-leda-raspberrypi.tar.xz.zip and boot the device

Local bundle:

  1. Copy a Rauc bundle in verity-format directly on Raspi. This can be directly one of the bundles in eclipse-leda-raspberrypi.tar.xz.zip, eg. sdv-rauc-bundle-rescue-raspberrypi4-64.raucb
  2. Getting info out of bundle succeeds when you call rauc info sdv-rauc-bundle-rescue-raspberrypi4-64.raucb
  3. Installation of local bundle fails: rauc install sdv-rauc-bundle-rescue-raspberrypi4-64.raucb

Bundle from file server:

  1. Connect Raspi to Internet
  2. Copy a Rauc bundle in verity-format on a file server. This can be directly one of the bundles in eclipse-leda-raspberrypi.tar.xz.zip, or an already existing one, e.g.: https://olavherbst.de/bin/sdv-sua/sdv-rauc-bundle-rescue-raspberrypi4-64-20230131180730.raucb
  3. Getting info out of bundle succeeds when you call rauc info https://olavherbst.de/bin/sdv-sua/sdv-rauc-bundle-rescue-raspberrypi4-64-20230131180730.raucb
  4. Installing the streamed bundle fails: rauc install https://olavherbst.de/bin/sdv-sua/sdv-rauc-bundle-rescue-raspberrypi4-64-20230131180730.raucb

Expected behaviour Installation of bundles in verity format locally or streamed from file server should succeed like in qemuarm64. The kernel should be built with the files, which are already prepared for this stream-feature, in meta-leda/meta-leda-bsp/dynamic-layers/raspberry-pi/: linux-raspberrypi_%.bbappend files/leda-bsp-rauc.cfg The file must be appended to recipe linux-raspberrypi*.bb or be moved to be found and included according to meta-leda/meta-leda-bsp/conf/layer.conf (For qemux86_64 this file is included into kernel config: meta-rauc/recipes-kernel/linux/linux-yocto/rauc.cfg)

Screenshots / Logfiles Installation of local bundle: # rauc install sdv-rauc-bundle-rescue-raspberrypi4-64.raucb ... 100% Installing failed. LastError: Failed mounting bundle: Failed to load dm table: Invalid argument Installing '/media/sdv-sua/sdv-rauc-bundle-rescue-raspberrypi4-64.raucb' failed Stream-installation from file server: # rauc install https://olavherbst.de/bin/sdv-sua/sdv-rauc-bundle-rescue-raspberrypi4-64-20230131180730.raucb ... 100% Installing failed. LastError: Failed mounting bundle: failed to resolve 'nbd' netlink family - BLK_DEV_NBD not enabled in kernel? Installing 'https://olavherbst.de/bin/sdv-sua/sdv-rauc-bundle-rescue-raspberrypi4-64-20230131180730.raucb' failed

Leda Version: Version: Commit 62e53c5 Machine: raspberrypi4-64 Connectivity: -

mikehaller commented 1 year ago

CONFIG_BLK_DEV_NBD is already set to y for Raspi, see meta-leda/meta-leda-bsp/dynamic-layers/raspberrypi/files/leda-bsp-raspberrypi-rauc.cfg

Is this issue resolved?

OlavHerbst commented 1 year ago

Yes, this is issue is resolved in this file. Additionally the verity format was set to be able to install bundle files in this format: CONFIG_DM_VERITY=y