Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2218759/?format=api
{ "id": 2218759, "url": "http://patchwork.ozlabs.org/api/patches/2218759/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260401-cmdline-v1-1-c56577f82960@missingno.tech/", "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": "<20260401-cmdline-v1-1-c56577f82960@missingno.tech>", "list_archive_url": null, "date": "2026-04-01T20:52:14", "name": "arch/x86/lib: implement cmdline configuration property", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "62f65df07d2b0cab9727fad2098dbc9ce56f650c", "submitter": { "id": 91669, "url": "http://patchwork.ozlabs.org/api/people/91669/?format=api", "name": "Guillaume Ranquet", "email": "ranquet.guillaume@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260401-cmdline-v1-1-c56577f82960@missingno.tech/mbox/", "series": [ { "id": 498391, "url": "http://patchwork.ozlabs.org/api/series/498391/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=498391", "date": "2026-04-01T20:52:14", "name": "arch/x86/lib: implement cmdline configuration property", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/498391/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2218759/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2218759/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\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=iDYcDYCI;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.b=\"iDYcDYCI\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=ranquet.guillaume@gmail.com" ], "Received": [ "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\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 4fmHHR1SqZz1yFv\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 02 Apr 2026 07:52:35 +1100 (AEDT)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id E5FE683CE3;\n\tWed, 1 Apr 2026 22:52:31 +0200 (CEST)", "by phobos.denx.de (Postfix, from userid 109)\n id 9990683CF5; Wed, 1 Apr 2026 22:52:30 +0200 (CEST)", "from mail-wm1-x333.google.com (mail-wm1-x333.google.com\n [IPv6:2a00:1450:4864:20::333])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 2578080517\n for <u-boot@lists.denx.de>; Wed, 1 Apr 2026 22:52:28 +0200 (CEST)", "by mail-wm1-x333.google.com with SMTP id\n 5b1f17b1804b1-48700b1ba53so1263325e9.1\n for <u-boot@lists.denx.de>; Wed, 01 Apr 2026 13:52:28 -0700 (PDT)", "from [192.168.0.79]\n (laubervilliers-659-1-61-87.w80-13.abo.wanadoo.fr. [80.13.212.87])\n by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-4888a65635fsm21452495e9.6.2026.04.01.13.52.25\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 01 Apr 2026 13:52:26 -0700 (PDT)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_GMAIL_RCVD,FREEMAIL_FROM,\n RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=no\n autolearn_force=no version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1775076747; x=1775681547; darn=lists.denx.de;\n h=cc:to:message-id:content-transfer-encoding:mime-version:subject\n :date:from:from:to:cc:subject:date:message-id:reply-to;\n bh=mTvpG8LYIXXSVhHeODA+65zIP4xMqzrXDbYVGAmkw3I=;\n b=iDYcDYCI+Vw5JOqcnawE4OeIT75oDPVs0pHvAvP5lVlYaiJwY3yt7ajkIokXZI30so\n MrO4ESu4jDrx9Q9AH2yR/vDF6LfvFrmRGM+fpPlDpdoCXNUtVMYHSCrXn3NojvNzWuq0\n c2rXaqi19WDTcjWosh1JFLDv+x5EdoYh9ulYGyB4KH+vn+eUcZpQG7pB+eu9EqoQjT1b\n FnKwDuK5utgmqfqk8pSpEpTQ9g3l1bWeH59Kfg6SX2DEmS+74XI+i0ZTCOSu6hscnKfb\n PSCiI/YyO3bbQDZx38Gd+csQ3ch6BxiWgxL8ShYJBWy8Db/bLps7mEKOOE938Kwr5jM+\n XdXg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775076747; x=1775681547;\n h=cc:to:message-id:content-transfer-encoding:mime-version:subject\n :date:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=mTvpG8LYIXXSVhHeODA+65zIP4xMqzrXDbYVGAmkw3I=;\n b=BsbhSPU/Rber0K8Q9Fj62E8GR5WKmuRuVPLC1g7YmYp2uomBs8QgIMYfZyl0X+Ulhg\n IzXHEvHcs1EHT22aJZ56k1Wpuj4TmNH7rJj9JFupPscn2WEgGnf6JRXHh8tyNDc3/npK\n 2q/glfblXxsEKnlhm6sO4FN3ZVvKGQgM6yq7xkOKYmb1hU+4YS9bor32Ua62CfHMZad8\n th3s48rZilmA6rXd7Yi8mLcOtH9zE+WNRGog3JhfSlCiAmYz49vMqGMt6CKfE/STHysq\n ldRXIgO8XK+i0rtmnJoooptuKuv8k2jsU3Fd1ao/H4VoFn/o9HfC6xubpL2LOwKSctwt\n Aymw==", "X-Gm-Message-State": "AOJu0YwbvaxDYvLytsADi1Qvcxvh2qRNd4WAqgfAC8/olxcxA6eIm0eP\n cNOlz5cR8+m/dPwJ68R6YsLRZjfR4vsgv+AHPvhe1GAd63EBcFKGGt3D", "X-Gm-Gg": "ATEYQzxGrFLDZ3Z8MDOzBdqoPQxgffwZENE96YPEzNMmXO67PpdvAXE13ST3IZNA/TB\n qkAoDvfWM2/CEpQXTge1xPyaOGwJ/9Yitd6alpLm/pOkkY4QYXwzta3Dul27NH3xWaV47p/5rwG\n eBJYMkbMvldFk3jmUUTUYTbYqJ2nzh7BN3Pf7QLT7NaGDeSDknTRyY7Aqlpuou+A4Ok+zDKWj/X\n teixh06mgvcqKvOYP5Yrgat4ex2MIwBtvI6ksQjyFJrClISVQbVzADTdxt7I+qdA8ixolDkFl5U\n lSxM2eilcpvbPb2d9p8fkljb7PiiKrQ4VrQbep0ndZ3FcifecXycQx/TkQ0ehuztSWi78yYyCf6\n jihvN98026g/Nc7uNJEinfHDYJIn3t8uda6VfzMtTdJWjqX+e7rPRviLDrXKAlpJV3EwvPlKkY4\n bS6ihSPonkloemNnKH+8Xj7Bw+k2pEPsbMJk5kJd20lBiJ7F+vntVbYyRLWnVkM9+0+UMc76RWB\n bZ4lA+lPR069g==", "X-Received": "by 2002:a05:600c:a16:b0:480:3ad0:93bf with SMTP id\n 5b1f17b1804b1-4888359ddf2mr85461895e9.24.1775076746940;\n Wed, 01 Apr 2026 13:52:26 -0700 (PDT)", "From": "Guillaume Ranquet <ranquet.guillaume@gmail.com>", "X-Google-Original-From": "Guillaume Ranquet <granquet@missingno.tech>", "Date": "Wed, 01 Apr 2026 22:52:14 +0200", "Subject": "[PATCH] arch/x86/lib: implement cmdline configuration property", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "Message-Id": "<20260401-cmdline-v1-1-c56577f82960@missingno.tech>", "X-B4-Tracking": "v=1; b=H4sIAAAAAAAC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE\n vPSU3UzU4B8JSMDIzMDEwND3eTclJzMvFTdxCRLU5NEk1QLCyMLJaDqgqLUtMwKsEnRsbW1AM7\n GSS5ZAAAA", "X-Change-ID": "20260401-cmdline-ab954a4e8828", "To": "u-boot@lists.denx.de", "Cc": "Simon Glass <sjg@chromium.org>, Bin Meng <bmeng.cn@gmail.com>,\n Tom Rini <trini@konsulko.com>,\n Jeremy Compostella <jeremy.compostella@intel.com>,\n Peng Fan <peng.fan@nxp.com>, Yao Zi <me@ziyao.cc>,\n Patrice Chotard <patrice.chotard@foss.st.com>,\n Quentin Schulz <quentin.schulz@cherry.de>,\n Marek Vasut <marek.vasut+renesas@mailbox.org>,\n James Hilliard <james.hilliard1@gmail.com>,\n Heinrich Schuchardt <xypron.glpk@gmx.de>,\n Frank Wunderlich <frank-w@public-files.de>,\n Mayuresh Chitale <mchitale@ventanamicro.com>,\n Neil Armstrong <neil.armstrong@linaro.org>,\n Shiji Yang <yangshiji66@outlook.com>, Jonas Karlman <jonas@kwiboo.se>,\n Wolfgang Wallner <wolfgang.wallner@at.abb.com>,\n Guillaume Ranquet <granquet@missingno.tech>", "X-Mailer": "b4 0.14.2", "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 the cmdline configuration property as described in the spec\n[1]\n\n[1]: https://fitspec.osfw.foundation/#id10\n\nSigned-off-by: Guillaume Ranquet <granquet@missingno.tech>\n---\n arch/x86/include/asm/zimage.h | 2 +-\n arch/x86/lib/bootm.c | 10 +++++++++-\n arch/x86/lib/zimage.c | 4 ++--\n boot/image-fit.c | 30 +++++++++++++++++++++++++++++-\n include/image.h | 3 +++\n 5 files changed, 44 insertions(+), 5 deletions(-)\n\n\n---\nbase-commit: 98cf83d81617f489d7ff7bf78d33e693e2799254\nchange-id: 20260401-cmdline-ab954a4e8828\n\nBest regards,", "diff": "diff --git a/arch/x86/include/asm/zimage.h b/arch/x86/include/asm/zimage.h\nindex 8b5426051701c8266395afd9232eb1ff30d38304..bbcfa993761510e88610574c1c0debff519089a2 100644\n--- a/arch/x86/include/asm/zimage.h\n+++ b/arch/x86/include/asm/zimage.h\n@@ -132,7 +132,7 @@ struct boot_params *load_zimage(char *image, unsigned long kernel_size,\n * Return: 0 (always)\n */\n int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot,\n-\t\t ulong initrd_addr, ulong initrd_size, ulong cmdline_force);\n+\t\t ulong initrd_addr, ulong initrd_size, char *cmdline_force);\n \n /**\n * zboot_start() - Prepare to boot a zimage\ndiff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c\nindex cde4fbf35574a267b856a668659ece7e0a36367f..e029cc1ff18bd53eb873c0e56fd9d3b0a331b4c2 100644\n--- a/arch/x86/lib/bootm.c\n+++ b/arch/x86/lib/bootm.c\n@@ -61,6 +61,7 @@ int arch_fixup_memory_node(void *blob)\n static int boot_prep_linux(struct bootm_headers *images)\n {\n \tchar *cmd_line_dest = NULL;\n+\tconst char *cmd_line_override = NULL;\n \tstruct legacy_img_hdr *hdr;\n \tint is_zimage = 0;\n \tvoid *data = NULL;\n@@ -99,6 +100,13 @@ static int boot_prep_linux(struct bootm_headers *images)\n \t\t\tputs(\"Can't get image data/size!\\n\");\n \t\t\tgoto error;\n \t\t}\n+\n+\t\tret = fit_image_get_cmdline(images->fit_hdr_os,\n+\t\t\t\t\t images->fit_noffset_cfg,\n+\t\t\t\t\t &cmd_line_override);\n+\t\tif (ret)\n+\t\t\tdebug(\"unable to retrieve cmdline for zimage\\n\");\n+\n \t\tis_zimage = 1;\n #endif\n \t}\n@@ -125,7 +133,7 @@ static int boot_prep_linux(struct bootm_headers *images)\n \tprintf(\"Setup at %#08lx\\n\", images->ep);\n \tret = setup_zimage((void *)images->ep, cmd_line_dest,\n \t\t\t0, images->rd_start,\n-\t\t\timages->rd_end - images->rd_start, 0);\n+\t\t\timages->rd_end - images->rd_start, cmd_line_override);\n \n \tif (ret) {\n \t\tprintf(\"## Setting up boot parameters failed ...\\n\");\ndiff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c\nindex a5f2231aa523356de93368338b5fd249b8abad6e..78e4a0df89157b1cfc612ff69c533b7a1c1d6405 100644\n--- a/arch/x86/lib/zimage.c\n+++ b/arch/x86/lib/zimage.c\n@@ -276,7 +276,7 @@ struct boot_params *load_zimage(char *image, unsigned long kernel_size,\n }\n \n int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot,\n-\t\t ulong initrd_addr, ulong initrd_size, ulong cmdline_force)\n+\t\t ulong initrd_addr, ulong initrd_size, char *cmdline_force)\n {\n \tstruct setup_header *hdr = &setup_base->hdr;\n \tint bootproto = get_boot_protocol(hdr, false);\n@@ -333,7 +333,7 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot,\n \n \t\t/* build command line at COMMAND_LINE_OFFSET */\n \t\tif (cmdline_force)\n-\t\t\tstrcpy(cmd_line, (char *)cmdline_force);\n+\t\t\tstrcpy(cmd_line, cmdline_force);\n \t\telse\n \t\t\tbuild_command_line(cmd_line, auto_boot);\n \t\tif (IS_ENABLED(CONFIG_CMD_BOOTM)) {\ndiff --git a/boot/image-fit.c b/boot/image-fit.c\nindex e7c7212195f4a291e26ed6d3440a1b42274dacab..5933c451011cfaf644b4422bc89c1e56cdbbd595 100644\n--- a/boot/image-fit.c\n+++ b/boot/image-fit.c\n@@ -1096,6 +1096,32 @@ int fit_image_get_data(const void *fit, int noffset, const void **data,\n \treturn ret;\n }\n \n+/**\n+ * fit_image_get_cmdline - get image configuration command line\n+ * @fit: pointer to the FIT format image header\n+ * @cfg_noffset: configuration node offset\n+ * @cmdline: double pointer to char, will hold pointer to the cmdline\n+ *\n+ * fit_image_get_cmdline() gets the cmdline from the configuration node.\n+ * If the property is found its data start address is returned to the caller.\n+ *\n+ * returns:\n+ * 0, on success\n+ * -1, on failure\n+ */\n+int fit_image_get_cmdline(const void *fit, int noffset, const char **cmdline)\n+{\n+\tint len;\n+\n+\t*cmdline = (const char *)fdt_getprop(fit, noffset, FIT_CMDLINE, &len);\n+\tif (!cmdline) {\n+\t\tfit_get_debug(fit, noffset, FIT_CMDLINE, len);\n+\t\treturn -1;\n+\t}\n+\n+\treturn 0;\n+}\n+\n /**\n * fit_image_hash_get_algo - get hash algorithm name\n * @fit: pointer to the FIT format image header\n@@ -2136,8 +2162,10 @@ int fit_image_load(struct bootm_headers *images, ulong addr,\n \t\tfit_base_uname_config = fdt_get_name(fit, cfg_noffset, NULL);\n \t\tprintf(\" Using '%s' configuration\\n\", fit_base_uname_config);\n \t\t/* Remember this config */\n-\t\tif (image_type == IH_TYPE_KERNEL)\n+\t\tif (image_type == IH_TYPE_KERNEL) {\n \t\t\timages->fit_uname_cfg = fit_base_uname_config;\n+\t\t\timages->fit_noffset_cfg = cfg_noffset;\n+\t\t}\n \n \t\tif (FIT_IMAGE_ENABLE_VERIFY && images->verify) {\n \t\t\tputs(\" Verifying Hash Integrity ... \");\ndiff --git a/include/image.h b/include/image.h\nindex 34efac6056dd29307df359dce21e4f94d5fcbf2d..793455d39683c1c63f5dc5e87a91d08a10cdb141 100644\n--- a/include/image.h\n+++ b/include/image.h\n@@ -365,6 +365,7 @@ struct bootm_headers {\n \t * format, even for SPL, this extra data size seems worth it.\n \t */\n \tconst char\t*fit_uname_cfg;\t/* configuration node unit name */\n+\tint\t\tfit_noffset_cfg;\t/* os subimage node offset */\n \n \tvoid\t\t*fit_hdr_os;\t/* os FIT image header */\n \tconst char\t*fit_uname_os;\t/* os subimage node unit name */\n@@ -1108,6 +1109,7 @@ int booti_setup(ulong image, ulong *relocated_addr, ulong *size,\n #define FIT_TFA_BL31_PROP\t\"tfa-bl31\"\n #define FIT_TEE_PROP\t\t\"tee\"\n #define FIT_COMPAT_PROP\t\t\"compatible\"\n+#define FIT_CMDLINE\t\t\t\"cmdline\"\n \n #define FIT_MAX_HASH_LEN\tHASH_MAX_DIGEST_SIZE\n \n@@ -1259,6 +1261,7 @@ int fit_get_data_node(const void *fit, const char *image_uname,\n int fit_get_data_conf_prop(const void *fit, const char *prop_name,\n \t\t\t const void **data, size_t *size);\n \n+int fit_image_get_cmdline(const void *fit, int noffset, const char **cmdline);\n int fit_image_hash_get_algo(const void *fit, int noffset, const char **algo);\n int fit_image_hash_get_value(const void *fit, int noffset, uint8_t **value,\n \t\t\t\tint *value_len);\n", "prefixes": [] }