Skip to content

Update make-image-release to use mtools and add a Github unit test - #920

Merged
timg236 merged 2 commits into
raspberrypi:masterfrom
timg236:make-imager-release-mtools
Nov 3, 2026
Merged

timg236 merged 2 commits into
raspberrypi:masterfrom
timg236:make-imager-release-mtools

Conversation

@timg236

@timg236 timg236 commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Convert make-recovery-images to build the Raspberry Pi Imager disk
images entirely in user space, following the approach already used by
make-pi4-rpiboot-gpio-sd. The FAT32 partition is created with mkfs.fat
on a partition image, populated with mcopy and spliced into the
sfdisk-partitioned disk image with dd. This removes the dependency on
kpartx, loopback devices, mount and the sleep workarounds for orphaned
loop devices, and the root / SUDO_UID checks and chown calls.

The partition layout, disk identifier and FAT32 parameters are unchanged.

make-imager-release no longer invokes make-recovery-images via sudo.
Add test/test-make-recovery-images which builds the 2711 and 2712
rpi-boot-eeprom-recovery release zips with imager/make-release, converts
them with imager/make-recovery-images and verifies the output:

* Image size, MBR disk identifier and the single FAT32 LBA partition
  (start 2048, 524288 sectors, type 0xc).
* FAT32 BPB: 512 byte sectors, 1 sector per cluster, FAT32 type string
  and boot signature, cross-checked against minfo.
* Loopback comparison: every file in the FAT filesystem is byte-identical
  to the source zip and the file set matches exactly.
* recovery.bin and vl805.bin are identical to the firmware in the
  repository, pieeprom.bin and vl805.bin match their .sig digests and the
  EEPROM image is readable with rpi-eeprom-config with the boot.conf for
  the sd / usb / network variant.

Run the test as a separate job in the GitHub Actions workflow and
document it in test/README.md.
@timg236
timg236 merged commit 236b440 into raspberrypi:master Nov 3, 2026
2 checks passed
@timg236
timg236 deleted the make-imager-release-mtools branch November 3, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant