All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel: Use hardlinks for do_populate_sysroot for speed
@ 2013-11-08 15:18 Richard Purdie
  2013-11-08 15:41 ` Bruce Ashfield
  0 siblings, 1 reply; 13+ messages in thread
From: Richard Purdie @ 2013-11-08 15:18 UTC (permalink / raw)
  To: openembedded-core; +Cc: Hart, Darren

The kernel tree is large and doesn't need to be copied. Override
the default sysroot handling function to use a hardlink copying
function in python.

This commit also drops the copying of the /lib directory which
just contains the kernel modules. We never use those in the sysroot
so there is little point in carrying those around.

For linux-yocto this takes the do_populate_sysroot time 24s -> 14s.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 0b6360f..e793ccb 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -308,8 +308,8 @@ kernelscripts_sstate_postinst () {
 	fi
 }
 
-sysroot_stage_all_append() {
-	sysroot_stage_dir ${D}${KERNEL_SRC_PATH} ${SYSROOT_DESTDIR}${KERNEL_SRC_PATH}
+python sysroot_stage_all () {
+    oe.path.copyhardlinktree(d.expand("${D}${KERNEL_SRC_PATH}"), d.expand("${SYSROOT_DESTDIR}${KERNEL_SRC_PATH}"))
 }
 
 kernel_do_configure() {




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

end of thread, other threads:[~2013-11-11  9:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-08 15:18 [PATCH] kernel: Use hardlinks for do_populate_sysroot for speed Richard Purdie
2013-11-08 15:41 ` Bruce Ashfield
2013-11-08 15:54   ` Hans Beckérus
2013-11-08 15:55   ` Richard Purdie
2013-11-08 15:59     ` Bruce Ashfield
2013-11-08 16:50       ` Richard Purdie
2013-11-08 17:23         ` Hart, Darren
2013-11-09 20:38           ` Andrea Adami
2013-11-09 22:58             ` Richard Purdie
2013-11-11  8:06               ` Hans Beckérus
2013-11-11  9:35                 ` Richard Purdie
2013-11-11  9:45                 ` Richard Purdie
2013-11-11  9:47                   ` Hans Beckérus

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.