I saw many files with #ifdef CONFIG_OF
. My concern is where CONFIG_OF
is defined. I searched many header files but it's vain.
Asked
Active
Viewed 1,896 times
1

Andrejs Cainikovs
- 27,428
- 2
- 75
- 95

Ravi sankar
- 38
- 9
-
It's probabably specified when compiling using something like `-DCONFIG_OF`. – Barmar Nov 10 '16 at 06:03
-
3It's derived from the kernel configuration parameters saved in the **.config** file, which is produced by `make menuconfig`. That **.config** file is then turned into a header file, typically called **include/generated/autoconf.h**, that can be used by the C preproccesor. – sawdust Nov 10 '16 at 06:16
-
2It is defined as @sawdust noted in the *.config* file, though user can't select it manually. Thus, correction to the above: it's **selected** by the architecture code which supports OpenFirmware interface. – 0andriy Nov 10 '16 at 11:47
-
1Also good to check macros `IS_ENABLED()` and `IS_BUILTIN()`. – 0andriy Nov 10 '16 at 11:50
-
what: http://stackoverflow.com/questions/27978709/whats-the-config-of-in-linux – Ciro Santilli OurBigBook.com May 04 '17 at 17:03