soc: introduce SoC families and series

Add additional layers when defining SoCs to allow reuse among SoCs
of the same family and architecture.

The Board is the first location where we search for a linker.cmd file,
if not found we look for the linker file in
arch/<arch>/soc/<family>/<series>

Change-Id: I51d5e9a056220d0bd2ae0fa31474ffe63568e698
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2016-03-31 08:07:42 -04:00 committed by Anas Nashif
parent b85ffc8104
commit a02c34ef0b
2 changed files with 26 additions and 6 deletions

View file

@ -345,13 +345,14 @@ endif
USERINCLUDE := -include $(CURDIR)/include/generated/autoconf.h
SOC_NAME = $(subst $(DQUOTE),,$(CONFIG_SOC))
SOC_FAMILY = $(subst $(DQUOTE),,$(CONFIG_SOC_FAMILY))
override ARCH = $(subst $(DQUOTE),,$(CONFIG_ARCH))
BOARD_NAME = $(subst $(DQUOTE),,$(CONFIG_BOARD))
KERNEL_NAME = $(subst $(DQUOTE),,$(CONFIG_KERNEL_BIN_NAME))
KERNEL_ELF_NAME = $(KERNEL_NAME).elf
KERNEL_BIN_NAME = $(KERNEL_NAME).bin
export SOC_NAME BOARD_NAME ARCH KERNEL_NAME KERNEL_ELF_NAME KERNEL_BIN_NAME
export SOC_FAMILY SOC_NAME BOARD_NAME ARCH KERNEL_NAME KERNEL_ELF_NAME KERNEL_BIN_NAME
# Use ZEPHYRINCLUDE when you must reference the include/ directory.
# Needed to be compatible with the O= option
ZEPHYRINCLUDE = \

View file

@ -63,16 +63,35 @@ config ARCH
System architecture string.
config SOC
string
help
This option holds the directory name used by the build system to locate
the correct linker file.
string
help
SoC name which can be found under arch/<arch>/soc/<soc name>.
This option holds the directory name used by the build system to locate
the correct linker and header files for the SoC. This option will go away
once all SoCs are using family/series structure.
config SOC_SERIES
string
help
SoC series name which can be found under arch/<arch>/soc/<family>/<series>.
This option holds the directory name used by the build system to locate
the correct linker and header files.
config SOC_FAMILY
string
help
SoC family name which can be found under arch/<arch>/soc/<family>.
This option holds the directory name used by the build system to locate
the correct linker and header files.
config BOARD
string
help
This option holds the name of the board and is used to located the files
related to the board in the source tree.
related to the board in the source tree (under boards/).
The Board is the first location where we search for a linker.cmd file,
if not found we look for the linker file in
arch/<arch>/soc/<family>/<series>
source "arch/*/Kconfig"