Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0+ |
Michal Simek | af482d5 | 2012-09-28 09:56:37 +0000 | [diff] [blame] | 2 | # |
| 3 | # (C) Copyright 2000-2006 |
| 4 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
Michal Simek | af482d5 | 2012-09-28 09:56:37 +0000 | [diff] [blame] | 5 | |
Masahiro Yamada | 5d23de5 | 2013-10-21 11:53:37 +0900 | [diff] [blame] | 6 | obj-y := board.o |
Masahiro Yamada | c2d1079 | 2014-05-12 12:18:30 +0900 | [diff] [blame] | 7 | |
Luca Ceresoli | b0172c3 | 2018-06-22 12:40:16 +0200 | [diff] [blame] | 8 | ifneq ($(CONFIG_XILINX_PS_INIT_FILE),"") |
| 9 | PS_INIT_FILE := $(shell cd $(srctree); readlink -f $(CONFIG_XILINX_PS_INIT_FILE)) |
| 10 | init-objs := ps_init_gpl.o |
| 11 | spl/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 $@ $^ |
| 13 | endif |
Masahiro Yamada | 2ab28d1 | 2015-05-18 15:31:52 +0900 | [diff] [blame] | 14 | |
Michal Simek | 8a8683c | 2020-02-13 14:36:34 +0100 | [diff] [blame] | 15 | DEVICE_TREE ?= $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%) |
| 16 | ifeq ($(DEVICE_TREE),) |
| 17 | DEVICE_TREE := unset |
| 18 | endif |
| 19 | |
Luca Ceresoli | b0172c3 | 2018-06-22 12:40:16 +0200 | [diff] [blame] | 20 | ifeq ($(init-objs),) |
Michal Simek | 6894d9d | 2019-12-06 12:05:34 +0100 | [diff] [blame] | 21 | hw-platform-y :=$(shell echo $(DEVICE_TREE)) |
Masahiro Yamada | 2ab28d1 | 2015-05-18 15:31:52 +0900 | [diff] [blame] | 22 | init-objs := $(if $(wildcard $(srctree)/$(src)/$(hw-platform-y)/ps7_init_gpl.c),\ |
| 23 | $(hw-platform-y)/ps7_init_gpl.o) |
Luca Ceresoli | b0172c3 | 2018-06-22 12:40:16 +0200 | [diff] [blame] | 24 | endif |
Masahiro Yamada | 2ab28d1 | 2015-05-18 15:31:52 +0900 | [diff] [blame] | 25 | |
| 26 | ifeq ($(init-objs),) |
| 27 | ifneq ($(wildcard $(srctree)/$(src)/ps7_init_gpl.c),) |
| 28 | init-objs := ps7_init_gpl.o |
Simon Glass | 49c24a8 | 2024-09-29 19:49:47 -0600 | [diff] [blame] | 29 | $(if $(CONFIG_XPL_BUILD),\ |
Michal Simek | b9c834a | 2015-07-21 11:05:31 +0200 | [diff] [blame] | 30 | $(warning Put custom ps7_init_gpl.c/h to board/xilinx/zynq/custom_hw_platform/)) |
Masahiro Yamada | 2ab28d1 | 2015-05-18 15:31:52 +0900 | [diff] [blame] | 31 | endif |
| 32 | endif |
| 33 | |
Simon Glass | 49c24a8 | 2024-09-29 19:49:47 -0600 | [diff] [blame] | 34 | ifndef CONFIG_XPL_BUILD |
Siva Durga Prasad Paladugu | e460352 | 2018-06-26 15:02:19 +0530 | [diff] [blame] | 35 | obj-$(CONFIG_CMD_ZYNQ) += cmds.o |
| 36 | obj-$(CONFIG_CMD_ZYNQ_RSA) += bootimg.o |
| 37 | endif |
| 38 | |
Simon Glass | 49c24a8 | 2024-09-29 19:49:47 -0600 | [diff] [blame] | 39 | obj-$(CONFIG_XPL_BUILD) += $(init-objs) |
Masahiro Yamada | 50ee066 | 2014-05-29 14:46:13 +0900 | [diff] [blame] | 40 | |
| 41 | # Suppress "warning: function declaration isn't a prototype" |
Soren Brinkmann | 0068543 | 2014-10-30 10:52:43 -0700 | [diff] [blame] | 42 | CFLAGS_REMOVE_ps7_init_gpl.o := -Wstrict-prototypes |
Masahiro Yamada | 17b3d37 | 2015-05-18 15:31:51 +0900 | [diff] [blame] | 43 | |
Masahiro Yamada | 2ab28d1 | 2015-05-18 15:31:52 +0900 | [diff] [blame] | 44 | # To include xil_io.h |
| 45 | CFLAGS_ps7_init_gpl.o := -I$(srctree)/$(src) |