public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* kernel hcking
@ 2003-04-11 15:07 Vikram Rangnekar
  2003-04-11 15:17 ` Con Kolivas
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Vikram Rangnekar @ 2003-04-11 15:07 UTC (permalink / raw)
  To: linux-kernel


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

-- 
regards
Vikram (http://www.vicramresearch.com)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: kernel hcking
  2003-04-11 15:07 kernel hcking Vikram Rangnekar
@ 2003-04-11 15:17 ` Con Kolivas
  2003-04-11 15:24 ` John Bradford
  2003-04-11 15:34 ` Antonio Vargas
  2 siblings, 0 replies; 7+ messages in thread
From: Con Kolivas @ 2003-04-11 15:17 UTC (permalink / raw)
  To: Vikram Rangnekar, linux-kernel

On Sat, 12 Apr 2003 01:07, 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

Try cc cache
http://ccache.samba.org

Con

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: kernel hcking
  2003-04-11 15:07 kernel hcking Vikram Rangnekar
  2003-04-11 15:17 ` Con Kolivas
@ 2003-04-11 15:24 ` John Bradford
  2003-04-11 15:37   ` Antonio Vargas
  2003-04-11 15:34 ` Antonio Vargas
  2 siblings, 1 reply; 7+ messages in thread
From: John Bradford @ 2003-04-11 15:24 UTC (permalink / raw)
  To: Vikram Rangnekar; +Cc: linux-kernel

> 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.

A lot of developers have multiple physical machines, which makes
testing various different kernels a lot easier.

> Also every time you makes changes in the kernel it must be hell to
> recompile the whole thing

If you are testing kernels on a separate machine to the one you are
compiling on, and therefore not rebooting, it's not much of a problem
- with enough RAM, most or all of the kernel source will be cached,
and you can compile a kernel in three to five minutes on a fast
machine.

John.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: kernel hcking
  2003-04-11 15:07 kernel hcking Vikram Rangnekar
  2003-04-11 15:17 ` Con Kolivas
  2003-04-11 15:24 ` John Bradford
@ 2003-04-11 15:34 ` Antonio Vargas
  2 siblings, 0 replies; 7+ messages in thread
From: Antonio Vargas @ 2003-04-11 15:34 UTC (permalink / raw)
  To: linux-kernel

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.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: kernel hcking
  2003-04-11 15:24 ` John Bradford
@ 2003-04-11 15:37   ` Antonio Vargas
  2003-04-11 16:00     ` John Bradford
  2003-04-11 21:08     ` Jan-Benedict Glaw
  0 siblings, 2 replies; 7+ messages in thread
From: Antonio Vargas @ 2003-04-11 15:37 UTC (permalink / raw)
  To: John Bradford; +Cc: Vikram Rangnekar, linux-kernel

On Fri, Apr 11, 2003 at 04:24:37PM +0100, John Bradford 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.
> 
> A lot of developers have multiple physical machines, which makes
> testing various different kernels a lot easier.
> 
> > Also every time you makes changes in the kernel it must be hell to
> > recompile the whole thing
> 
> If you are testing kernels on a separate machine to the one you are
> compiling on, and therefore not rebooting, it's not much of a problem
> - with enough RAM, most or all of the kernel source will be cached,
> and you can compile a kernel in three to five minutes on a fast
> machine.

John, you mean a "make clean && make bzImage" takes you only about 4
minutes??? I would like to know more details about .config, machine
specs, compiler and so on :)

And no doubt having enough RAM to cache all the tree is really good :)

Greets, Antonio.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: kernel hcking
  2003-04-11 15:37   ` Antonio Vargas
@ 2003-04-11 16:00     ` John Bradford
  2003-04-11 21:08     ` Jan-Benedict Glaw
  1 sibling, 0 replies; 7+ messages in thread
From: John Bradford @ 2003-04-11 16:00 UTC (permalink / raw)
  To: Antonio Vargas; +Cc: John Bradford, Vikram Rangnekar, linux-kernel

> John, you mean a "make clean && make bzImage" takes you only about 4
> minutes???

Yep.

Well, make distclean; cp /foo/bar/config .config; make oldconfig; make bzImage

> I would like to know more details about .config, machine specs,
> compiler and so on :)

That's on an Athlon XP 2200, 512 MB RAM, 7200 RPM disk, with a fairly
typical .config.

> And no doubt having enough RAM to cache all the tree is really good :)

Yep :-).

John.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: kernel hcking
  2003-04-11 15:37   ` Antonio Vargas
  2003-04-11 16:00     ` John Bradford
@ 2003-04-11 21:08     ` Jan-Benedict Glaw
  1 sibling, 0 replies; 7+ messages in thread
From: Jan-Benedict Glaw @ 2003-04-11 21:08 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1221 bytes --]

On Fri, 2003-04-11 17:37:11 +0200, Antonio Vargas <wind@cocodriloo.com>
wrote in message <20030411153711.GE25862@wind.cocodriloo.com>:
> On Fri, Apr 11, 2003 at 04:24:37PM +0100, John Bradford wrote:
> > > Also every time you makes changes in the kernel it must be hell to
> > > recompile the whole thing
> > 
> > If you are testing kernels on a separate machine to the one you are
> > compiling on, and therefore not rebooting, it's not much of a problem
> > - with enough RAM, most or all of the kernel source will be cached,
> > and you can compile a kernel in three to five minutes on a fast
> > machine.
> 
> John, you mean a "make clean && make bzImage" takes you only about 4
> minutes??? I would like to know more details about .config, machine
> specs, compiler and so on :)

Um, take 1.5GB RAM and one of those dual athlon boards and you'll even
do a full compile in <5min...

MfG, JBG

-- 
   Jan-Benedict Glaw       jbglaw@lug-owl.de    . +49-172-7608481
   "Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg
    fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!
      ret = do_actions((curr | FREE_SPEECH) & ~(IRAQ_WAR_2 | DRM | TCPA));

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-04-11 20:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-11 15:07 kernel hcking Vikram Rangnekar
2003-04-11 15:17 ` Con Kolivas
2003-04-11 15:24 ` John Bradford
2003-04-11 15:37   ` Antonio Vargas
2003-04-11 16:00     ` John Bradford
2003-04-11 21:08     ` Jan-Benedict Glaw
2003-04-11 15:34 ` Antonio Vargas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox