summaryrefslogtreecommitdiff
path: root/board/sandbox/sandbox.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-07-31 10:13:07 -0400
committerTom Rini <trini@konsulko.com>2020-07-31 10:13:07 -0400
commita2d051e7b6a8f87add1067d936bb0c805a47b0df (patch)
tree671af1a640f1fbb27f87a82685d8be9e632ee564 /board/sandbox/sandbox.c
parent719f42190d5f0238cb01ef2ffba8af2285f7bc7a (diff)
parentdb82015929aeff6b58982a22d61ab8c5b87752f3 (diff)
Merge branch '2020-07-31-more-env-updates'
- Fix EFI selftest to not force setting serial# environment (and also get the U-Boot prompt dynamically). - Support for append only environment and other related features. - Improved ext4 environment support - Fix the case of fw_setenv being used on flash devices that were not already locked.
Diffstat (limited to 'board/sandbox/sandbox.c')
-rw-r--r--board/sandbox/sandbox.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c
index c1317a8ca3..937ce28411 100644
--- a/board/sandbox/sandbox.c
+++ b/board/sandbox/sandbox.c
@@ -7,6 +7,7 @@
#include <cpu_func.h>
#include <cros_ec.h>
#include <dm.h>
+#include <env_internal.h>
#include <init.h>
#include <led.h>
#include <os.h>
@@ -44,6 +45,20 @@ unsigned long timer_read_counter(void)
}
#endif
+/* specific order for sandbox: nowhere is the first value, used by default */
+static enum env_location env_locations[] = {
+ ENVL_NOWHERE,
+ ENVL_EXT4,
+};
+
+enum env_location env_get_location(enum env_operation op, int prio)
+{
+ if (prio >= ARRAY_SIZE(env_locations))
+ return ENVL_UNKNOWN;
+
+ return env_locations[prio];
+}
+
int dram_init(void)
{
gd->ram_size = CONFIG_SYS_SDRAM_SIZE;