summaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata
blob: bc1dcb0008c25e227cf91bf25c96eafbf42732fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/sh

[ -e /lib/firmware/$FIRMWARE ] && exit 0

. /lib/functions/caldata.sh

board=$(board_name)

case "$FIRMWARE" in
"mediatek/mt7916_eeprom.bin")
	case "$board" in
	acer,predator-w6)
		caldata_extract_mmc "factory" 0xA0000 0x1000
		;;
	esac
	;;
"mediatek/mt7981_eeprom_mt7976_dbdc.bin")
	case "$board" in
	ubnt,unifi-6-plus)
		caldata_extract_mmc "factory" 0x0 0x1000
		;;
	esac
	;;
"mediatek/mt7986_eeprom_mt7975_dual.bin")
	case "$board" in
	mercusys,mr90x-v1)
		ln -sf /tmp/tp_data/MT7986_EEPROM.bin \
			/lib/firmware/$FIRMWARE
		;;
	esac
	;;
"mediatek/mt7986_eeprom_mt7976.bin")
	case "$board" in
	acer,predator-w6)
		caldata_extract_mmc "factory" 0x0 0x1000
		;;
	esac
	;;
"mediatek/mt7986_eeprom_mt7976_dbdc.bin")
	case "$board" in
	asus,tuf-ax4200)
		CI_UBIPART="UBI_DEV"
		caldata_extract_ubi "Factory" 0x0 0x1000
		;;
	esac
	;;
"mediatek/mt7986_eeprom_mt7976_dual.bin")
	case "$board" in
	glinet,gl-mt6000)
		caldata_extract_mmc "factory" 0x0 0x1000
		;;
	esac
	;;
*)
	exit 1
	;;
esac