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

26 views
Skip to first unread message

Hee-cheol Yang

unread,
Sep 22, 2019, 10:42:31 AM9/22/19
to beagl...@googlegroups.com

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.

amf

unread,
Sep 23, 2019, 11:23:29 AM9/23/19
to BeagleBoard
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


On Sunday, September 22, 2019 at 9:42:31 AM UTC-5, Hee-cheol Yang wrote:

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.

Hee-cheol Yang

unread,
Sep 24, 2019, 12:01:21 PM9/24/19
to beagl...@googlegroups.com

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

- linux-ti-staging_4.14.bbappend is my new bbappend file to apply the fragment.


2. disable_cpu_trig.cfg :

# CONFIG_LEDS_TRIGGER_CPU is not set

- This file is for disabling LED blinking on the BBB.


3. linux-ti-staging_4.14.bbappend:

FILESEXTRAPATHS_prepend := "${THISDIR}:"
SRC_URI += "file://files/disable_cpu_trig.cfg"
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!


19. 9. 24. 오전 12:23에 amf 이(가) 쓴 글:
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/5705c404-aa6e-4b72-80a0-8f5fee5f6fcc%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages