-
Notifications
You must be signed in to change notification settings - Fork 19.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e5b2e9
commit f852316
Showing
2 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
target/linux/mediatek/filogic/base-files/lib/preinit/81_fix_eeprom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
. /lib/functions/caldata.sh | ||
|
||
preinit_fix_eeprom() { | ||
case $(board_name) in | ||
glinet,gl-mt6000) | ||
mmc_part=$(find_mmc_part factory) | ||
FIRMWARE="mediatek/mt7986_eeprom_mt7976_dual.bin" | ||
[ ! -e /lib/firmware/"$FIRMWARE" ] && \ | ||
export FIRMWARE="$FIRMWARE" && \ | ||
caldata_extract_mmc "factory" 0x0 0x1000 | ||
;; | ||
mercusys,mr90x-v1) | ||
eeprom="/lib/firmware/mediatek/mt7986_eeprom_mt7975_dual.bin" | ||
[ ! -e $eeprom ] && \ | ||
ln -sf /tmp/tp_data/MT7986_EEPROM.bin $eeprom | ||
;; | ||
*) | ||
;; | ||
esac | ||
} | ||
|
||
boot_hook_add preinit_main preinit_fix_eeprom |