Difference between revisions of "User:Mjb/FreeBSD on BeagleBone Black"

From Offset
Jump to navigationJump to search
(Networking)
(Initial installation)
Line 5: Line 5:
 
==Initial installation==
 
==Initial installation==
  
# Get a compressed snapshot (.img.xz file) from [ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/ FreeBSD's ARMv6 snapshots] on ftp.freebsd.org. At the beginning of July 2015, when the latest production version was 10.1-RELEASE, I first tried a 10.1 snapshot. However, it was unable to fully boot and mount the root file system. I asked about it on [https://webchat.freenode.net/ Freenode IRC] (channel #freebsd-embedded) and was advised that 11-CURRENT was the better choice for ARM support, at the moment. Indeed, the June 30th 11.0-CURRENT snapshot works like a charm...except for networking. 10.2-STABLE should be usable in the next snapshot.
+
# Get a compressed snapshot (.img.xz file) from [ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/ FreeBSD's ARMv6 snapshots] on ftp.freebsd.org. At the beginning of July 2015, when the latest production version was 10.1-RELEASE, I first tried a 10.1 snapshot. However, it was unable to fully boot and mount the root file system. I asked about it on [https://webchat.freenode.net/ Freenode IRC] (channel #freebsd-embedded) and was advised that 11-CURRENT was the better choice for ARM support, at the moment. Indeed, the June 30th 11.0-CURRENT snapshot works like a charm...except for networking. They said 10.2-STABLE should be usable in the next snapshot. I put it off until September and used the Sep. 3rd snapshot of 10.2, which worked fine.
 +
 
 
# Uncompress it (e.g., with 7-Zip).
 
# Uncompress it (e.g., with 7-Zip).
 
# Use a disk image writing program (e.g. [http://sourceforge.net/projects/win32diskimager/ Win32DiskImager], or 'dd' on BSD/Linux) to write the image to a micro SD card. I use a 64 GB card via a USB adapter in my PC.
 
# Use a disk image writing program (e.g. [http://sourceforge.net/projects/win32diskimager/ Win32DiskImager], or 'dd' on BSD/Linux) to write the image to a micro SD card. I use a 64 GB card via a USB adapter in my PC.
 
# With power off, insert the micro SD card in the BBB.
 
# With power off, insert the micro SD card in the BBB.
 +
# Attach the LAN cable.
 
# Hold the boot button (it's the button near the card) and plug in the BBB. Keep holding the boot button for a few seconds to be sure it boots from the micro SD card. It will remember to boot from the card until the power is cut. Don't worry, there's a way to make it always boot from the SD card, but you don't want to do that until you're sure the OS on the SD card is working.
 
# Hold the boot button (it's the button near the card) and plug in the BBB. Keep holding the boot button for a few seconds to be sure it boots from the micro SD card. It will remember to boot from the card until the power is cut. Don't worry, there's a way to make it always boot from the SD card, but you don't want to do that until you're sure the OS on the SD card is working.
  
This is what I got the first time I booted 11-CURRENT:
+
This is what I got the first time I booted 10.2-STABLE:
  
<pre>-Boot SPL 2014.10 (Jul 01 2015 - 02:18:55)
+
<pre>
 +
U-Boot SPL 2014.10 (Sep 04 2015 - 06:57:44)
 
MMC: block number 0x100 exceeds max(0x0)
 
MMC: block number 0x100 exceeds max(0x0)
 
MMC: block number 0x200 exceeds max(0x0)
 
MMC: block number 0x200 exceeds max(0x0)
Line 23: Line 26:
  
  
U-Boot 2014.10 (Jul 01 2015 - 02:18:55)
+
U-Boot 2014.10 (Sep 04 2015 - 06:57:44)
  
 
       Watchdog enabled
 
       Watchdog enabled
Line 35: Line 38:
  
 
Net:  <ethaddr> not set. Validating first E-fuse MAC
 
Net:  <ethaddr> not set. Validating first E-fuse MAC
Phy not found
 
 
cpsw, usb_ether
 
cpsw, usb_ether
 
reading uEnv.txt
 
reading uEnv.txt
Line 42: Line 44:
 
Booting from: mmc 0 ubldr
 
Booting from: mmc 0 ubldr
 
reading ubldr
 
reading ubldr
260690 bytes read in 19 ms (13.1 MiB/s)
+
252090 bytes read in 18 ms (13.4 MiB/s)
## Starting application at 0x88000094 ...
+
## Starting application at 0x88000054 ...
 
Consoles: U-Boot console
 
Consoles: U-Boot console
 
Compatible U-Boot API signature found @9e731510
 
Compatible U-Boot API signature found @9e731510
  
 
FreeBSD/armv6 U-Boot loader, Revision 1.2
 
FreeBSD/armv6 U-Boot loader, Revision 1.2
(root@releng2.nyi.freebsd.org, Wed Jul 1 02:37:43 UTC 2015)
+
(root@releng1.nyi.freebsd.org, Fri Sep 4 07:06:47 UTC 2015)
  
 
DRAM: 512MB
 
DRAM: 512MB
Line 55: Line 57:
 
Found U-Boot device: disk
 
Found U-Boot device: disk
 
   Checking unit=0 slice=<auto> partition=<auto>... good.
 
   Checking unit=0 slice=<auto> partition=<auto>... good.
/
+
/boot/kernel/kernel data=0x5942cc+0x2fd34 syms=[0x4+0x6ec20+0x4+0x58920]
/boot/kernel/kernel data=0x56cf58+0x10f0a8 syms=[0x4+0x670b0+0x4+0x6b377]
+
 
 
Hit [Enter] to boot immediately, or any other key for command prompt.
 
Hit [Enter] to boot immediately, or any other key for command prompt.
 
Booting [/boot/kernel/kernel]...
 
Booting [/boot/kernel/kernel]...
/boot/dtb/beaglebone-black.dtb size=0x7a86
 
 
Loaded DTB from file 'beaglebone-black.dtb'.
 
Loaded DTB from file 'beaglebone-black.dtb'.
 
Kernel entry at 0x88200100...
 
Kernel entry at 0x88200100...
Line 69: Line 70:
 
         The Regents of the University of California. All rights reserved.
 
         The Regents of the University of California. All rights reserved.
 
FreeBSD is a registered trademark of The FreeBSD Foundation.
 
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.0-CURRENT #0 r284969: Wed Jul 1 02:43:13 UTC 2015
+
FreeBSD 10.2-STABLE #0 r287435: Fri Sep 4 07:10:27 UTC 2015
     root@releng2.nyi.freebsd.org:/usr/obj/arm.armv6/usr/src/sys/BEAGLEBONE arm
+
     root@releng1.nyi.freebsd.org:/usr/obj/arm.armv6/usr/src/sys/BEAGLEBONE arm
FreeBSD clang version 3.6.1 (tags/RELEASE_361/final 237755) 20150525
+
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
WARNING: WITNESS option enabled, expect reduced performance.
 
VT: init without driver.
 
 
CPU: Cortex A8-r3 rev 2 (Cortex-A core)
 
CPU: Cortex A8-r3 rev 2 (Cortex-A core)
 
  Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext
 
  Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext
Line 84: Line 83:
 
  256KB/64B 8-way unified cache WT WB Read-Alloc Write-Alloc
 
  256KB/64B 8-way unified cache WT WB Read-Alloc Write-Alloc
 
real memory  = 536870912 (512 MB)
 
real memory  = 536870912 (512 MB)
avail memory = 512057344 (488 MB)
+
avail memory = 515833856 (491 MB)
 
Texas Instruments AM335x Processor, Revision ES1.2
 
Texas Instruments AM335x Processor, Revision ES1.2
random: entropy device external interface
+
random device not loaded; using insecure entropy
kbd0 at kbdmux0
+
random: <Software, Yarrow> initialized
 
ofwbus0: <Open Firmware Device Tree>
 
ofwbus0: <Open Firmware Device Tree>
 
simplebus0: <Flattened device tree simple bus> on ofwbus0
 
simplebus0: <Flattened device tree simple bus> on ofwbus0
ti_scm0: <TI Control Module> mem 0x44e10000-0x44e107fb on ofwbus0
 
ti_pinmux0: <TI Pinmux Module> mem 0x44e10800-0x44e10a37 on ofwbus0
 
am335x_prcm0: <AM335x Power and Clock Management> mem 0x44e00000-0x44e03fff on simplebus0
 
am335x_prcm0: Clocks: System 24.0 MHz, CPU 1000 MHz
 
ti_scm_probe: multiple SCM modules in device tree data, ignoring
 
 
aintc0: <TI AINTC Interrupt Controller> mem 0x48200000-0x48200fff on simplebus0
 
aintc0: <TI AINTC Interrupt Controller> mem 0x48200000-0x48200fff on simplebus0
 
aintc0: Revision 5.0
 
aintc0: Revision 5.0
ti_edma30: <TI EDMA Controller> mem 0x49000000-0x4900ffff,0x44e10f90-0x44e10fcf irq 12,13,14 on simplebus0
+
ti_scm0: <TI Control Module> mem 0x44e10000-0x44e11fff on simplebus0
ti_edma30: EDMA revision 40014c00
+
am335x_prcm0: <AM335x Power and Clock Management> mem 0x44e00000-0x44e012ff on simplebus0
gpio0: <Ti AM335x General Purpose I/O (GPIO)> mem 0x44e07000-0x44e07fff irq 96 on simplebus0
+
am335x_prcm0: Clocks: System 24.0 MHz, CPU 1000 MHz
 +
am335x_dmtimer0: <AM335x DMTimer> mem 0x44e05000-0x44e05fff,0x44e31000-0x44e31fff,0x48040000-0x48040fff,0x48042000-0x48042fff,0x48044000-0x48044fff,0x48046000-0x48046fff,0x48048000-0x48048fff,0x4804a000-0x4804afff irq 66,67,68,69,92,93,94,95 on simplebus0
 +
am335x_dmtimer0: No DMTimer found with capture pin configured as input; PPS driver disabled.
 +
Timecounter "AM335x Timecounter" frequency 24000000 Hz quality 1000
 +
Event timer "AM335x Eventtimer" frequency 24000000 Hz quality 1000
 +
am335x_rtc0: <AM335x RTC (power management mode)> mem 0x44e3e000-0x44e3efff irq 75,76 on simplebus0
 +
am335x_rtc0: AM335X RTC v1.0.6
 +
ti_adc0: <TI ADC controller> mem 0x44e0d000-0x44e0efff irq 16 on simplebus0
 +
ti_adc0: scheme: 0x1 func: 0x730 rtl: 0 rev: 0.1 custom rev: 0
 +
ti_wdt0: <TI Watchdog Timer> mem 0x44e35000-0x44e35fff irq 91 on simplebus0
 +
gpio0: <TI General Purpose I/O (GPIO)> mem 0x44e07000-0x44e07fff,0x4804c000-0x4804cfff,0x481ac000-0x481acfff,0x481ae000-0x481aefff irq 96,97,98,99,32,33,62,63 on simplebus0
 +
gpioc0: <GPIO controller> on gpio0
 
gpiobus0: <OFW GPIO bus> on gpio0
 
gpiobus0: <OFW GPIO bus> on gpio0
gpioc0: <GPIO controller> on gpio0
+
gpioled0: <GPIO led> at pin(s) 53 on gpiobus0
gpio1: <Ti AM335x General Purpose I/O (GPIO)> mem 0x4804c000-0x4804cfff irq 98 on simplebus0
+
gpioled1: <GPIO led> at pin(s) 54 on gpiobus0
gpiobus1: <OFW GPIO bus> on gpio1
+
gpioled2: <GPIO led> at pin(s) 55 on gpiobus0
gpioled0: <GPIO led> at pin(s) 21 on gpiobus1
+
gpioled3: <GPIO led> at pin(s) 56 on gpiobus0
gpioled1: <GPIO led> at pin(s) 22 on gpiobus1
+
uart0: <TI UART (16550 compatible)> mem 0x44e09000-0x44e09fff irq 72 on simplebus0
gpioled2: <GPIO led> at pin(s) 23 on gpiobus1
 
gpioled3: <GPIO led> at pin(s) 24 on gpiobus1
 
gpioc1: <GPIO controller> on gpio1
 
gpio2: <Ti AM335x General Purpose I/O (GPIO)> mem 0x481ac000-0x481acfff irq 32 on simplebus0
 
gpiobus2: <OFW GPIO bus> on gpio2
 
gpioc2: <GPIO controller> on gpio2
 
gpio3: <Ti AM335x General Purpose I/O (GPIO)> mem 0x481ae000-0x481aefff irq 62 on simplebus0
 
gpiobus3: <OFW GPIO bus> on gpio3
 
gpioc3: <GPIO controller> on gpio3
 
uart0: <TI UART (16550 compatible)> mem 0x44e09000-0x44e0afff irq 72 on simplebus0
 
 
uart0: console (115384,n,8,1)
 
uart0: console (115384,n,8,1)
 +
ti_edma30: <TI EDMA Controller> mem 0x49000000-0x490fffff,0x49800000-0x498fffff,0x49900000-0x499fffff,0x49a00000-0x49afffff irq 12,13,14 on simplebus0
 +
ti_edma30: EDMA revision 40014c00
 +
sdhci_ti0: <TI MMCHS (SDHCI 2.0)> mem 0x48060000-0x48060fff irq 64 on simplebus0
 +
mmc0: <MMC/SD bus> on sdhci_ti0
 +
sdhci_ti1: <TI MMCHS (SDHCI 2.0)> mem 0x481d8000-0x481d8fff irq 28 on simplebus0
 +
mmc1: <MMC/SD bus> on sdhci_ti1
 +
cpsw0: <3-port Switch Ethernet Subsystem> mem 0x4a100000-0x4a103fff irq 40,41,42,43 on simplebus0
 +
cpsw0: CPSW SS Version 1.12 (0)
 +
cpsw0: Initial queue size TX=128 RX=384
 +
miibus0: <MII bus> on cpsw0
 +
smscphy0: <SMC LAN8710A 10/100 interface> PHY 0 on miibus0
 +
smscphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 +
cpsw0: Ethernet address: 84:eb:18:e2:8e:56
 
iichb0: <TI I2C Controller> mem 0x44e0b000-0x44e0bfff irq 70 on simplebus0
 
iichb0: <TI I2C Controller> mem 0x44e0b000-0x44e0bfff irq 70 on simplebus0
 
iichb0: I2C revision 4.0 FIFO size: 32 bytes
 
iichb0: I2C revision 4.0 FIFO size: 32 bytes
 
iicbus0: <OFW I2C bus> on iichb0
 
iicbus0: <OFW I2C bus> on iichb0
 
iic0: <I2C generic I/O> on iicbus0
 
iic0: <I2C generic I/O> on iicbus0
am335x_pmic0: <TI TPS65217 Power Management IC> at addr 0x24 irq 7 on iicbus0
+
am335x_pmic0: <TI TPS65217 Power Management IC> at addr 0x48 on iicbus0
tda0 at addr 0x70 on iicbus0
+
iichb1: <TI I2C Controller> mem 0x4802a000-0x4802afff irq 71 on simplebus0
sdhci_ti0: <TI MMCHS (SDHCI 2.0)> mem 0x48060000-0x48060fff irq 64 on simplebus0
+
iichb1: I2C revision 4.0 FIFO size: 32 bytes
mmc0: <MMC/SD bus> on sdhci_ti0
+
iicbus1: <OFW I2C bus> on iichb1
sdhci_ti1: <TI MMCHS (SDHCI 2.0)> mem 0x481d8000-0x481d8fff irq 28 on simplebus0
+
iic1: <I2C generic I/O> on iicbus1
mmc1: <MMC/SD bus> on sdhci_ti1
+
iichb2: <TI I2C Controller> mem 0x4819c000-0x4819cfff irq 30 on simplebus0
ti_wdt0: <TI Watchdog Timer> mem 0x44e35000-0x44e35fff irq 91 on simplebus0
+
iichb2: I2C revision 4.0 FIFO size: 32 bytes
ti_mbox0: <TI System Mailbox> mem 0x480c8000-0x480c81ff irq 77 on simplebus0
+
iicbus2: <OFW I2C bus> on iichb2
ti_mbox0: revision 4.0
+
iic2: <I2C generic I/O> on iicbus2
am335x_dmtimer0: <AM335x DMTimer> mem 0x44e31000-0x44e313ff irq 67 on simplebus0
+
am335x_pwm0: <AM335x PWM> mem 0x48300000-0x483000ff,0x48300100-0x4830017f,0x48300180-0x483001ff,0x48300200-0x4830025f irq 86,58 on simplebus0
am335x_dmtimer1: <AM335x DMTimer> mem 0x48040000-0x480403ff irq 68 on simplebus0
+
am335x_pwm1: <AM335x PWM> mem 0x48302000-0x483020ff,0x48302100-0x4830217f,0x48302180-0x483021ff,0x48302200-0x4830225f irq 87,59 on simplebus0
Timecounter "AM335x Timecounter" frequency 24000000 Hz quality 1000
+
am335x_pwm2: <AM335x PWM> mem 0x48304000-0x483040ff,0x48304100-0x4830417f,0x48304180-0x483041ff,0x48304200-0x4830425f irq 88,60 on simplebus0
am335x_dmtimer2: <AM335x DMTimer> mem 0x48042000-0x480423ff irq 69 on simplebus0
+
musbotg0: <TI AM33xx integrated USB OTG controller> mem 0x47400000-0x47400fff,0x47401000-0x474012ff,0x47401300-0x474013ff,0x47401400-0x474017ff,0x47401800-0x47401aff,0x47401b00-0x47401bff,0x47401c00-0x47401fff irq 17,18,19 on simplebus0
Event timer "AM335x Eventtimer" frequency 24000000 Hz quality 1000
+
musbotg0: TI AM335X USBSS v0.0.13
am335x_dmtimer3: <AM335x DMTimer> mem 0x48044000-0x480443ff irq 92 on simplebus0
 
am335x_dmtimer4: <AM335x DMTimer> mem 0x48046000-0x480463ff irq 93 on simplebus0
 
am335x_dmtimer5: <AM335x DMTimer> mem 0x48048000-0x480483ff irq 94 on simplebus0
 
am335x_dmtimer6: <AM335x DMTimer> mem 0x4804a000-0x4804a3ff irq 95 on simplebus0
 
am335x_rtc0: <AM335x RTC (power management mode)> mem 0x44e3e000-0x44e3efff irq 75,76 on simplebus0
 
am335x_rtc0: AM335X RTC v1.0.6
 
usbss0: <TI AM33xx integrated USB OTG controller> mem 0x47400000-0x47400fff on simplebus0
 
usbss0: TI AM335X USBSS v0.0.13
 
musbotg0: <TI AM33xx integrated USB OTG controller> mem 0x47401400-0x474017ff,0x47401000-0x474011ff irq 18 on usbss0
 
 
usbus0: Dynamic FIFO sizing detected, assuming 16Kbytes of FIFO RAM
 
usbus0: Dynamic FIFO sizing detected, assuming 16Kbytes of FIFO RAM
 
usbus0 on musbotg0
 
usbus0 on musbotg0
musbotg1: <TI AM33xx integrated USB OTG controller> mem 0x47401c00-0x47401fff,0x47401800-0x474019ff irq 19 on usbss0
 
 
usbus1: Dynamic FIFO sizing detected, assuming 16Kbytes of FIFO RAM
 
usbus1: Dynamic FIFO sizing detected, assuming 16Kbytes of FIFO RAM
usbus1 on musbotg1
+
usbus1 on musbotg0
cpsw0: <3-port Switch Ethernet Subsystem> mem 0x4a100000-0x4a1007ff,0x4a101200-0x4a1012ff irq 40,41,42,43 on simplebus0
 
cpsw0: CPSW SS Version 1.12 (0)
 
cpsw0: Initial queue size TX=128 RX=384
 
cpsw0: Failed to read from PHY.
 
cpsw0: attaching PHYs failed
 
device_attach: cpsw0 attach returned 6
 
fb0: <AM335x LCD controller> mem 0x4830e000-0x4830efff irq 36 on simplebus0
 
ti_adc0: <TI ADC controller> mem 0x44e0d000-0x44e0dfff irq 16 disabled on simplebus0
 
ti_adc0: scheme: 0x1 func: 0x730 rtl: 0 rev: 0.1 custom rev: 0
 
 
ti_pruss0: <TI Programmable Realtime Unit Subsystem> mem 0x4a300000-0x4a37ffff irq 20,21,22,23,24,25,26,27 on simplebus0
 
ti_pruss0: <TI Programmable Realtime Unit Subsystem> mem 0x4a300000-0x4a37ffff irq 20,21,22,23,24,25,26,27 on simplebus0
 
ti_pruss0: AM33xx PRU-ICSS
 
ti_pruss0: AM33xx PRU-ICSS
Line 163: Line 152:
 
usbus0: 480Mbps High Speed USB v2.0
 
usbus0: 480Mbps High Speed USB v2.0
 
usbus1: 480Mbps High Speed USB v2.0
 
usbus1: 480Mbps High Speed USB v2.0
am335x_pmic0: TPS65217C ver 1.2 powered by AC
+
uugen1.1: <Mentor Graphics> at usbus1
tda0: TDA19988
 
ugen1.1: <Mentor Graphics> at usbus1
 
 
uhub0: <Mentor Graphics OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
 
uhub0: <Mentor Graphics OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
ugen0.1: <Mentor Graphics> at usbus0
+
gen0.1: <Mentor Graphics> at usbus0
 
uhub1: <Mentor Graphics OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
 
uhub1: <Mentor Graphics OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
 +
mmcsd0: 64GB <SDHC 00000 1.0 SN 0A1806A0 MFG 02/2015 by 27 SM> at mmc0 48.0MHz/4bit/65535-block
 +
uhub1: 1 port with 1 removable, self powered
 
uhub0: 1 port with 1 removable, self powered
 
uhub0: 1 port with 1 removable, self powered
uhub1: 1 port with 1 removable, self powered
+
mmc1: CMD6 failed, RESULT: 1
tda0: failed to read EDID
 
mmc0: CMD7 failed, RESULT: 1
 
mmcsd0: 64GB <SDHC 00000 1.0 SN 0A1806A0 MFG 02/2015 by 27 SM> at mmc0 48.0MHz/4bit/65535-block
 
 
mmcsd1: 4GB <MMCHC S10004 0.8 SN 34D2DDBF MFG 02/1999 by 112 0x0000> at mmc1 48.0MHz/8bit/65535-block
 
mmcsd1: 4GB <MMCHC S10004 0.8 SN 34D2DDBF MFG 02/1999 by 112 0x0000> at mmc1 48.0MHz/8bit/65535-block
WARNING: WITNESS option enabled, expect reduced performance.
+
am335x_pmic0: TPS65217C ver 1.2 powered by AC
 +
random: unblocking device.
 
Trying to mount root from ufs:/dev/ufs/rootfs [rw]...
 
Trying to mount root from ufs:/dev/ufs/rootfs [rw]...
 
warning: no time-of-day clock registered, system time will not be set accurately
 
warning: no time-of-day clock registered, system time will not be set accurately
Line 184: Line 171:
 
mmcsd0s2a resized
 
mmcsd0s2a resized
 
super-block backups (for fsck_ffs -b #) at:
 
super-block backups (for fsck_ffs -b #) at:
  2093248, 2616512, 3139776, 3663040, 4186304, 4709568, 5232832, 5756096,
+
  979136, 1223872, 1468608, 1713344, 1958080, 2202816, 2447552, 2692288,
  6279360, 6802624, 7325888, 7849152, 8372416, 8895680, 9418944, 9942208,
+
  2937024, 3181760, 3426496, 3671232, 3915968, 4160704, 4405440, 4650176,
  10465472, 10988736, 11512000, 12035264, 12558528, 13081792, 13605056,
+
  4894912, 5139648, 5384384, 5629120, 5873856, 6118592, 6363328, 6608064,
  14128320, 14651584, 15174848, 15698112, 16221376, 16744640, 17267904,
+
6852800, 7097536, 7342272, 7587008, 7831744, 8076480, 8321216, 8565952,
  17791168, 18314432, 18837696, 19360960, 19884224, 20407488, 20930752,
+
8810688, 9055424, 9300160, 9544896, 9789632, 10034368, 10279104, 10523840,
  21454016, 21977280, 22500544, 23023808, 23547072, 24070336, 24593600,
+
10768576, 11013312, 11258048, 11502784, 11747520, 11992256, 12236992,
  25116864, 25640128, 26163392, 26686656, 27209920, 27733184, 28256448,
+
12481728, 12726464, 12971200, 13215936, 13460672, 13705408, 13950144,
  28779712, 29302976, 29826240, 30349504, 30872768, 31396032, 31919296,
+
14194880, 14439616, 14684352, 14929088, 15173824, 15418560, 15663296,
  32442560, 32965824, 33489088, 34012352, 34535616, 35058880, 35582144,
+
15908032, 16152768, 16397504, 16642240, 16886976, 17131712, 17376448,
  36105408, 36628672, 37151936, 37675200, 38198464, 38721728, 39244992,
+
17621184, 17865920, 18110656, 18355392, 18600128, 18844864, 19089600,
  39768256, 40291520, 40814784, 41338048, 41861312, 42384576, 42907840,
+
19334336, 19579072, 19823808, 20068544, 20313280, 20558016, 20802752,
  43431104, 43954368, 44477632, 45000896, 45524160, 46047424, 46570688,
+
  21047488, 21292224, 21536960, 21781696, 22026432, 22271168, 22515904,
  47093952, 47617216, 48140480, 48663744, 49187008, 49710272, 50233536,
+
  22760640, 23005376, 23250112, 23494848, 23739584, 23984320, 24229056,
  50756800, 51280064, 51803328, 52326592, 52849856, 53373120, 53896384,
+
  24473792, 24718528, 24963264, 25208000, 25452736, 25697472, 25942208,
  54419648, 54942912, 55466176, 55989440, 56512704, 57035968, 57559232,
+
  26186944, 26431680, 26676416, 26921152, 27165888, 27410624, 27655360,
  58082496, 58605760, 59129024, 59652288, 60175552, 60698816, 61222080,
+
  27900096, 28144832, 28389568, 28634304, 28879040, 29123776, 29368512,
  61745344, 62268608, 62791872, 63315136, 63838400, 64361664, 64884928,
+
  29613248, 29857984, 30102720, 30347456, 30592192, 30836928, 31081664,
  65408192, 65931456, 66454720, 66977984, 67501248, 68024512, 68547776,
+
  31326400, 31571136, 31815872, 32060608, 32305344, 32550080, 32794816,
  69071040, 69594304, 70117568, 70640832, 71164096, 71687360, 72210624,
+
  33039552, 33284288, 33529024, 33773760, 34018496, 34263232, 34507968,
  72733888, 73257152, 73780416, 74303680, 74826944, 75350208, 75873472,
+
  34752704, 34997440, 35242176, 35486912, 35731648, 35976384, 36221120,
  76396736, 76920000, 77443264, 77966528, 78489792, 79013056, 79536320,
+
  36465856, 36710592, 36955328, 37200064, 37444800, 37689536, 37934272,
  80059584, 80582848, 81106112, 81629376, 82152640, 82675904, 83199168,
+
  38179008, 38423744, 38668480, 38913216, 39157952, 39402688, 39647424,
  83722432, 84245696, 84768960, 85292224, 85815488, 86338752, 86862016,
+
  39892160, 40136896, 40381632, 40626368, 40871104, 41115840, 41360576,
  87385280, 87908544, 88431808, 88955072, 89478336, 90001600, 90524864,
+
  41605312, 41850048, 42094784, 42339520, 42584256, 42828992, 43073728,
  91048128, 91571392, 92094656, 92617920, 93141184, 93664448, 94187712,
+
  43318464, 43563200, 43807936, 44052672, 44297408, 44542144, 44786880,
  94710976, 95234240, 95757504, 96280768, 96804032, 97327296, 97850560,
+
  45031616, 45276352, 45521088, 45765824, 46010560, 46255296, 46500032,
  98373824, 98897088, 99420352, 99943616, 100466880, 100990144, 101513408,
+
  46744768, 46989504, 47234240, 47478976, 47723712, 47968448, 48213184,
  102036672, 102559936, 103083200, 103606464, 104129728, 104652992, 105176256,
+
  48457920, 48702656, 48947392, 49192128, 49436864, 49681600, 49926336,
  105699520, 106222784, 106746048, 107269312, 107792576, 108315840, 108839104,
+
  50171072, 50415808, 50660544, 50905280, 51150016, 51394752, 51639488,
  109362368, 109885632, 110408896, 110932160, 111455424, 111978688, 112501952,
+
  51884224, 52128960, 52373696, 52618432, 52863168, 53107904, 53352640,
  113025216, 113548480, 114071744, 114595008, 115118272, 115641536, 116164800,
+
  53597376, 53842112, 54086848, 54331584, 54576320, 54821056, 55065792,
  116688064, 117211328, 117734592, 118257856, 118781120, 119304384, 119827648,
+
  55310528, 55555264, 55800000, 56044736, 56289472, 56534208, 56778944,
  120350912, 120874176, 121397440, 121920704, 122443968, 122967232, 123490496,
+
  57023680, 57268416, 57513152, 57757888, 58002624, 58247360, 58492096,
  124013760, 124537024
+
  58736832, 58981568, 59226304, 59471040, 59715776, 59960512, 60205248,
random: unblocking device.
+
  60449984, 60694720, 60939456, 61184192, 61428928, 61673664, 61918400,
/etc/rc: WARNING: hostid: unable to figure out a UUID from DMI data, generating a new one
+
  62163136, 62407872, 62652608, 62897344, 63142080, 63386816, 63631552,
Setting hostuuid: 95d0873f-1f9c-11e5-b260-0d8dd5fe3433.
+
  63876288, 64121024, 64365760, 64610496, 64855232, 65099968, 65344704,
Setting hostid: 0x66ac9b5e.
+
  65589440, 65834176, 66078912, 66323648, 66568384, 66813120, 67057856,
No suitable dump device was found.
+
  67302592, 67547328, 67792064, 68036800, 68281536, 68526272, 68771008,
 +
  69015744, 69260480, 69505216, 69749952, 69994688, 70239424, 70484160,
 +
  70728896, 70973632, 71218368, 71463104, 71707840, 71952576, 72197312,
 +
  72442048, 72686784, 72931520, 73176256, 73420992, 73665728, 73910464,
 +
74155200, 74399936, 74644672, 74889408, 75134144, 75378880, 75623616,
 +
75868352, 76113088, 76357824, 76602560, 76847296, 77092032, 77336768,
 +
77581504, 77826240, 78070976, 78315712, 78560448, 78805184, 79049920,
 +
79294656, 79539392, 79784128, 80028864, 80273600, 80518336, 80763072,
 +
81007808, 81252544, 81497280, 81742016, 81986752, 82231488, 82476224,
 +
82720960, 82965696, 83210432, 83455168, 83699904, 83944640, 84189376,
 +
84434112, 84678848, 84923584, 85168320, 85413056, 85657792, 85902528,
 +
86147264, 86392000, 86636736, 86881472, 87126208, 87370944, 87615680,
 +
87860416, 88105152, 88349888, 88594624, 88839360, 89084096, 89328832,
 +
89573568, 89818304, 90063040, 90307776, 90552512, 90797248, 91041984,
 +
91286720, 91531456, 91776192, 92020928, 92265664, 92510400, 92755136,
 +
92999872, 93244608, 93489344, 93734080, 93978816, 94223552, 94468288,
 +
94713024, 94957760, 95202496, 95447232, 95691968, 95936704, 96181440,
 +
96426176, 96670912, 96915648, 97160384, 97405120, 97649856, 97894592,
 +
98139328, 98384064, 98628800, 98873536, 99118272, 99363008, 99607744,
 +
99852480, 100097216, 100341952, 100586688, 100831424, 101076160, 101320896,
 +
101565632, 101810368, 102055104, 102299840, 102544576, 102789312, 103034048,
 +
103278784, 103523520, 103768256, 104012992, 104257728, 104502464, 104747200,
 +
104991936, 105236672, 105481408, 105726144, 105970880, 106215616, 106460352,
 +
106705088, 106949824, 107194560, 107439296, 107684032, 107928768, 108173504,
 +
108418240, 108662976, 108907712, 109152448, 109397184, 109641920, 109886656,
 +
110131392, 110376128, 110620864, 110865600, 111110336, 111355072, 111599808,
 +
111844544, 112089280, 112334016, 112578752, 112823488, 113068224, 113312960,
 +
113557696, 113802432, 114047168, 114291904, 114536640, 114781376, 115026112,
 +
115270848, 115515584, 115760320, 116005056, 116249792, 116494528, 116739264,
 +
116984000, 117228736, 117473472, 117718208, 117962944, 118207680, 118452416,
 +
118697152, 118941888, 119186624, 119431360, 119676096, 119920832, 120165568,
 +
120410304, 120655040, 120899776, 121144512, 121389248, 121633984, 121878720,
 +
122123456, 122368192, 122612928, 122857664, 123102400, 123347136, 123591872,
 +
123836608, 124081344, 124326080, 124570816, 124815552
 +
</pre>
 +
 
 +
There was a very long delay at this point, over 5 minutes! But then it continued...
 +
 
 +
<pre>
 +
Setting hostuuid: 5ea8c19a-52d6-11e5-b87f-84eb18e28e56.
 +
Setting hostid: 0x835fb287.
 +
Entropy harvesting: interrupts ethernet point_to_point swi.
 
Starting file system checks:
 
Starting file system checks:
 
/dev/ufs/rootfs: FILE SYSTEM CLEAN; SKIPPING CHECKS
 
/dev/ufs/rootfs: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/ufs/rootfs: clean, 15017884 free (28 frags, 1877232 blocks, 0.0% fragmentation)
+
/dev/ufs/rootfs: clean, 15022057 free (297 frags, 1877720 blocks, 0.0% fragmentation)
 
Mounting local file systems:.
 
Mounting local file systems:.
 +
Writing entropy file:.
 
Setting hostname: beaglebone.
 
Setting hostname: beaglebone.
Setting up harvesting:[HIGH_PERFORMANCE],[FS_ATIME],SWI,INTERRUPT,NET_NG,NET_ETHER,NET_TUN,MOUSE,KEYBOARD,ATTACH,CACHED
+
cpsw0: link state changed to UP
Feeding entropy:.
+
Starting Network: lo0 cpsw0.
Starting Network: lo0.
 
 
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
 
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
 
         options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
 
         options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
 
         inet6 ::1 prefixlen 128
 
         inet6 ::1 prefixlen 128
         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
+
         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
 
         inet 127.0.0.1 netmask 0xff000000
 
         inet 127.0.0.1 netmask 0xff000000
        groups: lo
 
 
         nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
 
         nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
ELF ldconfig path: /lib /usr/lib /usr/lib/compat
+
cpsw0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
 +
        options=8000b<RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE>
 +
        ether 84:eb:18:e2:8e:56
 +
        media: Ethernet autoselect (100baseTX <full-duplex>)
 +
        status: active
 +
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
 
Starting devd.
 
Starting devd.
 +
Starting dhclient.
 +
DHCPDISCOVER on cpsw0 to 255.255.255.255 port 67 interval 4
 +
DHCPOFFER from 10.0.1.1
 +
DHCPREQUEST on cpsw0 to 255.255.255.255 port 67
 +
DHCPACK from 10.0.1.1
 +
bound to 10.0.1.12 -- renewal in 43200 seconds.
 
add net fe80::: gateway ::1
 
add net fe80::: gateway ::1
 
add net ff02::: gateway ::1
 
add net ff02::: gateway ::1
Line 247: Line 285:
 
Creating and/or trimming log files.
 
Creating and/or trimming log files.
 
Starting syslogd.
 
Starting syslogd.
Starting casperd.
+
ELF ldconfig path: /lib /usr/lib /usr/lib/compat
 
Clearing /tmp (X related).
 
Clearing /tmp (X related).
 
Updating motd:.
 
Updating motd:.
 
Mounting late file systems:.
 
Mounting late file systems:.
 
Generating RSA1 host key.
 
Generating RSA1 host key.
2048 00:0b:b2:0e:b6:35:58:e2:c9:4e:b0:45:b4:1b:6b:0b root@beaglebone (RSA1)
+
2048 f1:53:3e:f9:74:fb:bb:08:14:d6:57:94:4e:aa:36:ae root@beaglebone (RSA1)
 
Generating RSA host key.
 
Generating RSA host key.
2048 d7:01:ce:25:45:b4:5d:61:69:e4:81:b3:e5:fc:b5:bf root@beaglebone (RSA)
+
2048 47:21:62:69:62:1f:df:ed:ec:6f:e8:7b:85:d1:6b:09 root@beaglebone (RSA)
 
Generating DSA host key.
 
Generating DSA host key.
1024 9d:54:fd:dd:6e:1e:76:71:be:5e:03:49:f6:4c:1c:3c root@beaglebone (DSA)
+
1024 fb:4e:ce:a7:bc:13:ca:4d:70:ca:c8:c4:67:89:fe:bb root@beaglebone (DSA)
 
Generating ECDSA host key.
 
Generating ECDSA host key.
256 bc:27:e2:e1:dd:06:33:b3:95:f0:26:85:9d:40:15:cf root@beaglebone (ECDSA)
+
256 ea:7c:5d:06:ae:c8:cc:03:09:4d:50:3c:54:f2:d4:a5 root@beaglebone (ECDSA)
 
Generating ED25519 host key.
 
Generating ED25519 host key.
256 a8:13:f1:f0:70:84:85:8f:72:63:a3:af:a3:dd:cd:e5 root@beaglebone (ED25519)
+
256 18:25:25:36:1e:5c:c6:cc:a3:58:84:6a:cd:d2:17:db root@beaglebone (ED25519)
 
Performing sanity check on sshd configuration.
 
Performing sanity check on sshd configuration.
 
Starting sshd.
 
Starting sshd.
Line 266: Line 304:
 
Starting background file system checks in 60 seconds.
 
Starting background file system checks in 60 seconds.
  
Wed Jul 1 02:56:01 UTC 2015
+
Fri Sep 4 07:27:53 UTC 2015
  
 
FreeBSD/arm (beaglebone) (ttyu0)
 
FreeBSD/arm (beaglebone) (ttyu0)

Revision as of 20:39, 8 September 2015

I'm experimenting with running FreeBSD on a BeagleBone Black (revision C).

See also my BeagleBone Black notes.

Initial installation

  1. Get a compressed snapshot (.img.xz file) from FreeBSD's ARMv6 snapshots on ftp.freebsd.org. At the beginning of July 2015, when the latest production version was 10.1-RELEASE, I first tried a 10.1 snapshot. However, it was unable to fully boot and mount the root file system. I asked about it on Freenode IRC (channel #freebsd-embedded) and was advised that 11-CURRENT was the better choice for ARM support, at the moment. Indeed, the June 30th 11.0-CURRENT snapshot works like a charm...except for networking. They said 10.2-STABLE should be usable in the next snapshot. I put it off until September and used the Sep. 3rd snapshot of 10.2, which worked fine.
  1. Uncompress it (e.g., with 7-Zip).
  2. Use a disk image writing program (e.g. Win32DiskImager, or 'dd' on BSD/Linux) to write the image to a micro SD card. I use a 64 GB card via a USB adapter in my PC.
  3. With power off, insert the micro SD card in the BBB.
  4. Attach the LAN cable.
  5. Hold the boot button (it's the button near the card) and plug in the BBB. Keep holding the boot button for a few seconds to be sure it boots from the micro SD card. It will remember to boot from the card until the power is cut. Don't worry, there's a way to make it always boot from the SD card, but you don't want to do that until you're sure the OS on the SD card is working.

This is what I got the first time I booted 10.2-STABLE:

U-Boot SPL 2014.10 (Sep 04 2015 - 06:57:44)
MMC: block number 0x100 exceeds max(0x0)
MMC: block number 0x200 exceeds max(0x0)
*** Error - No Valid Environment Area found
Using default environment

reading u-boot.img
reading u-boot.img


U-Boot 2014.10 (Sep 04 2015 - 06:57:44)

       Watchdog enabled
I2C:   ready
DRAM:  512 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
reading u-boot.env

** Unable to read "u-boot.env" from mmc0:1 **
Using default environment

Net:   <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
reading uEnv.txt
** Unable to read file uEnv.txt **
Hit any key to stop autoboot:  0
Booting from: mmc 0 ubldr
reading ubldr
252090 bytes read in 18 ms (13.4 MiB/s)
## Starting application at 0x88000054 ...
Consoles: U-Boot console
Compatible U-Boot API signature found @9e731510

FreeBSD/armv6 U-Boot loader, Revision 1.2
(root@releng1.nyi.freebsd.org, Fri Sep  4 07:06:47 UTC 2015)

DRAM: 512MB
Number of U-Boot devices: 3
U-Boot env: loaderdev='mmc 0'
Found U-Boot device: disk
  Checking unit=0 slice=<auto> partition=<auto>... good.
/boot/kernel/kernel data=0x5942cc+0x2fd34 syms=[0x4+0x6ec20+0x4+0x58920]

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel]...
Loaded DTB from file 'beaglebone-black.dtb'.
Kernel entry at 0x88200100...
Kernel args: (null)
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2015 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 10.2-STABLE #0 r287435: Fri Sep  4 07:10:27 UTC 2015
    root@releng1.nyi.freebsd.org:/usr/obj/arm.armv6/usr/src/sys/BEAGLEBONE arm
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
CPU: Cortex A8-r3 rev 2 (Cortex-A core)
 Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext
 WB disabled EABT branch prediction enabled
LoUU:2 LoC:3 LoUIS:1
Cache level 1:
 32KB/64B 4-way data cache WT WB Read-Alloc
 32KB/64B 4-way instruction cache Read-Alloc
Cache level 2:
 256KB/64B 8-way unified cache WT WB Read-Alloc Write-Alloc
real memory  = 536870912 (512 MB)
avail memory = 515833856 (491 MB)
Texas Instruments AM335x Processor, Revision ES1.2
random device not loaded; using insecure entropy
random: <Software, Yarrow> initialized
ofwbus0: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> on ofwbus0
aintc0: <TI AINTC Interrupt Controller> mem 0x48200000-0x48200fff on simplebus0
aintc0: Revision 5.0
ti_scm0: <TI Control Module> mem 0x44e10000-0x44e11fff on simplebus0
am335x_prcm0: <AM335x Power and Clock Management> mem 0x44e00000-0x44e012ff on simplebus0
am335x_prcm0: Clocks: System 24.0 MHz, CPU 1000 MHz
am335x_dmtimer0: <AM335x DMTimer> mem 0x44e05000-0x44e05fff,0x44e31000-0x44e31fff,0x48040000-0x48040fff,0x48042000-0x48042fff,0x48044000-0x48044fff,0x48046000-0x48046fff,0x48048000-0x48048fff,0x4804a000-0x4804afff irq 66,67,68,69,92,93,94,95 on simplebus0
am335x_dmtimer0: No DMTimer found with capture pin configured as input; PPS driver disabled.
Timecounter "AM335x Timecounter" frequency 24000000 Hz quality 1000
Event timer "AM335x Eventtimer" frequency 24000000 Hz quality 1000
am335x_rtc0: <AM335x RTC (power management mode)> mem 0x44e3e000-0x44e3efff irq 75,76 on simplebus0
am335x_rtc0: AM335X RTC v1.0.6
ti_adc0: <TI ADC controller> mem 0x44e0d000-0x44e0efff irq 16 on simplebus0
ti_adc0: scheme: 0x1 func: 0x730 rtl: 0 rev: 0.1 custom rev: 0
ti_wdt0: <TI Watchdog Timer> mem 0x44e35000-0x44e35fff irq 91 on simplebus0
gpio0: <TI General Purpose I/O (GPIO)> mem 0x44e07000-0x44e07fff,0x4804c000-0x4804cfff,0x481ac000-0x481acfff,0x481ae000-0x481aefff irq 96,97,98,99,32,33,62,63 on simplebus0
gpioc0: <GPIO controller> on gpio0
gpiobus0: <OFW GPIO bus> on gpio0
gpioled0: <GPIO led> at pin(s) 53 on gpiobus0
gpioled1: <GPIO led> at pin(s) 54 on gpiobus0
gpioled2: <GPIO led> at pin(s) 55 on gpiobus0
gpioled3: <GPIO led> at pin(s) 56 on gpiobus0
uart0: <TI UART (16550 compatible)> mem 0x44e09000-0x44e09fff irq 72 on simplebus0
uart0: console (115384,n,8,1)
ti_edma30: <TI EDMA Controller> mem 0x49000000-0x490fffff,0x49800000-0x498fffff,0x49900000-0x499fffff,0x49a00000-0x49afffff irq 12,13,14 on simplebus0
ti_edma30: EDMA revision 40014c00
sdhci_ti0: <TI MMCHS (SDHCI 2.0)> mem 0x48060000-0x48060fff irq 64 on simplebus0
mmc0: <MMC/SD bus> on sdhci_ti0
sdhci_ti1: <TI MMCHS (SDHCI 2.0)> mem 0x481d8000-0x481d8fff irq 28 on simplebus0
mmc1: <MMC/SD bus> on sdhci_ti1
cpsw0: <3-port Switch Ethernet Subsystem> mem 0x4a100000-0x4a103fff irq 40,41,42,43 on simplebus0
cpsw0: CPSW SS Version 1.12 (0)
cpsw0: Initial queue size TX=128 RX=384
miibus0: <MII bus> on cpsw0
smscphy0: <SMC LAN8710A 10/100 interface> PHY 0 on miibus0
smscphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
cpsw0: Ethernet address: 84:eb:18:e2:8e:56
iichb0: <TI I2C Controller> mem 0x44e0b000-0x44e0bfff irq 70 on simplebus0
iichb0: I2C revision 4.0 FIFO size: 32 bytes
iicbus0: <OFW I2C bus> on iichb0
iic0: <I2C generic I/O> on iicbus0
am335x_pmic0: <TI TPS65217 Power Management IC> at addr 0x48 on iicbus0
iichb1: <TI I2C Controller> mem 0x4802a000-0x4802afff irq 71 on simplebus0
iichb1: I2C revision 4.0 FIFO size: 32 bytes
iicbus1: <OFW I2C bus> on iichb1
iic1: <I2C generic I/O> on iicbus1
iichb2: <TI I2C Controller> mem 0x4819c000-0x4819cfff irq 30 on simplebus0
iichb2: I2C revision 4.0 FIFO size: 32 bytes
iicbus2: <OFW I2C bus> on iichb2
iic2: <I2C generic I/O> on iicbus2
am335x_pwm0: <AM335x PWM> mem 0x48300000-0x483000ff,0x48300100-0x4830017f,0x48300180-0x483001ff,0x48300200-0x4830025f irq 86,58 on simplebus0
am335x_pwm1: <AM335x PWM> mem 0x48302000-0x483020ff,0x48302100-0x4830217f,0x48302180-0x483021ff,0x48302200-0x4830225f irq 87,59 on simplebus0
am335x_pwm2: <AM335x PWM> mem 0x48304000-0x483040ff,0x48304100-0x4830417f,0x48304180-0x483041ff,0x48304200-0x4830425f irq 88,60 on simplebus0
musbotg0: <TI AM33xx integrated USB OTG controller> mem 0x47400000-0x47400fff,0x47401000-0x474012ff,0x47401300-0x474013ff,0x47401400-0x474017ff,0x47401800-0x47401aff,0x47401b00-0x47401bff,0x47401c00-0x47401fff irq 17,18,19 on simplebus0
musbotg0: TI AM335X USBSS v0.0.13
usbus0: Dynamic FIFO sizing detected, assuming 16Kbytes of FIFO RAM
usbus0 on musbotg0
usbus1: Dynamic FIFO sizing detected, assuming 16Kbytes of FIFO RAM
usbus1 on musbotg0
ti_pruss0: <TI Programmable Realtime Unit Subsystem> mem 0x4a300000-0x4a37ffff irq 20,21,22,23,24,25,26,27 on simplebus0
ti_pruss0: AM33xx PRU-ICSS
Timecounters tick every 10.000 msec
usbus0: 480Mbps High Speed USB v2.0
usbus1: 480Mbps High Speed USB v2.0
uugen1.1: <Mentor Graphics> at usbus1
uhub0: <Mentor Graphics OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
gen0.1: <Mentor Graphics> at usbus0
uhub1: <Mentor Graphics OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
mmcsd0: 64GB <SDHC 00000 1.0 SN 0A1806A0 MFG 02/2015 by 27 SM> at mmc0 48.0MHz/4bit/65535-block
uhub1: 1 port with 1 removable, self powered
uhub0: 1 port with 1 removable, self powered
mmc1: CMD6 failed, RESULT: 1
mmcsd1: 4GB <MMCHC S10004 0.8 SN 34D2DDBF MFG 02/1999 by 112 0x0000> at mmc1 48.0MHz/8bit/65535-block
am335x_pmic0: TPS65217C ver 1.2 powered by AC
random: unblocking device.
Trying to mount root from ufs:/dev/ufs/rootfs [rw]...
warning: no time-of-day clock registered, system time will not be set accurately
Growing root partition to fill device
GEOM_PART: mmcsd0s2 was automatically resized.
  Use `gpart commit mmcsd0s2` to save changes or `gpart undo mmcsd0s2` to revert them.
mmcsd0s2 resized
mmcsd0s2a resized
super-block backups (for fsck_ffs -b #) at:
 979136, 1223872, 1468608, 1713344, 1958080, 2202816, 2447552, 2692288,
 2937024, 3181760, 3426496, 3671232, 3915968, 4160704, 4405440, 4650176,
 4894912, 5139648, 5384384, 5629120, 5873856, 6118592, 6363328, 6608064,
 6852800, 7097536, 7342272, 7587008, 7831744, 8076480, 8321216, 8565952,
 8810688, 9055424, 9300160, 9544896, 9789632, 10034368, 10279104, 10523840,
 10768576, 11013312, 11258048, 11502784, 11747520, 11992256, 12236992,
 12481728, 12726464, 12971200, 13215936, 13460672, 13705408, 13950144,
 14194880, 14439616, 14684352, 14929088, 15173824, 15418560, 15663296,
 15908032, 16152768, 16397504, 16642240, 16886976, 17131712, 17376448,
 17621184, 17865920, 18110656, 18355392, 18600128, 18844864, 19089600,
 19334336, 19579072, 19823808, 20068544, 20313280, 20558016, 20802752,
 21047488, 21292224, 21536960, 21781696, 22026432, 22271168, 22515904,
 22760640, 23005376, 23250112, 23494848, 23739584, 23984320, 24229056,
 24473792, 24718528, 24963264, 25208000, 25452736, 25697472, 25942208,
 26186944, 26431680, 26676416, 26921152, 27165888, 27410624, 27655360,
 27900096, 28144832, 28389568, 28634304, 28879040, 29123776, 29368512,
 29613248, 29857984, 30102720, 30347456, 30592192, 30836928, 31081664,
 31326400, 31571136, 31815872, 32060608, 32305344, 32550080, 32794816,
 33039552, 33284288, 33529024, 33773760, 34018496, 34263232, 34507968,
 34752704, 34997440, 35242176, 35486912, 35731648, 35976384, 36221120,
 36465856, 36710592, 36955328, 37200064, 37444800, 37689536, 37934272,
 38179008, 38423744, 38668480, 38913216, 39157952, 39402688, 39647424,
 39892160, 40136896, 40381632, 40626368, 40871104, 41115840, 41360576,
 41605312, 41850048, 42094784, 42339520, 42584256, 42828992, 43073728,
 43318464, 43563200, 43807936, 44052672, 44297408, 44542144, 44786880,
 45031616, 45276352, 45521088, 45765824, 46010560, 46255296, 46500032,
 46744768, 46989504, 47234240, 47478976, 47723712, 47968448, 48213184,
 48457920, 48702656, 48947392, 49192128, 49436864, 49681600, 49926336,
 50171072, 50415808, 50660544, 50905280, 51150016, 51394752, 51639488,
 51884224, 52128960, 52373696, 52618432, 52863168, 53107904, 53352640,
 53597376, 53842112, 54086848, 54331584, 54576320, 54821056, 55065792,
 55310528, 55555264, 55800000, 56044736, 56289472, 56534208, 56778944,
 57023680, 57268416, 57513152, 57757888, 58002624, 58247360, 58492096,
 58736832, 58981568, 59226304, 59471040, 59715776, 59960512, 60205248,
 60449984, 60694720, 60939456, 61184192, 61428928, 61673664, 61918400,
 62163136, 62407872, 62652608, 62897344, 63142080, 63386816, 63631552,
 63876288, 64121024, 64365760, 64610496, 64855232, 65099968, 65344704,
 65589440, 65834176, 66078912, 66323648, 66568384, 66813120, 67057856,
 67302592, 67547328, 67792064, 68036800, 68281536, 68526272, 68771008,
 69015744, 69260480, 69505216, 69749952, 69994688, 70239424, 70484160,
 70728896, 70973632, 71218368, 71463104, 71707840, 71952576, 72197312,
 72442048, 72686784, 72931520, 73176256, 73420992, 73665728, 73910464,
 74155200, 74399936, 74644672, 74889408, 75134144, 75378880, 75623616,
 75868352, 76113088, 76357824, 76602560, 76847296, 77092032, 77336768,
 77581504, 77826240, 78070976, 78315712, 78560448, 78805184, 79049920,
 79294656, 79539392, 79784128, 80028864, 80273600, 80518336, 80763072,
 81007808, 81252544, 81497280, 81742016, 81986752, 82231488, 82476224,
 82720960, 82965696, 83210432, 83455168, 83699904, 83944640, 84189376,
 84434112, 84678848, 84923584, 85168320, 85413056, 85657792, 85902528,
 86147264, 86392000, 86636736, 86881472, 87126208, 87370944, 87615680,
 87860416, 88105152, 88349888, 88594624, 88839360, 89084096, 89328832,
 89573568, 89818304, 90063040, 90307776, 90552512, 90797248, 91041984,
 91286720, 91531456, 91776192, 92020928, 92265664, 92510400, 92755136,
 92999872, 93244608, 93489344, 93734080, 93978816, 94223552, 94468288,
 94713024, 94957760, 95202496, 95447232, 95691968, 95936704, 96181440,
 96426176, 96670912, 96915648, 97160384, 97405120, 97649856, 97894592,
 98139328, 98384064, 98628800, 98873536, 99118272, 99363008, 99607744,
 99852480, 100097216, 100341952, 100586688, 100831424, 101076160, 101320896,
 101565632, 101810368, 102055104, 102299840, 102544576, 102789312, 103034048,
 103278784, 103523520, 103768256, 104012992, 104257728, 104502464, 104747200,
 104991936, 105236672, 105481408, 105726144, 105970880, 106215616, 106460352,
 106705088, 106949824, 107194560, 107439296, 107684032, 107928768, 108173504,
 108418240, 108662976, 108907712, 109152448, 109397184, 109641920, 109886656,
 110131392, 110376128, 110620864, 110865600, 111110336, 111355072, 111599808,
 111844544, 112089280, 112334016, 112578752, 112823488, 113068224, 113312960,
 113557696, 113802432, 114047168, 114291904, 114536640, 114781376, 115026112,
 115270848, 115515584, 115760320, 116005056, 116249792, 116494528, 116739264,
 116984000, 117228736, 117473472, 117718208, 117962944, 118207680, 118452416,
 118697152, 118941888, 119186624, 119431360, 119676096, 119920832, 120165568,
 120410304, 120655040, 120899776, 121144512, 121389248, 121633984, 121878720,
 122123456, 122368192, 122612928, 122857664, 123102400, 123347136, 123591872,
 123836608, 124081344, 124326080, 124570816, 124815552

There was a very long delay at this point, over 5 minutes! But then it continued...

Setting hostuuid: 5ea8c19a-52d6-11e5-b87f-84eb18e28e56.
Setting hostid: 0x835fb287.
Entropy harvesting: interrupts ethernet point_to_point swi.
Starting file system checks:
/dev/ufs/rootfs: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/ufs/rootfs: clean, 15022057 free (297 frags, 1877720 blocks, 0.0% fragmentation)
Mounting local file systems:.
Writing entropy file:.
Setting hostname: beaglebone.
cpsw0: link state changed to UP
Starting Network: lo0 cpsw0.
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
cpsw0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8000b<RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE>
        ether 84:eb:18:e2:8e:56
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
Starting devd.
Starting dhclient.
DHCPDISCOVER on cpsw0 to 255.255.255.255 port 67 interval 4
DHCPOFFER from 10.0.1.1
DHCPREQUEST on cpsw0 to 255.255.255.255 port 67
DHCPACK from 10.0.1.1
bound to 10.0.1.12 -- renewal in 43200 seconds.
add net fe80::: gateway ::1
add net ff02::: gateway ::1
add net ::ffff:0.0.0.0: gateway ::1
add net ::0.0.0.0: gateway ::1
Generating host.conf.
Creating and/or trimming log files.
Starting syslogd.
ELF ldconfig path: /lib /usr/lib /usr/lib/compat
Clearing /tmp (X related).
Updating motd:.
Mounting late file systems:.
Generating RSA1 host key.
2048 f1:53:3e:f9:74:fb:bb:08:14:d6:57:94:4e:aa:36:ae  root@beaglebone (RSA1)
Generating RSA host key.
2048 47:21:62:69:62:1f:df:ed:ec:6f:e8:7b:85:d1:6b:09  root@beaglebone (RSA)
Generating DSA host key.
1024 fb:4e:ce:a7:bc:13:ca:4d:70:ca:c8:c4:67:89:fe:bb  root@beaglebone (DSA)
Generating ECDSA host key.
256 ea:7c:5d:06:ae:c8:cc:03:09:4d:50:3c:54:f2:d4:a5  root@beaglebone (ECDSA)
Generating ED25519 host key.
256 18:25:25:36:1e:5c:c6:cc:a3:58:84:6a:cd:d2:17:db  root@beaglebone (ED25519)
Performing sanity check on sshd configuration.
Starting sshd.
Starting cron.
Starting background file system checks in 60 seconds.

Fri Sep  4 07:27:53 UTC 2015

FreeBSD/arm (beaglebone) (ttyu0)

login:

The default username and password are root and root.

Networking

The boot log showed cpsw0 as the network interface, but there's no sign of it when running ifconfig. I asked about it on the freebsd-arm list. Someone said via email that the NIC fails at random on startup, for reasons unknown. I set it aside and waited for a new snapshot.

After I installed the July 16 snapshot of 11.0, it worked on first boot:

[...]
cpsw0: <3-port Switch Ethernet Subsystem> mem 0x4a100000-0x4a1007ff,0x4a101200-0x4a1012ff irq 40,41,42,43 on simplebus0
cpsw0: CPSW SS Version 1.12 (0)
cpsw0: Initial queue size TX=128 RX=384
miibus0: <MII bus> on cpsw0
smscphy0: <SMC LAN8710A 10/100 interface> PHY 0 on miibus0
smscphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
cpsw0: Ethernet address: 84:eb:18:e2:8e:56
[...]

It also worked after I installed the September 3 snapshot of 10.2:

[...]
cpsw0: <3-port Switch Ethernet Subsystem> mem 0x4a100000-0x4a103fff irq 40,41,42,43 on simplebus0
cpsw0: CPSW SS Version 1.12 (0)
cpsw0: Initial queue size TX=128 RX=384
miibus0: <MII bus> on cpsw0
smscphy0: <SMC LAN8710A 10/100 interface> PHY 0 on miibus0
smscphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
cpsw0: Ethernet address: 84:eb:18:e2:8e:56
[...]

Initial time set

Login as root (pw: root). Of course the clock is wrong. Just run ntpdate pool.ntp.org to get it right before doing anything else.

FreeBSD's stock ntpd is not set up to run automatically, and I prefer OpenNTPD, so the ports collection has to be installed.

After installing OpenNTPD, it will not be necessary to set the clock unless networking is not available at boot time. I haven't figured out what to do in that situation.

Customize .cshrc & .login

Now is a good time to scp my fancy .cshrc and .login from my other servers.

Install pkg

If you try to run pkg, it will install an old version.

  • pkg info -aoq
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:11:armv6/latest, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
Installing pkg-1.5.2...
Extracting pkg-1.5.2: 100%
Message for pkg-1.5.2:
If you are upgrading from the old package format, first run:

  # pkg2ng
ports-mgmt/pkg

(That last line is the output of the pkg info command you first tried to run.)

I think it might be better to just let pkg get installed later when needed(?)

Install the ports collection

This will take forever.

  • portsnap fetch extract

Several lock order reversal messages with stack traces come up. These are normal and are for debugging FreeBSD-CURRENT. See https://www.freebsd.org/doc/faq/troubleshoot.html#idp59162064

root@beaglebone:~ # portsnap fetch extract
Looking up portsnap.FreeBSD.org mirrors... 7 mirrors found.
Fetching public key from isc.portsnap.freebsd.org... done.
Fetching snapshot tag from isc.portsnap.freebsd.org... done.
Fetching snapshot metadata... done.
Fetching snapshot generated at Sat Jul 18 00:01:57 UTC 2015:
0254d062f604bc2ee66614ff8a9f9158847d0dea1cb903100% of   75 MB  863 kBps 01m30s
Extracting snapshot... done.
Verifying snapshot integrity...
[huge list of ports folders trimmed]
Building new INDEX files... done.

Install portmaster

  • cd /usr/ports/ports-mgmt/portmaster
  • make install
  • echo WITH_PKGNG=yes >> /etc/make.conf
  • pkg2ng

I don't know if the last two lines are still necessary, but portmaster says to do it.

Install nano

  • portmaster editors/nano

Install OpenNTPD

See instructions at User:Mjb/FreeBSD#OpenNTPD.

As mentioned above, what do I do if networking is not available at boot time? And does the clock reset only when power is cut? (in which case not having networking after a soft boot would not be a problem)

Mail

The Sendmail daemon is apparently disabled by default, so immediately some emails from root to root start backing up in the queue. From the messages in /var/log/maillog it looks like the client supports STARTTLS without having to be custom built with SASL2 like in FreeBSD 8.

However, I am going to try OpenSMTPD now.

  • portmaster mail/opensmtpd – also installs various dependencies
  • echo smtpd_enable="YES" >> /etc/rc.conf
  • service smtpd start

For some reason, starting the service failed at first:

Performing sanity check on smtpd configuration:
invalid hostname: getaddrinfo() failed: hostname nor servname provided, or not known
/usr/local/etc/rc.d/smtpd: WARNING: failed precmd routine for smtpd

It's just trying to run smtpd -n at this point. I don't know why getaddrinfo() fails here. That's a hostname/IP address lookup function that first tries /etc/hosts and then tries DNS, but it seems like it's not even being called properly. After poking around a bit and trying to add beaglebone as another 127.0.0.1 hostname in /etc/hosts, I decided to just reboot and see if it worked then. It did; smtpd started up no problem, and subsequent runs of smtpd -n result in "configuration OK".

OpenSSL

When building OpenSSL from the ports collection, I chose these 'make config' options: SHARED, THREADS, SCTP, RC5, DOCS. I disabled SSE2, SSLv2, SSLv3, MD2.

BOINC

I like to run the distributed.net client on all my machines, but it is not open-source, and there are no builds for ARMv6 on FreeBSD.

Ordinarily you can run it through BOINC with the Moo! Wrapper but this doesn't work either. Here's the general idea with BOINC though:

Install BOINC and start the client:

  • portmaster net/boinc – this will install several dependencies, including Perl. In the 'make config' screens for those, I generally disable docs & examples, X11, NLS (for now), and IPv6 (for now). When installing Perl, I chose to disable 64bit_int because it says "on i386".
  • echo boinc_client_enable="YES" >> /etc/rc.conf
  • service boinc-client start — there's a bug in the port; it writes the wrong pid to the pidfile, so subsequent 'service' commands will fail
  • Create account on the BOINC project page you're interested in
  • Go to your account info on that page and click on Account Keys
  • Create ~boinc/account_whatever.xml as instructed. Put the account key (not weak key) in a file, e.g. ~boinc/whatever.key.
  • boinccmd --project_attach http://moowrap.net/ `cat ~boinc/whatever.key`
  • tail -f ~boinc/stdoutdae.txt — this is the log

Blast! Look what comes up in the log: This project doesn't support computers of type armv6-pc-freebsd

None of the projects I tried (Moo!, SETI@Home, Enigma@Home) are supported. So I went ahead and commented out the boinc_client_enable line in /etc/rc.conf and manually killed the boinc-client process.