This commit is contained in:
DHDAXCW
2023-11-06 16:08:06 +00:00
parent 329dbee149
commit c47b2d58db
2 changed files with 24 additions and 2 deletions

View File

@@ -12,7 +12,7 @@
compatible = "glinet,gl-mt6000", "mediatek,mt7986a";
aliases {
led-boot = &led_run;
led-boot = &led_run;
led-failsafe = &led_run;
led-running = &led_white;
led-upgrade = &led_run;
@@ -55,7 +55,7 @@
leds {
compatible = "gpio-leds";
led_run: led@0 {
led_run: run {
label = "blue:run";
gpios = <&pio 38 GPIO_ACTIVE_LOW>;
default-state = "on";

View File

@@ -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