Makefile 8.31 KB
Newer Older
wdenk's avatar
wdenk committed
1
#
2
# (C) Copyright 2004-2006
wdenk's avatar
wdenk committed
3 4
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
5
# SPDX-License-Identifier:	GPL-2.0+
wdenk's avatar
wdenk committed
6 7
#

8
# core
9
ifndef CONFIG_SPL_BUILD
10 11 12 13
obj-y += main.o
obj-y += command.o
obj-y += exports.o
obj-y += hash.o
14 15 16 17 18 19 20
ifdef CONFIG_SYS_HUSH_PARSER
obj-y += cli_hush.o
endif

# We always have this since drivers/ddr/fs/interactive.c needs it
obj-y += cli_simple.o

21
obj-y += cli.o
22
obj-y += cli_readline.o
23 24 25
obj-y += s_record.o
obj-y += xyzModem.o
obj-y += cmd_disk.o
26

27 28 29 30 31
# This option is not just y/n - it can have a numeric value
ifdef CONFIG_BOOTDELAY
obj-y += autoboot.o
endif

32 33 34 35 36
# This option is not just y/n - it can have a numeric value
ifdef CONFIG_BOOT_RETRY_TIME
obj-y += bootretry.o
endif

37
# boards
38 39
obj-$(CONFIG_SYS_GENERIC_BOARD) += board_f.o
obj-$(CONFIG_SYS_GENERIC_BOARD) += board_r.o
40

41
# core command
42
obj-y += cmd_boot.o
43
obj-$(CONFIG_CMD_BOOTM) += cmd_bootm.o bootm.o bootm_os.o
44 45
obj-y += cmd_help.o
obj-y += cmd_version.o
46

47
# environment
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
obj-y += env_attr.o
obj-y += env_callback.o
obj-y += env_flags.o
obj-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o
obj-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o
extra-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o
obj-$(CONFIG_ENV_IS_IN_EEPROM) += env_embedded.o
extra-$(CONFIG_ENV_IS_IN_FLASH) += env_embedded.o
obj-$(CONFIG_ENV_IS_IN_NVRAM) += env_embedded.o
obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
obj-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o
obj-$(CONFIG_ENV_IS_IN_FAT) += env_fat.o
obj-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o
obj-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o
obj-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o
obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o
obj-$(CONFIG_ENV_IS_IN_REMOTE) += env_remote.o
obj-$(CONFIG_ENV_IS_IN_UBI) += env_ubi.o
obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
67 68

# command
69
obj-$(CONFIG_CMD_AES) += cmd_aes.o
70 71 72 73 74 75 76 77 78 79 80
obj-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o
obj-$(CONFIG_SOURCE) += cmd_source.o
obj-$(CONFIG_CMD_SOURCE) += cmd_source.o
obj-$(CONFIG_CMD_BDI) += cmd_bdinfo.o
obj-$(CONFIG_CMD_BEDBUG) += bedbug.o cmd_bedbug.o
obj-$(CONFIG_CMD_BMP) += cmd_bmp.o
obj-$(CONFIG_CMD_BOOTMENU) += cmd_bootmenu.o
obj-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o
obj-$(CONFIG_CMD_BOOTSTAGE) += cmd_bootstage.o
obj-$(CONFIG_CMD_CACHE) += cmd_cache.o
obj-$(CONFIG_CMD_CBFS) += cmd_cbfs.o
81
obj-$(CONFIG_CMD_CLK) += cmd_clk.o
82 83 84 85
obj-$(CONFIG_CMD_CONSOLE) += cmd_console.o
obj-$(CONFIG_CMD_CPLBINFO) += cmd_cplbinfo.o
obj-$(CONFIG_DATAFLASH_MMC_SELECT) += cmd_dataflash_mmc_mux.o
obj-$(CONFIG_CMD_DATE) += cmd_date.o
86
obj-$(CONFIG_CMD_DEMO) += cmd_demo.o
87
obj-$(CONFIG_CMD_SOUND) += cmd_sound.o
88
ifdef CONFIG_4xx
89
obj-$(CONFIG_CMD_SETGETDCR) += cmd_dcr.o
90 91
endif
ifdef CONFIG_POST
92
obj-$(CONFIG_CMD_DIAG) += cmd_diag.o
93
endif
94 95 96 97 98 99 100 101 102 103
obj-$(CONFIG_CMD_DISPLAY) += cmd_display.o
obj-$(CONFIG_CMD_DTT) += cmd_dtt.o
obj-$(CONFIG_CMD_ECHO) += cmd_echo.o
obj-$(CONFIG_ENV_IS_IN_EEPROM) += cmd_eeprom.o
obj-$(CONFIG_CMD_EEPROM) += cmd_eeprom.o
obj-$(CONFIG_CMD_ELF) += cmd_elf.o
obj-$(CONFIG_SYS_HUSH_PARSER) += cmd_exit.o
obj-$(CONFIG_CMD_EXT4) += cmd_ext4.o
obj-$(CONFIG_CMD_EXT2) += cmd_ext2.o
obj-$(CONFIG_CMD_FAT) += cmd_fat.o
Tom Rini's avatar
Tom Rini committed
104
obj-$(CONFIG_CMD_FDC) += cmd_fdc.o
105 106 107
obj-$(CONFIG_OF_LIBFDT) += cmd_fdt.o fdt_support.o
obj-$(CONFIG_CMD_FITUPD) += cmd_fitupd.o
obj-$(CONFIG_CMD_FLASH) += cmd_flash.o
108
ifdef CONFIG_FPGA
109
obj-$(CONFIG_CMD_FPGA) += cmd_fpga.o
110
endif
111 112 113 114 115 116
obj-$(CONFIG_CMD_FPGAD) += cmd_fpgad.o
obj-$(CONFIG_CMD_FS_GENERIC) += cmd_fs.o
obj-$(CONFIG_CMD_FUSE) += cmd_fuse.o
obj-$(CONFIG_CMD_GETTIME) += cmd_gettime.o
obj-$(CONFIG_CMD_GPIO) += cmd_gpio.o
obj-$(CONFIG_CMD_I2C) += cmd_i2c.o
Simon Glass's avatar
Simon Glass committed
117
obj-$(CONFIG_CMD_IOTRACE) += cmd_iotrace.o
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
obj-$(CONFIG_CMD_HASH) += cmd_hash.o
obj-$(CONFIG_CMD_IDE) += cmd_ide.o
obj-$(CONFIG_CMD_IMMAP) += cmd_immap.o
obj-$(CONFIG_CMD_INI) += cmd_ini.o
obj-$(CONFIG_CMD_IRQ) += cmd_irq.o
obj-$(CONFIG_CMD_ITEST) += cmd_itest.o
obj-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o
obj-$(CONFIG_CMD_CRAMFS) += cmd_cramfs.o
obj-$(CONFIG_CMD_LDRINFO) += cmd_ldrinfo.o
obj-$(CONFIG_CMD_LED) += cmd_led.o
obj-$(CONFIG_CMD_LICENSE) += cmd_license.o
obj-y += cmd_load.o
obj-$(CONFIG_LOGBUFFER) += cmd_log.o
obj-$(CONFIG_ID_EEPROM) += cmd_mac.o
obj-$(CONFIG_CMD_MD5SUM) += cmd_md5sum.o
obj-$(CONFIG_CMD_MEMORY) += cmd_mem.o
obj-$(CONFIG_CMD_IO) += cmd_io.o
obj-$(CONFIG_CMD_MFSL) += cmd_mfsl.o
obj-$(CONFIG_MII) += miiphyutil.o
obj-$(CONFIG_CMD_MII) += miiphyutil.o
obj-$(CONFIG_PHYLIB) += miiphyutil.o
obj-$(CONFIG_CMD_MII) += cmd_mii.o
140
ifdef CONFIG_PHYLIB
141
obj-$(CONFIG_CMD_MII) += cmd_mdio.o
142
endif
143 144 145 146 147 148 149 150 151 152
obj-$(CONFIG_CMD_MISC) += cmd_misc.o
obj-$(CONFIG_CMD_MMC) += cmd_mmc.o
obj-$(CONFIG_CMD_MMC_SPI) += cmd_mmc_spi.o
obj-$(CONFIG_MP) += cmd_mp.o
obj-$(CONFIG_CMD_MTDPARTS) += cmd_mtdparts.o
obj-$(CONFIG_CMD_NAND) += cmd_nand.o
obj-$(CONFIG_CMD_NET) += cmd_net.o
obj-$(CONFIG_CMD_ONENAND) += cmd_onenand.o
obj-$(CONFIG_CMD_OTP) += cmd_otp.o
obj-$(CONFIG_CMD_PART) += cmd_part.o
153
ifdef CONFIG_PCI
154
obj-$(CONFIG_CMD_PCI) += cmd_pci.o
155
endif
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
obj-y += cmd_pcmcia.o
obj-$(CONFIG_CMD_PORTIO) += cmd_portio.o
obj-$(CONFIG_CMD_PXE) += cmd_pxe.o
obj-$(CONFIG_CMD_READ) += cmd_read.o
obj-$(CONFIG_CMD_REGINFO) += cmd_reginfo.o
obj-$(CONFIG_CMD_REISER) += cmd_reiser.o
obj-$(CONFIG_SANDBOX) += cmd_sandbox.o
obj-$(CONFIG_CMD_SATA) += cmd_sata.o
obj-$(CONFIG_CMD_SF) += cmd_sf.o
obj-$(CONFIG_CMD_SCSI) += cmd_scsi.o
obj-$(CONFIG_CMD_SHA1SUM) += cmd_sha1sum.o
obj-$(CONFIG_CMD_SETEXPR) += cmd_setexpr.o
obj-$(CONFIG_CMD_SOFTSWITCH) += cmd_softswitch.o
obj-$(CONFIG_CMD_SPI) += cmd_spi.o
obj-$(CONFIG_CMD_SPIBOOTLDR) += cmd_spibootldr.o
obj-$(CONFIG_CMD_STRINGS) += cmd_strings.o
obj-$(CONFIG_CMD_TERMINAL) += cmd_terminal.o
obj-$(CONFIG_CMD_TIME) += cmd_time.o
obj-$(CONFIG_CMD_TRACE) += cmd_trace.o
obj-$(CONFIG_SYS_HUSH_PARSER) += cmd_test.o
obj-$(CONFIG_CMD_TPM) += cmd_tpm.o
obj-$(CONFIG_CMD_TSI148) += cmd_tsi148.o
obj-$(CONFIG_CMD_UBI) += cmd_ubi.o
obj-$(CONFIG_CMD_UBIFS) += cmd_ubifs.o
obj-$(CONFIG_CMD_UNIVERSE) += cmd_universe.o
obj-$(CONFIG_CMD_UNZIP) += cmd_unzip.o
Patrice Bouchand's avatar
Patrice Bouchand committed
182 183 184
ifdef CONFIG_LZMA
obj-$(CONFIG_CMD_LZMADEC) += cmd_lzmadec.o
endif
185
ifdef CONFIG_CMD_USB
186 187 188
obj-y += cmd_usb.o
obj-y += usb.o usb_hub.o
obj-$(CONFIG_USB_STORAGE) += usb_storage.o
189
endif
190 191
obj-$(CONFIG_CMD_FASTBOOT) += cmd_fastboot.o

192 193 194 195 196 197 198
obj-$(CONFIG_CMD_USB_MASS_STORAGE) += cmd_usb_mass_storage.o
obj-$(CONFIG_CMD_THOR_DOWNLOAD) += cmd_thordown.o
obj-$(CONFIG_CMD_XIMG) += cmd_ximg.o
obj-$(CONFIG_YAFFS2) += cmd_yaffs2.o
obj-$(CONFIG_CMD_SPL) += cmd_spl.o
obj-$(CONFIG_CMD_ZIP) += cmd_zip.o
obj-$(CONFIG_CMD_ZFS) += cmd_zfs.o
199 200

# others
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
obj-$(CONFIG_BOOTSTAGE) += bootstage.o
obj-$(CONFIG_CONSOLE_MUX) += iomux.o
obj-y += flash.o
obj-$(CONFIG_CMD_KGDB) += kgdb.o kgdb_stubs.o
obj-$(CONFIG_I2C_EDID) += edid.o
obj-$(CONFIG_KALLSYMS) += kallsyms.o
obj-y += splash.o
obj-$(CONFIG_LCD) += lcd.o
obj-$(CONFIG_LYNXKDI) += lynxkdi.o
obj-$(CONFIG_MENU) += menu.o
obj-$(CONFIG_MODEM_SUPPORT) += modem.o
obj-$(CONFIG_UPDATE_TFTP) += update.o
obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
obj-$(CONFIG_CMD_DFU) += cmd_dfu.o
obj-$(CONFIG_CMD_GPT) += cmd_gpt.o
216 217
endif

218
ifdef CONFIG_SPL_BUILD
219 220 221
obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o
obj-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o
222 223 224 225
ifdef CONFIG_SPL_USB_HOST_SUPPORT
obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o
obj-$(CONFIG_USB_STORAGE) += usb_storage.o
endif
226 227 228
ifdef CONFIG_SPL_SATA_SUPPORT
obj-$(CONFIG_CMD_SCSI) += cmd_scsi.o
endif
229 230 231 232 233
# environment
ifdef CONFIG_SPL_ENV_SUPPORT
obj-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o
obj-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o
obj-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o
234 235 236 237 238
obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
obj-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o
obj-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o
obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o
obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
239
endif
240
endif
241
# core command
242
obj-y += cmd_nvedit.o
243
#environment
244
obj-y += env_common.o
245 246 247 248 249 250 251
#others
ifdef CONFIG_DDR_SPD
SPD := y
endif
ifdef CONFIG_SPD_EEPROM
SPD := y
endif
252 253 254 255
obj-$(SPD) += ddr_spd.o
obj-$(CONFIG_HWCONFIG) += hwconfig.o
obj-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o
obj-y += console.o
256
obj-$(CONFIG_CROS_EC) += cros_ec.o
257 258
obj-y += dlmalloc.o
obj-y += image.o
259
obj-$(CONFIG_ANDROID_BOOT_IMAGE) += image-android.o
260 261 262
obj-$(CONFIG_OF_LIBFDT) += image-fdt.o
obj-$(CONFIG_FIT) += image-fit.o
obj-$(CONFIG_FIT_SIGNATURE) += image-sig.o
Simon Glass's avatar
Simon Glass committed
263
obj-$(CONFIG_IO_TRACE) += iotrace.o
264 265
obj-y += memsize.o
obj-y += stdio.o
wdenk's avatar
wdenk committed
266

267 268 269 270 271
# This option is not just y/n - it can have a numeric value
ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV
obj-y += fb_mmc.o
endif

272
CFLAGS_env_embedded.o := -Wa,--no-warn -DENV_CRC=$(shell tools/envcrc 2>/dev/null)