learning uboot source command
reference:
http://www.denx.de/wiki/DULG/UBootCmdGroupExec
=> help source
source - run script from memory Usage:
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:
echo
echo Network Configuration:
echo ----------------------
echo Target:
printenv ipaddr hostname
echo
echo Server:
printenv serverip rootpath
echo
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.scr
Image Name: autoscr example script
Created: Mon Feb 8 16:36:04 2010
Image Type: PowerPC Linux Script (uncompressed)
Data Size: 157 Bytes = 0.15 kB = 0.00 MB
Load Address: 0x00000000
Entry Point: 0x00000000
Contents:
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.scr
Using ppc_4xx_eth0 device
TFTP from server 192.168.1.1; our IP address is 192.168.100.6
Filename '/tftpboot/duts/canyonlands/example.scr'.
Load address: 0x100000
Loading: #
done
Bytes 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 00100000 Network Configuration:
----------------------
Target:
ipaddr=192.168.100.6
hostname=canyonlands Server:
serverip=192.168.1.1
rootpath=/opt/eldk/ppc_4xxFP =>
learning uboot source command的更多相关文章
- learning uboot test command
uboot commad test test - minimal test like /bin/sh so we can use test command to some judge for exam ...
- learning uboot fstype command
=> fstypefstype - Look up a filesystem type Usage:fstype <interface> <dev>:<part&g ...
- learning uboot part command
=> part --helppart - disk partition related commands Usage:part uuid <interface> <dev> ...
- 【Supervisor】使用 Supervisor source command not found 如何解决
结论: The source command is only available in bash, and the supervisor command is run by sh. I would r ...
- source command not found in sh shell解决办法
在Ubuntu系统中执行脚本的时候突然出现错误"source command not found in sh shell" 这个其实在Ubuntu 当中 执行脚本默认的使用的是da ...
- Ubuntu解决sudo: source: command not found错误
Ubuntu Server上执行以下命令,可以看到默认打开的文件数限制为1024个. $ ulimit -n 1024 编辑/etc/profile配置文件,在最后添加一行: ulimit -SHn ...
- 编译U-Boot时command not found的解决方法
我使用的U-Boot版本是u-boot-2012.10,编译的步骤为 cd u-boot-2012.10 make s5p_goni_config sudo make 然后,就会看到错误提示 /bin ...
- Ubuntu 之旅 —— 解决sudo: source: command not found错误
$ sudo -s # source /etc/profile
- learning uboot switch to standby system using button
pseudocode: If(reset_button was pressed ) { Change uboot env bootslot^1 }
随机推荐
- AS不能在手机上现在调试软件
这两天遇到的一个问题,(android studio2.0以上的版本),在在线调试应用的时候,将手机上的此程序卸载了,然后准备重新再AS中将这个程序推送到手机上,可是这时候发现不能推送,Log显示什么 ...
- cogs 330. [NOI2003] 文本编辑器
★★★ 输入文件:editor2003.in 输出文件:editor2003.out 简单对比 时间限制:2 s 内存限制:128 MB [问题描述] 很久很久以前,DOS3.x的程序 ...
- Where is HttpContent.ReadAsAsync?
It looks like it is an extension method (in System.Net.Http.Formatting): HttpContentExtensions Class ...
- 【Python】【元编程】【二】【描述符】
""" #描述符实例是托管类的类属性:此外,托管类还有自己实例的同名属性 #20.1.1 LineItem类第三版:一个简单的描述符#栗子20-1 dulkfood_v3 ...
- React Native API之 ActionSheetIOS
ok!先来演示是下效果: 官网教程:http://reactnative.cn/docs/0.31/actionsheetios.html#content 上代码:引入API组件: import Re ...
- 模拟C#的事件添加和删除
从<C# Via CLR>中的演化的一个小demo,探索事件的添加和删除原理,简单明了: using System; using System.Collections.Generic; u ...
- 微信小程序发起支付流程
小程序调起支付API 需要参数 邮件中参数 API参数名 详细说明 APPID appid appid是微信小程序后台APP的唯一标识,在小程序后台申请小程序账号后,微信会自动分配对应的appid,用 ...
- MongoDB(课时18 修改器)
3.4.3.2 修改器(原子操作) 对MongoDB数据库而言,数据的修改会牵扯到内容的变更,结构的变更(包含数组),所以在MongoDB在设计的时候就提供有一系列的修改器的应用,那么像之前使用的“$ ...
- 关于React性能优化
这几天陆陆续续看了一些关于React性能优化的博客,大部分提到的都是React 15.3新加入的PureComponent ,通过使用这个类来减少React的重复渲染,从而提升页面的性能.使用过Rea ...
- json-rpc和restful
json-rpc是一种动作 restful 是一种资源 RPC 所谓的远程过程调用 (面向方法) SOA 所谓的面向服务的架构(面向消息) REST 所谓的 Representational stat ...