public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Rogier Stam <rogier@unrailed.org>
To: u-boot@lists.denx.de
Cc: Rogier Stam <rogier@unrailed.org>
Subject: [PATCH 1/2] Fix Espressobin build for configs where ENV is not in SPI
Date: Wed,  9 Feb 2022 00:27:00 +0100	[thread overview]
Message-ID: <1644362821-9002-2-git-send-email-rogier@unrailed.org> (raw)
In-Reply-To: <1644362821-9002-1-git-send-email-rogier@unrailed.org>

When storing the UBoot Environment in for example EXT4,
the U-Boot build is broken for several reasons:
1. armada-385-turris-omnia-u-boot.dtsi will not allow
   CONFIG_ENV_OFFSET and CONFIG_ENV_SIZE to be undefined
2. armada-37xx/board.c ft_board_setup function does not
   exist if CONFIG_ENV_IS_IN_SPI_FLASH is not defined

This commit changes these files so that selecting a
different location for the environment is possible.

Signed-off-by: Rogier Stam <rogier@unrailed.org>
---
 arch/arm/dts/armada-385-turris-omnia-u-boot.dtsi | 2 ++
 board/Marvell/mvebu_armada-37xx/board.c          | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/armada-385-turris-omnia-u-boot.dtsi b/arch/arm/dts/armada-385-turris-omnia-u-boot.dtsi
index 3ff76c9..008787e 100644
--- a/arch/arm/dts/armada-385-turris-omnia-u-boot.dtsi
+++ b/arch/arm/dts/armada-385-turris-omnia-u-boot.dtsi
@@ -38,6 +38,7 @@
 	};
 };
 
+#ifdef CONFIG_ENV_IS_IN_SPI_FLASH
 &spi0 {
 	u-boot,dm-pre-reloc;
 
@@ -56,6 +57,7 @@
 		};
 	};
 };
+#endif
 
 &uart0 {
 	u-boot,dm-pre-reloc;
diff --git a/board/Marvell/mvebu_armada-37xx/board.c b/board/Marvell/mvebu_armada-37xx/board.c
index d7b6eca..5bace0c 100644
--- a/board/Marvell/mvebu_armada-37xx/board.c
+++ b/board/Marvell/mvebu_armada-37xx/board.c
@@ -328,9 +328,10 @@ int board_network_enable(struct mii_dev *bus)
 	return 0;
 }
 
-#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_ENV_IS_IN_SPI_FLASH)
+#ifdef CONFIG_OF_BOARD_SETUP
 int ft_board_setup(void *blob, struct bd_info *bd)
 {
+#ifdef CONFIG_ENV_IS_IN_SPI_FLASH
 	int ret;
 	int spi_off;
 	int parts_off;
@@ -424,6 +425,7 @@ int ft_board_setup(void *blob, struct bd_info *bd)
 		return 0;
 	}
 
+#endif
 	return 0;
 }
 #endif
-- 
2.7.4


  reply	other threads:[~2022-02-08 23:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-08 23:26 [PATCH 0/2] U-Boot ENV in EXT4 support for Expressobin (revised) Rogier Stam
2022-02-08 23:27 ` Rogier Stam [this message]
2022-02-28  7:10   ` [PATCH 1/2] Fix Espressobin build for configs where ENV is not in SPI Pali Rohár
2022-04-21 13:55     ` Stefan Roese
2022-02-08 23:27 ` [PATCH 2/2] Add SCSI scan for ENV in EXT4 or FAT Rogier Stam
2022-02-28  7:13   ` Pali Rohár
2022-04-21 10:34     ` Stefan Roese
2022-04-21 10:57       ` Pali Rohár
2022-05-11 21:02         ` Rogier Stam

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=1644362821-9002-2-git-send-email-rogier@unrailed.org \
    --to=rogier@unrailed.org \
    --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