From patchwork Fri Dec 17 23:01:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1570403 X-Patchwork-Delegate: trini@ti.com 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=boundarydevices.com header.i=@boundarydevices.com header.a=rsa-sha256 header.s=google header.b=LPapEkUt; 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)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JG4Jr6JLMz9sRR for ; Sat, 18 Dec 2021 10:03:08 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4EA21837DD; Sat, 18 Dec 2021 00:02:32 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=boundarydevices.com 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=boundarydevices.com header.i=@boundarydevices.com header.b="LPapEkUt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8A41083720; Sat, 18 Dec 2021 00:02:17 +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, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B671E83742 for ; Sat, 18 Dec 2021 00:02:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=boundarydevices.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=troy.kisky@boundarydevices.com Received: by mail-pj1-x1034.google.com with SMTP id j6-20020a17090a588600b001a78a5ce46aso7054712pji.0 for ; Fri, 17 Dec 2021 15:02:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boundarydevices.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oL7vsoy9maUvAlVqFQwH3Pv5ifisziwbgV5vtXZTi6w=; b=LPapEkUtOdGFx3kwtowYBgmYKcSrjvkficzN8kChal1WxgRN5UMD06jKkJqU1HZ6yU hZKy6pOju/EbaBg0MCB93D2e1juvfcuDTSUNH9OvKUQMU/fsX2pcgTVd50EtH5c1f+m1 7NZKwHPtSo5Mig6QrxVFHyvS1UtX5ywczpXZs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oL7vsoy9maUvAlVqFQwH3Pv5ifisziwbgV5vtXZTi6w=; b=JtKo+bTdioswQ8k3VahBEY8T+nX/il4bfp7d+yTsFFpBwBM9cwpIDsMhsVkPDKhETn D1QX0BFtZf0p4pY+L0xJVLN5AbKFy8N+OpUMbyFguH6eVg7uBHY700SUJgaZDsWLPJer Rk+KJkJNc9Iont4nOYSsleAcO2+1oklUZJnFl/N4ZxWDJsdW9ni+wAAwQtBPR7LYQw8l PiGSk0+t5SbF2rM7EWUVWVrLru0o4jN1xf3ogzXcQJdIs+N9ThuTjkiNxYdapOnzCT2+ CRQBOsUo4EmrHjw/9PfSjsEQx3f7NbvbdBMrz0sC/d1unaYnYjoWRAvqdOfxrPBEV+7Z fSzA== X-Gm-Message-State: AOAM530oOAnJH28WrXftOo9YheY8zE86099WyBgj4b9uesQOkB72KHEu tGXN2crsJ+Dx5PNumsFmc6YGNA== X-Google-Smtp-Source: ABdhPJyT+0zUI/GcLpbTQTxTFfdgDFjM27OLcgBAtGd2p/d0JRDQRkHc2039j7HMpvlX1PPer1u0rA== X-Received: by 2002:a17:90b:1bc7:: with SMTP id oa7mr4334213pjb.200.1639782124164; Fri, 17 Dec 2021 15:02:04 -0800 (PST) Received: from OS2.boundarydevices.com. (wsip-72-200-236-186.oc.oc.cox.net. [72.200.236.186]) by smtp.googlemail.com with ESMTPSA id f7sm11130388pfj.41.2021.12.17.15.02.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Dec 2021 15:02:03 -0800 (PST) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com Cc: fabio.estevam@nxp.com, u-boot@lists.denx.de, Troy Kisky Subject: [PATCH v1 2/5] dts: allow dts files in board directory Date: Fri, 17 Dec 2021 15:01:28 -0800 Message-Id: <20211217230131.2715940-3-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211217230131.2715940-1-troy.kisky@boundarydevices.com> References: <20211217230131.2715940-1-troy.kisky@boundarydevices.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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 Let the board specific dts files live in the board directory. Signed-off-by: Troy Kisky --- dts/Makefile | 11 +++++++++-- scripts/Makefile.lib | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dts/Makefile b/dts/Makefile index cb311138295..09b46f9fcfd 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -13,7 +13,9 @@ endif ifneq ($(EXT_DTB),) DTB := $(EXT_DTB) else -DTB := arch/$(ARCH)/dts/$(DEVICE_TREE).dtb +ifneq "$(ARCH)" "arm64" +DTB := $(patsubst $(srctree)/%.dts,%.dtb,$(shell find "$(srctree)/board/$(BOARDDIR)" $(srctree)/arch/$(ARCH)/dts/ -type f -name $(DEVICE_TREE).dts)) +endif endif $(obj)/dt-$(SPL_NAME).dtb: dts/dt.dtb $(objtree)/tools/fdtgrep FORCE @@ -40,8 +42,13 @@ $(DTB): arch-dtbs /bin/false) PHONY += arch-dtbs +ifneq "$(patsubst board/$(BOARDDIR)/%,,$(DTB))" "" arch-dtbs: $(Q)$(MAKE) $(build)=arch/$(ARCH)/dts dtbs +else +arch-dtbs: + $(Q)$(MAKE) $(build)="board/$(BOARDDIR)" dtbs +endif ifeq ($(CONFIG_SPL_BUILD),y) obj-$(CONFIG_OF_EMBED) := dt-spl.dtb.o @@ -63,4 +70,4 @@ spl_dtbs: $(obj)/dt-$(SPL_NAME).dtb clean-files := dt.dtb.S # Let clean descend into dts directories -subdir- += ../arch/arm/dts ../arch/microblaze/dts ../arch/mips/dts ../arch/sandbox/dts ../arch/x86/dts ../arch/powerpc/dts ../arch/riscv/dts +subdir- += ../arch/arm/dts ../arch/microblaze/dts ../arch/mips/dts ../arch/sandbox/dts ../arch/x86/dts ../arch/powerpc/dts ../arch/riscv/dts ../$(patsubst $(srctree)/%/,%,$(dir $(shell find $(srctree)/board -type f -name "*.dtb"))) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 39f03398ed8..18fe42f378f 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -183,6 +183,7 @@ u_boot_dtsi = $(strip $(u_boot_dtsi_options_debug) \ # Modified for U-Boot dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \ + -I$(srctree)/board/$(BOARDDIR) \ -I$(srctree)/arch/$(ARCH)/dts \ -I$(srctree)/arch/$(ARCH)/dts/include \ -Iinclude \