blob: 9a9a065ad21d34224674ce7d30094433c619dd0c [file] [log] [blame]
wdenke831ad52002-10-17 21:52:26 +00001#
Marian Balakowiczd62379d2006-09-01 19:49:50 +02002# (C) Copyright 2004-2006
wdenke831ad52002-10-17 21:52:26 +00003# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005# SPDX-License-Identifier: GPL-2.0+
wdenke831ad52002-10-17 21:52:26 +00006#
7
Jean-Christophe PLAGNIOL-VILLARD178e1182008-08-29 21:53:57 +02008# core
Aneesh V55fc5b62011-07-13 05:11:06 +00009ifndef CONFIG_SPL_BUILD
Simon Glassb1beb112015-10-19 06:49:56 -060010obj-y += init/
Masahiro Yamada55c745d2013-10-17 17:34:59 +090011obj-y += main.o
Masahiro Yamada55c745d2013-10-17 17:34:59 +090012obj-y += exports.o
13obj-y += hash.o
Masahiro Yamada17a48e42016-06-21 02:11:19 +090014obj-$(CONFIG_HUSH_PARSER) += cli_hush.o
Masahiro Yamada622a01c2016-06-20 17:33:39 +090015obj-$(CONFIG_AUTOBOOT) += autoboot.o
Simon Glass7b6a95a2014-04-10 20:01:28 -060016
Simon Glass399ed9a2014-04-10 20:01:30 -060017# This option is not just y/n - it can have a numeric value
18ifdef CONFIG_BOOT_RETRY_TIME
19obj-y += bootretry.o
20endif
21
Simon Glassc45e3592013-03-11 06:49:53 +000022# boards
Simon Glass3bba6502016-05-14 18:49:35 -060023obj-y += board_f.o
24obj-y += board_r.o
Masahiro Yamada9607f7a2015-01-14 17:07:05 +090025obj-$(CONFIG_DISPLAY_BOARDINFO) += board_info.o
26obj-$(CONFIG_DISPLAY_BOARDINFO_LATE) += board_info.o
Simon Glassc45e3592013-03-11 06:49:53 +000027
Simon Glass29499a02016-01-17 20:53:51 -070028obj-$(CONFIG_CMD_BOOTM) += bootm.o bootm_os.o
Tom Rini36f067f2016-08-12 08:31:15 -040029obj-$(CONFIG_CMD_BOOTZ) += bootm.o bootm_os.o
30obj-$(CONFIG_CMD_BOOTI) += bootm.o bootm_os.o
Jean-Christophe PLAGNIOL-VILLARDaea6f852008-08-30 23:47:38 +020031
Jean-Christophe PLAGNIOL-VILLARD178e1182008-08-29 21:53:57 +020032# environment
Masahiro Yamada55c745d2013-10-17 17:34:59 +090033obj-y += env_attr.o
34obj-y += env_callback.o
35obj-y += env_flags.o
36obj-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o
37obj-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o
38extra-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o
39obj-$(CONFIG_ENV_IS_IN_EEPROM) += env_embedded.o
40extra-$(CONFIG_ENV_IS_IN_FLASH) += env_embedded.o
41obj-$(CONFIG_ENV_IS_IN_NVRAM) += env_embedded.o
42obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
43obj-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o
44obj-$(CONFIG_ENV_IS_IN_FAT) += env_fat.o
Stuart Longlandd1f40632016-02-23 15:51:26 +100045obj-$(CONFIG_ENV_IS_IN_EXT4) += env_ext4.o
Masahiro Yamada55c745d2013-10-17 17:34:59 +090046obj-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o
47obj-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o
48obj-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o
Peng Fan5da543c2016-04-03 21:52:13 +080049obj-$(CONFIG_ENV_IS_IN_SATA) += env_sata.o
Masahiro Yamada55c745d2013-10-17 17:34:59 +090050obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o
51obj-$(CONFIG_ENV_IS_IN_REMOTE) += env_remote.o
52obj-$(CONFIG_ENV_IS_IN_UBI) += env_ubi.o
53obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
Jean-Christophe PLAGNIOL-VILLARD178e1182008-08-29 21:53:57 +020054
Simon Glass29499a02016-01-17 20:53:51 -070055obj-$(CONFIG_CMD_BEDBUG) += bedbug.o
Simon Glass8b426922016-02-22 22:55:45 -070056obj-$(CONFIG_$(SPL_)OF_LIBFDT) += fdt_support.o
Simon Glass29499a02016-01-17 20:53:51 -070057
Masahiro Yamada55c745d2013-10-17 17:34:59 +090058obj-$(CONFIG_MII) += miiphyutil.o
59obj-$(CONFIG_CMD_MII) += miiphyutil.o
60obj-$(CONFIG_PHYLIB) += miiphyutil.o
Simon Glass29499a02016-01-17 20:53:51 -070061
Jean-Christophe PLAGNIOL-VILLARD178e1182008-08-29 21:53:57 +020062ifdef CONFIG_CMD_USB
Masahiro Yamada55c745d2013-10-17 17:34:59 +090063obj-y += usb.o usb_hub.o
64obj-$(CONFIG_USB_STORAGE) += usb_storage.o
Jean-Christophe PLAGNIOL-VILLARD178e1182008-08-29 21:53:57 +020065endif
Jean-Christophe PLAGNIOL-VILLARD74ba1ba2008-10-31 12:12:12 +010066
67# others
Masahiro Yamada55c745d2013-10-17 17:34:59 +090068obj-$(CONFIG_BOOTSTAGE) += bootstage.o
69obj-$(CONFIG_CONSOLE_MUX) += iomux.o
70obj-y += flash.o
71obj-$(CONFIG_CMD_KGDB) += kgdb.o kgdb_stubs.o
72obj-$(CONFIG_I2C_EDID) += edid.o
73obj-$(CONFIG_KALLSYMS) += kallsyms.o
74obj-y += splash.o
Nikita Kiryanov7f9ceea2015-01-14 10:42:54 +020075obj-$(CONFIG_SPLASH_SOURCE) += splash_source.o
Simon Glass68f5bf32016-01-18 19:52:16 -070076ifndef CONFIG_DM_VIDEO
Nikita Kiryanovf6ebf6a2014-12-08 17:14:45 +020077obj-$(CONFIG_LCD) += lcd.o lcd_console.o
Simon Glass68f5bf32016-01-18 19:52:16 -070078endif
Hannes Petermaiera3c8e862015-03-27 08:01:38 +010079obj-$(CONFIG_LCD_ROTATION) += lcd_console_rotation.o
Nikita Kiryanovb071e4c2015-02-03 13:32:31 +020080obj-$(CONFIG_LCD_DT_SIMPLEFB) += lcd_simplefb.o
Masahiro Yamada55c745d2013-10-17 17:34:59 +090081obj-$(CONFIG_LYNXKDI) += lynxkdi.o
82obj-$(CONFIG_MENU) += menu.o
Simon Glass3665a402016-05-01 11:36:11 -060083obj-$(CONFIG_CMD_SATA) += sata.o
Simon Glassc8e89ab2016-05-01 11:36:09 -060084obj-$(CONFIG_SCSI) += scsi.o
Masahiro Yamada55c745d2013-10-17 17:34:59 +090085obj-$(CONFIG_UPDATE_TFTP) += update.o
Lukasz Majewskie32125a2015-08-24 00:21:47 +020086obj-$(CONFIG_DFU_TFTP) += update.o
Masahiro Yamada55c745d2013-10-17 17:34:59 +090087obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
Przemyslaw Marczak4d569772015-04-20 20:07:43 +020088
Simon Glass29499a02016-01-17 20:53:51 -070089endif # !CONFIG_SPL_BUILD
Aneesh V55fc5b62011-07-13 05:11:06 +000090
Matt Porter79bfa732012-01-31 12:03:57 +000091ifdef CONFIG_SPL_BUILD
Teddy Reed5021e3c2016-06-09 19:18:44 -070092obj-$(CONFIG_SPL_HASH_SUPPORT) += hash.o
Masahiro Yamada55c745d2013-10-17 17:34:59 +090093obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
94obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o
95obj-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o
Stefan Roese74c83892015-11-26 13:38:15 +010096obj-$(CONFIG_SPL_OF_TRANSLATE) += fdt_support.o
Dan Murphycb367e12014-01-16 11:23:30 -060097ifdef CONFIG_SPL_USB_HOST_SUPPORT
98obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o
99obj-$(CONFIG_USB_STORAGE) += usb_storage.o
100endif
Tom Rinicc52ab02014-07-18 11:51:34 -0400101# environment
Simon Glass98b685d2016-09-12 23:18:25 -0600102ifdef CONFIG_TPL_BUILD
103obj-$(CONFIG_TPL_ENV_SUPPORT) += env_attr.o
104obj-$(CONFIG_TPL_ENV_SUPPORT) += env_flags.o
105obj-$(CONFIG_TPL_ENV_SUPPORT) += env_callback.o
106else
Tom Rinicc52ab02014-07-18 11:51:34 -0400107obj-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o
108obj-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o
109obj-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o
Simon Glass98b685d2016-09-12 23:18:25 -0600110endif
111ifneq ($(CONFIG_TPL_ENV_SUPPORT)$(CONFIG_SPL_ENV_SUPPORT),)
Masahiro Yamada55c745d2013-10-17 17:34:59 +0900112obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
113obj-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o
Felipe Balbi78cc6732014-09-23 10:44:17 -0500114obj-$(CONFIG_ENV_IS_IN_FAT) += env_fat.o
Stuart Longlandd1f40632016-02-23 15:51:26 +1000115obj-$(CONFIG_ENV_IS_IN_EXT4) += env_ext4.o
Masahiro Yamada55c745d2013-10-17 17:34:59 +0900116obj-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o
117obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o
118obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
Matt Porter79bfa732012-01-31 12:03:57 +0000119endif
Simon Glassc8e89ab2016-05-01 11:36:09 -0600120ifdef CONFIG_SPL_SATA_SUPPORT
121obj-$(CONFIG_SCSI) += scsi.o
122endif
Ying Zhang602f7d32013-05-20 14:07:25 +0800123endif
Ying Zhang602f7d32013-05-20 14:07:25 +0800124#environment
Masahiro Yamada55c745d2013-10-17 17:34:59 +0900125obj-y += env_common.o
Ying Zhangded52a42013-05-20 14:07:26 +0800126#others
Masahiro Yamada69682982014-09-18 15:43:41 +0900127obj-$(CONFIG_DDR_SPD) += ddr_spd.o
128obj-$(CONFIG_SPD_EEPROM) += ddr_spd.o
Masahiro Yamada55c745d2013-10-17 17:34:59 +0900129obj-$(CONFIG_HWCONFIG) += hwconfig.o
130obj-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o
Heiko Schocher62cb1562015-06-29 09:10:46 +0200131ifdef CONFIG_SPL_BUILD
Simon Glass98b685d2016-09-12 23:18:25 -0600132ifdef CONFIG_TPL_BUILD
133obj-$(CONFIG_TPL_SERIAL_SUPPORT) += console.o
134else
Heiko Schocher62cb1562015-06-29 09:10:46 +0200135obj-$(CONFIG_SPL_SERIAL_SUPPORT) += console.o
Simon Glass98b685d2016-09-12 23:18:25 -0600136endif
Heiko Schocher62cb1562015-06-29 09:10:46 +0200137else
Masahiro Yamada55c745d2013-10-17 17:34:59 +0900138obj-y += console.o
Heiko Schocher62cb1562015-06-29 09:10:46 +0200139endif
Vadim Bendeburye5d15792014-02-27 13:26:02 -0700140obj-$(CONFIG_CROS_EC) += cros_ec.o
Masahiro Yamada55c745d2013-10-17 17:34:59 +0900141obj-y += dlmalloc.o
Simon Glass94890462014-11-10 17:16:43 -0700142ifdef CONFIG_SYS_MALLOC_F_LEN
143obj-y += malloc_simple.o
144endif
Simon Glasse11f0ef2016-05-01 11:36:10 -0600145obj-$(CONFIG_CMD_IDE) += ide.o
Masahiro Yamada55c745d2013-10-17 17:34:59 +0900146obj-y += image.o
Sebastian Siewior686d6672014-05-05 15:08:09 -0500147obj-$(CONFIG_ANDROID_BOOT_IMAGE) += image-android.o
Simon Glass8b426922016-02-22 22:55:45 -0700148obj-$(CONFIG_$(SPL_)OF_LIBFDT) += image-fdt.o
Simon Glasse3ee2fb2016-02-22 22:55:43 -0700149obj-$(CONFIG_$(SPL_)FIT) += image-fit.o
150obj-$(CONFIG_$(SPL_)FIT_SIGNATURE) += image-sig.o
Simon Glass4dc47ca2014-06-11 23:29:41 -0600151obj-$(CONFIG_IO_TRACE) += iotrace.o
Masahiro Yamada55c745d2013-10-17 17:34:59 +0900152obj-y += memsize.o
153obj-y += stdio.o
wdenke831ad52002-10-17 21:52:26 +0000154
Steve Rae792ac482014-08-26 11:47:27 -0700155# This option is not just y/n - it can have a numeric value
Maxime Ripard33602a92015-10-15 14:34:17 +0200156ifdef CONFIG_FASTBOOT_FLASH
Maxime Ripard6af49bc2015-10-15 14:34:19 +0200157obj-y += image-sparse.o
Maxime Ripard33602a92015-10-15 14:34:17 +0200158ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV
Steve Rae792ac482014-08-26 11:47:27 -0700159obj-y += fb_mmc.o
160endif
Maxime Ripard33602a92015-10-15 14:34:17 +0200161ifdef CONFIG_FASTBOOT_FLASH_NAND_DEV
162obj-y += fb_nand.o
163endif
164endif
Steve Rae792ac482014-08-26 11:47:27 -0700165
Nikita Kiryanov37dda1c2016-04-16 17:55:03 +0300166ifdef CONFIG_CMD_EEPROM_LAYOUT
167obj-y += eeprom/eeprom_field.o eeprom/eeprom_layout.o
168endif
Alison Wangd02389c2014-12-03 15:00:44 +0800169# We always have this since drivers/ddr/fs/interactive.c needs it
Simon Glass0ea49592016-03-13 19:07:34 -0600170obj-$(CONFIG_CMDLINE) += cli_simple.o
Alison Wangd02389c2014-12-03 15:00:44 +0800171
172obj-y += cli.o
Simon Glass0ea49592016-03-13 19:07:34 -0600173obj-$(CONFIG_CMDLINE) += cli_readline.o
Alison Wangd02389c2014-12-03 15:00:44 +0800174obj-y += command.o
175obj-y += s_record.o
176obj-y += xyzModem.o
Alison Wangd02389c2014-12-03 15:00:44 +0800177
Masahiro Yamada0d68fb12014-02-04 17:24:28 +0900178CFLAGS_env_embedded.o := -Wa,--no-warn -DENV_CRC=$(shell tools/envcrc 2>/dev/null)