Re: [LEDE-DEV] 1043ND v2.1 LEDE trunk kernel panic

2016-05-23 Thread John Crispin


On 24/05/2016 07:33, Yousong Zhou wrote:
> On 24 May 2016 at 12:35, John Crispin  wrote:
>>
>>
>> On 24/05/2016 02:00, A. Benz wrote:
>>> Hi
>>>
>>> Trunk build of LEDE gets a kernel panic on TPLink 1043ND v2.1
>>>
>>> See log:
>>> http://paste.debian.net/698070/
>>>
>>
>> looks like there is no rootfs flashed. whih image did you use ?
>>
>> John
> 
> Just in case it may help, last time we saw that "Attempted to kill
> init, exitcode=0x4" was in malta-on-qemu [1].  The exitcode 4 there
> was caused by SIGILL but that one also had a stack trace.
> 
> [1] https://dev.openwrt.org/ticket/16881
> 
> yousong
> 


i have a 1043 v2.1 here, let me try and build an image for it just now

John

>>
>> ___
>> Lede-dev mailing list
>> Lede-dev@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/lede-dev
> 
> ___
> Lede-dev mailing list
> Lede-dev@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
> 

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] Multi-Profile selection support

2016-05-23 Thread Rafał Miłecki
On 23 May 2016 at 13:38, Felix Fietkau  wrote:
> You can find my work in progress in my staging tree:
> https://git.lede-project.org/?p=lede/nbd/staging.git;a=summary
>
> If you have some time, feedback and patches converting profiles/* stuff
> into proper device profiles will be appreciated.

I'm afraid building bcm53xx images doesn't work anymore using your
tree. Can you verify that?
> ls bin/targets/bcm53xx/generic/
md5sums
packages
sha256sums

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] 1043ND v2.1 LEDE trunk kernel panic

2016-05-23 Thread John Crispin


On 24/05/2016 02:00, A. Benz wrote:
> Hi
> 
> Trunk build of LEDE gets a kernel panic on TPLink 1043ND v2.1
> 
> See log:
> http://paste.debian.net/698070/
> 

looks like there is no rootfs flashed. whih image did you use ?

John

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH ubus] ubusd: fix systemd socket activation support

2016-05-23 Thread Matthias Schiffer
62cdfc3 added systemd units including a ubus.socket unit, but didn't
actually add socket activation support to ubusd. This would cause the first
connection that activated ubusd to hang (as ubusd ignored it), and stopping
ubusd would break it completely (as ubusd removed the socket file).

The ENABLE_SYSTEMD default is changed to OFF as the socket activation uses
libsystemd, so setting ENABLE_SYSTEMD to ON will now require libsystemd.

Signed-off-by: Matthias Schiffer 
---
 CMakeLists.txt | 15 ++-
 ubusd.c| 39 ---
 2 files changed, 42 insertions(+), 12 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e21a046..faab342 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,7 +5,7 @@ ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 
-Wmissing-declarations)
 
 OPTION(BUILD_LUA "build Lua plugin" ON)
 OPTION(BUILD_EXAMPLES "build examples" ON)
-OPTION(ENABLE_SYSTEMD "systemd support" ON)
+OPTION(ENABLE_SYSTEMD "systemd support" OFF)
 
 SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
 SET(UBUS_UNIX_SOCKET "/var/run/ubus.sock")
@@ -60,8 +60,13 @@ SET(UBUSD_BINARY "${CMAKE_INSTALL_PREFIX}/sbin/ubusd")
 # do this after the installs so we have the proper paths
 IF(ENABLE_SYSTEMD)
   INCLUDE(FindPkgConfig)
-  PKG_CHECK_MODULES(SYSTEMD systemd)
-  IF(SYSTEMD_FOUND)
-ADD_SUBDIRECTORY(systemd)
-  ENDIF()
+  PKG_CHECK_MODULES(SYSTEMD libsystemd REQUIRED)
+
+  SET_PROPERTY(TARGET ubusd APPEND PROPERTY COMPILE_FLAGS "${SYSTEMD_CFLAGS}")
+  SET_PROPERTY(TARGET ubusd APPEND PROPERTY LINK_FLAGS "${SYSTEMD_LDFLAGS}")
+  SET_PROPERTY(TARGET ubusd APPEND PROPERTY INCLUDE_DIRECTORIES 
${SYSTEMD_INCLUDE_DIRS})
+  TARGET_LINK_LIBRARIES(ubusd ${SYSTEMD_LIBRARIES})
+  ADD_DEFINITIONS( -DENABLE_SYSTEMD)
+
+  ADD_SUBDIRECTORY(systemd)
 ENDIF()
diff --git a/ubusd.c b/ubusd.c
index 7279a70..5b1d52c 100644
--- a/ubusd.c
+++ b/ubusd.c
@@ -22,6 +22,9 @@
 #include 
 #include 
 #include 
+#ifdef ENABLE_SYSTEMD
+#include 
+#endif
 
 #include 
 #include 
@@ -380,8 +383,12 @@ static void sighup_handler(int sig)
 int main(int argc, char **argv)
 {
const char *ubus_socket = UBUS_UNIX_SOCKET;
+   bool remove_socket = true;
int ret = 0;
int ch;
+#ifdef ENABLE_SYSTEMD
+   int n_fds;
+#endif
 
signal(SIGPIPE, SIG_IGN);
signal(SIGHUP, sighup_handler);
@@ -402,19 +409,37 @@ int main(int argc, char **argv)
}
}
 
-   unlink(ubus_socket);
-   umask(0111);
-   server_fd.fd = usock(USOCK_UNIX | USOCK_SERVER | USOCK_NONBLOCK, 
ubus_socket, NULL);
-   if (server_fd.fd < 0) {
-   perror("usock");
-   ret = -1;
+#ifdef ENABLE_SYSTEMD
+   n_fds = sd_listen_fds(1);
+   if (n_fds > 1) {
+   fprintf(stderr, "Too many file descriptors received.\n");
+   ret = -1;
goto out;
+   } else if (n_fds == 1) {
+   server_fd.fd = SD_LISTEN_FDS_START + 0;
+   fcntl(server_fd.fd, F_SETFD, fcntl(server_fd.fd, F_GETFD) | 
FD_CLOEXEC);
+   fcntl(server_fd.fd, F_SETFL, fcntl(server_fd.fd, F_GETFL) | 
O_NONBLOCK);
+
+   remove_socket = false;
+   } else
+#endif
+   {
+   unlink(ubus_socket);
+   umask(0111);
+   server_fd.fd = usock(USOCK_UNIX | USOCK_SERVER | 
USOCK_NONBLOCK, ubus_socket, NULL);
+   if (server_fd.fd < 0) {
+   perror("usock");
+   ret = -1;
+   goto out;
+   }
}
uloop_fd_add(_fd, ULOOP_READ | ULOOP_EDGE_TRIGGER);
ubusd_acl_load();
 
uloop_run();
-   unlink(ubus_socket);
+
+   if (remove_socket)
+   unlink(ubus_socket);
 
 out:
uloop_done();
-- 
2.8.2


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCHv3 2/2] x86: generalize partition discovery for sysupgrade

2016-05-23 Thread Russell Senior

adds support for mmc on apu2

also adds /usr/bin/find to the ramdisk during flashing.
find is busybox, so the space consequences should be tiny.

Signed-off-by: Russell Senior 
---
 package/base-files/files/lib/upgrade/common.sh |  1 +
 .../x86/base-files/lib/preinit/79_move_config  |  6 +-
 .../linux/x86/base-files/lib/upgrade/platform.sh   | 68 +++---
 3 files changed, 52 insertions(+), 23 deletions(-)

diff --git a/package/base-files/files/lib/upgrade/common.sh 
b/package/base-files/files/lib/upgrade/common.sh
index 0383d25..08f7d43 100644
--- a/package/base-files/files/lib/upgrade/common.sh
+++ b/package/base-files/files/lib/upgrade/common.sh
@@ -55,6 +55,7 @@ run_ramfs() { #  [...]
/bin/cut /usr/bin/printf /bin/sync /bin/mkdir /bin/rmdir
\
/bin/rm /usr/bin/basename /bin/kill /bin/chmod
 
+   install_bin /usr/bin/find
install_bin /bin/uclient-fetch /bin/wget
install_bin /sbin/mtd
install_bin /sbin/mount_root
diff --git a/target/linux/x86/base-files/lib/preinit/79_move_config 
b/target/linux/x86/base-files/lib/preinit/79_move_config
index 1d4873d..00d1cb5 100644
--- a/target/linux/x86/base-files/lib/preinit/79_move_config
+++ b/target/linux/x86/base-files/lib/preinit/79_move_config
@@ -4,8 +4,10 @@
 move_config() {
. /lib/upgrade/platform.sh
 
-   if platform_export_bootpart; then
-   mount -t ext4 -o rw,noatime "$BOOTPART" /mnt
+   if platform_export_bootdev; then
+   local bootpart="/dev/$(platform_devname_by_partnum 1)"
+
+   mount -t ext4 -o rw,noatime "$bootpart" /mnt
mv -f /mnt/sysupgrade.tgz /
umount /mnt
fi
diff --git a/target/linux/x86/base-files/lib/upgrade/platform.sh 
b/target/linux/x86/base-files/lib/upgrade/platform.sh
index 29eac77..8b6598f 100644
--- a/target/linux/x86/base-files/lib/upgrade/platform.sh
+++ b/target/linux/x86/base-files/lib/upgrade/platform.sh
@@ -1,5 +1,20 @@
-platform_export_bootpart() {
+platform_devname_by_partnum() {
+   local uevent
+   local MAJOR MINOR DEVNAME DEVTYPE
+   local offset="$1"
+   for uevent in /sys/class/block/*/uevent; do
+. "$uevent"
+if [ $BOOTDEV_MAJOR = $MAJOR -a $((BOOTDEV_MINOR + $offset)) = 
$MINOR ]; then
+echo "$DEVNAME"
+break
+fi
+done
+}
+
+platform_export_bootdev() {
local cmdline uuid disk
+   local uevent
+   local MAJOR MINOR DEVNAME DEVTYPE
 
if read cmdline < /proc/cmdline; then
case "$cmdline" in
@@ -17,20 +32,25 @@ platform_export_bootpart() {

PARTUUID=[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]-02)
uuid="${disk#PARTUUID=}"
uuid="${uuid%-02}"
-   for disk in /dev/*; do
-   [ -b "$disk" ] || continue
+   for disk in $(find /dev -type b); do
set -- $(dd if=$disk bs=1 skip=440 
count=4 2>/dev/null | hexdump -v -e '4/1 "%02x "')
if [ "$4$3$2$1" = "$uuid" ]; then
-   export BOOTPART="${disk}1"
-   return 0
+   
uevent="/sys/class/block/${disk##*/}/uevent"
+   break
fi
done
;;
/dev/*)
-   export BOOTPART="${disk%[0-9]}1"
-   return 0
+   uevent="/sys/class/block/${disk##*/}/uevent"
;;
esac
+
+   if [ -e "$uevent" ]; then
+   . "$uevent"
+   export BOOTDEV_MAJOR=$MAJOR
+   export BOOTDEV_MINOR=$MINOR
+   return 0
+   fi
fi
 
return 1
@@ -49,8 +69,10 @@ platform_check_image() {
 }
 
 platform_copy_config() {
-   if [ -b "$BOOTPART" ]; then
-   mount -t ext4 -o rw,noatime "$BOOTPART" /mnt
+   local bootpart="/dev/$(platform_devname_by_partnum 1)"
+
+   if [ -b "$bootpart" ]; then
+   mount -t ext4 -o rw,noatime "$bootpart" /mnt
cp -af "$CONF_TAR" /mnt/
umount /mnt
fi
@@ -87,18 +109,21 @@ get_partitions() { #  
 }
 
 platform_do_upgrade() {
-   platform_export_bootpart
-   disk="${BOOTPART%[0-9]}"
+   platform_export_bootdev
+   local disk="$(platform_devname_by_partnum 0)"
+   local fulldisk="/dev/$disk"
+   local fullpart
+
 
-   if [ -b "$disk" ]; then
+   

Re: [LEDE-DEV] [PATCH] _GNU_SOURCE should be defined for building vs uClibc

2016-05-23 Thread John Crispin


On 23/05/2016 20:12, Waldemar Brodkorb wrote:
> Hi John,
> John Crispin wrote,
> 
>> Hi,
>> is it really a gnu extension or is uclibc b0rked for these symbols ?
> 
> I think it isn't b0rked.
> It was added for ARM GNU libc here under #ifdef __USE_GNU:
> https://sourceware.org/git/?p=glibc.git;a=blobdiff;f=sysdeps/unix/sysv/linux/arm/bits/fcntl.h;h=aa2d36ca80f0ca4c5793b28b3852ce60b5fe57ef;hp=6a5f89ad1f8bdf8a825fc1e55a84679a86349a6c;hb=adb252daea96e7e160553703d477b76ff6a7781e;hpb=01b5049d107460f5eca797eda983958d1a410ffd
> 
> And later moved to generic fcntl.h file. So we are correct here or
> at least compatible to GNU libc.
> 
> best regards
>  Waldemar
>  

ok, i'll merge it later today or in the morning

John

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] _GNU_SOURCE should be defined for building vs uClibc

2016-05-23 Thread Waldemar Brodkorb
Hi John,
John Crispin wrote,

> Hi,
> is it really a gnu extension or is uclibc b0rked for these symbols ?

I think it isn't b0rked.
It was added for ARM GNU libc here under #ifdef __USE_GNU:
https://sourceware.org/git/?p=glibc.git;a=blobdiff;f=sysdeps/unix/sysv/linux/arm/bits/fcntl.h;h=aa2d36ca80f0ca4c5793b28b3852ce60b5fe57ef;hp=6a5f89ad1f8bdf8a825fc1e55a84679a86349a6c;hb=adb252daea96e7e160553703d477b76ff6a7781e;hpb=01b5049d107460f5eca797eda983958d1a410ffd

And later moved to generic fcntl.h file. So we are correct here or
at least compatible to GNU libc.

best regards
 Waldemar
 

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] _GNU_SOURCE should be defined for building vs uClibc

2016-05-23 Thread Felix Fietkau
On 2016-05-23 20:03, John Crispin wrote:
> Hi,
> is it really a gnu extension or is uclibc b0rked for these symbols ?
At least O_PATH is Linux specific, so defining _GNU_SOURCE makes sense.

- Felix

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] _GNU_SOURCE should be defined for building vs uClibc

2016-05-23 Thread Alexey Brodkin
In uClibc-ng O_PATH and O_DIRECTORY are only defined if _GNU_SOURCE is
defined.

So explicitly define _GNU_SOURCE in sources that use O_PATH and
O_DIRECTORY.

Without that extra definition that's what happens when building procd.

utils/utils.c:
->8--
.../openwrt/build_dir/target-arc_arc700_uClibc-1.0.14/procd-2016-05-19/utils/utils.c:
In function 'patch_fd':
.../openwrt/build_dir/target-arc_arc700_uClibc-1.0.14/procd-2016-05-19/utils/utils.c:168:22:
error: 'O_PATH' undeclared (first use in this function)
   dfd = open("/dev", O_PATH|O_DIRECTORY);
  ^
.../openwrt/build_dir/target-arc_arc700_uClibc-1.0.14/procd-2016-05-19/utils/utils.c:168:22:
note: each undeclared identifier is reported only once for each function
it appears in
.../openwrt/build_dir/target-arc_arc700_uClibc-1.0.14/procd-2016-05-19/utils/utils.c:168:29:
error: 'O_DIRECTORY' undeclared (first use in this function)
   dfd = open("/dev", O_PATH|O_DIRECTORY);
 ^
CMakeFiles/init.dir/build.make:182: recipe for target
'CMakeFiles/init.dir/utils/utils.c.o' failed
->8--

inittab.c:
->8--
.../openwrt/build_dir/target-arc_arc700_uClibc-1.0.14/procd-2016-05-19/inittab.c:
In function 'dev_exist':
.../openwrt/build_dir/target-arc_arc700_uClibc-1.0.14/procd-2016-05-19/inittab.c:72:21:
error: 'O_PATH' undeclared (first use in this function)
  dfd = open("/dev", O_PATH|O_DIRECTORY);
 ^
.../git/openwrt/build_dir/target-arc_arc700_uClibc-1.0.14/procd-2016-05-19/inittab.c:72:21:
note: each undeclared identifier is reported only once for each function
it appears in
.../git/openwrt/build_dir/target-arc_arc700_uClibc-1.0.14/procd-2016-05-19/inittab.c:72:28:
error: 'O_DIRECTORY' undeclared (first use in this function)
  dfd = open("/dev", O_PATH|O_DIRECTORY);
^
CMakeFiles/procd.dir/build.make:134: recipe for target
'CMakeFiles/procd.dir/inittab.c.o' failed
make[6]: *** [CMakeFiles/procd.dir/inittab.c.o] Error 1
->8--

Signed-off-by: Alexey Brodkin 
Cc: Waldemar Brodkorb 
Cc: John Crispin 
Cc: Jo-Philipp Wich 
---
 inittab.c | 1 +
 utils/utils.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/inittab.c b/inittab.c
index 528396e..6dde11a 100644
--- a/inittab.c
+++ b/inittab.c
@@ -12,6 +12,7 @@
  * GNU General Public License for more details.
  */
 
+#define _GNU_SOURCE
 #include 
 #include 
 #include 
diff --git a/utils/utils.c b/utils/utils.c
index e2e3396..8f14aad 100644
--- a/utils/utils.c
+++ b/utils/utils.c
@@ -12,6 +12,7 @@
  * GNU General Public License for more details.
  */
 
+#define _GNU_SOURCE
 #include 
 #include 
 #include "utils.h"
-- 
2.5.5


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 2/2] [RFC] ar71xx/cpe510: use second wifi calibration table

2016-05-23 Thread Felix Fietkau
On 2016-05-23 19:19, Matthias Schiffer wrote:
> On 05/23/2016 03:23 AM, Alexander Couzens wrote:
>> The cpe510 has two calibration tables. The first calibration
>> table requires to modify ath9k driver to work (patched tx gain table).
> 
> Hi,
> do you have any idea if the TP-Link firmware also uses the second
> calibration table, or if their version of the WLAN driver is modified in a
> way similar to the ath9k patch you sent a few days ago?
Both. I dissected the driver and there seems to be an internal flag that
decides whether it uses one or the other. Debug printfs in that code
indicate that the second table is the high power table.

- Felix

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 2/2] [RFC] ar71xx/cpe510: use second wifi calibration table

2016-05-23 Thread Matthias Schiffer
On 05/23/2016 03:23 AM, Alexander Couzens wrote:
> The cpe510 has two calibration tables. The first calibration
> table requires to modify ath9k driver to work (patched tx gain table).

Hi,
do you have any idea if the TP-Link firmware also uses the second
calibration table, or if their version of the WLAN driver is modified in a
way similar to the ath9k patch you sent a few days ago?

I find it quite unfortunate that we can't support both devices using a
single image, even though the original firmware can. The CPE210 and CPE510
can be easily differentiated by looking at the product-info partition, so
the caldata address could be chosen accordingly.

Regards,
Matthias


> 
> Signed-off-by: Alexander Couzens 
> ---
>  target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c 
> b/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
> index 74daf43..875589d 100644
> --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
> @@ -117,7 +117,7 @@ static void __init cpe210_setup(void)
>  static void __init cpe510_setup(void)
>  {
>   u8 *mac = (u8 *) KSEG1ADDR(0x1f830008);
> - u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
> + u8 *ee = (u8 *) KSEG1ADDR(0x1fff5000);
>  
>   cpe_setup(mac);
>  
> 




signature.asc
Description: OpenPGP digital signature
___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [RFC] uhttpd: [PATCH 1/2] modules: Add proxy module

2016-05-23 Thread Felix Fietkau
On 2016-05-23 17:12, Jo-Philipp Wich wrote:
> Hi Daniel,
> 
> from a cursory look the code looks okay to me so far however I'd really
> love to see this getting added as loadable plugin.
> 
> Do you think it is feasible to do? We might need to extend "struct
> uhttpd_ops" for that but that should be no problem as long as new
> members are getting added at the end.
I think the json_script support might be a suitable way to hook into url
handling and configure proxy support. I think that's way more flexible
than adding even more tricks to the already overused prefix matching code.

- Felix


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [RFC] uhttpd: [PATCH 1/2] modules: Add proxy module

2016-05-23 Thread Jo-Philipp Wich
Hi Daniel,

from a cursory look the code looks okay to me so far however I'd really
love to see this getting added as loadable plugin.

Do you think it is feasible to do? We might need to extend "struct
uhttpd_ops" for that but that should be no problem as long as new
members are getting added at the end.

~ Jo

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] WRT1900ACS Testing

2016-05-23 Thread Dave Taht
We had found some pretty major performance problems on this hardware
as of a few months ago. I am curious if they still exist? A whole
bunch of benchmarks went by on the cerowrt-devel list, also.

They were:

1) broken local ethernet network stack - running 4 copies of netperf
against it - one would grab all the bandwidth and the other three
barely even start or hang completely.

2) No BQL in the ethernet driver

3) Wifi was horribly overbuffered in general

4) Wifi would crash against flent's rrul test.


On Thu, May 19, 2016 at 3:37 AM, Dheeran Senthilvel
 wrote:
> Hi,
> I am currently running LEDE r274 build dated 18-May-2015. The build seems to 
> be stable as of now, have been flashing the images ever since the snapshot 
> was made available in the repository. Current Status of the device is as 
> follows,
>
> # Wireless - both 2.4Ghz (@297MB/s) and 5Ghz(@1079MB/s) are working 
> fine.(Speed tested using iperf).
>
> # USB - Not Tested
>
> # LEDs - Only Power, WiFi & LAN leds are functioning. WAN & USB are 
> not working (Similar OpenWrt Ticket - https://dev.openwrt.org/ticket/21825)
>
> #Terminal Output
>
>
>>root@Shelby:~# lsmod
>
> ahci_mvebu  1653  0
> ahci_platform   2367  0
> armada_thermal  3284  0
> cfg80211  220675  2 mwlwifi
> compat 13025  2 mac80211
> crc_ccitt979  1 ppp_async
> ehci_hcd   34246  2 ehci_orion
> ehci_orion  2563  0
> ehci_platform   4368  0
> gpio_button_hotplug 5988  0
> hwmon   2026  3 tmp421
> i2c_core   18339  3 tmp421
> i2c_dev 4551  0
> i2c_mv64xxx 7033  0
> ip6_tables  9625  3 ip6table_raw
> ip6t_REJECT 1056  2
> ip6table_filter  682  1
> ip6table_mangle 1042  1
> ip6table_raw 648  0
> ip_tables   9775  4 iptable_nat
> ipt_MASQUERADE   698  1
> ipt_REJECT   914  2
> iptable_filter   736  1
> iptable_mangle   868  1
> iptable_nat 1029  1
> iptable_raw  702  0
> ledtrig_usbdev  2307  0
> libahci19501  3 ahci_mvebu
> libahci_platform4501  2 ahci_mvebu
> libata127382  5 ahci_mvebu
> mac80211  401118  1 mwlwifi
> mmc_block  21754  0
> mmc_core   77838  2 mvsdio
> mvsdio  7362  0
> mwlwifi69628  0
> nf_conntrack   60523  9 nf_nat_ipv4
> nf_conntrack_ipv4   6125 11
> nf_conntrack_ipv6   6564  6
> nf_conntrack_rtcache2461  0
> nf_defrag_ipv4   884  1 nf_conntrack_ipv4
> nf_defrag_ipv6 13185  1 nf_conntrack_ipv6
> nf_log_common   2407  2 nf_log_ipv4
> nf_log_ipv4 3218  0
> nf_log_ipv6 3663  0
> nf_nat 10036  4 nf_nat_ipv4
> nf_nat_ipv4 4054  1 iptable_nat
> nf_nat_masquerade_ipv41509  1 ipt_MASQUERADE
> nf_nat_redirect  919  1 xt_REDIRECT
> nf_reject_ipv4  1911  1 ipt_REJECT
> nf_reject_ipv6  2236  1 ip6t_REJECT
> nls_base5190  1 usbcore
> ppp_async   6521  0
> ppp_generic19930  3 pppoe
> pppoe   8047  0
> pppox   1239  1 pppoe
> pwm_fan 2840  0
> sata_mv26825  0
> scsi_mod   88117  3 usb_storage
> sd_mod 23412  0
> slhc4543  1 ppp_generic
> thermal_sys20307  2 armada_thermal
> tmp421  2500  0
> usb_common  1676  1 usbcore
> usb_storage37368  0
> usbcore   120847  8 ledtrig_usbdev
> x_tables   10689 26 ipt_REJECT
> xhci_hcd   81489  2 xhci_plat_hcd
> xhci_pci2324  0
> xhci_plat_hcd   3897  0
> xt_CT   2797  0
> xt_LOG   851  0
> xt_REDIRECT  825  0
> xt_TCPMSS   2660  2
> xt_comment   511 62
> xt_conntrack2516 16
> xt_id506129
> xt_limit1241 20
> xt_mac   631  0
> xt_mark  704  0
> xt_multiport1308  0
> xt_nat  1329  0
> xt_state 801  0
> xt_tcpudp   1800 10
> xt_time 1670  0
>
>>root@Shelby:~# cat /etc/config/system
>
> config system
> option hostname 'Shelby'
> option timezone 'IST-5:30'
> option ttylogin '0'
>
> config timeserver 'ntp'
> list server '0.openwrt.pool.ntp.org'
> list server '1.openwrt.pool.ntp.org'
> list server '2.openwrt.pool.ntp.org'
> list server '3.openwrt.pool.ntp.org'
> option enabled '1'
> option enable_server '0'
>
> config led 'led_wan'
> option name 'WAN'
> option sysfs 'pca963x:shelby:white:wan'
> option 

Re: [LEDE-DEV] [PATCH v2] busybox: sysntpd - Support for NTP servers received via DHCP(v6)

2016-05-23 Thread Jo-Philipp Wich
Hi Hans,

staged in
https://git.lede-project.org/?p=lede/jow/staging.git;a=commitdiff;h=cd82680f1b25ed7a2acc267b643a4ae72d166002
with a minor correction; I moved the new dependency to the runtime
DEPENDS not to the build dependency spec.

~ Jo

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] package/util-linux: Fix libmount build under uClibc

2016-05-23 Thread Alexey Brodkin
This fixes util-linux building with uClibc.
Patch is taken as it is from Buildroot:
https://git.busybox.net/buildroot/plain/package/util-linux/0001-Fix-libmount-build-under-uClibc.patch?id=baccb506a6feabf114623866568121f49712f5df

Signed-off-by: Alexey Brodkin 
---
 .../004-Fix-libmount-build-under-uClibc.patch  | 153 +
 1 file changed, 153 insertions(+)
 create mode 100644 
package/utils/util-linux/patches/004-Fix-libmount-build-under-uClibc.patch

diff --git 
a/package/utils/util-linux/patches/004-Fix-libmount-build-under-uClibc.patch 
b/package/utils/util-linux/patches/004-Fix-libmount-build-under-uClibc.patch
new file mode 100644
index 000..10cc3a5
--- /dev/null
+++ b/package/utils/util-linux/patches/004-Fix-libmount-build-under-uClibc.patch
@@ -0,0 +1,153 @@
+From 44d733203637666926964957af7af23429ddcecf Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias 
+Date: Mon, 18 Apr 2016 09:58:56 -0300
+Subject: [PATCH] Fix libmount build under uClibc
+
+See https://bugs.gentoo.org/show_bug.cgi?id=406303
+http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-apps/util-linux/files/util-linux-2.21.1-no-printf-alloc.patch?revision=1.2
+
+[Gustavo: converted to git format for 2.28]
+
+Signed-off-by: Gustavo Zacarias 
+---
+ configure.ac |  1 -
+ libmount/src/tab_parse.c | 52 
+ 2 files changed, 52 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 5a00403..3422f11 100644
+--- a/configure.ac
 b/configure.ac
+@@ -948,7 +948,6 @@ AC_ARG_ENABLE([libmount],
+ )
+ UL_BUILD_INIT([libmount])
+ UL_REQUIRES_BUILD([libmount], [libblkid])
+-UL_REQUIRES_HAVE([libmount], [scanf_alloc_modifier], [scanf string alloc 
modifier])
+ AM_CONDITIONAL([BUILD_LIBMOUNT], [test "x$build_libmount" = xyes])
+ AM_CONDITIONAL([BUILD_LIBMOUNT_TESTS], [test "x$build_libmount" = xyes -a 
"x$enable_static" = xyes])
+ AS_IF([test "x$build_libmount" = xyes], [
+diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c
+index 3f5e14a..2ff1795 100644
+--- a/libmount/src/tab_parse.c
 b/libmount/src/tab_parse.c
+@@ -39,6 +39,10 @@ static void parser_cleanup(struct libmnt_parser *pa)
+   memset(pa, 0, sizeof(*pa));
+ }
+ 
++#ifndef HAVE_SCANF_MS_MODIFIER
++# define UL_SCNsA "%s"
++#endif
++
+ static int next_number(char **s, int *num)
+ {
+   char *end = NULL;
+@@ -69,16 +73,31 @@ static int mnt_parse_table_line(struct libmnt_fs *fs, char 
*s)
+   int rc, n = 0, xrc;
+   char *src = NULL, *fstype = NULL, *optstr = NULL;
+ 
++#ifndef HAVE_SCANF_MS_MODIFIER
++  size_t len = strlen(s) + 1;
++  src = malloc(len);
++  fstype = malloc(len);
++  fs->target = malloc(len);
++  optstr = malloc(len);
++#endif
++
+   rc = sscanf(s,  UL_SCNsA" " /* (1) source */
+   UL_SCNsA" " /* (2) target */
+   UL_SCNsA" " /* (3) FS type */
+   UL_SCNsA" " /* (4) options */
+   "%n",   /* byte count */
+ 
++#ifdef HAVE_SCANF_MS_MODIFIER
+   ,
+   >target,
+   ,
+   ,
++#else
++  src,
++  fs->target,
++  fstype,
++  optstr,
++#endif
+   );
+   xrc = rc;
+ 
+@@ -144,6 +163,16 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, 
char *s)
+   unsigned int maj, min;
+   char *fstype = NULL, *src = NULL, *p;
+ 
++#ifndef HAVE_SCANF_MS_MODIFIER
++  size_t len = strlen(s) + 1;
++  fs->root = malloc(len);
++  fs->target = malloc(len);
++  fs->vfs_optstr = malloc(len);
++  fs->fs_optstr = malloc(len);
++  fstype = malloc(len);
++  src = malloc(len);
++#endif
++
+   rc = sscanf(s,  "%d "   /* (1) id */
+   "%d "   /* (2) parent */
+   "%u:%u "/* (3) maj:min */
+@@ -155,9 +184,15 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, 
char *s)
+   >id,
+   >parent,
+   , ,
++#ifdef HAVE_SCANF_MS_MODIFIER
+   >root,
+   >target,
+   >vfs_optstr,
++#else
++  fs->root,
++  fs->target,
++  fs->vfs_optstr,
++#endif
+   );
+ 
+   if (rc >= 7 && end > 0)
+@@ -177,9 +212,15 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, 
char *s)
+   UL_SCNsA" " /* (9) source */
+   UL_SCNsA,   /* (10) fs options (fs specific) */
+ 
++#ifdef HAVE_SCANF_MS_MODIFIER
+   ,
+   ,
+   >fs_optstr);
++#else
++  fstype,
++   

Re: [LEDE-DEV] [OpenWrt-Devel] Why does multiple instance dnsmasq work with jails but not without?

2016-05-23 Thread Shankar Unni
IIRC, your patch did not specify different -x options to each instance
to ensure that the PID files were written to separate files. That's at
least one issue that occasionally caused races at startup.

On Tue, May 17, 2016 at 11:24 PM, Daniel Dickinson
 wrote:
> Hi all,
>
> I had a patch that I submitted to the openwrt list sometime back that
> launched multiple instances of dnsmasq, so long as the instances were
> either tied to specific, non-overlapping, interfaces, or used different
> dns port, but at least in the case of different interfaces it only
> worked (to my dismay) if jails were in use.  Without jails only a single
> instance of dnsmasq would start.
>
> Does anyone know why this is?
>
> (The use case is to serve a guest vlan with a dnsmasq instance that
> forced the to use the opendns familyshield filter (since the point of
> guest vlan is you don't necessarily know how far to trust the people on
> the guest vlan (for a separate wifi SSID)).
>
> Regards,
>
> Daniel
> ___
> openwrt-devel mailing list
> openwrt-de...@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH v2] busybox: sysntpd - Support for NTP servers received via DHCP(v6)

2016-05-23 Thread Hans Dedecker
The busybox ntpd utility currently uses ntp servers specified in uci.
This patch allows the ntpd utility to use NTP servers received via DHCP(v6)
Following uci parameters have been added:
use_dhcp : enables NTP server config via DHCP(v6)
dhcp_interface : use NTP servers received only on the specified DHCP(v6) 
interfaces; if empty all interfaces are considered

Signed-off-by: Hans Dedecker 
---

v1 -> v2:
Make jsonfilter dependant on BUSYBOX_CONFIG_NTPD
Pipe output of network dump into jsonfilter
use_dhcp is by default enabled
Install fine grained procd interface triggers if dhcp_interface is 
configured

 package/utils/busybox/Makefile  |  4 +--
 package/utils/busybox/files/sysntpd | 57 +
 2 files changed, 54 insertions(+), 7 deletions(-)

diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile
index 24c064c..e5b55e0 100644
--- a/package/utils/busybox/Makefile
+++ b/package/utils/busybox/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=busybox
 PKG_VERSION:=1.24.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_FLAGS:=essential
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=http://www.busybox.net/downloads \
http://distfiles.gentoo.org/distfiles/
 PKG_MD5SUM:=2eaae519cac1143bcf583636a745381f
 
-PKG_BUILD_DEPENDS:=BUSYBOX_USE_LIBRPC:librpc BUSYBOX_CONFIG_PAM:libpam
+PKG_BUILD_DEPENDS:=BUSYBOX_USE_LIBRPC:librpc BUSYBOX_CONFIG_PAM:libpam 
+BUSYBOX_CONFIG_NTPD:jsonfilter
 PKG_BUILD_PARALLEL:=1
 PKG_CHECK_FORMAT_SECURITY:=0
 
diff --git a/package/utils/busybox/files/sysntpd 
b/package/utils/busybox/files/sysntpd
index f73bb83..6d44280 100755
--- a/package/utils/busybox/files/sysntpd
+++ b/package/utils/busybox/files/sysntpd
@@ -7,13 +7,34 @@ USE_PROCD=1
 PROG=/usr/sbin/ntpd
 HOTPLUG_SCRIPT=/usr/sbin/ntpd-hotplug
 
+get_dhcp_ntp_servers() {
+   local interfaces="$1"
+   local filter="*"
+   local interface ntpservers ntpserver
+
+   for interface in $interfaces; do
+   [ "$filter" = "*" ] && filter="@.interface='$interface'" || 
filter="$filter,@.interface='$interface'"
+   done
+
+   ntpservers=$(ubus call network.interface dump | jsonfilter -e 
"@.interface[$filter]['data']['ntpserver']")
+
+   for ntpserver in $ntpservers; do
+   local duplicate=0
+   local entry
+   for entry in $server; do
+   [ "$ntpserver" = "$entry" ] && duplicate=1
+   done
+   [ "$duplicate" = 0 ] && server="$server $ntpserver"
+   done
+}
+
 validate_ntp_section() {
uci_validate_section system timeserver "${1}" \
-   'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0'
+   'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0' 
'use_dhcp:bool:1' 'dhcp_interface:list(string)'
 }
 
 start_service() {
-   local server enabled enable_server peer
+   local server enabled enable_server use_dhcp dhcp_interface peer
 
validate_ntp_section ntp || {
echo "validation failed"
@@ -22,6 +43,8 @@ start_service() {
 
[ $enabled = 0 ] && return
 
+   [ $use_dhcp = 1 ] && get_dhcp_ntp_servers "$dhcp_interface"
+
[ -z "$server" ] && return
 
procd_open_instance
@@ -35,8 +58,32 @@ start_service() {
procd_close_instance
 }
 
-service_triggers()
-{
-   procd_add_reload_trigger "system"
+service_triggers() {
+   local script name use_dhcp
+
+   script=$(readlink -f "$initscript")
+   name=$(basename ${script:-$initscript})
+
+   procd_open_trigger
+   procd_add_config_trigger "config.change" "system" /etc/init.d/$name 
reload
+
+   config_load system
+   config_get use_dhcp ntp use_dhcp 1
+
+   [ $use_dhcp = 1 ] && {
+   local dhcp_interface
+   config_get dhcp_interface ntp dhcp_interface
+
+   if [ -n "$dhcp_interface" ]; then
+   for n in $dhcp_interface; do
+   procd_add_interface_trigger "interface.*" $n 
/etc/init.d/$name reload
+   done
+   else
+   procd_add_raw_trigger "interface.*" 1000 
/etc/init.d/$name reload
+   fi
+   }
+
+   procd_close_trigger
+
procd_add_validation validate_ntp_section
 }
-- 
1.9.1


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] scripts/download.pl: Use CDN for kernel downloads

2016-05-23 Thread Bjørn Mork
Arjen de Korte  writes:

> Since GitHub apparently also uses Fastly as CDN provider, building on
> a machine with IPv6 only connectivity is going to be difficult anyway.
> Using both won't hurt, but if you're not able to connect to an IPv4
> server for the kernel sources, you'll likely run into similar problems
> for pretty much everything else too.

Yes, github seems to have a few issues to sort out.  They also have
SSHFP records but no DNSKEY.  That's weird.


Bjørn

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] Multi-Profile selection support

2016-05-23 Thread Felix Fietkau
On 2016-05-23 13:56, Rafał Miłecki wrote:
> On 23 May 2016 at 13:38, Felix Fietkau  wrote:
>> after a long delay, I finally got around to looking into multi profile
>> selection again. After reviewing your code and thinking about it some
>> more, I decided to go with a slightly different approach from the one
>> that you took.
>>
>> I'm working towards not only being able to build an image with support
>> for a specific set of devices, but also being able to optionally build
>> multiple images at once with the per-image rootfs being affected by the
>> device profile as well.
>>
>> This can currently only work properly with the new image building code
>> along with having the device profile data specified in the Device
>> section, so I limited multi-profile selection to that.
>>
>> As a next step, I'm going to add some wrapper code to allow the legacy
>> image building code to be incrementally converted as well without having
>> to adjust everything to the new Build/* chunks right away.
> 
> Is it worth it? If there are some targets really wanting this feature
> I guess we could convert them to the new Device/* building system. My
> knowledge is surely limited but I can try to help with that. I somehow
> managed to convert brcm47xx and improve bcm53xx.
The multi-profile stuff is something we want to have for all targets, so
that we can avoid hackish scripts involving the image builder and
multiple build passes.
Converting ar71xx is going to be a lot of work, especially testing all
those different devices - unless you can find a way to automate that by
proving that the output stays the same with the old and the new code,
but I don't know if our reproducible build support is quite there yet.

- Felix

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] Multi-Profile selection support

2016-05-23 Thread Felix Fietkau
Hi Daniel et al.

after a long delay, I finally got around to looking into multi profile
selection again. After reviewing your code and thinking about it some
more, I decided to go with a slightly different approach from the one
that you took.

I'm working towards not only being able to build an image with support
for a specific set of devices, but also being able to optionally build
multiple images at once with the per-image rootfs being affected by the
device profile as well.

This can currently only work properly with the new image building code
along with having the device profile data specified in the Device
section, so I limited multi-profile selection to that.

As a next step, I'm going to add some wrapper code to allow the legacy
image building code to be incrementally converted as well without having
to adjust everything to the new Build/* chunks right away.

You can find my work in progress in my staging tree:
https://git.lede-project.org/?p=lede/nbd/staging.git;a=summary

If you have some time, feedback and patches converting profiles/* stuff
into proper device profiles will be appreciated.

- Felix

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH staging 0/7] ath25: minor fixes after kernel updating

2016-05-23 Thread Sergey Ryazanov
2016-05-23 12:45 GMT+03:00 John Crispin :
> On 23/05/2016 11:30, Sergey Ryazanov wrote:
>> This series is a set of minor fixes after kernel updating and switching
>> to new image generation. Nothing critical, just several tiny improvements.
>>
>> Sergey Ryazanov (7):
>>   ath25: refresh kernel patches
>>   ath25: refresh kernel configuration
>>   ath25: fix AR2315 GPIO irq handler
>>   ath25: drop useless patch
>>   ath25: drop USB packages from default profile
>>   ath25: correct image generation for Ubiquiti boards
>>   ath25: recover creation of separate kernel and rootfs
>>
>>  target/linux/ath25/config-4.4  | 30 +++---
>>  target/linux/ath25/image/Makefile  | 19 -
>>  target/linux/ath25/patches-4.4/010-board.patch | 47 
>> --
>>  .../linux/ath25/patches-4.4/108-ar2315_gpio.patch  |  2 +-
>>  target/linux/ath25/patches-4.4/120-spiflash.patch  |  2 +-
>>  target/linux/ath25/profiles/00-default.mk  |  1 -
>>  6 files changed, 44 insertions(+), 57 deletions(-)
>>  delete mode 100644 target/linux/ath25/patches-4.4/010-board.patch
>>
> great ! I'll merge them and then fold russels, your and my patches all
> into 1 commit and put all 3 SoB under it.
>
Ok

-- 
Sergey

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] scripts/download.pl: Use CDN for kernel downloads

2016-05-23 Thread Felix Fietkau
On 2016-05-23 12:29, Petr Štetiar wrote:
> Felix Fietkau  [2016-05-23 11:11:50]:
> 
>> On 2016-05-23 10:29, Bjørn Mork wrote:
>> > Petr Štetiar  writes:
>> > 
>> >> - push @mirrors, "https://kernel.org/pub/$dir;;
>> >> + push @mirrors, "https://cdn.kernel.org/pub/$dir;;
>> >>   push @mirrors, "ftp://kernel.org/pub/$dir;;
>> > 
>> > Not sure that is a good idea at this point.  At least here, kernel.org
>> > has IPv6  records while cdn.kernel.org does not:
>>
>> So why not add both? :)
> 
> If I understand it correctly, the code is going to use another mirror only if
> the current mirror fails. In my case the download was awfully slow, but didn't
> failed.
You could put the CDN first, and the regular kernel.org afterwards.
Also, I think you could probably get rid of ftp://kernel.org while we're
at it. FTP is a horrible protocol and if HTTP fails, FTP is even more
likely to fail.

- Felix

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] scripts/download.pl: Use CDN for kernel downloads

2016-05-23 Thread Arjen de Korte

Citeren Petr Štetiar :


Felix Fietkau  [2016-05-23 11:11:50]:


On 2016-05-23 10:29, Bjørn Mork wrote:
> Petr Štetiar  writes:
>
>> -  push @mirrors, "https://kernel.org/pub/$dir;;
>> +  push @mirrors, "https://cdn.kernel.org/pub/$dir;;
>>push @mirrors, "ftp://kernel.org/pub/$dir;;
>
> Not sure that is a good idea at this point.  At least here, kernel.org
> has IPv6  records while cdn.kernel.org does not:

So why not add both? :)


If I understand it correctly, the code is going to use another mirror only if
the current mirror fails. In my case the download was awfully slow,  
but didn't

failed.


If you're on a IPv6 only network, the connection to cdn.kernel.org  
*will* fail (as it doesn't have an  record in DNS). At least from  
my location, cdn.kernel.org is a lot faster than (www.)kernel.org, so  
I'd too like to see it tried first.



___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] scripts/download.pl: Use CDN for kernel downloads

2016-05-23 Thread Petr Štetiar
Felix Fietkau  [2016-05-23 11:11:50]:

> On 2016-05-23 10:29, Bjørn Mork wrote:
> > Petr Štetiar  writes:
> > 
> >> -  push @mirrors, "https://kernel.org/pub/$dir;;
> >> +  push @mirrors, "https://cdn.kernel.org/pub/$dir;;
> >>push @mirrors, "ftp://kernel.org/pub/$dir;;
> > 
> > Not sure that is a good idea at this point.  At least here, kernel.org
> > has IPv6  records while cdn.kernel.org does not:
>
> So why not add both? :)

If I understand it correctly, the code is going to use another mirror only if
the current mirror fails. In my case the download was awfully slow, but didn't
failed.

-- ynezz

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH staging 0/7] ath25: minor fixes after kernel updating

2016-05-23 Thread John Crispin


On 23/05/2016 11:30, Sergey Ryazanov wrote:
> This series is a set of minor fixes after kernel updating and switching
> to new image generation. Nothing critical, just several tiny improvements.
> 
> Sergey Ryazanov (7):
>   ath25: refresh kernel patches
>   ath25: refresh kernel configuration
>   ath25: fix AR2315 GPIO irq handler
>   ath25: drop useless patch
>   ath25: drop USB packages from default profile
>   ath25: correct image generation for Ubiquiti boards
>   ath25: recover creation of separate kernel and rootfs
> 
>  target/linux/ath25/config-4.4  | 30 +++---
>  target/linux/ath25/image/Makefile  | 19 -
>  target/linux/ath25/patches-4.4/010-board.patch | 47 
> --
>  .../linux/ath25/patches-4.4/108-ar2315_gpio.patch  |  2 +-
>  target/linux/ath25/patches-4.4/120-spiflash.patch  |  2 +-
>  target/linux/ath25/profiles/00-default.mk  |  1 -
>  6 files changed, 44 insertions(+), 57 deletions(-)
>  delete mode 100644 target/linux/ath25/patches-4.4/010-board.patch
> 

great ! I'll merge them and then fold russels, your and my patches all
into 1 commit and put all 3 SoB under it.

thanks for the testing !

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH staging 4/7] ath25: drop useless patch

2016-05-23 Thread Sergey Ryazanov
010-board patch has been already added to the mainline kernel. Then
files, which created by this patch, were removed in upstream, so now it
just reintroduce couple of useless files. Remove patch completely.

Relevant upstream commits:
  * d631fc60706ccd86c5c2b0084bcea0739952ce90 (MIPS: Create a common
)
  * 832f5dacfa0bb081a3b3b979a36a132b28ffacf3 (MIPS: Remove all the uses
of custom gpio.h)

Signed-off-by: Sergey Ryazanov 
---
 target/linux/ath25/patches-4.4/010-board.patch | 47 --
 1 file changed, 47 deletions(-)
 delete mode 100644 target/linux/ath25/patches-4.4/010-board.patch

diff --git a/target/linux/ath25/patches-4.4/010-board.patch 
b/target/linux/ath25/patches-4.4/010-board.patch
deleted file mode 100644
index dbf0600..000
--- a/target/linux/ath25/patches-4.4/010-board.patch
+++ /dev/null
@@ -1,47 +0,0 @@
 /dev/null
-+++ b/arch/mips/include/asm/mach-ath25/gpio.h
-@@ -0,0 +1,16 @@
-+#ifndef __ASM_MACH_ATH25_GPIO_H
-+#define __ASM_MACH_ATH25_GPIO_H
-+
-+#include 
-+
-+#define gpio_get_value __gpio_get_value
-+#define gpio_set_value __gpio_set_value
-+#define gpio_cansleep __gpio_cansleep
-+#define gpio_to_irq __gpio_to_irq
-+
-+static inline int irq_to_gpio(unsigned irq)
-+{
-+  return -EINVAL;
-+}
-+
-+#endif/* __ASM_MACH_ATH25_GPIO_H */
 /dev/null
-+++ b/arch/mips/include/asm/mach-ath25/war.h
-@@ -0,0 +1,25 @@
-+/*
-+ * This file is subject to the terms and conditions of the GNU General Public
-+ * License.  See the file "COPYING" in the main directory of this archive
-+ * for more details.
-+ *
-+ * Copyright (C) 2008 Felix Fietkau 
-+ */
-+#ifndef __ASM_MACH_ATH25_WAR_H
-+#define __ASM_MACH_ATH25_WAR_H
-+
-+#define R4600_V1_INDEX_ICACHEOP_WAR   0
-+#define R4600_V1_HIT_CACHEOP_WAR  0
-+#define R4600_V2_HIT_CACHEOP_WAR  0
-+#define R5432_CP0_INTERRUPT_WAR   0
-+#define BCM1250_M3_WAR0
-+#define SIBYTE_1956_WAR   0
-+#define MIPS4K_ICACHE_REFILL_WAR  0
-+#define MIPS_CACHE_SYNC_WAR   0
-+#define TX49XX_ICACHE_INDEX_INV_WAR   0
-+#define RM9000_CDEX_SMP_WAR   0
-+#define ICACHE_REFILLS_WORKAROUND_WAR 0
-+#define R1_LLSC_WAR   0
-+#define MIPS34K_MISSED_ITLB_WAR   0
-+
-+#endif /* __ASM_MACH_ATH25_WAR_H */
-- 
2.7.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH staging 3/7] ath25: fix AR2315 GPIO irq handler

2016-05-23 Thread Sergey Ryazanov
Adapt chained IRQ handler function as the "irq" argument is now removed
from the irq flow handlers prototype in commit
bd0b9ac405e1794d72533c3d487aa65b6b955a0c (genirq: Remove irq argument
from irq flow handlers).

Signed-off-by: Sergey Ryazanov 
---
 target/linux/ath25/patches-4.4/108-ar2315_gpio.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ath25/patches-4.4/108-ar2315_gpio.patch 
b/target/linux/ath25/patches-4.4/108-ar2315_gpio.patch
index 2165897..3300292 100644
--- a/target/linux/ath25/patches-4.4/108-ar2315_gpio.patch
+++ b/target/linux/ath25/patches-4.4/108-ar2315_gpio.patch
@@ -162,7 +162,7 @@
 +  ar2315_gpio_reg_write(reg, (ar2315_gpio_reg_read(reg) & ~mask) | val);
 +}
 +
-+static void ar2315_gpio_irq_handler(unsigned irq, struct irq_desc *desc)
++static void ar2315_gpio_irq_handler(struct irq_desc *desc)
 +{
 +  u32 pend;
 +  int bit = -1;
-- 
2.7.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] WRT1900ACS Testing

2016-05-23 Thread Bjørn Mork
Dheeran Senthilvel  writes:

>> Its gonna take a while before either Linksys just releases a proper
>> working drivers (or) just releases the code under GPL for upstream
>> kernel-development (Just like what happened for raspberrypi).

This is wrong.  The mwlwifi driver is GPL and has been so for years.
It's not in mainline yet due to a misunderstanding on how new driver
submissions work.  I'm hoping that can be cleared up soon. Just to be
very clear:  Do what the subsystem maintainer tells you to do.

No more, no less.  Just do it.


Bjørn

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev