开发者

How to resolve the error "make[1]: *** No rule to make target `init/main.o', needed by ***" in Linux building process?

I tried to build the kernel for "RHEL: 2.6.18.128-el5" version. I installed the source rpm files also using $rpm -ivh 2.6.18.128-el5.src.rpm Though it showed some warnings, i thought it got installed properly. Then i tried

$ cd /usr/src/redh开发者_如何转开发at/SPECS ; rpmbuild -bp kernel*spec

and it copied all patch files in source. Then, i started the process as follows:

[root@localhost 2.6.18-128.el5-i686]# make menuconfig
scripts/kconfig/mconf arch/i386/Kconfig
#
# configuration written to .VVV
#
#
# configuration written to .config
#


*** End of Linux kernel configuration.
*** Execute 'make' to build the kernel or try 'make help'.

[root@localhost 2.6.18-128.el5-i686]# make
scripts/kconfig/conf -s arch/i386/Kconfig
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
make[1]: *** No rule to make target `init/main.o', needed by `init/built-in.o'.  Stop.
make: *** [init] Error 2

Can anybody share the details about "where is the error get caught in the procedure and how to rectify it ?


this is because some file is missing and the rule is written for that missing file in the makefile. its not able to find main.o needed by built-in.o that means some file like main.cpp is missing and so the rule for main.cpp to main.o in makefile is not executed.


Shouldn't you be doing make bzImage or make modules instead of a pure make?

Check this post.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜