Make this work on amd64, verified running "vbetool post".

This commit is contained in:
xtraeme 2007-08-08 12:36:37 +00:00
parent 06c572e930
commit ffec3dd39f
3 changed files with 22 additions and 10 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.1.1.1 2007/08/08 12:00:34 xtraeme Exp $
# $NetBSD: Makefile,v 1.2 2007/08/08 12:36:37 xtraeme Exp $
#
DISTNAME= vbetool_0.7-1
@ -10,14 +10,22 @@ MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.srcf.ucam.org/~mjg59/vbetool/
COMMENT= Run real-mode video BIOS code to alter hardware state
ONLY_FOR_PLATFORM+= Linux-*-i386 NetBSD-*-i386
ONLY_FOR_PLATFORM+= Linux-*-i386 NetBSD-*-i386 NetBSD-*-x86_64
WRKSRC= ${WRKDIR}/vbetool-0.7
USE_TOOLS+= gmake
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-x86emu
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "NetBSD"
. if ${MACHINE_ARCH} == "i386"
LIBS.NetBSD+= -li386
. else
LIBS.NetBSD+= -lx86_64
. endif
.endif
.include "../../sysutils/pciutils/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -1,8 +1,8 @@
$NetBSD: distinfo,v 1.1.1.1 2007/08/08 12:00:34 xtraeme Exp $
$NetBSD: distinfo,v 1.2 2007/08/08 12:36:38 xtraeme Exp $
SHA1 (vbetool_0.7-1.tar.gz) = 49c86aa6fb877f35a0b336d6aa1d6b204c2cc66f
RMD160 (vbetool_0.7-1.tar.gz) = b5a5d3a0794f8dbb06c78373e15c26d9536d8303
Size (vbetool_0.7-1.tar.gz) = 176277 bytes
SHA1 (patch-aa) = d27a3dd8eb1943c3f30351996483a01638521e90
SHA1 (patch-ab) = fdad8415986c84599d16e28ebcab524a231eaae3
SHA1 (patch-ab) = 23b1bf49f395793b53dccd71be6f03aa27685a64
SHA1 (patch-ac) = 89b24bd2fadbf40ab614186b53dc339653029919

View file

@ -1,7 +1,7 @@
$NetBSD: patch-ab,v 1.1.1.1 2007/08/08 12:00:34 xtraeme Exp $
$NetBSD: patch-ab,v 1.2 2007/08/08 12:36:38 xtraeme Exp $
--- vbetool.c.orig 2007-08-08 13:30:13.000000000 +0200
+++ vbetool.c 2007-08-08 13:32:10.000000000 +0200
--- vbetool.c.orig 2006-07-26 03:27:21.000000000 +0200
+++ vbetool.c 2007-08-08 14:27:44.000000000 +0200
@@ -8,19 +8,26 @@
version 2
*/
@ -30,12 +30,16 @@ $NetBSD: patch-ab,v 1.1.1.1 2007/08/08 12:00:34 xtraeme Exp $
#include "include/lrmi.h"
#include "vbetool.h"
@@ -42,8 +49,12 @@
@@ -42,8 +49,16 @@
exit(1);
}
+#ifdef __NetBSD__
+# ifdef __i386__
+ i386_iopl(3);
+# else
+ x86_64_iopl(3);
+# endif
+#else
ioperm(0, 1024, 1);
iopl(3);
@ -43,7 +47,7 @@ $NetBSD: patch-ab,v 1.1.1.1 2007/08/08 12:00:34 xtraeme Exp $
pacc = pci_alloc();
pacc->numeric_ids = 1;
@@ -256,7 +267,9 @@
@@ -256,7 +271,9 @@
LRMI_free_real(data);
@ -53,7 +57,7 @@ $NetBSD: patch-ab,v 1.1.1.1 2007/08/08 12:00:34 xtraeme Exp $
}
@@ -476,7 +489,9 @@
@@ -476,7 +493,9 @@
return 11;
}