All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel-yocto: run make config for KBUILD_DEFCONFIG
@ 2017-04-26 13:19 Stefano Babic
  2017-04-26 13:56 ` Bruce Ashfield
  0 siblings, 1 reply; 3+ messages in thread
From: Stefano Babic @ 2017-04-26 13:19 UTC (permalink / raw)
  To: openembedded-core

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@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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] kernel-yocto: run make config for KBUILD_DEFCONFIG
  2017-04-26 13:19 [PATCH] kernel-yocto: run make config for KBUILD_DEFCONFIG Stefano Babic
@ 2017-04-26 13:56 ` Bruce Ashfield
  2017-04-26 14:29   ` Stefano Babic
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Ashfield @ 2017-04-26 13:56 UTC (permalink / raw)
  To: Stefano Babic; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 2144 bytes --]

On Wed, Apr 26, 2017 at 9:19 AM, Stefano Babic <sbabic@denx.de> wrote:

> 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@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}
>


This would need to be a different mode in the configuration task, not here.
This routine only gathers inputs, and doesn't process them.

I have an open bug for this, and a WIP patch that will go out early in the
2.4 release cycle.

Bruce


> +                                mv ${B}/.config ${WORKDIR}/defconfig
>                                 sccs="${WORKDIR}/defconfig"
>                         fi
>                 else
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"

[-- Attachment #2: Type: text/html, Size: 3315 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kernel-yocto: run make config for KBUILD_DEFCONFIG
  2017-04-26 13:56 ` Bruce Ashfield
@ 2017-04-26 14:29   ` Stefano Babic
  0 siblings, 0 replies; 3+ messages in thread
From: Stefano Babic @ 2017-04-26 14:29 UTC (permalink / raw)
  To: Bruce Ashfield, Stefano Babic
  Cc: Patches and discussions about the oe-core layer

On 26/04/2017 15:56, Bruce Ashfield wrote:
> 
> 
> On Wed, Apr 26, 2017 at 9:19 AM, Stefano Babic <sbabic@denx.de
> <mailto:sbabic@denx.de>> wrote:
> 
>     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@denx.de <mailto:sbabic@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}
> 
> 
> 
> This would need to be a different mode in the configuration task, not here.
> This routine only gathers inputs, and doesn't process them.
> 

Understood.

> I have an open bug for this, and a WIP patch that will go out early in the
> 2.4 release cycle.
> 

Got it, thanks for info !

Stefano


-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-26 14:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-26 13:19 [PATCH] kernel-yocto: run make config for KBUILD_DEFCONFIG Stefano Babic
2017-04-26 13:56 ` Bruce Ashfield
2017-04-26 14:29   ` Stefano Babic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.