get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2175515,
    "url": "http://patchwork.ozlabs.org/api/1.0/patches/2175515/?format=api",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/1.0/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
    },
    "msgid": "<20251218-bootconfig-v4-1-5bbbdb0be1dc@baylibre.com>",
    "date": "2025-12-18T11:16:56",
    "name": "[v4,1/5] boot: android: import addBootConfigParameters() from AOSP",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "2e1001e84f92bab27db2bb53f19f9437c98a393a",
    "submitter": {
        "id": 76253,
        "url": "http://patchwork.ozlabs.org/api/1.0/people/76253/?format=api",
        "name": "Guillaume La Roque",
        "email": "glaroque@baylibre.com"
    },
    "delegate": {
        "id": 117687,
        "url": "http://patchwork.ozlabs.org/api/1.0/users/117687/?format=api",
        "username": "mkorpershoek",
        "first_name": "Mattijs",
        "last_name": "Korpershoek",
        "email": "mkorpershoek@baylibre.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20251218-bootconfig-v4-1-5bbbdb0be1dc@baylibre.com/mbox/",
    "series": [
        {
            "id": 485825,
            "url": "http://patchwork.ozlabs.org/api/1.0/series/485825/?format=api",
            "date": "2025-12-18T11:16:55",
            "name": "android: add bootconfig support",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/485825/mbox/"
        }
    ],
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2175515/checks/",
    "tags": {},
    "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=baylibre-com.20230601.gappssmtp.com\n header.i=@baylibre-com.20230601.gappssmtp.com header.a=rsa-sha256\n header.s=20230601 header.b=ADxTlezV;\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=none (p=none dis=none) header.from=baylibre.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=baylibre-com.20230601.gappssmtp.com\n header.i=@baylibre-com.20230601.gappssmtp.com header.b=\"ADxTlezV\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=none (p=none dis=none) header.from=baylibre.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=glaroque@baylibre.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 4dX7Rl3dypz1y2F\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 18 Dec 2025 22:17:23 +1100 (AEDT)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 238C483D90;\n\tThu, 18 Dec 2025 12:17:12 +0100 (CET)",
            "by phobos.denx.de (Postfix, from userid 109)\n id 9B03F83D7D; Thu, 18 Dec 2025 12:17:10 +0100 (CET)",
            "from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com\n [IPv6:2a00:1450:4864:20::32a])\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 6483083D5D\n for <u-boot@lists.denx.de>; Thu, 18 Dec 2025 12:17:08 +0100 (CET)",
            "by mail-wm1-x32a.google.com with SMTP id\n 5b1f17b1804b1-477aa218f20so3205675e9.0\n for <u-boot@lists.denx.de>; Thu, 18 Dec 2025 03:17:08 -0800 (PST)",
            "from [127.0.1.1] ([2a01:e0a:e50:3860:3734:1277:36b8:3f57])\n by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-47be273f147sm38070965e9.7.2025.12.18.03.17.06\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 18 Dec 2025 03:17:07 -0800 (PST)"
        ],
        "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,DKIM_SIGNED,\n DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1766056628;\n x=1766661428;\n darn=lists.denx.de;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:from:to:cc:subject:date:message-id\n :reply-to; bh=iOS1PwKT5itepea3GYG5T44wIDCrH7yebLi8XT5FfD0=;\n b=ADxTlezV/LfbfZw4O7Q10mzSpin0ISSok7Bjn1Fhdi1LatZiLeLAEMdDgKXAybur92\n iUyJKKOJQC0PqbQQcx1NsfjBdlV+CbEi8dvfHMKuPMCfp1l57L9U0QHiY+ic0IAV4xVd\n U8F6Y7rFYwFkCMS5el6rbRJzl3XF2u8a+Y7s/y/MAewZArtVwG49akJPU9STm+cpuqs6\n S9uh+Uws76D1FfLYtl/3+ZfWl00sLOeOhCRjH2lmJnffkXa+NvG2DWdyPNeAPlLKKyWM\n XnaqEx2sx3+WE5fY3xhBdoNBrPYqweLAGFThwOJlE6+lL+7EfG7YSBXi0KLKiC8Ibw0m\n w/Yw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1766056628; x=1766661428;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=iOS1PwKT5itepea3GYG5T44wIDCrH7yebLi8XT5FfD0=;\n b=GZ4BKwTEDrnt+V2SS3WsZa8qANUmivPadiXvBROUOxsBSWK8VYmXZ0T3MjV1dbLdtd\n JY77Asht/nv0lwaNB1Fi7EyzDanStoz8QsEVM06f61froZXdTERXmNPR0CeQbi5og2ul\n A8aZWNl++OpVhyd5rrOIXtaHF6udojLeZVOd5nk+WwL8mEukz6V+O7LidGOhVvU6Xxl+\n NorbmaPSTqaIFs08Ifw29f0wbwbgi6/XKnpg0nkMaYQygD1GWQm8vzB2Q16Wg8Jct9Rm\n 10BrDTcmbYO6CDt841V4NcVCpYkId7CABENif5nDgE84/Ceq+RGa0oT2SPu9ickKEJrq\n b8Ww==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCUO83BbNuKuTiRqDD3G2R9r75eoBYCr3XVJdY+FIV/JDj4UqbgcG1IpGlmYMcctQeyvySluaTU=@lists.denx.de",
        "X-Gm-Message-State": "AOJu0YyB7sT+n05nZzLqGb8P7YxcZNCAvpcPAZE3K+zzctDNXrMrc2JP\n 5eiQavXKKl2GSuvHB5Pz2SoflXb4y1WAe0n+gbSSPe9D85sUKmAgmREFz4WvfIdYMWk=",
        "X-Gm-Gg": "AY/fxX5LrRlmx+HBE7nf+eGttfcprNMUE835zvjPUUkIhWNKmE8Mva88x7vgQNSv7up\n j15BAhv6ONujRoILuoJUKwN8DEp7EwJwcGryfAMpzNODFOfFW3nIhW0GP8/ChTc+lnYke5+WBJt\n I2MkEFa/rh4xja28DIVWbCy/AU+nwepZreAlx/1+i4DM7fqLZ0jagVEmPR9S2kYDeaSy0HnnU4z\n b4G0MnTFgCQ5nmkOg0WGR8xlutUILSsuxMeuoc4w7YmknQneqCr1DQLqeBBEQhJFzZ5itQNZJzD\n OBHxjPPbEBKZn+E2TnSQcnkSDoWanzxiXw7Z9D2piYEpwznMo6NPMjVeChl5cdBJNnGoqZWWKcn\n iV1XVXxfCJGmTd4xAnTiSy9LoqdE/4p/U0sQBVluU8faXQ5ub/1l66rn0MYQPRpPPqwBl/FLOA9\n IiQtBBTKEM5Y9/Mw==",
        "X-Google-Smtp-Source": "\n AGHT+IFGZZ3qkyY5bzjETN8XtTIR8qE64bReFNxqwQl07vmnJEJzQd/brWMMiAkS8UsJ5c/7G8WYfg==",
        "X-Received": "by 2002:a05:600c:8b71:b0:479:35e7:a0e3 with SMTP id\n 5b1f17b1804b1-47a8f90dc36mr213442365e9.30.1766056627748;\n Thu, 18 Dec 2025 03:17:07 -0800 (PST)",
        "From": "\"Guillaume La Roque (TI.com)\" <glaroque@baylibre.com>",
        "Date": "Thu, 18 Dec 2025 12:16:56 +0100",
        "Subject": "[PATCH v4 1/5] boot: android: import addBootConfigParameters()\n from AOSP",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Message-Id": "<20251218-bootconfig-v4-1-5bbbdb0be1dc@baylibre.com>",
        "References": "<20251218-bootconfig-v4-0-5bbbdb0be1dc@baylibre.com>",
        "In-Reply-To": "<20251218-bootconfig-v4-0-5bbbdb0be1dc@baylibre.com>",
        "To": "Tom Rini <trini@konsulko.com>,\n Mattijs Korpershoek <mkorpershoek@kernel.org>",
        "Cc": "Julien Masson <jmasson@baylibre.com>,\n Guillaume La Roque <glaroque@baylibre.com>, u-boot@lists.denx.de,\n Simon Glass <sjg@chromium.org>, Nicolas Belin <nbelin@baylibre.com>,\n Neil Armstrong <neil.armstrong@linaro.org>,\n Andrew Goodbody <andrew.goodbody@linaro.org>,\n Aaron Kling <webgeek1234@gmail.com>, George Chan <gchan9527@gmail.com>,\n Sam Day <me@samcday.com>, Jerome Forissier <jerome.forissier@linaro.org>,\n Maxime Fournier <mfournier@baylibre.com>, Eddie Kovsky <ekovsky@redhat.com>,\n Casey Connolly <casey.connolly@linaro.org>,\n Guillaume Ranquet <ranquet.guillaume@gmail.com>",
        "X-Mailer": "b4 0.14.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": "From: \"Mattijs Korpershoek (TI.com)\" <mkorpershoek@kernel.org>\n\nTo properly implement Android boot image v4, U-Boot must be able to\nadd additional entries to the bootconfig.\n\nAdd `add_bootconfig_parameters()` to do so.\n\nThis has been imported from Google's U-Boot source[1]\nThe variables/function names have been reworked to be\ncompliant with U-Boot's coding style.\n\n[1] https://android.googlesource.com/platform/external/u-boot/+/7af0a0506d4de6f5ea147d10fb0664a8af07d326\n\nSigned-off-by: Mattijs Korpershoek (TI.com) <mkorpershoek@kernel.org>\nReviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>\nSigned-off-by: Guillaume La Roque (TI.com) <glaroque@baylibre.com>\n---\n boot/image-android.c | 40 ++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 40 insertions(+)",
    "diff": "diff --git a/boot/image-android.c b/boot/image-android.c\nindex e46dee0d9b3..877cd39fbef 100644\n--- a/boot/image-android.c\n+++ b/boot/image-android.c\n@@ -57,6 +57,46 @@ static ulong add_trailer(ulong bootconfig_start_addr, ulong bootconfig_size)\n \treturn BOOTCONFIG_TRAILER_SIZE;\n }\n \n+/*\n+ * Add a string of boot config parameters to memory appended by the trailer.\n+ * NOTE: This function expects bootconfig_start_addr to be already mapped.\n+ *       It works directly with the mapped pointer, not a physical address.\n+ */\n+static long add_bootconfig_parameters(char *params, long params_len,\n+\t\t\t\t      ulong bootconfig_start_addr, u32 bootconfig_size)\n+{\n+\tlong applied_bytes = 0;\n+\tlong new_size = 0;\n+\tulong end;\n+\n+\tif (!params || !bootconfig_start_addr)\n+\t\treturn -EINVAL;\n+\n+\tif (params_len == 0)\n+\t\treturn 0;\n+\n+\tend = bootconfig_start_addr + bootconfig_size;\n+\n+\tif (is_trailer_present(end)) {\n+\t\tend -= BOOTCONFIG_TRAILER_SIZE;\n+\t\tapplied_bytes -= BOOTCONFIG_TRAILER_SIZE;\n+\t\tmemcpy(&new_size, (void *)end, BOOTCONFIG_SIZE_SIZE);\n+\t} else {\n+\t\t/*\n+\t\t * When no trailer is present, the bootconfig_size includes the actual content.\n+\t\t * We should write new parameters right after the existing content.\n+\t\t */\n+\t\tend = bootconfig_start_addr + bootconfig_size;\n+\t\tnew_size = bootconfig_size;\n+\t}\n+\n+\tmemcpy((void *)end, params, params_len);\n+\tapplied_bytes += params_len;\n+\tapplied_bytes += add_trailer(bootconfig_start_addr,\n+\t\t\t\t     bootconfig_size + applied_bytes);\n+\treturn applied_bytes;\n+}\n+\n __weak ulong get_avendor_bootimg_addr(void)\n {\n \treturn -1;\n",
    "prefixes": [
        "v4",
        "1/5"
    ]
}