summaryrefslogtreecommitdiffstats
path: root/patches/memtest86+-4.20
diff options
context:
space:
mode:
authorAlexander Stein <alexander.stein@systec-electronic.com>2011-06-20 09:15:02 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2011-06-20 20:04:03 +0200
commit5e954fbef00fedd66fdc9a0c98ef290265bf32a9 (patch)
treefa5a345234c99a98009a767f767648cb061726f6 /patches/memtest86+-4.20
parent5af49fbde5c186cf82e6b340cc3fc2f098cf8f23 (diff)
downloadptxdist-5e954fbef00fedd66fdc9a0c98ef290265bf32a9.tar.gz
ptxdist-5e954fbef00fedd66fdc9a0c98ef290265bf32a9.tar.xz
memtest86+: added new package
In ptxdist it is called MEMTEST86P because + is not valid. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> [mol: build only for x86] Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches/memtest86+-4.20')
-rw-r--r--patches/memtest86+-4.20/memtest86+-4.10-hardcoded_cc.patch39
-rwxr-xr-xpatches/memtest86+-4.20/serial_base.patch26
-rw-r--r--patches/memtest86+-4.20/series2
3 files changed, 67 insertions, 0 deletions
diff --git a/patches/memtest86+-4.20/memtest86+-4.10-hardcoded_cc.patch b/patches/memtest86+-4.20/memtest86+-4.10-hardcoded_cc.patch
new file mode 100644
index 000000000..4841b1d15
--- /dev/null
+++ b/patches/memtest86+-4.20/memtest86+-4.10-hardcoded_cc.patch
@@ -0,0 +1,39 @@
+Subject: Remove hardcoded cc variable
+
+This patch is from Gentoo.
+URL: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-apps/memtest86+/files/memtest86+-4.10-hardcoded_cc.patch?revision=1.1
+
+This patch cleans up the Makefile to allow overwrite CC and AS variable
+
+Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
+
+diff -Naurp memtest86+-4.10-orig/Makefile memtest86+-4.10/Makefile
+--- memtest86+-4.10-orig/Makefile 2010-06-24 00:27:22.864634431 +0200
++++ memtest86+-4.10/Makefile 2010-06-24 00:28:42.402478590 +0200
+@@ -8,10 +8,9 @@
+ #
+ FDISK=/dev/fd0
+
+-AS=as -32
+-CC=gcc
+-
+-CFLAGS= -Wall -march=i486 -m32 -O2 -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -fno-stack-protector
++CFLAGS=-Wall -march=i486 -m32 -O2 -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -fno-stack-protector
++CPPFLAGS=-m32
++ASFLAGS=-32
+
+ OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \
+ config.o linuxbios.o memsize.o pci.o controller.o random.o spd.o \
+@@ -47,10 +46,10 @@ memtest.bin: memtest_shared.bin bootsect
+ memtest_shared.bin -o memtest.bin
+
+ reloc.o: reloc.c
+- $(CC) -c $(CFLAGS) -fno-strict-aliasing reloc.c
++ $(CC) -c $(CFLAGS) -fno-strict-aliasing -fno-stack-protector reloc.c
+
+ test.o: test.c
+- $(CC) -c -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding test.c
++ $(CC) -c -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin -ffreestanding -fno-stack-protector -fno-pie -nopie test.c
+
+ clean:
+ rm -f *.o *.s *.iso memtest.bin memtest memtest_shared memtest_shared.bin
diff --git a/patches/memtest86+-4.20/serial_base.patch b/patches/memtest86+-4.20/serial_base.patch
new file mode 100755
index 000000000..ea18382d4
--- /dev/null
+++ b/patches/memtest86+-4.20/serial_base.patch
@@ -0,0 +1,26 @@
+Subject: Use serial port addresses provided by BIOS
+
+Using this patch memtest86+ uses the serial port addresses provided by BIOS rather hardcoded defaults.
+
+Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
+
+--- memtest86+-4.20/lib.c 2011-01-23 19:11:04.000000000 +0100
++++ memtest86+-4.20/lib.c 2011-03-30 09:31:38.519674571 +0200
+@@ -24,7 +24,7 @@
+ #error Bad SERIAL_TTY. Only ttyS0 and ttyS1 are supported.
+ #endif
+ short serial_tty = SERIAL_TTY;
+-const short serial_base_ports[] = {0x3f8, 0x2f8, 0x3e8, 0x2e8};
++unsigned short serial_base_ports[] = {0x3f8, 0x2f8, 0x3e8, 0x2e8};
+
+ #if ((115200%SERIAL_BAUD_RATE) != 0)
+ #error Bad default baud rate
+@@ -1112,6 +1112,8 @@
+ serial_baud_rate = (int) baud_rate;
+ save_tty:
+ serial_tty = (short) tty;
++ /* fetch I/O port address from BIOS data area */
++ serial_base_ports[serial_tty] = ((const unsigned short *) 0x0400)[serial_tty];
+ serial_cons = 1;
+ }
+
diff --git a/patches/memtest86+-4.20/series b/patches/memtest86+-4.20/series
new file mode 100644
index 000000000..70c0db89c
--- /dev/null
+++ b/patches/memtest86+-4.20/series
@@ -0,0 +1,2 @@
+memtest86+-4.10-hardcoded_cc.patch
+serial_base.patch