From d417261a766f64d826624cbce906b7841dca49b1 Mon Sep 17 00:00:00 2001 From: desertwitch <24509509+desertwitch@users.noreply.github.com> Date: Thu, 20 Nov 2025 14:15:43 +0100 Subject: [PATCH] chore: reorganize all files into board/shredos It is more convenient to not have to search for configuration files in different directories, and also helpful to see the standard configuration files, so move all ShredOS configurations into board/shredos. Signed-off-by: desertwitch <24509509+desertwitch@users.noreply.github.com> --- README.md | 6 +++--- board/shredos/embed/grub.cfg | 2 +- board/shredos/genimage.cfg | 2 +- board/shredos/genimage_i586.cfg | 2 +- board/shredos/iso/README | 8 ++++++++ board/shredos/iso/efigrub.cfg | 3 +++ board/shredos/iso/grub.cfg | 12 ++++++++++++ board/shredos/iso/isolinux.cfg | 15 +++++++++++++++ build_all_shredos.sh | 2 +- configs/shredos_defconfig | 4 ++++ configs/shredos_i586_defconfig | 4 ++++ configs/shredos_iso_aio_defconfig | 4 ++++ configs/shredos_iso_aio_i586_defconfig | 4 ++++ configs/shredos_iso_defconfig | 4 ++++ configs/shredos_iso_i586_defconfig | 4 ++++ fs/iso9660/README | 8 ++++++++ fs/iso9660/grub.cfg | 13 ++++--------- fs/iso9660/isolinux.cfg | 17 +++-------------- 18 files changed, 84 insertions(+), 30 deletions(-) create mode 100644 board/shredos/iso/README create mode 100644 board/shredos/iso/efigrub.cfg create mode 100644 board/shredos/iso/grub.cfg create mode 100644 board/shredos/iso/isolinux.cfg create mode 100644 fs/iso9660/README diff --git a/README.md b/README.md index 8b39eeb9aa..141b412e18 100644 --- a/README.md +++ b/README.md @@ -911,15 +911,15 @@ The GRUB configuration that is embedded into the GRUB images at build-time. It contains directions for GRUB to find the right volume and GRUB configuration. This applies for both the USB images and ISO images, and both for BIOS and UEFI. -#### ../fs/iso9660/isolinux.cfg +#### ../board/shredos/iso/isolinux.cfg The ISO image's ISOLINUX configuration, which the BIOS bootloader will use. It contains the BIOS boot menu for the ISO image. -#### ../fs/iso9660/grub.cfg +#### ../board/shredos/iso/grub.cfg The ISO image's GRUB configuration, which the UEFI bootloader will use. It contains the UEFI boot menu for the ISO image. -#### ../fs/iso9660/efigrub.cfg +#### ../board/shredos/iso/efigrub.cfg The GRUB configuration that is embedded into the ISO's UEFI partition. It contains directions for GRUB to find the ISO9660 FS and GRUB configuration. diff --git a/board/shredos/embed/grub.cfg b/board/shredos/embed/grub.cfg index c036fc5671..e41461a533 100644 --- a/board/shredos/embed/grub.cfg +++ b/board/shredos/embed/grub.cfg @@ -1,3 +1,3 @@ -search --file --set=root /boot/buildroot +search --file --set=root /boot/shredos.id set prefix=($root)/boot/grub configfile $prefix/grub.cfg diff --git a/board/shredos/genimage.cfg b/board/shredos/genimage.cfg index 27e9a77ee2..ef3b90872d 100644 --- a/board/shredos/genimage.cfg +++ b/board/shredos/genimage.cfg @@ -4,7 +4,7 @@ image boot.vfat { file boot/bzImage { image = 'bzImage' } file boot/grub/grub.cfg { image = 'grub.cfg' } file boot/version.txt { image = 'version.txt' } - file boot/buildroot { image = '/dev/null' } + file boot/shredos.id { image = '/dev/null' } file EFI/BOOT/bootx64.efi { image = 'bootx64.efi' } file EFI/BOOT/grub.cfg { image = 'grub.cfg' } file shredos.ico { image = 'shredos.ico' } diff --git a/board/shredos/genimage_i586.cfg b/board/shredos/genimage_i586.cfg index 97182ed8e7..770d4fe68b 100644 --- a/board/shredos/genimage_i586.cfg +++ b/board/shredos/genimage_i586.cfg @@ -4,7 +4,7 @@ image boot.vfat { file boot/bzImage { image = 'bzImage' } file boot/grub/grub.cfg { image = 'grub.cfg' } file boot/version.txt { image = 'version.txt' } - file boot/buildroot { image = '/dev/null' } + file boot/shredos.id { image = '/dev/null' } file EFI/BOOT/bootia32.efi { image = 'bootia32.efi' } file EFI/BOOT/grub.cfg { image = 'grub.cfg' } file shredos.ico { image = 'shredos.ico' } diff --git a/board/shredos/iso/README b/board/shredos/iso/README new file mode 100644 index 0000000000..bc465b7fa7 --- /dev/null +++ b/board/shredos/iso/README @@ -0,0 +1,8 @@ +ISO9660 filesystem was updated to modern standards as of 20/11/2025. +The changes have - at the time of this writing - not been upstreamed. +Do compare (and port 'fs/iso9660' over) when updating the Buildroot release. + +The following variables are filled in at build-time: + - __EFI_ID_FILE__ + - __KERNEL_PATH__ + - __INITRD_PATH__ (automatically removed if not used) diff --git a/board/shredos/iso/efigrub.cfg b/board/shredos/iso/efigrub.cfg new file mode 100644 index 0000000000..a8f2c567eb --- /dev/null +++ b/board/shredos/iso/efigrub.cfg @@ -0,0 +1,3 @@ +search --file --set=root __EFI_ID_FILE__ +set prefix=($root)/boot/grub +source $prefix/grub.cfg diff --git a/board/shredos/iso/grub.cfg b/board/shredos/iso/grub.cfg new file mode 100644 index 0000000000..137e3a0b08 --- /dev/null +++ b/board/shredos/iso/grub.cfg @@ -0,0 +1,12 @@ +set default="0" +set timeout="5" + +menuentry "ShredOS" { + linux __KERNEL_PATH__ console=tty3 loglevel=3 + initrd __INITRD_PATH__ +} + +menuentry "ShredOS (nomodeset)" { + linux __KERNEL_PATH__ console=tty3 loglevel=3 nomodeset + initrd __INITRD_PATH__ +} diff --git a/board/shredos/iso/isolinux.cfg b/board/shredos/iso/isolinux.cfg new file mode 100644 index 0000000000..565647f0bf --- /dev/null +++ b/board/shredos/iso/isolinux.cfg @@ -0,0 +1,15 @@ +default menu.c32 +prompt 0 +timeout 50 + +menu title ShredOS + +label shredos + menu label ShredOS + kernel __KERNEL_PATH__ + append initrd=__INITRD_PATH__ console=tty3 loglevel=3 + +label shredos-nomodeset + menu label ShredOS (nomodeset) + kernel __KERNEL_PATH__ + append initrd=__INITRD_PATH__ console=tty3 loglevel=3 nomodeset diff --git a/build_all_shredos.sh b/build_all_shredos.sh index 5b65114589..f939bf7a1f 100755 --- a/build_all_shredos.sh +++ b/build_all_shredos.sh @@ -532,7 +532,7 @@ run_cmd rm -r dist || true run_cmd mkdir -p dist echo "Starting to build..." -trap 'print_summary_and_exit $?' EXIT +trap 'print_summary_and_exit $?' EXIT INT TERM if [ ${#X64_CONFIGS[@]} -gt 0 ]; then echo diff --git a/configs/shredos_defconfig b/configs/shredos_defconfig index 400e03cbfa..9151237bf4 100644 --- a/configs/shredos_defconfig +++ b/configs/shredos_defconfig @@ -168,6 +168,10 @@ BR2_TARGET_ROOTFS_CPIO_LZMA=y BR2_TARGET_ROOTFS_INITRAMFS=y BR2_TARGET_ROOTFS_ISO9660=y BR2_TARGET_ROOTFS_ISO9660_BOTH=y +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 diff --git a/configs/shredos_i586_defconfig b/configs/shredos_i586_defconfig index 5aff8e35c9..bc347cb06d 100644 --- a/configs/shredos_i586_defconfig +++ b/configs/shredos_i586_defconfig @@ -165,6 +165,10 @@ BR2_TARGET_ROOTFS_CPIO_LZMA=y BR2_TARGET_ROOTFS_INITRAMFS=y BR2_TARGET_ROOTFS_ISO9660=y BR2_TARGET_ROOTFS_ISO9660_BOTH=y +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 diff --git a/configs/shredos_iso_aio_defconfig b/configs/shredos_iso_aio_defconfig index f89683d4bf..413374b354 100644 --- a/configs/shredos_iso_aio_defconfig +++ b/configs/shredos_iso_aio_defconfig @@ -168,6 +168,10 @@ BR2_TARGET_ROOTFS_CPIO_LZMA=y BR2_TARGET_ROOTFS_INITRAMFS=y BR2_TARGET_ROOTFS_ISO9660=y BR2_TARGET_ROOTFS_ISO9660_BOTH=y +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 diff --git a/configs/shredos_iso_aio_i586_defconfig b/configs/shredos_iso_aio_i586_defconfig index ca49461e43..aceb560f25 100644 --- a/configs/shredos_iso_aio_i586_defconfig +++ b/configs/shredos_iso_aio_i586_defconfig @@ -165,6 +165,10 @@ BR2_TARGET_ROOTFS_CPIO_LZMA=y BR2_TARGET_ROOTFS_INITRAMFS=y BR2_TARGET_ROOTFS_ISO9660=y BR2_TARGET_ROOTFS_ISO9660_BOTH=y +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 diff --git a/configs/shredos_iso_defconfig b/configs/shredos_iso_defconfig index e65a954f22..a7869850c1 100644 --- a/configs/shredos_iso_defconfig +++ b/configs/shredos_iso_defconfig @@ -167,6 +167,10 @@ BR2_TARGET_ROOTFS_CPIO_LZMA=y BR2_TARGET_ROOTFS_INITRAMFS=y BR2_TARGET_ROOTFS_ISO9660=y BR2_TARGET_ROOTFS_ISO9660_BOTH=y +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_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 31679e715b..39793bcc14 100644 --- a/configs/shredos_iso_i586_defconfig +++ b/configs/shredos_iso_i586_defconfig @@ -164,6 +164,10 @@ BR2_TARGET_ROOTFS_CPIO_LZMA=y BR2_TARGET_ROOTFS_INITRAMFS=y BR2_TARGET_ROOTFS_ISO9660=y BR2_TARGET_ROOTFS_ISO9660_BOTH=y +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_HYBRID=y # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_GRUB2=y diff --git a/fs/iso9660/README b/fs/iso9660/README new file mode 100644 index 0000000000..bc465b7fa7 --- /dev/null +++ b/fs/iso9660/README @@ -0,0 +1,8 @@ +ISO9660 filesystem was updated to modern standards as of 20/11/2025. +The changes have - at the time of this writing - not been upstreamed. +Do compare (and port 'fs/iso9660' over) when updating the Buildroot release. + +The following variables are filled in at build-time: + - __EFI_ID_FILE__ + - __KERNEL_PATH__ + - __INITRD_PATH__ (automatically removed if not used) diff --git a/fs/iso9660/grub.cfg b/fs/iso9660/grub.cfg index 137e3a0b08..5a74b2354a 100644 --- a/fs/iso9660/grub.cfg +++ b/fs/iso9660/grub.cfg @@ -1,12 +1,7 @@ set default="0" -set timeout="5" +set timeout="10" -menuentry "ShredOS" { - linux __KERNEL_PATH__ console=tty3 loglevel=3 - initrd __INITRD_PATH__ -} - -menuentry "ShredOS (nomodeset)" { - linux __KERNEL_PATH__ console=tty3 loglevel=3 nomodeset - initrd __INITRD_PATH__ +menuentry "Buildroot" { + linux __KERNEL_PATH__ root=/dev/sr0 + initrd __INITRD_PATH__ } diff --git a/fs/iso9660/isolinux.cfg b/fs/iso9660/isolinux.cfg index 565647f0bf..b968d85206 100644 --- a/fs/iso9660/isolinux.cfg +++ b/fs/iso9660/isolinux.cfg @@ -1,15 +1,4 @@ -default menu.c32 -prompt 0 -timeout 50 - -menu title ShredOS - -label shredos - menu label ShredOS +default 1 +label 1 kernel __KERNEL_PATH__ - append initrd=__INITRD_PATH__ console=tty3 loglevel=3 - -label shredos-nomodeset - menu label ShredOS (nomodeset) - kernel __KERNEL_PATH__ - append initrd=__INITRD_PATH__ console=tty3 loglevel=3 nomodeset + append initrd=__INITRD_PATH__ root=/dev/sr0