[OpenWrt-Devel] [PATCH] ramips: update BR-6475ND dts

2014-12-20 Thread Christopher Lais
Update firmware location for 2.4GHz radio on the Edimax BR-6475nD.

Signed-off-by: Christopher Lais 
---
 target/linux/ramips/dts/BR-6475ND.dts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/target/linux/ramips/dts/BR-6475ND.dts 
b/target/linux/ramips/dts/BR-6475ND.dts
index 06f00d6..8dcaca7 100644
--- a/target/linux/ramips/dts/BR-6475ND.dts
+++ b/target/linux/ramips/dts/BR-6475ND.dts
@@ -39,6 +39,7 @@
};
 
wmac@1018 {
+   status = "okay";
ralink,mtd-eeprom = <&factory 0>;
};
 
@@ -58,9 +59,10 @@
pci-bridge@1 {
status = "okay";
wmac@0,0 {
+   ralink,5ghz = <0>;
compatible = "ralink,rt2880-pci", 
"pciclass060400", "pciclass0604";
reg = < 0x1 0 0 0 0 >;
-   ralink,eeprom = "soc_wmac.eeprom";
+   ralink,mtd-eeprom = <&factory 0x8000>;
};
};
};
-- 
2.1.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ramips: update BR-6475ND dts

2014-12-20 Thread Christopher Lais
Disregard, seems to not function the same as reading from offset 0x8000 of
factory.  Will make a proper patch later (perhaps as RTN56U is doing it, as
that does work..)

On Sat, Dec 20, 2014 at 4:27 AM, Christopher Lais <
chris+open...@zenthought.org> wrote:

> Update firmware location for 2.4GHz radio on the Edimax BR-6475nD.
>
> Signed-off-by: Christopher Lais 
> ---
>  target/linux/ramips/dts/BR-6475ND.dts | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/target/linux/ramips/dts/BR-6475ND.dts
> b/target/linux/ramips/dts/BR-6475ND.dts
> index 06f00d6..8dcaca7 100644
> --- a/target/linux/ramips/dts/BR-6475ND.dts
> +++ b/target/linux/ramips/dts/BR-6475ND.dts
> @@ -39,6 +39,7 @@
> };
>
> wmac@1018 {
> +   status = "okay";
> ralink,mtd-eeprom = <&factory 0>;
> };
>
> @@ -58,9 +59,10 @@
> pci-bridge@1 {
> status = "okay";
> wmac@0,0 {
> +   ralink,5ghz = <0>;
> compatible = "ralink,rt2880-pci",
> "pciclass060400", "pciclass0604";
> reg = < 0x1 0 0 0 0 >;
> -   ralink,eeprom = "soc_wmac.eeprom";
> +   ralink,mtd-eeprom = <&factory
> 0x8000>;
> };
> };
> };
> --
> 2.1.3
>
>


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


Re: [OpenWrt-Devel] batman-adv ipv6

2014-12-20 Thread Alexander Couzens
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi,

maybe this is related to #17625 https://dev.openwrt.org/ticket/17625 ?
(destination mac address of IPv6 neighbour solicitation changed from multi- to 
unicast (IPv6 partly broken))

Best,
lynxis

- -- 
Alexander Couzens

mail: lyn...@fe80.eu
jabber: lyn...@jabber.ccc.de
mobile: +4915123277221
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJUlVOXAAoJEMKenaag34YEVuUQALod43keWEdB4/yFFNYXJN1R
HGcjvIAiNFx7I7rWt1m1v/j/8I6QxJ7XD9nv5SYDt1/NO0T1CI1zEc4NdDW8SVOU
2kacUGjHVdt+MmXjodff3L0StSnXaDIIXCt6p5vdWkiXFbaClhYEmN+/nHHRlhau
0+y9Hs8rjdEIbwHz4kAmj04W3/OXNCuHr6t2whFq6NjL8+iDv2+vUB1vgb5/PkBA
9ei7hQwG7fSgEphSL9xEKiJStwlAdUwJsQGAM2ud5K7dN3D1oP5CnGh0xLJ7Fcwh
rIqoxyij7J4b3LIEklJ1POgF9Dv9uN1o4cZx4MDlOXJWdzgUoUPmP6WXj6eH74B9
HB6XloSGO84yngZUXKcANjD0168lMgtD0CJk+znqp2U70WzsbAYjlM4MBu5U1wlF
f42RMrL7xZu+aTWDa0igVMs0kST+R9YW5cpcZfBsRMfauCfvBaNM3H2oZzrg7/xm
rL//sh1EmLW/JhqtmsXyFlMNdyMR9hQcR8AjqI5EMxIMpsAcgkMidSVdWDmZlB5r
/bJzi3PZpB/Nwl6PVVM35ot91ZurzhpXMnFr6TC1gumKT7PMUBCVJnncPWekNt10
H83AMQTypFWjmBtrxb7PBE7453y81xuazn1Pq7V2mgIqtjZkLcKHU2oRpKR7tXDn
RlLO17sNLBQ6zbDnHM+F
=z3OH
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [package] busybox: add another upstream fix

2014-12-20 Thread John Szakmeister
Without this, modprobe doesn't work with uncompressed kernel modules.

Signed-off-by: John Szakmeister 
---
 .../008-upstream_no_fail_uncompressed.patch| 31 ++
 1 file changed, 31 insertions(+)
 create mode 100644 
package/utils/busybox/patches/008-upstream_no_fail_uncompressed.patch

diff --git 
a/package/utils/busybox/patches/008-upstream_no_fail_uncompressed.patch 
b/package/utils/busybox/patches/008-upstream_no_fail_uncompressed.patch
new file mode 100644
index 000..46df028
--- /dev/null
+++ b/package/utils/busybox/patches/008-upstream_no_fail_uncompressed.patch
@@ -0,0 +1,31 @@
+From b664f740d90880560ce46b11f766625341342e80 Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko 
+Date: Mon, 27 Jan 2014 12:02:18 +
+Subject: libbb: open_zipped() should not fail on non-compressed files
+
+Signed-off-by: Denys Vlasenko 
+---
+diff --git a/archival/libarchive/open_transformer.c 
b/archival/libarchive/open_transformer.c
+index 1aeba13..27854af 100644
+--- a/archival/libarchive/open_transformer.c
 b/archival/libarchive/open_transformer.c
+@@ -200,7 +200,16 @@ int FAST_FUNC open_zipped(const char *fname)
+|| (ENABLE_FEATURE_SEAMLESS_BZ2)
+|| (ENABLE_FEATURE_SEAMLESS_XZ)
+   ) {
+-  setup_unzip_on_fd(fd, /*fail_if_not_detected:*/ 1);
++  /*
++   * Do we want to fail_if_not_detected?
++   * In most cases, no: think "insmod non_compressed_module".
++   * A case which would like to fail is "zcat uncompressed_file":
++   * otherwise, it happily outputs uncompressed_file as-is,
++   * which is, strictly speaking, not what is expected.
++   * If this ever becomes a problem, we can add
++   * fail_if_not_detected bool argument to open_zipped().
++   */
++  setup_unzip_on_fd(fd, /*fail_if_not_detected:*/ 0);
+   }
+ 
+   return fd;
+--
+cgit v0.9.1
-- 
2.1.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [package] busybox: add another upstream fix

2014-12-20 Thread Felix Fietkau
On 2014-12-20 14:49, John Szakmeister wrote:
> Without this, modprobe doesn't work with uncompressed kernel modules.
> 
> Signed-off-by: John Szakmeister 
Why do we need this patch in OpenWrt? We're not using busybox modprobe.

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


Re: [OpenWrt-Devel] 3.18 kernel timing? (Was Re: Moving to 3.17.x kernel?)

2014-12-20 Thread Marc Nicholas
Well, there-in lies the problem: AR71xx doesn’t have any patches for >3.14 
kernel right now. 

I’m trying to build it, though.

-m


-- 
Marc Nicholas
CTO, Wimoto Technologies Inc.
Unit 2, 300 Don Park Road, Markham, Ontario L3R 3A1 CANADA
+1.416.414.6272

On December 19, 2014 at 11:16:22 AM, Weedy (weedy2...@gmail.com) wrote:


On Dec 19, 2014 9:45 AM, "Marc Nicholas"  wrote:
>
> So let me turn my question around: given there seems to be some work on the 
> 3.18 kernel, is there a timeline for this to go into the development trunk? :)
>
> Thx.

Beyond changing the makefile?
https://dev.openwrt.org/browser/trunk/target/linux/ar71xx/Makefile

Kernel version is right at there. You can change it to whatever your platform 
has patches for.

https://dev.openwrt.org/browser/trunk/target/linux/ar71xx
https://dev.openwrt.org/browser/trunk/target/linux/brcm47xx

(Awww yes, Ontario bro. Vaughan here)___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 3.18 kernel timing? (Was Re: Moving to 3.17.x kernel?)

2014-12-20 Thread Rafał Miłecki
Don't top post.

On 20 December 2014 at 18:58, Marc Nicholas  wrote:
> Well, there-in lies the problem: AR71xx doesn’t have any patches for >3.14
> kernel right now.
>
> I’m trying to build it, though.

You can be the one to add them.

cp -R patches-3.14 patches-3.18
make target/linux/{clean,prepare} V=s QUILT=1

http://wiki.openwrt.org/doc/devel/patches#adding_or_editing_kernel_patches
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] shadow: conflicts with busybox

2014-12-20 Thread Gergely Kiss
Hi Steven,

I found an issue regarding your most recent commit 
(65d8897100012b948e29b9d3ee71b468df6afac4) for the shadow package.

The packages shadow-su and shadow-passwd are now causing file conflicts in case 
the corresponding BusyBox-commands are compiled into the image (passwd is 
included by default).

As an example, libpq depends on shadow-utils which would install all of the 
shadow packages including shadow-passwd which makes package installation fail:

Collected errors:
 * check_data_file_clashes: Package shadow-passwd wants to install file 
/usr/bin/passwd
But that file is already provided by package  * busybox
 * opkg_install_cmd: Cannot install package shadow.

Do you have any idea how to fix this? This bug prevents to install the seafile 
packages I have recently contributed. :(


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


Re: [OpenWrt-Devel] [PATCH] [package] busybox: add another upstream fix

2014-12-20 Thread John Szakmeister
On Sat, Dec 20, 2014 at 9:32 AM, Felix Fietkau  wrote:
> On 2014-12-20 14:49, John Szakmeister wrote:
>> Without this, modprobe doesn't work with uncompressed kernel modules.
>>
>> Signed-off-by: John Szakmeister 
> Why do we need this patch in OpenWrt? We're not using busybox modprobe.

I had it configured as being on and available in my configuration.  If
you don't feel you guys need it, then sorry for the noise.

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


Re: [OpenWrt-Devel] 3.18 kernel timing? (Was Re: Moving to 3.17.x kernel?)

2014-12-20 Thread Hauke Mehrtens
On 12/19/2014 03:45 PM, Marc Nicholas wrote:
> So let me turn my question around: given there seems to be some work on
> the 3.18 kernel, is there a timeline for this to go into the development
> trunk? :)
> 
> Thx.
> 
> -m
> 
> -- 
> Marc Nicholas
> CTO, Wimoto Technologies Inc.
> Unit 2, 300 Don Park Road, Markham, Ontario L3R 3A1 CANADA
> +1.416.414.6272
> 
> On December 19, 2014 at 7:27:14 AM, Marc Nicholas (m...@wimoto.com
> ) wrote:
> 
>> Thanks, Etienne!
>>
>> -m
>>
>> -- 
>> Marc Nicholas
>> CTO, Wimoto Technologies Inc.
>> Unit 2, 300 Don Park Road, Markham, Ontario L3R 3A1 CANADA
>> +1.416.414.6272
>>
>> On December 19, 2014 at 6:54:59 AM, Etienne Champetier
>> (champetier.etie...@gmail.com )
>> wrote:
>>
>>> Hi
>>>
>>> 2014-12-19 12:42 GMT+01:00 Marc Nicholas >> >:
>>>
>>> Hi,
>>>
>>> I think I might inherently know this is might be more trouble
>>> than it’s worth, but I have a piece of code that requires a 3.17
>>> kernel and the kernel feature in question hasn’t been back-ported
>>> yet (CONFIG_BT_6LOWPAN).
>>>
>>> I’m reasonably comfortable with using the development trunks, but
>>> was wondering if anyone had any feedback on just how much effort
>>> I’d be looking at rev’ing from the current 3.14.x to 3.17
>>> kernels? And maybe how to go about this?
>>>
>>> I guess one of the major hurdles is dependencies and things
>>> beyond the kernel breaking as I go?
>>>
>>> Any feedback appreciated :)
>>>
>>> -m
>>>
>>>
>>> I don't know how to use it, but devs are already working on 3.18
>>> https://dev.openwrt.org/browser/trunk/target/linux/generic?order=name
> 

The next OpenWrt release will be based on kernel 3.14 so I would suggest
you also use kernel 3.14.

Instead of taking the bluetooth stuff directly from the kernel you could
also take it from backports. It is in package/kernel/mac80211/ This way
you can use an old kernel 3.14 and use the most recent bluetooth stack.
To do this you would have to move the bluetooth stuff from
package/kernel/linux/modules/netdevices.mk to
package/kernel/mac80211/Makefile.

What are you planing to do? I bought some bluetooth dongles some time
ago to try out a 6lowpan network over bluetooth with OpenWrt, but I
haven't started.

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


[OpenWrt-Devel] [PATCH] ramips: update BR-6475ND dts

2014-12-20 Thread Christopher Lais
Update firmware location for 2.4GHz radio on the Edimax BR-6475nD.

Signed-off-by: Christopher Lais 
---
 .../linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom   | 2 +-
 target/linux/ramips/dts/BR-6475ND.dts | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom 
b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
index 2a5a80c..0cd95a5 100644
--- a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
+++ b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
@@ -42,7 +42,7 @@ case "$FIRMWARE" in
cy-swr1100)
rt2x00_eeprom_extract "factory" 8192 512
;;
-   rt-n56u | whr-600d | whr-1166d)
+   br-6475nd | rt-n56u | whr-600d | whr-1166d)
rt2x00_eeprom_extract "factory" 32768 512
;;
esac
diff --git a/target/linux/ramips/dts/BR-6475ND.dts 
b/target/linux/ramips/dts/BR-6475ND.dts
index 06f00d6..1907028 100644
--- a/target/linux/ramips/dts/BR-6475ND.dts
+++ b/target/linux/ramips/dts/BR-6475ND.dts
@@ -39,6 +39,7 @@
};
 
wmac@1018 {
+   status = "okay";
ralink,mtd-eeprom = <&factory 0>;
};
 
@@ -58,9 +59,10 @@
pci-bridge@1 {
status = "okay";
wmac@0,0 {
+   ralink,5ghz = <0>;
compatible = "ralink,rt2880-pci", 
"pciclass060400", "pciclass0604";
reg = < 0x1 0 0 0 0 >;
-   ralink,eeprom = "soc_wmac.eeprom";
+   ralink,eeprom = "rt2x00pci_1_0.eeprom";
};
};
};
-- 
2.1.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] shadow: conflicts with busybox

2014-12-20 Thread Gergely Kiss
On 12/20/2014 07:59 PM, Gergely Kiss wrote:
> Hi Steven,
> 
> I found an issue regarding your most recent commit 
> (65d8897100012b948e29b9d3ee71b468df6afac4) for the shadow package.
> 
> The packages shadow-su and shadow-passwd are now causing file conflicts in 
> case the corresponding BusyBox-commands are compiled into the image (passwd 
> is included by default).
> 
> As an example, libpq depends on shadow-utils which would install all of the 
> shadow packages including shadow-passwd which makes package installation fail:
> 
> Collected errors:
>  * check_data_file_clashes: Package shadow-passwd wants to install file 
> /usr/bin/passwd
>   But that file is already provided by package  * busybox
>  * opkg_install_cmd: Cannot install package shadow.
> 
> Do you have any idea how to fix this? This bug prevents to install the 
> seafile packages I have recently contributed. :(
> 
> 
> Thanks,
> Gergely
> 

I've recompiled the packages using the same sources, and noticed that my 
version has different dependencies:

***

root@OpenWrt:~# opkg info shadow-utils
Package: shadow-utils
Version: 4.2.1-3
Depends: libc, shadow
Status: unknown ok not-installed
Section: utils
Architecture: ar71xx
Maintainer: Steven Barth 
MD5Sum: 6e7ec717b185b2f5354cbf8565d4e220
Size: 903
Filename: shadow-utils_4.2.1-3_ar71xx.ipk
Source: feeds/packages/utils/shadow
Description: Full versions of standard shadow utilities. Normally, you would not
 use this package, since the functionality in BusyBox is more than
 sufficient and much smaller.

Package: shadow-utils
Version: 4.2.1-4
Depends: libc
Status: install user installed
Section: utils
Architecture: ar71xx
Maintainer: Steven Barth 
MD5Sum: c332d38c847fd0845e6d10f18bb33014
Size: 894
Filename: shadow-utils_4.2.1-4_ar71xx.ipk
Source: feeds/packages/utils/shadow
Description: Full versions of standard shadow utilities. Normally, you would not
 use this package, since the functionality in BusyBox is more than
 sufficient and much smaller.
Installed-Time: 1419111250

***

I believe this is how it should work, now the conflict is gone as only the 
required components are installed by opkg.

I'm going to create a pull request soon providing a fix for this.


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


[OpenWrt-Devel] [PATCH 1/2] gemini: add rtc-gemini driver

2014-12-20 Thread Roman Yeryomin
Signed-off-by: Roman Yeryomin 
---
 target/linux/gemini/Makefile   |   2 +-
 target/linux/gemini/config-3.10|   2 +
 target/linux/gemini/files/drivers/rtc/rtc-gemini.c | 220 +
 ...emini-fix-platform_register_rtc-prototype.patch |  23 ---
 .../linux/gemini/patches-3.10/002-gemini-rtc.patch |  51 +
 5 files changed, 274 insertions(+), 24 deletions(-)
 create mode 100644 target/linux/gemini/files/drivers/rtc/rtc-gemini.c
 delete mode 100644 
target/linux/gemini/patches-3.10/002-arm-gemini-fix-platform_register_rtc-prototype.patch
 create mode 100644 target/linux/gemini/patches-3.10/002-gemini-rtc.patch

diff --git a/target/linux/gemini/Makefile b/target/linux/gemini/Makefile
index 82338f4..9228bf2 100644
--- a/target/linux/gemini/Makefile
+++ b/target/linux/gemini/Makefile
@@ -10,7 +10,7 @@ ARCH:=arm
 BOARD:=gemini
 BOARDNAME:=Cortina Systems CS351x
 SUBTARGETS:=raidsonic wiligear
-FEATURES:=squashfs pci
+FEATURES:=squashfs pci rtc
 CPU_TYPE:=fa526
 MAINTAINER:=Imre Kaloz 
 
diff --git a/target/linux/gemini/config-3.10 b/target/linux/gemini/config-3.10
index a0ff34c..f10 100644
--- a/target/linux/gemini/config-3.10
+++ b/target/linux/gemini/config-3.10
@@ -134,6 +134,8 @@ CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PHYLIB=y
 # CONFIG_PREEMPT_RCU is not set
 # CONFIG_RCU_STALL_COMMON is not set
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_GEMINI=y
 # CONFIG_SCHED_HRTICK is not set
 # CONFIG_SCSI_DMA is not set
 CONFIG_SPLIT_PTLOCK_CPUS=99
diff --git a/target/linux/gemini/files/drivers/rtc/rtc-gemini.c 
b/target/linux/gemini/files/drivers/rtc/rtc-gemini.c
new file mode 100644
index 000..587d812
--- /dev/null
+++ b/target/linux/gemini/files/drivers/rtc/rtc-gemini.c
@@ -0,0 +1,220 @@
+/*
+ *  Gemini OnChip RTC
+ *
+ *  Copyright (C) 2009 Janos Laube 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Original code for older kernel 2.6.15 are form Stormlinksemi
+ * first update from Janos Laube for > 2.6.29 kernels
+ *
+ * checkpatch fixes and usage off rtc-lib code
+ * Hans Ulli Kroll 
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#define DRV_NAME   "rtc-gemini"
+
+MODULE_DESCRIPTION("RTC driver for Gemini SoC");
+MODULE_ALIAS("platform:" DRV_NAME);
+MODULE_AUTHOR("Hans Ulli Kroll ");
+MODULE_LICENSE("GPL");
+
+struct gemini_rtc {
+   struct rtc_device   *dev;
+   void __iomem*base;
+   int irq;
+};
+
+enum gemini_rtc_offsets {
+   GEMINI_RTC_SECOND   = 0x00,
+   GEMINI_RTC_MINUTE   = 0x04,
+   GEMINI_RTC_HOUR = 0x08,
+   GEMINI_RTC_DAYS = 0x0C,
+   GEMINI_RTC_ALARM_SECOND = 0x10,
+   GEMINI_RTC_ALARM_MINUTE = 0x14,
+   GEMINI_RTC_ALARM_HOUR   = 0x18,
+   GEMINI_RTC_RECORD   = 0x1C,
+   GEMINI_RTC_CR   = 0x20
+};
+
+static irqreturn_t gemini_rtc_interrupt(int irq, void *dev)
+{
+   return IRQ_HANDLED;
+}
+
+/*
+ * Looks like the RTC in the Gemini SoC is (totaly) broken
+ * We can't read/write directly the time from RTC registers.
+ * We must do some "offset" calculation to get the real time
+ *
+ * The register "day" seams to be fixed, and the register "hour"
+ * has his own mind.
+ *
+ * Maybe we can write directly the hour and days since EPOCH
+ * but in this case the RTC will recalucate to some (other) strange values.
+ * If you write time to the registers you will not read the same values.
+ *
+ * This FIX works pretty fine and Stormlinksemi aka Cortina-Networks does
+ * the same thing, without the rtc-lib.c calls.
+ */
+
+static int gemini_rtc_read_time(struct device *dev, struct rtc_time *tm)
+{
+   struct gemini_rtc *rtc = dev_get_drvdata(dev);
+
+   unsigned int  days, hour, min, sec;
+   unsigned long offset, time;
+
+   sec= readl(rtc->base + GEMINI_RTC_SECOND);
+   min= readl(rtc->base + GEMINI_RTC_MINUTE);
+   hour   = readl(rtc->base + GEMINI_RTC_HOUR);
+   days   = readl(rtc->base + GEMINI_RTC_DAYS);
+   offset = readl(rtc->base + GEMINI_RTC_RECORD);
+
+   time = offset + days * 86400 + hour * 3600 + min * 60 + sec;
+
+   rtc_time_to_tm(time, tm);
+   return 0;
+}
+
+/*
+ * Maybe there is some hidden register to care ?
+ * looks like regis

[OpenWrt-Devel] [PATCH 2/2] gemini: add ata driver

2014-12-20 Thread Roman Yeryomin
Signed-off-by: Roman Yeryomin 
---
 target/linux/gemini/config-3.10|   2 +
 .../linux/gemini/files/drivers/ata/pata_gemini.c   | 234 +
 .../gemini/patches-3.10/150-gemini-pata.patch  | 192 +
 3 files changed, 428 insertions(+)
 create mode 100644 target/linux/gemini/files/drivers/ata/pata_gemini.c
 create mode 100644 target/linux/gemini/patches-3.10/150-gemini-pata.patch

diff --git a/target/linux/gemini/config-3.10 b/target/linux/gemini/config-3.10
index f10..c6bcff1 100644
--- a/target/linux/gemini/config-3.10
+++ b/target/linux/gemini/config-3.10
@@ -16,6 +16,7 @@ CONFIG_ARM_L1_CACHE_SHIFT=5
 CONFIG_ARM_NR_BANKS=8
 CONFIG_ARM_PATCH_PHYS_VIRT=y
 # CONFIG_ARPD is not set
+CONFIG_ATA=y
 CONFIG_ATAGS=y
 # CONFIG_CACHE_L2X0 is not set
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -129,6 +130,7 @@ CONFIG_OLD_SIGACTION=y
 CONFIG_OLD_SIGSUSPEND3=y
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_PAGE_OFFSET=0xC000
+CONFIG_PATA_GEMINI=y
 CONFIG_PCI=y
 CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PHYLIB=y
diff --git a/target/linux/gemini/files/drivers/ata/pata_gemini.c 
b/target/linux/gemini/files/drivers/ata/pata_gemini.c
new file mode 100644
index 000..707e870
--- /dev/null
+++ b/target/linux/gemini/files/drivers/ata/pata_gemini.c
@@ -0,0 +1,234 @@
+/*
+ *  Support for Gemini PATA
+ *
+ *  Copyright (C) 2009 Janos Laube 
+ *  Copyright (C) 2010 Frederic Pecourt 
+ *  Copyright (C) 2011 Tobias Waldvogel 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Values of IOMUX
+ * 26:24 bits is "IDE IO Select"
+ * 111:100 - Reserved
+ * 011 - ata0 <-> sata0, sata1; bring out ata1
+ * 010 - ata1 <-> sata1, sata0; bring out ata0
+ * 001 - ata0 <-> sata0, ata1 <-> sata1; bring out ata1
+ * 000 - ata0 <-> sata0, ata1 <-> sata1; bring out ata0
+ *
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#define DRV_NAME   "pata-gemini"
+
+#define PATA_GEMINI_PORTS  1
+
+#define PIO_TIMING_REG 0x10
+#define MDMA_TIMING_REG0x11
+#define UDMA_TIMING0_REG   0x12
+#define UDMA_TIMING1_REG   0x13
+#define CLK_MOD_REG0x14
+
+#define CLK_MOD_66M_DEV0_BIT   0
+#define CLK_MOD_66M_DEV1_BIT   1
+#define CLK_MOD_UDMA_DEV0_BIT  4
+#define CLK_MOD_UDMA_DEV1_BIT  5
+
+#define CLK_MOD_66M_DEV0   (1 << CLK_MOD_66M_DEV0_BIT)
+#define CLK_MOD_66M_DEV1   (1 << CLK_MOD_66M_DEV1_BIT)
+#define CLK_MOD_UDMA_DEV0  (1 << CLK_MOD_UDMA_DEV0_BIT)
+#define CLK_MOD_UDMA_DEV1  (1 << CLK_MOD_UDMA_DEV1_BIT)
+
+#define SATA_ENABLE_PDEV_MASK  0x01
+#define SATA_ENABLE_PDEV_PM0x02
+#define SATA_ENABLE_PDEV_ADDED 0x04
+#define SATA_ENABLE_PDEV_REMOVED   0x08
+#define SATA_ENABLE_SDEV_MASK  0x10
+#define SATA_ENABLE_SDEV_PM0x20
+#define SATA_ENABLE_SDEV_ADDED 0x40
+#define SATA_ENABLE_SDEV_REMOVED   0x80
+
+MODULE_AUTHOR("Janos Laube ");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:" DRV_NAME);
+
+static unsigned char PIO_TIMING[5] = {
+   0xaa, 0xa3, 0xa1, 0x33, 0x31
+};
+
+static unsigned char TIMING_MW_DMA[4][2] = {
+   { 0x44, 1 }, // 4804.2
+   { 0x42, 1 }, // 150   13.3
+   { 0x31, 1 }, // 120   16.7
+   { 0x21, 1 }, // 100   20
+};
+
+static unsigned char TIMING_UDMA[7][2] = {
+   { 0x33, 0 }, //24016.7
+   { 0x31, 0 }, //16025
+   { 0x21, 0 }, //12033.3
+   { 0x21, 1 }, //90 44.4
+   { 0x11, 1 }, //60 66.7
+   { 0x11 | 0x80, 0 }, //40  100
+   { 0x11 | 0x80, 1 }, //30  133
+};
+
+static struct scsi_host_template pata_gemini_sht = {
+   ATA_NCQ_SHT(DRV_NAME),
+   .can_queue  = 1,
+   .sg_tablesize   = 128,
+   .dma_boundary   = 0xU,
+};
+
+static void gemini_set_dmamode(struct ata_port *ap, struct ata_device *adev)
+{
+   void __iomem *clk_reg   = ap->ioaddr.bmdma_addr + CLK_MOD_REG;
+   void __iomem *tim_reg   = ap->ioaddr.bmdma_addr + UDMA_TIMING0_REG;
+   unsigned short udma = adev->dma_mode;
+   unsigned short speed= udma;
+   unsigned short devno= adev->devno & 1;
+   unsigned short i;
+   u8 mod_udma_mask= 1 << (CLK_MOD_UDMA_DEV0_BIT + devno);
+   u8 mod_66m_mask = 1 << (C

[OpenWrt-Devel] oxnas target description for wiki on dev.openwrt.org

2014-12-20 Thread Daniel Golle
Hi!

I reckon the following info should go to
https://dev.openwrt.org/wiki/oxnas
and there should be a reference to that on
https://dev.openwrt.org/wiki/platforms

I love to edit the wiki myself, however, trac doesn't seem to allow
users to create new accounts. What to do? Does anyone who got access
to the wiki feel like adding this info?


oxnas | Oxford Semi. OX82x, PLXTECH NAS782{0,1} | ARM | little | Daniel | oxnas
>> https://dev.openwrt.org/wiki/platforms

---
oxnas

supported SoCs: Oxford Semi. OX82x, PLXTECH NAS782{0,1}
maybe supported: PLXTECH NAS7825 (nowhere to be found in the wild afaik)
not supported: Oxford Semi. OX81x (obsolete, different core, different address 
layout)

architecture overview:
 2x ARM11MPCORE (ARMv7) core
 no PCIe on OX820/NAS7820, 1x PCIe on OX821/NAS7821, 2x PCIe on NAS7825
 up to 512MB DDR2 SDRAM
 NAND or SPI serial flash (128MiB NAND typically found in the wild)
 DesignWare/ST GigE core with GMII/RMGII
 EHCI USB 2.0 Host (USB gadget mode might be possible as well)
 OX934 single-DMA dual-port S-ATA controller (SoC supports JBOD and RAID0/1 in 
hardware, OpenWrt doesn't yet)
 2x DesignWare/Synopsis S-ATA phy
 Crypto engine (?)
 "LEON" (no, not a SPARC) co-processor usable for wake-on-LAN and maybe as a 
watchdog


history/availability:
 * originally developed at Oxford Semi
 * Oxford Semi acquired by PLXTECH, NAS products renamed
 * PLXTECH acquired by Avago, announced end-of-life for NAS products
 * however, Avago got bulk-agreement with Roychester...


known limitations:
 - vendor's U-Boot doesn't support booting modern kernels
   => chain-load a recent U-Boot which does
  This additional U-Boot stage uses UBI to load OpenWrt and stores it's 
environment in UBI
  In future, it may instead be feasible to replace the stock loader, 
kwboot-like serial recovery yet needs to be found...
  => PLL and SDRAM setup is board specific and needs to be taken care of if 
we want that

 - S-ATA core requires host-lock for port transfers
   => S-ATA performance sucks when using both drivers simultanously e.g. for 
RAID-1
  vendor's Linux SDK uses hardware-supported RAID and JBOD, OpenWrt doesn't 
(yet)
  
https://github.com/kref/linux-oxnas/blob/reference/sdk/drivers/md/ox820hwraid.c

 - no USB gadget support

 - Crypto engine undocumented/unsupported in all known GPL drops, no support in 
OpenWrt

 - LEON microcode loading not yet implemented, thus no watchdog and wake-on-lan

 - no decent hddtemp-driven fancontrol for devices with fan implemented in 
OpenWrt



LIST OF SUPPORTED BOARDS

k=known backdoor
i=installer/flash image available
h=how-to available
s=serial access required for installation
?=missing fdt, please get in touch if you got that board/device

stg-212   : ZyXEL NSA-212 / MitraStra STG-212 / Medion ... : k,h : 
http://wiki.openwrt.org/toh/medion/md86587
pogoplug* : Cloud Engines PogoPlug v3/Pro  : k,s :
kd20  : Shuttle KD20   : h,s :
ch3hnas2  : Conceptronic CH3HNAS2  : ?   :
em4172: Eminent EM4172 : ?   :
hmnhdcd   : iomega Home Media Network Hard Drive Cloud Edition : ?   :
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] batman-adv ipv6

2014-12-20 Thread Lars Boegild Thomsen
On Saturday, December 20, 2014 11:46:47 Alexander Couzens wrote:
> maybe this is related to #17625 https://dev.openwrt.org/ticket/17625 ?
> (destination mac address of IPv6 neighbour solicitation changed from multi- 
> to unicast (IPv6 partly broken))

I thought so for a while but apparently not.  I _think_ it is related to some 
firewall changes but I can't pin down exactly what has changed.

Apparently it was mentioned somewhere that some RFC prohibited an IPv6 router 
to react to router announcements, so if IPv6 forwarding is enabled the WAN 
interface won't use auto configuration.  And that is actually the current 
behavior.  IF I disable IPv6 forwarding, the WAN interface does get an IPv6 
address.  I guess this behavior makes sense somewhat but I wish I knew what had 
changed so I could (RFC compliant or not) reenable the old behavior.

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


[OpenWrt-Devel] Is tspc removed from openwrt?

2014-12-20 Thread xinglp

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


[OpenWrt-Devel] [PATCH 1/1] package: contrib: add smstools3 package

2014-12-20 Thread Gerald Kerma
Add smstools3 package from http://smstools3.kekekasvi.com/

Signed-off-by: Gerald Kerma 
---
 package/contrib/smstools3/Makefile |  73 ++
 package/contrib/smstools3/files/smstools3.conf |  20 +++
 package/contrib/smstools3/files/smstools3.init | 152 +
 package/contrib/smstools3/patches/001-smsd.patch   |  13 ++
 .../contrib/smstools3/patches/002-Makefile.patch   |  12 ++
 5 files changed, 270 insertions(+)
 create mode 100644 package/contrib/smstools3/Makefile
 create mode 100644 package/contrib/smstools3/files/smstools3.conf
 create mode 100644 package/contrib/smstools3/files/smstools3.init
 create mode 100644 package/contrib/smstools3/patches/001-smsd.patch
 create mode 100644 package/contrib/smstools3/patches/002-Makefile.patch

diff --git a/package/contrib/smstools3/Makefile 
b/package/contrib/smstools3/Makefile
new file mode 100644
index 000..efbaa55
--- /dev/null
+++ b/package/contrib/smstools3/Makefile
@@ -0,0 +1,73 @@
+#
+# Copyright (C) 2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=smstools3
+PKG_VERSION:=3.1.15
+PKG_RELEASE:=3
+
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_PARALLEL:=0
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://smstools3.kekekasvi.com/packages/
+PKG_MD5SUM:=0241ef60e646fac1a06254a848e61ed7
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
+PKG_BUILD_DEPENDS:=libiconv-full iconv socket nsl
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/smstools3
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=SMS Server Tools 3
+  DEPENDS:=+libiconv-full +iconv
+  URL:=http://smstools3.kekekasvi.com/
+endef
+
+define Package/smstools3/description
+ The SMS Server Tools 3 is a SMS Gateway software which can send and receive
+ short messages through GSM modems and mobile phones.
+endef
+
+TARGET_CFLAGS = -D NUMBER_OF_MODEMS=1
+TARGET_CFLAGS += -D USE_ICONV
+TARGET_CFLAGS += -D DISABLE_INET_SOCKET
+TARGET_CFLAGS += -W -Wall
+TARGET_CFLAGS += -D_FILE_OFFSET_BITS=64
+
+TARGET_LDFLAGS += -liconv
+
+BINDIR=/usr/local/bin
+
+define Build/Compile
+   $(MAKE) -C "$(PKG_BUILD_DIR)"/src \
+   CC="$(TARGET_CC)" \
+   USER_CFLAGS='$(TARGET_CFLAGS) $(EXTRA_CFLAGS) 
$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS) \
+   -I"$(STAGING_DIR)/usr/lib/libiconv-full/include"' \
+   USER_LDFLAGS='$(TARGET_LFLAGS) $(EXTRA_LDFLAGS) 
-L"$(STAGING_DIR)/usr/lib/libiconv-full/lib"' \
+   all
+endef
+
+define Package/smstools3/install
+   $(INSTALL_DIR) $(1)/$(BINDIR)
+   $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/smsd $(1)/$(BINDIR)/smsd
+   $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/sendsms $(1)/$(BINDIR)/sendsms
+   $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/sms2html $(1)/$(BINDIR)/sms2html
+   $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/sms2unicode 
$(1)/$(BINDIR)/sms2unicode
+   $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/unicode2sms 
$(1)/$(BINDIR)/unicode2sms
+   $(INSTALL_DIR) $(1)/etc/init.d
+   $(INSTALL_DATA) -m 0755 ./files/smstools3.init $(1)/etc/init.d/smstools3
+   $(INSTALL_DIR) $(1)/etc
+   $(INSTALL_DATA) -m 0755 ./files/smstools3.conf $(1)/etc/smsd.conf
+endef
+
+$(eval $(call BuildPackage,smstools3))
diff --git a/package/contrib/smstools3/files/smstools3.conf 
b/package/contrib/smstools3/files/smstools3.conf
new file mode 100644
index 000..c8732e3
--- /dev/null
+++ b/package/contrib/smstools3/files/smstools3.conf
@@ -0,0 +1,20 @@
+#
+# Description: Main configuration file for the smsd
+#
+
+devices = GSM1
+incoming = /var/spool/sms/incoming
+outgoing = /var/spool/sms/outgoing
+checked = /var/spool/sms/checked
+failed = /var/spool/sms/failed
+sent = /var/spool/sms/sent
+receive_before_send = no
+autosplit = 3
+
+[GSM1]
+init = AT+CPMS="ME","ME","ME"
+device = /dev/ttyUSB0
+incoming = yes
+pin = 
+baudrate = 9600
+
diff --git a/package/contrib/smstools3/files/smstools3.init 
b/package/contrib/smstools3/files/smstools3.init
new file mode 100644
index 000..1638c60
--- /dev/null
+++ b/package/contrib/smstools3/files/smstools3.init
@@ -0,0 +1,152 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2014 OpenWrt.org
+# smsd initscript openwrt mod
+
+START=99
+STOP=99
+
+EXTRA_COMMANDS="status"
+EXTRA_HELP="status  View pid and service status "
+
+# Set USER and GROUP, if necessary:
+USER=""
+GROUP=""
+
+# If an unpriviledged user is selected, make sure that next two
+# files are writable by that user:
+PIDFILE="/var/run/smsd.pid"
+INFOFILE="/var/run/smsd.working"
+# Logfile can also be defined in here:
+LOGFILE="/var/log/smsd.log"
+
+DAEMON=/usr/local/bin/smsd
+# A program which turns power off for couple of seconds:
+RESETMODEMS=/usr/local/bin/smsd_resetmodems
+NAME=smsd
+PSOPT=""
+
+# Set/edit this before starting service !
+WRT_SPOOL=/var/spool
+
+# Maximum time to stop smsd, after that it

Re: [OpenWrt-Devel] [PATCH 1/1] package: contrib: add smstools3 package

2014-12-20 Thread drEagle
Hi,

Le 21/12/2014 08:09, Gerald Kerma a écrit :
> Add smstools3 package from http://smstools3.kekekasvi.com/
> 
> Signed-off-by: Gerald Kerma 

Tested successfull as an email/sms gateway with :
- Device: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem
- Trunk: OpenWrt Chaos Calmer r43753
- Kirkwood : Globalscale Technologies Guruplug Server Plus

Send and receive SMS with modem : OK
Forward received SMS to mailhub : OK
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/1] package: contrib: add smstools3 package

2014-12-20 Thread Jiri Slachta
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello Gerald,

I would recommend you to resend the patch to the openwrt packages repository on
github as a pull request.

Please follow the Contributing Guidelines[1] for packages in OpenWrt package 
repository. In your Makefile the PKG_MAINTAINER is not defined and the 
PKG_RELEASE 
should be reset to 1 since the package Makefile is at its initial version.

Kind regards,
Jiri Slachta

[1] https://github.com/openwrt/packages/blob/master/CONTRIBUTING.md

Dne 21.12.2014 v 08:09 Gerald Kerma napsal(a):
> Add smstools3 package from http://smstools3.kekekasvi.com/
> 
> Signed-off-by: Gerald Kerma 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAEBAgAGBQJUlnssAAoJECilMVBDttCPrJsP/1zyIQpfHeqj2Ieas9xl9gSd
dtdeN5GRteir8Tc+o/yf2eKJV0B3XqPiI0bGkJnMyRWPr7SzPlE7dlaZso7w8pHR
DK+4e07D6exmRXri0iEpRW1o4tdEQd/Xs+xm8BxWAXSTqJULZpnA414arZFvcnoT
whljSET6T2+TEMD3w5+jJMs6wnmxPM97Dxd9rxKmOmBGaDYfIWkkGSpMM30XYt0z
ZMqXwqYwM5awjh+AaGtc/PWzOVZUvAyo5e1kURred5eAfzm2SPwfQH2oNyv023dR
MeAXoZloq7QGn8b0qzLyStVU/F7NmsJA0tKHaYZJ3Nme0j54aCr+T3GXnkzjwBCR
YCDXUefIKsMmeMJeCknpBGKCWivYud8gIGM7+DzPiFCTVxET8yBkLqlRahOTuWyM
FMogk90CllHt236mrEeeFYfPTJsQSVjXO/zzvbHzYJKLW1dyGNPoLW9GufoubatN
xXFxJ+aW/NVUi0TKtxBEpkkPNhkRW1Z/FFNqb7By6S+4lTiRiXvJQlDOVft/6bvR
aUan169Xz32eGiNf4wP3G0DPfIytgKUmcdIzx78kxXiN5GYH9/8NU9DKXR4D1LId
BUbRPlVaC41p5KV76uTt94TN3z4kjDGwry7SiAoSbprPsSSRE4n6E5XAZrGyLQn7
fHLpFuNX27z+6iWDpOYy
=ei6Z
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel