diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2011-03-17 13:44:49 +0100 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2011-03-22 10:55:06 +0100 |
commit | 5572500e93aa732de9cf2fea88bd3413043dbe96 (patch) | |
tree | fe3c7c5a3a9a0b295adc1a81a9a85b9abb8ade68 | |
parent | d9516adf38b4185bc6e9cfaf83f387c581b96ccc (diff) | |
download | ptxdist-5572500e93aa732de9cf2fea88bd3413043dbe96.tar.gz ptxdist-5572500e93aa732de9cf2fea88bd3413043dbe96.tar.xz |
at91bootstrap: bump version to 1.16
...and fix problem with image size of not using the atmel tools to
flash the bootstrap.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r-- | patches/Bootstrap-v1.16/0001-crt0_gnu.S-fix-image-size.patch | 51 | ||||
-rw-r--r-- | patches/Bootstrap-v1.16/series | 1 | ||||
-rw-r--r-- | platforms/at91bootstrap.in | 2 | ||||
-rw-r--r-- | rules/at91bootstrap.make | 13 |
4 files changed, 55 insertions, 12 deletions
diff --git a/patches/Bootstrap-v1.16/0001-crt0_gnu.S-fix-image-size.patch b/patches/Bootstrap-v1.16/0001-crt0_gnu.S-fix-image-size.patch new file mode 100644 index 000000000..b2a4b5e73 --- /dev/null +++ b/patches/Bootstrap-v1.16/0001-crt0_gnu.S-fix-image-size.patch @@ -0,0 +1,51 @@ +From ed5f0b461a5652c7852f1fd7846be7b4814237de Mon Sep 17 00:00:00 2001 +From: Marc Kleine-Budde <mkl@pengutronix.de> +Date: Thu, 17 Feb 2011 15:21:09 +0100 +Subject: [PATCH] crt0_gnu.S: fix image size + +This patch fixes the calculation of the image size which is located +at offset 0x14. Without the patch the end address of the linked image +is written. + +On the at91sam9m10ekes the bootstrap is linked to 0x300000, so the image +size is ~3 MiB. When written to NAND the boot rom code doesn't recognize +the NAND as a valid boot medium, because the size is bigger than 60KiB. +This is the maximum Image size on that processor. See chapter 11.4.2 of +the SAM9M10 Preliminary. + +This patch applies to Bootstrap-v1.16. + +Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> +--- + crt0_gnu.S | 2 +- + elf32-littlearm.lds | 1 + + 2 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/crt0_gnu.S b/crt0_gnu.S +index 042b617..638b32b 100644 +--- a/crt0_gnu.S ++++ b/crt0_gnu.S +@@ -56,7 +56,7 @@ _exception_vectors: + b swi_vector /* Software Interrupt */ + b pabt_vector /* Prefetch Abort */ + b dabt_vector /* Data Abort */ +-.word _edata /* Size of the image for SAM-BA */ ++.word _image_len /* Size of the image for SAM-BA */ + b irq_vector /* IRQ : read the AIC */ + b fiq_vector /* FIQ */ + +diff --git a/elf32-littlearm.lds b/elf32-littlearm.lds +index a33952f..bf02b93 100644 +--- a/elf32-littlearm.lds ++++ b/elf32-littlearm.lds +@@ -19,6 +19,7 @@ SECTIONS + *(.vectors) + *(.data) + _edata = .; ++ _image_len = _edata - _stext; + } + + /* collect all uninitialized .bss sections */ +-- +1.7.2.3 + diff --git a/patches/Bootstrap-v1.16/series b/patches/Bootstrap-v1.16/series new file mode 100644 index 000000000..3355399ec --- /dev/null +++ b/patches/Bootstrap-v1.16/series @@ -0,0 +1 @@ +0001-crt0_gnu.S-fix-image-size.patch diff --git a/platforms/at91bootstrap.in b/platforms/at91bootstrap.in index 6794897a5..dbd870bfa 100644 --- a/platforms/at91bootstrap.in +++ b/platforms/at91bootstrap.in @@ -35,7 +35,7 @@ if AT91BOOTSTRAP config AT91BOOTSTRAP_VERSION string - default 1.11 + default 1.16 prompt "AT91 Bootstrap version" help Enter the AT91 Bootstrap version you want to build. Usally something like "1.11" diff --git a/rules/at91bootstrap.make b/rules/at91bootstrap.make index eabbe224f..3bd4ef6d5 100644 --- a/rules/at91bootstrap.make +++ b/rules/at91bootstrap.make @@ -26,18 +26,9 @@ AT91BOOTSTRAP_SOURCE := $(SRCDIR)/$(AT91BOOTSTRAP_TARBALL) AT91BOOTSTRAP_DIR := $(BUILDDIR)/$(AT91BOOTSTRAP) # ---------------------------------------------------------------------------- -# Get -# ---------------------------------------------------------------------------- - -$(AT91BOOTSTRAP_SOURCE): - @$(call targetinfo) - @$(call get, AT91BOOTSTRAP) - -# ---------------------------------------------------------------------------- # Compile # ---------------------------------------------------------------------------- -AT91BOOTSTRAP_PATH := PATH=$(CROSS_PATH) AT91BOOTSTRAP_ENV := CROSS_COMPILE=$(COMPILER_PREFIX) AT91BOOTSTRAP_BOOTMEDIA-$(PTXCONF_AT91BOOTSTRAP_BOOT_DATAFLASH) += dataflash @@ -67,7 +58,7 @@ $(STATEDIR)/at91bootstrap.install: $(STATEDIR)/at91bootstrap.targetinstall: @$(call targetinfo) - @cp $(AT91BOOTSTRAP_BOARDDIR)/$(AT91BOOTSTRAP_BOOTMEDIA-y)_${PTXCONF_AT91BOOTSTRAP_CONFIG}.bin \ + @install -m644 $(AT91BOOTSTRAP_BOARDDIR)/$(AT91BOOTSTRAP_BOOTMEDIA-y)_${PTXCONF_AT91BOOTSTRAP_CONFIG}.bin \ $(IMAGEDIR)/at91bootstrap.bin @$(call touch) @@ -78,6 +69,6 @@ $(STATEDIR)/at91bootstrap.targetinstall: $(STATEDIR)/at91bootstrap.clean: @$(call targetinfo) @$(call clean_pkg, AT91BOOTSTRAP) - @rm -rf $(IMAGEDIR)/at91bootstrap_* + @rm -rf $(IMAGEDIR)/at91bootstrap* # vim: syntax=make |