blob: 43fec2edbb292150a9a6dee1661ca7482e4273c8 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001# SPDX-License-Identifier: GPL-2.0+
Dirk Eibach60083262017-02-22 16:07:23 +01002#
3# Copyright (C) 2015 Stefan Roese <sr@denx.de>
4# Copyright (C) 2015 Reinhard Pfau <reinhard.pfau@gdsys.cc>
5# Copyright (C) 2016 Mario Six <mario.six@gdsys.cc>
Dirk Eibach60083262017-02-22 16:07:23 +01006
7obj-$(CONFIG_TARGET_CONTROLCENTERDC) += controlcenterdc.o hre.o spl.o keyprogram.o dt_helpers.o
8
9ifeq ($(CONFIG_SPL_BUILD),)
10
11obj-$(CONFIG_TARGET_CONTROLCENTERDC) += hydra.o ihs_phys.o
12
13extra-$(CONFIG_TARGET_CONTROLCENTERDC) += kwbimage.cfg
14
15KWB_REPLACE += BOOT_FROM
16ifneq ($(CONFIG_SPL_BOOT_DEVICE_SPI),)
17 KWB_CFG_BOOT_FROM=spi
18endif
19ifneq ($(CONFIG_SPL_BOOT_DEVICE_MMC),)
20 KWB_CFG_BOOT_FROM=sdio
21endif
22
23ifneq ($(CONFIG_SECURED_MODE_IMAGE),)
24KWB_REPLACE += CSK_INDEX
25KWB_CFG_CSK_INDEX = $(CONFIG_SECURED_MODE_CSK_INDEX)
26
27KWB_REPLACE += SEC_BOOT_DEV
28KWB_CFG_SEC_BOOT_DEV=$(patsubst "%",%, \
29 $(if $(findstring BOOT_SPI_NOR_FLASH,$(CONFIG_SPL_BOOT_DEVICE)),0x34) \
30 $(if $(findstring BOOT_SDIO_MMC_CARD,$(CONFIG_SPL_BOOT_DEVICE)),0x31) \
31 )
32
33KWB_REPLACE += SEC_FUSE_DUMP
34KWB_CFG_SEC_FUSE_DUMP = a38x
35endif
36
37$(src)/kwbimage.cfg: $(src)/kwbimage.cfg.in include/autoconf.mk \
38 include/config/auto.conf
39 $(Q)sed -ne '$(foreach V,$(KWB_REPLACE),s/^#@$(V)/$(V) $(KWB_CFG_$(V))/;)p' \
40 <$< >$(dir $<)$(@F)
41
42endif