Skip to content

Instantly share code, notes, and snippets.

@pdp7
Created January 1, 2025 19:26
Show Gist options
  • Save pdp7/1bc664829d80a90a206700364992cc78 to your computer and use it in GitHub Desktop.
Save pdp7/1bc664829d80a90a206700364992cc78 to your computer and use it in GitHub Desktop.
flash-beaglev-20250101.txt
pdp7@x1:~/dev/ahead/xuantie-ubuntu$ sudo ./08_fastboot_emmc.sh
Sending 'ram' (969 KB) OKAY [ 0.257s]
Writing 'ram' OKAY [ 0.002s]
Finished. Total time: 0.264s
Rebooting OKAY [ 0.001s]
Finished. Total time: 0.403s
OKAY [ 0.026s]
Finished. Total time: 0.027s
Sending 'ram' (969 KB) OKAY [ 0.049s]
Writing 'ram' FAILED (remote: 'cannot find partition')
fastboot: error: Command failed
Invalid sparse file format at header magic
Sending sparse 'boot' 1/1 (19856 KB) OKAY [ 0.662s]
Writing 'boot' OKAY [ 8.257s]
Finished. Total time: 9.095s
Rebooting OKAY [ 0.006s]
Finished. Total time: 3.015s
pdp7@x1:~/dev/ahead/xuantie-ubuntu$
brom_ver 8
[APP][E] protocol_connect failed, exit.
Starting download of 993216 bytes
downloading of 993216 bytes finished
-----------------------------------------
_____ _ _____ _____ _ __
| __ \ (_)/ ____| __ \| |/ /
| |__) | _ _ _ _| (___ | | | | ' /
| _ / | | | | | | |\___ \| | | | <
| | \ \ |_| | |_| | |____) | |__| | . \
|_| \_\__,_|\__, |_|_____/|_____/|_|\_\
__/ |
|___/
-- Presented by ISCAS
-----------------------------------------
U-Boot SPL 2020.01-g68565d28 (Dec 23 2024 - 07:48:28 +0000)
FM[1] lpddr4x singlerank freq=3733 64bit dbi_off=n sdram init
found ddr boundary <0x80000000>
ddr initialized, jump to uboot
image has no header
U-Boot 2020.01-g68565d28 (Dec 23 2024 - 07:48:28 +0000)
CPU: rv64imafdcvsu
Model: T-HEAD c910 light
DRAM: 2 GiB
C910 CPU FREQ: 750MHz
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 216 ms
In: serial
Out: serial
Err: serial
light_c910_set_gpio_output_high: trying to set gpio output high
light_c910_set_gpio_output_high: no /config node?
## Resetting to default environment
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:0 dwc3_dsts:0x20000
dwc3_gadget_conndone_interrupt speed:0 dwc3_dsts:0x2d198
Writing GPT: success!
request 000000007fa57740 was not queued to ep1in-bulk
request 000000007fa57740 was not queued to ep1in-bulk
request 000000007fa57740 was not queued to ep1in-bulk
request 000000007fa57740 was not queued to ep1in-bulk
Starting download of 993216 bytes
request 000000007fa57740 was not queued to ep1in-bulk
.......
downloading of 993216 bytes finished
request 000000007fa57740 was not queued to ep1in-bulk
cmd_parameter: ram, imagesize: 993216
cannot find partition: 'ram'
request 000000007fa57740 was not queued to ep1in-bulk
request 000000007fa57740 was not queued to ep1in-bulk
request 000000007fa57740 was not queued to ep1in-bulk
request 000000007fa57740 was not queued to ep1in-bulk
Starting download of 20332796 bytes
request 000000007fa57740 was not queued to ep1in-bulk
..........................................................................
..........................................................................
.......
downloading of 20332796 bytes finished
request 000000007fa57740 was not queued to ep1in-bulk
find fastresume partition , erase the header:
find swap partition , erase the header:
cmd_parameter: boot, imagesize: 20332796
Flashing sparse image at offset 4096
Flashing Sparse Image
........ wrote 199229440 bytes to 'boot'
request 000000007fa57740 was not queued to ep1in-bulk
request 000000007fa57740 was not queued to ep1in-bulk
fastboot bootcmd bootslave; run set_bootargs; booti 0x200000 - 0x3800000
## Error: "set_bootargs" not defined
Using Device Tree in place at 0000000003800000, end 000000000380841f
Starting kernel ...
## fdt has no reset_sample
@pdp7
Copy link
Author

pdp7 commented Jan 1, 2025

pdp7@x1:~/dev/ahead/xuantie-ubuntu$ cat ./08_fastboot_emmc.sh
#!/bin/bash

if ! id | grep -q root; then
	echo "./08_fastboot_emmc.sh must be run as root:"
	echo "sudo ./08_fastboot_emmc.sh"
	exit
fi

if [ -f ./.06_generate_boot.sh ] ; then
	echo "ERROR: run: [sudo ./06_generate_boot.sh] first"
else
	if [ -f ./.07_generate_root.sh ] ; then
		echo "ERROR: run: [sudo ./07_generate_root.sh] first"
	else
		#fastboot flash ram deploy/u-boot-with-spl.bin
		fastboot flash ram deploy/u-boot-with-spl-beagle.bin
		fastboot reboot
		sleep 10
		fastboot oem format
		#fastboot flash ram deploy/u-boot-with-spl.bin
		fastboot flash ram deploy/u-boot-with-spl-beagle.bin
		fastboot flash boot ./deploy/boot.ext4
		#fastboot flash root ./deploy/rootfs.ext4
		#fastboot flash root ./deploy/root.ext4
		#fastboot flash root root-lpi4a-20240921_155745.ext4
		fastboot reboot
	fi
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment