diff options
author | John Crispin <blogic@openwrt.org> | 2013-03-14 18:43:29 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2013-03-14 18:43:29 +0000 |
commit | df96bd15ca6b628bf97ebdfc7ca53395d456495e (patch) | |
tree | 9fa42d380ed811b022ed7ac318cbe6a3f5111b3d /package/platform/lantiq/ltq-vdsl-fw/src/vdsl_fw_install.sh | |
parent | d7a70cefa91cb8b71279b250b943851011508d66 (diff) | |
download | upstream-df96bd15ca6b628bf97ebdfc7ca53395d456495e.tar.gz upstream-df96bd15ca6b628bf97ebdfc7ca53395d456495e.tar.bz2 upstream-df96bd15ca6b628bf97ebdfc7ca53395d456495e.zip |
[lantiq] add vdsl firmware loader/cutter
Signed-off-by: John Crispin <blogic@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36025 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/platform/lantiq/ltq-vdsl-fw/src/vdsl_fw_install.sh')
-rwxr-xr-x | package/platform/lantiq/ltq-vdsl-fw/src/vdsl_fw_install.sh | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/package/platform/lantiq/ltq-vdsl-fw/src/vdsl_fw_install.sh b/package/platform/lantiq/ltq-vdsl-fw/src/vdsl_fw_install.sh new file mode 100755 index 0000000000..4d407567d4 --- /dev/null +++ b/package/platform/lantiq/ltq-vdsl-fw/src/vdsl_fw_install.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +FW="/tmp/Firmware_Speedport_W921V_1.20.000.bin" +URL="http://hilfe.telekom.de/dlp/eki/downloads/Speedport/Speedport%20W%20921V/Firmware_Speedport_W921V_1.20.000.bin" +FW_TAPI="/tmp/vr9_tapi_fw.bin" +FW_DSL="/tmp/vr9_dsl_fw_annex_b.bin" +FW_TGZ="/tmp/vr9_fw.tgz" +MD5_FW="4d812f2c3476dadd738b022c4767c491" +MD5_TAPI="06b6ab3481b8d3eb7e8bf6131f7f6b7f" +MD5_DSL="59dd9dc81195c6854433c691b163f757" + +[ -f /lib/firmware/vdsl.bin] && exit 0 + +[ -z "$1" ] || URL=$1 + +[ -f "${FW}" ] || { + echo "${FW} does not exist. Try to Download it ? (y/N)" + read -n 1 R + echo "" + [ "$R" = "y" ] || { + echo "Please manually download the firmware from ${URL} and copy the file to ${FW}" + exit 1 + } + echo "Download w921v Firmware" + wget "${URL}" -O "${FW}" + [ $? -eq 0 -a -f "${FW}" ] || exit 1 +} + +F=`md5sum -b ${FW} | cut -d" " -f1` +[ "$F" = "${MD5_FW}" ] || { + echo "Failed to verify Firmware MD5" + exit 1 +} + +echo "Unpack and decompress w921v Firmware" +w921v_fw_cutter +[ $? -eq 0 ] || exit 1 + +T=`md5sum -b ${FW_TAPI} | cut -d" " -f1` +D=`md5sum -b ${FW_DSL} | cut -d" " -f1` + +[ "$T" = "${MD5_TAPI}" -a "$D" = "${MD5_DSL}" ] || { + echo "Failed to verify MD5" + exit 1 +} + +cp ${FW_TAPI} ${FW_DSL} /lib/firmware/ +ln -s /lib/firmware/vr9_dsl_fw_annex_b.bin /lib/firmware/vdsl.bin |