summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2023-04-14 15:29:19 -0400
committerSteve Sakoman <steve@sakoman.com>2023-05-12 04:04:52 -1000
commit115d07b2d4f702fc569d47b64deb95d1fcb994a0 (patch)
tree3b166f6b8dff710c831df14600b789a46c51bf30
parent2aa20e84008daf6f0381ccb471da15ae18c36d6f (diff)
downloadpoky-115d07b2d4f702fc569d47b64deb95d1fcb994a0.tar.gz
kernel: improve initramfs bundle processing time
This is a partial fix for bugzilla 15059 [https://bugzilla.yoctoproject.org/show_bug.cgi?id=15059] It has been noted by several people that when an initramfs is bundled: - a lot of the kernel is rebuilt - it takes a really long time When looking at the logs, the second kernel compilation (that performs the bundle) is not using the parallel make settings, and builds with -j1. We are already explicitly passing PARALLEL_MAKE when building kernel modules, and by extending that explicit use to the main kernel compilation, we ensure that we always get a parallel build. Build times chnaged from more than 30 minutes for the bundle, to 3 minutes in local testing. The question of whether or not too much is rebuilding during the bundle step is still an open question, but with this tweak, at least the build time is back in the realm of acceptable. (From OE-Core rev: a2a889b760785474dbc04e3ec11521f6da90161d) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit 88fd394ecf0f2174b792075d409d87046896426b) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/classes/kernel.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index b315737fd2..d45fa25c32 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -377,7 +377,7 @@ kernel_do_compile() {
377 use_alternate_initrd=CONFIG_INITRAMFS_SOURCE=${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio 377 use_alternate_initrd=CONFIG_INITRAMFS_SOURCE=${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio
378 fi 378 fi
379 for typeformake in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do 379 for typeformake in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do
380 oe_runmake ${typeformake} ${KERNEL_EXTRA_ARGS} $use_alternate_initrd 380 oe_runmake ${PARALLEL_MAKE} ${typeformake} ${KERNEL_EXTRA_ARGS} $use_alternate_initrd
381 done 381 done
382} 382}
383 383