[yocto] Changing Config for linux-raspberrypi
Bruce Ashfield
bruce.ashfield at windriver.com
Wed Nov 6 18:44:50 PST 2013
On 11/6/2013, 4:40 PM, John Whitmore wrote:
> Was struggling with the documentation on making chages to the config file used
> by the raspberrypi linux kernel. I'd got my own layer with a two line append file:
>
> FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}"
> KERNEL_DEFCONFIG = "defconfig"
>
> I'd got my defconfig config file into the directory structure under my layer.
>
> .
> ├── conf
> │ └── layer.conf
> └── recipes-kernel
> └── linux
> ├── linux-raspberrypi
> │ └── defconfig
> └── linux-raspberrypi_3.6.11.bbappend.jfw
>
>
> So all looked good to me thankfully "<kergoth>" on the #yocto IRC Channel
> pointed me to bitbake -e linux-raspberrypi and I was able to check stuff
> out. Took me a while but I eventually found the problem.
>
> The origional recipe "linux-raspberrypi_3.6.11.bb" contains the lines:
>
> do_configure_prepend() {
> install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available."
> }
>
> So even though my append is changing the FILESEXTRAPATHS and KERNEL_DEFCONFIG
> values it makes no difference at all. Well luckily I did manage to change the
> name of KERNEL_DEFCONFIG so when the above "install" command was executed it
> produced errors all over the place. If that hadn't happened I'd have got a
> kernel with none of my changes and there'd have been naughty words.
>
> So given that the text book approach to making changes to the kernel, outlined
> in section "2.2.1. Creating the Append File" of the Linux Kernel Development
> Manual has been subverted. How do I change the kernel config?
>
> Can I do my own do_configure_prepend() in my bbappend to prepend the recipe's do_configure_prepend()
> and get my config file into the place it's going to install from? That sounds
> really messy to me but I'm new.
>
> That seems the only alternative short of re-writing the linux-raspberrypi
> recipe which doesn't sound too good either.
>
> If somebody could point me in the right direction on how to make changes to
> the kernel in this case I'd be very grateful.
Why not use use the defconfig in the SRC_URI ?
The variable and rules you are trying to work with are specific to the
raspberrypi, so you aren't likely to find much help in the typical
documentation places (outside of understanding ordering, how variables
are assigned, etc).
If you check out some of the other kernel recipes in the various layers,
you'll see use of:
file://defconfig
And the defconfig in the layer, in the typical location ${PN}/defconfig.
The fetcher takes care of propagating that file to ${WORKDIR} (just like
you are seeing with the raspberry pi recipe) and then the kernel.bbclass's
configure will take the defconfig and copy it to .config (if one hasn't
already been generated).
But chances are you are simply seeing both layer precedence and SRC_URI
evaluation order issues that is preventing your defconfig from being
picked up
that would be the same regardless of the recipe.
I could also suggest using some of the linux-yocto features like the
configuration fragments, but they are applied after defconfig processing
(if a defconfig is supplied at all), so that's a secondary avenue, control
the defconfig order first .. and then worry about something like this.
Cheers,
Bruce
>
> Thanks a million for any advice.
>
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
More information about the yocto
mailing list