mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 06:33:41 +00:00
84ee3436a4
Similar to commit 4d8b42d8a7
("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>
44 lines
1.1 KiB
Makefile
44 lines
1.1 KiB
Makefile
# Copyright (c) 2014 The Linux Foundation. All rights reserved.
|
|
#
|
|
include $(TOPDIR)/rules.mk
|
|
include $(INCLUDE_DIR)/image.mk
|
|
|
|
define Device/Default
|
|
PROFILES := Default
|
|
KERNEL_LOADADDR = 0x42208000
|
|
DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
|
|
DEVICE_DTS_CONFIG := config@1
|
|
IMAGES := sysupgrade.bin
|
|
IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata
|
|
IMAGE/sysupgrade.bin/squashfs :=
|
|
endef
|
|
|
|
define Device/LegacyImage
|
|
KERNEL_SUFFIX := -uImage
|
|
KERNEL = kernel-bin | append-dtb | uImage none
|
|
KERNEL_NAME := zImage
|
|
endef
|
|
|
|
define Device/FitImage
|
|
KERNEL_SUFFIX := -fit-uImage.itb
|
|
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 $$(KDIR)/image-$$(DEVICE_DTS).dtb
|
|
KERNEL_NAME := Image
|
|
endef
|
|
|
|
define Device/UbiFit
|
|
KERNEL_IN_UBI := 1
|
|
IMAGES := nand-factory.bin nand-sysupgrade.bin
|
|
IMAGE/nand-factory.bin := append-ubi
|
|
IMAGE/nand-sysupgrade.bin := sysupgrade-tar | append-metadata
|
|
endef
|
|
|
|
include $(SUBTARGET).mk
|
|
|
|
$(eval $(call BuildImage))
|