This patch added a new architecture option in general setup menu, and
after we choice the
ARM architecture, we can define the cross-compiler-prefix. Since
coreboot now depends on
X86 architecture, we couldn't build an ARM coreboot now.

Signed-off-by: Yang Bai <[email protected]>


diff --git a/Makefile b/Makefile
index ac7115d..cae3870 100644
--- a/Makefile
+++ b/Makefile
@@ -101,6 +101,12 @@ else

 include $(HAVE_DOTCONFIG)

+ifneq ($(CONFIG_ARCH_X86),y)
+ifneq ($(CONFIG_COMPILER_LLVM_CLANG),y)
+CC := $(CONFIG_CROSS_COMPILE)$(CC)
+endif
+endif
+
 ifneq ($(INNER_SCANBUILD),y)
 ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
 CC:=clang -m32
diff --git a/src/Kconfig b/src/Kconfig
index 05b4adb..abaa9a5 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -23,12 +23,37 @@ menu "General setup"

 config EXPERT
        bool "Expert mode"
+       default n
        help
          This allows you to select certain advanced configuration options.

          Warning: Only enable this option if you really know what you are
          doing! You have been warned!

+choice
+       prompt "Architecture"
+       default ARCH_X86
+       help
+         This option is used to set the architecture of Coreboot.
+
+config ARCH_X86
+       bool "X86"
+config ARCH_ARM
+       bool "ARM"
+       depends on EXPERT
+endchoice
+
+config CROSS_COMPILE
+       string "Cross-compiler tool prefix"
+       default ""
+       depends on !ARCH_X86
+       depends on COMPILER_GCC
+       help
+         Same as running 'make CROSS_COMPILE=prefix-' but stored for
+         default make runs in this kernel build directory.  You don't
+         need to set this unless you want the configured kernel build
+         directory to select the cross-compiler automatically.
+
 config LOCALVERSION
        string "Local version string"
        help
@@ -102,12 +127,6 @@ endmenu

 source src/mainboard/Kconfig

-# This option is used to set the architecture of a mainboard to X86.
-# It is usually set in mainboard/*/Kconfig.
-config ARCH_X86
-       bool
-       default n
-
 if ARCH_X86
 source src/arch/x86/Kconfig
 endif

-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to