首页 > 资源分享 > OpenWRT9331网口及LED灯显示错误修改OpenWRT固件LED灯修改方法
2018
12-06

OpenWRT9331网口及LED灯显示错误修改OpenWRT固件LED灯修改方法

OpenWRT9331网口及LED灯显示错误修改OpenWRT固件LED灯修改方法

以编译tl-wr741n-v4固件为例

openwrt/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr741nd-v4.c,将代码

ath79_setup_ar933x_phy4_switch(true, true);  改为ath79_setup_ar933x_phy4_switch(false, false);

#define TL_WR741NDV4_GPIO_LED_WAN 13; 改为 #define TL_WR741NDV4_GPIO_LED_WAN 17 

#define TL_WR741NDV4_GPIO_LED_LAN4 17; 改为#define TL_WR741NDV4_GPIO_LED_LAN4 13

static struct gpio_led tl_wr741ndv4_leds_gpio[] __initdata = {

{

.name = "tp-link:green:lan1",

.gpio = TL_WR741NDV4_GPIO_LED_LAN1,

.active_low = 0,

}, {

.name = "tp-link:green:lan2",

.gpio = TL_WR741NDV4_GPIO_LED_LAN2,

.active_low = 0,

}, {

.name = "tp-link:green:lan3",

.gpio = TL_WR741NDV4_GPIO_LED_LAN3,

.active_low = 0,

}, {

.name = "tp-link:green:lan4",

.gpio = TL_WR741NDV4_GPIO_LED_LAN4,

.active_low = 0,

}, {

.name = "tp-link:green:qss",

.gpio = TL_WR741NDV4_GPIO_LED_QSS,

.active_low = 0,

}, {

.name = "tp-link:green:system",

.gpio = TL_WR741NDV4_GPIO_LED_SYSTEM,

.active_low = 1,

}, {

.name = "tp-link:green:wan",

.gpio = TL_WR741NDV4_GPIO_LED_WAN,

.active_low = 1,

}, {

.name = "tp-link:green:wlan",

.gpio = TL_WR741NDV4_GPIO_LED_WLAN,

.active_low = 0,

}, {

.name = "tp-link:green:3g",

.gpio = TL_MR3220V2_GPIO_LED_3G,

.active_low = 0,

},

};

注:红色的字都是需要更改的。

支付宝打赏 微信打赏