summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2014-08-31 03:06:02 +0000
committerMike Gilbert <floppym@gentoo.org>2014-08-31 03:06:02 +0000
commitc6b0f36ae10239fc834063614d22dafe9b4363a8 (patch)
treebdc41543d58394764333df0129d150881ad6095e /sys-apps
parentAutomated update. (diff)
downloadgentoo-2-c6b0f36ae10239fc834063614d22dafe9b4363a8.tar.gz
gentoo-2-c6b0f36ae10239fc834063614d22dafe9b4363a8.tar.bz2
gentoo-2-c6b0f36ae10239fc834063614d22dafe9b4363a8.zip
Add a more robust grub config generator, bug 456308.
(Portage version: 2.2.12/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/memtest86/ChangeLog10
-rw-r--r--sys-apps/memtest86/files/39_memtest8618
-rw-r--r--sys-apps/memtest86/memtest86-4.3.3-r2.ebuild65
3 files changed, 91 insertions, 2 deletions
diff --git a/sys-apps/memtest86/ChangeLog b/sys-apps/memtest86/ChangeLog
index c54036cff1a0..ab7722a58d82 100644
--- a/sys-apps/memtest86/ChangeLog
+++ b/sys-apps/memtest86/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-apps/memtest86
-# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/memtest86/ChangeLog,v 1.44 2013/10/18 19:13:43 blueness Exp $
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/memtest86/ChangeLog,v 1.45 2014/08/31 03:06:02 floppym Exp $
+
+*memtest86-4.3.3-r2 (31 Aug 2014)
+
+ 31 Aug 2014; Mike Gilbert <floppym@gentoo.org> +files/39_memtest86,
+ +memtest86-4.3.3-r2.ebuild:
+ Add a more robust grub config generator, bug 456308.
18 Oct 2013; Anthony G. Basile <blueness@gentoo.org>
files/memtest86-4.3.3-build-nopie.patch:
diff --git a/sys-apps/memtest86/files/39_memtest86 b/sys-apps/memtest86/files/39_memtest86
new file mode 100644
index 000000000000..a736bce6a316
--- /dev/null
+++ b/sys-apps/memtest86/files/39_memtest86
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+. /usr/share/grub/grub-mkconfig_lib
+
+memtest=/boot/memtest86/memtest
+
+if [ -f "${memtest}" ]; then
+ device="$("${grub_probe}" --target=device "${memtest}")"
+ path="$(make_system_path_relative_to_its_root "${memtest}")"
+ cat <<EOF
+menuentry "MemTest86" {
+EOF
+ prepare_grub_to_access_device "${device}" | grub_add_tab
+ cat <<EOF
+ linux16 "${path}"
+}
+EOF
+fi
diff --git a/sys-apps/memtest86/memtest86-4.3.3-r2.ebuild b/sys-apps/memtest86/memtest86-4.3.3-r2.ebuild
new file mode 100644
index 000000000000..4e83bcd1143f
--- /dev/null
+++ b/sys-apps/memtest86/memtest86-4.3.3-r2.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/memtest86/memtest86-4.3.3-r2.ebuild,v 1.1 2014/08/31 03:06:02 floppym Exp $
+
+EAPI=5
+
+inherit mount-boot eutils toolchain-funcs
+
+DESCRIPTION="A stand alone memory test for x86 computers"
+HOMEPAGE="http://www.memtest86.com/"
+SRC_URI="http://www.memtest86.com/downloads/${P}-src.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="serial"
+S="${WORKDIR}/src"
+
+BOOTDIR=/boot/memtest86
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-build-nopie.patch #66630 + #206726
+
+ sed -i -e 's,0x10000,0x100000,' memtest.lds || die
+
+ if use serial ; then
+ sed -i \
+ -e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \
+ config.h \
+ || die "sed failed"
+ fi
+
+ tc-export AS CC LD
+}
+
+src_test() { :; }
+
+src_install() {
+ insinto ${BOOTDIR}
+ newins memtest.bin memtest
+ dosym memtest ${BOOTDIR}/memtest.bin
+
+ exeinto /etc/grub.d
+ doexe "${FILESDIR}"/39_memtest86
+
+ dodoc README README.build-process README.background
+}
+
+pkg_postinst() {
+ mount-boot_pkg_postinst
+ elog
+ elog "memtest has been installed in ${BOOTDIR}/"
+ elog "You may wish to update your bootloader configs"
+ elog "by adding these lines:"
+ elog " - For grub2 just run grub-mkconfig, a configuration file is installed"
+ elog " as /etc/grub/39_${PN}"
+ elog " - For grub legacy: (replace '?' with correct numbers for your boot partition)"
+ elog " > title=${PN}"
+ elog " > root (hd?,?)"
+ elog " > kernel ${BOOTDIR}/memtest"
+ elog " - For lilo:"
+ elog " > image = ${BOOTDIR}/memtest"
+ elog " > label = ${PN}"
+ elog
+}