Patchwork kernel bbclass: split do_compile into do_compile and do_compile_modules

login
register
mail settings
Submitter Koen Kooi
Date March 15, 2011, 10:25 a.m.
Message ID <1300184701-23833-1-git-send-email-koen@dominion.thruhere.net>
Download mbox | patch
Permalink /patch/1405/
State Accepted
Headers show

Comments

Koen Kooi - March 15, 2011, 10:25 a.m.
This allows recipes to insert a custom task in between building *Image and modules

From OE .dev revision 615876fe218dc3feb4a3df9e6546a7b1a6376800

Signed-off-by: Koen Kooi <koen@openembedded.org>
Acked-by: Graeme Gregory <dp@xora.org.uk>
---
 meta/classes/kernel.bbclass |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
Richard Purdie - March 15, 2011, 11:18 a.m.
On Tue, 2011-03-15 at 11:25 +0100, Koen Kooi wrote:
> This allows recipes to insert a custom task in between building *Image and modules
> 
> From OE .dev revision 615876fe218dc3feb4a3df9e6546a7b1a6376800
> 
> Signed-off-by: Koen Kooi <koen@openembedded.org>
> Acked-by: Graeme Gregory <dp@xora.org.uk>
> ---
>  meta/classes/kernel.bbclass |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)

Merged to master, thanks.

Richard

Patch

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index a1b1354..a9a8f4f 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -77,12 +77,17 @@  kernel_do_compile() {
 		oe_runmake dep CC="${KERNEL_CC}" LD="${KERNEL_LD}"
 	fi
 	oe_runmake ${KERNEL_IMAGETYPE} ${KERNEL_ALT_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}"
+}
+
+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}"
 	else
 		oenote "no modules to compile"
 	fi
 }
+addtask compile_kernelmodules after do_compile before do_install
 
 kernel_do_install() {
 	#