diff options
author | John Crispin <john@openwrt.org> | 2014-10-31 11:00:42 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2014-10-31 11:00:42 +0000 |
commit | 1183af0c48998a73595b92381ce0ba39aec19951 (patch) | |
tree | e75b24f6f4450e8fec3099505bff56a8b5be605b | |
parent | 8f877ff42b88ec798af3237569b33907dada01e8 (diff) | |
download | mtk-20170518-1183af0c48998a73595b92381ce0ba39aec19951.zip mtk-20170518-1183af0c48998a73595b92381ce0ba39aec19951.tar.gz mtk-20170518-1183af0c48998a73595b92381ce0ba39aec19951.tar.bz2 |
lantiq: vr9-vdsl-fw: properly write firmware to flash
Using a redirect to a non-empty mtd partition will not erase the
blocks prior to writing to them resulting in broken dsl_fw.
Fix this by piping to mtd write - /dev/mtdX instead.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
SVN-Revision: 43125
-rwxr-xr-x | package/kernel/lantiq/ltq-vdsl-fw/src/vdsl_fw_install.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/package/kernel/lantiq/ltq-vdsl-fw/src/vdsl_fw_install.sh b/package/kernel/lantiq/ltq-vdsl-fw/src/vdsl_fw_install.sh index 63ed948..858e8f1 100755 --- a/package/kernel/lantiq/ltq-vdsl-fw/src/vdsl_fw_install.sh +++ b/package/kernel/lantiq/ltq-vdsl-fw/src/vdsl_fw_install.sh @@ -49,7 +49,7 @@ D=`md5sum -b ${FW_DSL} | cut -d" " -f1` MTD=$(find_mtd_index dsl_fw) if [ "$MTD" -gt 0 -a -e "/dev/mtd$MTD" ]; then echo "Storing firmware in flash" - tar cvz ${FW_TAPI} ${FW_DSL} > "/dev/mtd$MTD" + tar cvz ${FW_TAPI} ${FW_DSL} | mtd write - "/dev/mtd$MTD" /etc/init.d/dsl_fs boot else cp ${FW_TAPI} ${FW_DSL} /lib/firmware/ |