[OpenWrt-Devel] Add support for tl-wr1041n v2(leds are partially working)

2012-04-29 Thread Vince Huang
Hey,guys! Here is my second patch for adding tplink tl-wr1041n v2 to openwrt. I 
have found gpioes for system,wlan and wps.But the leds for wan and lan are 
still not working because they are attached to ar8327.So I set the led for wps 
indicating wan status. Please summit this patch,sign-off-by:Vince Huang. U-Boot 
1.1.4 (Dec 31 2011 - 13:38:52) U-boot MI124 DRAM:  64 MB id read 0x10ff 
flash size 4MB, sector count = 64 Flash:  4 MB Using default environment In:
serial Out:   serial Err:   serial Net:   ag934x_enet_initialize... No valid 
address in Flash. Using fixed address  wasp  reset mask:c03300  WASP   S17 
PHY * : cfg1 0x7 cfg2 0x7114 eth0: ba:be:fa:ce:08:41 athrs17_reg_init: complete 
eth0 up eth0 Autobooting in 1 seconds ## Booting image at 9f02 ...
Uncompressing Kernel Image ... OK Starting kernel ... [0.00] Linux 
version 3.3.3 (gzanan@qq810091899) (gcc version 4.6.3 20120201 (prerelease) 
(Linaro GCC 4.6-2012.02) ) #1 Sun Apr 29 15:34:10 CST 2012 [0.00] 
bootconsole [early0] enabled [0.00] CPU revision is: 0001974c (MIPS 
74Kc) [0.00] SoC: Atheros AR9342 rev 1 [0.00] Clocks: 
CPU:525.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz [0.00] 
Determined physical RAM map: [0.00]  memory: 0400 @  
(usable) [0.00] Initrd not found or empty - disabling initrd [
0.00] Zone PFN ranges: [0.00]   Normal   0x - 0x4000 [ 
   0.00] Movable zone start PFN for each node [0.00] Early memory 
PFN ranges [0.00] 0: 0x - 0x4000 [0.00] Built 
1 zonelists in Zone order, mobility grouping on.  Total pages: 16256 [
0.00] Kernel command line:  board=TL-WR1041N-v2 console=ttyS0,115200 
rootfstype=squashfs,jffs2 noinitrd [0.00] PID hash table entries: 256 
(order: -2, 1024 bytes) [0.00] Dentry cache hash table entries: 8192 
(order: 3, 32768 bytes) [0.00] Inode-cache hash table entries: 4096 
(order: 2, 16384 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= [0.00] Readback ErrCtl register= [
0.00] Memory: 61800k/65536k available (2073k kernel code, 3736k reserved, 
389k data, 200k init, 0k highmem) [0.00] SLUB: Genslabs=9, HWalign=32, 
Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [0.00] NR_IRQS:48 [
0.00] Calibrating delay loop... 261.73 BogoMIPS (lpj=1308672) [
0.08] pid_max: default: 32768 minimum: 301 [0.08] Mount-cache hash 
table entries: 512 [0.09] NET: Registered protocol family 16 [
0.09] gpiochip_add: registered GPIOs 0 to 22 on device: ath79 [
0.10] MIPS: machine is TP-LINK TL-WR1041N v2 [0.31] bio: create 
slab  at 0 [0.32] Switching to clocksource MIPS [0.32] NET: 
Registered protocol family 2 [0.33] IP route cache hash table entries: 
1024 (order: 0, 4096 bytes) [0.33] TCP established hash table entries: 
2048 (order: 2, 16384 bytes) [0.34] TCP bind hash table entries: 2048 
(order: 1, 8192 bytes) [0.34] TCP: Hash tables configured (established 
2048 bind 2048) [0.35] TCP reno registered [0.35] UDP hash 
table entries: 256 (order: 0, 4096 bytes) [0.36] UDP-Lite hash table 
entries: 256 (order: 0, 4096 bytes) [0.36] NET: Registered protocol 
family 1 [0.39] squashfs: version 4.0 (2009/01/31) Phillip Lougher [
0.39] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) 
(c) 2001-2006 Red Hat, Inc. [0.40] msgmni has been set to 120 [
0.41] io scheduler noop registered [0.41] io scheduler deadline 
registered (default) [0.42] Serial: 8250/16550 driver, 1 ports, IRQ 
sharing disabled [0.44] serial8250.0: ttyS0 at MMIO 0x1802 (irq = 
11) is a 16550A [0.45] console [ttyS0] enabled, bootconsole disabled [  
  0.45] console [ttyS0] enabled, bootconsole disabled [0.46] m25p80 
spi0.0: found en25q32b, expected m25p80 [0.47] m25p80 spi0.0: en25q32b 
(4096 Kbytes) [0.48] 5 tp-link partitions found on MTD device spi0.0 [  
  0.48] Creating 5 MTD partitions on spi0.0: [0.49] 
0x-0x0002 : u-boot [0.49] 
0x0002-0x000fc3bc : kernel [0.50] mtd: partition kernel 
must either start or end on erase block boundary or be smaller than an erase 
block -- forcing read-only [0.51] 0x000fc3bc-0x003f : 
rootfs [0.52] mtd: partition rootfs must either start or end on 
erase block boundary or be smaller than an erase block -- forcing read-only [   
 0.53] mtd: partition rootfs set to be root filesystem [0.54] 
mtd: partition rootfs_data created automatically, ofs=2C, len=13  [   
 

[OpenWrt-Devel] busybox 1.20.0 update patch

2012-04-29 Thread Peter Wagner
Hi,

this patch updates busybox to 1.20.0.

The only patch i wasn't shure about was 310-passwd_access.patch - this patch 
isn't included.

Signed-off-by: Peter Wagner tripo...@gmx.at
diff --git a/package/busybox/Makefile b/package/busybox/Makefile
index af27df0..571c448 100644
--- a/package/busybox/Makefile
+++ b/package/busybox/Makefile
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=busybox
-PKG_VERSION:=1.19.4
+PKG_VERSION:=1.20.0
 PKG_RELEASE:=1
 PKG_FLAGS:=essential
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.busybox.net/downloads \
 		http://distfiles.gentoo.org/distfiles/
-PKG_MD5SUM:=9c0cae5a0379228e7b55e5b29528df8e
+PKG_MD5SUM:=4334b34fa1cdae54e9d2dc174f35c9ae
 
 PKG_BUILD_DEPENDS:=BUSYBOX_USE_LIBRPC:librpc
 PKG_BUILD_PARALLEL:=1
diff --git a/package/busybox/busybox-1.20.0-sed.patch b/package/busybox/busybox-1.20.0-sed.patch
new file mode 100644
index 000..70dc63f
--- /dev/null
+++ b/package/busybox/busybox-1.20.0-sed.patch
@@ -0,0 +1,29 @@
+--- busybox-1.20.0/editors/sed.c
 busybox-1.20.0-sed/editors/sed.c
+@@ -743,7 +743,7 @@ static int do_subst_command(sed_cmd_t *s
+ 		 */
+ 		if (!G.regmatch[0].rm_so  !G.regmatch[0].rm_eo  match_count) {
+ 			pipe_putc(*line++);
+-			continue;
++			goto next;
+ 		}
+ 
+ 		match_count++;
+@@ -755,7 +755,7 @@ static int do_subst_command(sed_cmd_t *s
+ 		) {
+ 			for (i = 0; i  G.regmatch[0].rm_eo; i++)
+ pipe_putc(*line++);
+-			continue;
++			goto next;
+ 		}
+ 
+ 		/* print everything before the match */
+@@ -773,7 +773,7 @@ static int do_subst_command(sed_cmd_t *s
+ 		/* if we're not doing this globally, get out now */
+ 		if (sed_cmd-which_match != 0)
+ 			break;
+-
++ next:
+ 		if (*line == '\0')
+ 			break;
+ 
diff --git a/package/busybox/config/Config.in b/package/busybox/config/Config.in
index 0045036..cddc2f6 100644
--- a/package/busybox/config/Config.in
+++ b/package/busybox/config/Config.in
@@ -82,20 +82,21 @@ config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_IN_BSS
 endchoice
 
 config BUSYBOX_CONFIG_SHOW_USAGE
-	bool Show terse applet usage messages
+	bool Show applet usage messages
 	default y
 	help
-	  All BusyBox applets will show help messages when invoked with
-	  wrong arguments. You can turn off printing these terse usage
-	  messages if you say no here.
-	  This will save you up to 7k.
+	  Enabling this option, BusyBox applets will show terse help messages
+	  when invoked with wrong arguments.
+	  If you do not want to show any (helpful) usage message when
+	  issuing wrong command syntax, you can say 'N' here,
+	  saving approximately 7k.
 
 config BUSYBOX_CONFIG_FEATURE_VERBOSE_USAGE
 	bool Show verbose applet usage messages
 	default y
 	depends on BUSYBOX_CONFIG_SHOW_USAGE
 	help
-	  All BusyBox applets will show more verbose help messages when
+	  All BusyBox applets will show verbose help messages when
 	  busybox is invoked with --help. This will add a lot of text to the
 	  busybox binary. In the default configuration, this will add about
 	  13k, but it can add much more depending on your configuration.
@@ -105,8 +106,8 @@ config BUSYBOX_CONFIG_FEATURE_COMPRESS_USAGE
 	default y
 	depends on BUSYBOX_CONFIG_SHOW_USAGE
 	help
-	  Store usage messages in compressed form, uncompress them on-the-fly
-	  when applet --help is called.
+	  Store usage messages in .bz compressed form, uncompress them
+	  on-the-fly when applet --help is called.
 
 	  If you have a really tiny busybox with few applets enabled (and
 	  bunzip2 isn't one of them), the overhead of the decompressor might
@@ -598,12 +599,39 @@ config BUSYBOX_CONFIG_CROSS_COMPILER_PREFIX
 
 	  Native builds leave this empty.
 
+config BUSYBOX_CONFIG_SYSROOT
+	string Path to sysroot
+	default 
+	help
+	  If you want to build BusyBox with a cross compiler, then you
+	  might also need to specify where /usr/include and /usr/lib
+	  will be found.
+
+	  For example, BusyBox can be built against an installed
+	  Android NDK, platform version 9, for ARM ABI with
+
+	  CONFIG_SYSROOT=/opt/android-ndk/platforms/android-9/arch-arm
+
+	  Native builds leave this empty.
+
 config BUSYBOX_CONFIG_EXTRA_CFLAGS
 	string Additional CFLAGS
 	default 
 	help
 	  Additional CFLAGS to pass to the compiler verbatim.
 
+config BUSYBOX_CONFIG_EXTRA_LDFLAGS
+	string Additional LDFLAGS
+	default 
+	help
+	  Additional LDFLAGS to pass to the linker verbatim.
+
+config BUSYBOX_CONFIG_EXTRA_LDLIBS
+	string Additional LDLIBS
+	default 
+	help
+	  Additional LDLIBS to pass to the linker with -l.
+
 endmenu
 
 menu 'Debugging Options'
diff --git a/package/busybox/config/archival/Config.in b/package/busybox/config/archival/Config.in
index d2bfa48..fa3d18c 100644
--- a/package/busybox/config/archival/Config.in
+++ b/package/busybox/config/archival/Config.in
@@ -7,7 +7,6 @@
 menu Archival Utilities
 
 
-
 config BUSYBOX_CONFIG_FEATURE_SEAMLESS_XZ
 	bool Make tar, rpm, modprobe etc understand .xz data
 	default n
@@ -33,10 +32,10 @@ config 

[OpenWrt-Devel] busybox 1.20.0 update patch r1

2012-04-29 Thread Peter Wagner
Hi,

this patch updates busybox to 1.20.0.

The only patch i wasn't shure about was 310-passwd_access.patch - this patch 
isn't included.

Signed-off-by: Peter Wagner tripo...@gmx.at
diff --git a/package/busybox/Makefile b/package/busybox/Makefile
index af27df0..571c448 100644
--- a/package/busybox/Makefile
+++ b/package/busybox/Makefile
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=busybox
-PKG_VERSION:=1.19.4
+PKG_VERSION:=1.20.0
 PKG_RELEASE:=1
 PKG_FLAGS:=essential
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.busybox.net/downloads \
 		http://distfiles.gentoo.org/distfiles/
-PKG_MD5SUM:=9c0cae5a0379228e7b55e5b29528df8e
+PKG_MD5SUM:=4334b34fa1cdae54e9d2dc174f35c9ae
 
 PKG_BUILD_DEPENDS:=BUSYBOX_USE_LIBRPC:librpc
 PKG_BUILD_PARALLEL:=1
diff --git a/package/busybox/config/Config.in b/package/busybox/config/Config.in
index 0045036..cddc2f6 100644
--- a/package/busybox/config/Config.in
+++ b/package/busybox/config/Config.in
@@ -82,20 +82,21 @@ config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_IN_BSS
 endchoice
 
 config BUSYBOX_CONFIG_SHOW_USAGE
-	bool Show terse applet usage messages
+	bool Show applet usage messages
 	default y
 	help
-	  All BusyBox applets will show help messages when invoked with
-	  wrong arguments. You can turn off printing these terse usage
-	  messages if you say no here.
-	  This will save you up to 7k.
+	  Enabling this option, BusyBox applets will show terse help messages
+	  when invoked with wrong arguments.
+	  If you do not want to show any (helpful) usage message when
+	  issuing wrong command syntax, you can say 'N' here,
+	  saving approximately 7k.
 
 config BUSYBOX_CONFIG_FEATURE_VERBOSE_USAGE
 	bool Show verbose applet usage messages
 	default y
 	depends on BUSYBOX_CONFIG_SHOW_USAGE
 	help
-	  All BusyBox applets will show more verbose help messages when
+	  All BusyBox applets will show verbose help messages when
 	  busybox is invoked with --help. This will add a lot of text to the
 	  busybox binary. In the default configuration, this will add about
 	  13k, but it can add much more depending on your configuration.
@@ -105,8 +106,8 @@ config BUSYBOX_CONFIG_FEATURE_COMPRESS_USAGE
 	default y
 	depends on BUSYBOX_CONFIG_SHOW_USAGE
 	help
-	  Store usage messages in compressed form, uncompress them on-the-fly
-	  when applet --help is called.
+	  Store usage messages in .bz compressed form, uncompress them
+	  on-the-fly when applet --help is called.
 
 	  If you have a really tiny busybox with few applets enabled (and
 	  bunzip2 isn't one of them), the overhead of the decompressor might
@@ -598,12 +599,39 @@ config BUSYBOX_CONFIG_CROSS_COMPILER_PREFIX
 
 	  Native builds leave this empty.
 
+config BUSYBOX_CONFIG_SYSROOT
+	string Path to sysroot
+	default 
+	help
+	  If you want to build BusyBox with a cross compiler, then you
+	  might also need to specify where /usr/include and /usr/lib
+	  will be found.
+
+	  For example, BusyBox can be built against an installed
+	  Android NDK, platform version 9, for ARM ABI with
+
+	  CONFIG_SYSROOT=/opt/android-ndk/platforms/android-9/arch-arm
+
+	  Native builds leave this empty.
+
 config BUSYBOX_CONFIG_EXTRA_CFLAGS
 	string Additional CFLAGS
 	default 
 	help
 	  Additional CFLAGS to pass to the compiler verbatim.
 
+config BUSYBOX_CONFIG_EXTRA_LDFLAGS
+	string Additional LDFLAGS
+	default 
+	help
+	  Additional LDFLAGS to pass to the linker verbatim.
+
+config BUSYBOX_CONFIG_EXTRA_LDLIBS
+	string Additional LDLIBS
+	default 
+	help
+	  Additional LDLIBS to pass to the linker with -l.
+
 endmenu
 
 menu 'Debugging Options'
diff --git a/package/busybox/config/archival/Config.in b/package/busybox/config/archival/Config.in
index d2bfa48..fa3d18c 100644
--- a/package/busybox/config/archival/Config.in
+++ b/package/busybox/config/archival/Config.in
@@ -7,7 +7,6 @@
 menu Archival Utilities
 
 
-
 config BUSYBOX_CONFIG_FEATURE_SEAMLESS_XZ
 	bool Make tar, rpm, modprobe etc understand .xz data
 	default n
@@ -33,10 +32,10 @@ config BUSYBOX_CONFIG_FEATURE_SEAMLESS_GZ
 	  Make tar, rpm, modprobe etc understand .gz data.
 
 config BUSYBOX_CONFIG_FEATURE_SEAMLESS_Z
-	bool Make tar and gunzip understand .Z data
+	bool tar, rpm, modprobe etc understand .Z data
 	default n
 	help
-	  Make tar and gunzip understand .Z data.
+	  Make tar, rpm, modprobe etc understand .Z data.
 
 config BUSYBOX_CONFIG_AR
 	bool ar
@@ -188,6 +187,18 @@ config BUSYBOX_CONFIG_FEATURE_GZIP_LONG_OPTIONS
 	help
 	  Enable use of long options, increases size by about 106 Bytes
 
+config BUSYBOX_CONFIG_GZIP_FAST
+	int Trade memory for gzip speed (0:small,slow - 2:fast,big)
+	default 0
+	range 0 2
+	depends on BUSYBOX_CONFIG_GZIP
+	help
+	  Enable big memory options for gzip.
+	  0: small buffers, small hash-tables
+	  1: larger buffers, larger hash-tables
+	  2: larger buffers, largest hash-tables
+	  Larger models may give slightly better compression
+
 config BUSYBOX_CONFIG_LZOP
 	bool lzop
 	default n
@@ -331,12 +342,9 @@ 

Re: [OpenWrt-Devel] fixed Wi-Fi from UR-336UN

2012-04-29 Thread Gabor Juhos
2012.04.26. 11:28 keltezéssel, Дмитрий Лебедев írta:
 Index: target/linux/ramips/image/Makefile
 ===
 --- target/linux/ramips/image/Makefile(revision 31481)
 +++ target/linux/ramips/image/Makefile(working copy)
 @@ -414,7 +414,7 @@
  
  
  define Image/Build/Profile/UPVEL
 -$(call
 Image/Build/Template/$(fs_squash)/$(1),GENERIC_4M,ur-336un,UR-336UN,ttyS1,57600,phys)
 +$(call
 Image/Build/Template/$(fs_squash)/$(1),GENERIC_8M,ur-336un,UR-336UN,ttyS1,57600,phys)
  endef
  
  define Image/Build/Profile/WR6202
 Index: target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
 ===
 ---
 target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom(revision
 31481)
 +++
 target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom(working
  copy)
 @@ -75,6 +75,7 @@
  wli-tx4-ag300n | \
  wr512-3gn | \
  wr6202 | \
 +ur-336un | \
  xdxrn502j)
  rt2x00_eeprom_extract factory 0 272
  ;;
 
 -- 
 Lebedev Dmitry lebe...@trendnet.ru mailto:lebe...@trendnet.ru

Applied.

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


[OpenWrt-Devel] luci interface

2012-04-29 Thread sami souibki

Hello, 
I installed Openwrt in Virtualbox,
and i like to alter the usr/lib/lua/luci/controller/admin/service.lua file 
but i can't because this file is read-only file.
I tried the chmod command but vainly. (it is the same poblem with many other 
files)
what can i do?
Greets.   ___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] dnsmasq: Bump to v2.61

2012-04-29 Thread Jonathan McCrohan
Signed-off-by: Jonathan McCrohan jmccro...@gmail.com
---
 package/dnsmasq/Makefile   |6 +++---
 package/dnsmasq/patches/101-ipv6.patch |   12 +++-
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/package/dnsmasq/Makefile b/package/dnsmasq/Makefile
index 9fc70b3..c0d9c8a 100644
--- a/package/dnsmasq/Makefile
+++ b/package/dnsmasq/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dnsmasq
-PKG_VERSION:=2.59
-PKG_RELEASE:=3
+PKG_VERSION:=2.61
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
-PKG_MD5SUM:=b5757ef2d7b651748eeebb88af29d7d6
+PKG_MD5SUM:=6ed0a5c2524dfc3a74ef494ee2469f09
 
 PKG_INSTALL:=1
 
diff --git a/package/dnsmasq/patches/101-ipv6.patch 
b/package/dnsmasq/patches/101-ipv6.patch
index 5a0c01b..8e5f3af 100644
--- a/package/dnsmasq/patches/101-ipv6.patch
+++ b/package/dnsmasq/patches/101-ipv6.patch
@@ -1,13 +1,15 @@
+diff --git a/src/config.h b/src/config.h
+index 84025f7..3c8d8c2 100644
 --- a/src/config.h
 +++ b/src/config.h
-@@ -263,8 +263,9 @@ NOTES:
+@@ -255,8 +255,9 @@ HAVE_SOCKADDR_SA_LEN
  /* We assume that systems which don't have IPv6
 headers don't have ntop and pton either */
  
--#if defined(INET6_ADDRSTRLEN)  defined(IPV6_V6ONLY)  !defined(NO_IPV6)
-+#if defined(INET6_ADDRSTRLEN)  !defined(NO_IPV6)
+-#if defined(INET6_ADDRSTRLEN)  defined(IPV6_V6ONLY)
++#if defined(INET6_ADDRSTRLEN)
  #  define HAVE_IPV6
 +#  define IPV6_V6ONLY 26
  #  define ADDRSTRLEN INET6_ADDRSTRLEN
- #  if defined(SOL_IPV6)
- #define IPV6_LEVEL SOL_IPV6
+ #elif defined(INET_ADDRSTRLEN)
+ #  undef HAVE_IPV6
-- 
1.7.10

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


Re: [OpenWrt-Devel] luci interface

2012-04-29 Thread Michel Daggelinckx

probably the filesystem is mounted read-only


Michel


On 04/29/2012 11:26 PM, sami souibki wrote:

Hello,

I installed Openwrt in Virtualbox,

and i like to alter the 
usr/lib/lua/luci/controller/admin/service.lua file but i can't 
because this file is read-only file.


I tried the chmod command but vainly. (it is the same poblem with many 
other files)


what can i do?

Greets.


___
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


[OpenWrt-Devel] [PATCH] modernize hotplug2 rules

2012-04-29 Thread Adam Goode
Fixes issue in https://dev.openwrt.org/ticket/11368.

Signed-off-by: Adam Goode a...@spicenitz.org

---

Index: package/base-files/files/etc/hotplug2-common.rules
===
--- package/base-files/files/etc/hotplug2-common.rules (revision 31532)
+++ package/base-files/files/etc/hotplug2-common.rules (working copy)
@@ -1,53 +1,31 @@

-DEVICENAME ~~ (null|full|ptmx|zero|gpio|hvc) {
+DEVNAME ~~ (null|full|ptmx|zero|gpio|hvc) {
  nothrottle
- makedev /dev/%DEVICENAME% 0666
+ makedev /dev/%DEVNAME% 0666
  next
 }

-DEVICENAME ~~ (tun|tap[0-9]) {
+DEVNAME == mapper/control {
  nothrottle
- makedev /dev/net/%DEVICENAME% 0644
-}
-
-DEVICENAME ~~ (controlC[0-9]|pcmC0D0*|timer) {
- nothrottle
- makedev /dev/snd/%DEVICENAME% 0644
+ makedev /dev/%DEVNAME% 0600
  next
 }

-DEVICENAME ~~ (lp[0-9]) {
- nothrottle
- makedev /dev/%DEVICENAME% 0644
- next
-}
-
-DEVPATH is set, SUBSYSTEM ~~ (input) {
- nothrottle
- makedev /dev/input/%DEVICENAME% 0644
-}
-
-DEVICENAME == device-mapper {
- nothrottle
- makedev /dev/mapper/control 0600
- next
-}
-
 ACTION == add, DEVPATH is set {
  nothrottle
- makedev /dev/%DEVICENAME% 0644
+ makedev /dev/%DEVNAME% 0644
 }

-ACTION == add, DEVPATH is set, DEVICENAME ~~ ^tty {
- chmod 0666 /dev/%DEVICENAME%
+ACTION == add, DEVPATH is set, DEVNAME ~~ ^tty {
+ chmod 0666 /dev/%DEVNAME%
 }

-ACTION == add, DEVPATH is set, DEVICENAME ~~ ^ppp {
- chmod 0600 /dev/%DEVICENAME%
+ACTION == add, DEVPATH is set, DEVNAME ~~ ^ppp {
+ chmod 0600 /dev/%DEVNAME%
 }

 ACTION == remove, DEVPATH is set, MAJOR is set, MINOR is set {
- remove /dev/%DEVICENAME%
+ remove /dev/%DEVNAME%
 }

 FIRMWARE is set, ACTION == add {
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] enable kernel support for ALSA midi

2012-04-29 Thread Adam Goode
Enable the real ALSA midi interface (seq) in the kernel. The existing
rawmidi interface is still present. This allows for the alsa midi
utilities to work.

Signed-off-by: Adam Goode a...@spicenitz.org

---

Index: package/kernel/modules/sound.mk
===
--- package/kernel/modules/sound.mk (revision 31532)
+++ package/kernel/modules/sound.mk (working copy)
@@ -42,6 +42,9 @@
snd-seq-device \
snd-rawmidi \
snd-timer \
+   snd-seq \
+   snd-seq-midi-event \
+   snd-seq-midi \
snd-pcm \
snd-mixer-oss \
snd-pcm-oss
@@ -54,6 +57,9 @@
$(LINUX_DIR)/sound/core/seq/snd-seq-device.$(LINUX_KMOD_SUFFIX) \
$(LINUX_DIR)/sound/core/snd-rawmidi.$(LINUX_KMOD_SUFFIX) \
$(LINUX_DIR)/sound/core/snd-timer.$(LINUX_KMOD_SUFFIX) \
+   $(LINUX_DIR)/sound/core/seq/snd-seq.$(LINUX_KMOD_SUFFIX) \
+   $(LINUX_DIR)/sound/core/seq/snd-seq-midi-event.$(LINUX_KMOD_SUFFIX) \
+   $(LINUX_DIR)/sound/core/seq/snd-seq-midi.$(LINUX_KMOD_SUFFIX) \
$(LINUX_DIR)/sound/core/snd-pcm.$(LINUX_KMOD_SUFFIX) \
$(LINUX_DIR)/sound/core/oss/snd-mixer-oss.$(LINUX_KMOD_SUFFIX) \
$(LINUX_DIR)/sound/core/oss/snd-pcm-oss.$(LINUX_KMOD_SUFFIX)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] include midi utilities in alsa-utils

2012-04-29 Thread Adam Goode
Along with http://patchwork.openwrt.org/patch/2144/ and
http://patchwork.openwrt.org/patch/2145/ this will enable the standard
ALSA midi utilities to be used in openwrt.

Signed-off-by: Adam Goode a...@spicenitz.org

---

Index: utils/alsa-utils/Makefile
===
--- utils/alsa-utils/Makefile   (revision 31538)
+++ utils/alsa-utils/Makefile   (working copy)
@@ -9,7 +9,7 @@

 PKG_NAME:=alsa-utils
 PKG_VERSION:=1.0.24.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2

 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/utils/ \
@@ -52,6 +52,12 @@
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aplay $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/arecord $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/alsactl $(1)/usr/sbin/
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aconnect $(1)/usr/bin/
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/amidi $(1)/usr/bin/
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aplaymidi $(1)/usr/bin/
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/arecordmidi $(1)/usr/bin/
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aseqdump $(1)/usr/bin/
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aseqnet $(1)/usr/bin/

$(INSTALL_DIR) $(1)/usr/share/alsa/init
$(INSTALL_DATA) \
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] To reverse wan and lan ports for this ar71xx board.

2012-04-29 Thread Vince Huang
Hey,guys!I am working on a patch for this tl-wr843n based on ar9341 soc.With 
this mach,the lans and wan are arraged like this:
http://postimage.org/image/fhynzvipd/ 


Hope some guy can tell me the method to get the Wan into right place.


/*
 *  TP-LINK TL-WR843N v1 board support
 *
 *  Copyright (C) 2010-2011 Jaiganesh Narayanan jnaraya...@atheros.com
 *  Copyright (C) 2011-2012 dongyuqi 729650...@qq.com
 *
 *  This program is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU General Public License version 2 as published
 *  by the Free Software Foundation.
 */


#include linux/gpio.h
#include linux/pci.h
#include linux/phy.h
#include linux/platform_device.h
#include linux/ath9k_platform.h
#include linux/ar8216_platform.h


#include asm/mach-ath79/ar71xx_regs.h


#include common.h
#include dev-ap9x-pci.h
#include dev-eth.h
#include dev-gpio-buttons.h
#include dev-leds-gpio.h
#include dev-m25p80.h
#include dev-spi.h
#include dev-usb.h
#include dev-wmac.h
#include machtypes.h


#define TL_WR843N_GPIO_LED_3G   11
#define TL_WR843N_GPIO_BTN_RESET17
#define TL_WR843N_GPIO_LED_WPS  15
#define TL_WR843N_GPIO_USB_POWER8
#define TL_WR843N_GPIO_LED_WLAN 13
#define TL_WR843N_GPIO_LED_WAN  18
#define TL_WR843N_GPIO_LED_LAN1 19
#define TL_WR843N_GPIO_LED_LAN2 20
#define TL_WR843N_GPIO_LED_LAN3 21
#define TL_WR843N_GPIO_LED_LAN4 12


#define TL_WR843N_GPIO_LED_SYSTEM   14


#define TL_WR843N_KEYS_POLL_INTERVAL20  /* msecs */
#define TL_WR843N_KEYS_DEBOUNCE_INTERVAL(3 * 
TL_WR843N_KEYS_POLL_INTERVAL)
/*
#define AR934X_GPIO_FUNC_ETH_SWITCH_LED4_EN BIT(7)
#define AR934X_GPIO_FUNC_ETH_SWITCH_LED3_EN BIT(6)
#define AR934X_GPIO_FUNC_ETH_SWITCH_LED2_EN BIT(5)
#define AR934X_GPIO_FUNC_ETH_SWITCH_LED1_EN BIT(4)
#define AR934X_GPIO_FUNC_ETH_SWITCH_LED0_EN BIT(3)*/


static const char *tl_wr843n_part_probes[] = {
tp-link,
NULL,
};


static struct flash_platform_data tl_wr843n_flash_data = {
.part_probes= tl_wr843n_part_probes,
};


static struct gpio_led tl_wr843n_leds_gpio[] __initdata = {
{
.name   = tp-link:green:3g,
.active_low = 1,
}, {
.name   = tp-link:green:system,
.active_low = 1,
}, {
.name   = tp-link:green:wps,
.active_low = 1,
}, {
.name   = tp-link:green:wlan,
.active_low = 1,
}, {
.name   = tp-link:green:wan,
.active_low = 1,
}, {
.name   = tp-link:green:lan1,
.active_low = 1,
}, {
.name   = tp-link:green:lan2,
.active_low = 1,
}, {
.name   = tp-link:green:lan3,
.active_low = 1,
}, {
.name   = tp-link:green:lan4,
.active_low = 1,
}
};


static struct gpio_keys_button tl_wr843n_gpio_keys[] __initdata = {
{
.desc   = reset,
.type   = EV_KEY,
.code   = KEY_RESTART,
.debounce_interval = TL_WR843N_KEYS_DEBOUNCE_INTERVAL,
.gpio   = 17,
.active_low = 1,
}
};


static void __init tl_wr843n_usb_setup(void)
{
/* enable power for the USB port */
gpio_request(TL_WR843N_GPIO_USB_POWER, USB power);
gpio_direction_output(TL_WR843N_GPIO_USB_POWER, 1);


ath79_register_usb();
}


static void __init tl_db12x_setup(void)
{
u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);

/*  ath79_gpio_function_disable(AR934X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
 AR934X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
 AR934X_GPIO_FUNC_ETH_SWITCH_LED2_EN |
 AR934X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
 AR934X_GPIO_FUNC_ETH_SWITCH_LED4_EN);*/


//  ath79_gpio_output_select(TL_WR843N_GPIO_LED_USB, AR934X_GPIO_OUT_GPIO);

//  db120_gmac_setup();


ath79_register_mdio(1, 0x0);
ath79_register_mdio(0, 0x0);


/* WAN port */
ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0);

ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
ath79_eth1_data.speed = SPEED_1000;
ath79_eth1_data.duplex = DUPLEX_FULL;
//  ath79_eth1_data.has_ar7240_switch = 1;

ath79_register_eth(1);

/* LAN ports */
ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1);

/*ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
ath79_eth0_data.speed =