xref: /openbmc/u-boot/common/Makefile (revision 71b75644)
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-$(CONFIG_HASH) += 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
29obj-$(CONFIG_CMD_BOOTZ) += bootm.o bootm_os.o
30obj-$(CONFIG_CMD_BOOTI) += bootm.o bootm_os.o
31
32obj-$(CONFIG_CMD_BEDBUG) += bedbug.o
33obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o
34
35obj-$(CONFIG_MII) += miiphyutil.o
36obj-$(CONFIG_CMD_MII) += miiphyutil.o
37obj-$(CONFIG_PHYLIB) += miiphyutil.o
38
39ifdef CONFIG_CMD_USB
40obj-y += usb.o usb_hub.o
41obj-$(CONFIG_USB_STORAGE) += usb_storage.o
42endif
43
44# others
45obj-$(CONFIG_CONSOLE_MUX) += iomux.o
46obj-$(CONFIG_MTD_NOR_FLASH) += flash.o
47obj-$(CONFIG_CMD_KGDB) += kgdb.o kgdb_stubs.o
48obj-$(CONFIG_I2C_EDID) += edid.o
49obj-$(CONFIG_KALLSYMS) += kallsyms.o
50obj-y += splash.o
51obj-$(CONFIG_SPLASH_SOURCE) += splash_source.o
52ifndef CONFIG_DM_VIDEO
53obj-$(CONFIG_LCD) += lcd.o lcd_console.o
54endif
55obj-$(CONFIG_LCD_ROTATION) += lcd_console_rotation.o
56obj-$(CONFIG_LCD_DT_SIMPLEFB) += lcd_simplefb.o
57obj-$(CONFIG_LYNXKDI) += lynxkdi.o
58obj-$(CONFIG_MENU) += menu.o
59obj-$(CONFIG_UPDATE_TFTP) += update.o
60obj-$(CONFIG_DFU_TFTP) += update.o
61obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
62obj-$(CONFIG_CMDLINE) += cli_readline.o cli_simple.o
63
64endif # !CONFIG_SPL_BUILD
65
66obj-$(CONFIG_$(SPL_TPL_)BOOTSTAGE) += bootstage.o
67
68ifdef CONFIG_SPL_BUILD
69ifdef CONFIG_SPL_DFU_SUPPORT
70obj-$(CONFIG_DFU_OVER_USB) += dfu.o
71endif
72obj-$(CONFIG_SPL_DFU_SUPPORT) += cli_hush.o
73obj-$(CONFIG_SPL_HASH_SUPPORT) += hash.o
74obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o
75obj-$(CONFIG_SPL_LOAD_FIT) += common_fit.o
76obj-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o
77obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o
78ifdef CONFIG_SPL_USB_HOST_SUPPORT
79obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o
80obj-$(CONFIG_USB_STORAGE) += usb_storage.o
81endif
82endif
83#others
84obj-$(CONFIG_DDR_SPD) += ddr_spd.o
85obj-$(CONFIG_SPD_EEPROM) += ddr_spd.o
86obj-$(CONFIG_HWCONFIG) += hwconfig.o
87obj-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o
88ifdef CONFIG_SPL_BUILD
89ifdef CONFIG_TPL_BUILD
90obj-$(CONFIG_TPL_SERIAL_SUPPORT) += console.o
91else
92obj-$(CONFIG_SPL_SERIAL_SUPPORT) += console.o
93endif
94else
95obj-y += console.o
96endif
97obj-$(CONFIG_CROS_EC) += cros_ec.o
98obj-y += dlmalloc.o
99ifdef CONFIG_SYS_MALLOC_F
100ifneq ($(CONFIG_$(SPL_)SYS_MALLOC_F_LEN),0)
101obj-y += malloc_simple.o
102endif
103endif
104obj-y += image.o
105obj-$(CONFIG_ANDROID_BOOT_IMAGE) += image-android.o
106obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += image-fdt.o
107obj-$(CONFIG_$(SPL_TPL_)FIT) += image-fit.o
108obj-$(CONFIG_$(SPL_)MULTI_DTB_FIT) += boot_fit.o common_fit.o
109obj-$(CONFIG_$(SPL_TPL_)FIT_SIGNATURE) += image-sig.o
110obj-$(CONFIG_IO_TRACE) += iotrace.o
111obj-y += memsize.o
112obj-y += stdio.o
113
114ifndef CONFIG_SPL_BUILD
115# This option is not just y/n - it can have a numeric value
116ifdef CONFIG_FASTBOOT_FLASH
117obj-y += image-sparse.o
118ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV
119obj-y += fb_mmc.o
120endif
121ifdef CONFIG_FASTBOOT_FLASH_NAND_DEV
122obj-y += fb_nand.o
123endif
124endif
125endif
126
127ifdef CONFIG_CMD_EEPROM_LAYOUT
128obj-y += eeprom/eeprom_field.o eeprom/eeprom_layout.o
129endif
130
131obj-y += cli.o
132obj-$(CONFIG_FSL_DDR_INTERACTIVE) += cli_simple.o cli_readline.o
133obj-$(CONFIG_DFU_OVER_USB) += dfu.o
134obj-y += command.o
135obj-$(CONFIG_$(SPL_)LOG) += log.o
136obj-$(CONFIG_$(SPL_)LOG_CONSOLE) += log_console.o
137obj-y += s_record.o
138obj-y += xyzModem.o
139