xref: /linux/scripts/dtc/include-prefixes/microblaze/Makefile (revision 92f687f40ee511e0ea6046bf63ceb48ff3ad1494)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
2300db34aSStephen Warren#
3300db34aSStephen Warren
4*92f687f4SRob Herringdtb-y := system.dtb
5*92f687f4SRob Herring
637c8a5faSRob Herringifneq ($(DTB),)
7300db34aSStephen Warrenobj-y += linked_dtb.o
8300db34aSStephen Warren
9300db34aSStephen Warren# Ensure system.dtb exists
10300db34aSStephen Warren$(obj)/linked_dtb.o: $(obj)/system.dtb
11300db34aSStephen Warren
12300db34aSStephen Warren# Generate system.dtb from $(DTB).dtb
13300db34aSStephen Warrenifneq ($(DTB),system)
14300db34aSStephen Warren$(obj)/system.dtb: $(obj)/$(DTB).dtb
15300db34aSStephen Warren	$(call if_changed,cp)
16300db34aSStephen Warrenendif
1737c8a5faSRob Herringendif
18300db34aSStephen Warren
19300db34aSStephen Warrenquiet_cmd_cp = CP      $< $@$2
20300db34aSStephen Warren	cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)
21300db34aSStephen Warren
22300db34aSStephen Warren# Rule to build device tree blobs
23300db34aSStephen WarrenDTC_FLAGS := -p 1024
24