From: Joel Stanley <joel@jms.id.au>
To: openbmc@lists.ozlabs.org, Eddie James <eajames@linux.ibm.com>,
Adriana Kobylak <anoo@us.ibm.com>
Cc: Andrew Jeffery <andrew@aj.id.au>
Subject: [PATCH u-boot v2019.04-aspeed-openbmc v2 2/2] ast2600: Add environment for booting from mmc
Date: Mon, 21 Jun 2021 16:11:02 +0930 [thread overview]
Message-ID: <20210621064102.961633-3-joel@jms.id.au> (raw)
In-Reply-To: <20210621064102.961633-1-joel@jms.id.au>
This adds the default environment from the OpenBMC project.
Reviewed-by: Adriana Kobylak <anoo@us.ibm.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
v2: Add latest environment from openbmc
---
board/aspeed/ast2600_openbmc_mmc.txt | 11 +++++++++++
configs/ast2600_openbmc_spl_emmc_defconfig | 2 ++
2 files changed, 13 insertions(+)
create mode 100644 board/aspeed/ast2600_openbmc_mmc.txt
diff --git a/board/aspeed/ast2600_openbmc_mmc.txt b/board/aspeed/ast2600_openbmc_mmc.txt
new file mode 100644
index 000000000000..15dd2f5227ee
--- /dev/null
+++ b/board/aspeed/ast2600_openbmc_mmc.txt
@@ -0,0 +1,11 @@
+bootargs=console=ttyS4,115200n8
+boota=setenv bootpart 2; setenv rootfs rofs-a; run bootmmc
+bootb=setenv bootpart 3; setenv rootfs rofs-b; run bootmmc
+bootcmd=setenv origbootargs ${bootargs}; run bootconfcmd; run bootsidecmd
+bootconfcmd=if test ${fitconfig} -n; then setenv bootmconf "#${fitconfig}"; fi
+bootdelay=2
+bootmmc=run setmmcargs; ext4load mmc 0:${bootpart} ${loadaddr} fitImage && bootm ${loadaddr}${bootmconf}; echo Error loading kernel FIT image with fitconfig ${fitconfig}; bootm ${loadaddr}; echo Error loading kernel FIT image
+bootside=a
+bootsidecmd=if test ${bootside} = b; then run bootb; run boota; else run boota; run bootb; fi
+loadaddr=0x83000000
+setmmcargs=setenv bootargs ${origbootargs} rootwait root=PARTLABEL=${rootfs}
diff --git a/configs/ast2600_openbmc_spl_emmc_defconfig b/configs/ast2600_openbmc_spl_emmc_defconfig
index c5d03721c97a..344a4d8f9c96 100644
--- a/configs/ast2600_openbmc_spl_emmc_defconfig
+++ b/configs/ast2600_openbmc_spl_emmc_defconfig
@@ -83,6 +83,8 @@ CONFIG_CMD_MTDPARTS=y
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_SPL_OF_CONTROL=y
CONFIG_ENV_IS_IN_MMC=y
+CONFIG_USE_DEFAULT_ENV_FILE=y
+CONFIG_DEFAULT_ENV_FILE="board/aspeed/ast2600_openbmc_mmc.txt"
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPL_DM=y
CONFIG_REGMAP=y
--
2.32.0
next prev parent reply other threads:[~2021-06-21 6:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-21 6:41 [PATCH u-boot v2019.04-aspeed-openbmc v2 0/2] Store default u-boot env in Joel Stanley
2021-06-21 6:41 ` [PATCH u-boot v2019.04-aspeed-openbmc v2 1/2] Makefile: Conditionally add defaultenv_h to envtools target Joel Stanley
2021-06-21 6:41 ` Joel Stanley [this message]
2021-07-08 10:26 ` [PATCH u-boot v2019.04-aspeed-openbmc v2 0/2] Store default u-boot env in Graeme Gregory
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=20210621064102.961633-3-joel@jms.id.au \
--to=joel@jms.id.au \
--cc=andrew@aj.id.au \
--cc=anoo@us.ibm.com \
--cc=eajames@linux.ibm.com \
--cc=openbmc@lists.ozlabs.org \
/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;
as well as URLs for NNTP newsgroup(s).