[yocto] kernel config and meta-altera

PIEWALD Georg Georg.PIEWALD at frequentis.com
Tue Feb 17 04:55:40 PST 2015


Hi all,
I'm rather new to the Yocto world so please bear with me. I built a Linux kernel using the Altera "Golden System Reference Design" [1], which is a 1GB tarball containing all required layers and all source code. Works fine.

Now I'd like to customize the image. Particularly I want to change the kernel config to include the xHCI driver as a module [2]. I created a layer containing a bbappend-file and a "config fragment" file. No success. Reading tons of threads in the mailing list archive I figured that config fragments will not work, because apparently the meta-altera layer inherits from "kernel" rather than "linux-yocto".

So I tried the "defconfig" way, which I thought should work always. It turned out that the defconfig file is correctly picked up and copied to $WORKDIR, but simply not applied to .config there. After a long time of searching I figured out that linux-altera.inc [3] apparently overwrites the do_configure task and ignores any defconfig.

Eventually, the only solution I came up with, was a new task in my bbappend file:
  do_change_config() {
      sed -i "s|^.*CONFIG_USB_XHCI_HCD.*$|CONFIG_USB_XHCI_HCD=m\\n# CONFIG_USB_XHCI_HCD_DEBUGGING is not set|" .config
  }
  addtask change_config before do_compile after do_configure

This works, but I find it somehow ugly. Can you think of a better way to handle this? Can I somehow add the "defconfig" or (even better) the "config fragments" features to the meta-altera layer?

BR, Georg


[1] http://www.rocketboards.org/foswiki/Documentation/GSRD131YoctoUserManual
[2] CONFIG_USB_XHCI_HCD=m
[3] https://github.com/kraj/meta-altera/blob/master/recipes-kernel/linux/linux-altera.inc



More information about the yocto mailing list