[u-boot@MINI2440]#help ?- alias for'help' askenv - get environment variables from stdin base - print orset address offset bdinfo - print Board Info structure bmp - manipulate BMP image data boot - boot default, i.e., run 'bootcmd' bootd - boot default, i.e., run 'bootcmd' bootelf - Boot from an ELF image in memory bootm - boot application image from memory bootp - boot image via network using BOOTP/TFTP protocol bootvx - Boot vxWorks from an ELF image cmp - memory compare coninfo - print console devices and information cp - memory copy crc32 - checksum calculation date - get/set/reset date &time dcache - enable or disable data cache dhcp - boot image via network using DHCP/TFTP protocol echo - echo args to console editenv - edit environment variable eeprom - EEPROM sub-system erase - erase FLASH memory exit-exit script fatinfo - print information about filesystem fatload - load binary file from a dos filesystem fatls -list files in a directory (default/) flinfo - print FLASH memory information fsinfo - print information about filesystems fsload - load binary file from a filesystem image go - start application at address 'addr' help - print online help i2c - I2C sub-system icache - enable or disable instruction cache iminfo - print header information for application image imls -list all images found in flash imxtract- extract a part of a multi-image itest -returntrue/false on integer compare 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/) md - memory display mm - memory modify (auto-incrementing address) mmc - MMC sub-system mtest - simple RAM read/writetest mw - memory write(fill) nand - NAND sub-system nboot - boot from NAND device nfs - boot image via network using NFS protocol nm - memory modify (constant address) ping -send ICMP ECHO_REQUEST to network host printenv- print environment variables protect - enable or disable FLASH write protection rarpboot- boot image via network using RARP/TFTP protocol reginfo - print register information reset- Perform RESET of the CPU run - run commands in an environment variable saveenv - save environment variables to persistent storage setenv -set environment variables showvar - print local hushshell variables sleep- delay execution for some time source - run script from memory test- minimal test like /bin/sh tftpboot- boot image via network using TFTP protocol unzip - unzip a memory region usb - USB sub-system usbboot - boot from USB device version - print monitor version
如果你想获取某条命令的更详细的帮助,可以使用:
help <你想要查的指令> 或者 ?<你想要查的指令> , 甚至 h <你想要查的指令缩写>。
以bmp指令为例:
[u-boot@MINI2440]#help bmp bmp - manipulate BMP image data
Usage: bmp info <imageAddr>- display image info bmp display <imageAddr>[x y]- display image at x,y [u-boot@MINI2440]#? bmp bmp - manipulate BMP image data
Usage: bmp info <imageAddr>- display image info bmp display <imageAddr>[x y]- display image at x,y [u-boot@MINI2440]# h bm bmp - manipulate BMP image data
Usage: bmp info <imageAddr>- display image info bmp display <imageAddr>[x y]- display image at x,y
[u-boot@MINI2440]# printenv tekkaman tekkaman=bmp d 70000 [u-boot@MINI2440]# setenv tekkaman [u-boot@MINI2440]# printenv tekkaman ##Error:"tekkaman"not defined [u-boot@MINI2440]# setenv tekkaman echo "I am Tekkaman Ninja!" [u-boot@MINI2440]# printenv tekkaman tekkaman=echo I am Tekkaman [u-boot@MINI2440]# echo I Love Linux ;${tekkaman} I Love Linux I am Tekkaman
[u-boot@MINI2440]# saveenv Saving Environment to NAND... Erasing Nand... Erasing at 0x6000000000002 -- 0% complete. Writing to Nand... done
如果在启动的时候会看到U-boot打印出:“Warning - bad CRC, using default environment”,说明U-boot没有在存放ENV的固态存储器中找到有效的ENV,只好使用你在编译的时候定义的默认ENV。如果U-boot存放ENV的固态存储器的驱动是OK的,那么只要运行 saveenv就可以把默认ENV写入固态存储器,下次启动就不会有这个警告了。 ENV可以放在许多固体存储器中,对于mini2440来说Nor Flash、Nand Flash或EEPROM都可以,就看你如何配置了(include/configs下的配置文件)。例如: Nor Flash:
#define CONFIG_ENV_IS_IN_FLASH 1 #define CONFIG_ENV_OFFSET 0X40000 #define CONFIG_ENV_SIZE 0x20000 /* Total Size of Environment Sector */
Nand Flash:
#define CONFIG_ENV_IS_IN_NAND 1 #define CONFIG_ENV_OFFSET 0X40000 #define CONFIG_ENV_SIZE 0x20000 /* Total Size of Environment Sector */
EEPROM:
#define CONFIG_ENV_IS_IN_EEPROM 1 /* use EEPROM for environment vars */ #define CONFIG_ENV_OFFSET 0x000 /* environment starts at offset 0 */ #define CONFIG_ENV_SIZE 0x400 /* 1KB */