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
master
Wolfram Sang 15 years ago
parent 2ddf98f348
commit 788312ae29
  1. 1
      .gitattributes
  2. 9
      board/ipe337/env/bin/_alternate
  3. 1
      board/ipe337/env/bin/magic.bin
  4. 27
      board/ipe337/env/bin/reset_ageing
  5. 8
      board/ipe337/env/bin/update_application
  6. 8
      board/ipe337/env/bin/update_persistent
  7. 14
      board/ipe337/env/bin/update_system
  8. 8
      board/ipe337/env/bin/update_ubootenv

1
.gitattributes vendored

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

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

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

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

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

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

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