Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 1 | ## |
| 2 | ## This file is part of the coreboot project. |
| 3 | ## |
| 4 | ## Copyright (C) 2010 Google Inc. |
| 5 | ## |
| 6 | ## This program is free software; you can redistribute it and/or modify |
| 7 | ## it under the terms of the GNU General Public License as published by |
| 8 | ## the Free Software Foundation; version 2 of the License. |
| 9 | ## |
| 10 | ## This program is distributed in the hope that it will be useful, |
| 11 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | ## GNU General Public License for more details. |
| 14 | ## |
| 15 | ## You should have received a copy of the GNU General Public License |
| 16 | ## along with this program; if not, write to the Free Software |
Paul Menzel | a46a712 | 2013-02-23 18:37:27 +0100 | [diff] [blame] | 17 | ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 18 | ## |
| 19 | |
Stefan Reinauer | 5b63579 | 2012-08-16 14:05:42 -0700 | [diff] [blame] | 20 | # Run an intermediate step when producing coreboot.rom |
| 21 | # that adds additional components to the final firmware |
| 22 | # image outside of CBFS |
| 23 | INTERMEDIATE+=bd82x6x_add_me |
| 24 | |
Patrick Georgi | 23f38cd | 2012-11-16 14:50:32 +0100 | [diff] [blame] | 25 | ramstage-y += pch.c |
| 26 | ramstage-y += azalia.c |
| 27 | ramstage-y += lpc.c |
| 28 | ramstage-y += pci.c |
| 29 | ramstage-y += pcie.c |
| 30 | ramstage-y += sata.c |
| 31 | ramstage-y += usb_ehci.c |
Duncan Laurie | 645b376 | 2013-02-12 14:00:47 -0800 | [diff] [blame] | 32 | ramstage-y += usb_xhci.c |
Patrick Georgi | 23f38cd | 2012-11-16 14:50:32 +0100 | [diff] [blame] | 33 | ramstage-y += me.c |
| 34 | ramstage-y += me_8.x.c |
| 35 | ramstage-y += smbus.c |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 36 | |
| 37 | ramstage-y += me_status.c |
| 38 | ramstage-y += reset.c |
| 39 | ramstage-y += watchdog.c |
| 40 | |
Duncan Laurie | 800e950 | 2012-06-23 17:06:47 -0700 | [diff] [blame] | 41 | ramstage-$(CONFIG_ELOG) += elog.c |
Stefan Reinauer | 1c56d9b | 2012-05-10 11:27:32 -0700 | [diff] [blame] | 42 | ramstage-y += spi.c |
Duncan Laurie | 181bbdd | 2012-06-23 16:53:57 -0700 | [diff] [blame] | 43 | smm-$(CONFIG_SPI_FLASH_SMM) += spi.c |
Stefan Reinauer | 1c56d9b | 2012-05-10 11:27:32 -0700 | [diff] [blame] | 44 | |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 45 | ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smi.c |
Marc Jones | 783f226 | 2013-02-11 14:36:35 -0700 | [diff] [blame] | 46 | smm-$(CONFIG_HAVE_SMI_HANDLER) += smihandler.c me.c me_8.x.c finalize.c pch.c |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 47 | |
| 48 | romstage-y += early_usb.c early_smbus.c early_me.c me_status.c gpio.c |
| 49 | romstage-$(CONFIG_USBDEBUG) += usb_debug.c |
Sven Schnelle | 4141993 | 2012-07-28 08:52:44 +0200 | [diff] [blame] | 50 | ramstage-$(CONFIG_USBDEBUG) += usb_debug.c |
| 51 | smm-$(CONFIG_USBDEBUG) += usb_debug.c |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 52 | romstage-y += reset.c |
Duncan Laurie | d4bc067 | 2012-10-11 13:04:14 -0700 | [diff] [blame] | 53 | romstage-y += early_spi.c |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 54 | |
Nico Huber | a15cd66 | 2013-06-19 16:16:05 +0200 | [diff] [blame^] | 55 | ifeq ($(CONFIG_BUILD_WITH_FAKE_IFD),y) |
| 56 | IFD_BIN_PATH := $(objgenerated)/ifdfake.bin |
| 57 | IFD_SECTIONS := $(addprefix -b ,$(CONFIG_IFD_BIOS_SECTION:"%"=%)) \ |
| 58 | $(addprefix -m ,$(CONFIG_IFD_ME_SECTION:"%"=%)) \ |
| 59 | $(addprefix -g ,$(CONFIG_IFD_GBE_SECTION:"%"=%)) \ |
| 60 | $(addprefix -p ,$(CONFIG_IFD_PLATFORM_SECTION:"%"=%)) |
| 61 | else |
| 62 | IFD_BIN_PATH := $(CONFIG_IFD_BIN_PATH) |
| 63 | endif |
| 64 | |
| 65 | bd82x6x_add_me: $(obj)/coreboot.pre $(IFDTOOL) $(IFDFAKE) |
| 66 | ifeq ($(CONFIG_BUILD_WITH_FAKE_IFD),y) |
| 67 | printf "\n** WARNING **\n" |
| 68 | printf "Coreboot will be built with a fake Intel Firmware Descriptor (IFD).\n" |
| 69 | printf "Never write a complete coreboot.rom with a fake IFD to your board's\n" |
| 70 | printf "flash ROM! Make sure that you only write valid flash regions.\n\n" |
| 71 | printf " IFDFAKE Building a fake Intel Firmware Descriptor\n" |
| 72 | $(IFDFAKE) $(IFD_SECTIONS) $(IFD_BIN_PATH) |
| 73 | endif |
Stefan Reinauer | 5b63579 | 2012-08-16 14:05:42 -0700 | [diff] [blame] | 74 | printf " DD Adding Intel Firmware Descriptor\n" |
Nico Huber | a15cd66 | 2013-06-19 16:16:05 +0200 | [diff] [blame^] | 75 | dd if=$(IFD_BIN_PATH) \ |
Stefan Reinauer | 5b63579 | 2012-08-16 14:05:42 -0700 | [diff] [blame] | 76 | of=$(obj)/coreboot.pre conv=notrunc >/dev/null 2>&1 |
| 77 | printf " IFDTOOL me.bin -> coreboot.pre\n" |
| 78 | $(objutil)/ifdtool/ifdtool \ |
Patrick Georgi | 3cc151e | 2013-06-13 15:07:02 +0200 | [diff] [blame] | 79 | -i ME:$(CONFIG_ME_BIN_PATH) \ |
Stefan Reinauer | 5b63579 | 2012-08-16 14:05:42 -0700 | [diff] [blame] | 80 | $(obj)/coreboot.pre |
| 81 | mv $(obj)/coreboot.pre.new $(obj)/coreboot.pre |
Nico Huber | ea6d6e8c | 2013-05-14 15:14:08 +0200 | [diff] [blame] | 82 | ifeq ($(CONFIG_HAVE_GBE_BIN),y) |
| 83 | printf " IFDTOOL gbe.bin -> coreboot.pre\n" |
| 84 | $(objutil)/ifdtool/ifdtool \ |
| 85 | -i GbE:$(CONFIG_GBE_BIN_PATH) \ |
| 86 | $(obj)/coreboot.pre |
| 87 | mv $(obj)/coreboot.pre.new $(obj)/coreboot.pre |
| 88 | endif |
Stefan Reinauer | 7004b7c | 2012-10-31 17:30:13 -0700 | [diff] [blame] | 89 | ifeq ($(CONFIG_LOCK_MANAGEMENT_ENGINE),y) |
| 90 | printf " IFDTOOL Locking Management Engine\n" |
| 91 | $(objutil)/ifdtool/ifdtool -l $(obj)/coreboot.pre |
| 92 | mv $(obj)/coreboot.pre.new $(obj)/coreboot.pre |
Nico Huber | a15cd66 | 2013-06-19 16:16:05 +0200 | [diff] [blame^] | 93 | else ifneq ($(CONFIG_BUILD_WITH_FAKE_IFD),y) |
Stefan Reinauer | 7004b7c | 2012-10-31 17:30:13 -0700 | [diff] [blame] | 94 | printf " IFDTOOL Unlocking Management Engine\n" |
| 95 | $(objutil)/ifdtool/ifdtool -u $(obj)/coreboot.pre |
| 96 | mv $(obj)/coreboot.pre.new $(obj)/coreboot.pre |
| 97 | endif |
Stefan Reinauer | 5b63579 | 2012-08-16 14:05:42 -0700 | [diff] [blame] | 98 | |
| 99 | PHONY += bd82x6x_add_me |