Re: kernel hcking

Antonio Vargas (wind@cocodriloo.com)
Fri, 11 Apr 2003 17:34:59 +0200


On Fri, Apr 11, 2003 at 05:07:09PM +0200, Vikram Rangnekar wrote:
>
> I'm a kernel newbie and just wanted to know what do most kernel hackers do
> when working on the kernel say 2.5 when you make changes do u need to
> recompile the kernel and reboot the machine to test your small modification
> or do people use something like bochs. Also every time you makes changes in
> the kernel it must be hell to recompile the whole thing do kernel hackers
> just compile the specific file and link it into the kernel or something. Some
> of these will be stupid questions to most of you but I am curious since I've
> been working on the kernel lately and recompiling and rebooting is driving me
> nuts

I'm also newbie at actually coding on the kernel, and I've
been using user-mode-linux to try my patches... it's easy and clean,
just make a very small config so that the initial compile is
also fast.

Then, when you are doing incremental compiling, just do a
"make -j linux", this is very fast when you are not recompiling
all .o files since the makefile checks the last-modified date
for the .c files.

For maximum performance, also use ccache with (very important) the
cache directory on the same filesystem than the compile directory.
I keep a "compile" directory and a "ccache" directory at the same
level.

When testing with user-mode-linux, you can simply type
./linux and the new kernel boots in your terminal. If
you want to boot a real machine, I suggest you get a
second computer and boot it by loading the kernel off
the net, using tftp protocol.

Ping me if you want some more help at this last issue.

Greets and have fun!

Antonio.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/