mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-18 17:33:31 +00:00
fix sbr-ac1750 MAC address and 5G
This commit is contained in:
parent
ad77be28b8
commit
83bafa8ab0
@ -85,7 +85,7 @@ case "$FIRMWARE" in
|
||||
;;
|
||||
sbr-ac1750)
|
||||
ath9k_eeprom_extract "art" 4096 2048
|
||||
ath9k_patch_firmware_mac$(mtd_get_mac_binary art 0)
|
||||
ath9k_patch_firmware_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +1)
|
||||
;;
|
||||
mr18)
|
||||
. /lib/upgrade/nand.sh
|
||||
|
@ -136,7 +136,7 @@ case "$FIRMWARE" in
|
||||
;;
|
||||
sbr-ac1750)
|
||||
ath10kcal_extract "art" 20480 2116
|
||||
ath10kcal_patch_mac $(mtd_get_mac_binary art 18)
|
||||
ath10kcal_patch_mac_crc $(macaddr_add $(cat /sys/class/net/eth1/address) +1)
|
||||
;;
|
||||
epg5000|\
|
||||
esr1750)
|
||||
|
@ -58,6 +58,12 @@ preinit_set_mac_address() {
|
||||
wrt160nl)
|
||||
fetch_mac_from_mtd nvram lan_hwaddr wan_hwaddr
|
||||
;;
|
||||
sbr-ac1750)
|
||||
mac_lan=$(mtd_get_mac_binary ft 0)
|
||||
[ -n "$mac_lan" ] && ifconfig eth1 hw ether "$mac_lan"
|
||||
mac_wan=$(mtd_get_mac_binary ft 4)
|
||||
[ -n "$mac_wan" ] && ifconfig eth0 hw ether "$mac_wan"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,6 @@
|
||||
|
||||
#define SBR_AC1750_EXT_WDT_TIMEOUT_MS 200
|
||||
#define SBR_AC1750_GPIO_EXT_WDT 18
|
||||
#define SBR_AC1750_HANG_UP 9
|
||||
|
||||
static struct timer_list gpio_wdt_timer;
|
||||
|
||||
@ -128,10 +127,10 @@ static struct ar8327_pad_cfg sbr_ac1750_qca8337_pad0_cfg = {
|
||||
};
|
||||
|
||||
static struct ar8327_led_cfg sbr_ac1750_ar8327_led_cfg = {
|
||||
.led_ctrl0 = 0xcc35cc35,
|
||||
.led_ctrl1 = 0xca35ca35,
|
||||
.led_ctrl2 = 0xc935c935,
|
||||
.led_ctrl3 = 0x3ffff00,
|
||||
.led_ctrl0 = 0x0000cc35,
|
||||
.led_ctrl1 = 0x0000ca35,
|
||||
.led_ctrl2 = 0x0000c935,
|
||||
.led_ctrl3 = 0x03ffff00,
|
||||
.open_drain = true,
|
||||
};
|
||||
|
||||
@ -179,28 +178,23 @@ static void gpio_wdt_toggle(unsigned long gpio)
|
||||
jiffies + msecs_to_jiffies(SBR_AC1750_EXT_WDT_TIMEOUT_MS));
|
||||
}
|
||||
|
||||
static void __init_watchdog(int gpio_wdt){
|
||||
static void init_sbr_ac1750_wdt(int gpio_wdt){
|
||||
|
||||
if (gpio_wdt >= 0) {
|
||||
gpio_request_one(gpio_wdt, GPIOF_OUT_INIT_HIGH, "watchdog");
|
||||
gpio_set_value(gpio_wdt, 0);
|
||||
ndelay(1000);
|
||||
gpio_set_value(gpio_wdt, 1);
|
||||
setup_timer(&gpio_wdt_timer, gpio_wdt_toggle, gpio_wdt);
|
||||
gpio_wdt_toggle(gpio_wdt);
|
||||
}
|
||||
}
|
||||
|
||||
static void exit_watchdog(void){
|
||||
|
||||
gpio_request_one(SBR_AC1750_GPIO_EXT_WDT, GPIOF_OUT_INIT_HIGH, "WATCHDOG EXIT");
|
||||
gpio_set_value(SBR_AC1750_GPIO_EXT_WDT, 0);
|
||||
ndelay(1000);
|
||||
gpio_set_value(SBR_AC1750_GPIO_EXT_WDT, 1);
|
||||
}
|
||||
|
||||
static void __init sbr_ac1750_setup(void)
|
||||
{
|
||||
u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
|
||||
exit_watchdog();
|
||||
__init_watchdog(SBR_AC1750_GPIO_EXT_WDT);
|
||||
|
||||
init_sbr_ac1750_wdt(SBR_AC1750_GPIO_EXT_WDT);
|
||||
|
||||
ath79_register_leds_gpio(-1, ARRAY_SIZE(sbr_ac1750_leds_gpio),
|
||||
sbr_ac1750_leds_gpio);
|
||||
|
@ -45,6 +45,7 @@ define Device/sbr-ac1750
|
||||
BOARDNAME := SBR-AC1750
|
||||
IMAGE_SIZE := 95m
|
||||
KERNEL_SIZE := 4096k
|
||||
ROOTFS1_SIZE := 8192k
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
UBINIZE_OPTS := -E 5
|
||||
@ -52,8 +53,8 @@ define Device/sbr-ac1750
|
||||
MTDPARTS := ar934x-nfc:1m(u-boot)ro,1m(u-boot-env)ro,4m(kernel),95m(ubi),1m(scfgmgr),4m(openwrt),1m(ft),2m(PKI),1m@0x6d00000(art)ro
|
||||
IMAGES := sysupgrade.tar kernel1.bin rootfs1.bin
|
||||
KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma
|
||||
IMAGE/kernel1.bin := append-kernel | check-size $$$$(KERNEL_SIZE)
|
||||
IMAGE/rootfs1.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
|
||||
IMAGE/kernel1.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | check-size $$$$(KERNEL_SIZE)
|
||||
IMAGE/rootfs1.bin := append-ubi | pad-to $$$$(ROOTFS1_SIZE) | check-size $$$$(IMAGE_SIZE)
|
||||
IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += sbr-ac1750
|
||||
|
Loading…
Reference in New Issue
Block a user