libpayload: only compile drivers/serial.c on machines that use it.

Create a new serial console variable, X86_SERIAL_CONSOLE
which is only enabled when SERIAL_CONSOLE and ARCH_X86 are defined.

Builds for x86 and ARM.

Change-Id: I607253c418de015975a839e3c33577842885ec0c
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: http://review.coreboot.org/2412
Tested-by: build bot (Jenkins)
Reviewed-by: Gabe Black <gabeblack@chromium.org>
This commit is contained in:
Ronald G. Minnich 2013-02-15 08:13:29 -08:00 committed by Gabe Black
parent 802921562f
commit 7b6945405a
2 changed files with 7 additions and 2 deletions

View File

@ -168,9 +168,14 @@ config SERIAL_CONSOLE
bool "See output on the serial port console"
default y
config X86_SERIAL_CONSOLE
bool
depends on ARCH_X86 && SERIAL_CONSOLE
default y
config SERIAL_IOBASE
hex "I/O base for the serial port (default 0x3f8)"
depends on SERIAL_CONSOLE
depends on X86_SERIAL_CONSOLE
default 0x3f8
config SERIAL_SET_SPEED

View File

@ -33,7 +33,7 @@ libc-$(CONFIG_PCI) += pci.c
libc-$(CONFIG_SPEAKER) += speaker.c
libc-$(CONFIG_SERIAL_CONSOLE) += serial.c
libc-$(CONFIG_X86_SERIAL_CONSOLE) += serial.c
libc-$(CONFIG_PC_KEYBOARD) += keyboard.c