diff options
-rw-r--r-- | package/system/mtd/src/Makefile | 1 | ||||
-rw-r--r-- | target/linux/gemini/base-files/etc/uci-defaults/09_fix-checksum | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/package/system/mtd/src/Makefile b/package/system/mtd/src/Makefile index e469e23ef7..e08a824cf8 100644 --- a/package/system/mtd/src/Makefile +++ b/package/system/mtd/src/Makefile @@ -8,6 +8,7 @@ obj.wrg = wrg.o md5.o obj.wrgg = wrgg.o md5.o obj.tpl = tpl_ramips_recoveryflag.o obj.ar71xx = trx.o $(obj.seama) $(obj.wrgg) +obj.gemini = $(obj.wrgg) obj.brcm = trx.o obj.brcm47xx = $(obj.brcm) obj.bcm53xx = $(obj.brcm) $(obj.seama) diff --git a/target/linux/gemini/base-files/etc/uci-defaults/09_fix-checksum b/target/linux/gemini/base-files/etc/uci-defaults/09_fix-checksum new file mode 100644 index 0000000000..5f79d1a65c --- /dev/null +++ b/target/linux/gemini/base-files/etc/uci-defaults/09_fix-checksum @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Copyright (C) 2019 OpenWrt.org +# + +. /lib/functions.sh + +board=$(board_name) + +fixwrgg() { + local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd) + + [ "$kernel_size" ] && mtd -c 0x$kernel_size fixwrgg firmware +} + +case "$board" in +dlink,dir-685) + fixwrgg + ;; +esac |