[U-Boot] [RFC PATCH 5/7] sunxi: env: flag fel_* environment vars as "system"
Bernhard Nortmann
bernhard.nortmann at web.de
Mon Jul 11 20:14:52 CEST 2016
"fel_booted" and "fel_scriptaddr" have a special meaning and get
used by U-Boot internally.
This patch aims at both preventing user modification of these
values, and at excluding them from being stored on "saveenv".
As this is achieved by setting specialized access flags,
also enable the "env flags" command.
Signed-off-by: Bernhard Nortmann <bernhard.nortmann at web.de>
---
include/configs/sunxi-common.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 94275a7..1b48cf2 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -433,6 +433,14 @@ extern int soft_i2c_gpio_scl;
"fdt ram " FDT_ADDR_R " 0x100000;" \
"ramdisk ram " RAMDISK_ADDR_R " 0x4000000\0"
+/*
+ * flag environment vars for FEL mode ("usb boot") as special. "system" access
+ * means they're marked read-only, and shouldn't be written on "saveenv".
+ */
+#define CONFIG_ENV_FLAGS_LIST_STATIC "fel_booted:bS,fel_scriptaddr:xS"
+/* support "env flags" command */
+#define CONFIG_CMD_ENV_FLAGS
+
#ifdef CONFIG_MMC
#define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0)
#if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1
--
2.7.3
More information about the U-Boot
mailing list