include/image*: add support for device-tree overlays
Add new target feature 'dt-overlay' which makes DTC keep the symbol names in the generated dtb. Make sure additional DT overlay sources specified by the new device variable DEVICE_DTS_OVERLAY get compiled together with the main DTS (currently overlays got to be in the same folder). Let Build/fit pass the generated DT overlay blobs to mkits.sh. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
@@ -190,6 +190,7 @@ define Image/BuildDTB
|
||||
-o $(2).tmp $(1)
|
||||
$(LINUX_DIR)/scripts/dtc/dtc -O dtb \
|
||||
-i$(dir $(1)) $(DTC_FLAGS) $(4) \
|
||||
$(if $(CONFIG_HAS_DT_OVERLAY_SUPPORT),-@) \
|
||||
-o $(2) $(2).tmp
|
||||
$(RM) $(2).tmp
|
||||
endef
|
||||
@@ -393,6 +394,7 @@ define Device/Init
|
||||
DEVICE_DTS :=
|
||||
DEVICE_DTS_CONFIG :=
|
||||
DEVICE_DTS_DIR :=
|
||||
DEVICE_DTS_OVERLAY :=
|
||||
DEVICE_FDT_NUM :=
|
||||
SOC :=
|
||||
|
||||
@@ -416,8 +418,8 @@ DEFAULT_DEVICE_VARS := \
|
||||
DEVICE_NAME KERNEL KERNEL_INITRAMFS KERNEL_INITRAMFS_IMAGE KERNEL_SIZE \
|
||||
CMDLINE UBOOTENV_IN_UBI KERNEL_IN_UBI BLOCKSIZE PAGESIZE SUBPAGESIZE \
|
||||
VID_HDR_OFFSET UBINIZE_OPTS UBINIZE_PARTS MKUBIFS_OPTS DEVICE_DTS \
|
||||
DEVICE_DTS_CONFIG DEVICE_DTS_DIR DEVICE_FDT_NUM SOC BOARD_NAME \
|
||||
UIMAGE_MAGIC UIMAGE_NAME \
|
||||
DEVICE_DTS_CONFIG DEVICE_DTS_DIR DEVICE_DTS_OVERLAY DEVICE_FDT_NUM \
|
||||
SOC BOARD_NAME UIMAGE_MAGIC UIMAGE_NAME \
|
||||
SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR \
|
||||
UBOOT_PATH IMAGE_SIZE \
|
||||
DEVICE_COMPAT_VERSION DEVICE_COMPAT_MESSAGE \
|
||||
@@ -539,7 +541,7 @@ endef
|
||||
endif
|
||||
|
||||
define Device/Build/kernel
|
||||
$$(eval $$(foreach dts,$$(DEVICE_DTS), \
|
||||
$$(eval $$(foreach dts,$$(DEVICE_DTS) $$(DEVICE_DTS_OVERLAY), \
|
||||
$$(call Device/Build/dtb,$$(notdir $$(dts)), \
|
||||
$$(if $$(DEVICE_DTS_DIR),$$(DEVICE_DTS_DIR),$$(DTS_DIR)), \
|
||||
$$(dts) \
|
||||
|
||||
Reference in New Issue
Block a user