From 7a8d18da4bb2a92246af1129337164e9a41a9abf Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Mon, 30 Nov 2020 20:46:05 +0100 Subject: 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 --- board/aristainetos/aristainetos.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'board/aristainetos') 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 #include #include +#include #include #include #include @@ -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; +} -- cgit v1.1