Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2215604/?format=api
{ "id": 2215604, "url": "http://patchwork.ozlabs.org/api/patches/2215604/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260324194535.2338985-1-sjg@chromium.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": "<20260324194535.2338985-1-sjg@chromium.org>", "list_archive_url": null, "date": "2026-03-24T19:45:20", "name": "sandbox: Adjust how OS-interface files are built", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "32c5b02e9dbc3f5f9626f20d3ace95dcacd6d175", "submitter": { "id": 6170, "url": "http://patchwork.ozlabs.org/api/people/6170/?format=api", "name": "Simon Glass", "email": "sjg@chromium.org" }, "delegate": { "id": 3651, "url": "http://patchwork.ozlabs.org/api/users/3651/?format=api", "username": "trini", "first_name": "Tom", "last_name": "Rini", "email": "trini@ti.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260324194535.2338985-1-sjg@chromium.org/mbox/", "series": [ { "id": 497340, "url": "http://patchwork.ozlabs.org/api/series/497340/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=497340", "date": "2026-03-24T19:45:20", "name": "sandbox: Adjust how OS-interface files are built", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/497340/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2215604/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2215604/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 (1024-bit key;\n unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256\n header.s=google header.b=QhJ9iFS0;\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=chromium.org", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=chromium.org header.i=@chromium.org\n header.b=\"QhJ9iFS0\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=chromium.org", "phobos.denx.de;\n spf=pass smtp.mailfrom=sjg@chromium.org" ], "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 4fgLB71vZMz1y1G\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 25 Mar 2026 06:45:51 +1100 (AEDT)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id B20B383A1B;\n\tTue, 24 Mar 2026 20:45:48 +0100 (CET)", "by phobos.denx.de (Postfix, from userid 109)\n id E3A7083A91; Tue, 24 Mar 2026 20:45:47 +0100 (CET)", "from mail-ot1-x329.google.com (mail-ot1-x329.google.com\n [IPv6:2607:f8b0:4864:20::329])\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 A634A83981\n for <u-boot@lists.denx.de>; Tue, 24 Mar 2026 20:45:45 +0100 (CET)", "by mail-ot1-x329.google.com with SMTP id\n 46e09a7af769-7d75ed779bfso1305563a34.2\n for <u-boot@lists.denx.de>; Tue, 24 Mar 2026 12:45:45 -0700 (PDT)", "from chromium.org ([73.34.74.121]) by smtp.gmail.com with ESMTPSA id\n 46e09a7af769-7d7eadc8a12sm12783012a34.16.2026.03.24.12.45.42\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 24 Mar 2026 12:45:43 -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=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,\n 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=chromium.org; s=google; t=1774381544; x=1774986344; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=r9+HDK5733+jjeoxynKyW3vVuU3i5ZQsZ4OKGA2zjUE=;\n b=QhJ9iFS0cKp54HOeBHtkbEhrsAMjDW2gmxmMTbUjw8f4xpxstJnFENpb9L4CcrsDKk\n 9iU8ECeJuAfRJnWYv6d/0nYJCk2ceBej2ij6eSpdvi1MYf09unh/FrdDRahS/e7BkyTf\n /sbKScJKqUaClhBFhwOjShn2oBBYEiNkXOYD4=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774381544; x=1774986344;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=r9+HDK5733+jjeoxynKyW3vVuU3i5ZQsZ4OKGA2zjUE=;\n b=aCXyMG8mS/yh1nxRoxAoV6RTIM8jm6g+32mkabC0YBJdj05p+75+bKAwl6RtR3Qw+I\n npBbuqNb+oIV6ANbVHSWFvutf2UuBSho8yHJVGzUw9an04IhvpJEhpqyTYJ6NZYQ7DyF\n 5iRHHkY0rim0spK+/AhBNnvjCVpeT+/vvEGAG20bxy73TJi2Nfvn7KSShZrkc9andt1q\n 7fj0Se6iCLolnvgaUCGUofAX6Zksztn7owlq9jKQ7RV3D7pKKhzE2QPaHqys581GYvNu\n 6S21bsdEp19pP87GVR68AjvCEgljrCfWBUZHG88wUP4p55ll/34xNAwbmQj0NagqtylC\n Z+xw==", "X-Gm-Message-State": "AOJu0YxMe8pszRHvAFTsQJtoMmcNwcHawoeYWqiNgyPQiPNyToKicBTA\n dXeVafZNfHM8IoIuhXrqgPKiWe+O6FmTKr0Y3cnTOiE/iCtUqWOymMMkAr0+cUdANFjGpSUBDep\n 8lFiTJA==", "X-Gm-Gg": "ATEYQzxszkXqa/Fc9SD5jy120kFMk1sesztdpQRslIQEQQp5QcA/UYTUbdESK2p0Jh5\n g3YQ2pBUAA0+fBB4HSgD7owUXTD9frG+JFlaE6epy7HSDJ4x5xtL7rE/3tCQtfjS3MHDsWr4jo4\n JOQwskjpd9VABQ+doH14OVSK7rB4lEUoYpb5OYUmCIH49PF4rYW8acHddms3jcQzugZ4ETYSIDX\n EoCIXjyRarerFWZ7XjGI92kUxhDZzAdVUoN1h803AiDJE/cMHuDmbkwC+LMMsdkCkWx+G7Hf7Bi\n KqeaYcOgY11zf4oZVBWbBu/Vi/U0YI/JUOLgp40hATo/QuoxNdHHvO5dWRdC/b1+rJEgq7hk4XN\n 9cDnDCyxtxXuyVMdcFnVAUmNB6Mi3VO2cNH4tx01xZfmyTaVivOT76SXZDvRxB9ihzTJN8kXZXm\n I+vmu9G7TcBDmoXWFp1g==", "X-Received": "by 2002:a05:6830:2403:b0:7d7:fbe5:e9be with SMTP id\n 46e09a7af769-7d9d695c0f4mr378160a34.20.1774381543771;\n Tue, 24 Mar 2026 12:45:43 -0700 (PDT)", "From": "Simon Glass <sjg@chromium.org>", "To": "u-boot@lists.denx.de", "Cc": "Simon Glass <sjg@chromium.org>,\n\tTom Rini <trini@konsulko.com>", "Subject": "[PATCH] sandbox: Adjust how OS-interface files are built", "Date": "Tue, 24 Mar 2026 13:45:20 -0600", "Message-ID": "<20260324194535.2338985-1-sjg@chromium.org>", "X-Mailer": "git-send-email 2.43.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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": "The current mechanism uses a completely separate build rule for each\nfile which must be built with system headers. This is tricky to\nmaintain.\n\nAdd a foreach template in the sandbox cpu Makefile which generates the\ncustom compile rules from a CFLAGS_USE_SYSHDRS list. This keeps the\nrules data-driven without needing changes to the common\nscripts/Makefile.lib, which could affect other architectures.\n\nMove initjmp.o into the template since it uses the same pattern. Add\nsdl.o to the list too, with an override for its command since it also\nneeds -fshort-wchar removed and -fno-lto added.\n\nSigned-off-by: Simon Glass <sjg@chromium.org>\n---\n\n arch/sandbox/Makefile | 2 +-\n arch/sandbox/cpu/Makefile | 45 ++++++++++++++-------------------------\n 2 files changed, 17 insertions(+), 30 deletions(-)", "diff": "diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile\nindex a335f8acfde..5bbf9f1f96b 100644\n--- a/arch/sandbox/Makefile\n+++ b/arch/sandbox/Makefile\n@@ -1,6 +1,6 @@\n # SPDX-License-Identifier: GPL-2.0+\n \n-head-y := arch/sandbox/cpu/start.o arch/sandbox/cpu/os.o\n+head-y := arch/sandbox/cpu/start.o\n head-$(CONFIG_SANDBOX_SDL) += arch/sandbox/cpu/sdl.o\n libs-y += arch/sandbox/cpu/\n libs-y += arch/sandbox/lib/\ndiff --git a/arch/sandbox/cpu/Makefile b/arch/sandbox/cpu/Makefile\nindex 038ad78accc..ee3c04c49e1 100644\n--- a/arch/sandbox/cpu/Makefile\n+++ b/arch/sandbox/cpu/Makefile\n@@ -5,42 +5,29 @@\n # (C) Copyright 2000-2003\n # Wolfgang Denk, DENX Software Engineering, wd@denx.de.\n \n-obj-y\t:= cache.o cpu.o state.o initjmp.o\n-extra-y\t:= start.o os.o\n+obj-y\t:= cache.o cpu.o state.o initjmp.o os.o\n+extra-y\t:= start.o\n extra-$(CONFIG_SANDBOX_SDL) += sdl.o\n obj-$(CONFIG_XPL_BUILD)\t+= spl.o\n obj-$(CONFIG_ETH_SANDBOX_RAW)\t+= eth-raw-os.o\n \n-# os.c is build in the system environment, so needs standard includes\n-# CFLAGS_REMOVE_os.o cannot be used to drop header include path\n-quiet_cmd_cc_os.o = CC $(quiet_modtag) $@\n-cmd_cc_os.o = $(CC) $(filter-out -nostdinc, \\\n-\t$(patsubst -I%,-idirafter%,$(c_flags))) -c -o $@ $<\n+# These files need to be built with system headers, since they use system\n+# calls or system-level interfaces. Generate a custom compile rule for each\n+# one that drops -nostdinc and converts -I to -idirafter.\n+CFLAGS_USE_SYSHDRS := eth-raw-os.o initjmp.o os.o sdl.o\n \n-$(obj)/os.o: $(src)/os.c FORCE\n-\t$(call if_changed_dep,cc_os.o)\n+define syshdrs_rule\n+quiet_cmd_cc_$(1) = CC $$(quiet_modtag) $$@\n+cmd_cc_$(1) = $$(CC) $$(filter-out -nostdinc, \\\n+\t$$(patsubst -I%,-idirafter%,$$(c_flags))) -c -o $$@ $$<\n \n-# eth-raw-os.c is built in the system env, so needs standard includes\n-# CFLAGS_REMOVE_eth-raw-os.o cannot be used to drop header include path\n-quiet_cmd_cc_eth-raw-os.o = CC $(quiet_modtag) $@\n-cmd_cc_eth-raw-os.o = $(CC) $(filter-out -nostdinc, \\\n-\t$(patsubst -I%,-idirafter%,$(c_flags))) -c -o $@ $<\n+$$(obj)/$(1): $$(src)/$(1:.o=.c) FORCE\n+\t$$(call if_changed_dep,cc_$(1))\n+endef\n \n-$(obj)/eth-raw-os.o: $(src)/eth-raw-os.c FORCE\n-\t$(call if_changed_dep,cc_eth-raw-os.o)\n+$(foreach f,$(CFLAGS_USE_SYSHDRS),$(eval $(call syshdrs_rule,$(f))))\n \n-# initjmp.c is build in the system environment, so needs standard includes\n-# CFLAGS_REMOVE_initjmp.o cannot be used to drop header include path\n-quiet_cmd_cc_initjmp.o = CC $(quiet_modtag) $@\n-cmd_cc_initjmp.o = $(CC) $(filter-out -nostdinc, \\\n-\t$(patsubst -I%,-idirafter%,$(c_flags))) -c -o $@ $<\n-\n-$(obj)/initjmp.o: $(src)/initjmp.c FORCE\n-\t$(call if_changed_dep,cc_initjmp.o)\n-\n-# sdl.c fails to build with -fshort-wchar using musl\n+# sdl.c also needs -fshort-wchar removed (musl) and -fno-lto, so override\n+# the generated rule\n cmd_cc_sdl.o = $(CC) $(filter-out -nostdinc -fshort-wchar, \\\n \t$(patsubst -I%,-idirafter%,$(c_flags))) -fno-lto -c -o $@ $<\n-\n-$(obj)/sdl.o: $(src)/sdl.c FORCE\n-\t$(call if_changed_dep,cc_sdl.o)\n", "prefixes": [] }