2015-07-01 02:09:17 +02:00
|
|
|
################################################################################
|
|
|
|
##
|
|
|
|
## This file is part of the coreboot project.
|
|
|
|
##
|
|
|
|
## Copyright (C) 2009-2010 coresystems GmbH
|
|
|
|
## Copyright (C) 2015 Google Inc.
|
|
|
|
##
|
|
|
|
## This program is free software; you can redistribute it and/or modify
|
|
|
|
## it under the terms of the GNU General Public License as published by
|
|
|
|
## the Free Software Foundation; version 2 of the License.
|
|
|
|
##
|
|
|
|
## This program is distributed in the hope that it will be useful,
|
|
|
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
## GNU General Public License for more details.
|
|
|
|
##
|
|
|
|
|
2015-06-20 04:50:59 +02:00
|
|
|
######################################################################
|
|
|
|
# set up payload config and version files for later inclusion
|
|
|
|
ifeq ($(CONFIG_PAYLOAD_SEABIOS),y)
|
|
|
|
PAYLOAD_CONFIG=payloads/external/SeaBIOS/seabios/.config
|
2015-11-28 21:23:48 +01:00
|
|
|
PAYLOAD_VERSION=payloads/external/SeaBIOS/seabios/out/autoversion.h
|
2015-06-20 04:50:59 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(CONFIG_PAYLOAD_FILO),y)
|
|
|
|
PAYLOAD_CONFIG=payloads/external/FILO/filo/.config
|
|
|
|
PAYLOAD_VERSION=payloads/external/FILO/filo/build/version.h
|
|
|
|
endif
|
2015-07-15 19:24:18 +02:00
|
|
|
ifeq ($(CONFIG_PAYLOAD_DEPTHCHARGE),y)
|
|
|
|
PAYLOAD_CONFIG=payloads/external/depthcharge/depthcharge/.config
|
|
|
|
#TODO: Figure out version
|
|
|
|
endif
|
2015-06-20 04:50:59 +02:00
|
|
|
|
2015-12-17 00:09:11 +01:00
|
|
|
cbfs-files-$(CONFIG_INCLUDE_CONFIG_FILE) += payload_config
|
|
|
|
payload_config-file := $(PAYLOAD_CONFIG)
|
|
|
|
payload_config-type := raw
|
|
|
|
|
|
|
|
cbfs-files-$(CONFIG_INCLUDE_CONFIG_FILE) += payload_revision
|
|
|
|
payload_revision-file := $(PAYLOAD_VERSION)
|
|
|
|
payload_revision-type := raw
|
|
|
|
|
2015-08-08 21:35:38 +02:00
|
|
|
SEABIOS_CC_OFFSET=$(if $(filter %ccache,$(HOSTCC)),2,1)
|
2016-03-08 06:04:01 +01:00
|
|
|
payloads/external/SeaBIOS/seabios/out/bios.bin.elf seabios: $(top)/$(DOTCONFIG)
|
2016-03-16 17:39:30 +01:00
|
|
|
$(MAKE) -C payloads/external/SeaBIOS \
|
2015-07-01 02:09:17 +02:00
|
|
|
HOSTCC="$(HOSTCC)" \
|
2016-03-08 06:04:01 +01:00
|
|
|
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)))" \
|
2015-07-01 02:09:17 +02:00
|
|
|
LD=$(word 1,$(LD_x86_32)) LDFLAGS="$(patsubst $(word 1,$(LD_x86_32))%,,$(LD_x86_32))" \
|
|
|
|
OBJDUMP="$(OBJDUMP_x86_32)" \
|
|
|
|
OBJCOPY="$(OBJCOPY_x86_32)" STRIP="$(STRIP_x86_32)" \
|
|
|
|
AS="$(AS_x86_32)" IASL="$(IASL)" \
|
|
|
|
CONFIG_SEABIOS_MASTER=$(CONFIG_SEABIOS_MASTER) \
|
|
|
|
CONFIG_SEABIOS_STABLE=$(CONFIG_SEABIOS_STABLE) \
|
2016-03-08 00:56:57 +01:00
|
|
|
CONFIG_SEABIOS_REVISION=$(CONFIG_SEABIOS_REVISION) \
|
|
|
|
CONFIG_SEABIOS_REVISION_ID=$(CONFIG_SEABIOS_REVISION_ID) \
|
2015-11-28 23:44:34 +01:00
|
|
|
CONFIG_PAYLOAD_CONFIGFILE=$(CONFIG_PAYLOAD_CONFIGFILE) \
|
2015-07-01 02:09:17 +02:00
|
|
|
CONFIG_SEABIOS_THREAD_OPTIONROMS=$(CONFIG_SEABIOS_THREAD_OPTIONROMS) \
|
|
|
|
CONFIG_SEABIOS_VGA_COREBOOT=$(CONFIG_SEABIOS_VGA_COREBOOT) \
|
2016-02-06 20:47:05 +01:00
|
|
|
CONFIG_DRIVERS_UART_8250IO=$(CONFIG_DRIVERS_UART_8250IO) \
|
2015-07-01 02:09:17 +02:00
|
|
|
CONFIG_CONSOLE_SERIAL=$(CONFIG_CONSOLE_SERIAL) \
|
2015-11-29 00:32:25 +01:00
|
|
|
CONFIG_TTYS0_BASE=$(CONFIG_TTYS0_BASE)
|
2015-07-01 02:09:17 +02:00
|
|
|
|
2015-11-30 20:00:33 +01:00
|
|
|
payloads/external/SeaBIOS/seabios/out/vgabios.bin: seabios
|
2016-03-08 06:04:01 +01:00
|
|
|
payloads/external/SeaBIOS/seabios/.config: payloads/external/SeaBIOS/seabios/out/bios.bin.elf
|
|
|
|
payloads/external/SeaBIOS/seabios/out/autoversion.h: payloads/external/SeaBIOS/seabios/out/bios.bin.elf
|
2015-11-30 20:00:33 +01:00
|
|
|
|
2015-07-15 19:24:18 +02:00
|
|
|
payloads/external/depthcharge/depthcharge/build/depthcharge.elf depthcharge: $(top)/$(DOTCONFIG) $(CBFSTOOL)
|
2016-03-16 17:39:30 +01:00
|
|
|
$(MAKE) -C payloads/external/depthcharge \
|
2015-07-15 19:24:18 +02:00
|
|
|
BOARD=$(call ws_to_under,$(call strip_quotes,$(call tolower,$(CONFIG_MAINBOARD_PART_NUMBER)))) \
|
|
|
|
MFLAGS= MAKEFLAGS=
|
|
|
|
|
2015-07-01 02:09:17 +02:00
|
|
|
filo:
|
2016-03-16 17:39:30 +01:00
|
|
|
$(MAKE) -C payloads/external/FILO \
|
2015-07-01 02:09:17 +02:00
|
|
|
HOSTCC="$(HOSTCC)" \
|
|
|
|
CC="$(CC_x86_32)" LD="$(LD_x86_32)" OBJDUMP="$(OBJDUMP_x86_32)" \
|
|
|
|
OBJCOPY="$(OBJCOPY_x86_32)" STRIP="$(STRIP_x86_32)" \
|
|
|
|
CONFIG_FILO_MASTER=$(CONFIG_FILO_MASTER) \
|
|
|
|
CONFIG_FILO_STABLE=$(CONFIG_FILO_STABLE)
|
|
|
|
|
2015-12-04 16:52:18 +01:00
|
|
|
payloads/external/FILO/filo/build/filo.elf: filo
|
2016-01-14 20:41:58 +01:00
|
|
|
payloads/external/FILO/filo/.config: filo
|
|
|
|
payloads/external/FILO/filo/build/version.h: filo
|
2015-07-01 02:09:17 +02:00
|
|
|
|
|
|
|
grub2:
|
2016-03-16 17:39:30 +01:00
|
|
|
$(MAKE) -C payloads/external/GRUB2 \
|
2015-07-01 02:09:17 +02:00
|
|
|
HOSTCC="$(HOSTCC)" \
|
|
|
|
CC="$(CC_x86_32)" LD="$(LD_x86_32)" OBJDUMP="$(OBJDUMP_x86_32)" \
|
|
|
|
OBJCOPY="$(OBJCOPY_x86_32)" STRIP="$(STRIP_x86_32)" \
|
|
|
|
CONFIG_GRUB2_MASTER=$(CONFIG_GRUB2_MASTER)
|
2015-12-04 16:52:18 +01:00
|
|
|
|
|
|
|
payloads/external/GRUB2/grub2/build/default_payload.elf: grub2
|
2015-12-11 20:24:33 +01:00
|
|
|
|
|
|
|
payloads/external/U-Boot/u-boot/u-boot-dtb.bin u-boot: $(top)/$(DOTCONFIG)
|
2016-03-16 17:39:30 +01:00
|
|
|
$(MAKE) -C payloads/external/U-Boot \
|
2015-12-11 20:24:33 +01:00
|
|
|
CONFIG_UBOOT_MASTER=$(CONFIG_UBOOT_MASTER) \
|
|
|
|
CONFIG_UBOOT_STABLE=$(CONFIG_UBOOT_STABLE)
|
2016-02-29 00:56:27 +01:00
|
|
|
|
|
|
|
cbfs-files-$(CONFIG_MEMTEST_SECONDARY_PAYLOAD) += img/memtest
|
|
|
|
img/memtest-file := payloads/external/Memtest86Plus/memtest86plus/memtest
|
|
|
|
img/memtest-type := payload
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250IO),yy)
|
|
|
|
MEMTEST_SERIAL_OPTIONS=SERIAL_CONSOLE_DEFAULT=1 \
|
|
|
|
SERIAL_TTY=$(CONFIG_UART_FOR_CONSOLE) \
|
|
|
|
SERIAL_BAUD_RATE=$(CONFIG_TTYS0_BAUD)
|
|
|
|
endif
|
|
|
|
|
|
|
|
payloads/external/Memtest86Plus/memtest86plus/memtest: $(top)/$(DOTCONFIG)
|
2016-03-16 17:39:30 +01:00
|
|
|
$(MAKE) -C payloads/external/Memtest86Plus all \
|
2016-02-29 00:56:27 +01:00
|
|
|
CC="$(CC_x86_32)" \
|
|
|
|
LD="$(LD_x86_32)" \
|
|
|
|
OBJCOPY="$(OBJCOPY_x86_32)" \
|
|
|
|
AS="$(AS_x86_32)" \
|
|
|
|
$(MEMTEST_SERIAL_OPTIONS) \
|
|
|
|
MFLAGS= MAKEFLAGS=
|
2016-03-13 20:00:43 +01:00
|
|
|
|
|
|
|
PXE_ROM_PCI_ID:=$(subst $(comma),,$(CONFIG_PXE_ROM_ID))
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_PXE_ROM),y)
|
|
|
|
PXE_ROM_FILE:=$(CONFIG_PXE_ROM_FILE)
|
|
|
|
endif
|
|
|
|
ifeq ($(CONFIG_BUILD_IPXE),y)
|
|
|
|
PXE_ROM_FILE:=payloads/external/iPXE/ipxe/ipxe.rom
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250IO),yy)
|
|
|
|
IPXE_UART=COM$(call int-add,$(CONFIG_UART_FOR_CONSOLE) 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
cbfs-files-$(CONFIG_PXE_ROM)$(CONFIG_BUILD_IPXE) += pci$(CONFIG_PXE_ROM_ID).rom
|
|
|
|
pci$(CONFIG_PXE_ROM_ID).rom-file := $(PXE_ROM_FILE)
|
|
|
|
pci$(CONFIG_PXE_ROM_ID).rom-type := raw
|
|
|
|
|
|
|
|
payloads/external/iPXE/ipxe/ipxe.rom ipxe: $(top)/$(DOTCONFIG)
|
|
|
|
$(MAKE) -C payloads/external/iPXE all \
|
|
|
|
CROSS_COMPILE="$(CROSS_COMPILE_$(ARCH-ramstage-y))" \
|
|
|
|
PXE_ROM_PCI_ID=$(PXE_ROM_PCI_ID) \
|
|
|
|
CONFIG_IPXE_MASTER=$(CONFIG_IPXE_MASTER) \
|
|
|
|
CONFIG_IPXE_STABLE=$(CONFIG_IPXE_STABLE) \
|
|
|
|
CONSOLE_SERIAL=$(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250IO) \
|
|
|
|
IPXE_UART=$(IPXE_UART) \
|
|
|
|
CONFIG_TTYS0_BAUD=$(CONFIG_TTYS0_BAUD) \
|
|
|
|
MFLAGS= MAKEFLAGS=
|