I want to deactivate a kernel option during my build:
In a .bbappend file for the kernel recipe I fetch via SRC_URI
a .cfg kernel fragment file no_usb.cfg
with this content:
CONFIG_USB=n
CONFIG_USB_TEST=y
The first entry is supposed to turn USB off in the kernel configuration, the second entry is for testing the reverse case.
This didn't work: Neither the test entry appeared nor the USB was deactivated. I have also seen in the yocto sources *.scc files and I created one for my no_usb.cfg
:
kconf hardware no_usb.cfg
But I found only less in the documentation and couldn't turn USB off. So how can I deactivate CONFIG_USB
?
This is my kernel recipe (from freescale SDK) linux-qoriq_3.12.bb
:
require recipes-kernel/linux/linux-qoriq.inc
SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;branch=sdk-v1.9.x"
SRCREV = "43cecda943a6c40a833b588801b0929e8bd48813"
I have a layer with this append file linux-qoriq_3.12.bbappend
:
SRC_URI += "file://no_usb.cfg"
The directory structure of the layer is following:
meta-layer
└── recipes-kernel
└── linux
├── linux-qoriq
│ └── no_usb.cfg
└── linux-qoriq_3.12.bbappend
As was stated by the previous commenter, you need to use # CONFIG_FOO is not set
rather than CONFIG_FOO=n
. I would like to make one correction, though. The linux-qoriq recipe does support configuration fragments, it just uses a separate variable to control their usage, DELTA_KERNEL_DEFCONFIG
. See the do_configure_prepend
in recipes-kernel/linux/linux-qoriq.inc
for details.
In your append, you should be able to add this to fix it:
DELTA_KERNEL_DEFCONFIG += "no_usb.cfg"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With