NFS root on BeagleBone Black

Douglas Beattie beattidp at ieee.org
Mon Jul 8 05:20:57 UTC 2013


Working with the BeagleBone Black, I'm hoping to achieve boot to NFS root.
Thinking I'm fairly far along, I'm stuck with an 'error 19' at the final steps of
booting the kernel. Here's a little background -- any hints would be appreciated.

On FreeBSD 9.1, I have a TFTP server, plus an NFS export on the same folder;
here are a few snippets from the console, which confirm this.

[bsd03: /root/oss/crochet-freebsd]# tail -n2 /etc/inetd.conf 
tftp    dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /opt/tftpboot
tftp    dgram   udp6    wait    root    /usr/libexec/tftpd      tftpd -l -s /opt/tftpboot
[bsd03: /root/oss/crochet-freebsd]# cat /etc/exports
/opt/tftpboot -maproot=0 -alldirs -network 192.168.0.0 -mask 255.255.255.0
[bsd03: /root/oss/crochet-freebsd]# showmount -e
Exports list on localhost:
/opt/tftpboot                      192.168.0.0 

I have built (using the excellent crochet facility) and can boot FreeBSD from
the microSD card, and I have verified that I can NFS mount the exported folder.

Then, I created a custom kernel configuration, BEAGLEBONENFSROOT, with
just a couple changes, as follows:

options         NFS_ROOT                #NFS usable as /, requires NFSCL
options         ROOTDEVNAME=\"nfs:192.168.0.198:/opt/tftpboot/beaglebone\"

And, then I built the kernel from the command line, with DESTDIR into my target
folder for NFS root, doing all the make targets in turn; buildworld, buildkernel,
installkernel, installworld, distrib-dirs, distribution ...

So, since I already have U-Boot available, starting from there, I booted and entered
a few commands as shown below, such that:

U-Boot# setenv serverip 192.168.0.198
U-Boot# setenv bootfile beaglebone/boot/kernel/kernel
U-Boot# dhcp
U-Boot# bootelf

And it does boot my kernel via TFTP, and make it all the way to the point where it tries to
mount the NFS root, but dies and drops to 'mountroot>' prompt (where I try the same mount,
but to no avail). For reference, here's the console output of the results ...


U-Boot SPL 2013.04 (Jul 04 2013 - 21:33:25)
OMAP SD/MMC: 0
reading bb-uboot.img
reading bb-uboot.img

U-Boot 2013.04 (Jul 04 2013 - 21:33:25)

I2C:   ready
DRAM:  512 MiB
WARNING: Caches not enabled
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
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:  0
U-Boot#  
U-Boot# setenv serverip 192.168.0.198
U-Boot# setenv bootfile beaglebone/boot/kernel/kernel
U-Boot# dhcp
link up on port 0, speed 100, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.0.123
Using cpsw device
TFTP from server 192.168.0.198; our IP address is 192.168.0.123
Filename 'beaglebone/boot/kernel/kernel'.
Load address: 0x88000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ########################
         824.2 KiB/s
done
Bytes transferred = 5119286 (4e1d36 hex)
U-Boot# bootelf
## Starting application at 0xc0200100 ...
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2013 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.0-CURRENT #1 r252709: Sun Jul  7 19:02:13 UTC 2013
    root at fbsd91-vm03.midnight-engineer.org:/usr/src/_head/obj/arm.armv6/usr/src/_head/sys/BEAGLEBONENFSROOT arm
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
WARNING: WITNESS option enabled, expect reduced performance.
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:2 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  = 268435456 (256 MB)
avail memory = 252329984 (240 MB)
Texas Instruments AM3358 Processor, Revision ES1.1
random device not loaded; using insecure entropy
simplebus0: <Flattened device tree simple bus> on fdtbus0
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 550 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
Timecounter "AM335x Timecounter" frequency 24000000 Hz quality 1000
Event timer "AM335x Eventtimer0" frequency 24000000 Hz quality 1000
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: <GPIO bus> on gpio0
uart0: <16750 or 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
ti_mmchs0: <TI MMC/SD/SDIO High Speed Interface> mem 0x48060000-0x48060fff irq 64 on simplebus0
mmc0: <MMC/SD bus> on ti_mmchs0
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
cpsw0: Ethernet address: c8:a0:30:c4:2c:6f
miibus0: <MII bus> on cpsw0
smscphy0: <SMC LAN8710A 10/100 interface> PHY 0 on miibus0
smscphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
iichb0: <TI I2C Controller> mem 0x44e0b000-0x44e0bfff irq 70 on simplebus0
iichb0: I2C revision 4.0
iicbus0: <OFW I2C bus> on iichb0
iic0: <I2C generic I/O> on iicbus0
am335x_pmic0: <TI TPS65217 Power Management IC> at addr 0x24 on iicbus0
am335x_pwm0: <AM335x PWM> mem 0x48300000-0x483000ff,0x48300100-0x4830017f,0x48300180-0x483001ff,0x48300200-0x4830025f irq 86,58 on simplebus0
Timecounters tick every 10.000 msec
ti_mmchs_update_ios: TWL unimplemented
mmcsd0: 4GB <SDHC SA04G 1.1 SN 885094389 MFG 01/2013 by 2 TM> at mmc0 25.0MHz/4bit/1-block
am335x_pmic0: Unknown PMIC powered by AC
WARNING: WITNESS option enabled, expect reduced performance.
Trying to mount root from nfs:192.168.0.198:/opt/tftpboot/beaglebone []...
mountroot: waiting for device 192.168.0.198:/opt/tftpboot/beaglebone ...
Mounting from nfs:192.168.0.198:/opt/tftpboot/beaglebone failed with error 19.

Loader variables:

Manual root filesystem specification:
  <fstype>:<device> [options]
      Mount <device> using filesystem <fstype>
      and with the specified (optional) option list.

    eg. ufs:/dev/da0s1a
        zfs:tank
        cd9660:/dev/acd0 ro
          (which is equivalent to: mount -t cd9660 -o ro /dev/acd0 /)

  ?               List valid disk boot devices
  .               Yield 1 second (for background tasks)
  <empty line>    Abort manual input

mountroot> nfs:192.168.0.198:/opt/tftpboot/beaglebone
Trying to mount root from nfs:192.168.0.198:/opt/tftpboot/beaglebone []...
mountroot: waiting for device 192.168.0.198:/opt/tftpboot/beaglebone ...
Mounting from nfs:192.168.0.198:/opt/tftpboot/beaglebone failed with error 19.


That's it -- I'm excited that it made it this far, but not sure what that 'error 19'
means, or if there's a simple fix or workaround. I've done builds and boot into
NFS root for Android (at a past employer) but haven't yet achieved it on FreeBSD.

--
Douglas Beattie
http://www.hytherion.com/beattidp/



More information about the freebsd-arm mailing list