[OpenWrt-Devel] [PATCH] gpsd: initial add to packages

2015-10-16 Thread Pushpal Sidhu
This package is currently in oldpackages. Add here to keep support for gpsd.

>From oldpackages, this was bumped from 3.10 -> 3.15 and includes an upstream
patch to allow building with musl.

Signed-off-by: Pushpal Sidhu 
---
 package/utils/gpsd/Makefile| 144 +
 package/utils/gpsd/files/gpsd.config   |   5 +
 package/utils/gpsd/files/gpsd.hotplug  |  16 +++
 package/utils/gpsd/files/gpsd.init |  32 +
 .../utils/gpsd/patches/0001-Remove-a-BSD-ism.patch |  42 ++
 5 files changed, 239 insertions(+)
 create mode 100644 package/utils/gpsd/Makefile
 create mode 100644 package/utils/gpsd/files/gpsd.config
 create mode 100644 package/utils/gpsd/files/gpsd.hotplug
 create mode 100644 package/utils/gpsd/files/gpsd.init
 create mode 100644 package/utils/gpsd/patches/0001-Remove-a-BSD-ism.patch

diff --git a/package/utils/gpsd/Makefile b/package/utils/gpsd/Makefile
new file mode 100644
index 000..df67cf8
--- /dev/null
+++ b/package/utils/gpsd/Makefile
@@ -0,0 +1,144 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gpsd
+PKG_VERSION:=3.15
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://download-mirror.savannah.gnu.org/releases/gpsd/
+PKG_MD5SUM:=afd79b87337fadf38ee2a7c4314dac79
+
+PKG_MAINTAINER:=Pushpal Sidhu 
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=COPYING
+
+PKG_BUILD_DEPENDS:=libncurses libusb-1.0
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/scons.mk
+
+define Package/gpsd/Default
+  DEPENDS:=+librt +libncurses
+  URL:=http://catb.org/gpsd/
+endef
+
+define Package/gpsd/Default/description
+  gpsd is a userland daemon acting as a translator between GPS and AIS 
receivers
+  and their clients. gpsd listens on port 2947 for clients requesting
+  position/time/velocity information.  The receivers are expected to generate
+  position information in a well-known format -- as NMEA-0183 sentences, SiRF
+  binary, Rockwell binary, Garmin binary format, or other vendor binary
+  protocols.  gpsd takes this information from the GPS and translates it into
+  something uniform and easier to understand for clients.
+endef
+
+define Package/gpsd
+  $(call Package/gpsd/Default)
+  SECTION:=net
+  CATEGORY:=Network
+  DEPENDS+= +libgps +libusb-1.0
+  TITLE:=An interface daemon for GPS receivers
+endef
+
+define Package/gpsd/conffiles
+/etc/config/gpsd
+endef
+
+define Package/gpsd/description
+  $(call Package/gpsd/Default/description)
+  This package contains the GPS daemon.
+endef
+
+define Package/gpsd-clients
+  $(call Package/gpsd/Default)
+  SECTION:=net
+  CATEGORY:=Network
+  DEPENDS+= +libgps +libncurses +libusb-1.0
+  TITLE:=GPS tools and clients
+endef
+
+define Package/gpsd-clients/description
+  $(call Package/gpsd/Default/description)
+  This package contains auxiliary tools and example clients for monitoring and
+  testing the GPS daemon.
+endef
+
+define Package/libgps
+  $(call Package/gpsd/Default)
+  SECTION:=libs
+  CATEGORY:=Libraries
+  DEPENDS+= +libcap
+  TITLE:=C service library for communicating with the GPS daemon
+endef
+
+define Package/libgps/description
+  $(call Package/gpsd/Default/description)
+  This package contains the libgps library.
+endef
+
+SCONS_OPTIONS += \
+   dbus_export=no \
+   tsip=no \
+   fv18=no \
+   tripmate=no \
+   earthmate=no \
+   itrax=no \
+   navcom=no \
+   ubx=no \
+   evermore=no \
+   ntrip=no \
+   libgpsmm=no \
+   libQgpsmm=no \
+   bluez=no \
+   strip=no \
+   python=no \
+   implicit_link=no \
+   chrpath=no
+
+define Build/InstallDev
+   $(INSTALL_DIR) $(1)/usr/include
+   $(CP) $(PKG_INSTALL_DIR)/usr/include/gps.h $(1)/usr/include/
+   $(INSTALL_DIR) $(1)/usr/lib
+   $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps*.so* $(1)/usr/lib/
+   $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+   $(CP) \
+   $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgps*.pc \
+   $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/gpsd/install
+   $(INSTALL_DIR) $(1)/etc/config
+   $(INSTALL_CONF) ./files/gpsd.config $(1)/etc/config/gpsd
+   $(INSTALL_DIR) $(1)/etc/init.d
+   $(INSTALL_BIN) ./files/gpsd.init $(1)/etc/init.d/gpsd
+   $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
+   $(INSTALL_DATA) ./files/gpsd.hotplug $(1)/etc/hotplug.d/usb/20-gpsd
+   $(INSTALL_DIR) $(1)/usr/sbin
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(1)/usr/sbin/
+endef
+
+define Package/gpsd-clients/install
+   $(INSTALL_DIR) $(1)/usr/bin
+   $(INSTALL_BIN) \
+   $(PKG_INSTALL_DIR)/usr/bin/cgps \
+   $(PKG_INSTALL_DIR)/usr/bin/gps{ctl,decode,mon,pipe} \
+   

Re: [OpenWrt-Devel] [PATCH][ar71xx] add support for tp-link wr841n v10 image generation

2015-10-16 Thread Bastian Bittorf
* Bastian Bittorf  [11.10.2015 21:31]:
> * John Crispin  [11.10.2015 20:40]:
> > also please prefix your patches with ar71xx: and not [ar71xx]
> 
> can please somebody change the text in
> https://dev.openwrt.org/wiki/SubmittingPatches
> @ "13. The canonical patch format"
> 
> -> Subject: [PATCH 001/123] [section] summary phrase
> 
> i made this mistake several times by looking at this
> link and it seems a lot of other people too.

Still not fixed. Seems this can only be changed with an
admin-account. So Felix, John?

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


Re: [OpenWrt-Devel] [PATCH] base-files: sysupgrade: respect new profile.d infrastructure

2015-10-16 Thread Bastian Bittorf
* Bastian Bittorf  [11.10.2015 21:48]:
> i got a patchwork mail[1] with the short message
> "patch is superseeded" - but no further comments,
> so the question is:
> 
> 1) who closed the patch?
> 2) why is it 'superseeded', but not fixed?
> 
> [1] http://patchwork.ozlabs.org/patch/528164/

any new about this?

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


Re: [OpenWrt-Devel] [PATCH] busybox: enable find mtime support by default

2015-10-16 Thread Etienne Champetier
Hi Dirk,


2015-10-16 12:10 GMT+02:00 Dirk Brenken :

> busybox binary in openwrt neither supports stat nor find mtime. This patch
> adds find mtime support by default.
>

what's the size before/after (ipk size)


> Signed-off-by: Dirk Brenken 
> ---
> --- trunk/package/utils/busybox/Config-defaults.in.orig 2015-09-11
> 23:24:58.0 +0200
> +++ trunk/package/utils/busybox/Config-defaults.in 2015-10-16
> 11:48:58.0 +0200
> 
>
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] busybox: enable find mtime support by default

2015-10-16 Thread Dirk Brenken
busybox binary in openwrt neither supports stat nor find mtime. This
patch adds find mtime support by default.

Signed-off-by: Dirk Brenken 
---
--- trunk/package/utils/busybox/Config-defaults.in.orig 2015-09-
11 23:24:58.0 +0200
+++ trunk/package/utils/busybox/Config-defaults.in  2015-10-16
11:48:58.0 +0200
@@ -987,7 +987,7 @@ config BUSYBOX_DEFAULT_FEATURE_FIND_PRIN
    default y
 config BUSYBOX_DEFAULT_FEATURE_FIND_MTIME
    bool
-   default n
+   default y
 config BUSYBOX_DEFAULT_FEATURE_FIND_MMIN
    bool
    default n___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] busybox: enable find mtime support by default

2015-10-16 Thread Bastian Bittorf
* Dirk Brenken  [16.10.2015 12:58]:
> busybox binary in openwrt neither supports stat nor find mtime. This
> patch adds find mtime support by default.

please show at least 2 platforms, how much bloat it adds (stripped/unstripped)

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


Re: [OpenWrt-Devel] [PATCH] busybox: enable find mtime support by default

2015-10-16 Thread Dirk Brenken
Hi Etienne,
I've compared ipk size for three different targets (ar71xx, brcm2708,
x86):
dirk@x250:~/busysbox$ ls -la
-rw-r--r-- 1 dirk dirk 209908 Okt 16 13:48 busybox_1.23.2-3_ar71xx.ipk-
0before
-rw-r--r-- 1 dirk dirk 210031 Okt 16 16:47 busybox_1.23.2-3_ar71xx.ipk-
1after
difference: +123 Byte
-rw-r--r-- 1 dirk dirk 223519 Okt 16 13:06 busybox_1.23.2-
3_brcm2708.ipk-0before
-rw-r--r-- 1 dirk dirk 223720 Okt 16 13:53 busybox_1.23.2-
3_brcm2708.ipk-1after
difference: +201 Byte
-rw-r--r-- 1 dirk dirk 221477 Okt 16 13:47 busybox_1.23.2-3_x86_64.ipk-
0before
-rw-r--r-- 1 dirk dirk 221622 Okt 16 13:52 busybox_1.23.2-3_x86_64.ipk-
1after
difference: +145 Byte
br
dirk
Am Freitag, den 16.10.2015, 12:53 +0200 schrieb Etienne Champetier:
> Hi Dirk,
> 
> 
> 2015-10-16 12:10 GMT+02:00 Dirk Brenken :
> > busybox binary in openwrt neither supports stat nor find mtime.
> > This patch adds find mtime support by default.
> > 
> what's the size before/after (ipk size)
> 
> > 
> > Signed-off-by: Dirk Brenken 
> > ---
> > --- trunk/package/utils/busybox/Config-defaults.in.orig> >  > > 2015
> > -09-11 23:24:58.0 +0200
> > +++ trunk/package/utils/busybox/Config-defaults.in> >   > > 2015-10-
> > 16 11:48:58.0 +0200
> > 
> > ___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/3] tools/firmware-utils: tplink-safeloader: clean up code

2015-10-16 Thread Matthias Schiffer
There is no reason for the internal functions not to be static.

Signed-off-by: Matthias Schiffer 
---
 tools/firmware-utils/src/tplink-safeloader.c | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/tools/firmware-utils/src/tplink-safeloader.c 
b/tools/firmware-utils/src/tplink-safeloader.c
index 9c5bb54..4607a1d 100644
--- a/tools/firmware-utils/src/tplink-safeloader.c
+++ b/tools/firmware-utils/src/tplink-safeloader.c
@@ -152,7 +152,7 @@ static const unsigned char cpe510_support_list[] =
 
 
 /** Allocates a new image partition */
-struct image_partition_entry alloc_image_partition(const char *name, size_t 
len) {
+static struct image_partition_entry alloc_image_partition(const char *name, 
size_t len) {
struct image_partition_entry entry = {name, len, malloc(len)};
if (!entry.data)
error(1, errno, "malloc");
@@ -161,12 +161,12 @@ struct image_partition_entry alloc_image_partition(const 
char *name, size_t len)
 }
 
 /** Frees an image partition */
-void free_image_partition(struct image_partition_entry entry) {
+static void free_image_partition(struct image_partition_entry entry) {
free(entry.data);
 }
 
 /** Generates the partition-table partition */
-struct image_partition_entry make_partition_table(const struct 
flash_partition_entry *p) {
+static struct image_partition_entry make_partition_table(const struct 
flash_partition_entry *p) {
struct image_partition_entry entry = 
alloc_image_partition("partition-table", 0x800);
 
char *s = (char *)entry.data, *end = (char *)(s+entry.size);
@@ -202,7 +202,7 @@ static inline uint8_t bcd(uint8_t v) {
 
 
 /** Generates the soft-version partition */
-struct image_partition_entry make_soft_version(uint32_t rev) {
+static struct image_partition_entry make_soft_version(uint32_t rev) {
struct image_partition_entry entry = 
alloc_image_partition("soft-version", sizeof(struct soft_version));
struct soft_version *s = (struct soft_version *)entry.data;
 
@@ -233,14 +233,14 @@ struct image_partition_entry make_soft_version(uint32_t 
rev) {
 }
 
 /** Generates the support-list partition */
-struct image_partition_entry make_support_list(const unsigned char 
*support_list, size_t len) {
+static struct image_partition_entry make_support_list(const unsigned char 
*support_list, size_t len) {
struct image_partition_entry entry = 
alloc_image_partition("support-list", len);
memcpy(entry.data, support_list, len);
return entry;
 }
 
 /** Creates a new image partition with an arbitrary name from a file */
-struct image_partition_entry read_file(const char *part_name, const char 
*filename, bool add_jffs2_eof) {
+static struct image_partition_entry read_file(const char *part_name, const 
char *filename, bool add_jffs2_eof) {
struct stat statbuf;
 
if (stat(filename, ) < 0)
@@ -300,7 +300,7 @@ struct image_partition_entry read_file(const char 
*part_name, const char *filena
 
I think partition-table must be the first partition in the firmware image.
 */
-void put_partitions(uint8_t *buffer, const struct image_partition_entry 
*parts) {
+static void put_partitions(uint8_t *buffer, const struct image_partition_entry 
*parts) {
size_t i;
char *image_pt = (char *)buffer, *end = image_pt + 0x800;
 
@@ -325,7 +325,7 @@ void put_partitions(uint8_t *buffer, const struct 
image_partition_entry *parts)
 }
 
 /** Generates and writes the image MD5 checksum */
-void put_md5(uint8_t *md5, uint8_t *buffer, unsigned int len) {
+static void put_md5(uint8_t *md5, uint8_t *buffer, unsigned int len) {
MD5_CTX ctx;
 
MD5_Init();
@@ -349,7 +349,7 @@ void put_md5(uint8_t *md5, uint8_t *buffer, unsigned int 
len) {
  1014-1813Image partition table (2048 bytes, padded with 0xff)
  1814-Firmware partitions
 */
-void * generate_factory_image(const unsigned char *vendor, size_t vendor_len, 
const struct image_partition_entry *parts, size_t *len) {
+static void * generate_factory_image(const unsigned char *vendor, size_t 
vendor_len, const struct image_partition_entry *parts, size_t *len) {
*len = 0x1814;
 
size_t i;
@@ -381,7 +381,7 @@ void * generate_factory_image(const unsigned char *vendor, 
size_t vendor_len, co
should be generalized when TP-LINK starts building its safeloader into 
hardware with
different flash layouts.
 */
-void * generate_sysupgrade_image(const struct flash_partition_entry 
*flash_parts, const struct image_partition_entry *image_parts, size_t *len) {
+static void * generate_sysupgrade_image(const struct flash_partition_entry 
*flash_parts, const struct image_partition_entry *image_parts, size_t *len) {
const struct flash_partition_entry *flash_os_image = _parts[5];
const struct flash_partition_entry *flash_soft_version = 
_parts[6];
const struct flash_partition_entry *flash_support_list = 

[OpenWrt-Devel] [PATCH 2/3] tools/firmware-utils: tplink-safeloader: fix support-list format, clean up vendor information

2015-10-16 Thread Matthias Schiffer
The first 4 bytes of the support list and the vendor information are
supposed to contain the length of these fields.

Signed-off-by: Matthias Schiffer 
---
 tools/firmware-utils/src/tplink-safeloader.c | 47 ++--
 1 file changed, 30 insertions(+), 17 deletions(-)

diff --git a/tools/firmware-utils/src/tplink-safeloader.c 
b/tools/firmware-utils/src/tplink-safeloader.c
index 4607a1d..66658aa 100644
--- a/tools/firmware-utils/src/tplink-safeloader.c
+++ b/tools/firmware-utils/src/tplink-safeloader.c
@@ -103,7 +103,7 @@ static const uint8_t md5_salt[16] = {
 
 
 /** Vendor information for CPE210/220/510/520 */
-static const unsigned char cpe510_vendor[] = 
"\x00\x00\x00\x1f""CPE510(TP-LINK|UN|N300-5):1.0\r\n";
+static const char cpe510_vendor[] = "CPE510(TP-LINK|UN|N300-5):1.0\r\n";
 
 
 /**
@@ -133,14 +133,13 @@ static const struct flash_partition_entry 
cpe510_partitions[] = {
The stock images also contain strings for two more devices: BS510 and BS210.
At the moment, there exists no public information about these devices.
 */
-static const unsigned char cpe510_support_list[] =
-   "\x00\x00\x00\xc8\x00\x00\x00\x00"
+static const char cpe510_support_list[] =
"SupportList:\r\n"
"CPE510(TP-LINK|UN|N300-5):1.0\r\n"
"CPE520(TP-LINK|UN|N300-5):1.0\r\n"
"CPE210(TP-LINK|UN|N300-2):1.0\r\n"
"CPE220(TP-LINK|UN|N300-2):1.0\r\n"
-   "\r\n\xff";
+   "\r\n";
 
 #define error(_ret, _errno, _str, ...) \
do {\
@@ -151,6 +150,14 @@ static const unsigned char cpe510_support_list[] =
} while (0)
 
 
+/** Stores a uint32 as big endian */
+static inline void put32(uint8_t *buf, uint32_t val) {
+   buf[0] = val >> 24;
+   buf[1] = val >> 16;
+   buf[2] = val >> 8;
+   buf[3] = val;
+}
+
 /** Allocates a new image partition */
 static struct image_partition_entry alloc_image_partition(const char *name, 
size_t len) {
struct image_partition_entry entry = {name, len, malloc(len)};
@@ -233,9 +240,15 @@ static struct image_partition_entry 
make_soft_version(uint32_t rev) {
 }
 
 /** Generates the support-list partition */
-static struct image_partition_entry make_support_list(const unsigned char 
*support_list, size_t len) {
-   struct image_partition_entry entry = 
alloc_image_partition("support-list", len);
-   memcpy(entry.data, support_list, len);
+static struct image_partition_entry make_support_list(const char 
*support_list) {
+   size_t len = strlen(support_list);
+   struct image_partition_entry entry = 
alloc_image_partition("support-list", len + 9);
+
+   put32(entry.data, len);
+   memset(entry.data+4, 0, 4);
+   memcpy(entry.data+8, support_list, len);
+   entry.data[len+8] = '\xff';
+
return entry;
 }
 
@@ -344,12 +357,13 @@ static void put_md5(uint8_t *md5, uint8_t *buffer, 
unsigned int len) {
  ---  -
  -0003Image size (4 bytes, big endian)
  0004-0013MD5 hash (hash of a 16 byte salt and the image data starting 
with byte 0x14)
- 0014-1013Vendor information (4096 bytes, padded with 0xff; there seem 
to be older
+ 0014-0017Vendor information length (without padding) (4 bytes, big 
endian)
+ 0018-1013Vendor information (4092 bytes, padded with 0xff; there seem 
to be older
   (VxWorks-based) TP-LINK devices which use a smaller vendor 
information block)
  1014-1813Image partition table (2048 bytes, padded with 0xff)
  1814-Firmware partitions
 */
-static void * generate_factory_image(const unsigned char *vendor, size_t 
vendor_len, const struct image_partition_entry *parts, size_t *len) {
+static void * generate_factory_image(const char *vendor, const struct 
image_partition_entry *parts, size_t *len) {
*len = 0x1814;
 
size_t i;
@@ -360,13 +374,12 @@ static void * generate_factory_image(const unsigned char 
*vendor, size_t vendor_
if (!image)
error(1, errno, "malloc");
 
-   image[0] = *len >> 24;
-   image[1] = *len >> 16;
-   image[2] = *len >> 8;
-   image[3] = *len;
+   put32(image, *len);
 
-   memcpy(image+0x14, vendor, vendor_len);
-   memset(image+0x14+vendor_len, 0xff, 4096-vendor_len);
+   size_t vendor_len = strlen(vendor);
+   put32(image+0x14, vendor_len);
+   memcpy(image+0x18, vendor, vendor_len);
+   memset(image+0x18+vendor_len, 0xff, 4092-vendor_len);
 
put_partitions(image + 0x1014, parts);
put_md5(image+0x04, image+0x14, *len-0x14);
@@ -430,7 +443,7 @@ static void do_cpe510(const char *output, const char 
*kernel_image, const char *
 
parts[0] = make_partition_table(cpe510_partitions);
parts[1] = make_soft_version(rev);
-   parts[2] = make_support_list(cpe510_support_list, 
sizeof(cpe510_support_list)-1);
+   

[OpenWrt-Devel] [PATCH 3/3] tools/firmware-utils: tplink-safeloader: add version 1.1 support to CPE210/220/510/520

2015-10-16 Thread Matthias Schiffer
The hardware is identical to version 1.0, add the new models to the support
list.

Also remove the empty line at the end of the support list, the current
stock images don't have it either.

Signed-off-by: Matthias Schiffer 
---
 tools/firmware-utils/src/tplink-safeloader.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/firmware-utils/src/tplink-safeloader.c 
b/tools/firmware-utils/src/tplink-safeloader.c
index 66658aa..77a894b 100644
--- a/tools/firmware-utils/src/tplink-safeloader.c
+++ b/tools/firmware-utils/src/tplink-safeloader.c
@@ -129,17 +129,17 @@ static const struct flash_partition_entry 
cpe510_partitions[] = {
 
 /**
The support list for CPE210/220/510/520
-
-   The stock images also contain strings for two more devices: BS510 and BS210.
-   At the moment, there exists no public information about these devices.
 */
 static const char cpe510_support_list[] =
"SupportList:\r\n"
"CPE510(TP-LINK|UN|N300-5):1.0\r\n"
+   "CPE510(TP-LINK|UN|N300-5):1.1\r\n"
"CPE520(TP-LINK|UN|N300-5):1.0\r\n"
+   "CPE520(TP-LINK|UN|N300-5):1.1\r\n"
"CPE210(TP-LINK|UN|N300-2):1.0\r\n"
+   "CPE210(TP-LINK|UN|N300-2):1.1\r\n"
"CPE220(TP-LINK|UN|N300-2):1.0\r\n"
-   "\r\n";
+   "CPE220(TP-LINK|UN|N300-2):1.1\r\n";
 
 #define error(_ret, _errno, _str, ...) \
do {\
-- 
2.6.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 0/3] Add support for CPE210/220/510/520 v1.1

2015-10-16 Thread Matthias Schiffer
The v1.1 is identical to v1.0, but it needs to be added to the support list
in the firmware image. While at it, do some cleanup of the image generator.


Matthias Schiffer (3):
  tools/firmware-utils: tplink-safeloader: clean up code
  tools/firmware-utils: tplink-safeloader: fix support-list format,
clean up vendor information
  tools/firmware-utils: tplink-safeloader: add version 1.1 support to
CPE210/220/510/520

 tools/firmware-utils/src/tplink-safeloader.c | 71 
 1 file changed, 42 insertions(+), 29 deletions(-)

-- 
2.6.1
___
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 
---
 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 
+ * Uros PETREVSKI 
+ */
+
+#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 = {
+   {
+   .name   = "weio:green:sta",
+   .gpio   = WEIO_GPIO_LED_STA,
+   .active_low = 1,
+   .default_state = LEDS_GPIO_DEFSTATE_ON,
+   },
+