summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemy Bohmer <linux@bohmer.net>2010-06-15 21:34:27 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2010-06-16 23:05:39 +0200
commitc51454543efd9719596f185fd8a4883d93ee4efe (patch)
tree76969ad25c1d0b67d997ee4620967bdf1566819e
parentbd75f3d01f36f6093a60644b42bcba855789afa1 (diff)
downloadptxdist-c51454543efd9719596f185fd8a4883d93ee4efe.tar.gz
ptxdist-c51454543efd9719596f185fd8a4883d93ee4efe.tar.xz
[umkimage] Build mkimage tool for target
Signed-off-by: Remy Bohmer <linux@bohmer.net> [mkl: tweaked patch] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r--patches/u-boot-mkimage-2010.03-1/b050c72d52c4e30d5b978ab6758f8dcdbe5c690c-compiler.h-add-uint-typedef.patch26
-rw-r--r--patches/u-boot-mkimage-2010.03-1/series1
-rw-r--r--rules/umkimage.in8
-rw-r--r--rules/umkimage.make68
4 files changed, 103 insertions, 0 deletions
diff --git a/patches/u-boot-mkimage-2010.03-1/b050c72d52c4e30d5b978ab6758f8dcdbe5c690c-compiler.h-add-uint-typedef.patch b/patches/u-boot-mkimage-2010.03-1/b050c72d52c4e30d5b978ab6758f8dcdbe5c690c-compiler.h-add-uint-typedef.patch
new file mode 100644
index 000000000..f20a663a2
--- /dev/null
+++ b/patches/u-boot-mkimage-2010.03-1/b050c72d52c4e30d5b978ab6758f8dcdbe5c690c-compiler.h-add-uint-typedef.patch
@@ -0,0 +1,26 @@
+commit b050c72d52c4e30d5b978ab6758f8dcdbe5c690c
+Author: Mike Frysinger <vapier@gentoo.org>
+Date: Tue Apr 20 05:49:30 2010 -0400
+
+ compiler.h: add uint typedef
+
+ Recent crc changes started using the "uint" type in headers that are used
+ on the build system. This subsequently broke mingw targets as they do not
+ provide such a type. So add this basic typedef to compiler.h so that we
+ do not have to worry about this breaking again in the future.
+
+ Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+ Signed-off-by: Remy Bohmer <linux@bohmer.net>
+
+diff --git a/include/compiler.h b/include/compiler.h
+index 332618e..8030bf6 100644
+--- a/include/compiler.h
++++ b/include/compiler.h
+@@ -55,6 +55,7 @@ typedef unsigned int uint;
+ typedef uint8_t __u8;
+ typedef uint16_t __u16;
+ typedef uint32_t __u32;
++typedef unsigned int uint;
+
+ #define uswap_16(x) \
+ ((((x) & 0xff00) >> 8) | \
diff --git a/patches/u-boot-mkimage-2010.03-1/series b/patches/u-boot-mkimage-2010.03-1/series
new file mode 100644
index 000000000..dbf4bb443
--- /dev/null
+++ b/patches/u-boot-mkimage-2010.03-1/series
@@ -0,0 +1 @@
+b050c72d52c4e30d5b978ab6758f8dcdbe5c690c-compiler.h-add-uint-typedef.patch
diff --git a/rules/umkimage.in b/rules/umkimage.in
new file mode 100644
index 000000000..ffff541ba
--- /dev/null
+++ b/rules/umkimage.in
@@ -0,0 +1,8 @@
+## SECTION=shell_and_console
+
+config UMKIMAGE
+ tristate
+ prompt "umkimage"
+ help
+ umkimage is the U-Boot mkimage command. It is used to create
+ boot images for the U-Boot bootloader.
diff --git a/rules/umkimage.make b/rules/umkimage.make
new file mode 100644
index 000000000..b28751e21
--- /dev/null
+++ b/rules/umkimage.make
@@ -0,0 +1,68 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2010 by Remy Bohmer <linux@bohmer.net>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_UMKIMAGE) += umkimage
+
+#
+# Paths and names
+#
+UMKIMAGE_VERSION := 2010.03-1
+UMKIMAGE := u-boot-mkimage-$(UMKIMAGE_VERSION)
+UMKIMAGE_SUFFIX := tar.gz
+UMKIMAGE_URL := http://www.pengutronix.de/software/ptxdist/temporary-src/$(UMKIMAGE).$(UMKIMAGE_SUFFIX)
+UMKIMAGE_SOURCE := $(SRCDIR)/$(UMKIMAGE).$(UMKIMAGE_SUFFIX)
+UMKIMAGE_DIR := $(BUILDDIR)/$(UMKIMAGE)
+UMKIMAGE_LICENSE := GPLv2
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+$(UMKIMAGE_SOURCE):
+ @$(call targetinfo)
+ @$(call get, UMKIMAGE)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+UMKIMAGE_CONF_TOOL := NO
+UMKIMAGE_MAKE_OPT := \
+ $(CROSS_ENV_CFLAGS) \
+ $(CROSS_ENV_CPPFLAGS) \
+ $(CROSS_ENV_LDFLAGS) \
+ $(CROSS_ENV_CC)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/umkimage.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, umkimage)
+ @$(call install_fixup, umkimage,PACKAGE,umkimage)
+ @$(call install_fixup, umkimage,PRIORITY,optional)
+ @$(call install_fixup, umkimage,VERSION,$(UMKIMAGE_VERSION))
+ @$(call install_fixup, umkimage,SECTION,base)
+ @$(call install_fixup, umkimage,AUTHOR,"Remy Bohmer <linux@bohmer.net>")
+ @$(call install_fixup, umkimage,DEPENDS,)
+ @$(call install_fixup, umkimage,DESCRIPTION,missing)
+
+ @$(call install_copy, umkimage, 0, 0, 0755, -, /usr/bin/mkimage)
+
+ @$(call install_finish, umkimage)
+
+ @$(call touch)
+
+# vim: syntax=make