xref: /openbmc/linux/arch/microblaze/boot/dts/Makefile (revision b2441318)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
2300db34aSStephen Warren#
3300db34aSStephen Warren
4300db34aSStephen Warrenobj-y += linked_dtb.o
5300db34aSStephen Warren
6300db34aSStephen Warren# Ensure system.dtb exists
7300db34aSStephen Warren$(obj)/linked_dtb.o: $(obj)/system.dtb
8300db34aSStephen Warren
9300db34aSStephen Warren# Generate system.dtb from $(DTB).dtb
10300db34aSStephen Warrenifneq ($(DTB),system)
11300db34aSStephen Warren$(obj)/system.dtb: $(obj)/$(DTB).dtb
12300db34aSStephen Warren	$(call if_changed,cp)
13300db34aSStephen Warrenendif
14300db34aSStephen Warren
15300db34aSStephen Warrenquiet_cmd_cp = CP      $< $@$2
16300db34aSStephen Warren	cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)
17300db34aSStephen Warren
18300db34aSStephen Warren# Rule to build device tree blobs
19300db34aSStephen WarrenDTC_FLAGS := -p 1024
20