From 31fa6abd3698453a759e56164fb09a53f6870ad1 Mon Sep 17 00:00:00 2001 From: jnqnfe Date: Thu, 15 Jan 2015 03:39:00 +0000 Subject: syslinux: add memtest menu entry only if including memtest --- scripts/build/binary_syslinux | 8 ++++++++ share/bootloaders/extlinux/advanced.cfg | 5 +---- share/bootloaders/extlinux/memtest.cfg | 4 ++++ share/bootloaders/isolinux/advanced.cfg | 5 +---- share/bootloaders/isolinux/memtest.cfg | 4 ++++ share/bootloaders/pxelinux/advanced.cfg | 5 +---- share/bootloaders/pxelinux/memtest.cfg | 4 ++++ share/bootloaders/syslinux/advanced.cfg | 5 +---- share/bootloaders/syslinux/memtest.cfg | 4 ++++ 9 files changed, 28 insertions(+), 16 deletions(-) create mode 100644 share/bootloaders/extlinux/memtest.cfg create mode 100644 share/bootloaders/isolinux/memtest.cfg create mode 100644 share/bootloaders/pxelinux/memtest.cfg create mode 100644 share/bootloaders/syslinux/memtest.cfg diff --git a/scripts/build/binary_syslinux b/scripts/build/binary_syslinux index b85e56774..443d0133e 100755 --- a/scripts/build/binary_syslinux +++ b/scripts/build/binary_syslinux @@ -274,6 +274,14 @@ else sed -i "s#@OPTIONAL_INSTALLER_INCLUDE@#include install.cfg#g" "${_TARGET}"/menu.cfg fi +# Replace placeholder for optional memtest menu entry include +if [ ! -f "binary/${_INITRAMFS}/memtest" ]; then + rm -f "${_TARGET}"/memtest.cfg + sed -i -e "#@OPTIONAL_MEMTEST_INCLUDE@#d" "${_TARGET}"/advanced.cfg +else + sed -i -e "s#@OPTIONAL_MEMTEST_INCLUDE@#include memtest.cfg#g" "${_TARGET}"/advanced.cfg +fi + if [ -e "${_TARGET}/splash.svg" ] then case "${LB_BUILD_WITH_CHROOT}" in diff --git a/share/bootloaders/extlinux/advanced.cfg b/share/bootloaders/extlinux/advanced.cfg index f1098603f..11d733332 100644 --- a/share/bootloaders/extlinux/advanced.cfg +++ b/share/bootloaders/extlinux/advanced.cfg @@ -3,7 +3,4 @@ label hdt menu title Hardware Detection Tool (HDT) com32 hdt.c32 -label memtest - menu label ^Memory Diagnostic Tool (memtest86+) - menu title Memory Diagnostic Tool (memtest86+) - linux /live/memtest +@OPTIONAL_MEMTEST_INCLUDE@ diff --git a/share/bootloaders/extlinux/memtest.cfg b/share/bootloaders/extlinux/memtest.cfg new file mode 100644 index 000000000..e7e86e30b --- /dev/null +++ b/share/bootloaders/extlinux/memtest.cfg @@ -0,0 +1,4 @@ +label memtest + menu label ^Memory Diagnostic Tool (memtest86+) + menu title Memory Diagnostic Tool (memtest86+) + linux /live/memtest diff --git a/share/bootloaders/isolinux/advanced.cfg b/share/bootloaders/isolinux/advanced.cfg index f1098603f..11d733332 100644 --- a/share/bootloaders/isolinux/advanced.cfg +++ b/share/bootloaders/isolinux/advanced.cfg @@ -3,7 +3,4 @@ label hdt menu title Hardware Detection Tool (HDT) com32 hdt.c32 -label memtest - menu label ^Memory Diagnostic Tool (memtest86+) - menu title Memory Diagnostic Tool (memtest86+) - linux /live/memtest +@OPTIONAL_MEMTEST_INCLUDE@ diff --git a/share/bootloaders/isolinux/memtest.cfg b/share/bootloaders/isolinux/memtest.cfg new file mode 100644 index 000000000..e7e86e30b --- /dev/null +++ b/share/bootloaders/isolinux/memtest.cfg @@ -0,0 +1,4 @@ +label memtest + menu label ^Memory Diagnostic Tool (memtest86+) + menu title Memory Diagnostic Tool (memtest86+) + linux /live/memtest diff --git a/share/bootloaders/pxelinux/advanced.cfg b/share/bootloaders/pxelinux/advanced.cfg index f1098603f..11d733332 100644 --- a/share/bootloaders/pxelinux/advanced.cfg +++ b/share/bootloaders/pxelinux/advanced.cfg @@ -3,7 +3,4 @@ label hdt menu title Hardware Detection Tool (HDT) com32 hdt.c32 -label memtest - menu label ^Memory Diagnostic Tool (memtest86+) - menu title Memory Diagnostic Tool (memtest86+) - linux /live/memtest +@OPTIONAL_MEMTEST_INCLUDE@ diff --git a/share/bootloaders/pxelinux/memtest.cfg b/share/bootloaders/pxelinux/memtest.cfg new file mode 100644 index 000000000..e7e86e30b --- /dev/null +++ b/share/bootloaders/pxelinux/memtest.cfg @@ -0,0 +1,4 @@ +label memtest + menu label ^Memory Diagnostic Tool (memtest86+) + menu title Memory Diagnostic Tool (memtest86+) + linux /live/memtest diff --git a/share/bootloaders/syslinux/advanced.cfg b/share/bootloaders/syslinux/advanced.cfg index f1098603f..11d733332 100644 --- a/share/bootloaders/syslinux/advanced.cfg +++ b/share/bootloaders/syslinux/advanced.cfg @@ -3,7 +3,4 @@ label hdt menu title Hardware Detection Tool (HDT) com32 hdt.c32 -label memtest - menu label ^Memory Diagnostic Tool (memtest86+) - menu title Memory Diagnostic Tool (memtest86+) - linux /live/memtest +@OPTIONAL_MEMTEST_INCLUDE@ diff --git a/share/bootloaders/syslinux/memtest.cfg b/share/bootloaders/syslinux/memtest.cfg new file mode 100644 index 000000000..e7e86e30b --- /dev/null +++ b/share/bootloaders/syslinux/memtest.cfg @@ -0,0 +1,4 @@ +label memtest + menu label ^Memory Diagnostic Tool (memtest86+) + menu title Memory Diagnostic Tool (memtest86+) + linux /live/memtest -- cgit v1.2.3