All of lore.kernel.org
 help / color / mirror / Atom feed
* how to set particular changes to a default kernel config
@ 2013-07-24 13:05 lothar
  2013-07-24 13:16 ` Bruce Ashfield
  0 siblings, 1 reply; 4+ messages in thread
From: lothar @ 2013-07-24 13:05 UTC (permalink / raw)
  To: yocto

Dear Yocto Team,

For an ARM based board (MACHINE = "myboard"), I use a default kernel  
config from arch/arm/configs and want now to change some particular  
CONFIG_ options.

Trying to follow the documentation, I currently have the following files:
.
+- linux-acme
|   |
|   +- additional.cfg
|
+- linux-acme_3.8.bb



...in linux-acme_3.8.bb I have
(...)
S = "${WORKDIR}/git"
(...)
KERNEL_DEFCONFIG_myboard = "blabla_defconfig"
do_configure_prepend_myboard() {
      install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} \
            ${WORKDIR}/defconfig || die "no default config"
}
SRC_URI_myboard = "git://kernel.ubuntu.com/ubuntu/linux.git;protocol=git \
            file://additional.cfg"
(...)


...and in additional.cfg I have
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_M25P80=y


When I run something like...
$ bitbake -b /yocto/meta-myboard/recipes-kernel/linux/linux-acme_3.8.bb -f
...it seems to find the .cfg file, since it stoped complaining (after  
I fixed some paths) and now compiles/builds smoothely.

Anyway, I can't see the changes in the .config in
$BDIR/tmp/work/myboard-linux-gnueabi/linux-acme/3.8+..../git/.config

I imagine something like mixing both configs and running "make  
oldconfig" in behind. Anyway before compilation, the changes should be  
in the .config, right?

Questions:
1) How can I add single additional options to a default kernel config?
2) What is the best way to check if the options were applied?
3) Do I need another approach, e.g. through a patch, using echo, or  
using a .scc file (I tried, but with the same result)?

Best Regards,
Lothar Rubusch



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

* Re: how to set particular changes to a default kernel config
  2013-07-24 13:05 how to set particular changes to a default kernel config lothar
@ 2013-07-24 13:16 ` Bruce Ashfield
  2013-07-24 15:23   ` lothar
  0 siblings, 1 reply; 4+ messages in thread
From: Bruce Ashfield @ 2013-07-24 13:16 UTC (permalink / raw)
  To: lothar; +Cc: yocto

On 13-07-24 09:05 AM, lothar@denx.de wrote:
> Dear Yocto Team,
>
> For an ARM based board (MACHINE = "myboard"), I use a default kernel
> config from arch/arm/configs and want now to change some particular
> CONFIG_ options.
>
> Trying to follow the documentation, I currently have the following files:
> .
> +- linux-acme
> |   |
> |   +- additional.cfg
> |
> +- linux-acme_3.8.bb
>
>
>
> ...in linux-acme_3.8.bb I have
> (...)
> S = "${WORKDIR}/git"
> (...)
> KERNEL_DEFCONFIG_myboard = "blabla_defconfig"
> do_configure_prepend_myboard() {
>       install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} \
>             ${WORKDIR}/defconfig || die "no default config"
> }
> SRC_URI_myboard = "git://kernel.ubuntu.com/ubuntu/linux.git;protocol=git \
>             file://additional.cfg"
> (...)
>
>
> ...and in additional.cfg I have
> CONFIG_DEVTMPFS_MOUNT=y
> CONFIG_MTD_CMDLINE_PARTS=y
> CONFIG_MTD_BLOCK=y
> CONFIG_MTD_M25P80=y
>
>
> When I run something like...
> $ bitbake -b /yocto/meta-myboard/recipes-kernel/linux/linux-acme_3.8.bb -f
> ...it seems to find the .cfg file, since it stoped complaining (after I
> fixed some paths) and now compiles/builds smoothely.
>
> Anyway, I can't see the changes in the .config in
> $BDIR/tmp/work/myboard-linux-gnueabi/linux-acme/3.8+..../git/.config
>
> I imagine something like mixing both configs and running "make
> oldconfig" in behind. Anyway before compilation, the changes should be
> in the .config, right?
>
> Questions:
> 1) How can I add single additional options to a default kernel config?

Just like you have above, but does your recipe inherit linux-yocto ?
You of course also need to have the dependencies of the options
you are trying to add, otherwise, they won't make the final .config.

> 2) What is the best way to check if the options were applied?

There's an audit phase that runs after configuration has completed, but
if you are using a different tree than the linux-yocto tree, it will
do it's best to tell you what is missing, but needs to sift through
a lot of data.

A faster way for small changes is likely just what you are doing,
checking the .config in the build dir.

> 3) Do I need another approach, e.g. through a patch, using echo, or
> using a .scc file (I tried, but with the same result)?

Those will work as well, but the system will detect lonely .cfg files
and apply them to the tree after the default configuration.

Cheers,

Bruce

>
> Best Regards,
> Lothar Rubusch
>
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto



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

* Re: how to set particular changes to a default kernel config
  2013-07-24 13:16 ` Bruce Ashfield
@ 2013-07-24 15:23   ` lothar
  2013-07-24 15:51     ` Bruce Ashfield
  0 siblings, 1 reply; 4+ messages in thread
From: lothar @ 2013-07-24 15:23 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: yocto

Hi, thank you very much for your answer!

So, you mean something like this in the kernel .bb:
   require recipes-kernel/linux/linux-yocto.inc
This is definitely missing. I'm including linux.inc changing it to  
linux-yocto.inc breaks other patches that I'd like to apply (perhaps  
the path?). This means more work, and more doubts, too.

Now I'm asking myself, actually, should I change it from linux.inc to  
linux-yocto.inc generally?

At the moment, I'll apply the CONFIG_'s with "echo", which seems  
easier for the simple case.
BR,
L


Zitat von Bruce Ashfield <bruce.ashfield@windriver.com>:

> On 13-07-24 09:05 AM, lothar@denx.de wrote:
>> Dear Yocto Team,
>>
>> For an ARM based board (MACHINE = "myboard"), I use a default kernel
>> config from arch/arm/configs and want now to change some particular
>> CONFIG_ options.
>>
>> Trying to follow the documentation, I currently have the following files:
>> .
>> +- linux-acme
>> |   |
>> |   +- additional.cfg
>> |
>> +- linux-acme_3.8.bb
>>
>>
>>
>> ...in linux-acme_3.8.bb I have
>> (...)
>> S = "${WORKDIR}/git"
>> (...)
>> KERNEL_DEFCONFIG_myboard = "blabla_defconfig"
>> do_configure_prepend_myboard() {
>>      install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} \
>>            ${WORKDIR}/defconfig || die "no default config"
>> }
>> SRC_URI_myboard = "git://kernel.ubuntu.com/ubuntu/linux.git;protocol=git \
>>            file://additional.cfg"
>> (...)
>>
>>
>> ...and in additional.cfg I have
>> CONFIG_DEVTMPFS_MOUNT=y
>> CONFIG_MTD_CMDLINE_PARTS=y
>> CONFIG_MTD_BLOCK=y
>> CONFIG_MTD_M25P80=y
>>
>>
>> When I run something like...
>> $ bitbake -b /yocto/meta-myboard/recipes-kernel/linux/linux-acme_3.8.bb -f
>> ...it seems to find the .cfg file, since it stoped complaining (after I
>> fixed some paths) and now compiles/builds smoothely.
>>
>> Anyway, I can't see the changes in the .config in
>> $BDIR/tmp/work/myboard-linux-gnueabi/linux-acme/3.8+..../git/.config
>>
>> I imagine something like mixing both configs and running "make
>> oldconfig" in behind. Anyway before compilation, the changes should be
>> in the .config, right?
>>
>> Questions:
>> 1) How can I add single additional options to a default kernel config?
>
> Just like you have above, but does your recipe inherit linux-yocto ?
> You of course also need to have the dependencies of the options
> you are trying to add, otherwise, they won't make the final .config.
>
>> 2) What is the best way to check if the options were applied?
>
> There's an audit phase that runs after configuration has completed, but
> if you are using a different tree than the linux-yocto tree, it will
> do it's best to tell you what is missing, but needs to sift through
> a lot of data.
>
> A faster way for small changes is likely just what you are doing,
> checking the .config in the build dir.
>
>> 3) Do I need another approach, e.g. through a patch, using echo, or
>> using a .scc file (I tried, but with the same result)?
>
> Those will work as well, but the system will detect lonely .cfg files
> and apply them to the tree after the default configuration.
>
> Cheers,
>
> Bruce
>
>>
>> Best Regards,
>> Lothar Rubusch
>>
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>
>
>





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

* Re: how to set particular changes to a default kernel config
  2013-07-24 15:23   ` lothar
@ 2013-07-24 15:51     ` Bruce Ashfield
  0 siblings, 0 replies; 4+ messages in thread
From: Bruce Ashfield @ 2013-07-24 15:51 UTC (permalink / raw)
  To: lothar; +Cc: yocto

On 13-07-24 11:23 AM, lothar@denx.de wrote:
> Hi, thank you very much for your answer!
>
> So, you mean something like this in the kernel .bb:
>    require recipes-kernel/linux/linux-yocto.inc
> This is definitely missing. I'm including linux.inc changing it to
> linux-yocto.inc breaks other patches that I'd like to apply (perhaps the
> path?). This means more work, and more doubts, too.
>
> Now I'm asking myself, actually, should I change it from linux.inc to
> linux-yocto.inc generally?

Look a linux-yocto-custom (in meta-skelton), using linux-yocto
kernel bbclass support means that you have fragments, but don't
need to use the linux-yocto kernel tree.

>
> At the moment, I'll apply the CONFIG_'s with "echo", which seems easier
> for the simple case.

Linux yocto custom is simple, and intended for your use case .. give
it a whirl!

Bruce

> BR,
> L
>
>
> Zitat von Bruce Ashfield <bruce.ashfield@windriver.com>:
>
>> On 13-07-24 09:05 AM, lothar@denx.de wrote:
>>> Dear Yocto Team,
>>>
>>> For an ARM based board (MACHINE = "myboard"), I use a default kernel
>>> config from arch/arm/configs and want now to change some particular
>>> CONFIG_ options.
>>>
>>> Trying to follow the documentation, I currently have the following
>>> files:
>>> .
>>> +- linux-acme
>>> |   |
>>> |   +- additional.cfg
>>> |
>>> +- linux-acme_3.8.bb
>>>
>>>
>>>
>>> ...in linux-acme_3.8.bb I have
>>> (...)
>>> S = "${WORKDIR}/git"
>>> (...)
>>> KERNEL_DEFCONFIG_myboard = "blabla_defconfig"
>>> do_configure_prepend_myboard() {
>>>      install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} \
>>>            ${WORKDIR}/defconfig || die "no default config"
>>> }
>>> SRC_URI_myboard =
>>> "git://kernel.ubuntu.com/ubuntu/linux.git;protocol=git \
>>>            file://additional.cfg"
>>> (...)
>>>
>>>
>>> ...and in additional.cfg I have
>>> CONFIG_DEVTMPFS_MOUNT=y
>>> CONFIG_MTD_CMDLINE_PARTS=y
>>> CONFIG_MTD_BLOCK=y
>>> CONFIG_MTD_M25P80=y
>>>
>>>
>>> When I run something like...
>>> $ bitbake -b
>>> /yocto/meta-myboard/recipes-kernel/linux/linux-acme_3.8.bb -f
>>> ...it seems to find the .cfg file, since it stoped complaining (after I
>>> fixed some paths) and now compiles/builds smoothely.
>>>
>>> Anyway, I can't see the changes in the .config in
>>> $BDIR/tmp/work/myboard-linux-gnueabi/linux-acme/3.8+..../git/.config
>>>
>>> I imagine something like mixing both configs and running "make
>>> oldconfig" in behind. Anyway before compilation, the changes should be
>>> in the .config, right?
>>>
>>> Questions:
>>> 1) How can I add single additional options to a default kernel config?
>>
>> Just like you have above, but does your recipe inherit linux-yocto ?
>> You of course also need to have the dependencies of the options
>> you are trying to add, otherwise, they won't make the final .config.
>>
>>> 2) What is the best way to check if the options were applied?
>>
>> There's an audit phase that runs after configuration has completed, but
>> if you are using a different tree than the linux-yocto tree, it will
>> do it's best to tell you what is missing, but needs to sift through
>> a lot of data.
>>
>> A faster way for small changes is likely just what you are doing,
>> checking the .config in the build dir.
>>
>>> 3) Do I need another approach, e.g. through a patch, using echo, or
>>> using a .scc file (I tried, but with the same result)?
>>
>> Those will work as well, but the system will detect lonely .cfg files
>> and apply them to the tree after the default configuration.
>>
>> Cheers,
>>
>> Bruce
>>
>>>
>>> Best Regards,
>>> Lothar Rubusch
>>>
>>> _______________________________________________
>>> yocto mailing list
>>> yocto@yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/yocto
>>
>>
>>
>
>
>



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

end of thread, other threads:[~2013-07-24 15:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-24 13:05 how to set particular changes to a default kernel config lothar
2013-07-24 13:16 ` Bruce Ashfield
2013-07-24 15:23   ` lothar
2013-07-24 15:51     ` 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.