Skip to content

Instantly share code, notes, and snippets.

View mfplass's full-sized avatar

Michael Plass mfplass

View GitHub Profile
@mfplass
mfplass / toolchain-51118-rm-cddl-sys-limits.patch
Created August 17, 2016 21:27
Patch for building NetBSD on FreeBSD
commit cc42752c2051c01c879419aa186892d2d327a76b
Author: Michael Plass <mfp@plass-family.net>
Date: Tue Aug 16 20:59:23 2016 -0700
Remove cddl sys/limits.h and assert.h.
These interfere with cross-building on FreeBSD.
toolchain/51118
diff --git a/external/cddl/osnet/dev/fbt/fbt.c b/external/cddl/osnet/dev/fbt/fbt.c
@mfplass
mfplass / host-libcpp-config.status
Created August 13, 2016 01:41
/usr/home/michael/netbsd/usr/src/external/gpl3/gcc/usr.bin/host-libcpp/obj/libcpp/config.status
#! /bin/sh
# Generated by configure.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.
debug=false
ac_cs_recheck=false
ac_cs_silent=false
@mfplass
mfplass / net-on-free-genmatch-fail-build.log
Created August 13, 2016 01:18
netbsd 2016.08.23.13.37.10 sources - build failed
This file has been truncated, but you can view the full file.
===> build.sh command: ./build.sh -u -U -m evbarm -a earmv6hf release
===> build.sh started: Sun Jul 24 08:00:00 PDT 2016
===> NetBSD version: 7.99.34
===> MACHINE: evbarm
===> MACHINE_ARCH: earmv6hf
===> Build platform: FreeBSD 11.0-BETA2 amd64
===> HOST_SH: /bin/sh
===> MAKECONF file: /etc/mk.conf (File not found)
===> TOOLDIR path: /usr/home/michael/netbsd/usr/src/obj/tooldir.FreeBSD-11.0-BETA2-amd64
===> DESTDIR path: /usr/home/michael/netbsd/usr/src/obj/destdir.evbarm
@mfplass
mfplass / gist:3c727c584cfdde8ac0f6a3882d365639
Created August 1, 2016 20:50
netbsd pmap panic sys/arch/arm/arm32/pmap.c,v 1.338
db{0}> dmesg
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
The NetBSD Foundation, Inc. All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
NetBSD 7.99.34 (RPI2-HIST) #1: Sat Jul 30 18:05:31 PDT 2016
michael@nb:/nb/usr/src/sys/arch/evbarm/compile/obj/RPI2-HIST
total memory = 944 MB
@mfplass
mfplass / gist:4a96808d35e001ab49c4d0f44441632e
Created July 31, 2016 04:09
Another panic, this time with NetBSD: pmap.c,v 1.337 (adds a little more logging).
panic: kernel diagnostic assertion "!kcpuset_isotherset(pm->pm_onproc, cpu_index(curcpu()))" failed: file "/nb/usr/src/sys/arch/arm/arm32/pmap.c", line 5024
Stopped in pid 23018.1 (nbctfmerge) at netbsd:cpu_Debugger+0x4: bx r
14
db{1}> t
0xb9277e34: netbsd:vpanic+0x10
0xb9277e4c: netbsd:__udivmoddi4
0xb9277ea4: netbsd:pmap_update+0x368
0xb9277f04: netbsd:uvm_unmap_remove+0x6d4
0xb9277f34: netbsd:sys_munmap+0xa4
@mfplass
mfplass / arm-pmap-panic.txt
Created July 29, 2016 04:43
netbsd panic: kernel diagnostic assertion "!kcpuset_isotherset(pm->pm_onproc, cpu_index(curcpu()))"
NetBSD/evbarm (rpi) booting ...
[ Kernel symbol table missing! ]
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
The NetBSD Foundation, Inc. All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
NetBSD 7.99.34 (RPI2-HIST) #0: Thu Jul 28 21:12:52 PDT 2016
michael@nb:/nb/usr/src/sys/arch/evbarm/compile/obj/RPI2-HIST
@mfplass
mfplass / freebsd-11.0-alpha5-lor-igmp-if.txt
Created July 2, 2016 22:07
LOR igmp if_addr_lock/ifnet_rw
FreeBSD xx 11.0-ALPHA5 FreeBSD 11.0-ALPHA5 #0 r302164: Fri Jun 24 02:51:52 UTC 2016 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
Jun 30 20:20:30 xx kernel: lock order reversal:
Jun 30 20:20:30 xx kernel: 1st 0xfffff80003cff990 if_addr_lock (if_addr_lock) @ /usr/src/sys/netinet/igmp.c:1716
Jun 30 20:20:30 xx kernel: 2nd 0xffffffff81d7b660 ifnet_rw (ifnet_rw) @ /usr/src/sys/net/if.c:258
Jun 30 20:20:30 xx kernel: stack backtrace:
Jun 30 20:20:30 xx kernel: #0 0xffffffff80aa7770 at witness_debugger+0x70
Jun 30 20:20:30 xx kernel: #1 0xffffffff80aa7664 at witness_checkorder+0xe54
Jun 30 20:20:30 xx kernel: #2 0xffffffff80a44def at __rw_rlock+0x8f
Jun 30 20:20:30 xx kernel: #3 0xffffffff80b2e0b2 at ifnet_byindex+0x22
FreeBSD xx 11.0-ALPHA5 FreeBSD 11.0-ALPHA5 #0 r302164: Fri Jun 24 02:51:52 UTC 2016 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
Jun 29 22:47:44 xx kernel: Syncing disks, vnodes remaining... 0 0 0 0 done
Jun 29 22:47:44 xx kernel: All buffers synced.
Jun 29 22:47:44 xx kernel: lock order reversal:
Jun 29 22:47:44 xx kernel: 1st 0xfffff80007bfab78 ufs (ufs) @ /usr/src/sys/kern/vfs_mount.c:1222
Jun 29 22:47:44 xx kernel: 2nd 0xfffff80007ade068 devfs (devfs) @ /usr/src/sys/ufs/ffs/ffs_vfsops.c:1378
Jun 29 22:47:44 xx kernel: Uptime: 19m20s
Jun 29 22:47:44 xx kernel: Copyright (c) 1992-2016 The FreeBSD Project.
@mfplass
mfplass / RasPi.sh
Created June 16, 2016 20:10
Building evbarmv6 with gcc 4.8
: ${K:=build}
: ${L:=/space/tmp}
: ${S:=`pwd`}
V=1
while [ -f $L/$K.log ] && [ -f $L/$K.log.~$V~ ]; do V=$((V+1)); done
[ -f $L/$K.log ] && mv $L/$K.log $L/$K.log.~$V~
export HAVE_GCC=48
(cd $S && ./build.sh -U -m evbarm -a earmv6hf release 2>&1) > $L/$K.log
STATUS=$?
(cd $S && git show | head -n 24)
@mfplass
mfplass / gist:202df0d362501a522ca2b257977a6b80
Created June 16, 2016 19:57
Cross build failure building netbsd-current on freebsd
===> build.sh command: ./build.sh -U -m evbarm -a earmv6hf -u release
===> build.sh started: Mon Jun 13 13:20:01 PDT 2016
===> NetBSD version: 7.99.30
===> MACHINE: evbarm
===> MACHINE_ARCH: earmv6hf
===> Build platform: FreeBSD 8.4-RELEASE-p35 amd64
===> HOST_SH: /bin/sh
===> MAKECONF file: /etc/mk.conf (File not found)
===> TOOLDIR path: /space/ws/netbsd-A/usr/src/obj/tooldir.FreeBSD-8.4-RELEASE-p35-amd64
===> DESTDIR path: /space/ws/netbsd-A/usr/src/obj/destdir.evbarm