xref: /rk3399_rockchip-uboot/board/gdsys/a38x/Makefile (revision 15f05610438981297ff628bb87e6d5789ee3fad0)
1*15f05610SDirk Eibach#
2*15f05610SDirk Eibach# Copyright (C) 2015 Stefan Roese <sr@denx.de>
3*15f05610SDirk Eibach# Copyright (C) 2015 Reinhard Pfau <reinhard.pfau@gdsys.cc>
4*15f05610SDirk Eibach# Copyright (C) 2016 Mario Six <mario.six@gdsys.cc>
5*15f05610SDirk Eibach#
6*15f05610SDirk Eibach# SPDX-License-Identifier:	GPL-2.0+
7*15f05610SDirk Eibach#
8*15f05610SDirk Eibach
9*15f05610SDirk Eibachobj-$(CONFIG_TARGET_CONTROLCENTERDC) += controlcenterdc.o hre.o spl.o keyprogram.o dt_helpers.o
10*15f05610SDirk Eibach
11*15f05610SDirk Eibachifeq ($(CONFIG_SPL_BUILD),)
12*15f05610SDirk Eibach
13*15f05610SDirk Eibachobj-$(CONFIG_TARGET_CONTROLCENTERDC) += hydra.o ihs_phys.o
14*15f05610SDirk Eibach
15*15f05610SDirk Eibachextra-$(CONFIG_TARGET_CONTROLCENTERDC) += kwbimage.cfg
16*15f05610SDirk Eibach
17*15f05610SDirk EibachKWB_REPLACE += BOOT_FROM
18*15f05610SDirk Eibachifneq ($(CONFIG_SPL_BOOT_DEVICE_SPI),)
19*15f05610SDirk Eibach	KWB_CFG_BOOT_FROM=spi
20*15f05610SDirk Eibachendif
21*15f05610SDirk Eibachifneq ($(CONFIG_SPL_BOOT_DEVICE_MMC),)
22*15f05610SDirk Eibach	KWB_CFG_BOOT_FROM=sdio
23*15f05610SDirk Eibachendif
24*15f05610SDirk Eibach
25*15f05610SDirk Eibachifneq ($(CONFIG_SECURED_MODE_IMAGE),)
26*15f05610SDirk EibachKWB_REPLACE += CSK_INDEX
27*15f05610SDirk EibachKWB_CFG_CSK_INDEX = $(CONFIG_SECURED_MODE_CSK_INDEX)
28*15f05610SDirk Eibach
29*15f05610SDirk EibachKWB_REPLACE += SEC_BOOT_DEV
30*15f05610SDirk EibachKWB_CFG_SEC_BOOT_DEV=$(patsubst "%",%, \
31*15f05610SDirk Eibach	$(if $(findstring BOOT_SPI_NOR_FLASH,$(CONFIG_SPL_BOOT_DEVICE)),0x34) \
32*15f05610SDirk Eibach	$(if $(findstring BOOT_SDIO_MMC_CARD,$(CONFIG_SPL_BOOT_DEVICE)),0x31) \
33*15f05610SDirk Eibach	)
34*15f05610SDirk Eibach
35*15f05610SDirk EibachKWB_REPLACE += SEC_FUSE_DUMP
36*15f05610SDirk EibachKWB_CFG_SEC_FUSE_DUMP = a38x
37*15f05610SDirk Eibachendif
38*15f05610SDirk Eibach
39*15f05610SDirk Eibach$(src)/kwbimage.cfg: $(src)/kwbimage.cfg.in include/autoconf.mk \
40*15f05610SDirk Eibach		include/config/auto.conf
41*15f05610SDirk Eibach	$(Q)sed -ne '$(foreach V,$(KWB_REPLACE),s/^#@$(V)/$(V) $(KWB_CFG_$(V))/;)p' \
42*15f05610SDirk Eibach	<$< >$(dir $<)$(@F)
43*15f05610SDirk Eibach
44*15f05610SDirk Eibachendif
45