u-boot: add Marvell u-boot.kwb support
authorPeter Korsgaard <jacmet@sunsite.dk>
Mon, 26 Jul 2010 14:14:41 +0000 (16:14 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 26 Jul 2010 14:14:41 +0000 (16:14 +0200)
Marvell boards like the sheevaplug needs a special .kwb image format,
so add an option for it similar to how we handle zImage/uImage/..
for the kernel.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
boot/u-boot/Config.in
boot/u-boot/u-boot.mk

index d445145ebd3e17c50ae5686ab1dfdf03e3bdaf07..ce79a8a5cdcfe515e9c14dea0b1aaafbff7876ea 100644 (file)
@@ -57,6 +57,18 @@ config BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR
 
          Most users may leave this empty
 
+choice
+       prompt "U-Boot binary format"
+
+config BR2_TARGET_UBOOT_FORMAT_BIN
+       bool "u-boot.bin"
+
+config BR2_TARGET_UBOOT_FORMAT_KWB
+       depends on BR2_arm
+       bool "u-boot.kwb (Marvell)"
+
+endchoice
+
 config BR2_TARGET_UBOOT_TOOL_MKIMAGE
        bool "mkimage tool in target"
        help
index c21166fe7f6a1081cc50d86dba2073a3c9df4fdc..60a4676dc54ac049f66c856138ee2c9a41b4af5a 100644 (file)
@@ -27,7 +27,13 @@ endif
 
 U_BOOT_DIR:=$(BUILD_DIR)/u-boot-$(U_BOOT_VERSION)
 U_BOOT_CAT:=$(BZCAT)
+
+ifeq ($(BR2_TARGET_UBOOT_FORMAT_KWB),y)
+U_BOOT_BIN:=u-boot.kwb
+U_BOOT_MAKE_OPT:=$(U_BOOT_BIN)
+else
 U_BOOT_BIN:=u-boot.bin
+endif
 
 MKIMAGE:=$(HOST_DIR)/usr/bin/mkimage
 
@@ -124,7 +130,7 @@ $(U_BOOT_DIR)/$(U_BOOT_BIN): $(U_BOOT_DIR)/.header_modified
                LDFLAGS="$(TARGET_LDFLAGS)" \
                $(U_BOOT_CONFIGURE_OPTS) \
                $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" ARCH=$(U_BOOT_ARCH) \
-                -C $(U_BOOT_DIR)
+               $(U_BOOT_MAKE_OPT) -C $(U_BOOT_DIR)
 
 # Copy the result to the images/ directory
 $(BINARIES_DIR)/$(U_BOOT_BIN): $(U_BOOT_DIR)/$(U_BOOT_BIN)