ccflags-y += -I$(SDK_DIR)/source/drivers/include \ -I$(SDK_DIR)/source/drivers/include/generic \ -I$(SDK_DIR)/source/drivers/include/common \ -I$(SDK_DIR)/source/drivers/include/cipher \ -I$(SDK_DIR)/source/drivers/include/flash \ -I$(SDK_DIR)/source/drivers/include/klad \ -I$(SDK_DIR)/source/drivers/include/keyslot \ -I$(SDK_DIR)/source/drivers/cipher/include \ -I$(VENDOR_DIR)/open_source/mbedtls \ -I$(VENDOR_DIR)/open_source/mbedtls/include \ -I$(VENDOR_DIR)/open_source/mbedtls/include/mbedtls \ -I$(VENDOR_DIR)/open_source/mbedtls/configs \ -I$(SDK_DIR)/source/drivers/keyslot/include \ -I$(SDK_DIR)/source/drivers/common \ -I${SDK_DIR}/source/drivers/cipher/crypto_osal \ -I${SDK_DIR}/source/drivers/cipher/crypto_adapter MBEDTLS_DIR := ../../../../../open_source/mbedtls ccflags-y += -I${SDK_DIR}/source/drivers/cipher_common/include/common_include ccflags-y += -I${SDK_DIR}/source/drivers/cipher_common/include/drv_include ccflags-y += -I${SDK_DIR}/source/drivers/cipher_common/include/hal_include ccflags-y += -I${SDK_DIR}/source/drivers/cipher_common/drv_code ccflags-y += -I${SDK_DIR}/source/drivers/cipher_common/drv_code/fmea ccflags-y += -I${SDK_DIR}/source/drivers/cipher_common/soft_code obj-y += drv_cipher_ext.o # crypto_osal obj-y += crypto_osal/crypto_osal_lib.o # soft_code SOFT_DIR := ../cipher_common/soft_code obj-y += ${SOFT_DIR}/cipher_alg_support.o obj-y += ${SOFT_DIR}/cipher_soft_hash.o obj-y += ${SOFT_DIR}/cipher_soft_symc.o obj-y += ${SOFT_DIR}/soft_pke.o obj-y += ${SOFT_DIR}/soft_sha.o obj-y += ${SOFT_DIR}/soft_sm3.o obj-y += ${SOFT_DIR}/soft_sm4.o obj-y += ${SOFT_DIR}/soft_symc_common.o obj-y += ${SOFT_DIR}/soft_symc.o # hal_code HAL_DIR := ../cipher_common/hal_code ifneq ($(findstring $(CFG_SOCT_CHIP_TYPE), "reserved9" "reserved13"),) CRYPTO_CHIP_NAME := reserved9 endif ifneq ($(findstring $(CFG_SOCT_CHIP_TYPE), "reserved19" "hi3751v811" "reserved17"),) CRYPTO_CHIP_NAME := reserved19 endif ifeq ($(CRYPTO_CHIP_NAME),reserved9) ccflags-y += -DCONFIG_CRYPTO_CHIP_RESERVED9 obj-y += ${HAL_DIR}/pke_v2/hal_pke.o obj-y += ${HAL_DIR}/spacc_v2/hal_hash.o obj-y += ${HAL_DIR}/spacc_v2/hal_symc.o else ifeq($(CRYPTO_CHIP_NAME), reserved19) ccflags-y += -DCONFIG_CRYPTO_CHIP_RESERVED19 obj-y += ${HAL_DIR}/pke_v1/hal_pke.o obj-y += ${HAL_DIR}/spacc_v1/hal_hash.o obj-y += ${HAL_DIR}/spacc_v1/hal_symc.o endif obj-y += ${HAL_DIR}/trng_v2/hal_trng.o # drv_code DRV_DIR := ../cipher_common/drv_code ifeq ($(CRYPTO_CHIP_NAME),reserved9) obj-y += ${DRV_DIR}/drv_cenc_hard.o endif obj-y += ${DRV_DIR}/crypto_drv_common.o \ ${DRV_DIR}/drv_hash.o \ ${DRV_DIR}/drv_pbkdf2_soft.o \ ${DRV_DIR}/drv_pke_ecc_curve.o \ ${DRV_DIR}/drv_pke_ecc.o \ ${DRV_DIR}/drv_pke_rsa.o \ ${DRV_DIR}/drv_pke.o \ ${DRV_DIR}/drv_symc_mac_soft.o \ ${DRV_DIR}/drv_symc.o \ ${DRV_DIR}/drv_trng.o # Mbedtls OBJS ccflags-y += -DMBEDTLS_CONFIG_FILE='"mbedtls-config-cipher-sbl.h"' ccflags-y += -DCRYPTO_BOOTLOADER_ENV obj-y += $(MBEDTLS_DIR)/library/aes.o \ $(MBEDTLS_DIR)/library/aesni.o \ $(MBEDTLS_DIR)/library/aria.o \ $(MBEDTLS_DIR)/library/asn1parse.o \ $(MBEDTLS_DIR)/library/asn1write.o \ $(MBEDTLS_DIR)/library/base64.o \ $(MBEDTLS_DIR)/library/bignum.o \ $(MBEDTLS_DIR)/library/camellia.o \ $(MBEDTLS_DIR)/library/ccm.o \ $(MBEDTLS_DIR)/library/chacha20.o \ $(MBEDTLS_DIR)/library/chachapoly.o \ $(MBEDTLS_DIR)/library/cipher.o \ $(MBEDTLS_DIR)/library/cipher_wrap.o \ $(MBEDTLS_DIR)/library/cmac.o \ $(MBEDTLS_DIR)/library/constant_time.o \ $(MBEDTLS_DIR)/library/ctr_drbg.o \ $(MBEDTLS_DIR)/library/debug.o \ $(MBEDTLS_DIR)/library/des.o \ $(MBEDTLS_DIR)/library/dhm.o \ $(MBEDTLS_DIR)/library/ecdh.o \ $(MBEDTLS_DIR)/library/ecdsa.o \ $(MBEDTLS_DIR)/library/ecjpake.o \ $(MBEDTLS_DIR)/library/ecp.o \ $(MBEDTLS_DIR)/library/ecp_curves.o \ $(MBEDTLS_DIR)/library/entropy.o \ $(MBEDTLS_DIR)/library/entropy_poll.o \ $(MBEDTLS_DIR)/library/error.o \ $(MBEDTLS_DIR)/library/gcm.o \ $(MBEDTLS_DIR)/library/hkdf.o \ $(MBEDTLS_DIR)/library/hmac_drbg.o \ $(MBEDTLS_DIR)/library/md5.o \ $(MBEDTLS_DIR)/library/md.o \ $(MBEDTLS_DIR)/library/memory_buffer_alloc.o \ $(MBEDTLS_DIR)/library/mps_reader.o \ $(MBEDTLS_DIR)/library/mps_trace.o \ $(MBEDTLS_DIR)/library/net_sockets.o \ $(MBEDTLS_DIR)/library/nist_kw.o \ $(MBEDTLS_DIR)/library/oid.o \ $(MBEDTLS_DIR)/library/padlock.o \ $(MBEDTLS_DIR)/library/pem.o \ $(MBEDTLS_DIR)/library/pk.o \ $(MBEDTLS_DIR)/library/pkcs12.o \ $(MBEDTLS_DIR)/library/pkcs5.o \ $(MBEDTLS_DIR)/library/pkparse.o \ $(MBEDTLS_DIR)/library/pk_wrap.o \ $(MBEDTLS_DIR)/library/pkwrite.o \ $(MBEDTLS_DIR)/library/platform.o \ $(MBEDTLS_DIR)/library/platform_util.o \ $(MBEDTLS_DIR)/library/poly1305.o \ $(MBEDTLS_DIR)/library/psa_crypto_aead.o \ $(MBEDTLS_DIR)/library/psa_crypto.o \ $(MBEDTLS_DIR)/library/psa_crypto_cipher.o \ $(MBEDTLS_DIR)/library/psa_crypto_client.o \ $(MBEDTLS_DIR)/library/psa_crypto_driver_wrappers.o \ $(MBEDTLS_DIR)/library/psa_crypto_ecp.o \ $(MBEDTLS_DIR)/library/psa_crypto_hash.o \ $(MBEDTLS_DIR)/library/psa_crypto_mac.o \ $(MBEDTLS_DIR)/library/psa_crypto_rsa.o \ $(MBEDTLS_DIR)/library/psa_crypto_se.o \ $(MBEDTLS_DIR)/library/psa_crypto_slot_management.o \ $(MBEDTLS_DIR)/library/psa_crypto_storage.o \ $(MBEDTLS_DIR)/library/psa_its_file.o \ $(MBEDTLS_DIR)/library/ripemd160.o \ $(MBEDTLS_DIR)/library/rsa_alt_helpers.o \ $(MBEDTLS_DIR)/library/rsa.o \ $(MBEDTLS_DIR)/library/sha1.o \ $(MBEDTLS_DIR)/library/sha256.o \ $(MBEDTLS_DIR)/library/sha512.o \ $(MBEDTLS_DIR)/library/ssl_cache.o \ $(MBEDTLS_DIR)/library/ssl_ciphersuites.o \ $(MBEDTLS_DIR)/library/ssl_cli.o \ $(MBEDTLS_DIR)/library/ssl_cookie.o \ $(MBEDTLS_DIR)/library/ssl_debug_helpers_generated.o \ $(MBEDTLS_DIR)/library/ssl_msg.o \ $(MBEDTLS_DIR)/library/ssl_srv.o \ $(MBEDTLS_DIR)/library/ssl_ticket.o \ $(MBEDTLS_DIR)/library/ssl_tls13_client.o \ $(MBEDTLS_DIR)/library/ssl_tls13_generic.o \ $(MBEDTLS_DIR)/library/ssl_tls13_keys.o \ $(MBEDTLS_DIR)/library/ssl_tls13_server.o \ $(MBEDTLS_DIR)/library/ssl_tls.o \ $(MBEDTLS_DIR)/library/threading.o \ $(MBEDTLS_DIR)/library/timing.o \ $(MBEDTLS_DIR)/library/version.o \ $(MBEDTLS_DIR)/library/version_features.o \ $(MBEDTLS_DIR)/library/x509.o \ $(MBEDTLS_DIR)/library/x509_create.o \ $(MBEDTLS_DIR)/library/x509_crl.o \ $(MBEDTLS_DIR)/library/x509_crt.o \ $(MBEDTLS_DIR)/library/x509_csr.o \ $(MBEDTLS_DIR)/library/x509write_crt.o \ $(MBEDTLS_DIR)/library/x509write_csr.o