From mboxrd@z Thu Jan 1 00:00:00 1970 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 CC9BAC433EF for ; Tue, 8 Feb 2022 23:27:27 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5868C83DD6; Wed, 9 Feb 2022 00:27:18 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=unrailed.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; secure) header.d=unrailed.org header.i=@unrailed.org header.b="a5mBSkyD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C70FD83DD6; Wed, 9 Feb 2022 00:27:15 +0100 (CET) Received: from outbound0.mail.transip.nl (outbound0.mail.transip.nl [IPv6:2a01:7c8:7c8::69]) (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 BFEBB83D1B for ; Wed, 9 Feb 2022 00:27:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=unrailed.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rogier@unrailed.org Received: from submission3.mail.transip.nl (unknown [10.100.4.72]) by outbound0.mail.transip.nl (Postfix) with ESMTP id 4JtfL836LvzxPG5; Wed, 9 Feb 2022 00:27:12 +0100 (CET) Received: from Dantrag.scratch.mit.edu (ftth-213-233-205-025.solcon.nl [213.233.205.25]) by submission3.mail.transip.nl (Postfix) with ESMTPA id 4JtfL75lR1z43TjY; Wed, 9 Feb 2022 00:27:11 +0100 (CET) From: Rogier Stam To: u-boot@lists.denx.de Cc: Rogier Stam Subject: [PATCH 1/2] Fix Espressobin build for configs where ENV is not in SPI Date: Wed, 9 Feb 2022 00:27:00 +0100 Message-Id: <1644362821-9002-2-git-send-email-rogier@unrailed.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1644362821-9002-1-git-send-email-rogier@unrailed.org> References: <1644362821-9002-1-git-send-email-rogier@unrailed.org> X-Scanned-By: ClueGetter at submission3.mail.transip.nl DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=transip-a; d=unrailed.org; t=1644362831; h=from:subject:to:cc: references:in-reply-to:date; bh=39mWuymt8fsJ1fh3shRjTHzXZl6k68MUtaQ9zZ4iQJk=; b=a5mBSkyDVXwQf9AB9wE+dYngXzZ/HMar7/43WKziZ49DX87fVYSAWE9oPBBCjtGUmx+x5B 09TN8GJSjM4on/Q30LQ3qlFUUZBUrrWx+d4c0cK2+ladxSU+VJ9Sbh47wUojdsMbi31EvC xGZuOf1yFM4ncNvA27Y8J/TjaSbOl7NUFpeqtS3O56o4lL0vWOZ1NOLBgIFljOQU0Didd0 Lt/8lhn3e+jUNSsHofgFsm3Hx5ahx2jOUS0MdCi6Q0HAR8xMEamOB9LxhQXmaEQszSI8wn oBSwy2Mno9Uz/vHfyuGdkvGeTKgou+JOTj6WBbtGIc2w5oSLDr/gtXzrBaOJLQ== X-Report-Abuse-To: abuse@transip.nl 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 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 --- 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