summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Januszewski <spock@gentoo.org>2009-03-26 08:42:04 +0000
committerMichael Januszewski <spock@gentoo.org>2009-03-26 08:42:04 +0000
commit06039cb90e597c8f5eae37f0ecbfff35096b4be7 (patch)
treec19bc643e33e5677c91b5c3ef70c43d8b7f884ed /sys-apps
parentFix GCC 4.4 build errors (bug 254256). (diff)
downloadhistorical-06039cb90e597c8f5eae37f0ecbfff35096b4be7.tar.gz
historical-06039cb90e597c8f5eae37f0ecbfff35096b4be7.tar.bz2
historical-06039cb90e597c8f5eae37f0ecbfff35096b4be7.zip
Add a script to install memtest86+ on floppy disks (bug #252996).
Package-Manager: portage-2.1.6.10/cvs/Linux x86_64 RepoMan-Options: --force
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/memtest86+/ChangeLog7
-rw-r--r--sys-apps/memtest86+/Manifest16
-rw-r--r--sys-apps/memtest86+/files/make-memtest86+-boot-floppy111
-rw-r--r--sys-apps/memtest86+/files/make-memtest86+-boot-floppy.139
-rw-r--r--sys-apps/memtest86+/memtest86+-2.11.ebuild13
-rw-r--r--sys-apps/memtest86+/metadata.xml3
6 files changed, 176 insertions, 13 deletions
diff --git a/sys-apps/memtest86+/ChangeLog b/sys-apps/memtest86+/ChangeLog
index 61b54e3f03e4..c3912fe99fc0 100644
--- a/sys-apps/memtest86+/ChangeLog
+++ b/sys-apps/memtest86+/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-apps/memtest86+
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/memtest86+/ChangeLog,v 1.48 2009/03/22 08:40:40 spock Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/memtest86+/ChangeLog,v 1.49 2009/03/26 08:42:03 spock Exp $
+
+ 26 Mar 2009; Michał Januszewski <spock@gentoo.org>
+ +files/make-memtest86+-boot-floppy, +files/make-memtest86+-boot-floppy.1,
+ metadata.xml, memtest86+-2.11.ebuild:
+ Add a script to install memtest86+ on floppy disks (bug #252996).
22 Mar 2009; Michał Januszewski <spock@gentoo.org>
memtest86+-2.01.ebuild, memtest86+-2.10.ebuild, memtest86+-2.11.ebuild:
diff --git a/sys-apps/memtest86+/Manifest b/sys-apps/memtest86+/Manifest
index ec8f9e8bb32e..a180d2bb63b3 100644
--- a/sys-apps/memtest86+/Manifest
+++ b/sys-apps/memtest86+/Manifest
@@ -1,6 +1,8 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
+AUX make-memtest86+-boot-floppy 2499 RMD160 afe647152769ae90ae3058dd8e33e451dacdd2c8 SHA1 feed092c75926b5b6ed4ef6fce9a1ec07e66d2f2 SHA256 88d8768592abdd224b9cd041152c78ef50eedeef3620f0d00f51c0eaeef8158a
+AUX make-memtest86+-boot-floppy.1 1165 RMD160 541139ac0a82950ec782603d74e9c53e30fcd49b SHA1 6fbaa20c2e08266147d6adae42195775aae4a13b SHA256 240c921fe2cbb4d70b5e06fc06d798c6018ece8a238fdeebf3ad02a6043ed5d7
AUX memtest86+-1.70-gnu_hash.patch 485 RMD160 355648069f4b3f6234e770bbea30dcef10405376 SHA1 dd0d673b2fdee35b1522574b1499cd943820dca5 SHA256 07bb65affa496910f0c91457c5c21e31a0e523e0c360ebf602b47296748f4bac
AUX memtest86+-2.01-hardcoded_cc.patch 1209 RMD160 00167b8e9f8eb49b3c291b63a754e415c7d0ad17 SHA1 e0efa4cfb820825bc2cc6c2488be18909db892cf SHA256 79de7846fc10bb70f018bda0daad82082600a5a7bc35d7715b25294018e47d97
AUX memtest86+-2.10-hardcoded_cc.patch 1231 RMD160 9ffb4f5bdacff75ef09e6aa760186cdd1e29c71d SHA1 fa55e18966a7c5e35b091a9899cfe51d55ea83de SHA256 3f39a0495230cf45ea0666040b1bfefd00a86dbd91ec45428f181ed6c06a10a6
@@ -10,13 +12,13 @@ DIST memtest86+-2.10.tar.gz 165987 RMD160 e782d067899361bbf931206742318c136467c4
DIST memtest86+-2.11.tar.gz 165937 RMD160 2f210dd17725ead0ef3daf1181184d2a7a071774 SHA1 5cebc90126403c1e918fd05670546800b66ed113 SHA256 43876a7221e39cde791f20d04ecb071adfa08975cac2e511d04359619ce16c0e
EBUILD memtest86+-2.01.ebuild 1390 RMD160 087717dbdb8fe993df5880f382e4689d4d14633a SHA1 e1f32f03fa4b7d8d47ccd63f94e1132706dcb39b SHA256 a5f27eb3b8331eeb70ce87203058bc4d9f30f7c59779a7b0ecc4e4a8793e3dbd
EBUILD memtest86+-2.10.ebuild 1392 RMD160 24bc653279fc908dd0bb2b201e47b153f46f0948 SHA1 e9634aaf5a71dffbdc676bbb707866405d0cb515 SHA256 15835cb1e972e211e9efa44fd2e69593f2fb274ba736aed1d706fef246521721
-EBUILD memtest86+-2.11.ebuild 1403 RMD160 4e16c851ee1cbb5bdffd7268102376957a9eb2f4 SHA1 59486c5f0dc3470256975bfbcab745597d6c4b2c SHA256 3be4550d9212fe3c05a5806c0946eb9223c9bba655038cb7dfe859ed17ba9cfe
-MISC ChangeLog 7955 RMD160 a3e266197c8d82cdc21d7c571382439a2dc19aed SHA1 1f1978099072c4e02625a565a19f43c10bccf2fd SHA256 9f558e3e17de3498c127bb97125fd51dec51691f01d6d7eca14efcc16df5331a
-MISC metadata.xml 334 RMD160 5aa147c5b7c317b501281dcfbfdef447deaf4d09 SHA1 5dc1ab7bcf2e85590312e7cb7fa8dbea3deccf73 SHA256 3872db066e8e6a0f7a4e8b3ef82aa3b033d4fe0b88ba715ff79073c13db6a78e
+EBUILD memtest86+-2.11.ebuild 1595 RMD160 34277126a08e4b49ec13fda87512a03a9be9f2f4 SHA1 35b0a4c1f3aee459e8451009ed1f3018841b36e0 SHA256 9436dcf22907d9fb217bd13792b63427ca3f9292ce9e0bf1af529818f81bd2c8
+MISC ChangeLog 8194 RMD160 82f3195b17f7353e89b5d87b4832b1cff2fd331d SHA1 09582b208f444e61c256bcc66d1c5cec859e3ad3 SHA256 906e7505f27bbdd93c40e7a3e7c9769dd670f07c58a1e5774107ab55ed7098e6
+MISC metadata.xml 435 RMD160 a41a6fd4d037bbd4a73b78aa7142b851f4920911 SHA1 b5986becb6ded15ec987b932a77bf70703c18c8c SHA256 e42cd2e2804736877a470dd088678725eb242566343d0f20b3828be43378939b
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.10 (GNU/Linux)
+Version: GnuPG v2.0.11 (GNU/Linux)
-iEYEARECAAYFAknF+ZkACgkQchej4aZK9/fZ+QCfQzDrV1ZW38kr+csLKDral59G
-ROgAnjNMN0UcMznvP9aCxRmVCVZJnLSk
-=icA8
+iEYEARECAAYFAknLP+EACgkQchej4aZK9/dngACfcDpnOvLkSDSaU834CeMfzx0A
+EAAAnR8ksXUvH6/mZ8/iW+ladyh1u8ix
+=ErFX
-----END PGP SIGNATURE-----
diff --git a/sys-apps/memtest86+/files/make-memtest86+-boot-floppy b/sys-apps/memtest86+/files/make-memtest86+-boot-floppy
new file mode 100644
index 000000000000..9c225c740bf4
--- /dev/null
+++ b/sys-apps/memtest86+/files/make-memtest86+-boot-floppy
@@ -0,0 +1,111 @@
+#!/bin/sh
+#
+# Script for making a memtest86 boot floppy using GRUB as bootloader
+#
+
+# (c) 2003 Peter Loje Hansen <pl@2m.dk>
+# - original version
+# (c) 2004 Yann Dirson <dirson@debian.org>
+# - added parameters
+# - ability to work on a floppy image instead of a real floppy
+# - adapted patches from Martin Koeppe <martin@koeppe-net.de>, to use
+# mtools and install full grub
+
+# TODO:
+# - add a flag to generate a default boot entry for (hd0)
+
+set -e
+
+MEMTEST=/boot/memtest86plus/memtest.bin
+FLOPPYIMAGE=/dev/fd0
+GRUBBIN=/sbin/grub
+GRUBLIB=/lib/grub
+MFORMAT=/usr/bin/mformat
+
+arch=$(uname -m)
+
+case "$arch" in
+ i386|i486|i686) GRUBARCH=i386-pc;;
+ x86_64) GRUBARCH=x86_64-pc;;
+ *) error "Unsupported architecture: $arch";;
+esac
+
+error()
+{
+ echo >&2 "$0: $*"
+ exit 1
+}
+
+needsarg()
+{
+ [ $1 -ge 2 ] || error "syntax error"
+}
+
+[ -d $GRUBLIB ] || error "Can't find $GRUBLIB - did you install a recent grub package (0.95+cvs20040624 or later) ?"
+[ -x $MFORMAT ] || error "Can't find mformat - did you install the mtools package ?"
+
+while [ $# -gt 0 ]
+do
+ case "$1" in
+ --help) echo "$0 [--memtest $MEMTEST] [--floppyimage $FLOPPYIMAGE]"; exit 0 ;;
+ --memtest) needsarg $#; MEMTEST="$2"; shift ;;
+ --floppyimage) needsarg $#; FLOPPYIMAGE="$2"; shift ;;
+ *) error "syntax error" ;;
+ esac
+ shift
+done
+
+MOUNTPOINT=$(mktemp -d)
+
+if [ -b "$FLOPPYIMAGE" ]
+then
+ FINALDEV="$FLOPPYIMAGE"
+ FLOPPYIMAGE="$(mktemp)"
+else
+ FINALDEV=""
+fi
+
+echo "* Creating msdos file system"
+echo
+if [ ! -s "$FLOPPYIMAGE" ]; then
+ # unless a non-empty image exists, create a blank one first
+ dd bs=1024 count=1440 if=/dev/zero of="$FLOPPYIMAGE"
+fi
+# FIXME: "-f 1440" should probably be dropped
+mformat -i $FLOPPYIMAGE -f 1440 ::
+
+mmd -i $FLOPPYIMAGE ::/boot
+mmd -i $FLOPPYIMAGE ::/boot/grub
+
+echo
+echo "* Installing GRUB files"
+mcopy -v -i "$FLOPPYIMAGE" - ::/boot/grub/menu.lst <<EOF
+color green/black light-green/black
+default 0
+timeout 10
+title memtest
+kernel (fd0)/boot/memtest.bin
+EOF
+mcopy -v -i "$FLOPPYIMAGE" $GRUBLIB/$GRUBARCH/* ::/boot/grub
+
+echo
+echo "* Installing $MEMTEST"
+mcopy -v -i "$FLOPPYIMAGE" "$MEMTEST" ::/boot/memtest.bin
+
+echo
+echo -n "* Installing GRUB"
+$GRUBBIN --batch --device-map=/dev/null <<EOF
+device (fd0) $FLOPPYIMAGE
+root (fd0)
+setup (fd0)
+quit
+EOF
+
+if [ -n "$FINALDEV" ]; then
+ echo
+ echo "Insert a writable floppy for $FINALDEV and press enter"
+ read FOO
+
+ dd bs=1024 if="$FLOPPYIMAGE" of="$FINALDEV"
+ rm "$FLOPPYIMAGE"
+fi
diff --git a/sys-apps/memtest86+/files/make-memtest86+-boot-floppy.1 b/sys-apps/memtest86+/files/make-memtest86+-boot-floppy.1
new file mode 100644
index 000000000000..e1283e5efc8f
--- /dev/null
+++ b/sys-apps/memtest86+/files/make-memtest86+-boot-floppy.1
@@ -0,0 +1,39 @@
+.\" Man page for make-memtest86+-boot-floppy
+
+.TH make-memtest86+-boot-floppy 1
+
+.SH NAME
+make-memtest86+-boot-floppy \- create a memtest86+ boot-floppy using GRUB.
+
+.SH SYNOPSIS
+
+.B make-memtest86+-boot-floppy [ \-\-memtest
+.I <path to memtest86+-image>
+.B ] [ \-\-floppyimage
+.I <path to floppyimage/device>
+.B ]
+
+.SH DESCRIPTION
+.B make-memtest86+-boot-floppy
+can create a memtest86+ boot floppy using GRUB as the bootloader.
+
+.SH OPTIONS
+
+.IP "\-\-memtest <path to the memtest-image>"
+Path to the memtest86+-image, default is /boot/memtest86+.bin.
+
+.IP "\-\-floppyimage <path to the floppyimage or device>"
+File or device where the boot-image should be written to, default is /dev/fd0.
+
+.IP "\-\-help"
+Display a short message about the options of the tool.
+
+.SH AUTHOR
+This man-page has been written by Thomas Schmidt <thomas@thsnet.de>
+.PP
+Permission is granted to copy, distribute and/or modify this document under
+the terms of the GNU General Public License, Version 2 any
+later version published by the Free Software Foundation.
+.PP
+On Debian systems, the complete text of the GNU General Public
+License can be found in /usr/share/common\-licenses/GPL.
diff --git a/sys-apps/memtest86+/memtest86+-2.11.ebuild b/sys-apps/memtest86+/memtest86+-2.11.ebuild
index 4c80150c8c48..76eed82aca8a 100644
--- a/sys-apps/memtest86+/memtest86+-2.11.ebuild
+++ b/sys-apps/memtest86+/memtest86+-2.11.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/memtest86+/memtest86+-2.11.ebuild,v 1.3 2009/03/22 08:40:40 spock Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/memtest86+/memtest86+-2.11.ebuild,v 1.4 2009/03/26 08:42:03 spock Exp $
inherit mount-boot eutils
@@ -11,11 +11,11 @@ SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
-IUSE="serial"
+IUSE="floppy serial"
RESTRICT="test"
-DEPEND=""
-RDEPEND=""
+RDEPEND="floppy? ( >=sys-boot/grub-0.95 sys-fs/mtools )"
+DEPEND="${RDEPEND}"
src_unpack() {
unpack ${A}
@@ -37,6 +37,11 @@ src_install() {
insinto /boot/memtest86plus
doins memtest.bin || die
dodoc README README.build-process
+
+ if use floppy ; then
+ dobin "${FILESDIR}"/make-memtest86+-boot-floppy
+ doman "${FILESDIR}"/make-memtest86+-boot-floppy.1
+ fi
}
pkg_postinst() {
diff --git a/sys-apps/memtest86+/metadata.xml b/sys-apps/memtest86+/metadata.xml
index 6a2eeff7d216..7af41c5371aa 100644
--- a/sys-apps/memtest86+/metadata.xml
+++ b/sys-apps/memtest86+/metadata.xml
@@ -4,9 +4,10 @@
<herd>base-system</herd>
<maintainer>
<email>spock@gentoo.org</email>
- <name>Michal Januszewski</name>
+ <name>Michał Januszewski</name>
</maintainer>
<use>
<flag name='serial'>Compile with serial console support</flag>
+ <flag name='floppy'>Install a script to create floppy disks containing memtest86+ binaries.</flag>
</use>
</pkgmetadata>