99d05c74b6
Instead of adding various SeaBIOS options into the coreboot Kconfig, just add a way to use saved SeaBIOS .config files. These files can contain full SeaBIOS .configs, but is really intended for individual options. The coreboot Kconfig options take precedence over the settings in the saved .config. Change-Id: Ia7f9c76555b8e290777207b3f637c94c4d67a782 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/12568 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
77 lines
3 KiB
Makefile
77 lines
3 KiB
Makefile
################################################################################
|
|
##
|
|
## 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.
|
|
##
|
|
|
|
ifeq ($(CONFIG_PAYLOAD_ELF),y)
|
|
COREBOOT_ROM_DEPENDENCIES+=$(CONFIG_PAYLOAD_FILE)
|
|
endif
|
|
ifeq ($(CONFIG_PAYLOAD_SEABIOS),y)
|
|
COREBOOT_ROM_DEPENDENCIES+=seabios
|
|
endif
|
|
ifeq ($(CONFIG_PAYLOAD_FILO),y)
|
|
COREBOOT_ROM_DEPENDENCIES+=filo
|
|
endif
|
|
ifeq ($(CONFIG_PAYLOAD_GRUB2),y)
|
|
COREBOOT_ROM_DEPENDENCIES+=grub2
|
|
endif
|
|
|
|
######################################################################
|
|
# set up payload config and version files for later inclusion
|
|
ifeq ($(CONFIG_PAYLOAD_SEABIOS),y)
|
|
PAYLOAD_CONFIG=payloads/external/SeaBIOS/seabios/.config
|
|
PAYLOAD_VERSION=payloads/external/SeaBIOS/seabios/out/version.c
|
|
endif
|
|
ifeq ($(CONFIG_PAYLOAD_FILO),y)
|
|
PAYLOAD_CONFIG=payloads/external/FILO/filo/.config
|
|
PAYLOAD_VERSION=payloads/external/FILO/filo/build/version.h
|
|
endif
|
|
|
|
SEABIOS_CC_OFFSET=$(if $(filter %ccache,$(HOSTCC)),2,1)
|
|
seabios:
|
|
$(MAKE) -C payloads/external/SeaBIOS -f Makefile.inc \
|
|
HOSTCC="$(HOSTCC)" \
|
|
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)))" \
|
|
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) \
|
|
CONFIG_PAYLOAD_CONFIGFILE=$(CONFIG_PAYLOAD_CONFIGFILE) \
|
|
CONFIG_SEABIOS_THREAD_OPTIONROMS=$(CONFIG_SEABIOS_THREAD_OPTIONROMS) \
|
|
CONFIG_SEABIOS_VGA_COREBOOT=$(CONFIG_SEABIOS_VGA_COREBOOT) \
|
|
CONFIG_CONSOLE_SERIAL=$(CONFIG_CONSOLE_SERIAL) \
|
|
CONFIG_TTYS0_BASE=$(CONFIG_TTYS0_BASE) \
|
|
CONFIG_SEABIOS_MALLOC_UPPERMEMORY=$(CONFIG_SEABIOS_MALLOC_UPPERMEMORY)
|
|
|
|
payloads/external/SeaBIOS/seabios/out/vgabios.bin: seabios
|
|
payloads/external/SeaBIOS/seabios/out/bios.bin.elf: seabios
|
|
|
|
filo:
|
|
$(MAKE) -C payloads/external/FILO -f Makefile.inc \
|
|
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)
|
|
|
|
|
|
grub2:
|
|
$(MAKE) -C payloads/external/GRUB2 -f Makefile.inc \
|
|
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)
|