Common U-boot commands

Source: Internet
Author: User

PrintenvPrint 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

SetenvSet 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

SaveenvSave 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.

LoadbDownload binary data through the serial port Kermit protocol.

TFTPTo download a program through the network, 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.

MDDisplay the content of the memory area.

MmModify the memory and the address increments automatically.

NmModify the memory. The address does not increase automatically.

MWMemory filling with Model

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

CPCopy one piece of memory to another

CMPCompare 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.

ProtectWrite 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

EraseErase 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

RunExecute the configured script

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

BootcmdThe reserved environment variable is also a script.

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

GoExecute the binary code in the memory, a simple jump to the specified address

BootmExecute binary code in memory

Binary code is required to be formatted. UsuallyMkimageProcessed binary files.
Start the compressed Linux kernel created by uboot tools, bootm 3200000

BOOTPTo start the instance through the network, you must set the hardware address in advance.

?Get the list of all commands

HelpHelp USB: list the usage instructions of the USB Function

PingNote: 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

KgoStart a Linux kernel without compression

Kgo 32000000

FatlsList dos fat file systems

Fatls USB 0 list files in the first USB flash drive

FatloadRead a file in fat.

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

FlinfoList flash Information

NFS

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

 

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.