get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2196496/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2196496,
    "url": "http://patchwork.ozlabs.org/api/patches/2196496/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260214045703.28051-8-hs@nabladev.com/",
    "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": "<20260214045703.28051-8-hs@nabladev.com>",
    "list_archive_url": null,
    "date": "2026-02-14T04:56:59",
    "name": "[v2,07/11] siemens: capricorn: add logic to U-Boot to avoid zig-zag boot",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "2c45b6e4d3646c76f8c41d2ab4ecd6e12f5ed4d1",
    "submitter": {
        "id": 91409,
        "url": "http://patchwork.ozlabs.org/api/people/91409/?format=api",
        "name": "Heiko Schocher",
        "email": "hs@nabladev.com"
    },
    "delegate": {
        "id": 151988,
        "url": "http://patchwork.ozlabs.org/api/users/151988/?format=api",
        "username": "festevam",
        "first_name": "Fabio",
        "last_name": "Estevam",
        "email": "festevam@gmail.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260214045703.28051-8-hs@nabladev.com/mbox/",
    "series": [
        {
            "id": 492160,
            "url": "http://patchwork.ozlabs.org/api/series/492160/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=492160",
            "date": "2026-02-14T04:56:52",
            "name": "imx8qxp: siemens: small board updates",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/492160/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2196496/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2196496/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=nabladev.com header.i=@nabladev.com header.a=rsa-sha256\n header.s=dkim header.b=G2do7eD2;\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=reject dis=none) header.from=nabladev.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=nabladev.com header.i=@nabladev.com\n header.b=\"G2do7eD2\";\n\tdkim-atps=neutral",
            "phobos.denx.de; dmarc=pass (p=reject dis=none)\n header.from=nabladev.com",
            "phobos.denx.de; spf=pass smtp.mailfrom=hs@nabladev.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 4fCcHV3DThz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 14 Feb 2026 15:58:14 +1100 (AEDT)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 9BDEA83E8E;\n\tSat, 14 Feb 2026 05:57:18 +0100 (CET)",
            "by phobos.denx.de (Postfix, from userid 109)\n id EC8E683EA6; Sat, 14 Feb 2026 05:57:16 +0100 (CET)",
            "from mx.nabladev.com (mx.nabladev.com [178.251.229.89])\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 F2A1D83E13\n for <u-boot@lists.denx.de>; Sat, 14 Feb 2026 05:57:14 +0100 (CET)",
            "from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon)\n with ESMTPSA id 0FE781101C5; Sat, 14 Feb 2026 05:57:14 +0100 (CET)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,\n SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=nabladev.com;\n s=dkim; t=1771045034; h=from:subject:date:message-id:to:cc:mime-version:\n content-transfer-encoding:in-reply-to:references;\n bh=UCRHwP3OvsTVM0LUBmaiwt7rQ4ghme3XiUdnHY7P32U=;\n b=G2do7eD2qkj/acKL0q4PysYr1btCMzfqR/k5BD5CVXchkMo5Rp8gG9JgHmAOcYtb93ACZB\n 1I7NXTDFxQzET3XFUwWsxlsmvDKXedoRtBUCHObVycqfZElyzUs0bKW4FdSLCHhC5+MkGG\n LKq0OR95JNfKDqf2r8l64Q36oEvRScozo/7lE/tXfjLNuWUwUlfNJLFyjWkhh+zg3ki6Sv\n 0xkqMNXIoe4Q0LdR5tv5GE2ksmbmMHEXwATZDSdVYZ9hK7NJAT6hGiZ1e+ljwf3Am05oA3\n +V9J7KJ+VibWmybRCYxSiR7JeW+bemh6PbXalaZ4ld7b7I9pSGHsk/cby4KPew==",
        "From": "Heiko Schocher <hs@nabladev.com>",
        "To": "U-Boot Mailing List <u-boot@lists.denx.de>",
        "Cc": "Fabio Estevam <festevam@gmail.com>, Peng Fan <peng.fan@oss.nxp.com>,\n Heiko Schocher <hs@nabladev.com>,\n Walter Schweizer <walter.schweizer@siemens.com>,\n Peng Fan <peng.fan@nxp.com>,\n Alexander Sverdlin <alexander.sverdlin@siemens.com>,\n Tom Rini <trini@konsulko.com>",
        "Subject": "[PATCH v2 07/11] siemens: capricorn: add logic to U-Boot to avoid\n zig-zag boot",
        "Date": "Sat, 14 Feb 2026 05:56:59 +0100",
        "Message-Id": "<20260214045703.28051-8-hs@nabladev.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20260214045703.28051-1-hs@nabladev.com>",
        "References": "<20260214045703.28051-1-hs@nabladev.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Last-TLS-Session-Version": "TLSv1.3",
        "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": "add logic in board code for detecting the real boot\npartition and set a local hush shell variable fallback\nwhich can be used later in boot variables for detecting\na ROM bootloader fallback case.\n\nWe use the local hush shell variable, as we do not want\nto save in any case the fallback variable in U-Boot\nEnvironment, as the default Environment is maybe saved\nin boards, which are downgraded to older U-Boot versions.\n\nAnd than the board code does not run, and fallback never\ngets the correct value.\n\nIntroduce also hush shell variable envvers to value \"v2_\"\nso we can use them in Environment for running different\nversions of variables between new and old U-Boot images.\n\nSigned-off-by: Heiko Schocher <hs@nabladev.com>\nSigned-off-by: Walter Schweizer <walter.schweizer@siemens.com>\nReviewed-by: Peng Fan <peng.fan@nxp.com>\n\n---\n\nChanges in v2:\nAdded Reviewed-by from Peng\nfixed typos in commit message and board code\n\n board/siemens/capricorn/Kconfig |  2 ++\n board/siemens/capricorn/board.c | 43 +++++++++++++++++++++++++++------\n 2 files changed, 37 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/board/siemens/capricorn/Kconfig b/board/siemens/capricorn/Kconfig\nindex fe230971e97..d6d1aad75b2 100644\n--- a/board/siemens/capricorn/Kconfig\n+++ b/board/siemens/capricorn/Kconfig\n@@ -1,5 +1,7 @@\n if TARGET_CAPRICORN\n \n+config HUSH_INIT_VAR\n+\tdef_bool y\n \n config SYS_BOARD\n \tdefault \"capricorn\"\ndiff --git a/board/siemens/capricorn/board.c b/board/siemens/capricorn/board.c\nindex 390a7b0d841..34e7f2d1713 100644\n--- a/board/siemens/capricorn/board.c\n+++ b/board/siemens/capricorn/board.c\n@@ -5,6 +5,7 @@\n  * Copyright 2019 Siemens AG\n  *\n  */\n+#include <cli_hush.h>\n #include <command.h>\n #include <dm.h>\n #include <env.h>\n@@ -29,6 +30,7 @@\n #include \"../common/board.h\"\n #include \"../common/eeprom.h\"\n #include \"../common/factoryset.h\"\n+#include <firmware/imx/sci/sci.h>\n \n #define GPIO_PAD_CTRL \\\n \t\t((SC_PAD_CONFIG_NORMAL << PADRING_CONFIG_SHIFT) | \\\n@@ -373,23 +375,48 @@ __weak int mmc_map_to_kernel_blk(int dev_no)\n \n void board_late_mmc_env_init(void)\n {\n-\tchar cmd[32];\n-\tchar mmcblk[32];\n \tu32 dev_no = mmc_get_env_dev();\n \n \tif (!check_mmc_autodetect())\n \t\treturn;\n \n \tenv_set_ulong(\"mmcdev\", dev_no);\n+}\n+\n+#if defined(CONFIG_HUSH_INIT_VAR)\n+int hush_init_var(void)\n+{\n+\tsc_misc_bt_t boot_type;\n \n-\t/* Set mmcblk env */\n-\tsprintf(mmcblk, \"/dev/mmcblk%dp2 rootwait rw\",\n-\t\tmmc_map_to_kernel_blk(dev_no));\n-\tenv_set(\"mmcroot\", mmcblk);\n+\tif (sc_misc_get_boot_type(-1, &boot_type) != 0) {\n+\t\tputs(\"boottype cannot be retrieved\\n\");\n+\t\treturn 0;\n+\t}\n+\n+\t/*\n+\t * Set here explicitly a hush shell variable, so if a saveenv\n+\t * happens, this variable is *not* saved in U-Boot environment.\n+\t *\n+\t * This is for devices which are already in the field essential,\n+\t * as if such a device breaks, the cutsomer gets a new device\n+\t * with a new U-Boot version (and so a new U-Boot environment).\n+\t *\n+\t * But the customer makes a downgrade to an older U-Boot version,\n+\t * which does not have this code in, and runs now with a new\n+\t * U-Boot Environment (yes, protected Environment is not enabled\n+\t * there) and the old U-Boot must still work with the new U-Boot\n+\t * Environment. So we cannot store this variable in U-Boot\n+\t * Environment as a stored value will in this case never be over-\n+\t * written.\n+\t */\n+\tif (boot_type == 1) {\n+\t\tprintf(\"boot-container fallback ocured\\n\");\n+\t\tset_local_var(\"fallback=1\", 0);\n+\t}\n \n-\tsprintf(cmd, \"mmc dev %d\", dev_no);\n-\trun_command(cmd, 0);\n+\treturn 0;\n }\n+#endif\n \n #ifndef CONFIG_XPL_BUILD\n static int load_parameters_from_factoryset(void)\n",
    "prefixes": [
        "v2",
        "07/11"
    ]
}