From 2291b2fdbc0be5a299821e8b636d4fb255024b75 Mon Sep 17 00:00:00 2001 From: desertwitch <24509509+desertwitch@users.noreply.github.com> Date: Fri, 21 Nov 2025 07:05:51 +0100 Subject: [PATCH] chore(configs): clean up configurations Signed-off-by: desertwitch <24509509+desertwitch@users.noreply.github.com> --- README.md | 18 ++++++++---------- .../usr/bin/find_shredos_boot_disc.sh | 6 +++--- board/shredos/populate_efi_partition.sh | 12 ++++++------ build_all_shredos.sh | 4 ++-- configs/shredos_iso_defconfig | 2 ++ configs/shredos_iso_i586_defconfig | 2 ++ ..._defconfig => shredos_iso_legacy_defconfig} | 3 --- ...onfig => shredos_iso_legacy_i586_defconfig} | 3 --- fs/iso9660/iso9660.mk | 4 ++-- 9 files changed, 25 insertions(+), 29 deletions(-) rename configs/{shredos_iso_aio_defconfig => shredos_iso_legacy_defconfig} (97%) rename configs/{shredos_iso_aio_i586_defconfig => shredos_iso_legacy_i586_defconfig} (97%) diff --git a/README.md b/README.md index 141b412e18..69e154fe50 100644 --- a/README.md +++ b/README.md @@ -820,27 +820,25 @@ $ dd if=shredos-20200412.img of=/dev/sdx (20200412 will be the day you compiled, #### The following configurations are available to build different targets: -- `make shredos_defconfig` - build USB image and AIO hybrid ISO (64-bit) -- `make shredos_i586_defconfig` - build USB image and AIO hybrid ISO (32-bit) +- `make shredos_defconfig` - build USB image and hybrid ISO (64-bit) +- `make shredos_i586_defconfig` - build USB image and hybrid ISO (32-bit) - `make shredos_img_defconfig` - build USB image only (64-bit) - `make shredos_img_i586_defconfig` - build USB image only (32-bit) -- `make shredos_iso_defconfig` - build legacy hybrid ISO only (64-bit) -- `make shredos_iso_i586_defconfig` - build legacy hybrid ISO only (32-bit) -- `make shredos_iso_aio_defconfig` - build AIO hybrid ISO only (64-bit) -- `make shredos_iso_aio_i586_defconfig` - build AIO hybrid ISO only (32-bit) +- `make shredos_iso_defconfig` - build hybrid ISO only (64-bit) +- `make shredos_iso_i586_defconfig` - build hybrid ISO only (32-bit) +- `make shredos_iso_legacy_defconfig` - build legacy ISO only (64-bit) +- `make shredos_iso_legacy_i586_defconfig` - build legacy ISO only (32-bit) Do note that loading a configuration should typically be the last step before `make`. -> **The all-in-one hybrid ISOs unite most functionality of all other formats:** +> **The hybrid ISOs unite most functionality of all other formats:** > >- are BIOS and UEFI bootable >- can both be written to CD/DVD-ROM and USB flash drives >- have a writeable partition (when written to a USB flash drive) >- **but** do not allow customization of GRUB (for `autonuke`, ...) > ->The **legacy** hybrid ISOs do not have that writeable partition (but are ->slightly smaller in size), which means that you cannot add any files or have ->any PDFs written to them (even when using them burned to an USB flash drive). +>The **legacy** ISOs work in BIOS and UEFI, but only burned to CD/DVD-ROM. #### Building multiple configurations: diff --git a/board/shredos/fsoverlay/usr/bin/find_shredos_boot_disc.sh b/board/shredos/fsoverlay/usr/bin/find_shredos_boot_disc.sh index 1c0740ca35..bd219beb08 100755 --- a/board/shredos/fsoverlay/usr/bin/find_shredos_boot_disc.sh +++ b/board/shredos/fsoverlay/usr/bin/find_shredos_boot_disc.sh @@ -49,9 +49,9 @@ do isEFI=$(fdisk -l | grep -i "$drive" | grep -i "EFI") # EFI partitions should not quality for "first drive" to avoid false - # positives; we only use it if confirmed as ours. The hybrid all-in-one ISO - # image's EFI partition can be written to, and we need to ensure that other - # EFI partitions remain untouched, so we don't take EFIs as "first drive". + # positives; we only use it if confirmed as ours. The hybrid ISO image has + # an EFI partition that can be written to, and we need to ensure that other + # devices' EFI partitions remain untouched, disallowing EFI "first drive"s. # # Note that our USB image's FAT partition is not marked specifically as EFI # (0xEF) but regular FAT (0xC/0x0C), so it still qualifies as "first drive". diff --git a/board/shredos/populate_efi_partition.sh b/board/shredos/populate_efi_partition.sh index 1694f658de..4163ba5043 100755 --- a/board/shredos/populate_efi_partition.sh +++ b/board/shredos/populate_efi_partition.sh @@ -1,12 +1,12 @@ #!/bin/bash -e # -# BR2_ROOTFS_POST_BUILD_SCRIPT for shredos_iso_aio configurations +# BR2_ROOTFS_POST_BUILD_SCRIPT for hybrid ISO configurations # -# Our hybrid all-in-one ISO has an accessible EFI partition, which we -# can (ab)use to store our information also, so we move the usual data -# onto it before creating the images. This should not cause any issues -# for CD/DVD-ROM burned ISO images, as the EFI partition will be in RAM, -# but allow any USB burned ISO images to have that writeable data location. +# Our hybrid ISO has an accessible EFI partition, which we can (ab)use to store +# our information also, so we move the usual data onto it before creating the +# images. This should not cause any issues for CD/DVD-ROM burned ISO images, as +# the EFI partition will be in RAM, but allow any USB burned ISO images to have +# that writeable data location to put configuration files, logs and PDFs onto. # # Keep in mind that the EFI partition size (in configuration) must be below # the maximum of 65535 blocks of 512 bytes (= ~32 MB) or the ISO may not diff --git a/build_all_shredos.sh b/build_all_shredos.sh index f939bf7a1f..41f40a6d44 100755 --- a/build_all_shredos.sh +++ b/build_all_shredos.sh @@ -31,7 +31,7 @@ X64_CONFIGS=( "shredos_defconfig" "shredos_img_defconfig" "shredos_iso_defconfig" - "shredos_iso_aio_defconfig" + "shredos_iso_legacy_defconfig" ) # 32-bit configurations to build: @@ -39,7 +39,7 @@ X32_CONFIGS=( "shredos_i586_defconfig" "shredos_img_i586_defconfig" "shredos_iso_i586_defconfig" - "shredos_iso_aio_i586_defconfig" + "shredos_iso_legacy_i586_defconfig" ) # Packages always needing rebuild between runs, even for the same architecture. diff --git a/configs/shredos_iso_defconfig b/configs/shredos_iso_defconfig index a7869850c1..413374b354 100644 --- a/configs/shredos_iso_defconfig +++ b/configs/shredos_iso_defconfig @@ -15,6 +15,7 @@ BR2_GENERATE_LOCALE="en_US.UTF-8" BR2_SYSTEM_ENABLE_NLS=y BR2_TARGET_TZ_INFO=y BR2_ROOTFS_OVERLAY="board/shredos/fsoverlay" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/shredos/populate_efi_partition.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/shredos/make_iso_file.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y @@ -171,6 +172,7 @@ BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_BOOT_MENU="board/shredos/iso/isolinux.cfg" BR2_TARGET_ROOTFS_ISO9660_GRUB2_BOOT_MENU="board/shredos/iso/grub.cfg" BR2_TARGET_ROOTFS_ISO9660_GRUB2_EFI_BOOT_MENU="board/shredos/iso/efigrub.cfg" BR2_TARGET_ROOTFS_ISO9660_GRUB2_EFI_IDENT_FILE="/boot/shredos.id" +BR2_TARGET_ROOTFS_ISO9660_GRUB2_EFI_PARTITION_SIZE="28M" BR2_TARGET_ROOTFS_ISO9660_HYBRID=y # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_GRUB2=y diff --git a/configs/shredos_iso_i586_defconfig b/configs/shredos_iso_i586_defconfig index 39793bcc14..aceb560f25 100644 --- a/configs/shredos_iso_i586_defconfig +++ b/configs/shredos_iso_i586_defconfig @@ -13,6 +13,7 @@ BR2_GENERATE_LOCALE="en_US.UTF-8" BR2_SYSTEM_ENABLE_NLS=y BR2_TARGET_TZ_INFO=y BR2_ROOTFS_OVERLAY="board/shredos/fsoverlay" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/shredos/populate_efi_partition.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/shredos/make_iso_file.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y @@ -168,6 +169,7 @@ BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_BOOT_MENU="board/shredos/iso/isolinux.cfg" BR2_TARGET_ROOTFS_ISO9660_GRUB2_BOOT_MENU="board/shredos/iso/grub.cfg" BR2_TARGET_ROOTFS_ISO9660_GRUB2_EFI_BOOT_MENU="board/shredos/iso/efigrub.cfg" BR2_TARGET_ROOTFS_ISO9660_GRUB2_EFI_IDENT_FILE="/boot/shredos.id" +BR2_TARGET_ROOTFS_ISO9660_GRUB2_EFI_PARTITION_SIZE="28M" BR2_TARGET_ROOTFS_ISO9660_HYBRID=y # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_GRUB2=y diff --git a/configs/shredos_iso_aio_defconfig b/configs/shredos_iso_legacy_defconfig similarity index 97% rename from configs/shredos_iso_aio_defconfig rename to configs/shredos_iso_legacy_defconfig index 413374b354..78935de472 100644 --- a/configs/shredos_iso_aio_defconfig +++ b/configs/shredos_iso_legacy_defconfig @@ -15,7 +15,6 @@ BR2_GENERATE_LOCALE="en_US.UTF-8" BR2_SYSTEM_ENABLE_NLS=y BR2_TARGET_TZ_INFO=y BR2_ROOTFS_OVERLAY="board/shredos/fsoverlay" -BR2_ROOTFS_POST_BUILD_SCRIPT="board/shredos/populate_efi_partition.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/shredos/make_iso_file.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y @@ -172,8 +171,6 @@ BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_BOOT_MENU="board/shredos/iso/isolinux.cfg" BR2_TARGET_ROOTFS_ISO9660_GRUB2_BOOT_MENU="board/shredos/iso/grub.cfg" BR2_TARGET_ROOTFS_ISO9660_GRUB2_EFI_BOOT_MENU="board/shredos/iso/efigrub.cfg" BR2_TARGET_ROOTFS_ISO9660_GRUB2_EFI_IDENT_FILE="/boot/shredos.id" -BR2_TARGET_ROOTFS_ISO9660_GRUB2_EFI_PARTITION_SIZE="28M" -BR2_TARGET_ROOTFS_ISO9660_HYBRID=y # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_GRUB2=y BR2_TARGET_GRUB2_X86_64_EFI=y diff --git a/configs/shredos_iso_aio_i586_defconfig b/configs/shredos_iso_legacy_i586_defconfig similarity index 97% rename from configs/shredos_iso_aio_i586_defconfig rename to configs/shredos_iso_legacy_i586_defconfig index aceb560f25..addfb68bda 100644 --- a/configs/shredos_iso_aio_i586_defconfig +++ b/configs/shredos_iso_legacy_i586_defconfig @@ -13,7 +13,6 @@ BR2_GENERATE_LOCALE="en_US.UTF-8" BR2_SYSTEM_ENABLE_NLS=y BR2_TARGET_TZ_INFO=y BR2_ROOTFS_OVERLAY="board/shredos/fsoverlay" -BR2_ROOTFS_POST_BUILD_SCRIPT="board/shredos/populate_efi_partition.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/shredos/make_iso_file.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y @@ -169,8 +168,6 @@ BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_BOOT_MENU="board/shredos/iso/isolinux.cfg" BR2_TARGET_ROOTFS_ISO9660_GRUB2_BOOT_MENU="board/shredos/iso/grub.cfg" BR2_TARGET_ROOTFS_ISO9660_GRUB2_EFI_BOOT_MENU="board/shredos/iso/efigrub.cfg" BR2_TARGET_ROOTFS_ISO9660_GRUB2_EFI_IDENT_FILE="/boot/shredos.id" -BR2_TARGET_ROOTFS_ISO9660_GRUB2_EFI_PARTITION_SIZE="28M" -BR2_TARGET_ROOTFS_ISO9660_HYBRID=y # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_GRUB2=y BR2_TARGET_GRUB2_I386_EFI=y diff --git a/fs/iso9660/iso9660.mk b/fs/iso9660/iso9660.mk index 337c36fdb7..14f13af88c 100644 --- a/fs/iso9660/iso9660.mk +++ b/fs/iso9660/iso9660.mk @@ -407,7 +407,7 @@ ROOTFS_ISO9660_OPTS_BIOS = \ endif ifeq ($(BR2_TARGET_ROOTFS_ISO9660_BOTH)$(BR2_TARGET_ROOTFS_ISO9660_HYBRID),yy) -# BOTH (uses GRUB2 in EFI) +# BOTH + HYBRID (uses GRUB2 in EFI) # Hybrid Image Support (Modern Variant, Debian-style) ROOTFS_ISO9660_OPTS_EFI = \ -e $(ROOTFS_ISO9660_EFI_PARTITION) \ @@ -415,7 +415,7 @@ ROOTFS_ISO9660_OPTS_EFI = \ -isohybrid-gpt-basdat \ -isohybrid-apm-hfsplus else -# BOTH/GRUB2 (use GRUB2 in EFI) +# BOTH or GRUB2 (use GRUB2 in EFI) ROOTFS_ISO9660_OPTS_EFI = \ -e $(ROOTFS_ISO9660_EFI_PARTITION) \ -no-emul-boot