kernel.bbclass: Allow do_compile_kernelmodules to use PARALLEL_MAKE
PATCH 1/1 kernel.bbclass: Allow do_compile_kernelmodules to use PARALLEL_MAKE
Without this we don't take advantage of any configured multiple CPU cores which seems a shame.
---
meta/classes/kernel.bbclass +1 -1
@@ -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
Quoted 2 lines · Richard Purdie
Without this we don't take advantage of any configured multiple CPU cores which seems a shame.
Agreed.
Quoted 18 lines
Signed-off-by Richard Purdie<[email protected]>---
meta/classes/kernel.bbclass +1
-1@@ -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
Quoted 4 lines · Richard Purdie
Without this we don't take advantage of any configured multiple CPU cores which seems a shame.
Signed-off-by Richard Purdie <[email protected]>
Thanks RP,
Quoted 16 lines
---
meta/classes/kernel.bbclass +1
-1@@ -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
Signature · 3 lines
Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel
Quoted 11 lines · Richard Purdie
Without this we don't take advantage of any configured multiple CPU cores which seems a shame.
Signed-off-by Richard Purdie <[email protected]>---
meta/classes/kernel.bbclass +0
-0@@ -89,7 +89,7 @@ kernel_do_compile() { do_compile_kernelmodules() {
Quoted 7 lines
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
-oe_runmakemodules 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 ?
Op 11 dec. 2011, om 00:28 heeft Khem Raj het volgende geschreven:
Quoted 26 lines
Quoted 10 lines · Richard Purdie
Without this we don't take advantage of any configured multiple CPU cores which seems a shame.
Signed-off-by Richard Purdie <[email protected]>---
meta/classes/kernel.bbclass +0
-0meta/classes/kernel.bbclass kernel_do_compile() { · line 95
Quoted 8 lines
meta/classes/kernel.bbclass +1
-1@@ -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" fiin base.bbclass
oe_runmakesays${MAKE} ${EXTRA_OEMAKE} "$@"
Quoted 7 lines
and
conf/bitbake.confsaysEXTRA_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 <[email protected]> Date: Thu Jul 21 13:38:33 2011 +0200
linux.inc: enable parallel make for modules as well
recipes-kernel/linux/linux.inc +4 -0
@@ -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
Quoted 11 lines · Khem Raj
in base.bbclass
oe_runmakesays${MAKE} ${EXTRA_OEMAKE} "$@"
and
conf/bitbake.confsaysEXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} "
hmmm so we dont parallel make if task is not called
do_compile?
Indeed. It's been that way basically forever; I think this was to avoid a class of problems caused by trying to run "make install" with -j.
It's possible that the general situation has improved a bit since that code was written and it might be interesting to try enabling it for install as well and see what happens.
p.
Quoted 2 lines · Phil Blundell
Indeed. It's been that way basically forever; I think this was to avoid a class of problems caused by trying to run "make install" with -j.
correct I wanted to highlight it since its important to know when we write recipes
and have special compile steps
Quoted 11 lines · Phil Blundell
Quoted 10 lines · Khem Raj
in base.bbclass
oe_runmakesays${MAKE} ${EXTRA_OEMAKE} "$@"
and
conf/bitbake.confsaysEXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} "
Quoted 8 lines
Quoted 1 line
hmmm so we dont parallel make if task is not called
do_compile?Indeed. It's been that way basically forever; I think this was to avoid a class of problems caused by trying to run "make install" with -j.
It's possible that the general situation has improved a bit since that code was written and it might be interesting to try enabling it for install as well and see what happens.
I recently merged patches to default to add PARALLEL_MAKE to do_install. We have had surprisingly few issues with that. I think autotools itself got fixed and hence so did anything using it. I guess anything with broken makefiles already disables PARALLEL_MAKE so it seemed to work pretty well.
Cheers,
Richard