LinuxQuestions.org
Visit Jeremy's Blog.
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 01-04-2007, 02:03 AM   #1
math_1048
LQ Newbie
 
Registered: Dec 2006
Posts: 29

Rep: Reputation: 15
Error@Re-compiling kernel


Hello Dears
I tried to configure my RHEL4 2.6.9-42.EL Kernel,
by make menuconfig and make xconfig commands too
but when I try to recompile by make command its gives me this error message
Code:
make[1]: *** No rule to make target `init/main.o', needed by
`init/built-in.o'.  Stop.
make: *** [init] Error 2
Plz help me to solve this problem!!
Thank you very much
 
Old 01-04-2007, 08:20 AM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
What steps did you take prior to this, list them from the beginning. they should be something like in order;

Code:
wget ftp://ftp.redhat.com/pub/redhat/linux/updates/enterprise/4ES/en/os/SRPMS/kernel-2.6.9-42.0.3.EL.src.rpm
rpm -ivh kernel-2.6.9-42.0.3.EL.src.rpm
cd /usr/src/redhat/SPCES
rpmbuild -bp --target $(arch) kernel-2.6.spec
cd /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9
make mrproper
make menuconfig  (or xconfig or gconfig)
If not then try again, the rpmbuild command is required and very important perhaps you missed it.
 
Old 01-04-2007, 09:18 AM   #3
math_1048
LQ Newbie
 
Registered: Dec 2006
Posts: 29

Original Poster
Rep: Reputation: 15
Thank you Dear very much for help
What I do are here
http://faq.planetsky.com/en/dvb/twinhan-lin.html
that was for install new modules for DVB twinhan bt878 card
and the steps was
make xconfig or make menuconfig
//so do select the twinhan card
make //error output here so
make modules_install //so
make install.
the kernel @ /usr/src/kernels/2.6.9-42.EL-i686 directory
and I found no thing @ /usr/src/redhat/BUILD/ directory
are I must make above steps to install the additional modules
thank you very much
 
Old 01-04-2007, 10:16 AM   #4
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
I see you have the kernel-devel rpm packages installed but not the kernel source (there is a difference BTW) which is why you do not the anything in your /use/src/redhat/BUILD directory.

What "make" packages do you have installed, for example;

$ rpm -qa '*make*'
make-3.81-1.1
automake17-1.7.9-7
automake15-1.5-16
automake-1.9.6-2.1
imake-1.0.2-3
automake16-1.6.3-8
automake14-1.4p6-13

Do not worry about the version numbers or the imake package since i'm running RHEL5Beta 2. You do want all the automake packages and make package installed.
 
Old 01-04-2007, 11:01 PM   #5
math_1048
LQ Newbie
 
Registered: Dec 2006
Posts: 29

Original Poster
Rep: Reputation: 15
Dear
make package I found are
Code:
automake-1.9.2-3
make-3.80-6.EL4
automake14-1.4p6-12
automake16-1.6.3-5
pmake-1.45-16
automake15-1.5-13
automake17-1.7.9-5
I do steps you tell me
Code:
wget ftp://ftp.redhat.com/pub/redhat/linux/updates/enterprise/4ES/en/os/SRPMS/kernel-2.6.9-42.0.3.EL.src.rpm
rpm -ivh kernel-2.6.9-42.0.3.EL.src.rpm
cd /usr/src/redhat/SPCES
rpmbuild -bp --target $(arch) kernel-2.6.spec
cd /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9
make mrproper
make menuconfig  (or xconfig or gconfig)
and after make menuconfig
do make
make modules_install
make install
and the make istall output are
Code:
  CHK     include/linux/version.h
make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
  CHK     include/linux/compile.h
Kernel: arch/i386/boot/bzImage is ready
sh /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/arch/i386/boot/install.sh 2.6.9-prep arch/i386/boot/bzImage System.map ""
are this output are OK!
then reboot so
now I have 2 linux kernel options in Grub
one for my old kernel 2.6.9-42.EL
and another for the new kernel 2.6.9-prep
when I select the new kernel 2.6.9-prep
the OS hanging at hardware initializing startup process
so I reset my PC and select the old one
now my kernel are 2.6.9-42.EL.
thank you very much

I
 
Old 01-05-2007, 05:41 AM   #6
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
This sometimes happens, try the custom kerenel again. If it still does not start then
install the CentOS 4.4 plus kernel which has the bt878 kernel module already built, for example;

http://isoredirect.centos.org/centos...us.c4.i686.rpm

You can remove your custom -prep kernel if you want, for example;

rpm -e kernel-2.6.9-42.0.3-prep.EL

Make sure you type the proper kernel version you want to remove;

rpm -qa 'kernel*'
 
Old 01-05-2007, 10:36 AM   #7
math_1048
LQ Newbie
 
Registered: Dec 2006
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Lenard
install the CentOS 4.4 plus kernel which has the bt878 kernel module already built
Dear that mean That I dont need to run these commands
Code:
make menuconfig // to select bt878 module
make
make modules_install
make install
and just do these steps
Code:
rpm -ivh kernel-2.6.9-42.0.3.plus.c4.i686.rpm
cd /usr/src/redhat/SPCES
rpmbuild -bp --target $(arch) kernel-2.6.spec
cd /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9
make mrproper
make menuconfig  (or xconfig or gconfig)
and I detect that the command "make moroper" are reset all settings (clean all kernel configuration), so when I run "make", make "modules_install", and "make install" command that will detect my PC hardware or I must configure them all manually from "make menuconfig" command?
thank you very much

Last edited by math_1048; 01-05-2007 at 09:10 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Error in Kernel.h file, while compiling the kernel Nishant Desai Linux - Kernel 0 11-13-2006 11:19 PM
error while compiling kernel. ashlesha Linux - General 9 07-08-2006 08:47 PM
kernel compiling error geletine Linux - Software 8 04-04-2006 01:22 PM
Error Compiling Kernel kurin Linux - Software 1 12-01-2004 04:08 PM
Error compiling kernel 2.6.4 Jair Slackware 5 03-16-2004 01:46 PM

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

All times are GMT -5. The time now is 08:34 AM.

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