Extending linux kernel recipe & kernel config fragmentation in Yocto for BBB

Hello, I am writing this mail to ask something about Yocto Project BSP for BBB.

My question is, when I want to make some change in BSP, is it good practice to add some .bbappend files into the meta-ti BSP layer instead of adding a new my own layer?

To be specific, it seems that do_configure function in meta-ti doesn’t search kernel configuration fragment file (.cfg) outside of meta-ti working directory. For example, when I firstly tried to add a new layer created new .bbappend file and .cfg file to that directory bitbake -c do_menuconfig virtual/kernel returns error because even though do_configure function doesn’t traverse my new layer directory. So my alternative way is move my new bbappend file and .cfg files into meta-ti directory and do something.

But as I know, modifying other’s layer is not recommend in Yocto project(not modify, but, extend it). But is BSP layer exception in this rule? Can I get some advises for it?

Thanks a lot

Heecheol Yang.

No, add the .bbappend to your meta layer, you just need the same directory structure as in meta-ti and add your meta layer to bblayers.conf in your build directory

Hello, I am writing this mail to ask something about Yocto Project BSP for BBB.

My question is, when I want to make some change in BSP, is it good practice to add some .bbappend files into the meta-ti BSP layer instead of adding a new my own layer?

Ya, found this to be true also, depends on which yocto version. I tend to keep a copy of the defconfig in my meta data and just update it with changes. There are other ways, all depends on your preference.

Thanks a lot!

I tried to add my kernel configuration fragment in my own layer without modifying existing meta-ti layer, and I finally succeed in doing so.

For someone who are interested in my work, I share what I did :

  1. layer structure :

➜ meta-mylayer git:(master) ✗ tree
.
├── COPYING.MIT
├── README
├── bitbake-cookerdaemon.log
├── conf
│ ├── bitbake-cookerdaemon.log
│ └── layer.conf
├── files
├── recipes-apps
│ └── ninvaders
│ ├── bitbake-cookerdaemon.log
│ ├── ninvaders.inc
│ └── ninvaders_0.1.1.bb
├── recipes-example
│ └── example
│ └── example.bb
└── recipes-kernel
└── linux
├── bitbake-cookerdaemon.log
├── files
│ └── disable_cpu_trig.cfg
└── linux-ti-staging_4.14.bbappend

  • recipes-kernel/file/disable_cpu_trig.cfg is my kernel sample kernel configuration fragment file

  • li****nux-ti-staging_4.14.bbappend is my new bbappend file to apply the fragment.

  1. disable_cpu_trig.cfg :

CONFIG_LEDS_TRIGGER_CPU is not set

  • This file is for disabling LED blinking on the BBB.
  1. linux-ti-staging_4.14.bbappend:

FILESEXTRAPATHS_prepend := “${THISDIR}:”
SRC_URI += KERNEL_CONFIG_FRAGMENTS += “${WORKDIR}/files/disable_cpu_trig.cfg”

  • This is my new bbappend file to apply disable_cpu_trig.cfg.

Special thanks for your advice, amf!