From patchwork Mon Jan 10 13:34:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1577910 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.a=rsa-sha256 header.s=selector1 header.b=Kww/oFx/; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JXZZQ3C5cz9s1l for ; Tue, 11 Jan 2022 00:35:10 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 634E88302C; Mon, 10 Jan 2022 14:35:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.b="Kww/oFx/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 70A9381E3E; Mon, 10 Jan 2022 14:35:00 +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=-0.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,SPF_HELO_PASS, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-he1eur02on0708.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe05::708]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8F5FE8302C for ; Mon, 10 Jan 2022 14:34:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rasmus.villemoes@prevas.dk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ihpyyb+GAyYIz12J4cBGTy7a+8IBRU7AerqmZc6iYzX9zRw0DV9Rwm4SPu4cFwyeCAbtft6JhKkdjJUKVYrcw1Ta4F4QqUGZkKrwA2fTxZh63o+BgagtF76A2bDkkOfb5YBv8ULUeoUXKrkdwV9HIzcZdCiFtlMkSzJ1rY749De0XLyD3JL7gjvKGH35zYGlpN70znVQyAX6lja4Zs/4k3KVhkX/7vV/kx/W289zcI7O+6i7G4TzOnu4ybKr2qvN6NL7CJcORwQC0lwo9JUWuBZODOPBuLFQRPsJfYG0dtq+raO7fKUu0e+quqeq9dH48CVigk4gww4wBFXSlM2llA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=q9cbMHF3ulNvLhA2Eny3TthHD/yEeGY2mtcgHP5yc1Y=; b=DC4UC39om0bjYKkB1KEAbjYC6o1zqqTqA6YVJAD0VxU11XwPSeJOQO/y/NrLZB1xY91KNyTWGlIeeXM8bbrK5XM8zDBvrXtty1kJ2FEeov/a9+eGbljuqBgFDmQ/JNSXvQmPTDAfaqQh0Mhpt1BQGGamDm5Yh8Apdm1/Pbhhfaz18IeWTSF2sa/PPDru/bKVlIEqK8f5+3Irtlad8evqV5fZIYZfsUax45xzHTBvuxDcOQKQk9FtfiThihm8ChSAbw6Ikw2wy4OxxdcnQBpKK5VdRNSHdvxLsqGOXnvZHtEPgeqGCDSxSyHm4HONNDa6D7TEe+a+dxqT8tMJGjPeDA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q9cbMHF3ulNvLhA2Eny3TthHD/yEeGY2mtcgHP5yc1Y=; b=Kww/oFx/QSjkWMxaTdgBWHS8HEznBTqWZc9irX7Xbvgavwy8EdkSdDBDXHqCUzQBJrUSdMlk6neyTeMQUS6G1Z63UkR0Afh6oX8vmU2NIf958Ozz2UOWsdyny1ePcJJ/dSEW0lDmYbpLZB+cC84QFaywyy0SntIFko0iQVmSEPQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=prevas.dk; Received: from DU0PR10MB5266.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:34a::22) by DU0PR10MB5196.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:348::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4844.16; Mon, 10 Jan 2022 13:34:54 +0000 Received: from DU0PR10MB5266.EURPRD10.PROD.OUTLOOK.COM ([fe80::608f:51b:ced9:9c8f]) by DU0PR10MB5266.EURPRD10.PROD.OUTLOOK.COM ([fe80::608f:51b:ced9:9c8f%5]) with mapi id 15.20.4867.011; Mon, 10 Jan 2022 13:34:54 +0000 From: Rasmus Villemoes To: u-boot@lists.denx.de Cc: Michal Simek , Tom Rini , Stefano Babic , Masami Hiramatsu , Masahiro Yamada , Florian Klink , Rasmus Villemoes Subject: [RFC PATCH] dts: automatically build necessary .dtb files Date: Mon, 10 Jan 2022 14:34:41 +0100 Message-Id: <20220110133441.799353-1-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.31.1 X-ClientProxiedBy: GV3P280CA0120.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:8::26) To DU0PR10MB5266.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:34a::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 61c84a24-fa9d-405d-0911-08d9d43dfc29 X-MS-TrafficTypeDiagnostic: DU0PR10MB5196:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2449; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nzQcTKGW3RWE5/bLBAIznBlqpRRFBjZ1Q2Ky3/gn9NfbjKQWRrNPQRQUQUy+OKm0B1I5hYU03gStL7+ZqtcwGLNizgQZfQEJml7aIZighl/mhWy+xikrwvJJ9S/TMvU6CrIffToOTKmIG53YTZ4+1055RUXIJsdD1neGjtFigFAKZieLOiwCqNirbiuBirMtc/iYg5jYNkRnwmkhCaXDVexbtNnOT3NTrMrpdPbID16286Ivk+PHgQRwrlojLEjdsdWby4NQLDdkYSjL10dV+zLCliJ+7M6hJ107HA6gMOXZP8FXQYPaAMc5kZ/qaQQucMSA0EAIeHTQSK5KaVt5CdIvUB3nbM/kSmd97gAiqoztAP/v8b2nXYC7BPuCxd8AHV3RVOl4kikCemFr2QzqtG3/M1DMwUz5xvd/1TRp0lQzeO2WjW89bxsE6o63LrC9bu9Ri7sqSWjnbSNCb4aAuYN7DOqcPOMhTl90aJshUTutqgtHmuHTumE8ZfTr1H1rUx7OaCV2dYQr6/i04x9QsmvhTH04TgSS+jAsICkARhsqJ/HxFw7XTsofqNElC26ZEjh4CvZMmE9yvGbmZskqiBbdH9rJj8ERw81FDYavIkLIm6lowe02v0it4Adtu2A/4z4DaivgJAdn1yJ5w2XsOxAO98pE4bkSkxeqkLrJSiHfsI7eOlTpnZEtbMrdRdH4wsbUZZ0T/nZUdi5EKu0LXsOlwX8IpY29zwNB+nyHuww= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR10MB5266.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(366004)(1076003)(4326008)(8936002)(8976002)(6506007)(8676002)(26005)(86362001)(66476007)(66946007)(44832011)(6666004)(2616005)(316002)(2906002)(508600001)(36756003)(186003)(66556008)(6916009)(38100700002)(6512007)(38350700002)(54906003)(83380400001)(6486002)(5660300002)(107886003)(52116002)(142923001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: brMCwrq9LQ+C1n8Z6HXwWxYTlXRRNFV3zQ78lDNtjYCsnz2f3hoRiM+THw01VGP+EjcfaIhCy0xrysL4PIH1m91U801Ah6rQFM8OXaKV/EP10EH9Eu7V4cj+hCXKiPgIZLDKow1PvdaiThgZ4XfjrHzHEh62xTxXbV5pYvQfSFIZdqpLEctBH9/HOUF7V4IJHKHaCipRFLWeK6VmoqQRUEjN/LGlbPmxFPl513D60Tq5/THcWZ6NcVJ5Ssn1C9Z6X6ux30CeBXZG9GEi8gZiIsGPNkXaNDl8gtmSjIDr4X7yBKo52DIIYutXMwLSapP4nQJjla2GFbCoKZ6oz4gsIvvzL5UAFiFWMyzuTaJLtTeNzMHu3EZWlLMRUc/3S12ycsx2tXSDOVmamUSIG62YNzwMANY9+e+CM3ZRG8vYdtlvvjwRWQYwUZIosTcUXZbmsVW2yC5Z4oaFAjum+p2bbe8l/zMLtAjl5q3fMCOLoTsSBA0Hn9llDiUQfm8jcY50Vu0bSCnZTKMaVB72hNvArLiea0TNS30Znx3ErOtSs5KRQqRGo5m22cndOwVhRiT33qxbcLb6mWBA6hUNs2euJwta2SZnG0MD+mpQ0KlYmulF2g0BFPGIxo2U4ZwJcMPNxcBdsrS4eneWom582Ir5K1G7uZ9vqH23aMtuEVxxf+KFuPYR1F2yF4bYkUIwQp4G5TOEsBo5uvydsBhtNdgfo71JLk6g0c/kGyK9QtEzOK71fV8Gdlox08irumhn5opk+YChFKjMKt7fPZjisOfy3Kf5Uv6WfpvSOZgYaoEJ+EIITAcN+MTGRxn4QbW3DdaSOaqED+9IVKElsOr5lvJnyfC0NCC9jnhHOEFnmXCwRIiZwtQDbm/o9WhOBgu49mFR5+HDhxlrHxz7dZgyz4Ly5orm5kYApVuT1q8+vwIf3N0rsG4hweaf8NolhY2S6ZjeH2GOftFNmgBe3iZqIMoJ1BIvziKMRSNjNpi1r6RT0tzh1eiJ93pNXWP3kYGtiXINeY98uUBN5KPnH6hD7k4UACSGe97BigVfIxfc9qS/5W1Vge4g5EULJZMdaLHUYKeiwmgNkS2BxZC/hOzweiLhuDzeKL2QwAisiu6bqtMX34VelklecxqXWs/CQQ8U7cn3jxUu+53h/dm2XoFj4A0fOVwJILBQdvs3pVl3Vnsc3HVHS2E285TbIeesQHKDGF6mp6OTwWoPOQ2z/H6YV/QUwTsT4vf9syv2TZTV913PtPrndlzn1YJBkG6gIjPJ8ANVzhVWGetpPeIFcfnAev+6Z/Li2awaeXLMjWUI9eeqAtqvuCOeZljgqGQvujptpieEau1tGl/QHiFzM8Z8OwTkMnjNm9ey8dUQ+P7+RBzJ22dtzsjRBOvuOJgvAeHs0ewDa5BCmDeO9aF2yWrs3TF7f0zc2Z+u1UXHJ9Mho1J4/mSXHlhZzxByLn9qVwzv+AziUyLN/e/U9Ngb5YtJQi8Z0J+4kjeXox0dlNGK61+NfUAeifnOchy8O+dS1jkA0LkIF0QeOmScIa+t7nypPvVhdPJulAR4JSNcSlyofg9zP813Tkk1ZDij7twdhtN3n/LBm8peTiKYM8JLxPENJvkrMFQdPpJaH60O5iLAos6hkNdxt4yHkahI9YDwGKAF7lTNsZcq3BzLA2k1+hy+J3Pv2A== X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 61c84a24-fa9d-405d-0911-08d9d43dfc29 X-MS-Exchange-CrossTenant-AuthSource: DU0PR10MB5266.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2022 13:34:54.1088 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IyR57MmgV/suGtdhljEEdOrpkh/PChWOonVEfsUwUuVvddpbXimHgTRVr0Yj9XeC+fqAk166nczHuZ7dx6vnoP0d/ORKyK7ht+EB+m7j8N4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR10MB5196 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean When building for a custom board, it is quite common to maintain a private branch which include some defconfig and .dts files. But to hook up those .dts files requires modifying a file "belonging" to upstream U-Boot, the arch/*/dts/Makefile. Forward-porting that branch to a newer upstream then often results in a conflict which, while it is trivial to resolve by hand, makes it harder to have a CI do "try to build our board against latest upstream". The .config usually includes information on precisely what .dtb(s) are needed, so to avoid having to modify the Makefile, simply add the files in (SPL_)OF_LIST to dtb-y. A technicality is that (SPL_)OF_LIST is not always defined, so rework the Kconfig symbols so that (SPL_)OF_LIST is always defined (when (SPL_)OF_CONTROL), but only prompted for in the cases which used to be their "depends on". nios2 and microblaze already have something like this in their dts/Makefile, and the rationale in commit 41f59f68539 is similar to the above. So this simply generalizes existing practice. Followup patches could remove the logic in those two makefiles, just as there's potential for moving some common boilerplate from all the arch/*/dts/Makefile files to the new scripts/Makefile.dts. Signed-off-by: Rasmus Villemoes Reviewed-by: Simon Glass --- arch/arc/dts/Makefile | 2 ++ arch/arm/dts/Makefile | 2 ++ arch/m68k/dts/Makefile | 2 ++ arch/microblaze/dts/Makefile | 2 ++ arch/mips/dts/Makefile | 2 ++ arch/nds32/dts/Makefile | 2 ++ arch/nios2/dts/Makefile | 2 ++ arch/powerpc/dts/Makefile | 2 ++ arch/riscv/dts/Makefile | 2 ++ arch/sandbox/dts/Makefile | 2 ++ arch/sh/dts/Makefile | 2 ++ arch/x86/dts/Makefile | 2 ++ arch/xtensa/dts/Makefile | 2 ++ dts/Kconfig | 8 ++++---- scripts/Makefile.dts | 3 +++ 15 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 scripts/Makefile.dts diff --git a/arch/arc/dts/Makefile b/arch/arc/dts/Makefile index 515fe1fe53..532a8131c5 100644 --- a/arch/arc/dts/Makefile +++ b/arch/arc/dts/Makefile @@ -8,6 +8,8 @@ dtb-$(CONFIG_TARGET_EMSDP) += emsdp.dtb dtb-$(CONFIG_TARGET_HSDK) += hsdk.dtb hsdk-4xd.dtb dtb-$(CONFIG_TARGET_IOT_DEVKIT) += iot_devkit.dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) DTC_FLAGS += -R 4 -p 0x1000 diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index b3e2a9c9d7..ef58be0381 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -1163,6 +1163,8 @@ dtb-$(CONFIG_TARGET_IMX8MM_CL_IOT_GATE_OPTEE) += imx8mm-cl-iot-gate-optee.dtb dtb-$(CONFIG_TARGET_EA_LPC3250DEVKITV2) += lpc3250-ea3250.dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) # Add any required device tree compiler flags here diff --git a/arch/m68k/dts/Makefile b/arch/m68k/dts/Makefile index fdd435bc34..7988522eb9 100644 --- a/arch/m68k/dts/Makefile +++ b/arch/m68k/dts/Makefile @@ -18,6 +18,8 @@ dtb-$(CONFIG_TARGET_M5373EVB) += M5373EVB.dtb dtb-$(CONFIG_TARGET_AMCORE) += amcore.dtb dtb-$(CONFIG_TARGET_STMARK2) += stmark2.dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) DTC_FLAGS += -R 4 -p 0x1000 diff --git a/arch/microblaze/dts/Makefile b/arch/microblaze/dts/Makefile index 4690dc1b9f..427a8f9aac 100644 --- a/arch/microblaze/dts/Makefile +++ b/arch/microblaze/dts/Makefile @@ -2,6 +2,8 @@ dtb-y += $(shell echo $(CONFIG_DEFAULT_DEVICE_TREE)).dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) DTC_FLAGS += -R 4 -p 0x1000 diff --git a/arch/mips/dts/Makefile b/arch/mips/dts/Makefile index 215283cfa0..95144b24dc 100644 --- a/arch/mips/dts/Makefile +++ b/arch/mips/dts/Makefile @@ -34,6 +34,8 @@ dtb-$(CONFIG_SOC_JR2) += jr2_pcb110.dtb jr2_pcb111.dtb serval2_pcb112.dtb dtb-$(CONFIG_SOC_SERVALT) += servalt_pcb116.dtb dtb-$(CONFIG_SOC_SERVAL) += serval_pcb105.dtb serval_pcb106.dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) # Add any required device tree compiler flags here diff --git a/arch/nds32/dts/Makefile b/arch/nds32/dts/Makefile index a8e23ad9ad..5a09e3b45b 100644 --- a/arch/nds32/dts/Makefile +++ b/arch/nds32/dts/Makefile @@ -2,6 +2,8 @@ dtb-$(CONFIG_TARGET_ADP_AG101P) += ag101p.dtb dtb-$(CONFIG_TARGET_ADP_AE3XX) += ae3xx.dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) DTC_FLAGS += -R 4 -p 0x1000 diff --git a/arch/nios2/dts/Makefile b/arch/nios2/dts/Makefile index 0014acfdfb..2b29fa90f6 100644 --- a/arch/nios2/dts/Makefile +++ b/arch/nios2/dts/Makefile @@ -2,6 +2,8 @@ dtb-y += $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%).dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) DTC_FLAGS += -R 4 -p 0x1000 diff --git a/arch/powerpc/dts/Makefile b/arch/powerpc/dts/Makefile index ceaa8ce5c8..6f0e4d69f2 100644 --- a/arch/powerpc/dts/Makefile +++ b/arch/powerpc/dts/Makefile @@ -29,6 +29,8 @@ dtb-$(CONFIG_TARGET_TUXX1) += kmtuxa1.dtb dtb-$(CONFIG_TARGET_MCR3000) += mcr3000.dtb dtb-$(CONFIG_TARGET_GAZERBEAM) += gazerbeam.dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) # Add any required device tree compiler flags here diff --git a/arch/riscv/dts/Makefile b/arch/riscv/dts/Makefile index b6e9166767..45b6381139 100644 --- a/arch/riscv/dts/Makefile +++ b/arch/riscv/dts/Makefile @@ -8,6 +8,8 @@ dtb-$(CONFIG_TARGET_SIFIVE_UNLEASHED) += hifive-unleashed-a00.dtb dtb-$(CONFIG_TARGET_SIFIVE_UNMATCHED) += hifive-unmatched-a00.dtb dtb-$(CONFIG_TARGET_SIPEED_MAIX) += k210-maix-bit.dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) DTC_FLAGS += -R 4 -p 0x1000 diff --git a/arch/sandbox/dts/Makefile b/arch/sandbox/dts/Makefile index 3e5dc67d53..6cbc9bbcaa 100644 --- a/arch/sandbox/dts/Makefile +++ b/arch/sandbox/dts/Makefile @@ -8,6 +8,8 @@ endif dtb-$(CONFIG_UT_DM) += test.dtb dtb-$(CONFIG_CMD_EXTENSION) += overlay0.dtbo overlay1.dtbo +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) DTC_FLAGS += -R 4 -p 0x1000 diff --git a/arch/sh/dts/Makefile b/arch/sh/dts/Makefile index e423bfd566..144fd3e7d2 100644 --- a/arch/sh/dts/Makefile +++ b/arch/sh/dts/Makefile @@ -1,5 +1,7 @@ dtb-y += sh7751-r2dplus.dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) # Add any required device tree compiler flags here diff --git a/arch/x86/dts/Makefile b/arch/x86/dts/Makefile index be209aaaf8..8c1c366546 100644 --- a/arch/x86/dts/Makefile +++ b/arch/x86/dts/Makefile @@ -22,6 +22,8 @@ dtb-y += bayleybay.dtb \ slimbootloader.dtb \ baytrail_som-db5800-som-6867.dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) DTC_FLAGS += -R 4 -p 0x1000 diff --git a/arch/xtensa/dts/Makefile b/arch/xtensa/dts/Makefile index 06ee25d2da..fbbdefaf2c 100644 --- a/arch/xtensa/dts/Makefile +++ b/arch/xtensa/dts/Makefile @@ -2,6 +2,8 @@ dtb-$(CONFIG_XTFPGA) += ml605.dtb ml605_nommu.dtb kc705.dtb kc705_nommu.dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) DTC_FLAGS += diff --git a/dts/Kconfig b/dts/Kconfig index b7c4a2fec0..446d709715 100644 --- a/dts/Kconfig +++ b/dts/Kconfig @@ -132,8 +132,8 @@ config DEFAULT_DEVICE_TREE $ make DEVICE_TREE= config OF_LIST - string "List of device tree files to include for DT control" - depends on SPL_LOAD_FIT || MULTI_DTB_FIT + string "List of device tree files to include for DT control" if SPL_LOAD_FIT || MULTI_DTB_FIT + depends on OF_CONTROL default DEFAULT_DEVICE_TREE help This option specifies a list of device tree files to use for DT @@ -240,8 +240,8 @@ config SPL_MULTI_DTB_FIT capabilities, pad configurations). config SPL_OF_LIST - string "List of device tree files to include for DT control in SPL" - depends on SPL_MULTI_DTB_FIT + string "List of device tree files to include for DT control in SPL" if SPL_MULTI_DTB_FIT + depends on SPL_OF_CONTROL default OF_LIST help This option specifies a list of device tree files to use for DT diff --git a/scripts/Makefile.dts b/scripts/Makefile.dts new file mode 100644 index 0000000000..2561025da8 --- /dev/null +++ b/scripts/Makefile.dts @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0+ + +dtb-y += $(patsubst %,%.dtb,$(subst ",,$(CONFIG_$(SPL_)OF_LIST)))