Hi all, I’m trying to get my BBB to boot over tftp and NFS. Just about any information out there is dated and most tutorials are incomplete or cannot be modified to work on a BBB (or my 2 remaining braincells couldnt figure it out). So let me start off with what I have done on both the server and client side.
[SERVER]
I’m working on an Ubuntu 20.04 setup
# /etc/default/tftpd-hpa
TFTP_USERNAME=“tftp”
TFTP_DIRECTORY=“/home/[my-user-name]/tftpboot”
TFTP_ADDRESS=“:69”
TFTP_OPTIONS=“–secure”
contents of /home/[my-user-name]/tftpboot/
tftpboot/
├── dtbs
│ └── am335x-boneblack.dtb
├── test.img
└── zImage1 directory, 3 files
# /etc/exports
/home/[path-to workspace]/network-boot/rootfs *(rw,sync,no_root_squash,no_subtree_check)
contents of /home/[path-to workspace]/network-boot/rootfs
[path-to-workspace]/network-boot/rootfs/
├── bin
├── boot
├── core-image-minimal-beaglebone-yocto.ext4
├── dev
├── etc
├── home
├── init → bin/busybox
├── lib
├── media
├── mnt
├── proc
├── run
├── sbin
├── sys
├── tmp
├── usr
└── var15 directories, 2 files
The files and folders in both directories were generated using Yocto. I have manually tested it out to make sure the build was successful and can boot. I also allowed port 69 and have restarted both services multiple times.
[CLIENT]
In the root directory of the base image of the BBB, there is a file named nfs-uEnv.txt. I’ve modified it as per the instructions in the file and renamed it as uEnv.txt
/uEnv.txt
##Rename as: uEnv.txt to boot via nfs
##https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt
##SERVER: sudo apt-get install tftpd-hpa
##SERVER:
##SERVER: zImage boot:
##SERVER: TFTP_DIRECTORY defined in /etc/default/tftpd-hpa
##SERVER: zImage/.dtb need to be located here:
##SERVER: TFTP_DIRECTORY/zImage
##SERVER: TFTP_DIRECTORY/dtbs/.dtb
##SERVER:
##SERVER: uname_r boot:
##SERVER: TFTP_DIRECTORY defined in /etc/default/tftpd-hpa
##SERVER: Change TFTP_DIRECTORY to /NFSEXPORT/boot
##SERVER: TFTP_DIRECTORY/vmlinuz-${uname_r}
##SERVER: TFTP_DIRECTORY/dtbs/${uname_r}/*.dtb##client_ip needs to be set for u-boot to try booting via nfs
client_ip=192.168.1.67
#u-boot defaults: uncomment and override where needed
server_ip=192.168.1.121
gw_ip=192.168.1.1
netmask=255.255.255.0
#hostname=
device=eth0
autoconf=off
root_dir=/home/[path-to workspace]/network-boot/rootfs
nfs_options=,vers=3
nfsrootfstype=ext4 rootwait fixrtc##use uname_r= only if TFTP SERVER is setup for uname_r boot:
#uname_r=
Yet it does not boot, here is the output from the serial connection while trying to boot
[Serial Output]
U-Boot SPL 2019.04-00002-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600)
Trying to boot from MMC2
Loading Environment from EXT4… Card did not respond to voltage select!
U-Boot 2019.04-00002-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600), Build: jenkins-github_Bootloader-Builder-137
CPU : AM335X-GP rev 2.1
I2C: ready
DRAM: 512 MiB
No match for driver ‘omap_hsmmc’
No match for driver ‘omap_hsmmc’
Some drivers were not found
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4… Card did not respond to voltage select!
Board: BeagleBone Black
not set. Validating first E-fuse MAC
BeagleBone Black:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net: eth0: MII MODE
cpsw, usb_ether
Press SPACE to abort autoboot in 0 seconds
board_name=[A335BNLT] …
board_rev=[00C0] …
Card did not respond to voltage select!
Card did not respond to voltage select!
Card did not respond to voltage select!
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
Card did not respond to voltage select!
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1…
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc1(part 0) is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt …
1023 bytes read in 22 ms (44.9 KiB/s)
gpio: pin 55 (gpio 55) value is 1
Loaded environment from /uEnv.txt
Importing environment from mmc …
Checking if uenvcmd is set …
Checking if client_ip is set …
gpio: pin 56 (gpio 56) value is 1
Running nfsboot …
Booting from 192.168.1.121 …
cpsw Waiting for PHY auto negotiation to complete… done
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.1.121; our IP address is 192.168.1.67
Filename ‘zImage’.
Load address: 0x82000000
Loading: ###############T #########T #########################################
##############################T ######T #############################
######################################################T ##T #########
####################################T #T ##############T ##############
#########################T ####################T #######T #############
#################################################################
#################################################################
#####################################################T #######
82 KiB/s
done
Bytes transferred = 7553080 (734038 hex)
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.1.121; our IP address is 192.168.1.67
Filename ‘dtbs/am335x-boneblack.dtb’.
Load address: 0x88000000
Loading: #####
11.7 KiB/s
done
Bytes transferred = 62852 (f584 hex)
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Loading Device Tree to 8ffed000, end 8ffff583 … OK
Starting kernel …
Booting Linux on physical CPU 0x0
Linux version 5.10.55-yocto-standard (oe-user@oe-host) (arm-poky-linux-gnueabi-gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37.20210721) #1 PREEMPT Wed Aug 4 02:33:59 UTC 2021
CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: TI AM335x BeagleBone Black
Memory policy: Data cache writeback
cma: Reserved 16 MiB at 0x9e800000
Zone ranges:
Normal [mem 0x0000000080000000-0x000000009fefffff]
HighMem empty
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x0000000080000000-0x000000009fefffff]
Initmem setup node 0 [mem 0x0000000080000000-0x000000009fefffff]
CPU: All CPU(s) started in SVC mode.
AM335X ES2.1 (sgx neon)
Built 1 zonelists, mobility grouping on. Total pages: 129666
Kernel command line: console=ttyO0,115200n8 root=/dev/nfs rw rootfstype=ext4 rootwait fixrtc nfsroot=192.168.1.121:/home/atakan/Desktop/Oruba/network-boot/rootfs,vers=3 ip=192.168.1.67:192.168.1.121:192.16
8.1.1:255.255.255.0::eth0:off
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
mem auto-init: stack:off, heap alloc:off, heap free:off
Memory: 483008K/523264K available (10240K kernel code, 1551K rwdata, 3900K rodata, 1024K init, 616K bss, 23872K reserved, 16384K cma-reserved, 0K highmem)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
ftrace: allocating 40218 entries in 79 pages
ftrace: allocated 79 pages with 5 groups
rcu: Preemptible hierarchical RCU implementation.
rcu: RCU event tracing is enabled.
Trampoline variant of Tasks RCU enabled.
Rude variant of Tasks RCU enabled.
Tracing variant of Tasks RCU enabled.
rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
IRQ: Found an INTC at 0x(ptrval) (revision 5.0) with 128 interrupts
random: get_random_bytes called from start_kernel+0x310/0x54c with crng_init=0
TI gptimer clocksource: always-on /ocp/interconnect@44c00000/segment@200000/target-module@31000
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
clocksource: dmtimer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
TI gptimer clockevent: 24000000 Hz at /ocp/interconnect@48000000/segment@0/target-module@40000
Console: colour dummy device 80x30
WARNING: Your ‘console=ttyO0’ has been replaced by ‘ttyS0’
This ensures that you still see kernel messages. Please
update your kernel commandline.
Calibrating delay loop… 996.14 BogoMIPS (lpj=4980736)
pid_max: default: 32768 minimum: 301
LSM: Security Framework initializing
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
CPU: Testing write buffer coherency: ok
CPU0: Spectre v2: using BPIALL workaround
Setting up static identity map for 0x80100000 - 0x80100060
rcu: Hierarchical SRCU implementation.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 256 (order: -1, 3072 bytes, linear)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
l3-aon-clkctrl:0000:0: failed to disable
thermal_sys: Registered thermal governor ‘step_wise’
cpuidle: using governor ladder
cpuidle: using governor menu
hw-breakpoint: debug architecture 0x4 unsupported.
Serial: AMBA PL011 UART driver
Kprobes globally optimized
raid6: int32x8 gen() 170 MB/s
raid6: int32x8 xor() 105 MB/s
raid6: int32x4 gen() 199 MB/s
raid6: int32x4 xor() 117 MB/s
raid6: int32x2 gen() 367 MB/s
raid6: int32x2 xor() 202 MB/s
raid6: int32x1 gen() 367 MB/s
random: fast init done
raid6: int32x1 xor() 173 MB/s
raid6: using algorithm int32x1 gen() 367 MB/s
raid6: … xor() 173 MB/s, rmw enabled
raid6: using intx1 recovery algorithm
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
clocksource: Switched to clocksource dmtimer
NET: Registered protocol family 2
IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes, linear)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
Initialise system trusted keyrings
workingset: timestamp_bits=14 max_order=17 bucket_order=3
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
Key type cifs.idmap registered
xor: measuring software checksum speed
arm4regs : 1274 MB/sec
8regs : 939 MB/sec
32regs : 1273 MB/sec
xor: using function: arm4regs (1274 MB/sec)
Key type asymmetric registered
Asymmetric key parser ‘x509’ registered
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
io scheduler mq-deadline registered
io scheduler kyber registered
gpiochip_add_data_with_key: GPIOs 0…31 (gpio-0-31) failed to register, -517
omap_gpio 44e07000.gpio: Could not register gpio chip -517
gpiochip_add_data_with_key: GPIOs 0…31 (gpio-0-31) failed to register, -517
omap_gpio 4804c000.gpio: Could not register gpio chip -517
gpiochip_add_data_with_key: GPIOs 0…31 (gpio-0-31) failed to register, -517
omap_gpio 481ac000.gpio: Could not register gpio chip -517
gpiochip_add_data_with_key: GPIOs 0…31 (gpio-0-31) failed to register, -517
omap_gpio 481ae000.gpio: Could not register gpio chip -517
debugfs: Directory ‘49000000.dma’ with parent ‘dmaengine’ already present!
edma 49000000.dma: TI EDMA DMA engine driver
pinctrl-single 44e10800.pinmux: 142 pins, size 568
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 20, base_baud = 3000000) is a 8250
printk: console [ttyS0] enabled
omap_rng 48310000.rng: Random Number Generator ver. 20
random: crng init done
brd: module loaded
mtdoops: mtd device (mtddev=name/number) must be supplied
libphy: Fixed MDIO Bus: probed
davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
libphy: 4a101000.mdio: probed
davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
cpsw 4a100000.ethernet: ALE Table size 1024
cpsw 4a100000.ethernet: Detected MACID = a8:10:87:bb:c3:0a
am335x-phy-driver 47401300.usb-phy: supply vcc not found, using dummy regulator
am335x-phy-driver 47401b00.usb-phy: supply vcc not found, using dummy regulator
ehci_hcd: USB 2.0 ‘Enhanced’ Host Controller (EHCI) Driver
ehci-omap: OMAP-EHCI Host Controller driver
usbcore: registered new interface driver usb-storage
musb-hdrc musb-hdrc.1: MUSB HDRC host driver
musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
omap_rtc 44e3e000.rtc: registered as rtc0
omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01T00:00:00 UTC (946684800)
i2c /dev entries driver
omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
sdhci-omap 481d8000.mmc: supply vqmmc not found, using dummy regulator
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
u32 classifier
input device check on
Actions configured
NET: Registered protocol family 10
Segment Routing with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
Bridge firewalling registered
Key type dns_resolver registered
NET: Registered protocol family 40
oprofile: using arm/armv7
ThumbEE CPU extension supported.
omap_voltage_late_init: Voltage driver support not added
Loading compiled-in X.509 certificates
mmc1: SDHCI controller on 481d8000.mmc [481d8000.mmc] using External DMA
Key type ._fscrypt registered
Key type .fscrypt registered
Key type fscrypt-provisioning registered
Btrfs loaded, crc32c=crc32c-generic
Key type encrypted registered
OMAP GPIO hardware version 0.1
tps65217-pmic: Failed to locate of_node [id: -1]
mmc1: new high speed MMC card at address 0001
mmcblk1: mmc1:0001 M62704 3.56 GiB
mmcblk1boot0: mmc1:0001 M62704 partition 1 2.00 MiB
mmcblk1boot1: mmc1:0001 M62704 partition 2 2.00 MiB
mmcblk1rpmb: mmc1:0001 M62704 partition 3 512 KiB, chardev (249:0)
tps65217-bl: Failed to locate of_node [id: -1]
mmcblk1: p1
tps65217 0-0024: TPS65217 ID 0xe version 1.2
omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
sdhci-omap 48060000.mmc: Got CD GPIO
sdhci-omap 48060000.mmc: supply vqmmc not found, using dummy regulator
mmc0: SDHCI controller on 48060000.mmc [48060000.mmc] using External DMA
tda998x 0-0070: found TDA19988
tilcdc 4830e000.lcdc: bound 0-0070 (ops tda998x_ops)
[drm] Initialized tilcdc 1.0.0 20121205 for 4830e000.lcdc on minor 0
tilcdc 4830e000.lcdc: [drm] Cannot find any crtc or sizes
printk: console [netcon0] enabled
netconsole: network logging started
tilcdc 4830e000.lcdc: [drm] Cannot find any crtc or sizes
cpsw 4a100000.ethernet: initializing cpsw version 1.12 (0)
SMSC LAN8710/LAN8720 4a101000.mdio:00: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
IP-Config: Complete:
device=eth0, hwaddr=a8:10:87:bb:c3:0a, ipaddr=192.168.1.67, mask=255.255.255.0, gw=192.168.1.1
host=192.168.1.67, domain=, nis-domain=(none)
bootserver=192.168.1.121, rootserver=192.168.1.121, rootpath=
cfg80211: Loading compiled-in X.509 certificates for regulatory database
cfg80211: Loaded X.509 cert ‘sforshee: 00b28ddf47aef9cea7’
platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
cfg80211: failed to load regulatory.db
VFS: Unable to mount root fs via NFS.
devtmpfs: mounted
Freeing unused kernel memory: 1024K
Run /sbin/init as init process
Run /etc/init as init process
Run /bin/init as init process
Run /bin/sh as init process
Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
CPU: 0 PID: 1 Comm: swapper Not tainted 5.10.55-yocto-standard #1
Hardware name: Generic AM33XX (Flattened Device Tree)
[<c010de44>] (unwind_backtrace) from [<c010a9ec>] (show_stack+0x18/0x1c)
[<c010a9ec>] (show_stack) from [<c0adb714>] (panic+0x108/0x31c)
[<c0adb714>] (panic) from [<c0ae86a0>] (kernel_init+0xf4/0x12c)
[<c0ae86a0>] (kernel_init) from [<c0100148>] (ret_from_fork+0x14/0x2c)
Exception stack(0xc1945fb0 to 0xc1945ff8)
5fa0: 00000000 00000000 00000000 00000000
5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
—[ end Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. ]—
I know there are some options that allow you to boot by executing commands while in uBoot durring boot (have tried that to no avail, saveenv returns card did not respond to voltage select. However I am trying to figure this out on a test device (which is why I have serial connection) so that I can implement this on devices I only have an ssh connection to (which is why I need a non-serial dependent solution). It has been weeks and I can feel myself slowly going nuts. Any help or pointers would be much appreciated. Thanks