[OpenWrt-Devel] Add a new Amazon-SE board

2013-10-17 Thread Marco Antonio Mauro
Hi everyone,

I have a Thomson TG585v8 Amazon-SE device.

The device seems almost identical to the Netgear DGN1000B already in
openwrt, and I'd like to add support for the specific board. But can't
seem to figure out how to do it. I previously added support for a
ralink device but the process seems different here.

The board has:

- Lantiq PSB50601HL v1.2 Processor, supposedly clocked at 266MHz
- Winbond W25Q64BV SPI flash, 8MBytes
- Winbond W9825G6H SDRAM, 32MBytes total
- Broadcom BCM5325E switch
- USB2 wifi card for AP, can't remove the EMI shield to confirm model
but probably Atheros AR9271
- a couple buttons and leds.

Can anyone give me some pointers on what to do?

Thank you!

PS: I'll add the device with the photos of the board to the wiki later

-- 
Marcus905
GPG pubkey:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x1FC0ECC932FE5FAC
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Add a new Amazon-SE board

2013-10-17 Thread Jacek Kikiewicz

Hi,

First start with gainig console access...

Then you need to check what boot loader is there.
Depending on what it is your next steps will vary, let's hope it's 
supported one :)


On 17.10.2013 11:16, Marco Antonio Mauro wrote:

Hi everyone,

I have a Thomson TG585v8 Amazon-SE device.

The device seems almost identical to the Netgear DGN1000B already in
openwrt, and I'd like to add support for the specific board. But can't
seem to figure out how to do it. I previously added support for a
ralink device but the process seems different here.

The board has:

- Lantiq PSB50601HL v1.2 Processor, supposedly clocked at 266MHz
- Winbond W25Q64BV SPI flash, 8MBytes
- Winbond W9825G6H SDRAM, 32MBytes total
- Broadcom BCM5325E switch
- USB2 wifi card for AP, can't remove the EMI shield to confirm model
but probably Atheros AR9271
- a couple buttons and leds.

Can anyone give me some pointers on what to do?

Thank you!

PS: I'll add the device with the photos of the board to the wiki later


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


Re: [OpenWrt-Devel] [PATCH 3/6] pptpd: Add uci configuration for PPTPD.

2013-10-17 Thread Bruno Randolf

On 10/15/2013 02:45 PM, Jo-Philipp Wich wrote:

comments inline.


Hi, Thanks, will address the issues and resend.

bruno


On 11.10.2013 12:30, Bruno Randolf wrote:

Signed-off-by: Bruno Randolf 
---
  net/pptpd/Makefile|  3 +++
  net/pptpd/files/pptpd.init| 40 ++--
  net/pptpd/files/pptpd.uciconf |  8 
  3 files changed, 49 insertions(+), 2 deletions(-)
  create mode 100644 net/pptpd/files/pptpd.uciconf

diff --git a/net/pptpd/Makefile b/net/pptpd/Makefile
index e79e0a7..0a2f642 100644
--- a/net/pptpd/Makefile
+++ b/net/pptpd/Makefile
@@ -41,6 +41,7 @@ MAKE_FLAGS += \
  define Package/pptpd/conffiles
  /etc/pptpd.conf
  /etc/ppp/options.pptpd
+/etc/config/pptpd
  endef

  define Package/pptpd/install
@@ -58,6 +59,8 @@ define Package/pptpd/install
$(INSTALL_BIN) ./files/pptpd.init $(1)/etc/init.d/pptpd
$(INSTALL_DIR) $(1)/etc/ppp
$(INSTALL_DATA) ./files/options.pptpd $(1)/etc/ppp/
+   $(INSTALL_DIR) $(1)/etc/config
+   $(INSTALL_DATA) ./files/pptpd.uciconf $(1)/etc/config/pptpd


Per convention, shipped uci configs are called "program.config" in files/.


  endef

  $(eval $(call BuildPackage,pptpd))
diff --git a/net/pptpd/files/pptpd.init b/net/pptpd/files/pptpd.init
index a74973c..79c0ab6 100644
--- a/net/pptpd/files/pptpd.init
+++ b/net/pptpd/files/pptpd.init
@@ -6,14 +6,50 @@ BIN=pptpd
  DEFAULT=/etc/default/$BIN
  RUN_D=/var/run
  PID_F=$RUN_D/$BIN.pid
+CONFIG=/tmp/pptpd.conf


For consistency, native configs autogenerated from uci should go into
the /var/etc directory.


+CHAP_SECRETS=/etc/ppp/chap-secrets


This should reside in /var/etc or /var/run, if pptp cannot be isntructed
to look for this file there it should be symlinked there.



-start() {
+setup_user() {
+   local section="$1"
+
+   config_get user "$section" user
+   config_get passwd "$section" passwd
+   [ -n "$user" ] || return 0
+   [ -n "$passwd" ] || return 0
+
+   echo "$user pptp-server $passwd *" >> $CHAP_SECRETS


This file will grow indefinitely with each system start.


+}
+
+setup_config() {
+   local section="$1"
+
+   config_get enabled "$section" enabled
+   [ "$enabled" -eq 0 ] && return 1
+
+   cp /etc/pptpd.conf $CONFIG
+
+   config_get localip "$section" localip
+   config_get remoteip "$section" remoteip
+   [ -n "$localip" ] && echo "localip  $localip" >> $CONFIG
+   [ -n "$remoteip" ] && echo "remoteip  $remoteip" >> $CONFIG
+   return 0
+}
+
+start_pptpd() {
[ -f $DEFAULT ] && . $DEFAULT
mkdir -p $RUN_D
for m in arc4 sha1 slhc crc-ccitt ppp_generic ppp_async ppp_mppe_mppc; 
do
insmod $m >/dev/null 2>&1
done
-   $BIN $OPTIONS
+   $BIN $OPTIONS -c $CONFIG


This should use service wrappers.


+}
+
+start() {
+   config_load pptpd
+   setup_config pptpd || return
+   [ -e "$CHAP_SECRETS" ] && rm -f $CHAP_SECRETS
+   config_foreach setup_user key
+   start_pptpd
  }

  stop() {
diff --git a/net/pptpd/files/pptpd.uciconf b/net/pptpd/files/pptpd.uciconf
new file mode 100644
index 000..66cf0be
--- /dev/null
+++ b/net/pptpd/files/pptpd.uciconf
@@ -0,0 +1,8 @@
+config service 'pptpd'
+   option 'enabled' '0'
+   option 'localip' '192.168.0.1'
+   option 'remoteip' '192.168.0.20-30'
+
+config 'key'


Wouldn't be a section name like "config login" better suited?


+   option 'user' 'youruser'
+   option 'passwd' 'yourpass'


For consistency with existing configs it is better to write out the
option names, means "username" and "password" instead of "user" and
"passwd".


~ Jow



___
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


Re: [OpenWrt-Devel] [PATCH 6/6] isc-dhcp: dhcrelay: Add RFC3527 link selection sub-option

2013-10-17 Thread Bruno Randolf

On 10/15/2013 02:52 PM, Jo-Philipp Wich wrote:

+++ b/net/isc-dhcp/patches/100-relay-rfc3527-link-selection.patch


Can you elaborate on the origin of this patch? Was it written by you?


Yes, this patch was written by me, and I have sent it for inclusion to 
the "upstream" ISC "dhcp-hackers" mailinglist but unfortunately without 
any feedback yet.


As explained in the RFC (http://tools.ietf.org/html/rfc3527) and 
mentioned in my commit message, this (RFC3537) link selection sub-option 
is a way to tell the DHCP server how to reach the relay agent, and at 
the same time select the IP address range from another subnet. This is 
necessary when both are on different subnets and the DHCP server does 
not know how to reach the relay agent just based on the DCHP subnet. In 
our case this happens in a mesh network.


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


Re: [OpenWrt-Devel] sysupgrade support for OM2P working in AA?

2013-10-17 Thread Marek Lindner
On Wednesday 16 October 2013 09:48:33 Ben West wrote:
> I noticed that my build tree for AA r38347 only produces the
> openwrt-ar71xx-generic-om2p-squashfs-factory.bin image for Open Mesh OM2P,
> not the sysupgrade image.
> 
> The wiki page suggests these images are to be manually flashed to the
> device's partitions, instead of using sysypgrade:
> 
>  build_dir/linux-ar71xx_generic/vmlinux-om2p.uImage
>  build_dir/linux-ar71xx_generic/root.squashfs

What wiki would that be ? Do you have a link ?


> The revision history for this platform's upgrade script doesn't suggest
> anything has been intentionally disabled:
> 
> https://dev.openwrt.org/log/branches/attitude_adjustment/target/linux/ar71xx
> /base-files/lib/upgrade
> 
> Or should the "factory" image now be used when running sysupgrade on an
> OM2P?

The OM2P build process generates generates a single image for sysupgrade and 
installations. In short: Yes, you can use the 'factory' image for 
sysupgrading.


> Since I only have one such device, I'm asking here first before possibly
> finding things out the hard way. ;)

You will have a hard time bricking your node because you can always recover 
using ap51-flash.

Cheers,
Marek


signature.asc
Description: This is a digitally signed message part.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Add a new Amazon-SE board

2013-10-17 Thread Tomislav Požega
thomson usually sticks with crappy broadcom so don't give much hope for
AR9271..


On 17 October 2013 09:33, Jacek Kikiewicz  wrote:

> Hi,
>
> First start with gainig console access...
>
> Then you need to check what boot loader is there.
> Depending on what it is your next steps will vary, let's hope it's
> supported one :)
>
>
> On 17.10.2013 11:16, Marco Antonio Mauro wrote:
>
>> Hi everyone,
>>
>> I have a Thomson TG585v8 Amazon-SE device.
>>
>> The device seems almost identical to the Netgear DGN1000B already in
>> openwrt, and I'd like to add support for the specific board. But can't
>> seem to figure out how to do it. I previously added support for a
>> ralink device but the process seems different here.
>>
>> The board has:
>>
>> - Lantiq PSB50601HL v1.2 Processor, supposedly clocked at 266MHz
>> - Winbond W25Q64BV SPI flash, 8MBytes
>> - Winbond W9825G6H SDRAM, 32MBytes total
>> - Broadcom BCM5325E switch
>> - USB2 wifi card for AP, can't remove the EMI shield to confirm model
>> but probably Atheros AR9271
>> - a couple buttons and leds.
>>
>> Can anyone give me some pointers on what to do?
>>
>> Thank you!
>>
>> PS: I'll add the device with the photos of the board to the wiki later
>>
>>  __**_
> 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


Re: [OpenWrt-Devel] OpenWRT on Ubicom Chipsets

2013-10-17 Thread James Hilliard
So, I think i more or less got the boot processes down, however I don't
have hardware with me right now. Boot goes from ultra>uboot>linux more or
less. From the looks of it getting a console on uboot should be fairly
straight forward. I'm going to attempt to compile an oem build with the
uboot console enabled that way we can debug and flash over Ethernet instead
of serial. Msg me on gtalk and ill send you some builds(this email).


On Thu, Oct 17, 2013 at 2:04 AM, michal-osowie...@o2.pl <
michal-osowie...@o2.pl> wrote:

> Hi James
> AFAIR dir-657 soucecode has openwrt's port which compiles but has no
> ethernet switch enabled/ported. I's hard to test develop anything without
> flash programmer so i dropped testing. It would be nice if you could add
> this model to your work
>
> Thanks,
> Michal
>
>
> Dnia 16 października 2013 20:53 James Hilliard 
> napisał(a):
>
> > I think i'll attempt to support this and get some
> vendor/deviceconfigs integrated, can the changes that removed arch support
> bereverted easily in trunk? I've been working off of 12.09 here
> https://github.com/Lightsword1942/openwrtubicom and manually merging some
> things let me know if you have anysuggestions. I'm not sure what this
> is using for include/siteand that's what I'm currently hung up on.
> > On Mon, Sep 16, 2013 at 6:11 AM, Florian Fainelli 
> wrote:
> > Hello,
> > 2013/9/16 James Hilliard :
> > > Anyone interested in OpenWRT on Ubicom? They used OpenWRTinternally so
> > > there is already source ready(may be a little outdatedthough). Also
> have
> > > some router specific sources of both it and stock.
> > OpenWrt did "support" the ubicom32 architecture for awhile, but since
> > this is a very quirky architecture and nobody could step up as a
> > maintainer, it got removed. Unless you are willing to support that
> > architecture, I see no point in supporting it since it reallyrequired
> > a lot of quirks (special "hypervisor" software,bootloader and !MMU).
> > --
> > Florian
> > ___
> > 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 mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] ath9k / set txpower / TP-LINK TL-WR841N/ND v8

2013-10-17 Thread Bastian Bittorf
we are facing a strange issue on 2 routers with identical
hardware: TP-LINK TL-WR841N/ND v8 - i cannot set txpower >18 dBm
according to 'iwconfig'/'iwinfo' on ONE router. the
other (different location, same openwrt-revision r38432) can do that:

root@BerkaerBahnhof-Knoten59:~ uci set wireless.radio0.txpower=15; wifi; sleep 
30; iwinfo
command failed: Device or resource busy (-16)
Configuration file: /var/run/hostapd-phy0.conf
Using interface wlan0 with hwaddr 64:70:02:59:41:3e and ssid 
"BerkaerBahnhofWeimarnetz"
wlan0 ESSID: "BerkaerBahnhofWeimarnetz"
  Access Point: 64:70:02:59:41:3E
  Mode: Master  Channel: 5 (2.432 GHz)
  Tx-Power: 15 dBm  Link Quality: 36/70
  Signal: -74 dBm  Noise: -95 dBm
  Bit Rate: 14.4 MBit/s
  Encryption: none
  Type: nl80211  HW Mode(s): 802.11bgn
  Hardware: unknown [Generic MAC80211]
  TX power offset: unknown
  Frequency offset: unknown
  Supports VAPs: yes  PHY name: phy0

wlan0-1   ESSID: "weimarnetz"
  Access Point: 02:CA:FF:EE:BA:BE
  Mode: Ad-Hoc  Channel: 5 (2.432 GHz)
  Tx-Power: 15 dBm  Link Quality: unknown/70
  Signal: unknown  Noise: -95 dBm
  Bit Rate: unknown
  Encryption: unknown
  Type: nl80211  HW Mode(s): 802.11bgn
  Hardware: unknown [Generic MAC80211]
  TX power offset: unknown
  Frequency offset: unknown
  Supports VAPs: yes  PHY name: phy0

root@BerkaerBahnhof-Knoten59:~ uci set wireless.radio0.txpower=20; wifi; sleep 
30; iwinfo
command failed: Device or resource busy (-16)
Configuration file: /var/run/hostapd-phy0.conf
Using interface wlan0 with hwaddr 64:70:02:59:41:3e and ssid 
"BerkaerBahnhofWeimarnetz"
wlan0 ESSID: "BerkaerBahnhofWeimarnetz"
  Access Point: 64:70:02:59:41:3E
  Mode: Master  Channel: 5 (2.432 GHz)
  Tx-Power: 20 dBm  Link Quality: 29/70
  Signal: -81 dBm  Noise: -95 dBm
  Bit Rate: 13.0 MBit/s
  Encryption: none
  Type: nl80211  HW Mode(s): 802.11bgn
  Hardware: unknown [Generic MAC80211]
  TX power offset: unknown
  Frequency offset: unknown
  Supports VAPs: yes  PHY name: phy0

wlan0-1   ESSID: "weimarnetz"
  Access Point: 02:CA:FF:EE:BA:BE
  Mode: Ad-Hoc  Channel: 5 (2.432 GHz)
  Tx-Power: 20 dBm  Link Quality: unknown/70
  Signal: unknown  Noise: -95 dBm
  Bit Rate: unknown
  Encryption: unknown
  Type: nl80211  HW Mode(s): 802.11bgn
  Hardware: unknown [Generic MAC80211]
  TX power offset: unknown
  Frequency offset: unknown
  Supports VAPs: yes  PHY name: phy0

root@BerkaerBahnhof-Knoten59:~ uci show wireless
wireless.radio0=wifi-device
wireless.radio0.type=mac80211
wireless.radio0.country=BO
wireless.radio0.channel=5
wireless.radio0.frag=off
wireless.radio0.beacon_int=1000
wireless.radio0.path=platform/ar934x_wmac
wireless.radio0.hwmode=11ng
wireless.radio0.htmode=HT20
wireless.radio0.ht_capab=LDPC SHORT-GI-20 SHORT-GI-40 TX-STBC RX-STBC1 
DSSS_CCK-40
wireless.radio0.txpower=20
wireless.@wifi-iface[0]=wifi-iface
wireless.@wifi-iface[0].device=radio0
wireless.@wifi-iface[0].network=wlanadhoc
wireless.@wifi-iface[0].mode=adhoc
wireless.@wifi-iface[0].bssid=02:ca:ff:ee:ba:be
wireless.@wifi-iface[0].ssid=weimarnetz
wireless.@wifi-iface[0].mcast_rate=1000
wireless.@wifi-iface[1]=wifi-iface
wireless.@wifi-iface[1].device=radio0
wireless.@wifi-iface[1].network=wlan
wireless.@wifi-iface[1].mode=ap
wireless.@wifi-iface[1].ssid=BerkaerBahnhofWeimarnetz
wireless.@wifi-iface[1].encryption=none
wireless.@auto_optimize[0]=auto_optimize
wireless.@auto_optimize[0].neigh=off



## the other one 

root@die-koenigin:~ uci set wireless.radio0.txpower=15; wifi; sleep 30; iwinfo
command failed: Device or resource busy (-16)
Configuration file: /var/run/hostapd-phy0.conf
Using interface wlan0 with hwaddr 64:66:b3:ab:4c:e0 and ssid "Weimarnetz - 
Breitscheid 4"
wlan0 ESSID: "Weimarnetz - Breitscheid 4"
  Access Point: 64:66:B3:AB:4C:E0
  Mode: Master  Channel: 5 (2.432 GHz)
  Tx-Power: 15 dBm  Link Quality: unknown/70
  Signal: unknown  Noise: -95 dBm
  Bit Rate: unknown
  Encryption: none
  Type: nl80211  HW Mode(s): 802.11bgn
  Hardware: unknown [Generic MAC80211]
  TX power offset: unknown
  Frequency offset: unknown
  Supports VAPs: yes  PHY name: phy0

wlan0-1   ESSID: "weimarnetz"
  Access Point: 02:CA:FF:EE:BA:BE
  Mode: Ad-Hoc  Channel: 5 (2.432 GHz)
  Tx-Power: 15 dBm  Link Quality: 23/70
  Signal: -87 dBm  Noise: -95 dBm
  Bit Rate: 1.0 MBit/s
  Encryption: unknown
  Type: nl80211  HW Mode(s): 802.11bgn
  Hardware: unknown [Generic MAC80211]
  TX power offset: unknown
  Frequency o

Re: [OpenWrt-Devel] sysupgrade support for OM2P working in AA?

2013-10-17 Thread Ben West
Hi Marek,

This is the wiki page in question:
http://wiki.openwrt.org/toh/openmesh/om2p#upgrading.openwrt

Thank you for clarifying that sysupgrade does work!



On Thu, Oct 17, 2013 at 6:17 AM, Marek Lindner
wrote:

> On Wednesday 16 October 2013 09:48:33 Ben West wrote:
> > I noticed that my build tree for AA r38347 only produces the
> > openwrt-ar71xx-generic-om2p-squashfs-factory.bin image for Open Mesh
> OM2P,
> > not the sysupgrade image.
> >
> > The wiki page suggests these images are to be manually flashed to the
> > device's partitions, instead of using sysypgrade:
> >
> >  build_dir/linux-ar71xx_generic/vmlinux-om2p.uImage
> >  build_dir/linux-ar71xx_generic/root.squashfs
>
> What wiki would that be ? Do you have a link ?
>
>
> > The revision history for this platform's upgrade script doesn't suggest
> > anything has been intentionally disabled:
> >
> >
> https://dev.openwrt.org/log/branches/attitude_adjustment/target/linux/ar71xx
> > /base-files/lib/upgrade
> >
> > Or should the "factory" image now be used when running sysupgrade on an
> > OM2P?
>
> The OM2P build process generates generates a single image for sysupgrade
> and
> installations. In short: Yes, you can use the 'factory' image for
> sysupgrading.
>
>
> > Since I only have one such device, I'm asking here first before possibly
> > finding things out the hard way. ;)
>
> You will have a hard time bricking your node because you can always recover
> using ap51-flash.
>
> Cheers,
> Marek
>



-- 
Ben West
http://gowasabi.net
b...@gowasabi.net
314-246-9434
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] Update kernel for alix2 to 3.10.15

2013-10-17 Thread tobias . steinicke
From: Tobias Steinicke 

Without this patch, the patch
target/linux/generic/patches-3.10/770-bgmac-backport.patch
would not apply.

Tobias

Signed-off-by: Tobias Steinicke 
---
 target/linux/x86/alix2/target.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/x86/alix2/target.mk b/target/linux/x86/alix2/target.mk
index 2d789a1..36243a2 100644
--- a/target/linux/x86/alix2/target.mk
+++ b/target/linux/x86/alix2/target.mk
@@ -19,7 +19,7 @@ DEFAULT_PACKAGES += \
kmod-ledtrig-heartbeat kmod-ledtrig-gpio \
kmod-ledtrig-netdev \
kmod-cpu-msr hwclock wpad
-LINUX_VERSION:=3.10.13
+LINUX_VERSION:=3.10.15
 CS5535_MASK:=0x0b42
 
 CPU_TYPE := geode
-- 
1.8.3.2.701.g8c4e4ec
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH][AA][packages] siproxd: fix typo in variable name in init script

2013-10-17 Thread Jiri Slachta

Signed-off-by: Jiri Slachta 
---
 net/siproxd/files/siproxd.init |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/siproxd/files/siproxd.init b/net/siproxd/files/siproxd.init
index 4ecdfbb..1ad6e0f 100644
--- a/net/siproxd/files/siproxd.init
+++ b/net/siproxd/files/siproxd.init
@@ -128,7 +128,7 @@ start_instance() {
echo ua_string = "$ua_string" >> "$siproxd_conf_prefix$cfg"
echo use_rport = "$use_rport" >> "$siproxd_conf_prefix$cfg"
if [ -n "$outbound_proxy_host" ]; then
-   echo oubound_proxy_host = "$outbound_proxy_host" >> 
"$siproxd_conf_prefix$cfg"
+   echo outbound_proxy_host = "$outbound_proxy_host" >> 
"$siproxd_conf_prefix$cfg"
fi
if [ -n "$outbound_proxy_port" ]; then
echo outbound_proxy_port = "$outbound_proxy_port" >> 
"$siproxd_conf_prefix$cfg"
-- 
1.7.9.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ath9k / set txpower / TP-LINK TL-WR841N/ND v8

2013-10-17 Thread Weedy
On 17 Oct 2013 08:25, "Bastian Bittorf"  wrote:
>
> we are facing a strange issue on 2 routers with identical
> hardware: TP-LINK TL-WR841N/ND v8 - i cannot set txpower >18 dBm
> according to 'iwconfig'/'iwinfo' on ONE router. the
> other (different location, same openwrt-revision r38432) can do that:
>
> what can we do?
>
> bye, bastian

>From what I understand, old ath9k would accept any tx power level that was
valid for your region, but would fail silently if blocked by the EPROM.

Currently the driver relays the error if it's blocked by region AND EPROM,
instead of just region.
Nothing has changed physically, the driver just stopped pretending.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Update kernel for alix2 to 3.10.15

2013-10-17 Thread Felix Fietkau
On 2013-10-17 3:45 PM, tobias.steini...@net.t-labs.tu-berlin.de wrote:
> From: Tobias Steinicke 
> 
> Without this patch, the patch
> target/linux/generic/patches-3.10/770-bgmac-backport.patch
> would not apply.
> 
> Tobias
> 
> Signed-off-by: Tobias Steinicke 
Committed in r38438, thanks.

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


Re: [OpenWrt-Devel] [RFC] netifd: Avoid concurrent calls to "wifi up/down"

2013-10-17 Thread Felix Fietkau
On 2013-10-11 10:33 AM, Helmut Schaa wrote:
> Multiple "wifi up/down" invocations can conflict badly with each other
> resulting in a somehow broken wifi setup.
> 
> This can be triggered by calling "/etc/init.d/network reload" quickly
> after netifd started up (before the sleep 5 has finished).
> 
> This is a first try to synchronize the usage of "wifi up/down".
> 
> Signed-off-by: Helmut Schaa 
> ---
> 
> Sending as RFC since I consider this an ugly hack and somebody else might 
> have a better idea.
> Helmut
I'm working on adding wifi support to netifd and hope to have it ready
in a few days or so. It will fix the kind of race condition you're
describing.

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


[OpenWrt-Devel] [PATCH 0/3] trunk packages resend

2013-10-17 Thread Bruno Randolf
Hi!

Here I resend the PPTPD and dhcrelay patches for trunk packages. I tried to
address all issues jow has mentioned before.

Bruno Randolf (3):
  pptpd: Add uci configuration for PPTPD.
  isc-dhcp: dhcrelay: Add more UCI options
  isc-dhcp: dhcrelay: Add RFC3527 link selection sub-option

 net/isc-dhcp/Makefile  |   8 ++
 net/isc-dhcp/files/dhcrelay4.init  |  43 +++--
 net/isc-dhcp/files/etc/config/dhcrelay |  27 --
 .../patches/100-relay-rfc3527-link-selection.patch | 100 +
 net/pptpd/Makefile |   5 +-
 net/pptpd/files/pptpd.config   |   8 ++
 net/pptpd/files/pptpd.init |  46 --
 7 files changed, 220 insertions(+), 17 deletions(-)
 create mode 100644 net/isc-dhcp/patches/100-relay-rfc3527-link-selection.patch
 create mode 100644 net/pptpd/files/pptpd.config

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


[OpenWrt-Devel] [PATCH 2/3] isc-dhcp: dhcrelay: Add more UCI options

2013-10-17 Thread Bruno Randolf
Add more options to dhcrelay UCI and init script:

- enabled
- interfaces: Listen interfaces
- relay_mode: What to do about packets that already have a relay option

Also mark /etc/config/dhcrelay as conffile

Signed-off-by: Bruno Randolf 
---
 net/isc-dhcp/Makefile  |  8 
 net/isc-dhcp/files/dhcrelay4.init  | 36 --
 net/isc-dhcp/files/etc/config/dhcrelay | 24 ++-
 3 files changed, 57 insertions(+), 11 deletions(-)

diff --git a/net/isc-dhcp/Makefile b/net/isc-dhcp/Makefile
index aa27aca..5e5471f 100644
--- a/net/isc-dhcp/Makefile
+++ b/net/isc-dhcp/Makefile
@@ -55,11 +55,19 @@ $(call Package/isc-dhcp-relay-ipv6/description)
  This package is compiled with IPv4 support only.
 endef
 
+define Package/isc-dhcp-relay-ipv4/conffiles
+/etc/config/dhcrelay
+endef
+
 define Package/isc-dhcp-relay-ipv6/description
 $(call Package/isc-dhcp-relay/description)
  This package is compiled with IPv4 and IPv6 support.
 endef
 
+define Package/isc-dhcp-relay-ipv6/conffiles
+/etc/config/dhcrelay
+endef
+
 define Package/isc-dhcp-client-ipv4
   $(call Package/isc-dhcp/Default)
   TITLE+= client (without IPv6)
diff --git a/net/isc-dhcp/files/dhcrelay4.init 
b/net/isc-dhcp/files/dhcrelay4.init
index 70905cf..e1e6871 100644
--- a/net/isc-dhcp/files/dhcrelay4.init
+++ b/net/isc-dhcp/files/dhcrelay4.init
@@ -8,15 +8,39 @@ SERVICE_PID_FILE="/var/run/dhcrelay4.pid"
 SERVICE_USE_PID=1
 
 start() {
-local relay_dhcpserver
+   . /lib/functions/network.sh
+   config_load dhcrelay
+   local args=""
 
-config_load dhcrelay
-config_get relay_dhcpserver ipv4 dhcpserver
+   local enabled
+   config_get_bool enabled ipv4 enabled 0
+   [ "$enabled" -eq 0 ] && return 0
 
-service_start /usr/sbin/dhcrelay -4 -q \
--pf $SERVICE_PID_FILE $relay_dhcpserver
+   # listen interfaces
+   local interfaces
+   local ifname
+   config_get interfaces ipv4 interfaces
+   for net in $interfaces; do
+   if network_get_device ifname "$net"; then
+   append args "-i $ifname"
+   fi
+   done
+
+   # relay mode
+   local relay_mode
+   config_get relay_mode ipv4 relay_mode
+   [ -n "$relay_mode" ] && append args "-m $relay_mode"
+
+   # dhcp server address
+   local server
+   config_get server ipv4 dhcpserver
+   [ -n "$server" ] || return 0
+   append args "$server"
+
+   service_start /usr/sbin/dhcrelay -4 -q \
+   -pf $SERVICE_PID_FILE $args
 }
 
 stop() {
-service_stop /usr/sbin/dhcrelay
+   service_stop /usr/sbin/dhcrelay
 }
diff --git a/net/isc-dhcp/files/etc/config/dhcrelay 
b/net/isc-dhcp/files/etc/config/dhcrelay
index 5fde239..1b89782 100644
--- a/net/isc-dhcp/files/etc/config/dhcrelay
+++ b/net/isc-dhcp/files/etc/config/dhcrelay
@@ -1,10 +1,24 @@
 
 config dhcrelay ipv4
-option dhcpserver '192.0.2.10'
+   option 'enabled' '0'
+
+   # IP address of the server
+   option 'dhcpserver' '192.0.2.10'
+
+   # network interfaces to listen on (e.g. lan or wan)
+   option 'interfaces' ''
+
+   # What to do about packets that already have a relay option:
+   # 'append': Forward and append our own relay option
+   # 'replace': Forward, but replace theirs with ours (default)
+   # 'forward': Forward without changes
+   # 'discard': Don't forward
+   option 'relay_mode' ''
+
 
 config dhcrelay ipv6
-#option dhcpserver '2001:db8:1::1'
-option upper 'eth1'
-list lower 'eth0.2'
-list lower 'eth0.3'
+#  option dhcpserver '2001:db8:1::1'
+   option upper 'eth1'
+   list lower 'eth0.2'
+   list lower 'eth0.3'
 
-- 
1.8.1.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/3] pptpd: Add uci configuration for PPTPD.

2013-10-17 Thread Bruno Randolf
Signed-off-by: Bruno Randolf 
---
 net/pptpd/Makefile   |  5 -
 net/pptpd/files/pptpd.config |  8 
 net/pptpd/files/pptpd.init   | 46 +++-
 3 files changed, 53 insertions(+), 6 deletions(-)
 create mode 100644 net/pptpd/files/pptpd.config

diff --git a/net/pptpd/Makefile b/net/pptpd/Makefile
index e79e0a7..318ed11 100644
--- a/net/pptpd/Makefile
+++ b/net/pptpd/Makefile
@@ -22,7 +22,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/pptpd
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+kmod-ppp +kmod-gre +ppp
+  DEPENDS:=+kmod-ppp +kmod-gre +kmod-mppe +ppp
   TITLE:=PopTop pptp server
   URL:=http://www.poptop.org/
   SUBMENU:=VPN
@@ -41,6 +41,7 @@ MAKE_FLAGS += \
 define Package/pptpd/conffiles
 /etc/pptpd.conf
 /etc/ppp/options.pptpd
+/etc/config/pptpd
 endef
 
 define Package/pptpd/install
@@ -58,6 +59,8 @@ define Package/pptpd/install
$(INSTALL_BIN) ./files/pptpd.init $(1)/etc/init.d/pptpd
$(INSTALL_DIR) $(1)/etc/ppp
$(INSTALL_DATA) ./files/options.pptpd $(1)/etc/ppp/
+   $(INSTALL_DIR) $(1)/etc/config
+   $(INSTALL_DATA) ./files/pptpd.config $(1)/etc/config/pptpd
 endef
 
 $(eval $(call BuildPackage,pptpd))
diff --git a/net/pptpd/files/pptpd.config b/net/pptpd/files/pptpd.config
new file mode 100644
index 000..b2d5df5
--- /dev/null
+++ b/net/pptpd/files/pptpd.config
@@ -0,0 +1,8 @@
+config service 'pptpd'
+   option 'enabled' '0'
+   option 'localip' '192.168.0.1'
+   option 'remoteip' '192.168.0.20-30'
+
+config 'login'
+   option 'username' 'youruser'
+   option 'password' 'yourpass'
diff --git a/net/pptpd/files/pptpd.init b/net/pptpd/files/pptpd.init
index a74973c..b1381b2 100644
--- a/net/pptpd/files/pptpd.init
+++ b/net/pptpd/files/pptpd.init
@@ -2,20 +2,56 @@
 # Copyright (C) 2006 OpenWrt.org
 
 START=60
-BIN=pptpd
+BIN=/usr/sbin/pptpd
 DEFAULT=/etc/default/$BIN
 RUN_D=/var/run
 PID_F=$RUN_D/$BIN.pid
+CONFIG=/var/etc/pptpd.conf
+CHAP_SECRETS=/var/etc/chap-secrets
 
-start() {
+setup_login() {
+   local section="$1"
+
+   config_get username "$section" username
+   config_get password "$section" password
+   [ -n "$username" ] || return 0
+   [ -n "$password" ] || return 0
+
+   echo "$username pptp-server $password *" >> $CHAP_SECRETS
+}
+
+setup_config() {
+   local section="$1"
+
+   config_get enabled "$section" enabled
+   [ "$enabled" -eq 0 ] && return 1
+
+   cp /etc/pptpd.conf $CONFIG
+
+   config_get localip "$section" localip
+   config_get remoteip "$section" remoteip
+   [ -n "$localip" ] && echo "localip  $localip" >> $CONFIG
+   [ -n "$remoteip" ] && echo "remoteip  $remoteip" >> $CONFIG
+   return 0
+}
+
+start_pptpd() {
[ -f $DEFAULT ] && . $DEFAULT
mkdir -p $RUN_D
-   for m in arc4 sha1 slhc crc-ccitt ppp_generic ppp_async ppp_mppe_mppc; 
do
+   for m in arc4 sha1_generic slhc crc-ccitt ppp_generic ppp_async 
ppp_mppe; do
insmod $m >/dev/null 2>&1
done
-   $BIN $OPTIONS
+   ln -sfn $CHAP_SECRETS /etc/ppp/chap-secrets
+   service_start $BIN $OPTIONS -c $CONFIG
+}
+
+start() {
+   config_load pptpd
+   setup_config pptpd || return
+   config_foreach setup_login login
+   start_pptpd
 }
 
 stop() {
-   [ -f $PID_F ] && kill $(cat $PID_F)
+   service_stop $BIN
 }
-- 
1.8.1.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/3] isc-dhcp: dhcrelay: Add RFC3527 link selection sub-option

2013-10-17 Thread Bruno Randolf
RFC3527 link selection sub-option is used to select the "uplink" interface of
dhcrelay in cases where the DHCP server does not know how to reach the dhcrelay
based on the DHCP range. This can happen in weird network configurations like
Mesh networks.

Signed-off-by: Bruno Randolf 
---
 net/isc-dhcp/files/dhcrelay4.init  |   7 ++
 net/isc-dhcp/files/etc/config/dhcrelay |   3 +
 .../patches/100-relay-rfc3527-link-selection.patch | 100 +
 3 files changed, 110 insertions(+)
 create mode 100644 net/isc-dhcp/patches/100-relay-rfc3527-link-selection.patch

diff --git a/net/isc-dhcp/files/dhcrelay4.init 
b/net/isc-dhcp/files/dhcrelay4.init
index e1e6871..9af0f84 100644
--- a/net/isc-dhcp/files/dhcrelay4.init
+++ b/net/isc-dhcp/files/dhcrelay4.init
@@ -26,6 +26,13 @@ start() {
fi
done
 
+   # link selection sub-option (RFC3527)
+   local link_selection
+   config_get link_selection ipv4 link_selection
+   if network_get_device ifname "$link_selection"; then
+   append args "-l $ifname"
+   fi
+
# relay mode
local relay_mode
config_get relay_mode ipv4 relay_mode
diff --git a/net/isc-dhcp/files/etc/config/dhcrelay 
b/net/isc-dhcp/files/etc/config/dhcrelay
index 1b89782..b3b53b5 100644
--- a/net/isc-dhcp/files/etc/config/dhcrelay
+++ b/net/isc-dhcp/files/etc/config/dhcrelay
@@ -15,6 +15,9 @@ config dhcrelay ipv4
# 'discard': Don't forward
option 'relay_mode' ''
 
+   # enable RFC3527 link selection sub-option and use the IP address of
+   # the specified network interface as "uplink" IP address (e.g. wan)
+   option 'link_selection' ''
 
 config dhcrelay ipv6
 #  option dhcpserver '2001:db8:1::1'
diff --git a/net/isc-dhcp/patches/100-relay-rfc3527-link-selection.patch 
b/net/isc-dhcp/patches/100-relay-rfc3527-link-selection.patch
new file mode 100644
index 000..1f593ee
--- /dev/null
+++ b/net/isc-dhcp/patches/100-relay-rfc3527-link-selection.patch
@@ -0,0 +1,100 @@
+--- a/relay/dhcrelay.c
 b/relay/dhcrelay.c
+@@ -65,6 +65,7 @@ int server_packets_relayed = 0;  /* Packe
+ int client_packet_errors = 0; /* Errors sending packets to clients. */
+ 
+ int add_agent_options = 0;/* If nonzero, add relay agent options. */
++int add_rfc3527_suboption = 0;/* If nonzero, add RFC3527 link 
selection sub-option. */
+ 
+ int agent_option_errors = 0;/* Number of packets forwarded without
+  agent options because there was no room. */
+@@ -104,6 +105,8 @@ struct server_list {
+   struct sockaddr_in to;
+ } *servers;
+ 
++struct interface_info *uplink;
++
+ #ifdef DHCPv6
+ struct stream_list {
+   struct stream_list *next;
+@@ -144,6 +147,7 @@ static const char url[] =
+ " [-pf ] [--no-pid]\n"\
+ " [-m append|replace|forward|discard]\n" \
+ " [-i interface0 [ ... -i interfaceN]\n" \
++" [-l interface]\n" \
+ " server0 [ ... serverN]\n\n" \
+ "   dhcrelay -6   [-d] [-q] [-I] [-c ] [-p ]\n" \
+ " [-pf ] [--no-pid]\n"\
+@@ -157,6 +161,7 @@ static const char url[] =
+ "[-pf ] [--no-pid]\n"\
+ "[-m append|replace|forward|discard]\n" \
+ "[-i interface0 [ ... -i interfaceN]\n" \
++"[-l interface]\n" \
+ "server0 [ ... serverN]\n\n"
+ #endif
+ 
+@@ -314,6 +319,20 @@ main(int argc, char **argv) {
+   agent_relay_mode = discard;
+   } else
+   usage();
++  } else if (!strcmp (argv [i], "-l")) {
++  add_agent_options = 1;
++  add_rfc3527_suboption = 1;
++  if (++i == argc)
++  usage();
++
++  status = interface_allocate(&uplink, MDL);
++  if (status != ISC_R_SUCCESS)
++  log_fatal("%s: interface_allocate: %s",
++argv[i],
++isc_result_totext(status));
++  strcpy(uplink->name, argv[i]);
++  interface_snorf(uplink, INTERFACE_REQUESTED);
++  //interface_dereference(&uplink, MDL);
+   } else if (!strcmp(argv[i], "-D")) {
+ #ifdef DHCPv6
+   if (local_family_set && (local_family == AF_INET6)) {
+@@ -685,12 +704,17 @@ do_relay4(struct interface_info *ip, str
+  ip->addresses[0])))
+   return;
+ 
++  /* RFC3527: Replace giaddr address by uplink address. The original
++   * giaddr will be used in the link selection sub-option */
++  if (add_rfc3527_suboption)
++  packet->giaddr = uplink->addresses[0];
++
+   /* If giaddr is not already set, 

Re: [OpenWrt-Devel] [RFC] netifd: Avoid concurrent calls to "wifi up/down"

2013-10-17 Thread Helmut Schaa
On Thu, Oct 17, 2013 at 4:11 PM, Felix Fietkau  wrote:
> On 2013-10-11 10:33 AM, Helmut Schaa wrote:
>> Multiple "wifi up/down" invocations can conflict badly with each other
>> resulting in a somehow broken wifi setup.
>>
>> This can be triggered by calling "/etc/init.d/network reload" quickly
>> after netifd started up (before the sleep 5 has finished).
>>
>> This is a first try to synchronize the usage of "wifi up/down".
>>
>> Signed-off-by: Helmut Schaa 
>> ---
>>
>> Sending as RFC since I consider this an ugly hack and somebody else might 
>> have a better idea.
>> Helmut
> I'm working on adding wifi support to netifd and hope to have it ready
> in a few days or so. It will fix the kind of race condition you're
> describing.

Awesome, that would be even better!
I'll carry this patch in my tree for now.

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


[OpenWrt-Devel] Quick hack for kernel entropy problem on MIPS

2013-10-17 Thread chrono

Ahoi everyone,

it was requested on IRC that I send my solution to the entropy problem 
with the current

kernel (e.g. having 0 available entropy):

root@OpenWrt:/# cat /proc/sys/kernel/random/entropy_avail
0

In the build root I've patched

build_dir/linux-ar71xx_nand/linux-3.3.8/arch/mips/include/asm/timex.h

--- timex.h?id=refs%2Ftags%2Fv3.3.8 2013-10-17 17:23:12.0 
+0200

+++ timex.h 2013-10-17 17:07:59.888938183 +0200
@@ -35,7 +35,13 @@

 static inline cycles_t get_cycles(void)
 {
-   return 0;
+
+   if (cpu_has_counter) {
+   return read_c0_count();
+   }
+   else {
+   return 0;   /* no usable counter */
+   }
 }

 #endif /* __KERNEL__ */

After applying and rebuilding the kernel:

root@OpenWrt:/# cat /proc/sys/kernel/random/entropy_avail
162

This was tested on mips32r2/24kc (Mikrotik Routerboard 450G) but it 
might work
for others as well. Until this is fixed upstream and openwrt follows up 
with
the kernel, it might be an easy fix for some people in order to have 
better

entropy for SSL/VPN.

Hopefully it will be useful to someone,

chrono
--

Apollo-NG Mobile Hackerspace
https://apollo.open-resource.org/
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Quick hack for kernel entropy problem on MIPS

2013-10-17 Thread Weedy
On Thu, Oct 17, 2013 at 11:40 AM, chrono  wrote:
> Ahoi everyone,
>
> it was requested on IRC that I send my solution to the entropy problem with
> the current
> kernel (e.g. having 0 available entropy):
>
> root@OpenWrt:/# cat /proc/sys/kernel/random/entropy_avail
> 0
Uhh ok?
root@OpenWrt:~# cat /proc/sys/kernel/random/entropy_avail
1189

> This was tested on mips32r2/24kc (Mikrotik Routerboard 450G) but it might
root@OpenWrt:~# cat /proc/cpuinfo
system type: Atheros AR9344 rev 2
machine: TP-LINK TL-WDR3600/4300/4310
processor: 0
cpu model: MIPS 74Kc V4.12
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx: Fix sysupgrades for Allnet and OpenMesh devices

2013-10-17 Thread Sven Eckelmann
Both Allnet and OpenMesh sysupgrade uses fw_setenv from uboot-envtools to
change different settings in the uboot environment. uboot-envtools version
2013.01 introduced a filesystem lock "/var/lock/fw_printenv.lock" to guarantee
mutually exclusive access to the uboot environment. But the path /var doesn't
exist on the sysupgrade ramfs.

An upgrade on these devices fails since r36033 ("[package] uboot-envtools:
upgrade to version 2013.01.01") with following messages:

 Error opening lock file /var/lock/fw_printenv.lock
 failed to update U-Boot environment

Creating the "/var/lock" path before running fw_setenv is therefore a
requirement unless the locking functionality in fw_setenv is removed or
replaced with optional locking.

Signed-off-by: Sven Eckelmann 
---
 target/linux/ar71xx/base-files/lib/upgrade/allnet.sh   | 5 +
 target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh | 4 
 2 files changed, 9 insertions(+)

diff --git a/target/linux/ar71xx/base-files/lib/upgrade/allnet.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/allnet.sh
index 9a375ff..8076fbd 100644
--- a/target/linux/ar71xx/base-files/lib/upgrade/allnet.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/allnet.sh
@@ -7,6 +7,7 @@
 platform_add_ramfs_ubootenv() {
[ -e /usr/sbin/fw_printenv ] && install_bin /usr/sbin/fw_printenv 
/usr/sbin/fw_setenv
[ -e /etc/fw_env.config ] && install_file /etc/fw_env.config
+   [ -e /bin/mkdir ] && install_bin /bin/mkdir /bin/mkdir
 }
 append sysupgrade_pre_upgrade platform_add_ramfs_ubootenv
 
@@ -151,6 +152,10 @@ rootfs_size $rootfs_hexsize
 rootfs_checksum $rootfs_md5
 bootcmd bootm $vmlinux_hexaddr
 EOF
+
+   # fw_setenv needs the lock /var/lock/fw_setenv.lock
+   mkdir -p /var/lock/
+
fw_setenv -s /tmp/fw_env_upgrade || {
echo "failed to update U-Boot environment"
return 1
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
index 5179875..7b82180 100644
--- a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
@@ -31,6 +31,7 @@ platform_add_ramfs_ubootenv()
 {
[ -e /usr/sbin/fw_printenv ] && install_bin /usr/sbin/fw_printenv 
/usr/sbin/fw_setenv
[ -e /etc/fw_env.config ] && install_file /etc/fw_env.config
+   [ -e /bin/mkdir ] && install_bin /bin/mkdir /bin/mkdir
 }
 append sysupgrade_pre_upgrade platform_add_ramfs_ubootenv
 
@@ -190,6 +191,9 @@ platform_do_upgrade_openmesh()
printf "rootfs_size %s\n" $rootfs_checksize >> $uboot_env_upgrade
printf "rootfs_checksum %s\n" $rootfs_md5 >> $uboot_env_upgrade
 
+   # fw_setenv needs the lock /var/lock/fw_setenv.lock
+   mkdir -p /var/lock/
+
fw_setenv -s $uboot_env_upgrade || {
echo "failed to update U-Boot environment"
return 1
-- 
1.8.4.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Quick hack for kernel entropy problem on MIPS

2013-10-17 Thread Geert Uytterhoeven
On Thu, Oct 17, 2013 at 6:32 PM, Weedy  wrote:
> On Thu, Oct 17, 2013 at 11:40 AM, chrono  wrote:
>> Ahoi everyone,
>>
>> it was requested on IRC that I send my solution to the entropy problem with
>> the current
>> kernel (e.g. having 0 available entropy):
>>
>> root@OpenWrt:/# cat /proc/sys/kernel/random/entropy_avail
>> 0
> Uhh ok?
> root@OpenWrt:~# cat /proc/sys/kernel/random/entropy_avail
> 1189

What's your uptime? Entropy is added to the pool e.g. based on network
activity. The issue is that the pool is empty right after boot up.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Quick hack for kernel entropy problem on MIPS

2013-10-17 Thread chrono

root@OpenWrt:/# cat /proc/sys/kernel/random/entropy_avail
0

Uhh ok?
root@OpenWrt:~# cat /proc/sys/kernel/random/entropy_avail
1189


What's your uptime? Entropy is added to the pool e.g. based on network
activity. The issue is that the pool is empty right after boot up.


Well it's not anymore (with the patch).
That may be due to the fact that network is the only source of entropy
left on MIPS, that is something I personally wouldn't accept as enough
anymore.

As I reckon there has been a lengthy discussion about it already and
many people raised their concerns.

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ecurity/meldung/Linux-auf-MIPS-jetzt-wieder-mit-mehr-Zufall-1963604.html


(sorry for german link)

That patch wouldn't work with 3.3.8 due to include dependencies I
wasn't willing to follow up.

The attached patch will re-enable CPU interrupts as entropy source,
at least for AR71xx/mips32r3 and will do so right away, which might
also solve issues with hostapd/nginx that require some during init.

chrono

--
Apollo-NG Mobile Hackerspace
https://apollo.open-resource.org/
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ath9k / set txpower / TP-LINK TL-WR841N/ND v8

2013-10-17 Thread cmsv
I have the exact same issue with some tplink and dlink routers and soon
to test on a TL-WR841N/ND v8.
Regarding the dlink i found differences and gaining 1dBm when changing
the country code to US.
Also some time ago as i played with txpower; at moments it would
actually go to 20dBm but after restart it would go back to 15dBm.
This still remains with AA r35153 for those routers like the dir 601a.

Currently i have AA r38401 with the same configuration as the other dir
601a in another dir 601a and i get 17 dBm but when changing to US
country code it goes back to 15 dBm.
(I also played with channel selection)

Another curious fact is on the dir 601a depends on the channel used.

Frequencies:
* 2412 MHz [1] (15.0 dBm)
* 2417 MHz [2] (16.0 dBm)
* 2422 MHz [3] (16.0 dBm)
* 2427 MHz [4] (16.0 dBm)
* 2432 MHz [5] (16.0 dBm)
* 2437 MHz [6] (16.0 dBm)
* 2442 MHz [7] (16.0 dBm)
* 2447 MHz [8] (16.0 dBm)
* 2452 MHz [9] (16.0 dBm)
* 2457 MHz [10] (16.0 dBm)
* 2462 MHz [11] (15.0 dBm)
* 2467 MHz [12] (17.0 dBm)
* 2472 MHz [13] (17.0 dBm)
* 2484 MHz [14] (disabled)

with the dir 615c1 i get similar information where some channels give
20dBm and others in the middle less while the first ones also go up to 20dBm
This happens with AA r38401 while with AA r35153 all frequencies go up
to 20dBm.

when compiling the image:
[*] Force Atheros drivers to respect the user's regdomain settings

Seems to have some relevance in regards to this issue.

I think i might have opened a ticket about this sometime ago.


On 10/17/2013 08:31 AM, Bastian Bittorf wrote:
> we are facing a strange issue on 2 routers with identical
> hardware: TP-LINK TL-WR841N/ND v8 - i cannot set txpower >18 dBm
> according to 'iwconfig'/'iwinfo' on ONE router. the
> other (different location, same openwrt-revision r38432) can do that:
> 
> root@BerkaerBahnhof-Knoten59:~ uci set wireless.radio0.txpower=15; wifi; 
> sleep 30; iwinfo
> command failed: Device or resource busy (-16)
> Configuration file: /var/run/hostapd-phy0.conf
> Using interface wlan0 with hwaddr 64:70:02:59:41:3e and ssid 
> "BerkaerBahnhofWeimarnetz"
> wlan0 ESSID: "BerkaerBahnhofWeimarnetz"
>   Access Point: 64:70:02:59:41:3E
>   Mode: Master  Channel: 5 (2.432 GHz)
>   Tx-Power: 15 dBm  Link Quality: 36/70
>   Signal: -74 dBm  Noise: -95 dBm
>   Bit Rate: 14.4 MBit/s
>   Encryption: none
>   Type: nl80211  HW Mode(s): 802.11bgn
>   Hardware: unknown [Generic MAC80211]
>   TX power offset: unknown
>   Frequency offset: unknown
>   Supports VAPs: yes  PHY name: phy0
> 
> wlan0-1   ESSID: "weimarnetz"
>   Access Point: 02:CA:FF:EE:BA:BE
>   Mode: Ad-Hoc  Channel: 5 (2.432 GHz)
>   Tx-Power: 15 dBm  Link Quality: unknown/70
>   Signal: unknown  Noise: -95 dBm
>   Bit Rate: unknown
>   Encryption: unknown
>   Type: nl80211  HW Mode(s): 802.11bgn
>   Hardware: unknown [Generic MAC80211]
>   TX power offset: unknown
>   Frequency offset: unknown
>   Supports VAPs: yes  PHY name: phy0
> 
> root@BerkaerBahnhof-Knoten59:~ uci set wireless.radio0.txpower=20; wifi; 
> sleep 30; iwinfo
> command failed: Device or resource busy (-16)
> Configuration file: /var/run/hostapd-phy0.conf
> Using interface wlan0 with hwaddr 64:70:02:59:41:3e and ssid 
> "BerkaerBahnhofWeimarnetz"
> wlan0 ESSID: "BerkaerBahnhofWeimarnetz"
>   Access Point: 64:70:02:59:41:3E
>   Mode: Master  Channel: 5 (2.432 GHz)
>   Tx-Power: 20 dBm  Link Quality: 29/70
>   Signal: -81 dBm  Noise: -95 dBm
>   Bit Rate: 13.0 MBit/s
>   Encryption: none
>   Type: nl80211  HW Mode(s): 802.11bgn
>   Hardware: unknown [Generic MAC80211]
>   TX power offset: unknown
>   Frequency offset: unknown
>   Supports VAPs: yes  PHY name: phy0
> 
> wlan0-1   ESSID: "weimarnetz"
>   Access Point: 02:CA:FF:EE:BA:BE
>   Mode: Ad-Hoc  Channel: 5 (2.432 GHz)
>   Tx-Power: 20 dBm  Link Quality: unknown/70
>   Signal: unknown  Noise: -95 dBm
>   Bit Rate: unknown
>   Encryption: unknown
>   Type: nl80211  HW Mode(s): 802.11bgn
>   Hardware: unknown [Generic MAC80211]
>   TX power offset: unknown
>   Frequency offset: unknown
>   Supports VAPs: yes  PHY name: phy0
> 
> root@BerkaerBahnhof-Knoten59:~ uci show wireless
> wireless.radio0=wifi-device
> wireless.radio0.type=mac80211
> wireless.radio0.country=BO
> wireless.radio0.channel=5
> wireless.radio0.frag=off
> wireless.radio0.beacon_i

[OpenWrt-Devel] mac80211.sh & option macaddress

2013-10-17 Thread cmsv
I've noticed that mac80211.sh is not producing the output config as it
was before for $dev_id which was adding "option macaddress ..." to the
generated wireless config file.

Currently the generated wireless config file gets option path
'$path' ."

Is this a replacement to be in effect or something else is not working
as it should and:

dev_id=" option macaddr  $(cat /sys/class/ieee80211/${dev}/macaddress)"

is not working as it should ?

When checking the file path with dir 601a and 615*

 # cat /sys/class/ieee80211/${dev}/macaddress
cat: can't open '/sys/class/ieee80211//macaddress': No such file or
directory

But outputs the mac when ${dev} is replaced by 'phy0'

# cat /sys/class/ieee80211/phy0/macaddress

Is the script not being able to read the dev ?
I also seen this situation with the TL-WR841N/ND v8 with an older
revision of AA.

dev_id="option macaddr  $(cat
/sys/class/ieee80211/${dev}/macaddress)"














-- 

Site: http://wirelesspt.net
Mesh: http://tinyurl.com/wirelesspt
Admin: http://wirelesspt.net/wiki/Cmsv
Twitter: http://twitter.com/wirelesspt
Youtube: https://youtube.com/wirelesspt
Suporte técnico via sms: 91 19 11 798
Donativos/Paypal: http://tinyurl.com/doar-verba
Chave publica PGP/SSH: http://wirelesspt.net/arquivos/pk
Licença deste conteúdo:
https://creativecommons.org/licenses/by-nc-sa/3.0/pt/
Email assinado digitalmente pelo emissor assegurando autenticidade
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Quick hack for kernel entropy problem on MIPS

2013-10-17 Thread Weedy
On 17 Oct 2013 13:07, "chrono"  wrote:

 root@OpenWrt:/# cat /proc/sys/kernel/random/entropy_avail
 0
>>>
>>> Uhh ok?
>>> root@OpenWrt:~# cat /proc/sys/kernel/random/entropy_avail
>>> 1189
>>
>>
>> What's your uptime? Entropy is added to the pool e.g. based on network
>> activity. The issue is that the pool is empty right after boot up.
>
>
> Well it's not anymore (with the patch).
> That may be due to the fact that network is the only source of entropy
> left on MIPS, that is something I personally wouldn't accept as enough
> anymore.
>
> As I reckon there has been a lengthy discussion about it already and
> many people raised their concerns.
>
>
 ecurity/meldung/Linux-auf-MIPS-jetzt-wieder-mit-mehr-Zufall-1963604.html
>
> (sorry for german link)
>
> That patch wouldn't work with 3.3.8 due to include dependencies I
> wasn't willing to follow up.
>
> The attached patch will re-enable CPU interrupts as entropy source,
> at least for AR71xx/mips32r3 and will do so right away, which might
> also solve issues with hostapd/nginx that require some during init.

A, I can see how that might cause issues. I have made some sysctl
tweaks and my network always has something going on.
So I never noticed.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ar71xx: Fix sysupgrades for Allnet and OpenMesh devices

2013-10-17 Thread Daniel Golle
Hi Sven,

thank you for addressing that issue!

On 10/17/2013 06:42 PM, Sven Eckelmann wrote:
> diff --git a/target/linux/ar71xx/base-files/lib/upgrade/allnet.sh 
> b/target/linux/ar71xx/base-files/lib/upgrade/allnet.sh
> index 9a375ff..8076fbd 100644
> --- a/target/linux/ar71xx/base-files/lib/upgrade/allnet.sh
> +++ b/target/linux/ar71xx/base-files/lib/upgrade/allnet.sh
> @@ -7,6 +7,7 @@
>  platform_add_ramfs_ubootenv() {
>   [ -e /usr/sbin/fw_printenv ] && install_bin /usr/sbin/fw_printenv 
> /usr/sbin/fw_setenv
>   [ -e /etc/fw_env.config ] && install_file /etc/fw_env.config
> + [ -e /bin/mkdir ] && install_bin /bin/mkdir /bin/mkdir
mkdir is a link to busybox. wouldn't it be better to just add that symlink to
the list of busybox symlinks in
/package/base-files/files/lib/upgrade/common.sh
or even better: why not just
mkdir -p $RAM_ROOT/var/lock
and not even use mkdir inside the ramdisk?


>  }
>  append sysupgrade_pre_upgrade platform_add_ramfs_ubootenv
>  
> @@ -151,6 +152,10 @@ rootfs_size $rootfs_hexsize
>  rootfs_checksum $rootfs_md5
>  bootcmd bootm $vmlinux_hexaddr
>  EOF
> +
> + # fw_setenv needs the lock /var/lock/fw_setenv.lock
> + mkdir -p /var/lock/
> +
This part would then be unneeded if $RAM_ROOT/var/lock is created before
chroot'ing into the ramdisk.

>   fw_setenv -s /tmp/fw_env_upgrade || {
>   echo "failed to update U-Boot environment"
>   return 1
> diff --git a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh 
> b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
> index 5179875..7b82180 100644
> --- a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
> +++ b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh

Same applies here, of course.



Cheers


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


Re: [OpenWrt-Devel] [PATCH] build: Set owner root for all files on ubifs creation

2013-10-17 Thread Luka Perkov
Hi Joris,

On Wed, Oct 16, 2013 at 09:01:22PM +0200, Joris de Vries wrote:
> When creating an image it makes no sense to have files owned by
> the uid and gid on the host (and even creates a bug when for
> example dropbear authorized_keys is included via env/files).
> 
> Signed-off-by: Joris de Vries 
> ---
> include/image.mk |1 +
> 1 file changed, 1 insertion(+)

Thank you for noticing this. Applied in r38442.

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


Re: [OpenWrt-Devel] [PATCH][AA][packages] siproxd: fix typo in variable name in init script

2013-10-17 Thread Luka Perkov
Hi Jiri,

On Thu, Oct 17, 2013 at 03:56:55PM +0200, Jiri Slachta wrote:
> 
> Signed-off-by: Jiri Slachta 
> ---
>  net/siproxd/files/siproxd.init |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied in r38443. Thanks.

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