Uboot command Summary

Source: Internet
Author: User

Uboot command Summary ()
A good summary of the uboot command, I started to read this article. After getting familiar with it, I will use "?" Just look at the built-in help :)

Printenv prints environment variables.

Uboot> printenv
Baudrate = 115200
Ipaddr = 192.168.1.1
Ethaddr = 12: 34: 56: 78: 9A: BC
Serverip = 192.168.1.5
Environment size: 80/8188 bytes

Setenv: Set new variables

Uboot> setenv myboard at91rm9200dk
Uboot> printenv
Baudrate = 115200
Ipaddr = 192.168.1.1
Ethaddr = 12: 34: 56: 78: 9A: BC
Serverip = 192.168.1.5
Myboard = at91rm9200dk
Environment size: 102/8188 bytes

Saveenv Save the variable

Command to save all the Defined variables and their values to flash. The space used to store variables and their values is only 8 KB and should not exceed.

Loadb downloads binary data through the serial port Kermit protocol.

To download a program from the network through TFTP, you must set the network configuration first.

Uboot> setenv ethaddr 12: 34: 56: 78: 9A: BC
Uboot> setenv ipaddr 192.168.1.1
Uboot> setenv serverip 192.168.1.254 (TFTP server address)
Download the BIND file to the address 0x20000000.
Uboot> TFTP 20000000 application. Bin (application. Bin should be located in the directory of the TFTP service program)

Uboot> TFTP 32000000 vmlinux
Read vmlinux in/tftpdroot/of server (serverip set in IP = environment variable) to physical memory 32000000 through TFTP.

MD displays the content in the memory area.

MM modifies the memory and the address increases automatically.

The memory is modified at nm, and the address does not increase automatically.

MW memory filled with Model

MW 32000000 FF 10000 (set 0x10000 bytes starting with memory 0x32000000 to 0xff)

CP copies one piece of memory to another

CMP compares two memory zones

After these memory operation commands, you can add a suffix to indicate the size of the operation data. For example, CP. B Indicates copying by byte.

Protect write Protection

Protect on 1:0-3 (that is, to protect the 0-3 Sector of the first flash)
Protect off 1:0-3 cancel write Protection

Erase erased the slice.

Erase: delete flash slice
Erase 1:0-2 (delete the 0-2 sector of each flash)

Operations on dataflash

During U-boot, if the npcs0 and npcs3 are connected to dataflash, a virtual address will be allocated to it, specifically:
0xc0000000 --- npcs0
0xd0000000 --- npcs3

Run the script

Uboot> setenv flashit TFTP 20000000 mycode. bin/; erase 10020000 1002 FFFF /;
CP. B 20000000 10020000 8000
Uboot> saveenv
Uboot> RUN flashit

The environment variable reserved by bootcmd is also a script.

If this variable is defined, the script content will be executed in autoboot mode.

Go executes the binary code in the memory and jumps to the specified address.

Bootm executes binary code in memory

Binary code is required to be formatted. It is generally a binary file processed by mkimage.
Start the compressed Linux kernel created by uboot tools, bootm 3200000

BOOTP starts over the network. You need to set the hardware address in advance.

? Get the list of all commands

Help help USB: list the usage instructions of USB Functions

Ping Note: Only the Development Board can be pinged to other machines

USB

USB start: Start the USB Function
USB info: List Devices
USB scan: scans USB storage (USB disk) Devices

Kgo starts a Linux kernel without compression.

Kgo 32000000

Fatls list dos fat file system

Fatls USB 0 list files in the first USB flash drive

Fatload reads a file in fat.

Fatload USB 0: 0 32000000 aa.txt read aa.txt in USB to the physical memory 0x32000000!

Flinfo: List flash Information

NFS

NFS 32000000 192.168.0.2: aa.txt
Read aa.txt in the nfsfile System of Linux 192.168.0.2 into the memory 0x32000000.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.