| Message ID | 20250930232611.1564850-11-sjg@u-boot.org |
|---|---|
| State | New |
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759274824; bh=PUpmDVWU4Ijeoal0NDRwPAxJ2t83+JpOD0blpaKT7TQ=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=BTW00xm67aNB2HWouh1tyzz/uW9/jQu+cL2t69Q7th2I3ZKA/enByanujNhnFq26o lX/UtYasP+iUE8ap6IX3VJokGtEaFIxF/Zv6p0+MG5wJtoC/9rnbZSC7CxcpA/KaSh Z+f+PTFjtQDqR8cjjCVRrLMK4KbIMjBmqMUMaLVUiHDu4DReRBJCODCVzDCEVOunuO qiARGMCdhE5oeKDebydBwd1NKbzf/q+DylBZlErcyZZ1VX/DjTJexOGAQDyEL2w+kw MPu/FpAsiRm0AfLQ5+vXDlL6mgtjvDRDx61Uvtcso0lfEqUf589sPZDI4efawsl/IQ eKqUNH+TCxmNg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A0E0C67E7F for <u-boot-concept@u-boot.org>; Tue, 30 Sep 2025 17:27:04 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id YfJpvrI5-kn2 for <u-boot-concept@u-boot.org>; Tue, 30 Sep 2025 17:27:04 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759274824; bh=PUpmDVWU4Ijeoal0NDRwPAxJ2t83+JpOD0blpaKT7TQ=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=BTW00xm67aNB2HWouh1tyzz/uW9/jQu+cL2t69Q7th2I3ZKA/enByanujNhnFq26o lX/UtYasP+iUE8ap6IX3VJokGtEaFIxF/Zv6p0+MG5wJtoC/9rnbZSC7CxcpA/KaSh Z+f+PTFjtQDqR8cjjCVRrLMK4KbIMjBmqMUMaLVUiHDu4DReRBJCODCVzDCEVOunuO qiARGMCdhE5oeKDebydBwd1NKbzf/q+DylBZlErcyZZ1VX/DjTJexOGAQDyEL2w+kw MPu/FpAsiRm0AfLQ5+vXDlL6mgtjvDRDx61Uvtcso0lfEqUf589sPZDI4efawsl/IQ eKqUNH+TCxmNg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8EDBE67E2B for <u-boot-concept@u-boot.org>; Tue, 30 Sep 2025 17:27:04 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759274822; bh=2tGsHDk/lL4mv1FpIlx7io6zONxu3LMBBLE9Lv/iv1s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VRiwkymyEu44F42QZq77FwH1Ig8EFqXyZNdyaHESo4jtuTWEc2XeqBevhk0htHue1 rruNca0DpbtIJxf4VqKHAKMb/oaG3UzAS01lXw87jfVJB8wkkTS+c/qK+LYJPXyrfG bpMnwYCeArmL+Isi4vPBWOhQZygfw1T6NFj/ukytN7MTNwTWMhM+t1wtOrxoGFAiO0 3a6qGrMb1dWCiUxahT3ASz0iDAOf61UIJ4pYc+DALoBDPZ+cmrAySvFgF8k/Ypq4xl 5yrvHQLC9H/6p3wwnKG8QZ6fIsBa1HfdutPmHvdVt5axwWU8ZYaRkeeEeSd/iBsaae SYbjZMrSErgBw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CE9B367B5E; Tue, 30 Sep 2025 17:27:02 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id VEwKn6QOGbJm; Tue, 30 Sep 2025 17:27:02 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759274818; bh=8TBgVWzTfAQ1OYW9LV1Qe7T8nB0+WgijEon9d+FhjBc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rlmRL5VVBbHsT0Kdca6Ehpi6SgziZBdkw+uvLv71ALMhIy9L5FW7tu+1c02Kg2M0v H3mIryYC6ZQeOaGAFyGULao08F+XxehY6DjKr9vyneo2VvQh/qY1sLAW15ageFsxGF +ASQY8RiJ44q4YhUQWpWoCLVVzAWXRxZmEE7r/wBZ58AP9YgFHrv/PH+87oJ2Dzz4H BCd7+iPZY46l3Zg4agLljYy3SBLRK9yJVCs7xCSuoRS/GcQe2b2CPI6F9nRRZmaPx7 +M6u071BLHouraG8qGd5IaaAix3R/N1NqBwvqLXHiNgJzzm0EJaDYXAcXDDMclEy5t 9VWh/bSJTAZtA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 8768667E2B; Tue, 30 Sep 2025 17:26:58 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Tue, 30 Sep 2025 17:25:47 -0600 Message-ID: <20250930232611.1564850-11-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250930232611.1564850-1-sjg@u-boot.org> References: <20250930232611.1564850-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: U7OGZTPL4E5AUX5QZLWXTF5G5HIGBYED X-Message-ID-Hash: U7OGZTPL4E5AUX5QZLWXTF5G5HIGBYED X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt <xypron.glpk@gmx.de>, Simon Glass <sjg@chromium.org> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH v2 10/15] boot: Only run global bootmeths once each List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/U7OGZTPL4E5AUX5QZLWXTF5G5HIGBYED/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
boot: Support priority for global bootmeths
|
|
Commit Message
Simon Glass
Sept. 30, 2025, 11:25 p.m. UTC
From: Simon Glass <sjg@chromium.org> Use the methods_done flags to make sure that each global bootmeth is only used once. For now this has no effect, since they are all processed at the start. Signed-off-by: Simon Glass <sjg@chromium.org> --- (no changes since v1) boot/bootflow.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/boot/bootflow.c b/boot/bootflow.c index e6f99402d68..02b08eec641 100644 --- a/boot/bootflow.c +++ b/boot/bootflow.c @@ -356,7 +356,13 @@ static int iter_incr(struct bootflow_iter *iter) } /* Get the next boothmethod */ - if (++iter->cur_method < iter->num_methods) { + for (iter->cur_method++; iter->cur_method < iter->num_methods; + iter->cur_method++) { + /* loop until we find a global bootmeth we haven't used */ + if (IS_ENABLED(CONFIG_BOOTMETH_GLOBAL) && iter->doing_global && + !bootmeth_glob_allowed(iter, iter->cur_method)) + continue; + iter->method = iter->method_order[iter->cur_method]; log_debug("-> next method '%s'\n", iter->method->name); return 0;