aboutsummaryrefslogtreecommitdiff
path: root/board/aristainetos/aristainetos.c
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2020-11-30 20:46:05 +0100
committerStefano Babic <sbabic@denx.de>2020-12-06 15:07:40 +0100
commit7a8d18da4bb2a92246af1129337164e9a41a9abf (patch)
tree03683b07b6a74f6d0ca788eb1436a68e37653900 /board/aristainetos/aristainetos.c
parent68163c3bf0fee9a32e4a31f2d678561ed833264f (diff)
downloadu-boot-7a8d18da4bb2a92246af1129337164e9a41a9abf.zip
u-boot-7a8d18da4bb2a92246af1129337164e9a41a9abf.tar.gz
u-boot-7a8d18da4bb2a92246af1129337164e9a41a9abf.tar.bz2
imx: aristainetos: enable U-Boot Environment variables protection
enable Environment protection with: CONFIG_ENV_APPEND=y CONFIG_ENV_WRITEABLE_LIST=y CONFIG_ENV_ACCESS_IGNORE_FORCE and add board specific env_get_location() function. Signed-off-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'board/aristainetos/aristainetos.c')
-rw-r--r--board/aristainetos/aristainetos.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/board/aristainetos/aristainetos.c b/board/aristainetos/aristainetos.c
index 6bfaaed..07d2e3e 100644
--- a/board/aristainetos/aristainetos.c
+++ b/board/aristainetos/aristainetos.c
@@ -27,6 +27,7 @@
#include <bmp_logo.h>
#include <dm/root.h>
#include <env.h>
+#include <env_internal.h>
#include <i2c_eeprom.h>
#include <i2c.h>
#include <micrel.h>
@@ -527,3 +528,22 @@ int embedded_dtb_select(void)
return 0;
}
#endif
+
+enum env_location env_get_location(enum env_operation op, int prio)
+{
+ if (op == ENVOP_SAVE || op == ENVOP_ERASE)
+ return ENVL_SPI_FLASH;
+
+ switch (prio) {
+ case 0:
+ return ENVL_NOWHERE;
+
+ case 1:
+ return ENVL_SPI_FLASH;
+
+ default:
+ return ENVL_UNKNOWN;
+ }
+
+ return ENVL_UNKNOWN;
+}