[oe-commits] Richard Purdie : kernel: Use hardlinks for do_populate_sysroot for speed

git at git.openembedded.org git at git.openembedded.org
Fri Nov 8 17:31:53 UTC 2013


Module: openembedded-core.git
Branch: master-next
Commit: ab4944e6f1070a6283d2bbffa1d2569f9de8b641
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=ab4944e6f1070a6283d2bbffa1d2569f9de8b641

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Fri Nov  8 15:18:00 2013 +0000

kernel: Use hardlinks for do_populate_sysroot for speed

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 at linuxfoundation.org>

---

 meta/classes/kernel.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index a4db9f5..89c4742 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() {



More information about the Openembedded-commits mailing list