1 # SPDX-License-Identifier: GPL-2.0+
3 # (C) Copyright 2000-2006
6 ifndef CONFIG_XPL_BUILD
8 obj-$(CONFIG_EFI) += efi/
9 obj-$(CONFIG_EFI_LOADER) += efi_driver/
10 obj-$(CONFIG_EFI_LOADER) += efi_loader/
11 obj-$(CONFIG_CMD_BOOTEFI_SELFTEST) += efi_selftest/
12 obj-$(CONFIG_FWU_MULTI_BANK_UPDATE) += fwu_updates/
13 obj-$(CONFIG_LZMA) += lzma/
14 obj-$(CONFIG_BZIP2) += bzip2/
15 obj-$(CONFIG_FIT) += libfdt/
16 obj-$(CONFIG_OF_LIVE) += of_live.o
17 obj-$(CONFIG_CMD_DHRYSTONE) += dhry/
18 obj-$(CONFIG_ARCH_AT91) += at91/
19 obj-$(CONFIG_OPTEE_LIB) += optee/
21 obj-$(CONFIG_AES) += aes.o
22 obj-$(CONFIG_AES) += aes/
23 obj-$(CONFIG_$(PHASE_)BINMAN_FDT) += binman.o
26 ifneq ($(CONFIG_CHARSET),)
34 obj-$(CONFIG_CIRCBUF) += circbuf.o
39 obj-y += crc16-ccitt.o
40 obj-$(CONFIG_ERRNO_STR) += errno_str.o
41 obj-$(CONFIG_FIT) += fdtdec_common.o
42 obj-$(CONFIG_TEST_FDTDEC) += fdtdec_test.o
43 obj-$(CONFIG_GZIP_COMPRESSED) += gzip.o
44 obj-$(CONFIG_GENERATE_SMBIOS_TABLE) += smbios.o
45 obj-$(CONFIG_SMBIOS_PARSER) += smbios-parser.o
46 obj-$(CONFIG_IMAGE_SPARSE) += image-sparse.o
49 obj-$(CONFIG_XXHASH) += xxhash.o
51 obj-$(CONFIG_PHYSMEM) += physmem.o
53 obj-$(CONFIG_RBTREE) += rbtree.o
54 obj-$(CONFIG_BITREVERSE) += bitrev.o
58 obj-$(CONFIG_$(PHASE_)TPM) += tpm-common.o
59 ifeq ($(CONFIG_$(PHASE_)TPM),y)
60 obj-$(CONFIG_TPM) += tpm_api.o
61 obj-$(CONFIG_TPM_V1) += tpm-v1.o
62 obj-$(CONFIG_TPM_V2) += tpm-v2.o
63 obj-$(CONFIG_EFI_TCG2_PROTOCOL) += tpm_tcg2.o
64 obj-$(CONFIG_MEASURED_BOOT) += tpm_tcg2.o
67 obj-$(CONFIG_$(PHASE_)CRC8) += crc8.o
68 obj-$(CONFIG_$(PHASE_)CRC16) += crc16.o
72 obj-$(CONFIG_$(PHASE_)ACPI) += acpi/
73 obj-$(CONFIG_ECDSA) += ecdsa/
74 obj-$(CONFIG_$(XPL_)RSA) += rsa/
75 obj-$(CONFIG_HASH) += hash-checksum.o
76 obj-$(CONFIG_BLAKE2) += blake2/blake2b.o
78 obj-$(CONFIG_$(XPL_)MD5_LEGACY) += md5.o
79 obj-$(CONFIG_$(XPL_)SHA1_LEGACY) += sha1.o
80 obj-$(CONFIG_$(XPL_)SHA256_LEGACY) += sha256.o
81 obj-$(CONFIG_$(XPL_)SHA512_LEGACY) += sha512.o
83 obj-$(CONFIG_CRYPT_PW) += crypt/
84 obj-$(CONFIG_$(XPL_)ASN1_DECODER_LEGACY) += asn1_decoder.o
86 obj-$(CONFIG_$(PHASE_)ZLIB) += zlib/
87 obj-$(CONFIG_$(PHASE_)ZSTD) += zstd/
88 obj-$(CONFIG_$(PHASE_)GZIP) += gunzip.o
89 obj-$(CONFIG_$(PHASE_)LZO) += lzo/
90 obj-$(CONFIG_$(PHASE_)LZMA) += lzma/
91 obj-$(CONFIG_$(PHASE_)LZ4) += lz4_wrapper.o
93 obj-$(CONFIG_$(XPL_)LIB_RATIONAL) += rational.o
95 obj-$(CONFIG_LIBAVB) += libavb/
97 obj-$(CONFIG_$(PHASE_)OF_LIBFDT) += libfdt/
98 obj-$(CONFIG_$(PHASE_)OF_REAL) += fdtdec_common.o fdtdec.o
100 obj-$(CONFIG_$(XPL_)MBEDTLS_LIB) += mbedtls/
102 obj-$(CONFIG_NET_LWIP) += lwip/
104 ifdef CONFIG_XPL_BUILD
105 obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16-ccitt.o
106 obj-$(CONFIG_$(PHASE_)HASH) += crc16-ccitt.o
107 obj-$(CONFIG_MMC_SPI_CRC_ON) += crc16-ccitt.o
110 obj-$(CONFIG_ADDR_MAP) += addr_map.o
114 obj-y += display_options.o
115 CFLAGS_display_options.o := $(if $(BUILD_TAG),-DBUILD_TAG='"$(BUILD_TAG)"')
116 obj-$(CONFIG_BCH) += bch.o
117 obj-$(CONFIG_MMC_SPI) += crc7.o
118 obj-$(CONFIG_$(PHASE_)CRC32) += crc32.o
119 obj-$(CONFIG_CRC32C) += crc32c.o
122 obj-$(CONFIG_$(PHASE_)OF_LIBFDT) += fdtdec.o fdtdec_common.o
124 obj-y += linux_compat.o
125 obj-y += linux_string.o
126 obj-$(CONFIG_$(PHASE_)LMB) += lmb.o
128 obj-$(CONFIG_REGEX) += slre.o
130 obj-y += tables_csum.o
133 obj-$(CONFIG_GETOPT) += getopt.o
134 obj-$(CONFIG_TRACE) += trace.o
135 obj-$(CONFIG_LIB_UUID) += uuid.o
136 obj-$(CONFIG_LIB_RAND) += rand.o
139 ifeq ($(CONFIG_XPL_BUILD),y)
140 # SPL U-Boot may use full-printf, tiny-printf or none at all
141 ifdef CONFIG_$(PHASE_)USE_TINY_PRINTF
142 obj-$(CONFIG_$(PHASE_)SPRINTF) += tiny-printf.o
144 obj-$(CONFIG_$(PHASE_)SPRINTF) += vsprintf.o
146 obj-$(CONFIG_$(PHASE_)STRTO) += strto.o
148 # Main U-Boot always uses the full printf support
149 obj-y += vsprintf.o strto.o
150 obj-$(CONFIG_SSCANF) += sscanf.o
152 obj-$(CONFIG_$(XPL_)OID_REGISTRY) += oid_registry.o
158 obj-$(CONFIG_LIB_ELF) += elf.o
160 obj-$(CONFIG_$(PHASE_)SEMIHOSTING) += semihosting.o
163 # Build a fast OID lookup registry from include/linux/oid_registry.h
165 $(obj)/oid_registry.o: $(obj)/oid_registry_data.c
167 $(obj)/oid_registry_data.c: $(srctree)/include/linux/oid_registry.h \
168 $(srctree)/scripts/build_OID_registry
169 $(call cmd,build_OID_registry)
171 quiet_cmd_build_OID_registry = GEN $@
172 cmd_build_OID_registry = perl $(srctree)/scripts/build_OID_registry $< $@
174 clean-files += oid_registry_data.c
176 subdir-ccflags-$(CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED) += -O2