wok-next rev 17225

memtest: add some patches
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Oct 15 16:15:55 2014 +0200 (2014-10-15)
parents b5bb376d98ad
children 95d1f6282a65
files memtest-serial/receipt memtest/receipt memtest/stuff/memtest86+-5.01-O0.patch memtest/stuff/memtest86+-5.01-array-size.patch memtest/stuff/memtest86+-5.01-io.patch
line diff
     1.1 --- a/memtest-serial/receipt	Wed Oct 15 15:56:22 2014 +0200
     1.2 +++ b/memtest-serial/receipt	Wed Oct 15 16:15:55 2014 +0200
     1.3 @@ -5,7 +5,7 @@
     1.4  CATEGORY="base-system"
     1.5  SHORT_DESC="Memory failures detection tool using serial port."
     1.6  MAINTAINER="pascal.bellard@slitaz.org"
     1.7 -LICENSE="GPL"
     1.8 +LICENSE="GPL2"
     1.9  WEB_SITE="http://www.memtest.org/"
    1.10  WANTED="memtest"
    1.11  
     2.1 --- a/memtest/receipt	Wed Oct 15 15:56:22 2014 +0200
     2.2 +++ b/memtest/receipt	Wed Oct 15 16:15:55 2014 +0200
     2.3 @@ -5,7 +5,7 @@
     2.4  CATEGORY="base-system"
     2.5  SHORT_DESC="Memory failures detection tool."
     2.6  MAINTAINER="pascal.bellard@slitaz.org"
     2.7 -LICENSE="GPL"
     2.8 +LICENSE="GPL2"
     2.9  SOURCE="memtest86+"
    2.10  TARBALL="$SOURCE-$VERSION.tar.gz"
    2.11  WEB_SITE="http://www.memtest.org/"
    2.12 @@ -18,6 +18,9 @@
    2.13  {
    2.14  	cd $src
    2.15  	sed -i '/scp memtest.bin/d' Makefile
    2.16 +	for i in array-size io O0; do
    2.17 +		patch -p1 < $stuff/$SOURCE-$VERSION-$i.patch
    2.18 +	done
    2.19  	make
    2.20  	cp $stuff/*.S $stuff/pack .
    2.21  	for i in bootloader unpack ; do
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/memtest/stuff/memtest86+-5.01-O0.patch	Wed Oct 15 16:15:55 2014 +0200
     3.3 @@ -0,0 +1,11 @@
     3.4 +--- memtest86+-5.01/Makefile~	2014-01-08 01:30:11.355900076 +0000
     3.5 ++++ memtest86+-5.01/Makefile	2014-01-08 01:31:19.387555469 +0000
     3.6 +@@ -12,7 +12,7 @@
     3.7 + AS=as -32
     3.8 + CC=gcc
     3.9 + 
    3.10 +-CFLAGS= -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \
    3.11 ++CFLAGS= -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
    3.12 + 	-ffreestanding -fPIC $(SMP_FL) -fno-stack-protector 
    3.13 + 	
    3.14 + OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/memtest/stuff/memtest86+-5.01-array-size.patch	Wed Oct 15 16:15:55 2014 +0200
     4.3 @@ -0,0 +1,20 @@
     4.4 +--- memtest86+-5.01/controller.c~	2013-08-10 02:01:58.000000000 +0000
     4.5 ++++ memtest86+-5.01/controller.c	2013-12-12 20:58:12.873555378 +0000
     4.6 +@@ -292,7 +292,7 @@
     4.7 + 
     4.8 + 	/* First, locate the PCI bus where the MCH is located */
     4.9 + 
    4.10 +-	for(i = 0; i < sizeof(possible_nhm_bus); i++) {
    4.11 ++	for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) {
    4.12 + 		pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid);
    4.13 + 		pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did);
    4.14 + 		vid &= 0xFFFF;
    4.15 +@@ -327,7 +327,7 @@
    4.16 + 	ctrl.mode = ECC_NONE;
    4.17 + 
    4.18 + 	/* First, locate the PCI bus where the MCH is located */
    4.19 +-	for(i = 0; i < sizeof(possible_nhm_bus); i++) {
    4.20 ++	for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) {
    4.21 + 		pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid);
    4.22 + 		pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did);
    4.23 + 		vid &= 0xFFFF;
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/memtest/stuff/memtest86+-5.01-io.patch	Wed Oct 15 16:15:55 2014 +0200
     5.3 @@ -0,0 +1,20 @@
     5.4 +--- memtest86+-5.01/io.h~	2013-08-10 02:01:58.000000000 +0000
     5.5 ++++ memtest86+-5.01/io.h	2014-01-08 01:29:12.404465515 +0000
     5.6 +@@ -31,7 +31,7 @@
     5.7 +  */
     5.8 + 
     5.9 + #define __OUT1(s,x) \
    5.10 +-extern inline void __out##s(unsigned x value, unsigned short port) {
    5.11 ++static inline void __out##s(unsigned x value, unsigned short port) {
    5.12 + 
    5.13 + #define __OUT2(s,s1,s2) \
    5.14 + __asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1"
    5.15 +@@ -43,7 +43,7 @@
    5.16 + __OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; }
    5.17 + 
    5.18 + #define __IN1(s) \
    5.19 +-extern inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
    5.20 ++static inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
    5.21 + 
    5.22 + #define __IN2(s,s1,s2) \
    5.23 + __asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0"