OpenBSD on a BeagleBone Black 2
I finally decided to try the ARMv7 port of OpenBSD-current. As is often the case with OpenBSD, the documentation is good. Create a microSD card from miniroot-am335x-58.fs. Connect to the BeagleBone serial console, and boot switch depressed. You should be greeted by the familiar OpenBSD installer.
Disk I/O in the installer was painfully slow. I was using a name-brand new microSD card. Once up and running, it seems to be fast enough.
Since OpenBSD only supports GPIO on this platform, it’s more of a curiosity for me. I’m more interested in SPI and I2C, though it looks like you might be able to do I2C over GPIO.
Boot looks like:
U-Boot SPL 2013.07 (Aug 09 2013 - 18:03:11)
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
OMAP SD/MMC: 0
mmc_send_cmd : timeout: No status update
reading args
spl: error reading image args, err - -1
reading u-boot.img
reading u-boot.img
U-Boot 2013.07 (Aug 09 2013 - 18:03:11)
I2C: ready
DRAM: 512 MiB
WARNING: Caches not enabled
NAND: 0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
Net: <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot: 1
gpio: pin 53 (gpio 53) value is 1
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
SD/MMC found on device 0
reading uEnv.txt
158 bytes read in 8 ms (18.6 KiB/s)
Importing environment from mmc ...
gpio: pin 55 (gpio 55) value is 1
Checking if uenvcmd is set ...
gpio: pin 56 (gpio 56) value is 1
Running uenvcmd ...
reading bsd.umg
4628976 bytes read in 529 ms (8.3 MiB/s)
## Booting kernel from Legacy Image at 82800000 ...
Image Name: boot
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4628912 Bytes = 4.4 MiB
Load Address: 80300000
Entry Point: 80300000
Verifying Checksum ... OK
Loading Kernel Image ... OK
Starting kernel ...
OpenBSD/omap booting ...
arg0 0x0 arg1 0xe05 arg2 0x80000100
atag core flags 0 pagesize 0 rootdev 0
atag cmdline [sd0i:/bsd.umg]
atag mem start 0x80000000 size 0x20000000
bootfile: sd0i:/bsd.umg
bootargs:
memory size derived from u-boot
bootconf.mem[0].address = 80000000 pages 131072/0x20000000
Allocating page tables
freestart = 0x8076b000, free_pages = 129173 (0x0001f895)
IRQ stack: p0x80799000 v0xc0799000
ABT stack: p0x8079a000 v0xc079a000
UND stack: p0x8079b000 v0xc079b000
SVC stack: p0x8079c000 v0xc079c000
Creating L1 page table at 0x8076c000
Mapping kernel
Constructing L2 page tables
undefined page pmap [ using 391816 bytes of bsd ELF symbol table ]
board type: 3589
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2015 OpenBSD. All rights reserved. http://www.OpenBSD.org
OpenBSD 5.8 (GENERIC) #120: Sat Aug 15 21:55:32 AEST 2015
jsg@armv7.jsg.id.au:/usr/src/sys/arch/armv7/compile/GENERIC
real mem = 536870912 (512MB)
avail mem = 517922816 (493MB)
warning: no entropy supplied by boot loader
mainbus0 at root
cpu0 at mainbus0: ARM Cortex A8 R3 rev 2 (ARMv7 core)
cpu0: DC enabled IC enabled WB disabled EABT branch prediction enabled
cpu0: 32KB(64b/l,4way) I-cache, 32KB(64b/l,4way) wr-back D-cache
omap0 at mainbus0: TI AM335x BeagleBone
prcm0 at omap0 rev 0.2
sitaracm0 at omap0: control module, rev 1.0
intc0 at omap0 rev 5.0
edma0 at omap0 rev 0.0
dmtimer0 at omap0 rev 3.1
dmtimer1 at omap0 rev 3.1
omdog0 at omap0 rev 0.1
omgpio0 at omap0: rev 0.1
gpio0 at omgpio0: 32 pins
omgpio1 at omap0: rev 0.1
gpio1 at omgpio1: 32 pins
omgpio2 at omap0: rev 0.1
gpio2 at omgpio2: 32 pins
omgpio3 at omap0: rev 0.1
gpio3 at omgpio3: 32 pins
omap0: device tiiic unit 0 not configured
omap0: device tiiic unit 1 not configured
omap0: device tiiic unit 2 not configured
ommmc0 at omap0
sdmmc0 at ommmc0
ommmc1 at omap0
sdmmc1 at ommmc1
com0 at omap0: ti16750, 64 byte fifo
com0: console
cpsw0 at omap0: version 1.12 (0), address 90:59:af:xx:xx:xx
ukphy0 at cpsw0 phy 0: Generic IEEE 802.3u media interface, rev. 1: OUI 0x0001f0, model 0x000f
scsibus0 at sdmmc0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <SD/MMC, Drive #01, > SCSI2 0/direct fixed
sd0: 29476MB, 512 bytes/sector, 60367872 sectors
scsibus1 at sdmmc1: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: <SD/MMC, Drive #01, > SCSI2 0/direct fixed
sd1: 1832MB, 512 bytes/sector, 3751936 sectors
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
boot device: sd0
root on sd0a (5de4d5273f3a350c.a) swap on sd0b dump on sd0b
WARNING: CHECK AND RESET THE DATE!
Automatic boot in progress: starting file system checks.
/dev/sd0a (5de4d5273f3a350c.a): file system is clean; not checking
/dev/sd0l (5de4d5273f3a350c.l): file system is clean; not checking
/dev/sd0d (5de4d5273f3a350c.d): file system is clean; not checking
/dev/sd0f (5de4d5273f3a350c.f): file system is clean; not checking
/dev/sd0g (5de4d5273f3a350c.g): file system is clean; not checking
/dev/sd0h (5de4d5273f3a350c.h): file system is clean; not checking
/dev/sd0k (5de4d5273f3a350c.k): file system is clean; not checking
/dev/sd0j (5de4d5273f3a350c.j): file system is clean; not checking
/dev/sd0e (5de4d5273f3a350c.e): file system is clean; not checking
setting tty flags
pf enabled
starting network
DHCPREQUEST on cpsw0 to 255.255.255.255
DHCPREQUEST on cpsw0 to 255.255.255.255
DHCPDISCOVER on cpsw0 - interval 3
DHCPOFFER from 192.168.xxx.x (00:00:24:xx:xx:xx)
DHCPREQUEST on cpsw0 to 255.255.255.255
DHCPACK from 192.168.xxx.x (00:00:24:xx:xx:xx)
bound to 192.168.xxx.xxx -- renewal in 21600 seconds.
starting early daemons: syslogd pflogd ntpd.
starting RPC daemons:.
savecore: no core dump
checking quotas: done.
clearing /tmp
kern.securelevel: 0 -> 1
creating runtime link editor directory cache.
preserving editor files.
starting network daemons: sshd smtpd sndiod.
starting local daemons: cron.
Mon Aug 17 17:46:57 CDT 2015
OpenBSD/armv7 (bbb.xxxxxxxx) (console)
login: