xref: /openbmc/u-boot/common/Makefile (revision 699c4e59)
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
14obj-$(CONFIG_HUSH_PARSER) += cli_hush.o
15obj-$(CONFIG_AUTOBOOT) += autoboot.o
16
17# This option is not just y/n - it can have a numeric value
18ifdef CONFIG_BOOT_RETRY_TIME
19obj-y += bootretry.o
20endif
21
22# boards
23obj-y += board_f.o
24obj-y += board_r.o
25obj-$(CONFIG_DISPLAY_BOARDINFO) += board_info.o
26obj-$(CONFIG_DISPLAY_BOARDINFO_LATE) += board_info.o
27
28obj-$(CONFIG_CMD_BOOTM) += bootm.o bootm_os.o
29
30# environment
31obj-y += env_attr.o
32obj-y += env_callback.o
33obj-y += env_flags.o
34obj-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o
35obj-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o
36extra-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o
37obj-$(CONFIG_ENV_IS_IN_EEPROM) += env_embedded.o
38extra-$(CONFIG_ENV_IS_IN_FLASH) += env_embedded.o
39obj-$(CONFIG_ENV_IS_IN_NVRAM) += env_embedded.o
40obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
41obj-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o
42obj-$(CONFIG_ENV_IS_IN_FAT) += env_fat.o
43obj-$(CONFIG_ENV_IS_IN_EXT4) += env_ext4.o
44obj-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o
45obj-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o
46obj-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o
47obj-$(CONFIG_ENV_IS_IN_SATA) += env_sata.o
48obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o
49obj-$(CONFIG_ENV_IS_IN_REMOTE) += env_remote.o
50obj-$(CONFIG_ENV_IS_IN_UBI) += env_ubi.o
51obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
52
53obj-$(CONFIG_CMD_BEDBUG) += bedbug.o
54obj-$(CONFIG_$(SPL_)OF_LIBFDT) += fdt_support.o
55
56obj-$(CONFIG_MII) += miiphyutil.o
57obj-$(CONFIG_CMD_MII) += miiphyutil.o
58obj-$(CONFIG_PHYLIB) += miiphyutil.o
59
60ifdef CONFIG_CMD_USB
61obj-y += usb.o usb_hub.o
62obj-$(CONFIG_USB_STORAGE) += usb_storage.o
63endif
64
65# others
66obj-$(CONFIG_BOOTSTAGE) += bootstage.o
67obj-$(CONFIG_CONSOLE_MUX) += iomux.o
68obj-y += flash.o
69obj-$(CONFIG_CMD_KGDB) += kgdb.o kgdb_stubs.o
70obj-$(CONFIG_I2C_EDID) += edid.o
71obj-$(CONFIG_KALLSYMS) += kallsyms.o
72obj-y += splash.o
73obj-$(CONFIG_SPLASH_SOURCE) += splash_source.o
74ifndef CONFIG_DM_VIDEO
75obj-$(CONFIG_LCD) += lcd.o lcd_console.o
76endif
77obj-$(CONFIG_LCD_ROTATION) += lcd_console_rotation.o
78obj-$(CONFIG_LCD_DT_SIMPLEFB) += lcd_simplefb.o
79obj-$(CONFIG_LYNXKDI) += lynxkdi.o
80obj-$(CONFIG_MENU) += menu.o
81obj-$(CONFIG_CMD_SATA) += sata.o
82obj-$(CONFIG_SCSI) += scsi.o
83obj-$(CONFIG_UPDATE_TFTP) += update.o
84obj-$(CONFIG_DFU_TFTP) += update.o
85obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
86
87endif # !CONFIG_SPL_BUILD
88
89ifdef CONFIG_SPL_BUILD
90obj-$(CONFIG_SPL_HASH_SUPPORT) += hash.o
91obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
92obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o
93obj-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o
94obj-$(CONFIG_SPL_OF_TRANSLATE) += fdt_support.o
95ifdef CONFIG_SPL_USB_HOST_SUPPORT
96obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o
97obj-$(CONFIG_USB_STORAGE) += usb_storage.o
98endif
99# environment
100ifdef CONFIG_SPL_ENV_SUPPORT
101obj-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o
102obj-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o
103obj-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o
104obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
105obj-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o
106obj-$(CONFIG_ENV_IS_IN_FAT) += env_fat.o
107obj-$(CONFIG_ENV_IS_IN_EXT4) += env_ext4.o
108obj-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o
109obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o
110obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
111endif
112ifdef CONFIG_SPL_SATA_SUPPORT
113obj-$(CONFIG_SCSI) += scsi.o
114endif
115endif
116#environment
117obj-y += env_common.o
118#others
119obj-$(CONFIG_DDR_SPD) += ddr_spd.o
120obj-$(CONFIG_SPD_EEPROM) += ddr_spd.o
121obj-$(CONFIG_HWCONFIG) += hwconfig.o
122obj-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o
123ifdef CONFIG_SPL_BUILD
124obj-$(CONFIG_SPL_SERIAL_SUPPORT) += console.o
125else
126obj-y += console.o
127endif
128obj-$(CONFIG_CROS_EC) += cros_ec.o
129obj-y += dlmalloc.o
130ifdef CONFIG_SYS_MALLOC_F_LEN
131obj-y += malloc_simple.o
132endif
133obj-$(CONFIG_CMD_IDE) += ide.o
134obj-y += image.o
135obj-$(CONFIG_ANDROID_BOOT_IMAGE) += image-android.o
136obj-$(CONFIG_$(SPL_)OF_LIBFDT) += image-fdt.o
137obj-$(CONFIG_$(SPL_)FIT) += image-fit.o
138obj-$(CONFIG_$(SPL_)FIT_SIGNATURE) += image-sig.o
139obj-$(CONFIG_IO_TRACE) += iotrace.o
140obj-y += memsize.o
141obj-y += stdio.o
142
143# This option is not just y/n - it can have a numeric value
144ifdef CONFIG_FASTBOOT_FLASH
145obj-y += image-sparse.o
146ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV
147obj-y += fb_mmc.o
148endif
149ifdef CONFIG_FASTBOOT_FLASH_NAND_DEV
150obj-y += fb_nand.o
151endif
152endif
153
154ifdef CONFIG_CMD_EEPROM_LAYOUT
155obj-y += eeprom/eeprom_field.o eeprom/eeprom_layout.o
156endif
157# We always have this since drivers/ddr/fs/interactive.c needs it
158obj-$(CONFIG_CMDLINE) += cli_simple.o
159
160obj-y += cli.o
161obj-$(CONFIG_CMDLINE) += cli_readline.o
162obj-y += command.o
163obj-y += s_record.o
164obj-y += xyzModem.o
165
166CFLAGS_env_embedded.o := -Wa,--no-warn -DENV_CRC=$(shell tools/envcrc 2>/dev/null)
167