summaryrefslogtreecommitdiff
path: root/go_build_u-boot.sh
diff options
context:
space:
mode:
authorJustin Waters <justin.waters@timesys.com>2008-06-16 13:31:33 -0400
committerJustin Waters <justin.waters@timesys.com>2008-06-16 13:31:33 -0400
commit251484cfb845d5d54c652a1801270ede1521ca6d (patch)
treed89611f0f7d9f1cd468c53d2cb122041db75b74a /go_build_u-boot.sh
parentfc0717dc30824a3e0b9115c44787af7483e5aaa7 (diff)
Update to Atmel's 1.7 patch for 1.1.51.1.5-at91-200806161731
This patch came from Atmel. It fixes a number of NAND issues, as well as the 9263 rev B SPI bug. Signed-off-by: Justin Waters <justin.waters@timesys.com>
Diffstat (limited to 'go_build_u-boot.sh')
-rw-r--r--go_build_u-boot.sh46
1 files changed, 46 insertions, 0 deletions
diff --git a/go_build_u-boot.sh b/go_build_u-boot.sh
new file mode 100644
index 0000000000..c9f6da5c28
--- /dev/null
+++ b/go_build_u-boot.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+ALL_AT91_BOARD="at91sam9260ek at91sam9261ek at91sam9263ek at91sam9xeek at91sam9rlek at91sam9g20ek"
+MAKE=/usr/local/bin/make-3.80
+X_COMPILE=/opt/codesourcery/arm-2007q1/bin/arm-none-linux-gnueabi-
+
+#########################################################
+if [ "$2" == "" ]; then
+ echo "syntax go_build_u-boot.sh [board:all] [directory]"
+ exit 0
+fi
+
+mkdir -p $2
+> $2/build.log
+> $2/configure.log
+
+if [ "$1" == "all" ]; then
+ AT91_BOARD=${ALL_AT91_BOARD}
+else
+ AT91_BOARD=$1
+fi
+
+
+for board in ${AT91_BOARD}; do
+ echo -n "building for ${board} :"
+ for media in dataflash nandflash default; do
+ echo -n " ${media}"
+ ${MAKE} CROSS_COMPILE=${X_COMPILE} mrproper >> /dev/null
+ if [ "${media}" == "default" ]; then
+ ${MAKE} CROSS_COMPILE=${X_COMPILE} ${board}_config >> configure.log 2>&1
+ else
+ ${MAKE} CROSS_COMPILE=${X_COMPILE} ${board}_${media}_config >> configure.log 2>&1
+ fi
+ if [ "$?" -ne 0 ]; then
+ echo " error."
+ exit 1
+ fi
+ ${MAKE} CROSS_COMPILE=${X_COMPILE} >> build.log 2>&1
+ if [ "$?" -ne 0 ]; then
+ echo " error."
+ exit 1
+ fi
+ mv -f u-boot.bin $2/u-boot-${board}-${media}.bin
+ done
+ echo "."
+done