xref: /openbmc/u-boot/common/Makefile (revision ee943655)
1# SPDX-License-Identifier: GPL-2.0+
2#
3# (C) Copyright 2004-2006
4# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5
6# core
7ifndef CONFIG_SPL_BUILD
8obj-y += init/
9obj-y += main.o
10obj-y += exports.o
11obj-$(CONFIG_HASH) += hash.o
12obj-$(CONFIG_HUSH_PARSER) += cli_hush.o
13obj-$(CONFIG_AUTOBOOT) += autoboot.o
14
15# This option is not just y/n - it can have a numeric value
16ifdef CONFIG_BOOT_RETRY_TIME
17obj-y += bootretry.o
18endif
19
20# # boards
21obj-y += board_f.o
22obj-y += board_r.o
23obj-$(CONFIG_DISPLAY_BOARDINFO) += board_info.o
24obj-$(CONFIG_DISPLAY_BOARDINFO_LATE) += board_info.o
25
26obj-$(CONFIG_CMD_BOOTM) += bootm.o bootm_os.o
27obj-$(CONFIG_CMD_BOOTZ) += bootm.o bootm_os.o
28obj-$(CONFIG_CMD_BOOTI) += bootm.o bootm_os.o
29
30obj-$(CONFIG_CMD_BEDBUG) += bedbug.o
31obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o
32
33obj-$(CONFIG_MII) += miiphyutil.o
34obj-$(CONFIG_CMD_MII) += miiphyutil.o
35obj-$(CONFIG_PHYLIB) += miiphyutil.o
36
37ifdef CONFIG_CMD_USB
38obj-y += usb.o usb_hub.o
39obj-$(CONFIG_USB_STORAGE) += usb_storage.o
40endif
41
42# others
43obj-$(CONFIG_CONSOLE_MUX) += iomux.o
44obj-$(CONFIG_MTD_NOR_FLASH) += flash.o
45obj-$(CONFIG_CMD_KGDB) += kgdb.o kgdb_stubs.o
46obj-$(CONFIG_I2C_EDID) += edid.o
47obj-$(CONFIG_KALLSYMS) += kallsyms.o
48obj-y += splash.o
49obj-$(CONFIG_SPLASH_SOURCE) += splash_source.o
50ifndef CONFIG_DM_VIDEO
51obj-$(CONFIG_LCD) += lcd.o lcd_console.o
52endif
53obj-$(CONFIG_LCD_ROTATION) += lcd_console_rotation.o
54obj-$(CONFIG_LCD_DT_SIMPLEFB) += lcd_simplefb.o
55obj-$(CONFIG_LYNXKDI) += lynxkdi.o
56obj-$(CONFIG_MENU) += menu.o
57obj-$(CONFIG_UPDATE_TFTP) += update.o
58obj-$(CONFIG_DFU_TFTP) += update.o
59obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
60obj-$(CONFIG_CMDLINE) += cli_readline.o cli_simple.o
61
62endif # !CONFIG_SPL_BUILD
63
64obj-$(CONFIG_$(SPL_TPL_)BOOTSTAGE) += bootstage.o
65
66ifdef CONFIG_SPL_BUILD
67ifdef CONFIG_SPL_DFU_SUPPORT
68obj-$(CONFIG_DFU_OVER_USB) += dfu.o
69endif
70obj-$(CONFIG_SPL_DFU_SUPPORT) += cli_hush.o
71obj-$(CONFIG_SPL_HASH_SUPPORT) += hash.o
72obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o
73obj-$(CONFIG_SPL_LOAD_FIT) += common_fit.o
74obj-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o
75obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o
76ifdef CONFIG_SPL_USB_HOST_SUPPORT
77obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o
78obj-$(CONFIG_USB_STORAGE) += usb_storage.o
79endif
80endif
81#others
82obj-$(CONFIG_DDR_SPD) += ddr_spd.o
83obj-$(CONFIG_SPD_EEPROM) += ddr_spd.o
84obj-$(CONFIG_HWCONFIG) += hwconfig.o
85obj-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o
86ifdef CONFIG_SPL_BUILD
87ifdef CONFIG_TPL_BUILD
88obj-$(CONFIG_TPL_SERIAL_SUPPORT) += console.o
89else
90obj-$(CONFIG_SPL_SERIAL_SUPPORT) += console.o
91endif
92else
93obj-y += console.o
94endif
95obj-$(CONFIG_CROS_EC) += cros_ec.o
96obj-y += dlmalloc.o
97ifdef CONFIG_SYS_MALLOC_F
98ifneq ($(CONFIG_$(SPL_)SYS_MALLOC_F_LEN),0)
99obj-y += malloc_simple.o
100endif
101endif
102obj-y += image.o
103obj-$(CONFIG_ANDROID_BOOT_IMAGE) += image-android.o
104obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += image-fdt.o
105obj-$(CONFIG_$(SPL_TPL_)FIT) += image-fit.o
106obj-$(CONFIG_$(SPL_)MULTI_DTB_FIT) += boot_fit.o common_fit.o
107obj-$(CONFIG_$(SPL_TPL_)FIT_SIGNATURE) += image-sig.o
108obj-$(CONFIG_IO_TRACE) += iotrace.o
109obj-y += memsize.o
110obj-y += stdio.o
111
112ifndef CONFIG_SPL_BUILD
113# This option is not just y/n - it can have a numeric value
114ifdef CONFIG_FASTBOOT_FLASH
115obj-y += image-sparse.o
116ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV
117obj-y += fb_mmc.o
118endif
119ifdef CONFIG_FASTBOOT_FLASH_NAND_DEV
120obj-y += fb_nand.o
121endif
122endif
123endif
124
125ifdef CONFIG_CMD_EEPROM_LAYOUT
126obj-y += eeprom/eeprom_field.o eeprom/eeprom_layout.o
127endif
128
129obj-y += cli.o
130obj-$(CONFIG_FSL_DDR_INTERACTIVE) += cli_simple.o cli_readline.o
131obj-$(CONFIG_DFU_OVER_USB) += dfu.o
132obj-y += command.o
133obj-$(CONFIG_$(SPL_)LOG) += log.o
134obj-$(CONFIG_$(SPL_)LOG_CONSOLE) += log_console.o
135obj-y += s_record.o
136obj-y += xyzModem.o
137