Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [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 |
| 17 | ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | ## |
| 19 | |
Stefan Reinauer | 13e4182 | 2015-04-27 14:02:36 -0700 | [diff] [blame^] | 20 | ifeq ($(CONFIG_SOUTHBRIDGE_INTEL_LYNXPOINT),y) |
| 21 | |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 22 | # Run an intermediate step when producing coreboot.rom |
| 23 | # that adds additional components to the final firmware |
| 24 | # image outside of CBFS |
Duncan Laurie | 9238c11 | 2013-04-19 11:03:40 -0700 | [diff] [blame] | 25 | INTERMEDIATE:=lynxpoint_add_me |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 26 | |
| 27 | ramstage-y += pch.c |
| 28 | ramstage-y += azalia.c |
| 29 | ramstage-y += lpc.c |
| 30 | ramstage-y += pci.c |
| 31 | ramstage-y += pcie.c |
| 32 | ramstage-y += sata.c |
| 33 | ramstage-y += usb_ehci.c |
Duncan Laurie | 2d9d39a | 2013-05-29 15:27:55 -0700 | [diff] [blame] | 34 | ramstage-y += usb_xhci.c |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 35 | ramstage-y += me_9.x.c |
| 36 | ramstage-y += smbus.c |
Duncan Laurie | 0a7c49e | 2013-06-20 12:40:55 -0700 | [diff] [blame] | 37 | ramstage-y += hda_verb.c |
Duncan Laurie | b39ba2e | 2013-03-22 11:21:14 -0700 | [diff] [blame] | 38 | ramstage-$(CONFIG_INTEL_LYNXPOINT_LP) += serialio.c |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 39 | |
Vladimir Serbinenko | 75c8387 | 2014-09-05 01:01:31 +0200 | [diff] [blame] | 40 | ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/hda_verb.c |
| 41 | |
Duncan Laurie | 8584b22 | 2013-02-15 13:52:28 -0800 | [diff] [blame] | 42 | ramstage-y += rcba.c |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 43 | ramstage-y += me_status.c |
| 44 | ramstage-y += reset.c |
| 45 | ramstage-y += watchdog.c |
| 46 | ramstage-y += acpi.c |
| 47 | |
| 48 | ramstage-$(CONFIG_ELOG) += elog.c |
Vladimir Serbinenko | 42c4a9d | 2014-02-16 17:13:19 +0100 | [diff] [blame] | 49 | ramstage-y += ../common/spi.c |
| 50 | smm-$(CONFIG_SPI_FLASH_SMM) += ../common/spi.c |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 51 | |
Duncan Laurie | 55cdf55 | 2013-03-08 16:01:44 -0800 | [diff] [blame] | 52 | ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smi.c pmutil.c |
Duncan Laurie | af98062 | 2013-07-18 23:02:18 -0700 | [diff] [blame] | 53 | smm-$(CONFIG_HAVE_SMI_HANDLER) += smihandler.c me_9.x.c finalize.c pch.c |
Duncan Laurie | 1f52908 | 2013-07-30 15:53:45 -0700 | [diff] [blame] | 54 | smm-$(CONFIG_HAVE_SMI_HANDLER) += pmutil.c usb_ehci.c usb_xhci.c |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 55 | |
Aaron Durbin | 239c2e8 | 2012-12-19 11:31:17 -0600 | [diff] [blame] | 56 | romstage-y += early_usb.c early_smbus.c early_me.c me_status.c early_pch.c |
Duncan Laurie | 8584b22 | 2013-02-15 13:52:28 -0800 | [diff] [blame] | 57 | romstage-y += reset.c early_spi.c rcba.c |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 58 | |
Duncan Laurie | 045f153 | 2012-12-17 11:29:10 -0800 | [diff] [blame] | 59 | ifeq ($(CONFIG_INTEL_LYNXPOINT_LP),y) |
| 60 | romstage-y += lp_gpio.c |
| 61 | ramstage-y += lp_gpio.c |
Shawn Nematbakhsh | ccb12fb | 2013-07-03 17:55:38 -0700 | [diff] [blame] | 62 | smm-$(CONFIG_HAVE_SMI_HANDLER) += lp_gpio.c |
Duncan Laurie | 045f153 | 2012-12-17 11:29:10 -0800 | [diff] [blame] | 63 | else |
| 64 | romstage-y += gpio.c |
| 65 | ramstage-y += gpio.c |
Shawn Nematbakhsh | ccb12fb | 2013-07-03 17:55:38 -0700 | [diff] [blame] | 66 | smm-$(CONFIG_HAVE_SMI_HANDLER) += gpio.c |
Duncan Laurie | 045f153 | 2012-12-17 11:29:10 -0800 | [diff] [blame] | 67 | endif |
| 68 | |
Paul Menzel | 5218e61 | 2014-06-16 09:28:36 +0200 | [diff] [blame] | 69 | ifeq ($(CONFIG_BUILD_WITH_FAKE_IFD),y) |
| 70 | IFD_BIN_PATH := $(objgenerated)/ifdfake.bin |
| 71 | IFD_SECTIONS := $(addprefix -b ,$(CONFIG_IFD_BIOS_SECTION:"%"=%)) \ |
| 72 | $(addprefix -m ,$(CONFIG_IFD_ME_SECTION:"%"=%)) \ |
| 73 | $(addprefix -g ,$(CONFIG_IFD_GBE_SECTION:"%"=%)) \ |
| 74 | $(addprefix -p ,$(CONFIG_IFD_PLATFORM_SECTION:"%"=%)) |
| 75 | else |
| 76 | IFD_BIN_PATH := $(CONFIG_IFD_BIN_PATH) |
| 77 | endif |
| 78 | |
| 79 | lynxpoint_add_me: $(obj)/coreboot.pre $(IFDTOOL) $(IFDFAKE) |
| 80 | ifeq ($(CONFIG_BUILD_WITH_FAKE_IFD),y) |
| 81 | printf "\n** WARNING **\n" |
| 82 | printf "Coreboot will be built with a fake Intel Firmware Descriptor (IFD).\n" |
| 83 | printf "Never write a complete coreboot.rom with a fake IFD to your board's\n" |
| 84 | printf "flash ROM! Make sure that you only write valid flash regions.\n\n" |
| 85 | printf " IFDFAKE Building a fake Intel Firmware Descriptor\n" |
| 86 | $(IFDFAKE) $(IFD_SECTIONS) $(IFD_BIN_PATH) |
| 87 | endif |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 88 | printf " DD Adding Intel Firmware Descriptor\n" |
Paul Menzel | 5218e61 | 2014-06-16 09:28:36 +0200 | [diff] [blame] | 89 | dd if=$(IFD_BIN_PATH) \ |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 90 | of=$(obj)/coreboot.pre conv=notrunc >/dev/null 2>&1 |
Paul Menzel | 0089c24 | 2014-06-16 14:59:44 +0200 | [diff] [blame] | 91 | ifeq ($(CONFIG_HAVE_ME_BIN),y) |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 92 | printf " IFDTOOL me.bin -> coreboot.pre\n" |
| 93 | $(objutil)/ifdtool/ifdtool \ |
Patrick Georgi | 3cc151e | 2013-06-13 15:07:02 +0200 | [diff] [blame] | 94 | -i ME:$(CONFIG_ME_BIN_PATH) \ |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 95 | $(obj)/coreboot.pre |
| 96 | mv $(obj)/coreboot.pre.new $(obj)/coreboot.pre |
Paul Menzel | 0089c24 | 2014-06-16 14:59:44 +0200 | [diff] [blame] | 97 | endif |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 98 | ifeq ($(CONFIG_LOCK_MANAGEMENT_ENGINE),y) |
| 99 | printf " IFDTOOL Locking Management Engine\n" |
| 100 | $(objutil)/ifdtool/ifdtool -l $(obj)/coreboot.pre |
| 101 | mv $(obj)/coreboot.pre.new $(obj)/coreboot.pre |
Paul Menzel | 5218e61 | 2014-06-16 09:28:36 +0200 | [diff] [blame] | 102 | else ifneq ($(CONFIG_BUILD_WITH_FAKE_IFD),y) |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 103 | printf " IFDTOOL Unlocking Management Engine\n" |
| 104 | $(objutil)/ifdtool/ifdtool -u $(obj)/coreboot.pre |
| 105 | mv $(obj)/coreboot.pre.new $(obj)/coreboot.pre |
| 106 | endif |
| 107 | |
| 108 | PHONY += lynxpoint_add_me |
Stefan Reinauer | 13e4182 | 2015-04-27 14:02:36 -0700 | [diff] [blame^] | 109 | |
| 110 | endif |