Commit 2731db39 authored by Anton Midyukov's avatar Anton Midyukov

memtest, grub: add EFI support

Note: memtest86 is not signed.
parent 1bff8aba
if [ "$grub_platform" = "pc" ]; then if [ "$grub_platform" = "pc" ]; then
menuentry $"Memory Test" --id 'memtest' { menuentry $"Memory Test" --id 'memtest' {
echo $"Loading memtest.bin ..." linux /boot/memtest.bin
linux16 /boot/memtest.bin }
fi
if [ "$grub_platform" = "efi" ]; then
menuentry $"Memory Test (may not work with Secure Boot" --id 'memtest' {
linux /boot/memtest.efi
} }
fi fi
if [ "$grub_platform" = "efi" ]; then
menuentry $"Memory Test" --id 'memtest' {
chainloader /EFI/tools/memtest86.efi
boot
}
fi
...@@ -3,7 +3,7 @@ use/memtest: use/syslinux use/grub ...@@ -3,7 +3,7 @@ use/memtest: use/syslinux use/grub
@$(call add_feature) @$(call add_feature)
@$(call add,SYSTEM_PACKAGES,memtest86+) @$(call add,SYSTEM_PACKAGES,memtest86+)
@$(call add,SYSLINUX_CFG,memtest) @$(call add,SYSLINUX_CFG,memtest)
@$(call add,GRUB_CFG,memtest_bios) @$(call add,GRUB_CFG,memtest)
else else
use/memtest: ; @: use/memtest: ; @:
endif endif
......
#!/bin/sh #!/bin/sh
mkdir -p "$WORKDIR"/boot mkdir -p "$WORKDIR"/boot
MEMTEST="$(find /boot/ -name 'memtest*' -print -quit)" MEMTEST="$(find /boot/ -name 'memtest*.bin' -print -quit)"
MEMTEST_EFI="$(find /boot/ -name 'memtest*.efi' -print -quit)"
# hdt wiki recommends adding .bin # hdt wiki recommends adding .bin
[ -z "$MEMTEST" ] || [ -z "$MEMTEST" ] ||
cp -f "$MEMTEST" "$WORKDIR"/boot/memtest.bin cp -f "$MEMTEST" "$WORKDIR"/boot/memtest.bin
[ -z "$GLOBAL_EFI_BOOTLOADER" ] || [ -z "$MEMTEST_EFI" ] ||
cp -f "$MEMTEST_EFI" "$WORKDIR"/boot/memtest.efi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment