Skip to content

Commit 4b95462

Browse files
committed
Overlays: Port RPi Overlay building
Signed-off-by: Robert Nelson <[email protected]>
1 parent 423baf8 commit 4b95462

File tree

4 files changed

+21
-28
lines changed

4 files changed

+21
-28
lines changed

arch/arm/boot/dts/Makefile

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,22 +1263,8 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
12631263
aspeed-bmc-portwell-neptune.dtb \
12641264
aspeed-bmc-quanta-q71l.dtb
12651265

1266-
ifeq ($(BUILD_ITBS),y)
1267-
dtb-y=
1268-
dtb-merge-y=
1269-
else
1270-
dts-dirs=
1271-
endif
1272-
1273-
always += $(dtb-merge-y)
1274-
1275-
$(addprefix $(obj)/,$(dtb-merge-y)): TI_DTBOS
1276-
@$(srctree)/scripts/dtb-merge $(srctree) $(objtree) $@ $(objtree)/scripts/dtc/fdtoverlay $(src)/ti
1277-
1278-
TI_DTBOS:
1279-
$(Q)$(MAKE) $(build)=$(src)/ti
1266+
targets += dtbs dtbs_install
1267+
targets += $(dtb-y)
12801268

1281-
PHONY += TI_DTBOS
1269+
subdir-y := overlays
12821270

1283-
subdir-y += $(dts-dirs)
1284-
subdir- += ti

scripts/Kbuild.include

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ ksym_dep_filter = \
287287
$(CPP) $(call flags_nodeps,c_flags) -D__KSYM_DEPS__ $< ;; \
288288
as_*_S|cpp_s_S) \
289289
$(CPP) $(call flags_nodeps,a_flags) -D__KSYM_DEPS__ $< ;; \
290-
boot*|build*|cpp_its_S|*cpp_lds_S|dtc|host*|vdso*) : ;; \
290+
boot*|build*|cpp_its_S|*cpp_lds_S|dtc*|host*|vdso*) : ;; \
291291
*) echo "Don't know how to preprocess $(1)" >&2; false ;; \
292292
esac | tr ";" "\n" | sed -n 's/^.*=== __KSYM_\(.*\) ===.*$$/_\1/p'
293293

scripts/Makefile.dtbinst

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ include scripts/Kbuild.include
2020
include $(src)/Makefile
2121

2222
dtbinst-files := $(sort $(dtb-y) $(if $(CONFIG_OF_ALL_DTBS), $(dtb-)))
23+
dtboinst-files := $(sort $(dtbo-y) $(if $(CONFIG_OF_ALL_DTBS), $(dtb-)))
2324
dtbinst-dirs := $(subdir-y) $(subdir-m)
2425

2526
# Helper targets for Installing DTBs into the boot directory
@@ -28,22 +29,16 @@ quiet_cmd_dtb_install = INSTALL $<
2829

2930
install-dir = $(patsubst $(dtbinst_root)%,$(INSTALL_DTBS_PATH)%,$(obj))
3031

31-
$(filter %.dtb,$(dtbinst-files)): %.dtb: $(obj)/%.dtb
32+
$(dtbinst-files): %.dtb: $(obj)/%.dtb
3233
$(call cmd,dtb_install,$(install-dir))
3334

34-
$(filter %.dtbo,$(dtbinst-files)): %.dtbo: $(obj)/%.dtbo
35-
$(call cmd,dtb_install,$(install-dir))
36-
37-
$(filter %.itb,$(dtbinst-files)): %.itb: $(obj)/%.itb
35+
$(dtboinst-files): %.dtbo: $(obj)/%.dtbo
3836
$(call cmd,dtb_install,$(install-dir))
3937

4038
$(dtbinst-dirs):
4139
$(Q)$(MAKE) $(dtbinst)=$(obj)/$@
4240

43-
dummy:
44-
@echo > /dev/null
45-
46-
PHONY += $(dtbinst-files) $(dtbinst-dirs) dummy
47-
__dtbs_install: $(dtbinst-files) $(dtbinst-dirs) dummy
41+
PHONY += $(dtbinst-files) $(dtboinst-files) $(dtbinst-dirs)
42+
__dtbs_install: $(dtbinst-files) $(dtboinst-files) $(dtbinst-dirs)
4843

4944
.PHONY: $(PHONY)

scripts/Makefile.lib

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,18 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
293293
$(obj)/%.dtb: $(src)/%.dts $(DTC) FORCE
294294
$(call if_changed_dep,dtc)
295295

296+
quiet_cmd_dtco = DTCO $@
297+
cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \
298+
$(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
299+
$(DTC) -@ -H epapr -O dtb -o $@ -b 0 \
300+
-i $(dir $<) $(DTC_FLAGS) \
301+
-Wno-interrupts_property \
302+
-d $(depfile).dtc.tmp $(dtc-tmp) ; \
303+
cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
304+
305+
$(obj)/%.dtbo: $(src)/%.dts FORCE
306+
$(call if_changed_dep,dtco)
307+
296308
dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
297309

298310
# Bzip2

0 commit comments

Comments
 (0)