The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > Linux
Google UNIX.COM


Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to convert a partition usin 64 bits kernel to 32 bits kernel? GEIER AIX 2 08-18-2008 12:20 AM
Mac OSX kernel cleansing_flame OS X (Apple) 2 01-31-2008 04:56 PM
max number of slabs per kernel module (kernel 2.6.17, suse) Brendan Kennedy Linux 4 01-23-2008 06:40 AM
kernel-kernel call communication aureliano High Level Programming 5 06-05-2007 02:48 PM
Kernel panic - not syncing: cannot execute a PAE-enabled kernel on PAE-less CPU dave043 Linux 2 05-09-2007 10:57 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 09-03-2004
Registered User
 

Join Date: Jul 2004
Posts: 5
Question kernel recompilation

Hi all!
i'm a newbie to linux kernel hacking...
currently i'm using linux kernel2.4.7-10.
the problem is whenever i tried to make change to any souce file
e.g. fork.c, and try to recompile the kernel the following error occurs:
make menuconfig.
i select linux kernel hacking
after wards i use make dep
that again gives no error
but when i finally issue command
make bzImage
at the end it gives me errors
regarding Hotplug.o
i don't know whats the problem with it
can u guys plz help me out
so that i may recompile the kernel!!

Regards,
Ned
Reply With Quote
Forum Sponsor
  #2  
Old 09-04-2004
TioTony's Avatar
Bit Pusher
 

Join Date: Oct 2001
Location: Southern California
Posts: 332
Here is my cheat-sheet for recompiling the linux kernel.

1. Install the kernel source "rpm -ivh kernel-source-<kernel_version>.i386.rpm" ".
2. cd /usr/src/linux-2.4 (or what ever version the /usr/src/linux-#.# dir is)
3. Run 'make mrproper'
4. Run 'make oldconfig'
5. Run 'TERM=vt100'
6. Run 'export TERM'
7. Run 'make menuconfig'. Change whatever you want to change at this point.
8. Run 'make dep'
9. Run 'make clean'
10. vi Makefile, update the version,call it something logical.
11. Run 'make bzImage'
12. Run 'make modules'
13. Run 'make modules_install'
14. Run 'make install'
15. Run 'mkinitrd /boot/initrd-<custom_version>.img <kernel version>' like this:
mkinitrd /boot/initrd-2.4.9-e.5LUN.img 2.4.9-e.5smp
16. (Do this only if you are using lilo) vi /etc/lilo.conf, create a new entry like this:

image=/boot/vmlinuz-2.4.20-8-custom
label=2.4.20-8-custom
initrd=/boot/initrd-2.4.20-8-custom.img
read-only
append="root=LABEL=/

Be sure to replace the version info with the custom version you created.
17. (Do this only if you are using lilo) If you are using lilo, run 'lilo'
18. (Do this only if you are using grub) vi /etc/grub.conf, create a new entry like this:

title Red Hat Linux (2.4.20-8-custom)
root (hd0,0)
kernel /boot/vmlinuz-2.4.20-8-custom ro root=LABEL=/
initrd /boot/initrd-2.4.20-8-custom.img

Be sure to replace the version info with the custom version you created. Be sure to have the correct root location. It may be easiest to copy an existing section and just replace the stuff you changed.
19. reboot, you should see the new version in the boot list.

To troubleshoot the specific hotplug issue you are having I would possibly try a different approach:

1. run 'depmod -a'
2. run 'modprobe hotplug'
3. run step 15 from above.

This may give you more info about why you are having problems specific to hotplug. Once you figure out the hotplug problems, then go back to the above procedure.
Reply With Quote
  #3  
Old 09-09-2004
Registered User
 

Join Date: Jul 2004
Posts: 5
Thumbs up The problem was not dat!!

hi TioTony
Thanks for the reply. well the actual problem was in configuartion file. in make menuconfig i accidently selected hotplug support but my system was not supporting it. as i disabled it my kernel recompiled successfully and now i'm having fun with the source code.
I have another question:
i had searched alot to find out whereis lock_kernel() function implementation in the source but couldn't find it any where. can any1 plz tell me.

Regards,
Ned
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:48 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0