summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2011-10-04 12:59:47 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2011-10-04 13:00:59 +0200
commita913b284c6ce4eb71a4402039dc317079f60fb99 (patch)
treee60c26457c9a9599510d5319ed37cd0705f119ff
parent95ad6607ffbb3a6b4a49b7bc354ed7854b229bc2 (diff)
downloadptxdist-a913b284c6ce4eb71a4402039dc317079f60fb99.tar.gz
ptxdist-a913b284c6ce4eb71a4402039dc317079f60fb99.tar.xz
at91bootstrap2: new packageptxdist-2011.10.0
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--platforms/at91bootstrap2.in56
-rw-r--r--rules/at91bootstrap2.make102
2 files changed, 158 insertions, 0 deletions
diff --git a/platforms/at91bootstrap2.in b/platforms/at91bootstrap2.in
new file mode 100644
index 000000000..ebaf3497f
--- /dev/null
+++ b/platforms/at91bootstrap2.in
@@ -0,0 +1,56 @@
+## SECTION=bootloader
+
+menuconfig AT91BOOTSTRAP2
+ tristate
+ prompt "AT91 bootstrap 2.x "
+ help
+ Note: this is for AT91 bootstrap version 2.x
+
+ The AT91Bootstrap application is a first level bootloader
+ for Atmel AT91SAM9 ARM Thumb-based microcontrollers.
+ It is used for booting these microcontrollers from SPI dataflash
+ or NAND-flash.
+
+ For example, using this bootstrap, it is possible to
+ obtain a basic bootloader that is located in DataFlash and is
+ copied to internal SRAM by SAM-BA Boot (internal bootROM). The
+ bootloader performs the processor initialization (PLLs, PIOs,
+ SDRAMC, SPI), loads UBoot from DataFlash sectors to SDRAM and
+ then jumps to it.
+
+ It is required for these microcontrollers, because the bootROM of some
+ of these cores can only handle a miximum of 4kB of the 1st stage
+ bootloader (e.g. SRAM limits). U-boot is usually much larger
+ than this.
+
+ U-boot is normally build with the options CONFIG_SKIP_LOWLEVEL_INIT
+ and CONFIG_SKIP_RELOCATE_UBOOT
+
+ AT91Bootstrap integrates several sets of algorithms:
+ - Device initialization such as clock speed configuration, PIO settings, etc.
+ - Peripheral drivers such as PIO, PMC, SDRAMC, etc.
+ - Physical media algorithms such as DataFlash, NANDFlash, Parallel Flash, etc.
+
+if AT91BOOTSTRAP2
+
+config AT91BOOTSTRAP2_VERSION
+ string
+ default "2.13"
+ prompt "AT91 Bootstrap version"
+ help
+ Enter the AT91 Bootstrap version you want to build. Usally something like "1.11"
+
+config AT91BOOTSTRAP2_MD5
+ prompt "AT91 Bootstrap source md5sum"
+ string
+
+config AT91BOOTSTRAP2_CONFIG
+ prompt "config file"
+ string
+ default "at91bootstrap.config"
+ help
+ This entry specifies the .config file used to compile
+ at91bootstrap.
+
+endif
+
diff --git a/rules/at91bootstrap2.make b/rules/at91bootstrap2.make
new file mode 100644
index 000000000..4f1aef36e
--- /dev/null
+++ b/rules/at91bootstrap2.make
@@ -0,0 +1,102 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2011 by Michael Olbrich <m.olbrich@pengutronix.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_AT91BOOTSTRAP2) += at91bootstrap2
+
+#
+# Paths and names
+#
+AT91BOOTSTRAP2_VERSION := $(call remove_quotes, $(PTXCONF_AT91BOOTSTRAP2_VERSION))
+AT91BOOTSTRAP2_MD5 := $(call remove_quotes, $(PTXCONF_AT91BOOTSTRAP2_MD5))
+AT91BOOTSTRAP2 := at91bootstrap-$(AT91BOOTSTRAP2_VERSION)
+AT91BOOTSTRAP2_SUFFIX := tar.bz2
+AT91BOOTSTRAP2_URL := ftp://www.at91.com/pub/buildroot/$(AT91BOOTSTRAP2).$(AT91BOOTSTRAP2_SUFFIX)
+AT91BOOTSTRAP2_SOURCE := $(SRCDIR)/$(AT91BOOTSTRAP2).$(AT91BOOTSTRAP2_SUFFIX)
+AT91BOOTSTRAP2_DIR := $(BUILDDIR)/$(AT91BOOTSTRAP2)
+AT91BOOTSTRAP2_CONFIG := $(call remove_quotes, $(PTXDIST_PLATFORMCONFIGDIR)/$(PTXCONF_AT91BOOTSTRAP2_CONFIG))
+AT91BOOTSTRAP2_LICENSE := unknown
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+AT91BOOTSTRAP2_PATH := PATH=$(CROSS_PATH)
+AT91BOOTSTRAP2_MAKEVARS := \
+ HOSTCC=$(HOSTCC) \
+ ARCH=$(PTXCONF_BAREBOX_ARCH_STRING) \
+ CROSS_COMPILE=$(COMPILER_PREFIX)
+
+ifdef PTXCONF_AT91BOOTSTRAP2
+$(AT91BOOTSTRAP2_CONFIG):
+ @echo
+ @echo "************************************************************************************"
+ @echo "* Please generate a at91bootstrap config with 'ptxdist menuconfig 'at91bootstrap2' *"
+ @echo "************************************************************************************"
+ @echo
+ @echo
+ @exit 1
+endif
+
+$(STATEDIR)/at91bootstrap2.prepare: $(AT91BOOTSTRAP2_CONFIG)
+ @$(call targetinfo)
+
+ @echo "Using at91bootstrap config file: $(AT91BOOTSTRAP2_CONFIG)"
+ @install -m 644 $(AT91BOOTSTRAP2_CONFIG) $(AT91BOOTSTRAP2_DIR)/.config
+ @$(call ptx/oldconfig, AT91BOOTSTRAP2)
+
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/at91bootstrap2.install:
+ @$(call targetinfo)
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/at91bootstrap2.targetinstall:
+ @$(call targetinfo)
+ install -m644 $(AT91BOOTSTRAP2_DIR)/binaries/*boot-$(AT91BOOTSTRAP2_VERSION).bin \
+ $(IMAGEDIR)/at91bootstrap.bin
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/at91bootstrap2.clean:
+ @$(call targetinfo)
+ @$(call clean_pkg, AT91BOOTSTRAP2)
+ @rm -rf $(IMAGEDIR)/at91bootstrap.bin
+
+# ----------------------------------------------------------------------------
+# oldconfig / menuconfig
+# ----------------------------------------------------------------------------
+
+at91bootstrap2_oldconfig at91bootstrap2_menuconfig: $(STATEDIR)/at91bootstrap2.extract
+ @if test -e $(AT91BOOTSTRAP2_CONFIG); then \
+ cp $(AT91BOOTSTRAP2_CONFIG) $(AT91BOOTSTRAP2_DIR)/.config; \
+ fi
+ cd $(AT91BOOTSTRAP2_DIR) && \
+ $(AT91BOOTSTRAP2_PATH) $(AT91BOOTSTRAP2_ENV) $(MAKE) $(AT91BOOTSTRAP2_MAKEVARS) $(subst at91bootstrap2_,,$@)
+ @if cmp -s $(AT91BOOTSTRAP2_DIR)/.config $(AT91BOOTSTRAP2_CONFIG); then \
+ echo "at91bootstrap configuration unchanged"; \
+ else \
+ cp $(AT91BOOTSTRAP2_DIR)/.config $(AT91BOOTSTRAP2_CONFIG); \
+ fi
+
+# vim: syntax=make