blob: f40fe382f570cec5822837d468678af3b80a5d6c [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001# SPDX-License-Identifier: GPL-2.0+
Michal Simekaf482d52012-09-28 09:56:37 +00002#
3# (C) Copyright 2000-2006
4# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
Michal Simekaf482d52012-09-28 09:56:37 +00005
Masahiro Yamada5d23de52013-10-21 11:53:37 +09006obj-y := board.o
Masahiro Yamadac2d10792014-05-12 12:18:30 +09007
Luca Ceresolib0172c32018-06-22 12:40:16 +02008ifneq ($(CONFIG_XILINX_PS_INIT_FILE),"")
9PS_INIT_FILE := $(shell cd $(srctree); readlink -f $(CONFIG_XILINX_PS_INIT_FILE))
10init-objs := ps_init_gpl.o
11spl/board/xilinx/zynq/ps_init_gpl.o board/xilinx/zynq/ps_init_gpl.o: $(PS_INIT_FILE)
12 $(CC) $(c_flags) -I $(srctree)/$(src) -c -o $@ $^
13endif
Masahiro Yamada2ab28d12015-05-18 15:31:52 +090014
Michal Simek8a8683c2020-02-13 14:36:34 +010015DEVICE_TREE ?= $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%)
16ifeq ($(DEVICE_TREE),)
17DEVICE_TREE := unset
18endif
19
Luca Ceresolib0172c32018-06-22 12:40:16 +020020ifeq ($(init-objs),)
Michal Simek6894d9d2019-12-06 12:05:34 +010021hw-platform-y :=$(shell echo $(DEVICE_TREE))
Masahiro Yamada2ab28d12015-05-18 15:31:52 +090022init-objs := $(if $(wildcard $(srctree)/$(src)/$(hw-platform-y)/ps7_init_gpl.c),\
23 $(hw-platform-y)/ps7_init_gpl.o)
Luca Ceresolib0172c32018-06-22 12:40:16 +020024endif
Masahiro Yamada2ab28d12015-05-18 15:31:52 +090025
26ifeq ($(init-objs),)
27ifneq ($(wildcard $(srctree)/$(src)/ps7_init_gpl.c),)
28init-objs := ps7_init_gpl.o
Simon Glass49c24a82024-09-29 19:49:47 -060029$(if $(CONFIG_XPL_BUILD),\
Michal Simekb9c834a2015-07-21 11:05:31 +020030$(warning Put custom ps7_init_gpl.c/h to board/xilinx/zynq/custom_hw_platform/))
Masahiro Yamada2ab28d12015-05-18 15:31:52 +090031endif
32endif
33
Simon Glass49c24a82024-09-29 19:49:47 -060034ifndef CONFIG_XPL_BUILD
Siva Durga Prasad Paladugue4603522018-06-26 15:02:19 +053035obj-$(CONFIG_CMD_ZYNQ) += cmds.o
36obj-$(CONFIG_CMD_ZYNQ_RSA) += bootimg.o
37endif
38
Simon Glass49c24a82024-09-29 19:49:47 -060039obj-$(CONFIG_XPL_BUILD) += $(init-objs)
Masahiro Yamada50ee0662014-05-29 14:46:13 +090040
41# Suppress "warning: function declaration isn't a prototype"
Soren Brinkmann00685432014-10-30 10:52:43 -070042CFLAGS_REMOVE_ps7_init_gpl.o := -Wstrict-prototypes
Masahiro Yamada17b3d372015-05-18 15:31:51 +090043
Masahiro Yamada2ab28d12015-05-18 15:31:52 +090044# To include xil_io.h
45CFLAGS_ps7_init_gpl.o := -I$(srctree)/$(src)