diff --git a/.gitignore b/.gitignore index 3944c8f..70d2047 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ memtest86+-4.10.tar.gz /memtest86+-4.20.tar.gz /memtest86+-5.01.tar.gz +/memtest86+-5.31b.tar.gz diff --git a/memtest86+-5.01-compile-fix.patch b/memtest86+-5.01-compile-fix.patch deleted file mode 100644 index f178259..0000000 --- a/memtest86+-5.01-compile-fix.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- memtest86+-5.01/io.h~ 2013-08-10 02:01:58.000000000 +0000 -+++ memtest86+-5.01/io.h 2014-01-08 01:29:12.404465515 +0000 -@@ -31,7 +31,7 @@ - */ - - #define __OUT1(s,x) \ --extern inline void __out##s(unsigned x value, unsigned short port) { -+static inline void __out##s(unsigned x value, unsigned short port) { - - #define __OUT2(s,s1,s2) \ - __asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1" -@@ -43,7 +43,7 @@ - __OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; } - - #define __IN1(s) \ --extern inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v; -+static inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v; - - #define __IN2(s,s1,s2) \ - __asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0" diff --git a/memtest86+-5.01-crash-fix.patch b/memtest86+-5.01-crash-fix.patch deleted file mode 100644 index de7c86b..0000000 --- a/memtest86+-5.01-crash-fix.patch +++ /dev/null @@ -1,99 +0,0 @@ -diff --git a/controller.c b/controller.c -index f4f7371..183e9c3 100644 ---- a/controller.c -+++ b/controller.c -@@ -2,6 +2,8 @@ - * MemTest86+ V5 Specific code (GPL V2.0) - * By Samuel DEMEULEMEESTER, sdemeule@memtest.org - * http://www.canardpc.com - http://www.memtest.org -+ * -+ * Edited by David McInnis Oct 4, 2014 - */ - - //#include "defs.h" -@@ -292,7 +294,7 @@ static void setup_nhm(void) - - /* First, locate the PCI bus where the MCH is located */ - -- for(i = 0; i < sizeof(possible_nhm_bus); i++) { -+ for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) { - pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid); - pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did); - vid &= 0xFFFF; -@@ -327,7 +329,7 @@ static void setup_nhm32(void) - ctrl.mode = ECC_NONE; - - /* First, locate the PCI bus where the MCH is located */ -- for(i = 0; i < sizeof(possible_nhm_bus); i++) { -+ for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) { - pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid); - pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did); - vid &= 0xFFFF; -@@ -1424,7 +1426,7 @@ static void poll_fsb_amd64(void) { - unsigned long dramchr; - float clockratio; - double dramclock; -- unsigned int dummy[3]; -+ unsigned int dummy[4]; - int ram_type; - - float coef = 10; -@@ -2851,13 +2853,13 @@ static void poll_timings_nf4ie(void) { - - static void poll_timings_i875(void) { - -- ulong dev6, dev62; -+ ulong dev6; - ulong temp; - float cas; - int rcd, rp, ras, chan; - long *ptr, *ptr2; - -- pci_conf_read( 0, 6, 0, 0x40, 4, &dev62); -+ pci_conf_read( 0, 6, 0, 0x40, 4, &dev6); - ptr2=(long*)(dev6+0x68); - - /* Read the MMR Base Address & Define the pointer */ -diff --git a/init.c b/init.c -index 754b8d7..5bd8b4f 100644 ---- a/init.c -+++ b/init.c -@@ -7,6 +7,8 @@ - * - * Released under version 2 of the Gnu Public License. - * By Chris Brady -+ * -+ * Edited by David McInnis October 4, 2014 - */ - - -@@ -914,7 +916,6 @@ void cpu_type(void) - default: - cprint(0, COL_MID, "Unknown Intel"); - break; -- break; - } - - } -diff --git a/main.c b/main.c -index 0bc7ca0..613f811 100644 ---- a/main.c -+++ b/main.c -@@ -422,7 +422,7 @@ void test_start(void) - //initialise_cpus(); - btrace(my_cpu_num, __LINE__, "BeforeInit", 1, 0, 0); - /* Draw the screen and get system information */ -- init(); -+ init(); - - /* Set defaults and initialize variables */ - set_defaults(); -@@ -737,7 +737,7 @@ void test_start(void) - /* Do the same test for each CPU */ - if (++cpu_sel >= act_cpus) - { -- cpu_sel = 0; -+ cpu_sel = 0; - next_test(); - } else { - continue; diff --git a/memtest86+-5.01-fgnu89-inline.patch b/memtest86+-5.01-fgnu89-inline.patch deleted file mode 100644 index 1080835..0000000 --- a/memtest86+-5.01-fgnu89-inline.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Makefile b/Makefile -index 7906d50..03eb50b 100644 ---- a/Makefile -+++ b/Makefile -@@ -13,7 +13,7 @@ AS=as -32 - CC=gcc - - CFLAGS= -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \ -- -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector -+ -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector -fgnu89-inline - - OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \ - config.o cpuid.o linuxbios.o pci.o memsize.o spd.o error.o dmi.o controller.o \ diff --git a/memtest86+-5.01-no-optimization.patch b/memtest86+-5.01-no-optimization.patch deleted file mode 100644 index 76815a9..0000000 --- a/memtest86+-5.01-no-optimization.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- memtest86+-5.01/Makefile~ 2014-01-08 01:30:11.355900076 +0000 -+++ memtest86+-5.01/Makefile 2014-01-08 01:31:19.387555469 +0000 -@@ -12,7 +12,7 @@ - AS=as -32 - CC=gcc - --CFLAGS= -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \ -+CFLAGS= -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \ - -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector - - OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \ diff --git a/memtest86+-5.01-no-scp.patch b/memtest86+-5.01-no-scp.patch deleted file mode 100644 index d420b85..0000000 --- a/memtest86+-5.01-no-scp.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/Makefile b/Makefile -index bd55c1c..9909f07 100644 ---- a/Makefile -+++ b/Makefile -@@ -21,7 +21,6 @@ OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \ - - - all: clean memtest.bin memtest -- scp memtest.bin root@192.168.0.12:/srv/tftp/mt86plus - - # Link it statically once so I know I don't have undefined - # symbols and then link it dynamically so I have full diff --git a/memtest86+-5.01-serial-console-fix.patch b/memtest86+-5.01-serial-console-fix.patch deleted file mode 100644 index 2cacd12..0000000 --- a/memtest86+-5.01-serial-console-fix.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/lib.c b/lib.c -index a2b829d..6a7e210 100644 ---- a/lib.c -+++ b/lib.c -@@ -1141,7 +1141,7 @@ void serial_console_setup(char *param) - - end++; - -- if (*end != '\0' || *end != ' ') -+ if (*end != '\0' && *end != ' ') - return; /* garbage at the end */ - - serial_bits = bits; diff --git a/memtest86+-5.31b-serial-console-fix.patch b/memtest86+-5.31b-serial-console-fix.patch new file mode 100644 index 0000000..19e0623 --- /dev/null +++ b/memtest86+-5.31b-serial-console-fix.patch @@ -0,0 +1,13 @@ +diff --git a/lib.c b/lib.c +index a2b829d..6a7e210 100644 +--- a/lib.c ++++ b/lib.c +@@ -1141,7 +1141,7 @@ void serial_console_setup(char *param) + + end++; + +- if (*end != '\0' || *end != ' ') ++ if (*end != '\0' && *end != ' ') + return; /* garbage at the end */ + + serial_bits = bits; diff --git a/memtest86+.spec b/memtest86+.spec index cb83aad..ccb4b05 100644 --- a/memtest86+.spec +++ b/memtest86+.spec @@ -7,28 +7,22 @@ %global readme_suffix %{?rhel:redhat}%{!?rhel:fedora} +%global prerel_short b +%global prerel_long beta + Name: memtest86+ -Version: 5.01 -Release: 28%{?dist} +Version: 5.31 +Release: 0.1.%{?prerel_long}%{?dist} License: GPLv2 Summary: Stand-alone memory tester for x86 and x86-64 computers -Source0: http://www.memtest.org/download/%{version}/%{name}-%{version}.tar.gz +Source0: http://www.memtest.org/download/%{version}%{?prerel_short}/%{name}-%{version}%{?prerel_short}.tar.gz Source1: memtest-setup Source2: 20_memtest86+ Source3: memtest-setup.8 Source4: memtest86+.conf Source5: README -# reported upstream -Patch0: memtest86+-5.01-no-scp.patch -# patches to get memtest86+ working with gcc-4.7.2 or later + PCI scan fix -# these patches were taken from Mageia -# upstream report containing link to the patches: -# http://forum.canardpc.com/threads/83443-Memtest86-V5.01-crashes-with-gcc-4.7.2-or-later -Patch1: memtest86+-5.01-no-optimization.patch -Patch2: memtest86+-5.01-compile-fix.patch -Patch3: memtest86+-5.01-crash-fix.patch -Patch4: memtest86+-5.01-fgnu89-inline.patch -Patch5: memtest86+-5.01-serial-console-fix.patch +# sent upstream +Patch0: memtest86+-5.31b-serial-console-fix.patch URL: http://www.memtest.org # require glibc-devel.i386 via this file: BuildRequires: %{_includedir}/gnu/stubs-32.h @@ -52,14 +46,10 @@ The script '%{_sbindir}/memtest-setup' can be run (as root) to add the %{name} entry to your GRUB boot menu. %prep -%setup -q +%setup -q -n %{name}-%{version}%{?prerel_short} + cp -p %{SOURCE5} README.%{readme_suffix} -%patch0 -p1 -b .no-scp -%patch1 -p1 -b .no-optimization -%patch2 -p1 -b .compile-fix -%patch3 -p1 -b .crash-fix -%patch4 -p1 -b .fgnu89-inline -%patch5 -p1 -b .serial-console-fix +%patch0 -p1 -b .serial-console-fix #sed -i -e's,0x10000,0x100000,' memtest.lds %ifarch x86_64 @@ -82,7 +72,7 @@ install -m644 memtest %{buildroot}/boot/elf-%{name}-%{version} install -m644 memtest.bin %{buildroot}/boot/%{name}-%{version} install -m755 %{SOURCE1} %{buildroot}%{_sbindir}/memtest-setup -sed -i 's/\r//' $RPM_BUILD_DIR/%{name}-%{version}/README +sed -i 's/\r//' $RPM_BUILD_DIR/%{name}-%{version}%{?prerel_short}/README mkdir -p %{buildroot}%{_sysconfdir}/grub.d touch %{buildroot}%{_sysconfdir}/grub.d/20_memtest86+ @@ -113,6 +103,12 @@ install -Dpm 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/memtest86+.conf %{_mandir}/man8/*.8.gz %changelog +* Wed May 13 2020 Jaroslav Škarvada - 5.31-0.1.beta +- New version + Resolves: rhbz#1758783 +- Dropped no-scp, no-optimization, compile-fix, crash-fix patches (all upstreamed) +- Dropped fgnu89-inline patch (probably not needed) + * Wed Jan 29 2020 Fedora Release Engineering - 5.01-28 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild @@ -121,7 +117,7 @@ install -Dpm 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/memtest86+.conf Resolves: rhbz#1736106 * Thu Jul 25 2019 Fedora Release Engineering - 5.01-26 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Fri Apr 5 2019 Jaroslav Škarvada - 5.01-25 - Fixed serial console diff --git a/sources b/sources index d1d3e99..1a63f80 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -43c5832baa919e1206e251e735cdee2d memtest86+-5.01.tar.gz +SHA512 (memtest86+-5.31b.tar.gz) = ad5891fd0c430ce7a5d0cde2d10dee20b66ad8060d47c3e70e038461d9cde3a78dfc13442b5b09da7c662741945a670353c72dbc08fd5ee8bae82256001a9541