From patchwork Mon Jun 26 14:31:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 1799977 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=kCpJgtBd; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QqVfZ6rRqz1yhT for ; Tue, 27 Jun 2023 00:32:06 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3E3B4863B2; Mon, 26 Jun 2023 16:31:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com 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=gmail.com header.i=@gmail.com header.b="kCpJgtBd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2A44486442; Mon, 26 Jun 2023 16:31:57 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A7E1B863B2 for ; Mon, 26 Jun 2023 16:31:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=festevam@gmail.com Received: by mail-ot1-x336.google.com with SMTP id 46e09a7af769-6b751cb88bfso100001a34.1 for ; Mon, 26 Jun 2023 07:31:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687789912; x=1690381912; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=vhw1NxiXQPJPmWAUzR8kC5EpTwFb3AZWgzDW3KZdEpE=; b=kCpJgtBd9Rs9yJ/35vbUEGKzi1ttlTW5MYywixJsk/V05RSe3rV+Z8fqCpQ8cqO4ui xwQdnj0EyeVur3l4e/v3TuzCfUkNKf22/ubGA8YeUJMIV/gR/jf8rKZ5sqt+aZboa8wj bE/pkUmigCXGJSIh+alOnQ1ncO4c5cntgnu+gP4CNcXZtxkLlQ7qa8bjbEiR2/XO76Qo KCSnJRzjADbFgxBdjPeu562Q0R4+k0VIwhuCEwAqKwOaXlxVsjWb+TlTjJ5FlBy8i6KK XiwyrUeZOpE29iChs9ySO4aiGEhMEIHSYlOotLnKaY51o7Q2HpRC1vooRaGuVL7SotXV S5pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687789912; x=1690381912; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vhw1NxiXQPJPmWAUzR8kC5EpTwFb3AZWgzDW3KZdEpE=; b=aGWJNsTiSlBKM2pI420IkBVvndpzQqObZhRnR3drmta/iO6y8XeWijb8InuoWo0Y02 FNwC4p+ai0bNnl4PLSmSCjZWTNQHhPaHlaxW+5NUuPUJFGRV+GPcFv4ke9SlISggjWu0 5ZS4JSHJoU/4c8ZoAGwdk/1vA4iJh3ZCr6BnXhdAs0K0DNhOFdu+eHTJSjyfIzxLv+D8 Y2dYmB4g2MTkC+TcrcoSvXeRJuoJfSayJDsPLA6h6sUcncbg7UPihaVtwrQqsuEPW3Hx MCSLE1yGb7OUa20FF8EgezA0EilURyZYTIw+nMQSr6evqHwSTMYOQ8ZMRN75Pt1T1SaS c4cg== X-Gm-Message-State: AC+VfDyAj7QtXCq+kA1mJ/yoRNGHGm2+mP/cz/lcKyMLnS+rEpe5Rg7+ UI03FYVsGUYUxZV/7RvJ1eY= X-Google-Smtp-Source: ACHHUZ7ravbGg0FIEsBtsZwfLmSg8DFxgd4xjPxts5J4YV50mUfhzZCdRDFZ374yI7x7e5O1M4MwgQ== X-Received: by 2002:a05:6830:350c:b0:6af:8ab6:7b1e with SMTP id be12-20020a056830350c00b006af8ab67b1emr20250523otb.0.1687789911627; Mon, 26 Jun 2023 07:31:51 -0700 (PDT) Received: from fabio-Precision-3551.. ([2804:14c:485:4b61:b875:977b:c291:90b6]) by smtp.gmail.com with ESMTPSA id d21-20020a056830139500b006b29c5fdeb2sm2608631otq.57.2023.06.26.07.31.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 07:31:51 -0700 (PDT) From: Fabio Estevam To: trini@konsulko.com Cc: sbabic@denx.de, eduard@lionizers.com, u-boot@lists.denx.de, Fabio Estevam Subject: [PATCH] smegw01: Fix duplicate bootcmd Date: Mon, 26 Jun 2023 11:31:36 -0300 Message-Id: <20230626143136.2260037-1-festevam@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean From: Eduard Strehlau Two conflicting bootcmds were included in the environment. Streamline to defining the bootcmd only in the env file. Signed-off-by: Eduard Strehlau Signed-off-by: Fabio Estevam --- Tom, Stefano is out this week. Could you please apply this one directly so that it gets included in 2023.07? Thanks board/storopack/smegw01/smegw01.env | 11 ++++++++++- configs/smegw01_defconfig | 2 -- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/board/storopack/smegw01/smegw01.env b/board/storopack/smegw01/smegw01.env index 25bc7cdbd28b..1263ddac8ed0 100644 --- a/board/storopack/smegw01/smegw01.env +++ b/board/storopack/smegw01/smegw01.env @@ -29,7 +29,16 @@ altbootcmd= run bootcmd; boot_emmc=setenv mmcdev_wanted 1; run persist_mmcdev; run bootcmd; boot_sd=setenv mmcdev_wanted 0; run persist_mmcdev; run bootcmd; -bootcmd=run finduuid; run distro_bootcmd +bootcmd= + if test "${bootcount}" -gt "${bootlimit}"; then + run altbootcmd; + else + if test "${ustate}" = 1; then + setenv upgrade_available 1; + saveenv; + fi; + run mmcboot; + fi; bootdelay=2 bootlimit=3 bootm_size=0x10000000 diff --git a/configs/smegw01_defconfig b/configs/smegw01_defconfig index 3d43c9b996e0..7f1b2bee8e16 100644 --- a/configs/smegw01_defconfig +++ b/configs/smegw01_defconfig @@ -21,8 +21,6 @@ CONFIG_FIT_VERBOSE=y # CONFIG_BOOTSTD is not set CONFIG_AUTOBOOT_MENU_SHOW=y CONFIG_BOOTMENU_DISABLE_UBOOT_CONSOLE=y -CONFIG_USE_BOOTCOMMAND=y -CONFIG_BOOTCOMMAND="if test \"${bootcount}\" -gt \"${bootlimit}\"; then run altbootcmd; else if test \"${ustate}\" = 1; then setenv upgrade_available 1; saveenv; fi; run mmcboot; fi;" CONFIG_USE_PREBOOT=y CONFIG_PREBOOT="run setup_boot_menu;" CONFIG_HUSH_PARSER=y