Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-22-2014 #1
- Join Date
- May 2014
The kconfig vs kconfig file(s) vs .config file(s) - confusion ?
I try to see if one of codec drivers (to be found in sound/soc sources) is built in kernel of my embedded Linux. This is the very beginning of my dealing with kernel configuration. So high level overview of the system is essential at this stage, which however lacks.
Several articles, blogs, howto's, two books have been consulted for this question. No unambiguous answer got. All found descriptions (documents) for kernel configuration use amongst others following terms "the Kconfig", "Kconfig file", ".config file". It is seldom clear what are the discrepancies between all them. Apart of this question some other gaps in understanding need to be closed.
-) Sources of "vanilla" kernel from kernel.org were downloaded,
for two versions 2.6 and 3.10. One can not find files with file name .config. The search was made by several ways: under Windows, with ls -a | grep .... .config
Files with file name Kconfig can be found instead.
-) The same applies for my Ubuntu installation
-) The same applies to kernel sources of my embedded Linux (SOC)
-) Is that with .config file some obsolete concept?
-) make menuconfig descriptions talk about a .config file (in Singular). Sources of all kernels available on my desk show several Kconfig files.
Does it mean as .config was or is in use it was a single file?
-) Does the menuconfig tool of current version can deal with
single .config or several Kconfig files very well?
-) What is the difference between Kconfig and .config file?
-) Some documents use the term "kconfig" like it was a tool,
What is its rule? How is its relation to stuff like make menuconfig?
-) The kernel configuration stage of the whole kernel generation process seems to be optional step. It must mean each kernel source includes default configuration file. Is this true?
-) It is a regular approach to save the kernel configuration (make menuconfig or its equivalent) into the same configuration file it
was read from on configuration edit start?
-) Are the two files one open when menuconfig starts and the second where results of configuration changes are saved to of the same file format?
-) Can menuconfig distinguish between the case of single .config file and case of several KConfig files by itself well - when starting it?
Sorry for so many questions? It is a sign how poor my orientation is.
- 08-30-2014 #2
- Join Date
- Aug 2014
I'm new to this, but I do know .config file is a file with all your build options to compile the kernel.
Doing a make menuconfig will bring up menu options to make a .comfig file. Now name_defconfig file located /arch/"arch type"/configs are premade .config files.
make name_defconfig will make .confile with preselected options.
Inside .config looks like this
# # Automatically generated make config: don't edit # Linux/arm 3.0.101-ck1 Kernel Configuration # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y CONFIG_HAVE_SCHED_CLOCK=y CONFIG_GENERIC_GPIO=y # CONFIG_ARCH_USES_GETTIMEOFFSET is not set CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_KTIME_SCALAR=y CONFIG_HAVE_PROC_CPU=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_TRACE_IRQFLAGS_SUPPORT=y CONFIG_HARDIRQS_SW_RESEND=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_LOCKBREAK=y CONFIG_ARM_TICKET_LOCKS=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_ARCH_HAS_CPUFREQ=y CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_VECTORS_BASE=0xffff0000 # CONFIG_ARM_PATCH_PHYS_VIRT is not set CONFIG_GENERIC_BUG=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" CONFIG_HAVE_IRQ_WORK=y # # General setup
Sent from my DOWNGRADED EVO 3D, remember all development is done on my phone, not a computer
- 08-30-2014 #3
The Kconfig files contain text that gets printed out when you ask for help while configuring a kernel. Your configuration choices go in the .config file.
Kernel sources don't contain this file, as you have noticed. You can create it by typing make defconfig. Or you can copy the existing configuration file from /boot. The file will (hopefully!) contain a set of sensible default choices, which you then customise by running make menuconfig, make gconfig or make xconfig depending on what kind of user interface you want."I'm just a little old lady; don't try to dazzle me with jargon!"