summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Jarzmik <robert.jarzmik@free.fr>2012-05-15 23:21:17 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-05-16 19:22:01 +0200
commit9115339720c3df3c9b40dae7adbef137362efcc0 (patch)
treee07bc27a0f682723fd3a5dce45a8bcc6d36cdbda
parentf3e7c115ba206b8562d12b2c9951a439477464b5 (diff)
downloadbarebox-9115339720c3df3c9b40dae7adbef137362efcc0.tar.gz
barebox-9115339720c3df3c9b40dae7adbef137362efcc0.tar.xz
arch/arm: mioa701 improve barebox_update script
Add a check to verify if /barebox.BIP0 exists, and if so, unlock the protection area, flash barebox, and reprotect the area. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/boards/mioa701/env/bin/barebox_update5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/boards/mioa701/env/bin/barebox_update b/arch/arm/boards/mioa701/env/bin/barebox_update
index 564549bb75..b544563bef 100644
--- a/arch/arm/boards/mioa701/env/bin/barebox_update
+++ b/arch/arm/boards/mioa701/env/bin/barebox_update
@@ -3,3 +3,8 @@
# Page+OOB specific partitions
addpart /dev/mtdraw0 1081344@3649536(msipl)
addpart /dev/mtdraw0 270336@3649536(barebox)
+
+if [ -r /barebox.BIP0 ]; then
+ erase /dev/mtdraw0.barebox
+ cp -v /barebox.BIP0 /dev/mtdraw0.barebox
+fi