[oe-commits] Alexandre Belloni : kernel: use oldnoconfig before yes '' | make oldconfig

git at git.openembedded.org git at git.openembedded.org
Sun Feb 9 11:09:32 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: 43ff37fd8717b33c732054ba99ea9eba3f69062e
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=43ff37fd8717b33c732054ba99ea9eba3f69062e

Author: Alexandre Belloni <alexandre.belloni at free-electrons.com>
Date:   Fri Feb  7 17:30:32 2014 +0100

kernel: use oldnoconfig before yes '' | make oldconfig

When using a defconfig, using yes '' | make oldconfig may not result in
the correct configuration being set. For example:

 $ ARCH=mips make qi_lb60_defconfig
 #
 # configuration written to .config
 #
 $ grep USB_ETH .config
 CONFIG_USB_ETH=y
 # CONFIG_USB_ETH_RNDIS is not set
 # CONFIG_USB_ETH_EEM is not set

 $ cp arch/mips/configs/qi_lb60_defconfig .config
 $ yes '' | make ARCH=mips oldconfig
[...]
 $ grep USB_ETH .config
 CONFIG_USB_ETH=m
 # CONFIG_USB_ETH_RNDIS is not set
 # CONFIG_USB_ETH_EEM is not set

Using make olddefconfig solves that but we'll use the oldnoconfig alias
for backward compatibility with older kernels.

 $ cp arch/mips/configs/qi_lb60_defconfig .config
 $ make ARCH=mips oldnoconfig
 scripts/kconfig/conf --olddefconfig Kconfig
 #
 # configuration written to .config
 #
 $ grep USB_ETH .config
 CONFIG_USB_ETH=y
 # CONFIG_USB_ETH_RNDIS is not set
 # CONFIG_USB_ETH_EEM is not set

Signed-off-by: Alexandre Belloni <alexandre.belloni at free-electrons.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/kernel.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index b76a656..893b02b 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -313,6 +313,8 @@ python sysroot_stage_all () {
     oe.path.copyhardlinktree(d.expand("${D}${KERNEL_SRC_PATH}"), d.expand("${SYSROOT_DESTDIR}${KERNEL_SRC_PATH}"))
 }
 
+KERNEL_CONFIG_COMMAND ?= "oe_runmake oldnoconfig || yes '' | oe_runmake oldconfig"
+
 kernel_do_configure() {
 	# fixes extra + in /lib/modules/2.6.37+
 	# $ scripts/setlocalversion . => +
@@ -325,7 +327,7 @@ kernel_do_configure() {
 	if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then
 		cp "${WORKDIR}/defconfig" "${B}/.config"
 	fi
-	yes '' | oe_runmake oldconfig
+	eval ${KERNEL_CONFIG_COMMAND}
 }
 
 do_savedefconfig() {



More information about the Openembedded-commits mailing list