[OE-core] [PATCH] kernel: use oldnoconfig instead of yes '' | make oldconfig

Bruce Ashfield bruce.ashfield at windriver.com
Tue Jan 7 15:32:18 UTC 2014


On 14-01-07 09:18 AM, Alexandre Belloni wrote:
> When using a defconfig, using yes '' | make oldconfig may not result in
> the correct configuration being set. For example:
>
>   $ grep USB_ETH .config
>   CONFIG_USB_ETH=y
>   CONFIG_USB_ETH_RNDIS=y
>   CONFIG_USB_ETH_EEM=y
>   $ make savedefconfig
>   scripts/kconfig/conf --savedefconfig=defconfig Kconfig
>   $ cp defconfig .config
>   ‘defconfig’ -> ‘.config’
>   $ yes '' | make oldconfig
>   [...]
>   #
>   # configuration written to .config
>   #
>   $ grep USB_ETH .config
>   CONFIG_USB_ETH=m
>   CONFIG_USB_ETH_RNDIS=y
>   CONFIG_USB_ETH_EEM=y
>
> Using make olddefconfig solves that but we'll use oldnoconfig for
> backward compatibility with older kernels.
>
>   $ cp defconfig .config
>   ‘defconfig’ -> ‘.config’
>   $ make oldnoconfig
>   scripts/kconfig/conf --olddefconfig Kconfig
>   #
>   # configuration written to .config
>   #
>   $ grep USB_ETH .config
>   CONFIG_USB_ETH=y
>   CONFIG_USB_ETH_RNDIS=y
>   CONFIG_USB_ETH_EEM=y
>
> For more information, please refer to:
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fbe98bb9ed3dae23e320c6b113e35f129538d14a

It was my understanding that this commit changed the Kconfig behaviour
to set the selected options to =y and prevent the menu choice from
"hiding" the options in a depedent choice menu. But maybe I'm remembering
wrong.

The point being, that with that commit in place. Doesn't the behaviour
match what we want with yes and oldconfig ?

.. I'll run some tests to confirm for myself, but I thought I'd throw
the question out as well. I don't typically use defconfigs, so I need
to do a bit of leg work.

I don't have any big issues with the patch, but I just want to be sure,
since changing this default could change the configs of many defconfig
users, and they may have been unknowingly relying on the old behaviour.

Bruce

>
> Signed-off-by: Alexandre Belloni <alexandre.belloni at free-electrons.com>
> ---
>   meta/classes/kernel.bbclass | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 61a6d102d7a8..644d7937923d 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -313,7 +313,7 @@ kernel_do_configure() {
>   	if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then
>   		cp "${WORKDIR}/defconfig" "${B}/.config"
>   	fi
> -	yes '' | oe_runmake oldconfig
> +	oe_runmake oldnoconfig
>   }
>
>   do_savedefconfig() {
>




More information about the Openembedded-core mailing list