Creating an Installer that Leverages bmaptool
2022-11-30 , Langdale

The existing installer method copies files from a loopdev mounted rootfs to the target. This is limiting for multi-partition images (such as wic or meta-mender). Instead, we will describe how to create an installer image which uses output (image and .bmap files) from another image and writes all the partitions at once to the target using bmaptool.


The initramfs-module-install-efi's initramfs-module-install-efi script creates a rootfs partition on the target, mounts it, and then copies rootfs files from the installation media. But what if you want to install multiple partitions on the target? What if one of the partitions (such as /data) is empty? We already have wic images to create multiple partitions, but not an easy way to install them on the target. We will take a quick look at creating an initramfs-module-install-bmap script and corresponding initramfs (with bmaptool and other tools installed). This installer image adds the output of another image recipe to IMAGE_BOOT_FILES and then installs to the target in one shot using bmaptool. In addition, we benefit from checksum verification built into bmaptool for confidence in what was written.

See also: Creating an Installer that Leverages bmaptool.pdf (461.0 KB)

Tim Orling is a Principal Software Engineer at Konsulko Group. Tim joined Konsulko Group at the end of 2021. Tim was elected to the OpenEmbedded Board in 2022. He has spent many years as a volunteer developer for OpenEmbedded and the Yocto Project. He has been an open source software and embedded hardware enthusiast for many years. He taught in a university setting for more than 5 years and has given many well-received training sessions and technical talks at conferences. Tim is currently working in areas of over the air updates, secure boot and disk encryption. Tim has driven updates in the Yocto Project Python recipe infrastructure to keep up with upstream packaging changes and the introduction of Rust extensions. Tim has been tinkering at home with microcontrollers via Zephyr Project, MicroPython and CircuitPython.

This speaker also appears in: