blob: e7645be189c3c070da8c4319b90b0079a2f2008c [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001# SPDX-License-Identifier: GPL-2.0+
Michal Simekf22651c2012-09-28 09:56:37 +00002#
3# (C) Copyright 2000-2006
4# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
Michal Simekf22651c2012-09-28 09:56:37 +00005
Masahiro Yamadaa79854a2013-10-21 11:53:37 +09006obj-y := board.o
Masahiro Yamada66e67152014-05-12 12:18:30 +09007
Luca Ceresoli6da4f672018-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 Yamada95b237e2015-05-18 15:31:52 +090014
Luca Ceresoli6da4f672018-06-22 12:40:16 +020015ifeq ($(init-objs),)
16hw-platform-y :=$(shell echo $(CONFIG_DEFAULT_DEVICE_TREE))
Masahiro Yamada95b237e2015-05-18 15:31:52 +090017init-objs := $(if $(wildcard $(srctree)/$(src)/$(hw-platform-y)/ps7_init_gpl.c),\
18 $(hw-platform-y)/ps7_init_gpl.o)
Luca Ceresoli6da4f672018-06-22 12:40:16 +020019endif
Masahiro Yamada95b237e2015-05-18 15:31:52 +090020
21ifeq ($(init-objs),)
22ifneq ($(wildcard $(srctree)/$(src)/ps7_init_gpl.c),)
23init-objs := ps7_init_gpl.o
24$(if $(CONFIG_SPL_BUILD),\
Michal Simek260bdf02015-07-21 11:05:31 +020025$(warning Put custom ps7_init_gpl.c/h to board/xilinx/zynq/custom_hw_platform/))
Masahiro Yamada95b237e2015-05-18 15:31:52 +090026endif
27endif
28
Siva Durga Prasad Paladugu37e3a362018-06-26 15:02:19 +053029ifndef CONFIG_SPL_BUILD
30obj-$(CONFIG_CMD_ZYNQ) += cmds.o
31obj-$(CONFIG_CMD_ZYNQ_RSA) += bootimg.o
32endif
33
Masahiro Yamada95b237e2015-05-18 15:31:52 +090034obj-$(CONFIG_SPL_BUILD) += $(init-objs)
Masahiro Yamada32747492014-05-29 14:46:13 +090035
36# Suppress "warning: function declaration isn't a prototype"
Soren Brinkmann290f1f92014-10-30 10:52:43 -070037CFLAGS_REMOVE_ps7_init_gpl.o := -Wstrict-prototypes
Masahiro Yamada9bd53b62015-05-18 15:31:51 +090038
Masahiro Yamada95b237e2015-05-18 15:31:52 +090039# To include xil_io.h
40CFLAGS_ps7_init_gpl.o := -I$(srctree)/$(src)