uboot: Add support for U-Boot SPL
authorNicolas Dechesne <n-dechesne@ti.com>
Sun, 18 Mar 2012 22:04:50 +0000 (23:04 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sat, 5 May 2012 21:48:01 +0000 (23:48 +0200)
SPL is a first stage bootloader. On pandaboard it supercedes x-loader,
and should now be used.

This patch ensures that either SPL or xloader can be selected.

A config variable has been added for the name of the SPL binary generated
during u-boot build. For most platform it is u-boot-spl.bin but not always.
It is MLO on OMAP for example.

Signed-off-by: Nicolas Dechesne <n-dechesne@ti.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tested-by: Frank Hunleth <fhunleth@troodon-software.com>
Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
boot/uboot/Config.in
boot/uboot/uboot.mk

index 99d5623a9919f0587079a621c4c475366ee20bc5..cb4064804832ca706d7c5f47a28cd5c76e5a91eb 100644 (file)
@@ -141,4 +141,22 @@ config BR2_TARGET_UBOOT_ETH1ADDR
 
 endif # BR2_TARGET_UBOOT_NETWORK
 
+config BR2_TARGET_UBOOT_SPL
+       bool "U-Boot SPL support"
+       depends on !BR2_TARGET_XLOADER
+       help
+         Enable the U-Boot SPL support. SPL is a first stage
+         bootloader loaded into internal memory in charge of
+         enabling and configuring the external memory (DDR),
+         and load the u-boot program into DDR.
+
+config BR2_TARGET_UBOOT_SPL_NAME
+       string "U-Boot SPL target name"
+       default "u-boot-spl.bin"
+       depends on BR2_TARGET_UBOOT_SPL
+       help
+         This is the name of the SPL binary, generated during
+         u-boot build. For most platform it is u-boot-spl.bin
+         but not always. It is MLO on OMAP for example.
+
 endif # BR2_TARGET_UBOOT
index db9de8d3cd37d05714fd73a0d8a8116741c3e48c..f64964c006d6e498d5ae3eb5b847de348871aa1d 100644 (file)
@@ -88,6 +88,8 @@ endef
 
 define UBOOT_INSTALL_IMAGES_CMDS
        cp -dpf $(@D)/$(UBOOT_BIN) $(BINARIES_DIR)/
+       $(if $(BR2_TARGET_UBOOT_SPL),
+               cp -dpf $(@D)/$(BR2_TARGET_UBOOT_SPL_NAME) $(BINARIES_DIR)/)
 endef
 
 $(eval $(call GENTARGETS))