All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: "Wolfgang Denk" <wd@denx.de>,
	u-boot-board-maintainers@lists.denx.de,
	"Rasmus Villemoes" <rasmus.villemoes@prevas.dk>,
	u-boot-custodians@lists.denx.de, "Tom Rini" <trini@konsulko.com>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"Marek Behún" <marek.behun@nic.cz>,
	"Simon Glass" <sjg@chromium.org>
Subject: [PATCH v10 4/9] sandbox: Use a text-based environment
Date: Thu, 21 Oct 2021 21:08:47 -0600	[thread overview]
Message-ID: <20211021210847.v10.4.I0690bd21a0701ccc5dd95fb5df88519d216d8af5@changeid> (raw)
In-Reply-To: <20211022030852.1986718-1-sjg@chromium.org>

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>
---

(no changes since v3)

Changes in v3:
- Add new patch to use a text-based environment for sandbox

 board/sandbox/sandbox.env | 25 +++++++++++++++++++++++++
 include/configs/sandbox.h | 29 -----------------------------
 2 files changed, 25 insertions(+), 29 deletions(-)
 create mode 100644 board/sandbox/sandbox.env

diff --git a/board/sandbox/sandbox.env b/board/sandbox/sandbox.env
new file mode 100644
index 00000000000..0f8d95b8db0
--- /dev/null
+++ b/board/sandbox/sandbox.env
@@ -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
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index c19232f202f..c703a1330c0 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -64,37 +64,8 @@
 #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
-- 
2.33.0.1079.g6e70778dc9-goog


  parent reply	other threads:[~2021-10-22  3:18 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22  3:08 [PATCH v10 0/9] env: Allow environment in text files Simon Glass
2021-10-22  3:08 ` [PATCH v10 1/9] sandbox: Drop distro_boot Simon Glass
2021-11-17  1:57   ` Tom Rini
2021-10-22  3:08 ` [PATCH v10 2/9] doc: Move environment documentation to rST Simon Glass
2021-10-22  3:08 ` [PATCH v10 3/9] env: Allow U-Boot scripts to be placed in a .env file Simon Glass
2021-10-22  8:29   ` Wolfgang Denk
2021-10-22 14:29     ` Tom Rini
2021-10-22 23:29       ` Tony Dinh
2021-10-24 15:41       ` Wolfgang Denk
2021-11-12 18:12   ` Daniel Golle
2021-11-13 14:19     ` Simon Glass
2022-02-10 11:20   ` Patrick DELAUNAY
2022-03-12 18:14     ` Simon Glass
2021-10-22  3:08 ` Simon Glass [this message]
2021-10-22  3:08 ` [PATCH v10 5/9] doc: Mention CONFIG_DEFAULT_ENV_FILE Simon Glass
2021-10-22  3:08 ` [PATCH v10 6/9] doc: Improve environment documentation Simon Glass
2021-10-22  3:08 ` [PATCH v10 7/9] doc: Improve environment documentation further Simon Glass
2021-10-23  8:23   ` Heinrich Schuchardt
2022-03-12  2:24     ` Simon Glass
2021-10-22  3:08 ` [PATCH v10 8/9] sandbox: Update the test MAC/IP addresses Simon Glass
2021-10-23  8:29   ` Heinrich Schuchardt
2021-10-24 19:54     ` Simon Glass
2021-10-24 21:39       ` Tom Rini
2021-10-22  3:08 ` [PATCH v10 9/9] bootm: Tidy up use of autostart env var Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211021210847.v10.4.I0690bd21a0701ccc5dd95fb5df88519d216d8af5@changeid \
    --to=sjg@chromium.org \
    --cc=marek.behun@nic.cz \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=trini@konsulko.com \
    --cc=u-boot-board-maintainers@lists.denx.de \
    --cc=u-boot-custodians@lists.denx.de \
    --cc=u-boot@lists.denx.de \
    --cc=wd@denx.de \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.