Created
November 4, 2023 11:46
-
-
Save lupyuen/30df5a965fabf719cc52bf733e945db7 to your computer and use it in GitHub Desktop.
Ox64 U-Boot Bootloader: Commands and Settings. See https://lupyuen.github.io/articles/ox64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[I][] | |
[I][] ____ ____ __ __ _ | |
[I][] / __ \ | _ \ / _|/ _| | | | |
[I][] | | | |_ __ ___ _ __ | |_) | ___ _ _| |_| |_ __ _| | ___ | |
[I][] | | | | '_ \ / _ \ '_ \| _ < / _ \| | | | _| _/ _` | |/ _ \ | |
[I][] | |__| | |_) | __/ | | | |_) | (_) | |_| | | | || (_| | | (_) | | |
[I][] \____/| .__/ \___|_| |_|____/ \___/ \__,_|_| |_| \__,_|_|\___/ | |
[I][] | | | |
[I][] |_| | |
[I][] | |
[I][] Powered by BouffaloLab | |
[I][] Build:11:52:04,Mar 6 2023 | |
[I][] Copyright (c) 2023 OpenBouffalo team | |
[I][] Copyright (c) 2022 Bouffalolab team | |
[I][] dynamic memory init success,heap s[I][LowLoad] D0 start... | |
[I][LowLoad] low_load start... | |
[I][LowLoad] Header at 0x5d5ff000 | |
[I][LowLoad] Section dtb(1) - Start 0x5d5ff100, Size 14314 | |
[I][LowLoad] Copying DTB to 0x51ff8000...0x51ffb7ea | |
[I][LowLoad] Done! | |
[I][LowLoad] Section OpenSBI(2) - Start 0x5d60f100, Size 109864 | |
[I][LowLoad] Copying OpenSBI to 0x3ef80000...0x3ef9ad28 | |
[I][LowLoad] Done! | |
[I][LowLoad] Section Kernel(3) - Start 0x5d62f100, Size 315597 | |
[I][LowLoad] Uncompressing Kernel to 0x50000000... | |
[I][LowLoad] Done! | |
[I][LowLoad] CRC: 00000000 | |
[I][LowLoad] load time: 61447 us | |
[I][LowLoad] Setting PMP | |
[I][LowLoad] Booting OpenSBI at 0x000000003ef80000 with DTB at 0x51ff8000 | |
OpenSBI v1.2 | |
____ _____ ____ _____ | |
/ __ \ / ____| _ \_ _| | |
| | | |_ __ ___ _ __ | (___ | |_) || | | |
| | | | '_ \ / _ \ '_ \ \___ \| _ < | | | |
| |__| | |_) | __/ | | |____) | |_) || |_ | |
\____/| .__/ \___|_| |_|_____/|____/_____| | |
| | | |
|_| | |
Platform Name : Pine64 Ox64 (D0) | |
Platform Features : medeleg | |
Platform HART Count : 1 | |
Platform IPI Device : aclint-mswi | |
Platform Timer Device : aclint-mtimer @ 1000000Hz | |
Platform Console Device : bflb_uart | |
Platform HSM Device : --- | |
Platform PMU Device : --- | |
Platform Reboot Device : --- | |
Platform Shutdown Device : --- | |
Firmware Base : 0x3ef80000 | |
Firmware Size : 200 KB | |
Runtime SBI Version : 1.0 | |
Domain0 Name : root | |
Domain0 Boot HART : 0 | |
Domain0 HARTs : 0* | |
Domain0 Region00 : 0x00000000e4008000-0x00000000e400bfff (I) | |
Domain0 Region01 : 0x00000000e4000000-0x00000000e4007fff (I) | |
Domain0 Region02 : 0x000000003ef80000-0x000000003efbffff () | |
Domain0 Region03 : 0x0000000000000000-0xffffffffffffffff (R,W,X) | |
Domain0 Next Address : 0x0000000050000000 | |
Domain0 Next Arg1 : 0x0000000051ff8000 | |
Domain0 Next Mode : S-mode | |
Domain0 SysReset : yes | |
Boot HART ID : 0 | |
Boot HART Domain : root | |
Boot HART Priv Version : v1.11 | |
Boot HART Base ISA : rv64imafdcvx | |
Boot HART ISA Extensions : time | |
Boot HART PMP Count : 8 | |
Boot HART PMP Granularity : 4096 | |
Boot HART PMP Address Bits: 38 | |
Boot HART MHPM Count : 8 | |
Boot HART MIDELEG : 0x0000000000000222 | |
Boot HART MEDELEG : 0x000000000000b109 | |
U-Boot 2023.04-rc2 (Mar 06 2023 - 11:48:40 +0000) | |
DRAM: 64 MiB | |
Core: 36 devices, 17 uclasses, devicetree: board | |
MMC: mmc@20060000: 0 | |
Loading Environment from FAT... Unable to read "uboot.env" from mmc0:2... | |
Loading Environment from nowhere... OK | |
In: serial@30002000 | |
Out: serial@30002000 | |
Err: serial@30002000 | |
Net: | |
Warning: emac@20070000 (eth0) using random MAC address - 7a:6b:2a:d8:62:67 | |
eth0: emac@20070000 | |
Hit any key to stop autoboot: 0 | |
=> help | |
? - alias for 'help' | |
base - print or set address offset | |
bdinfo - print Board Info structure | |
blkcache - block cache diagnostics and control | |
boot - boot default, i.e., run 'bootcmd' | |
bootd - boot default, i.e., run 'bootcmd' | |
bootefi - Boots an EFI payload from memory | |
bootelf - Boot from an ELF image in memory | |
bootflow - Boot flows | |
booti - boot Linux kernel 'Image' format from memory | |
bootm - boot application image from memory | |
bootmenu - ANSI terminal bootmenu | |
bootp - boot image via network using BOOTP/TFTP protocol | |
bootvx - Boot vxWorks from an ELF image | |
clk - CLK sub-system | |
cmp - memory compare | |
coninfo - print console devices and information | |
cp - memory copy | |
cpu - display information about CPUs | |
crc32 - checksum calculation | |
dhcp - boot image via network using DHCP/TFTP protocol | |
dm - Driver model low level access | |
echo - echo args to console | |
editenv - edit environment variable | |
eficonfig - provide menu-driven UEFI variable maintenance interface | |
env - environment handling commands | |
erase - erase FLASH memory | |
exit - exit script | |
ext2load - load binary file from a Ext2 filesystem | |
ext2ls - list files in a directory (default /) | |
ext4load - load binary file from a Ext4 filesystem | |
ext4ls - list files in a directory (default /) | |
ext4size - determine a file's size | |
false - do nothing, unsuccessfully | |
fatinfo - print information about filesystem | |
fatload - load binary file from a dos filesystem | |
fatls - list files in a directory (default /) | |
fatmkdir - create a directory | |
fatrm - delete a file | |
fatsize - determine a file's size | |
fatwrite - write file into a dos filesystem | |
fdt - flattened device tree utility commands | |
flinfo - print FLASH memory information | |
fstype - Look up a filesystem type | |
fstypes - List supported filesystem types | |
go - start application at address 'addr' | |
gpio - query and control gpio pins | |
gzwrite - unzip and write memory to block device | |
help - print command description/usage | |
iminfo - print header information for application image | |
imxtract - extract a part of a multi-image | |
itest - return true/false on integer compare | |
ln - Create a symbolic link | |
load - load binary file from a filesystem | |
loadb - load binary file over serial line (kermit mode) | |
loads - load S-Record file over serial line | |
loadx - load binary file over serial line (xmodem mode) | |
loady - load binary file over serial line (ymodem mode) | |
loop - infinite loop on address range | |
ls - list files in a directory (default /) | |
lzmadec - lzma uncompress a memory region | |
md - memory display | |
mdio - MDIO utility commands | |
mii - MII utility commands | |
mm - memory modify (auto-incrementing address) | |
mmc - MMC sub system | |
mmcinfo - display MMC info | |
mw - memory write (fill) | |
net - NET sub-system | |
nfs - boot image via network using NFS protocol | |
nm - memory modify (constant address) | |
panic - Panic with optional message | |
part - disk partition related commands | |
ping - send ICMP ECHO_REQUEST to network host | |
pinmux - show pin-controller muxing | |
printenv - print environment variables | |
protect - enable or disable FLASH write protection | |
pxe - commands to get and boot from pxe files | |
random - fill memory with random pattern | |
reset - Perform RESET of the CPU | |
run - run commands in an environment variable | |
save - save file to a filesystem | |
saveenv - save environment variables to persistent storage | |
setenv - set environment variables | |
setexpr - set environment variable as the result of eval expression | |
showvar - print local hushshell variables | |
size - determine a file's size | |
sleep - delay execution for some time | |
source - run script from memory | |
sysboot - command to get and boot from syslinux files | |
test - minimal test like /bin/sh | |
tftpboot - load file via network using TFTP protocol | |
true - do nothing, successfully | |
unlz4 - lz4 uncompress a memory region | |
unzip - unzip a memory region | |
version - print monitor, compiler and linker version | |
=> printenv | |
arch=riscv | |
baudrate=2000000 | |
board=bl808 | |
board_name=bl808 | |
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr} | |
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootriscv64.efi; if fdt addr -q ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi | |
boot_efi_bootmgr=if fdt addr -q ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr;fi | |
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf} | |
boot_prefixes=/ /boot/ | |
boot_script_dhcp=boot.scr.uimg | |
boot_scripts=boot.scr.uimg boot.scr | |
boot_syslinux_conf=extlinux/extlinux.conf | |
boot_targets=mmc0 pxe dhcp | |
bootcmd=mmc rescan; sleep 1; mmc rescan; run distro_bootcmd | |
bootcmd_dhcp=devtype=dhcp; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00027:UNDI:003000;setenv bootp_arch 0x1b;if dhcp ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr -q ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci; | |
bootcmd_mmc0=devnum=0; run mmc_boot | |
bootcmd_pxe=dhcp; if pxe get; then pxe boot; fi | |
bootdelay=5 | |
cpu=thead | |
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done | |
efi_dtb_prefixes=/ /dtb/ /dtb/current/ | |
ethaddr=7a:6b:2a:d8:62:67 | |
fdt_addr_r=0x51ff8000 | |
fdtcontroladdr=53f361e0 | |
fdtoverlay_addr_r=0x52008000 | |
kernel_addr_r=0x50200000 | |
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile} | |
loadaddr=0x50000000 | |
mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi | |
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi; | |
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then part uuid ${devtype} ${devnum}:${distro_bootpart} distro_bootpart_uuid ; run scan_dev_for_boot; fi; done; setenv devplist | |
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;run boot_efi_bootmgr;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootriscv64.efi; then echo Found EFI removable media binary efi/boot/bootriscv64.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile | |
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo EXTLINUX FAILED: continuing...; fi | |
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done | |
scriptaddr=0x50000000 | |
stderr=serial@30002000 | |
stdin=serial@30002000 | |
stdout=serial@30002000 | |
vendor=bflb | |
Environment size: 3508/126972 bytes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment