u-boot中mkimage工具的具体使用
来源:互联网 发布:九阴真经捏脸数据男 编辑:程序博客网 时间:2024/06/07 06:37
通常,u-boot为kernel提供一些kernel无法知道的信息,比如ramdisk在RAM中的地址。Kernel也必须为U-boot提供必要的信息,如通过mkimage这个工具(在u-boot代码的tools目录中)可以给zImage添加一个header,也就是使得通常编译的内核zImage添加一个数据头,把添加头后的image通常叫uImage,uImage是可以被U-boot直接引导的内核镜像。那么如何使用mkimage工具而产生uImage的呢?下面将具体介绍mkimage工具的使用:
1.首先查看mkimage的命令参数
[root@localhost tools]# ./mkimage
Usage: ./mkimage -l image
-l ==> list image header information
./mkimage [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file
[:data_file...] image
-A ==> set architecture to 'arch' //用于指定CPU类型,比如ARM
-O ==> set operating system to 'os' //用于指定操作系统,比如Linux
-T ==> set image type to 'type' //用于指定image类型,比如Kernel
-C ==> set compression type 'comp' //指定压缩类型
-a ==> set load address to 'addr' (hex) //指定image的载入地址
-e ==> set entry point to 'ep' (hex) //内核的入口地址,一般是:image的载入地址+0x40(信息头的大小)
-n ==> set image name to 'name' //image在头结构中的命名
-d ==> use image data from 'datafile' //无头信息的image文件名
-x ==> set XIP (execute in place) //设置执行位置
2.制作添加头的uImage
[root@localhost boot]# ./mkimage -A arm -O linux -T kernel -C none -a 30008000 -e 30008040 -n linux-2.6.13 -d zImage uImage
Image Name: linux-2.6.13
Created: Sat Dec 20 19:42:38 2008
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1588584 Bytes = 1551.35 kB = 1.51 MB
Load Address: 0x30008000
Entry Point: 0x30008040
注意:大家可以根据创建的头信息来验证个参数的含义。比如Image Name就是-n选项指定的内容,Load Address就是-a选项指定的内容,Entry Point就是-e选项指定的内容。
3.下载并执行uImage。
u-boot(armzone)=> tftp 30008000 uImage
TFTP from server 192.168.0.3; our IP address is 192.168.0.7
Filename 'uImage'.
Load address: 0x30008000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
###################################################
done
Bytes transferred = 1588648 (183da8 hex)
u-boot(armzone)=> bootm
## Booting image at 30008000 ...
Image Name: linux-2.6.13
Created: 2008-12-20 11:42:38 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1588584 Bytes = 1.5 MB
Load Address: 30008000
Entry Point: 30008040
Verifying Checksum ... OK
XIP Kernel Image ... OK
boot linux
Starting kernel ...
Uncompressing Linux......................................................................................................... done, booting the kernel.
该实验基于QT2410E开发板进行,该开发板具体介绍参考:http://www.top-e.org/page/jgsz/index.php。
- u-boot中mkimage工具的具体使用
- u-boot中mkimage工具的具体使用
- u-boot中mkimage工具的具体使用
- u-boot中mkimage工具的具体使用
- u-boot中mkimage工具的具体使用
- u-boot中mkimage工具的具体使用
- U-boot中mkimage的说明
- u-boot mkimage工具使用说明
- u-boot mkimage 的用法
- 利用u-boot 的工具mkimage 把zImage转换为uImage的方法
- u-boot中fdt命令的使用
- u-boot中env命令的使用
- u-boot中setexpr命令的使用
- u-boot中fdt命令的使用
- u-boot中fdt命令的使用
- u-boot的使用
- u-boot的使用
- U-boot mkimage指定Linux内核地址时的两种方式
- 请大家重视自动化测试的设计过程
- 23种设计模式
- Rails源代码分析(33):ActionController::Routing(4) Builder
- win2003服务器用squid加速多个站点配置
- 2008 最佳开源软件
- u-boot中mkimage工具的具体使用
- 动态创建多维数组
- JAVA日期时间小结
- SQL 注入式攻击的本质
- 用Shader实现的YUV到RGB转换
- 基于QT2410E开发板的U-Boot烧写
- JavaScript "For"和"While" 循环
- 世界顶级精英们的人生哲学
- apache 多域名共用80端口 虚拟主机