aboutsummaryrefslogtreecommitdiff
path: root/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata
blob: bd68ef74156921380f0aca4dbcf0e9197aeb2a5e (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
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/sh

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

. /lib/functions/caldata.sh

board=$(board_name)

case "$FIRMWARE" in
"mediatek/mt7915_eeprom.bin")
	case "$board" in
	smartrg,sdg-8622)
		caldata_extract_mmc "factory" 0xa0000 0x1000
		;;
	esac
	;;
"mediatek/mt7916_eeprom.bin")
	case "$board" in
	acer,predator-w6|\
	smartrg,sdg-8632)
		caldata_extract_mmc "factory" 0xa0000 0x1000
		;;
	esac
	;;
"mediatek/mt7981_eeprom_mt7976_dbdc.bin")
	case "$board" in
	cmcc,rax3000m)
		case "$(cmdline_get_var root)" in
		/dev/mmc*)
			caldata_extract_mmc "factory" 0x0 0x1000
			;;
		esac
		;;
	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
		;;
	smartrg,sdg-8612|\
	smartrg,sdg-8614|\
	smartrg,sdg-8622|\
	smartrg,sdg-8632)
		caldata_extract_mmc "factory" 0x0 0x1000
		;;
	esac
	;;
"mediatek/mt7986_eeprom_mt7976.bin")
	case "$board" in
	acer,predator-w6)
		caldata_extract_mmc "factory" 0x0 0x1000
		;;
	esac
	;;
"mediatek/mt7986_eeprom_mt7976_dual.bin")
	case "$board" in
	jdcloud,re-cp-03)
		caldata_extract_mmc "factory" 0x0 0x1000
		;;
	esac
	;;
*)
	exit 1
	;;
esac