生成uImage

ARM 94浏览

今天突然想写这篇感想,内容比较简单,请大家勿吐槽,请大家多多指教

以前拿飞凌官方提供的FORLINX_linux-2.6.36.2.tar.gz内核,解压后,编译生成的内核只有Image和zImage,没有我想要的

uImage,无论怎么在make menuconfig ARM=arm 里面配置,最后编译生成的都是Image和zImage。后来在网上查了资料

后发现原来是配置的方法不对。配置不是在menuconfig下配置的,而是在uboot的/tools目录下寻找mkimage文件,然后copy到系统/usr/local/bin目录下,这样就可以了。然后在内核目录下运行make uImage ARM=arm CROSS_COMPILE=arm-linux-,如果成功,就会在arch/arm/boot/目录下找到uImage文件。说明编译成功

 

SHIPPED arch/arm/boot/compressed/lib1funcs.S
  AS      arch/arm/boot/compressed/lib1funcs.o
  LD      arch/arm/boot/compressed/vmlinux
  OBJCOPY arch/arm/boot/zImage
  Kernel: arch/arm/boot/zImage is ready
  UIMAGE  arch/arm/boot/uImage
Image Name:   Linux-2.6.36.2
Created:      Mon Nov 26 00:53:42 2012
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    3586924 Bytes = 3502.86 kB = 3.42 MB
Load Address: 0x50008000
Entry Point:  0x50008000
  Image arch/arm/boot/uImage is ready

备注:还有一种出错的情况就是uboot引导的文件时uImage,如果是zImage就会提示这样的错误:

 Wrong Image Format for bootm command
ERROR: can't get kernel image!