wok-next rev 19618
memtest: update for GCC5
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Feb 06 18:15:00 2017 +0100 (2017-02-06) |
parents | 7c50dfc88e2a |
children | 5cf988b48dc6 |
files | memtest/receipt memtest/stuff/memtest86+-5.01-O0.patch memtest/stuff/memtest86+-5.01-array-size.patch memtest/stuff/memtest86+-5.01-io.patch memtest/stuff/memtest86+-5.01-setup.patch |
line diff
1.1 --- a/memtest/receipt Sat Feb 04 17:25:27 2017 +0200 1.2 +++ b/memtest/receipt Mon Feb 06 18:15:00 2017 +0100 1.3 @@ -18,10 +18,8 @@ 1.4 # Rules to configure and make the package. 1.5 compile_rules() 1.6 { 1.7 - sed -i '/scp memtest.bin/d' Makefile 1.8 - for i in array-size io setup ; do 1.9 - patch -p1 < $stuff/$SOURCE-$VERSION-$i.patch 1.10 - done 1.11 + sed -i -e '/scp memtest.bin/d' \ 1.12 + -e 's/no-stack-protector/& -fgnu89-inline/' Makefile 1.13 make 1.14 cp $stuff/*.S $stuff/pack . 1.15 for i in bootloader unpack ; do
2.1 --- a/memtest/stuff/memtest86+-5.01-O0.patch Sat Feb 04 17:25:27 2017 +0200 2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 2.3 @@ -1,11 +0,0 @@ 2.4 ---- memtest86+-5.01/Makefile~ 2014-01-08 01:30:11.355900076 +0000 2.5 -+++ memtest86+-5.01/Makefile 2014-01-08 01:31:19.387555469 +0000 2.6 -@@ -12,7 +12,7 @@ 2.7 - AS=as -32 2.8 - CC=gcc 2.9 - 2.10 --CFLAGS= -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \ 2.11 -+CFLAGS= -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \ 2.12 - -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector 2.13 - 2.14 - OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \
3.1 --- a/memtest/stuff/memtest86+-5.01-array-size.patch Sat Feb 04 17:25:27 2017 +0200 3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 3.3 @@ -1,20 +0,0 @@ 3.4 ---- memtest86+-5.01/controller.c~ 2013-08-10 02:01:58.000000000 +0000 3.5 -+++ memtest86+-5.01/controller.c 2013-12-12 20:58:12.873555378 +0000 3.6 -@@ -292,7 +292,7 @@ 3.7 - 3.8 - /* First, locate the PCI bus where the MCH is located */ 3.9 - 3.10 -- for(i = 0; i < sizeof(possible_nhm_bus); i++) { 3.11 -+ for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) { 3.12 - pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid); 3.13 - pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did); 3.14 - vid &= 0xFFFF; 3.15 -@@ -327,7 +327,7 @@ 3.16 - ctrl.mode = ECC_NONE; 3.17 - 3.18 - /* First, locate the PCI bus where the MCH is located */ 3.19 -- for(i = 0; i < sizeof(possible_nhm_bus); i++) { 3.20 -+ for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) { 3.21 - pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid); 3.22 - pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did); 3.23 - vid &= 0xFFFF;
4.1 --- a/memtest/stuff/memtest86+-5.01-io.patch Sat Feb 04 17:25:27 2017 +0200 4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 4.3 @@ -1,20 +0,0 @@ 4.4 ---- memtest86+-5.01/io.h~ 2013-08-10 02:01:58.000000000 +0000 4.5 -+++ memtest86+-5.01/io.h 2014-01-08 01:29:12.404465515 +0000 4.6 -@@ -31,7 +31,7 @@ 4.7 - */ 4.8 - 4.9 - #define __OUT1(s,x) \ 4.10 --extern inline void __out##s(unsigned x value, unsigned short port) { 4.11 -+static inline void __out##s(unsigned x value, unsigned short port) { 4.12 - 4.13 - #define __OUT2(s,s1,s2) \ 4.14 - __asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1" 4.15 -@@ -43,7 +43,7 @@ 4.16 - __OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; } 4.17 - 4.18 - #define __IN1(s) \ 4.19 --extern inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v; 4.20 -+static inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v; 4.21 - 4.22 - #define __IN2(s,s1,s2) \ 4.23 - __asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0"
5.1 --- a/memtest/stuff/memtest86+-5.01-setup.patch Sat Feb 04 17:25:27 2017 +0200 5.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 5.3 @@ -1,69 +0,0 @@ 5.4 ---- memtest86+-5.01/setup.S 5.5 -+++ memtest86+-5.01/setup.S 5.6 -@@ -27,11 +27,11 @@ 5.7 - #ljmp $INITSEG, $(reload - start + 0x200) 5.8 - reload: 5.9 - movw $INITSEG, %ax 5.10 -- movw %ax, %ds 5.11 - movw %ax, %es 5.12 - movw %ax, %fs 5.13 -+ movw %ax, %gs 5.14 - movw %ax, %ss # reset the stack to INITSEG:0x4000-12. 5.15 -- movw %dx, %sp 5.16 -+ movw $0x4000-12, %sp 5.17 - push %cs 5.18 - pop %ds 5.19 - lidt idt_48 - start # load idt with 0,0 5.20 -@@ -50,13 +50,13 @@ 5.21 - jz alt_a20_done 5.22 - 5.23 - /* set or clear bit1, the ALT_A20_GATE bit */ 5.24 -- movb 4(%esp), %ah 5.25 -- testb %ah, %ah 5.26 -- jz alt_a20_cont1 5.27 -+ //movb 4(%esp), %ah 5.28 -+ //testb %ah, %ah 5.29 -+ //jz alt_a20_cont1 5.30 - orb $2, %al 5.31 -- jmp alt_a20_cont2 5.32 -+ //jmp alt_a20_cont2 5.33 - alt_a20_cont1: 5.34 -- and $0xfd, %al 5.35 -+ //and $0xfd, %al 5.36 - 5.37 - /* clear the INIT_NOW bit; don't accidently reset the machine */ 5.38 - alt_a20_cont2: 5.39 -@@ -87,9 +87,9 @@ 5.40 - movw $KERNEL_DS, %ax 5.41 - movw %ax, %ds 5.42 - movw %ax, %es 5.43 -- movw %ax, %ss 5.44 - movw %ax, %fs 5.45 - movw %ax, %gs 5.46 -+ movw %ax, %ss 5.47 - 5.48 - data32 ljmp $KERNEL_CS, $(TSTLOAD <<4) # jmp offset 2000 of segment 0x10 (cs) 5.49 - 5.50 -@@ -100,18 +100,16 @@ 5.51 - * No timeout is used - if this hangs there is something wrong with 5.52 - * the machine, and we probably couldn't proceed anyway. 5.53 - */ 5.54 -+has_output: 5.55 -+ call delay 5.56 -+ inb $0x60, %al # read it 5.57 - empty_8042: 5.58 - call delay 5.59 - inb $0x64, %al # 8042 status port 5.60 - cmpb $0xff, %al # from grub-a20-patch, skip if not impl 5.61 - jz empty_8042_ret 5.62 - testb $1, %al # output buffer? 5.63 -- jz no_output 5.64 -- call delay 5.65 -- inb $0x60, %al # read it 5.66 -- jmp empty_8042 5.67 -- 5.68 --no_output: 5.69 -+ jnz has_output 5.70 - testb $2, %al # is input buffer full? 5.71 - jnz empty_8042 # yes - loop 5.72 - empty_8042_ret: