config-readme: update config-readme

Describe how to generate and change kernel config.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
This commit is contained in:
Jianping Liu 2024-07-15 11:20:52 +08:00
parent 3a5b595eca
commit 8698752488
2 changed files with 152 additions and 76 deletions

151
config-readme Normal file
View File

@ -0,0 +1,151 @@
This file explains what's configs used for this kernel and how to use them.
For this kernel specific config options, they should be enable in tencentconfig
and disabled in notk.config for auto-testing support in our CI system.
There are two config manage systems, they are discribed as below.
*******************************************************************************
The Firs Config Manage System (Similar to kernel original method)
*******************************************************************************
1. How to generate configs
Config is generated by "make base-config delta-config" similarity. Like:
make tencentconfig /* Generate release config */
make tencentconfig debug.config
You could also read package/configs-generate.sh and use the script
to generate configs.
2. How to edit configs
Config sources are at the directories as below:
arch/x86/configs/
arch/arm64/configs/
kernel/configs/
Base configs is arch/$arch/configs/tencent.config, you should modify base
configs in most cases. $arch is support x86 and arm64 now.
It doesn't recommend to modify base configs only using vim. It recommend
to using the steps to modify base configs as below:
a, create .config:
make ARCH=$arch tencentconfig
b, modify .config as your expectation:
method1: make ARCH=$arch menuconfig to change the CONFIGs
method2: vim .config , and then make ARCH=$arch olddefconfig
Note: Using method2 need to check whether the CONFIG* which you
want to enable are really enabled, because the depend on
CONFIG* may haven't been eabled.
c, create defconfig:
make ARCH=$arch savedefconfig
d, update tencent.config:
mv defconfig arch/$arch/configs/tencent.config
Other configs (except config.pswitch) are delta configs, which will
overwrite the duplicate name CONFIG_* in base config (tencent.config).
Related Link:
https://iwiki.woa.com/pages/viewpage.action?pageId=4007623631
3. Configs introduction
tencentconfig
TK4 x86 private release version using this config to build kernel image.
TK4 aarch64 release version using this config to build kernel image.
debug.config
The configs with CONFIG_KASAN and other debug configs enabled, used for
debugging problems.
notk.config
The config for TK specific kernel options testing, *ANY TK specific configs*
should be disabled in this config then we could do testing in TKCI.
performance.config
This config is created and maintained by CSIG, used for highest
performing version.
cloud-game.config
This config is created and maintained by kevinclli (视频渲染组), used
for cloud game on arm64.
Cloud-game needing run android container, which using 4k page. So, they
can't using config.default directly.
pswitch.config
The programmble switch team need a different kernel config, which
include much old slow speed bus, which enlarge the kernel size.
BTW,
The default kernel will opensource as OC kernel, some specific feature should
be modulized.
*******************************************************************************
The Second Config Manage System (Similar to RedHat/Fedora's dist manage)
*******************************************************************************
1, How to generate configs
Changing directory (cd) to the top of kernel source dir, running:
make dist-config /* Equal to make dist-config CONFIG="generic-release" */
make dist-config CONFIG="generic-debug"
2, Configs introduction
tree -l dist/configs/, will display the content as below:
dist/configs/
├── 00base
│ ├── defconfig
│ │ ├── aarch64.config
│ │ ├── default.config
│ │ └── x86_64.config
│ └── generic
│ ├── aarch64.config -> ../../../../arch/arm64/configs/tencent.config
│ ├── default.config
│ └── x86_64.config -> ../../../../arch/x86/configs/tencent.config
├── 50variant
│ ├── debug
│ │ └── default.config -> ../../../../kernel/configs/debug.config
│ └── release
│ └── default.config
"make dist-config" is using:
dist/configs/00base/generic/default.config /* Which is empty */
+
dist/configs/00base/generic/$arch.config
+
dist/configs/50variant/release/default.config /* Which is empty */
+
dist/configs/50variant/release/$arch.config /* If have the file */
Becase dist/configs/00base/generic/$arch.config is link to
arch/$arch/configs/tencent.config, so "make dist-config" will generate
the same .config as "make tencentconfig".
"make dist-config CONFIG="generic-debug"" is using:
dist/configs/00base/generic/default.config /* Which is empty */
+
dist/configs/00base/generic/$arch.config
+
dist/configs/50variant/debug/default.config
+
dist/configs/50variant/debug/$arch.config /* If have the file */
Becase dist/configs/00base/generic/$arch.config is link to
arch/$arch/configs/tencent.config, and dist/configs/50variant/debug/default.config
is link to kernel/configs/debug.config.
So "make dist-config CONFIG="generic-debug"" will generate the same
.config as "make tencentconfig debug.config".
Note, When running "make dist-*" command (such as make dist-config), please make
sure all changes have commited to git repo. "make dist-*" command gets codes and
configs from git.
*******************************************************************************
Some detal config introduction
*******************************************************************************
config.default_performance
This config is created and maintained by CSIG, used for highest
performing version.
config.cloud-game
This config is created and maintained by kevinclli, used for cloud game.
Cloud-game needing run android container, which using 4k page. So, they
can't using config.default directly.
config.pswitch
The programmble switch team need a different kernel config, which
include much old slow speed bus, which enlarge the kernel size.

View File

@ -1,76 +0,0 @@
1. How to generate configs
Changing directory (cd) to the top of kernel source dir, running:
./package/configs-generate.sh
Configs will be generated at package/ directory same as ever(such as
package/default/config.default).
Config is generated by "make base-config delta-config" similarity.
Please read "./package/configs-generate.sh script" if you want only
generate one config.
2. How to edit configs
Config sources are at the directories as below:
arch/x86/configs/
arch/arm64/configs/
kernel/configs/
Base configs is arch/$arch/configs/tencent.config, you should modify base
configs in most cases. $arch is support x86 and arm64 now.
It doesn't recommend to modify base configs only using vim. It recommend
to using the steps to modify base configs as below:
a, create .config:
make ARCH=$arch tencentconfig
b, modify .config as your expectation:
method1: make ARCH=$arch menuconfig to change the CONFIGs
method2: vim .config , and then make ARCH=$arch olddefconfig
Note: Using method2 need to check whether the CONFIG* which you
want to enable are really enabled, because the depend on
CONFIG* may haven't been eabled.
c, create defconfig:
make ARCH=$arch savedefconfig
d, update tencent.config:
mv defconfig arch/$arch/configs/tencent.config
Other configs (except config.pswitch) are delta configs, which will
overwrite the duplicate name CONFIG_* in base config (tencent.config).
Related Link:
https://iwiki.woa.com/pages/viewpage.action?pageId=4007623631
3. Configs introduction
config.default
TK4 x86 private release version using this config to build kernel image.
TK4 aarch64 release version using this config to build kernel image.
config.default_nosign
Used for x86 architecture.
This config is base no config.default, and change CONFIG_MODULE_SIG to
be disabled.
With CONFIG_MODULE_SIG be disabled, developers could build kernel image
and test kernel modules more easier.
config.default_debug and config.default_kasan
config.default_kasan is the same with config.default_debug.
The configs with CONFIG_KASAN and other debug configs enabled, used for
debugging problems.
config.default_performance
This config is created and maintained by CSIG, used for highest
performing version.
config.cloud-game
This config is created and maintained by kevinclli (视频渲染组), used
for cloud game.
Cloud-game needing run android container, which using 4k page. So, they
can't using config.default directly.
config.pswitch
The programmble switch team need a different kernel config, which
include much old slow speed bus, which enlarge the kernel size.
4. To do
TK4 x86 public release version needing a config. Which need to be created
and maintained by CSIG.

1
package/config-readme Symbolic link
View File

@ -0,0 +1 @@
../config-readme