$(KDIR)/image-$(1).dtb: FORCE
$(call Image/BuildDTB,$(strip $(2))/$(strip $(3)).dts,$$@)
- image_prepare: $(KDIR)/image-$(1).dtb
+ compile-dtb: $(KDIR)/image-$(1).dtb
endif
endef
$(KDIR)/image-$(1).dtbo: FORCE
$(call Image/BuildDTBO,$(strip $(2))/$(strip $(3)).dtso,$$@)
- image_prepare: $(KDIR)/image-$(1).dtbo
+ compile-dtb: $(KDIR)/image-$(1).dtbo
endif
endef
download:
prepare:
compile:
+ compile-dtb:
clean:
image_prepare:
ifeq ($(IB),)
- .PHONY: download prepare compile clean image_prepare kernel_prepare install install-images
+ .PHONY: download prepare compile compile-dtb clean image_prepare kernel_prepare install install-images
compile:
$(call Build/Compile)
clean:
$(call Build/Clean)
- image_prepare: compile
+ compile-dtb:
+ image_prepare: compile compile-dtb
mkdir -p $(BIN_DIR) $(KDIR)/tmp
rm -rf $(BUILD_DIR)/json_info_files
$(call Image/Prepare)
compile: $(LINUX_DIR)/.modules
$(MAKE) -C image compile TARGET_BUILD=
+ dtb: $(STAMP_CONFIGURED)
+ $(_SINGLE)$(KERNEL_MAKE) scripts_dtc
+ $(MAKE) -C image compile-dtb TARGET_BUILD=
+
oldconfig menuconfig nconfig xconfig: $(STAMP_PREPARED) $(STAMP_CHECKED) FORCE
rm -f $(LINUX_DIR)/.config.prev
rm -f $(STAMP_CONFIGURED)
ifeq ($(MAKECMDGOALS),prereq)
SUBTARGETS:=prereq
PREREQ_ONLY:=1
+# For target/linux related target add dtb to selectively compile dtbs
+else ifneq ($(filter target/linux/%,$(MAKECMDGOALS)),)
+ SUBTARGETS:=$(DEFAULT_SUBDIR_TARGETS) dtb
else
SUBTARGETS:=$(DEFAULT_SUBDIR_TARGETS)
endif