Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0+ |
Dirk Eibach | 6008326 | 2017-02-22 16:07:23 +0100 | [diff] [blame] | 2 | # |
| 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 Eibach | 6008326 | 2017-02-22 16:07:23 +0100 | [diff] [blame] | 6 | |
| 7 | obj-$(CONFIG_TARGET_CONTROLCENTERDC) += controlcenterdc.o hre.o spl.o keyprogram.o dt_helpers.o |
| 8 | |
| 9 | ifeq ($(CONFIG_SPL_BUILD),) |
| 10 | |
| 11 | obj-$(CONFIG_TARGET_CONTROLCENTERDC) += hydra.o ihs_phys.o |
| 12 | |
| 13 | extra-$(CONFIG_TARGET_CONTROLCENTERDC) += kwbimage.cfg |
| 14 | |
| 15 | KWB_REPLACE += BOOT_FROM |
| 16 | ifneq ($(CONFIG_SPL_BOOT_DEVICE_SPI),) |
| 17 | KWB_CFG_BOOT_FROM=spi |
| 18 | endif |
| 19 | ifneq ($(CONFIG_SPL_BOOT_DEVICE_MMC),) |
| 20 | KWB_CFG_BOOT_FROM=sdio |
| 21 | endif |
| 22 | |
| 23 | ifneq ($(CONFIG_SECURED_MODE_IMAGE),) |
| 24 | KWB_REPLACE += CSK_INDEX |
| 25 | KWB_CFG_CSK_INDEX = $(CONFIG_SECURED_MODE_CSK_INDEX) |
| 26 | |
| 27 | KWB_REPLACE += SEC_BOOT_DEV |
| 28 | KWB_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 | |
| 33 | KWB_REPLACE += SEC_FUSE_DUMP |
| 34 | KWB_CFG_SEC_FUSE_DUMP = a38x |
| 35 | endif |
| 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 | |
| 42 | endif |