1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 2300db34aSStephen Warren# 3300db34aSStephen Warren 437c8a5faSRob Herringifneq ($(DTB),) 5300db34aSStephen Warrenobj-y += linked_dtb.o 6300db34aSStephen Warren 7300db34aSStephen Warren# Ensure system.dtb exists 8300db34aSStephen Warren$(obj)/linked_dtb.o: $(obj)/system.dtb 9300db34aSStephen Warren 10300db34aSStephen Warren# Generate system.dtb from $(DTB).dtb 11300db34aSStephen Warrenifneq ($(DTB),system) 12300db34aSStephen Warren$(obj)/system.dtb: $(obj)/$(DTB).dtb 13300db34aSStephen Warren $(call if_changed,cp) 14300db34aSStephen Warrenendif 1537c8a5faSRob Herringendif 16300db34aSStephen Warren 17300db34aSStephen Warrenquiet_cmd_cp = CP $< $@$2 18300db34aSStephen Warren cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false) 19300db34aSStephen Warren 20300db34aSStephen Warren# Rule to build device tree blobs 21300db34aSStephen WarrenDTC_FLAGS := -p 1024 22