public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Paweł Anikiel" <pan@semihalf.com>
To: u-boot@lists.denx.de, marex@denx.de,
	simon.k.r.goldschmidt@gmail.com, tien.fong.chee@intel.com
Cc: sjg@chromium.org, ka@semihalf.com, mw@semihalf.com,
	amstan@chromium.org, "Paweł Anikiel" <pan@semihalf.com>
Subject: [PATCH v2 RESEND 2/6] socfpga: chameleonv3: Move environment to a text file
Date: Tue, 21 Feb 2023 16:17:02 +0100	[thread overview]
Message-ID: <20230221151706.48065-3-pan@semihalf.com> (raw)
In-Reply-To: <20230221151706.48065-1-pan@semihalf.com>

Move the environment to an easily editable text file in the boot
partition

Signed-off-by: Paweł Anikiel <pan@semihalf.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---
 board/google/chameleonv3/environment.txt | 13 +++++++++++++
 include/configs/socfpga_chameleonv3.h    |  9 ++++-----
 2 files changed, 17 insertions(+), 5 deletions(-)
 create mode 100644 board/google/chameleonv3/environment.txt

diff --git a/board/google/chameleonv3/environment.txt b/board/google/chameleonv3/environment.txt
new file mode 100644
index 0000000000..52aedbb90a
--- /dev/null
+++ b/board/google/chameleonv3/environment.txt
@@ -0,0 +1,13 @@
+# MMC boot command
+bootcmd_mmc=load mmc 0:1 ${loadaddr} kernel.itb; bootm
+
+# Network boot command and vars
+bootcmd_net=dhcp; tftpboot ${loadaddr} kernel.itb; bootm
+autoload=no
+serverip=192.168.0.1
+
+# U-Boot will run this after loading this file
+bootcmd_txt=run bootcmd_mmc
+
+# Kernel cmdline
+bootargs=cma=256M console=ttyS1,115200 root=/dev/mmcblk0p3 rootflags=subvol=root rw rootwait
diff --git a/include/configs/socfpga_chameleonv3.h b/include/configs/socfpga_chameleonv3.h
index 2ce7011529..fc08e74dba 100644
--- a/include/configs/socfpga_chameleonv3.h
+++ b/include/configs/socfpga_chameleonv3.h
@@ -20,11 +20,10 @@
 #define CFG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600, 115200}
 
 #define CFG_EXTRA_ENV_SETTINGS \
-	"autoload=no\0" \
-	"bootargs=cma=256M console=ttyS1,115200 root=/dev/mmcblk0p3 rw rootwait\0" \
-	"distro_bootcmd=bridge enable; run bootcmd_mmc\0" \
-	"bootcmd_mmc=load mmc 0:1 ${loadaddr} kernel.itb; bootm\0" \
-	"bootcmd_net=dhcp; tftpboot ${loadaddr} kernel.itb; bootm\0"
+	"distro_bootcmd=bridge enable; " \
+		"load mmc 0:1 ${loadaddr} u-boot.txt; " \
+		"env import -t ${loadaddr}; " \
+		"run bootcmd_txt\0"
 
 /*
  * L4 OSC1 Timer 0
-- 
2.39.2.637.g21b0678d19-goog


  parent reply	other threads:[~2023-02-21 15:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21 15:17 [PATCH v2 RESEND 0/6] Update Chameleon v3 configuration Paweł Anikiel
2023-02-21 15:17 ` [PATCH v2 RESEND 1/6] socfpga: chameleonv3: Enable ext4 in SPL Paweł Anikiel
2023-02-21 15:17 ` Paweł Anikiel [this message]
2023-02-21 15:17 ` [PATCH v2 RESEND 3/6] arm: dts: chameleonv3: Override chameleonv3 bitstream names Paweł Anikiel
2023-02-21 15:17 ` [PATCH v2 RESEND 4/6] arm: dts: chameleonv3: Rename chameleonv3.dts to .dtsi Paweł Anikiel
2023-02-21 15:17 ` [PATCH v2 RESEND 5/6] arm: dts: chameleonv3: Add 270-2 variant Paweł Anikiel
2023-02-21 15:17 ` [PATCH v2 RESEND 6/6] chameleonv3: Convert CONFIG_SPL_MAX_SIZE to Kconfig Paweł Anikiel
2023-02-21 23:29 ` [PATCH v2 RESEND 0/6] Update Chameleon v3 configuration Marek Vasut

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=20230221151706.48065-3-pan@semihalf.com \
    --to=pan@semihalf.com \
    --cc=amstan@chromium.org \
    --cc=ka@semihalf.com \
    --cc=marex@denx.de \
    --cc=mw@semihalf.com \
    --cc=simon.k.r.goldschmidt@gmail.com \
    --cc=sjg@chromium.org \
    --cc=tien.fong.chee@intel.com \
    --cc=u-boot@lists.denx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox