summaryrefslogtreecommitdiff
path: root/boot/xloader
diff options
context:
space:
mode:
authorPhilippe Reynes <tremyfr@yahoo.fr>2011-07-11 22:46:13 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2011-07-11 23:41:29 +0200
commit2269dfa356913ab2cff7f6d9cb1cf3b2e69c7175 (patch)
tree312289625fe9369fac292538836ba6dcfdb1b3b2 /boot/xloader
parent29679495b8f247171a741f11c666cbb2ae254cd7 (diff)
Add x-loader bootloader
Signed-off-by: Philippe Reynes <tremyfr@yahoo.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> merge xloader Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'boot/xloader')
-rw-r--r--boot/xloader/Config.in15
-rw-r--r--boot/xloader/xloader.mk37
2 files changed, 52 insertions, 0 deletions
diff --git a/boot/xloader/Config.in b/boot/xloader/Config.in
new file mode 100644
index 000000000..d295b45d8
--- /dev/null
+++ b/boot/xloader/Config.in
@@ -0,0 +1,15 @@
+menuconfig BR2_TARGET_XLOADER
+ bool "X-loader"
+ depends on BR2_cortex_a8 || BR2_cortex_a9
+ help
+ The x-loader bootloader. It is mainly used on OMAP-based
+ platforms.
+
+if BR2_TARGET_XLOADER
+config BR2_TARGET_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/xloader/xloader.mk b/boot/xloader/xloader.mk
new file mode 100644
index 000000000..8d8cce3b9
--- /dev/null
+++ b/boot/xloader/xloader.mk
@@ -0,0 +1,37 @@
+#############################################################
+#
+# x-loader
+#
+#############################################################
+XLOADER_VERSION = 6f3a26101303051e0f91b6213735b68ce804e94e
+XLOADER_SITE = git://gitorious.org/x-loader/x-loader.git
+XLOADER_BOARD_NAME = $(call qstrip,$(BR2_TARGET_XLOADER_BOARDNAME))
+
+XLOADER_INSTALL_IMAGES = YES
+
+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_IMAGES_CMDS
+ $(INSTALL) -D -m 0755 $(@D)/MLO $(BINARIES_DIR)/
+endef
+
+$(eval $(call GENTARGETS,boot,xloader))
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(BR2_TARGET_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