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