PDA

View Full Version : Kernel : no rule to make target main.o


jessopb
29th January 2006, 09:51 PM
I need to recompile my kernel. for ibook 2001 12inch running fc4 ppc for ntfs.
The currnent config doesnt' allow ntfs by module or built in.

I'm currently using the 2.6.14...


I issued


make menuconfig then changed what I needed, then

make.

Got make[1] ***No rule to make target 'init/main.o' needed by 'init/built-in.o'. Stop
make: *** [init] Error 2

One of the other searches suggested running make with the original .config. luckily, I copied my .config to my own backup, so I copied it back, then make menuconfig and made sure that my change wasn't there, it wasn't.

make clean
make

Same error.

make allnoconfig
Same error.

SAME PROBLEM WITH OTHER KERNEL 2.6.11-...

Any ideas?

thanks,
Jessop

mnisay
29th January 2006, 10:06 PM
what kernel source do you have?
what does

uname -a

says?

jessopb
29th January 2006, 10:11 PM
OK, it seems I'm doing it wrong. According to another post, I'm supposed to do it in the usr/src/redhat/BUILD dir, not the location of headers in /usr/src/kernel...

mnisay
29th January 2006, 10:24 PM
yes indeed.
you need to go to that folder and make sure you have extracted the kernel tar file inside it before you
make gconfig (X based) and compile.

i am still curious, appreciate if you could post output of

yum search *ntfs*

with your PPC system.

jessopb
29th January 2006, 10:50 PM
I doubt it would make any difference, since the make menuconfig doesn't even have ntfs enabled as a module.

yum search *ntfs*

No Matches found.

-Thanks for the hint - I'm curious too why I can't find anything. Perhaps it's only finding things that I could use, and since ntfs modules are not enabled in the kernel, it doesn't report them.

=Jessop

markkuk
29th January 2006, 10:54 PM
"yum search" has absolutely nothing to do with your kernel options. If it doesn't find something, it means that you haven't configured any yum repos containing the package you are looking for. Enable the Livna repo for kernel-module-ntfs packages.

mnisay
29th January 2006, 10:58 PM
ntfs modules are not kernel-enabled by default due to patent restrictions, even if as a compile module.

yum also depends on your yum repos, see your /etc/yum.repos.d/ files. yum searches only to enabled
repos and defined repos under this folder.
see www.fedorafaq.com for more yum repos and conf.

jessopb
30th January 2006, 04:01 AM
yes, I had to add a repo for madwifi. I figured, though, that ntfs was a standard part. evidentally not.

the ibook is happily 'make'ing away... ntfs being compiled right in. I'm using the thing for data recovery so chances are I'll be using it often.

-Thanks, Jessop

mnisay
30th January 2006, 05:06 AM
glad to help.

duanecu
16th March 2006, 08:59 PM
OK, it seems I'm doing it wrong. According to another post, I'm supposed to do it in the usr/src/redhat/BUILD dir, not the location of headers in /usr/src/kernel...

Could I get the specifics on compiling my own kernel? I'm getting the same message and I can't find the other post.

davidbackeberg
17th March 2007, 04:04 AM
[QUOTE=jessopb]
I'm currently using the 2.6.14...
I issued
make menuconfig then changed what I needed, then
make.

Got make[1] ***No rule to make target 'init/main.o' needed by 'init/built-in.o'. Stop
make: *** [init] Error 2

One of the other searches suggested running make with the original .config.
make

Same error.

make allnoconfig
Same error.

SAME PROBLEM WITH OTHER KERNEL 2.6.11-.../QUOTE]

The problem is that Red Hat Enterprise Linux 4 (RHEL 4), and therefore, Fedora, ships with a fake kernel source that's more than kernel header files, and less than a full kernel.
You CAN make menuconfig
You CAN make modules
You CANNOT make
You CANNOT make bzImage

If you want to build a real kernel, you have to download the src.rpm for the kernel version you wish to rebuild, then install the src.rpm, then copy the kernel source from /usr/src/redhat/... to a sensible location like
/usr/src/

See documents like
http://kbase.redhat.com/faq/FAQ_85_5109.shtm

What Red Hat should do is CHANGE THEIR MAKEFILE
to give a meaningful error when somebody types make
or make bzImage

Right now, it instead looks like a legitimate kernel misconfiguration problem. Are you listening Red Hat?