How it works...
In order for the Yocto build system to build a cpio image file suitable to be used as initramfs, the IMAGE_FSTYPES variable needs to be configured to one of the following: cpio.gz, cpio.tar, cpio.lz4, cpio.lzma, or cpio.xz.
On the previous image, IMAGE_FSTYPES is set to cpio.gz.uboot so that the build system generates a compressed cpio image file with the u-boot header, suitable to be loaded through the bootz u-boot command.
INITRAMFS_FSTYPES defaults to cpio.gz, and needs to be appended to support any other format.
In this recipe, we are overriding the PACKAGE_INSTALL variable with the list of packages we want to install. We also add ROOTFS_BOOTSTRAP_INSTALL, which adds the run-postinstall package so that post installation ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access