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 Joshua Riek
parent db0a2e2882
commit e49f595915
4 changed files with 24 additions and 1 deletions

View File

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

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
Image
Image.gz
*.dtb*
*.scr

View File

@@ -18,9 +18,11 @@ include 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

@@ -334,6 +334,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 += $(call dtc-option,-Wno-unit_address_vs_reg) \
@@ -401,6 +404,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) -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