[OpenWrt-Devel] [PATCH][lantiq] Fix ar8216 switch configuration

2013-05-13 Thread Álvaro Fernández Rojas
On linux 3.8 the switch is named as "switch0", but the network configuration 
script names it as "eth0", causing no communication over ethernet due to no 
proper VLAN config.

Signed-off-by: Álvaro Fernández Rojas 
---
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/02_network 
b/target/linux/lantiq/base-files/etc/uci-defaults/02_network
index 06390a7..97f0f6b 100755
--- a/target/linux/lantiq/base-files/etc/uci-defaults/02_network
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_network
@@ -60,8 +60,8 @@ ACMP252|GIGASX76X)
 # ar8316
 ARV4519PW|ARV7518PW)
ucidef_set_interface_lan "eth0.1"
-   ucidef_add_switch "eth0" "1" "1"
-   ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
+   ucidef_add_switch "switch0" "1" "1"
+   ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5"
;;
 
 WBMR)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Booting x86 from SATA drive

2013-05-13 Thread Hanno Schupp
Hi,

I have a fit-pc2-i http://www.fit-pc.com/web/fit-pc/fit-pc2-i/ with a ADATA
32GB SSD w/ a SATA interface drive built in. Kamikaze boots fine and from
scratch,  but neither backfire nor attitude adjustment. For them the boot
process stops while "waiting for root device /dev/sda2 in both cases.
I assume I need to include some additional modules in my firmware, but am
unsure which ones and at which level:
Can I compile kernel modules kmod* into the image and expect it to work?  I
thought that kmod models were stored in rootfs and since the system fails
to boot before it can even find rootfs. If my assumption is correct I have
to compile support directly into the kernel using make kernel_menuconfig
Is that correct? And if so, what do i have to include when configuring make
kernel_menuconfig and/or make menuconfig to get SATA drive to be recognised
as initial and only rootfs?
I consulted the extroot page in wiki, but I understand that approach relies
on an initial rootfs in the device's flash drive to be present, which then
writes its /overlay or / to the external storage; this is not what happens
with this fit-pc2-I, which has no flash drive but but only he SATA drive.

Any help and pointers on how to build such a x86 image is appreciated.

Thanks

Hanno Schupp
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] How to enable debug mode in wpa_supplicant?

2013-05-13 Thread Francisco Cuesta
HEllo,

I would like to enable the dbug mode of wpa_supplicant,  I have read
the help and modified the script /lib/wifi/wpa_supplicant.sh line
which invokes the wpa_supplicant, in order to enable the debug mode
like this

wpa_supplicant -dd -B -P /var/run/wifi-wlan1.pid -D nl80211 -i wlan1
-c /var/run/wpa_supplicant-wlan1.conf

However, I cannot seen any debug mode, I have try to read the log with
logread but it doesn't show any debug message, neither the dmesg. May
anyone tell me how to enable this feature?

Thanks in advance
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] How to enable debug mode in wpa_supplicant?

2013-05-13 Thread Jonas Gorski
On Mon, May 13, 2013 at 4:47 PM, Francisco Cuesta  wrote:
> HEllo,
>
> I would like to enable the dbug mode of wpa_supplicant,  I have read
> the help and modified the script /lib/wifi/wpa_supplicant.sh line
> which invokes the wpa_supplicant, in order to enable the debug mode
> like this
>
> wpa_supplicant -dd -B -P /var/run/wifi-wlan1.pid -D nl80211 -i wlan1
> -c /var/run/wpa_supplicant-wlan1.conf
>
> However, I cannot seen any debug mode, I have try to read the log with
> logread but it doesn't show any debug message, neither the dmesg. May
> anyone tell me how to enable this feature?

You need to build your own image/package with the "minimum debug
message priority" set to 0 for wpa_supplicant
(CONFIG_WPA_MSG_MIN_PRIORITY).


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


[OpenWrt-Devel] One question of ralink wifi ht40 mode

2013-05-13 Thread Сергей Василюгин
Hi, All Anybody knows why ht40 mode explicitly switch off for some ralink wifi?rt2800lib.c in function rt2800_config_channel(): if (rt2x00_rf(rt2x00dev, RF3290) ||        rt2x00_rf(rt2x00dev, RF3322) ||        rt2x00_rf(rt2x00dev, RF5350) ||        rt2x00_rf(rt2x00dev, RF5360) ||        rt2x00_rf(rt2x00dev, RF5370) ||        rt2x00_rf(rt2x00dev, RF5372) ||        rt2x00_rf(rt2x00dev, RF5390) ||        rt2x00_rf(rt2x00dev, RF5392)) {        rt2800_rfcsr_read(rt2x00dev, 30, &rfcsr);        rt2x00_set_field8(&rfcsr, RFCSR30_TX_H20M, 0);<        rt2x00_set_field8(&rfcsr, RFCSR30_RX_H20M, 0);<        rt2800_rfcsr_write(rt2x00dev, 30, rfcsr);        rt2800_rfcsr_read(rt2x00dev, 3, &rfcsr);        rt2x00_set_field8(&rfcsr, RFCSR30_RF_CALIBRATION, 1);        rt2800_rfcsr_write(rt2x00dev, 3, rfcsr);    }I've done correct{?) configs and ht40 works for my rt3290, rt3352 & rt5350.Or it's simple mistake and instead of 0 it must be conf_is_ht40(conf). ---serge___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] bulk package version change testing

2013-05-13 Thread Roman Yeryomin
Since recently I need to test a different package version set than
that defined in package Makefiles.
Since I'm not aware of any official way to do that and I didn't want
to change every packages Makefile, I made a little patch allowing me
to define versions in a single file named package-versions.conf. I
know it breaks several package version redefinition from feeds and
probably can be done in some other/right way.
I thought that maybe openwrt community can also benefit from such
feature, so here is my patch.


diff --git a/include/package.mk b/include/package.mk
index 99d2dd2..8ce8128 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -9,6 +9,16 @@ __package_mk:=1

 all: $(if $(DUMP),dumpinfo,compile)

+-include $(TOPDIR)/package-versions.conf
+ifdef $(PKG_NAME)_VERSION
+  PKG_VERSION:=$(call qstrip,$($(PKG_NAME)_VERSION))
+  PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)
+  PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
+  PKG_SOURCE_VERSION:=$(PKG_VERSION)
+  PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
+  MD5SUM:=
+endif
+
 PKG_BUILD_DIR ?= $(BUILD_DIR)/$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
 PKG_INSTALL_DIR ?= $(PKG_BUILD_DIR)/ipkg-install
 PKG_MD5SUM ?= unknown
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Kernel panic when compiling with ftrace enabled

2013-05-13 Thread Signe Rüsch
Hello,

We have compiled the OpenWrt attitude adjustment release for the "Ubiquiti 
RouterStation Pro" and it flashes fine.

But after enabling tracing support in the kernel under Kernel hacking->Tracers 
and in the .config (CONFIG_KERNEL_FTRACE), the router doesn't boot anymore.
This is the output it displayed while booting:


AR8316 PHY found on MAC0
AR8316 PHY found on MAC1
Ethernet eth0: MAC address 00:15:6d:c4:23:c4
IP: 192.168.1.20/255.255.255.0, Gateway: 0.0.0.0
Default server: 0.0.0.0

RedBoot(tm) bootstrap and debug environment [ROMRAM]
Ubiquiti Networks certified release, version 0.9.00318M.0905121200 - built 
12:01:38, M9

Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.

Board: Ubiquiti RouterStation PRO
Arch: ar7100pro
 RAM: 0x8000-0x8800, [0x8003bf00-0x87fe1000] available
Flash: 0xbf00-0xc000, in 256 blocks of 0x0001 bytes each
== Executing boot script in 1.000 seconds - enter ^C to abort
RedBoot> fis load -d -e kernel
Trying LZMA decompression...
Image loaded from 0x8006-0x803ddf44
Image is not ELF, skipping ELF parsing...
RedBoot> exec
Now booting linux kernel:
Base address 0x8005 Entry 0x8006
memsize=0x0800
modetty0=0,n,8,1,hw
board=RouterStation PRO
ethaddr=00.15.6d.c4.23.c4
[0.00] Linux version 3.3.8 (root@kapitza2) (gcc version 4.6.3 20120201 
(prerel3
[0.00] bootconsole [early0] enabled
[0.00] CPU revision is: 00019374(MIPS 24Kc)
[0.00] SoC: Atheros AR7161 rev 2
[0.00] Clocks: CPU:720.000MHz, DDR:360.000MHz, AHB:180.000MHz, 
Ref:40.000MHz
[0.00] Determined physical RAM map:
[0.00]  memory: 0800 @ (usable)
[0.00] Initrd not found or empty - disabling initrd
[0.00] Zone PFN ranges:
[0.00]   Normal   0x -> 0x8000
[0.00] Movable zone start PFN for each node
[0.00] Early memory PFN ranges
[0.00] 0: 0x -> 0x8000
[0.00] Built 1 zonelists in Zone order, mobility grouping on. Total 
pages: 322
[0.00] Kernel command line:  board=UBNT-RSPRO console=ttyS0,115200 
ethaddr=00.d
[0.00] PID hash table entries: 512 (order: -1, 2048 bytes)
[0.00] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[0.00] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[0.00] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[0.00] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 
bytes
[0.00] Writing ErrCtl register=00010222
[0.00] Readback ErrCtl register=00010222
[0.00] Memory: 125592k/131072k available (2633k kernel code, 5480k 
reserved, 6)
[0.00] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, 
Nodes=1
[0.00] NR_IRQS:51
[0.00] Calibrating delay loop... 479.23 BogoMIPS (lpj=2396160)
[0.06] pid_max: default: 32768 minimum: 301
[0.06] Mount-cache hash table entries: 512
[0.06] ftrace: allocating 9405 entries in 19 pages
[0.08] NET: Registered protocol family 16
[0.09] gpiochip_add: registered GPIOs 0 to 15 on device: ath79
[0.09] MIPS: machine is Ubiquiti RouterStation Pro
[0.40] registering PCI controller with io_map_base unset
[2.71] bio: create slab  at 0
[2.71] PCI host bridge to bus :00
[2.72] pci_bus :00: root bus resource [mem 0x1000-0x16ff]
[2.72] pci_bus :00: root bus resource [io  0x]
[2.73] pci :00:12.0: BAR 0: assigned [mem 0x1000-0x1000]
[2.73] pci :00:12.0: using irq 41 for pin 1
[2.74] Switching to clocksource MIPS
[2.75] NET: Registered protocol family 2
[2.75] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[2.75] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[2.76] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[2.77] TCP: Hash tables configured (established 4096 bind 4096)
[2.77] TCP reno registered
[2.78] UDP hash table entries: 256 (order: 0, 4096 bytes)
[2.78] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[2.79] NET: Registered protocol family 1
[2.81] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[2.81] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) 
(CMODE_PRIORITY) (c) .
[2.82] msgmni has been set to 245
[2.83] io scheduler noop registered
[2.83] io scheduler deadline registered (default)
[2.84] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[2.86] serial8250.0: ttyS0 at MMIO 0x1802 (irq = 11) is a 16550A
[2.87] console [ttyS0] enabled, bootconsole disabled
[2.87] console [ttyS0] enabled, bootconsole disabled
[2.88] m25p80 spi0.0: found mx25l12805d, expected m25p80
[2.89] m25p80 spi0.0: mx25l12805d (16384 Kbytes)
[2.90] Searching for RedBoot partitio

Re: [OpenWrt-Devel] Booting x86 from SATA drive

2013-05-13 Thread Adam Gensler
Hi Hanno,

Last time I checked the x86 target does not include the drivers for SATA ports. 
The only way I've been able to get it work is by building a custom kernel.

1. make kernel_menuconfig

2. Device Drivers --> Serial ATA and Parallel ATA drivers --> AHCI SATA Support

Press "y" on both the "Serial ATA and Parallel ATA drivers" and "AHCI SATA 
Support" then exit and save and rebuilt the image.

Adam


On May 13, 2013, at 7:41 AM, Hanno Schupp  wrote:

> Hi,
> 
> I have a fit-pc2-i http://www.fit-pc.com/web/fit-pc/fit-pc2-i/ with a ADATA 
> 32GB SSD w/ a SATA interface drive built in. Kamikaze boots fine and from 
> scratch,  but neither backfire nor attitude adjustment. For them the boot 
> process stops while "waiting for root device /dev/sda2 in both cases.
> I assume I need to include some additional modules in my firmware, but am 
> unsure which ones and at which level:
> Can I compile kernel modules kmod* into the image and expect it to work?  I 
> thought that kmod models were stored in rootfs and since the system fails to 
> boot before it can even find rootfs. If my assumption is correct I have to 
> compile support directly into the kernel using make kernel_menuconfig
> Is that correct? And if so, what do i have to include when configuring make 
> kernel_menuconfig and/or make menuconfig to get SATA drive to be recognised 
> as initial and only rootfs?
> I consulted the extroot page in wiki, but I understand that approach relies 
> on an initial rootfs in the device's flash drive to be present, which then 
> writes its /overlay or / to the external storage; this is not what happens 
> with this fit-pc2-I, which has no flash drive but but only he SATA drive.
> 
> Any help and pointers on how to build such a x86 image is appreciated.
> 
> Thanks 
> 
> Hanno Schupp
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

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


Re: [OpenWrt-Devel] [PATCH] unbound bump to 1.4.20 and add uci support

2013-05-13 Thread Adam Gensler
Has anyone had a chance to look at this patch? If adjustments are needed please 
let me know and I'll work on getting them in.

Thanks!
Adam


On May 6, 2013, at 10:44 PM, Adam Gensler  wrote:

> The following patch does these things:
> 
> 1. bumps unbound to version 1.4.20.
> 
> 2. adds uci support via /etc/config/unbound. The entirety of unbound.conf has 
> been implemented here.
> 
> 3. removes the existing patch which applied a memory optimized config to 
> /etc/unbound/unbound.conf. This has been migrated to /etc/config/unbound as 
> "option lowmem '1'" under "config server". This is the default. Disabling 
> "lowmem" opens up the relevant parameters for individual tuning, if desired.
> 
> 4. The other portions of the existing /etc/unbound/unbound.conf have been 
> migrated to the default /etc/config/unbound, yielding the same operation.
> 
> 5. The old /etc/unbound/unbound.conf has been renamed to 
> /etc/unbound/unbound.conf.example to avoid confusion.
> 
> This is my first attempt at a uci configuration port. Any feedback and/or 
> suggestions are greatly appreciated.
> 
> Signed-off-by: Adam Gensler 
> ---
> 
> 
> Index: net/unbound/files/unbound.init
> ===
> --- net/unbound/files/unbound.init(revision 36569)
> +++ net/unbound/files/unbound.init(working copy)
> @@ -1,14 +1,355 @@
> #!/bin/sh /etc/rc.common
> -#Copyright (C) 2010 Ondrej Caletka 
> -START=61
> +# Copyright (C) 2007-2013 OpenWrt.org
> 
> -start () {
> - unbound
> +START=60
> +
> +SERVICE_USE_PID=1
> +
> +CONFIGFILE="/var/etc/unbound.conf"
> +
> +writeconf() {
> + local opt="$1"
> + local val="$2"
> + local extra="$3"
> +
> + # wrap values with spaces or / in quotes
> + if [ `echo $val | grep -c "[.[:space:]/]"` -gt 0 ]; then
> + val="\"$val\""
> + fi
> +
> + if [ -z "$val" ]; then
> + echo "${opt}: ${val} ${extra}" >> $CONFIGFILE
> + else
> + echo "  ${opt}: ${val} ${extra}" >> $CONFIGFILE
> + fi
> }
> 
> -stop () {
> - PIDFILE='/var/run/unbound.pid'
> - if [ -f $PIDFILE ] ; then
> - kill $(cat $PIDFILE)
> +add_bool() {
> + local section="$1"
> + local option="$2"
> +
> + if [ -z "$3" ]; then
> + local config="$2"
> + else
> + local config="$3"
>   fi
> +
> + config_get value "$section" "$option"
> + [ -z "$value" ] && return 0
> +
> + if [ "$value" -eq 0 ]; then
> + value="no"
> + elif [ "$value" -eq 1 ]; then
> + value="yes"
> + else
> + return 0
> + fi
> +
> + writeconf "$config" "$value"
> }
> +
> +add_param() {
> + local section="$1"
> + local option="$2"
> + 
> + if [ -z "$3" ]; then
> + local config="$2"
> + else
> + local config="$3"
> + fi
> +
> + config_get value "$section" "$option"
> + [ -z "$value" ] && return 0
> +
> + writeconf "$config" "$value"
> +}
> +
> +add_server() {
> + local cfg="$1"
> +
> + add_param "$cfg" "include"
> +
> + writeconf "server"
> + add_param "$cfg" "verbosity"
> + add_param "$cfg" "statistics_interval" "statistics-interval"
> + add_bool "$cfg" "statistics_cumulative" "statistics-cumulative"
> + add_bool "$cfg" "extended_statistics" "extended-statistics"
> + add_param "$cfg" "port"
> + config_list_foreach "$cfg" "interface" add_list "interface"
> + add_param "$cfg" "interface_automatic" "interface-automatic"
> + config_list_foreach "$cfg" "outgoing_interface" add_list 
> "outgoing-interface"
> + add_param "$cfg" "outgoing_port_permit" "outgoing-port-permit"
> + add_param "$cfg" "outgoing_port_avoid" "outgoing-port-avoid"
> + add_param "$cfg" "edns_buffer_size" "edns-buffer-size"
> + add_param "$cfg" "jostle_timeout" "jostle-timeout"
> + add_param "$cfg" "so_rcvbuf" "so-rcvbuf"
> + add_param "$cfg" "so_sndbuf" "so-sndbuf"
> + add_param "$cfg" "cache_min_ttl" "cache-min-ttl"
> + add_param "$cfg" "cache_max_ttl" "cache-max-ttl"
> + add_param "$cfg" "infra_host_ttl" "infra-host-ttl"
> + add_bool "$cfg" "do_ip4" "do-ip4"
> + add_bool "$cfg" "do_ip6" "do-ip6"
> + add_bool "$cfg" "do_udp" "do-udp"
> + add_bool "$cfg" "do_tcp" "do-tcp"
> + add_bool "$cfg" "tcp_upstream" "tcp-upstream"
> + add_bool "$cfg" "ssl_upstream" "ssl-upstream"
> + add_param "$cfg" "ssl_service_key" "ssl-service-key"
> + add_param "$cfg" "ssl_service_pem" "ssl-service-pem"
> + add_param "$cfg" "ssl_port" "ssl-port"
> + add_bool "$cfg" "do_daemonize" "do-daemonize"
> + add_param "$cfg" "chroot"
> + add_param "$cfg" "username"
> + add_param "$cfg" "directory"
> + add_param "$cfg" "logfile"
> + add_bool "$cfg" "use_syslog" "use-syslog"
> + add_bool "$cfg" "log_time_ascii" "log-time-ascii"
> + add_bool "$cfg" "log_queries" "log-queries"
> + config_get tmpv