ipq806x: Point to externally compiled dtbs in recipes
authorBrian Norris <computersforpeace@gmail.com>
Fri, 13 Jan 2023 05:32:17 +0000 (21:32 -0800)
committerChristian Marangi <ansuelsmth@gmail.com>
Sat, 21 Jan 2023 00:02:24 +0000 (01:02 +0100)
Similar to commit 4d8b42d8a777 ("ipq40xx: point to externally compiled
dtbs in recipes").

Currently, we patch our DTS files into the kernel source tree, so the
kernel build process will produce DTBs for us. The kernel-to-DTS
dependency can cause buildroot to perform excessive rebuilds of the
kernel though, which slows down device development iteration.

Buildroot also compiles DTBs on its own, to
$(KDIR)/image-$(DEVICE_DTS).dtb. With small adjustments, we can leverage
this, and stop patching DTS files into the kernel Makefile at the same
time.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
target/linux/ipq806x/image/Makefile
target/linux/ipq806x/patches-5.10/0069-arm-boot-add-dts-files.patch [deleted file]
target/linux/ipq806x/patches-5.15/0069-arm-boot-add-dts-files.patch [deleted file]

index f4f829b35c65fd6c3908733d1a502d0702063718..8c1fc88010cd0a99d181ee226225108d9ea04b8a 100644 (file)
@@ -5,7 +5,6 @@ include $(INCLUDE_DIR)/image.mk
 
 define Device/Default
        PROFILES := Default
-       KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
        KERNEL_LOADADDR = 0x42208000
        DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
        DEVICE_DTS_CONFIG := config@1
@@ -22,13 +21,13 @@ endef
 
 define Device/FitImage
        KERNEL_SUFFIX := -fit-uImage.itb
-       KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
+       KERNEL = kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(DEVICE_DTS).dtb
        KERNEL_NAME := Image
 endef
 
 define Device/FitImageLzma
        KERNEL_SUFFIX := -fit-uImage.itb
-       KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb
+       KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb
        KERNEL_NAME := Image
 endef
 
diff --git a/target/linux/ipq806x/patches-5.10/0069-arm-boot-add-dts-files.patch b/target/linux/ipq806x/patches-5.10/0069-arm-boot-add-dts-files.patch
deleted file mode 100644 (file)
index 4c42f40..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-From 8f68331e14dff9a101f2d0e1d6bec84a031f27ee Mon Sep 17 00:00:00 2001
-From: John Crispin <john@phrozen.org>
-Date: Thu, 9 Mar 2017 11:03:18 +0100
-Subject: [PATCH 69/69] arm: boot: add dts files
-
-Signed-off-by: John Crispin <john@phrozen.org>
----
- arch/arm/boot/dts/Makefile | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
---- a/arch/arm/boot/dts/Makefile
-+++ b/arch/arm/boot/dts/Makefile
-@@ -909,8 +909,30 @@ dtb-$(CONFIG_ARCH_QCOM) += \
-       qcom-ipq4019-ap.dk04.1-c3.dtb \
-       qcom-ipq4019-ap.dk07.1-c1.dtb \
-       qcom-ipq4019-ap.dk07.1-c2.dtb \
-+      qcom-ipq8062-wg2600hp3.dtb \
-       qcom-ipq8064-ap148.dtb \
-       qcom-ipq8064-rb3011.dtb \
-+      qcom-ipq8064-c2600.dtb \
-+      qcom-ipq8064-d7800.dtb \
-+      qcom-ipq8064-db149.dtb \
-+      qcom-ipq8064-ap161.dtb \
-+      qcom-ipq8064-ea7500-v1.dtb \
-+      qcom-ipq8064-ea8500.dtb \
-+      qcom-ipq8064-g10.dtb \
-+      qcom-ipq8064-r7500.dtb \
-+      qcom-ipq8064-r7500v2.dtb \
-+      qcom-ipq8064-unifi-ac-hd.dtb \
-+      qcom-ipq8064-wg2600hp.dtb \
-+      qcom-ipq8064-wpq864.dtb \
-+      qcom-ipq8064-wxr-2533dhp.dtb \
-+      qcom-ipq8065-nbg6817.dtb \
-+      qcom-ipq8065-r7800.dtb \
-+      qcom-ipq8065-rt4230w-rev6.dtb \
-+      qcom-ipq8065-tr4400-v2.dtb \
-+      qcom-ipq8065-xr500.dtb \
-+      qcom-ipq8068-ecw5410.dtb \
-+      qcom-ipq8068-mr42.dtb \
-+      qcom-ipq8068-mr52.dtb \
-       qcom-msm8660-surf.dtb \
-       qcom-msm8960-cdp.dtb \
-       qcom-msm8974-fairphone-fp2.dtb \
diff --git a/target/linux/ipq806x/patches-5.15/0069-arm-boot-add-dts-files.patch b/target/linux/ipq806x/patches-5.15/0069-arm-boot-add-dts-files.patch
deleted file mode 100644 (file)
index 698df24..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-From 8f68331e14dff9a101f2d0e1d6bec84a031f27ee Mon Sep 17 00:00:00 2001
-From: John Crispin <john@phrozen.org>
-Date: Thu, 9 Mar 2017 11:03:18 +0100
-Subject: [PATCH 69/69] arm: boot: add dts files
-
-Signed-off-by: John Crispin <john@phrozen.org>
----
- arch/arm/boot/dts/Makefile | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
---- a/arch/arm/boot/dts/Makefile
-+++ b/arch/arm/boot/dts/Makefile
-@@ -957,8 +957,30 @@ dtb-$(CONFIG_ARCH_QCOM) += \
-       qcom-ipq4019-ap.dk04.1-c3.dtb \
-       qcom-ipq4019-ap.dk07.1-c1.dtb \
-       qcom-ipq4019-ap.dk07.1-c2.dtb \
-+      qcom-ipq8062-wg2600hp3.dtb \
-       qcom-ipq8064-ap148.dtb \
-       qcom-ipq8064-rb3011.dtb \
-+      qcom-ipq8064-c2600.dtb \
-+      qcom-ipq8064-d7800.dtb \
-+      qcom-ipq8064-db149.dtb \
-+      qcom-ipq8064-ap161.dtb \
-+      qcom-ipq8064-ea7500-v1.dtb \
-+      qcom-ipq8064-ea8500.dtb \
-+      qcom-ipq8064-g10.dtb \
-+      qcom-ipq8064-r7500.dtb \
-+      qcom-ipq8064-r7500v2.dtb \
-+      qcom-ipq8064-unifi-ac-hd.dtb \
-+      qcom-ipq8064-wg2600hp.dtb \
-+      qcom-ipq8064-wpq864.dtb \
-+      qcom-ipq8064-wxr-2533dhp.dtb \
-+      qcom-ipq8065-nbg6817.dtb \
-+      qcom-ipq8065-r7800.dtb \
-+      qcom-ipq8065-rt4230w-rev6.dtb \
-+      qcom-ipq8065-tr4400-v2.dtb \
-+      qcom-ipq8065-xr500.dtb \
-+      qcom-ipq8068-ecw5410.dtb \
-+      qcom-ipq8068-mr42.dtb \
-+      qcom-ipq8068-mr52.dtb \
-       qcom-msm8226-samsung-s3ve3g.dtb \
-       qcom-msm8660-surf.dtb \
-       qcom-msm8960-cdp.dtb \