Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2197009/?format=api
{ "id": 2197009, "url": "http://patchwork.ozlabs.org/api/patches/2197009/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/92b77e44c1fb34f0433fb75f8404f357ed28b03e.1771275704.git.daniel@makrotopia.org/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<92b77e44c1fb34f0433fb75f8404f357ed28b03e.1771275704.git.daniel@makrotopia.org>", "list_archive_url": null, "date": "2026-02-16T21:23:32", "name": "[RFC,15/20] boot: bootmeth: openwrt: implement boot via bootm storage path", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "58578f9996f7e9a4d9d951693df2e4f92b3a0578", "submitter": { "id": 64091, "url": "http://patchwork.ozlabs.org/api/people/64091/?format=api", "name": "Daniel Golle", "email": "daniel@makrotopia.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/92b77e44c1fb34f0433fb75f8404f357ed28b03e.1771275704.git.daniel@makrotopia.org/mbox/", "series": [ { "id": 492351, "url": "http://patchwork.ozlabs.org/api/series/492351/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=492351", "date": "2026-02-16T21:21:14", "name": "boot: add OpenWrt boot method and on-demand FIT loading", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/492351/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2197009/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2197009/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)", "phobos.denx.de;\n dmarc=none (p=none dis=none) header.from=makrotopia.org", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de; dmarc=none (p=none dis=none)\n header.from=makrotopia.org", "phobos.denx.de;\n spf=pass smtp.mailfrom=daniel@makrotopia.org" ], "Received": [ "from phobos.denx.de (phobos.denx.de [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fFG5z58Rsz1xpl\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 08:25:43 +1100 (AEDT)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id D46A783E88;\n\tMon, 16 Feb 2026 22:24:16 +0100 (CET)", "by phobos.denx.de (Postfix, from userid 109)\n id CC0DB83DC9; Mon, 16 Feb 2026 22:23:54 +0100 (CET)", "from pidgin.makrotopia.org (pidgin.makrotopia.org\n [IPv6:2a07:2ec0:3002::65])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id E108F83B8A\n for <u-boot@lists.denx.de>; Mon, 16 Feb 2026 22:23:52 +0100 (CET)", "from local\n by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256)\n (Exim 4.99) (envelope-from <daniel@makrotopia.org>)\n id 1vs648-000000002nn-1S0W; Mon, 16 Feb 2026 21:23:36 +0000" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-1.9 required=5.0 tests=BAYES_00,\n RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2", "Date": "Mon, 16 Feb 2026 21:23:32 +0000", "From": "Daniel Golle <daniel@makrotopia.org>", "To": "Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,\n Quentin Schulz <quentin.schulz@cherry.de>,\n Daniel Golle <daniel@makrotopia.org>,\n Kory Maincent <kory.maincent@bootlin.com>,\n Mattijs Korpershoek <mkorpershoek@kernel.org>,\n Martin Schwan <m.schwan@phytec.de>, Anshul Dalal <anshuld@ti.com>,\n Ilias Apalodimas <ilias.apalodimas@linaro.org>,\n Sughosh Ganu <sughosh.ganu@arm.com>, Aristo Chen <jj251510319013@gmail.com>,\n\t=?utf-8?b?54mbIOW/l+Wujw==?= <Zone.Niuzh@hotmail.com>,\n Marek Vasut <marek.vasut+renesas@mailbox.org>,\n Heinrich Schuchardt <xypron.glpk@gmx.de>,\n Wolfgang Wallner <wolfgang.wallner@at.abb.com>,\n Frank Wunderlich <frank-w@public-files.de>,\n David Lechner <dlechner@baylibre.com>,\n Osama Abdelkader <osama.abdelkader@gmail.com>,\n Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>,\n Michael Trimarchi <michael@amarulasolutions.com>,\n Miquel Raynal <miquel.raynal@bootlin.com>,\n Andrew Goodbody <andrew.goodbody@linaro.org>,\n Yegor Yefremov <yegorslists@googlemail.com>,\n Mike Looijmans <mike.looijmans@topic.nl>,\n Weijie Gao <weijie.gao@mediatek.com>,\n Alexander Stein <alexander.stein@ew.tq-group.com>,\n Neil Armstrong <neil.armstrong@linaro.org>,\n Mayuresh Chitale <mchitale@ventanamicro.com>,\n Paul HENRYS <paul.henrys_ext@softathome.com>, u-boot@lists.denx.de", "Cc": "John Crispin <john@phrozen.org>, Paul Spooren <mail@aparcar.org>", "Subject": "[RFC PATCH 15/20] boot: bootmeth: openwrt: implement boot via bootm\n storage path", "Message-ID": "\n <92b77e44c1fb34f0433fb75f8404f357ed28b03e.1771275704.git.daniel@makrotopia.org>", "References": "<cover.1771275704.git.daniel@makrotopia.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=us-ascii", "Content-Disposition": "inline", "In-Reply-To": "<cover.1771275704.git.daniel@makrotopia.org>", "X-Mailman-Approved-At": "Mon, 16 Feb 2026 22:24:15 +0100", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.39", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>", "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "Implement openwrt_boot() to boot a discovered OpenWrt FIT image:\n\n1. Get the block interface name via blk_get_devtype() and construct\n the dev_part_str (e.g. \"0:3\") from the block descriptor and\n bootflow partition number\n2. Initialise an image_loader for block devices via\n image_loader_init_blk(), with alloc_ptr set to image_load_addr\n3. Optionally read the 'bootconf' env variable and pass it as\n '#config' in bmi.addr_img for FIT configuration selection\n4. Call bootm_run() which runs the full bootm state machine:\n START -> FINDOS -> FINDOTHER -> LOADOS -> OS_PREP -> OS_GO\n\nThe image_loader handles on-demand reading of the FIT metadata and\nsub-images (kernel, FDT) directly from the raw partition. The\nexisting cleanup call in bootm_run_states() releases the loader just\nbefore OS_GO. If bootm_run() returns (boot failure), cleanup is\ncalled explicitly.\n\nThis completes the core block-device boot path for bootmeth_openwrt.\n\nSigned-off-by: Daniel Golle <daniel@makrotopia.org>\n---\n boot/bootmeth_openwrt.c | 37 ++++++++++++++++++++++++++++++++++++-\n 1 file changed, 36 insertions(+), 1 deletion(-)", "diff": "diff --git a/boot/bootmeth_openwrt.c b/boot/bootmeth_openwrt.c\nindex 08c3f98957a..82f39c17d7f 100644\n--- a/boot/bootmeth_openwrt.c\n+++ b/boot/bootmeth_openwrt.c\n@@ -13,6 +13,8 @@\n #include <bootm.h>\n #include <bootmeth.h>\n #include <dm.h>\n+#include <env.h>\n+#include <image.h>\n #include <image-loader.h>\n #include <malloc.h>\n #include <mapmem.h>\n@@ -73,7 +75,40 @@ static int openwrt_read_bootflow(struct udevice *dev, struct bootflow *bflow)\n \n static int openwrt_boot(struct udevice *dev, struct bootflow *bflow)\n {\n-\treturn log_msg_ret(\"nyi\", -ENOSYS);\n+\tstruct blk_desc *desc = dev_get_uclass_plat(bflow->blk);\n+\tconst char *ifname = blk_get_devtype(bflow->blk);\n+\tstruct image_loader ldr = {};\n+\tstruct bootm_info bmi;\n+\tchar dev_part_str[32];\n+\tchar addr_img[64];\n+\tconst char *conf;\n+\tint ret;\n+\n+\tsnprintf(dev_part_str, sizeof(dev_part_str), \"%d:%d\",\n+\t\t desc->devnum, bflow->part);\n+\n+\tret = image_loader_init_blk(&ldr, ifname, dev_part_str);\n+\tif (ret)\n+\t\treturn log_msg_ret(\"ldr\", ret);\n+\n+\tldr.alloc_ptr = image_load_addr;\n+\n+\tbootm_init(&bmi);\n+\tbmi.loader = &ldr;\n+\n+\t/* FIT config selection via #conf suffix */\n+\tconf = env_get(\"bootconf\");\n+\tif (conf) {\n+\t\tsnprintf(addr_img, sizeof(addr_img), \"#%s\", conf);\n+\t\tbmi.addr_img = addr_img;\n+\t}\n+\n+\tret = bootm_run(&bmi);\n+\n+\t/* Clean up if bootm_run() returned (i.e. boot failed) */\n+\timage_loader_cleanup(&ldr);\n+\n+\treturn log_msg_ret(\"run\", ret);\n }\n \n static int openwrt_bootmeth_bind(struct udevice *dev)\n", "prefixes": [ "RFC", "15/20" ] }