xref: /openbmc/u-boot/cmd/Makefile (revision 7da7ff54)
1# SPDX-License-Identifier: GPL-2.0+
2#
3# (C) Copyright 2004-2006
4# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5
6ifndef CONFIG_SPL_BUILD
7# core command
8obj-y += boot.o
9obj-$(CONFIG_CMD_BOOTM) += bootm.o
10obj-y += help.o
11obj-y += version.o
12
13# command
14obj-$(CONFIG_CMD_AES) += aes.o
15obj-$(CONFIG_CMD_ADC) += adc.o
16obj-$(CONFIG_CMD_ARMFLASH) += armflash.o
17obj-y += blk_common.o
18obj-$(CONFIG_SOURCE) += source.o
19obj-$(CONFIG_CMD_SOURCE) += source.o
20obj-$(CONFIG_CMD_BDI) += bdinfo.o
21obj-$(CONFIG_CMD_BEDBUG) += bedbug.o
22obj-$(CONFIG_CMD_BINOP) += binop.o
23obj-$(CONFIG_CMD_BLOCK_CACHE) += blkcache.o
24obj-$(CONFIG_CMD_BMP) += bmp.o
25obj-$(CONFIG_CMD_BOOTCOUNT) += bootcount.o
26obj-$(CONFIG_CMD_BOOTEFI) += bootefi.o
27obj-$(CONFIG_CMD_BOOTMENU) += bootmenu.o
28obj-$(CONFIG_CMD_BOOTSTAGE) += bootstage.o
29obj-$(CONFIG_CMD_BOOTZ) += bootz.o
30obj-$(CONFIG_CMD_BOOTI) += booti.o
31obj-$(CONFIG_CMD_BTRFS) += btrfs.o
32obj-$(CONFIG_CMD_CACHE) += cache.o
33obj-$(CONFIG_CMD_CBFS) += cbfs.o
34obj-$(CONFIG_CMD_CLK) += clk.o
35obj-$(CONFIG_CMD_CONFIG) += config.o
36obj-$(CONFIG_CMD_CONSOLE) += console.o
37obj-$(CONFIG_CMD_CPU) += cpu.o
38obj-$(CONFIG_DATAFLASH_MMC_SELECT) += dataflash_mmc_mux.o
39obj-$(CONFIG_CMD_DATE) += date.o
40obj-$(CONFIG_CMD_DEMO) += demo.o
41obj-$(CONFIG_CMD_SOUND) += sound.o
42ifdef CONFIG_POST
43obj-$(CONFIG_CMD_DIAG) += diag.o
44endif
45obj-$(CONFIG_CMD_DISPLAY) += display.o
46obj-$(CONFIG_CMD_ECHO) += echo.o
47obj-$(CONFIG_ENV_IS_IN_EEPROM) += eeprom.o
48obj-$(CONFIG_CMD_EEPROM) += eeprom.o
49obj-$(CONFIG_EFI_STUB) += efi.o
50obj-$(CONFIG_CMD_ELF) += elf.o
51obj-$(CONFIG_HUSH_PARSER) += exit.o
52obj-$(CONFIG_CMD_EXT4) += ext4.o
53obj-$(CONFIG_CMD_EXT2) += ext2.o
54obj-$(CONFIG_CMD_FAT) += fat.o
55obj-$(CONFIG_CMD_FDC) += fdc.o
56obj-$(CONFIG_CMD_FDT) += fdt.o
57obj-$(CONFIG_CMD_FITUPD) += fitupd.o
58obj-$(CONFIG_CMD_FLASH) += flash.o
59obj-$(CONFIG_CMD_FPGA) += fpga.o
60obj-$(CONFIG_CMD_FPGAD) += fpgad.o
61obj-$(CONFIG_CMD_FS_GENERIC) += fs.o
62obj-$(CONFIG_CMD_FUSE) += fuse.o
63obj-$(CONFIG_CMD_GETTIME) += gettime.o
64obj-$(CONFIG_CMD_GPIO) += gpio.o
65obj-$(CONFIG_CMD_HVC) += smccc.o
66obj-$(CONFIG_CMD_I2C) += i2c.o
67obj-$(CONFIG_CMD_IOTRACE) += iotrace.o
68obj-$(CONFIG_CMD_HASH) += hash.o
69obj-$(CONFIG_CMD_IDE) += ide.o disk.o
70obj-$(CONFIG_CMD_INI) += ini.o
71obj-$(CONFIG_CMD_IRQ) += irq.o
72obj-$(CONFIG_CMD_ITEST) += itest.o
73obj-$(CONFIG_CMD_JFFS2) += jffs2.o
74obj-$(CONFIG_CMD_CRAMFS) += cramfs.o
75obj-$(CONFIG_LED_STATUS_CMD) += legacy_led.o
76obj-$(CONFIG_CMD_LED) += led.o
77obj-$(CONFIG_CMD_LICENSE) += license.o
78obj-y += load.o
79obj-$(CONFIG_CMD_LOG) += log.o
80obj-$(CONFIG_ID_EEPROM) += mac.o
81obj-$(CONFIG_CMD_MD5SUM) += md5sum.o
82obj-$(CONFIG_CMD_MEMORY) += mem.o
83obj-$(CONFIG_CMD_IO) += io.o
84obj-$(CONFIG_CMD_MFSL) += mfsl.o
85obj-$(CONFIG_CMD_MII) += mii.o
86ifdef CONFIG_PHYLIB
87obj-$(CONFIG_CMD_MII) += mdio.o
88endif
89obj-$(CONFIG_CMD_MISC) += misc.o
90obj-$(CONFIG_CMD_MMC) += mmc.o
91obj-$(CONFIG_CMD_MMC_SPI) += mmc_spi.o
92obj-$(CONFIG_MP) += mp.o
93obj-$(CONFIG_CMD_MTDPARTS) += mtdparts.o
94obj-$(CONFIG_CMD_NAND) += nand.o
95obj-$(CONFIG_CMD_NET) += net.o
96obj-$(CONFIG_CMD_ONENAND) += onenand.o
97obj-$(CONFIG_CMD_PART) += part.o
98ifdef CONFIG_PCI
99obj-$(CONFIG_CMD_PCI) += pci.o
100endif
101obj-y += pcmcia.o
102obj-$(CONFIG_CMD_PXE) += pxe.o
103obj-$(CONFIG_CMD_QFW) += qfw.o
104obj-$(CONFIG_CMD_READ) += read.o
105obj-$(CONFIG_CMD_REGINFO) += reginfo.o
106obj-$(CONFIG_CMD_REISER) += reiser.o
107obj-$(CONFIG_CMD_REMOTEPROC) += remoteproc.o
108obj-$(CONFIG_CMD_ROCKUSB) += rockusb.o
109obj-$(CONFIG_SANDBOX) += host.o
110obj-$(CONFIG_CMD_SATA) += sata.o
111obj-$(CONFIG_CMD_NVME) += nvme.o
112obj-$(CONFIG_CMD_SF) += sf.o
113obj-$(CONFIG_CMD_SCSI) += scsi.o disk.o
114obj-$(CONFIG_CMD_SHA1SUM) += sha1sum.o
115obj-$(CONFIG_CMD_SETEXPR) += setexpr.o
116obj-$(CONFIG_CMD_SPI) += spi.o
117obj-$(CONFIG_CMD_STRINGS) += strings.o
118obj-$(CONFIG_CMD_SMC) += smccc.o
119obj-$(CONFIG_CMD_TERMINAL) += terminal.o
120obj-$(CONFIG_CMD_TIME) += time.o
121obj-$(CONFIG_CMD_TRACE) += trace.o
122obj-$(CONFIG_HUSH_PARSER) += test.o
123obj-$(CONFIG_CMD_TPM) += tpm-common.o
124obj-$(CONFIG_CMD_TPM_V1) += tpm-v1.o
125obj-$(CONFIG_CMD_TPM_TEST) += tpm_test.o
126obj-$(CONFIG_CMD_TPM_V2) += tpm-v2.o
127obj-$(CONFIG_CMD_CROS_EC) += cros_ec.o
128obj-$(CONFIG_CMD_TSI148) += tsi148.o
129obj-$(CONFIG_CMD_UBI) += ubi.o
130obj-$(CONFIG_CMD_UBIFS) += ubifs.o
131obj-$(CONFIG_CMD_UNIVERSE) += universe.o
132obj-$(CONFIG_CMD_UNZIP) += unzip.o
133obj-$(CONFIG_CMD_LZMADEC) += lzmadec.o
134
135obj-$(CONFIG_CMD_USB) += usb.o disk.o
136obj-$(CONFIG_CMD_FASTBOOT) += fastboot.o
137obj-$(CONFIG_CMD_FS_UUID) += fs_uuid.o
138
139obj-$(CONFIG_CMD_USB_MASS_STORAGE) += usb_mass_storage.o
140obj-$(CONFIG_CMD_USB_SDP) += usb_gadget_sdp.o
141obj-$(CONFIG_CMD_THOR_DOWNLOAD) += thordown.o
142obj-$(CONFIG_CMD_XIMG) += ximg.o
143obj-$(CONFIG_CMD_YAFFS2) += yaffs2.o
144obj-$(CONFIG_CMD_SPL) += spl.o
145obj-$(CONFIG_CMD_ZIP) += zip.o
146obj-$(CONFIG_CMD_ZFS) += zfs.o
147
148obj-$(CONFIG_CMD_DFU) += dfu.o
149obj-$(CONFIG_CMD_GPT) += gpt.o
150obj-$(CONFIG_CMD_ETHSW) += ethsw.o
151
152# Power
153obj-$(CONFIG_CMD_PMIC) += pmic.o
154obj-$(CONFIG_CMD_REGULATOR) += regulator.o
155
156obj-$(CONFIG_CMD_BLOB) += blob.o
157
158obj-$(CONFIG_X86) += x86/
159endif # !CONFIG_SPL_BUILD
160
161# core command
162obj-y += nvedit.o
163
164obj-$(CONFIG_ARCH_MVEBU) += mvebu/
165obj-$(CONFIG_TI_COMMON_CMD_OPTIONS) += ti/
166
167filechk_data_gz = (echo "static const char data_gz[] ="; cat $< | scripts/bin2c; echo ";")
168
169filechk_data_size = \
170	(echo "static const size_t data_size = "; \
171	cat $< | wc -c; echo ";")
172
173# "config" command
174$(obj)/config.o: $(obj)/config_data_gz.h $(obj)/config_data_size.h
175
176targets += config_data.gz
177$(obj)/config_data.gz: $(KCONFIG_CONFIG) FORCE
178	$(call if_changed,gzip)
179
180targets += config_data_gz.h
181$(obj)/config_data_gz.h: $(obj)/config_data.gz FORCE
182	$(call filechk,data_gz)
183
184targets += config_data_size.h
185$(obj)/config_data_size.h: $(KCONFIG_CONFIG) FORCE
186	$(call filechk,data_size)
187
188# "license" command
189$(obj)/license.o: $(obj)/license_data_gz.h $(obj)/license_data_size.h
190
191targets += license_data.gz
192$(obj)/license_data.gz: $(srctree)/Licenses/gpl-2.0.txt FORCE
193	$(call if_changed,gzip)
194
195targets += license_data_gz.h
196$(obj)/license_data_gz.h: $(obj)/license_data.gz FORCE
197	$(call filechk,data_gz)
198
199targets += license_data_size.h
200$(obj)/license_data_size.h: $(srctree)/Licenses/gpl-2.0.txt FORCE
201	$(call filechk,data_size)
202
203CFLAGS_ethsw.o := -Wno-enum-conversion
204