From patchwork Mon Mar 31 12:23:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 877278 Delivered-To: patch@linaro.org Received: by 2002:a5d:6dae:0:b0:38f:210b:807b with SMTP id u14csp1722654wrs; Mon, 31 Mar 2025 05:24:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUsnSh3Or+SX7mh7Hs2LzvpDo4ojrKjFCVpjygvGXUcc/Y9ohS7CsTcCXM06yuhn47lKkVnuw==@linaro.org X-Google-Smtp-Source: AGHT+IET7tnWAxy4VsYqs8qPhxi+APBmJVNnkmv53GCLGtV3Z1CU5n0kdl0geLUAmKjrSudajqak X-Received: by 2002:a05:6102:5489:b0:4c3:7f7:92f4 with SMTP id ada2fe7eead31-4c6d3862fabmr3820144137.6.1743423857746; Mon, 31 Mar 2025 05:24:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1743423857; cv=none; d=google.com; s=arc-20240605; b=eHSlWozdoeIv2j+682qzkAMDbp3U0HQ0vpw/fj7Cx0Q5o9h8IH8Sbqwy9zAVmJO/iD JzXcVzElYqpPXmbozDXJL3nu9r0lqEcBrQPmYdUiV8zSjMNZtNOPemN6FTaG2nhy6kK0 TD+KNg8qzKfzlxjhb4CVsKdTVZHV1Hv6lS4G2XQs2MGWsCcqoO1o3KgXbYRPOeBNxsg3 wUnGSe5uRDBVqICqPA8op/3wZhRc86zzj59nMoVZn76H1d8lhAUNXCPXVjkT119s9xI8 EhMWyIvty9H6pBMkIzRHl5xR78poQDFYRK+sHAAwVSsgmRlLzsyQmtXjhzIsMp4CqbBY iJcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=CJneWbuZmLBZW2m1oElNfYskRR5fwWXGKOiA6LQp6V0=; fh=rWSmxuopRxVygxaMeb5FNNuEYobIZV/RLodmOFlXFlI=; b=EScLbO1iZsfngFUMV+i5iWhMAKOYbWpQ9gU0YSZn6oLBmXxUhsUabgWzNH36C0Ick7 1n16xVqxsJKlehlCkQ8AAcVAfPdGAKBOI9HcrZwCd0Ep51GNKevhoeGpmDKovwoSo+J4 zEmH9MpqP9uZmjOHT0UboHP/irYf4gJK3xUfLejkUmDoUMniZ1bJVSw2JZVEuNMD1759 y6Zlz8gOXFlLkR/yDHHwpBZVzJf3t9T6F/0hlwYoT2TLaJ/nhupAjBYVVSUAoZWKZzTS fnqg1b20vl8/wQpJC5nTz1CnyrfFSg+l8JREURkQKDoj//iYK2l2Gjxqf42WmtDP6p3o ATHQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KrWj8eri; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id ada2fe7eead31-4c6bfe14d45si1558649137.295.2025.03.31.05.24.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Mar 2025 05:24:17 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KrWj8eri; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7009F81E6C; Mon, 31 Mar 2025 14:23:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.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; unprotected) header.d=linaro.org header.i=@linaro.org header.b="KrWj8eri"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 15B908144A; Mon, 31 Mar 2025 14:23:51 +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,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (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 0EBB581ECA for ; Mon, 31 Mar 2025 14:23:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=caleb.connolly@linaro.org Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-43d2d952eb1so29826555e9.1 for ; Mon, 31 Mar 2025 05:23:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1743423828; x=1744028628; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=CJneWbuZmLBZW2m1oElNfYskRR5fwWXGKOiA6LQp6V0=; b=KrWj8eria89Ve/ygF5v6Pk2Mk6z9LB99O1XconO6lwiam3lZKN1BpAr9bL4KmUHH7W c6ROnM19tES4kx0TxAmN6kRwQ3C63HiRo/O2Ob7klC64U7VUjjYswpTLyk2EdAbF7ujR W4HryFIN2YpBo19Z+v+rese59Bg624VGl+n0A2IrJ0KFqtoo6SWacLxhgyMA5JaPTCbU RY8ci/6xeJ8V2aSZN1WHLJqpuz0s40ujLvn/2KDZ14pBaQIV1mdZN/U0Y82ffV6pQy7u cBV7t3bI47eG2SLmPRsQWXB+Y0mcCClsRqSG+oqzs/2OYT3k1ZHWLo+IqnIzALx6UvgI 9/Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743423828; x=1744028628; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CJneWbuZmLBZW2m1oElNfYskRR5fwWXGKOiA6LQp6V0=; b=DKgd/ToZ0MNnluTS8a80z7PxID96/MKfLbb7izmGXz/zYaElav3h/f7uFY9lzb/BXf t06vd2T08tHjN7d2auTU+oqXieopTt97CB1fC0QDN1b0BRVT3sfDyB6U0+y/mTBXQmjG XjCZzdMw/jtOxNL8DMC0Zs7DKcoCnvRpbEoKncrtEejjNjkGlVTsQyXhZEgVy43g5fqX 4Az4G0ZibHxcGcNYc0Dyo42WtCR6fKJlH+MH3K+Y50y118fAvRFocgfutrjdKLNuC8rE TtXcRIUxTa2xUT21nvUoswFA5ylIbTOLZoBRQB9EPmmPY0lOKlCFr1ClOTtRkpoCInlJ dlsw== X-Forwarded-Encrypted: i=1; AJvYcCXeAa3UsJXtSIy4czfE1RimyjqUuTZLIW3pwCVEzKSM/Df9aN891S/MNVbMvvsC+J87PDdjLss=@lists.denx.de X-Gm-Message-State: AOJu0Yzbiyt6LJ+G/lLojtgZKDqD+kh8xBuPMSvlozuH9lT11GtXo7DM USMdUEDhjsEMLBjvfVsvo+X9gCOL6fo3HdipS+ln7vYACWaf6azqu8YOZAD+mXI= X-Gm-Gg: ASbGncusJd9Eq7UnsM7L47cTjGLykndzvg//uFULYXudh0Lxkbm7YvD72B+uKuKqFBA 3JD6zeqD/jKzIWfrMhXbHBwlrtTW5VkczLo2c1AFxYie+mf3asfp5n1GV63CF1m4DNPolqD2Lt3 AgFqKUD32jC38YPhn/FUeTyJYUHmJWvGQjy9C4s9yduuaMitQAdXSL5i9ItFwJj/sWS4KE6nIiA FqngL99NlVyLCXeBmNe2J7KQheaLyeasBqZX1DEO+DV6tSeXNHZBB8j4Efgria6x3vJ/dQDNhCK 3B1aE7JNjwnD61RhZcauB3wbAhcKG1HFqlp+JON3Gris5YDrVVm9pKtWLXmxPDDlJqTUpYwn2M0 HmfnEvSs9H0G9 X-Received: by 2002:a05:6000:22c8:b0:391:481a:5e75 with SMTP id ffacd0b85a97d-39c120dee91mr6238302f8f.22.1743423828445; Mon, 31 Mar 2025 05:23:48 -0700 (PDT) Received: from toyger.tail248178.ts.net (i5E863BED.versanet.de. [94.134.59.237]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39c0b60a9ddsm11315562f8f.0.2025.03.31.05.23.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Mar 2025 05:23:47 -0700 (PDT) From: Caleb Connolly Date: Mon, 31 Mar 2025 14:23:20 +0200 Subject: [PATCH v4 3/6] bootretry: check for bootretry variable changes MIME-Version: 1.0 Message-Id: <20250331-qcom-phones-v4-3-f52e57d3b8c6@linaro.org> References: <20250331-qcom-phones-v4-0-f52e57d3b8c6@linaro.org> In-Reply-To: <20250331-qcom-phones-v4-0-f52e57d3b8c6@linaro.org> To: Caleb Connolly , Neil Armstrong , Tom Rini , Sumit Garg , Ramon Fried , Jorge Ramirez-Ortiz , Sumit Garg Cc: u-boot-qcom@groups.io, u-boot@lists.denx.de, Danila Tikhonov , Jens Reidel X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1387; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=jwuZYBuJJ+ldxaKDFAWY5XTPAL8LwWLq3I/2ci0eJHc=; b=owEBbQKS/ZANAwAKAQWDMSsZX2S2AcsmYgBn6olNDItYx8ayWIVRlSHfF792o8gGQqh4QTLpM nAxlIu5+k2JAjMEAAEKAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZ+qJTQAKCRAFgzErGV9k ttjeD/4pjcnL6ArvpghLbsXvkTaiTInG3EK9CJawZGZfhZxA3fGs9PfVOm0MmVZlF8t9qaSc+ew UxNL4eHArlbZKYVgU9jWhvnVpCvebPtIdCDuJ2i+qJt830SHO39qSt46h9KcXpktBp7fBAl5JUE 35xeyUNr/kOGn65ZjRICEbFVYnc4y05cmWof/i3lAc8T/LcaCZugRIZ3eGyMawtvEFyFB06bSqN w/QlTDMS6fWIPXqZRGEfmNy3BLhmVwYAVyYyarsmSMgDlQ5QMnlbxphMgY1pyWt6p80kIOVbvC/ 4+5BcrCJsLdrpvT2FyFWR4IEPPqEJzdqLW5t3Kr/yhC2g8gj0XK2RUJFFTUBhB2JVQ9EdXOxAZO U3Xxva+KPkI5vGWi1uuTcsHBCkF6FPTEAOfVWgw36NwXWN6P/IiE8UBRC/ahCRf/a1T7l+Yvs7J OtQB6QHhE2bJplhvWqq43A8ghHMCjAE4LBjZQbUOZCG4OTHmuEpMNB2KrVp03x76TpshWAX1jrd AcTBpPJgIBlypNUDI9Om3BYCygRafH9qEAbjdwqwsNToOnaoe8KSjoZoif6J5hjgTifDorubxz3 JLxmLpYg9CgbCfndskMy8TJUJ2KUpSekYPY6ptBFFlGrxo9QnMWpVmywlLmIj/gJCaBpqrSGmCi OLX2l9GL+XTstkw== X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 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 To enable more complex sequencing of the bootmenu, autoboot, and bootretry, handle changes to the bootretry variable between tries. This makes it possible to turn bootretry off (e.g. to drop to a shell) and then back on again. This makes it possible to have a persistent bootmenu (the only way to navigate U-Boot on devices like smartphones which lack a physical keyboard) by having bootcmd be defined to launch the bootmenu. This allows for menu options like enabling USB mass storage gadget to return back to the boot menu once the gadget is shut down. Reviewed-by: Tom Rini Tested-by: Danila Tikhonov # google-sunfish Tested-by: Jens Reidel # xiaomi-davinci Signed-off-by: Caleb Connolly --- boot/bootretry.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/boot/bootretry.c b/boot/bootretry.c index 587b2de7d6b08db07e1dea512a834cb5590c2d12..a60767eaa2ee51970e4695e487ce5651575079ba 100644 --- a/boot/bootretry.c +++ b/boot/bootretry.c @@ -36,8 +36,10 @@ void bootretry_init_cmd_timeout(void) * reset command line timeout to retry_time seconds */ void bootretry_reset_cmd_timeout(void) { + /* Parse changes to bootretry */ + bootretry_init_cmd_timeout(); endtime = endtick(retry_time); } int bootretry_tstc_timeout(void)