Skip to content

Instantly share code, notes, and snippets.

View nonakap's full-sized avatar

Kimihiro Nonaka nonakap

View GitHub Profile
@nonakap
nonakap / if_iwm.diff
Created February 19, 2015 06:30
NetBSD iwm(4) temp patch
Index: if_iwm.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_iwm.c,v
retrieving revision 1.9
diff -u -r1.9 if_iwm.c
--- if_iwm.c 17 Feb 2015 09:18:45 -0000 1.9
+++ if_iwm.c 18 Feb 2015 01:38:27 -0000
@@ -253,6 +253,8 @@
static int iwm_prepare_card_hw(struct iwm_softc *);
static void iwm_apm_config(struct iwm_softc *);
@nonakap
nonakap / nbsd-x86-msi-intr.diff
Created February 20, 2015 18:17
NetBSD/x86: MSI interrupt preliminary support
Index: sys/arch/x86/include/pic.h
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/include/pic.h,v
retrieving revision 1.7
diff -u -r1.7 pic.h
--- sys/arch/x86/include/pic.h 19 Apr 2009 14:11:37 -0000 1.7
+++ sys/arch/x86/include/pic.h 20 Feb 2015 18:12:42 -0000
@@ -30,7 +30,8 @@
#define PIC_I8259 0
#define PIC_IOAPIC 1
@nonakap
nonakap / pkgsrc-fonts-ohruri-ttf.shar
Created March 14, 2015 14:23
pkgsrc for Ohruri Japanese TrueType fonts
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# fonts/ohruri-ttf/DESCR
# fonts/ohruri-ttf/Makefile
# fonts/ohruri-ttf/PLIST
@nonakap
nonakap / nbsd-edmus.diff
Created April 24, 2015 02:15
edmus を NetBSD でコンパイルするためのパッチ
Index: linux/Makefile
===================================================================
--- linux/Makefile (revision 83)
+++ linux/Makefile (working copy)
@@ -11,7 +11,9 @@
RM = rm -f
CFLAGS = -Wall -O3 -I. -Wno-invalid-offsetof
+CFLAGS += -I/usr/pkg/include
LFLAGS =
@nonakap
nonakap / nbsd-dev-pci-hdaudio-msi-support.diff
Created June 15, 2015 16:21
hdaudio(4): Use MSI instead of legacy INTx, if available.
diff --git a/sys/dev/pci/hdaudio_pci.c b/sys/dev/pci/hdaudio_pci.c
index 12ab15b..0b68cf7 100644
--- a/sys/dev/pci/hdaudio_pci.c
+++ b/sys/dev/pci/hdaudio_pci.c
@@ -58,6 +58,9 @@ struct hdaudio_pci_softc {
pci_chipset_tag_t sc_pc;
void *sc_ih;
pcireg_t sc_id;
+#ifdef __HAVE_PCI_MSI_MSIX
+ pci_intr_handle_t *sc_pihp;
@nonakap
nonakap / nbsd-doas.diff
Created July 17, 2015 14:18
doas(1): porting OpenBSD doas(1) command to NetBSD.
diff --git a/usr.bin/doas/Makefile b/usr.bin/doas/Makefile
index 809fe0b..6610edb 100644
--- a/usr.bin/doas/Makefile
+++ b/usr.bin/doas/Makefile
@@ -1,14 +1,31 @@
+# $NetBSD$
# $OpenBSD: Makefile,v 1.1 2015/07/16 20:44:21 tedu Exp $
-SRCS= parse.y doas.c
+.include <bsd.own.mk>
@nonakap
nonakap / pkgsrc-devel-opengrok-make.log
Created September 4, 2015 04:32
pkgsrc/devel/opengrok では make 時に jflex, lucene 関連のファイルをダウンロードする
=> Bootstrap dependency digest>=20010302: found digest-20121220
=> Bootstrap dependency wget-[0-9]*: found wget-1.16.1
===> Skipping vulnerability checks.
===> Building for opengrok-0.12.1.5
cd /usr/obj.pkgsrc/devel/opengrok/work.netbsd/OpenGrok-0.12.1.5 && CLASSPATH=/usr/pkg/lib/java/JFlex.jar /usr/pkg/bin/ant
Buildfile: /usr/obj.pkgsrc/devel/opengrok/work.netbsd/OpenGrok-0.12.1.5/build.xml
-touch-manifest:
-exclude-client:
Index: MESSAGE
===================================================================
RCS file: /cvsroot/pkgsrc/devel/opengrok/MESSAGE,v
retrieving revision 1.1
diff -u -r1.1 MESSAGE
--- MESSAGE 31 Dec 2013 22:56:12 -0000 1.1
+++ MESSAGE 4 Sep 2015 05:34:36 -0000
@@ -6,12 +6,13 @@
1. Install version control software that is used for your code repository.
@nonakap
nonakap / pciinfo.sh
Created September 11, 2015 17:01
NetBSD PCI Configuration Space Dump script
#!/bin/sh
if [ $# -eq 0 ]; then
echo "Usage: $0 <machine name>"
exit 127
fi
tmpfile=`mktemp -q /tmp/${0##*/}.XXXXXX`
if [ $? -ne 0 ]; then
echo "$0: Can't create temp file, exiting..."
@nonakap
nonakap / pcictl-dump-Samsung-SM951-M.2-SSD-NVMe-128GB-MZVPV128HDGM-00000.txt
Created October 21, 2015 12:46
pcictl dump: Samsung SM951 M.2 SSD NVMe 128GB (MZVPV128HDGM-00000)
##### PCI configuration Space: 004:00:0 Samsung Electronics (3rd vendor ID) product a802 (Flash mass storage, NVMe, revision 0x01)
PCI configuration registers:
Common header:
0x00: 0xa802144d 0x00100007 0x01080201 0x00000010
Vendor Name: Samsung Electronics (3rd vendor ID) (0x144d)
Device ID: 0xa802
Command register: 0x0007
I/O space accesses: on
Memory space accesses: on