1# SPDX-License-Identifier: GPL-2.0
2#
3
4ifneq ($(DTB),)
5obj-y += linked_dtb.o
6
7# Ensure system.dtb exists
8$(obj)/linked_dtb.o: $(obj)/system.dtb
9
10# Generate system.dtb from $(DTB).dtb
11ifneq ($(DTB),system)
12$(obj)/system.dtb: $(obj)/$(DTB).dtb
13	$(call if_changed,cp)
14endif
15endif
16
17quiet_cmd_cp = CP      $< $@$2
18	cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)
19
20# Rule to build device tree blobs
21DTC_FLAGS := -p 1024
22