All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-raspberrypi] how to customize kernel config?
@ 2014-06-12  6:48 Jonatan Magnusson
  2014-06-12  6:55 ` Jens Lucius
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jonatan Magnusson @ 2014-06-12  6:48 UTC (permalink / raw)
  To: yocto


Hi

I’m trying to use the meta-raspberrypi BSP with Yocto (1.6, Daisy).

It works great, except I have no idea how to use a custom kernel config!

I have a custom kernel recipe that bbappends to the meta-raspberrypi kernel recipe.

I’ve tried using defconfig as well as configuration fragments, but neither work.

I’ve also tried using the kernel_configure_variable function, and that almost works, except if I try to disable an option that is enabled earlier in the the config file, the option is still enabled since kernel_configure_variable only appends to the config file.

Example:

do_configure_append() {
  kernel_configure_variable SPI_SPIDEV n
}

So I wonder: how is this supposed to work?

In my case I need to enable CONFIG_IEEE802154_MRF24J40 and it’s dependencies and disable CONFIG_SPI_SPIDEV and a few more.

I’ve found no help on IRC and all Google comes up with is this old discussion, which does not lead to a solution:

https://lists.yoctoproject.org/pipermail/yocto/2013-November/017113.html

I would be very happy to get any hints on how this is supposed to work!

Regards,
Jonatan Magnusson

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

* Re: [meta-raspberrypi] how to customize kernel config?
  2014-06-12  6:48 [meta-raspberrypi] how to customize kernel config? Jonatan Magnusson
@ 2014-06-12  6:55 ` Jens Lucius
  2014-06-12  7:31 ` Alex J Lennon
  2014-06-12 20:47 ` Alex J Lennon
  2 siblings, 0 replies; 5+ messages in thread
From: Jens Lucius @ 2014-06-12  6:55 UTC (permalink / raw)
  To: yocto

Hi

Had the same problem. The problem is in file linux-raspberrpi.inc the 
following line:

install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} 
${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / 
${KERNEL_DEFCONFIG} available."

it installs always the defconfig at the path above. I changed that and 
it works.

Am 12.06.2014 08:48, schrieb Jonatan Magnusson:
> Hi
>
> I’m trying to use the meta-raspberrypi BSP with Yocto (1.6, Daisy).
>
> It works great, except I have no idea how to use a custom kernel config!
>
> I have a custom kernel recipe that bbappends to the meta-raspberrypi kernel recipe.
>
> I’ve tried using defconfig as well as configuration fragments, but neither work.
>
> I’ve also tried using the kernel_configure_variable function, and that almost works, except if I try to disable an option that is enabled earlier in the the config file, the option is still enabled since kernel_configure_variable only appends to the config file.
>
> Example:
>
> do_configure_append() {
>    kernel_configure_variable SPI_SPIDEV n
> }
>
> So I wonder: how is this supposed to work?
>
> In my case I need to enable CONFIG_IEEE802154_MRF24J40 and it’s dependencies and disable CONFIG_SPI_SPIDEV and a few more.
>
> I’ve found no help on IRC and all Google comes up with is this old discussion, which does not lead to a solution:
>
> https://lists.yoctoproject.org/pipermail/yocto/2013-November/017113.html
>
> I would be very happy to get any hints on how this is supposed to work!
>
> Regards,
> Jonatan Magnusson



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

* Re: [meta-raspberrypi] how to customize kernel config?
  2014-06-12  6:48 [meta-raspberrypi] how to customize kernel config? Jonatan Magnusson
  2014-06-12  6:55 ` Jens Lucius
@ 2014-06-12  7:31 ` Alex J Lennon
  2014-06-12 20:47 ` Alex J Lennon
  2 siblings, 0 replies; 5+ messages in thread
From: Alex J Lennon @ 2014-06-12  7:31 UTC (permalink / raw)
  To: Jonatan Magnusson; +Cc: yocto


On 12/06/2014 07:48, Jonatan Magnusson wrote:
> Hi
>
> I’m trying to use the meta-raspberrypi BSP with Yocto (1.6, Daisy).
>
> It works great, except I have no idea how to use a custom kernel config!
>
> I have a custom kernel recipe that bbappends to the meta-raspberrypi kernel recipe.
>
> I’ve tried using defconfig as well as configuration fragments, but neither work.
>
> I’ve also tried using the kernel_configure_variable function, and that almost works, except if I try to disable an option that is enabled earlier in the the config file, the option is still enabled since kernel_configure_variable only appends to the config file.
>
> Example:
>
> do_configure_append() {
>   kernel_configure_variable SPI_SPIDEV n
> }
>
> So I wonder: how is this supposed to work?
>

I don't think the RPi kernel recipe supports the linux-yocto include and
thus kernel fragments, which would be the preferred way to do things.

(At least if it does I didn't manage to get it working - I am
considering trying to add support for this in).

In the meantime to create a configuration I

bitbake -c menuconfig virtual/kernel

Edit the settings and save the resulting .config file

Then if you go to

bitbake -c devshell virtual/kernel

You can copy the .config file out of there to your source tree

Then the recipe I use to build with that configuration is something like
this, with my_defconfig in a patch
containing linux-raspberrypi folder set for searching with the path prepend,

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

KERNEL_DEFCONFIG = "my_defconfig"

SRC_URI += "file://rov_defconfig"

do_configure_prepend() {
        cp ${WORKDIR}/my_defconfig ${S}/arch/arm/configs
}

Regards,

Alex



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

* Re: [meta-raspberrypi] how to customize kernel config?
  2014-06-12  6:48 [meta-raspberrypi] how to customize kernel config? Jonatan Magnusson
  2014-06-12  6:55 ` Jens Lucius
  2014-06-12  7:31 ` Alex J Lennon
@ 2014-06-12 20:47 ` Alex J Lennon
  2014-08-14 17:51   ` Andrei Gherzan
  2 siblings, 1 reply; 5+ messages in thread
From: Alex J Lennon @ 2014-06-12 20:47 UTC (permalink / raw)
  To: Jonatan Magnusson, yocto


On 12/06/2014 07:48, Jonatan Magnusson wrote:
> Hi
>
> I’m trying to use the meta-raspberrypi BSP with Yocto (1.6, Daisy).
>
> It works great, except I have no idea how to use a custom kernel config!
>
> I have a custom kernel recipe that bbappends to the meta-raspberrypi kernel recipe.
>
> I’ve tried using defconfig as well as configuration fragments, but neither work.
>
> I’ve also tried using the kernel_configure_variable function, and that almost works, except if I try to disable an option that is enabled earlier in the the config file, the option is still enabled since kernel_configure_variable only appends to the config file.
>
> Example:
>
> do_configure_append() {
>   kernel_configure_variable SPI_SPIDEV n
> }
>
> So I wonder: how is this supposed to work?
>
> In my case I need to enable CONFIG_IEEE802154_MRF24J40 and it’s dependencies and disable CONFIG_SPI_SPIDEV and a few more.
>
> I’ve found no help on IRC and all Google comes up with is this old discussion, which does not lead to a solution:
>
> https://lists.yoctoproject.org/pipermail/yocto/2013-November/017113.html
>
> I would be very happy to get any hints on how this is supposed to work!

Jonatan,

I have a patch set here which I believe will enable configuration
fragment support (yocto-ization) for the RPi as detailed in the Yocto
Kernel Development Manual.

It needs more testing before I would be comfortable releasing it, and I
am short of time right now. The kernel builds and my testing shows that
the config and config. fragments seem to get picked up, but I haven't
tested on a board yet as I have run into trouble moving up from Yocto
daisy to master.

I wonder if you would be interested in taking a look at it with me?
If/when it worked/works you should be able to simply add a foo.cfg file
with your CONFIG_foo to SRC_URI in a .bbappend and that should get
pulled in as you need.

Cheers,

Alex


Cheer


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

* Re: [meta-raspberrypi] how to customize kernel config?
  2014-06-12 20:47 ` Alex J Lennon
@ 2014-08-14 17:51   ` Andrei Gherzan
  0 siblings, 0 replies; 5+ messages in thread
From: Andrei Gherzan @ 2014-08-14 17:51 UTC (permalink / raw)
  To: Alex J Lennon; +Cc: yocto, Jonatan Magnusson

Hi Jonatan,

Did you managed to try Alex's patch? https://review.gherzan.ro:8443/#/c/106/
Your feedback would be helpful.

Thanks,

On Thu, Jun 12, 2014 at 09:47:17PM +0100, Alex J Lennon wrote:
>
> On 12/06/2014 07:48, Jonatan Magnusson wrote:
> > Hi
> >
> > I’m trying to use the meta-raspberrypi BSP with Yocto (1.6, Daisy).
> >
> > It works great, except I have no idea how to use a custom kernel config!
> >
> > I have a custom kernel recipe that bbappends to the meta-raspberrypi kernel recipe.
> >
> > I’ve tried using defconfig as well as configuration fragments, but neither work.
> >
> > I’ve also tried using the kernel_configure_variable function, and that almost works, except if I try to disable an option that is enabled earlier in the the config file, the option is still enabled since kernel_configure_variable only appends to the config file.
> >
> > Example:
> >
> > do_configure_append() {
> >   kernel_configure_variable SPI_SPIDEV n
> > }
> >
> > So I wonder: how is this supposed to work?
> >
> > In my case I need to enable CONFIG_IEEE802154_MRF24J40 and it’s dependencies and disable CONFIG_SPI_SPIDEV and a few more.
> >
> > I’ve found no help on IRC and all Google comes up with is this old discussion, which does not lead to a solution:
> >
> > https://lists.yoctoproject.org/pipermail/yocto/2013-November/017113.html
> >
> > I would be very happy to get any hints on how this is supposed to work!
>
> Jonatan,
>
> I have a patch set here which I believe will enable configuration
> fragment support (yocto-ization) for the RPi as detailed in the Yocto
> Kernel Development Manual.
>
> It needs more testing before I would be comfortable releasing it, and I
> am short of time right now. The kernel builds and my testing shows that
> the config and config. fragments seem to get picked up, but I haven't
> tested on a board yet as I have run into trouble moving up from Yocto
> daisy to master.
>
> I wonder if you would be interested in taking a look at it with me?
> If/when it worked/works you should be able to simply add a foo.cfg file
> with your CONFIG_foo to SRC_URI in a .bbappend and that should get
> pulled in as you need.
>
> Cheers,
>
> Alex
>
>
> Cheer
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto

--
Andrei Gherzan


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

end of thread, other threads:[~2014-08-14 17:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-12  6:48 [meta-raspberrypi] how to customize kernel config? Jonatan Magnusson
2014-06-12  6:55 ` Jens Lucius
2014-06-12  7:31 ` Alex J Lennon
2014-06-12 20:47 ` Alex J Lennon
2014-08-14 17:51   ` Andrei Gherzan

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.