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: Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,
	Bin Meng <bmeng.cn@gmail.com>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	Patrick Delaunay <patrick.delaunay@foss.st.com>,
	Stefan Roese <sr@denx.de>,
	Vladimir Oltean <vladimir.oltean@nxp.com>
Subject: [PATCH v4 5/5] sandbox: Use a text-based environment
Date: Sun, 19 Sep 2021 12:59:50 -0600	[thread overview]
Message-ID: <20210919125937.v4.5.I0690bd21a0701ccc5dd95fb5df88519d216d8af5@changeid> (raw)
In-Reply-To: <20210919185950.3813952-1-sjg@chromium.org>

Use a text file for the environment instead of the #define settings.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

(no changes since v3)

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

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

diff --git a/board/sandbox/env/sandbox.env b/board/sandbox/env/sandbox.env
new file mode 100644
index 00000000000..0f8d95b8db0
--- /dev/null
+++ b/board/sandbox/env/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 fb5109b6b96..7468722e285 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -70,37 +70,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.464.g1972c5931b-goog


      parent reply	other threads:[~2021-09-19 19:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-19 18:59 [PATCH v4 0/5] env: Allow environment in text files Simon Glass
2021-09-19 18:59 ` [PATCH v4 1/5] sandbox: Drop distro_boot Simon Glass
2021-09-19 18:59 ` [PATCH v4 2/5] doc: Move environment documentation to rST Simon Glass
2021-09-20 12:18   ` Wolfgang Denk
2021-09-19 18:59 ` [PATCH v4 3/5] env: Allow U-Boot scripts to be placed in a .env file Simon Glass
2021-09-20 12:30   ` Wolfgang Denk
2021-09-19 18:59 ` [PATCH v4 4/5] env: Allow environment files to use the C preprocessor Simon Glass
2021-09-20 12:35   ` Wolfgang Denk
2021-09-19 18:59 ` Simon Glass [this message]

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=20210919125937.v4.5.I0690bd21a0701ccc5dd95fb5df88519d216d8af5@changeid \
    --to=sjg@chromium.org \
    --cc=bmeng.cn@gmail.com \
    --cc=claudiu.manoil@nxp.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=sr@denx.de \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=vladimir.oltean@nxp.com \
    /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.