57e567054362725e2914dff9f382130bbe532485
[openwrt/staging/blocktrron.git] / target / linux / mediatek / filogic / base-files / etc / hotplug.d / firmware / 11-mt76-caldata
1 #!/bin/sh
2
3 [ -e /lib/firmware/$FIRMWARE ] && exit 0
4
5 . /lib/functions/caldata.sh
6
7 board=$(board_name)
8
9 case "$FIRMWARE" in
10 "mediatek/mt7916_eeprom.bin")
11 case "$board" in
12 acer,predator-w6)
13 caldata_extract_mmc "factory" 0xA0000 0x1000
14 ;;
15 esac
16 ;;
17 "mediatek/mt7981_eeprom_mt7976_dbdc.bin")
18 case "$board" in
19 cmcc,rax3000m)
20 case "$(cmdline_get_var root)" in
21 /dev/mmc*)
22 caldata_extract_mmc "factory" 0x0 0x1000
23 ;;
24 esac
25 ;;
26 esac
27 ;;
28 "mediatek/mt7986_eeprom_mt7976.bin")
29 case "$board" in
30 acer,predator-w6)
31 caldata_extract_mmc "factory" 0x0 0x1000
32 ;;
33 esac
34 ;;
35 "mediatek/mt7986_eeprom_mt7976_dbdc.bin")
36 case "$board" in
37 asus,tuf-ax4200)
38 CI_UBIPART="UBI_DEV"
39 caldata_extract_ubi "Factory" 0x0 0x1000
40 ;;
41 esac
42 ;;
43 *)
44 exit 1
45 ;;
46 esac