1

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.

Andrejs Cainikovs
  • 27,428
  • 2
  • 75
  • 95
  • It's probabably specified when compiling using something like `-DCONFIG_OF`. – Barmar Nov 10 '16 at 06:03
  • 3
    It'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
  • 2
    It 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
  • 1
    Also 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

0 Answers0