* [PATCH v3] kernel: use oldnoconfig before yes '' | make oldconfig
@ 2014-02-07 16:30 Alexandre Belloni
2014-02-07 16:43 ` Bruce Ashfield
0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Belloni @ 2014-02-07 16:30 UTC (permalink / raw)
To: openembedded-core; +Cc: Darren Hart, darren.hart
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@free-electrons.com>
---
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 51626b03f824..9f1d669b3cf6 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -301,6 +301,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 . => +
@@ -313,7 +315,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() {
--
1.8.3.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3] kernel: use oldnoconfig before yes '' | make oldconfig
2014-02-07 16:30 [PATCH v3] kernel: use oldnoconfig before yes '' | make oldconfig Alexandre Belloni
@ 2014-02-07 16:43 ` Bruce Ashfield
2014-02-07 19:09 ` Otavio Salvador
0 siblings, 1 reply; 3+ messages in thread
From: Bruce Ashfield @ 2014-02-07 16:43 UTC (permalink / raw)
To: Alexandre Belloni, openembedded-core; +Cc: darren.hart, Darren Hart
On 14-02-07 11:30 AM, Alexandre Belloni wrote:
> When using a defconfig, using yes '' | make oldconfig may not result in
> the correct configuration being set. For example:
Thanks for your patience, v3 looks good to me. Obviously RP will
over rule as he sees fit :)
>
> $ 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
Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
> 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 51626b03f824..9f1d669b3cf6 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -301,6 +301,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 . => +
> @@ -313,7 +315,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() {
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] kernel: use oldnoconfig before yes '' | make oldconfig
2014-02-07 16:43 ` Bruce Ashfield
@ 2014-02-07 19:09 ` Otavio Salvador
0 siblings, 0 replies; 3+ messages in thread
From: Otavio Salvador @ 2014-02-07 19:09 UTC (permalink / raw)
To: Bruce Ashfield
Cc: Darren Hart, Darren Hart,
Patches and discussions about the oe-core layer
On Fri, Feb 7, 2014 at 2:43 PM, Bruce Ashfield
<bruce.ashfield@windriver.com> wrote:
> On 14-02-07 11:30 AM, Alexandre Belloni wrote:
>>
>> When using a defconfig, using yes '' | make oldconfig may not result in
>> the correct configuration being set. For example:
>
> Thanks for your patience, v3 looks good to me. Obviously RP will
> over rule as he sees fit :)
...
> Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-07 19:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-07 16:30 [PATCH v3] kernel: use oldnoconfig before yes '' | make oldconfig Alexandre Belloni
2014-02-07 16:43 ` Bruce Ashfield
2014-02-07 19:09 ` Otavio Salvador
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.