summaryrefslogtreecommitdiffstats
path: root/rules/u-boot-tools.make
diff options
context:
space:
mode:
authorAndreas Bießmann <andreas@biessmann.de>2012-01-31 23:49:05 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2012-03-12 11:33:26 +0100
commit56b3484d1c9437e3945ea86228c874309fbaeaae (patch)
tree7918c88cc841258150649af10cfb84a158b47c5a /rules/u-boot-tools.make
parenta144761821089dac6141611ad55320f016f64a5f (diff)
downloadptxdist-56b3484d1c9437e3945ea86228c874309fbaeaae.tar.gz
ptxdist-56b3484d1c9437e3945ea86228c874309fbaeaae.tar.xz
replace umkimage by u-boot sources
This patch removes the forked mkimage u-boot tool and uses the mainline u-boot code to build this tool. Signed-off-by: Andreas Bießmann <andreas@biessmann.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules/u-boot-tools.make')
-rw-r--r--rules/u-boot-tools.make82
1 files changed, 82 insertions, 0 deletions
diff --git a/rules/u-boot-tools.make b/rules/u-boot-tools.make
new file mode 100644
index 000000000..937a49d85
--- /dev/null
+++ b/rules/u-boot-tools.make
@@ -0,0 +1,82 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2012 by Andreas Bießmann <andreas@biessmann.de>
+#
+# 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_U_BOOT_TOOLS) += u-boot-tools
+
+#
+# Paths and names
+#
+U_BOOT_TOOLS_VERSION := 2011.12
+U_BOOT_TOOLS_MD5 := 7f29b9f6da44d6e46e988e7561fd1d5f
+U_BOOT_TOOLS := u-boot-$(U_BOOT_TOOLS_VERSION)
+U_BOOT_TOOLS_SUFFIX := tar.bz2
+U_BOOT_TOOLS_URL := http://ftp.denx.de/pub/u-boot/$(U_BOOT_TOOLS).$(U_BOOT_TOOLS_SUFFIX)
+U_BOOT_TOOLS_SOURCE := $(SRCDIR)/$(U_BOOT_TOOLS).$(U_BOOT_TOOLS_SUFFIX)
+U_BOOT_TOOLS_DIR := $(BUILDDIR)/$(U_BOOT_TOOLS)
+U_BOOT_TOOLS_LICENSE := GPLv2
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+U_BOOT_TOOLS_CONF_TOOL := NO
+U_BOOT_TOOLS_MAKE_OPT := \
+ HOSTCC="$(CROSS_CC)" \
+ HOSTSTRIP="$(CROSS_STRIP)" \
+ tools
+
+ifdef PTXCONF_U_BOOT_TOOLS_TOOL_ENV
+U_BOOT_TOOLS_MAKE_OPT += env
+endif
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/u-boot-tools.install:
+ @$(call targetinfo)
+ install -D $(U_BOOT_TOOLS_DIR)/tools/mkimage \
+ $(U_BOOT_TOOLS_PKGDIR)/usr/bin/mkimage
+ install -D $(U_BOOT_TOOLS_DIR)/tools/env/fw_printenv \
+ $(U_BOOT_TOOLS_PKGDIR)/usr/sbin/fw_printenv
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/u-boot-tools.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, u-boot-tools)
+ @$(call install_fixup, u-boot-tools,PRIORITY,optional)
+ @$(call install_fixup, u-boot-tools,SECTION,base)
+ @$(call install_fixup, u-boot-tools,AUTHOR,\
+ "Andreas Bießmann <andreas@biessmann.de>")
+ @$(call install_fixup, u-boot-tools,DESCRIPTION,missing)
+
+ifdef PTXCONF_U_BOOT_TOOLS_TOOL_MKIMAGE
+ @$(call install_copy, u-boot-tools, 0, 0, 0755, -, /usr/bin/mkimage)
+endif
+
+ifdef PTXCONF_U_BOOT_TOOLS_TOOL_ENV
+ @$(call install_copy, u-boot-tools, 0, 0, 0755, -, /usr/sbin/fw_printenv)
+ @$(call install_link, u-boot-tools, fw_printenv, /usr/sbin/fw_setenv)
+ @$(call install_alternative, u-boot-tools, 0, 0, 0644, /etc/fw_env.config)
+endif
+
+ @$(call install_finish, u-boot-tools)
+
+ @$(call touch)
+
+# vim: syntax=make