| Message ID | 20250930005137.3650600-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=1759193548; bh=jD7lceN8BHLZuVDOf1Nj7HXUcKXwZyqVV4+3VgbeB+o=; 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=eApj057/Lc38ZIEBAfAj4NNvzbOBc0qQSVeYJTgZrJZb5Apfd7nZK9gI5pKshx1Uw makfqV+yZkI5K4f2EsHT1jVW0Ya6EOv3h+GTBGt3Sg89Ceqr5Rg9LkNgfqDBSfPIfJ 4RwIj39rgGpSxnd15WNvuVZWPChvQqyIVEhQcWNa+b10mgzz2AEZ1OgNro2r8rZY0j ze/9gGnid7Pu4cxoQlvIOb1lFf5uFS1/OYJDbqFuKeP7bQooT/ig2T8cOs0yi4HOK7 RLBZgChaiTv6WiFDO05+dOlI68PLIMD/d8+njAVumi3jOIxIz15QIlO0DZJUnk8pcX 8Ipt+m1Nd0o3Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id F2A7C67E5B for <u-boot-concept@u-boot.org>; Mon, 29 Sep 2025 18:52:28 -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 2D-2JcZ5jdcv for <u-boot-concept@u-boot.org>; Mon, 29 Sep 2025 18:52:28 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759193548; bh=jD7lceN8BHLZuVDOf1Nj7HXUcKXwZyqVV4+3VgbeB+o=; 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=eApj057/Lc38ZIEBAfAj4NNvzbOBc0qQSVeYJTgZrJZb5Apfd7nZK9gI5pKshx1Uw makfqV+yZkI5K4f2EsHT1jVW0Ya6EOv3h+GTBGt3Sg89Ceqr5Rg9LkNgfqDBSfPIfJ 4RwIj39rgGpSxnd15WNvuVZWPChvQqyIVEhQcWNa+b10mgzz2AEZ1OgNro2r8rZY0j ze/9gGnid7Pu4cxoQlvIOb1lFf5uFS1/OYJDbqFuKeP7bQooT/ig2T8cOs0yi4HOK7 RLBZgChaiTv6WiFDO05+dOlI68PLIMD/d8+njAVumi3jOIxIz15QIlO0DZJUnk8pcX 8Ipt+m1Nd0o3Q== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E1A5767E58 for <u-boot-concept@u-boot.org>; Mon, 29 Sep 2025 18:52:28 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759193546; bh=krZaiCTYpJCX38LorIpMPlhm07DI+0A7hl/ixa54i64=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fB7nm4yk8t32hS7D+AVhtEIDWH3cVog3EL844ya9BTPs4OHYKPcmFnx9wqZ269Ru3 CS0IAyJ7JuFlH6oWVfiA9GERBunSuJH0s87tG3CSk0H5oJflNRk5NH/Hp7AsHrn6wW D/h5dJxqh0osyzT/feCohrq3a+mZNNLtMzuSxBaZVM4xBkzrW1d2Cr2x7m3Hs0oOZr KnbEZc6J1Ok8nYDEAoD7EIk117/+YsQ4oX6HBcEzcJXiXSS/EHxaoCOvujPwSIquqW jBj1tXzuYBAW/IUtDRyjo8LZTMeP242OJ8fbP2oX5aMPl3VVRVxhDTGqXSdYQTrNs5 M60VIulu4PaiQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BBF9167B49; Mon, 29 Sep 2025 18:52:26 -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 1C2oeVrbroQb; Mon, 29 Sep 2025 18:52:26 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759193541; bh=8AynTbhHhZbGBLi29FbpI2I9Jn9F02dGw83Triy9T18=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UA7F2g/brgFbfk9s0dlZq9WUGj9q6AjsGO4sj7q14u81jE12Ldh16mkalXv6WJ5bi J4Bytgw+BRCy957CSUNarJfvOse+lx4edZ2qBWSeEJZ02x0B5JAX1jsl0e/bZ+nAVe lJVJHl4C8nyqaZ2YHo7oCIywShvagPyka8/XhHlZroBJGwR/EeDZUZh9W7ekX3KEDg 8kL3mtgv4HSn5t8L3XrMez6Nx04z6uG64JVVdc2a699gAubulzsty0kqadWMoVhQGH h3XlKaRYkfG/iLoVs6QiGytwlynGmcxxflieIPmtg3CPZaIsvnXvmmZZ5oqxVy6DpS OPgMnkoT3/u3g== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 774A267E57; Mon, 29 Sep 2025 18:52:21 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Mon, 29 Sep 2025 18:51:26 -0600 Message-ID: <20250930005137.3650600-11-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250930005137.3650600-1-sjg@u-boot.org> References: <20250930005137.3650600-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: DKQVD7OJLXIMSUQXFDVSJW2YNU2AAJXR X-Message-ID-Hash: DKQVD7OJLXIMSUQXFDVSJW2YNU2AAJXR 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 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/DKQVD7OJLXIMSUQXFDVSJW2YNU2AAJXR/> 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, 12:51 a.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> --- boot/bootflow.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/boot/bootflow.c b/boot/bootflow.c index 51e6ad6dd86..d6c396e3087 100644 --- a/boot/bootflow.c +++ b/boot/bootflow.c @@ -354,7 +354,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;