Boot Assets Spec
SysOTA uses requires both immutable system images and a separate boot partition. This naturally raises the question on how are boot assets that live outside of the rootfs updated. This specification defines just that.
Boot assets
Boot assets include all the files that participate in the boot process with the exception of the platform firmware. This may include the following:
- Kernel image copied to the boot partition
- Device tree files present in the boot partition
- EFI programs or other files loaded by the platform firmware
- Configuration files present in the boot partition read either by the platform firmware or by files loaded by the platform firmware
Bundling
Booting
In order for the system to boot, whenever possible, the rootfs image must contain the kernel image as /vmlinuz
. That is, as a single file in the root directory of the squashfs.
TODO: clarify if the file may be a symbolic link or not.
Updates
In order to allow SysOTA to update boot assets they must be available in the rootfs image. During the existing update process the rootfs image is replaced with a new image.
Using platform-specific logic, SysOTA will selectively copy and modify boot assets from the rootfs and put them in the boot partition.
SysOTA expects boot assets to be deposited into the /usr/lib/sysota/boot-assets
directory.
To make integration easier, the boot assets placed here are expected to match what is copied to the boot partition by the image compositor.
Any adaptations required are performed by SysOTA
Raspberry Pi
For the Raspberry Pi, the boot assets contain the usual set of files:
-
bootcode.bin
file loaded on some platforms -
start.elf
and related files (fix-ups, debug, etc) loaded on all platforms -
config.txt
file describing boot configuration -
overlays/
directory -
kernel.img
(as named byconfig.txt
)
EFI+GRUB
This part is currently a draft.
EFI/GRUB systems boot assets are EFI GRUB application binary. Ideally the configuration file is hard-coded into the binary and no configuration file is loaded from the ESP partition.
This may change with secure boot enabled, as there may be additional required binaries.