summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorkamil <kamil@pkgsrc.org>2019-06-08 23:52:09 +0000
committerkamil <kamil@pkgsrc.org>2019-06-08 23:52:09 +0000
commitc7982f74eb99e18f36bcd040d44091853fbaabb4 (patch)
tree0b54b1d2eab2dcf7c809bab63efa7243b6c7a4ce /devel
parentfbc52594af0fe37ad90f2e1f72b46fb1d362b84b (diff)
downloadpkgsrc-c7982f74eb99e18f36bcd040d44091853fbaabb4.tar.gz
devel/debugcon_printf: import debugcon_printf-20190609
NetBSD specific loadable kernel module that implements a standalone printing mechanism to Bochs/Qemu-style debug console (port 0xe9).
Diffstat (limited to 'devel')
-rw-r--r--devel/debugcon_printf/DESCR2
-rw-r--r--devel/debugcon_printf/Makefile57
-rw-r--r--devel/debugcon_printf/PLIST4
-rw-r--r--devel/debugcon_printf/distinfo6
-rw-r--r--devel/debugcon_printf/files/debugcon_printf-modload.in3
-rw-r--r--devel/debugcon_printf/files/debugcon_printf-modunload3
6 files changed, 75 insertions, 0 deletions
diff --git a/devel/debugcon_printf/DESCR b/devel/debugcon_printf/DESCR
new file mode 100644
index 00000000000..7817dc6df19
--- /dev/null
+++ b/devel/debugcon_printf/DESCR
@@ -0,0 +1,2 @@
+NetBSD specific loadable kernel module that implements a standalone
+printing mechanism to Bochs/Qemu-style debug console (port 0xe9).
diff --git a/devel/debugcon_printf/Makefile b/devel/debugcon_printf/Makefile
new file mode 100644
index 00000000000..337d7a0edd1
--- /dev/null
+++ b/devel/debugcon_printf/Makefile
@@ -0,0 +1,57 @@
+# $NetBSD: Makefile,v 1.1 2019/06/08 23:52:09 kamil Exp $
+
+DISTNAME= debugcon_printf-20190609
+CATEGORIES= devel
+MASTER_SITES= ${MASTER_SITE_GITHUB:=krytarowski/}
+GITHUB_TAG= ${PKGVERSION_NOREV}
+
+MAINTAINER= kamil@NetBSD.org
+HOMEPAGE= https://github.com/krytarowski/debugcon_printf
+COMMENT= Bochs/Qemu debugcon printf() loadable kernel module for NetBSD
+LICENSE= modified-bsd
+
+ONLY_FOR_PLATFORM= NetBSD-*-x86_64
+OSVERSION_SPECIFIC= YES
+
+.include "../../mk/bsd.prefs.mk"
+
+BUILDLINK_PASSTHRU_DIRS+= ${BSDSRCDIR}/sys
+
+MAKE_FLAGS+= S=${BSDSRCDIR}/sys
+
+BUILD_DEFS+= BSDSRCDIR
+
+.if !exists(${BSDSRCDIR}/sys)
+PKG_FAIL_REASON+= "BSDSRCDIR/sys specifies non-existing directory ${BSDSRCDIR}/sys"
+.endif
+
+.include "../../mk/compiler.mk"
+
+KMOD= ${PKGBASE}.kmod
+KMODULEDIR= stand/${MACHINE}/${OS_VERSION}/modules/${PKGBASE}
+
+INSTALLATION_DIRS+= sbin # auxiliary scripts
+INSTALLATION_DIRS+= ${KMODULEDIR}
+
+INSTALL_UNSTRIPPED= yes # Kernel linker needs unstripped module
+
+PLIST_SUBST+= MACHINE=${MACHINE}
+
+pre-configure:
+ ${CP} ${FILESDIR}/debugcon_printf-modunload ${WRKSRC}
+ ${SED} \
+ -e 's|@PREFIX@|${PREFIX}|g' \
+ -e 's|@MACHINE@|${MACHINE}|g' \
+ -e 's|@OS_VERSION@|${OS_VERSION}|g' \
+ ${FILESDIR}/${PKGBASE}-modload.in > ${WRKSRC}/${PKGBASE}-modload
+
+do-install:
+ ${RUN} cd ${WRKSRC} && \
+ ${INSTALL_PROGRAM} ${KMOD} ${DESTDIR}${PREFIX}/${KMODULEDIR}
+.for file in debugcon_printf-modload debugcon_printf-modunload
+ ${RUN} cd ${WRKSRC} && \
+ ${INSTALL_SCRIPT} ${file} ${DESTDIR}${PREFIX}/sbin
+.endfor
+
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/devel/debugcon_printf/PLIST b/devel/debugcon_printf/PLIST
new file mode 100644
index 00000000000..b0e8cf60445
--- /dev/null
+++ b/devel/debugcon_printf/PLIST
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1 2019/06/08 23:52:09 kamil Exp $
+sbin/debugcon_printf-modload
+sbin/debugcon_printf-modunload
+stand/${MACHINE}/${OS_VERSION}/modules/debugcon_printf/debugcon_printf.kmod
diff --git a/devel/debugcon_printf/distinfo b/devel/debugcon_printf/distinfo
new file mode 100644
index 00000000000..d8f7570615c
--- /dev/null
+++ b/devel/debugcon_printf/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2019/06/08 23:52:09 kamil Exp $
+
+SHA1 (debugcon_printf-20190609-20190609.tar.gz) = 4e62812e532679f432f5b6b1b89837d4f6770f7b
+RMD160 (debugcon_printf-20190609-20190609.tar.gz) = 98364ede0073d77e6d58d0edd230bc54764e588d
+SHA512 (debugcon_printf-20190609-20190609.tar.gz) = 35943a4e46f45e4a6fa8d39a8ce1f4095d3eaecbd6c6943624c20aad1e4e75c9d50ec69dba5caf27db7185da0fb9876e2bdfef08651eef4f92473af1e30a41f0
+Size (debugcon_printf-20190609-20190609.tar.gz) = 5706 bytes
diff --git a/devel/debugcon_printf/files/debugcon_printf-modload.in b/devel/debugcon_printf/files/debugcon_printf-modload.in
new file mode 100644
index 00000000000..f4e217264b4
--- /dev/null
+++ b/devel/debugcon_printf/files/debugcon_printf-modload.in
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+modload @PREFIX@/stand/@MACHINE@/@OS_VERSION@/modules/debugcon_printf/debugcon_printf.kmod
diff --git a/devel/debugcon_printf/files/debugcon_printf-modunload b/devel/debugcon_printf/files/debugcon_printf-modunload
new file mode 100644
index 00000000000..034a60f18bd
--- /dev/null
+++ b/devel/debugcon_printf/files/debugcon_printf-modunload
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+modunload debugcon_printf