From e17537311c93d538470fc7c48222ab3081f0307f Mon Sep 17 00:00:00 2001 From: PartialVolume <22084881+PartialVolume@users.noreply.github.com> Date: Wed, 11 Feb 2026 10:33:54 +0000 Subject: [PATCH] Added memtest86+ to both isolinux and grub2 boot menus, included the memtest package in all defconfigs --- board/shredos/genimage.cfg | 4 ++- board/shredos/genimage_i586.cfg | 4 ++- board/shredos/grub.cfg | 31 ++++++++++++++++++- board/shredos/iso/grub.cfg | 29 ++++++++++++++++- board/shredos/iso/isolinux.cfg | 17 +++++++++- configs/shredos_defconfig | 1 + configs/shredos_i686_lite_defconfig | 1 + configs/shredos_iso_extra_defconfig | 1 + configs/shredos_iso_extra_i686_lite_defconfig | 1 + configs/shredos_lite_defconfig | 1 + fs/iso9660/iso9660.mk | 9 ++++++ 11 files changed, 94 insertions(+), 5 deletions(-) diff --git a/board/shredos/genimage.cfg b/board/shredos/genimage.cfg index 2c64c285bb..0dce8f782c 100644 --- a/board/shredos/genimage.cfg +++ b/board/shredos/genimage.cfg @@ -5,14 +5,16 @@ image boot.vfat { file boot/grub/grub.cfg { image = 'grub.cfg' } file boot/version.txt { image = 'version.txt' } file boot/shredos.id { image = '/dev/null' } + file boot/memtest { image = 'memtest.bin' } file EFI/BOOT/bootx64.efi { image = 'bootx64.efi' } file EFI/BOOT/grub.cfg { image = 'grub.cfg' } + file EFI/BOOT/memtest.efi { image = 'memtest.efi' } file shredos.ico { image = 'shredos.ico' } file README.txt { image = 'README.txt' } file autorun.inf { image = 'autorun.inf' } } -size = 372809984 +size = 119873792 } image shredos.img { diff --git a/board/shredos/genimage_i586.cfg b/board/shredos/genimage_i586.cfg index 9839cb0df5..ab5df856b3 100644 --- a/board/shredos/genimage_i586.cfg +++ b/board/shredos/genimage_i586.cfg @@ -5,15 +5,17 @@ image boot.vfat { file boot/grub/grub.cfg { image = 'grub.cfg' } file boot/version.txt { image = 'version.txt' } file boot/shredos.id { image = '/dev/null' } + file boot/memtest { image = 'memtest.bin' } file EFI/BOOT/bootia32.efi { image = 'bootia32.efi' } file EFI/BOOT/bootx64.efi { image = 'bootx64.efi'} file EFI/BOOT/grub.cfg { image = 'grub.cfg' } + file EFI/BOOT/memtest.efi { image = 'memtest.efi' } file shredos.ico { image = 'shredos.ico' } file README.txt { image = 'README.txt' } file autorun.inf { image = 'autorun.inf' } } -size = 92344064 +size = 115277568 } image shredos.img { diff --git a/board/shredos/grub.cfg b/board/shredos/grub.cfg index c96e7933bb..0cc4468a7d 100644 --- a/board/shredos/grub.cfg +++ b/board/shredos/grub.cfg @@ -5,6 +5,35 @@ menuentry "ShredOS" { linux /boot/bzImage console=tty3 loglevel=3 } -menuentry "ShredOS (nomodeset)" { +menuentry "ShredOS (nomodeset - display issues? try this)" { linux /boot/bzImage console=tty3 loglevel=3 nomodeset } + +if [ "${grub_platform}" = "efi" ]; then + menuentry "Memtest86+ (BIOS legacy emulation for USB keyboard)" { + linux /EFI/BOOT/memtest.efi keyboard=legacy +} + menuentry "Memtest86+ (USB keyboards)" { + linux /EFI/BOOT/memtest.efi keyboard=both +} + menuentry "Memtest86+ (Disable SMP and memory identification)" { + linux /EFI/BOOT/memtest.efi nosmp nosm nobench +} +fi + +if [ "${grub_platform}" = "pc" ]; then + menuentry "Memtest86+ (Use BIOS legacy emulation for USB keyboards)" { + linux /boot/memtest keyboard=legacy +} + menuentry "Memtest86+ (USB keyboards)" { + linux /boot/memtest keyboard=both +} + menuentry "Memtest86+ (Disable SMP and memory identification)" { + linux /boot/memtest nosmp nosm nobench +} + menuentry "Memtest86+ (Serial line RS232, ttyS0,115200)" { + linux /boot/memtest console=ttyS0,115200 +} +fi + + diff --git a/board/shredos/iso/grub.cfg b/board/shredos/iso/grub.cfg index 137e3a0b08..9b5516e8e5 100644 --- a/board/shredos/iso/grub.cfg +++ b/board/shredos/iso/grub.cfg @@ -6,7 +6,34 @@ menuentry "ShredOS" { initrd __INITRD_PATH__ } -menuentry "ShredOS (nomodeset)" { +menuentry "ShredOS (nomodeset - display issues? try this)" { linux __KERNEL_PATH__ console=tty3 loglevel=3 nomodeset initrd __INITRD_PATH__ } + +if [ "${grub_platform}" = "efi" ]; then + menuentry "Memtest86+ (BIOS legacy emulation for USB keyboard)" { + linux /EFI/BOOT/memtest.efi keyboard=legacy +} + menuentry "Memtest86+ (USB keyboards)" { + linux /EFI/BOOT/memtest.efi keyboard=both +} + menuentry "Memtest86+ (Disable SMP and memory identification)" { + linux /EFI/BOOT/memtest.efi nosmp nosm nobench +} +fi + +if [ "${grub_platform}" = "pc" ]; then + menuentry "Memtest86+ (BIOS legacy emulation for USB keyboard)" { + linux /boot/memtest keyboard=legacy +} + menuentry "Memtest86+ (USB keyboards)" { + linux /boot/memtest keyboard=both +} + menuentry "Memtest86+ (Disable SMP and memory identification)" { + linux /boot/memtest nosmp nosm nobench +} + menuentry "Memtest86+ (Serial line RS232, ttyS0,115200)" { + linux /boot/memtest console=ttyS0,115200 +} +fi diff --git a/board/shredos/iso/isolinux.cfg b/board/shredos/iso/isolinux.cfg index 565647f0bf..b6a184866c 100644 --- a/board/shredos/iso/isolinux.cfg +++ b/board/shredos/iso/isolinux.cfg @@ -10,6 +10,21 @@ label shredos append initrd=__INITRD_PATH__ console=tty3 loglevel=3 label shredos-nomodeset - menu label ShredOS (nomodeset) + menu label ShredOS (nomodeset - display issues? try this) kernel __KERNEL_PATH__ append initrd=__INITRD_PATH__ console=tty3 loglevel=3 nomodeset + +label memtest86-bios-legacy-emulation-usb-keyboards + menu label Memtest86+ (use BIOS legacy emulation for USB keyboards) + kernel /boot/memtest + append keyboard=legacy + +label memtest86-usb-keyboards + menu label Memtest86+ (USB Keyboards) + kernel /boot/memtest + append keyboard=both + +label memtest86-serial + menu label Memtest86+ (Serial line RS232, ttyS0,115200 ) + kernel /boot/memtest + append console=ttyS0,115200 diff --git a/configs/shredos_defconfig b/configs/shredos_defconfig index 63ac599445..432bafa054 100644 --- a/configs/shredos_defconfig +++ b/configs/shredos_defconfig @@ -92,6 +92,7 @@ BR2_PACKAGE_KBD=y BR2_PACKAGE_LM_SENSORS=y BR2_PACKAGE_LSHW=y BR2_PACKAGE_LSSCSI=y +BR2_PACKAGE_MEMTEST86=y BR2_PACKAGE_MINICOM=y BR2_PACKAGE_NVME=y BR2_PACKAGE_READ_EDID=y diff --git a/configs/shredos_i686_lite_defconfig b/configs/shredos_i686_lite_defconfig index c377c5420d..fca66cde37 100644 --- a/configs/shredos_i686_lite_defconfig +++ b/configs/shredos_i686_lite_defconfig @@ -40,6 +40,7 @@ BR2_PACKAGE_EDID_DECODE=y BR2_PACKAGE_HDPARM=y BR2_PACKAGE_KBD=y BR2_PACKAGE_LM_SENSORS=y +BR2_PACKAGE_MEMTEST86=y BR2_PACKAGE_NVME=y BR2_PACKAGE_READ_EDID=y BR2_PACKAGE_PCIUTILS=y diff --git a/configs/shredos_iso_extra_defconfig b/configs/shredos_iso_extra_defconfig index eff6282bb0..8fa56cae2d 100644 --- a/configs/shredos_iso_extra_defconfig +++ b/configs/shredos_iso_extra_defconfig @@ -93,6 +93,7 @@ BR2_PACKAGE_KBD=y BR2_PACKAGE_LM_SENSORS=y BR2_PACKAGE_LSHW=y BR2_PACKAGE_LSSCSI=y +BR2_PACKAGE_MEMTEST86=y BR2_PACKAGE_MINICOM=y BR2_PACKAGE_NVME=y BR2_PACKAGE_READ_EDID=y diff --git a/configs/shredos_iso_extra_i686_lite_defconfig b/configs/shredos_iso_extra_i686_lite_defconfig index 9a3155520c..82a7318915 100644 --- a/configs/shredos_iso_extra_i686_lite_defconfig +++ b/configs/shredos_iso_extra_i686_lite_defconfig @@ -42,6 +42,7 @@ BR2_PACKAGE_EDID_DECODE=y BR2_PACKAGE_HDPARM=y BR2_PACKAGE_KBD=y BR2_PACKAGE_LM_SENSORS=y +BR2_PACKAGE_MEMTEST86=y BR2_PACKAGE_NVME=y BR2_PACKAGE_PCIUTILS=y BR2_PACKAGE_READ_EDID=y diff --git a/configs/shredos_lite_defconfig b/configs/shredos_lite_defconfig index 7e6007b83a..2105433c0d 100644 --- a/configs/shredos_lite_defconfig +++ b/configs/shredos_lite_defconfig @@ -42,6 +42,7 @@ BR2_PACKAGE_EDID_DECODE=y BR2_PACKAGE_HDPARM=y BR2_PACKAGE_KBD=y BR2_PACKAGE_LM_SENSORS=y +BR2_PACKAGE_MEMTEST86=y BR2_PACKAGE_NVME=y BR2_PACKAGE_READ_EDID=y BR2_PACKAGE_PCIUTILS=y diff --git a/fs/iso9660/iso9660.mk b/fs/iso9660/iso9660.mk index f124d2702f..6648e65b43 100644 --- a/fs/iso9660/iso9660.mk +++ b/fs/iso9660/iso9660.mk @@ -95,6 +95,11 @@ else ROOTFS_ISO9660_TMP_TARGET_DIR = $(TARGET_DIR) endif +define ROOTFS_ISO9660_COPY_MEMTEST_BINARIES + $(INSTALL) -D -m 0644 $(BINARIES_DIR)/memtest.efi $(ROOTFS_ISO9660_TMP_TARGET_DIR)/EFI/BOOT/memtest.efi + $(INSTALL) -D -m 0644 $(BINARIES_DIR)/memtest.bin $(ROOTFS_ISO9660_TMP_TARGET_DIR)/boot/memtest +endef + ################################################################################ # Reproducible build support ################################################################################ @@ -160,6 +165,8 @@ define ROOTFS_ISO9660_INSTALL_GRUB2_EFI if [ "$(BR2_x86_64)" = "y" ]; then \ $(INSTALL) -D -m 0644 $(BINARIES_DIR)/efi-part/EFI/BOOT/bootx64.efi $(TOPDIR)/board/shredos/bootx64.efi; \ fi + # Copy memtest.efi and memtest.bin to ISO9660 filesystem + $(ROOTFS_ISO9660_COPY_MEMTEST_BINARIES) # Create EFI FAT partition $(RM) -rf $(ROOTFS_ISO9660_EFI_PARTITION_PATH) mkdir -p $(dir $(ROOTFS_ISO9660_EFI_PARTITION_PATH)) @@ -277,6 +284,8 @@ define ROOTFS_ISO9660_INSTALL_GRUB2_EFI if [ "$(BR2_x86_64)" = "y" ]; then \ $(INSTALL) -D -m 0644 $(BINARIES_DIR)/efi-part/EFI/BOOT/bootx64.efi $(TOPDIR)/board/shredos/bootx64.efi; \ fi + # Copy memtest.efi and memtest.bin to ISO9660 filesystem + $(ROOTFS_ISO9660_COPY_MEMTEST_BINARIES) # Create EFI FAT partition $(RM) -rf $(ROOTFS_ISO9660_EFI_PARTITION_PATH) mkdir -p $(dir $(ROOTFS_ISO9660_EFI_PARTITION_PATH))