summaryrefslogtreecommitdiffstats
path: root/rules/u-boot.make
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-04-10 10:28:18 +0000
committerSascha Hauer <s.hauer@pengutronix.de>2007-04-10 10:28:18 +0000
commitb0115dd9ff120b6104531badb44970f27c2f5d9e (patch)
tree1be0380521cf944082ba6c94e75f39fcf7ae6117 /rules/u-boot.make
parent2de69ad2345d3bc4b1973781af590a94eb2bbb5e (diff)
downloadptxdist-b0115dd9ff120b6104531badb44970f27c2f5d9e.tar.gz
ptxdist-b0115dd9ff120b6104531badb44970f27c2f5d9e.tar.xz
add u-boot support
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@7084 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules/u-boot.make')
-rw-r--r--rules/u-boot.make119
1 files changed, 119 insertions, 0 deletions
diff --git a/rules/u-boot.make b/rules/u-boot.make
new file mode 100644
index 000000000..dd23ec58a
--- /dev/null
+++ b/rules/u-boot.make
@@ -0,0 +1,119 @@
+# -*-makefile-*-
+# $Id: template 6655 2007-01-02 12:55:21Z rsc $
+#
+# Copyright (C) 2007 by Sascha Hauer
+#
+# 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) += u-boot
+
+#
+# Paths and names
+#
+U_BOOT_VERSION := $(call remove_quotes,$(PTXCONF_U_BOOT_VERSION))
+U_BOOT := u-boot-$(U_BOOT_VERSION)
+U_BOOT_SUFFIX := tar.bz2
+U_BOOT_URL := ftp://ftp.denx.de/pub/u-boot//$(U_BOOT).$(U_BOOT_SUFFIX)
+U_BOOT_SOURCE := $(SRCDIR)/$(U_BOOT).$(U_BOOT_SUFFIX)
+U_BOOT_DIR := $(BUILDDIR)/$(U_BOOT)
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+u-boot_get: $(STATEDIR)/u-boot.get
+
+$(STATEDIR)/u-boot.get: $(u-boot_get_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+$(U_BOOT_SOURCE):
+ @$(call targetinfo, $@)
+ @$(call get, U_BOOT)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+u-boot_extract: $(STATEDIR)/u-boot.extract
+
+$(STATEDIR)/u-boot.extract: $(u-boot_extract_deps_default)
+ @$(call targetinfo, $@)
+ @$(call clean, $(U_BOOT_DIR))
+ @$(call extract, U_BOOT)
+ @$(call patchin, U_BOOT)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+u-boot_prepare: $(STATEDIR)/u-boot.prepare
+
+U_BOOT_PATH := PATH=$(CROSS_PATH)
+U_BOOT_ENV := $(CROSS_ENV) CROSS_COMPILE=$(COMPILER_PREFIX)
+
+#
+# autoconf
+#
+U_BOOT_AUTOCONF := $(CROSS_AUTOCONF_USR)
+
+$(STATEDIR)/u-boot.prepare: $(u-boot_prepare_deps_default)
+ @$(call targetinfo, $@)
+ @$(call clean, $(U_BOOT_DIR)/config.cache)
+ cd $(U_BOOT_DIR) && \
+ $(U_BOOT_PATH) $(U_BOOT_ENV) \
+ make $(PTXCONF_U_BOOT_CONFIG)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+u-boot_compile: $(STATEDIR)/u-boot.compile
+
+$(STATEDIR)/u-boot.compile: $(u-boot_compile_deps_default)
+ @$(call targetinfo, $@)
+ cd $(U_BOOT_DIR) && $(U_BOOT_PATH) $(MAKE) $(PARALLELMFLAGS)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+u-boot_install: $(STATEDIR)/u-boot.install
+
+$(STATEDIR)/u-boot.install: $(u-boot_install_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+u-boot_targetinstall: $(STATEDIR)/u-boot.targetinstall
+
+$(STATEDIR)/u-boot.targetinstall: $(u-boot_targetinstall_deps_default)
+ @$(call targetinfo, $@)
+
+ cp $(U_BOOT_DIR)/u-boot.bin $(IMAGEDIR)/u-boot.bin
+
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+u-boot_clean:
+ rm -rf $(STATEDIR)/u-boot.*
+ rm -rf $(IMAGEDIR)/u-boot_*
+ rm -rf $(U_BOOT_DIR)
+
+# vim: syntax=make