mkimage命令 – 制作可启动映象文件
| CPU 架构,可选的值有:
“alpha”,”arm”,”x86″,”ia64″,”m6k8″,”microblaze”,”mips”,”mips64″,”nios”,”nios2″,”ppc”,”s390″,”sh”,”sparc”,”sparc64″,
“blackfin”,”avr32″ | | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | -O | 操作系统。可选的值有:
“4_4bsd”,”artos”,”esix”,”freebsd”,”irix”,”linux”,”lynxos”,”ncr”,”netbsd”,”openbsd”,”psos”,”qnx”,”rtems”,”sco”,”sloaris”,
“u-boot”,vxworks” | | -T | 镜像类型。可选的值有:
“filesystem”,”firmware”,”firmware”,”kernel”,”multi”,”ramdisk”,”script”,”standalone”,”flat_dt” | | -C | 镜像压缩类型。可选的值有:
“none”,”bzip2″,”gzip” none为没有压缩 | **参考实例** 为内核加上u-boot引导所需要的文件头: ``` [root@anycode ~]# mkimage -n 'linux-2.6.14' -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008000 -d zImage zImage.img ``` 指定CPU架构和操作系统: ``` [root@anycode ~]# mkimage -A arm -O linux -a 0x20008000 -e 0x20008000 -d linux.bin.gz uImage ``` 指定压缩格式: ``` [root@anycode ~]# mkimage -A arm -O linux -C bzip2 -a 0x20008000 -e 0x20008000 -d linux.bin.gz uImage ```