Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 1 | ################################################################################ |
| 2 | ## |
| 3 | ## This file is part of the coreboot project. |
| 4 | ## |
| 5 | ## Copyright (C) 2009-2010 coresystems GmbH |
| 6 | ## Copyright (C) 2015 Google Inc. |
| 7 | ## |
| 8 | ## This program is free software; you can redistribute it and/or modify |
| 9 | ## it under the terms of the GNU General Public License as published by |
| 10 | ## the Free Software Foundation; version 2 of the License. |
| 11 | ## |
| 12 | ## This program is distributed in the hope that it will be useful, |
| 13 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | ## GNU General Public License for more details. |
| 16 | ## |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 17 | |
Stefan Reinauer | d0d487a | 2015-07-14 15:57:44 -0700 | [diff] [blame] | 18 | ifeq ($(CONFIG_PAYLOAD_ELF),y) |
| 19 | COREBOOT_ROM_DEPENDENCIES+=$(CONFIG_PAYLOAD_FILE) |
| 20 | endif |
| 21 | ifeq ($(CONFIG_PAYLOAD_SEABIOS),y) |
| 22 | COREBOOT_ROM_DEPENDENCIES+=seabios |
| 23 | endif |
| 24 | ifeq ($(CONFIG_PAYLOAD_FILO),y) |
| 25 | COREBOOT_ROM_DEPENDENCIES+=filo |
| 26 | endif |
| 27 | ifeq ($(CONFIG_PAYLOAD_GRUB2),y) |
| 28 | COREBOOT_ROM_DEPENDENCIES+=grub2 |
| 29 | endif |
| 30 | |
Martin Roth | 7b928cd | 2015-06-19 20:50:59 -0600 | [diff] [blame] | 31 | ###################################################################### |
| 32 | # set up payload config and version files for later inclusion |
| 33 | ifeq ($(CONFIG_PAYLOAD_SEABIOS),y) |
| 34 | PAYLOAD_CONFIG=payloads/external/SeaBIOS/seabios/.config |
| 35 | PAYLOAD_VERSION=payloads/external/SeaBIOS/seabios/out/version.c |
| 36 | endif |
| 37 | ifeq ($(CONFIG_PAYLOAD_FILO),y) |
| 38 | PAYLOAD_CONFIG=payloads/external/FILO/filo/.config |
| 39 | PAYLOAD_VERSION=payloads/external/FILO/filo/build/version.h |
| 40 | endif |
| 41 | |
Patrick Georgi | c983671 | 2015-08-08 21:35:38 +0200 | [diff] [blame] | 42 | SEABIOS_CC_OFFSET=$(if $(filter %ccache,$(HOSTCC)),2,1) |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 43 | seabios: |
| 44 | $(MAKE) -C payloads/external/SeaBIOS -f Makefile.inc \ |
| 45 | HOSTCC="$(HOSTCC)" \ |
Patrick Georgi | 41fceaf | 2015-08-13 21:55:30 +0200 | [diff] [blame] | 46 | CC=$(word $(SEABIOS_CC_OFFSET),$(CC_x86_32)) CFLAGS="$(patsubst $(word $(SEABIOS_CC_OFFSET),$(CC_x86_32))%,,$(wordlist $(SEABIOS_CC_OFFSET),9999,$(CC_x86_32)))" \ |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 47 | LD=$(word 1,$(LD_x86_32)) LDFLAGS="$(patsubst $(word 1,$(LD_x86_32))%,,$(LD_x86_32))" \ |
| 48 | OBJDUMP="$(OBJDUMP_x86_32)" \ |
| 49 | OBJCOPY="$(OBJCOPY_x86_32)" STRIP="$(STRIP_x86_32)" \ |
| 50 | AS="$(AS_x86_32)" IASL="$(IASL)" \ |
| 51 | CONFIG_SEABIOS_MASTER=$(CONFIG_SEABIOS_MASTER) \ |
| 52 | CONFIG_SEABIOS_STABLE=$(CONFIG_SEABIOS_STABLE) \ |
Martin Roth | 99d05c7 | 2015-11-28 15:44:34 -0700 | [diff] [blame] | 53 | CONFIG_PAYLOAD_CONFIGFILE=$(CONFIG_PAYLOAD_CONFIGFILE) \ |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 54 | CONFIG_SEABIOS_THREAD_OPTIONROMS=$(CONFIG_SEABIOS_THREAD_OPTIONROMS) \ |
| 55 | CONFIG_SEABIOS_VGA_COREBOOT=$(CONFIG_SEABIOS_VGA_COREBOOT) \ |
| 56 | CONFIG_CONSOLE_SERIAL=$(CONFIG_CONSOLE_SERIAL) \ |
Martin Roth | 6e11920 | 2015-11-28 16:32:25 -0700 | [diff] [blame] | 57 | CONFIG_TTYS0_BASE=$(CONFIG_TTYS0_BASE) |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 58 | |
Patrick Georgi | 4013469 | 2015-11-30 20:00:33 +0100 | [diff] [blame] | 59 | payloads/external/SeaBIOS/seabios/out/vgabios.bin: seabios |
| 60 | payloads/external/SeaBIOS/seabios/out/bios.bin.elf: seabios |
| 61 | |
Stefan Reinauer | 0fa5d8f | 2015-06-30 17:09:17 -0700 | [diff] [blame] | 62 | filo: |
| 63 | $(MAKE) -C payloads/external/FILO -f Makefile.inc \ |
| 64 | HOSTCC="$(HOSTCC)" \ |
| 65 | CC="$(CC_x86_32)" LD="$(LD_x86_32)" OBJDUMP="$(OBJDUMP_x86_32)" \ |
| 66 | OBJCOPY="$(OBJCOPY_x86_32)" STRIP="$(STRIP_x86_32)" \ |
| 67 | CONFIG_FILO_MASTER=$(CONFIG_FILO_MASTER) \ |
| 68 | CONFIG_FILO_STABLE=$(CONFIG_FILO_STABLE) |
| 69 | |
| 70 | |
| 71 | grub2: |
| 72 | $(MAKE) -C payloads/external/GRUB2 -f Makefile.inc \ |
| 73 | HOSTCC="$(HOSTCC)" \ |
| 74 | CC="$(CC_x86_32)" LD="$(LD_x86_32)" OBJDUMP="$(OBJDUMP_x86_32)" \ |
| 75 | OBJCOPY="$(OBJCOPY_x86_32)" STRIP="$(STRIP_x86_32)" \ |
| 76 | CONFIG_GRUB2_MASTER=$(CONFIG_GRUB2_MASTER) |