summaryrefslogtreecommitdiffstats
path: root/arch/blackfin/boards/ipe337/env/bin/reset_ageing
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/boards/ipe337/env/bin/reset_ageing')
-rw-r--r--arch/blackfin/boards/ipe337/env/bin/reset_ageing27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/blackfin/boards/ipe337/env/bin/reset_ageing b/arch/blackfin/boards/ipe337/env/bin/reset_ageing
new file mode 100644
index 0000000000..2c95ae762e
--- /dev/null
+++ b/arch/blackfin/boards/ipe337/env/bin/reset_ageing
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+. /env/config
+
+image=/env/bin/magic.bin
+part=$ageing
+
+if [ \! -e "$part" ]; then
+ echo "Partition $part does not exist"
+ exit 1
+fi
+
+unprotect $part
+
+echo
+echo "Erasing partition $part"
+erase $part
+
+echo
+echo "Creating magic"
+cp $image $part
+
+echo
+echo "Testing partition"
+. /env/bin/_alternate
+
+protect $part