Following closely the posts https://archlinuxarm.org/forum/viewtopic.php?f=48&t=14464 and https://archlinuxarm.org/forum/viewtopic.php?f=23&t=12635, I attempted to load /lib/firmware/RoboticsCape-00A0.dtbo on boot. Yes, I just bought robotics cape for my project.
First, I modified /boot/boot.txt as follows:
$this->bbcode_second_pass_code('', '
# After modifying, run ./mkscr
if test -n ${distro_bootpart}; then setenv bootpart ${distro_bootpart}; else setenv bootpart 1; fi
part uuid ${devtype} ${devnum}:${bootpart} uuid
setenv bootargs "console=tty0 console=${console} root=PARTUUID=${uuid} rw rootwait"
if load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /boot/zImage; then
gpio set 54
echo fdt: ${fdtfile}
if load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} /boot/dtbs/${fdtfile}; then
gpio set 55
#############################
# Customize Device Tree #
#############################
fdt addr ${fdtaddr} # without this line nothing are loaded
fdt resize 0x60000 # need space for loading dtbo file
# disable HDMI
load ${devtype} ${devnum}:${bootpart} ${rdaddr} /lib/firmware/BB-NHDMI-TDA998x-00A0.dtbo
fdt apply ${rdaddr} # need after every dtbo to apply
# load robotics cape overlay
load ${devtype} ${devnum}:${bootpart} ${rdaddr} /lib/firmware/RoboticsCape-00A0.dtbo
fdt apply ${rdaddr}
#############################
# End of customizations #
#############################
if load ${devtype} ${devnum}:${bootpart} ${ramdisk_addr_r} /boot/initramfs-linux.img; then
gpio set 56
bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};
else
gpio set 56
bootz ${kernel_addr_r} - ${fdt_addr_r};
fi;
fi;
fi
')
After which I ran ./mkscr
This process worked with many overlays that enabled SPI, I2C1, and other capabilities. However, it is stuck in boot process when using RoboticsCape overlay. I've tried disabling HDMI manually with the same results. I've tried compiling overlay from https://github.com/RobertCNelson/bb.org-overlays, and got the same results.
Using J1 console debugger I get the following messages during boot if Ethernet cable is attached to BBB:
$this->bbcode_second_pass_code('', '
s
U-Boot SPL 2017.07-1 (Sep 02 2017 - 21:04:29)
Trying to boot from MMC1
U-Boot 2017.07-1 (Sep 02 2017 - 21:04:29 +0000) Arch Linux ARM
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
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Using default environment
<ethaddr> not set. Validating first E-fuse MAC
Net: cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
gpio: pin 54 (gpio 54) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 56 (gpio 56) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
** File not found boot.scr **
** Unrecognized filesystem type **
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
2581 bytes read in 35 ms (71.3 KiB/s)
## Executing script at 80000000
5796864 bytes read in 399 ms (13.9 MiB/s)
gpio: pin 54 (gpio 54) value is 1
fdt: am335x-boneblack.dtb
87396 bytes read in 56 ms (1.5 MiB/s)
gpio: pin 55 (gpio 55) value is 1
2878 bytes read in 4163 ms (0 Bytes/s)
7834 bytes read in 2000 ms (2.9 KiB/s)
fdt_overlay_apply(): FDT_ERR_NOTFOUND
8000998 bytes read in 529 ms (14.4 MiB/s)
gpio: pin 56 (gpio 56) value is 1
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
SCRIPT FAILED: continuing...
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
starting USB...
USB0: Port not available.
link up on port 0, speed 100, full duplex
BOOTP broadcast 1
data abort
pc : [<9ff87976>] lr : [<00008bc7>]
reloc pc : [<80835976>] lr : [<e08b6bc7>]
sp : 9df318d8 ip : 00000000 fp : 9ffed7c8
r10: 9ffed310 r9 : 9df31ed8 r8 : 0000000e
r7 : 9ffef654 r6 : 9ffef65c r5 : 00000000 r4 : 9ffed80e
r3 : 00060101 r2 : 00000008 r1 : 9ffed7ce r0 : 0000000e
Flags: nzCv IRQs off FIQs on Mode SVC_32
Resetting CPU ...
resetting ...
')
The BBB reboots repeating the process...
Without Ethernet cable the messages are slightly different after failing to load device tree overlay:
$this->bbcode_second_pass_code('', '
s
U-Boot SPL 2017.07-1 (Sep 02 2017 - 21:04:29)
Trying to boot from MMC1
U-Boot 2017.07-1 (Sep 02 2017 - 21:04:29 +0000) Arch Linux ARM
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
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Using default environment
<ethaddr> not set. Validating first E-fuse MAC
Net: cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
gpio: pin 54 (gpio 54) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 56 (gpio 56) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
** File not found boot.scr **
** Unrecognized filesystem type **
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
2581 bytes read in 35 ms (71.3 KiB/s)
## Executing script at 80000000
5796864 bytes read in 399 ms (13.9 MiB/s)
gpio: pin 54 (gpio 54) value is 1
fdt: am335x-boneblack.dtb
87396 bytes read in 55 ms (1.5 MiB/s)
gpio: pin 55 (gpio 55) value is 1
2878 bytes read in 4163 ms (0 Bytes/s)
7834 bytes read in 2000 ms (2.9 KiB/s)
fdt_overlay_apply(): FDT_ERR_NOTFOUND
8000998 bytes read in 529 ms (14.4 MiB/s)
gpio: pin 56 (gpio 56) value is 1
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
SCRIPT FAILED: continuing...
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
starting USB...
USB0: Port not available.
cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC 90:59:af:95:c7:8b
HOST MAC de:ad:be:af:00:00
RNDIS ready
ERROR: The remote end did not respond in time.
at drivers/usb/gadget/ether.c:2430/_usb_eth_init()
missing environment variable: pxeuuid
Retrieving file: pxelinux.cfg/01-90-59-af-95-c7-8b
cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC 90:59:af:95:c7:8b
HOST MAC de:ad:be:af:00:00
RNDIS ready
ERROR: The remote end did not respond in time.
at drivers/usb/gadget/ether.c:2430/_usb_eth_init()
Retrieving file: pxelinux.cfg/00000000
cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC 90:59:af:95:c7:8b
HOST MAC de:ad:be:af:00:00
RNDIS ready
ERROR: The remote end did not respond in time.
at drivers/usb/gadget/ether.c:2430/_usb_eth_init()
Retrieving file: pxelinux.cfg/0000000
')
The last part keeps repeating in the infinite loop.
Apologies for spamming the debug messages, I just don't understand what is relevant in this situation. Any help or pointers will be greatly appreciated!