added grub.d file and run update-grub

switch to prebuilt binary [release 5.01-3mamba;Tue Feb 07 2017]
This commit is contained in:
Silvan Calarco 2024-01-06 07:04:58 +01:00
parent ece662ac60
commit f9d6b9416f
3 changed files with 59 additions and 8 deletions

BIN
memtest86+-5.01.bin.gz Normal file

Binary file not shown.

36
memtest86+-grub Normal file
View File

@ -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

View File

@ -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 <silvan.calarco@mambasoft.it>
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 <silvan.calarco@mambasoft.it> 5.01-3mamba
- added grub.d file and run update-grub
- switch to prebuilt binary
* Wed Apr 16 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 5.01-2mamba
- force build with ld.bfd