Re: [OpenWrt-Devel] Linksys WRT1900ACS router is not booting after flashing custom build

2016-04-29 Thread Vincent Wiemann
Hi Avijit,

> Also I have added myself in this mailing group couple of days back. Not
> sure if this is the right forum to ask this question. If nor please
> direct me to right forum.

this is the OpenWrt developer mailing list.
You should better use the forum: https://forum.openwrt.org/

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


[OpenWrt-Devel] Linksys WRT1900ACS router is not booting after flashing custom build

2016-04-29 Thread Avijit Das
Hello,

I am trying to flash custom image in my router (Linksys WRT1900ACS). I have
followed the step mentioned in the bellow link:

https://davidsimpson.me/2015/11/14/installing-openwrt-on-a-linksys-wrt1900acs/

I end up bricking my device. Can you please suggest me how to recover my
device?

Also can you please tell me which image I should flash to this router ? I
tried with openwrt-mvebu-armada-385-linksys-shelby-squashfs-factory.img
,
seems did not work.

Also I have added myself in this mailing group couple of days back. Not
sure if this is the right forum to ask this question. If nor please direct
me to right forum.

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


[OpenWrt-Devel] [PATCH v2] ubox: make system log support as a separate package

2016-04-29 Thread Andrej Vlasic
Currently system log is always included as a part of ubox.
Add logd as a seperate package and add it to default packages list.

Signed-off-by: Andrej Vlasic 
---
Changes in v2: Move system log into seperate package, and add it to default 
packages list

 include/target.mk|  2 +-
 package/system/ubox/Makefile | 20 +---
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/include/target.mk b/include/target.mk
index 76fbd99..a19edcc 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -12,7 +12,7 @@ __target_inc=1
 DEVICE_TYPE?=router
 
 # Default packages - the really basic set
-DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd 
fstools uclient-fetch
+DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd 
fstools uclient-fetch logd
 # For nas targets
 DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm
 # For router targets
diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile
index b32c794..f9f1ac1 100644
--- a/package/system/ubox/Makefile
+++ b/package/system/ubox/Makefile
@@ -28,11 +28,17 @@ define Package/ubox
   TITLE:=OpenWrt system helper toolbox
 endef
 
+define Package/logd
+  SECTION:=base
+  CATEGORY:=Base system
+  DEPENDS:=+libubox +libubus +libblobmsg-json +USE_GLIBC:librt
+  TITLE:=OpenWrt system log implementation
+endef
+
 define Package/ubox/install
-   $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib/ $(1)/etc/init.d/
+   $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib/
 
-   $(INSTALL_BIN) 
$(PKG_INSTALL_DIR)/usr/sbin/{kmodloader,logd,logread,validate_data} $(1)/sbin/
-   $(INSTALL_BIN) ./files/log.init $(1)/etc/init.d/log
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{kmodloader,validate_data} 
$(1)/sbin/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libvalidate.so $(1)/lib
 
$(LN) ../../sbin/kmodloader $(1)/usr/sbin/rmmod
@@ -42,4 +48,12 @@ define Package/ubox/install
$(LN) ../../sbin/kmodloader $(1)/usr/sbin/modprobe
 endef
 
+define Package/logd/install
+   $(INSTALL_DIR) $(1)/sbin $(1)/etc/init.d/
+
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{logd,logread} $(1)/sbin/
+   $(INSTALL_BIN) ./files/log.init $(1)/etc/init.d/log
+endef
+
 $(eval $(call BuildPackage,ubox))
+$(eval $(call BuildPackage,logd))
-- 
2.8.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] ubus: lua: return string errors, not just codes

2016-04-29 Thread Karl Palsson
From: Karl Palsson 

Return an extra string to lua clients, not just the code.

Signed-off-by: Karl Palsson 
---

Makes it much more pleasant when working with ubus via lua, rather
than simply getting the integer return code. example code also
updated to demonstrate access to the code and message.

 lua/test_client.lua | 11 +++
 lua/ubus.c  | 24 
 2 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/lua/test_client.lua b/lua/test_client.lua
index 0b60e0d..c006b4c 100755
--- a/lua/test_client.lua
+++ b/lua/test_client.lua
@@ -22,10 +22,13 @@ for i, n in ipairs(namespaces) do
end
 end
 
-local status = conn:call("test", "hello", { msg = "eth0" })
-
-for k, v in pairs(status) do
-   print("key=" .. k .. " value=" .. tostring(v))
+local status, rc, desc = conn:call("test", "hello", { msg = "eth0" })
+if not status then
+   print("test.hello failed, code, desc: ", rc, desc)
+else
+   for k, v in pairs(status) do
+   print("key=" .. k .. " value=" .. tostring(v))
+   end
 end
 
 local status = {conn:call("test", "hello1", { msg = "eth0" })}
diff --git a/lua/ubus.c b/lua/ubus.c
index 86e34b7..0df2887 100644
--- a/lua/ubus.c
+++ b/lua/ubus.c
@@ -246,7 +246,8 @@ ubus_lua_connect(lua_State *L)
/* NB: no errors from ubus_connect() yet */
lua_pushnil(L);
lua_pushinteger(L, UBUS_STATUS_UNKNOWN_ERROR);
-   return 2;
+   lua_pushstring(L, ubus_strerror(UBUS_STATUS_UNKNOWN_ERROR));
+   return 3;
 }
 
 
@@ -273,7 +274,8 @@ ubus_lua_objects(lua_State *L)
lua_pop(L, 1);
lua_pushnil(L);
lua_pushinteger(L, rv);
-   return 2;
+   lua_pushstring(L, ubus_strerror(rv));
+   return 3;
}
 
return 1;
@@ -335,7 +337,8 @@ static int ubus_lua_reply(lua_State *L)
{
lua_pushnil(L);
lua_pushinteger(L, UBUS_STATUS_INVALID_ARGUMENT);
-   return 2;
+   lua_pushstring(L, ubus_strerror(UBUS_STATUS_INVALID_ARGUMENT));
+   return 3;
}
 
req = lua_touserdata(L, 2);
@@ -529,7 +532,8 @@ ubus_lua_signatures(lua_State *L)
lua_pop(L, 1);
lua_pushnil(L);
lua_pushinteger(L, rv);
-   return 2;
+   lua_pushstring(L, ubus_strerror(rv));
+   return 3;
}
 
return 1;
@@ -564,7 +568,8 @@ ubus_lua_call(lua_State *L)
{
lua_pushnil(L);
lua_pushinteger(L, UBUS_STATUS_INVALID_ARGUMENT);
-   return 2;
+   lua_pushstring(L, ubus_strerror(UBUS_STATUS_INVALID_ARGUMENT));
+   return 3;
}
 
rv = ubus_lookup_id(c->ctx, path, );
@@ -573,7 +578,8 @@ ubus_lua_call(lua_State *L)
{
lua_pushnil(L);
lua_pushinteger(L, rv);
-   return 2;
+   lua_pushstring(L, ubus_strerror(rv));
+   return 3;
}
 
top = lua_gettop(L);
@@ -584,7 +590,8 @@ ubus_lua_call(lua_State *L)
lua_pop(L, 1);
lua_pushnil(L);
lua_pushinteger(L, rv);
-   return 2;
+   lua_pushstring(L, ubus_strerror(rv));
+   return 3;
}
 
return lua_gettop(L) - top;
@@ -669,7 +676,8 @@ ubus_lua_send(lua_State *L)
if (!ubus_lua_format_blob_array(L, >buf, true)) {
lua_pushnil(L);
lua_pushinteger(L, UBUS_STATUS_INVALID_ARGUMENT);
-   return 2;
+   lua_pushstring(L, ubus_strerror(UBUS_STATUS_INVALID_ARGUMENT));
+   return 3;
}
 
// Send the event
-- 
2.4.11
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] ubus: lua: use built in pkg-config support for alternatives

2016-04-29 Thread Karl Palsson
From: Karl Palsson 

Different distributions have different names for the lua 5.1 package.
Use cmake's built in pkg-config support to search for the first one,
rather than running it explicitly and searching for a single version.

Signed-off-by: Karl Palsson 
---

Same patch as in libubox & uci

 lua/CMakeLists.txt | 10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/lua/CMakeLists.txt b/lua/CMakeLists.txt
index e4821bf..abf4929 100644
--- a/lua/CMakeLists.txt
+++ b/lua/CMakeLists.txt
@@ -5,14 +5,8 @@ PROJECT(ubus C)
 SET(CMAKE_INSTALL_PREFIX /)
 
 IF(NOT LUA_CFLAGS)
-   FIND_PROGRAM(PKG_CONFIG pkg-config)
-   IF(PKG_CONFIG)
-   EXECUTE_PROCESS(
-   COMMAND pkg-config --silence-errors --cflags lua5.1
-   OUTPUT_VARIABLE LUA_CFLAGS
-   OUTPUT_STRIP_TRAILING_WHITESPACE
-   )
-   ENDIF()
+   INCLUDE(FindPkgConfig)
+   pkg_search_module(LUA lua5.1 lua-5.1)
 ENDIF()
 
 ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -I.. ${LUA_CFLAGS})
-- 
2.4.11
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2 1/3] mount_root: implement overlay= boot option

2016-04-29 Thread Josua Mayer


Am 29.04.2016 um 07:47 schrieb Rafał Miłecki:
> On 28 April 2016 at 20:20,   wrote:
>> @@ -33,6 +33,35 @@ start(int argc, char *argv[1]) if
>> (!getenv("PREINIT")) return -1;
>> 
>> +   /* +* Check cmdline for a hint about overlay
>> device +*/ +   if(!data) { +   FILE *fp; 
>> +   char buffer[100] = {0}; + +   fp =
>> fopen("/proc/cmdline", "r"); +   while(!feof(fp)) { +
>> if(fscanf(fp, "overlay=%s", buffer)) +
>> break;
> 
> Please keep coding style consistent across the project. You can see
> there is: if (!getenv("PREINIT")) with space after "if". Please
> update your code to use the same style, e.g.: if (!data) while
> (!feof(fp)) {
> 
Will do, thanks for the pointer (I really didn't notice)!
Meanwhile any comments on the content itself?
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] load running state after lock is acquired

2016-04-29 Thread Alin Nastac
When running "/etc/init.d/firewall reload & fw3 -q restart", the
fw3 instance that handle the reload might try to read the running
state after firewall was stopped by the fw3 instance that does the
restarting. Since a NULL run_state will transform reload operation in
start operation, the resulted iptables chains will contain duplicate
sets of rules.
---
 main.c | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/main.c b/main.c
index b953020..241da62 100644
--- a/main.c
+++ b/main.c
@@ -546,7 +546,6 @@ int main(int argc, char **argv)
}
 
build_state(false);
-   build_state(true);
defs = _state->defaults;
 
if (optind >= argc)
@@ -577,12 +576,18 @@ int main(int argc, char **argv)
print_family = family;
fw3_pr_debug = true;
 
-   rv = start();
+   if (fw3_lock())
+   {
+   build_state(true);
+   rv = start();
+   fw3_unlock();
+   }
}
else if (!strcmp(argv[optind], "start"))
{
if (fw3_lock())
{
+   build_state(true);
rv = start();
fw3_unlock();
}
@@ -591,6 +596,7 @@ int main(int argc, char **argv)
{
if (fw3_lock())
{
+   build_state(true);
rv = stop(false);
fw3_unlock();
}
@@ -599,6 +605,7 @@ int main(int argc, char **argv)
{
if (fw3_lock())
{
+   build_state(true);
rv = stop(true);
fw3_unlock();
}
@@ -607,6 +614,7 @@ int main(int argc, char **argv)
{
if (fw3_lock())
{
+   build_state(true);
stop(true);
rv = start();
fw3_unlock();
@@ -616,6 +624,7 @@ int main(int argc, char **argv)
{
if (fw3_lock())
{
+   build_state(true);
rv = reload();
fw3_unlock();
}
-- 
1.7.12.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCHv10] ramips: Add support for SamKnows Whitebox 8

2016-04-29 Thread Andrew Yong
Noted. Would I need to re-send the same v10?
On 29 Apr 2016 20:30, "Piotr Dymacz"  wrote:

> Hello Andrew,
>
> Just two comments.
>
> Your patch changelog should go below "---" after the Signed-off-by
> line, so that it won't get included in commit message.
> It's common to include just a small description about the hardware the
> patch adds support for, examples: [1], [2], [3].
>
> Cheers,
> Piotr
>
> [1] https://dev.openwrt.org/changeset/44238
> [2] https://dev.openwrt.org/changeset/41939
> [3] https://dev.openwrt.org/changeset/46454
>
>
> 2016-04-29 14:03 GMT+02:00 Andrew Yong :
> > PATCHv1:
> > This patch adds support for the SamKnows version 8.0 Whitebox, built
> > around the MT7621 platform. 2.4GHz appears to be working, albeit
> > poorly; 5GHz not working yet.
> >
> > PATCHv2:
> > - Fixed LED name in DTS.
> >
> > PATCHv3:
> >  DTS: Syntax error fixed, LEDs and buttons mapped correctly now
> > - diag.sh updated to blink WPS LED on boot
> > - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset
> > matches SamKnows firmware
> > - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware
> >
> > PATCHv4:
> > - I didn't commit some fixes in PATCHv3, that's fixed now
> >
> > PATCHv5:
> > - Added preinit hook to reset SamKnows Whitebox 8 u-boot boot counter
> > to prevent soft brick by booting into nonexistent backup partition
> > - Broke 2.4GHz WiFi but 5GHz sorta works (swapped pcie0/1 in DTS,
> > needs further investigation, effective txpower is still 0)
> > - Experimenting on wifi but that'll be a future patch, board boots fine
> now.
> >
> > PATCHv6:
> > - Used init script to reset bootcount, preinit is too early to use
> fw-setenv
> >
> > PATCHv7:
> > - Added model to sysupgrade. Tested thoroughly in general and I'm happy
> with this. Sorry for the many revisions.
> >
> > PATCHv8:
> > - Added SamKnows recovery partition to partition table, in case someone
> specifically wants to send their bootloader to it
> > - Fixed Wi-Fi by patching MT7602EN device ID (shows up as 7612) into
> mt76 kernel module (verified that signal strength on both bands is good,
> tested AP and STA modes
> >
> > PATCHv9:
> > - Fixed LAN MAC address EEPROM offset
> > - Fixed mt76 patch whitespace issues
> > - Renamed mt76 patch to mt7602en to accurately reflect the physical chip
> it's supporting
> >
> > PATCHv10:
> > - Removed mt76 patch in favor of upstream patch
> > - I solemnly swear not to have to revision my patch >5 times every again
> >
> > Initial support for SamKnows Whitebox 8
> >
> > Signed-off-by: Andrew Yong 
> >
> > diff --git a/package/boot/uboot-envtools/files/ramips
> b/package/boot/uboot-envtools/files/ramips
> > index a759bcc..9ad5974 100644
> > --- a/package/boot/uboot-envtools/files/ramips
> > +++ b/package/boot/uboot-envtools/files/ramips
> > @@ -24,7 +24,8 @@ linkits7688d | \
> >  wsr-600 | \
> >  wsr-1166 | \
> >  br6425 | \
> > -miwifi-nano)
> > +miwifi-nano | \
> > +sk-wb8)
> > ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1"
> > ;;
> >  esac
> > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds
> b/target/linux/ramips/base-files/etc/board.d/01_leds
> > index 47e1e6a..28db48f 100755
> > --- a/target/linux/ramips/base-files/etc/board.d/01_leds
> > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds
> > @@ -247,6 +247,9 @@ rt-n14u)
> > set_wifi_led "$board:blue:air"
> > set_usb_led "$board:blue:usb"
> > ;;
> > +sk-wb8)
> > +   set_usb_led "$board:green:usb"
> > +   ;;
> >  tiny-ac)
> > set_wifi_led "$board:orange:wifi"
> > set_usb_led "$board:green:usb"
> > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
> b/target/linux/ramips/base-files/etc/board.d/02_network
> > index ee690f6..3cbf577 100755
> > --- a/target/linux/ramips/base-files/etc/board.d/02_network
> > +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> > @@ -77,6 +77,7 @@ ramips_setup_interfaces()
> > pbr-m1|\
> > psg1208|\
> > sap-g3200u3|\
> > +   sk-wb8|\
> > wf-2881|\
> > whr-300hp2|\
> > whr-600d|\
> > @@ -314,6 +315,9 @@ ramips_setup_macs()
> > lan_mac=$(macaddr_setbit_la "$lan_mac")
> > wan_mac=$(mtd_get_mac_binary factory 32772)
> > ;;
> > +   sk-wb8)
> > +   wan_mac=$(mtd_get_mac_binary factory 57350)
> > +   ;;
> > tew-691gr)
> > lan_mac=$(cat /sys/class/net/eth0/address)
> > wan_mac=$(macaddr_add "$lan_mac" 3)
> > diff --git a/target/linux/ramips/base-files/etc/diag.sh
> b/target/linux/ramips/base-files/etc/diag.sh
> > index c638d16..e432fa6 100644
> > --- a/target/linux/ramips/base-files/etc/diag.sh
> > +++ b/target/linux/ramips/base-files/etc/diag.sh
> > @@ -79,6 +79,7 @@ get_status_led() {
> > ;;
> > awapn2403|\
> > dir-645|\
> > +   

Re: [OpenWrt-Devel] [PATCH v2 2/3] ext4_part_match: fix bug that prevented matching names

2016-04-29 Thread Ram Chandra Jangir
Thanks  Josua Mayer.

Devname and partname both are different. Devname is holding the device node(ex. 
 mmcblkXpY) and given name(or partname) is the partition name(ex. rootfs or 
rootfs_data).
For below uevent  sysfs entries, it tries to populate the device 
node(mmcblkXpY) in devname variable and tries to match the given name with the 
PARTNAME(buf will have this value("PARTNAME=rootfs_data") at  n'th iteration).
If it is found then the loop will break, and we will get the given name's 
device node(/dev/mmcblkXpY) which will be mounted later.

Example:
root@OpenWrt:/# cat /sys/block/mmcblk0/mmcblk0p3/uevent
MAJOR=179
MINOR=3
DEVNAME=mmcblk0p3  <--  device node: /dev/mmcblk0p3
DEVTYPE=partition
PARTN=3
PARTNAME=rootfs_data

This is required, because the emmc card may have multiple partitions too. So 
our aim is to get the device node from the given name's uevent file.

Thanks,
Ram

-Original Message-
From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On Behalf 
Of josua.maye...@gmail.com
Sent: Thursday, April 28, 2016 11:50 PM
To: openwrt-devel@lists.openwrt.org
Cc: Josua Mayer 
Subject: [OpenWrt-Devel] [PATCH v2 2/3] ext4_part_match: fix bug that prevented 
matching names

From: Josua Mayer 

Actually use the populated devname variable to compare against given name, 
instead of the buf variable, which incidentally contains either:
MAJOR=xyz, MINOR=x, or DEVTYPE=partition, none of which ever match a name.

Signed-off-by: Josua Mayer 
---
 libfstools/ext4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libfstools/ext4.c b/libfstools/ext4.c index f648aa8..b9401c3 100644
--- a/libfstools/ext4.c
+++ b/libfstools/ext4.c
@@ -78,7 +78,7 @@ ext4_part_match(char *dev, char *name, char *filename)
continue;
}
/* Match partition name */
-   if (strstr(buf, name))  {
+   if (strstr(devname, name))  {
ret = 0;
break;
}
--
2.6.6
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2] dropbear: Make utmp and putuline support configurable via a seperate config option

2016-04-29 Thread Hans Dedecker
Utmp support tracks who is currenlty logged in via /var/run/utmp supported by 
buysbox
Putuline support will use the utmp structure to write to the utmp file

Signed-off-by: Hans Dedecker 
---

v2 : Readd disable-utmpx support

 package/network/services/dropbear/Config.in | 15 +++
 package/network/services/dropbear/Makefile  |  4 ++--
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/package/network/services/dropbear/Config.in 
b/package/network/services/dropbear/Config.in
index 3316c84..7c2edd7 100644
--- a/package/network/services/dropbear/Config.in
+++ b/package/network/services/dropbear/Config.in
@@ -32,4 +32,19 @@ config DROPBEAR_ECC
 
Increases binary size by about 23 kB (MIPS).
 
+config DROPBEAR_UTMP
+   bool "Utmp support"
+   default n
+   depends on BUSYBOX_CONFIG_FEATURE_UTMP
+   help
+   This enables dropbear utmp support, the file /var/run/utmp is 
used to
+   track who is currently logged in.
+
+config DROPBEAR_PUTUTLINE
+   bool "Pututline support"
+   default n
+   depends on DROPBEAR_UTMP
+   help
+   Dropbear will use pututline() to write the utmp structure into 
the utmp file.
+
 endmenu
diff --git a/package/network/services/dropbear/Makefile 
b/package/network/services/dropbear/Makefile
index f48c2b5..c2fe69b 100644
--- a/package/network/services/dropbear/Makefile
+++ b/package/network/services/dropbear/Makefile
@@ -68,12 +68,12 @@ CONFIGURE_ARGS += \
--enable-syslog \
$(if $(CONFIG_SHADOW_PASSWORDS),,--disable-shadow) \
--disable-lastlog \
-   --disable-utmp \
+   $(if $(CONFIG_DROPBEAR_UTMP),,--disable-utmp) \
--disable-utmpx \
--disable-wtmp \
--disable-wtmpx \
--disable-loginfunc \
-   --disable-pututline \
+   $(if $(CONFIG_DROPBEAR_PUTUTLINE),,--disable-pututline) \
--disable-pututxline \
--disable-zlib \
--enable-bundled-libtom
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCHv10] ramips: Add support for SamKnows Whitebox 8

2016-04-29 Thread Piotr Dymacz
Hello Andrew,

Just two comments.

Your patch changelog should go below "---" after the Signed-off-by
line, so that it won't get included in commit message.
It's common to include just a small description about the hardware the
patch adds support for, examples: [1], [2], [3].

Cheers,
Piotr

[1] https://dev.openwrt.org/changeset/44238
[2] https://dev.openwrt.org/changeset/41939
[3] https://dev.openwrt.org/changeset/46454


2016-04-29 14:03 GMT+02:00 Andrew Yong :
> PATCHv1:
> This patch adds support for the SamKnows version 8.0 Whitebox, built
> around the MT7621 platform. 2.4GHz appears to be working, albeit
> poorly; 5GHz not working yet.
>
> PATCHv2:
> - Fixed LED name in DTS.
>
> PATCHv3:
>  DTS: Syntax error fixed, LEDs and buttons mapped correctly now
> - diag.sh updated to blink WPS LED on boot
> - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset
> matches SamKnows firmware
> - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware
>
> PATCHv4:
> - I didn't commit some fixes in PATCHv3, that's fixed now
>
> PATCHv5:
> - Added preinit hook to reset SamKnows Whitebox 8 u-boot boot counter
> to prevent soft brick by booting into nonexistent backup partition
> - Broke 2.4GHz WiFi but 5GHz sorta works (swapped pcie0/1 in DTS,
> needs further investigation, effective txpower is still 0)
> - Experimenting on wifi but that'll be a future patch, board boots fine now.
>
> PATCHv6:
> - Used init script to reset bootcount, preinit is too early to use fw-setenv
>
> PATCHv7:
> - Added model to sysupgrade. Tested thoroughly in general and I'm happy with 
> this. Sorry for the many revisions.
>
> PATCHv8:
> - Added SamKnows recovery partition to partition table, in case someone 
> specifically wants to send their bootloader to it
> - Fixed Wi-Fi by patching MT7602EN device ID (shows up as 7612) into mt76 
> kernel module (verified that signal strength on both bands is good, tested AP 
> and STA modes
>
> PATCHv9:
> - Fixed LAN MAC address EEPROM offset
> - Fixed mt76 patch whitespace issues
> - Renamed mt76 patch to mt7602en to accurately reflect the physical chip it's 
> supporting
>
> PATCHv10:
> - Removed mt76 patch in favor of upstream patch
> - I solemnly swear not to have to revision my patch >5 times every again
>
> Initial support for SamKnows Whitebox 8
>
> Signed-off-by: Andrew Yong 
>
> diff --git a/package/boot/uboot-envtools/files/ramips 
> b/package/boot/uboot-envtools/files/ramips
> index a759bcc..9ad5974 100644
> --- a/package/boot/uboot-envtools/files/ramips
> +++ b/package/boot/uboot-envtools/files/ramips
> @@ -24,7 +24,8 @@ linkits7688d | \
>  wsr-600 | \
>  wsr-1166 | \
>  br6425 | \
> -miwifi-nano)
> +miwifi-nano | \
> +sk-wb8)
> ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1"
> ;;
>  esac
> diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
> b/target/linux/ramips/base-files/etc/board.d/01_leds
> index 47e1e6a..28db48f 100755
> --- a/target/linux/ramips/base-files/etc/board.d/01_leds
> +++ b/target/linux/ramips/base-files/etc/board.d/01_leds
> @@ -247,6 +247,9 @@ rt-n14u)
> set_wifi_led "$board:blue:air"
> set_usb_led "$board:blue:usb"
> ;;
> +sk-wb8)
> +   set_usb_led "$board:green:usb"
> +   ;;
>  tiny-ac)
> set_wifi_led "$board:orange:wifi"
> set_usb_led "$board:green:usb"
> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
> b/target/linux/ramips/base-files/etc/board.d/02_network
> index ee690f6..3cbf577 100755
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -77,6 +77,7 @@ ramips_setup_interfaces()
> pbr-m1|\
> psg1208|\
> sap-g3200u3|\
> +   sk-wb8|\
> wf-2881|\
> whr-300hp2|\
> whr-600d|\
> @@ -314,6 +315,9 @@ ramips_setup_macs()
> lan_mac=$(macaddr_setbit_la "$lan_mac")
> wan_mac=$(mtd_get_mac_binary factory 32772)
> ;;
> +   sk-wb8)
> +   wan_mac=$(mtd_get_mac_binary factory 57350)
> +   ;;
> tew-691gr)
> lan_mac=$(cat /sys/class/net/eth0/address)
> wan_mac=$(macaddr_add "$lan_mac" 3)
> diff --git a/target/linux/ramips/base-files/etc/diag.sh 
> b/target/linux/ramips/base-files/etc/diag.sh
> index c638d16..e432fa6 100644
> --- a/target/linux/ramips/base-files/etc/diag.sh
> +++ b/target/linux/ramips/base-files/etc/diag.sh
> @@ -79,6 +79,7 @@ get_status_led() {
> ;;
> awapn2403|\
> dir-645|\
> +   sk-wb8|\
> wrh-300cr)
> status_led="$board:green:wps"
> ;;
> diff --git a/target/linux/ramips/base-files/etc/init.d/bootcount 
> b/target/linux/ramips/base-files/etc/init.d/bootcount
> new file mode 100755
> index 000..b93e3c9
> --- /dev/null
> +++ b/target/linux/ramips/base-files/etc/init.d/bootcount
> @@ 

[OpenWrt-Devel] netifd hotplug event race condition for monitor interfaces

2016-04-29 Thread Bruno Randolf
Hello,

I have a system where I want to reload a service when a monitor
interface appears. The monitor interface is configured in
/etc/config/wireless as:

config wifi-iface 'monitor'
option device 'radio0'
option ifname 'moni0'
option mode 'monitor'

Unfortunately netifd events for monitor interfaces are not reliable at
boot time. On some slower systems I never get them, on a Raspberry Pi 2
I get them about 50% of the time.

I have been able to debug it down to netifd/system-linux.c
handle_hotplug_msg() where system_if_force_external() is either true or
false, depending whether /sys/class/net/moni0/phy80211 already exists or
not. Interestingly it works well when it does not exist yet: then I get
the following log, the interface gets UP, and the hotplug script which
restarts my service is called:

netifd: Interface 'moni' is enabled
netifd: Network device 'moni0' link is up
netifd: Interface 'moni' has link connectivity
netifd: Interface 'moni' is setting up now
netifd: Interface 'moni' is now up

But when the /sys/ file does already exist, and
system_if_force_external() is true, I get the following log and the
interface stays down:

netifd: radio0 (1144): command failed: Device or resource busy (-16)
netifd: radio0 (1144): ifconfig: SIOCSIFHWADDR: Invalid argument
netifd: Network device 'moni0' link is up
netifd: Interface 'moni' has link connectivity

root@Rpi2:~# ubus call network.interface.moni status
{
"up": false,
"pending": false,
"available": false,
"autostart": true,
"dynamic": false,
"proto": "none",
"device": "moni0",
"data": {

}
}

I guess the problem is that monitor interfaces are created almost
instantly, in comparison to AP, STA and Ad-hoc interfaces which need
some time to set up...?

Any ideas how to fix this are appreciated, I want to do it, but I am
stuck now.

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


[OpenWrt-Devel] [PATCHv10] ramips: Add support for SamKnows Whitebox 8

2016-04-29 Thread Andrew Yong
PATCHv1:
This patch adds support for the SamKnows version 8.0 Whitebox, built
around the MT7621 platform. 2.4GHz appears to be working, albeit
poorly; 5GHz not working yet.

PATCHv2:
- Fixed LED name in DTS.

PATCHv3:
 DTS: Syntax error fixed, LEDs and buttons mapped correctly now
- diag.sh updated to blink WPS LED on boot
- 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset
matches SamKnows firmware
- 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware

PATCHv4:
- I didn't commit some fixes in PATCHv3, that's fixed now

PATCHv5:
- Added preinit hook to reset SamKnows Whitebox 8 u-boot boot counter
to prevent soft brick by booting into nonexistent backup partition
- Broke 2.4GHz WiFi but 5GHz sorta works (swapped pcie0/1 in DTS,
needs further investigation, effective txpower is still 0)
- Experimenting on wifi but that'll be a future patch, board boots fine now.

PATCHv6:
- Used init script to reset bootcount, preinit is too early to use fw-setenv

PATCHv7:
- Added model to sysupgrade. Tested thoroughly in general and I'm happy with 
this. Sorry for the many revisions.

PATCHv8:
- Added SamKnows recovery partition to partition table, in case someone 
specifically wants to send their bootloader to it
- Fixed Wi-Fi by patching MT7602EN device ID (shows up as 7612) into mt76 
kernel module (verified that signal strength on both bands is good, tested AP 
and STA modes

PATCHv9:
- Fixed LAN MAC address EEPROM offset
- Fixed mt76 patch whitespace issues
- Renamed mt76 patch to mt7602en to accurately reflect the physical chip it's 
supporting

PATCHv10:
- Removed mt76 patch in favor of upstream patch
- I solemnly swear not to have to revision my patch >5 times every again

Initial support for SamKnows Whitebox 8

Signed-off-by: Andrew Yong 

diff --git a/package/boot/uboot-envtools/files/ramips 
b/package/boot/uboot-envtools/files/ramips
index a759bcc..9ad5974 100644
--- a/package/boot/uboot-envtools/files/ramips
+++ b/package/boot/uboot-envtools/files/ramips
@@ -24,7 +24,8 @@ linkits7688d | \
 wsr-600 | \
 wsr-1166 | \
 br6425 | \
-miwifi-nano)
+miwifi-nano | \
+sk-wb8)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1"
;;
 esac
diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
b/target/linux/ramips/base-files/etc/board.d/01_leds
index 47e1e6a..28db48f 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -247,6 +247,9 @@ rt-n14u)
set_wifi_led "$board:blue:air"
set_usb_led "$board:blue:usb"
;;
+sk-wb8)
+   set_usb_led "$board:green:usb"
+   ;;
 tiny-ac)
set_wifi_led "$board:orange:wifi"
set_usb_led "$board:green:usb"
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
b/target/linux/ramips/base-files/etc/board.d/02_network
index ee690f6..3cbf577 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -77,6 +77,7 @@ ramips_setup_interfaces()
pbr-m1|\
psg1208|\
sap-g3200u3|\
+   sk-wb8|\
wf-2881|\
whr-300hp2|\
whr-600d|\
@@ -314,6 +315,9 @@ ramips_setup_macs()
lan_mac=$(macaddr_setbit_la "$lan_mac")
wan_mac=$(mtd_get_mac_binary factory 32772)
;;
+   sk-wb8)
+   wan_mac=$(mtd_get_mac_binary factory 57350)
+   ;;
tew-691gr)
lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 3)
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index c638d16..e432fa6 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -79,6 +79,7 @@ get_status_led() {
;;
awapn2403|\
dir-645|\
+   sk-wb8|\
wrh-300cr)
status_led="$board:green:wps"
;;
diff --git a/target/linux/ramips/base-files/etc/init.d/bootcount 
b/target/linux/ramips/base-files/etc/init.d/bootcount
new file mode 100755
index 000..b93e3c9
--- /dev/null
+++ b/target/linux/ramips/base-files/etc/init.d/bootcount
@@ -0,0 +1,11 @@
+#!/bin/sh /etc/rc.common
+. /lib/ramips.sh
+
+START=99
+
+start() {
+   local board=$(ramips_board_name)
+   if [ $board = "sk-wb8" ]; then
+   fw_setenv bootcount 0
+   fi
+}
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 0ac0f68..9d5421b 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -376,6 +376,9 @@ ramips_board_detect() {
*"RUT5XX")
name="rut5xx"
;;
+   *"SamKnows Whitebox 8")
+   name="sk-wb8"
+   ;;
*"SAP-G3200U3")
name="sap-g3200u3"
   

Re: [OpenWrt-Devel] [PATCH 2/6] dropbear: Make utmp and putuline support configurable via seperate config options

2016-04-29 Thread Hans Dedecker
On Fri, Apr 29, 2016 at 1:24 PM, John Crispin  wrote:

> Hi,
>
> comment inline
>
> On 27/04/2016 11:13, Hans Dedecker wrote:
> > Utmp support tracks who is currenlty logged in by logging info to the
> file /var/run/utmp (supported by busybox)
> > Putuline support will use the utmp structure to write to the utmp file
> >
> > Signed-off-by: Hans Dedecker 
> > ---
> >  package/network/services/dropbear/Config.in | 15 +++
> >  package/network/services/dropbear/Makefile  |  5 ++---
> >  2 files changed, 17 insertions(+), 3 deletions(-)
> >
> > diff --git a/package/network/services/dropbear/Config.in
> b/package/network/services/dropbear/Config.in
> > index 3316c84..7c2edd7 100644
> > --- a/package/network/services/dropbear/Config.in
> > +++ b/package/network/services/dropbear/Config.in
> > @@ -32,4 +32,19 @@ config DROPBEAR_ECC
> >
> >   Increases binary size by about 23 kB (MIPS).
> >
> > +config DROPBEAR_UTMP
> > + bool "Utmp support"
> > + default n
> > + depends on BUSYBOX_CONFIG_FEATURE_UTMP
> > + help
> > + This enables dropbear utmp support, the file /var/run/utmp
> is used to
> > + track who is currently logged in.
> > +
> > +config DROPBEAR_PUTUTLINE
> > + bool "Pututline support"
> > + default n
> > + depends on DROPBEAR_UTMP
> > + help
> > + Dropbear will use pututline() to write the utmp structure
> into the utmp file.
> > +
> >  endmenu
> > diff --git a/package/network/services/dropbear/Makefile
> b/package/network/services/dropbear/Makefile
> > index 39ab04b..593e0a8 100644
> > --- a/package/network/services/dropbear/Makefile
> > +++ b/package/network/services/dropbear/Makefile
> > @@ -68,12 +68,11 @@ CONFIGURE_ARGS += \
> >   --enable-syslog \
> >   $(if $(CONFIG_SHADOW_PASSWORDS),,--disable-shadow) \
> >   --disable-lastlog \
> > - --disable-utmp \
> > - --disable-utmpx \
> > + $(if $(CONFIG_DROPBEAR_UTMP),,--disable-utmp) \
>
> what happened to --disable-utmpx ?
>
Deletion by mistake ...
Will fix it in a new patch

Hans

>
> John
>
> >   --disable-wtmp \
> >   --disable-wtmpx \
> >   --disable-loginfunc \
> > - --disable-pututline \
> > + $(if $(CONFIG_DROPBEAR_PUTUTLINE),,--disable-pututline) \
> >   --disable-pututxline \
> >   --disable-zlib \
> >   --enable-bundled-libtom
> >
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCHv9] ramips: Add support for SamKnows Whitebox 8

2016-04-29 Thread Andrew Yong
Will do. Awesome.
On 29 Apr 2016 19:30, "John Crispin"  wrote:

> Hi,
>
> please drop the mt76 part from the patch it is already merged in the
> mt76 tree on github and will hit trunk soon.
>
> also patch does not apply as shown below.
>
> John
>
> ../patchwork 615343
> --2016-04-28 09:07:34--  http://patchwork.ozlabs.org/patch/615343/mbox/
> Resolving patchwork.ozlabs.org (patchwork.ozlabs.org)... 103.22.144.67
> Connecting to patchwork.ozlabs.org
> (patchwork.ozlabs.org)|103.22.144.67|:80... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: unspecified [text/plain]
> Saving to: `615343.patch'
>
> [  <=>
> ] 14,542  31.0K/s   in 0.5s
>
> 2016-04-28 09:07:36 (31.0 KB/s) - `615343.patch' saved [14542]
>
> Applying: ramips: Add support for SamKnows Whitebox 8
> fatal: corrupt patch at line 22
> Repository lacks necessary blobs to fall back on 3-way merge.
> Cannot fall back to three-way merge.
> Patch failed at 0001 ramips: Add support for SamKnows Whitebox 8
> When you have resolved this problem run "git am --resolved".
> If you would prefer to skip this patch, instead run "git am --skip".
> To restore the original branch and stop patching run "git am --abort".
> applying 615343 FAILED
>
>
>
>
> On 26/04/2016 23:47, Andrew Yong wrote:
> > PATCHv1:
> > This patch adds support for the SamKnows version 8.0 Whitebox, built
> > around the MT7621 platform. 2.4GHz appears to be working, albeit
> > poorly; 5GHz not working yet.
> >
> > PATCHv2:
> > - Fixed LED name in DTS.
> >
> > PATCHv3:
> >  DTS: Syntax error fixed, LEDs and buttons mapped correctly now
> > - diag.sh updated to blink WPS LED on boot
> > - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset
> > matches SamKnows firmware
> > - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware
> >
> > PATCHv4:
> > - I didn't commit some fixes in PATCHv3, that's fixed now
> >
> > PATCHv5:
> > - Added preinit hook to reset SamKnows Whitebox 8 u-boot boot counter
> > to prevent soft brick by booting into nonexistent backup partition
> > - Broke 2.4GHz WiFi but 5GHz sorta works (swapped pcie0/1 in DTS,
> > needs further investigation, effective txpower is still 0)
> > - Experimenting on wifi but that'll be a future patch, board boots fine
> now.
> >
> > PATCHv6:
> > - Used init script to reset bootcount, preinit is too early to use
> fw-setenv
> >
> > PATCHv7:
> > - Added model to sysupgrade. Tested thoroughly in general and I'm happy
> with this. Sorry for the many revisions.
> >
> > PATCHv8:
> > - Added SamKnows recovery partition to partition table, in case someone
> specifically wants to send their bootloader to it
> > - Fixed Wi-Fi by patching MT7602EN device ID (shows up as 7612) into
> mt76 kernel module (verified that signal strength on both bands is good,
> tested AP and STA modes
> >
> > PATCHv9:
> > - Fixed LAN MAC address EEPROM offset
> > - Fixed mt76 patch whitespace issues
> > - Renamed mt76 patch to mt7602en to accurately reflect the physical chip
> it's supporting
> >
> > Author: Andrew Yong 
> > Date:   Wed Apr 27 05:40:26 2016 +0800
> >
> > Initial support for SamKnows Whitebox 8
> >
> > Signed-off-by: Andrew Yong 
> >
> > diff --git a/000-mt7602en.patch b/000-mt7602en.patch
> > new file mode 100644
> > index 000..e357bbb
> > --- /dev/null
> > +++ b/000-mt7602en.patch
> > @@ -0,0 +1,10 @@
> > +--- a/mt76x2_pci.c
> >  b/mt76x2_pci.c
> > +@@ -20,6 +20,7 @@
> > +
> > + static const struct pci_device_id mt76pci_device_table[] = {
> > +   { PCI_DEVICE(0x14c3, 0x7662) },
> > ++  { PCI_DEVICE(0x14c3, 0x7612) },
> > +   { },
> > + };
> > +
> > diff --git a/package/boot/uboot-envtools/files/ramips
> b/package/boot/uboot-envtools/files/ramips
> > index a759bcc..9ad5974 100644
> > --- a/package/boot/uboot-envtools/files/ramips
> > +++ b/package/boot/uboot-envtools/files/ramips
> > @@ -24,7 +24,8 @@ linkits7688d | \
> >  wsr-600 | \
> >  wsr-1166 | \
> >  br6425 | \
> > -miwifi-nano)
> > +miwifi-nano | \
> > +sk-wb8)
> > ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1"
> > ;;
> >  esac
> > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds
> b/target/linux/ramips/base-files/etc/board.d/01_leds
> > index aeaab33..a47eacf 100755
> > --- a/target/linux/ramips/base-files/etc/board.d/01_leds
> > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds
> > @@ -243,6 +243,9 @@ rt-n14u)
> > set_wifi_led "$board:blue:air"
> > set_usb_led "$board:blue:usb"
> > ;;
> > +sk-wb8)
> > +   set_usb_led "$board:green:usb"
> > +   ;;
> >  tiny-ac)
> > set_wifi_led "$board:orange:wifi"
> > set_usb_led "$board:green:usb"
> > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
> b/target/linux/ramips/base-files/etc/board.d/02_network
> > index c6c740f..4bc1d6e 100755
> > --- a/target/linux/ramips/base-files/etc/board.d/02_network
> > +++ 

Re: [OpenWrt-Devel] [PATCHv9] ramips: Add support for SamKnows Whitebox 8

2016-04-29 Thread John Crispin
Hi,

please drop the mt76 part from the patch it is already merged in the
mt76 tree on github and will hit trunk soon.

also patch does not apply as shown below.

John

../patchwork 615343
--2016-04-28 09:07:34--  http://patchwork.ozlabs.org/patch/615343/mbox/
Resolving patchwork.ozlabs.org (patchwork.ozlabs.org)... 103.22.144.67
Connecting to patchwork.ozlabs.org
(patchwork.ozlabs.org)|103.22.144.67|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
Saving to: `615343.patch'

[  <=>
] 14,542  31.0K/s   in 0.5s

2016-04-28 09:07:36 (31.0 KB/s) - `615343.patch' saved [14542]

Applying: ramips: Add support for SamKnows Whitebox 8
fatal: corrupt patch at line 22
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 ramips: Add support for SamKnows Whitebox 8
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
applying 615343 FAILED




On 26/04/2016 23:47, Andrew Yong wrote:
> PATCHv1:
> This patch adds support for the SamKnows version 8.0 Whitebox, built
> around the MT7621 platform. 2.4GHz appears to be working, albeit
> poorly; 5GHz not working yet.
> 
> PATCHv2:
> - Fixed LED name in DTS.
> 
> PATCHv3:
>  DTS: Syntax error fixed, LEDs and buttons mapped correctly now
> - diag.sh updated to blink WPS LED on boot
> - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset
> matches SamKnows firmware
> - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware
> 
> PATCHv4:
> - I didn't commit some fixes in PATCHv3, that's fixed now
> 
> PATCHv5:
> - Added preinit hook to reset SamKnows Whitebox 8 u-boot boot counter
> to prevent soft brick by booting into nonexistent backup partition
> - Broke 2.4GHz WiFi but 5GHz sorta works (swapped pcie0/1 in DTS,
> needs further investigation, effective txpower is still 0)
> - Experimenting on wifi but that'll be a future patch, board boots fine now.
> 
> PATCHv6:
> - Used init script to reset bootcount, preinit is too early to use fw-setenv
> 
> PATCHv7:
> - Added model to sysupgrade. Tested thoroughly in general and I'm happy with 
> this. Sorry for the many revisions.
> 
> PATCHv8:
> - Added SamKnows recovery partition to partition table, in case someone 
> specifically wants to send their bootloader to it
> - Fixed Wi-Fi by patching MT7602EN device ID (shows up as 7612) into mt76 
> kernel module (verified that signal strength on both bands is good, tested AP 
> and STA modes
> 
> PATCHv9:
> - Fixed LAN MAC address EEPROM offset
> - Fixed mt76 patch whitespace issues
> - Renamed mt76 patch to mt7602en to accurately reflect the physical chip it's 
> supporting
> 
> Author: Andrew Yong 
> Date:   Wed Apr 27 05:40:26 2016 +0800
> 
> Initial support for SamKnows Whitebox 8
> 
> Signed-off-by: Andrew Yong 
> 
> diff --git a/000-mt7602en.patch b/000-mt7602en.patch
> new file mode 100644
> index 000..e357bbb
> --- /dev/null
> +++ b/000-mt7602en.patch
> @@ -0,0 +1,10 @@
> +--- a/mt76x2_pci.c
>  b/mt76x2_pci.c
> +@@ -20,6 +20,7 @@
> + 
> + static const struct pci_device_id mt76pci_device_table[] = {
> +   { PCI_DEVICE(0x14c3, 0x7662) },
> ++  { PCI_DEVICE(0x14c3, 0x7612) },
> +   { },
> + };
> + 
> diff --git a/package/boot/uboot-envtools/files/ramips 
> b/package/boot/uboot-envtools/files/ramips
> index a759bcc..9ad5974 100644
> --- a/package/boot/uboot-envtools/files/ramips
> +++ b/package/boot/uboot-envtools/files/ramips
> @@ -24,7 +24,8 @@ linkits7688d | \
>  wsr-600 | \
>  wsr-1166 | \
>  br6425 | \
> -miwifi-nano)
> +miwifi-nano | \
> +sk-wb8)
> ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1"
> ;;
>  esac
> diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
> b/target/linux/ramips/base-files/etc/board.d/01_leds
> index aeaab33..a47eacf 100755
> --- a/target/linux/ramips/base-files/etc/board.d/01_leds
> +++ b/target/linux/ramips/base-files/etc/board.d/01_leds
> @@ -243,6 +243,9 @@ rt-n14u)
> set_wifi_led "$board:blue:air"
> set_usb_led "$board:blue:usb"
> ;;
> +sk-wb8)
> +   set_usb_led "$board:green:usb"
> +   ;;
>  tiny-ac)
> set_wifi_led "$board:orange:wifi"
> set_usb_led "$board:green:usb"
> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
> b/target/linux/ramips/base-files/etc/board.d/02_network
> index c6c740f..4bc1d6e 100755
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -77,6 +77,7 @@ ramips_setup_interfaces()
> pbr-m1|\
> psg1208|\
> sap-g3200u3|\
> +   sk-wb8|\
> wf-2881|\
> whr-300hp2|\
> whr-600d|\
> @@ -313,6 +314,9 @@ ramips_setup_macs()
> 

Re: [OpenWrt-Devel] [PATCH 2/6] dropbear: Make utmp and putuline support configurable via seperate config options

2016-04-29 Thread John Crispin
Hi,

comment inline

On 27/04/2016 11:13, Hans Dedecker wrote:
> Utmp support tracks who is currenlty logged in by logging info to the file 
> /var/run/utmp (supported by busybox)
> Putuline support will use the utmp structure to write to the utmp file
> 
> Signed-off-by: Hans Dedecker 
> ---
>  package/network/services/dropbear/Config.in | 15 +++
>  package/network/services/dropbear/Makefile  |  5 ++---
>  2 files changed, 17 insertions(+), 3 deletions(-)
> 
> diff --git a/package/network/services/dropbear/Config.in 
> b/package/network/services/dropbear/Config.in
> index 3316c84..7c2edd7 100644
> --- a/package/network/services/dropbear/Config.in
> +++ b/package/network/services/dropbear/Config.in
> @@ -32,4 +32,19 @@ config DROPBEAR_ECC
>  
>   Increases binary size by about 23 kB (MIPS).
>  
> +config DROPBEAR_UTMP
> + bool "Utmp support"
> + default n
> + depends on BUSYBOX_CONFIG_FEATURE_UTMP
> + help
> + This enables dropbear utmp support, the file /var/run/utmp is 
> used to
> + track who is currently logged in.
> +
> +config DROPBEAR_PUTUTLINE
> + bool "Pututline support"
> + default n
> + depends on DROPBEAR_UTMP
> + help
> + Dropbear will use pututline() to write the utmp structure into 
> the utmp file.
> +
>  endmenu
> diff --git a/package/network/services/dropbear/Makefile 
> b/package/network/services/dropbear/Makefile
> index 39ab04b..593e0a8 100644
> --- a/package/network/services/dropbear/Makefile
> +++ b/package/network/services/dropbear/Makefile
> @@ -68,12 +68,11 @@ CONFIGURE_ARGS += \
>   --enable-syslog \
>   $(if $(CONFIG_SHADOW_PASSWORDS),,--disable-shadow) \
>   --disable-lastlog \
> - --disable-utmp \
> - --disable-utmpx \
> + $(if $(CONFIG_DROPBEAR_UTMP),,--disable-utmp) \

what happened to --disable-utmpx ?

John

>   --disable-wtmp \
>   --disable-wtmpx \
>   --disable-loginfunc \
> - --disable-pututline \
> + $(if $(CONFIG_DROPBEAR_PUTUTLINE),,--disable-pututline) \
>   --disable-pututxline \
>   --disable-zlib \
>   --enable-bundled-libtom
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel