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