Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E15EDC433F5 for ; Mon, 28 Feb 2022 07:10:19 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A115483BE2; Mon, 28 Feb 2022 08:10:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="Hu6ddcV5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8C7D383BDC; Mon, 28 Feb 2022 08:10:14 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 63D6183BE2 for ; Mon, 28 Feb 2022 08:10:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4786F61011; Mon, 28 Feb 2022 07:10:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 878F9C340E7; Mon, 28 Feb 2022 07:10:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646032208; bh=gHMNHBhxiSjU7lw87O/WwbEtj93FXrkR/Ym3wCeFmEE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Hu6ddcV5vUiWBohoaTDWPSFg+N6Nf3u+CrngVDJ44FEfPCiuonYXpIOoSU3/U97Je VjMu9W6XZ3AbX3LduLuvEvJvXxnbbBa65mRSPINeoAYw9PTCc23nrB/nYo8N8czRYd 1KvK0uIP4QuFXFEv9gqmLmpZPbtSRhDtpZTpsTeyfMANqzD7Fg0z2flyQMCWehYCji DVMXH0lqvpYNTJ3NfJJCAAgRY7zsNt3PPdqm4MNILysYOlr22g141IUZoChF33PrII UH/dxLP2N83riEeSFFP1HTFw7BoqdXWC487CNIgap24QFbv/gacjU1YWvAvr17ZrwI SsmwMvH2utRAg== Received: by pali.im (Postfix) id 97A6167D; Mon, 28 Feb 2022 08:10:05 +0100 (CET) Date: Mon, 28 Feb 2022 08:10:05 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Rogier Stam , Marek Behun , Stefan Roese Cc: u-boot@lists.denx.de Subject: Re: [PATCH 1/2] Fix Espressobin build for configs where ENV is not in SPI Message-ID: <20220228071005.272i3ix5ned4bpon@pali> References: <1644362821-9002-1-git-send-email-rogier@unrailed.org> <1644362821-9002-2-git-send-email-rogier@unrailed.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1644362821-9002-2-git-send-email-rogier@unrailed.org> User-Agent: NeoMutt/20180716 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean + Marek, Stefan On Wednesday 09 February 2022 00:27:00 Rogier Stam wrote: > 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 Reviewed-by: Pali Rohár > --- > 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 >