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