All of lore.kernel.org
 help / color / mirror / Atom feed
* Rebuild a changed kernel quickly with make?
@ 2013-07-04  6:33 Martin Kepplinger
  2013-07-04  6:53 ` Warlich, Christof
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Martin Kepplinger @ 2013-07-04  6:33 UTC (permalink / raw)
  To: kernelnewbies

Hi.

When I change something in the kernel and just hit make from toplevel
dir, it always compiles everything again, no matter if it wasn't changed
at all in the meantime.
I thought make should be able to make a second build time really quick.
What am I doing wrong? Is there a make target I don't know of? I don't
type in any, just make.

thanks,

                    martin

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

* Rebuild a changed kernel quickly with make?
  2013-07-04  6:33 Rebuild a changed kernel quickly with make? Martin Kepplinger
@ 2013-07-04  6:53 ` Warlich, Christof
  2013-07-04  9:13   ` David kiarie
  2013-07-04 18:18 ` Valdis.Kletnieks at vt.edu
  2013-07-09  7:46 ` Srinivas Ganji
  2 siblings, 1 reply; 7+ messages in thread
From: Warlich, Christof @ 2013-07-04  6:53 UTC (permalink / raw)
  To: kernelnewbies

> When I change something in the kernel and just hit make from toplevel
> dir, it always compiles everything again, no matter if it wasn't changed
> at all in the meantime.
> I thought make should be able to make a second build time really quick.
> What am I doing wrong? Is there a make target I don't know of? I don't
> type in any, just make.

Are you sure it rebuilds _everything_, i.e. as in a fresh build or after a "make clean?"

When I rerun make without changing anything, it just does the following, which is much
Less than a complete build:

$ make
make -C /root/views/DCUOS_3/derived/tdc/kernel O=/root/views/DCUOS_3/derived/tdc/kernelObjects/. 
  Using /root/views/DCUOS_3/derived/tdc/kernel as source for kernel
  GEN     /root/views/DCUOS_3/derived/tdc/kernelObjects/Makefile
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-x86
  CALL    /root/views/DCUOS_3/derived/tdc/kernel/scripts/checksyscalls.sh
  CHK     include/linux/compile.h
  VDSOSYM arch/x86/vdso/vdso32-int80-syms.lds
  VDSOSYM arch/x86/vdso/vdso32-sysenter-syms.lds
  VDSOSYM arch/x86/vdso/vdso32-syms.lds
  LD      arch/x86/vdso/built-in.o
  LD      arch/x86/built-in.o
  LD      vmlinux.o
  MODPOST vmlinux.o
  GEN     .version
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
  KSYM    .tmp_kallsyms1.S
  AS      .tmp_kallsyms1.o
  LD      .tmp_vmlinux2
  KSYM    .tmp_kallsyms2.S
  AS      .tmp_kallsyms2.o
  LD      vmlinux
  SYSMAP  System.map
  SYSMAP  .tmp_System.map
  VOFFSET arch/x86/boot/voffset.h
  OBJCOPY arch/x86/boot/compressed/vmlinux.bin
  GZIP    arch/x86/boot/compressed/vmlinux.bin.gz
  MKPIGGY arch/x86/boot/compressed/piggy.S
  AS      arch/x86/boot/compressed/piggy.o
  LD      arch/x86/boot/compressed/vmlinux
  ZOFFSET arch/x86/boot/zoffset.h
  AS      arch/x86/boot/header.o
  CC      arch/x86/boot/version.o
  LD      arch/x86/boot/setup.elf
  OBJCOPY arch/x86/boot/setup.bin
  OBJCOPY arch/x86/boot/vmlinux.bin
  BUILD   arch/x86/boot/bzImage
Root device is (8, 5)
Setup is 11148 bytes (padded to 11264 bytes).
System is 1759 kB
CRC f583db84
Kernel: arch/x86/boot/bzImage is ready  (#3)
  Building modules, stage 2.
  MODPOST 1 modules 

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

* Rebuild a changed kernel quickly with make?
  2013-07-04  6:53 ` Warlich, Christof
@ 2013-07-04  9:13   ` David kiarie
  2013-07-04 12:59     ` Martin Kepplinger
  0 siblings, 1 reply; 7+ messages in thread
From: David kiarie @ 2013-07-04  9:13 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Jul 4, 2013 at 9:53 AM, Warlich, Christof <
christof.warlich@siemens.com> wrote:

> > When I change something in the kernel and just hit make from toplevel
> > dir, it always compiles everything again, no matter if it wasn't changed
> > at all in the meantime.
> > I thought make should be able to make a second build time really quick.
> > What am I doing wrong? Is there a make target I don't know of? I don't
> > type in any, just make.
>
> Are you sure it rebuilds _everything_, i.e. as in a fresh build or after a
> "make clean?"
>
> When I rerun make without changing anything, it just does the following,
> which is much
> Less than a complete build:
>
> $ make
> make -C /root/views/DCUOS_3/derived/tdc/kernel
> O=/root/views/DCUOS_3/derived/tdc/kernelObjects/.
>   Using /root/views/DCUOS_3/derived/tdc/kernel as source for kernel
>   GEN     /root/views/DCUOS_3/derived/tdc/kernelObjects/Makefile
>   CHK     include/linux/version.h
>   CHK     include/linux/utsrelease.h
>   SYMLINK include/asm -> include/asm-x86
>   CALL    /root/views/DCUOS_3/derived/tdc/kernel/scripts/checksyscalls.sh
>   CHK     include/linux/compile.h
>   VDSOSYM arch/x86/vdso/vdso32-int80-syms.lds
>   VDSOSYM arch/x86/vdso/vdso32-sysenter-syms.lds
>   VDSOSYM arch/x86/vdso/vdso32-syms.lds
>   LD      arch/x86/vdso/built-in.o
>   LD      arch/x86/built-in.o
>   LD      vmlinux.o
>   MODPOST vmlinux.o
>   GEN     .version
>   CHK     include/linux/compile.h
>   UPD     include/linux/compile.h
>   CC      init/version.o
>   LD      init/built-in.o
>   LD      .tmp_vmlinux1
>   KSYM    .tmp_kallsyms1.S
>   AS      .tmp_kallsyms1.o
>   LD      .tmp_vmlinux2
>   KSYM    .tmp_kallsyms2.S
>   AS      .tmp_kallsyms2.o
>   LD      vmlinux
>   SYSMAP  System.map
>   SYSMAP  .tmp_System.map
>   VOFFSET arch/x86/boot/voffset.h
>   OBJCOPY arch/x86/boot/compressed/vmlinux.bin
>   GZIP    arch/x86/boot/compressed/vmlinux.bin.gz
>   MKPIGGY arch/x86/boot/compressed/piggy.S
>   AS      arch/x86/boot/compressed/piggy.o
>   LD      arch/x86/boot/compressed/vmlinux
>   ZOFFSET arch/x86/boot/zoffset.h
>   AS      arch/x86/boot/header.o
>   CC      arch/x86/boot/version.o
>   LD      arch/x86/boot/setup.elf
>   OBJCOPY arch/x86/boot/setup.bin
>   OBJCOPY arch/x86/boot/vmlinux.bin
>   BUILD   arch/x86/boot/bzImage
> Root device is (8, 5)
> Setup is 11148 bytes (padded to 11264 bytes).
> System is 1759 kB
> CRC f583db84
> Kernel: arch/x86/boot/bzImage is ready  (#3)
>   Building modules, stage 2.
>   MODPOST 1 modules
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
Am also pretty sure it does not compile everything.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130704/81acdb94/attachment.html 

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

* Rebuild a changed kernel quickly with make?
  2013-07-04  9:13   ` David kiarie
@ 2013-07-04 12:59     ` Martin Kepplinger
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Kepplinger @ 2013-07-04 12:59 UTC (permalink / raw)
  To: kernelnewbies

On 04.07.2013 11:13, David kiarie wrote:
> 
> 
> On Thu, Jul 4, 2013 at 9:53 AM, Warlich, Christof
> <christof.warlich at siemens.com <mailto:christof.warlich@siemens.com>> wrote:
> 
>     > When I change something in the kernel and just hit make from toplevel
>     > dir, it always compiles everything again, no matter if it wasn't
>     changed
>     > at all in the meantime.
>     > I thought make should be able to make a second build time really
>     quick.
>     > What am I doing wrong? Is there a make target I don't know of? I don't
>     > type in any, just make.
> 
>     Are you sure it rebuilds _everything_, i.e. as in a fresh build or
>     after a "make clean?"
> 
>     When I rerun make without changing anything, it just does the
>     following, which is much
>     Less than a complete build:
> 
>     $ make
>     make -C /root/views/DCUOS_3/derived/tdc/kernel
>     O=/root/views/DCUOS_3/derived/tdc/kernelObjects/.
>       Using /root/views/DCUOS_3/derived/tdc/kernel as source for kernel
>       GEN     /root/views/DCUOS_3/derived/tdc/kernelObjects/Makefile
>       CHK     include/linux/version.h
>       CHK     include/linux/utsrelease.h
>       SYMLINK include/asm -> include/asm-x86
>       CALL  
>      /root/views/DCUOS_3/derived/tdc/kernel/scripts/checksyscalls.sh
>       CHK     include/linux/compile.h
>       VDSOSYM arch/x86/vdso/vdso32-int80-syms.lds
>       VDSOSYM arch/x86/vdso/vdso32-sysenter-syms.lds
>       VDSOSYM arch/x86/vdso/vdso32-syms.lds
>       LD      arch/x86/vdso/built-in.o
>       LD      arch/x86/built-in.o
>       LD      vmlinux.o
>       MODPOST vmlinux.o
>       GEN     .version
>       CHK     include/linux/compile.h
>       UPD     include/linux/compile.h
>       CC      init/version.o
>       LD      init/built-in.o
>       LD      .tmp_vmlinux1
>       KSYM    .tmp_kallsyms1.S
>       AS      .tmp_kallsyms1.o
>       LD      .tmp_vmlinux2
>       KSYM    .tmp_kallsyms2.S
>       AS      .tmp_kallsyms2.o
>       LD      vmlinux
>       SYSMAP  System.map
>       SYSMAP  .tmp_System.map
>       VOFFSET arch/x86/boot/voffset.h
>       OBJCOPY arch/x86/boot/compressed/vmlinux.bin
>       GZIP    arch/x86/boot/compressed/vmlinux.bin.gz
>       MKPIGGY arch/x86/boot/compressed/piggy.S
>       AS      arch/x86/boot/compressed/piggy.o
>       LD      arch/x86/boot/compressed/vmlinux
>       ZOFFSET arch/x86/boot/zoffset.h
>       AS      arch/x86/boot/header.o
>       CC      arch/x86/boot/version.o
>       LD      arch/x86/boot/setup.elf
>       OBJCOPY arch/x86/boot/setup.bin
>       OBJCOPY arch/x86/boot/vmlinux.bin
>       BUILD   arch/x86/boot/bzImag
>     Setup is 11148 bytes (padded to 11264 bytes).
>     System is 1759 kB
>     CRC f583db84
>     Kernel: arch/x86/boot/bzImage is ready  (#3)
>       Building modules, stage 2.
>       MODPOST 1 modules
>     _______________________________________________
>     Kernelnewbies mailing list
>     Kernelnewbies at kernelnewbies.org <mailto:Kernelnewbies@kernelnewbies.org>
>     http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> 
> Am also pretty sure it does not compile everything.
> 
> 
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> 
indeed it doesn't compile everything but a lot (or all?) modules for
example. A build with very little changes lasts more than half the time
a fresh clean build lasts. But I don't seem to do anything wrong then,
just wanted to check if I can do something about it. thanks!!

                 martin

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

* Rebuild a changed kernel quickly with make?
  2013-07-04  6:33 Rebuild a changed kernel quickly with make? Martin Kepplinger
  2013-07-04  6:53 ` Warlich, Christof
@ 2013-07-04 18:18 ` Valdis.Kletnieks at vt.edu
  2013-07-09  7:46 ` Srinivas Ganji
  2 siblings, 0 replies; 7+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2013-07-04 18:18 UTC (permalink / raw)
  To: kernelnewbies

On Thu, 04 Jul 2013 08:33:00 +0200, Martin Kepplinger said:

> When I change something in the kernel and just hit make from toplevel
> dir, it always compiles everything again, no matter if it wasn't changed
> at all in the meantime.

It *really* depends on which CONFIG_ variable you change.

If you change some CONFIG_ variables like the ones that control whether
a specific module is built, the rebuild may in fact only compile 1 or 2
.c files and link the module into a .ko and be done. Maybe a few more
if you have /proc/config.gz enabled, because then it has to rebuild and
relink the data for that into the kernel.

THe gotcha is that changing other CONFIG_ variables can result in almost
everything being rebuilt - for instance, if you change a CONFIG_ that
controls a #ifdef in sched.h or one of the base networking headers, that
will cause a recompile of everything that includes that .h (and pretty
much everybody and their pet llama ends up including sched.h indirectly).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130704/d6a21077/attachment.bin 

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

* Rebuild a changed kernel quickly with make?
  2013-07-04  6:33 Rebuild a changed kernel quickly with make? Martin Kepplinger
  2013-07-04  6:53 ` Warlich, Christof
  2013-07-04 18:18 ` Valdis.Kletnieks at vt.edu
@ 2013-07-09  7:46 ` Srinivas Ganji
  2013-07-09 14:21   ` Valdis.Kletnieks at vt.edu
  2 siblings, 1 reply; 7+ messages in thread
From: Srinivas Ganji @ 2013-07-09  7:46 UTC (permalink / raw)
  To: kernelnewbies

Hi Martin,

You can pass the name of the target to the make for building only the
specified files and objects. Suppose, if I changed some modifications in
storage files, then I need to do make as shown below, from the top level
directory i.e. /usr/src/<linux-kernel>/

make M=drivers/usb/storage

I hope this helps to you. I got the same problem earlier and I fixed like
this.

Thank you,

Regards,
Srinivas


On Thu, Jul 4, 2013 at 12:03 PM, Martin Kepplinger <martink@posteo.de>wrote:

> Hi.
>
> When I change something in the kernel and just hit make from toplevel
> dir, it always compiles everything again, no matter if it wasn't changed
> at all in the meantime.
> I thought make should be able to make a second build time really quick.
> What am I doing wrong? Is there a make target I don't know of? I don't
> type in any, just make.
>
> thanks,
>
>                     martin
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130709/07bc3a7d/attachment.html 

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

* Rebuild a changed kernel quickly with make?
  2013-07-09  7:46 ` Srinivas Ganji
@ 2013-07-09 14:21   ` Valdis.Kletnieks at vt.edu
  0 siblings, 0 replies; 7+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2013-07-09 14:21 UTC (permalink / raw)
  To: kernelnewbies

On Tue, 09 Jul 2013 13:16:53 +0530, Srinivas Ganji said:

> You can pass the name of the target to the make for building only the
> specified files and objects. Suppose, if I changed some modifications in
> storage files, then I need to do make as shown below, from the top level
> directory i.e. /usr/src/<linux-kernel>/
>
> make M=drivers/usb/storage
>
> I hope this helps to you. I got the same problem earlier and I fixed like
> this.

This is good for testing, but do *not* bet on this producing a working kernel.
It's possible to build a module that doesn't match the rest of
your kernel, resulting in hard-to-debug oopses.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130709/f9ecbab1/attachment.bin 

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

end of thread, other threads:[~2013-07-09 14:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-04  6:33 Rebuild a changed kernel quickly with make? Martin Kepplinger
2013-07-04  6:53 ` Warlich, Christof
2013-07-04  9:13   ` David kiarie
2013-07-04 12:59     ` Martin Kepplinger
2013-07-04 18:18 ` Valdis.Kletnieks at vt.edu
2013-07-09  7:46 ` Srinivas Ganji
2013-07-09 14:21   ` Valdis.Kletnieks at vt.edu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.