Kilian
August 23, 2023, 8:39pm
1
Hello,
I have a self build u-boot-with-spl.bin, which works when I put it onto an SD card and boot from that SD card (see also here BeagleV-Ahead automatic SD card boot ). I now want to try to flash that onto the eMMC. I therefore did the steps from the documentation (see here Quick Start — BeagleBoard Documentation ):
I got fastboot by android-sdk-platform-tools
I setup the udev rules
I downloaded the xuantie-ubuntu-23.04-20230705.zip (see here BeagleV-Ahead Ubuntu 2023-07-05 - BeagleBoard )
I upacked it and had a look into the fastboot_emmc.sh script
I then tried to do the steps, escpecially fastboot flash uboot ./u-boot-with-spl.bin
using my own u-boot-with-spl.bin
The output then looks like this:
Sending 'uboot' (941 KB) OKAY [ 0.250s]
Writing 'uboot' OKAY [ 0.002s]
Finished. Total time: 0.257s
However, when powercycling the board, it boots the old, preexisting u-boot again! I can confirm that because in the uart output, I see the build date “10 June” instead of todays date!
What am I doing wrong?
Hi @Kilian , i’d fully expect:
fastboot flash ram ./u-boot-with-spl.bin
fastboot reboot
sleep 10
fastboot oem format
fastboot flash uboot ./u-boot-with-spl.bin
fastboot reboot
To correctly update the u-boot on the eMMC partition…
Regards,
Kilian
August 23, 2023, 10:11pm
3
Unfortunately I don’t get it working: Whenever I execute the step fastboot oem format
I get the message < waiting for any device >
and then nothing more happens. I tried to flash ram my selfcompiled u-boot-with-spl.bin as well as the u-boot-with-spl provided in the zip. I also tried to hold down the USB button while executing fastboot reboot
, but it didn’t help either. Any idea how I could debug this?
Best regards,
Kilian
Are you scripting it, or running one at time?
First, hold down USB, and hit reset… so your in bootloader mode:
brom_ver 8
[APP][E] protocol_connect failed, exit.
$ sudo ./fastboot.sh
+ fastboot flash ram ./deploy/u-boot-with-spl.bin
Sending 'ram' (940 KB) OKAY [ 0.260s]
Writing 'ram' OKAY [ 0.002s]
Finished. Total time: 0.267s
+ fastboot reboot
Rebooting OKAY [ 0.001s]
Finished. Total time: 0.302s
+ sleep 10
+ fastboot oem format
OKAY [ 0.016s]
Finished. Total time: 0.016s
+ fastboot flash uboot ./deploy/u-boot-with-spl.bin
Sending 'uboot' (940 KB) OKAY [ 0.029s]
Writing 'uboot' OKAY [ 0.083s]
Finished. Total time: 0.141s
+ fastboot reboot
Rebooting OKAY [ 0.007s]
Finished. Total time: 0.057s
brom_ver 8
[APP][E] protocol_connect failed, exit.
Starting download of 963464 bytes
downloading of 963464 bytes finished
U-Boot SPL 2020.01-g85565d54 (Aug 23 2023 - 12:12:12 -0500)
FM[1] lpddr4x singlerank freq=3733 64bit dbi_off=n sdram init
ddr initialized, jump to uboot
image has no header
U-Boot 2020.01-g85565d54 (Aug 23 2023 - 12:12:12 -0500)
CPU: rv64imafdcvsu
Model: T-HEAD c910 light
DRAM: 4 GiB
C910 CPU FREQ: 750MHz
AHB2_CPUSYS_HCLK FREQ: 250MHz
AHB3_CPUSYS_PCLK FREQ: 125MHz
PERISYS_AHB_HCLK FREQ: 250MHz
PERISYS_APB_PCLK FREQ: 62MHz
GMAC PLL POSTDIV FREQ: 1000MHZ
DPU0 PLL POSTDIV FREQ: 1188MHZ
DPU1 PLL POSTDIV FREQ: 1188MHZ
MMC: sdhci@ffe7080000: 0, sd@ffe7090000: 1
Loading Environment from MMC... OK
Error reading output register
Warning: cannot get lcd-en GPIO
LCD panel cannot be found : -121
splash screen startup cost 16 ms
In: serial
Out: serial
Err: serial
## Resetting to default environment
ethaddr=ea:83:4e:95:a7:47
eth1addr=ea:83:4e:95:a7:48
Saving Environment to MMC... Writing to MMC(0)... OK
Writing GPT: success!
dwc3_gadget_start maximum_speed:5 revision:0x5533330b
dwc3_gadget_start DWC3_DCFG:0x80804
dwc3_gadget_conndone_interrupt speed:4 dwc3_dsts:0x2048c
dwc3_gadget_conndone_interrupt speed:4 dwc3_dsts:0x2ba14
Writing GPT: success!
request 00000000ffa61580 was not queued to ep1in-bulk
request 00000000ffa61580 was not queued to ep1in-bulk
request 00000000ffa61580 was not queued to ep1in-bulk
request 00000000ffa61580 was not queued to ep1in-bulk
Starting download of 963464 bytes
request 00000000ffa61580 was not queued to ep1in-bulk
.......
downloading of 963464 bytes finished
request 00000000ffa61580 was not queued to ep1in-bulk
MMC write: dev # 0, block # 0, count 1882 ... 1882 blocks written: OK
request 00000000ffa61580 was not queued to ep1in-bulk
request 00000000ffa61580 was not queued to ep1in-bulk
Booting kernel at 0x0000000010000000...
Wrong Image Format for command
ERROR: can't get kernel image!
resetting ...
brom_ver 8
[APP][E] protocol_connect failed, exit.
U-Boot SPL 2020.01-g85565d54 (Aug 23 2023 - 12:12:12 -0500)
FM[1] lpddr4x singlerank freq=3733 64bit dbi_off=n sdram init
ddr initialized, jump to uboot
image has no header
U-Boot 2020.01-g85565d54 (Aug 23 2023 - 12:12:12 -0500)
CPU: rv64imafdcvsu
Model: T-HEAD c910 light
DRAM: 4 GiB
C910 CPU FREQ: 750MHz
AHB2_CPUSYS_HCLK FREQ: 250MHz
AHB3_CPUSYS_PCLK FREQ: 125MHz
PERISYS_AHB_HCLK FREQ: 250MHz
PERISYS_APB_PCLK FREQ: 62MHz
GMAC PLL POSTDIV FREQ: 1000MHZ
DPU0 PLL POSTDIV FREQ: 1188MHZ
DPU1 PLL POSTDIV FREQ: 1188MHZ
MMC: sdhci@ffe7080000: 0, sd@ffe7090000: 1
Loading Environment from MMC... OK
Error reading output register
Warning: cannot get lcd-en GPIO
LCD panel cannot be found : -121
splash screen startup cost 16 ms
In: serial
Out: serial
Err: serial
loading aon...
50340 bytes read in 2 ms (24 MiB/s)
loading audio...
15748 bytes read in 1 ms (15 MiB/s)
loading opensbi...
114512 bytes read in 3 ms (36.4 MiB/s)
bootslave..Net: ethernet@ffe7070000 (eth0) using MAC address - ea:83:4e:95:a7:47
eth0: ethernet@ffe7070000ethernet@ffe7070000:0 is connected to ethernet@ffe7070000. Reconnecting to ethernet@ffe7060000
ethernet@ffe7060000 (eth1) using MAC address - ea:83:4e:95:a7:48
, eth1: ethernet@ffe7060000
Hit any key to stop autoboot: 0
C910 Light#
Kilian
August 23, 2023, 10:32pm
5
Wow, thanks! When running all commands from a script, it does work indeed. But why does it not work when issuing the commands manually?
Sorry, just something i also noticed, glad it fixed it for you…
This is really the first board I’ve utilized that used fastboot…
Regards,
me too! about the fastboot, me too!