Skip to contentSkip to conversation

module-base.bbclass: Call make instead of oe_runmake in do_make_scripts

PATCH In review Khem Raj 2 participants 4 messages Jan 27, 2013 – Jan 28, 2013

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 module-base.bbclass: Call make instead of oe_runmake in do_make_scripts

This makes the external module compilation a bit more robust for cases where external module recipes may be passing extra params to make via EXTRA_OEMAKE, and more that often one needs to pass M=$(PWD) when building external modules and if we use EXTRA_OEMAKE that would mean that it would appear in do_make_scripts as well and since we are only changing the reference kernel src tree here it will not run the make scripts in desired directory.

It is also well explained in top makefile in kernel tree around line# 1335 in 3.4

|else # KBUILD_EXTMOD
|
|###
|# External module support.
|# When building external modules the kernel used as basis is considered
|# read-only, and no consistency checks are made and the make
|# system is not used on the basis kernel. If updates are required
|# in the basis kernel ordinary make commands (without M=...) must
|# be used.

Therefore passing M=... will not do the updates in the basis kernel as expected with 'make scripts' so we have to bypass EXTRA_OEMAKE

[Yocto #3787]

---
 meta/classes/module-base.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/module-base.bbclass +1 -1
index cfee50a..9dbb4b4 100644
@@ -18,6 +18,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 #
 do_make_scripts() {
 	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS 
-	oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
+	make CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
 	           -C ${STAGING_KERNEL_DIR} scripts
 }
Signature · 1 line
1.7.9.5
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Khem Raj

This makes the external module compilation a bit more robust for cases where external module recipes may be passing extra params to make via EXTRA_OEMAKE, and more that often one needs to pass

s/that/than/ (this honestly through me a bit :-)

Quoted 18 lines

M=$(PWD) when building external modules and if we use EXTRA_OEMAKE that would mean that it would appear in do_make_scripts as well and since we are only changing the reference kernel src tree here it will not run the make scripts in desired directory.

It is also well explained in top makefile in kernel tree around line# 1335 in 3.4

|else # KBUILD_EXTMOD
|
|###
|# External module support.
|# When building external modules the kernel used as basis is considered
|# read-only, and no consistency checks are made and the make
|# system is not used on the basis kernel. If updates are required
|# in the basis kernel ordinary make commands (without M=...) must
|# be used.
Quoted 6 lines

Therefore passing M=... will not do the updates in the basis kernel as expected with 'make scripts' so we have to bypass EXTRA_OEMAKE

[Yocto #3787]

Thanks Khem!

--
Darren

Quoted 17 lines
---
 meta/classes/module-base.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/module-base.bbclass +1 -1
index cfee50a..9dbb4b4 100644
@@ -18,6 +18,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 #
 do_make_scripts() {
 	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS 
-	oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
+	make CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
 	           -C ${STAGING_KERNEL_DIR} scripts
 }
Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Technical Lead - Linux Kernel
author
#2 lore raw
Quoted 6 lines · Darren Hart
Quoted 3 lines · Khem Raj

This makes the external module compilation a bit more robust for cases where external module recipes may be passing extra params to make via EXTRA_OEMAKE, and more that often one needs to pass

s/that/than/ (this honestly through me a bit :-)

oh!,

Richard
should I send a V2 or would you amend it

author
#3 lore raw
Quoted 6 lines · Khem Raj
Quoted 1 line

s/that/than/ (this honestly through me a bit :-)

oh!,

Richard
should I send a V2 or would you amend it

OK I have fixed the typo in the pull branch I posted a short while ago.