Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2197004/?format=api
{ "id": 2197004, "url": "http://patchwork.ozlabs.org/api/patches/2197004/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/5b30234322e3efdc4efb4c1e2b312418bc3e90a4.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": "<5b30234322e3efdc4efb4c1e2b312418bc3e90a4.1771275704.git.daniel@makrotopia.org>", "list_archive_url": null, "date": "2026-02-16T21:22:51", "name": "[RFC,10/20] cmd: bootm: accept storage device as image source", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "4153ba95f750af3d0adda1ef15d607567130fb6f", "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/5b30234322e3efdc4efb4c1e2b312418bc3e90a4.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/2197004/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2197004/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 4fFG4r3hD6z1xwD\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 08:24:44 +1100 (AEDT)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id DA5ED83E72;\n\tMon, 16 Feb 2026 22:23:19 +0100 (CET)", "by phobos.denx.de (Postfix, from userid 109)\n id EA8FB83DC9; Mon, 16 Feb 2026 22:23:12 +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 C00EF83E60\n for <u-boot@lists.denx.de>; Mon, 16 Feb 2026 22:23:10 +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 1vs63S-000000002k2-3JyJ; Mon, 16 Feb 2026 21:22:54 +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:22:51 +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 10/20] cmd: bootm: accept storage device as image source", "Message-ID": "\n <5b30234322e3efdc4efb4c1e2b312418bc3e90a4.1771275704.git.daniel@makrotopia.org>", "References": "<cover.1771275704.git.daniel@makrotopia.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=utf-8", "Content-Disposition": "inline", "Content-Transfer-Encoding": "8bit", "In-Reply-To": "<cover.1771275704.git.daniel@makrotopia.org>", "X-Mailman-Approved-At": "Mon, 16 Feb 2026 22:23:19 +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": "Extend the bootm command to accept a storage device type keyword as\nthe first argument:\n\n bootm mmc <dev>:<part> - boot from MMC/SD/eMMC partition\n bootm mtd <name> - boot from MTD partition\n bootm ubi <volume> - boot from UBI volume\n\nWhen a known device-type keyword is found, an image_loader is\nconstructed using the corresponding backend and stored in\nimages.loader. The rest of the bootm flow proceeds unchanged:\nboot_get_kernel() uses image_loader_map() for format detection and\nFDT structure loading, then fit_image_load() uses the on-demand\nstorage path for sub-image data.\n\nIf the first argument does not match a device-type keyword (i.e. it\nlooks like a hex address, or is absent), images.loader remains NULL\nand the existing in-memory path is taken -- full backward compatibility.\n\nThe #config suffix follows the same convention as existing bootm FIT\nconfig selection. Multiple # suffixes can be chained to select a\nbase config and one or more device-tree overlays:\n\n bootm mmc 0:4#config-1#overlay-wifi#overlay-lcd\n bootm mtd firmware#config-1\n\nGated by CONFIG_BOOTM_STORAGE.\n\nSigned-off-by: Daniel Golle <daniel@makrotopia.org>\n---\n boot/Kconfig | 13 +++++\n boot/bootm.c | 62 +++++++++++++++++---\n cmd/bootm.c | 148 ++++++++++++++++++++++++++++++++++++++++++++++--\n include/bootm.h | 2 +\n 4 files changed, 212 insertions(+), 13 deletions(-)", "diff": "diff --git a/boot/Kconfig b/boot/Kconfig\nindex 89832014af6..1f870c7d251 100644\n--- a/boot/Kconfig\n+++ b/boot/Kconfig\n@@ -1211,6 +1211,19 @@ config IMAGE_LOADER_UBI\n \t framework. Auto-attaches the UBI device from the device tree\n \t if not already attached.\n \n+config BOOTM_STORAGE\n+\tbool \"Allow bootm to load images directly from storage\"\n+\tdepends on CMDLINE && FIT && IMAGE_LOADER\n+\thelp\n+\t Extends the bootm command to accept \"mmc <dev>:<part>\",\n+\t \"mtd <name>\", or \"ubi <volume>\" as the image source instead\n+\t of a RAM address. Sub-images (kernel, FDT, ramdisk, etc.)\n+\t are loaded from storage on demand; filesystem sub-images are\n+\t never read.\n+\n+\t Requires at least one IMAGE_LOADER backend to be enabled\n+\t (IMAGE_LOADER_BLK, IMAGE_LOADER_MTD, or IMAGE_LOADER_UBI).\n+\n config DISTRO_DEFAULTS\n \tbool \"(deprecated) Script-based booting of Linux distributions\"\n \tselect CMDLINE\ndiff --git a/boot/bootm.c b/boot/bootm.c\nindex 4bdca22ea8c..67d161f6e3a 100644\n--- a/boot/bootm.c\n+++ b/boot/bootm.c\n@@ -13,6 +13,7 @@\n #include <env.h>\n #include <errno.h>\n #include <fdt_support.h>\n+#include <image-loader.h>\n #include <irq_func.h>\n #include <lmb.h>\n #include <log.h>\n@@ -146,7 +147,22 @@ static int boot_get_kernel(const char *addr_fit, struct bootm_headers *images,\n \n \t/* check image type, for FIT images get FIT kernel node */\n \t*os_data = *os_len = 0;\n-\tbuf = map_sysmem(img_addr, 0);\n+\tif (IS_ENABLED(CONFIG_BOOTM_STORAGE) && images->loader) {\n+\t\t/*\n+\t\t * Storage path: read enough bytes to detect the image\n+\t\t * format. genimg_get_kernel_addr_fit() above still\n+\t\t * parsed any #config / :subimage suffix so the FIT\n+\t\t * selection variables are populated.\n+\t\t */\n+\t\tbuf = image_loader_map(images->loader, 0, 64);\n+\t\tif (!buf) {\n+\t\t\tputs(\"Cannot read image header from storage\\n\");\n+\t\t\treturn -EIO;\n+\t\t}\n+\t\timg_addr = map_to_sysmem(buf);\n+\t} else {\n+\t\tbuf = map_sysmem(img_addr, 0);\n+\t}\n \tswitch (genimg_get_format(buf)) {\n #if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT)\n \tcase IMAGE_FORMAT_LEGACY:\n@@ -192,6 +208,20 @@ static int boot_get_kernel(const char *addr_fit, struct bootm_headers *images,\n #endif\n #if CONFIG_IS_ENABLED(FIT)\n \tcase IMAGE_FORMAT_FIT:\n+\t\tif (IS_ENABLED(CONFIG_BOOTM_STORAGE) && images->loader) {\n+\t\t\t/*\n+\t\t\t * Extend the mapping to cover the full FIT\n+\t\t\t * FDT structure so all metadata is accessible.\n+\t\t\t */\n+\t\t\tsize_t fdt_sz = fdt_totalsize(buf);\n+\n+\t\t\tbuf = image_loader_map(images->loader, 0, fdt_sz);\n+\t\t\tif (!buf) {\n+\t\t\t\tputs(\"Cannot read FIT header from storage\\n\");\n+\t\t\t\treturn -ENOMEM;\n+\t\t\t}\n+\t\t\timg_addr = map_to_sysmem(buf);\n+\t\t}\n \t\tos_noffset = fit_image_load(images, img_addr,\n \t\t\t\t&fit_uname_kernel, &fit_uname_config,\n \t\t\t\tIH_ARCH_DEFAULT, IH_TYPE_KERNEL,\n@@ -991,11 +1021,21 @@ int bootm_run_states(struct bootm_info *bmi, int states)\n \t * Work through the states and see how far we get. We stop on\n \t * any error.\n \t */\n-\tif (states & BOOTM_STATE_START)\n+\tif (states & BOOTM_STATE_START) {\n \t\tret = bootm_start();\n+\t\t/*\n+\t\t * bootm_start() zeroes the global images struct. Restore\n+\t\t * the loader pointer so the storage-backed path works.\n+\t\t */\n+\t\tif (IS_ENABLED(CONFIG_BOOTM_STORAGE) && bmi->loader)\n+\t\t\timages->loader = bmi->loader;\n+\t}\n \n-\tif (!ret && (states & BOOTM_STATE_PRE_LOAD))\n-\t\tret = bootm_pre_load(bmi->addr_img);\n+\tif (!ret && (states & BOOTM_STATE_PRE_LOAD)) {\n+\t\t/* Pre-load verification is not applicable to storage boot */\n+\t\tif (!IS_ENABLED(CONFIG_BOOTM_STORAGE) || !images->loader)\n+\t\t\tret = bootm_pre_load(bmi->addr_img);\n+\t}\n \n \tif (!ret && (states & BOOTM_STATE_FINDOS))\n \t\tret = bootm_find_os(bmi->cmd_name, bmi->addr_img);\n@@ -1003,8 +1043,11 @@ int bootm_run_states(struct bootm_info *bmi, int states)\n \tif (!ret && (states & BOOTM_STATE_FINDOTHER)) {\n \t\tulong img_addr;\n \n-\t\timg_addr = bmi->addr_img ? hextoul(bmi->addr_img, NULL)\n-\t\t\t: image_load_addr;\n+\t\tif (IS_ENABLED(CONFIG_BOOTM_STORAGE) && images->loader)\n+\t\t\timg_addr = images->os.start;\n+\t\telse\n+\t\t\timg_addr = bmi->addr_img ? hextoul(bmi->addr_img, NULL)\n+\t\t\t\t: image_load_addr;\n \t\tret = bootm_find_other(img_addr, bmi->conf_ramdisk,\n \t\t\t\t bmi->conf_fdt);\n \t}\n@@ -1097,8 +1140,13 @@ int bootm_run_states(struct bootm_info *bmi, int states)\n \t}\n \n \t/* Now run the OS! We hope this doesn't return */\n-\tif (!ret && (states & BOOTM_STATE_OS_GO))\n+\tif (!ret && (states & BOOTM_STATE_OS_GO)) {\n+\t\t/* Release storage backend before jumping — no return expected */\n+\t\tif (IS_ENABLED(CONFIG_BOOTM_STORAGE) && images->loader)\n+\t\t\timage_loader_cleanup(images->loader);\n+\n \t\tret = boot_selected_os(BOOTM_STATE_OS_GO, bmi, boot_fn);\n+\t}\n \n \t/* Deal with any fallout */\n err:\ndiff --git a/cmd/bootm.c b/cmd/bootm.c\nindex 2c5aea26d98..6c26dd8e36d 100644\n--- a/cmd/bootm.c\n+++ b/cmd/bootm.c\n@@ -12,6 +12,7 @@\n #include <env.h>\n #include <errno.h>\n #include <image.h>\n+#include <image-loader.h>\n #include <malloc.h>\n #include <nand.h>\n #include <asm/byteorder.h>\n@@ -132,14 +133,123 @@ static int do_bootm_subcommand(struct cmd_tbl *cmdtp, int flag, int argc,\n /* bootm - boot application image from image in memory */\n /*******************************************************************/\n \n+#if IS_ENABLED(CONFIG_BOOTM_STORAGE)\n+/**\n+ * bootm_init_loader() - Try to parse a storage device spec from argv\n+ *\n+ * If argv[0] is a known device-type keyword (\"mmc\", \"mtd\", \"ubi\"),\n+ * initialise @ldr as the corresponding backend and return the number\n+ * of argv entries consumed. The optional #config[#overlay...] suffix\n+ * is stripped from the device spec and returned via @conf_name.\n+ *\n+ * @ldr: loader to initialise\n+ * @argc: argument count (after removing the \"bootm\" verb)\n+ * @argv: argument vector\n+ * @conf_name: on output, points to the #config string (incl. '#') or NULL\n+ * Return: number of argv entries consumed (>0), 0 if no storage keyword\n+ * was found, or negative errno on init failure\n+ */\n+static int bootm_init_loader(struct image_loader *ldr,\n+\t\t\t int argc, char *const argv[],\n+\t\t\t const char **conf_name)\n+{\n+\tconst char *devtype;\n+\tchar *devspec;\n+\tchar *hash;\n+\tint ret;\n+\n+\tif (argc < 2)\n+\t\treturn 0;\n+\n+\tdevtype = argv[0];\n+\tdevspec = (char *)argv[1];\n+\t*conf_name = NULL;\n+\n+\t/* Locate the first '#' — its meaning depends on the backend */\n+\thash = strchr(devspec, '#');\n+\n+\tif (IS_ENABLED(CONFIG_IMAGE_LOADER_BLK) &&\n+\t !strcmp(devtype, \"mmc\")) {\n+\t\t/*\n+\t\t * Block device specs use '#' for partition names when no ':'\n+\t\t * precedes it (e.g. \"0#kernel\"). Only treat the first '#'\n+\t\t * as the FIT config separator when ':' appears before it\n+\t\t * (e.g. \"0:4#config-1\"), otherwise the first '#' is the\n+\t\t * partition name and a second '#' starts the config\n+\t\t * (e.g. \"0#kernel#config-1\").\n+\t\t */\n+\t\tchar *colon = strchr(devspec, ':');\n+\n+\t\tif (!(colon && hash && colon < hash) && hash)\n+\t\t\thash = strchr(hash + 1, '#');\n+\t\tif (hash) {\n+\t\t\t*conf_name = hash;\n+\t\t\t*hash = '\\0';\n+\t\t}\n+\t\tret = image_loader_init_blk(ldr, \"mmc\", devspec);\n+\t\tif (hash)\n+\t\t\t*hash = '#';\n+\t} else if (IS_ENABLED(CONFIG_IMAGE_LOADER_MTD) &&\n+\t\t !strcmp(devtype, \"mtd\")) {\n+\t\tif (hash) {\n+\t\t\t*conf_name = hash;\n+\t\t\t*hash = '\\0';\n+\t\t}\n+\t\tret = image_loader_init_mtd(ldr, devspec);\n+\t\tif (hash)\n+\t\t\t*hash = '#';\n+\t} else if (IS_ENABLED(CONFIG_IMAGE_LOADER_UBI) &&\n+\t\t !strcmp(devtype, \"ubi\")) {\n+\t\tif (hash) {\n+\t\t\t*conf_name = hash;\n+\t\t\t*hash = '\\0';\n+\t\t}\n+\t\tret = image_loader_init_ubi(ldr, devspec);\n+\t\tif (hash)\n+\t\t\t*hash = '#';\n+\t} else {\n+\t\treturn 0; /* not a storage keyword */\n+\t}\n+\n+\tif (ret) {\n+\t\tprintf(\"Failed to init %s loader: %d\\n\", devtype, ret);\n+\t\treturn ret;\n+\t}\n+\n+\treturn 2; /* consumed: keyword + device-spec */\n+}\n+#endif\n+\n int do_bootm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])\n {\n \tstruct bootm_info bmi;\n \tint ret;\n+#if IS_ENABLED(CONFIG_BOOTM_STORAGE)\n+\tstruct image_loader ldr = {};\n+\tconst char *conf_name = NULL;\n+\tint consumed = 0;\n+#endif\n \n \t/* determine if we have a sub command */\n \targc--; argv++;\n+\n+#if IS_ENABLED(CONFIG_BOOTM_STORAGE)\n+\t/* Try storage device spec before checking for hex/subcommand */\n+\tconsumed = bootm_init_loader(&ldr, argc, argv, &conf_name);\n+\tif (consumed < 0)\n+\t\treturn CMD_RET_FAILURE;\n+\tif (consumed > 0) {\n+\t\tldr.alloc_ptr = image_load_addr;\n+\t\targc -= consumed;\n+\t\targv += consumed;\n+\t}\n+#endif\n+\n+#if IS_ENABLED(CONFIG_BOOTM_STORAGE)\n+\tif (argc > 0 && !consumed) {\n+#else\n \tif (argc > 0) {\n+#endif\n \t\tchar *endp;\n \n \t\thextoul(argv[0], &endp);\n@@ -156,12 +266,25 @@ int do_bootm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])\n \t}\n \n \tbootm_init(&bmi);\n-\tif (argc)\n-\t\tbmi.addr_img = argv[0];\n-\tif (argc > 1)\n-\t\tbmi.conf_ramdisk = argv[1];\n-\tif (argc > 2)\n-\t\tbmi.conf_fdt = argv[2];\n+#if IS_ENABLED(CONFIG_BOOTM_STORAGE)\n+\tif (consumed > 0) {\n+\t\tbmi.addr_img = conf_name;\t/* \"#config-1\" or NULL */\n+\t\tbmi.loader = &ldr;\n+\t\tif (argc > 0)\n+\t\t\tbmi.conf_ramdisk = argv[0];\n+\t\tif (argc > 1)\n+\t\t\tbmi.conf_fdt = argv[1];\n+\t} else {\n+#else\n+\t{\n+#endif\n+\t\tif (argc)\n+\t\t\tbmi.addr_img = argv[0];\n+\t\tif (argc > 1)\n+\t\t\tbmi.conf_ramdisk = argv[1];\n+\t\tif (argc > 2)\n+\t\t\tbmi.conf_fdt = argv[2];\n+\t}\n \n \t/* set up argc and argv[] since some OSes use them */\n \tbmi.argc = argc;\n@@ -169,6 +292,11 @@ int do_bootm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])\n \n \tret = bootm_run(&bmi);\n \n+#if IS_ENABLED(CONFIG_BOOTM_STORAGE)\n+\tif (ldr.read)\n+\t\timage_loader_cleanup(&ldr);\n+#endif\n+\n \treturn ret ? CMD_RET_FAILURE : 0;\n }\n \n@@ -204,6 +332,14 @@ U_BOOT_LONGHELP(bootm,\n \t\"\\taddr#<conf_uname> - configuration specification\\n\"\n \t\"\\tUse iminfo command to get the list of existing component\\n\"\n \t\"\\timages and configurations.\\n\"\n+#endif\n+#if IS_ENABLED(CONFIG_BOOTM_STORAGE)\n+\t\"\\nAlternatively, boot directly from a storage device:\\n\"\n+\t\"\\tbootm mmc <dev>:<part>[#conf] - boot from MMC/SD partition\\n\"\n+\t\"\\tbootm mtd <name>[#conf] - boot from MTD partition\\n\"\n+\t\"\\tbootm ubi <volume>[#conf] - boot from UBI volume\\n\"\n+\t\"\\tThe #conf suffix selects a FIT configuration; additional\\n\"\n+\t\"\\t#overlay suffixes select device-tree overlays.\\n\"\n #endif\n \t\"\\nSub-commands to do part of the bootm sequence. The sub-commands \"\n \t\"must be\\n\"\ndiff --git a/include/bootm.h b/include/bootm.h\nindex 4060cec7fc0..ebc014b3468 100644\n--- a/include/bootm.h\n+++ b/include/bootm.h\n@@ -40,6 +40,7 @@ struct cmd_tbl;\n *\tboot_get_fdt() for processing, or NULL for none\n * @boot_progress: true to show boot progress\n * @images: images information\n+ * @loader: image loader for storage-backed boot (NULL for in-memory)\n * @cmd_name: command which invoked this operation, e.g. \"bootm\"\n * @argc: Number of arguments to the command (excluding the actual command).\n *\tThis is 0 if there are no arguments\n@@ -51,6 +52,7 @@ struct bootm_info {\n \tconst char *conf_fdt;\n \tbool boot_progress;\n \tstruct bootm_headers *images;\n+\tstruct image_loader *loader;\n \tconst char *cmd_name;\n \tint argc;\n \tchar *const *argv;\n", "prefixes": [ "RFC", "10/20" ] }