2

I need to add debug mode (enable/disable a few kernel config) to a kernel recipe. The recipe resides under recipes-kernel.

We have this inside recipe linux-yocto-onl_5.10.bb:

...
SRC_URI += "\
    git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=kernel-meta \
    file://my-kmeta;type=kmeta;name=my-kmeta;destsuffix=my-kmeta
"

We have this directory structure inside recipe folder:

.
└── my-kmeta
    ├── bsp
    │   ├── armel-iproc
    │   │   ├── armel-iproc.cfg
    │   │   ├── armel-iproc.scc
    │   │   ├── ... (some patches)
    │   │   ├── extraconfigs.cfg
    │   │   └── extraconfigs_debug.cfg
    └── ...

This is content of armel-iproc.scc:

define KMACHINE armel-iproc
define KTYPE standard
define KARCH arm

patch ...

kconf hardware armel-iproc.cfg
kconf non-hardware extraconfigs.cfg

I tried two solution without success:

First I've added another .scc file and appended it to SRC_URI of the recipe. Inside that scc file just added kconf extraconfigs_debug.cfg. after baking the recipe, the config file seems copied to the build directory, but inside the .config file in build directory the changes aren't applied.

The second approach is defining two recipes, one for release and another for debug, for this I need to have two .scc files: one armel-iproc.scc and the other is armel-iproc_debug.scc, the second included the first plus kconfing extraconfigs_debug.cfg. After baking the debug recipe (by including armel-iproc_debug.scc to SRC_URI), I got errors indicating that bsp/armel-iproc is not found.

SAMPro
  • 1,068
  • 1
  • 15
  • 39
  • You may be able to use `KERNEL_FEATURES` to select the appropriate scc/cfg files - e.g. `KERNEL_FEATURES:append = " ${@bb.utils.contains("IMAGE_FEATURES", "mykernel-debug", "armel-iproc_debug.scc", "armel-iproc.scc", d)}"` – justinsg Jun 26 '22 at 02:58
  • I tested this, but seems it didn't look for `armel-iproc_debug.scc` file. I've added `mykernel-debug` and I can see it in 'bitbake -e IMAGE | grep ^IMAGE_FEATURES'. – SAMPro Jun 26 '22 at 06:35

0 Answers0