You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
2.0 KiB

include $(top_srctree)/$(BOOTLOADER_CFGFILE)
export
ifdef CFG_SOCT_LOG_SUPPORT
KBUILD_CFLAGS += -DCONFIG_SOCT_LOG_LEVEL=$(CFG_SOCT_LOG_LEVEL) \
-DSOCT_LOG_SUPPORT=1 \
-DCONFIG_SOCT_LOG_SUPPORT
endif
ifdef CFG_SOCT_BOOT_LOG_SUPPORT
KBUILD_CFLAGS += -DSOCT_BOOT_LOG_SUPPORT
endif
ifdef CFG_SOCT_TEE_SUPPORT
KBUILD_CFLAGS += -DSOCT_TEE_SUPPORT
endif
ifdef CFG_SOCT_BOOT_SLAVE
KBUILD_CFLAGS += -DSLAVE_BOOT_ENV -DSOCT_BOOT_SLAVE
endif
ifdef CFG_SOCT_TWOSTAGEBOOT_SUPPORT
ifdef CFG_SOCT_BOOT_FBL
KBUILD_CFLAGS += -DSOCT_BOOT_FBL
endif
ifdef CFG_SOCT_BOOT_SBL
ifeq ($(findstring $(CFG_SOCT_CHIP_TYPE), reserved19 reserved17 hi3751v811),)
KBUILD_CFLAGS += -DSOCT_BOOT_SBL
endif
endif
else
KBUILD_CFLAGS += -DSOCT_BOOT_ONESTAGE
endif
ifneq ($(filter reserved9 reserved13,$(CFG_SOCT_CHIP_TYPE)),)
ifneq ($(filter reserved9_c reserved13_c reserved9_d reserved13_d reserved13_m,$(CFG_SOCT_CHIP_REVERSION)),)
KBUILD_CFLAGS += -DSOCT_REG_REVISION_B
endif
endif
ifneq ($(filter reserved19,$(CFG_SOCT_CHIP_TYPE)),)
ifneq ($(filter reserved19_c,$(CFG_SOCT_CHIP_REVERSION)),)
KBUILD_CFLAGS += -DSOCT_REG_REVISION_C
endif
endif
ifneq ($(filter hi3751v811,$(CFG_SOCT_CHIP_TYPE)),)
ifneq ($(filter hi3751v811_c,$(CFG_SOCT_CHIP_REVERSION)),)
KBUILD_CFLAGS += -DSOCT_REG_REVISION_C
endif
endif
ifneq ($(filter reserved23,$(CFG_SOCT_CHIP_TYPE)),)
obj-y += drivers/rpmsg/
endif
KBUILD_CFLAGS += -DCHIP_TYPE_$(shell echo $(CFG_SOCT_CHIP_TYPE) | tr a-z A-Z) \
-DSDK_VERSION=$(HUANGLONG_PLATFORM_VERSION)
ifdef CFG_SOCT_BUILD_WITH_PRODUCT
ifneq (,$(wildcard $(SDK_DIR)/source/drivers))
obj-y += drivers/
endif
ifneq (,$(wildcard $(SDK_DIR)/source/apps))
obj-y += apps/
endif
else
ifneq ($(findstring $(CONFIG_PLATFORM_TYPE), uos_kos),)
obj-y += drivers/otp/
obj-y += drivers/flash/
obj-y += drivers/common/
obj-y += drivers/gpio/
obj-y += drivers/custom/
obj-y += drivers/pdm/
obj-y += drivers/cipher/
obj-y += apps/utils/
obj-y += apps/ssa/
else
obj-y += drivers/otp/
obj-y += drivers/flash/
obj-y += drivers/common/
endif
endif