From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 12 Sep 2023 18:58:11 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qg6iK-00Crgg-Di for lore@lore.pengutronix.de; Tue, 12 Sep 2023 18:58:11 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1qg6iI-0004dg-TG; Tue, 12 Sep 2023 18:58:10 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qg6iA-0004dR-59; Tue, 12 Sep 2023 18:58:02 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1qg6i9-005oqU-PL; Tue, 12 Sep 2023 18:58:01 +0200 Received: from rhi by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1qg6i9-00EeVc-0h; Tue, 12 Sep 2023 18:58:01 +0200 From: Roland Hieber To: ptxdist@pengutronix.de Date: Tue, 12 Sep 2023 18:57:57 +0200 Message-Id: <20230912165759.3492269-1-rhi@pengutronix.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Mail-Followup-To: Roland Hieber , ptxdist@pengutronix.de Content-Transfer-Encoding: 8bit Subject: [ptxdist] [PATCH v3 1/3] kernel: add make target for the installed device trees X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Roland Hieber Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false This makes it easy to depend on the kernel.targetinstall stage by depending on one of the .dtb's that it installs into the image dir, e.g. when building a custom recipe for a FIT image. As a nice side-effect, you can simply call "ptxdist image " to build the device tree. Signed-off-by: Roland Hieber --- PATCH v3: * do the same for the kernel template PATCH v2: https://lore.ptxdist.org/ptxdist/20230831104425.2874985-1-rhi@pengutronix.de * change ifneq syntax PATCH v1: https://lore.ptxdist.org/ptxdist/20230822121234.2040303-1-rhi@pengutronix.de --- rules/kernel.make | 4 ++++ rules/templates/template-kernel-make | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/rules/kernel.make b/rules/kernel.make index 59ecdf19973f..7b1c663ffb7d 100644 --- a/rules/kernel.make +++ b/rules/kernel.make @@ -283,6 +283,10 @@ endif # Target-Install # ---------------------------------------------------------------------------- +ifneq ($(KERNEL_DTB_FILES),) +$(addprefix $(IMAGEDIR)/,$(KERNEL_DTB_FILES)): $(STATEDIR)/kernel.targetinstall +endif + $(STATEDIR)/kernel.targetinstall: @$(call targetinfo) diff --git a/rules/templates/template-kernel-make b/rules/templates/template-kernel-make index c5f0c9303b51..cd1b717c51ba 100644 --- a/rules/templates/template-kernel-make +++ b/rules/templates/template-kernel-make @@ -106,6 +106,10 @@ $(STATEDIR)/kernel-@package@.install: # Target-Install # ---------------------------------------------------------------------------- +ifneq ($(KERNEL_@PACKAGE@_DTB_FILES),) +$(addprefix $(IMAGEDIR)/,$(KERNEL_@PACKAGE@_DTB_FILES)): $(STATEDIR)/kernel-@package@.targetinstall +endif + $(STATEDIR)/kernel-@package@.targetinstall: @$(call targetinfo) -- 2.39.2