pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc Add memtest+ 1.65 to pkgsrc, with options for serial c...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/987791a8c5ad
branches:  trunk
changeset: 520649:987791a8c5ad
user:      smb <smb%pkgsrc.org@localhost>
date:      Tue Oct 24 18:00:05 2006 +0000

description:
Add memtest+ 1.65 to pkgsrc, with options for serial console and .iso generation

diffstat:

 doc/CHANGES-2006                      |   3 +-
 mk/defaults/options.description       |   2 +
 sysutils/memtestplus/DESCR            |   6 +++
 sysutils/memtestplus/MESSAGE          |  20 +++++++++++
 sysutils/memtestplus/Makefile         |  36 +++++++++++++++++++++
 sysutils/memtestplus/PLIST            |   7 ++++
 sysutils/memtestplus/distinfo         |   7 ++++
 sysutils/memtestplus/options.mk       |  23 +++++++++++++
 sysutils/memtestplus/patches/patch-aa |  22 +++++++++++++
 sysutils/memtestplus/patches/patch-ab |  59 +++++++++++++++++++++++++++++++++++
 10 files changed, 184 insertions(+), 1 deletions(-)

diffs (238 lines):

diff -r 4d0396f0a8ae -r 987791a8c5ad doc/CHANGES-2006
--- a/doc/CHANGES-2006  Tue Oct 24 17:33:59 2006 +0000
+++ b/doc/CHANGES-2006  Tue Oct 24 18:00:05 2006 +0000
@@ -1,4 +1,4 @@
->$NetBSD: CHANGES-2006,v 1.1630 2006/10/24 14:11:37 obache Exp $
+>$NetBSD: CHANGES-2006,v 1.1631 2006/10/24 18:00:05 smb Exp $
 
 Changes to the packages collection and infrastructure in 2006:
 
@@ -5008,3 +5008,4 @@
        Removed mail/sylpheed-claws-ghostscript-viewer [cube 2006-10-24]
        Updated devel/p5-Clone to 0.22 [obache 2006-10-24]
        Updated textproc/p5-Encode to 2.18 [obache-2006-10-24]
+       Added sysutils/memtestplus version 1.65 [smb-2006-10-24]
diff -r 4d0396f0a8ae -r 987791a8c5ad mk/defaults/options.description
--- a/mk/defaults/options.description   Tue Oct 24 17:33:59 2006 +0000
+++ b/mk/defaults/options.description   Tue Oct 24 18:00:05 2006 +0000
@@ -180,6 +180,8 @@
 mad                    Enable usage of the mad library to play MP3 files.
 magick 
 mdc2   
+memtesplus-iso         Build a .iso file for memtest+
+memtesplus-serialconsole       Enable use of serial console for memtest+
 metarefresh    
 mex                    Enable matlab mex support (Linux and Solaris only).
 mhash  
diff -r 4d0396f0a8ae -r 987791a8c5ad sysutils/memtestplus/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/memtestplus/DESCR        Tue Oct 24 18:00:05 2006 +0000
@@ -0,0 +1,6 @@
+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+.
+
+Memtest86+ is a descendant of Memtest86.  Some people have found it
+more comprehensive.
diff -r 4d0396f0a8ae -r 987791a8c5ad sysutils/memtestplus/MESSAGE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/memtestplus/MESSAGE      Tue Oct 24 18:00:05 2006 +0000
@@ -0,0 +1,20 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2006/10/24 18:00:05 smb Exp $
+
+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/memtestplus.bin of=/dev/rfd0a conv=osync
+
+If you have built the optional .iso file, you can use cdrtools to
+burn it to a CD.
+
+The documentation claims that the .bin file can be booted by LILO; I have
+not tested that.
+
+Please read the documentation at:
+       ${PREFIX}/share/doc/memtestplus/README
+       ${PREFIX}/share/doc/memtestplus/FAQ
+       http://www.memtest.org
+
+===========================================================================
diff -r 4d0396f0a8ae -r 987791a8c5ad sysutils/memtestplus/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/memtestplus/Makefile     Tue Oct 24 18:00:05 2006 +0000
@@ -0,0 +1,36 @@
+# $NetBSD: Makefile,v 1.1 2006/10/24 18:00:05 smb Exp $
+#
+
+DISTNAME=              memtest86+-1.65
+PKGNAME=               memtestplus-1.65
+CATEGORIES=            sysutils
+MASTER_SITES=          http://www.memtest.org/download/1.65/
+
+MAINTAINER=            smb%NetBSD.org@localhost
+HOMEPAGE=              http://www.memtest.org/
+COMMENT=               Thorough, stand alone memory test for x86 arch
+
+ONLY_FOR_PLATFORM=     NetBSD-*-i386 Linux-*-i386
+
+USE_TOOLS+=            gmake
+
+SUBST_CLASSES+=                delcr
+SUBST_STAGE.delcr=     post-build
+SUBST_MESSAGE.delcr=   Deleting CRs
+SUBST_FILES.delcr=     README
+SUBST_SED.delcr=       -e 's/.$$//g'
+
+.include "options.mk"
+
+do-install:
+       ${INSTALL_DATA_DIR} ${PREFIX}/mdec
+       ${INSTALL_DATA} ${WRKSRC}/memtest.bin ${PREFIX}/mdec/memtestplus.bin
+       ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/memtestplus
+       ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/memtestplus
+       ${INSTALL_DATA} ${WRKSRC}/FAQ ${PREFIX}/share/doc/memtestplus
+.if !empty(PKG_OPTIONS:Mmemtesplus-iso)
+       ${INSTALL_DATA} ${WRKSRC}/memtest.iso ${PREFIX}/mdec/memtestplus.iso
+.endif
+
+.include "../../devel/binutils/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 4d0396f0a8ae -r 987791a8c5ad sysutils/memtestplus/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/memtestplus/PLIST        Tue Oct 24 18:00:05 2006 +0000
@@ -0,0 +1,7 @@
+@comment $NetBSD: PLIST,v 1.1 2006/10/24 18:00:05 smb Exp $
+mdec/memtestplus.bin
+${HAVE_ISO}mdec/memtestplus.iso
+share/doc/memtestplus/README
+share/doc/memtestplus/FAQ
+@unexec ${RMDIR} %D/mdec 2>/dev/null || ${TRUE}
+@dirrm share/doc/memtestplus
diff -r 4d0396f0a8ae -r 987791a8c5ad sysutils/memtestplus/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/memtestplus/distinfo     Tue Oct 24 18:00:05 2006 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2006/10/24 18:00:05 smb Exp $
+
+SHA1 (memtest86+-1.65.tar.gz) = f9c27f813cc9ada7efe98e6dc587ab6d2c496ba1
+RMD160 (memtest86+-1.65.tar.gz) = 629379f7660dbc6ab071a9d9839ce0528752dda8
+Size (memtest86+-1.65.tar.gz) = 146203 bytes
+SHA1 (patch-aa) = db53250c1c2cef5b3dd369f55ea91981272d8530
+SHA1 (patch-ab) = defa256b698c32a40e4274597f3de79c1ea8eb10
diff -r 4d0396f0a8ae -r 987791a8c5ad sysutils/memtestplus/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/memtestplus/options.mk   Tue Oct 24 18:00:05 2006 +0000
@@ -0,0 +1,23 @@
+# $NetBSD: options.mk,v 1.1 2006/10/24 18:00:05 smb Exp $
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.memtestplus
+PKG_SUPPORTED_OPTIONS= memtesplus-iso memtesplus-serialconsole
+PKG_SUGGESTED_OPTIONS=
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mmemtesplus-iso)
+BUILD_TARGET=          memtest.iso
+BUILD_DEPENDS+=                cdrtools>=2.01:../../sysutils/cdrtools
+PLIST_SUBST+=          HAVE_ISO=""
+.else
+PLIST_SUBST+=          HAVE_ISO="@comment "
+.endif
+
+.if !empty(PKG_OPTIONS:Mmemtesplus-serialconsole)
+SUBST_CLASSES+=                serialopt
+SUBST_STAGE.serialopt= post-patch
+SUBST_MESSAGE.serialopt=       Setting serial console option
+SUBST_FILES.serialopt= config.h
+SUBST_SED.serialopt=   -e '/define.*SERIAL_CONSOLE_DEFAULT/s/0/1/'
+.endif
diff -r 4d0396f0a8ae -r 987791a8c5ad sysutils/memtestplus/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/memtestplus/patches/patch-aa     Tue Oct 24 18:00:05 2006 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-aa,v 1.1 2006/10/24 18:00:06 smb Exp $
+
+--- Makefile.orig      2005-09-11 14:17:15.000000000 -0400
++++ Makefile   2006-10-21 15:38:58.000000000 -0400
+@@ -6,7 +6,7 @@
+ #
+ # Path for the floppy disk device
+ #
+-FDISK=/dev/fd0
++FDISK=/dev/fd0a
+ 
+ CC=gcc
+ #
+@@ -119,3 +119,8 @@
+ 
+ install-bin:
+       dd <precomp.bin >$(FDISK) bs=8192
++
++iso:  memtest.iso
++
++memtest.iso: memtest.bin
++      ./makeiso.sh
diff -r 4d0396f0a8ae -r 987791a8c5ad sysutils/memtestplus/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/memtestplus/patches/patch-ab     Tue Oct 24 18:00:05 2006 +0000
@@ -0,0 +1,59 @@
+$NetBSD: patch-ab,v 1.1 2006/10/24 18:00:06 smb Exp $
+
+--- test.c.orig        2005-09-11 14:17:15.000000000 -0400
++++ test.c     2006-10-21 15:35:25.000000000 -0400
+@@ -11,7 +11,29 @@
+ 
+ #include "test.h"
+ #include "config.h"
+-#include <sys/io.h>
++
++static __inline void
++pkg_outb (unsigned char value, unsigned short int port)
++{
++  __asm__ __volatile__ ("outb %b0,%w1": :"a" (value), "Nd" (port));
++}
++
++static __inline void
++pkg_outb_p (unsigned char value, unsigned short int port)
++{
++  __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (value),
++                        "Nd" (port));
++}
++
++static __inline unsigned char
++pkg_inb_p (unsigned short int port)
++{
++  unsigned char _v;
++
++  __asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (port));
++  return _v;
++}
++
+ 
+ 
+ extern int segs, bail, beepmode;
+@@ -1741,18 +1763,18 @@
+       unsigned int count = 1193180 / frequency;
+ 
+       // Switch on the speaker
+-      outb_p(inb_p(0x61)|3, 0x61);
++      pkg_outb_p(pkg_inb_p(0x61)|3, 0x61);
+ 
+       // Set command for counter 2, 2 byte write
+-      outb_p(0xB6, 0x43);
++      pkg_outb_p(0xB6, 0x43);
+ 
+       // Select desired Hz
+-      outb_p(count & 0xff, 0x42);
+-      outb((count >> 8) & 0xff, 0x42);
++      pkg_outb_p(count & 0xff, 0x42);
++      pkg_outb((count >> 8) & 0xff, 0x42);
+ 
+       // Block for 100 microseconds
+       sleep(100, 1);
+ 
+       // Switch off the speaker
+-      outb(inb_p(0x61)&0xFC, 0x61);
++      pkg_outb(pkg_inb_p(0x61)&0xFC, 0x61);
+ }



Home | Main Index | Thread Index | Old Index