diff --git a/memtest86+-5.01.bin.gz b/memtest86+-5.01.bin.gz new file mode 100644 index 0000000..ed05cde Binary files /dev/null and b/memtest86+-5.01.bin.gz differ diff --git a/memtest86+-grub b/memtest86+-grub new file mode 100644 index 0000000..ae86d45 --- /dev/null +++ b/memtest86+-grub @@ -0,0 +1,36 @@ +#!/bin/sh +set -e + +prefix="/usr" +exec_prefix="/usr" +datarootdir="${prefix}/share" + +. "/usr/share/grub/grub-mkconfig_lib" + +LX=linux16 + +# We can't cope with loop-mounted devices here. +case ${GRUB_DEVICE_BOOT} in + /dev/loop/*|/dev/loop[0-9]) exit 0 ;; +esac + +prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")" + +if test -e /boot/memtest86+.bin ; then + MEMTESTPATH=$( make_system_path_relative_to_its_root "/boot/memtest86+.bin" ) + echo "Found memtest86+ image: $MEMTESTPATH" >&2 + cat << EOF +menuentry "Memory test (memtest86+)" { +EOF + printf '%s\n' "${prepare_boot_cache}" + cat << EOF + $LX $MEMTESTPATH +} +menuentry "Memory test (memtest86+, serial console 115200)" { +EOF + printf '%s\n' "${prepare_boot_cache}" + cat << EOF + $LX $MEMTESTPATH console=ttyS0,115200n8 +} +EOF +fi diff --git a/memtest86+.spec b/memtest86+.spec index a7a87fb..1f18a98 100644 --- a/memtest86+.spec +++ b/memtest86+.spec @@ -1,13 +1,15 @@ Name: memtest86+ Version: 5.01 -Release: 2mamba +Release: 3mamba Summary: Thorough, stand alone memory test for x86 architecture computers Group: System/Hardware Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://www.memtest.org/ -Source: http://www.memtest.org/download/%{version}/%{name}-%{version}.tar.gz +Source: http://www.memtest.org/download/%{version}/memtest86+-%{version}.bin.gz +#Source: http://www.memtest.org/download/%{version}/%{name}-%{version}.tar.gz +Source1: memtest86+-grub Patch0: memtest86+-5.01-Makefile.patch License: GPL ## AUTOBUILDREQ-BEGIN @@ -19,25 +21,38 @@ Based on the well-known original memtest86 written by Chris Brady, memtest86+ is Our goal is to provide an up-to-date and completly reliable version of this software tool aimed at memory failures detection. %prep -%setup -q -%patch0 -p1 +%setup -q -c -T +#% patch0 -p1 %build -%make LD=ld.bfd +cp %{SOURCE0} . +gunzip memtest86+-%{version}.bin.gz +#% make LD=ld.bfd %install [ "%{buildroot}" != / ] && rm -rf %{buildroot} -install -D memtest.bin %{buildroot}/boot/memtest.bin +install -D memtest86+-%{version}.bin %{buildroot}/boot/memtest86+.bin +install -D %{SOURCE1} %{buildroot}%{_sysconfdir}/grub.d/20_memtest86+ %clean [ "%{buildroot}" != / ] && rm -rf %{buildroot} +%posttrans +if [ $1 -ge 0 ]; then + update-grub +fi +: + %files %defattr(-,root,root) -%doc README README.build-process -/boot/memtest.bin +%{_sysconfdir}/grub.d/20_memtest86+ +/boot/memtest86+.bin %changelog +* Tue Feb 07 2017 Silvan Calarco 5.01-3mamba +- added grub.d file and run update-grub +- switch to prebuilt binary + * Wed Apr 16 2014 Silvan Calarco 5.01-2mamba - force build with ld.bfd