Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1563185
  • 博文数量: 290
  • 博客积分: 3468
  • 博客等级: 中校
  • 技术积分: 3461
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-28 22:21
文章分类

全部博文(290)

文章存档

2016年(13)

2015年(3)

2014年(42)

2013年(67)

2012年(90)

2011年(75)

分类: LINUX

2011-10-25 14:39:06

博客原文:http://blog.csdn.net/zjujoe/article/details/3185382

现象

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

内核版本: 2.6.21.5

出错信息如下:

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] Error 2

 

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] Error 2

 

20081007_kernel>make distclean

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

make: *** [_clean_usr] Error 2

 

 

问题解决

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

google 了一下, 查到文档:

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

 

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

This program built for i486-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 0x080af520 PID 6349

make: *** [usr] Error 2

Removing child 0x080af520 PID 6349 from chain.

 

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

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

 

20081007_kernel>rm -f usr/.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

  MODPOST vmlinux

  Kernel: arch/arm/boot/Image is ready

  Kernel: arch/arm/boot/zImage is ready

  Building modules, stage 2.

  MODPOST 33 modules


阅读(3471) | 评论(1) | 转发(1) |
给主人留下些什么吧!~~

sh19702013-12-19 16:49:59

谢谢你,按文章的办法解决了我的问题.