table of contents
sunxi-fel(1) | sunxi-fel man page | sunxi-fel(1) |
NAME¶
sunxi-fel - controlling USB BootROM protocol for Allwinner CPUs
SYNOPSIS¶
sunxi-fel [OPTIONS] COMMAND [ARGS]
DESCRIPTION¶
sunxi-fel is a script interface for USB communication with the BootROM of Allwinner CPUs.
On explicit request (typically by pressing a button often labeled "uboot" or "recovery"), or when all other booting methods fail, the CPU's early ROM code enters the so called FEL mode, where it will wait for USB commands sent by some host to the Allwinner CPU's USB OTG interface. sunxi-fel implements this FEL protocol and communicates with the ROM code, to download or upload data and to start code execution.
Besides simply allowing to write to or to read from device memory, sunxi-fel also helps with more complex things, which involve uploading code, executing it and then returning to FEL mode, to allow further data transfer or inspection. In particular it supports loading and executing U-Boot, including the primary SPL stage.
OPTIONS¶
Those options affect general execution and should be put first, before any actual commands.
-h, --help
-v, --verbose
-p, --progress
-l, --list
-d, --dev bus:devnum
--sid SID
SUNXI-FEL COMMANDS¶
sunxi-fel can take several commands, each followed by their parameters, and will execute them in order. The only exception is the "uboot" command, which will delay launching U-Boot until all other commands have been executed.
Please note that accessing any part of the DRAM will not work until the DRAM controller has been initialized. This can be achieved by uploading and executing a suitable U-Boot SPL image, using the "spl" command. Trying to access DRAM before that will most likely hang.
Any numbers given as parameters to those commands can be prefixed with "0x" to denote hexadecimal notation or "0" to start an octal number. They are interpretated as decimal numbers otherwise.
spl <filename>
Upload the given binary file to the appropriate SRAM location, carefully moving the FEL stack out of the way in the process. The binary is then executed. When it returns, the FEL stack is restored and execution is transferred back to the BootROM's FEL routine.
If the file additionally contains a main U-Boot binary (u-boot-sunxi-with-spl.bin), this command also transfers that to memory, using the load address stored in the image file, but won't execute it.
uboot <u-boot-sunxi-with-spl.bin>
hex[dump] <address> <length>
dump <address> <length>
exe[cute] <address>
reset64 <address>
memmove <dest> <source> <size>
readl <address>
writel <address> <value>
read <address> <length> <file>
write <address> <file>
write-with-progress <addr> <file>
write-with-gauge <addr> <file>
write-with-xgauge <addr> <file>
multi[write] # <addr> <file> ...
multi[write]-with-gauge ...
multi[write]-with-xgauge ...
echo-gauge some text
ver[sion]
sid
sid-register
clear <address> <length>
fill <address> <length> <value>
spiflash-info
Prints the manufacturer of the flash chip and its capacity. Should also be used to detect the presence of a SPI flash chip.
spiflash-read <addr> <length> <file>
spiflash-write <addr> <file>
EXAMPLES¶
AUTHOR¶
Andre Przywara <osp@andrep.de>
14 Jan 2022 | 1.5 |