Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 369EEC432BE for ; Thu, 19 Aug 2021 11:10:03 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 7FF6A610CF for ; Thu, 19 Aug 2021 11:10:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7FF6A610CF Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 987C582DD8; Thu, 19 Aug 2021 13:10:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.b="yGltdmeu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6A4C382DF6; Thu, 19 Aug 2021 13:09:59 +0200 (CEST) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 306F882C39 for ; Thu, 19 Aug 2021 13:09:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=Eugen.Hristev@microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1629371394; x=1660907394; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=YOVX3hVU5HVPAI/0khMwclLJubKPVPWPo1raPYZ9Kl4=; b=yGltdmeu1hrOJeMHz66EUghsnTiLvDlKsOWNBHunwk/bxeRSl1deIxBz LyUmzfaDeQpQ7pCCfQT5+Bhuo3lwXfc5tpWpRF5uCrbFr/MjRzDWaEXEO SYUisWaPEgh93MbuAeVbx//jvlmOD/CHVHdCum4amxAPQV9i/tQLd7u6h Cem5deN3EqJTzN2QJDkPZQhfaaH6U6b/4Wywgf0qMYL9zwe/um1EZxaPp n+wduAFQ8+46b0Ql/g1B0n5kW0ON3/h02SkR00INpS3Uow/wvDZ9qc9MU tbp2cIgbPUVdR2H0VgoqXB91uReZHxCJXB34QBBBaxha5Ozhk4kDMvkob w==; IronPort-SDR: AsfwGrqzxRyKG0dcVgsHqplthPTMcKhuaSea3UL0irPHOfeix6qtPwmSovkU8U2nNAlixitqAZ Os/JpcFH/lxs3TgFOvGDgsdCkxCs+jn1D0I4NACfDiUwwTJeVWWeBfv4wR3TfyK6h3ZY5GNrl9 gpIzKAvSL+vVPvIyBYTJzGQjtFCX0PHA8n/yVmg/vo9x8Oi1HGhv4AfpGFyX8LxlEXAHRKeABY 7XMCj4+BYA/5LXqCOpfat74LFZfitsdjRoWSikypDUAnI32k3WCsb04b5Ik0svqh+mYYUvaUrZ HRC+Q+JOyc38JQvXHoehx53B X-IronPort-AV: E=Sophos;i="5.84,334,1620716400"; d="scan'208";a="126379270" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 19 Aug 2021 04:09:52 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Thu, 19 Aug 2021 04:09:52 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Thu, 19 Aug 2021 04:09:49 -0700 From: Eugen Hristev To: CC: , Eugen Hristev Subject: [PATCH] board: atmel: sama7g5ek: avoid rewriting of configured CONFIG_BOOTCOMMAND Date: Thu, 19 Aug 2021 14:09:41 +0300 Message-ID: <20210819110941.249615-1-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Rewrite the CONFIG_BOOTCOMMAND only if it's not previously configured from defconfig file. This allows the user to select from defconfig/menuconfig the desired boot command. Adjust the current board defconfigs to reflect the default booting command for the specific ENV configuration. Signed-off-by: Eugen Hristev --- configs/sama7g5ek_mmc1_defconfig | 2 ++ configs/sama7g5ek_mmc_defconfig | 2 ++ include/configs/sama7g5ek.h | 6 +++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/configs/sama7g5ek_mmc1_defconfig b/configs/sama7g5ek_mmc1_defconfig index e076e07e11..a78adf0dd8 100644 --- a/configs/sama7g5ek_mmc1_defconfig +++ b/configs/sama7g5ek_mmc1_defconfig @@ -18,6 +18,8 @@ CONFIG_FIT=y CONFIG_SD_BOOT=y CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/mmcblk1p2 rw rootwait" +CONFIG_USE_BOOTCOMMAND=y +CONFIG_BOOTCOMMAND="fatload mmc 1:1 0x61000000 at91-sama7g5ek.dtb; fatload mmc 1:1 0x62000000 zImage; bootz 0x62000000 - 0x61000000" CONFIG_MISC_INIT_R=y CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y diff --git a/configs/sama7g5ek_mmc_defconfig b/configs/sama7g5ek_mmc_defconfig index 96549c23f8..de845178e6 100644 --- a/configs/sama7g5ek_mmc_defconfig +++ b/configs/sama7g5ek_mmc_defconfig @@ -18,6 +18,8 @@ CONFIG_FIT=y CONFIG_SD_BOOT=y CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait" +CONFIG_USE_BOOTCOMMAND=y +CONFIG_BOOTCOMMAND="fatload mmc 0:1 0x61000000 at91-sama7g5ek.dtb; fatload mmc 0:1 0x62000000 zImage; bootz 0x62000000 - 0x61000000" CONFIG_MISC_INIT_R=y CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y diff --git a/include/configs/sama7g5ek.h b/include/configs/sama7g5ek.h index 96db82e9d4..07e14ff507 100644 --- a/include/configs/sama7g5ek.h +++ b/include/configs/sama7g5ek.h @@ -26,7 +26,7 @@ #define CONFIG_SYS_LOAD_ADDR 0x62000000 /* load address */ -#undef CONFIG_BOOTCOMMAND +#ifndef CONFIG_BOOTCOMMAND #ifdef CONFIG_SD_BOOT /* u-boot env in sd/mmc card */ @@ -34,6 +34,10 @@ #define CONFIG_BOOTCOMMAND "fatload mmc " CONFIG_ENV_FAT_DEVICE_AND_PART " 0x61000000 at91-sama7g5ek.dtb; " \ "fatload mmc " CONFIG_ENV_FAT_DEVICE_AND_PART " 0x62000000 zImage; " \ "bootz 0x62000000 - 0x61000000" +#else +#define CONFIG_BOOTCOMMAND "Place your bootcommand here" +#endif + #endif /* Size of malloc() pool */ -- 2.25.1