Separate A/B kernel partitions for meta-mender.
Probably not very useful by itself, but is a prerequisite for things like encrypting the rootfs.
- Two additional A/B kernel partitions are created after the
/datapartition via themender-corevariableMENDER_EXTRA_PARTS. - On boot, GRUB selects the corresponding kernel partition based on
mender_boot_part. The kernel and/or initramfs are loaded from this partition. - An
ArtifactInstallstate-script updates the kernel partition. - Optional UEFI Secure Boot.
Requires meta-secure-core. See this kas file for more setup details.
There were a few gotchas integrating secure boot
SELoader is not setup to verify anything outside the /efi partition. To workaround this:
- use
SELoaderto verify everything on/efi(config, env, EFI binaries, etc). This is noop and standardmeta-efi-secure-bootoperation. - use
shimto verify theINITRAMFS_IMAGE_BUNDLE- enforce
INITRAMFS_IMAGE_BUNDLE - sign
INITRAMFS_IMAGE_BUNDLEwithsb_signto useMOKkey(s) - use
chainloaderinstead oflinuxgrub command to launchINITRAMFS_IMAGE_BUNDLE
- enforce
- Add this layer to
bblayers.conf local.confshould include:require conf/include/mender-kernel.incand any configuration variables- Image recipe should include:
require conf/include/mender-kernel-image.inc
| Variable | Default | Description |
|---|---|---|
MENDER/KERNEL_PART_SIZE_MB |
256 |
size (MB) of each kernel partition |
This layer will remain compatible with the latest YOCTO LTS. This mirrors what meta-mender does.