uboot-mkimage: add target support
authorPeter Korsgaard <jacmet@sunsite.dk>
Sun, 10 Jul 2011 20:11:09 +0000 (22:11 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sun, 10 Jul 2011 20:11:09 +0000 (22:11 +0200)
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/Config.in
package/uboot-mkimage/Config.in [new file with mode: 0644]
package/uboot-mkimage/uboot-mkimage.mk

index 09aa76abc0dd359a94ffdebf9bac7d53c68a32d1..9a73998df26e46f5d7376aecaedfa4ae7d5604d9 100644 (file)
@@ -206,6 +206,7 @@ source "package/sredird/Config.in"
 source "package/sshfs/Config.in"
 source "package/statserial/Config.in"
 source "package/sysstat/Config.in"
+source "package/uboot-mkimage/Config.in"
 source "package/udev/Config.in"
 source "package/usb_modeswitch/Config.in"
 source "package/usbmount/Config.in"
diff --git a/package/uboot-mkimage/Config.in b/package/uboot-mkimage/Config.in
new file mode 100644 (file)
index 0000000..e1dec53
--- /dev/null
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_UBOOT_MKIMAGE
+       bool "uboot-mkimage"
+       help
+         The mkimage tool from Das U-Boot bootloader, which allows
+         generation of U-Boot images in various formats.
+
+         http://www.denx.de/wiki/U-Boot/WebHome
index b8f2ee5de7dd81f5a846951573a47944a6291e51..d8a8fbbe9c0b7de1a0f159327aa616aa35e84611 100644 (file)
@@ -2,6 +2,19 @@ UBOOT_MKIMAGE_VERSION = 2011.03
 UBOOT_MKIMAGE_SOURCE  = u-boot-$(UBOOT_MKIMAGE_VERSION).tar.bz2
 UBOOT_MKIMAGE_SITE    = ftp://ftp.denx.de/pub/u-boot
 
+define UBOOT_MKIMAGE_BUILD_CMDS
+       $(MAKE) -C $(@D)                        \
+               HOSTCC="$(TARGET_CC)"           \
+               HOSTCFLAGS="$(TARGET_CFLAGS)"   \
+               HOSTLDFLAGS="$(TARGET_LDFLAGS)" \
+               HOSTSTRIP=true                  \
+               tools
+endef
+
+define UBOOT_MKIMAGE_INSTALL_CMDS
+       install -m 0755 -D $(@D)/tools/mkimage $(TARGET_DIR)/usr/bin
+endef
+
 define HOST_UBOOT_MKIMAGE_BUILD_CMDS
        $(MAKE) -C $(@D)                        \
                HOSTCC="$(HOSTCC)"              \
@@ -14,4 +27,5 @@ define HOST_UBOOT_MKIMAGE_INSTALL_CMDS
        install -m 0755 -D $(@D)/tools/mkimage $(HOST_DIR)/usr/bin
 endef
 
+$(eval $(call GENTARGETS,package,uboot-mkimage))
 $(eval $(call GENTARGETS,package,uboot-mkimage,host))