[OpenWrt-Devel] [PATCH] vr9-vdsl-fw: properly write firmware to flash
Daniel Golle
daniel at makrotopia.org
Thu Oct 30 22:28:49 EDT 2014
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 at makrotopia.org>
---
package/kernel/lantiq/ltq-vdsl-fw/src/vdsl_fw_install.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 e7baddf..8f0ddd5 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/
--
2.1.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list