xref: /openbmc/u-boot/common/Makefile (revision 903fd795)
1#
2# (C) Copyright 2004-2006
3# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
5# SPDX-License-Identifier:	GPL-2.0+
6#
7
8# core
9ifndef CONFIG_SPL_BUILD
10obj-y += main.o
11obj-y += command.o
12obj-y += exports.o
13obj-y += hash.o
14ifdef CONFIG_SYS_HUSH_PARSER
15obj-y += cli_hush.o
16endif
17
18# We always have this since drivers/ddr/fs/interactive.c needs it
19obj-y += cli_simple.o
20
21obj-y += cli.o
22obj-y += cli_readline.o
23obj-y += s_record.o
24obj-y += xyzModem.o
25obj-y += cmd_disk.o
26
27# This option is not just y/n - it can have a numeric value
28ifdef CONFIG_BOOTDELAY
29obj-y += autoboot.o
30endif
31
32# This option is not just y/n - it can have a numeric value
33ifdef CONFIG_BOOT_RETRY_TIME
34obj-y += bootretry.o
35endif
36
37# boards
38obj-$(CONFIG_SYS_GENERIC_BOARD) += board_f.o
39obj-$(CONFIG_SYS_GENERIC_BOARD) += board_r.o
40
41# core command
42obj-y += cmd_boot.o
43obj-$(CONFIG_CMD_BOOTM) += cmd_bootm.o bootm.o bootm_os.o
44obj-y += cmd_help.o
45obj-y += cmd_version.o
46
47# environment
48obj-y += env_attr.o
49obj-y += env_callback.o
50obj-y += env_flags.o
51obj-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o
52obj-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o
53extra-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o
54obj-$(CONFIG_ENV_IS_IN_EEPROM) += env_embedded.o
55extra-$(CONFIG_ENV_IS_IN_FLASH) += env_embedded.o
56obj-$(CONFIG_ENV_IS_IN_NVRAM) += env_embedded.o
57obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
58obj-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o
59obj-$(CONFIG_ENV_IS_IN_FAT) += env_fat.o
60obj-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o
61obj-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o
62obj-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o
63obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o
64obj-$(CONFIG_ENV_IS_IN_REMOTE) += env_remote.o
65obj-$(CONFIG_ENV_IS_IN_UBI) += env_ubi.o
66obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
67
68# command
69obj-$(CONFIG_CMD_AES) += cmd_aes.o
70obj-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o
71obj-$(CONFIG_SOURCE) += cmd_source.o
72obj-$(CONFIG_CMD_SOURCE) += cmd_source.o
73obj-$(CONFIG_CMD_BDI) += cmd_bdinfo.o
74obj-$(CONFIG_CMD_BEDBUG) += bedbug.o cmd_bedbug.o
75obj-$(CONFIG_CMD_BMP) += cmd_bmp.o
76obj-$(CONFIG_CMD_BOOTMENU) += cmd_bootmenu.o
77obj-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o
78obj-$(CONFIG_CMD_BOOTSTAGE) += cmd_bootstage.o
79obj-$(CONFIG_CMD_CACHE) += cmd_cache.o
80obj-$(CONFIG_CMD_CBFS) += cmd_cbfs.o
81obj-$(CONFIG_CMD_CLK) += cmd_clk.o
82obj-$(CONFIG_CMD_CONSOLE) += cmd_console.o
83obj-$(CONFIG_CMD_CPLBINFO) += cmd_cplbinfo.o
84obj-$(CONFIG_DATAFLASH_MMC_SELECT) += cmd_dataflash_mmc_mux.o
85obj-$(CONFIG_CMD_DATE) += cmd_date.o
86obj-$(CONFIG_CMD_DEMO) += cmd_demo.o
87obj-$(CONFIG_CMD_SOUND) += cmd_sound.o
88ifdef CONFIG_4xx
89obj-$(CONFIG_CMD_SETGETDCR) += cmd_dcr.o
90endif
91ifdef CONFIG_POST
92obj-$(CONFIG_CMD_DIAG) += cmd_diag.o
93endif
94obj-$(CONFIG_CMD_DISPLAY) += cmd_display.o
95obj-$(CONFIG_CMD_DTT) += cmd_dtt.o
96obj-$(CONFIG_CMD_ECHO) += cmd_echo.o
97obj-$(CONFIG_ENV_IS_IN_EEPROM) += cmd_eeprom.o
98obj-$(CONFIG_CMD_EEPROM) += cmd_eeprom.o
99obj-$(CONFIG_CMD_ELF) += cmd_elf.o
100obj-$(CONFIG_SYS_HUSH_PARSER) += cmd_exit.o
101obj-$(CONFIG_CMD_EXT4) += cmd_ext4.o
102obj-$(CONFIG_CMD_EXT2) += cmd_ext2.o
103obj-$(CONFIG_CMD_FAT) += cmd_fat.o
104obj-$(CONFIG_CMD_FDC) += cmd_fdc.o
105obj-$(CONFIG_OF_LIBFDT) += cmd_fdt.o fdt_support.o
106obj-$(CONFIG_CMD_FITUPD) += cmd_fitupd.o
107obj-$(CONFIG_CMD_FLASH) += cmd_flash.o
108ifdef CONFIG_FPGA
109obj-$(CONFIG_CMD_FPGA) += cmd_fpga.o
110endif
111obj-$(CONFIG_CMD_FPGAD) += cmd_fpgad.o
112obj-$(CONFIG_CMD_FS_GENERIC) += cmd_fs.o
113obj-$(CONFIG_CMD_FUSE) += cmd_fuse.o
114obj-$(CONFIG_CMD_GETTIME) += cmd_gettime.o
115obj-$(CONFIG_CMD_GPIO) += cmd_gpio.o
116obj-$(CONFIG_CMD_I2C) += cmd_i2c.o
117obj-$(CONFIG_CMD_IOTRACE) += cmd_iotrace.o
118obj-$(CONFIG_CMD_HASH) += cmd_hash.o
119obj-$(CONFIG_CMD_IDE) += cmd_ide.o
120obj-$(CONFIG_CMD_IMMAP) += cmd_immap.o
121obj-$(CONFIG_CMD_INI) += cmd_ini.o
122obj-$(CONFIG_CMD_IRQ) += cmd_irq.o
123obj-$(CONFIG_CMD_ITEST) += cmd_itest.o
124obj-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o
125obj-$(CONFIG_CMD_CRAMFS) += cmd_cramfs.o
126obj-$(CONFIG_CMD_LDRINFO) += cmd_ldrinfo.o
127obj-$(CONFIG_CMD_LED) += cmd_led.o
128obj-$(CONFIG_CMD_LICENSE) += cmd_license.o
129obj-y += cmd_load.o
130obj-$(CONFIG_LOGBUFFER) += cmd_log.o
131obj-$(CONFIG_ID_EEPROM) += cmd_mac.o
132obj-$(CONFIG_CMD_MD5SUM) += cmd_md5sum.o
133obj-$(CONFIG_CMD_MEMORY) += cmd_mem.o
134obj-$(CONFIG_CMD_IO) += cmd_io.o
135obj-$(CONFIG_CMD_MFSL) += cmd_mfsl.o
136obj-$(CONFIG_MII) += miiphyutil.o
137obj-$(CONFIG_CMD_MII) += miiphyutil.o
138obj-$(CONFIG_PHYLIB) += miiphyutil.o
139obj-$(CONFIG_CMD_MII) += cmd_mii.o
140ifdef CONFIG_PHYLIB
141obj-$(CONFIG_CMD_MII) += cmd_mdio.o
142endif
143obj-$(CONFIG_CMD_MISC) += cmd_misc.o
144obj-$(CONFIG_CMD_MMC) += cmd_mmc.o
145obj-$(CONFIG_CMD_MMC_SPI) += cmd_mmc_spi.o
146obj-$(CONFIG_MP) += cmd_mp.o
147obj-$(CONFIG_CMD_MTDPARTS) += cmd_mtdparts.o
148obj-$(CONFIG_CMD_NAND) += cmd_nand.o
149obj-$(CONFIG_CMD_NET) += cmd_net.o
150obj-$(CONFIG_CMD_ONENAND) += cmd_onenand.o
151obj-$(CONFIG_CMD_OTP) += cmd_otp.o
152obj-$(CONFIG_CMD_PART) += cmd_part.o
153ifdef CONFIG_PCI
154obj-$(CONFIG_CMD_PCI) += cmd_pci.o
155endif
156obj-y += cmd_pcmcia.o
157obj-$(CONFIG_CMD_PORTIO) += cmd_portio.o
158obj-$(CONFIG_CMD_PXE) += cmd_pxe.o
159obj-$(CONFIG_CMD_READ) += cmd_read.o
160obj-$(CONFIG_CMD_REGINFO) += cmd_reginfo.o
161obj-$(CONFIG_CMD_REISER) += cmd_reiser.o
162obj-$(CONFIG_SANDBOX) += cmd_sandbox.o
163obj-$(CONFIG_CMD_SATA) += cmd_sata.o
164obj-$(CONFIG_CMD_SF) += cmd_sf.o
165obj-$(CONFIG_CMD_SCSI) += cmd_scsi.o
166obj-$(CONFIG_CMD_SHA1SUM) += cmd_sha1sum.o
167obj-$(CONFIG_CMD_SETEXPR) += cmd_setexpr.o
168obj-$(CONFIG_CMD_SOFTSWITCH) += cmd_softswitch.o
169obj-$(CONFIG_CMD_SPI) += cmd_spi.o
170obj-$(CONFIG_CMD_SPIBOOTLDR) += cmd_spibootldr.o
171obj-$(CONFIG_CMD_STRINGS) += cmd_strings.o
172obj-$(CONFIG_CMD_TERMINAL) += cmd_terminal.o
173obj-$(CONFIG_CMD_TIME) += cmd_time.o
174obj-$(CONFIG_CMD_TRACE) += cmd_trace.o
175obj-$(CONFIG_SYS_HUSH_PARSER) += cmd_test.o
176obj-$(CONFIG_CMD_TPM) += cmd_tpm.o
177obj-$(CONFIG_CMD_TSI148) += cmd_tsi148.o
178obj-$(CONFIG_CMD_UBI) += cmd_ubi.o
179obj-$(CONFIG_CMD_UBIFS) += cmd_ubifs.o
180obj-$(CONFIG_CMD_UNIVERSE) += cmd_universe.o
181obj-$(CONFIG_CMD_UNZIP) += cmd_unzip.o
182ifdef CONFIG_LZMA
183obj-$(CONFIG_CMD_LZMADEC) += cmd_lzmadec.o
184endif
185ifdef CONFIG_CMD_USB
186obj-y += cmd_usb.o
187obj-y += usb.o usb_hub.o
188obj-$(CONFIG_USB_STORAGE) += usb_storage.o
189endif
190obj-$(CONFIG_CMD_FASTBOOT) += cmd_fastboot.o
191
192obj-$(CONFIG_CMD_USB_MASS_STORAGE) += cmd_usb_mass_storage.o
193obj-$(CONFIG_CMD_THOR_DOWNLOAD) += cmd_thordown.o
194obj-$(CONFIG_CMD_XIMG) += cmd_ximg.o
195obj-$(CONFIG_YAFFS2) += cmd_yaffs2.o
196obj-$(CONFIG_CMD_SPL) += cmd_spl.o
197obj-$(CONFIG_CMD_ZIP) += cmd_zip.o
198obj-$(CONFIG_CMD_ZFS) += cmd_zfs.o
199
200# others
201obj-$(CONFIG_BOOTSTAGE) += bootstage.o
202obj-$(CONFIG_CONSOLE_MUX) += iomux.o
203obj-y += flash.o
204obj-$(CONFIG_CMD_KGDB) += kgdb.o kgdb_stubs.o
205obj-$(CONFIG_I2C_EDID) += edid.o
206obj-$(CONFIG_KALLSYMS) += kallsyms.o
207obj-y += splash.o
208obj-$(CONFIG_LCD) += lcd.o
209obj-$(CONFIG_LYNXKDI) += lynxkdi.o
210obj-$(CONFIG_MENU) += menu.o
211obj-$(CONFIG_MODEM_SUPPORT) += modem.o
212obj-$(CONFIG_UPDATE_TFTP) += update.o
213obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
214obj-$(CONFIG_CMD_DFU) += cmd_dfu.o
215obj-$(CONFIG_CMD_GPT) += cmd_gpt.o
216endif
217
218ifdef CONFIG_SPL_BUILD
219obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
220obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o
221obj-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o
222ifdef CONFIG_SPL_USB_HOST_SUPPORT
223obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o
224obj-$(CONFIG_USB_STORAGE) += usb_storage.o
225endif
226ifdef CONFIG_SPL_SATA_SUPPORT
227obj-$(CONFIG_CMD_SCSI) += cmd_scsi.o
228endif
229# environment
230ifdef CONFIG_SPL_ENV_SUPPORT
231obj-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o
232obj-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o
233obj-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o
234obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
235obj-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o
236obj-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o
237obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o
238obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
239endif
240endif
241# core command
242obj-y += cmd_nvedit.o
243#environment
244obj-y += env_common.o
245#others
246obj-$(CONFIG_DDR_SPD) += ddr_spd.o
247obj-$(CONFIG_SPD_EEPROM) += ddr_spd.o
248obj-$(CONFIG_HWCONFIG) += hwconfig.o
249obj-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o
250obj-y += console.o
251obj-$(CONFIG_CROS_EC) += cros_ec.o
252obj-y += dlmalloc.o
253obj-y += image.o
254obj-$(CONFIG_ANDROID_BOOT_IMAGE) += image-android.o
255obj-$(CONFIG_OF_LIBFDT) += image-fdt.o
256obj-$(CONFIG_FIT) += image-fit.o
257obj-$(CONFIG_FIT_SIGNATURE) += image-sig.o
258obj-$(CONFIG_IO_TRACE) += iotrace.o
259obj-y += memsize.o
260obj-y += stdio.o
261
262# This option is not just y/n - it can have a numeric value
263ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV
264obj-y += aboot.o
265obj-y += fb_mmc.o
266endif
267
268obj-$(CONFIG_CMD_BLOB) += cmd_blob.o
269
270CFLAGS_env_embedded.o := -Wa,--no-warn -DENV_CRC=$(shell tools/envcrc 2>/dev/null)
271