Re: [OpenWrt-Devel] [OpenWrt] Project proposal: The GNUnet of autonomous Things

2016-12-06 Thread Drasko DRASKOVIC
Hi Daniel,
Very interesting project!

On Thu, Nov 17, 2016 at 12:39 PM, Daniel Golle  wrote:
> Project schedule
>
> (I)
> As a first step towards better integration of typical IoT USE-cases
> into OpenWrt/LEDE, a ubus service allowing access to low-bandwidth
> peripherals shall be created. It's modular design shall allow for
> plugins providing access to various different APIs and low-level
> busses. Plugins may expose read and write access to datastructures
> and emmitt event notifications.
> The ubus API shall be sound and well-documented. Sample plugins
> including verbose comments utilizing and demonstrating that
> infrastructure shall be implemented.

Do we really need this phase? I.e. is ubus the best solution?

We at WeIO (http://we-io.net) used something that we called  IoTPy
(https://github.com/nodesign/weio/tree/master/IoTPy),
but I think today besto solution is to use Intel's MRAA
(https://github.com/intel-iot-devkit/mraa) in combination with UPM
(https://github.com/intel-iot-devkit/upm).

This way user get a bunch of drivers for various sensors and actuators
in different language bindings.

>
> (II)
> Once sensors and actores are available via the local ubus instance,
> a ubus rpc proxy which operates as a GNUnet service shall be implemented
> to allow secure and privacy-aware pairing of OpenWrt/LEDE devices and
> remote access to ubus using GNUnet.

Looks like a sane solution to me. I have started some months ago
working on a centralized solution called Electrolink -
https://github.com/projectiota/electrolink.
It uses MQTT or CoAP to pack and send RPC messages in JSON or CBOR.

Currently we are working on MRAA<->Electrolink integration.

For decentralization - this is worh loking:
https://safenetforum.org/t/maidsafe-and-gnunet-comparison/2779.

Maybe some of scalable blockchain solution (Tendermint? Blockstack?)
are also worth investigating.

Telehash (http://telehash.org/) looks like a great candidate also.

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


Re: [OpenWrt-Devel] [LEDE-DEV] TR-069 for OpenWrt

2016-05-27 Thread Drasko DRASKOVIC
Hi Karl,

On Fri, May 27, 2016 at 1:55 PM, Karl Palsson  wrote:
>
> David Lang  wrote:
>> On Thu, 26 May 2016, Delbar Jos wrote:
>>
>> > We are conscious of the fact that together with the proposals made by 
>> > Felix,
>> > Luka and Wojtek we are now looking at many "competing" proposals. As a next
>> > step, we recommend to organize a workshop, at a practical location and 
>> > time,
>> > where we put everything on the table and define the most appropriate path
>> > forward to the benefit of OpenWrt as a whole.
>>
>> nothing wrong with supporting many different remote management
>> daemons.
>>
>> > TR-069 is a complicated remote management system and in order to make this
>> > initiative a success, we must ensure that the complexity is handled in an
>> > elegant way and with respect for OpenWrt's core architecture. More than on 
>> > the
>> > protocol itself, we believe that we should focus on the architectural
>> > enhancements required to support remote management in general.
>>
>> What is it that you think is needed to "support remote
>> management in general"?
>>
>> It's worth pointing out that many people are remotely managing
>> OpenWRT devices, Ansible/Salt/Puppet/Chef/etc are all common
>> tools for the job.
>
> Really?  python, python, ruby, ruby.  None of those are really fun enjoyable 
> tasks on _my_ openwrt/leded devices.
>
>> now, those are all tools aimed at managing Linux Servers, not
>> networking gear, but OpenWRT is a server.
>>
>> So I'd suggest starting off by creating a daemon that talks
>>  and just stores the stuff it's sent in some
>> simple files so that it can return the info when queried.
>
> Did you read the intro to Delbar's mail, describing that they
> already have a complete tr069 project, for managing openwrt
> devices, that they want to open source, and want to collaborate
> on making it more useful for all, and perhaps see if there are
> common pain points that can be resolved by handling things
> differently on the lede/openwrt side, rather than working around
> on the tr069 side?
>
> I think it's exciting and I'd love to hear more about it.
> ansible/salt/puppet/chef have been far too heavy to run, and
> openvpn servers granting remote shell access is far too tedious
> for daily use.

I am very interested to see TR-069 solution. IMHO what is really
useful in it is Amendment 5, NAT traversal based on XMMP. Both AllJoyn
and Iotivity seem to push this approach to managing CPEs - naturally,
it has been proven and widely used. For the reference, here is an
interesting discussion I had with Thiago Macieira from Iotivity:
https://lists.linuxfoundation.org/pipermail/iotivity-dev/2015-October/002867.html

However, I would personally look more at OMA LwM2M - it would be much
lighter and more fun to implement ;). NAT traversal is not so
straightforward, but it would be interesting to investigate it. Then
clients will be ultra-light.

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


[OpenWrt-Devel] [PATCH] [SIGNED-OFF] ar71xx: Add support for WeIO board

2015-10-16 Thread Drasko DRASKOVIC
Support for WeIO board (http://we-io.net),
backported from Designated Driver trunk.

Signed-off-by: Drasko DRASKOVIC <drasko.drasko...@gmail.com>
---
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
 target/linux/ar71xx/config-3.18|   1 +
 .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 140 +
 target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
 target/linux/ar71xx/image/Makefile |   8 ++
 .../610-MIPS-ath79-openwrt-machines.patch  |  21 +++-
 7 files changed, 187 insertions(+), 6 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
 create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk

diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index ed89cfb..f0c9ae1 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -817,6 +817,9 @@ ar71xx_board_detect() {
*"UniFi AP Pro")
name="uap-pro"
;;
+   "WeIO"*)
+   name="weio"
+   ;;
*WHR-G301N)
name="whr-g301n"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index aa05d6f..0ba96e2 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -248,7 +248,8 @@ platform_check_image() {
nbg460n_550n_550nh | \
unifi | \
unifi-outdoor | \
-   carambola2 )
+   carambola2 | \
+   weio )
[ "$magic" != "2705" ] && {
echo "Invalid image type."
return 1
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 14d99c6..0e92840 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -134,6 +134,7 @@ CONFIG_ATH79_MACH_TL_WR941ND=y
 CONFIG_ATH79_MACH_TUBE2H=y
 CONFIG_ATH79_MACH_UBNT=y
 CONFIG_ATH79_MACH_UBNT_XM=y
+CONFIG_ATH79_MACH_WEIO=y
 CONFIG_ATH79_MACH_WHR_HP_G300N=y
 CONFIG_ATH79_MACH_WLAE_AG300N=y
 CONFIG_ATH79_MACH_WLR8100=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
new file mode 100644
index 000..90aaa81
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
@@ -0,0 +1,140 @@
+/**
+ * WEIO Web Of Things Platform
+ *
+ * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
+ *
+ *  ##  ##    ###
+ *  ##  ##  ## ####  ## ##
+ *  ##  ##  ## ####  ## ##
+ *  ##  ##  ## ####  ## ##
+ *  ##  ##  ## ####  ## ##
+ *  ##  ##  ## ####  ## ##
+ *   ###  ###     ###
+ *
+ *   Web Of Things Platform
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Authors :
+ * Drasko DRASKOVIC <drasko.drasko...@gmail.com>
+ * Uros PETREVSKI <u...@nodesign.net>
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include "common.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 WEIO_GPIO_LED_STA  1
+#define WEIO_GPIO_LED_AP   16
+
+#define WEIO_GPIO_BTN_AP   20
+#define WEIO_GPIO_BTN_RESET23
+
+#define WEIO_KEYS_POLL_INTERVAL20  /* msecs */
+#define WEIO_KEYS_DEBOUNCE_INTERVAL(3 * WEIO_KEYS_POLL_INTERVAL)
+
+#define WEIO_MAC0_OFFSET   0x
+#define WEIO_MAC1_OFFSET   0x0006
+#define WEIO_CALDATA_OFFSET0x1000
+#define WEIO_WMAC_MAC_OFFSET   0x1002
+
+static struct gpio_led weio_leds_gpio[] __initdata = {
+   {

[OpenWrt-Devel] [PATCH] [SIGNED-OFF] Correct WeIO board name

2015-09-29 Thread Drasko DRASKOVIC
Trivial parch to correct WeIO board name in the system.

Signed-off-by: Drasko DRASKOVIC <drasko.drasko...@gmail.com>
---
 target/linux/ar71xx/base-files/lib/ar71xx.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index ad98cfb..4679a4b 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -850,7 +850,7 @@ ar71xx_board_detect() {
*"UniFi AP Pro")
name="uap-pro"
;;
-   *"WeIO")
+   "WeIO"*)
name="weio"
;;
*WHR-G301N)
-- 
2.5.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Backporting from dev branch to stable

2015-09-29 Thread Drasko DRASKOVIC
Hi all,
how are the patches from main development branch backported to Chaos
Calmer branch from dev branch?

Do I have to re-post this patch-set
http://git.openwrt.org/?p=openwrt.git;a=commit;h=c84682a79e36bb57f4f78d51aa589f7bfe3fb5e8
against this branch:
http://git.openwrt.org/?p=15.05/openwrt.git;a=summary?

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


Re: [OpenWrt-Devel] [PATCH] [SIGNED-OFF] Add WeIO Board Support

2015-09-23 Thread Drasko DRASKOVIC
A kind reminder,
please someone take a look at this patch and integrate it if it is OK.

BR,
Drasko


On Sun, Sep 20, 2015 at 7:27 PM, Drasko DRASKOVIC
<drasko.drasko...@gmail.com> wrote:
> Add support for WeIO board (http://we-io.net).
> This board is based on Carambola2 board form 8Devices.
>
> Signed-off-by: Drasko DRASKOVIC <drasko.drasko...@gmail.com>
> ---
>  target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
>  .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
>  target/linux/ar71xx/config-4.1 |   1 +
>  .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 145 
> +
>  target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
>  target/linux/ar71xx/image/Makefile |   8 ++
>  .../700-MIPS-ath79-openwrt-machines.patch  |  21 ++-
>  7 files changed, 192 insertions(+), 6 deletions(-)
>  create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
>  create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk
>
> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
> b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> index efb3d16..ad98cfb 100755
> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> @@ -850,6 +850,9 @@ ar71xx_board_detect() {
> *"UniFi AP Pro")
> name="uap-pro"
> ;;
> +   *"WeIO")
> +   name="weio"
> +   ;;
> *WHR-G301N)
> name="whr-g301n"
> ;;
> diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
> b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> index cad8b43..c947b78 100755
> --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> @@ -252,7 +252,8 @@ platform_check_image() {
> nbg460n_550n_550nh | \
> unifi | \
> unifi-outdoor | \
> -   carambola2 )
> +   carambola2 | \
> +   weio )
> [ "$magic" != "2705" ] && {
> echo "Invalid image type."
> return 1
> diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
> index 51f2f2f..50dc7b2 100644
> --- a/target/linux/ar71xx/config-4.1
> +++ b/target/linux/ar71xx/config-4.1
> @@ -143,6 +143,7 @@ CONFIG_ATH79_MACH_TL_WR941ND=y
>  CONFIG_ATH79_MACH_TUBE2H=y
>  CONFIG_ATH79_MACH_UBNT=y
>  CONFIG_ATH79_MACH_UBNT_XM=y
> +CONFIG_ATH79_MACH_WEIO=y
>  CONFIG_ATH79_MACH_WHR_HP_G300N=y
>  CONFIG_ATH79_MACH_WLAE_AG300N=y
>  CONFIG_ATH79_MACH_WLR8100=y
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c 
> b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
> new file mode 100644
> index 000..44a831b
> --- /dev/null
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
> @@ -0,0 +1,145 @@
> +/**
> + * WEIO Web Of Things Platform
> + *
> + * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
> + *
> + *  ##  ##    ###
> + *  ##  ##  ## ####  ## ##
> + *  ##  ##  ## ####  ## ##
> + *  ##  ##  ## ####  ## ##
> + *  ##  ##  ## ####  ## ##
> + *  ##  ##  ## ####  ## ##
> + *   ###  ###     ###
> + *
> + *   Web Of Things Platform
> + *
> + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
> + *
> + * Authors :
> + * Drasko DRASKOVIC <drasko.drasko...@gmail.com>
> + * Uros PETREVSKI <u...@nodesign.net>
> + */
> +
> +#include 
> +#include 
> +#include "common.h"
> +#include "dev-eth.h"
> +#include "dev-gpio-buttons.h"
> +#include "dev-leds-gpio.h"
> +#include "dev-m25p80.h"
> +#include &

Re: [OpenWrt-Devel] [PATCH] [SIGNED-OFF] Add initial support for WeIO board

2015-09-22 Thread Drasko DRASKOVIC
A kind reminder for a patch.

BR,
Drasko

On Sun, Sep 20, 2015 at 7:30 PM, Drasko DRASKOVIC <
drasko.drasko...@gmail.com> wrote:

> Hi Jonas,
> I have re-sent (in a spearate e-mail) patch with corrections based on
> your comments.
>
> Best reagrds,
> Drasko
>
> On Fri, Sep 11, 2015 at 2:51 PM, Jonas Gorski <j...@openwrt.org> wrote:
> > Hi,
> >
> > On Tue, Sep 8, 2015 at 9:00 PM, Drasko DRASKOVIC
> > <drasko.drasko...@gmail.com> wrote:
> >> Subject: [PATCH] [SIGNED-OFF] Add initial support for WeIO board
> >
> > Please version your patches if you change them ([PATCH V2] etc)
> >> Add support for WeIO board (http://we-io.net), which is based on
> >> Carambola2 board from 8Devices.
> >>
> >> Signed-off-by: Drasko DRASKOVIC <drasko.drasko...@gmail.com>
> >> ---
> >
> > Please keep a changelog here about the changes between submitssions
> >>  target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
> >>  .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
> >>  target/linux/ar71xx/config-4.1 |   1 +
> >>  .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 145
> +
> >>  target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
> >>  target/linux/ar71xx/image/Makefile |   8 ++
> >>  .../700-MIPS-ath79-openwrt-machines.patch  |  21 ++-
> >
> > I don't see you updating etc/uci-defaults/02_network or any of the
> > uci-defaults files, so this won't have any proper config.
> >
> >
> >>  7 files changed, 192 insertions(+), 6 deletions(-)
> >>  create mode 100644
> target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
> >>  create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk
> >>
> >> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> >> index e1f345e..e30cac2 100755
> >> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> >> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> >> @@ -832,6 +832,9 @@ ar71xx_board_detect() {
> >> *"UniFi AP Pro")
> >> name="uap-pro"
> >> ;;
> >> +   *"WeIO")
> >> +   name="weio"
> >> +   ;;
> >> *WHR-G301N)
> >> name="whr-g301n"
> >> ;;
> >> diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> >> index c1962e4..b681fb8 100755
> >> --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> >> +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> >> @@ -250,7 +250,8 @@ platform_check_image() {
> >> nbg460n_550n_550nh | \
> >> unifi | \
> >> unifi-outdoor | \
> >> -   carambola2 )
> >> +   carambola2 | \
> >> +   weio )
> >> [ "$magic" != "2705" ] && {
> >> echo "Invalid image type."
> >> return 1
> >> diff --git a/target/linux/ar71xx/config-4.1
> b/target/linux/ar71xx/config-4.1
> >> index 21c4601..7d836d9 100644
> >> --- a/target/linux/ar71xx/config-4.1
> >> +++ b/target/linux/ar71xx/config-4.1
> >> @@ -139,6 +139,7 @@ CONFIG_ATH79_MACH_TL_WR941ND=y
> >>  CONFIG_ATH79_MACH_TUBE2H=y
> >>  CONFIG_ATH79_MACH_UBNT=y
> >>  CONFIG_ATH79_MACH_UBNT_XM=y
> >> +CONFIG_ATH79_MACH_WEIO=y
> >>  CONFIG_ATH79_MACH_WHR_HP_G300N=y
> >>  CONFIG_ATH79_MACH_WLAE_AG300N=y
> >>  CONFIG_ATH79_MACH_WLR8100=y
> >> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
> b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
> >> new file mode 100644
> >> index 000..791991c
> >> --- /dev/null
> >> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
> >> @@ -0,0 +1,145 @@
> >> +/**
> >> + * WEIO Web Of Things Platform
> >> + *
> >> + * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
> >> + *
> >> + *  ##  ##    ###
> >> + *  ##  ##  ## ####  ## ##
> >> + *  ##  ##  ## ####  ## ##
> >> + *  ##  ##  ## ####  ## ##
> >> + *  ##  ##  ## ####  ## ##

Re: [OpenWrt-Devel] [PATCH] [SIGNED-OFF] Add initial support for WeIO board

2015-09-20 Thread Drasko DRASKOVIC
Hi Jonas,
I have re-sent (in a spearate e-mail) patch with corrections based on
your comments.

Best reagrds,
Drasko

On Fri, Sep 11, 2015 at 2:51 PM, Jonas Gorski <j...@openwrt.org> wrote:
> Hi,
>
> On Tue, Sep 8, 2015 at 9:00 PM, Drasko DRASKOVIC
> <drasko.drasko...@gmail.com> wrote:
>> Subject: [PATCH] [SIGNED-OFF] Add initial support for WeIO board
>
> Please version your patches if you change them ([PATCH V2] etc)
>> Add support for WeIO board (http://we-io.net), which is based on
>> Carambola2 board from 8Devices.
>>
>> Signed-off-by: Drasko DRASKOVIC <drasko.drasko...@gmail.com>
>> ---
>
> Please keep a changelog here about the changes between submitssions
>>  target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
>>  .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
>>  target/linux/ar71xx/config-4.1 |   1 +
>>  .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 145 
>> +
>>  target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
>>  target/linux/ar71xx/image/Makefile |   8 ++
>>  .../700-MIPS-ath79-openwrt-machines.patch  |  21 ++-
>
> I don't see you updating etc/uci-defaults/02_network or any of the
> uci-defaults files, so this won't have any proper config.
>
>
>>  7 files changed, 192 insertions(+), 6 deletions(-)
>>  create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
>>  create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk
>>
>> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
>> b/target/linux/ar71xx/base-files/lib/ar71xx.sh
>> index e1f345e..e30cac2 100755
>> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
>> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
>> @@ -832,6 +832,9 @@ ar71xx_board_detect() {
>> *"UniFi AP Pro")
>> name="uap-pro"
>> ;;
>> +   *"WeIO")
>> +   name="weio"
>> +   ;;
>> *WHR-G301N)
>> name="whr-g301n"
>> ;;
>> diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
>> b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
>> index c1962e4..b681fb8 100755
>> --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
>> +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
>> @@ -250,7 +250,8 @@ platform_check_image() {
>> nbg460n_550n_550nh | \
>> unifi | \
>> unifi-outdoor | \
>> -   carambola2 )
>> +   carambola2 | \
>> +   weio )
>> [ "$magic" != "2705" ] && {
>> echo "Invalid image type."
>> return 1
>> diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
>> index 21c4601..7d836d9 100644
>> --- a/target/linux/ar71xx/config-4.1
>> +++ b/target/linux/ar71xx/config-4.1
>> @@ -139,6 +139,7 @@ CONFIG_ATH79_MACH_TL_WR941ND=y
>>  CONFIG_ATH79_MACH_TUBE2H=y
>>  CONFIG_ATH79_MACH_UBNT=y
>>  CONFIG_ATH79_MACH_UBNT_XM=y
>> +CONFIG_ATH79_MACH_WEIO=y
>>  CONFIG_ATH79_MACH_WHR_HP_G300N=y
>>  CONFIG_ATH79_MACH_WLAE_AG300N=y
>>  CONFIG_ATH79_MACH_WLR8100=y
>> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c 
>> b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
>> new file mode 100644
>> index 000..791991c
>> --- /dev/null
>> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
>> @@ -0,0 +1,145 @@
>> +/**
>> + * WEIO Web Of Things Platform
>> + *
>> + * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
>> + *
>> + *  ##  ##    ###
>> + *  ##  ##  ## ####  ## ##
>> + *  ##  ##  ## ####  ## ##
>> + *  ##  ##  ## ####  ## ##
>> + *  ##  ##  ## ####  ## ##
>> + *  ##  ##  ## ####  ## ##
>> + *   ###  ###     ###
>> + *
>> + *   Web Of Things Platform
>> + *
>> + * 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,
>> + 

[OpenWrt-Devel] [PATCH] [SIGNED-OFF] Add WeIO Board Support

2015-09-20 Thread Drasko DRASKOVIC
Add support for WeIO board (http://we-io.net).
This board is based on Carambola2 board form 8Devices.

Signed-off-by: Drasko DRASKOVIC <drasko.drasko...@gmail.com>
---
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
 target/linux/ar71xx/config-4.1 |   1 +
 .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 145 +
 target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
 target/linux/ar71xx/image/Makefile |   8 ++
 .../700-MIPS-ath79-openwrt-machines.patch  |  21 ++-
 7 files changed, 192 insertions(+), 6 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
 create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk

diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index efb3d16..ad98cfb 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -850,6 +850,9 @@ ar71xx_board_detect() {
*"UniFi AP Pro")
name="uap-pro"
;;
+   *"WeIO")
+   name="weio"
+   ;;
*WHR-G301N)
name="whr-g301n"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index cad8b43..c947b78 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -252,7 +252,8 @@ platform_check_image() {
nbg460n_550n_550nh | \
unifi | \
unifi-outdoor | \
-   carambola2 )
+   carambola2 | \
+   weio )
[ "$magic" != "2705" ] && {
echo "Invalid image type."
return 1
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 51f2f2f..50dc7b2 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -143,6 +143,7 @@ CONFIG_ATH79_MACH_TL_WR941ND=y
 CONFIG_ATH79_MACH_TUBE2H=y
 CONFIG_ATH79_MACH_UBNT=y
 CONFIG_ATH79_MACH_UBNT_XM=y
+CONFIG_ATH79_MACH_WEIO=y
 CONFIG_ATH79_MACH_WHR_HP_G300N=y
 CONFIG_ATH79_MACH_WLAE_AG300N=y
 CONFIG_ATH79_MACH_WLR8100=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
new file mode 100644
index 000..44a831b
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
@@ -0,0 +1,145 @@
+/**
+ * WEIO Web Of Things Platform
+ *
+ * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
+ *
+ *  ##  ##    ###  
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *   ###  ###     ###
+ *
+ *   Web Of Things Platform
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Authors : 
+ * Drasko DRASKOVIC <drasko.drasko...@gmail.com>
+ * Uros PETREVSKI <u...@nodesign.net>
+ */
+
+#include 
+#include 
+#include "common.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"
+#include "linux/i2c-gpio.h"
+#include "linux/platform_device.h"
+
+#define WEIO_GPIO_LED_STA  1
+#define WEIO_GPIO_LED_AP   16
+
+#define WEIO_GPIO_BTN_AP   20
+#define WEIO_GPIO_BTN_RESET23
+
+#define WEIO_KEYS_POLL_INTERVAL20  /* msecs */
+#define WEIO_KEYS_DEBOUNCE_INTERVAL(3 * WEIO_KEYS_POLL_INTERVAL)
+
+#define WEIO_MAC0_OFFSET   0x
+#define WEIO_MAC1_OFFSET   0x0006
+#define WEIO_CALDATA_OFFSET0x1000
+#define WEIO_WMAC_MAC_OFFSET  

Re: [OpenWrt-Devel] [PATCH] [SIGNED-OFF] Add initial support for WeIO board

2015-09-11 Thread Drasko DRASKOVIC
Hi all,
any news on this?

Who is in charge of integrating these patches and should a particular
maintainer be contacted?

BR,
Drasko


On Tue, Sep 8, 2015 at 9:00 PM, Drasko DRASKOVIC
<drasko.drasko...@gmail.com> wrote:
> Add support for WeIO board (http://we-io.net), which is based on
> Carambola2 board from 8Devices.
>
> Signed-off-by: Drasko DRASKOVIC <drasko.drasko...@gmail.com>
> ---
>  target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
>  .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
>  target/linux/ar71xx/config-4.1 |   1 +
>  .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 145 
> +
>  target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
>  target/linux/ar71xx/image/Makefile |   8 ++
>  .../700-MIPS-ath79-openwrt-machines.patch  |  21 ++-
>  7 files changed, 192 insertions(+), 6 deletions(-)
>  create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
>  create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk
>
> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
> b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> index e1f345e..e30cac2 100755
> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> @@ -832,6 +832,9 @@ ar71xx_board_detect() {
> *"UniFi AP Pro")
> name="uap-pro"
> ;;
> +   *"WeIO")
> +   name="weio"
> +   ;;
> *WHR-G301N)
> name="whr-g301n"
> ;;
> diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
> b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> index c1962e4..b681fb8 100755
> --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> @@ -250,7 +250,8 @@ platform_check_image() {
> nbg460n_550n_550nh | \
> unifi | \
> unifi-outdoor | \
> -   carambola2 )
> +   carambola2 | \
> +   weio )
> [ "$magic" != "2705" ] && {
> echo "Invalid image type."
> return 1
> diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
> index 21c4601..7d836d9 100644
> --- a/target/linux/ar71xx/config-4.1
> +++ b/target/linux/ar71xx/config-4.1
> @@ -139,6 +139,7 @@ CONFIG_ATH79_MACH_TL_WR941ND=y
>  CONFIG_ATH79_MACH_TUBE2H=y
>  CONFIG_ATH79_MACH_UBNT=y
>  CONFIG_ATH79_MACH_UBNT_XM=y
> +CONFIG_ATH79_MACH_WEIO=y
>  CONFIG_ATH79_MACH_WHR_HP_G300N=y
>  CONFIG_ATH79_MACH_WLAE_AG300N=y
>  CONFIG_ATH79_MACH_WLR8100=y
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c 
> b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
> new file mode 100644
> index 000..791991c
> --- /dev/null
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
> @@ -0,0 +1,145 @@
> +/**
> + * WEIO Web Of Things Platform
> + *
> + * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
> + *
> + *  ##  ##    ###
> + *  ##  ##  ## ####  ## ##
> + *  ##  ##  ## ####  ## ##
> + *  ##  ##  ## ####  ## ##
> + *  ##  ##  ## ####  ## ##
> + *  ##  ##  ## ####  ## ##
> + *   ###  ###     ###
> + *
> + *   Web Of Things Platform
> + *
> + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
> + *
> + * Authors :
> + * Drasko DRASKOVIC <drasko.drasko...@gmail.com>
> + * Uros PETREVSKI <u...@nodesign.net>
> + */
> +
> +#include 
> +#include 
> +#include "common.h"
> +#include "dev-eth.h"
> +#include "dev-gpio-buttons.h"
> +#include "dev-leds-gpio.h"
> +#include "dev-m

Re: [OpenWrt-Devel] [PATCH] [SIGNED-OFF] Add WeIO board (http://we-io.net) profile. This patch adds support for WeIO board, which is based on Carambola2 board from 8Devices.

2015-09-08 Thread Drasko DRASKOVIC
On Tue, Sep 8, 2015 at 8:07 PM, Drasko DRASKOVIC
<drasko.drasko...@gmail.com> wrote:
> Hi Karl,
> corrected patch re-sent.
>
> My comments below.
>
> BR,
> Drasko
>
> On Sat, Aug 8, 2015 at 3:03 AM, Karl Palsson <ka...@tweak.net.au> wrote:
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> Comments inline...
>>
>> Drasko DRASKOVIC <drasko.drasko...@gmail.com> wrote:
>>> Signed-off-by: Drasko DRASKOVIC <drasko.drasko...@gmail.com>
>>> ---
>>
>>
>> Might just be my mail client, but might be yours, did you change
>> anything to send this? you seem to have lost all the commit message up
>> into the subject?
>
> Actually, I use `git send-email` directly, exactly to avoid problems
> with different mail clients. All my patches are send via git.

I just figured out that `git send-email` will actually expect commit
message to have a subject separated by a blank line from the commit
message. Reading this helped:
http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html.

Please ignore previous patch - I will re-send one with correctly
formatted commit message.

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


[OpenWrt-Devel] [PATCH] [SIGNED-OFF] Add initial support for WeIO board

2015-09-08 Thread Drasko DRASKOVIC
Add support for WeIO board (http://we-io.net), which is based on
Carambola2 board from 8Devices.

Signed-off-by: Drasko DRASKOVIC <drasko.drasko...@gmail.com>
---
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
 target/linux/ar71xx/config-4.1 |   1 +
 .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 145 +
 target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
 target/linux/ar71xx/image/Makefile |   8 ++
 .../700-MIPS-ath79-openwrt-machines.patch  |  21 ++-
 7 files changed, 192 insertions(+), 6 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
 create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk

diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index e1f345e..e30cac2 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -832,6 +832,9 @@ ar71xx_board_detect() {
*"UniFi AP Pro")
name="uap-pro"
;;
+   *"WeIO")
+   name="weio"
+   ;;   
*WHR-G301N)
name="whr-g301n"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index c1962e4..b681fb8 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -250,7 +250,8 @@ platform_check_image() {
nbg460n_550n_550nh | \
unifi | \
unifi-outdoor | \
-   carambola2 )
+   carambola2 | \
+   weio )
[ "$magic" != "2705" ] && {
echo "Invalid image type."
return 1
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 21c4601..7d836d9 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -139,6 +139,7 @@ CONFIG_ATH79_MACH_TL_WR941ND=y
 CONFIG_ATH79_MACH_TUBE2H=y
 CONFIG_ATH79_MACH_UBNT=y
 CONFIG_ATH79_MACH_UBNT_XM=y
+CONFIG_ATH79_MACH_WEIO=y
 CONFIG_ATH79_MACH_WHR_HP_G300N=y
 CONFIG_ATH79_MACH_WLAE_AG300N=y
 CONFIG_ATH79_MACH_WLR8100=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
new file mode 100644
index 000..791991c
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
@@ -0,0 +1,145 @@
+/**
+ * WEIO Web Of Things Platform
+ *
+ * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
+ *
+ *  ##  ##    ###  
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *   ###  ###     ###
+ *
+ *   Web Of Things Platform
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Authors : 
+ * Drasko DRASKOVIC <drasko.drasko...@gmail.com>
+ * Uros PETREVSKI <u...@nodesign.net>
+ */
+
+#include 
+#include 
+#include "common.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"
+#include "linux/i2c-gpio.h"
+#include "linux/platform_device.h"
+
+#define WEIO_GPIO_LED_STA  1
+#define WEIO_GPIO_LED_AP   16
+
+#define WEIO_GPIO_BTN_AP   20
+#define WEIO_GPIO_BTN_RESET23
+
+#define WEIO_KEYS_POLL_INTERVAL20  /* msecs */
+#define WEIO_KEYS_DEBOUNCE_INTERVAL(3 * WEIO_KEYS_POLL_INTERVAL)
+
+#define WEIO_MAC0_OFFSET   0x
+#define WEIO_MAC1_OFFSET   0x0006
+#define WEIO_CALDATA_OFFSET0x1000
+#define WEIO_WMAC_MAC_OFFSET

[OpenWrt-Devel] [PATCH] [SIGNED-OFF] Add WeIO board (http://we-io.net) profile. This patch adds support for WeIO board, which is based on Carambola2 board from 8Devices.

2015-09-08 Thread Drasko DRASKOVIC
Signed-off-by: Drasko DRASKOVIC <drasko.drasko...@gmail.com>
---
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
 target/linux/ar71xx/config-4.1 |   1 +
 .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 145 +
 target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
 target/linux/ar71xx/image/Makefile |   8 ++
 .../700-MIPS-ath79-openwrt-machines.patch  |  21 ++-
 7 files changed, 192 insertions(+), 6 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
 create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk

diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index e1f345e..e30cac2 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -832,6 +832,9 @@ ar71xx_board_detect() {
*"UniFi AP Pro")
name="uap-pro"
;;
+   *"WeIO")
+   name="weio"
+   ;;   
*WHR-G301N)
name="whr-g301n"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index c1962e4..b681fb8 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -250,7 +250,8 @@ platform_check_image() {
nbg460n_550n_550nh | \
unifi | \
unifi-outdoor | \
-   carambola2 )
+   carambola2 | \
+   weio )
[ "$magic" != "2705" ] && {
echo "Invalid image type."
return 1
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 21c4601..7d836d9 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -139,6 +139,7 @@ CONFIG_ATH79_MACH_TL_WR941ND=y
 CONFIG_ATH79_MACH_TUBE2H=y
 CONFIG_ATH79_MACH_UBNT=y
 CONFIG_ATH79_MACH_UBNT_XM=y
+CONFIG_ATH79_MACH_WEIO=y
 CONFIG_ATH79_MACH_WHR_HP_G300N=y
 CONFIG_ATH79_MACH_WLAE_AG300N=y
 CONFIG_ATH79_MACH_WLR8100=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
new file mode 100644
index 000..bd230a9
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
@@ -0,0 +1,145 @@
+/**
+ * WEIO Web Of Things Platform
+ *
+ * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
+ *
+ *  ##  ##    ###  
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *   ###  ###     ###
+ *
+ *   Web Of Things Platform
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Authors : 
+ * Drasko DRASKOVIC <drasko.drasko...@gmail.com>
+ * Uros PETREVSKI <u...@nodesign.net>
+ */
+
+#include 
+#include 
+#include "common.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"
+#include "linux/i2c-gpio.h"
+#include "linux/platform_device.h"
+
+#define WEIO_GPIO_LED_STA  1
+#define WEIO_GPIO_LED_AP   16
+
+#define WEIO_GPIO_BTN_AP   20
+#define WEIO_GPIO_BTN_RESET23
+
+#define WEIO_KEYS_POLL_INTERVAL20  /* msecs */
+#define WEIO_KEYS_DEBOUNCE_INTERVAL(3 * WEIO_KEYS_POLL_INTERVAL)
+
+#define WEIO_MAC0_OFFSET   0x
+#define WEIO_MAC1_OFFSET   0x0006
+#define WEIO_CALDATA_OFFSET0x1000
+#define WEIO_WMAC_MAC_OFFSET   0x1002
+
+static struct gpio_led weio_leds_gpio[] __initdata = {
+{
+.name

Re: [OpenWrt-Devel] [PATCH] [SIGNED-OFF] Add WeIO board (http://we-io.net) profile. This patch adds support for WeIO board, which is based on Carambola2 board from 8Devices.

2015-09-08 Thread Drasko DRASKOVIC
Hi Karl,
corrected patch re-sent.

My comments below.

BR,
Drasko

On Sat, Aug 8, 2015 at 3:03 AM, Karl Palsson <ka...@tweak.net.au> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Comments inline...
>
> Drasko DRASKOVIC <drasko.drasko...@gmail.com> wrote:
>> Signed-off-by: Drasko DRASKOVIC <drasko.drasko...@gmail.com>
>> ---
>
>
> Might just be my mail client, but might be yours, did you change
> anything to send this? you seem to have lost all the commit message up
> into the subject?

Actually, I use `git send-email` directly, exactly to avoid problems
with different mail clients. All my patches are send via git.

>
>
>>  target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
>>  .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
>>  target/linux/ar71xx/config-4.1 |   1 +
>>  .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 146 
>> +
>>  target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
>>  target/linux/ar71xx/image/Makefile |   8 ++
>>  .../700-MIPS-ath79-openwrt-machines.patch  |  21 ++-
>>  7 files changed, 193 insertions(+), 6 deletions(-)
>>  create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
>>  create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk
>>
>> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
>> b/target/linux/ar71xx/base-files/lib/ar71xx.sh
>> index 256bd10..80af14b 100755
>> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
>> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
>> @@ -823,6 +823,9 @@ ar71xx_board_detect() {
>>   *"UniFi AP Pro")
>>   name="uap-pro"
>>   ;;
>> + *"WeIO")
>> + name="weio"
>> + ;;
>>   *WHR-G301N)
>>   name="whr-g301n"
>>   ;;
>> diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
>> b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
>> index 76d8c5b..57df672 100755
>> --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
>> +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
>> @@ -250,7 +250,8 @@ platform_check_image() {
>>   nbg460n_550n_550nh | \
>>   unifi | \
>>   unifi-outdoor | \
>> - carambola2 )
>> + carambola2 | \
>> + weio )
>>   [ "$magic" != "2705" ] && {
>>   echo "Invalid image type."
>>   return 1
>> diff --git a/target/linux/ar71xx/config-4.1
>> b/target/linux/ar71xx/config-4.1
>> index 1e31a01..0f80804 100644
>> --- a/target/linux/ar71xx/config-4.1
>> +++ b/target/linux/ar71xx/config-4.1
>> @@ -137,6 +137,7 @@ CONFIG_ATH79_MACH_TL_WR941ND=y
>>  CONFIG_ATH79_MACH_TUBE2H=y
>>  CONFIG_ATH79_MACH_UBNT=y
>>  CONFIG_ATH79_MACH_UBNT_XM=y
>> +CONFIG_ATH79_MACH_WEIO=y
>>  CONFIG_ATH79_MACH_WHR_HP_G300N=y
>>  CONFIG_ATH79_MACH_WLAE_AG300N=y
>>  CONFIG_ATH79_MACH_WLR8100=y
>> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
>> b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
>> new file mode 100644
>> index 000..5c707ec
>> --- /dev/null
>> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
>> @@ -0,0 +1,146 @@
>> +/**
>> + * WEIO Web Of Things Platform
>> + *
>> + * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
>> + *
>> + *  ##  ##    ###
>> + *  ##  ##  ## ####  ## ##
>> + *  ##  ##  ## ####  ## ##
>> + *  ##  ##  ## ####  ## ##
>> + *  ##  ##  ## ####  ## ##
>> + *  ##  ##  ## ####  ## ##
>> + *   ###  ###     ###
>> + *
>> + *   Web Of Things Platform
>> + *
>> + * 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.
>> + *
>

[OpenWrt-Devel] [PATCH] [SIGNED-OFF] Add WeIO board (http://we-io.net) profile. This patch adds support for WeIO board, which is based on Carambola2 board from 8Devices.

2015-08-05 Thread Drasko DRASKOVIC
Signed-off-by: Drasko DRASKOVIC drasko.drasko...@gmail.com
---
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
 target/linux/ar71xx/config-4.1 |   1 +
 .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 146 +
 target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
 target/linux/ar71xx/image/Makefile |   8 ++
 .../700-MIPS-ath79-openwrt-machines.patch  |  21 ++-
 7 files changed, 193 insertions(+), 6 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
 create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk

diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 256bd10..80af14b 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -823,6 +823,9 @@ ar71xx_board_detect() {
*UniFi AP Pro)
name=uap-pro
;;
+   *WeIO)
+   name=weio
+   ;;   
*WHR-G301N)
name=whr-g301n
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 76d8c5b..57df672 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -250,7 +250,8 @@ platform_check_image() {
nbg460n_550n_550nh | \
unifi | \
unifi-outdoor | \
-   carambola2 )
+   carambola2 | \
+   weio )
[ $magic != 2705 ]  {
echo Invalid image type.
return 1
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 1e31a01..0f80804 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -137,6 +137,7 @@ CONFIG_ATH79_MACH_TL_WR941ND=y
 CONFIG_ATH79_MACH_TUBE2H=y
 CONFIG_ATH79_MACH_UBNT=y
 CONFIG_ATH79_MACH_UBNT_XM=y
+CONFIG_ATH79_MACH_WEIO=y
 CONFIG_ATH79_MACH_WHR_HP_G300N=y
 CONFIG_ATH79_MACH_WLAE_AG300N=y
 CONFIG_ATH79_MACH_WLR8100=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
new file mode 100644
index 000..5c707ec
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
@@ -0,0 +1,146 @@
+/**
+ * WEIO Web Of Things Platform
+ *
+ * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
+ *
+ *  ##  ##    ###  
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *   ###  ###     ###
+ *
+ *   Web Of Things Platform
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Authors : 
+ * Drasko DRASKOVIC drasko.drasko...@gmail.com
+ * Uros PETREVSKI u...@nodesign.net
+ */
+
+#include asm/mach-ath79/ath79.h
+#include asm/mach-ath79/ar71xx_regs.h
+#include common.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
+#include linux/i2c-gpio.h
+#include linux/platform_device.h
+
+#define WEIO_GPIO_LED_STA  1
+#define WEIO_GPIO_LED_AP   16
+//#define WEIO_GPIO_LED_ETH0   13
+
+#define WEIO_GPIO_BTN_AP   20
+#define WEIO_GPIO_BTN_RESET23
+
+#define WEIO_KEYS_POLL_INTERVAL20  /* msecs */
+#define WEIO_KEYS_DEBOUNCE_INTERVAL(3 * WEIO_KEYS_POLL_INTERVAL)
+
+#define WEIO_MAC0_OFFSET   0x
+#define WEIO_MAC1_OFFSET   0x0006
+#define WEIO_CALDATA_OFFSET0x1000
+#define WEIO_WMAC_MAC_OFFSET   0x1002
+
+static struct gpio_led weio_leds_gpio[] __initdata = {
+   {
+   .name   = weio:green:sta,
+   .gpio   = WEIO_GPIO_LED_STA,
+   .active_low = 1,
+.default_state = LEDS_GPIO_DEFSTATE_ON

Re: [OpenWrt-Devel] [PATCH] Add WeIO board (http://we-io.net) profile. This patch adds support for WeIO board, which is based on Carambola2 board from 8Devices.

2015-08-05 Thread Drasko DRASKOVIC
On Mon, Jul 27, 2015 at 4:10 AM, Karl Palsson ka...@tweak.net.au wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Just one more, I promise :)

 Drasko DRASKOVIC drasko.drasko...@gmail.com wrote:
 +
 +static void __init weio_common_setup(void)
 +{
 + u8 *art = (u8 *) KSEG1ADDR(0x1fff);
 +
 + ath79_register_m25p80(NULL);
 + ath79_register_wmac(art + WEIO_CALDATA_OFFSET,
 + art + WEIO_WMAC_MAC_OFFSET);
 +
 +/** WeIO uses only WiFi by default (no ETH). If ETH jack is soldered, 
 uncomment following lines  */
 +#if 0
 + ath79_setup_ar933x_phy4_switch(true, true);
 +
 + ath79_init_mac(ath79_eth0_data.mac_addr, art + WEIO_MAC0_OFFSET, 0);
 + ath79_init_mac(ath79_eth1_data.mac_addr, art + WEIO_MAC1_OFFSET, 0);
 +
 + ath79_register_mdio(0, 0x0);
 +
 + /* LAN ports */
 + ath79_register_eth(1);
 +
 + /* WAN port */
 + ath79_register_eth(0);
 +#endif /** commented out ETH */
 +}
 +


 I still think this #ifdefed code should be removed.  None of the product
 literature on your site shows any way of this being added.  It's not
 like there is a two port ethernet footprint that's simply not mounted,
 you'd have to connect it to the breadboard headers on the side of the
 board, by the time someone's done that, it's not really the weio board
 anymore is it?

Patch re-sent with #ifdefs removed, as suggested.

I hope it is OK now.

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


Re: [OpenWrt-Devel] [PATCH] Add support for WeIO board. WeIO board (http://we-io.net) is based on Carambola2 module from 8Devices, and the patch adds a separate profile.

2015-07-26 Thread Drasko DRASKOVIC
Hi Karl,

On Sun, Jul 26, 2015 at 4:41 AM, Karl Palsson ka...@tweak.net.au wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Let me just preface this with...

 I am _not_ any sort of authority on code style, or any sort of
 approved openwrt commit police.  I'm just some person subscribed to the 
 mailing list.  You are _absolutely_ entitled to ignore anything I say.

 ... Apparently that makes people happier

 Anyway...

I'd like to thank you for your reviews - I tried to correct all errors
that you spotted.

Anyway, new patch related to 4.1 kernel was sent yesterday evening, so
this one is not relevant anymore


 Drasko DRASKOVIC drasko.drasko...@gmail.com wrote:
 Hi Karl,

  +
  +MIPS_MACHINE(ATH79_MACH_WEIO, WEIO, WeIO board from Drasko DRASKOVIC 
  and Uros PETREVSKI,
 
  Really?  That's your model name?  Really?  Are you _sure_ that's what
  you want?

 Yes, the name of the board is WeIO.


 #define MIPS_MACHINE(_type, _id, _name, _setup)

 The ID might be WEIO, I personally was checking whether you really
 wanted your board to be called WeIO board from Drasko DRASKOVIC and
 Uros PETREVSKI  You want this

 root@blah:~# grep machine /proc/cpuinfo
 machine : WeIO board from Drasko DRASKOVIC and Uros PETREVSKI
 root@blah:~#

 Maybe you do, that's fine, it seems a little unusual to me, and I was
 just asking if you'd really thought about this all the way.


I know this is strange, but this is what is written on the back of the
board and looks OK for this particular product.

  diff --git
  a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
  b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
  index f8a561c..e8c8d5a 100644
  --- 
  a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
  +++ 
  b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
  @@ -1,6 +1,6 @@
   --- a/arch/mips/ath79/machtypes.h
   +++ b/arch/mips/ath79/machtypes.h
  -@@ -16,22 +16,191 @@
  +@@ -16,22 +16,192 @@
 
enum ath79_mach_type {
ATH79_MACH_GENERIC = 0,
  @@ -25,6 +25,7 @@
   +ATH79_MACH_BHU_BXU2000N2_A1,/* BHU BXU2000n-2 A1 */
   +ATH79_MACH_CAP4200AG,   /* Senao CAP4200AG */
   +ATH79_MACH_CARAMBOLA2,  /* 8devices Carambola2 */
  ++ATH79_MACH_WEIO,/* WeIO board */
 
 
  Cmon man, are you sure you attached the right patch here?

 Yes, why? I can see nothing wrong with this patch.


 The reason I asked is that already in the earlier version it had been
 raised (by me) that this was not in alphabetical order.  Yes, there are
 out of place entried in that file, but that enum is mostly well ordered.
  It's a good idea to keep it well ordered.   The fact that the WEIO board has 
 a carambola2 module soldered down is irrelevant.  It can't be changed, it's 
 not a user serviceable part, they're different boards that happen to be 
 ar71xx.

Yes, I agree. And I tried to respect this everywhere it made sense.

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


[OpenWrt-Devel] [PATCH] Add WeIO board (http://we-io.net) profile. This patch adds support for WeIO board, which is based on Carambola2 board from 8Devices.

2015-07-25 Thread Drasko DRASKOVIC
Signed-off-by: Drasko DRASKOVIC drasko.drasko...@gmail.com
---
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
 target/linux/ar71xx/config-4.1 |   1 +
 .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 162 +
 target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
 target/linux/ar71xx/image/Makefile |   8 +
 .../700-MIPS-ath79-openwrt-machines.patch  |  21 ++-
 7 files changed, 209 insertions(+), 6 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
 create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk

diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 256bd10..80af14b 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -823,6 +823,9 @@ ar71xx_board_detect() {
*UniFi AP Pro)
name=uap-pro
;;
+   *WeIO)
+   name=weio
+   ;;   
*WHR-G301N)
name=whr-g301n
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 76d8c5b..57df672 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -250,7 +250,8 @@ platform_check_image() {
nbg460n_550n_550nh | \
unifi | \
unifi-outdoor | \
-   carambola2 )
+   carambola2 | \
+   weio )
[ $magic != 2705 ]  {
echo Invalid image type.
return 1
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 1e31a01..0f80804 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -137,6 +137,7 @@ CONFIG_ATH79_MACH_TL_WR941ND=y
 CONFIG_ATH79_MACH_TUBE2H=y
 CONFIG_ATH79_MACH_UBNT=y
 CONFIG_ATH79_MACH_UBNT_XM=y
+CONFIG_ATH79_MACH_WEIO=y
 CONFIG_ATH79_MACH_WHR_HP_G300N=y
 CONFIG_ATH79_MACH_WLAE_AG300N=y
 CONFIG_ATH79_MACH_WLR8100=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
new file mode 100644
index 000..6142ee0
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
@@ -0,0 +1,162 @@
+/**
+ * WEIO Web Of Things Platform
+ *
+ * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
+ *
+ *  ##  ##    ###  
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *   ###  ###     ###
+ *
+ *   Web Of Things Platform
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Authors : 
+ * Drasko DRASKOVIC drasko.drasko...@gmail.com
+ * Uros PETREVSKI u...@nodesign.net
+ */
+
+#include asm/mach-ath79/ath79.h
+#include asm/mach-ath79/ar71xx_regs.h
+#include common.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
+#include linux/i2c-gpio.h
+#include linux/platform_device.h
+
+#define WEIO_GPIO_LED_STA  1
+#define WEIO_GPIO_LED_AP   16
+//#define WEIO_GPIO_LED_ETH0   13
+
+#define WEIO_GPIO_BTN_AP   20
+#define WEIO_GPIO_BTN_RESET23
+
+#define WEIO_KEYS_POLL_INTERVAL20  /* msecs */
+#define WEIO_KEYS_DEBOUNCE_INTERVAL(3 * WEIO_KEYS_POLL_INTERVAL)
+
+#define WEIO_MAC0_OFFSET   0x
+#define WEIO_MAC1_OFFSET   0x0006
+#define WEIO_CALDATA_OFFSET0x1000
+#define WEIO_WMAC_MAC_OFFSET   0x1002
+
+static struct gpio_led weio_leds_gpio[] __initdata = {
+   {
+   .name   = weio:green:sta,
+   .gpio   = WEIO_GPIO_LED_STA,
+   .active_low = 1,
+.default_state = LEDS_GPIO_DEFSTATE_ON

Re: [OpenWrt-Devel] [PATCH] Add support for WeIO board. WeIO board (http://we-io.net) is based on Carambola2 module from 8Devices, and the patch adds a separate profile.

2015-07-25 Thread Drasko DRASKOVIC
Hi Karl,

On Thu, Jun 18, 2015 at 2:35 AM, Karl Palsson ka...@tweak.net.au wrote:

 You said you're removed the commented out code?

 Also, somehow your description ended up in the subject...

 (More comments inline, but this looks like an older version of the patch)


 Sincerely,
 Karl Palsson


 Drasko DRASKOVIC drasko.drasko...@gmail.com wrote:
 Signed-off-by: Drasko DRASKOVIC drasko.drasko...@gmail.com
 ---
  target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
  .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
  target/linux/ar71xx/config-3.18|   1 +
  .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 162 
 +
  target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
  target/linux/ar71xx/image/Makefile |   8 +
  .../610-MIPS-ath79-openwrt-machines.patch  |  21 ++-
  7 files changed, 209 insertions(+), 6 deletions(-)
  create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
  create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk


 +
 +#define WEIO_GPIO_LED_STA1
 +#define WEIO_GPIO_LED_AP 16
 +//#define WEIO_GPIO_LED_ETH0 13

 Is there or not? Kill it if it doesn't exist.

 +
 +#define WEIO_GPIO_BTN_AP 20
 +#define WEIO_GPIO_BTN_RESET  23
 +
 +#define WEIO_KEYS_POLL_INTERVAL  20  /* msecs */
 +#define WEIO_KEYS_DEBOUNCE_INTERVAL  (3 * WEIO_KEYS_POLL_INTERVAL)
 +
 +#define WEIO_MAC0_OFFSET 0x
 +#define WEIO_MAC1_OFFSET 0x0006
 +#define WEIO_CALDATA_OFFSET  0x1000


 +static void __init weio_common_setup(void)
 +{
 + u8 *art = (u8 *) KSEG1ADDR(0x1fff);
 +
 + ath79_register_m25p80(NULL);
 + ath79_register_wmac(art + WEIO_CALDATA_OFFSET,
 + art + WEIO_WMAC_MAC_OFFSET);
 +
 +/** WeIO does not use ETH - only WiFi by default */
 +#if 0
 + ath79_setup_ar933x_phy4_switch(true, true);
 +
 + ath79_init_mac(ath79_eth0_data.mac_addr, art + WEIO_MAC0_OFFSET, 0);
 + ath79_init_mac(ath79_eth1_data.mac_addr, art + WEIO_MAC1_OFFSET, 0);
 +
 + ath79_register_mdio(0, 0x0);
 +
 + /* LAN ports */
 + ath79_register_eth(1);
 +
 + /* WAN port */
 + ath79_register_eth(0);
 +#endif /** commented out ETH */
 +}
 +

 This was already raised earlier?

 +static void __init weio_setup(void)
 +{
 + weio_common_setup();
 +
 +
 + ath79_gpio_function_disable(AR933X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
 + AR933X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
 + AR933X_GPIO_FUNC_ETH_SWITCH_LED2_EN |
 + AR933X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
 +AR933X_GPIO_FUNC_ETH_SWITCH_LED4_EN);
 +
 +platform_add_devices(weio_devices, ARRAY_SIZE(weio_devices));
 +
 + ath79_register_leds_gpio(-1, ARRAY_SIZE(weio_leds_gpio),
 +  weio_leds_gpio);
 +
 + ath79_register_gpio_keys_polled(-1, WEIO_KEYS_POLL_INTERVAL,
 + ARRAY_SIZE(weio_gpio_keys),
 + weio_gpio_keys);
 + ath79_register_usb();
 +}
 +
 +MIPS_MACHINE(ATH79_MACH_WEIO, WEIO, WeIO board from Drasko DRASKOVIC and 
 Uros PETREVSKI,

 Really?  That's your model name?  Really?  Are you _sure_ that's what
 you want?

Yes, the name of the board is WeIO.



 + weio_setup);
 diff --git a/target/linux/ar71xx/generic/profiles/weio.mk
 b/target/linux/ar71xx/generic/profiles/weio.mk
 new file mode 100644
 index 000..227cec9
 --- /dev/null
 +++ b/target/linux/ar71xx/generic/profiles/weio.mk
 @@ -0,0 +1,17 @@
 +#
 +# Copyright (C) 2013 OpenWrt.org
 +#
 +# This is free software, licensed under the GNU General Public License v2.
 +# See /LICENSE for more information.
 +#
 +
 +define Profile/WEIO
 +NAME:=WeIO
 +PACKAGES:=kmod-usb-core kmod-usb2
 +endef
 +
 +define Profile/WEIO/Description
 +Package set optimized for the WeIO board.
 +endef
 +
 +$(eval $(call Profile,WEIO))
 diff --git a/target/linux/ar71xx/image/Makefile
 b/target/linux/ar71xx/image/Makefile
 index 21d0d66..1f08ca0 100644
 --- a/target/linux/ar71xx/image/Makefile
 +++ b/target/linux/ar71xx/image/Makefile
 @@ -179,6 +179,14 @@ define Device/carambola2
  endef
  TARGET_DEVICES += carambola2

 +define Device/weio
 +  BOARDNAME = WEIO
 +  IMAGE_SIZE = 16000k
 +  CONSOLE = ttyATH0,115200
 +  MTDPARTS = 
 spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
 +endef
 +TARGET_DEVICES += weio
 +
  define Device/wndr3700
BOARDNAME = WNDR3700
NETGEAR_KERNEL_MAGIC = 0x33373030
 diff --git
 a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
 b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
 index f8a561c..e8c8d5a 100644
 --- a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
 +++ b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt

[OpenWrt-Devel] [PATCH] Add support for WeIO board. WeIO board (http://we-io.net) is based on Carambola2 module from 8Devices, and the patch adds a separate profile.

2015-06-17 Thread Drasko DRASKOVIC
Signed-off-by: Drasko DRASKOVIC drasko.drasko...@gmail.com
---
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
 target/linux/ar71xx/config-3.18|   1 +
 .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 162 +
 target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
 target/linux/ar71xx/image/Makefile |   8 +
 .../610-MIPS-ath79-openwrt-machines.patch  |  21 ++-
 7 files changed, 209 insertions(+), 6 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
 create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk

diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index b13be1e..6a12533 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -793,6 +793,9 @@ ar71xx_board_detect() {
*UniFi AP Pro)
name=uap-pro
;;
+   *WeIO)
+   name=weio
+   ;;   
*WHR-G301N)
name=whr-g301n
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 3dbd91c..0f2920b 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -243,7 +243,8 @@ platform_check_image() {
nbg460n_550n_550nh | \
unifi | \
unifi-outdoor | \
-   carambola2 )
+   carambola2 | \
+   weio )
[ $magic != 2705 ]  {
echo Invalid image type.
return 1
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 543b77e..e81ba51 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -126,6 +126,7 @@ CONFIG_ATH79_MACH_TL_WR941ND=y
 CONFIG_ATH79_MACH_TUBE2H=y
 CONFIG_ATH79_MACH_UBNT=y
 CONFIG_ATH79_MACH_UBNT_XM=y
+CONFIG_ATH79_MACH_WEIO=y
 CONFIG_ATH79_MACH_WHR_HP_G300N=y
 CONFIG_ATH79_MACH_WLAE_AG300N=y
 CONFIG_ATH79_MACH_WLR8100=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
new file mode 100644
index 000..2ac4f92
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
@@ -0,0 +1,162 @@
+/**
+ * WEIO Web Of Things Platform
+ *
+ * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
+ *
+ *  ##  ##    ###  
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *   ###  ###     ###
+ *
+ *   Web Of Things Platform
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Authors : 
+ * Drasko DRASKOVIC drasko.drasko...@gmail.com
+ * Uros PETREVSKI u...@nodesign.net
+ */
+
+#include asm/mach-ath79/ath79.h
+#include asm/mach-ath79/ar71xx_regs.h
+#include common.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
+#include linux/i2c-gpio.h
+#include linux/platform_device.h
+
+#define WEIO_GPIO_LED_STA  1
+#define WEIO_GPIO_LED_AP   16
+//#define WEIO_GPIO_LED_ETH0   13
+
+#define WEIO_GPIO_BTN_AP   20
+#define WEIO_GPIO_BTN_RESET23
+
+#define WEIO_KEYS_POLL_INTERVAL20  /* msecs */
+#define WEIO_KEYS_DEBOUNCE_INTERVAL(3 * WEIO_KEYS_POLL_INTERVAL)
+
+#define WEIO_MAC0_OFFSET   0x
+#define WEIO_MAC1_OFFSET   0x0006
+#define WEIO_CALDATA_OFFSET0x1000
+#define WEIO_WMAC_MAC_OFFSET   0x1002
+
+static struct gpio_led weio_leds_gpio[] __initdata = {
+   {
+   .name   = weio:green:sta,
+   .gpio   = WEIO_GPIO_LED_STA,
+   .active_low = 1,
+.default_state = LEDS_GPIO_DEFSTATE_ON

Re: [OpenWrt-Devel] [PATCH] Add support for WeIO board

2015-06-17 Thread Drasko DRASKOVIC
Thanks for revision,
I have resent corrected patch:
- Added description
- Added signed-of
- Corrected alphabetical order of `target/linux/ar71xx/base-files/lib/ar71xx.sh`

BR,
Drasko


On Wed, Jun 17, 2015 at 2:17 PM, Karl Palsson ka...@tweak.net.au wrote:

 Drasko DRASKOVIC drasko.drasko...@gmail.com wrote:
 ---
  target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
  .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
  target/linux/ar71xx/config-3.18|   1 +
  .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 162 
 +
  target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
  target/linux/ar71xx/image/Makefile |   8 +
  .../610-MIPS-ath79-openwrt-machines.patch  |  21 ++-
  7 files changed, 209 insertions(+), 6 deletions(-)
  create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
  create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk

 diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
 b/target/linux/ar71xx/base-files/lib/ar71xx.sh
 index b13be1e..fe7478c 100755
 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
 +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
 @@ -892,6 +892,9 @@ ar71xx_board_detect() {
   8devices Carambola2*)
   name=carambola2
   ;;
 + *WeIO)
 + name=weio
 + ;;
   *Sitecom WLR-8100)
   name=wlr8100
   ;;

 This one is in the wrong place too.  Those last few entries, from EmbWir
 Dorin down to HiWiFi are out of order, but the rest of the ENTIRE list
 is well sorted.  Your WeIO should be up around line 790, after the
 Unifi, and before the WHR

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


Re: [OpenWrt-Devel] [PATCH] Add Support for WeIO Board (Chaos Calmer)

2015-06-16 Thread Drasko DRASKOVIC
HI all,
I have just re-sent patch through `git send-email`.

I have corrected following:
- Added GPLv2 header
- Corrected alphabetical order everywhere where I saw it was respected
- removed eth0 and other carambola2 LED related stuff

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


[OpenWrt-Devel] [PATCH] Add support for WeIO board

2015-06-16 Thread Drasko DRASKOVIC
---
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
 target/linux/ar71xx/config-3.18|   1 +
 .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 162 +
 target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
 target/linux/ar71xx/image/Makefile |   8 +
 .../610-MIPS-ath79-openwrt-machines.patch  |  21 ++-
 7 files changed, 209 insertions(+), 6 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
 create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk

diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index b13be1e..fe7478c 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -892,6 +892,9 @@ ar71xx_board_detect() {
8devices Carambola2*)
name=carambola2
;;
+   *WeIO)
+   name=weio
+   ;;
*Sitecom WLR-8100)
name=wlr8100
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 3dbd91c..0f2920b 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -243,7 +243,8 @@ platform_check_image() {
nbg460n_550n_550nh | \
unifi | \
unifi-outdoor | \
-   carambola2 )
+   carambola2 | \
+   weio )
[ $magic != 2705 ]  {
echo Invalid image type.
return 1
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 543b77e..e81ba51 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -126,6 +126,7 @@ CONFIG_ATH79_MACH_TL_WR941ND=y
 CONFIG_ATH79_MACH_TUBE2H=y
 CONFIG_ATH79_MACH_UBNT=y
 CONFIG_ATH79_MACH_UBNT_XM=y
+CONFIG_ATH79_MACH_WEIO=y
 CONFIG_ATH79_MACH_WHR_HP_G300N=y
 CONFIG_ATH79_MACH_WLAE_AG300N=y
 CONFIG_ATH79_MACH_WLR8100=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
new file mode 100644
index 000..2ac4f92
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
@@ -0,0 +1,162 @@
+/**
+ * WEIO Web Of Things Platform
+ *
+ * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
+ *
+ *  ##  ##    ###  
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *   ###  ###     ###
+ *
+ *   Web Of Things Platform
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Authors : 
+ * Drasko DRASKOVIC drasko.drasko...@gmail.com
+ * Uros PETREVSKI u...@nodesign.net
+ */
+
+#include asm/mach-ath79/ath79.h
+#include asm/mach-ath79/ar71xx_regs.h
+#include common.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
+#include linux/i2c-gpio.h
+#include linux/platform_device.h
+
+#define WEIO_GPIO_LED_STA  1
+#define WEIO_GPIO_LED_AP   16
+//#define WEIO_GPIO_LED_ETH0   13
+
+#define WEIO_GPIO_BTN_AP   20
+#define WEIO_GPIO_BTN_RESET23
+
+#define WEIO_KEYS_POLL_INTERVAL20  /* msecs */
+#define WEIO_KEYS_DEBOUNCE_INTERVAL(3 * WEIO_KEYS_POLL_INTERVAL)
+
+#define WEIO_MAC0_OFFSET   0x
+#define WEIO_MAC1_OFFSET   0x0006
+#define WEIO_CALDATA_OFFSET0x1000
+#define WEIO_WMAC_MAC_OFFSET   0x1002
+
+static struct gpio_led weio_leds_gpio[] __initdata = {
+   {
+   .name   = weio:green:sta,
+   .gpio   = WEIO_GPIO_LED_STA,
+   .active_low = 1,
+.default_state = LEDS_GPIO_DEFSTATE_ON,
+   }, {
+   .name   = weio:green:ap

Re: [OpenWrt-Devel] [PATCH] Add Support for WeIO Board (Chaos Calmer)

2015-06-15 Thread Drasko DRASKOVIC
Hi Karl,

On Mon, Jun 15, 2015 at 11:48 AM, Karl Palsson ka...@tweak.net.au wrote:

 A lot of this messes up the alphabetical ordering.

Can you point me to exact spots?

I tried to add WeIO support next to Carambola2, as in many cases it is
practically the same. I might be that I did not notice alphabetical
ordering in some files, so please point me to the right places.

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


Re: [OpenWrt-Devel] [PATCH] Add Support for WeIO Board (Chaos Calmer)

2015-06-15 Thread Drasko DRASKOVIC
Hi John,

On Mon, Jun 15, 2015 at 8:56 AM, John Crispin blo...@openwrt.org wrote:


 On 14/06/2015 23:56, Drasko DRASKOVIC wrote:
 +/**
 + * WEIO Web Of Things Platform
 + *
 + * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
 + *
 + *  ##  ##    ###
 + *  ##  ##  ## ####  ## ##
 + *  ##  ##  ## ####  ## ##
 + *  ##  ##  ## ####  ## ##
 + *  ##  ##  ## ####  ## ##
 + *  ##  ##  ## ####  ## ##
 + *   ###  ###     ###
 + *
 + *   Web Of Things Platform
 + *
 + * Authors :
 + * Drasko DRASKOVIC drasko.drasko...@gmail.com
 + * Uros PETREVSKI u...@nodesign.net
 + */
 +

 we expect submitted kernel patches to have a gplv2 license

This is a copyright info, not a licensing information - license is
GPLv2. There is many files in OpenWrt that do not have a license info
in the headers.

Do you want me to change the patch and add licensing information also?

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


[OpenWrt-Devel] [PATCH] Add Support for WeIO Board (Chaos Calmer)

2015-06-14 Thread Drasko DRASKOVIC
Hello,
please find below patch that adds support for WeIO board
(http://we-io.net) to Chaos Calmer master branch.

The board is based on Carambola2 module from 8Devices, and this patch
adds a separate profile for WeIO.

Best regards,
Drasko




From c68e410601b1fe656dad7b08ed41de470d0550c6 Mon Sep 17 00:00:00 2001
From: Drasko DRASKOVIC drasko.drasko...@gmail.com
Date: Sun, 14 Jun 2015 22:41:45 +0200
Subject: [PATCH] Add support for WeIO board

Signed-off-by: Drasko DRASKOVIC drasko.drasko...@gmail.com
---
 .../ar71xx/base-files/etc/uci-defaults/01_leds |   6 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
 target/linux/ar71xx/config-3.18|   1 +
 .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 148 +
 target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
 target/linux/ar71xx/image/Makefile |   8 ++
 .../610-MIPS-ath79-openwrt-machines.patch  |  21 ++-
 8 files changed, 201 insertions(+), 6 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
 create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 41b..b0fb36e 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -63,6 +63,12 @@ carambola2)
  ucidef_set_led_wlan wlan WLAN carambola2:green:wlan phy0tpt
  ;;

+weio)
+ ucidef_set_led_netdev lan LAN weio:orange:eth0 eth0
+ ucidef_set_led_netdev wan WAN weio:orange:eth1 eth1
+ ucidef_set_led_wlan wlan WLAN weio:green:wlan phy0tpt
+ ;;
+
 cpe510)
  ucidef_set_led_switch lan0 LAN0 tp-link:green:lan0 switch0 0x20
  ucidef_set_led_switch lan1 LAN1 tp-link:green:lan1 switch0 0x10
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index b13be1e..fe7478c 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -892,6 +892,9 @@ ar71xx_board_detect() {
  8devices Carambola2*)
  name=carambola2
  ;;
+ *WeIO)
+ name=weio
+ ;;
  *Sitecom WLR-8100)
  name=wlr8100
  ;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 3dbd91c..0f2920b 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -243,7 +243,8 @@ platform_check_image() {
  nbg460n_550n_550nh | \
  unifi | \
  unifi-outdoor | \
- carambola2 )
+ carambola2 | \
+ weio )
  [ $magic != 2705 ]  {
  echo Invalid image type.
  return 1
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 543b77e..ae68a18 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -43,6 +43,7 @@ CONFIG_ATH79_MACH_AW_NR580=y
 CONFIG_ATH79_MACH_BHU_BXU2000N2_A=y
 CONFIG_ATH79_MACH_CAP4200AG=y
 CONFIG_ATH79_MACH_CARAMBOLA2=y
+CONFIG_ATH79_MACH_WEIO=y
 CONFIG_ATH79_MACH_CPE510=y
 CONFIG_ATH79_MACH_DB120=y
 CONFIG_ATH79_MACH_DGL_5500_A1=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
new file mode 100644
index 000..70ed543
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
@@ -0,0 +1,148 @@
+/**
+ * WEIO Web Of Things Platform
+ *
+ * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
+ *
+ *  ##  ##    ###
+ *  ##  ##  ## ####  ## ##
+ *  ##  ##  ## ####  ## ##
+ *  ##  ##  ## ####  ## ##
+ *  ##  ##  ## ####  ## ##
+ *  ##  ##  ## ####  ## ##
+ *   ###  ###     ###
+ *
+ *   Web Of Things Platform
+ *
+ * Authors :
+ * Drasko DRASKOVIC drasko.drasko...@gmail.com
+ * Uros PETREVSKI u...@nodesign.net
+ */
+
+#include asm/mach-ath79/ath79.h
+#include asm/mach-ath79/ar71xx_regs.h
+#include common.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
+#include linux/i2c-gpio.h
+#include linux/platform_device.h
+
+#define WEIO_GPIO_LED_STA 1
+#define WEIO_GPIO_LED_AP 16
+//#define WEIO_GPIO_LED_ETH0 13
+
+#define WEIO_GPIO_BTN_AP20
+#define WEIO_GPIO_BTN_RESET 23
+
+#define WEIO_KEYS_POLL_INTERVAL 20 /* msecs */
+#define WEIO_KEYS_DEBOUNCE_INTERVAL (3 * WEIO_KEYS_POLL_INTERVAL)
+
+#define WEIO_MAC0_OFFSET 0x
+#define WEIO_MAC1_OFFSET 0x0006
+#define WEIO_CALDATA_OFFSET0x1000
+#define WEIO_WMAC_MAC_OFFSET 0x1002
+
+static struct gpio_led weio_leds_gpio[] __initdata = {
+ {
+ .name = weio:green:sta,
+ .gpio = WEIO_GPIO_LED_STA

[OpenWrt-Devel] ptrace and pselect

2015-03-21 Thread Drasko DRASKOVIC
Hi all,
I installed `mosquitto` via `opkg` on BarrierBreaker, and I am getting:

root@WEIO:~# mosquitto_pub -h test.mosquitto.org -t temp/random -m 40
mosquitto_pub: can't resolve symbol 'pselect'

Then I wnated to see what's happening, and I installed `strace`, but I
am getting:
root@WEIO:~# strace mosquitto_pub -h test.mosquitto.org -t temp/random -m 40
strace: can't resolve symbol 'ptrace' in lib 'strace'.
strace: test_ptrace_setoptions_for_all: unexpected exit status 1
root@WEIO:~#

Any ideas?

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


[OpenWrt-Devel] drasko.drasko...@gmail.com has indicated you're a friend(19 mutual friends). Accept?

2015-03-03 Thread drasko . draskovic
Hi,

drasko.drasko...@gmail.com wants to follow you.

** Is drasko.drasko...@gmail.com you friend? **
If Yes please follow the link below:
http://invites.info-emailer.com/signup_e.html?fullname=Openwrt+Development+Listamp;email=openwrt-devel@lists.openwrt.orgamp;invitername=Drasko.draskovicamp;inviterid=17473118amp;userid=0amp;token=0amp;emailmasterid=ab7ed952-ff0b-424c-87a0-7d649ba9972eamp;from=drasko.drasko...@gmail.comsrc=txt_yes

If No please follow the link below:
http://invites.info-emailer.com/signup_e.html?fullname=Openwrt+Development+Listamp;email=openwrt-devel@lists.openwrt.orgamp;invitername=Drasko.draskovicamp;inviterid=17473118amp;userid=0amp;token=0amp;emailmasterid=ab7ed952-ff0b-424c-87a0-7d649ba9972eamp;from=drasko.drasko...@gmail.comsrc=txt_no


Follow the link below to remove yourself from all such emails
http://invites.info-emailer.com/uns_inviter.jsp?email=openwrt-devel@lists.openwrt.orgamp;iid=ab7ed952-ff0b-424c-87a0-7d649ba9972eamp;from=drasko.drasko...@gmail.com


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


Re: [OpenWrt-Devel] WeIO - Web of Things Platform

2014-10-29 Thread Drasko DRASKOVIC
Hi Michael,

On Wed, Oct 29, 2014 at 5:10 PM, Michael Richardson m...@sandelman.ca wrote:

 So, 400Mhz ARM, single wired ethernet that needs to be populated, as far as I
 can see.   Lots of I/O...  Yes, a nice IoT platform.

 Any battery management?
We have not been working on this but normally Carambola 2 module
promises 0.5W power consumption (http://www.8devices.com/carambola-2).
In general AR9331 is very power efficient
(http://wiki.openwrt.org/toh/tp-link/tl-wr703n). WeIO has some extra
components (USB hub and MCU), but generally should not be very
different in the terms of power consumption. It is powered by 5V USB,
or via external power supply (has a regulator circuit on board).

In this sense any external battery, like the ones used as extra
batteries for mobile phones and tables, should work without problems.
But there is no battery management circuit in the sense that we can
measure battery status at first revision of WeIO. We will be looking
at more industrial solutions for the second revision and maybe add
some missing features.

 The AR9331 uses the Ath9K wifi driver?

Yes, and this is probably the best Linux WiFi driver. It is very
powerful, has even opened FW part and can support virtual interfaces -
i.e. you can have simultaneous interface in AP and STA mode (tested
and working with WeIO).

 I'm thinking about ease of sticking it in a tree with a solar panel.
I do not have experience with this, but basically any supply between
5V and 15V will be OK for powering the board. I am planning to do some
measurements on the new batch that arrived a few days ago, and I can
present you exact consumption figures.

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


[OpenWrt-Devel] WeIO - Web of Things Platform

2014-10-28 Thread Drasko DRASKOVIC
FYI,
WeIO (http://we-io.net/) is new OpenWrt (Barrier Breaker) powered
development board for rapid prototyping and IoT, based on Carambola 2
module (Atheros AR9331 CPU).

It has a good Indiegogo success so far:
https://www.indiegogo.com/projects/weio-platform-for-web-of-things,
and source code of the main app is here:
https://github.com/nodesign/weio, while BSP is here:
https://github.com/nodesign/openwrt (currently working on set of
patches to be pushed to upstream soon).

We hope that this project will lead to further popularization of
OpenWrt, as so far we are quite satisfied with results and
performance.

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


[OpenWrt-Devel] [PATCH 1/4] [WEIO] Adding WeIO profile

2014-06-30 Thread Drasko DRASKOVIC
This patch adds WeIO board profile.

WeIO is the new AR9331 MIPS based board for Internet of Things.
Project web-site is: http://we-io.net/
From 82e77431e2b860f21da5540a84e7440764a49b39 Mon Sep 17 00:00:00 2001
From: Drasko DRASKOVIC drasko.drasko...@gmail.com
Date: Sun, 9 Feb 2014 03:46:43 +0100
Subject: [PATCH 1/5] weio: adding WeIO profile for OpenWrt

More changes on WeIO profile

Corrected board name detection in /tmp/sysinfo/board_name
---
 .../ar71xx/base-files/etc/uci-defaults/01_leds |   6 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
 target/linux/ar71xx/config-3.10|   1 +
 .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 142 +
 target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
 target/linux/ar71xx/image/Makefile |   2 +
 .../610-MIPS-ath79-openwrt-machines.patch  |  81 +++-
 8 files changed, 219 insertions(+), 36 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
 create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index fe5ff93..f0c2178 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -57,6 +57,12 @@ carambola2)
 	ucidef_set_led_wlan wlan WLAN carambola2:green:wlan phy0tpt
 	;;
 
+weio)
+	ucidef_set_led_netdev lan LAN weio:orange:eth0 eth0
+	ucidef_set_led_netdev wan WAN weio:orange:eth1 eth1
+	ucidef_set_led_wlan wlan WLAN weio:green:wlan phy0tpt
+	;;
+
 db120)
 	ucidef_set_led_usbdev usb USB db120:green:usb 1-1
 	;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 4656ac2..a9c0c99 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -679,6 +679,9 @@ ar71xx_board_detect() {
 	8devices Carambola2*)
 		name=carambola2
 		;;
+	WeIO*)
+		name=weio
+		;;
 	*Sitecom WLR-8100)
 		name=wlr8100
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 8af9580..5308cf6 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -178,7 +178,8 @@ platform_check_image() {
 	nbg460n_550n_550nh | \
 	unifi | \
 	unifi-outdoor | \
-	carambola2 )
+	carambola2 | \
+weio )
 		[ $magic != 2705 ]  {
 			echo Invalid image type.
 			return 1
diff --git a/target/linux/ar71xx/config-3.10 b/target/linux/ar71xx/config-3.10
index 1346c3f..feac512 100644
--- a/target/linux/ar71xx/config-3.10
+++ b/target/linux/ar71xx/config-3.10
@@ -39,6 +39,7 @@ CONFIG_ATH79_MACH_AW_NR580=y
 CONFIG_ATH79_MACH_BHU_BXU2000N2_A=y
 CONFIG_ATH79_MACH_CAP4200AG=y
 CONFIG_ATH79_MACH_CARAMBOLA2=y
+CONFIG_ATH79_MACH_WEIO=y
 CONFIG_ATH79_MACH_DB120=y
 CONFIG_ATH79_MACH_DIR_505_A1=y
 CONFIG_ATH79_MACH_DIR_600_A1=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
new file mode 100644
index 000..6a18ae9
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
@@ -0,0 +1,142 @@
+/**
+ * WEIO Web Of Things Platform
+ *
+ * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
+ * All rights reserved
+ *
+ *  ##  ##    ###  
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *  ##  ##  ## ####  ## ## 
+ *   ###  ###     ###
+ *
+ *   Web Of Things Platform 
+ *
+ * This file is part of WEIO
+ * WEIO 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * WEIO 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, see http://www.gnu.org/licenses/.
+ *
+ * Authors : 
+ * Drasko DRASKOVIC drasko.drasko...@gmail.com
+ * Uros PETREVSKI u...@nodesign.net
+ */
+
+#include asm/mach-ath79/ath79.h
+#include asm/mach-ath79/ar71xx_regs.h
+#include common.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

[OpenWrt-Devel] [PATCH 2/4] [WEIO] leds - Enable STA and AP leds for WeIO board

2014-06-30 Thread Drasko DRASKOVIC
This patch adds led support for WeIO board.

WeIO is the new AR9331 MIPS based board for Internet of Things.
Project web-site is: http://we-io.net/
From ef42b3f73ff685589f3d5df50f8a88942ca51985 Mon Sep 17 00:00:00 2001
From: Drasko DRASKOVIC drasko.drasko...@gmail.com
Date: Sat, 22 Mar 2014 17:12:14 +0100
Subject: [PATCH 2/5] weio: leds - enable STA and AP leds for WeIO board

mach-weio: led names to correspond to convention.
---
 .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 28 ++
 1 file changed, 12 insertions(+), 16 deletions(-)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
index 6a18ae9..3b5a40b 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
@@ -45,12 +45,12 @@
 #include dev-wmac.h
 #include machtypes.h
 
-#define WEIO_GPIO_LED_WLAN		0
-#define WEIO_GPIO_LED_ETH0		14
-#define WEIO_GPIO_LED_ETH1		13
+#define WEIO_GPIO_LED_STA		1
+#define WEIO_GPIO_LED_AP		16
+//#define WEIO_GPIO_LED_ETH0	13
 
-#define WEIO_GPIO_BTN_JUMPSTART	11
-#define WEIO_GPIO_BTN_RESET		12
+#define WEIO_GPIO_BTN_AP	20
+#define WEIO_GPIO_BTN_RESET		15
 
 #define WEIO_KEYS_POLL_INTERVAL		20	/* msecs */
 #define WEIO_KEYS_DEBOUNCE_INTERVAL	(3 * WEIO_KEYS_POLL_INTERVAL)
@@ -62,27 +62,23 @@
 
 static struct gpio_led weio_leds_gpio[] __initdata = {
 	{
-		.name		= weio:green:wlan,
-		.gpio		= WEIO_GPIO_LED_WLAN,
+		.name		= weio:green:sta,
+		.gpio		= WEIO_GPIO_LED_STA,
 		.active_low	= 1,
 	}, {
-		.name		= weio:orange:eth0,
-		.gpio		= WEIO_GPIO_LED_ETH0,
-		.active_low	= 0,
-	}, {
-		.name		= weio:orange:eth1,
-		.gpio		= WEIO_GPIO_LED_ETH1,
-		.active_low	= 0,
+		.name		= weio:green:ap,
+		.gpio		= WEIO_GPIO_LED_AP,
+		.active_low	= 1,
 	}
 };
 
 static struct gpio_keys_button weio_gpio_keys[] __initdata = {
 	{
-		.desc		= jumpstart button,
+		.desc		= ap button,
 		.type		= EV_KEY,
 		.code		= KEY_WPS_BUTTON,
 		.debounce_interval = WEIO_KEYS_DEBOUNCE_INTERVAL,
-		.gpio		= WEIO_GPIO_BTN_JUMPSTART,
+		.gpio		= WEIO_GPIO_BTN_AP,
 		.active_low	= 1,
 	},
 	{
-- 
1.8.5.3

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


[OpenWrt-Devel] [PATCH 3/4] [WEIO] buttons - WeIO button support

2014-06-30 Thread Drasko DRASKOVIC
This patch adds button support for WeIO board.

WeIO is the new AR9331 MIPS based board for Internet of Things.
Project web-site is: http://we-io.net/
From 3fb5d59d6ade5161d89983874568db50e32d6dac Mon Sep 17 00:00:00 2001
From: Drasko DRASKOVIC drasko.drasko...@gmail.com
Date: Mon, 24 Mar 2014 00:10:33 +0100
Subject: [PATCH 3/5] weio: buttons - added WeIO button support

button: Soft reset button moved to GPIO23
---
 target/linux/ar71xx/config-3.10|  2 +-
 .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 22 +-
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/target/linux/ar71xx/config-3.10 b/target/linux/ar71xx/config-3.10
index feac512..36576a2 100644
--- a/target/linux/ar71xx/config-3.10
+++ b/target/linux/ar71xx/config-3.10
@@ -39,7 +39,6 @@ CONFIG_ATH79_MACH_AW_NR580=y
 CONFIG_ATH79_MACH_BHU_BXU2000N2_A=y
 CONFIG_ATH79_MACH_CAP4200AG=y
 CONFIG_ATH79_MACH_CARAMBOLA2=y
-CONFIG_ATH79_MACH_WEIO=y
 CONFIG_ATH79_MACH_DB120=y
 CONFIG_ATH79_MACH_DIR_505_A1=y
 CONFIG_ATH79_MACH_DIR_600_A1=y
@@ -101,6 +100,7 @@ CONFIG_ATH79_MACH_TL_WR841N_V9=y
 CONFIG_ATH79_MACH_TL_WR941ND=y
 CONFIG_ATH79_MACH_UBNT=y
 CONFIG_ATH79_MACH_UBNT_XM=y
+CONFIG_ATH79_MACH_WEIO=y
 CONFIG_ATH79_MACH_WHR_HP_G300N=y
 CONFIG_ATH79_MACH_WLAE_AG300N=y
 CONFIG_ATH79_MACH_WLR8100=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
index 3b5a40b..8317ee2 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
@@ -50,7 +50,7 @@
 //#define WEIO_GPIO_LED_ETH0	13
 
 #define WEIO_GPIO_BTN_AP	20
-#define WEIO_GPIO_BTN_RESET		15
+#define WEIO_GPIO_BTN_RESET		23
 
 #define WEIO_KEYS_POLL_INTERVAL		20	/* msecs */
 #define WEIO_KEYS_DEBOUNCE_INTERVAL	(3 * WEIO_KEYS_POLL_INTERVAL)
@@ -65,10 +65,12 @@ static struct gpio_led weio_leds_gpio[] __initdata = {
 		.name		= weio:green:sta,
 		.gpio		= WEIO_GPIO_LED_STA,
 		.active_low	= 1,
+.default_state = LEDS_GPIO_DEFSTATE_ON,
 	}, {
 		.name		= weio:green:ap,
 		.gpio		= WEIO_GPIO_LED_AP,
 		.active_low	= 1,
+.default_state = LEDS_GPIO_DEFSTATE_ON,
 	}
 };
 
@@ -76,15 +78,15 @@ static struct gpio_keys_button weio_gpio_keys[] __initdata = {
 	{
 		.desc		= ap button,
 		.type		= EV_KEY,
-		.code		= KEY_WPS_BUTTON,
+		.code		= BTN_0,
 		.debounce_interval = WEIO_KEYS_DEBOUNCE_INTERVAL,
 		.gpio		= WEIO_GPIO_BTN_AP,
 		.active_low	= 1,
 	},
 	{
-		.desc		= reset button,
+		.desc		= soft-reset button,
 		.type		= EV_KEY,
-		.code		= KEY_RESTART,
+		.code		= BTN_1,
 		.debounce_interval = WEIO_KEYS_DEBOUNCE_INTERVAL,
 		.gpio		= WEIO_GPIO_BTN_RESET,
 		.active_low	= 1,
@@ -120,14 +122,16 @@ static void __init weio_setup(void)
 {
 	weio_common_setup();
 
-	ath79_gpio_function_disable(AR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
-AR724X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
-AR724X_GPIO_FUNC_ETH_SWITCH_LED2_EN |
-AR724X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
-AR724X_GPIO_FUNC_ETH_SWITCH_LED4_EN);
+
+	ath79_gpio_function_disable(AR933X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
+AR933X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
+AR933X_GPIO_FUNC_ETH_SWITCH_LED2_EN |
+AR933X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
+AR933X_GPIO_FUNC_ETH_SWITCH_LED4_EN);
 
 	ath79_register_leds_gpio(-1, ARRAY_SIZE(weio_leds_gpio),
  weio_leds_gpio);
+
 	ath79_register_gpio_keys_polled(-1, WEIO_KEYS_POLL_INTERVAL,
 	ARRAY_SIZE(weio_gpio_keys),
 	weio_gpio_keys);
-- 
1.8.5.3

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


[OpenWrt-Devel] [PATCH 4/4] [WEIO] i2c - WeIO i2c support

2014-06-30 Thread Drasko DRASKOVIC
This patch adds i2c support for WeIO board.

WeIO is the new AR9331 MIPS based board for Internet of Things.
Project web-site is: http://we-io.net/
From 979d4670a008c2d1b1f6640f1643113619a90dec Mon Sep 17 00:00:00 2001
From: Drasko DRASKOVIC drasko.drasko...@gmail.com
Date: Thu, 15 May 2014 00:36:35 +0200
Subject: [PATCH 4/5] weio: i2c - add I2C functionality to WeIO kernel

---
 .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c  | 21 +
 1 file changed, 21 insertions(+)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
index 8317ee2..51534aa 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
@@ -44,6 +44,8 @@
 #include dev-usb.h
 #include dev-wmac.h
 #include machtypes.h
+#include linux/i2c-gpio.h
+#include linux/platform_device.h
 
 #define WEIO_GPIO_LED_STA		1
 #define WEIO_GPIO_LED_AP		16
@@ -93,6 +95,23 @@ static struct gpio_keys_button weio_gpio_keys[] __initdata = {
 	}
 };
 
+static struct i2c_gpio_platform_data weio_i2c_gpio_data = {
+	.sda_pin= 18,
+	.scl_pin= 19,
+};
+
+static struct platform_device weio_i2c_gpio = {
+	.name   = i2c-gpio,
+	.id = 0,
+	.dev = {
+		.platform_data  = weio_i2c_gpio_data,
+	},
+};
+
+static struct platform_device *weio_devices[] __initdata = {
+weio_i2c_gpio
+};
+
 static void __init weio_common_setup(void)
 {
 	u8 *art = (u8 *) KSEG1ADDR(0x1fff);
@@ -129,6 +148,8 @@ static void __init weio_setup(void)
 AR933X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
 AR933X_GPIO_FUNC_ETH_SWITCH_LED4_EN);
 
+platform_add_devices(weio_devices, ARRAY_SIZE(weio_devices));
+
 	ath79_register_leds_gpio(-1, ARRAY_SIZE(weio_leds_gpio),
  weio_leds_gpio);
 
-- 
1.8.5.3

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


Re: [OpenWrt-Devel] [PATCH 1/4] [WEIO] Adding WeIO profile

2014-06-30 Thread Drasko DRASKOVIC
On Mon, Jun 30, 2014 at 2:09 PM, John Crispin j...@phrozen.org wrote:
 Hi,

 please resend with the patches inline, it is not possible to comment
 when they are attached.

No problem, I will be re-sending the patches inline.


 also, my first impression is that the patches are really messy and the
 commit text only partially matches what is inside the patches.

 1/4 seems to have a pile of unrelated white space fixes.

 1/4 adds a file only for 2/4 and 3/4 to fix it

Yes, this might be true, as this was my development process. Should
these be squashed then?


 4/4 adds code with incorrect indenting

Yes, this should be fixed


 this is all not bad and we can fix it, however for that to be possible
 you need to send the patches inline.

 using git send-email is the best way to do so.

Will do this.


 last but not least, this is a carambola2 carrier board, with a lpc uC on
 it ? is this the uC that had a usb device stack in firmware ?

WeIO is based on Carambola2 module, but has some changes - like
different GPIOs for buttons and leds, some other peripherals, etc...

LPC uC has USB stack in the FW, and the all the FW can be found here:
https://github.com/8devices/UPER

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


[OpenWrt-Devel] [PATCH 1/1] [WEIO] Initial support for WeIO board

2014-06-30 Thread Drasko DRASKOVIC
This patch adds WeIO board profile, support for board leds and
buttons. It also adds I2C support (for Carambola2-like module).
Commits are squashed into one.

WeIO is the new AR9331 MIPS based board for Internet of Things.
Project web-site is: http://we-io.net/

Best regards,
Drasko





From c01a10928d2f27f89ff712896c948f549827acbe Mon Sep 17 00:00:00 2001
From: Drasko DRASKOVIC drasko.drasko...@gmail.com
Date: Sun, 9 Feb 2014 03:46:43 +0100
Subject: [PATCH 1/2] weio: adding WeIO profile for OpenWrt

More changes on WeIO profile

Corrected board name detection in /tmp/sysinfo/board_name

weio: leds - enable STA and AP leds for WeIO board

mach-weio: led names to correspond to convention.

weio: buttons - added WeIO button support

button: Soft reset button moved to GPIO23

weio: i2c - add I2C functionality to WeIO kernel
Signed-off-by: Drasko DRASKOVIC drasko.drasko...@gmail.com
---
 .../ar71xx/base-files/etc/uci-defaults/01_leds |   6 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
 target/linux/ar71xx/config-3.10|   1 +
 .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 163 +
 target/linux/ar71xx/generic/profiles/weio.mk   |  17 +++
 target/linux/ar71xx/image/Makefile |   2 +
 .../610-MIPS-ath79-openwrt-machines.patch  |  81 +-
 8 files changed, 240 insertions(+), 36 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
 create mode 100644 target/linux/ar71xx/generic/profiles/weio.mk

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index fe5ff93..f0c2178 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -57,6 +57,12 @@ carambola2)
  ucidef_set_led_wlan wlan WLAN carambola2:green:wlan phy0tpt
  ;;

+weio)
+ ucidef_set_led_netdev lan LAN weio:orange:eth0 eth0
+ ucidef_set_led_netdev wan WAN weio:orange:eth1 eth1
+ ucidef_set_led_wlan wlan WLAN weio:green:wlan phy0tpt
+ ;;
+
 db120)
  ucidef_set_led_usbdev usb USB db120:green:usb 1-1
  ;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 4656ac2..a9c0c99 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -679,6 +679,9 @@ ar71xx_board_detect() {
  8devices Carambola2*)
  name=carambola2
  ;;
+ WeIO*)
+ name=weio
+ ;;
  *Sitecom WLR-8100)
  name=wlr8100
  ;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 8af9580..5308cf6 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -178,7 +178,8 @@ platform_check_image() {
  nbg460n_550n_550nh | \
  unifi | \
  unifi-outdoor | \
- carambola2 )
+ carambola2 | \
+weio )
  [ $magic != 2705 ]  {
  echo Invalid image type.
  return 1
diff --git a/target/linux/ar71xx/config-3.10 b/target/linux/ar71xx/config-3.10
index 1346c3f..36576a2 100644
--- a/target/linux/ar71xx/config-3.10
+++ b/target/linux/ar71xx/config-3.10
@@ -100,6 +100,7 @@ CONFIG_ATH79_MACH_TL_WR841N_V9=y
 CONFIG_ATH79_MACH_TL_WR941ND=y
 CONFIG_ATH79_MACH_UBNT=y
 CONFIG_ATH79_MACH_UBNT_XM=y
+CONFIG_ATH79_MACH_WEIO=y
 CONFIG_ATH79_MACH_WHR_HP_G300N=y
 CONFIG_ATH79_MACH_WLAE_AG300N=y
 CONFIG_ATH79_MACH_WLR8100=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
new file mode 100644
index 000..51534aa
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
@@ -0,0 +1,163 @@
+/**
+ * WEIO Web Of Things Platform
+ *
+ * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
+ * All rights reserved
+ *
+ *  ##  ##    ###
+ *  ##  ##  ## ####  ## ##
+ *  ##  ##  ## ####  ## ##
+ *  ##  ##  ## ####  ## ##
+ *  ##  ##  ## ####  ## ##
+ *  ##  ##  ## ####  ## ##
+ *   ###  ###     ###
+ *
+ *   Web Of Things Platform
+ *
+ * This file is part of WEIO
+ * WEIO 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * WEIO 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, see http

Re: [OpenWrt-Devel] [PATCH 1/4] [WEIO] Adding WeIO profile

2014-06-30 Thread Drasko DRASKOVIC
Hi all,
signed-off squashed commit that introduces WeIO board support is sent
to the list in a new thread.

Best regards,
Drasko

On Mon, Jun 30, 2014 at 3:34 PM, Jonas Gorski j...@openwrt.org wrote:
 On Mon, Jun 30, 2014 at 2:26 PM, John Crispin j...@phrozen.org wrote:
 Hi,

 i would prefer it to be all in 1 patch with no unrelated whitespace
 fixes. that makes it less work to merge and its self contained. if
 there was more code then splitting it up might make sense, however its
 only a few lines that get patched

 Also Signed-off-by please. See
 https://dev.openwrt.org/wiki/SubmittingPatches for details.


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


Re: [OpenWrt-Devel] [PATCH 1/4] [WEIO] Adding WeIO profile

2014-06-30 Thread Drasko DRASKOVIC
On Mon, Jun 30, 2014 at 2:26 PM, John Crispin j...@phrozen.org wrote:
 Hi,

 i would prefer it to be all in 1 patch with no unrelated whitespace
 fixes. that makes it less work to merge and its self contained. if
 there was more code then splitting it up might make sense, however its
 only a few lines that get patched

I squashed the commits and sent in the new thread to the list. I did
not see however white-space changes... I would prefer if the commiter
can change this, if it is not to much of a hustle.


 ok, so it is the same u C as on the UBER ... i saw a photo of that a
 while ago.

UPER project started as a spin-off of WeIO, at the point when we were
researching ideas to add HW RT and above all analog interfaces to
low-cost AR9331. As a solution we expandes these HW interfaces with an
additional Cortex-A0, and UPER FW was written, which is basically USB
TTY connected RPC server. Cool thing is that now this small uC can be
connected to any Linux host (thus PC also), and using all the
libraries we have written in Python it can drive electronics. WeIO
embeds all this + an IDE + a JS libraries for interaction from HTML
frontend on a single small footprint board.

BR,
Drasko
___
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] [WEIO] Initial support for WeIO board

2014-06-30 Thread Drasko DRASKOVIC
Hi Jonas,

On Mon, Jun 30, 2014 at 6:10 PM, Jonas Gorski j...@openwrt.org wrote:
 On Mon, Jun 30, 2014 at 5:46 PM, Drasko DRASKOVIC
 drasko.drasko...@gmail.com wrote:
 From c01a10928d2f27f89ff712896c948f549827acbe Mon Sep 17 00:00:00 2001
 From: Drasko DRASKOVIC drasko.drasko...@gmail.com
 Date: Sun, 9 Feb 2014 03:46:43 +0100
 Subject: [PATCH 1/2] weio: adding WeIO profile for OpenWrt
 (snip)
 +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c
 @@ -0,0 +1,163 @@
 +/**
 + * WEIO Web Of Things Platform
 + *
 + * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI
 + * All rights reserved
 + *
 + *  ##  ##    ###
 + *  ##  ##  ## ####  ## ##
 + *  ##  ##  ## ####  ## ##
 + *  ##  ##  ## ####  ## ##
 + *  ##  ##  ## ####  ## ##
 + *  ##  ##  ## ####  ## ##
 + *   ###  ###     ###
 + *
 + *   Web Of Things Platform
 + *
 + * This file is part of WEIO
 + * WEIO 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 3 of the License, or
 + * (at your option) any later version.

 We cannot accept this - GPLv3 code is *incompatible* with the linux
 kernel, as the linux kernel is GPLv2, not or later. You need to
 relicence it under GPLv2 or GPLv2 or later.

OK, no problem for re-licencing. I will take care of this tonight and
re-send the patches.

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


[OpenWrt-Devel] Adding CONFIG_I2C_CHARDEV

2014-05-14 Thread Drasko DRASKOVIC
Hi all,
I want to enable i2c support to my ATH9 Carambola2 device, but I can
not reach kernel's CONFIG_I2C_CHARDEV=y from menuconfig.

Is it OK to chage this directly via `make target/linux/clean` or
kernel config should be affected only via main menuconfig (the one
from OpenWrt root)?

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


Re: [OpenWrt-Devel] Adding CONFIG_I2C_CHARDEV

2014-05-14 Thread Drasko DRASKOVIC
Yes, it is enabled.

I did not test all though, I wanted to ask first ;). I hade before one
OpenWrt version with broken buildroot, so I remember that I had this
problem.

Thanks for the answer, I thought that it was automatic.

BR,
Drasko

On Thu, May 15, 2014 at 1:07 AM, Florian Fainelli flor...@openwrt.org wrote:
 Hi,

 2014-05-14 16:01 GMT-07:00 Drasko DRASKOVIC drasko.drasko...@gmail.com:
 Hi all,
 I want to enable i2c support to my ATH9 Carambola2 device, but I can
 not reach kernel's CONFIG_I2C_CHARDEV=y from menuconfig.

 Is it OK to chage this directly via `make target/linux/clean` or
 kernel config should be affected only via main menuconfig (the one
 from OpenWrt root)?

 CONFIG_I2C_CHARDEV is enabled when using kmod-i2c-core, did you try
 installing kmod-i2c-core for your platform?
 --
 Florian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Commandline Hack and Command line marker not found

2013-11-10 Thread Drasko DRASKOVIC
Hi all,
Can somebody explain what is OpenWRT Command Line Hack option in
kernel menuconfig?

Following the instructions here:
https://github.com/8devices/u-boot/issues/3#issuecomment-28056612 I
have disabled CONFIG_IMAGE_CMDLINE_HACK.

Now I am getting error: Command line marker not found!

I have noticed that patch-cmdline is called, and this probokes error
when CONFIG_IMAGE_CMDLINE_HACK is disbled:
/home/drasko/carambola2/staging_dir/host/bin/patch-cmdline
/home/drasko/carambola2/build_dir/target-mips_r2_uClibc-0.9.33.2/linux-ar71xx_generic/tmp/vmlinux-carambola2
board=CARAMBOLA2 console=ttyATH0,115200
mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,2048k(kernel),13888k(rootfs),64k(nvram),64k(art)ro,15936k@0x5(firmware)

Can anybody explain why is this happening and how to fix this?

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


[OpenWrt-Devel] Building Python extensions

2013-07-26 Thread Drasko DRASKOVIC
Hi all,
I tried to install a Pyton extension directly on the MIPS target via pip :

root@Marx:/# pip install netifaces
Downloading/unpacking netifaces
  Running setup.py egg_info for package netifaces

...

uilding 'netifaces' extension

mipsel-openwrt-linux-uclibc-gcc -fno-strict-aliasing -Os -pipe
-mips32r2 -mtune=mips32r2 -fno-caller-saves -fhonour-copts
-Wno-error=uo

unable to execute mipsel-openwrt-linux-uclibc-gcc: No such file or directory

error: command 'mipsel-openwrt-linux-uclibc-gcc' failed with exit status 1


Command /mnt/usb/usr/bin/python -c import
setuptools;__file__='/tmp/pip-build/netifaces/setup.py';exec(compile(open(__file__).read().s
Storing complete log in /root/.pip/pip.log


So, as you see, Python tries to invoke gcc to compile extension, and
for some reason it finds that this compiler should be
mipsel-openwrt-linux-uclibc-gcc, i.e. compiler with which Python was
compiled with.

I tried to see where Python gets this information, but all I am
getting is this :
root@WEIO:/# grep -r mipsel-openwrt-linux-uclibc-gcc /
grep: /dev/log: [ 2546.45] grep: sending ioctl 540d to a partition!
No such device o[ 2546.45] grep: sending ioctl 540d to a partition!
r address
/dev/sda1:CC=   mipsel-openwrt-linux-uclibc-gcc
/dev/sda1:CONFIG_ARGS=   '--target=mipsel-openwrt-linux'
'--host=mipsel-openwrt-linux' '--build=x86_64-linux-gnu'
'--program-prefix=' '

What does this mean?

And echo $CC gives me empty string.

How do we compile Python extensions in OpenWRT?

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


Re: [OpenWrt-Devel] OpenOCD and RT3050/5350

2013-07-05 Thread Drasko DRASKOVIC
On Fri, Jul 5, 2013 at 3:57 AM, jonsm...@gmail.com jonsm...@gmail.com wrote:
 32MB memory, 8MB flash. If you need 32MB flash they will pass along
 for whatever the difference is in chip price.

Which then becomes more expensive than Carambola 2...

 I'm starting to discover some the missing pieces in Ralink support.
 Like no WifiDirect and no simultaneous (adhoc, AP). Looking at the
 Ralink driver I don't see why they couldn't be added, but why isn't
 Ralink doing the work?

This is also mystery to me. Too lazy, I guess. However, Carambola 1
has RT3050 and AP mode works quite fine - which proves that it is
absolutely possible.


 I have found three AR9331 modules in the $10-12 range. But they are
 all castellated, I would rather have one with pins. Any idea on the
 Q1000 price for Carambo2 without VAT?

From what I see here http://shop.8devices.com/carambola2 they can go
down to 15 eur and I would not expect that this would change much for
1k pieces.

 Camabola2 is kind of big for our
 needs, we like the RT5350 modules since they are putting chips on both
 sides of the board. That allows them to be much smaller.

I am not really sure on which Toplink board you meandm but from what I
see here: 
http://toplink-tech.en.alibaba.com/product/831612427-218431933/IP_TV_150Mbps_embedded_wifi_router_module.html
 dimensions are 42x30mm, and here : http://8devices.com/carambola-2
specs say that Carambola 2 module is 28x38 mm

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


Re: [OpenWrt-Devel] OpenOCD and RT3050/5350

2013-07-04 Thread Drasko DRASKOVIC
Hi Jon,

On Fri, Jul 5, 2013 at 12:35 AM, jonsm...@gmail.com jonsm...@gmail.com wrote:
 On Tue, Apr 16, 2013 at 6:32 PM, Drasko DRASKOVIC
 drasko.drasko...@gmail.com wrote:
 Hi Jon,
 both RT3050 and RT5350 have MIPS 24Kc core. I have successfully used
 OpenOCD with similar (not exactly these) chips, having the same MIPS
 core.

 You should use MIPS 4K as a target.

 I've bricked one of my AsiaRF modules and I'm trying to recover it.

 For some reason reads over my JTAG are painfully slow. Writes as quick.

 Takes 20 seconds
 mdw 0x8198 200

 Instant...
 mww 0x8198 200 0

 Because reads are terribly broken it take 15 minutes to load uboot
 into RAM since OpenOCD verifies the write.

 Any idea why reads are so slow?

Checkout FASTWRITE property of EJTAG, i.e. look in
mips_m4k_read_memory() and see if mips32_pracc_read_mem() gets called
and debug around that.

Timestamp in wait_for_pracc_rw() to see if you are waiting too long
for READY bit of EJTAG to gets set...

You cantake a look at the doc
http://repo.or.cz/w/openocd.git/blob/00d6925b41690df17f81ab3da2f37829d7095e19:/doc/manual/target/mips.txt
to understand a bit how it works...


 #jtag_speed
 adapter_khz 2000

Try playing with adapter_khz. From my point of view this can be fast
for a start, especially if JTAG is unstable.

Try lowering it to 200 for example, suprisingly you might get better
results... Then try to augment it to see how fast you can go.



 At the time I used it extensively I tried to demystify a code that was
 there and the code I contributed, so I crafted a doc that you can
 refer to if you are stuck : http://openocd.zylin.com/#/c/904/ (I am
 sending you a link to the patchset, although it should be merged in
 the main tree. However, I do not see it there :
 http://openocd.git.sourceforge.net/git/gitweb.cgi?p=openocd/openocd;a=tree;f=doc/manual;h=8a9121ca13b9286d258a420f4e301b84bad287b7;hb=08ddb19fd3a708d21057c88e8b86215e04c781ec)

 Anyway, I can confirm that I was capable to load and JTAG debug both
 low-level code and Linux, having FASTWRITE and I even added
 coprocessor manipulations from command line (I added this for correct
 cache handling, so now both soft and hard breaks should work fine).

 I am very interested to see how this Chinese TOPLINK story develops.
 Please keep us informed.

 I have the Toplink boards, but I am not so convinced that Toplink
 wants to be in the module business.

 I also have the AsiaRF AWM002. AsiaRF is much more interested is
 getting OpenWRT going on their stuff.
 http://www.asiarf.com/Smallest-Tiny-Ralink-802-11n-Wireless-AP-Router-Module-Board-AWM002-product-view-375.html

 With 32MB/8MB the modules are around $8.50 Q1000.

This is very nice price, but I guess that is 8MB, and it will be more for 32MB.

 AsiaRF will sell Q1
 for $15 and a dev carrier board for $30. Dev board exposes JTAG, both
 UARTS, two Ethernet and USB.

Fot this price I would actually rather look at Carambola 2, which can
be bought in 1 unity for 15 eur, around 30 eur for a devboard. Plus
you get Atheros and working SDK.

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


Re: [OpenWrt-Devel] Using JTAG on a new Ralink board

2013-04-16 Thread Drasko DRASKOVIC
Hi Jon,
I guess that you can push Ralink for this, but I have bot seen these
sources on the web.

The closest I got is 8Devices' Carambola u-boot, as they have probably
demanded sources from Ralink : https://github.com/8devices/u-boot

I can see in the code rt2880_config, but Carambola has RT3050 and uses
this U-Boot, so there is a goot chacnce that it can work on RT5350
also.

BR,
Drasko


On Tue, Apr 16, 2013 at 5:41 PM, jonsm...@gmail.com jonsm...@gmail.com wrote:



 On Fri, Apr 12, 2013 at 7:09 PM, Drasko DRASKOVIC
 drasko.drasko...@gmail.com wrote:

 Hi Jon,

 On Fri, Apr 12, 2013 at 8:42 PM, jonsm...@gmail.com jonsm...@gmail.com
 wrote:
 
  On Tue, Apr 9, 2013 at 6:42 PM, jonsm...@gmail.com jonsm...@gmail.com
  wrote:
 
 
  I put two and two together and figured out that those are the names
  from the Ralink reference design, not the datasheet. So based on that
  observation
 
 
  Toplink has confirmed this to be the correct pin out. I've ordered 20
  boards
  as samples.  8MB flash/ 32MB RAM / chip antenna.  I'll let everyone know
  how
  they perform when they get here.

 Thanks a lot for your effort !

 I am in the process of ordering these boards, so we will work on this
 one also. They are coming with Ralink SDK, and I am interested to see
 how this can be integrated into OpenWRT.

 Also, U-Boot is not delivered, so I guess it would be interesting to
 see if 8th devices U-Boot will work with these boards.


 I have confirmed that these boards will ship with empty flash unless you buy
 a Ralink license.  There is a single Ralink license for everything, they
 don't break it out.

 Uboot is GPL and Ralink is using uboot. So there should be GPL source to
 their uboot somewhere. Has anyone tried getting the uboot source out of
 Ralink/Mediatek? It might be sitting on a server somewhere. So first problem
 is getting some kind of uboot into the flash.

 I also think you need to order these with the L7/U5 population option, that
 will make the 1.8V for the Ethernet transformer CT.



 In any case, most interesting low-cost board I could find, and it
 would be really beneficial to have OpenWRT support for these.

 Best regards,
 Drasko
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/mailman/listinfo/openwrt-devel




 --
 Jon Smirl
 jonsm...@gmail.com

 ___
 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] OpenOCD and RT3050/5350

2013-04-16 Thread Drasko DRASKOVIC
Hi Jon,
both RT3050 and RT5350 have MIPS 24Kc core. I have successfully used
OpenOCD with similar (not exactly these) chips, having the same MIPS
core.

You should use MIPS 4K as a target.

At the time I used it extensively I tried to demystify a code that was
there and the code I contributed, so I crafted a doc that you can
refer to if you are stuck : http://openocd.zylin.com/#/c/904/ (I am
sending you a link to the patchset, although it should be merged in
the main tree. However, I do not see it there :
http://openocd.git.sourceforge.net/git/gitweb.cgi?p=openocd/openocd;a=tree;f=doc/manual;h=8a9121ca13b9286d258a420f4e301b84bad287b7;hb=08ddb19fd3a708d21057c88e8b86215e04c781ec)

Anyway, I can confirm that I was capable to load and JTAG debug both
low-level code and Linux, having FASTWRITE and I even added
coprocessor manipulations from command line (I added this for correct
cache handling, so now both soft and hard breaks should work fine).

I am very interested to see how this Chinese TOPLINK story develops.
Please keep us informed.

BR,
Drasko


On Tue, Apr 16, 2013 at 11:05 PM, jonsm...@gmail.com jonsm...@gmail.com wrote:
 Does OpenOCD work right on the MIPS core in the RT3050/5350?
 Does anyone have a script for initializing DRAM so that I can load in a
 uboot binary?

 I should be able to:
 1) use JTAG to init DRAM
 2) copy in the uboot
 3) run it
 4) use it to write itself to flash

 I'm waiting for my hardware to come from China.

 --
 Jon Smirl
 jonsm...@gmail.com

 ___
 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] AP mode UI

2013-04-12 Thread Drasko DRASKOVIC
Hi Jon,

On Fri, Apr 12, 2013 at 8:39 PM, jonsm...@gmail.com jonsm...@gmail.com wrote:
 Is there any such thing as an AP mode UI for OpenWRT?  Sometimes is is
 useful to turn routers into APs.

 I'm able to do this by turning off all of the router stuff (like DHCP) but
 there doesn't seem to be any 'one button' way to switch modes and hide all
 of the irrelevant stuff in AP mode.

 AP mode needs to keep stuff like wifi setup.

My approach to this problem i to have two configurations, one for AP
and one for STA - so duplication of all necessary config files (there
are 3 of them actually). I found it easier than to use some script and
sed for example to change configuration.

Then it is just 'one button' solution - all what to script has to do
is  to down the wifi, copy adequate files and up the wifi.

Take a look at the example here :
https://github.com/drasko/weio/tree/master/files/etc/config

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


Re: [OpenWrt-Devel] Using JTAG on a new Ralink board

2013-04-12 Thread Drasko DRASKOVIC
Hi Jon,

On Fri, Apr 12, 2013 at 8:42 PM, jonsm...@gmail.com jonsm...@gmail.com wrote:

 On Tue, Apr 9, 2013 at 6:42 PM, jonsm...@gmail.com jonsm...@gmail.com
 wrote:


 I put two and two together and figured out that those are the names
 from the Ralink reference design, not the datasheet. So based on that
 observation


 Toplink has confirmed this to be the correct pin out. I've ordered 20 boards
 as samples.  8MB flash/ 32MB RAM / chip antenna.  I'll let everyone know how
 they perform when they get here.

Thanks a lot for your effort !

I am in the process of ordering these boards, so we will work on this
one also. They are coming with Ralink SDK, and I am interested to see
how this can be integrated into OpenWRT.

Also, U-Boot is not delivered, so I guess it would be interesting to
see if 8th devices U-Boot will work with these boards.

In any case, most interesting low-cost board I could find, and it
would be really beneficial to have OpenWRT support for these.

Best regards,
Drasko
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Using JTAG on a new Ralink board

2013-04-08 Thread Drasko DRASKOVIC
Hi John,
You will have to know RAM controller config to prepare RAM before
writing into it. This usually goes to OpenOCD script and is executed
via MIPS EJTAG. But is often just a question of writing several
registers (sometimes in the right order)

You can look in U-Boot code from Carambola (8th devices), and see if
you can find something useful there.

Does not Toplink provide U-Boot and Linux? If yes, then U-Boot will
set-up RAM, and from there on you can put stuff there.

BR,
Drasko


On Tue, Apr 9, 2013 at 12:10 AM, Daniel Golle dgo...@allnet.de wrote:
 Hi!

 On 04/09/2013 12:38 AM, jonsm...@gmail.com wrote:
 Does the MIPS u-boot in the OpenWRT tree run on the RT5350? If so,

 U-Boot for Ralink chips is not (yet) part of OpenWrt, however, you can compile
 it from the sources on
 https://github.com/8devices/u-boot

 Flashing the boards via JTAG will require you to initialize some registers of
 the SoC (at least SDRAM configuration, so you can load U-Boot into the ram and
 flash using U-Boot).
 OpenOCD contains code for some Atheros SoCs, that should be useful to get an
 impression of what needs to be done to support other type of MIPS SoCs.


 Good luck!


 Daniel

 ___
 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] Using JTAG on a new Ralink board

2013-04-08 Thread Drasko DRASKOVIC
Yes,
I have seen these boards and contacted suppliers. they seem really responsive.

I am missing some more flash though. 8MB is just enough, but it seems
like RT5350 chipset does not support more.

John,
do you know what would be the best way to augment flash on these? Some
cheap NAND? SD Card? What would be the best solution?

BR,
Drasko

On Tue, Apr 9, 2013 at 12:21 AM, jonsm...@gmail.com jonsm...@gmail.com wrote:
 It will be a while for the boards to arrive from China. But they look
 really good. 8MB flash, 32MB RAM for less than the $7.50 quotes on
 Aliaba.  Chip antenna or IPEX. JTAG on connector

 The one with pins supports one Ethernet. The pseudo-miniPCIe one
 supports two Ethernet.

 On Mon, Apr 8, 2013 at 6:12 PM, Wojciech Kromer
 wojciech.kro...@dgt.com.pl wrote:

   If so,
 then I can load it into RAM via JTAG, jump to it and get flash
 commands? That will let me initialize an empty flash.

 This scenario works fine with rt3352, just try...

 Doesn't look like MIPS has the small SRAM region like ARM does. Is
 there a write up around somewhere on how to get going with a JTAG on
 these chips?

 I'm not very familiar with rt5350, but
 DDRAM setup should be done with bootstrap pins like on rt3352,
 so you can just try to use whole DDRAM.

 Best regards.

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



 --
 Jon Smirl
 jonsm...@gmail.com
 ___
 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] Using JTAG on a new Ralink board

2013-04-08 Thread Drasko DRASKOVIC
Great, thanks a lot John.

I has just a little trouble with their miniPCI card, as it has only
one hole in the middle, and will not fit into the standard miniPCI
connector, which demand two holes on the top.

How do you plan to fix this card?

BR,
Drasko

On Tue, Apr 9, 2013 at 12:59 AM, jonsm...@gmail.com jonsm...@gmail.com wrote:
 On Mon, Apr 8, 2013 at 6:28 PM, jonsm...@gmail.com jonsm...@gmail.com wrote:
 On Mon, Apr 8, 2013 at 6:24 PM, Drasko DRASKOVIC
 drasko.drasko...@gmail.com wrote:
 Yes,
 I have seen these boards and contacted suppliers. they seem really 
 responsive.

 I am missing some more flash though. 8MB is just enough, but it seems
 like RT5350 chipset does not support more.

 John,
 do you know what would be the best way to augment flash on these? Some
 cheap NAND? SD Card? What would be the best solution?

 We believe The miniPCI version has enough on the connector to attach a
 SD Card using SPI.

 miniPCI version brings out all of the SPI lines and the unused CS1.
 That should work to interface to a SD Card. Linux kernel has support
 for SD cards attached over SPI.




 BR,
 Drasko

 On Tue, Apr 9, 2013 at 12:21 AM, jonsm...@gmail.com jonsm...@gmail.com 
 wrote:
 It will be a while for the boards to arrive from China. But they look
 really good. 8MB flash, 32MB RAM for less than the $7.50 quotes on
 Aliaba.  Chip antenna or IPEX. JTAG on connector

 The one with pins supports one Ethernet. The pseudo-miniPCIe one
 supports two Ethernet.

 On Mon, Apr 8, 2013 at 6:12 PM, Wojciech Kromer
 wojciech.kro...@dgt.com.pl wrote:

   If so,
 then I can load it into RAM via JTAG, jump to it and get flash
 commands? That will let me initialize an empty flash.

 This scenario works fine with rt3352, just try...

 Doesn't look like MIPS has the small SRAM region like ARM does. Is
 there a write up around somewhere on how to get going with a JTAG on
 these chips?

 I'm not very familiar with rt5350, but
 DDRAM setup should be done with bootstrap pins like on rt3352,
 so you can just try to use whole DDRAM.

 Best regards.

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



 --
 Jon Smirl
 jonsm...@gmail.com
 ___
 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



 --
 Jon Smirl
 jonsm...@gmail.com



 --
 Jon Smirl
 jonsm...@gmail.com
 ___
 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] Cross Libtool

2012-11-14 Thread Drasko DRASKOVIC
Hi Florian,

On Wed, Nov 14, 2012 at 10:22 AM, Florian Fainelli flor...@openwrt.org wrote:
 Hello Drasko,

 On Wednesday 14 November 2012 00:38:08 Drasko DRASKOVIC wrote:
 Hi all,
 Trying to cross compile libdespotify, I have run into problem with libtool :

 libtool  --tag=CC --verbose --mode=link
 mipsel-openwrt-linux-uclibc-gcc -o libdespotify.la -rpath /usr/lib
 -rpath-link 
 /home/drasko/carambola/carambola/staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib
 -L/home/drasko/carambola/carambola/staging_dir/target-mipsel_r2_uClibc-0.9.33.2/lib
 -L/home/drasko/carambola/carambola/staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib
 -lz -lvorbisfile -lcrypto -lresolv -lpthread aes.lo auth.lo buf.lo
 cache.lo channel.lo commands.lo dns.lo ezxml.lo handlers.lo
 keyexchange.lo packet.lo puzzle.lo session.lo shn.lo sndqueue.lo
 util.lo network.lo despotify.lo sha1.lo hmac.lo xml.lo
 OpenWrt-libtool: link: gcc -shared  -fPIC -DPIC  .libs/aes.o
 .libs/auth.o .libs/buf.o .libs/cache.o .libs/channel.o
 .libs/commands.o .libs/dns.o .libs/ezxml.o .libs/handlers.o
 .libs/keyexchange.o .libs/packet.o .libs/puzzle.o .libs/session.o
 .libs/shn.o .libs/sndqueue.o .libs/util.o .libs/network.o
 .libs/despotify.o .libs/sha1.o .libs/hmac.o .libs/xml.o
 -L/home/drasko/carambola/carambola/staging_dir/target-mipsel_r2_uClibc-0.9.33.2/lib
 -L/home/drasko/carambola/carambola/staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib
 -lz -lvorbisfile -lcrypto -lresolv -lpthread-Wl,-soname
 -Wl,libdespotify.so.0 -o .libs/libdespotify.so.0.0.0
 /usr/bin/ld.bfd.real: .libs/aes.o: Relocations in generic ELF (EM: 8)
 /usr/bin/ld.bfd.real: .libs/aes.o: Relocations in generic ELF (EM: 8)
 /usr/bin/ld.bfd.real: .libs/aes.o: Relocations in generic ELF (EM: 8)
 /usr/bin/ld.bfd.real: .libs/aes.o: Relocations in generic ELF (EM: 8)
 /usr/bin/ld.bfd.real: .libs/aes.o: Relocations in generic ELF (EM: 8)
 /usr/bin/ld.bfd.real: .libs/aes.o: Relocations in generic ELF (EM: 8)
 .libs/aes.o: could not read symbols: File in wrong format
 collect2: ld returned 1 exit status
 make[3]: *** [libdespotify.la] Error 1


 Instead of cross-compiler, libtool calls native gcc in the link mode
 (in the compile mode everything OK, though).

 I see several issues with this log excerpt:
 - the first libtool link command uses /usr/lib as a host path (second line)
   this needs fixing

I have passes -rpath as /usr/lib, as this should be the place where
this library will reside in the system. However, -rpath-link points to
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib, where other
libraries needed for linking should be found.

If this is not the correct procedure, where -rpath should point to?
And -rpath-link?

 - the second libtool command does not use the cross-linker, and for that I
   have no idea yet

It does not, and it is related to the bug (or wrong params) in the
libtool described here :
http://www.metastatic.org/text/libtool.html

--tag=CC can be passed to libtool, and then it uses
mipsel-openwrt-linux-uclibc-gcc for compilatin, which is correct.
However, in the link stage with same --tag=CC passed, it switches to
the native gcc which is wrong and provokes errors.

Solution here is either to correct libtool or use cross libtool, I
think, but I am not quite sure. It sounds strange to me that I am the
first person in the world who cross compiles libraries with libtool on
OpenWRT...



 This problem is described here :
 http://www.metastatic.org/text/libtool.html


 I have two questions at this point :
 1) I sew that OpenWRT buildsystem uses staging_dir/host/bin/libtool.
 If this (host) libtool is normally used for building packages and not
 cross compiled libtool, did I do something wrong in my Makefile?

 The compiled libtool resides in host because it is actually compiled for the
 host system, there is no other libtool executable in the build system besides
 those copies provided by other packages we build.

So, if I undersand correctly, each package provides it's own libtool ?
Maybe some of these libtools are cross-compiled during package
cross-compilation.

However, it would be not a good practice to use libtool of some other package...

Is it the mandatory for every package that should use libtool to
provide it's own libtool ?

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


Re: [OpenWrt-Devel] Cross Libtool

2012-11-14 Thread Drasko DRASKOVIC
Hi Jow,

On Wed, Nov 14, 2012 at 11:34 AM, Jo-Philipp Wich x...@subsignal.org wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi,

 in most cases it is enough to specify

   PKG_FIXUP:=autoreconf

 in the OpenWrt Makefile. This will regenerate configure scripts,
 Makefiles and embedded libtool copies with patched variants.

I did not provide embedded libtool. I thought that one present in the
OpenWRT can be used, passing --tag=CC as a parameter.

It turns out that it is buggy on the link stage (as I described).

Does this means that every package __HAS__ to provide embedded libtool ?

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


Re: [OpenWrt-Devel] Cross Libtool

2012-11-14 Thread Drasko DRASKOVIC
On Wed, Nov 14, 2012 at 11:36 AM, Florian Fainelli flor...@openwrt.org wrote:
 On Wednesday 14 November 2012 11:24:10 Drasko DRASKOVIC wrote:
  - the second libtool command does not use the cross-linker, and for that I
have no idea yet

 It does not, and it is related to the bug (or wrong params) in the
 libtool described here :
 http://www.metastatic.org/text/libtool.html

 --tag=CC can be passed to libtool, and then it uses
 mipsel-openwrt-linux-uclibc-gcc for compilatin, which is correct.
 However, in the link stage with same --tag=CC passed, it switches to
 the native gcc which is wrong and provokes errors.

 Should not you use --tag=LD then? I agree that it should work anyway.

No, this tag is not recognized by libtool (my idea exactly,
unfortunately it ignores it as an unknown tag).


 Solution here is either to correct libtool or use cross libtool, I
 think, but I am not quite sure. It sounds strange to me that I am the
 first person in the world who cross compiles libraries with libtool on
 OpenWRT...

 There is no such thing as a cross-libtool, as it does not make sense, a cross
 libtool would mean a libtool that gets compiled for your target platform, but
 executed on the build platform? That does not fly.

Well, cross-libtool sort-of, this is what I wanted to say. libtool is
just a shell script (10k lines long horror), but it can be configured
for the target like this :
 ./configure --prefix=/opt/Toolchain --host=target --program-prefix=target-

Please refer to the link http://www.metastatic.org/text/libtool.html,
section The wrong-gcc problem.

I do not know what this configure does, but I guess it changes some
internal variables inside libtool, so it changes the way it constructs
it's compilation command.

Libtool provided by OpenWRT is the one for the host.
Libtools provided by packages are in my opinion configured and
make-d during the package cross-compilation, thus they work well
with the target code.

What OpenWRT is missing is cross-compiled libtool that should be
somewhere in the toolchain (binutils?) directory, that I can use,
instead of cross-making libtool for every package.

even worse, libtool has to be pached in order to change it's internal
libdir variable (link http://www.metastatic.org/text/libtool.html,
first section). This is done in OpenWRT by libtool patch for the host
libtool, but is this done for every libtool provided with the package?
I seriously doubt. Maybe this patching could be configured with
PKG_FIXUP:=autoreconf, as suggested before, but this is another
problem.

Primary problem for now is cross-compiler call, and does every package
has to provide it's own libtool.

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


Re: [OpenWrt-Devel] Cross Libtool

2012-11-14 Thread Drasko DRASKOVIC
On Wed, Nov 14, 2012 at 12:08 PM, Jo-Philipp Wich x...@subsignal.org wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 It works for any other package so it is unlikely to be buggy on
 the link stage. It is most likely improperly called by the
 Makefile.

 And indeed, line 11 of despotify's Makefile says:

   LD = $(CC)

 That is the most likely culprit.

I commented out this line. Still the same problem : during the compile
phase libtool calls cross-compiler. During link phase it calls native
host gcc.

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


Re: [OpenWrt-Devel] Cross Libtool

2012-11-14 Thread Drasko DRASKOVIC
On Wed, Nov 14, 2012 at 11:36 AM, Florian Fainelli flor...@openwrt.org wrote:

 No, but packages that do provide a libtool should be built by OpenWrt with
 PKG_LIBTOOL_PATHS and PKG_FIXUP accordingly.

libdespotify I am trying to compile does not provide it's libtoo. I am
using OpenWRTs tool, which calls cross compiler in compile mode, but
in the link mode it fails back to native gcc, which is wrong.

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