Genimage May 2026

Let’s create a simple ext4 image from a directory called rootfs/.

For modern UEFI systems, you can set precise partition attributes: genimage

partition boot 
    partition-type-uuid = "c12a7328-f81f-11d2-ba4b-00a0c93ec93b"  # ESP
    attributes = 0x8000000000000000  # GPT attribute: Required partition
genimage myimage.conf

That’s it. The tool will:

Genimage supports multiple output "image" definitions: Let’s create a simple ext4 image from a

Buildroot includes Genimage as a post-image script. In your configs/raspberrypi3_defconfig, you might see: genimage myimage

BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3/genimage.sh"
BR2_PACKAGE_HOST_GENIMAGE=y

The genimage.sh script calls genimage with a board-specific configuration file. This guarantees that every make produces a bit-for-bit identical sdcard.img (assuming all inputs are identical).