Przeglądaj źródła

extract and fixup the board.bin on the archer

Signed-off-by: Imre Kaloz <[email protected]>

SVN-Revision: 41757
Imre Kaloz 11 lat temu
rodzic
commit
7e2c4d5732

+ 13 - 0
target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin

@@ -1,5 +1,6 @@
 #!/bin/sh
 #!/bin/sh
 
 
+. /lib/functions/system.sh
 . /lib/ar71xx.sh
 . /lib/ar71xx.sh
 
 
 do_load_ath10k_board_bin() {
 do_load_ath10k_board_bin() {
@@ -10,6 +11,18 @@ do_load_ath10k_board_bin() {
 				bs=1 skip=20480 count=2116 \
 				bs=1 skip=20480 count=2116 \
 				of=/tmp/ath10k-board.bin
 				of=/tmp/ath10k-board.bin
 		;;
 		;;
+		archer-c7)
+			local mac
+			mac=$(macaddr_add $(cat /sys/class/net/eth1/address) -2)
+
+			dd if=/dev/mtdblock4 \
+				bs=1 skip=20480 count=6 \
+				of=/tmp/ath10k-board.bin
+			macaddr_2bin $mac >> /tmp/ath10k-board.bin
+			dd if=/dev/mtdblock4 \
+				bs=1 skip=20492 count=2104 >> /tmp/ath10k-board.bin
+
+		;;
 	esac
 	esac
 	[ -f /tmp/ath10k-board.bin ] || {
 	[ -f /tmp/ath10k-board.bin ] || {
 		return
 		return