blob: 096a7aceb939c49203e9acc8538447a02d6425d5 [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
Michal Simek9755e3d2019-01-21 15:25:02 +01007obj-y += ../common/board.o
Masahiro Yamada66e67152014-05-12 12:18:30 +09008
Luca Ceresoli6da4f672018-06-22 12:40:16 +02009ifneq ($(CONFIG_XILINX_PS_INIT_FILE),"")
10PS_INIT_FILE := $(shell cd $(srctree); readlink -f $(CONFIG_XILINX_PS_INIT_FILE))
11init-objs := ps_init_gpl.o
12spl/board/xilinx/zynq/ps_init_gpl.o board/xilinx/zynq/ps_init_gpl.o: $(PS_INIT_FILE)
13 $(CC) $(c_flags) -I $(srctree)/$(src) -c -o $@ $^
14endif
Masahiro Yamada95b237e2015-05-18 15:31:52 +090015
Michal Simek9c18aaa2020-02-13 14:36:34 +010016DEVICE_TREE ?= $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%)
17ifeq ($(DEVICE_TREE),)
18DEVICE_TREE := unset
19endif
20
Luca Ceresoli6da4f672018-06-22 12:40:16 +020021ifeq ($(init-objs),)
Michal Simek312f2c52019-12-06 12:05:34 +010022hw-platform-y :=$(shell echo $(DEVICE_TREE))
Masahiro Yamada95b237e2015-05-18 15:31:52 +090023init-objs := $(if $(wildcard $(srctree)/$(src)/$(hw-platform-y)/ps7_init_gpl.c),\
24 $(hw-platform-y)/ps7_init_gpl.o)
Luca Ceresoli6da4f672018-06-22 12:40:16 +020025endif
Masahiro Yamada95b237e2015-05-18 15:31:52 +090026
27ifeq ($(init-objs),)
28ifneq ($(wildcard $(srctree)/$(src)/ps7_init_gpl.c),)
29init-objs := ps7_init_gpl.o
30$(if $(CONFIG_SPL_BUILD),\
Michal Simek260bdf02015-07-21 11:05:31 +020031$(warning Put custom ps7_init_gpl.c/h to board/xilinx/zynq/custom_hw_platform/))
Masahiro Yamada95b237e2015-05-18 15:31:52 +090032endif
33endif
34
Siva Durga Prasad Paladugu37e3a362018-06-26 15:02:19 +053035ifndef CONFIG_SPL_BUILD
36obj-$(CONFIG_CMD_ZYNQ) += cmds.o
37obj-$(CONFIG_CMD_ZYNQ_RSA) += bootimg.o
38endif
39
Masahiro Yamada95b237e2015-05-18 15:31:52 +090040obj-$(CONFIG_SPL_BUILD) += $(init-objs)
Masahiro Yamada32747492014-05-29 14:46:13 +090041
42# Suppress "warning: function declaration isn't a prototype"
Soren Brinkmann290f1f92014-10-30 10:52:43 -070043CFLAGS_REMOVE_ps7_init_gpl.o := -Wstrict-prototypes
Masahiro Yamada9bd53b62015-05-18 15:31:51 +090044
Masahiro Yamada95b237e2015-05-18 15:31:52 +090045# To include xil_io.h
46CFLAGS_ps7_init_gpl.o := -I$(srctree)/$(src)