zengxiaolong@zengxiaolong:~$ 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'
-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)
zengxiaolong@zengxiaolong:~$
参数说明:
-A 指定CPU的体系结构:
--------------------------------------------------------------
取值 表示的体系结构
alpha Alpha
arm A RM
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
ttyS00 at 0xe0005000 (irq = 24) is a 16450
NET4
RAMDISK: Couldn't find valid RAM disk image starting at 0.
Freeing initrd memory: 2048K
Kernel panic: VFS: Unable to mount root fs on 01:00
引导RAMFS方法
假设将文件系统下载到0x30300000.
用BOOTM引导内核和文件系统时,不仅需要将内核进行mkimage处理,文件系统也需要进行相应处理.
文件系统处理命令:
mkimage -n "RAMFS" -A arm -O linux -T ramdisk -C none -a 30300000 -e 30300040 -d initrd.bin initrd.img
进行处理后,与内核处理结果相似,会在原来的文件系统映像前面加上一个64字节的头,这个头里包含了幻数,CRC校验信息和最重要的:文件系统起始地址和长度.