summaryrefslogtreecommitdiff
path: root/board/boundary/nitrogen6x/6x_upgrade.txt
diff options
context:
space:
mode:
authorEric Nelson <eric.nelson@boundarydevices.com>2013-03-11 08:44:53 +0000
committerStefano Babic <sbabic@denx.de>2013-03-13 09:04:24 +0100
commitd67b0d97b156f9ec2fc4c838d84b1e510d6e49b4 (patch)
treed3d87c2b266c5e1c743abc7e0151d0e00da65c3c /board/boundary/nitrogen6x/6x_upgrade.txt
parent7315e3bf2cc95abf9ae53f43ccbd31c6f638aacd (diff)
downloadu-boot-imx-d67b0d97b156f9ec2fc4c838d84b1e510d6e49b4.zip
u-boot-imx-d67b0d97b156f9ec2fc4c838d84b1e510d6e49b4.tar.gz
u-boot-imx-d67b0d97b156f9ec2fc4c838d84b1e510d6e49b4.tar.bz2
Add Boundary Devices Nitrogen6X boards
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Diffstat (limited to 'board/boundary/nitrogen6x/6x_upgrade.txt')
-rw-r--r--board/boundary/nitrogen6x/6x_upgrade.txt45
1 files changed, 45 insertions, 0 deletions
diff --git a/board/boundary/nitrogen6x/6x_upgrade.txt b/board/boundary/nitrogen6x/6x_upgrade.txt
new file mode 100644
index 0000000..0d8e8e5
--- /dev/null
+++ b/board/boundary/nitrogen6x/6x_upgrade.txt
@@ -0,0 +1,45 @@
+setenv stdout serial,vga
+echo "check U-Boot" ;
+setenv offset 0x400
+if ${fs}load ${dtype} ${disk}:1 12000000 u-boot.imx || ${fs}load ${dtype} ${disk}:1 12000000 u-boot.nopadding ; then
+ echo "read $filesize bytes from SD card" ;
+ if sf probe || sf probe || \
+ sf probe 1 27000000 || sf probe 1 27000000 ; then
+ echo "probed SPI ROM" ;
+ if sf read 0x12400000 $offset $filesize ; then
+ if cmp.b 0x12000000 0x12400000 $filesize ; then
+ echo "------- U-Boot versions match" ;
+ else
+ echo "Need U-Boot upgrade" ;
+ echo "Program in 5 seconds" ;
+ for n in 5 4 3 2 1 ; do
+ echo $n ;
+ sleep 1 ;
+ done
+ echo "erasing" ;
+ sf erase 0 0x50000 ;
+ # two steps to prevent bricking
+ echo "programming" ;
+ sf write 0x12000000 $offset $filesize ;
+ echo "verifying" ;
+ if sf read 0x12400000 $offset $filesize ; then
+ if cmp.b 0x12000000 0x12400000 $filesize ; then
+ while echo "---- U-Boot upgraded. reset" ; do
+ sleep 120
+ done
+ else
+ echo "Read verification error" ;
+ fi
+ else
+ echo "Error re-reading EEPROM" ;
+ fi
+ fi
+ else
+ echo "Error reading boot loader from EEPROM" ;
+ fi
+ else
+ echo "Error initializing EEPROM" ;
+ fi ;
+else
+ echo "No U-Boot image found on SD card" ;
+fi