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 42312C6FA82 for ; Tue, 13 Sep 2022 06:59:40 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C6B5C84AB9; Tue, 13 Sep 2022 08:59:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1663052378; bh=klCrVSJiaY5BRn/JM48llbIblzePEBbIUtYzvJqCOQw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=YrB7UwhDj+iuVNTTre70pZtGDYX7WJbqqxr1QK1MhMkSqGKyJVWCCqEW/2JZIUCgB AeqRyXQEkRlXct32zHQTr8hbV+XFS7pA3qbLjtqf+VBQDi+CEOS5QyicXXXMPKrVpj N76hGx13oG1mZ1WNrSXZn1leTWhliuQk2hYvoZSNSxRM9/9LWTpnjY7vjghthkbeOJ oUH62wIKZRAI3WYMgU++oLDZxSTC4Z0Zf9CsDGcprj1SDBVljPERpJyJjben6SgIfR l3wHEC6o65wYn9HVHaaQcnh6UYDez+XYqJirltE8SPoCW4UR/AN+RaidiQDeKzcGN/ PziZR7RzSNYSw== Received: by phobos.denx.de (Postfix, from userid 109) id 4D76684AB9; Tue, 13 Sep 2022 08:59:36 +0200 (CEST) Received: from mout-u-204.mailbox.org (mout-u-204.mailbox.org [IPv6:2001:67c:2050:101:465::204]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 219CE84A86 for ; Tue, 13 Sep 2022 08:59:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4MRZ8N1tyjz9sM8; Tue, 13 Sep 2022 08:59:32 +0200 (CEST) Message-ID: <1760b254-dc1c-7c2f-b888-54a7c2e81686@denx.de> Date: Tue, 13 Sep 2022 08:59:31 +0200 MIME-Version: 1.0 Subject: Re: [PATCH] arm: mvebu: turris_{omnia, mox}: Reset bootdelay env for rescue Content-Language: en-US To: =?UTF-8?Q?Pali_Roh=c3=a1r?= , =?UTF-8?Q?Marek_Beh=c3=ban?= Cc: u-boot@lists.denx.de References: <20220827184920.4313-1-pali@kernel.org> From: Stefan Roese In-Reply-To: <20220827184920.4313-1-pali@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4MRZ8N1tyjz9sM8 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.6 at phobos.denx.de X-Virus-Status: Clean On 27.08.22 20:49, Pali Rohár wrote: > When rescue mode was activated reset also bootdelay env variable to its > default value. This will ensure that reset button works and starts rescue > mode also in the case when user changed bootdelay env variable to -1 (which > has meaning to not start autoboot). > > Signed-off-by: Pali Rohár Applied to u-boot-marvell/master Thanks, Stefan > --- > board/CZ.NIC/turris_mox/turris_mox.c | 5 +++-- > board/CZ.NIC/turris_omnia/turris_omnia.c | 5 +++-- > 2 files changed, 6 insertions(+), 4 deletions(-) > > diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c > index 3dbd68e52366..5e1cf328ecc1 100644 > --- a/board/CZ.NIC/turris_mox/turris_mox.c > +++ b/board/CZ.NIC/turris_mox/turris_mox.c > @@ -440,8 +440,9 @@ static void handle_reset_button(void) > env_set_default_vars(1, (char * const *)vars, 0); > > if (read_reset_button()) { > - const char * const vars[2] = { > + const char * const vars[3] = { > "bootcmd", > + "bootdelay", > "distro_bootcmd", > }; > > @@ -449,7 +450,7 @@ static void handle_reset_button(void) > * Set the above envs to their default values, in case the user > * managed to break them. > */ > - env_set_default_vars(2, (char * const *)vars, 0); > + env_set_default_vars(3, (char * const *)vars, 0); > > /* Ensure bootcmd_rescue is used by distroboot */ > env_set("boot_targets", "rescue"); > diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c > index cf8a6026702b..a7f96e5b7739 100644 > --- a/board/CZ.NIC/turris_omnia/turris_omnia.c > +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c > @@ -549,8 +549,9 @@ static void handle_reset_button(void) > env_set_ulong("omnia_reset", reset_status); > > if (reset_status) { > - const char * const vars[2] = { > + const char * const vars[3] = { > "bootcmd", > + "bootdelay", > "distro_bootcmd", > }; > > @@ -558,7 +559,7 @@ static void handle_reset_button(void) > * Set the above envs to their default values, in case the user > * managed to break them. > */ > - env_set_default_vars(2, (char * const *)vars, 0); > + env_set_default_vars(3, (char * const *)vars, 0); > > /* Ensure bootcmd_rescue is used by distroboot */ > env_set("boot_targets", "rescue"); Viele Grüße, Stefan Roese -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de