博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
learning uboot source command
阅读量:4692 次
发布时间:2019-06-09

本文共 2176 字,大约阅读时间需要 7 分钟。

reference:

 

=> help sourcesource - run script from memoryUsage:source [addr]   - run script starting at addr   - A valid image header must be present=>

 

With the source command you can run "shell" scripts under U-Boot: You create a U-Boot script image by simply writing the commands you want to run into a text file; then you will have to use the mkimage tool to convert this text file into a U-Boot image (using the image type script).

This image can be loaded like any other image file, and with source you can run the commands in such an image. For instance, the following text file:

 

echoecho Network Configuration:echo ----------------------echo Target:printenv ipaddr hostnameechoecho Server:printenv serverip rootpathecho

 

can be converted into a U-Boot script image using the mkimage command like this:

 

bash$ mkimage -A ppc -O linux -T script -C none -a 0 -e 0 \> -n "autoscr example script" \> -d ./testsystems/dulg/testcases/example.script /tftpboot/duts/canyonlands/example.scrImage Name:   autoscr example scriptCreated:      Mon Feb  8 16:36:04 2010Image Type:   PowerPC Linux Script (uncompressed)Data Size:    157 Bytes = 0.15 kB = 0.00 MBLoad Address: 0x00000000Entry Point:  0x00000000Contents:   Image 0:    149 Bytes =   0 kB = 0 MB

 

Now you can load and execute this script image in U-Boot:

 

=> tftp 0x100000 /tftpboot/duts/canyonlands/example.scrUsing ppc_4xx_eth0 deviceTFTP from server 192.168.1.1; our IP address is 192.168.100.6Filename '/tftpboot/duts/canyonlands/example.scr'.Load address: 0x100000Loading: #doneBytes transferred = 221 (dd hex)=> imi## Checking Image at 00100000 ...   Legacy image found   Image Name:    autoscr example script   Created:    2010-02-08  15:36:04 UTC   Image Type:    PowerPC Linux Script (uncompressed)   Data Size:    157 Bytes =  0.2 kB   Load Address: 00000000   Entry Point:    00000000   Contents:      Image 0: 149 Bytes =  0.1 kB   Verifying Checksum ... OK=> source 0x100000## Executing script at 00100000Network Configuration:----------------------Target:ipaddr=192.168.100.6hostname=canyonlandsServer:serverip=192.168.1.1rootpath=/opt/eldk/ppc_4xxFP=>

 

 

转载于:https://www.cnblogs.com/lianghong881018/p/10219820.html

你可能感兴趣的文章
sqlplus terminators - Semicolumn (;), slash (/) and a blank line
查看>>
省选知识清单/计划列表(咕?)
查看>>
远程桌面(3389)复制(拖动)文件
查看>>
转 lucene3搜索引擎,索引建立搜索排序分页高亮显示, IKAnalyzer分词
查看>>
bootstrap datetimepicker 位置错误
查看>>
9结构型模式之代理模式
查看>>
第二节 整型数据
查看>>
Python 序列
查看>>
Liferay的架构:缓存(第一部分)
查看>>
初识B/S结构编程技术
查看>>
方法、hadoop源码之JobQueueTaskScheduler-by小雨
查看>>
页面重构总结
查看>>
IO 函数
查看>>
Unity V3 初步使用 —— 为我的.NET项目从简单三层架构转到IOC做准备
查看>>
JSP页面间传递参数
查看>>
VSNETcodePrint 2005 & SQL ServerPrint 2005
查看>>
java数组基本操作
查看>>
String的indexOf()用于获取字符串中某个子字符串的位置
查看>>
shell 脚本运算符
查看>>
杭电 1711 Number Sequence
查看>>