]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
memtest86+: Update to 4.10.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 12 May 2010 15:57:35 +0000 (17:57 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 12 May 2010 15:57:35 +0000 (17:57 +0200)
Adds support for grub2.

pkgs/core/memtest86+/memtest86+.grub [new file with mode: 0755]
pkgs/core/memtest86+/memtest86+.nm

diff --git a/pkgs/core/memtest86+/memtest86+.grub b/pkgs/core/memtest86+/memtest86+.grub
new file mode 100755 (executable)
index 0000000..3301b85
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+set -e
+
+# older versions of grub2 do not have this yet (LP: #459080)
+if [ ! -e /usr/lib/grub/grub-mkconfig_lib ]; then
+    echo "no grub-mkconfig_lib, exiting"
+    exit 0
+fi
+
+. /usr/lib/grub/grub-mkconfig_lib
+
+# We can't cope with loop-mounted devices here.
+case ${GRUB_DEVICE_BOOT} in
+  /dev/loop/*|/dev/loop[0-9])
+    exit 0
+  ;;
+esac
+
+if test -e /boot/memtest86+; then
+  MEMTESTPATH=$( make_system_path_relative_to_its_root "/boot/memtest86+" )
+  echo "Found memtest86+ image: $MEMTESTPATH" >&2
+  cat << EOF
+menuentry "Memory test (memtest86+)" {
+EOF
+  prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
+  printf '%s\n' "${prepare_boot_cache}"
+  cat << EOF
+       linux16 $MEMTESTPATH
+}
+menuentry "Memory test (memtest86+, serial console 115200)" {
+EOF
+  printf '%s\n' "${prepare_boot_cache}"
+  cat << EOF
+       linux16 $MEMTESTPATH console=ttyS0,115200n8
+}
+EOF
+fi
index e6f4b74de1f933141a3d278852cf81a5aacddd1e..1f9eb0d05be0e256e23da4377eea241bad87bbc8 100644 (file)
@@ -25,7 +25,7 @@
 include $(PKGROOT)/Include
 
 PKG_NAME       = memtest86+
-PKG_VER        = 4.00
+PKG_VER        = 4.10
 PKG_REL        = 0
 
 PKG_MAINTAINER =
@@ -53,4 +53,7 @@ endef
 define STAGE_INSTALL
        -mkdir -pv $(BUILDROOT)/boot
        cd $(DIR_APP) && cp -vf memtest.bin $(BUILDROOT)/boot/memtest86+
+
+       -mkdir -pv $(BUILDROOT)/etc/grub.d
+       cp -vf $(DIR_SOURCE)/$(PKG_NAME).grub $(BUILDROOT)/etc/grub.d/20_$(PKG_NAME)
 endef