LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 05-16-2006, 09:27 PM   #1
funnybossvn
LQ Newbie
 
Registered: Oct 2005
Posts: 10

Rep: Reputation: 0
help me!! error when compile kernel


I config some options in the manuconfig and then type make command to recompile but it show this error:

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

please help me to slove this problem
Thank you so much!!

Last edited by funnybossvn; 05-16-2006 at 09:47 PM.
 
Old 05-16-2006, 10:07 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Where are you issuing this "make" command?
Which kernel is this? (output of uname -r is nice)
Which distro is this?
(You can display your distro under your name by editing your profile.)

Anyway - at a first guess I'd say you were using the makefile in the headers directory instead of the one in the kernel source directory.
 
Old 05-18-2006, 09:11 PM   #3
funnybossvn
LQ Newbie
 
Registered: Oct 2005
Posts: 10

Original Poster
Rep: Reputation: 0
my distro is 4.3
kenel: 2.6.9-34.EL
I type the make command when I lie in /usr/src/kernel/2.6.9-34.EL dir.
But the error still show in screen.
Please, hepl me!
 
Old 05-18-2006, 09:56 PM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
my distro is 4.3
No it isn't. Distros have a name, as well as a number: like "Red Hat Enterprise Linux 4" or "Ubuntu 6.06 (Dapper Drake)". Perhaps this is "CentOS 4.3" or "RHEL4 AS"?

Show me the content of the directory:
Code:
ls /usr/src/kernel/2.6.9-34.EL
I don't think this directory is where your kernel source lives. i.e. Centos puts the development headers here and not the source code.

tip: gconfig or xconfig are easier to use than menuconfig.
http://bugs.centos.org/view.php?id=1110
 
Old 05-19-2006, 02:38 AM   #5
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,660
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
I normally make in /usr/src/linux

I'm using mandriva, but I noticed the same dir used with fedora and red hat.

The more info you give the more help you may get.

the dir "linux" is a link to the source tree.

So, you don't actually work in the source directory but in a sym-link to it.

I think it must be safer to do so, for the kernels sake, rather than risking making a mess of the source tree.

A bit like dynamically reading and writing to the same file at the same time, rather than editing a copy of the file in memory, then saving it.
 
Old 05-20-2006, 04:59 PM   #6
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
I normally make in /usr/src/linux
I'm using mandriva, but I noticed the same dir used with fedora and red hat.
Odd - in my installation of FC4, I had to run make in /usr/src/linux/<kernel-version>/ ... otherwise, how would it know which kernel to be making? And it weren't a link neither. Same with Ubuntu. But FC5, I understand, requires make to be run in /usr/src/linux/<kernel ver>/BUILD or something like that, and CentOS is like that too.

Did you follow that link in my last post?
Quote:
If you want to rebuild your kernel, you need to download the kernel SRPM.
Install it and go to the SPECS dir (usually /usr/src/redhat/SPECS) and issue the command:

rpmbuild -bp kernel-2.6.spec

Then you can configure your kernel in ../BUILD directory.

Last edited by Simon Bridge; 05-20-2006 at 05:01 PM.
 
Old 05-20-2006, 06:39 PM   #7
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,660
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
Yes I did read that post, But I still only referenced my own experience.

Sorry about that. I'm still learning too.

The symlink I mentioned is usually pointed at the last installed kernel-source, if installed from a rpm file.

Otherwise you would normaly run a ln command to do it, if from a tar ball.

I have little other advice at this stage, except, if there is a readme in the kernel-source directory, what does it say?

Hope you find a solution soon.
 
Old 05-21-2006, 07:59 PM   #8
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
funnybossvn: how you getting on? (No rush - it's only been three days... and I probably get the next day ahead of you anyway.)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel compile error: what does it mean? Poorman Linux - Newbie 2 10-27-2003 09:12 PM
kernel compile error draker Linux - Newbie 1 08-14-2003 11:18 AM
Kernel compile error DAChristen29 Linux - Software 1 12-09-2002 10:11 AM
kernel compile error! HELP! ReSync Linux - General 1 06-25-2002 08:21 AM
Kernel compile error theabyyss Linux - General 4 04-08-2002 04:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 11:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration