Keith Ape
Keith Ape

Reputation: 1213

Enable/Disable Kernel Configuration options in Yocto

I have a configuration option called CONFIG_X86_SMAP that I would like to disable in my kernel image. The problem is that I can't identify where this option is being set. I can confirm that it isn't set in my defconfig file and also it's not set by any configuration fragment ".cfg".

Even when I try to disable it using a .cfg as follows:

# CONFIG_FOO is not set

I still find it enabled in my final generated .config file. I cant get to understand how this option is being enabled.

Note: There is no dependency on this configuration option from any other driver/feature.

Upvotes: 0

Views: 2508

Answers (1)

Krupal Tharwala
Krupal Tharwala

Reputation: 1116

You can modify your defconfig by following these steps.

  1. Identify in which tasks .config is generated.(In most cases there would be do_configure or do_defconfig task that will create your .config)
  2. Add following lines in your recipe(linux-kernel.bb file).This will append configurations to your defconfig file.

do_confiure_prepend() { cat >> <path_to_your_defconfig> << END CONFIG_X=y CONFIG_Y is not set END }

Upvotes: 1

Related Questions