diff --git a/.gitignore b/.gitignore index 763d0b2706f2..d0c2b1f2dc54 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ *.c.[012]*.* *.dt.yaml *.dtb +*.dtbo *.dtb.S *.dwo *.elf diff --git a/Makefile b/Makefile index 49d1d03a895e..507d319e1113 100644 --- a/Makefile +++ b/Makefile @@ -1947,6 +1947,7 @@ clean: $(clean-dirs) \( -name '*.[aios]' -o -name '*.ko' -o -name '.*.cmd' \ -o -name '*.ko.*' \ -o -name '*.dtb' -o -name '*.dtb.S' -o -name '*.dt.yaml' \ + -o -name '*.dtbo' -o -name '*.dtbo.S' \ -o -name '*.dwo' -o -name '*.lst' \ -o -name '*.su' -o -name '*.mod' \ -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile index afe2b1ff7f9a..216efe8ab062 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile @@ -209,3 +209,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-tablet-rk806-single-v10.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-tablet-v10.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-tablet-v11.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-odroid-m1.dtb + +subdir-$(CONFIG_ARCH_ROCKCHIP_ODROIDM1) += overlays/odroidm1 diff --git a/arch/arm64/boot/dts/rockchip/overlays/odroidm1/Makefile b/arch/arm64/boot/dts/rockchip/overlays/odroidm1/Makefile new file mode 100644 index 000000000000..cfda2a50a5e7 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlays/odroidm1/Makefile @@ -0,0 +1,5 @@ +# Overlays for the Odroid platform + + +targets += $(dtbo-y) +always := $(dtbo-y) diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst index 50d580d77ae9..3a8d1fd2f5a1 100644 --- a/scripts/Makefile.dtbinst +++ b/scripts/Makefile.dtbinst @@ -18,17 +18,22 @@ include scripts/Kbuild.include include $(src)/Makefile dtbs := $(addprefix $(dst)/, $(dtb-y) $(if $(CONFIG_OF_ALL_DTBS),$(dtb-))) +dtbos := $(addprefix $(dst)/, $(dtbo-y) $(if $(CONFIG_OF_ALL_DTBS),$(dtbo-))) subdirs := $(addprefix $(obj)/, $(subdir-y) $(subdir-m)) -__dtbs_install: $(dtbs) $(subdirs) +__dtbs_install: $(dtbs) $(dtbos) $(subdirs) @: +# Helper targets for Installing DTBs into the boot directory quiet_cmd_dtb_install = INSTALL $@ cmd_dtb_install = install -D $< $@ $(dst)/%.dtb: $(obj)/%.dtb $(call cmd,dtb_install) +$(dst)/%.dtbo: $(obj)/%.dtbo + $(call cmd,dtb_install) + PHONY += $(subdirs) $(subdirs): $(Q)$(MAKE) $(dtbinst)=$@ dst=$(patsubst $(obj)/%,$(dst)/%,$@) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 39e47362df36..ccabdf4c4294 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -341,7 +341,8 @@ DTC_FLAGS += $(call dtc-option,-Wno-unit_address_vs_reg) \ $(call dtc-option,-Wno-graph_child_address) \ $(call dtc-option,-Wno-simple_bus_reg) \ $(call dtc-option,-Wno-unique_unit_address) \ - $(call dtc-option,-Wno-pci_device_reg) + $(call dtc-option,-Wno-pci_device_reg) \ + $(call dtc-option,--symbols) endif ifneq ($(findstring 2,$(KBUILD_EXTRA_WARN)),) @@ -396,6 +397,17 @@ endef $(obj)/%.dt.yaml: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE $(call if_changed_rule,dtc,yaml) +quiet_cmd_dtco = DTCO $@ +cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \ + $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ + $(DTC) -@ -H epapr -O dtb -o $@ -b 0 \ + -i $(dir $<) $(DTC_FLAGS) \ + -d $(depfile).dtc.tmp $(dtc-tmp) ; \ + cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) + +$(obj)/%.dtbo: $(obj)/%.dts FORCE + $(call if_changed_dep,dtco) + dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp) # Bzip2