]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
scripts: kconfig: merge_config.sh: refactor from shell/sed/grep to awk
authorAnders Roxell <anders.roxell@linaro.org>
Thu, 22 Jan 2026 10:57:49 +0000 (12:57 +0200)
committerNathan Chancellor <nathan@kernel.org>
Thu, 22 Jan 2026 22:58:25 +0000 (15:58 -0700)
commit5fa9b82cbcfc524a2dad581ac2af136536d4e8e5
tree7c6aacdcb29ed91ca4915e84583bb3563116f999
parenta081b5789255d27b76cd2cbab85676b2a31dbde1
scripts: kconfig: merge_config.sh: refactor from shell/sed/grep to awk

merge_config.sh shell/sed/grep loop scales poorly and is slow.
With Yocto genericarm64 kernel and around 190 config fragments
the script takes more than 20 minutes to run on a fast build machine.
Re-implementation with awk does the same job in 10 seconds.
Using awk since it is likely available in the build environments
and using perl, python etc would introduce more complex runtime
dependencies. awk is good enough and lot better than shell/sed/grep.

Output stays the same but changed execution time means that
parallel job output may be ordered differently.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Link: https://patch.msgid.link/20260122105751.2186609-1-mikko.rapeli@linaro.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
scripts/kconfig/merge_config.sh