kconfig: support board-specific defconfig

The current defconfigs are BIOS-specific which makes it difficult to maintain
multiple defconfigs for boards running the same BIOS.

This patch re-organizes the defconfigs to be board-specific. A command line
option BOARD is introduced to specify a board on which the current build targets
at. The original PLATFORM is kept for backward compatibility which redirects to
apl-mrb and nuc6cayh for sbl and uefi, respectively.

The getting started guide is also updated accordingly.

v1 -> v2:

* Rewrite 'up2' to 'UP2'.

Tracked-On: #1588
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Reviewed-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Junjie Mao
2018-10-19 21:54:26 +08:00
committed by lijinxia
parent 8bde372c32
commit b9d54f4ab3
8 changed files with 77 additions and 26 deletions

View File

@@ -45,6 +45,16 @@ config PLATFORM
default "uefi" if PLATFORM_UEFI
default "sbl" if PLATFORM_SBL
config BOARD
string "Target board"
help
The target board this build runs on top of.
config DEFCONFIG_LIST
string
option defconfig_list
default "arch/x86/configs/$BOARD.config"
config RELEASE
bool "Release build"
default n

View File

@@ -1,2 +1,3 @@
CONFIG_BOARD="apl-mrb"
# CONFIG_PLATFORM_UEFI is not set
CONFIG_PLATFORM_SBL=y

View File

@@ -0,0 +1 @@
nuc6cayh.config

View File

@@ -0,0 +1,3 @@
CONFIG_BOARD="NUC6CAYH"
CONFIG_PLATFORM_UEFI=y
# CONFIG_PLATFORM_SBL is not set

View File

@@ -1,2 +1,3 @@
CONFIG_BOARD="UP2"
CONFIG_PLATFORM_UEFI=y
# CONFIG_PLATFORM_SBL is not set