uboot案例
? - alias for 'help'
base - print or set address offset
bdinfo - print Board Info structure
bmode - sd1|sd2|qspi1|normal|usb|sata|ecspi1:0|ecspi1:1|ecspi1:2|ecspi1:3|esdhc1|esdhc2|esdhc3|esdhc4 [noreset]
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
bootz - boot Linux zImage image from memory
clocks - display clocks
cmp - memory compare
coninfo - print console devices and information
cp - memory copy
crc32 - checksum calculation
dcache - enable or disable data cache
dhcp - boot image via network using DHCP/TFTP protocol
dm - Driver model low level access
echo - echo args to console
editenv - edit environment variable
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
ext4write- create a file in the root directory
false - do nothing, unsuccessfully
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls - list files in a directory (default /)
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
fuse - Fuse sub-system
go - start application at address 'addr'
gpio - query and control gpio pins
help - print command description/usage
i2c - I2C sub-system
icache - enable or disable instruction cache
iminfo - print header information for application image
imxtract- extract a part of a multi-image
itest - return true/false on integer compare
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 /)
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
mtest - simple RAM read/write test
mw - memory write (fill)
nfs - boot image via network using NFS protocol
nm - memory modify (constant address)
ping - send ICMP ECHO_REQUEST to network host
pmic - PMIC
printenv- print environment variables
protect - enable or disable FLASH write protection
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
sf - SPI flash sub-system
showvar - print local hushshell variables
size - determine a file's size
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
true - do nothing, successfully
usb - USB sub-system
usbboot - boot from USB device
version - print monitor, compiler and linker version
详细解释
help
查看命令帮助信息?
bdinfo
信息查询
printenv
setenv
设置环境变量
saveenv
自定义环境变量
md 命令
显示内存值
md[.b,.w,.l] address [#pf objects]
nm 修改指定地址数据信息
nm[.b,.w,.l] address [#pf objects]
mm
内存地址会加
cp
内存拷贝
cp[.b,.w,.l] 源 目标 长度
cmp 比较内存数据
cmp[.b,.w,.l] add1 addr2 conut
网络操作命令
ping
主机地址设置
虚拟机设置
桥接模式
设置桥接网卡参数
ubuntu设置网络地址
开发板使用
setenv ipaddr 192.168.1.50
setenv ethaddt 00:04:9f:04:d2:35
setenv gatewayip 192.168.1.1
setenv netmask 255.255.255.0
setenv serverip 192.168.1.250
saveenv
然后这边就可以随便ping通了
dhcp
nfs
sudo apt-get install nfs-kernel-server rpcbind
sudo vi /etc/exports
打开/etc/exports 以后在后面添加如下所示内容:
/home/zuozhongkai/linux/nfs *(rw,sync,no_root_squash)
ssh
sudo apt-get install openssh-server
tftp 开发
sudo apt-get install tftp-hpa tftpd-hpa
emmc 和 sd卡
mmc info
mmc rescan
mmc list
mmc dev x 切换
mmc part
mmc read addr blk# cnt
mmc read 80800000 600 10
从EMMC 的第1536(0x600)个块读取 16个数据到addr处
mmc write addr blk# cnt
可使用升级
mmc 擦除一般很少用
FAT 格式文件系统操作命令
fatinfo mmc 0:1
fatls mmc 1:1
uboot 源码详解
arch\arm\cpu\u-boot.lds是整个Uboot的链接脚本
board\freescale\mx6ullevk
configs是uboot 的默认配置文件
disk 磁盘不管
drivers 驱动
dts 设备树
。。。
移植u-boot
重点关注
alientek_uboot\board\freescale
\alientek_uboot\configs
/.config
arch-y 是编译选项
uboot 顶层Makefile分析(太难了)
版本号
Makefile 编译过程
1 #!/bin/bash
2 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- distclean
3 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mx6ull_14x14_ddr512_emmc_de fconfig
4 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j12