[PATCH] ipq40xx: point to externally compiled dtbs in recipes

Tomasz Maciej Nowak tmn505 at gmail.com
Thu Aug 25 08:04:54 PDT 2022


W dniu 25.08.2022 o 13:32, Robert Marko pisze:
> On Wed, 24 Aug 2022 at 19:30, Tomasz Maciej Nowak <tmn505 at terefe.re> wrote:
>>
>> From: Tomasz Maciej Nowak <tmn505 at gmail.com>
>>
>> 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.
>>
>> Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
> 
> Hi,

Hi

> At first glance, it looks fine to me.
> Shouldn't we be able to get rid of the
> 901-arm-boot-add-dts-files.patch as kernel generated DTB-s
> are not used anymore.

That's indeed the case and I slightly half-assed this. I'll send v2 which
will remove those patches.

> 
> Regards,
> Robert

Thanks and regards

>> ---
>>  target/linux/ipq40xx/image/chromium.mk |  2 +-
>>  target/linux/ipq40xx/image/generic.mk  | 20 ++++++++++----------
>>  2 files changed, 11 insertions(+), 11 deletions(-)
>>
>> diff --git a/target/linux/ipq40xx/image/chromium.mk b/target/linux/ipq40xx/image/chromium.mk
>> index 567a5e7ca5c7..2abd2df02ae4 100644
>> --- a/target/linux/ipq40xx/image/chromium.mk
>> +++ b/target/linux/ipq40xx/image/chromium.mk
>> @@ -26,7 +26,7 @@ define Device/google_wifi
>>         DEVICE_MODEL := WiFi (Gale)
>>         SOC := qcom-ipq4019
>>         KERNEL_SUFFIX := -fit-zImage.itb.vboot
>> -       KERNEL = kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb | cros-vboot
>> +       KERNEL = kernel-bin | fit none $$(KDIR)/image-$$(DEVICE_DTS).dtb | cros-vboot
>>         KERNEL_NAME := zImage
>>         IMAGES += factory.bin
>>         IMAGE/factory.bin := cros-gpt | append-kernel-part | append-rootfs
>> diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk
>> index 792122f7a1ae..6daebd5ed0f5 100644
>> --- a/target/linux/ipq40xx/image/generic.mk
>> +++ b/target/linux/ipq40xx/image/generic.mk
>> @@ -5,19 +5,19 @@ DEVICE_VARS += WRGG_DEVNAME WRGG_SIGNATURE
>>
>>  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
>>
>>  define Device/FitzImage
>>         KERNEL_SUFFIX := -fit-zImage.itb
>> -       KERNEL = kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb
>> +       KERNEL = kernel-bin | fit none $$(KDIR)/image-$$(DEVICE_DTS).dtb
>>         KERNEL_NAME := zImage
>>  endef
>>
>> @@ -308,8 +308,8 @@ TARGET_DEVICES += buffalo_wtr-m2133hp
>>
>>  define Device/cellc_rtl30vw
>>         KERNEL_SUFFIX := -fit-zImage.itb
>> -       KERNEL_INITRAMFS = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
>> -       KERNEL = kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb | uImage lzma | pad-to 2048
>> +       KERNEL_INITRAMFS = kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(DEVICE_DTS).dtb
>> +       KERNEL = kernel-bin | fit none $$(KDIR)/image-$$(DEVICE_DTS).dtb | uImage lzma | pad-to 2048
>>         KERNEL_NAME := zImage
>>         KERNEL_IN_UBI :=
>>         IMAGES := nand-factory.bin nand-sysupgrade.bin
>> @@ -376,7 +376,7 @@ define Device/devolo_magic-2-wifi-next
>>
>>         # If the bootloader sees 0xDEADC0DE and this trailer at the 64k boundary of a TFTP image
>>         # it will bootm it, just like we want for the initramfs.
>> -       KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to 64k |\
>> +       KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(DEVICE_DTS).dtb | pad-to 64k |\
>>                 append-string -e '\xDE\xAD\xC0\xDE{"fl_initramfs":""}\x00'
>>
>>         IMAGE_SIZE := 26624k
>> @@ -832,7 +832,7 @@ define Device/openmesh_a42
>>         SOC := qcom-ipq4018
>>         DEVICE_DTS_CONFIG := config at om.a42
>>         BLOCKSIZE := 64k
>> -       KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
>> +       KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
>>         IMAGE_SIZE := 15616k
>>         IMAGES += factory.bin
>>         IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A42
>> @@ -847,7 +847,7 @@ define Device/openmesh_a62
>>         SOC := qcom-ipq4019
>>         DEVICE_DTS_CONFIG := config at om.a62
>>         BLOCKSIZE := 64k
>> -       KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
>> +       KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
>>         IMAGE_SIZE := 15552k
>>         IMAGES += factory.bin
>>         IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A62
>> @@ -889,7 +889,7 @@ define Device/plasmacloud_pa1200
>>         SOC := qcom-ipq4018
>>         DEVICE_DTS_CONFIG := config at pc.pa1200
>>         BLOCKSIZE := 64k
>> -       KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
>> +       KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
>>         IMAGE_SIZE := 15616k
>>         IMAGES += factory.bin
>>         IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA1200
>> @@ -904,7 +904,7 @@ define Device/plasmacloud_pa2200
>>         SOC := qcom-ipq4019
>>         DEVICE_DTS_CONFIG := config at pc.pa2200
>>         BLOCKSIZE := 64k
>> -       KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
>> +       KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
>>         IMAGE_SIZE := 15552k
>>         IMAGES += factory.bin
>>         IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA2200
>> --
>> 2.37.2
>>
>>
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

-- 
TMN



More information about the openwrt-devel mailing list