Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 1 | ifeq ($(CONFIG_SOC_INTEL_BRASWELL),y) |
| 2 | |
| 3 | subdirs-y += bootblock |
| 4 | subdirs-y += microcode |
| 5 | subdirs-y += romstage |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 6 | subdirs-y += ../common |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 7 | subdirs-y += ../../../cpu/x86/lapic |
| 8 | subdirs-y += ../../../cpu/x86/mtrr |
| 9 | subdirs-y += ../../../cpu/x86/smm |
| 10 | subdirs-y += ../../../cpu/x86/tsc |
| 11 | subdirs-y += ../../../cpu/intel/microcode |
| 12 | subdirs-y += ../../../cpu/intel/turbo |
| 13 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 14 | romstage-y += gpio_support.c |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 15 | romstage-y += iosf.c |
Lee Leahy | acb9c0b | 2015-07-02 11:55:18 -0700 | [diff] [blame^] | 16 | romstage-y += lpc_init.c |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 17 | romstage-y += memmap.c |
| 18 | romstage-y += tsc_freq.c |
| 19 | |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 20 | ramstage-y += acpi.c |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 21 | ramstage-y += chip.c |
| 22 | ramstage-y += cpu.c |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 23 | ramstage-$(CONFIG_ELOG) += elog.c |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 24 | ramstage-y += emmc.c |
| 25 | ramstage-y += gpio.c |
| 26 | ifeq ($(CONFIG_GOP_SUPPORT),n) |
| 27 | ramstage-y += gfx.c |
| 28 | endif |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 29 | ramstage-y += hda.c |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 30 | ramstage-y += iosf.c |
| 31 | ramstage-y += lpe.c |
| 32 | ramstage-y += lpss.c |
| 33 | ramstage-y += memmap.c |
| 34 | ramstage-y += northcluster.c |
| 35 | ramstage-y += pcie.c |
| 36 | ramstage-y += pmutil.c |
| 37 | ramstage-y += ramstage.c |
| 38 | ramstage-y += sata.c |
| 39 | ramstage-y += scc.c |
| 40 | ramstage-y += sd.c |
| 41 | ramstage-y += smm.c |
| 42 | ramstage-y += southcluster.c |
| 43 | ramstage-y += spi.c |
| 44 | ramstage-$(CONFIG_ALT_CBFS_LOAD_PAYLOAD) += spi_loading.c |
| 45 | ramstage-y += tsc_freq.c |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 46 | |
| 47 | # Remove as ramstage gets fleshed out |
| 48 | ramstage-y += placeholders.c |
| 49 | |
Lee Leahy | acb9c0b | 2015-07-02 11:55:18 -0700 | [diff] [blame^] | 50 | smm-y += lpc_init.c |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 51 | smm-y += pmutil.c |
| 52 | smm-y += smihandler.c |
| 53 | smm-y += spi.c |
| 54 | smm-y += tsc_freq.c |
| 55 | |
| 56 | CPPFLAGS_common += -I$(src)/arch/x86/include/ |
| 57 | CPPFLAGS_common += -I$(src)/soc/intel/braswell/ |
| 58 | CPPFLAGS_common += -I$(src)/soc/intel/braswell/include |
| 59 | |
| 60 | CPPFLAGS_common += -I3rdparty/blobs/mainboard/$(CONFIG_MAINBOARD_DIR) |
| 61 | |
| 62 | CPPFLAGS_common += -I$(src)/drivers/intel/fsp1_1 |
| 63 | CPPFLAGS_common += -I$(src)/vendorcode/intel/fsp/fsp1_1 |
| 64 | CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/uefi_2.4 |
| 65 | CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/uefi_2.4/MdePkg/Include |
| 66 | CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/uefi_2.4/MdePkg/Include/Ia32 |
| 67 | CPPFLAGS_common += -I$(CONFIG_FSP_INCLUDE_PATH) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 68 | |
| 69 | # Run an intermediate step when producing coreboot.rom |
| 70 | # that adds additional components to the final firmware |
| 71 | # image outside of CBFS |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 72 | INTERMEDIATE := pch_add_me |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 73 | |
| 74 | ifeq ($(CONFIG_BUILD_WITH_FAKE_IFD),y) |
| 75 | IFD_BIN_PATH := $(objgenerated)/ifdfake.bin |
| 76 | IFD_SECTIONS := $(addprefix -b ,$(CONFIG_IFD_BIOS_SECTION:"%"=%)) \ |
| 77 | $(addprefix -m ,$(CONFIG_IFD_ME_SECTION:"%"=%)) \ |
| 78 | $(addprefix -p ,$(CONFIG_IFD_PLATFORM_SECTION:"%"=%)) |
| 79 | else |
| 80 | IFD_BIN_PATH := $(CONFIG_IFD_BIN_PATH) |
| 81 | endif |
| 82 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 83 | pch_add_me: $(obj)/coreboot.pre $(IFDTOOL) $(IFDFAKE) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 84 | ifeq ($(CONFIG_BUILD_WITH_FAKE_IFD),y) |
| 85 | printf "\n** WARNING **\n" |
| 86 | printf "Coreboot will be built with a fake Intel Firmware Descriptor (IFD).\n" |
| 87 | printf "Never write a complete coreboot.rom with a fake IFD to your board's\n" |
| 88 | printf "flash ROM! Make sure that you only write valid flash regions.\n\n" |
| 89 | printf " IFDFAKE Building a fake Intel Firmware Descriptor\n" |
| 90 | $(IFDFAKE) $(IFD_SECTIONS) $(IFD_BIN_PATH) |
| 91 | endif |
| 92 | printf " DD Adding Intel Firmware Descriptor\n" |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 93 | printf "CONFIG_IFD_BIN_PATH: $(CONFIG_IFD_BIN_PATH)\n" |
| 94 | printf "IFD_BIN_PATH: $(IFD_BIN_PATH)\n" |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 95 | dd if=$(IFD_BIN_PATH) \ |
| 96 | of=$(obj)/coreboot.pre conv=notrunc >/dev/null 2>&1 |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 97 | printf "CONFIG_HAVE_ME_BIN: $(CONFIG_HAVE_ME_BIN)\n" |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 98 | ifeq ($(CONFIG_HAVE_ME_BIN),y) |
| 99 | printf " IFDTOOL me.bin -> coreboot.pre\n" |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 100 | printf "CONFIG_ME_BIN_PATH: $(CONFIG_ME_BIN_PATH)\n" |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 101 | $(objutil)/ifdtool/ifdtool \ |
| 102 | -i ME:$(CONFIG_ME_BIN_PATH) \ |
| 103 | $(obj)/coreboot.pre |
| 104 | mv $(obj)/coreboot.pre.new $(obj)/coreboot.pre |
| 105 | endif |
| 106 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 107 | ifeq ($(CONFIG_LOCK_MANAGEMENT_ENGINE),y) |
| 108 | printf " IFDTOOL Locking Management Engine\n" |
| 109 | $(objutil)/ifdtool/ifdtool -l $(obj)/coreboot.pre |
| 110 | mv $(obj)/coreboot.pre.new $(obj)/coreboot.pre |
| 111 | else |
| 112 | printf " IFDTOOL Unlocking Management Engine\n" |
| 113 | $(objutil)/ifdtool/ifdtool -u $(obj)/coreboot.pre |
| 114 | mv $(obj)/coreboot.pre.new $(obj)/coreboot.pre |
| 115 | endif |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 116 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 117 | PHONY += pch_add_me |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 118 | |
| 119 | endif |