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