[现象] UBoot 编译时出现:
- Error: You must add new CONFIG options using Kconfig The following new ad-hoc CONFIG options were detected:
[方法] 修改其中一个即可
1. 增加对应的值到
u-boot\scripts\config_whitelist.txt
2. 注释掉顶层 Makefile 中下面几句:
- quiet_cmd_cfgcheck = CFGCHK $2
- cmd_cfgcheck = $(srctree)/scripts/check-config.sh $2 \
- $(srctree)/scripts/config_whitelist.txt $(srctree)
改成:
- #quiet_cmd_cfgcheck = CFGCHK $2
- #cmd_cfgcheck = $(srctree)/scripts/check-config.sh $2 \
- # $(srctree)/scripts/config_whitelist.txt $(srctree)
3. 修改 Error 为 Warning 防止编译中断
- diff --git a/scripts/check-config.sh b/scripts/check-config.sh
- index 6618dfb..9d2cfc6 100755
- --- a/scripts/check-config.sh
- +++ b/scripts/check-config.sh
- @@ -37,14 +37,13 @@ cat `find ${srctree} -name "Kconfig*"` |sed -n \
- -e 's/^menuconfig \([A-Za-z0-9_]*\).*$/CONFIG_\1/p' |sort |uniq > ${ok}
- comm -23 ${suspects} ${ok} >${new_adhoc}
- if [ -s ${new_adhoc} ]; then
- - echo "Error: You must add new CONFIG options using Kconfig"
- + echo "Warning: You must add new CONFIG options using Kconfig"
- echo "The following new ad-hoc CONFIG options were detected:"
- cat ${new_adhoc}
- echo
- echo "Please add these via Kconfig instead. Find a suitable Kconfig"
- echo "file and add a 'config' or 'menuconfig' option."
- # Don't delete the temporary files in case they are useful
- - exit 1
- else
- rm ${suspects} ${ok} ${new_adhoc}
- fi
版权所有丨如未注明,均为原创,转载请注明转自:https://whonee.net/uboot-error-you-must-add-new-config-options-using-kconfig.html
文章不错非常喜欢,支持