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>
This commit is contained in:
Heiko Schocher
2020-11-30 20:46:05 +01:00
committed by Stefano Babic
parent 68163c3bf0
commit 7a8d18da4b
4 changed files with 39 additions and 2 deletions

View File

@@ -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;
}