kernel recompilation


 
Thread Tools Search this Thread
Operating Systems Linux kernel recompilation
# 1  
Old 09-03-2004
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
# 2  
Old 09-04-2004
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.
# 3  
Old 09-09-2004
MySQL 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
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Linux

Unload kernel module at boot time (Debian Wheezy 7.2, 3.2.0-4-686-pae kernel)

Hi everyone, I am trying to prevent the ehci_hcd kernel module to load at boot time. Here's what I've tried so far: 1) Add the following line to /etc/modprobe.d/blacklist.conf (as suggested here): 2) Blacklisted the module by adding the following string to 3) Tried to blacklist the module... (0 Replies)
Discussion started by: gacanepa
0 Replies

2. Red Hat

How does the kernel know where is /etc/ ?

If I create some hard disk partitions: /boot, /, /usr, /tmp ... , of cause the kernel is in the /boot partition, /etc/fstab is in the / partition not in /boot partition, when the system boot, how does the kernel know where is the / partition? Or I create a separated partition: /etc, can the... (7 Replies)
Discussion started by: haixiao_liu
7 Replies

3. Solaris

Which file is read by kernel to set its default system kernel parameters values?

Hi gurus Could anybody tell me which file is read by kernel to set its default system kernal parameters values in solaris. Here I am not taking about /etc/system file which is used to load kernal modules or to change any default system kernal parameter value Is it /dev/kmem file or something... (1 Reply)
Discussion started by: girish.batra
1 Replies

4. Linux

Supermicro(dual core) server getting rebooted after "decompressing the kernel;booting the kernel" me

supermicro(dual core) server getting rebooted after "decompressing the kernel;booting the kernel" message comes. I tried giving acpi=off to the kernel command line but same problem.It shows everything ok and no problem with memory and processors and power supplies.Wt could be the reason? It has... (1 Reply)
Discussion started by: pankajd
1 Replies

5. AIX

How to convert a partition usin 64 bits kernel to 32 bits kernel?

Hello there: I know that exist a procedure to convert an OS using 32bits kernel to 64 bits kernel. But, exist a procedure to convert an OS using 64bits to 32 bits kernel? Please help me. Regards. (2 Replies)
Discussion started by: GEIER
2 Replies

6. SuSE

max number of slabs per kernel module (kernel 2.6.17, suse)

Hi All, Is there a max number of slabs that can be used per kernel module? I'm having a tough time finding out that kind of information, but the array 'node_zonelists' (mmzone.h) has a size of 5. I just want to avoid buffer overruns and other bad stuff. Cheers, Brendan (4 Replies)
Discussion started by: Brendan Kennedy
4 Replies

7. Programming

kernel-kernel call communication

hi all! i have developed a mechanism in system.c to count how many times each kernel call is called. The results are held in an array in system.c . What i want to do is to create a new kernel call which will print this array. I need help in passing the array from system.c to the new kernel call. ... (5 Replies)
Discussion started by: aureliano
5 Replies

8. Linux

Kernel panic - not syncing: cannot execute a PAE-enabled kernel on PAE-less CPU

ok so I just installed fedora core 6 on my dell inspiron 700m and I go to boot into linux and I get this error. Has anyone seen this before? I also had XP Pro and Vista installed on this pc prior to putting fedora core 6 on the machine. I'm trying to setup a triple boot system. Please Help... (2 Replies)
Discussion started by: dave043
2 Replies

9. Red Hat

kernel 2.6.18

Again same issue with new kernel 2.6.18.1 root@world # iptables -L modprobe: QM_MODULES: Function not implemented modprobe: QM_MODULES: Function not implemented modprobe: Can't locate module ip_tables iptables v1.2.8: can't initialize iptables table `filter': iptables who? (do you... (10 Replies)
Discussion started by: prashant_ohol
10 Replies
Login or Register to Ask a Question