[[RFC] 14/14] Add the x86 architecture to the build system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Last patch in chain to bring in x86 support into barbox.

Signed-off-by: Juergen Beisert <jbe@xxxxxxxxxxxxxx>

---
 arch/x86/Kconfig  |   66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 arch/x86/Makefile |   50 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 116 insertions(+)

Index: u-boot-v2/arch/x86/Kconfig
===================================================================
--- /dev/null
+++ u-boot-v2/arch/x86/Kconfig
@@ -0,0 +1,66 @@
+#
+#
+#
+config ARCH_TEXT_BASE
+	hex
+	default 0x00007c00 if MACH_X86_GENERIC
+
+config BOARDINFO
+	default "Generic x86 bootloader" if MACH_X86_GENERIC
+
+config BOARD_LINKER_SCRIPT
+	bool
+	default n
+
+config GENERIC_LINKER_SCRIPT
+	bool
+	default y
+	depends on !BOARD_LINKER_SCRIPT
+
+config X86
+	bool
+	select HAS_KALLSYMS
+	select HAS_MODULES
+	select HAVE_CONFIGURABLE_MEMORY_LAYOUT
+	select HAVE_CONFIGURABLE_TEXT_BASE
+	default y
+
+choice
+	prompt "Select your board"
+
+config MACH_X86_GENERIC
+	bool "Generic x86"
+	help
+	  Say Y here if you want u-boot-v2 to be your BIOS based bootloader
+
+endchoice
+
+choice
+	prompt "Bring up type"
+
+	config X86_BIOS_BRINGUP
+		prompt "16 bit BIOS"
+		bool
+		help
+		   U-Boot-v2 will act as a BIOS based bootloader. This includes
+		   some 16 bit real mode code and some restrictions everyone knows
+		   from BIOS based systems.
+
+	config X86_NATIVE_BRINGUP
+		bool "native"
+		help
+		   U-Boot-v2 will act as a native bootloader. This includes all the
+		   required initialization needed to bring up a piece of hardware.
+		   Note: Not implemented yet
+
+endchoice
+
+source arch/x86/boot/Kconfig
+source arch/x86/mach-i386/Kconfig
+
+source common/Kconfig
+source commands/Kconfig
+source net/Kconfig
+source drivers/Kconfig
+source fs/Kconfig
+source lib/Kconfig
Index: u-boot-v2/arch/x86/Makefile
===================================================================
--- /dev/null
+++ u-boot-v2/arch/x86/Makefile
@@ -0,0 +1,50 @@
+CPPFLAGS += -D__X86__ -fno-strict-aliasing
+
+board-y := x86_generic
+machine-y := i386
+
+TEXT_BASE = $(CONFIG_TEXT_BASE)
+
+CPPFLAGS += -march=i386 -DTEXT_BASE=$(TEXT_BASE) -P
+
+ifndef CONFIG_MODULES
+# Add cleanup flags
+CPPFLAGS += -fdata-sections -ffunction-sections
+LDFLAGS_uboot += -static --gc-sections
+endif
+
+ifeq ($(incdir-y),)
+incdir-y := $(machine-y)
+endif
+INCDIR   := arch-$(incdir-y)
+
+all: $(KBUILD_IMAGE)
+
+
+
+
+
+
+ifneq ($(board-y),)
+BOARD  := board/$(board-y)/
+else
+BOARD  :=
+endif
+
+ifneq ($(machine-y),)
+MACH  := arch/x86/mach-$(machine-y)/
+else
+MACH  :=
+endif
+
+common-y += $(BOARD) $(MACH)
+common-y += arch/x86/lib/
+common-y += arch/x86/boot/
+
+# arch/x86/cpu/
+
+lds-$(CONFIG_GENERIC_LINKER_SCRIPT)   := arch/x86/lib/u-boot.lds
+lds-$(CONFIG_BOARD_LINKER_SCRIPT)     := $(BOARD)/u-boot.lds
+
+CLEAN_FILES    += arch/x86/lib/u-boot.lds uboot.map uboot.S
+

-- 

_______________________________________________
u-boot-v2 mailing list
u-boot-v2@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/u-boot-v2

[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux