From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dan.rpsys.net (dan.rpsys.net [93.97.175.187]) by mail.openembedded.org (Postfix) with ESMTP id E740E6D2F5 for ; Fri, 8 Nov 2013 15:18:21 +0000 (UTC) Received: from localhost (dan.rpsys.net [127.0.0.1]) by dan.rpsys.net (8.14.4/8.14.4/Debian-2.1ubuntu1) with ESMTP id rA8FI9ZX024965; Fri, 8 Nov 2013 15:18:09 GMT X-Virus-Scanned: Debian amavisd-new at dan.rpsys.net Received: from dan.rpsys.net ([127.0.0.1]) by localhost (dan.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id bcP3H2qcaNaU; Fri, 8 Nov 2013 15:18:09 +0000 (GMT) Received: from [192.168.3.10] (rpvlan0 [192.168.3.10]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-2.1ubuntu1) with ESMTP id rA8FI4Sj024955 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NOT); Fri, 8 Nov 2013 15:18:05 GMT Message-ID: <1383923880.2345.4.camel@ted> From: Richard Purdie To: openembedded-core Date: Fri, 08 Nov 2013 15:18:00 +0000 X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 Cc: "Hart, Darren" Subject: [PATCH] kernel: Use hardlinks for do_populate_sysroot for speed X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 15:18:22 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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 --- 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() {