blob: 92e1c0092e2465709d49a5be1e6d92b394fda130 [file] [log] [blame]
Aaron Durbin76c37002012-10-30 09:03:43 -05001##
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
20# Run an intermediate step when producing coreboot.rom
21# that adds additional components to the final firmware
22# image outside of CBFS
23# FIXME, uncomment as soon as we have ME firmware in the blobs repo
24# INTERMEDIATE:=lynxpoint_add_me
25
26ramstage-y += pch.c
27ramstage-y += azalia.c
28ramstage-y += lpc.c
29ramstage-y += pci.c
30ramstage-y += pcie.c
31ramstage-y += sata.c
32ramstage-y += usb_ehci.c
Duncan Laurie2d9d39a2013-05-29 15:27:55 -070033ramstage-y += usb_xhci.c
Aaron Durbin76c37002012-10-30 09:03:43 -050034ramstage-y += me_9.x.c
35ramstage-y += smbus.c
Duncan Laurie0a7c49e2013-06-20 12:40:55 -070036ramstage-y += hda_verb.c
Duncan Laurieb39ba2e2013-03-22 11:21:14 -070037ramstage-$(CONFIG_INTEL_LYNXPOINT_LP) += serialio.c
Aaron Durbin76c37002012-10-30 09:03:43 -050038
Duncan Laurie8584b222013-02-15 13:52:28 -080039ramstage-y += rcba.c
Aaron Durbin76c37002012-10-30 09:03:43 -050040ramstage-y += me_status.c
41ramstage-y += reset.c
42ramstage-y += watchdog.c
43ramstage-y += acpi.c
Aaron Durbin94998c42013-01-22 13:54:12 -060044ramstage-$(CONFIG_ALT_CBFS_LOAD_PAYLOAD) += spi_loading.c
Aaron Durbin76c37002012-10-30 09:03:43 -050045
46ramstage-$(CONFIG_ELOG) += elog.c
47ramstage-y += spi.c
48smm-$(CONFIG_SPI_FLASH_SMM) += spi.c
49
Duncan Laurie55cdf552013-03-08 16:01:44 -080050ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smi.c pmutil.c
Duncan Laurie1d048ca2013-05-01 11:30:24 -070051smm-$(CONFIG_HAVE_SMI_HANDLER) += smihandler.c finalize.c pch.c
Duncan Laurie55cdf552013-03-08 16:01:44 -080052smm-$(CONFIG_HAVE_SMI_HANDLER) += pmutil.c
Aaron Durbin76c37002012-10-30 09:03:43 -050053
Aaron Durbin239c2e82012-12-19 11:31:17 -060054romstage-y += early_usb.c early_smbus.c early_me.c me_status.c early_pch.c
Duncan Laurie8584b222013-02-15 13:52:28 -080055romstage-y += reset.c early_spi.c rcba.c
Aaron Durbin76c37002012-10-30 09:03:43 -050056
Duncan Laurie045f1532012-12-17 11:29:10 -080057ifeq ($(CONFIG_INTEL_LYNXPOINT_LP),y)
58romstage-y += lp_gpio.c
59ramstage-y += lp_gpio.c
Shawn Nematbakhshccb12fb2013-07-03 17:55:38 -070060smm-$(CONFIG_HAVE_SMI_HANDLER) += lp_gpio.c
Duncan Laurie045f1532012-12-17 11:29:10 -080061else
62romstage-y += gpio.c
63ramstage-y += gpio.c
Shawn Nematbakhshccb12fb2013-07-03 17:55:38 -070064smm-$(CONFIG_HAVE_SMI_HANDLER) += gpio.c
Duncan Laurie045f1532012-12-17 11:29:10 -080065endif
66
Aaron Durbin76c37002012-10-30 09:03:43 -050067lynxpoint_add_me: $(obj)/coreboot.pre $(IFDTOOL)
68 printf " DD Adding Intel Firmware Descriptor\n"
Patrick Georgi3cc151e2013-06-13 15:07:02 +020069 dd if=$(CONFIG_IFD_BIN_PATH) \
Aaron Durbin76c37002012-10-30 09:03:43 -050070 of=$(obj)/coreboot.pre conv=notrunc >/dev/null 2>&1
71 printf " IFDTOOL me.bin -> coreboot.pre\n"
72 $(objutil)/ifdtool/ifdtool \
Patrick Georgi3cc151e2013-06-13 15:07:02 +020073 -i ME:$(CONFIG_ME_BIN_PATH) \
Aaron Durbin76c37002012-10-30 09:03:43 -050074 $(obj)/coreboot.pre
75 mv $(obj)/coreboot.pre.new $(obj)/coreboot.pre
76ifeq ($(CONFIG_LOCK_MANAGEMENT_ENGINE),y)
77 printf " IFDTOOL Locking Management Engine\n"
78 $(objutil)/ifdtool/ifdtool -l $(obj)/coreboot.pre
79 mv $(obj)/coreboot.pre.new $(obj)/coreboot.pre
80else
81 printf " IFDTOOL Unlocking Management Engine\n"
82 $(objutil)/ifdtool/ifdtool -u $(obj)/coreboot.pre
83 mv $(obj)/coreboot.pre.new $(obj)/coreboot.pre
84endif
85
86PHONY += lynxpoint_add_me