diff options
author | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2015-04-27 14:03:57 -0700 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2015-04-29 18:11:30 +0200 |
commit | aae53ab76aa818bcf3a7df1e44a80289a2ac6018 (patch) | |
tree | 44174cdcb4d3a72ee2f50c8950b093a8c33dbdb0 /src/soc | |
parent | 77c04e95bac0b56ced7deec1f41c0c5b6b9f8ee5 (diff) | |
download | coreboot-aae53ab76aa818bcf3a7df1e44a80289a2ac6018.tar.xz |
kbuild: automatically include SOCs
This change switches all SOC vendors and southbridges
to be autoincluded by Makefile.inc, rather than having to be
mentioned explicitly in soc/Makefile.inc or in
soc/<vendor>/Makefile.inc.
This means, vendor and SOC directories are now "drop
in", e.g. be placed in the coreboot directory hierarchy
without having to modify any higher level coreboot files.
The long term plan is to enable out of tree components to be
built with a given coreboot version (given that the API did not
change).
Change-Id: Iede26fe184b09c53cec23a545d04953701cbc41d
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/9799
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/soc')
24 files changed, 56 insertions, 85 deletions
diff --git a/src/soc/Makefile.inc b/src/soc/Makefile.inc deleted file mode 100644 index bbcfd2c81b..0000000000 --- a/src/soc/Makefile.inc +++ /dev/null @@ -1,12 +0,0 @@ -################################################################################ -## Subdirectories -################################################################################ -subdirs-y += broadcom -subdirs-y += imgtec -subdirs-y += intel -subdirs-y += marvell -subdirs-y += nvidia -subdirs-y += qualcomm -subdirs-y += rockchip -subdirs-y += samsung -subdirs-y += ucb diff --git a/src/soc/broadcom/Makefile.inc b/src/soc/broadcom/Makefile.inc deleted file mode 100644 index 165f923032..0000000000 --- a/src/soc/broadcom/Makefile.inc +++ /dev/null @@ -1,20 +0,0 @@ -## -## This file is part of the coreboot project. -## -## Copyright 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. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -## - -subdirs-$(CONFIG_SOC_BROADCOM_CYGNUS) += cygnus diff --git a/src/soc/broadcom/cygnus/Makefile.inc b/src/soc/broadcom/cygnus/Makefile.inc index 4e09bed86f..cfec7d40ef 100644 --- a/src/soc/broadcom/cygnus/Makefile.inc +++ b/src/soc/broadcom/cygnus/Makefile.inc @@ -17,6 +17,8 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## +ifeq ($(CONFIG_SOC_BROADCOM_CYGNUS),y) + bootblock-y += bootblock.c bootblock-y += cbmem.c bootblock-y += i2c.c @@ -102,3 +104,5 @@ $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.tmp \ $(objutil)/broadcom/secimage/secimage -out $@ \ -config util/broadcom/unauth.cfg \ -hmac util/broadcom/khmacsha256 -bl $< + +endif diff --git a/src/soc/imgtec/Makefile.inc b/src/soc/imgtec/Makefile.inc deleted file mode 100644 index 60a99091a1..0000000000 --- a/src/soc/imgtec/Makefile.inc +++ /dev/null @@ -1 +0,0 @@ -subdirs-$(CONFIG_CPU_IMGTEC_PISTACHIO) += pistachio diff --git a/src/soc/imgtec/pistachio/Makefile.inc b/src/soc/imgtec/pistachio/Makefile.inc index 0a3d456de3..010ddb6835 100644 --- a/src/soc/imgtec/pistachio/Makefile.inc +++ b/src/soc/imgtec/pistachio/Makefile.inc @@ -19,6 +19,8 @@ # MA 02110-1301 USA # +ifeq ($(CONFIG_CPU_IMGTEC_PISTACHIO),y) + # We enable CBFS_SPI_WRAPPER for Pistachio targets. bootblock-y += clocks.c bootblock-y += spi.c @@ -55,3 +57,4 @@ $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw $(BIMGTOOL) @printf " BIMGTOOL $(subst $(obj)/,,$(@))\n" $(BIMGTOOL) $< $@ $(call loadaddr,bootblock) +endif diff --git a/src/soc/intel/Makefile.inc b/src/soc/intel/Makefile.inc deleted file mode 100644 index f86d6cabcb..0000000000 --- a/src/soc/intel/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -subdirs-$(CONFIG_SOC_INTEL_BAYTRAIL) += baytrail -subdirs-$(CONFIG_SOC_INTEL_BROADWELL) += broadwell -subdirs-$(CONFIG_SOC_INTEL_FSP_BAYTRAIL) += fsp_baytrail diff --git a/src/soc/intel/baytrail/Makefile.inc b/src/soc/intel/baytrail/Makefile.inc index 6d28c78684..78e2da6556 100644 --- a/src/soc/intel/baytrail/Makefile.inc +++ b/src/soc/intel/baytrail/Makefile.inc @@ -1,7 +1,8 @@ +ifeq ($(CONFIG_SOC_INTEL_BAYTRAIL),y) + subdirs-y += bootblock subdirs-y += microcode subdirs-y += romstage -subdirs-y += ../common subdirs-y += ../../../cpu/x86/lapic subdirs-y += ../../../cpu/x86/mtrr subdirs-y += ../../../cpu/x86/smm @@ -102,3 +103,5 @@ mrc.bin-position := $(if $(findstring elf,$(CONFIG_MRC_FILE)),$(shell printf "0x mrc.bin-type := mrc PHONY += baytrail_add_me + +endif diff --git a/src/soc/intel/broadwell/Makefile.inc b/src/soc/intel/broadwell/Makefile.inc index ec6b9ae62a..8b4a0c1d2f 100644 --- a/src/soc/intel/broadwell/Makefile.inc +++ b/src/soc/intel/broadwell/Makefile.inc @@ -1,7 +1,8 @@ +ifeq ($(CONFIG_SOC_INTEL_BROADWELL),y) + subdirs-y += bootblock subdirs-y += microcode subdirs-y += romstage -subdirs-y += ../common subdirs-y += ../../../cpu/x86/lapic subdirs-y += ../../../cpu/x86/mtrr subdirs-y += ../../../cpu/x86/smm @@ -128,3 +129,5 @@ cbfs-files-$(CONFIG_HAVE_MRC) += mrc.bin mrc.bin-file := $(call strip_quotes,$(CONFIG_MRC_FILE)) mrc.bin-position := $(if $(findstring elf,$(CONFIG_MRC_FILE)),$(shell printf "0x%x" $$(( $(mrcelfentry) - $(mrcelfoffset) )) ),$(CONFIG_MRC_BIN_ADDRESS)) mrc.bin-type := mrc + +endif diff --git a/src/soc/intel/common/Makefile.inc b/src/soc/intel/common/Makefile.inc index d340308992..46786e2d1a 100644 --- a/src/soc/intel/common/Makefile.inc +++ b/src/soc/intel/common/Makefile.inc @@ -1,6 +1,10 @@ +ifeq ($(CONFIG_SOC_INTEL_BAYTRAIL)$(CONFIG_SOC_INTEL_BROADWELL),y) + ramstage-y += hda_verb.c ramstage-$(CONFIG_CACHE_MRC_SETTINGS) += nvm.c ramstage-$(CONFIG_CACHE_MRC_SETTINGS) += mrc_cache.c romstage-$(CONFIG_CACHE_MRC_SETTINGS) += mrc_cache.c ramstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c romstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c + +endif diff --git a/src/soc/intel/fsp_baytrail/Makefile.inc b/src/soc/intel/fsp_baytrail/Makefile.inc index 2dfb9cba63..af4871cc91 100644 --- a/src/soc/intel/fsp_baytrail/Makefile.inc +++ b/src/soc/intel/fsp_baytrail/Makefile.inc @@ -17,6 +17,9 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # + +ifeq ($(CONFIG_SOC_INTEL_FSP_BAYTRAIL),y) + subdirs-y += microcode subdirs-y += romstage subdirs-y += ../../../cpu/x86/lapic @@ -87,3 +90,5 @@ endif endif endif + +endif diff --git a/src/soc/marvell/Makefile.inc b/src/soc/marvell/Makefile.inc deleted file mode 100644 index ef7bcd9e2e..0000000000 --- a/src/soc/marvell/Makefile.inc +++ /dev/null @@ -1,20 +0,0 @@ -## -## This file is part of the coreboot project. -## -## Copyright 2014 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. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -## - -subdirs-$(CONFIG_SOC_MARVELL_BG4CD) += bg4cd diff --git a/src/soc/marvell/bg4cd/Makefile.inc b/src/soc/marvell/bg4cd/Makefile.inc index 4a58e6f8eb..c433d37666 100644 --- a/src/soc/marvell/bg4cd/Makefile.inc +++ b/src/soc/marvell/bg4cd/Makefile.inc @@ -17,6 +17,8 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## +ifeq ($(CONFIG_SOC_MARVELL_BG4CD),y) + bootblock-$(CONFIG_VBOOT_VERIFY_FIRMWARE) += bootblock_asm.S bootblock-$(CONFIG_VBOOT_VERIFY_FIRMWARE) += bootblock.c @@ -50,3 +52,5 @@ $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin @printf "Generating: $(subst $(obj)/,,$(@))\n" @mkdir -p $(dir $@) @mv $< $@ + +endif diff --git a/src/soc/nvidia/Makefile.inc b/src/soc/nvidia/Makefile.inc deleted file mode 100644 index 100cb940a8..0000000000 --- a/src/soc/nvidia/Makefile.inc +++ /dev/null @@ -1,2 +0,0 @@ -subdirs-$(CONFIG_SOC_NVIDIA_TEGRA124) += tegra124 -subdirs-$(CONFIG_SOC_NVIDIA_TEGRA132) += tegra132 diff --git a/src/soc/nvidia/tegra124/Makefile.inc b/src/soc/nvidia/tegra124/Makefile.inc index 49669ebd83..78054f4511 100644 --- a/src/soc/nvidia/tegra124/Makefile.inc +++ b/src/soc/nvidia/tegra124/Makefile.inc @@ -1,3 +1,5 @@ +ifeq ($(CONFIG_SOC_NVIDIA_TEGRA124),y) + bootblock-y += bootblock.c bootblock-y += bootblock_asm.S bootblock-y += cbfs.c @@ -102,3 +104,5 @@ $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin $(BCT_BIN) $(CBOOTIMAGE) echo "BootLoader = $<,$(call loadaddr,bootblock),$(call loadaddr,bootblock),Complete;" >> $(BCT_WRAPPER) @printf " CBOOTIMAGE $(subst $(obj)/,,$(@))\n" $(CBOOTIMAGE) $(BCT_WRAPPER) $@ + +endif diff --git a/src/soc/nvidia/tegra132/Makefile.inc b/src/soc/nvidia/tegra132/Makefile.inc index bfa70885d3..44976d17bd 100644 --- a/src/soc/nvidia/tegra132/Makefile.inc +++ b/src/soc/nvidia/tegra132/Makefile.inc @@ -1,3 +1,5 @@ +ifeq ($(CONFIG_SOC_NVIDIA_TEGRA132),y) + bootblock-y += bootblock.c bootblock-y += bootblock_asm.S bootblock-y += cbfs.c @@ -150,3 +152,5 @@ MTS_FILE_CBFS = mts cbfs-files-y += $(MTS_FILE_CBFS) $(MTS_FILE_CBFS)-file := $(MTS_FILE) $(MTS_FILE_CBFS)-type := raw + +endif diff --git a/src/soc/qualcomm/Makefile.inc b/src/soc/qualcomm/Makefile.inc deleted file mode 100644 index 06b2f2f2c3..0000000000 --- a/src/soc/qualcomm/Makefile.inc +++ /dev/null @@ -1 +0,0 @@ -subdirs-$(CONFIG_SOC_QC_IPQ806X) += ipq806x diff --git a/src/soc/qualcomm/ipq806x/Makefile.inc b/src/soc/qualcomm/ipq806x/Makefile.inc index 6aa10f8f7b..3eb070e452 100644 --- a/src/soc/qualcomm/ipq806x/Makefile.inc +++ b/src/soc/qualcomm/ipq806x/Makefile.inc @@ -17,6 +17,8 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## +ifeq ($(CONFIG_SOC_QC_IPQ806X),y) + bootblock-y += clock.c bootblock-y += gpio.c bootblock-$(CONFIG_SPI_FLASH) += spi.c @@ -88,3 +90,5 @@ mbn-root := 3rdparty/cpu/qualcomm/ipq806x $(foreach f,$(mbn-files),$(eval cbfs-files-y += $(f))\ $(eval $(f)-file := $(mbn-root)/$(f))\ $(eval $(f)-type := raw)) + +endif diff --git a/src/soc/rockchip/Makefile.inc b/src/soc/rockchip/Makefile.inc deleted file mode 100644 index aa67f5c1cf..0000000000 --- a/src/soc/rockchip/Makefile.inc +++ /dev/null @@ -1,20 +0,0 @@ -## -## This file is part of the coreboot project. -## -## Copyright 2014 Rockchip 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. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -## - -subdirs-$(CONFIG_SOC_ROCKCHIP_RK3288) += rk3288 diff --git a/src/soc/rockchip/rk3288/Makefile.inc b/src/soc/rockchip/rk3288/Makefile.inc index 441a97fb84..be41327321 100644 --- a/src/soc/rockchip/rk3288/Makefile.inc +++ b/src/soc/rockchip/rk3288/Makefile.inc @@ -17,6 +17,8 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## +ifeq ($(CONFIG_SOC_ROCKCHIP_RK3288),y) + IDBTOOL = util/rockchip/make_idb.py #bootblock-y += bootblock.c @@ -79,3 +81,5 @@ $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin @printf "Generating: $(subst $(obj)/,,$(@))\n" @mkdir -p $(dir $@) @$(IDBTOOL) --from=$< --to=$@ --enable-align + +endif diff --git a/src/soc/samsung/Makefile.inc b/src/soc/samsung/Makefile.inc deleted file mode 100644 index 496b5f7be3..0000000000 --- a/src/soc/samsung/Makefile.inc +++ /dev/null @@ -1,2 +0,0 @@ -subdirs-$(CONFIG_CPU_SAMSUNG_EXYNOS5250) += exynos5250 -subdirs-$(CONFIG_CPU_SAMSUNG_EXYNOS5420) += exynos5420 diff --git a/src/soc/samsung/exynos5250/Makefile.inc b/src/soc/samsung/exynos5250/Makefile.inc index 6525637382..1cde349502 100644 --- a/src/soc/samsung/exynos5250/Makefile.inc +++ b/src/soc/samsung/exynos5250/Makefile.inc @@ -1,3 +1,5 @@ +ifeq ($(CONFIG_CPU_SAMSUNG_EXYNOS5250),y) + bootblock-y += spi.c alternate_cbfs.c bootblock-y += bootblock.c bootblock-y += pinmux.c timer.c power.c @@ -51,3 +53,5 @@ $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin @printf " BL1, CKSUM $(subst $(obj)/,,$(@))\n" util/exynos/fixed_cksum.py $< $<.cksum 32768 cat 3rdparty/cpu/samsung/exynos5250/bl1.bin $<.cksum > $@ + +endif diff --git a/src/soc/samsung/exynos5420/Makefile.inc b/src/soc/samsung/exynos5420/Makefile.inc index 7eb407e957..e42fc9aebf 100644 --- a/src/soc/samsung/exynos5420/Makefile.inc +++ b/src/soc/samsung/exynos5420/Makefile.inc @@ -1,3 +1,5 @@ +ifeq ($(CONFIG_CPU_SAMSUNG_EXYNOS5420),y) + bootblock-y += spi.c alternate_cbfs.c bootblock-y += bootblock.c bootblock-y += pinmux.c timer.c power.c @@ -53,3 +55,5 @@ $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin @printf " BL1, CKSUM $(subst $(obj)/,,$(@))\n" util/exynos/variable_cksum.py $< $<.cksum cat 3rdparty/cpu/samsung/exynos5420/bl1.bin $<.cksum > $@ + +endif diff --git a/src/soc/ucb/Makefile.inc b/src/soc/ucb/Makefile.inc deleted file mode 100644 index fe40742484..0000000000 --- a/src/soc/ucb/Makefile.inc +++ /dev/null @@ -1 +0,0 @@ -subdirs-$(CONFIG_SOC_UCB_RISCV) += riscv diff --git a/src/soc/ucb/riscv/Makefile.inc b/src/soc/ucb/riscv/Makefile.inc index c25a2fccdb..1072a2b32e 100644 --- a/src/soc/ucb/riscv/Makefile.inc +++ b/src/soc/ucb/riscv/Makefile.inc @@ -1,3 +1,6 @@ -romstage-y += cbmem.c +ifeq ($(CONFIG_SOC_UCB_RISCV),y) +romstage-y += cbmem.c ramstage-y += cbmem.c + +endif |