TS-7680 U-boot commands: Difference between revisions
From embeddedTS Manuals
(Changed command list to be more appropriate for 7680) |
(Removed "you") |
||
Line 1: | Line 1: | ||
These commands are agnostic to the operating system | These commands are agnostic to the operating system that is running, but may be useful for testing or scripting: | ||
<source lang=bash> | <source lang=bash> | ||
Line 22: | Line 22: | ||
false # do nothing, unsuccessfully | false # do nothing, unsuccessfully | ||
true # do nothing, successfully | true # do nothing, successfully | ||
# Control LEDs | # Control LEDs | ||
Line 41: | Line 36: | ||
load usb 0:1 ${loadaddr} /boot/uImage | load usb 0:1 ${loadaddr} /boot/uImage | ||
# | # View the fdt from u-boot with fdt | ||
load mmc 0:2 ${fdtaddr} /boot/imx28-ts7680.dtb | load mmc 0:2 ${fdtaddr} /boot/imx28-ts7680.dtb | ||
fdt addr ${fdtaddr} | fdt addr ${fdtaddr} | ||
fdt print | fdt print | ||
# | # Blindly jump into any memory location | ||
# This is similar to bootm, but it does not use the | # This is similar to bootm, but it does not use the | ||
# u-boot header | # u-boot header | ||
Line 55: | Line 50: | ||
ls mmc 0:2 / | ls mmc 0:2 / | ||
# Similar to devmem in Linux, | # Similar to devmem in Linux, read/write arbitrary memory | ||
# using mw and md | # using mw and md | ||
# write | # write | ||
Line 92: | Line 87: | ||
sleep 10 | sleep 10 | ||
# | # It is possible to load HUSH scripts that have been created with mkimage | ||
load mmc 0:2 ${loadaddr} /boot/ubootscript | load mmc 0:2 ${loadaddr} /boot/ubootscript | ||
source ${loadaddr} | source ${loadaddr} |
Latest revision as of 16:48, 28 December 2016
These commands are agnostic to the operating system that is running, but may be useful for testing or scripting:
# The most important command is
help
# This can also be used to see more information on a specific command
help mmc
# Boots into the binary at $loadaddr. This file needs to have
# the uboot header from mkimage. A uImage already contains this.
bootm
# Boots into the binary at $loadaddr, skips the initrd, specifies
# the fdtaddr so Linux knows where to find the board support
bootm ${loadaddr} - ${fdtaddr}
# Get a DHCP address
dhcp
# This sets ${ipaddr}, ${dnsip}, ${gatewayip}, ${netmask}
# and ${ip_dyn} which can be used to check if the dhcp was successful
# These commands are mainly used for scripting:
false # do nothing, unsuccessfully
true # do nothing, successfully
# Control LEDs
led red on
led green on
led all off
led red toggle
# This command is used to copy a file from most devices
# Load kernel from SD
load mmc 0:2 ${loadaddr} /boot/uImage
# Load kernel from USB
usb start
load usb 0:1 ${loadaddr} /boot/uImage
# View the fdt from u-boot with fdt
load mmc 0:2 ${fdtaddr} /boot/imx28-ts7680.dtb
fdt addr ${fdtaddr}
fdt print
# Blindly jump into any memory location
# This is similar to bootm, but it does not use the
# u-boot header
load mmc 0:2 ${loadaddr} /boot/custombinary
go ${loadaddr}
# Browse fat,ext2,ext3,or ext4 filesystems:
ls mmc 0:2 /
# Similar to devmem in Linux, read/write arbitrary memory
# using mw and md
# write
mw 0x10000000 0xc0ffee00 1
# read
md 0x10000000 1
# Test memory. Typically just used in production
mtest
# Read newly inserted SD card
mmc rescan
# Read SD card size
mmc dev 0
mmcinfo
# The NFS command is similar to 'load', but used over the network
dhcp
env set serverip 192.168.0.11
nfs ${loadaddr} 192.168.0.11:/path/to/somefile
# Test ICMP
dhcp
ping 192.168.0.11
# Reboot
reset
# SPI access is through the SF command
# Be careful with sf commands since
# this is where u-boot and the FPGA bitstream exist
# Improper use can render the board unbootable
sf probe
# Delay in seconds
sleep 10
# It is possible to load HUSH scripts that have been created with mkimage
load mmc 0:2 ${loadaddr} /boot/ubootscript
source ${loadaddr}
# Most commands have return values that can be used to test
# success, and HUSH scripting supports comparisons similar to
# test in Bash, but much more minimal
if load mmc 0:2 ${fdtaddr} /boot/uImage;
then echo Loaded Kernel
else
echo Could not find kernel
fi
# Commands can be timed with "time" similar to Linux
time sf probe
# Print U-boot version/build information
version