1 # SPDX-License-Identifier: GPL-2.0+
3 # (C) Copyright 2000-2006
4 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
6 ifndef CONFIG_SPL_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_LZMA) += lzma/
13 obj-$(CONFIG_BZIP2) += bzip2/
14 obj-$(CONFIG_FIT) += libfdt/
15 obj-$(CONFIG_OF_LIVE) += of_live.o
16 obj-$(CONFIG_CMD_DHRYSTONE) += dhry/
17 obj-$(CONFIG_ARCH_AT91) += at91/
18 obj-$(CONFIG_OPTEE_LIB) += optee/
20 obj-$(CONFIG_AES) += aes.o
21 obj-$(CONFIG_AES) += aes/
22 obj-$(CONFIG_$(SPL_TPL_)BINMAN_FDT) += binman.o
25 ifneq ($(CONFIG_CHARSET),)
33 obj-$(CONFIG_CIRCBUF) += circbuf.o
38 obj-y += crc16-ccitt.o
39 obj-$(CONFIG_ERRNO_STR) += errno_str.o
40 obj-$(CONFIG_FIT) += fdtdec_common.o
41 obj-$(CONFIG_TEST_FDTDEC) += fdtdec_test.o
42 obj-$(CONFIG_GZIP_COMPRESSED) += gzip.o
43 obj-$(CONFIG_GENERATE_SMBIOS_TABLE) += smbios.o
44 obj-$(CONFIG_SMBIOS_PARSER) += smbios-parser.o
45 obj-$(CONFIG_IMAGE_SPARSE) += image-sparse.o
47 obj-$(CONFIG_XXHASH) += xxhash.o
49 obj-$(CONFIG_PHYSMEM) += physmem.o
51 obj-$(CONFIG_SUPPORT_EMMC_RPMB) += sha256.o
52 obj-$(CONFIG_RBTREE) += rbtree.o
53 obj-$(CONFIG_BITREVERSE) += bitrev.o
57 obj-$(CONFIG_$(SPL_TPL_)TPM) += tpm-common.o
58 ifeq ($(CONFIG_$(SPL_TPL_)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
67 obj-$(CONFIG_$(SPL_TPL_)GENERATE_ACPI_TABLE) += acpi/
68 obj-$(CONFIG_$(SPL_)MD5) += md5.o
69 obj-$(CONFIG_ECDSA) += ecdsa/
70 obj-$(CONFIG_$(SPL_)RSA) += rsa/
71 obj-$(CONFIG_HASH) += hash-checksum.o
72 obj-$(CONFIG_BLAKE2) += blake2/blake2b.o
73 obj-$(CONFIG_SHA1) += sha1.o
74 obj-$(CONFIG_SHA256) += sha256.o
75 obj-$(CONFIG_SHA512) += sha512.o
76 obj-$(CONFIG_CRYPT_PW) += crypt/
77 obj-$(CONFIG_$(SPL_)ASN1_DECODER) += asn1_decoder.o
79 obj-$(CONFIG_$(SPL_)ZLIB) += zlib/
80 obj-$(CONFIG_$(SPL_)ZSTD) += zstd/
81 obj-$(CONFIG_$(SPL_)GZIP) += gunzip.o
82 obj-$(CONFIG_$(SPL_)LZO) += lzo/
83 obj-$(CONFIG_$(SPL_)LZMA) += lzma/
84 obj-$(CONFIG_$(SPL_)LZ4) += lz4_wrapper.o
86 obj-$(CONFIG_$(SPL_)LIB_RATIONAL) += rational.o
88 obj-$(CONFIG_LIBAVB) += libavb/
90 obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += libfdt/
91 obj-$(CONFIG_$(SPL_TPL_)OF_REAL) += fdtdec_common.o fdtdec.o
93 ifdef CONFIG_SPL_BUILD
94 obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16-ccitt.o
95 obj-$(CONFIG_$(SPL_TPL_)HASH) += crc16-ccitt.o
96 obj-$(CONFIG_MMC_SPI_CRC_ON) += crc16-ccitt.o
99 obj-$(CONFIG_ADDR_MAP) += addr_map.o
103 obj-y += display_options.o
104 CFLAGS_display_options.o := $(if $(BUILD_TAG),-DBUILD_TAG='"$(BUILD_TAG)"')
105 obj-$(CONFIG_BCH) += bch.o
106 obj-$(CONFIG_MMC_SPI) += crc7.o
107 obj-$(CONFIG_$(SPL_TPL_)CRC32) += crc32.o
108 obj-$(CONFIG_CRC32C) += crc32c.o
111 obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdtdec.o fdtdec_common.o
113 obj-y += linux_compat.o
114 obj-y += linux_string.o
115 obj-$(CONFIG_LMB) += lmb.o
117 obj-$(CONFIG_REGEX) += slre.o
119 obj-y += tables_csum.o
122 obj-$(CONFIG_GETOPT) += getopt.o
123 obj-$(CONFIG_TRACE) += trace.o
124 obj-$(CONFIG_LIB_UUID) += uuid.o
125 obj-$(CONFIG_LIB_RAND) += rand.o
128 ifeq ($(CONFIG_$(SPL_TPL_)BUILD),y)
129 # SPL U-Boot may use full-printf, tiny-printf or none at all
130 ifdef CONFIG_$(SPL_TPL_)USE_TINY_PRINTF
131 obj-$(CONFIG_$(SPL_TPL_)SPRINTF) += tiny-printf.o
133 obj-$(CONFIG_$(SPL_TPL_)SPRINTF) += vsprintf.o
135 obj-$(CONFIG_$(SPL_TPL_)STRTO) += strto.o
137 # Main U-Boot always uses the full printf support
138 obj-y += vsprintf.o strto.o
139 obj-$(CONFIG_SSCANF) += sscanf.o
141 obj-$(CONFIG_$(SPL_)OID_REGISTRY) += oid_registry.o
146 obj-$(CONFIG_LIB_ELF) += elf.o
149 # Build a fast OID lookup registry from include/linux/oid_registry.h
151 $(obj)/oid_registry.o: $(obj)/oid_registry_data.c
153 $(obj)/oid_registry_data.c: $(srctree)/include/linux/oid_registry.h \
154 $(srctree)/scripts/build_OID_registry
155 $(call cmd,build_OID_registry)
157 quiet_cmd_build_OID_registry = GEN $@
158 cmd_build_OID_registry = perl $(srctree)/scripts/build_OID_registry $< $@
160 clean-files += oid_registry_data.c
162 subdir-ccflags-$(CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED) += -O2