[Buildroot] [PATCH 27/28] Add x-loader bootloader

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Mon Jul 4 21:33:44 UTC 2011


From: Philippe Reynes <tremyfr at yahoo.fr>

[Thomas Petazzoni: use BR2_BOOT prefix instead of BR2_TARGET, misc
fixes]

Signed-off-by: Philippe Reynes <tremyfr at yahoo.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
---
 boot/Config.in            |    1 +
 boot/x-loader/Config.in   |   15 +++++++++++++++
 boot/x-loader/x-loader.mk |   35 +++++++++++++++++++++++++++++++++++
 3 files changed, 51 insertions(+), 0 deletions(-)
 create mode 100644 boot/x-loader/Config.in
 create mode 100644 boot/x-loader/x-loader.mk

diff --git a/boot/Config.in b/boot/Config.in
index 67ab8ac..a07102e 100644
--- a/boot/Config.in
+++ b/boot/Config.in
@@ -6,6 +6,7 @@ source "boot/syslinux/Config.in"
 source "boot/u-boot/Config.in"
 source "boot/at91bootstrap/Config.in"
 source "boot/at91dataflashboot/Config.in"
+source "boot/x-loader/Config.in"
 
 endmenu
 
diff --git a/boot/x-loader/Config.in b/boot/x-loader/Config.in
new file mode 100644
index 0000000..9597337
--- /dev/null
+++ b/boot/x-loader/Config.in
@@ -0,0 +1,15 @@
+menuconfig BR2_BOOT_XLOADER
+	bool "X-loader"
+	depends on BR2_arm
+	help
+	  The x-loader bootloader. It is mainly used on OMAP-based
+	  platforms.
+
+if BR2_BOOT_XLOADER
+config BR2_BOOT_XLOADER_BOARDNAME
+	string "x-loader board name"
+	help
+	  One of x-loader supported boards to be built.
+	  This will be suffixed with _config to meet x-loader
+	  standard naming.
+endif
diff --git a/boot/x-loader/x-loader.mk b/boot/x-loader/x-loader.mk
new file mode 100644
index 0000000..31395ee
--- /dev/null
+++ b/boot/x-loader/x-loader.mk
@@ -0,0 +1,35 @@
+#############################################################
+#
+# x-loader
+#
+#############################################################
+XLOADER_VERSION    = 6f3a26101303051e0f91b6213735b68ce804e94e
+XLOADER_SITE       = git://gitorious.org/x-loader/x-loader.git
+XLOADER_BOARD_NAME = $(call qstrip,$(BR2_BOOT_XLOADER_BOARDNAME))
+
+define XLOADER_BUILD_CMDS
+	$(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) $(XLOADER_BOARD_NAME)_config
+	$(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) all
+	$(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) ift
+endef
+
+define XLOADER_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/MLO $(BINARIES_DIR)/
+endef
+
+$(eval $(call GENTARGETS,boot,xloader))
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(BR2_BOOT_XLOADER),y)
+# we NEED a board name unless we're at make source
+ifeq ($(filter source,$(MAKECMDGOALS)),)
+ifeq ($(XLOADER_BOARD_NAME),)
+$(error NO x-loader board name set. Check your BR2_BOOT_XLOADER_BOARDNAME setting)
+endif
+endif
+
+endif
-- 
1.7.4.1



More information about the buildroot mailing list