Patch for debian part of Multiboot support.
Note: upstream is unresponsive, so please consider adding it into the package.
It is necessary for memtest86+ to be loadable by GRUB on non-BIOS platforms
(such as coreboot).
--
Robert Millan
"Be the change you want to see in the world" -- Gandhi
diff -ur memtest86+-4.00.old/debian/control memtest86+-4.00/debian/control
--- memtest86+-4.00.old/debian/control 2010-01-15 17:49:49.000000000 +0100
+++ memtest86+-4.00/debian/control 2010-01-15 21:21:10.000000000 +0100
@@ -10,7 +10,7 @@
Package: memtest86+
Architecture: i386 amd64 kfreebsd-i386 kfreebsd-amd64 lpia hurd-i386
Depends: ${misc:Depends}
-Suggests: hwtools, memtester, kernel-patch-badram, memtest86, grub2 (>=1.96+20090523-1) | grub (>= 0.95+cvs20040624), mtools
+Suggests: hwtools, memtester, kernel-patch-badram, memtest86, grub2 (>= 1.96+20080831-1) | grub (>= 0.95+cvs20040624), mtools
Description: thorough real-mode memory tester
Memtest86+ scans your RAM for errors.
.
diff -ur memtest86+-4.00.old/debian/grub memtest86+-4.00/debian/grub
--- memtest86+-4.00.old/debian/grub 2010-01-15 17:49:49.000000000 +0100
+++ memtest86+-4.00/debian/grub 2010-01-15 21:15:27.000000000 +0100
@@ -1,20 +1,18 @@
#!/bin/sh
set -e
-if test -e /boot/memtest86+.bin ; then
+if test -e /boot/memtest86+_multiboot.bin ; then
if [ -f /usr/lib/grub/grub-mkconfig_lib ]; then
. /usr/lib/grub/grub-mkconfig_lib
- LX=linux16
elif [ -f /usr/lib/grub/update-grub_lib ]; then
. /usr/lib/grub/update-grub_lib
- LX=linux
else
# no grub file, so we notify and exit gracefully
echo "Cannot find grub config file, exiting." >&2
exit 0
fi
- MEMTESTPATH=$( make_system_path_relative_to_its_root "/boot/memtest86+.bin" )
+ MEMTESTPATH=$( make_system_path_relative_to_its_root "/boot/memtest86+_multiboot.bin" )
echo "Found memtest86+ image: $MEMTESTPATH" >&2
cat << EOF
menuentry "Memory test (memtest86+)" {
@@ -27,7 +25,7 @@
EOF
prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
cat << EOF
- $LX $MEMTESTPATH console=ttyS0,115200n8
+ multiboot $MEMTESTPATH console=ttyS0,115200n8
}
EOF
fi
diff -ur memtest86+-4.00.old/debian/lilo.conf memtest86+-4.00/debian/lilo.conf
--- memtest86+-4.00.old/debian/lilo.conf 2010-01-15 17:49:49.000000000 +0100
+++ memtest86+-4.00/debian/lilo.conf 2010-01-15 21:17:59.000000000 +0100
@@ -1,8 +1,8 @@
# sample /etc/lilo.conf entry for memtest86
-image = /boot/memtest86+.bin
+image = /boot/memtest86+_zimage.bin
label = memtest86+
-image = /boot/memtest86+.bin
+image = /boot/memtest86+_zimage.bin
append = "console=ttyS0,115200n8"
label = memtest86+serial
diff -ur memtest86+-4.00.old/debian/make-memtest86+-boot-floppy memtest86+-4.00/debian/make-memtest86+-boot-floppy
--- memtest86+-4.00.old/debian/make-memtest86+-boot-floppy 2010-01-15 17:49:49.000000000 +0100
+++ memtest86+-4.00/debian/make-memtest86+-boot-floppy 2010-01-15 21:13:03.000000000 +0100
@@ -16,7 +16,7 @@
set -e
-MEMTEST=/boot/memtest86+.bin
+MEMTEST=/boot/memtest86+_zimage.bin
FLOPPYIMAGE=/dev/fd0
GRUBBIN=/usr/sbin/grub
GRUBLIB=/usr/lib/grub
diff -ur memtest86+-4.00.old/debian/make-memtest86+-boot-floppy.1 memtest86+-4.00/debian/make-memtest86+-boot-floppy.1
--- memtest86+-4.00.old/debian/make-memtest86+-boot-floppy.1 2010-01-15 17:49:49.000000000 +0100
+++ memtest86+-4.00/debian/make-memtest86+-boot-floppy.1 2010-01-15 21:16:29.000000000 +0100
@@ -20,7 +20,7 @@
.SH OPTIONS
.IP "\-\-memtest <path to the memtest-image>"
-Path to the memtest86+-image, default is /boot/memtest86+.bin.
+Path to the memtest86+-image, default is /boot/memtest86+_zimage.bin.
.IP "\-\-floppyimage <path to the floppyimage or device>"
File or device where the boot-image should be written to, default is /dev/fd0.
diff -ur memtest86+-4.00.old/debian/postinst memtest86+-4.00/debian/postinst
--- memtest86+-4.00.old/debian/postinst 2010-01-15 17:49:49.000000000 +0100
+++ memtest86+-4.00/debian/postinst 2010-01-15 21:14:22.000000000 +0100
@@ -7,7 +7,7 @@
db_get shared/memtest86-run-lilo
if [ "$RET" = true ] &&
[ -x /sbin/lilo ] && [ -r /etc/lilo.conf ] &&
- grep "image.*=.*/boot/memtest86+.bin" /etc/lilo.conf >/dev/null
+ grep "image.*=.*/boot/memtest86+_zimage.bin" /etc/lilo.conf >/dev/null
then
lilo
fi
diff -ur memtest86+-4.00.old/debian/README.Debian memtest86+-4.00/debian/README.Debian
--- memtest86+-4.00.old/debian/README.Debian 2010-01-15 17:49:49.000000000 +0100
+++ memtest86+-4.00/debian/README.Debian 2010-01-15 21:19:47.000000000 +0100
@@ -1,12 +1,18 @@
memtest86+ for Debian
---------------------
-Binary image is /boot/memtest86+.bin
+Two binary images are provided:
-It is automatically registered against grub2. For other bootloaders
-you'll need to do some manual setup (see examples/grub-menu.lst for
-GRUB Legacy or examples/lilo.conf for LILO), or to make a boot-floppy,
-and reboot on this image.
+ - A legacy /boot/memtest86+_zimage.bin that uses Linux zImage boot
+ protocol.
+
+ - A Multiboot /boot/memtest86+_multiboot.bin image that follows the
+ Multiboot specification.
+
+memtest86+_multiboot.bin is automatically registered against grub2. For
+other bootloaders you'll need to do some manual setup (see
+examples/grub-menu.lst for GRUB Legacy or examples/lilo.conf for LILO),
+or to make a boot-floppy, and reboot on this image.
The make-memtest86+-boot-floppy utility will help you to create a
boot floppy or floppy image using GRUB Legacy.
diff -ur memtest86+-4.00.old/debian/rules memtest86+-4.00/debian/rules
--- memtest86+-4.00.old/debian/rules 2010-01-15 17:49:49.000000000 +0100
+++ memtest86+-4.00/debian/rules 2010-01-15 21:17:36.000000000 +0100
@@ -33,8 +33,8 @@
install -d debian/$(PACKAGE)/usr/bin
install -m755 debian/make-$(PACKAGE)-boot-floppy debian/$(PACKAGE)/usr/bin/
- install -D -m644 memtest.bin debian/$(PACKAGE)/boot/$(PACKAGE).bin
- install -D -m644 memtest debian/$(PACKAGE)/usr/lib/$(PACKAGE)/$(PACKAGE).elf
+ install -D -m644 memtest.bin debian/$(PACKAGE)/boot/$(PACKAGE)_zimage.bin
+ install -D -m644 memtest_shared debian/$(PACKAGE)/boot/$(PACKAGE)_multiboot.bin
install -D -m755 debian/grub debian/$(PACKAGE)/etc/grub.d/20_$(PACKAGE)
dh_installman debian/make-$(PACKAGE)-boot-floppy.1
#install the lintian override