summaryrefslogtreecommitdiff
path: root/libre/memtest86+
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-08-06 04:31:04 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-08-06 04:31:45 -0300
commitc7f2ecb51b0ffa77b083ae7843939c7a8de371a8 (patch)
treead1fb3b90a20d3ba257762778b405750e8d5f0d3 /libre/memtest86+
parent0c4c197db99db4d9f7da436d638faf1bf961c1a1 (diff)
downloadabslibre-c7f2ecb51b0ffa77b083ae7843939c7a8de371a8.tar.gz
abslibre-c7f2ecb51b0ffa77b083ae7843939c7a8de371a8.tar.bz2
abslibre-c7f2ecb51b0ffa77b083ae7843939c7a8de371a8.zip
memtest86+-5.01-2.parabola1: move grub configuration from grub to memtest86+ package
Diffstat (limited to 'libre/memtest86+')
-rw-r--r--libre/memtest86+/60_memtest86+32
-rw-r--r--libre/memtest86+/PKGBUILD25
2 files changed, 45 insertions, 12 deletions
diff --git a/libre/memtest86+/60_memtest86+ b/libre/memtest86+/60_memtest86+
new file mode 100644
index 000000000..086f0cc84
--- /dev/null
+++ b/libre/memtest86+/60_memtest86+
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+########################################################
+# This script generates a memtest86+ entry on grub.cfg #
+# if memtest is installed on the system. #
+########################################################
+
+prefix="/usr"
+exec_prefix="${prefix}"
+
+datarootdir="/usr/share"
+datadir="${datarootdir}"
+
+. "${datadir}/grub/grub-mkconfig_lib"
+
+MEMTEST86_IMAGE="/boot/memtest86+/memtest.bin"
+CLASS="--class memtest86 --class gnu --class tool"
+
+if [ -e "${MEMTEST86_IMAGE}" ] && is_path_readable_by_grub "${MEMTEST86_IMAGE}" ; then
+ ## image exists, create menu entry
+ echo "Found memtest86+ image: ${MEMTEST86_IMAGE}" >&2
+ _GRUB_MEMTEST_HINTS_STRING="$(${grub_probe} --target=hints_string ${MEMTEST86_IMAGE})"
+ _GRUB_MEMTEST_FS_UUID="$(${grub_probe} --target=fs_uuid ${MEMTEST86_IMAGE})"
+ _GRUB_MEMTEST_REL_PATH="$(make_system_path_relative_to_its_root ${MEMTEST86_IMAGE})"
+ cat << EOF
+if [ "\${grub_platform}" == "pc" ]; then
+ menuentry "Memory Tester (memtest86+)" ${CLASS} {
+ search --fs-uuid --no-floppy --set=root ${_GRUB_MEMTEST_HINTS_STRING} ${_GRUB_MEMTEST_FS_UUID}
+ linux16 ${_GRUB_MEMTEST_REL_PATH} ${GRUB_CMDLINE_MEMTEST86}
+ }
+fi
+EOF
+fi
diff --git a/libre/memtest86+/PKGBUILD b/libre/memtest86+/PKGBUILD
index d2f7140df..76c3bb3b7 100644
--- a/libre/memtest86+/PKGBUILD
+++ b/libre/memtest86+/PKGBUILD
@@ -1,32 +1,32 @@
-# $Id: PKGBUILD 195965 2013-10-06 18:53:50Z eric $
+# $Id: PKGBUILD 272944 2016-08-03 07:41:05Z eworm $
# Maintainer (Arch): Eric Bélanger <eric@archlinux.org>
# Maintainer: André Silva <emulatorman@parabola.nu>
# Contributor: Márcio Silva <coadde@parabola.nu>
pkgname=memtest86+
pkgver=5.01
-pkgrel=1.parabola1
+pkgrel=2.parabola1
pkgdesc="An advanced memory diagnostic tool"
arch=('any')
url="http://www.memtest.org"
license=('GPL2')
-if [[ $CARCH == x86_64 ]]; then
- makedepends+=('gcc-multilib' 'lib32-glibc')
-fi
+makedepends_x86_64=('gcc-multilib' 'lib32-glibc')
source=("http://www.memtest.org/download/${pkgver}/${pkgname}-${pkgver}.tar.gz"
+ '60_memtest86+'
'multiboot.patch'
"${pkgname}-5.01-O0.patch"
"${pkgname}-5.01-array-size.patch")
sha1sums=('eb4b6d70114db3c9ed320785da44c0ba8349c10c'
+ '2aa2deeb7d7dc56f389aa1487b7a57b0d44ce559'
'53d3c0106644e6e085b8576e48e9981e5ccc3145'
'83e20932625bb38137b01c0cbe1b8528629e0a76'
'04654951868e73b53a67ce3288f2bd1843b40870')
prepare() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- patch -Np1 -i "${srcdir}/multiboot.patch"
- patch -Np1 -i "${srcdir}/${pkgname}-5.01-O0.patch"
- patch -Np1 -i "${srcdir}/${pkgname}-5.01-array-size.patch"
+ cd ${pkgname}-${pkgver}
+ patch -p1 -i ${srcdir}/multiboot.patch
+ patch -p1 -i ${srcdir}/${pkgname}-5.01-O0.patch
+ patch -p1 -i ${srcdir}/${pkgname}-5.01-array-size.patch
sed -i 's|CC[=]gcc|CC=gcc -I/usr/include|
s|[-]fno[-]stack[-]protector|-fno-stack-protector -fno-aggressive-loop-optimizations|
\|scp memtest[.]bin|d
@@ -34,11 +34,12 @@ prepare() {
}
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd ${pkgname}-${pkgver}
make
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- install -D -m644 "${pkgname%86+}.bin" "${pkgdir}/boot/memtest86+/${pkgname%86+}.bin"
+ cd ${pkgname}-${pkgver}
+ install -D -m644 ${pkgname%86+}.bin ${pkgdir}/boot/memtest86+/${pkgname%86+}.bin
+ install -D -m755 ${srcdir}/60_memtest86+ ${pkgdir}/etc/grub.d/60_memtest86+
}