9
0
Fork 0

add alternating mechanism and flash scripts for ipe337

- add scripts to flash kernel & environment from U-Boot
 - add mechanism to check which of the two kernels to boot
 - add script to initialize the ageing partition
 - cosmetic changes to the init-scripts
This commit is contained in:
Wolfram Sang 2008-02-15 11:38:31 +01:00
parent 2ddf98f348
commit 788312ae29
8 changed files with 76 additions and 0 deletions

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
*.bin -crlf -diff -merge

9
board/ipe337/env/bin/_alternate vendored Normal file
View File

@ -0,0 +1,9 @@
#!/bin/sh
. /env/config
alternate $ageing
if [ $? -lt 2 ]; then
echo "Error when accesing ageing-partition!"
exit 1
fi

1
board/ipe337/env/bin/magic.bin vendored Normal file
View File

@ -0,0 +1 @@
(i

27
board/ipe337/env/bin/reset_ageing vendored Normal file
View File

@ -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

View File

@ -0,0 +1,8 @@
#!/bin/sh
. /env/config
image=$appimage
part=/dev/nor0.application
. /env/bin/_update $1

View File

@ -0,0 +1,8 @@
#!/bin/sh
. /env/config
image=$perimage
part=/dev/nor0.persistent
. /env/bin/_update $1

14
board/ipe337/env/bin/update_system vendored Normal file
View File

@ -0,0 +1,14 @@
#!/bin/sh
. /env/config
image=$jffs2
alternate $ageing
if [ $? = 2 ]; then
part=/dev/nor0.system0
else
part=/dev/nor0.system1
fi
. /env/bin/_update $1

8
board/ipe337/env/bin/update_ubootenv vendored Normal file
View File

@ -0,0 +1,8 @@
#!/bin/sh
. /env/config
image=$envimage
part=/dev/nor0.ubootenv
. /env/bin/_update $1