Skip to content

Add support for Raspberry Pi 3

Zygmunt Krynicki requested to merge zyga/oniro:feature/pi3 into kirkstone

While Raspberry Pi 3 is not officially supported by Oniro it is useful to showcase the changes necessary to add support for a new MACHINE type to the OTA stack.

Let's break it down:

First classes/oniro-image.bbclass is modified to use x-raspberrypi.wks.in as WKS_FILE. This is specific to the Raspberry Pi, as it is not yet using the unified disk image. We also set IMAGE_FSTYPES to produce a wic.gz and wic.bmap files.

Next conf/distro/oniro-linux.conf gains an optional GPU_MEM setting that matches what is already set for Raspberry Pi 4.

The file recipes-core/bundles/oniro-bundle-base.bb gains a machine-specific value for RAUC_BUNDLE_COMPATIBLE. The value we pick is in line with other compatible strings in the same file. This modification is relevant, so that the update system will be able to reject incompatible devices if a mistake is made elsewhere in the stack.

The file recipes-core/rauc/rauc_%.bbappend gains three machine specific variables that pick-point RAUC_COMPAT, RAUC_SLOT_A and RAUC_SLOT_B. The value for RAUC_COMPAT must match what was set in RAUC_BUNDLE_COMPATIBLE in the previous file. The two slot variables describe the location of the A and B slots in the system and must be in sync with what is described by x-raspberrypi.wks.in file.

Finally the file recipes-core/sysota/sysota_git.bb gains two machine-specific variables. The first one is similar to the compatible string from RAUC and we set it to the same value. The next variable is very important as it selects the boot loader. The value for all the Raspberry Pi boards is pi-boot. For devices which are not based on the Raspberry Pi platform you should use the value matching the platform boot-loader. All EFI compatible systems are recommended to boot with GRUB, as it is already supported by Oniro. Platforms that require u-boot will be supported in the early summer of 2022.

With those modifications in place, we can boot and upgrade any board based on the Raspberry Pi platform.

Signed-off-by: Zygmunt Krynicki zygmunt.krynicki@huawei.com

Merge request reports