【Tiny4412】Uboot常用命令
发布日期:2021-06-29 20:47:24
浏览次数:3
分类:技术文章
本文共 11049 字,大约阅读时间需要 36 分钟。
00. 目录
文章目录
01. Uboot帮助命令
? 帮助
help 帮助DengJin #help ? - alias for 'help' 帮助 base - print or set address offset 打印或者设置地址的偏移 bdinfo - print Board Info structure 板子的信息结构 boot - boot default, i.e., run 'bootcmd' 启动 bootd - boot default, i.e., run 'bootcmd' 启动 bootelf - Boot from an ELF image in memory 从内存中启动elf镜像 bootm - boot application image from memory 从内存中启动应用镜像 bootp - boot image via network using BOOTP/TFTP protocol 通过网络协议引导镜像 bootvx - Boot vxWorks from an ELF image chpart - change active partition 改变活动的分区 cmp - memory compare 内存比较 coninfo - print console devices and information 串口设备和信息 cp - memory copy 内存拷贝 crc32 - checksum calculation crc32校验 dcache - enable or disable data cache 使能或者禁用数据cache dnw - dnw - initialize USB device and ready to receive for Windows server (specific) echo - echo args to console 输出参数到串口 editenv - edit environment variable 编辑环境变量 emmc - Open/Close eMMC boot Partition 关闭或者打开emmc分区 env - environment handling commands 环境变量操作 exit - exit script 退出 ext2format- ext2format - disk format by ext2 格式化ext3 ext2load- load binary file from a Ext2 filesystem 从ext2文件系统中加载二进制文件 ext2ls - list files in a directory (default /) 列出ext2文件系统中的文件 ext3format- ext3format - disk format by ext3 使用ext3格式化分区 false - do nothing, unsuccessfully fastboot- fastboot- use USB Fastboot protocol usb fastboot协议 fatformat- fatformat - disk format by FAT32 格式化 fatinfo - fatinfo - print information about filesystem fatload - fatload - load binary file from a dos filesystem fatls - list files in a directory (default /) fdisk - fdisk for sd/mmc. 分区 go - start application at address 'addr' 从指定地址启动应用程序 help - print command description/usage 帮助信息 icache - enable or disable instruction cache 使能和禁用指令cache iminfo - print header information for application image imxtract- extract a part of a multi-image itest - return true/false on integer compare loadb - load binary file over serial line (kermit mode) loads - load S-Record file over serial line loady - load binary file over serial line (ymodem mode) loop - infinite loop on address range md - memory display 内存的内容显示 mm - memory modify (auto-incrementing address) 内存的内容修改 mmc - MMC sub system mmcinfo - mmcinfo-- display MMC info 显示MMC信息 movi - movi - sd/mmc r/w sub system for SMDK board mtdparts- define flash/nand partitions mtest - simple RAM read/write test mw - memory write (fill) nfs - boot image via network using NFS protocol 使用NFS协议启动镜像 nm - memory modify (constant address) 内存修改 ping - send ICMP ECHO_REQUEST to network host printenv- print environment variables 打印环境变量 reginfo - print register information 打印寄存器信息 reset - Perform RESET of the CPU 重置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 true - do nothing, successfully usb - USB sub-system version - print monitor version 输出u-boot的版本
02. md命令
DengJin # help mdmd - memory displayUsage:md [.b, .w, .l] address [# of objects]DengJin # # 默认显示256字节DengJin # md 4000000040000000: ffffffff ffffffff ffffffff ffffffff ................40000010: ffffffff ffffffff ffffffff ffffffff ................40000020: ffffffff ffffffff ffffffff ffffffff ................40000030: ffffffff ffffffff ffffffff ffffffff ................40000040: ffffffff ffffffff ffffffff ffffffff ................40000050: ffffffff ffffffff ffffffff ffffffff ................40000060: ffffffff ffffffff ffffffff ffffffff ................40000070: ffffffff ffffffff ffffffff ffffffff ................40000080: ffffffff ffffffff ffffffff ffffffff ................40000090: ffffffff ffffffff ffffffff ffffffff ................400000a0: ffffffff ffffffff ffffffff ffffffff ................400000b0: ffffffff ffffffff ffffffff ffffffff ................400000c0: ffffffff ffffffff ffffffff ffffffff ................400000d0: ffffffff ffffffff ffffffff ffffffff ................400000e0: ffffffff ffffffff ffffffff ffffffff ................400000f0: ffffffff ffffffff ffffffff ffffffff ................DengJin # # 以字节为单位显示64个字节DengJin # md.b 40000000000000000: 06 00 00 ea fe ff ff ea fe ff ff ea fe ff ff ea ................00000010: fe ff ff ea fe ff ff ea 1a 30 00 ea 1b 30 00 ea .........0...0..00000020: a4 01 9f e5 00 10 a0 e3 00 10 80 e5 9c 01 9f e5 ................00000030: 00 00 90 e5 3e 00 00 e2 3e 00 30 e3 0d 00 00 1a ....>...>.0.....DengJin # # 从指定的地址开始显示8个字节DengJin # md.b 40000000 840000000: ff ff ff ff ff ff ff ff ........DengJin # # 以两个字节为单位 显示8个单位DengJin # md.w 40000000 840000000: ffff ffff ffff ffff ffff ffff ffff ffff ................DengJin # # 显示四个字节DengJin # md.l 40000000 140000000: ffffffff ....DengJin #
03. mm命令
内存修改内容命令
DengJin # help mmmm - memory modify (auto-incrementing address)Usage:mm [.b, .w, .l] addressDengJin # # 字节DengJin # mm.b 4000800040008000: ff ? 0xff40008001: ff ? 0xee40008002: ff ? 40008003: ff ? 40008004: ff ? quit# 两个字节为单位DengJin # mm.w 4000800040008000: eeff ? 0x111140008002: ffff ? 0x222240008004: ffff ? 0x333340008006: ffff ? quit# 四个字节为单位DengJin # mm.l 4000800040008000: 22221111 ? 1140008004: ffff3333 ? 240008008: ffffffff ? 334000800c: ffffffff ? 4440008010: ffffffff ? 5540008014: ffffffff ? 6640008018: ffffffff ? 774000801c: ffffffff ? 8840008020: ffffffff ? quit
应用示例一:控制LED灯
# LED ---> GPM4_0 GPM4_1 GPM4_2 GPM4_3# CON 0x110002E0 # DAT 0x110002E4# 所有的灯亮DengJin #mm.l 0x110002E4 110002e4: 0000000c ? 0110002e8: 00005555 ? quit# 所有的灯灭DengJin #mm.l 0x110002E4110002e4: 00000000 ? 0xf110002e8: 00005555 ? quit
应用示例二:控制蜂鸣器
# Buzzer ---> GPD0_0# CON 0x114000A0# DAT 0x114000A4# 配置为输出DengJin #mm.l 0x114000A0114000a0: 00000000 ? 0x1114000a4: 0000000c ? quit# 高电平 峰鸣器叫DengJin #mm.l 0x114000A4114000a4: 0000000c ? 0xd114000a8: 00000055 ? quit# 低电平 峰鸣器不叫DengJin #mm.l 0x114000A4114000a4: 0000000d ? c114000a8: 00000055 ? quit
04. printenv命令
DengJin # help printenvprintenv - print environment variablesUsage:printenv - print values of all environment variablesprintenv name ... - print value of environment variable 'name'DengJin # # 输出环境变量DengJin #printenvbaudrate=115200 波特率bootcmd=movi read kernel 0 40008000;movi read rootfs 0 41000000 400000;bootm 40008000 41000000bootdelay=5 启动内核的时候延时ethaddr=00:40:5c:26:0a:5b 硬件地址gatewayip=192.168.0.1 网关ipaddr=192.168.0.20 IP地址netmask=255.255.255.0 掩码serverip=192.168.0.10 服务器的IP地址Environment size: 252/16380 bytesDengJin #
05. setenv命令
DengJin # help setenvsetenv - set environment variablesUsage:setenv name value ... - set environment variable 'name' to 'value ...'setenv name - delete environment variable 'name'DengJin # # 设置环境变量DengJin #setenv aa 33# 变量名后没有值 那么就是取消环境变量DengJin #setenv aa
06. saveenv命令
DengJin # help saveenvsaveenv - save environment variables to persistent storageUsage:saveenv DengJin # # 保存环境变量DengJin #saveenvSaving Environment to SMDK bootable device...done
07. reset命令
DengJin # help resetreset - Perform RESET of the CPUUsage:reset DengJin # # 重新启动u-bootDengJin #reset
08. base命令
DengJin # help basebase - print or set address offsetUsage:base - print address offset for memory commandsbase off - set address offset for memory commands to 'off'DengJin # # 设置偏移地址DengJin # base 40008000Base Address: 0x40008000# 打印偏移地址DengJin # baseBase Address: 0x40008000DengJin #
09. bdinfo命令
DengJin # help bdinfobdinfo - print Board Info structureUsage:bdinfo DengJin # DengJin # bdinfoarch_number = 0x00001200boot_params = 0x40000100DRAM bank = 0x00000000-> start = 0x40000000-> size = 0x10000000DRAM bank = 0x00000001-> start = 0x50000000-> size = 0x10000000DRAM bank = 0x00000002-> start = 0x60000000-> size = 0x10000000DRAM bank = 0x00000003-> start = 0x70000000-> size = 0x0FF00000ethaddr = 00:40:5c:26:0a:5bip_addr = 192.168.0.20baudrate = 0 bpsTLB addr = 0x3FFF0000relocaddr = 0x43E00000reloc off = 0x00000000irq_sp = 0x43CFBF58sp start = 0x43CFBF50FB base = 0x00000000DengJin #
10. cmp命令
DengJin # help cmpcmp - memory compareUsage:cmp [.b, .w, .l] addr1 addr2 countDengJin #
11. coninfo命令
DengJin # help coninfoconinfo - print console devices and informationUsage:coninfo DengJin # coninfoList of available devices:serial 80000003 SIO DengJin #
12. crc32命令
DengJin # help crc32crc32 - checksum calculationUsage:crc32 address count [addr] - compute CRC32 checksum [save at addr]DengJin # crc32 40000000 8CRC32 for 40000000 ... 40000007 ==> 2144df1cDengJin #
13. dcache
DengJin # help dcachedcache - enable or disable data cacheUsage:dcache [on, off] - enable or disable data (writethrough) cache# 查看dcache状态DengJin # dcache Data (writethrough) Cache is OFFDengJin #
14. echo命令
DengJin # help echoecho - echo args to consoleUsage:echo [args..] - echo args to console; \c suppresses newline # 输出信息到终端DengJin # echo "hello world"hello worldDengJin #
15. emmc命令
DengJin # help emmcemmc - Open/Close eMMC boot PartitionUsage:emmc openemmc close
16. env命令
DengJin # help envenv - environment handling commandsUsage:env default -f - reset default environmentenv edit name - edit environment variableenv export [-t | -b | -c] addr [size] - export environmntenv import [-d] [-t | -b | -c] addr [size] - import environmntenv print [name ...] - print environmentenv run var [...] - run commands in an environment variableenv save - save environmentenv set [-f] name [arg ...]
17. exit命令
DengJin # help exitexit - exit scriptUsage:exit DengJin # exitexit not allowed from main input shell.DengJin #
18. version命令
DengJin # help versionversion - print monitor versionUsage:version # 输出uboot版本信息DengJin # versionU-Boot 2010.12 (Jun 04 2020 - 20:12:26) for TINY4412DengJin #
19. source命令
DengJin # help source source - run script from memoryUsage:source [addr] - run script starting at addr - A valid image header must be presentDengJin #
20. sleep命令
DengJin # help sleepsleep - delay execution for some timeUsage:sleep N - delay execution for N seconds (N is _decimal_ !!!)DengJin # sleep 3DengJin #
21. showvar命令
DengJin # help showvarshowvar - print local hushshell variablesUsage:showvar - print values of all hushshell variablesshowvar name ... - print value of hushshell variable 'name'DengJin # showvarHUSH_VERSION=0.01DengJin #
22. reginfo命令
DengJin # help reginforeginfo - print register informationUsage:reginfo DengJin #
23. 附录
其它命令放在后面部署环境的时候使用…
转载地址:https://dengjin.blog.csdn.net/article/details/106577314 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
做的很好,不错不错
[***.243.131.199]2024年04月17日 13时48分35秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
GIL & coroutine & performance
2019-04-30
parameter passing
2019-04-30
sort & search algorithm
2019-04-30
design pattern
2019-04-30
算法-动态规划2
2019-04-30
算法-动态规划3
2019-04-30
算法-计算1的个数及python sort函数的多层排序
2019-04-30
regular expression examples
2019-04-30
subsets : zero left padding : leetcode 78
2019-04-30
python 模块导入注意事项
2019-04-30
quick sort
2019-04-30
自动为 Gatsby网站中的 Markdown 页面添加 sidebar
2019-04-30
leetcode 463. Island Perimeter
2019-04-30
第二个MacBook,继续加油!
2019-04-30