aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/mt7622/base-files/etc/uci-defaults/09_fix_crc
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/mediatek/mt7622/base-files/etc/uci-defaults/09_fix_crc')
-rw-r--r--target/linux/mediatek/mt7622/base-files/etc/uci-defaults/09_fix_crc10
1 files changed, 10 insertions, 0 deletions
diff --git a/target/linux/mediatek/mt7622/base-files/etc/uci-defaults/09_fix_crc b/target/linux/mediatek/mt7622/base-files/etc/uci-defaults/09_fix_crc
new file mode 100644
index 0000000000..81cb6b18b7
--- /dev/null
+++ b/target/linux/mediatek/mt7622/base-files/etc/uci-defaults/09_fix_crc
@@ -0,0 +1,10 @@
+. /lib/functions.sh
+
+kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"\(kernel\|linux\)".*/\1/p' /proc/mtd)
+
+case "$(board_name)" in
+buffalo,wsr-2533dhp2)
+ mtd -M 0x44485032 ${kernel_size:+-c 0x$kernel_size} fixtrx firmware && exit 0
+ exit 1
+ ;;
+esac