[PATCH 5/5] arch/arm: mioa701 improve barebox_update script

Robert Jarzmik robert.jarzmik at free.fr
Tue May 15 17:21:17 EDT 2012


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 at free.fr>
---
 arch/arm/boards/mioa701/env/bin/barebox_update |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boards/mioa701/env/bin/barebox_update b/arch/arm/boards/mioa701/env/bin/barebox_update
index 564549b..b544563 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 at 3649536(msipl)
 addpart /dev/mtdraw0 270336 at 3649536(barebox)
+
+if [ -r /barebox.BIP0 ]; then
+	erase /dev/mtdraw0.barebox
+	cp -v /barebox.BIP0 /dev/mtdraw0.barebox
+fi
-- 
1.7.10




More information about the barebox mailing list