U-boot, tftp and starterware

80 views
Skip to first unread message

BryanB

unread,
Mar 14, 2020, 1:27:43 AM3/14/20
to BeagleBoard
I have developed a Beaglebone Black Starterware project which boots successfully from the SD card in the standard way.
I would like to boot it using u-boot and tftp over ethernet.

However, when I try to do this the program fails as soon as it attempts to set up the MMU.
In fact, it seems that doing any memory accesses like setting up the pageTable or clearing the PRU memory causes the program to fail.
Why does this happen and how can it be fixed?


If I change the program to only do simple things then booting using u-boot and tftp works.
For instance, if I just put the Starterware gpioLEDBlink example at the beginning of my program (and before doing any MMU setup etc.) then the program is loaded and run properly using u-boot and tftp.
One small caveat is that it is necessary for my program to firstly disable the watchdog timer (using WatchdogTimerDisable(SOC_WDT_1_REGS);) which is started by u-boot.


By the way, I load the program executable which does not have the 8 byte header e.g. download.bin not download_ti.bin to location  0x80000000.
I have compared the memory at 0x8000000 loaded by u-boot with the memory when using the jtag debugger and they seem identical.


Any suggestions on how to fix this problem would be most appreciated.

Thanks for your time, Bryan
-----------------------------------------

Below is an example u-boot session showing the version of u-boot pe-installed on the BBB.

U-Boot 2016.01-00001-g4eb802e (Jan 13 2016 - 11:14:31 -0600), Build: jenkins-github_Bootloader-Builder-313

       Watchdog enabled
I2C:   ready
DRAM:  512 MiB
Reset Source: Power-on reset has occurred.
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Using default environment

Net:   <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
=> setenv ipaddr 192.168.0.99;setenv loadaddr 0x80000000   ; setenv serverip 192.168.0.98;setenv tftproot "c:\\TFTPRoot";setenv bootfile download.bin;tftp ${loadaddr} ${serverip}:${bootfile};echo *** Booting to BareMetal ***;go ${loadaddr};
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.0.98; our IP address is 192.168.0.99
Filename 'download.bin'.
Load address: 0x80000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ##########################################################
         475.6 KiB/s
done
Bytes transferred = 5609312 (559760 hex)
*** Booting to BareMetal ***
## Starting application at 0x80000000 ...


**** STOPS WORKING HERE *****
Reply all
Reply to author
Forward
0 new messages