From b30e9fb713818455b0c68ea3a521f6b3de1d9db9 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Fri, 22 May 2015 22:42:15 +0200 Subject: [PATCH] add upgrade-fw script --- fs-add/sbin/upgrade-fw | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 fs-add/sbin/upgrade-fw diff --git a/fs-add/sbin/upgrade-fw b/fs-add/sbin/upgrade-fw new file mode 100755 index 00000000..00624a81 --- /dev/null +++ b/fs-add/sbin/upgrade-fw @@ -0,0 +1,27 @@ +#!/bin/sh + +FILE="$1" +CHECKSTR="Linux-2.6.32.42_stm24_0208-idl4k" + +if test -z "$FILE"; then + echo "Usage: $0 FIRMWARE" + exit 1 +fi + +if ! grep "$CHECKSTR" "$FILE" > /dev/null; then + echo "$FILE does not appear to be the satip-axe firmware!" + exit 1 +fi + +if ! cp "$FILE" /root/new.fw; then + echo "Copy error..." + exit 1 +fi + +if nandwrite -p /dev/mtd3 /root/new.fw; then + echo "Success, type 'reboot' to reboot" +else + echo "FAIL (try again)" +fi + +rm -f /root/new.fw