mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 2/3] ARM: rpi: always add built-in env
Date: Wed, 11 Sep 2024 10:17:46 +0200	[thread overview]
Message-ID: <20240911081747.1523613-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20240911081747.1523613-1-a.fatoum@pengutronix.de>

The function loads both the built-in env and the barebox.env file on the
SD-Card's boot partition. Failure to mount the SD-Card should still
result in the built-in env being loaded, therefore move it to the start
of the function.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/boards/raspberry-pi/rpi-common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c
index ee0b0f63dbef..7a3911e36fa1 100644
--- a/arch/arm/boards/raspberry-pi/rpi-common.c
+++ b/arch/arm/boards/raspberry-pi/rpi-common.c
@@ -196,6 +196,8 @@ static int rpi_env_init(void)
 	const char *diskdev;
 	int ret;
 
+	defaultenv_append_directory(defaultenv_rpi);
+
 	device_detect_by_name("mci0");
 	device_detect_by_name("mci1");
 
@@ -218,8 +220,6 @@ static int rpi_env_init(void)
 		return 0;
 	}
 
-	defaultenv_append_directory(defaultenv_rpi);
-
 	default_environment_path_set("/boot/barebox.env");
 
 	return 0;
-- 
2.39.2




  reply	other threads:[~2024-09-11  8:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-11  8:17 [PATCH 1/3] ARM: rpi: turn fixup message into debug messages Ahmad Fatoum
2024-09-11  8:17 ` Ahmad Fatoum [this message]
2024-09-11  8:17 ` [PATCH 3/3] ARM: rpi: return correct error code when failing to read revision Ahmad Fatoum
2024-09-11  8:29 ` [PATCH 1/3] ARM: rpi: turn fixup message into debug messages Sascha Hauer

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=20240911081747.1523613-2-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.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