Re: [OpenWrt-Devel] [PATCH v2] ramips: Fix WR8305RT USB LED

2014-07-24 Thread John Crispin


On 23/07/2014 17:33, Roman Yeryomin wrote:
 On 23 July 2014 18:26, L. D. Pinney ldpin...@gmail.com wrote:
 The WR8305RT may be the same as the WA05I have asked ZBT.
 
 One difference is uboot is set for 57600 on my WR8305RT...meaning
 I'll need to patch the WA05 dts to use it. Or update the
 uboot? I have also asked ZBT for the current uboot...
 
 That's very strange because they have asked me to rename WA05 into
 WR8305RT. They didn't say the baudrate is different. Can you take a
 photo of pcb?
 
 Regards, Roman

Hi,

whoever decided to put 57600 as the default baud rate in the RTSDK
should be tar'ed and feathered.

John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ramips: ethernet mac cleanup

2014-07-24 Thread Roman Yeryomin
Compile tested all subtargets and profiles.
Unfortunately I don't own any board affected by these changes, so no run tests.

Signed-off-by: Roman Yeryomin ro...@advem.lv
---
 .../ramips/base-files/etc/uci-defaults/02_network  |  36 ---
 .../ramips/base-files/lib/preinit/06_set_iface_mac | 109 -
 target/linux/ramips/dts/3G-6200NL.dts  |   4 +
 target/linux/ramips/dts/ALL5003.dts|   4 +
 target/linux/ramips/dts/AWM002-EVB-4M.dts  |   4 +
 target/linux/ramips/dts/AWM002-EVB-8M.dts  |   4 +
 target/linux/ramips/dts/BR-6475ND.dts  |   3 +-
 target/linux/ramips/dts/DAP-1350.dts   |   4 +
 target/linux/ramips/dts/DIR-300-B1.dts |   2 +-
 target/linux/ramips/dts/DIR-600-B1.dts |   2 +-
 target/linux/ramips/dts/DIR-610-A1.dts |   2 +-
 target/linux/ramips/dts/ESR-9753.dts   |   2 +-
 target/linux/ramips/dts/FREESTATION5.dts   |   2 +-
 target/linux/ramips/dts/HW550-3G.dts   |   4 +
 target/linux/ramips/dts/IP2202.dts |   2 +-
 target/linux/ramips/dts/NBG-419N.dts   |   2 +-
 target/linux/ramips/dts/OMNI-EMB.dts   |   4 +
 target/linux/ramips/dts/PX4885.dts |   2 +-
 target/linux/ramips/dts/RT-N10-PLUS.dts|   4 +
 target/linux/ramips/dts/W306R_V20.dts  |   2 +-
 target/linux/ramips/dts/WL341V3.dts|   4 +
 target/linux/ramips/dts/WL_330N.dts|   4 +
 target/linux/ramips/dts/WL_330N3G.dts  |   4 +
 target/linux/ramips/dts/WR6202.dts |   4 +
 target/linux/ramips/dts/XDXRN502J.dts  |   4 +
 25 files changed, 85 insertions(+), 133 deletions(-)
 delete mode 100644 target/linux/ramips/base-files/lib/preinit/06_set_iface_mac

diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network 
b/target/linux/ramips/base-files/etc/uci-defaults/02_network
index b372893..5032104 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network
@@ -198,19 +198,22 @@ ramips_setup_macs()
 
case $board in
br-6475nd)
-   lan_mac=$(mtd_get_mac_binary devdata 13)
+   lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(mtd_get_mac_binary devdata 7)
;;
 
w306r-v20)
+   lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add $lan_mac 5)
;;
 
tew-691gr)
+   lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add $lan_mac 3)
;;
 
tew-692gr)
+   lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add $lan_mac 4)
;;
 
@@ -218,10 +221,24 @@ ramips_setup_macs()
m4 |\
x5 |\
x8)
-   lan_mac=$(macaddr_add $lan_mac -1)
+   lan_mac=$(cat /sys/class/net/eth0/address)
+   lan_mac=$(macaddr_add $lan_mac -2)
;;
 
-   dir-620-a1)
+   bc2 |\
+   broadway |\
+   d105 |\
+   dir-620-a1 |\
+   esr-9753 |\
+   freestation5 |\
+   hlk-rm04 | \
+   mpr-a1 | \
+   mpr-a2 | \
+   dir-300-b7 | \
+   dir-320-b1 | \
+   psr-680w |\
+   sl-r7205)
+   lan_mac=$(cat /sys/class/net/eth0/address)
lan_mac=$(macaddr_setbit_la $lan_mac)
wan_mac=$(macaddr_add $lan_mac 1)
;;
@@ -232,12 +249,13 @@ ramips_setup_macs()
wan_mac=$(mtd_get_mac_ascii nvram wanmac)
;;
 
-   nbg-419n | \
wcr-150gn)
 wan_mac=$(mtd_get_mac_binary factory 40)
;;
 
rt-n56u)
+   lan_mac=$(cat /sys/class/net/eth0/address)
+   lan_mac=$(macaddr_setbit_la $lan_mac)
wan_mac=$(mtd_get_mac_binary factory 32772)
;;
 
@@ -249,16 +267,6 @@ ramips_setup_macs()
wan_mac=$(mtd_get_mac_binary factory 46)
;;
 
-   wl341v3)
-   lan_mac=$(mtd_get_mac_binary board-nvram 65440)
-   wan_mac=$(macaddr_add $lan_mac 1)
-   ;;
-
-   wr8305rt)
-   lan_mac=$(mtd_get_mac_binary factory 4)
-   wan_mac=$(macaddr_add $lan_mac 1)
-   ;;
-
*)
lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add $lan_mac 1)
diff --git a/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac 
b/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac
deleted file mode 100644
index 2a0a4fd..000
--- a/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac
+++ /dev/null
@@ -1,109 +0,0 @@
-#
-# Copyright (C) 2011 OpenWrt.org
-#
-
-preinit_set_mac_address() {
-   local mac
-
-   . /lib/functions.sh
-   . 

Re: [OpenWrt-Devel] [PATCH]ramips: Add Ralink RT3XXX USB OHCI driver

2014-07-24 Thread Roman Yeryomin
On 20 July 2014 12:48, Roman Yeryomin leroi.li...@gmail.com wrote:
 On 20 July 2014 12:15, John Crispin j...@phrozen.org wrote:


 On 20/07/2014 10:36, 郭传鈜 wrote:
 I think I should reply to the mail list right ... I can't use my
 USB Modem with ohci-platform in current kernel…only USB is
 connected(disconnected)in kernel log and no /dev/ttyUSB is added…
 So I tried to use the driver from Ralink and my modem works well
 after I added this. EHCI driver works well so I did nothing with
 it.

 Hi Roman,

 do you have this board ? could you see if it also fails for you ? i
 don't actually have any mt7620n hw with usb exported i think...


 I remember using ohci/ehci drivers for mt7620n boards (because otg
 driver didn't work at all) but not sure if I tried any usb 1.1
 devices.
 Unfortunately I can't test it right now, maybe 2-3 days later.

I can confirm ohci driver is not functional in latest trunk and this
patch enables it.
Tested on Asus RT-N14U.
But:
- the patch doesn't apply cleanly
- kernel config should be revised (I see non usb changes and no
changes for mt7620n)
- the patch itself is pretty dirty to my eye


Regards,
Roman
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH]ramips:support Lenovo AC1200 Wireless router

2014-07-24 Thread Lintel Huang
Today, Lenovo released a new product,an 11ac wireless router base MTK's
mt7620a + mt7612e evaluation board.
It has Two GE ports(RTL8211E) and 4 FE ports(Internal switch),256MByte
DDR2, 3xUSB 2.0.
This patch will make openwrt support it.

Sorry for my pool english,tks at all.

Regards, Lintel

Signed-off-by:Lintellintel.hu...@gmail.com

diff --git a/target/linux/ramips/base-files/etc/diag.sh
b/target/linux/ramips/base-files/etc/diag.sh
index 908547e..edebed8 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -182,6 +182,9 @@ get_status_led() {
 na930)
 status_led=na930:blue:power
 ;;
+ac1200)
+status_led=lenovo:blue:power
+;;
 esac
 }

diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network
b/target/linux/ramips/base-files/etc/uci-defaults/02_network
index b372893..b862d9c 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network
@@ -172,6 +172,12 @@ ramips_setup_interfaces()
 ucidef_add_switch_vlan switch0 2 4 6t
 ;;

+ac1200)
+ucidef_set_interfaces_lan_wan eth0.1 eth0.2
+ucidef_add_switch switch0 1 1
+ucidef_add_switch_vlan switch0 1 1 2 3 4 5 6t
+ucidef_add_switch_vlan switch0 2 0 6t
+;;
 d105 | \
 na930 | \
 omni-emb-hpm|\
@@ -254,7 +260,8 @@ ramips_setup_macs()
 wan_mac=$(macaddr_add $lan_mac 1)
 ;;

-wr8305rt)
+wr8305rt | \
+ac1200)
 lan_mac=$(mtd_get_mac_binary factory 4)
 wan_mac=$(macaddr_add $lan_mac 1)
 ;;
diff --git a/target/linux/ramips/base-files/lib/ramips.sh
b/target/linux/ramips/base-files/lib/ramips.sh
index f9ab1e3..9a339b1 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -313,6 +313,9 @@ ramips_board_detect() {
 *ZBT WR8305RT)
 name=wr8305rt
 ;;
+*Lenovo AC1200)
+name=ac1200
+;;
 *)
 name=generic
 ;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 8ada58b..a5a63ae 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -93,7 +93,8 @@ platform_check_image() {
 wrtnode |\
 x5 |\
 x8 |\
-zbt-wa05)
+zbt-wa05 |\
+ac1200)
 [ $magic != 27051956 ]  {
 echo Invalid image type.
 return 1
diff --git a/target/linux/ramips/image/Makefile
b/target/linux/ramips/image/Makefile
index ef019ef..79e1787 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -716,6 +716,7 @@ Image/Build/Profile/DIR-810L=$(call
BuildFirmware/CustomFlash/$(1),$(1),dir-810l
 na930_mtd_size=20971520
 Image/Build/Profile/NA930=$(call
BuildFirmware/CustomFlash/$(1),$(1),na930,NA930,$(na930_mtd_size))
 Image/Build/Profile/MZK-750DHP=$(call
BuildFirmware/Default8M/$(1),$(1),mzk-750dhp,MZK-750DHP)
+Image/Build/Profile/AC1200=$(call
BuildFirmware/Default16M/$(1),$(1),ac1200,AC1200)

 ifeq ($(SUBTARGET),mt7620a)
 define Image/Build/Profile/Default
@@ -730,6 +731,7 @@ define Image/Build/Profile/Default
 $(call Image/Build/Profile/WHR1166D,$(1))
 $(call Image/Build/Profile/MZK-750DHP,$(1))
 $(call Image/Build/Profile/NA930,$(1))
+$(call Image/Build/Profile/AC1200,$(1))
 endef
 endif

diff --git a/target/linux/ramips/mt7620a/config-3.10
b/target/linux/ramips/mt7620a/config-3.10
index 6805dd9..50e0a55 100644
--- a/target/linux/ramips/mt7620a/config-3.10
+++ b/target/linux/ramips/mt7620a/config-3.10
@@ -1,6 +1,7 @@
 CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
 CONFIG_ARCH_DISCARD_MEMBLOCK=y
 CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
+CONFIG_ARCH_HAS_RESET_CONTROLLER=y
 CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
 CONFIG_ARCH_HIBERNATION_POSSIBLE=y
 CONFIG_ARCH_REQUIRE_GPIOLIB=y
@@ -78,6 +79,7 @@ CONFIG_HAVE_PERF_EVENTS=y
 CONFIG_HW_HAS_PCI=y
 CONFIG_HW_RANDOM=m
 CONFIG_HZ_PERIODIC=y
+CONFIG_ICPLUS_PHY=y
 CONFIG_IMAGE_CMDLINE_HACK=y
 CONFIG_INET_LRO=y
 CONFIG_INITRAMFS_SOURCE=
@@ -88,6 +90,7 @@ CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_IRQ_INTC=y
 CONFIG_IRQ_WORK=y
 CONFIG_M25PXX_USE_FAST_READ=y
+CONFIG_MARVELL_PHY=y
 CONFIG_MDIO_BOARDINFO=y
 # CONFIG_MII is not set
 CONFIG_MIPS=y
@@ -138,7 +141,9 @@ CONFIG_PINMUX=y
 CONFIG_RALINK=y
 CONFIG_RALINK_USBPHY=y
 CONFIG_RALINK_WDT=y
+CONFIG_RA_NAT_NONE=y
 # CONFIG_RCU_STALL_COMMON is not set
+CONFIG_REALTEK_PHY=y
 CONFIG_RESET_CONTROLLER=y
 # CONFIG_SAMSUNG_USB2PHY is not set
 # CONFIG_SAMSUNG_USB3PHY is not set
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 908547e..edebed8 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -182,6 +182,9 @@ get_status_led() {
 	na930)
 		status_led=na930:blue:power
 		

Re: [OpenWrt-Devel] [PATCH]ramips:support Lenovo AC1200 Wireless router

2014-07-24 Thread Roman Yeryomin
On 24 July 2014 17:04, Lintel Huang lintel.hu...@gmail.com wrote:

 Today, Lenovo released a new product,an 11ac wireless router base MTK's
 mt7620a + mt7612e evaluation board.
 It has Two GE ports(RTL8211E) and 4 FE ports(Internal switch),256MByte DDR2,
 3xUSB 2.0.
 This patch will make openwrt support it.

sounds interesting

 @@ -254,7 +260,8 @@ ramips_setup_macs()
  wan_mac=$(macaddr_add $lan_mac 1)
  ;;

 -wr8305rt)
 +wr8305rt | \
 +ac1200)
  lan_mac=$(mtd_get_mac_binary factory 4)
  wan_mac=$(macaddr_add $lan_mac 1)
  ;;

Could you define ethernet mtd-mac-address in dts?
Then it would be covered by default case here.
I'm trying to cleanup ramips target a bit...

 +CONFIG_ICPLUS_PHY=y
 +CONFIG_MARVELL_PHY=y
 +CONFIG_RA_NAT_NONE=y

what are these for?


Regards,
Roman
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH]ramips: Add Ralink RT3XXX USB OHCI driver

2014-07-24 Thread John Crispin

 Hi Roman,
 
 do you have this board ? could you see if it also fails for you
 ? i don't actually have any mt7620n hw with usb exported i
 think...
 
 
 I remember using ohci/ehci drivers for mt7620n boards (because
 otg driver didn't work at all) but not sure if I tried any usb
 1.1 devices. Unfortunately I can't test it right now, maybe 2-3
 days later.
 
 I can confirm ohci driver is not functional in latest trunk and
 this patch enables it. Tested on Asus RT-N14U. But: - the patch
 doesn't apply cleanly - kernel config should be revised (I see non
 usb changes and no changes for mt7620n) - the patch itself is
 pretty dirty to my eye
 
 

Hi Roman,

thanks for testing, i will figure out what the difference is in the
code and try to figure out what is missing in our code

John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [RFC] openwrt: Allow extraction of debuginfo from all binaries

2014-07-24 Thread Helmut Schaa
Introduce a new config symbol EXTRACT_DEBUGINFO to extract debuginfo
from all binaries. This depends on USE_STRIP and DEBUG.

The debuginfo of all packages will be extracted from the binary
and copied into bin/$platform/debuginfo.

This allows better debugging of coredumps by loading the debuginfo
into gdb.

Signed-off-by: Helmut Schaa helmut.sc...@googlemail.com
---

Any comments?
Helmut

 config/Config-build.in   | 10 ++
 include/package-ipkg.mk  |  5 -
 rules.mk |  9 +
 scripts/extract-debug.sh | 41 +
 4 files changed, 64 insertions(+), 1 deletion(-)
 create mode 100644 scripts/extract-debug.sh

diff --git a/config/Config-build.in b/config/Config-build.in
index 371ae76..60b0975 100644
--- a/config/Config-build.in
+++ b/config/Config-build.in
@@ -165,6 +165,16 @@ menu Global build settings
  This will install binaries stripped using sstrip
endchoice
 
+   config EXTRACT_DEBUGINFO
+   bool
+   prompt Extract debug info from binaries
+   depends on USE_STRIP
+   depends on DEBUG
+   default n
+   help
+   Extract debuginfo from binaries for better cross 
debugging without
+   wasting space on the target device.
+
config STRIP_ARGS
string
prompt Strip arguments
diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk
index 9783a63..b64775e 100644
--- a/include/package-ipkg.mk
+++ b/include/package-ipkg.mk
@@ -76,6 +76,7 @@ ifeq ($(DUMP),)
   define BuildTarget/ipkg
 IPKG_$(1):=$(PACKAGE_DIR)/$(1)_$(VERSION)_$(PKGARCH).ipk
 IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg-$(PKGARCH)/$(1)
+DDIR_$(1):=$(PKG_BUILD_DIR)/debuginfo-$(PKGARCH)
 KEEP_$(1):=$(strip $(call Package/$(1)/conffiles))
 
 ifeq ($(BUILD_VARIANT),$$(if $$(VARIANT),$$(VARIANT),$(BUILD_VARIANT)))
@@ -134,7 +135,7 @@ ifeq ($(DUMP),)
 $(PKG_INFO_DIR)/$(1).provides: $$(IPKG_$(1))
 $$(IPKG_$(1)): $(STAMP_BUILT) $(INCLUDE_DIR)/package-ipkg.mk
@rm -rf $(PACKAGE_DIR)/$(1)_* $$(IDIR_$(1))
-   mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/CONTROL $(PKG_INFO_DIR)
+   mkdir -p $(PACKAGE_DIR) $(DEBUGINFO_DIR) $$(IDIR_$(1))/CONTROL 
$(PKG_INFO_DIR) $$(DDIR_$(1))
$(call Package/$(1)/install,$$(IDIR_$(1)))
-find $$(IDIR_$(1)) -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name 
'*~'| $(XARGS) rm -rf
@( \
@@ -148,6 +149,7 @@ ifeq ($(DUMP),)
$(if $(PROVIDES),@for pkg in $(PROVIDES); do cp 
$(PKG_INFO_DIR)/$(1).provides $(PKG_INFO_DIR)/pkg.provides; done)
$(CheckDependencies)
 
+   $(EXTRACT_DEBUG) $$(DDIR_$(1)) $$(IDIR_$(1))
$(RSTRIP) $$(IDIR_$(1))
( \
echo Package: $(1); \
@@ -187,6 +189,7 @@ ifeq ($(DUMP),)
)
 endif
 
+   if [ -e $$(DDIR_$(1))/* ]; then cp -r $$(DDIR_$(1))/* $(DEBUGINFO_DIR)/ 
; fi
$(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
@[ -f $$(IPKG_$(1)) ]
 
diff --git a/rules.mk b/rules.mk
index a84636a..6d01c76 100644
--- a/rules.mk
+++ b/rules.mk
@@ -98,6 +98,7 @@ else
 endif
 
 PACKAGE_DIR:=$(BIN_DIR)/packages
+DEBUGINFO_DIR:=$(BIN_DIR)/debuginfo
 BUILD_DIR:=$(BUILD_DIR_BASE)/$(TARGET_DIR_NAME)
 STAGING_DIR:=$(TOPDIR)/staging_dir/$(TARGET_DIR_NAME)
 BUILD_DIR_TOOLCHAIN:=$(BUILD_DIR_BASE)/$(TOOLCHAIN_DIR_NAME)
@@ -257,6 +258,14 @@ else
 $(SCRIPT_DIR)/rstrip.sh
 endif
 
+ifeq ($(CONFIG_EXTRACT_DEBUGINFO),y)
+  EXTRACT_DEBUG:= \
+OBJCOPY=$(TARGET_CROSS)objcopy \
+$(SCRIPT_DIR)/extract-debug.sh
+else
+  EXTRACT_DEBUG:=:
+endif
+
 ifeq ($(CONFIG_IPV6),y)
   DISABLE_IPV6:=
 else
diff --git a/scripts/extract-debug.sh b/scripts/extract-debug.sh
new file mode 100644
index 000..188be2d
--- /dev/null
+++ b/scripts/extract-debug.sh
@@ -0,0 +1,41 @@
+#!/usr/bin/env bash
+# 
+# Copyright (C) 2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+SELF=${0##*/}
+
+[ -z $OBJCOPY ]  {
+  echo $SELF: objcopy command not defined (OBJCOPY variable not set)
+  exit 1
+}
+
+DESTDIR=$1
+
+[ -z $DESTDIR ]  {
+  echo $SELF: no destdir specified
+  exit 1
+}
+
+TARGET=$2
+
+[ -z $TARGET ]  {
+  echo $SELF: no directories / files specified
+  echo usage: $SELF [PATH...]
+  exit 1
+}
+
+find $TARGET -type f -a -exec file {} \; | \
+  sed -n -e 's/^\(.*\):.*ELF.*\(executable\|shared object\).*,.* 
stripped/\1:\2/p' | \
+(
+  IFS=:
+  while read F S; do
+echo $SELF: $F:$S
+eval mkdir -p $DESTDIR/`echo ${F%/*} | sed s#$TARGET##`
+eval $OBJCOPY --only-keep-debug $F $DESTDIR/`echo $F | sed 
s#$TARGET##`.debug
+eval $OBJCOPY --add-gnu-debuglink=$DESTDIR/`echo $F | sed 
s#$TARGET##`.debug $F
+  done
+  true
+)
-- 
1.8.4.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org

[OpenWrt-Devel] Need help adding a config option to wifi-device

2014-07-24 Thread Shankar Unni
Working with trunk SVN version 41290.

I'm trying to tweak our setup to pass additional parameters on the command line 
to hostapd, and I was hoping to configure that using /etc/config/wireless, in 
the config wifi-device section.

So I added
 option addl_param 'pval'

to the wifi-device configuration.  Then in drv_mac80211_setup() (in 
/lib/netifd/wireless/mac80211.sh), in the initial json_get_vars call, I added 
addl_param, and later, I added the following:

[ -n $hostapd_ctrl ]  {
/usr/sbin/hostapd -P /var/run/wifi-$phy.pid -B 
$hostapd_conf_file $addl_param

The problem is that my parameter value doesn't show up here.

What do I need to do to make the json_get_vars return the right value of 
addl_param from the config? Am I supposed to explicitly push that value into 
some place in some other script?  Or is there some magic about the existing 
options to wifi-device?

I tried to follow the handling of things like channel, etc., and did a bunch 
of monkey-see-monkey-do changes to also mention addl_param in all those places 
(/lib/netifd/hostapd.sh, etc.), but nothing seems to help.

I guess I'm really missing a big chunk of the picture here..

Thanks for any help!___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] ddns-scripts: currently no MAINTAINER defined

2014-07-24 Thread Christian Schoenebeck
Hi,

I would offer to do the job, but I down know what I need to do.
What are the requirements?
- technically (hardware/software equipment)
- knowledge (I don't call myself a programmer)
- permissions to which development environments

I modified ddns-scripts and luci-app-ddns for many new functionality as 
described in openwrt forum
https://forum.openwrt.org/viewtopic.php?pid=235338#p235338
- IPv6 support
- Proxy Support
- DNS-Server support
- LuCI App redesign including status in Status-Overview

I uploaded a set of files via https://dev.openwrt.org/ticket/17139 knowing that 
only patches needs to be implemented.
Sorry I misused Ticket-System but I have no free private web-space to offer 
files for download.

Currently I started to modify the LuCI language files for German translation.
If done, I will upload ddns-scripts patches to Github packages.
For me it's current unclear how to offer updates to luci-app-ddns
- via svn as described at luci.subsignal.org and luci ticket system
- via openwrt ticket system
- via this mailing list as [PATCH]luci-app-ddns: xxx
- ??

Thanks for your help.

Christian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [luci] Improve spelling and grammar

2014-07-24 Thread Alex Henrie
Signed-off-by: Alex Henrie alexhenri...@gmail.com
---
 applications/luci-ahcp/luasrc/model/cbi/ahcp.lua  | 2 +-
 .../luci-firewall/luasrc/model/cbi/firewall/zone-details.lua  | 2 +-
 .../luci-meshwizard/luasrc/model/cbi/freifunk/meshwizard.lua  | 2 +-
 applications/luci-watchcat/luasrc/model/cbi/watchcat/watchcat.lua | 8 
 applications/luci-wol/luasrc/model/cbi/wol.lua| 2 +-
 applications/luci-wshaper/luasrc/model/cbi/wshaper.lua| 2 +-
 modules/admin-full/luasrc/controller/admin/system.lua | 2 +-
 modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua| 2 +-
 modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua  | 2 +-
 modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua| 2 +-
 modules/admin-full/luasrc/model/cbi/admin_network/wifi_add.lua| 2 +-
 modules/admin-full/luasrc/model/cbi/admin_system/system.lua   | 2 +-
 modules/admin-full/luasrc/view/admin_network/wifi_overview.htm| 2 +-
 modules/admin-full/luasrc/view/admin_system/flashops.htm  | 2 +-
 modules/admin-full/luasrc/view/admin_system/upgrade.htm   | 2 +-
 modules/admin-mini/luasrc/view/mini/upgrade.htm   | 4 ++--
 modules/failsafe/luasrc/controller/failsafe/failsafe.lua  | 2 +-
 modules/failsafe/luasrc/view/failsafe/flashops.htm| 2 +-
 modules/failsafe/luasrc/view/failsafe/upgrade.htm | 2 +-
 19 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/applications/luci-ahcp/luasrc/model/cbi/ahcp.lua 
b/applications/luci-ahcp/luasrc/model/cbi/ahcp.lua
index 18764a1..a48f8b4 100644
--- a/applications/luci-ahcp/luasrc/model/cbi/ahcp.lua
+++ b/applications/luci-ahcp/luasrc/model/cbi/ahcp.lua
@@ -14,7 +14,7 @@ $Id: init.lua 5764 2010-03-08 19:05:34Z jow $
 
 m = Map(ahcpd, translate(AHCP Server), translate(AHCP is an 
autoconfiguration protocol  ..
for IPv6 and dual-stack IPv6/IPv4 networks designed to be used in 
place of router  ..
-   discovery and DHCP on networks where it is difficult or impossible to 
configure a  ..
+   discovery or DHCP on networks where it is difficult or impossible to 
configure a  ..
server within every link-layer broadcast domain, for example mobile 
ad-hoc networks.))
 
 
diff --git 
a/applications/luci-firewall/luasrc/model/cbi/firewall/zone-details.lua 
b/applications/luci-firewall/luasrc/model/cbi/firewall/zone-details.lua
index a3b1a6e..e5bcb34 100644
--- a/applications/luci-firewall/luasrc/model/cbi/firewall/zone-details.lua
+++ b/applications/luci-firewall/luasrc/model/cbi/firewall/zone-details.lua
@@ -50,7 +50,7 @@ s = m:section(NamedSection, zone.sid, zone,
emforward/em option describes the policy for forwarded 
traffic \
between different networks within the zone. \
emCovered networks/em specifies which available networks 
are \
-   member of this zone., zone:name()))
+   members of this zone., zone:name()))
 
 s.anonymous = true
 s.addremove = false
diff --git 
a/applications/luci-meshwizard/luasrc/model/cbi/freifunk/meshwizard.lua 
b/applications/luci-meshwizard/luasrc/model/cbi/freifunk/meshwizard.lua
index 8cb0822..68f7a5a 100644
--- a/applications/luci-meshwizard/luasrc/model/cbi/freifunk/meshwizard.lua
+++ b/applications/luci-meshwizard/luasrc/model/cbi/freifunk/meshwizard.lua
@@ -22,7 +22,7 @@ n.anonymous = true
 
 function cbi_configure(device)
local configure = n:taboption(device, Flag, device .. _config, 
translate(Configure this interface),
-   translate(Note: this will setup this interface for mesh 
operation, i.e. add to zone 'freifunk' and enable olsr.))
+   translate(Note: this will set up this interface for mesh 
operation, i.e. add it to zone 'freifunk' and enable olsr.))
 end
 
 function cbi_ip4addr(device)
diff --git a/applications/luci-watchcat/luasrc/model/cbi/watchcat/watchcat.lua 
b/applications/luci-watchcat/luasrc/model/cbi/watchcat/watchcat.lua
index 9f47bca..bcaf438 100644
--- a/applications/luci-watchcat/luasrc/model/cbi/watchcat/watchcat.lua
+++ b/applications/luci-watchcat/luasrc/model/cbi/watchcat/watchcat.lua
@@ -14,8 +14,8 @@ $Id$
 
 m = Map(system, 
translate(Watchcat), 
-   translate(Watchcat allows to configure a periodic reboot and/or when  
..
- internet connection has been lost for a certain period of 
time.  
+   translate(Watchcat allows configuring a periodic reboot when the  ..
+ Internet connection has been lost for a certain period of 
time.
 ))
 
 s = m:section(TypedSection, watchcat)
@@ -30,8 +30,8 @@ mode:value(allways, Periodic reboot)
 
 forcedelay = s:option(Value, forcedelay,
  translate(Forced reboot delay),
- translate(When rebooting the system the watchcat will 
trigger a soft reboot,  ..
-   Entering a 

Re: [OpenWrt-Devel] ddns-scripts: currently no MAINTAINER defined

2014-07-24 Thread Nikos Mavrogiannopoulos
On Thu, 2014-07-24 at 21:17 +0200, Christian Schoenebeck wrote:
 Hi,
 
 I would offer to do the job, but I down know what I need to do.
 What are the requirements?
   - technically (hardware/software equipment)
   - knowledge (I don't call myself a programmer)
   - permissions to which development environments

I'm not aware of formal requirements. Your interest and ability to hack
the package are the most important factor.

 I modified ddns-scripts and luci-app-ddns for many new functionality as 
 described in openwrt forum
 https://forum.openwrt.org/viewtopic.php?pid=235338#p235338
 - IPv6 support
 - Proxy Support
 - DNS-Server support
 - LuCI App redesign including status in Status-Overview

For the ddns-scripts you only need to sent your pull request at:
https://github.com/openwrt/packages

For the luci interface I'm also not very sure how it works. I ended up
creating a luci-app package within the packages repository, but in your
case as the package is already there, it may make sense to send it to
the luci maintainer's list.

regards,
Nikos
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2] ramips: Fix WR8305RT USB LED

2014-07-24 Thread L. D. Pinney
Working unit ... I changed u-boot (now @115200 baud) and the ZBT-WA05 build
@r41824

Thanks
Larry


On Thu, Jul 24, 2014 at 4:10 AM, Roman Yeryomin leroi.li...@gmail.com
wrote:

 On 24 July 2014 11:51, John Crispin j...@phrozen.org wrote:
 
 
  On 23/07/2014 17:33, Roman Yeryomin wrote:
  On 23 July 2014 18:26, L. D. Pinney ldpin...@gmail.com wrote:
  The WR8305RT may be the same as the WA05I have asked ZBT.
 
  One difference is uboot is set for 57600 on my WR8305RT...meaning
  I'll need to patch the WA05 dts to use it. Or update the
  uboot? I have also asked ZBT for the current uboot...
 
  That's very strange because they have asked me to rename WA05 into
  WR8305RT. They didn't say the baudrate is different. Can you take a
  photo of pcb?
 
  Regards, Roman
 
  Hi,
 
  whoever decided to put 57600 as the default baud rate in the RTSDK
  should be tar'ed and feathered.
 

 I will make a patch to synchronize these two boards.
 ZBT confirmed they use 115200 as default baudrate and the guy who made
 the initial patch for WR8305RT owns an early sample.

 Regards,
 Roman
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Backport of 41815 (ath9k tx lockup)

2014-07-24 Thread Etienne Champetier
Hi
I know we are close to BB release and ..., but do you plan to backport
r41815?
(ath9k: fix a long standing aggregation related tx lockup)

Thanks again for all the great work
Etienne

p.s: for now i have a cron doing wifi restart every hour on my 5 ubnt
bullet m2hp + 1 wr1043nd (still running AA), and i hit the bug at least
once a day (not every time the same device)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] BB r41023+: 40MHz - 20MHz switch and stack-trace on ath9k routers (potentially hostapd related)

2014-07-24 Thread Chirag Chhatriwala
Hello,

I've got a problem where a single device (HP Pavilion Laptop running AR9285
bgn WiFi card) is causing a stack-trace/kernel panic on OpenWRT based
router (WD MyNet N750). This happens just when the laptop connects to the
WiFi network (which is running using option noscan 1). Up until this
point, all devices connected to the router work without any problem. As
soon as *this* laptop connects, router switches operation to 20MHz mode on
the TX Leg. Up until r41021, openwrt builds did not exhibit such behavior.
The router maintained a 40MHz connection to all clients.
Just before the stack-trace, the system log also indicates that the device
switched from 40MHz to 20MHz mode of operation.

For me the culprit is any build that includes the latest *hostapd* changes
in r41022 and higher. However, r41022 broke the build (fixed in r41023).
Consequently, every build upwards of r41023 result in the following stack
trace.

[12340.17] [ cut here ]
[12340.18] WARNING: at
/home/chirag/bb/mynet/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/compat-wireless-2014-05-22/net/mac80211/chan.c:535
ieee80211_recalc_chanctx_min_def+0x4f8/0x6c4 [mac80211]()
[12340.20] Modules linked in: ath9k ath9k_common pppoe ppp_async
iptable_nat ath9k_hw ath pppox ppp_generic nf_nat_ipv4 nf_conntrack_ipv4
mac80211 ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_state xt_nat
xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS
xt_REDIRECT xt_LOG xt_CT ums_usbat ums_sddr55 ums_sddr09 ums_karma
ums_jumpshot ums_isd200 ums_freecom ums_datafab ums_cypress ums_alauda slhc
nf_nat_irc nf_nat_ftp nf_nat nf_defrag_ipv4 nf_conntrack_irc
nf_conntrack_ftp iptable_raw iptable_mangle iptable_filter ipt_REJECT
ip_tables crc_ccitt compat fuse sg ledtrig_usbdev ip6t_REJECT ip6table_raw
ip6table_mangle ip6table_filter ip6_tables x_tables nf_conntrack_ipv6
nf_conntrack nf_defrag_ipv6 vfat fat ntfs nls_utf8 nls_iso8859_1 nls_cp850
nls_cp437 ipv6 arc4 crypto_blkcipher usb_storage uhci_hcd ohci_hcd
ehci_platform ehci_hcd sd_mod scsi_mod gpio_button_hotplug ext4 crc16 jbd2
mbcache usbcore nls_base usb_common crypto_hash
[12340.29] CPU: 0 PID: 2200 Comm: hostapd Not tainted 3.10.49 #1
[12340.29] Stack :     80362eba
0035 86b4e758 873f9274
[12340.29]   802c0c68 8030f21b 0898 80362664 86b4e758 873f9274
86a33b88 002c
[12340.29]   0008 80079040 0003 80076ac0 872cbdd0 873f9274
802c2528 86a33a7c
[12340.29]        
 
[12340.29]        
 86a33a08
[12340.29]   ...
[12340.33] Call Trace:
[12340.33] [8006e294] show_stack+0x48/0x70I
[12340.34] [80076bbc] warn_slowpath_common+0x78/0xa8
[12340.34] [80076c74] warn_slowpath_null+0x18/0x24
[12340.35] [872ab464] ieee80211_recalc_chanctx_min_def+0x4f8/0x6c4
[mac80211]
[12340.35]
[12340.36] ---[ end trace 5bded13efd434a80 ]---



Syslog shows the same thing, except the following line appears just before
the stack-trace:

daemon.info hostapd: wlan0: STA 4c:xx:xx:xx:xx:xx IEEE 802.11: Switching to
20 MHz operation


Here's what my WiFi config looks like:

config wifi-device  radio0
option type mac80211
 option hwmode 11g
option path 'platform/ar934x_wmac'
 option channel  4
option htmode HT40
option noscan 1
 option country US

config wifi-iface
option device   radio0
 option network  lan
option wds 1
option mode ap
 option ssid OPENWRT2G
option encryption psk2
option key blahblahblah

config wifi-device  radio1
option type mac80211
option hwmode 11a
 option path 'pci:00/:00:00.0'
option channel  149
 option htmode HT40
option noscan 1
 option country US

config wifi-iface
option device   radio1
 option network  lan
option wds 1
option mode ap
 option ssid OPENWRT5G
option encryption psk2
option key blahblahblah


Between r41021 and r41023, there seem to be only hostapd related changes.
mac80211 is the same version. I'm no expert, but I would like to help
getting to the bottom of this issue. Would a tcpdump be helpful?
Most recent build r41797 also exhibits this behavior.

I've also set this up as a bug against BB on dev.openwrt.org as ticket
#17253 https://dev.openwrt.org/ticket/17253.

regards,
Chirag
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH]ramips:support Lenovo AC1200 Wireless router

2014-07-24 Thread Yousong Zhou
Hi, Lintel

On 25 July 2014 09:20, Lintel Huang lintel.hu...@gmail.com wrote:
 No problem,why not? please give me address then I express it.


I guess Roman meant a patch like
http://patchwork.openwrt.org/patch/5970/,  but I noticed that there
are MT7620A-based boards storing their MAC addresses in canonical
ASCII form which I think is not viable by mtd-mac-address.


 to Roman:
 My  boards 's GiGa Phy has three type,ICplus IP10001+, Marvell 88E5211
 ,RealTek RTL8211E,so I select it.

Hmm, is it lenovo-ac1200 specific?  If that is the case, then kmod
packages selected by a profile for this router is preferable.

BTW, could you please provide a link for this router?  I cannot find
it by search engines.  Thanks.

Regards.

yousong




 2014-07-24 23:14 GMT+08:00 Roman Yeryomin leroi.li...@gmail.com:

 On 24 July 2014 17:04, Lintel Huang lintel.hu...@gmail.com wrote:
 
  Today, Lenovo released a new product,an 11ac wireless router base MTK's
  mt7620a + mt7612e evaluation board.
  It has Two GE ports(RTL8211E) and 4 FE ports(Internal switch),256MByte
  DDR2,
  3xUSB 2.0.
  This patch will make openwrt support it.

 sounds interesting

  @@ -254,7 +260,8 @@ ramips_setup_macs()
   wan_mac=$(macaddr_add $lan_mac 1)
   ;;
 
  -wr8305rt)
  +wr8305rt | \
  +ac1200)
   lan_mac=$(mtd_get_mac_binary factory 4)
   wan_mac=$(macaddr_add $lan_mac 1)
   ;;

 Could you define ethernet mtd-mac-address in dts?
 Then it would be covered by default case here.
 I'm trying to cleanup ramips target a bit...

  +CONFIG_ICPLUS_PHY=y
  +CONFIG_MARVELL_PHY=y
  +CONFIG_RA_NAT_NONE=y

 what are these for?


 Regards,
 Roman



 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel