arm: mvebu: Add gdsys ControlCenter-Compact board
[oweals/u-boot.git] / board / gdsys / a38x / Makefile
1 #
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
9 obj-$(CONFIG_TARGET_CONTROLCENTERDC) += controlcenterdc.o hre.o spl.o keyprogram.o dt_helpers.o
10
11 ifeq ($(CONFIG_SPL_BUILD),)
12
13 obj-$(CONFIG_TARGET_CONTROLCENTERDC) += hydra.o ihs_phys.o
14
15 extra-$(CONFIG_TARGET_CONTROLCENTERDC) += kwbimage.cfg
16
17 KWB_REPLACE += BOOT_FROM
18 ifneq ($(CONFIG_SPL_BOOT_DEVICE_SPI),)
19         KWB_CFG_BOOT_FROM=spi
20 endif
21 ifneq ($(CONFIG_SPL_BOOT_DEVICE_MMC),)
22         KWB_CFG_BOOT_FROM=sdio
23 endif
24
25 ifneq ($(CONFIG_SECURED_MODE_IMAGE),)
26 KWB_REPLACE += CSK_INDEX
27 KWB_CFG_CSK_INDEX = $(CONFIG_SECURED_MODE_CSK_INDEX)
28
29 KWB_REPLACE += SEC_BOOT_DEV
30 KWB_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
35 KWB_REPLACE += SEC_FUSE_DUMP
36 KWB_CFG_SEC_FUSE_DUMP = a38x
37 endif
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
44 endif