LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-19-2002, 10:16 PM   #1
isoaga
LQ Newbie
 
Registered: Oct 2002
Posts: 11

Rep: Reputation: 0
First time kernel compiler, please help


I'm running RedHat 8 Beta (Limbo) and i'm trying to get advanced power management support for my laptop so i can check battery time etc. Anyway i used the Kernel Configurator interface in the control centre and after i've added the things i need it says:

make symlinks dep

So i goto the console are run that but it gives me this error

make: *** No rule to make target `symlinks'. Stop.

Any help would be great.

Thnx
 
Old 10-19-2002, 10:26 PM   #2
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
go to the /usr/src/linux directory and type that command

cd /usr/src/linux
make symlinks dep

then do this:

make bzImage

then you have to copy your new kernel and System.map to the /boot dir:

cp arch/i386/boot/bzImage /boot/<bzimage.new>
cp System.map /boot

Now, If you are using lilo, check out /etc/lilo.conf for a line with "image="

cat /etc/lilo.conf | grep image

that should point to the name of the kernel that you just copied over. I called it <bzImage.new> up there, but you can call it anything you want. It might be a good Idea to backup your old one, and then keep the same name for the new one so that you don't have to change lilo.conf
ex (before you do the above cp arch/boot...... /boot/<bzimage.new> command)

mv /boot/bzImage /boot/bzImage.bak

either way, once the lilo.conf file is pointing in the right place, do

/sbin/lilo -v

then reboot!!

good luck
 
Old 10-19-2002, 10:32 PM   #3
isoaga
LQ Newbie
 
Registered: Oct 2002
Posts: 11

Original Poster
Rep: Reputation: 0
Thnx for the fast reply, quick question though...

in /usr/src/ there are two linux directories:

/linux-2.4.18-7.80 & /linux-2.4

which one should i be using?
 
Old 10-19-2002, 10:52 PM   #4
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
hmm... I'm not TOO sure, but I think that one of them might be linked to the other. do "ls -l" inside that directory to find out. if linux-2.4 points to the other , (or vice-versa) it doesn't matter. If not, I guess you have added a newer kernel since you installed your system? in that case, I think you should use the newer one. that will probably be linux-2.4.18-7.80, but to make sure, the "ls -l" command will tell you which one is newer.

good luck
 
Old 10-19-2002, 11:18 PM   #5
isoaga
LQ Newbie
 
Registered: Oct 2002
Posts: 11

Original Poster
Rep: Reputation: 0
You were right, one simply was pointing to the other.

So i've created a new bzImage file however have run into a problem. In /boot there is no existing bzImage file for me to backup, i cannot find it anywhere on my computer. I assume it must be called something different. I use grub as my bootloader and in the grub.conf file it says...

splashimage=(hd0,1)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.18-7.80)
root (hd0,1)
kernel /boot/vmlinuz-2.4.18-7.80 ro root=LABEL=/
initrd /boot/initrd-2.4.18-7.80.img

does this mean that instead of bzImage the file is called vmlinuz-2.4.18-7.80 ?

Should i just make another grub entry the same as this one except altering the kernel line to have bzImage.new as the kernel file?
 
Old 10-19-2002, 11:35 PM   #6
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
To tell you the truth, I don't use grub, so I can't really tell you exactly what to do (you can probably find some info if you do a search on this site). It does look like the kernel you are using is vmlinux-2.4.18-7.80, so try renaming that ex:

mv /boot/vmlinux-2.4.18-7.80 /boot/vmlinux-2.4.18-7.80.bak

and copy your new bzImage to /boot/vmlinux-2.4.18-7.80

then (i'm guessing) you'll have to run /sbin/grub

I bet you COULD write a whole new section (keeping your old kernel bootable) with pretty much the same stuff, execpt for a different title, and different kernel image.... but you should definitly get that info from someone who knows how to use grub.

hope that helps
 
Old 10-19-2002, 11:50 PM   #7
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
shute buddy... you kow what? I forgot to tell you something :-(

If you enabled that new stuff as modules (m) then you needed to do this:

make modules
make modules_install

after you did "make bzImage"
It really shouldn't matter (I don't think) if you compiled them into the kernel, but if it doesn't work you might want to go back through it all and do that.

Instead of configuring the kernel through whatever you were using, I would strongly suggest going to the /usr/src/linux-2.4.18 directory and doing "make xconfig" or "make menuconfig" instead.... it's the REAL way of doing it. "Advanced Power Management" is in the "general" section. after you do that, do "make dep" (not "make symlinks dep")

I'm really sorry if I sent you off course
 
  


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
kernel compile time and boot time lordofring Programming 1 11-13-2005 03:04 AM
HELP!! 2.6.8-1.521 Kernel Compiler error tcomputerchip Fedora 3 10-11-2004 03:19 AM
First time compiler... hkxx9 Linux - Software 4 09-17-2004 07:27 PM
Setting System Time: kernel in wrong time zone warrenweiss Linux - General 7 05-15-2004 04:25 PM
Check it out: kernel auto-compiler zhenwu Linux - General 2 02-01-2002 04:33 AM


All times are GMT -5. The time now is 08:21 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration