【问题标题】:Custom u-boot environment variables using buildroot使用 buildroot 自定义 u-boot 环境变量
【发布时间】:2018-11-19 12:48:46
【问题描述】:

如何使用 buildroot 作为 os 构建系统向 u-boot 添加一组新的自定义环境变量?

我尝试使用外部树补丁来修补 include/configs/rpi.h 以添加新变量,但 kconfig 脾气暴躁(抱怨后显示的补丁):

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 特定的东西,但不知道如何创建环境变量

【问题讨论】:

    标签: u-boot buildroot


    【解决方案1】:

    您可以在 uboot-menuconfig 中设置 CONFIG_USE_DEFAULT_ENV_FILE 并将其指向包含完整默认环境的文件。

    由于您使用 Buildroot,请不要忘记通过更改其位置(Buildroot 选项 BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE)并运行 make uboot-update-defconfig 来保存修改后的 U-Boot 配置。

    【讨论】:

      猜你喜欢
      • 2016-08-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-21
      • 2014-01-04
      • 1970-01-01
      • 2013-12-29
      • 2015-10-17
      相关资源
      最近更新 更多