Understanding /Boot/Config File

Understanding /boot/config file

Y = Module is compiled directly in kernel. 

Notes: Some drivers should be ready all the time in kernel functionality, without them system can't function like Unix domain sockets (CONFIG_UNIX) which should be Y

N = Don't compile module in kernel. do nothing. 

Notes: Its your choice whether you want it or not.

M = Compile module as loadable module. Kernel will load this module On **Demand**. 

Notes: M means loadable module which they don't need to stay up all the time, Like Sound Driver which you can load when you want to play music. It will make your system more efficient.

Understanding u-boot configuration step

how to u-boot determine which config file to use in the compile process ?

U-Boot configuration is an evolving topic , e.g. Kconfig replaced the prior configuration scheme starting with v2014.10-rc1.

You neglect to mention what version of U-Boot that you are using.

The following applies to version 2017.09.

The board's configuration header file is specified by a config variable defined in the Kconfig file.

For the Beaglebone Black, /board/ti/am335x/Kconfig specifies:

config SYS_CONFIG_NAME
default "am335x_evm"

which means include/configs/am335x_evm.h is used as the board configuration header file.

This is documented in doc/README.kconfig:

When adding a new board, the following steps are generally needed:

[1] Add a header file include/configs/<target>.h
[2] Make sure to define necessary CONFIG_SYS_* in Kconfig:
Define CONFIG_SYS_CPU="cpu" to compile arch/<arch>/cpu/<cpu>
Define CONFIG_SYS_SOC="soc" to compile arch/<arch>/cpu/<cpu>/<soc>
Define CONFIG_SYS_VENDOR="vendor" to compile board/<vendor>/common/*
and board/<vendor>/<board>/*
Define CONFIG_SYS_BOARD="board" to compile board/<board>/*
(or board/<vendor>/<board>/* if CONFIG_SYS_VENDOR is defined)
Define CONFIG_SYS_CONFIG_NAME="target" to include
include/configs/<target>.h
[3] Add a new entry to the board select menu in Kconfig.
The board select menu is located in arch/<arch>/Kconfig or
arch/<arch>/*/Kconfig.
[4] Add a MAINTAINERS file
It is generally placed at board/<board>/MAINTAINERS or
board/<vendor>/<board>/MAINTAINERS
[5] Add configs/<target>_defconfig

The MAINTAINERS file is apparently merely documentation that references both the defconfig file(s) and the configuration header file.

What will happen if I change kernel configuration file in /boot?

You are correct: the /boot/config-.... file shows the configuration used used to compile the corresponding kernel. Most people run distros, and do not compile their own kernels. Therefore, the presence of this file is generally useless. At best, it can allow some information if the user faces kernel problems, as it gives the exact configuration used during compilation. Modifying it will not have any effect on the system.

On the other hand, for those who do compile their own kernels, for development, testing or experimentation, this provides a good starting point. For example, if I am running Ubuntu, and I have the kernel source (with Ubuntu patches), the config file will allow me to compile my own, identical kernel. Then, I can experiment with what changes to the source or the config have.....

Configuration file in U-boot

I believe the header files in include/configs are what you're looking for. You'll need to determine which file is used for your board.

From http://www.stlinux.com/u-boot/modifying:

Configuration files

The important configuration information for U-Boot is defined in the file:

    include/configs/<board>.h

For example, the Espresso board default configuration file is:

    include/configs/espresso.h


Related Topics



Leave a reply



Submit