[TAG] kernel header modification
Ignacio
Ignacio
Wed Jun 11 12:07:51 MSD 2008
-----Original Message-----
From: Ren? Pfeiffer [mailto:lynx at luchs.at]
To: TAG <tag at lists.linuxgazette.net>
Sent: Wednesday, 11 June 2008 4:52 PM
To: tag at lists.linuxgazette.net
Cc: Ignacio, Domingo Jr Ostria - igndo001
Subject: Re: [TAG] kernel header modification
Hello, Domingo!
On Jun 11, 2008 at 1523 +0930, Ignacio, Domingo Jr Ostria - igndo001 appeared and said:
> [...]
> I am adding new variables to the tcp header(tcp.h) of the linux
> kernel and reflect this changes to the source code .Kindly shed light
> to my confusions below:
> 1. Do I have to recompile the whole kernel to reflect the changes
> in the header files and source code(i.e., tcp.c, tcp_input.c, etc)?
> 2. If so, what are the necessary steps involved( i.e., re-compile
> process) to reflect the new variables I added to the header file and
> the source codes?
The Linux kernel has its own build system which takes care of all the dependencies. I usually do the following:
1. Get the source and unpack it.
2. Enter the top level directory of the source tree.
3. "make mrproper" (only if you use the tree for the first time or want
to reset everything)
4. "make oldconfig" (this checks your current kernel configuration
against updated settings, probably only availabe when you have the
config... files for your running kernel in /boot/).
5. "make menuconfig" or "make xconfig" - this presents you with the
dependency menu where you can tell the build process what to include
and what to leave out.
6. make
Since the steps up to 4 are only necessary when you start, the make at step 6 will always build everything that needs to be rebuild.
Installing is done by:
7. make modules_install
8. make install
Step 7 will copy all modules to /lib/modules/, step 8 will copy everything into /boot/. Make sure you adjust your bootloader configuration to use the new kernel (either /etc/lilo.conf or /boot/grub/menu.lst).
Best,
Ren?.
Hi Rene,
Thank you very much for the response. I already installed the rpm kernel source and build it(when I asked before how to get the .c files). My kernel is already up and running. My problem now is that I added a specific variable into the tcp.h header file and I wanted it to be reflected and saved into the kernel. I saved the changes but is it enough process or do I need to do other things like rebuilding the kernel, etc. for this change to be saved into my kernel so that the next time I run it, the new tcp.h header file will be used instead of the old one.
Thank you very much in advance for the help.
Cheers,
Dom
More information about the TAG
mailing list