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 }
随机推荐
- 关于cp命令的编写
关于cp命令的编写 娄老师在课上详细的讲了命令who的编写过程~对此,我很有启发!于是想亲自动手试试~ 有什么不足的地方请大家提出来! Learning by doing ~ 做中学,真的只有自己动手 ...
- git_如何查看两个版本之间那些文件被修改
需求 由于工程比较庞大,接近500M,每部署一次如果都全量部署,不仅仅磁盘空间耗费较大,最主要是要等很长时间, 之前就一直有这个问题,但是也就没有弄,上周领导发话了,这个问题必须要解决了 前记 增加带 ...
- Luogu P1533 可怜的狗狗
题目链接:https://www.luogu.org/problemnew/show/P1533 没人写$fhq\ treap$做法,那我就补一篇qwq 看到这题第一时间想主席树,然后发现我还没学主席 ...
- C#学习笔记(九):函数、代码查询和调试
代码查询和调试 代码查询 using System; using System.Collections.Generic; using System.Linq; using System.Text; u ...
- 【Coursera】Sixth Week(2)
DNS:Domain Name System The Domain Name System convert user-friendly names,like www.umich.edu, to net ...
- Ubuntu 关闭防火墙
关闭防火墙:service iptables stop
- Spring boot 遇到了连接mysql的错误
问题1: Establishing SSL connection without server's identity verification is not recommended. Accordin ...
- bootstrap3显示5列的方法
bootstrap是个12栅格的系统,显示5列比较麻烦,今天用到到网上找了找方法,尝试成功,记录一下,以后好用. 需要自己再添加几个 css class样式: <style> .col-l ...
- 算法笔记--sg函数详解及其模板
算法笔记 参考资料:https://wenku.baidu.com/view/25540742a8956bec0975e3a8.html sg函数大神详解:http://blog.csdn.net/l ...
- Ubuntu 的 desktop 和 server 还是有区别。
除了安装的包,比如 GUI, LAMP 上有差别之外,所用的内核也稍有不一样. 不过desktop可以通过安装 sudo apt-get install linux-image-server 之后,编 ...