内核编译出错:multiple target patterns

来源:互联网 发布:如何在mac上装office 编辑:程序博客网 时间:2024/05/21 10:35
原文地址:http://blog.csdn.net/zjujoe/article/details/3185382

现象

 svn 仓库check out 一份内核, 然后make (该配置内置了initramfs 文件系统),第一次make 成功, 但是此后再也不行了!make , make clean 等后都会出错。给开发带来极大麻烦。

 

出错信息如下:

20081007_kernel>make

  CHK     include/linux/version.h

make[1]:`include/asm-arm/mach-types.h' is up to date.

  CHK     include/linux/utsrelease.h

  CHK     include/linux/compile.h

/home/zjujoe/svn/mhlv_2.6/working/songlixin/20081007_kernel/usr/Makefile:41:*** multiple target patterns.  Stop.

make: *** [usr] Error2

 

20081007_kernel>make clean

  CLEAN   arch/arm/boot/compressed

  CLEAN   arch/arm/boot

  CLEAN   /home/zjujoe/svn/mhlv_2.6/working/songlixin/20081007_kernel

  CLEAN   arch/arm/kernel

  CLEAN   drivers/char

  CLEAN   init

  CLEAN   lib

/home/zjujoe/svn/mhlv_2.6/working/songlixin/20081007_kernel/usr/Makefile:41:*** multiple target patterns.  Stop.

make: *** [_clean_usr] Error2

 

20081007_kernel>makedistclean

/home/zjujoe/svn/mhlv_2.6/working/songlixin/20081007_kernel/usr/Makefile:41:*** multiple target patterns.  Stop.

make: *** [_clean_usr] Error2

 

 

问题解决

(同时打算再仔细研究一下 Makefile 语法:P)

google 了一下, 查到文档:

http://www.ibm.com/developerworks/cn/linux/l-debugmake.html

 

该文档说make 时使用  -d 参数可以看到大量信息, 试着用 make–d, 最后几行:

This program built fori486-pc-linux-gnu

Reading makefiles...

Reading makefile`scripts/Makefile.build'...

Reading makefile`include/config/auto.conf' (search path) (don't care) (no ~expansion)...

Reading makefile`scripts/Kbuild.include' (search path) (no ~expansion)...

Reading makefile`/home/zjujoe/svn/mhlv_2.6/working/songlixin/20081007_kernel/usr/Makefile'(search path) (no ~ expansion)...

Reading makefile`usr/.initramfs_data.cpio.gz.d' (search path) (no ~expansion)...

/home/zjujoe/svn/mhlv_2.6/working/songlixin/20081007_kernel/usr/Makefile:41:*** multiple target patterns.  Stop.

Reaping losing child 0x080af520PID 6349

make: *** [usr] Error2

Removing child 0x080af520 PID6349 from chain.

 

看一下,usr/.initramfs_data.cpio.gz.d initramfs 的目录列表,

试着删除文件 usr/.initramfs_data.cpio.gz.d  Make, 居然不出错了!!!

 

20081007_kernel>rm -fusr/.initramfs_data.cpio.gz.d

20081007_kernel>make

  CHK     include/linux/version.h

make[1]:`include/asm-arm/mach-types.h' is up to date.

  CHK     include/linux/utsrelease.h

  CHK     include/linux/compile.h

  MODPOSTvmlinux

  Kernel:arch/arm/boot/Image is ready

  Kernel:arch/arm/boot/zImage is ready

  Building modules, stage2.

  MODPOST 33modules

0 0
原创粉丝点击