feat(iso9660): appendable partition image for hybrid modes

Allow to append a FAT16 partition image when building an ISO in hybrid mode.

This allows to add an extra writeable partition for when the ISO is burned to USB.

This feature is experimental and disabled by default.

Signed-off-by: desertwitch <24509509+desertwitch@users.noreply.github.com>
This commit is contained in:
desertwitch
2025-11-21 16:24:14 +01:00
parent 1635894f8e
commit 4fd5642d16
7 changed files with 420 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
#!/bin/bash -e
# This file produces the extra FAT16 partition for the shredos_iso_extra_*_defconfig configurations.
# The partition is appended to the ISO, so that when written to USB a writeable partition is available.
rm "${BINARIES_DIR}"/extra.vfat || true
dd if=/dev/zero of="${BINARIES_DIR}/extra.vfat" bs=50M count=1 || exit 1
"$HOST_DIR"/sbin/mkfs.vfat -F16 "${BINARIES_DIR}/extra.vfat" || exit 1
"$HOST_DIR"/bin/mmd -i "${BINARIES_DIR}/extra.vfat" ::/boot || exit 1
"$HOST_DIR"/bin/mcopy -p -m -i "${BINARIES_DIR}/extra.vfat" board/shredos/fsoverlay/etc/shredos/version.txt ::/boot/version.txt || exit 1
"$HOST_DIR"/bin/mcopy -p -m -i "${BINARIES_DIR}/extra.vfat" board/shredos/README.txt ::/README.txt || exit 1
"$HOST_DIR"/bin/mcopy -p -m -i "${BINARIES_DIR}/extra.vfat" board/shredos/autorun.inf ::/autorun.inf || exit 1
"$HOST_DIR"/bin/mcopy -p -m -i "${BINARIES_DIR}/extra.vfat" board/shredos/shredos.ico ::/shredos.ico || exit 1
exit 0