From patchwork Sat Dec 9 15:37:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Spinrath X-Patchwork-Id: 846566 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3yvD0t3l4Wz9sRm for ; Sun, 10 Dec 2017 02:39:26 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 1AC4DC21E32; Sat, 9 Dec 2017 15:38:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id D2838C21ECA; Sat, 9 Dec 2017 15:38:21 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id F199CC21E40; Sat, 9 Dec 2017 15:38:06 +0000 (UTC) Received: from mail-out-2.itc.rwth-aachen.de (mail-out-2.itc.rwth-aachen.de [134.130.5.47]) by lists.denx.de (Postfix) with ESMTPS id CE2A6C21EE6 for ; Sat, 9 Dec 2017 15:38:02 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2DOBADqASxa/6EagoZbHAEBAQQBAQoBAYM+ggEHnRyBfZkhCoU7AoRfQxQBAQEBAQEBAQFrKIUjBnkQIDE9GgYBDQWKKASpaoprAQEBAQEBAQEBAQEBAQEBAQEBAR8JAYNegguDaI4ZBaMRgRCWJ4l2KYcuSJVpAgICAgkCGoE7NiKBT3CCd4RWd4hPAYEUAQEB X-IPAS-Result: A2DOBADqASxa/6EagoZbHAEBAQQBAQoBAYM+ggEHnRyBfZkhCoU7AoRfQxQBAQEBAQEBAQFrKIUjBnkQIDE9GgYBDQWKKASpaoprAQEBAQEBAQEBAQEBAQEBAQEBAR8JAYNegguDaI4ZBaMRgRCWJ4l2KYcuSJVpAgICAgkCGoE7NiKBT3CCd4RWd4hPAYEUAQEB X-IronPort-AV: E=Sophos;i="5.45,382,1508796000"; d="scan'208";a="28361280" Received: from rwthex-s3-b.rwth-ad.de ([134.130.26.161]) by mail-in-2.itc.rwth-aachen.de with ESMTP; 09 Dec 2017 16:38:02 +0100 Received: from snowflake.lan (37.24.152.115) by rwthex-s3-b.rwth-ad.de (2002:8682:1aa1::8682:1aa1) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.26; Sat, 9 Dec 2017 16:37:58 +0100 From: To: , , Date: Sat, 9 Dec 2017 16:37:43 +0100 X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171209153743.2473-1-christopher.spinrath@rwth-aachen.de> References: <20171209153743.2473-1-christopher.spinrath@rwth-aachen.de> MIME-Version: 1.0 X-Originating-IP: [37.24.152.115] X-ClientProxiedBy: rwthex-s2-b.rwth-ad.de (2002:8682:1a9b::8682:1a9b) To rwthex-s3-b.rwth-ad.de (2002:8682:1aa1::8682:1aa1) Message-ID: <014da629-8faa-4e01-92ff-3b87f50b21c3@rwthex-s3-b.rwth-ad.de> Cc: u-boot@lists.denx.de, christopher.spinrath@rwth-aachen.de Subject: [U-Boot] [PATCH 3/3] ARM: imx: cm_fx6: env: don't run boot scripts twice X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" From: Christopher Spinrath Boot scripts located in the root directory of the first partition of USB, mmc, and SATA drives are executed twice: first by the distro boot command and then by the legacy boot command. This may have weird side effects if those scripts only change or extend the environment (including parts of the boot command itself). Removing the script execution from the legacy boot command has its own caveats. For instance, the distro boot command may execute the boot.scr on the mmc drive, then the boot.scr on the SATA drive, before the legacy boot command actually boots from the mmc drive. However, the current behavior would only execute the boot.scr once more before the actual boot, but it does not prevent the script located on the SATA drive from being executed, and thus, both scripts from being mixed up. Considering that the legacy boot command is only in place to boot old (standard) installations, let's go with the resolution having less custom code and remove the script execution from the legacy boot command. Signed-off-by: Christopher Spinrath Reviewed-by: Fabio Estevam --- include/configs/cm_fx6.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h index 2edbc4650e..17fa7eb07c 100644 --- a/include/configs/cm_fx6.h +++ b/include/configs/cm_fx6.h @@ -83,7 +83,6 @@ "uImage=uImage-cm-fx6\0" \ "zImage=zImage-cm-fx6\0" \ "kernel=uImage-cm-fx6\0" \ - "script=boot.scr\0" \ "dtb=cm-fx6.dtb\0" \ "console=ttymxc3,115200\0" \ "ethprime=FEC0\0" \ @@ -121,11 +120,8 @@ "run_eboot=echo Starting EBOOT ...; "\ "mmc dev 2 && " \ "mmc rescan && mmc read 10042000 a 400 && go 10042000\0" \ - "loadscript=load ${storagetype} ${storagedev} ${scriptaddr} ${script};\0"\ "loadkernel=load ${storagetype} ${storagedev} ${kernel_addr_r} ${kernel};\0"\ "loadfdt=load ${storagetype} ${storagedev} ${fdt_addr_r} ${dtb};\0" \ - "bootscript=echo Running bootscript from ${storagetype} ...;" \ - "source ${scriptaddr};\0" \ "nandloadkernel=nand read ${kernel_addr_r} 0 780000;\0" \ "nandloadfdt=nand read ${fdt_addr_r} 780000 80000;\0" \ "setupmmcboot=setenv storagetype mmc; setenv storagedev 2;\0" \ @@ -139,9 +135,7 @@ "fi;" \ "run storagebootcmd;" \ "fi;\0" \ - "trybootsmz=if run loadscript; then " \ - "run bootscript;" \ - "fi;" \ + "trybootsmz=" \ "run setboottypem;" \ "run trybootk;" \ "run setboottypez;" \