diff mbox series

[2/8] ipq806x: Point to externally compiled dtbs in recipes

Message ID 20230102232534.592501-2-computersforpeace@gmail.com
State Superseded
Delegated to: Petr Štetiar
Headers show
Series [1/8] base-files: Remove nand.sh dependency from emmc upgrade | expand

Commit Message

Brian Norris Jan. 2, 2023, 11:25 p.m. UTC
See also:

commit 4d8b42d8a7774070ac0439915f8de1430db9a8e3
Author: Tomasz Maciej Nowak <tmn505@gmail.com>
Date:   Thu Aug 25 20:26:11 2022 +0200

    ipq40xx: point to externally compiled dtbs in recipes

    Adjusting dts will cause a rebuild of whole kernel as the buildroot
    considers this a part of kernel source. It's a royal PITA when trying to
    prepare support for new device, since this takes a lot of time on slower
    systems. As it stands, buildroot itself, with own rule, also compiles
    dtbs and the results are $(KDIR)/image-$(DEVICE_DTS).dtb. With setting
    DEVICE_DTS_DIR to directory holding the device dts (similarly to some
    other targets), buildroot doesn't consider changed dts as part of kernel
    source and rebuilds only dtb. This really speeds up development. And
    since the kernel built dts are no longer used, drop the paches adding
    dtses to its build.

In a similar fashion, we can drop the DTS patch.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---

 target/linux/ipq806x/image/Makefile           |  5 +--
 .../0069-arm-boot-add-dts-files.patch         | 43 -------------------
 .../0069-arm-boot-add-dts-files.patch         | 43 -------------------
 3 files changed, 2 insertions(+), 89 deletions(-)
 delete mode 100644 target/linux/ipq806x/patches-5.10/0069-arm-boot-add-dts-files.patch
 delete mode 100644 target/linux/ipq806x/patches-5.15/0069-arm-boot-add-dts-files.patch

Comments

Christian Marangi Jan. 4, 2023, 12:50 p.m. UTC | #1
On Mon, Jan 02, 2023 at 03:25:28PM -0800, Brian Norris wrote:
> See also:
> 
> commit 4d8b42d8a7774070ac0439915f8de1430db9a8e3
> Author: Tomasz Maciej Nowak <tmn505@gmail.com>
> Date:   Thu Aug 25 20:26:11 2022 +0200
> 
>     ipq40xx: point to externally compiled dtbs in recipes
> 
>     Adjusting dts will cause a rebuild of whole kernel as the buildroot
>     considers this a part of kernel source. It's a royal PITA when trying to
>     prepare support for new device, since this takes a lot of time on slower
>     systems. As it stands, buildroot itself, with own rule, also compiles
>     dtbs and the results are $(KDIR)/image-$(DEVICE_DTS).dtb. With setting
>     DEVICE_DTS_DIR to directory holding the device dts (similarly to some
>     other targets), buildroot doesn't consider changed dts as part of kernel
>     source and rebuilds only dtb. This really speeds up development. And
>     since the kernel built dts are no longer used, drop the paches adding
>     dtses to its build.
> 
> In a similar fashion, we can drop the DTS patch.

Can we improve the commit description without appending the commit
description of another commit? Seems wrong to me.

If you already found a similar commit description feel free to link as I
could be totally wrong about this.

> 
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> ---
> 
>  target/linux/ipq806x/image/Makefile           |  5 +--
>  .../0069-arm-boot-add-dts-files.patch         | 43 -------------------
>  .../0069-arm-boot-add-dts-files.patch         | 43 -------------------
>  3 files changed, 2 insertions(+), 89 deletions(-)
>  delete mode 100644 target/linux/ipq806x/patches-5.10/0069-arm-boot-add-dts-files.patch
>  delete mode 100644 target/linux/ipq806x/patches-5.15/0069-arm-boot-add-dts-files.patch
> 
> diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile
> index f4f829b35c65..8c1fc88010cd 100644
> --- a/target/linux/ipq806x/image/Makefile
> +++ b/target/linux/ipq806x/image/Makefile
> @@ -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
> index 4c42f40e3d78..000000000000
> --- a/target/linux/ipq806x/patches-5.10/0069-arm-boot-add-dts-files.patch
> +++ /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
> index 698df248fb57..000000000000
> --- a/target/linux/ipq806x/patches-5.15/0069-arm-boot-add-dts-files.patch
> +++ /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 \
> -- 
> 2.39.0
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Brian Norris Jan. 5, 2023, 2:29 a.m. UTC | #2
On Wed, Jan 04, 2023 at 01:50:17PM +0100, Christian Marangi wrote:
> On Mon, Jan 02, 2023 at 03:25:28PM -0800, Brian Norris wrote:
> > See also:
> > 
> > commit 4d8b42d8a7774070ac0439915f8de1430db9a8e3
> > Author: Tomasz Maciej Nowak <tmn505@gmail.com>
> > Date:   Thu Aug 25 20:26:11 2022 +0200
> > 
> >     ipq40xx: point to externally compiled dtbs in recipes
> > 
> >     Adjusting dts will cause a rebuild of whole kernel as the buildroot
> >     considers this a part of kernel source. It's a royal PITA when trying to
> >     prepare support for new device, since this takes a lot of time on slower
> >     systems. As it stands, buildroot itself, with own rule, also compiles
> >     dtbs and the results are $(KDIR)/image-$(DEVICE_DTS).dtb. With setting
> >     DEVICE_DTS_DIR to directory holding the device dts (similarly to some
> >     other targets), buildroot doesn't consider changed dts as part of kernel
> >     source and rebuilds only dtb. This really speeds up development. And
> >     since the kernel built dts are no longer used, drop the paches adding
> >     dtses to its build.
> > 
> > In a similar fashion, we can drop the DTS patch.
> 
> Can we improve the commit description without appending the commit
> description of another commit? Seems wrong to me.

Sure. I suppose I can liberally borrow (and reference) the description
instead of quoting.

> If you already found a similar commit description feel free to link as I
> could be totally wrong about this.

Eh, my quick search didn't really find any. The closest was something
like this:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=0dc58214896aacf67a3759495d70e2b4e9c160d8
where at least some of the larger metadata (author, commiter, dates)
were pasted.

Brian
diff mbox series

Patch

diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile
index f4f829b35c65..8c1fc88010cd 100644
--- a/target/linux/ipq806x/image/Makefile
+++ b/target/linux/ipq806x/image/Makefile
@@ -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
index 4c42f40e3d78..000000000000
--- a/target/linux/ipq806x/patches-5.10/0069-arm-boot-add-dts-files.patch
+++ /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
index 698df248fb57..000000000000
--- a/target/linux/ipq806x/patches-5.15/0069-arm-boot-add-dts-files.patch
+++ /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 \