Chinaunix首页 | 论坛 | 博客
  • 博客访问: 478038
  • 博文数量: 174
  • 博客积分: 2502
  • 博客等级: 少校
  • 技术积分: 1923
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-28 09:47
文章分类

全部博文(174)

文章存档

2011年(8)

2010年(16)

2009年(68)

2008年(82)

我的朋友

分类: LINUX

2009-04-05 22:01:39

 
Usage: mkimage -l image
-l ==> list image header information
$ mkimage -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'
-O ==> set operating system to 'os'
-T ==> set image type to 'type'
-C ==> set compression type 'comp'
-a ==> set load address to 'addr' (hex)
-e ==> set entry point to 'ep' (hex)
-n ==> set image name to 'name'
-d ==> use image data from 'datafile'
-x ==> set XIP (execute in place)

参数说明:
-A 指定CPU的体系结构
取值 表示的体系结构
alpha ==> Alpha
arm  ==>  ARM
x86  ==>  Intel x86
ia64 ==> IA64
mips ==> MIPS
mips64 ==> MIPS 64 Bit
ppc ==> PowerPC
s390 ==> IBM S390
sh  ==> SuperH
sparc ==> SPARC
sparc64 ==> SPARC 64 Bit
m68k ==> MC68000
 
-O 指定操作系统类型,可以取以下值:
openbsd、netbsd、freebsd、4_4bsd、linux、svr4、esix、solaris、irix、sco、dell、ncr、lynxos、vxworks、psos、qnx、u-boot、rtems、artos
 
-T 指定映象类型,可以取以下值:
standalone、kernel、ramdisk、multi、firmware、script、filesystem
 
-C 指定映象压缩方式,可以取以下值:
none 不压缩
gzip 用gzip的压缩方式
bzip2 用bzip2的压缩方式
 
-a 指定映象在内存中的加载地址,映象下载到内存中时,要按照用mkimage制作映象时,这个参数所指定的地址值来下载
-e 指定映象运行的入口点地址,这个地址就是-a参数指定的值加上0x40(因为前面有个mkimage添加的0x40个字节的头)
-n 指定映象名
-d 指定制作映象的源文件
 
例如:
[liuby@by]$ mkimage -n 'uboot ext2 ramdisk rootfs' -A ppc -O linux -T ramdisk -C gzip -d  rootfs.ext2.gz rootfs.ext2.gz.uboot
 
 
关于mkimage有一个更详细的热点讨论
其中bob2004进行详细的分析,下面是他给的一个《U-boot与kernel的关系new.pdf》
 
文件: U-boot与kernel的关系new.pdf
大小: 178KB
下载: 下载
 
阅读(1850) | 评论(0) | 转发(0) |
0

上一篇:关于字节对齐

下一篇:ASCII码表

给主人留下些什么吧!~~