使用buildroot创建自定义u-boot环境变量

4
如何使用buildroot作为操作系统构建系统,向u-boot添加新的自定义环境变量集?
我尝试通过外部树补丁来修补include/configs/rpi.h文件以添加新变量,但是kconfig报错了(在 complaining 后显示的补丁):
The following new ad-hoc CONFIG options were detected:
CONFIG_XXXXXX_ENV_SETTINGS

Please add these via Kconfig instead. Find a suitable Kconfig
file and add a 'config' or 'menuconfig' option.
Makefile:871: recipe for target 'all' failed



--- a/include/configs/rpi.h 2018-03-13 12:02:19.000000000 +0000
+++ b/include/configs/rpi.h 2018-11-19 12:32:15.728000000 +0000
@@ -140,0 +141,7 @@
+#define CONFIG_XXXXXX_ENV_SETTINGS \
+   "newboard=true" \
+   "hasFailedBoot=false" \
+   "hasFailedBootCount=0" \
+   "maximumFailedBootCount=3"  
+
+
@@ -145 +152,2 @@
-   BOOTENV
+   BOOTENV \
+   CONFIG_XXXXXX_ENV_SETTINGS

我可以使用uboot-menuconfig设置u-boot特定的东西,但不确定如何创建环境变量。
1个回答

2
您可以在uboot-menuconfig中设置CONFIG_USE_DEFAULT_ENV_FILE,并将其指向包含完整默认环境的文件。
由于您使用Buildroot,请不要忘记通过更改位置(Buildroot选项BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE)保存修改后的U-Boot配置,并运行make uboot-update-defconfig

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接