scripts: install dtbo files to kernel packages

Signed-off-by: Stephen Chen <stephen@radxa.com>
This commit is contained in:
Stephen Chen
2022-11-09 20:59:16 +08:00
committed by boogie
parent d8e42edcd6
commit 282e97e363
4 changed files with 24 additions and 1 deletions

View File

@@ -4,3 +4,5 @@ zImage
xipImage
bootpImage
uImage
*.dtb*
*.scr

View File

@@ -2,3 +2,5 @@
Image
Image.gz
vmlinuz*
*.dtb*
*.scr

View File

@@ -18,9 +18,11 @@ include $(srctree)/scripts/Kbuild.include
include $(src)/Makefile
dtbs := $(addprefix $(dst)/, $(dtb-y) $(if $(CONFIG_OF_ALL_DTBS),$(dtb-)))
dtbos := $(addprefix $(dst)/, $(dtbo-y))
readmes := $(addprefix $(dst)/, $(dtbotxt-y))
subdirs := $(addprefix $(obj)/, $(subdir-y) $(subdir-m))
__dtbs_install: $(dtbs) $(subdirs)
__dtbs_install: $(dtbs) $(dtbos) $(readmes) $(subdirs)
@:
quiet_cmd_dtb_install = INSTALL $@
@@ -32,6 +34,9 @@ $(dst)/%.dtb: $(obj)/%.dtb
$(dst)/%.dtbo: $(obj)/%.dtbo
$(call cmd,dtb_install)
$(dst)/README.rockchip-overlays: $(src)/README.rockchip-overlays
$(call cmd,dtb_install)
PHONY += $(subdirs)
$(subdirs):
$(Q)$(MAKE) $(dtbinst)=$@ dst=$(patsubst $(obj)/%,$(dst)/%,$@)

View File

@@ -349,6 +349,9 @@ ifeq ($(CONFIG_DTC_OMIT_EMPTY),y)
DTC_FLAGS += -Wnode_empty
endif
# Overlay support
DTC_FLAGS += -@ -Wno-unit_address_format -Wno-simple_bus_reg
# Disable noisy checks by default
ifeq ($(findstring 1,$(KBUILD_EXTRA_WARN)),)
DTC_FLAGS += -Wno-unit_address_vs_reg \
@@ -425,6 +428,17 @@ $(obj)/%.dtb: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE
$(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE
$(call if_changed_dep,dtc)
quiet_cmd_dtco = DTCO $@
cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \
$(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
$(DTC) -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: $(src)/%.dts FORCE
$(call if_changed_dep,dtco)
dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
# Bzip2