libpayload: Reintroduce CONFIG_LP_CHROMEOS to set suitable defaults

Chrome OS builds always have some inherent differences to "standard"
libpayload configurations: they don't want to use curses or things like
storage drivers, they always use the coreboot framebuffer and USB, etc.
This patch reintroduces CONFIG_LP_CHROMEOS as an option that only
affects Kconfig defaults. This allows Chrome OS builds to select most of
what they need in one go and reduces board-specific .config files to
only the options that are really specific to that board.

Also restricts the 8250_SERIAL_CONSOLE Kconfig to only default to yes on
x86 boards, which probably makes sense for all of libpayload (some but
far from all ARM boards use 8250-compatible UARTs, and we should
probably not default a platform option unless it's going to be correct
with very high probability).

BRANCH=None
BUG=None
TEST=Built and booted Jerry and Oak.

Change-Id: Ie0c0593ffd399608d2cbfb83d20891f6f1864914
Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Commit-Id: e558f59
Original-Change-Id: I609637cd2ea7dfb4558aa3c04c90b64038c9ab57
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/347970
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/17024
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
Julius Werner 2016-05-16 16:37:56 -07:00
parent 4fda9bd0ec
commit 58caa8ba8c
3 changed files with 19 additions and 10 deletions

View File

@ -34,6 +34,7 @@ menu "Generic Options"
config GPL config GPL
bool "GPLv2-licensed Options" bool "GPLv2-licensed Options"
default y if CHROMEOS
default n default n
help help
Prompt for options that will build code licensed under the GNU General Prompt for options that will build code licensed under the GNU General
@ -55,6 +56,12 @@ config DEVELOPER
Prompt for developer options. These options are only interesting for Prompt for developer options. These options are only interesting for
libpayload developers. libpayload developers.
config CHROMEOS
bool "Chrome OS Options"
default n
help
Select configuration defaults appropriate for Chrome OS boards.
choice choice
prompt "Compiler to use" prompt "Compiler to use"
default COMPILER_GCC default COMPILER_GCC
@ -117,7 +124,7 @@ endchoice
config MULTIBOOT config MULTIBOOT
bool "Multiboot header support" bool "Multiboot header support"
depends on ARCH_X86 depends on ARCH_X86
default y default y if !CHROMEOS
config HEAP_SIZE config HEAP_SIZE
int "Heap size" int "Heap size"
@ -158,7 +165,7 @@ config LIBC
config CURSES config CURSES
bool "Build a curses library" bool "Build a curses library"
default y default y if !CHROMEOS
choice choice
prompt "Curses implementation" prompt "Curses implementation"
@ -208,6 +215,7 @@ menu "Console Options"
config SKIP_CONSOLE_INIT config SKIP_CONSOLE_INIT
bool "Skip initializing the consoles at startup" bool "Skip initializing the consoles at startup"
default y if CHROMEOS
default n default n
help help
Normally, libpayload will initialize console input/output on startup Normally, libpayload will initialize console input/output on startup
@ -225,7 +233,7 @@ config SERIAL_CONSOLE
config 8250_SERIAL_CONSOLE config 8250_SERIAL_CONSOLE
bool "8250-compatible serial port driver (including IO and MMIO)" bool "8250-compatible serial port driver (including IO and MMIO)"
depends on SERIAL_CONSOLE depends on SERIAL_CONSOLE
default y default y if ARCH_X86
config S5P_SERIAL_CONSOLE config S5P_SERIAL_CONSOLE
bool "Exynos SOC, S5P compatible serial port driver" bool "Exynos SOC, S5P compatible serial port driver"
@ -289,7 +297,7 @@ config VIDEO_CONSOLE
config VGA_VIDEO_CONSOLE config VGA_VIDEO_CONSOLE
bool "VGA video console driver" bool "VGA video console driver"
depends on ARCH_X86 && VIDEO_CONSOLE depends on ARCH_X86 && VIDEO_CONSOLE
default y default y if !CHROMEOS
config GEODELX_VIDEO_CONSOLE config GEODELX_VIDEO_CONSOLE
bool "Geode LX video console driver" bool "Geode LX video console driver"
@ -299,6 +307,7 @@ config GEODELX_VIDEO_CONSOLE
config COREBOOT_VIDEO_CONSOLE config COREBOOT_VIDEO_CONSOLE
bool "coreboot video console driver" bool "coreboot video console driver"
depends on VIDEO_CONSOLE && !GEODELX_VIDEO_CONSOLE depends on VIDEO_CONSOLE && !GEODELX_VIDEO_CONSOLE
default y if CHROMEOS
default n default n
help help
Say Y here if coreboot switched to a graphics mode and Say Y here if coreboot switched to a graphics mode and
@ -352,7 +361,7 @@ config RTC_PORT_EXTENDED_VIA
config SPEAKER config SPEAKER
bool "Support for PC speaker" bool "Support for PC speaker"
depends on ARCH_X86 depends on ARCH_X86
default y default y if !CHROMEOS
source "drivers/timer/Kconfig" source "drivers/timer/Kconfig"
source "drivers/storage/Kconfig" source "drivers/storage/Kconfig"

View File

@ -12,7 +12,7 @@
config STORAGE config STORAGE
bool "Support for storage devices" bool "Support for storage devices"
default y default y if !CHROMEOS
help help
Select this option if you want support for storage devices (like Select this option if you want support for storage devices (like
hard drives, memory sticks or optical drives). hard drives, memory sticks or optical drives).

View File

@ -18,7 +18,7 @@ config USB
config USB_UHCI config USB_UHCI
bool "Support for USB UHCI controllers" bool "Support for USB UHCI controllers"
depends on USB && ARCH_X86 depends on USB && ARCH_X86
default y default y if !CHROMEOS
help help
Select this option if you are going to use USB 1.1 on an Intel based Select this option if you are going to use USB 1.1 on an Intel based
system. system.
@ -26,7 +26,7 @@ config USB_UHCI
config USB_OHCI config USB_OHCI
bool "Support for USB OHCI controllers" bool "Support for USB OHCI controllers"
depends on USB depends on USB
default y default y if !CHROMEOS
help help
Select this option if you are going to use USB 1.1 on a non-Intel based Select this option if you are going to use USB 1.1 on a non-Intel based
system. system.
@ -34,14 +34,14 @@ config USB_OHCI
config USB_EHCI config USB_EHCI
bool "Support for USB EHCI controllers" bool "Support for USB EHCI controllers"
depends on USB depends on USB
default y default y if !CHROMEOS
help help
Select this option if you want to use USB 2.0 Select this option if you want to use USB 2.0
config USB_XHCI config USB_XHCI
bool "Support for USB xHCI controllers" bool "Support for USB xHCI controllers"
depends on USB depends on USB
default y default y if !CHROMEOS
help help
Select this option if you want to use USB 3.0 Select this option if you want to use USB 3.0