All of lore.kernel.org
 help / color / mirror / Atom feed
* Question: Yocto 1.7.1 kernel config defconfig will not be used?
@ 2015-03-09  8:36 Chung-Yeh Wang
  2015-03-09 13:02 ` Bruce Ashfield
  0 siblings, 1 reply; 4+ messages in thread
From: Chung-Yeh Wang @ 2015-03-09  8:36 UTC (permalink / raw)
  To: yocto

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

Hi List,

I am using Yocto 1.7.1 to build linux-mainline. I found defconfig will not
be used when using linux-yocto-custom.bb (maybe also happens on
linux-yocto).

I think below is the reason,

1. kernel_do_configure is run after do_kernel_configme.The last line of
do_kernel_configme is echo
"CONFIG_LOCALVERSION="\"${LINUX_VERSION_EXTENSION}\" >> ${B}/.config

2. Following are the code to use defconfig,

# Copy defconfig to .config if .config does not exist. This allows
# recipes to manage the .config themselves in do_configure_prepend().
if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then
cp "${WORKDIR}/defconfig" "${B}/.config"

The condition '[ ! -f "${B}/.config"]' will not be true, so
recepe-kernel/linux/linux-yocto-custom/defconfig will nerver be used.


To use defconfig is one of the method suggested in Kernel developer manual.

Thanks and Regards,
Chungyeh

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

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

* Re: Question: Yocto 1.7.1 kernel config defconfig will not be used?
  2015-03-09  8:36 Question: Yocto 1.7.1 kernel config defconfig will not be used? Chung-Yeh Wang
@ 2015-03-09 13:02 ` Bruce Ashfield
  2015-03-10  2:02   ` Chung-Yeh Wang
  0 siblings, 1 reply; 4+ messages in thread
From: Bruce Ashfield @ 2015-03-09 13:02 UTC (permalink / raw)
  To: Chung-Yeh Wang, yocto

On 15-03-09 04:36 AM, Chung-Yeh Wang wrote:
> Hi List,
>
> I am using Yocto 1.7.1 to build linux-mainline. I found defconfig will
> not be used when using linux-yocto-custom.bb
> <http://linux-yocto-custom.bb/> (maybe also happens on linux-yocto).
>
> I think below is the reason,
>
> 1. kernel_do_configure is run after do_kernel_configme.The last line of
> do_kernel_configme is echo
> "CONFIG_LOCALVERSION="\"${LINUX_VERSION_EXTENSION}\" >> ${B}/.config
>
> 2. Following are the code to use defconfig,

The linux-yocto kernel_configme task takes the defconfig into account,
and uses it along with kernel configuration fragment processing.

The skipping of the blind defconfig copy is completely intentional.

Cheers,

Bruce

>
> # Copy defconfig to .config if .config does not exist. This allows
> # recipes to manage the .config themselves in do_configure_prepend().
> if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then
> cp "${WORKDIR}/defconfig" "${B}/.config"
>
> The condition '[ ! -f "${B}/.config"]' will not be true, so
> recepe-kernel/linux/linux-yocto-custom/defconfig will nerver be used.
>
>
> To use defconfig is one of the method suggested in Kernel developer manual.
>
> Thanks and Regards,
> Chungyeh
>
>



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

* Re: Question: Yocto 1.7.1 kernel config defconfig will not be used?
  2015-03-09 13:02 ` Bruce Ashfield
@ 2015-03-10  2:02   ` Chung-Yeh Wang
  2015-03-10  3:47     ` Bruce Ashfield
  0 siblings, 1 reply; 4+ messages in thread
From: Chung-Yeh Wang @ 2015-03-10  2:02 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: yocto

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

Thanks for the information, Bruce.

I removed all kernel configuration fragments from the bb file but
difference between defconfig and .config is huge. I may do something wrong
and will study more.

Chungyeh

2015-03-09 21:02 GMT+08:00 Bruce Ashfield <bruce.ashfield@windriver.com>:

> On 15-03-09 04:36 AM, Chung-Yeh Wang wrote:
>
>> Hi List,
>>
>> I am using Yocto 1.7.1 to build linux-mainline. I found defconfig will
>> not be used when using linux-yocto-custom.bb
>> <http://linux-yocto-custom.bb/> (maybe also happens on linux-yocto).
>>
>> I think below is the reason,
>>
>> 1. kernel_do_configure is run after do_kernel_configme.The last line of
>> do_kernel_configme is echo
>> "CONFIG_LOCALVERSION="\"${LINUX_VERSION_EXTENSION}\" >> ${B}/.config
>>
>> 2. Following are the code to use defconfig,
>>
>
> The linux-yocto kernel_configme task takes the defconfig into account,
> and uses it along with kernel configuration fragment processing.
>
> The skipping of the blind defconfig copy is completely intentional.
>
> Cheers,
>
> Bruce
>
>
>
>> # Copy defconfig to .config if .config does not exist. This allows
>> # recipes to manage the .config themselves in do_configure_prepend().
>> if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then
>> cp "${WORKDIR}/defconfig" "${B}/.config"
>>
>> The condition '[ ! -f "${B}/.config"]' will not be true, so
>> recepe-kernel/linux/linux-yocto-custom/defconfig will nerver be used.
>>
>>
>> To use defconfig is one of the method suggested in Kernel developer
>> manual.
>>
>> Thanks and Regards,
>> Chungyeh
>>
>>
>>
>

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

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

* Re: Question: Yocto 1.7.1 kernel config defconfig will not be used?
  2015-03-10  2:02   ` Chung-Yeh Wang
@ 2015-03-10  3:47     ` Bruce Ashfield
  0 siblings, 0 replies; 4+ messages in thread
From: Bruce Ashfield @ 2015-03-10  3:47 UTC (permalink / raw)
  To: Chung-Yeh Wang; +Cc: Yocto Project Discussion

On Mon, Mar 9, 2015 at 10:02 PM, Chung-Yeh Wang <chungyehwang@gmail.com> wrote:
> Thanks for the information, Bruce.
>
> I removed all kernel configuration fragments from the bb file but difference
> between defconfig and .config is huge. I may do something wrong and will
> study more.

There's no guarantee that the defconfig passed will end up being a perfect
match to the .config. It depends on how up to date the defconfig is, how it
was generated, etc. The kernel configuration subsystem still processes
that default config and will select, enable and disable many options that are
not part of the input defconfig.

Cheers,

Bruce

>
> Chungyeh
>
> 2015-03-09 21:02 GMT+08:00 Bruce Ashfield <bruce.ashfield@windriver.com>:
>>
>> On 15-03-09 04:36 AM, Chung-Yeh Wang wrote:
>>>
>>> Hi List,
>>>
>>> I am using Yocto 1.7.1 to build linux-mainline. I found defconfig will
>>> not be used when using linux-yocto-custom.bb
>>> <http://linux-yocto-custom.bb/> (maybe also happens on linux-yocto).
>>>
>>> I think below is the reason,
>>>
>>> 1. kernel_do_configure is run after do_kernel_configme.The last line of
>>> do_kernel_configme is echo
>>> "CONFIG_LOCALVERSION="\"${LINUX_VERSION_EXTENSION}\" >> ${B}/.config
>>>
>>> 2. Following are the code to use defconfig,
>>
>>
>> The linux-yocto kernel_configme task takes the defconfig into account,
>> and uses it along with kernel configuration fragment processing.
>>
>> The skipping of the blind defconfig copy is completely intentional.
>>
>> Cheers,
>>
>> Bruce
>>
>>
>>>
>>> # Copy defconfig to .config if .config does not exist. This allows
>>> # recipes to manage the .config themselves in do_configure_prepend().
>>> if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then
>>> cp "${WORKDIR}/defconfig" "${B}/.config"
>>>
>>> The condition '[ ! -f "${B}/.config"]' will not be true, so
>>> recepe-kernel/linux/linux-yocto-custom/defconfig will nerver be used.
>>>
>>>
>>> To use defconfig is one of the method suggested in Kernel developer
>>> manual.
>>>
>>> Thanks and Regards,
>>> Chungyeh
>>>
>>>
>>
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>



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


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

end of thread, other threads:[~2015-03-10  3:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-09  8:36 Question: Yocto 1.7.1 kernel config defconfig will not be used? Chung-Yeh Wang
2015-03-09 13:02 ` Bruce Ashfield
2015-03-10  2:02   ` Chung-Yeh Wang
2015-03-10  3:47     ` Bruce Ashfield

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.