创建Uboot 环境变量 bin 文件
As we know, the bootloader stores its configuration into an area of the flash called the environment. The environment is basically stored as a sequence of null-terminated strings, with a little header containing a checksum at the beginning. Using the “printenv”, “setenv” and “saveenv” commands in U-Boot, while this environment can easily be manipulated. It is sometimes desirable to be able to generate a binary image of an environment that can be directly flashed next to the bootloader, kernel and root filesystem into the device’s flash memory.
In order to modify the U-Boot environment variables from user space, the program called “mkenvimage” is needed, this program can be generated from the U-Boot sources, follow the instructions in the tools/env/README file.
make env |
This will get the program “mkenvimage”, the program is executed in host computer, not the target board. The text file “uboot-env.txt” describing the environment is needed like:
bootargs=console=ttyS0,115200bootcmd=tftp 22000000 Image[...] |
Then use mkenvimage as follows:
./mkenvimage -s 0x40000 -o uboot-env.bin uboot-env.txt |
The -s option allows to specify the size of the image to create. It must match the size of the flash area reserved for the U-Boot environment.
Before using the new uboot-env.bin, the old bin file should be restored by the following commands:
dd if=/dev/mtd7 of=uboot-env.bin |
Then, flashing the new bin file in /dev/mtd7 by the following commands:
flash_eraseall /dev/mtd7flashcp uboot-env.bin /dev/mtd7 |
Or, the Lauterbach Debugger is also a good tool to flash the Hyper-Flash.
创建Uboot 环境变量 bin 文件的更多相关文章
- CentOS下安装JDK6u21和设置环境变量bin文件
1.先通过SSH登录到Linux系统中,通过SSH文件管理工具把Linux的JDK安装包上传到/home/acm/JavaTools/JDK目录: 2.进入/home/acm/JavaTools/JD ...
- 在Linux里读取UBOOT环境变量
转载:http://falloutmx.blog.163.com/blog/static/39236020201211145010154/ 可以通过mtd方式读取,也可以用ioremap方式.不过这些 ...
- Linux系统——访问U-BOOT环境变量
Linux系统下访问U-BOOT环境变量 移植过U-BOOT的人,都知道:在U-BOOT中存有ENV.但U-BOOT在引导内核启动之后,U-BOOT的生命周期就结束了.那么启动LINUX内核之后,U- ...
- u-boot 环境变量参数设置
今天本来是烧写内核,结果一不小心把uboot也整不能用了,无奈之下只好重新烧个uboot,等都弄好以后,发现系统还是启动不了,原来是启动参数设置不对,于是找到了这篇文章,//是我添加的内容. 原文地址 ...
- (大数据工程师学习路径)第一步 Linux 基础入门----环境变量与文件查找
环境变量与文件查找 本节介绍环境变量的作用与用法,及几种搜索文件的方法.学会这些技巧高效地使用 Linux. 一.环境变量 1.变量 要解释环境变量,得先明白变量是什么,准确的说应该是 Shell 变 ...
- uboot环境变量实现分析
u-boot的环境变量用来存储一些经常使用的参数变量,uboot希望将环境变量存储在静态存储器中(如nand nor eeprom mmc). 其中有一些也是大家经常使用,有一些是使用人员自己定义的, ...
- MPC8313ERDB在Linux从NAND FLASH读取UBoot环境变量的代码分析
MPC8313ERDB在Linux从NAND FLASH读取UBoot环境变量的代码分析 Yao.GUET@2014-05-19 一.故事起因 由于文件系统的增大,已经大大的超出了8MB的NOR FL ...
- I.MX6 Linux U-boot 环境变量解析
/********************************************************************************** * I.MX6 Linux U- ...
- 环境变量和文件查找&文件打包与解压缩
环境变量和文件查找 介绍环境变量的作用与用法 及几种搜索文件的方法 学会这些技巧可以高效地使用 Linux 知识点:环境变量的设置 环境变量的修改 环境变量 要解释环境变量,得先明白变量是什么,准确的 ...
随机推荐
- HttpRunnerManager安装部署(centos7)
一.安装python3环境 参考 二.安装依赖环境 根据根目录requirements.txt文件安装依赖,可以使用pip安装 #pip3 install -r requirements.txt 会遇 ...
- MFC程序执行过程剖析(转)
一 MFC程序执行过程剖析 1)我们知道在WIN32API程序当中,程序的入口为WinMain函数,在这个函数当中我们完成注册窗口类,创建窗口,进入消息循环,最后由操作系统根据发送到程序窗口的消息调用 ...
- 如何解决拖拽或者缩放、移动中的组件canvas有残留情况
当我们在做某些需求,如要拖动echarts图表,或者放大缩小 这个时候,有时连续操作,或者在ie或者内存只有8G的电脑上就会出现canvs残留的情况 我们移动的时候,使用的是transform去做的移 ...
- tuple unpacking
拆开Tuple lax_coordinates = (33.9425, -118.408056) latitude, longitude = lax_coordinates # tuple unpac ...
- 【JVM】JVM参数
JVM参数的含义 参数名称 含义 默认值 -Xms 初始堆大小 物理内存的1/64(<1GB) 默认(MinHeapFreeRatio参数可以调整)空余堆内存小于40%时,JVM就会增大堆 ...
- 【Linux】shell脚本参数传递
这里介绍参数传递的两种方式. 方式一:$0,$1,$2... 采用$0,$1,$2..等方式获取脚本命令行传入的参数 $0:脚本名称 $1....: 参数 例子: #编写一个shell $ vim t ...
- flutte页面布局四
AspectRatio 组件 AspectRatio 的作用是根据设置调整子元素 child 的宽高比. AspectRatio 首先会在布局限制条件允许的范围内尽可能的扩展,widget 的高度是由 ...
- 使用lambda编写九九乘法表
Java 8 出来有一段时间了,支持lambda表达式 非常的赞. lambda表达式 即匿名方法,属于一种轻量级的封装 lambda表达式的语法由参数列表.箭头符号->和函数体组成.函数体既可 ...
- php读取excel(支持03,07)
需要用到PHPExcel这个类 附上代码 //phpExcel读取excel内容 header("Content-Type:textml;charset=utf-8"); //引用 ...
- sqlserver数据库里怎样设置datetime类型的小数位数为3位
要用datetime2(7)这种类型!将7改为3就行了