[poky] Applying a defconfig easily to a kernel

Bruce Ashfield bruce.ashfield at gmail.com
Sat Feb 4 22:15:55 PST 2012


On Sun, Feb 5, 2012 at 12:28 AM, Bruce Ashfield
<bruce.ashfield at gmail.com> wrote:
> On Sat, Feb 4, 2012 at 5:51 AM, Bryan O'Donoghue
> <magnificopaddy at gmail.com> wrote:
>> Greetings list.
>>
>> I've had a hard time applying a complete - unmodified defconfig to my
>> local git kernel config. So rather than dig through the internals of
>> the build process, I took the following short-cut.
>>
>> It works - is it "wrong" though ? I like it because it's
>> easy/straightforward. Basically if I define a defconfig - the system
>> will trust the file and apply it directly - which I suspect is what
>> 99% of people who supply a defconfig will want anyway.
>>
>> Consider applying.
>
> This isn't what we want. defconfigs are properly handled by the integrated
> build rules already. And it does work ... I confirmed that multiple times
> on Friday.
>
> You problem is that you are attempting to use the linux-yocto repository
> + a decfonfig and running into some problems. We can work through those
> issues and determine what is happening.
>
> We want the integrated defconfig handling, since features can still be appended
> and have their own associated kernel config values. With a defconfig clobber,
> all that functionality is broken. As are the configuration audit
> steps, etc, etc. In
> other words, it drops the value that we are trying to promote and nudge away
> from defconfigs.

And just as a followup, I was testing my last series of changes before sending a
pull request, and I re-ran my defconfig tests with the linux-korg
recipe, pointed at
linux-yocto-3.2 as the source:

yow-bashfiel-l1 [/home/bruc...930686c-r0]> diff -u defconfig
linux-qemux86-standard-build/.config
--- defconfig	2012-02-05 01:08:20.971955936 -0500
+++ linux-qemux86-standard-build/.config	2012-02-05 01:11:31.481956044 -0500
@@ -58,7 +58,7 @@
 CONFIG_BROKEN_ON_SMP=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
 CONFIG_CROSS_COMPILE=""
-CONFIG_LOCALVERSION="-yocto-standard"
+CONFIG_LOCALVERSION="-yoctized-standard"
 # CONFIG_LOCALVERSION_AUTO is not set
 CONFIG_HAVE_KERNEL_GZIP=y
 CONFIG_HAVE_KERNEL_BZIP2=y

So as you can see, the only difference between the staged defconfig is
the localversion, which
was the intention of my test.

So updating to the latest master + my queue of changes may be all that
you need. And I'm about
to send them out now.

Cheers,

Bruce


>
> Cheers,
>
> Bruce
>
>
>>
>> diff --git a/meta/classes/kernel-yocto.bbclass
>> b/meta/classes/kernel-yocto.bbclass
>> index 1b73e6e..f278472 100644
>> --- a/meta/classes/kernel-yocto.bbclass
>> +++ b/meta/classes/kernel-yocto.bbclass
>> @@ -178,8 +178,15 @@ do_kernel_configme() {
>>                exit 1
>>        fi
>>
>> -       echo "# Global settings from linux recipe" >> ${B}/.config
>> -       echo "CONFIG_LOCALVERSION="\"${LINUX_VERSION_EXTENSION}\" >> ${B}/.config
>> +       if [ -f ${WORKDIR}/defconfig ]; then
>> +               echo "[INFO] HAVE A DEFCONFIG - copying verbatim"
>> +               cat ${WORKDIR}/defconfig
>> +               cp ${WORKDIR}/defconfig ${B}/.config
>> +       else
>> +               echo "# Global settings from linux recipe" >> ${B}/.config
>> +               echo "CONFIG_LOCALVERSION="\"${LINUX_VERSION_EXTENSION}\" >> ${B}/.config
>> +       fi
>> +
>>  }
>>
>>  python do_kernel_configcheck()
>
>
>
> --
> "Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end"



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



More information about the poky mailing list