[LEDE-DEV] [PATCH] ramips:Correct switch configuration for Newifi D1
Signed-off-by: Chuanhong Guo --- This patch fixes siwtch configuration for Newifi D1.I don't know why it used to be so strange and unable to use.:( BTW this patch should (and could) be applied to both the master branch and the lede-17.01 branch.(I think I needn't send it twice,right?) target/linux/ramips/base-files/etc/board.d/02_network | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 3ef04e6..35ce00c 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -237,11 +237,8 @@ ramips_setup_interfaces() "0:lan" "4:lan" "6t@eth0" ;; newifi-d1) - ucidef_set_interface_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ - "0:lan" "1:lan" "2:lan" "3:lan" "5:wan" "6t@eth0" "7t@eth0" - ucidef_add_switch "switch1" \ - "4:lan" "6t@eth0" "7t@eth0" + "1:lan:2" "2:lan:1" "4:wan" "6@eth0" ;; rt-n56u) ucidef_add_switch "switch0" \ -- 2.9.3 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] ar71xx: Need advice on parsing specific board config data on TP-Link TL-WR942N
The mac address is saved at 0xe4 of the flash and you can write a function similar to ath79_nvram_parse_mac_addr which is defined in target/linux/ar71xx/files/arch/mips/ath79/nvram.c BTW this function is used by WD My Net N750: https://github.com/lede-project/source/blob/master/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c#L152 it seems that it's OK to use sscanf(addr, "%02hhx-%02hhx-%02hhx-%02hhx-%02hhx-%02hhx") :-) this can also be done at userspace but in this way you need to load ART and modify the mac address by the firmware hotplug script like what Netgear WNDR4300 have done. Regards Chuanhong Guo 2017-02-22 4:47 GMT+08:00 Sergey Studzinski : >>> Most work is already done against 17.01-rc2 and there is working >>> factory and sysupgrade images. >> >>Please, base your work on master branch. > > Most work was done against master but later backported to rc2 in > terms of stability in packages. It is not a problem to revert it > back to master. > >>Just checking, have you tried to look for MAC in binary format in >>whole flash dump? > > There is definitely no other place with valid MAC elsewhere in flash. > MAC in ART is fake one like 000203040506. As seen in bootlogs factory > firmware starts with random MACs and then use special init script and > nvrammanager binary utility to parse data from partition default-mac. > Can look at fullflash here http://fex.net/get/227411653165/2400918 > >>[1] >>https://github.com/lede-project/source/blob/master/package/base-files/files/lib/functions/system.sh#L11 >>[2] >>https://github.com/lede-project/source/blob/master/target/linux/ar71xx/base-files/etc/board.d/02_network#L483 > > Will look at it. Thank you. > Sergey > > ___ > Lede-dev mailing list > Lede-dev@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/lede-dev ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] shadowsocks-libev: fix tproxy issue for udp traffic
Maybe you should create a pull request on https://github.com/openwrt/packages instead. The git repository on git.lede-project.org is just a mirror of the GitHub one:-) 2017-05-18 16:51 GMT+08:00 Zhizhang : > ss-rules script in shadowsocks-libev currently is using TPROXY without mark > packet first this patch will fix it > > Signed-off-by: Zhizhang Deng > --- > net/shadowsocks-libev/files/ss-rules | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/net/shadowsocks-libev/files/ss-rules > b/net/shadowsocks-libev/files/ss-rules > index 8ce1000..084f87e 100644 > --- a/net/shadowsocks-libev/files/ss-rules > +++ b/net/shadowsocks-libev/files/ss-rules > @@ -120,6 +120,9 @@ tp_rule() { > $ipt_m -A SS_SPEC_TPROXY -p udp -m set ! --match-set ss_spec_wan_ac > dst \ > -j TPROXY --on-port $LOCAL_PORT --tproxy-mark 0x01/0x01 > $ipt_m -A PREROUTING -p udp $EXT_ARGS \ > + -m socket \ > + -m comment --comment "_SS_SPEC_RULE_" -j MARK --set-mark 1 > + $ipt_m -A PREROUTING -p udp $EXT_ARGS \ > -m set ! --match-set ss_spec_lan_ac src \ > -m comment --comment "_SS_SPEC_RULE_" -j SS_SPEC_TPROXY > return $? > > > > > ___ > Lede-dev mailing list > Lede-dev@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/lede-dev ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] ar71xx: add support for TP-Link TL-WDR7500v6
Hello! 2017-10-31 3:32 GMT+08:00 Bizon : > Add support for TP-Link TL-WDR7500 V6. > > Specifications: > - WiSoC: QCA9563 - 3x3 2.4GHz > - Radio2: QCA9880 - 3x3 5GHz > - RAM: 64MB DDR2 > - Storage: 8MB NOR SPI flash, can be replaced with 16M > - Switch: RTL8367S, now unmanaged Do you mean that this device support is incomplete and the network switch is currently broken? I noticed that there is nothing about this switch in mach-tl-wdr7500-v6.c and in board.d/02_network you've placed this device with WR703N which has only one ethernet port. > - Ethernet: 5x1G > - Misc: 2x button, 2x LED > > Signed-off-by: Karol Bizewski > --- > package/boot/uboot-envtools/files/ar71xx| 2 ++ > target/linux/ar71xx/base-files/etc/board.d/02_network | 2 ++ > target/linux/ar71xx/base-files/etc/diag.sh | 4 > .../base-files/etc/hotplug.d/firmware/11-ath10k-caldata | 5 + > target/linux/ar71xx/base-files/lib/ar71xx.sh| 6 ++ > target/linux/ar71xx/config-4.4 | 1 + > target/linux/ar71xx/config-4.9 | 1 + > .../linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 10 ++ > target/linux/ar71xx/files/arch/mips/ath79/Makefile | 1 + > target/linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + > target/linux/ar71xx/image/generic.mk| 17 > + > .../files/arch/mips/ath79/mach-tl-wdr7500-v6.c | 112 > + > 12 files changed, 162 insertions(+) > create mode 100644 > target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr7500-v6.c > > diff --git a/package/boot/uboot-envtools/files/ar71xx > b/package/boot/uboot-envtools/files/ar71xx > index 0bdb6de..789c317 100644 > --- a/package/boot/uboot-envtools/files/ar71xx > +++ b/package/boot/uboot-envtools/files/ar71xx > @@ -46,6 +46,8 @@ om5p-acv2|\ > om5p-an|\ > sr3200|\ > tube2h|\ > +tl-wdr7500-v6|\ > +tl-wdr7500-v6-16M|\ > wndr3700|\ > xd3200) > ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1" "0x1" > diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network > b/target/linux/ar71xx/base-files/etc/board.d/02_network > index d838352..6cdd2fe 100755 > --- a/target/linux/ar71xx/base-files/etc/board.d/02_network > +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network > @@ -122,6 +122,8 @@ ar71xx_setup_interfaces() > tl-wa901nd-v2|\ > tl-wa901nd-v3|\ > tl-wa901nd-v4|\ > + tl-wdr7500-v6|\ > + tl-wdr7500-v6-16M|\ > tl-wr703n|\ > tl-wr802n-v1|\ > tl-wr802n-v2|\ > diff --git a/target/linux/ar71xx/base-files/etc/diag.sh > b/target/linux/ar71xx/base-files/etc/diag.sh > index ade726f..f0ec9e6 100644 > --- a/target/linux/ar71xx/base-files/etc/diag.sh > +++ b/target/linux/ar71xx/base-files/etc/diag.sh > @@ -20,6 +20,10 @@ get_status_led() { > all0305) > status_led="eap7660d:green:ds4" > ;; > + tl-wdr7500-v6|\ > + tl-wdr7500-v6-16M) > + status_led="$board:blue:system" > + ;; > antminer-s1|\ > antminer-s3|\ > antminer-r1|\ > diff --git > a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata > b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata > index 85a2a63..bd0cf2e 100644 > --- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata > +++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata > @@ -98,6 +98,11 @@ case "$FIRMWARE" in > rb-952ui-5ac2nd) > ath10kcal_from_file "/sys/firmware/routerboot/ext_wlan_data" 20480 2116 > ;; > + tl-wdr7500-v6|\ > + tl-wdr7500-v6-16M) > + ath10kcal_extract "art" 8192 2116 > + ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +2) > + ;; > re450|\ > tl-wr902ac-v1) > ath10kcal_extract "art" 20480 2116 > diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh > b/target/linux/ar71xx/base-files/lib/ar71xx.sh > index 835ced6..dbf132b 100755 > --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh > +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh > @@ -1109,6 +1109,12 @@ ar71xx_board_detect() { > *"TL-WDR6500 v2") > name="tl-wdr6500-v2" > ;; > + *"TL-WDR7500 v6") > +local size="$(mtd_get_part_size 'firmware')" > + > +[ "$size" = "8060928" ] && name="tl-wdr7500-v6" > +[ "$size" = "16449536" ] && name="tl-wdr7500-v6-16M" Actually you needn't specify two different "name" here as both of them apply the same default configuration. > + ;; > *"TL-WPA8630") > name="tl-wpa8630" > ;; > diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4 > index 0e77560..32b7fbe 100644 > --- a/target/linux/ar71xx/config-4.4 > +++ b/target/linux/ar71xx/config-4.4 > @@ -196,6 +196,7 @@ CONFIG_ATH79_MACH_TL_WDR3320_V2=y > CONFIG_ATH79_MACH_TL_WDR3500=y > CONFIG_ATH79_MACH_TL_WDR4300=y > CONFIG_ATH79_MACH_TL_WDR6500_V2=y > +CONFIG_ATH79_MACH_TL_WDR7500_V6=y > CONFIG_ATH79_MACH_TL_WPA8630=y > CONFIG_ATH79_MACH_TL_WR1041N_V2=y > CONFIG_ATH79_MACH_TL_WR1043ND=y > diff --