sandbox: Use a text-based environment
authorSimon Glass <sjg@chromium.org>
Fri, 22 Oct 2021 03:08:47 +0000 (21:08 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 16 Nov 2021 19:35:08 +0000 (14:35 -0500)
Use a text file for the environment instead of the #define settings.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek BehĂșn <marek.behun@nic.cz>
board/sandbox/sandbox.env [new file with mode: 0644]
include/configs/sandbox.h

diff --git a/board/sandbox/sandbox.env b/board/sandbox/sandbox.env
new file mode 100644 (file)
index 0000000..0f8d95b
--- /dev/null
@@ -0,0 +1,25 @@
+stdin=serial
+#ifdef CONFIG_SANDBOX_SDL
+stdin+=,cros-ec-keyb,usbkbd
+#endif
+stdout=serial,vidconsole
+stderr=serial,vidconsole
+
+ethaddr=00:00:11:22:33:44
+eth2addr=00:00:11:22:33:48
+eth3addr=00:00:11:22:33:45
+eth4addr=00:00:11:22:33:48
+eth5addr=00:00:11:22:33:46
+eth6addr=00:00:11:22:33:47
+ipaddr=1.2.3.4
+
+/*
+ * These are used for distro boot which is not supported. But once bootmethod
+ * is provided these will be used again.
+ */
+bootm_size=0x10000000
+kernel_addr_r=0x1000000
+fdt_addr_r=0xc00000
+ramdisk_addr_r=0x2000000
+scriptaddr=0x1000
+pxefile_addr_r=0x2000
index 0da0cf5..cc3a7ff 100644 (file)
 #define CONFIG_LCD_BMP_RLE8
 
 #define CONFIG_KEYBOARD
-
-#define SANDBOX_SERIAL_SETTINGS                "stdin=serial,cros-ec-keyb,usbkbd\0" \
-                                       "stdout=serial,vidconsole\0" \
-                                       "stderr=serial,vidconsole\0"
-#else
-#define SANDBOX_SERIAL_SETTINGS                "stdin=serial\0" \
-                                       "stdout=serial,vidconsole\0" \
-                                       "stderr=serial,vidconsole\0"
 #endif
 
-#define SANDBOX_ETH_SETTINGS           "ethaddr=00:00:11:22:33:44\0" \
-                                       "eth2addr=00:00:11:22:33:48\0" \
-                                       "eth3addr=00:00:11:22:33:45\0" \
-                                       "eth4addr=00:00:11:22:33:48\0" \
-                                       "eth5addr=00:00:11:22:33:46\0" \
-                                       "eth6addr=00:00:11:22:33:47\0" \
-                                       "ipaddr=1.2.3.4\0"
-
-#define MEM_LAYOUT_ENV_SETTINGS \
-       "bootm_size=0x10000000\0" \
-       "kernel_addr_r=0x1000000\0" \
-       "fdt_addr_r=0xc00000\0" \
-       "ramdisk_addr_r=0x2000000\0" \
-       "scriptaddr=0x1000\0" \
-       "pxefile_addr_r=0x2000\0"
-
-#define CONFIG_EXTRA_ENV_SETTINGS \
-       SANDBOX_SERIAL_SETTINGS \
-       SANDBOX_ETH_SETTINGS \
-       MEM_LAYOUT_ENV_SETTINGS
-
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_SYS_IDE_MAXBUS          1
 #define CONFIG_SYS_ATA_IDE0_OFFSET     0