[OE-core] [PATCH] kernel-yocto: run make config for KBUILD_DEFCONFIG

Stefano Babic sbabic at denx.de
Wed Apr 26 13:19:57 UTC 2017


In case the defconfig was created with "make savedefconfig", it is not
enough to copy it to defconfig as it is done now. In fact, running make
${KBUILD_DEFCONFIG}, as usually when building the kernel outside poky,
does much more and the resulting .config file is different as the starting one.
The file generated by "make savedefconfig" contains in most cases a
subset of all options that are required for the kernel, and other
options are inserted automatically when make is called.

Signed-off-by: Stefano Babic <sbabic at denx.de>
---
 meta/classes/kernel-yocto.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 0330270..27ff8b7 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -109,7 +109,8 @@ do_kernel_metadata() {
 					bbwarn "defconfig detected in WORKDIR. ${KBUILD_DEFCONFIG} skipped"
 				fi
 			else
-				cp -f ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${WORKDIR}/defconfig
+                                oe_runmake -C ${S} O=${B} ${KBUILD_DEFCONFIG}
+                                mv ${B}/.config ${WORKDIR}/defconfig
 				sccs="${WORKDIR}/defconfig"
 			fi
 		else
-- 
2.7.4




More information about the Openembedded-core mailing list