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).
This commit is contained in:
kamil 2019-06-08 23:52:09 +00:00
parent 18f4cdb336
commit 9b94608646
6 changed files with 75 additions and 0 deletions

View file

@ -0,0 +1,2 @@
NetBSD specific loadable kernel module that implements a standalone
printing mechanism to Bochs/Qemu-style debug console (port 0xe9).

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -0,0 +1,3 @@
#!/bin/sh
modload @PREFIX@/stand/@MACHINE@/@OS_VERSION@/modules/debugcon_printf/debugcon_printf.kmod

View file

@ -0,0 +1,3 @@
#!/bin/sh
modunload debugcon_printf