View | Details | Raw Unified | Return to bug 246116 | Differences between
and this patch

Collapse All | Expand All

(-)memtest86+/Makefile (-3 / +2 lines)
Lines 2-9 Link Here
2
# $FreeBSD: head/sysutils/memtest86+/Makefile 499458 2019-04-20 16:25:42Z tobik $
2
# $FreeBSD: head/sysutils/memtest86+/Makefile 499458 2019-04-20 16:25:42Z tobik $
3
3
4
PORTNAME=	memtest86+
4
PORTNAME=	memtest86+
5
PORTVERSION=	5.01
5
PORTVERSION=	5.31b
6
PORTREVISION=	3
7
CATEGORIES=	sysutils
6
CATEGORIES=	sysutils
8
MASTER_SITES=	http://www.memtest.org/download/${PORTVERSION}/
7
MASTER_SITES=	http://www.memtest.org/download/${PORTVERSION}/
9
8
Lines 18-24 Link Here
18
ALL_TARGET=	all
17
ALL_TARGET=	all
19
PORTDOCS=	*
18
PORTDOCS=	*
20
19
21
USE_GCC=	4.8
20
USE_GCC=	9
22
21
23
# Please provide absolute path below (cannot be root)
22
# Please provide absolute path below (cannot be root)
24
BOOT_DIR?=	/boot/opt
23
BOOT_DIR?=	/boot/opt
(-)memtest86+/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1465956443
1
TIMESTAMP = 1588405952
2
SHA256 (memtest86+-5.01.tar.gz) = 142127b7953fbd829b1057fb64a78d3340c2b771484230a7347e94530a0d9039
2
SHA256 (memtest86+-5.31b.tar.gz) = 7146ffb182c0eb324e216ec5db284ef4bd8296122cf45e1695eabd8320cb1f09
3
SIZE (memtest86+-5.01.tar.gz) = 214877
3
SIZE (memtest86+-5.31b.tar.gz) = 227779
(-)memtest86+/files/patch-Makefile (-23 / +7 lines)
Lines 1-12 Link Here
1
--- Makefile.orig	2013-08-10 02:01:58 UTC
1
--- Makefile.orig	2020-05-02 07:34:53.803925000 +0000
2
+++ Makefile
2
+++ Makefile	2020-05-02 07:39:31.301358000 +0000
3
@@ -21,21 +21,20 @@ OBJS= head.o reloc.o main.o test.o init.
3
@@ -32,15 +32,15 @@
4
       
5
 
6
 all: clean memtest.bin memtest 
7
-		 scp memtest.bin root@192.168.0.12:/srv/tftp/mt86plus
8
 
9
 # Link it statically once so I know I don't have undefined
10
 # symbols and then link it dynamically so I have full
4
 # symbols and then link it dynamically so I have full
11
 # relocation information
5
 # relocation information
12
 memtest_shared: $(OBJS) memtest_shared.lds Makefile
6
 memtest_shared: $(OBJS) memtest_shared.lds Makefile
Lines 23-46 Link Here
23
-	$(LD) -s -T memtest.lds -b binary memtest_shared.bin -o $@
17
-	$(LD) -s -T memtest.lds -b binary memtest_shared.bin -o $@
24
+	$(LD) -s --oformat elf32-i386-freebsd -T memtest.lds -b binary memtest_shared.bin -o $@
18
+	$(LD) -s --oformat elf32-i386-freebsd -T memtest.lds -b binary memtest_shared.bin -o $@
25
 
19
 
26
 head.s: head.S config.h defs.h test.h
20
 self_test : $(SELF_TEST_OBJS)
21
 	$(CC) $(SELF_TEST_CFLAGS) -o $@ $(SELF_TEST_OBJS)
22
@@ -55,7 +55,7 @@
27
 	$(CC) -E -traditional $< -o $@
23
 	$(CC) -E -traditional $< -o $@
28
@@ -47,7 +46,7 @@ setup.s: setup.S config.h defs.h
29
 	$(CC) -E -traditional $< -o $@
30
 
24
 
31
 memtest.bin: memtest_shared.bin bootsect.o setup.o memtest.bin.lds
25
 memtest.bin: memtest_shared.bin bootsect.o setup.o memtest.bin.lds
32
-	$(LD) -T memtest.bin.lds bootsect.o setup.o -b binary \
26
-	$(LD) -T memtest.bin.lds bootsect.o setup.o -b binary \
33
+	$(LD) --oformat elf32-i386-freebsd -T memtest.bin.lds bootsect.o setup.o -b binary \
27
+	$(LD) --oformat elf32-i386-freebsd -T memtest.bin.lds bootsect.o setup.o -b binary \
34
 	memtest_shared.bin -o memtest.bin
28
 	memtest_shared.bin -o memtest.bin
35
 
29
 
36
 reloc.o: reloc.c
30
 self_test.o : self_test.c
37
@@ -67,8 +66,7 @@ clean:
38
 	rm -f *.o *.s *.iso memtest.bin memtest memtest_shared \
39
 		memtest_shared.bin memtest.iso
40
 
41
-iso:
42
-	make all
43
+iso:	all
44
 	./makeiso.sh
45
 
46
 install: all
(-)memtest86+/files/patch-test.c (-24 / +25 lines)
Lines 1-15 Link Here
1
--- test.c.orig	2013-08-10 02:29:44 UTC
1
--- test.c.orig	2020-05-02 07:40:33.395621000 +0000
2
+++ test.c
2
+++ test.c	2020-05-02 07:43:36.559375000 +0000
3
@@ -14,7 +14,6 @@
3
@@ -14,7 +14,6 @@
4
 #include "stdint.h"
4
 #include "stdint.h"
5
 #include "cpuid.h"
5
 #include "cpuid.h"
6
 #include "smp.h"
6
 #include "smp.h"
7
-#include <sys/io.h>
7
-#include "io.h"
8
 
8
 
9
 extern struct cpu_ident cpu_id;
9
 extern struct cpu_ident cpu_id;
10
 extern volatile int    mstr_cpu;
10
 extern volatile int    mstr_cpu;
11
@@ -1543,6 +1542,19 @@ void sleep(long n, int flag, int me, int
11
@@ -1521,6 +1520,19 @@
12
 	}
12
     }
13
 }
13
 }
14
 
14
 
15
+static inline unsigned char inb(unsigned int port)
15
+static inline unsigned char inb(unsigned int port)
Lines 25-53 Link Here
25
+        asm __volatile__("outb %0,%1" : : "a" (data), "id" ((unsigned short)(port)));
25
+        asm __volatile__("outb %0,%1" : : "a" (data), "id" ((unsigned short)(port)));
26
+}
26
+}
27
+
27
+
28
 /* Beep function */
29
 
30
 void beep(unsigned int frequency)
28
 void beep(unsigned int frequency)
31
@@ -1551,18 +1563,18 @@ void beep(unsigned int frequency)
29
 {
32
 	unsigned int count = 1193180 / frequency;
30
 #if 0
31
@@ -1531,19 +1543,19 @@
32
     unsigned int count = 1193180 / frequency;
33
 
33
 
34
 	// Switch on the speaker
34
     // Switch on the speaker
35
-	outb_p(inb_p(0x61)|3, 0x61);
35
-    outb_p(inb_p(0x61)|3, 0x61);
36
+	outb(inb(0x61)|3, 0x61);
36
+    outb(inb(0x61)|3, 0x61);
37
 
37
 
38
 	// Set command for counter 2, 2 byte write
38
     // Set command for counter 2, 2 byte write
39
-	outb_p(0xB6, 0x43);
39
-    outb_p(0xB6, 0x43);
40
+	outb(0xB6, 0x43);
40
+    outb(0xB6, 0x43);
41
 
41
 
42
 	// Select desired Hz
42
     // Select desired Hz
43
-	outb_p(count & 0xff, 0x42);
43
-    outb_p(count & 0xff, 0x42);
44
+	outb(count & 0xff, 0x42);
44
+    outb(count & 0xff, 0x42);
45
 	outb((count >> 8) & 0xff, 0x42);
45
     outb((count >> 8) & 0xff, 0x42);
46
 
46
 
47
 	// Block for 100 microseconds
47
     // Block for 100 microseconds
48
 	sleep(100, 0, 0, 1);
48
     sleep(100, 0, 0, 1);
49
 
49
 
50
 	// Switch off the speaker
50
     // Switch off the speaker
51
-	outb(inb_p(0x61)&0xFC, 0x61);
51
-    outb(inb_p(0x61)&0xFC, 0x61);
52
+	outb(inb(0x61)&0xFC, 0x61);
52
+    outb(inb(0x61)&0xFC, 0x61);
53
 #endif
53
 }
54
 }

Return to bug 246116