summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2001-04-27 11:28:32 +0000
committeragc <agc@pkgsrc.org>2001-04-27 11:28:32 +0000
commit39d19cc1001152713f49c5f21b0c67ac0f64d901 (patch)
tree22cf4f4c411a33493a70b99114f7f9bc5822f93e /sysutils
parentd5ebbf5fc075110757c2ef5f033ff1daaac7b1f4 (diff)
downloadpkgsrc-39d19cc1001152713f49c5f21b0c67ac0f64d901.tar.gz
Initial import of memtest-2.5 into the packages collection.
This package was provided in PR 12595 by Ben Collver (collver@linuxfreemail.com) Memtest86 is a thorough, stand alone memory test for i386 architecture systems. BIOS-based memory tests are only a quick check and often miss failures that are detected by Memtest86.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/memtest/Makefile27
-rw-r--r--sysutils/memtest/distinfo7
-rw-r--r--sysutils/memtest/files/linkage.h54
-rw-r--r--sysutils/memtest/patches/patch-aa39
-rw-r--r--sysutils/memtest/patches/patch-ab13
-rw-r--r--sysutils/memtest/patches/patch-ac35
-rw-r--r--sysutils/memtest/pkg/DESCR3
-rw-r--r--sysutils/memtest/pkg/MESSAGE8
-rw-r--r--sysutils/memtest/pkg/PLIST5
9 files changed, 191 insertions, 0 deletions
diff --git a/sysutils/memtest/Makefile b/sysutils/memtest/Makefile
new file mode 100644
index 00000000000..ba35dff8520
--- /dev/null
+++ b/sysutils/memtest/Makefile
@@ -0,0 +1,27 @@
+# $NetBSD: Makefile,v 1.1.1.1 2001/04/27 11:28:32 agc Exp $
+#
+
+DISTNAME= memtest86-2.5
+PKGNAME= memtest-2.5
+CATEGORIES= sysutils
+MASTER_SITES= http://reality.sgi.com/cbrady_denver/memtest86/
+
+MAINTAINER= collver@linuxfreemail.com
+HOMEPAGE= http://reality.sgi.com/cbrady_denver/memtest86/
+COMMENT= thorough, stand alone memory test for x86 arch
+
+BUILD_DEPENDS+= bcc-95.3.12:../../devel/bcc
+
+USE_GMAKE= yes
+ONLY_FOR_PLATFORM= NetBSD-*-i386
+
+post-patch:
+ ${CP} ${FILESDIR}/linkage.h ${WRKSRC}
+
+do-install:
+ ${INSTALL_DATA_DIR} ${PREFIX}/mdec
+ ${CP} ${WRKSRC}/memtest.bin ${PREFIX}/mdec
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/memtest
+ ${CP} ${WRKSRC}/README ${PREFIX}/share/doc/memtest
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/memtest/distinfo b/sysutils/memtest/distinfo
new file mode 100644
index 00000000000..abe68005a82
--- /dev/null
+++ b/sysutils/memtest/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1.1.1 2001/04/27 11:28:32 agc Exp $
+
+SHA1 (memtest86-2.5.tar.gz) = af453d155a1610fc51e03238aa5785b491a8985f
+Size (memtest86-2.5.tar.gz) = 69926 bytes
+SHA1 (patch-aa) = e5ce3801bf4e6bdeb2c1a9364130efb8e497fe86
+SHA1 (patch-ab) = 297a1b9bdf2c7c1fa38fb69f7f185b3c8f800754
+SHA1 (patch-ac) = cb34cf3b81920d792d88f51b9ebcfbfff7773d4a
diff --git a/sysutils/memtest/files/linkage.h b/sysutils/memtest/files/linkage.h
new file mode 100644
index 00000000000..190202f0589
--- /dev/null
+++ b/sysutils/memtest/files/linkage.h
@@ -0,0 +1,54 @@
+#ifndef _LINUX_LINKAGE_H
+#define _LINUX_LINKAGE_H
+
+#ifdef __cplusplus
+#define CPP_ASMLINKAGE extern "C"
+#else
+#define CPP_ASMLINKAGE
+#endif
+
+#if defined __i386__ && (__GNUC__ > 2 || __GNUC_MINOR__ > 7)
+#define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0)))
+#else
+#define asmlinkage CPP_ASMLINKAGE
+#endif
+
+#define SYMBOL_NAME_STR(X) #X
+#define SYMBOL_NAME(X) X
+#ifdef __STDC__
+#define SYMBOL_NAME_LABEL(X) X##:
+#else
+#define SYMBOL_NAME_LABEL(X) X/**/:
+#endif
+
+#ifdef __arm__
+#define __ALIGN .align 0
+#define __ALIGN_STR ".align 0"
+#else
+#ifdef __mc68000__
+#define __ALIGN .align 4
+#define __ALIGN_STR ".align 4"
+#else
+#if !defined(__i486__) && !defined(__i586__)
+#define __ALIGN .align 4,0x90
+#define __ALIGN_STR ".align 4,0x90"
+#else /* __i486__/__i586__ */
+#define __ALIGN .align 16,0x90
+#define __ALIGN_STR ".align 16,0x90"
+#endif /* __i486__/__i586__ */
+#endif /* __mc68000__ */
+#endif /* __arm__ */
+
+#ifdef __ASSEMBLY__
+
+#define ALIGN __ALIGN
+#define ALIGN_STR __ALIGN_STR
+
+#define ENTRY(name) \
+ .globl SYMBOL_NAME(name); \
+ ALIGN; \
+ SYMBOL_NAME_LABEL(name)
+
+#endif
+
+#endif
diff --git a/sysutils/memtest/patches/patch-aa b/sysutils/memtest/patches/patch-aa
new file mode 100644
index 00000000000..f50b5e65a4d
--- /dev/null
+++ b/sysutils/memtest/patches/patch-aa
@@ -0,0 +1,39 @@
+$NetBSD: patch-aa,v 1.1.1.1 2001/04/27 11:28:32 agc Exp $
+
+--- Makefile.orig Sun Apr 8 22:21:04 2001
++++ Makefile Mon Apr 9 18:41:18 2001
+@@ -6,7 +6,7 @@
+ #
+ # Path for the floppy disk device
+ #
+-FDISK=/dev/fd0
++FDISK=/dev/fd0a
+
+ CC=gcc
+ #
+@@ -63,11 +63,7 @@
+ $(REL_DAT_ADR) -Map mapfile.relo $(OBJS)
+
+ relo.out: relo
+- if hash encaps 2> /dev/null; then \
+- $(OBJDUMP) -o $(REL_TXT_ADR) relo >relo.out; \
+- else \
+- $(OBJCOPY) relo relo.out; \
+- fi
++ $(OBJCOPY) relo relo.out
+
+ head.o: head.s
+ as -o $@ $<
+@@ -76,11 +72,7 @@
+ ld -m elf_i386 -o $@ -e do_test -Ttext $(TXT_ADR) -Tdata $(DAT_ADR) \
+ -Map mapfile $(OBJS)
+ head.out: head
+- if hash encaps 2> /dev/null; then \
+- $(OBJDUMP) -o $(TXT_ADR) head >head.out; \
+- else \
+- $(OBJCOPY) head head.out; \
+- fi
++ $(OBJCOPY) head head.out
+
+ head.s: head.S test.h
+ $(CC) -E -traditional $< -o $@
diff --git a/sysutils/memtest/patches/patch-ab b/sysutils/memtest/patches/patch-ab
new file mode 100644
index 00000000000..2db32afcdaf
--- /dev/null
+++ b/sysutils/memtest/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.1.1.1 2001/04/27 11:28:32 agc Exp $
+
+--- head.S.orig Sun Apr 8 22:37:53 2001
++++ head.S Sun Apr 8 22:56:59 2001
+@@ -15,7 +15,7 @@
+ .global idt_descr
+ .global trap_regs
+
+-#include <linux/linkage.h>
++#include "linkage.h"
+ #include "defs.h"
+ #include "config.h"
+
diff --git a/sysutils/memtest/patches/patch-ac b/sysutils/memtest/patches/patch-ac
new file mode 100644
index 00000000000..36f64d360c4
--- /dev/null
+++ b/sysutils/memtest/patches/patch-ac
@@ -0,0 +1,35 @@
+$NetBSD: patch-ac,v 1.1.1.1 2001/04/27 11:28:32 agc Exp $
+
+--- build.c.orig Mon Apr 9 19:02:15 2001
++++ build.c Mon Apr 9 19:02:43 2001
+@@ -23,7 +23,7 @@
+ #include <stdio.h> /* fprintf */
+ #include <sys/stat.h>
+ #include <fcntl.h>
+-#include <linux/a.out.h>
++#include <a.out.h>
+ #include "defs.h"
+
+ #define MINIX_HEADER 32
+@@ -89,10 +89,6 @@
+ die("Unable to open 'boot'");
+ if (read(id,buf,MINIX_HEADER) != MINIX_HEADER)
+ die("Unable to read header of 'boot'");
+- if (((long *) buf)[0]!=intel_long(0x04100301))
+- die("Non-Minix header of 'boot'");
+- if (((long *) buf)[1]!=intel_long(MINIX_HEADER))
+- die("Non-Minix header of 'boot'");
+ if (((long *) buf)[3] != 0)
+ die("Illegal data segment in 'boot'");
+ if (((long *) buf)[4] != 0)
+@@ -114,10 +110,6 @@
+ die("Unable to open 'setup'");
+ if (read(id,buf,MINIX_HEADER) != MINIX_HEADER)
+ die("Unable to read header of 'setup'");
+- if (((long *) buf)[0]!=intel_long(0x04100301))
+- die("Non-Minix header of 'setup'");
+- if (((long *) buf)[1]!=intel_long(MINIX_HEADER))
+- die("Non-Minix header of 'setup'");
+ if (((long *) buf)[3] != 0)
+ die("Illegal data segment in 'setup'");
+ if (((long *) buf)[4] != 0)
diff --git a/sysutils/memtest/pkg/DESCR b/sysutils/memtest/pkg/DESCR
new file mode 100644
index 00000000000..10447372f18
--- /dev/null
+++ b/sysutils/memtest/pkg/DESCR
@@ -0,0 +1,3 @@
+Memtest86 is a thorough, stand alone memory test for i386 architecture
+systems. BIOS-based memory tests are only a quick check and often miss
+failures that are detected by Memtest86.
diff --git a/sysutils/memtest/pkg/MESSAGE b/sysutils/memtest/pkg/MESSAGE
new file mode 100644
index 00000000000..9b9c1a06c95
--- /dev/null
+++ b/sysutils/memtest/pkg/MESSAGE
@@ -0,0 +1,8 @@
+Memtest86 is a standalone program, it does not run within an operating
+system. It has been designed to boot from a PC floppy disk. To install
+Memtest86 on a floppy, insert a disk then type:
+ dd if=${PREFIX}/mdec/memtest.bin of=/dev/fd0a
+
+Please read the documentation at:
+ ${PREFIX}/share/doc/memtest/README
+ http://reality.sgi.com/cbrady_denver/memtest86/
diff --git a/sysutils/memtest/pkg/PLIST b/sysutils/memtest/pkg/PLIST
new file mode 100644
index 00000000000..13b3abd170b
--- /dev/null
+++ b/sysutils/memtest/pkg/PLIST
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2001/04/27 11:28:32 agc Exp $
+mdec/memtest.bin
+share/doc/memtest/README
+@dirrm mdec
+@dirrm share/doc/memtest