[OE-core] [PATCH] kernel.bbclass: Allow do_compile_kernelmodules to use PARALLEL_MAKE
Koen Kooi
koen at dominion.thruhere.net
Sun Dec 11 08:56:17 UTC 2011
Op 11 dec. 2011, om 00:28 heeft Khem Raj het volgende geschreven:
> On Fri, Dec 9, 2011 at 4:34 PM, Richard Purdie
> <richard.purdie at linuxfoundation.org> wrote:
>> Without this we don't take advantage of any configured multiple CPU
>> cores which seems a shame.
>>
>> Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
>> ---
>> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
>> index d0cc279..120a524 100644
>> --- a/meta/classes/kernel.bbclass
>> +++ b/meta/classes/kernel.bbclass
>> @@ -89,7 +89,7 @@ kernel_do_compile() {
>> do_compile_kernelmodules() {
>> unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
>> if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
>> - oe_runmake modules CC="${KERNEL_CC}" LD="${KERNEL_LD}"
>> + oe_runmake ${PARALLEL_MAKE} modules CC="${KERNEL_CC}" LD="${KERNEL_LD}"
>> else
>> bbnote "no modules to compile"
>> fi
>
>
> in base.bbclass oe_runmake says
>
> ${MAKE} ${EXTRA_OEMAKE} "$@"
>
> and
>
> conf/bitbake.conf says
>
> EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} "
>
> hmmm so we dont parallel make if task is not called do_compile ?
Correct, that's why I did the following in meta-ti a while ago:
commit c62d16735db1beecd47a0ea3c4c51ddd29a1aeeb
Author: Koen Kooi <koen at dominion.thruhere.net>
Date: Thu Jul 21 13:38:33 2011 +0200
linux.inc: enable parallel make for modules as well
Signed-off-by: Koen Kooi <koen at dominion.thruhere.net>
diff --git a/recipes-kernel/linux/linux.inc b/recipes-kernel/linux/linux.inc
index 77e3179..9650e68 100644
--- a/recipes-kernel/linux/linux.inc
+++ b/recipes-kernel/linux/linux.inc
@@ -228,6 +228,10 @@ do_configure_append() {
fi
}
+# bitbake.conf only prepends PARALLEL make in tasks called do_compile, which isn't the case for compile_modules
+# So explicitly enable it for that in here
+EXTRA_OEMAKE = "${PARALLEL_MAKE} "
+
do_install_append() {
oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix}/src/linux-${KERNEL_VERSION} ARCH=$ARCH
}
regards,
Koen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20111211/8e70c6f3/attachment-0002.sig>
More information about the Openembedded-core
mailing list