Re: [LEDE-DEV] [PATCH v2 1/2] lantiq: unmacro tp-link boards

2016-05-31 Thread Alexander Couzens
On Tue, 31 May 2016 22:46:11 +0200
Oswald Buddenhagen  wrote:

> you're undoing work by hauke et. al from just a few weeks ago. ;)
ooops. ;P

> while it's certainly true that the macros complicate matters, it's
> also true that the whole build system is incredibly macro-heavy. so
> removing a few of them doesn't actually buy you a whole lot.

-- 
Alexander Couzens

mail: lyn...@fe80.eu
jabber: lyn...@fe80.eu
mobile: +4915123277221
gpg: 390D CF78 8BF9 AA50 4F8F  F1E2 C29E 9DA6 A0DF 8604


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


[LEDE-DEV] [PATCH] arc: Build uImage as well as vmlinux output files

2016-05-31 Thread Alexey Brodkin
Initially for ARC we were building vmlinux images because it
was both simpler and more convenient to debug Linux kernel
in runt-time via JTAG. Now when base system works quite nice
we may finally use U-Boot for loading the system image as
well. Still we keep building vmlinux images as some of our
boards are development boards and loading images with JTAG
could be at some points very beneficial.

Note for U-Boot header it's required to specify 2 values:
 * loading address
 * entry point (if it doesn't match loading address)

and in case of ARC entry point (EP) not only differs from
loading address but also changes from build to build due to
initramfs being placed between loading address and text section.
To accommodate that feature we have to calculate EP after
vmlinux gets built and before call to mkimage.

Signed-off-by: Alexey Brodkin 
---
 target/linux/arc770/image/Makefile  | 44 ++---
 target/linux/archs38/image/Makefile | 44 ++---
 2 files changed, 72 insertions(+), 16 deletions(-)

diff --git a/target/linux/arc770/image/Makefile 
b/target/linux/arc770/image/Makefile
index 6b9c5e4..47c936e 100644
--- a/target/linux/arc770/image/Makefile
+++ b/target/linux/arc770/image/Makefile
@@ -7,6 +7,13 @@
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
+# On ARC initramfs is put before entry point and so entry point moves
+# in memory from build to built. Thus we need to extract EP from vmlinux
+# every time late in building process.
+define Build/calculate-ep
+   $(eval KERNEL_ENTRY=$(shell $(KERNEL_CROSS)readelf -h 
$(LINUX_DIR)/vmlinux | grep "Entry point address" | grep -o 0x.*))
+endef
+
 define Build/patch-dtb
$(call Image/BuildDTB,../dts/$(DEVICE_DTS).dts,$@.dtb)
$(STAGING_DIR_HOST)/bin/patch-dtb $@ $@.dtb
@@ -16,26 +23,47 @@ endef
 define Device/Default
   PROFILES = Default $$(DEVICE_PROFILE)
   KERNEL_DEPENDS = $$(wildcard ../dts/$$(DEVICE_DTS).dts)
-  KERNEL_SUFFIX := .elf
-  KERNEL_INITRAMFS := kernel-bin | patch-dtb
-  KERNEL_INITRAMFS_NAME = $$(KERNEL_NAME)-initramfs.elf
   DEVICE_PROFILE :=
   DEVICE_DTS :=
 endef
 DEVICE_VARS += DEVICE_PROFILE DEVICE_DTS
 
-define add_arc770
-  define Device/$(1)
+define Device/vmlinux
+  KERNEL_SUFFIX := .elf
+  KERNEL_INITRAMFS := kernel-bin | patch-dtb
+  KERNEL_INITRAMFS_NAME = vmlinux-initramfs.elf
+endef
+
+define Device/uImage
+  KERNEL_SUFFIX := .bin
+  KERNEL_INITRAMFS := kernel-bin | patch-dtb | calculate-ep | uImage none
+  KERNEL_LOADADDR := 0x8000
+endef
+
+define add_arc770_uImage
+  define Device/$(1)-uImage
+$(call Device/uImage)
+DEVICE_PROFILE := $(1)
+DEVICE_DTS := $(1)
+  endef
+  TARGET_DEVICES += $(1)-uImage
+endef
+
+define add_arc770_vmlinux
+  define Device/$(1)-vmlinux
+$(call Device/vmlinux)
 DEVICE_PROFILE := $(1)
 DEVICE_DTS := $(1)
   endef
-  TARGET_DEVICES += $(1)
+  TARGET_DEVICES += $(1)-vmlinux
 endef
 
 # DesignWare AXS101
-$(eval $(call add_arc770,axs101))
+$(eval $(call add_arc770_vmlinux,axs101))
+$(eval $(call add_arc770_uImage,axs101))
 
 # nSIM with ARC770
-$(eval $(call add_arc770,nsim_700))
+$(eval $(call add_arc770_vmlinux,nsim_700))
+$(eval $(call add_arc770_uImage,nsim_700))
 
 $(eval $(call BuildImage))
diff --git a/target/linux/archs38/image/Makefile 
b/target/linux/archs38/image/Makefile
index 9b0e53f..03bd8ee 100644
--- a/target/linux/archs38/image/Makefile
+++ b/target/linux/archs38/image/Makefile
@@ -7,6 +7,13 @@
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
+# On ARC initramfs is put before entry point and so entry point moves
+# in memory from build to built. Thus we need to extract EP from vmlinux
+# every time before generation of uImage.
+define Build/calculate-ep
+   $(eval KERNEL_ENTRY=$(shell $(KERNEL_CROSS)readelf -h 
$(LINUX_DIR)/vmlinux | grep "Entry point address" | grep -o 0x.*))
+endef
+
 define Build/patch-dtb
$(call Image/BuildDTB,../dts/$(DEVICE_DTS).dts,$@.dtb)
$(STAGING_DIR_HOST)/bin/patch-dtb $@ $@.dtb
@@ -16,26 +23,47 @@ endef
 define Device/Default
   PROFILES = Default $$(DEVICE_PROFILE)
   KERNEL_DEPENDS = $$(wildcard ../dts/$$(DEVICE_DTS).dts)
-  KERNEL_SUFFIX := .elf
-  KERNEL_INITRAMFS := kernel-bin | patch-dtb
-  KERNEL_INITRAMFS_NAME = $$(KERNEL_NAME)-initramfs.elf
   DEVICE_PROFILE :=
   DEVICE_DTS :=
 endef
 DEVICE_VARS += DEVICE_PROFILE DEVICE_DTS
 
-define add_archs38
-  define Device/$(1)
+define Device/vmlinux
+  KERNEL_SUFFIX := .elf
+  KERNEL_INITRAMFS := kernel-bin | patch-dtb
+  KERNEL_INITRAMFS_NAME = vmlinux-initramfs.elf
+endef
+
+define Device/uImage
+  KERNEL_SUFFIX := .bin
+  KERNEL_INITRAMFS := kernel-bin | patch-dtb | calculate-ep | uImage none
+  KERNEL_LOADADDR := 0x8000
+endef
+
+define add_archs38_uImage
+  define Device/$(1)-uImage
+$(call Device/uImage)
+DEVICE_PROFILE := $(1)
+DEVICE_DTS := $(1)
+  endef
+  TARGET_DEVICES += $(1)-uImage
+endef
+
+define 

[LEDE-DEV] Fwd: Re: [OpenWrt-Devel] move OpenWrt codebase to Git and GitHub

2016-05-31 Thread tapper




 Forwarded Message 
Subject: Re: [OpenWrt-Devel] move OpenWrt codebase to Git and GitHub
Date: Tue, 31 May 2016 13:44:56 +
From: Abhijit Mahajani 
To: openwrt-de...@lists.openwrt.org 

Hello Luka,

First of all, we would welcome the move of openwrt into GitHub. We have 
been using openwrt for one of the project and we have already 
opensourced our port on GitHub (https://github.com/IMGCreator/openwrt) . 
And willing to upstream this to the openwrt community. So having openwrt 
codebase in the GitHub will certainly help in the upstreaming. Any 
guidance is highly appreciated.


Thanks and Regards,
Abhijit A. Mahajani


-Original Message-
From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On 
Behalf Of openwrt-devel-requ...@lists.openwrt.org

Sent: Thursday, May 26, 2016 8:34 AM
To: openwrt-de...@lists.openwrt.org
Subject: openwrt-devel Digest, Vol 125, Issue 104

Send openwrt-devel mailing list submissions to
openwrt-de...@lists.openwrt.org

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
or, via email, send a message with subject or body 'help' to
openwrt-devel-requ...@lists.openwrt.org

You can reach the person managing the list at
openwrt-devel-ow...@lists.openwrt.org

When replying, please edit your Subject line so it is more specific than 
"Re: Contents of openwrt-devel digest..."



Today's Topics:

   1. Re: OpenWrt / LEDE (Bjørn Mork)
   2. Re: OpenWrt / LEDE (Rafał Miłecki)
   3. Re: [PROPOSAL] move OpenWrt codebase to Git and GitHub
  (Luka Perkov)
   4. Re: [PROPOSAL] move OpenWrt codebase to Git and GitHub
  (Luka Perkov)
   5. Re: [OpenWrt-Users] [PROPOSAL] move OpenWrt codebase to Git
  and GitHub (Luka Perkov)
   6. Re: [OpenWrt-Users] [PROPOSAL] move OpenWrt codebase to Git
  and GitHub (Valent Turkovic)
   7. How to debug/config qos-scripts to work with  OpenWRT AA? (Danng)


--

Message: 1
Date: Wed, 25 May 2016 12:55:43 +0200
From: Bjørn Mork 
To: mbm 
Cc: Rafał Miłecki ,
openwrt-de...@lists.openwrt.org, LEDE Development List

Subject: Re: [OpenWrt-Devel] OpenWrt / LEDE
Message-ID: <8760u2pftc@nemi.mork.no>
Content-Type: text/plain; charset=utf-8

mbm  writes:


The hackers email address represents the primary point of contact for
OpenWrt, particularly in regards to donations. Following the surprise
LEDE announcement, forwarding rules for @openwrt.org email addresses
were disabled. This was done to mitigate further damage to OpenWrt due
to misrepresentation, intentional or otherwise.


Failing to see the damage your action has caused is your biggest problem 
right now. Even if we accept the rather far fetched possibilty of 
misrepresentation, there is no way that can outweight the effect on the 
maintainership status OpenWrt.


Right now, 95 of the 145 (PKG_)MAINTAINER entries for OpenWrt packages 
points to an openwrt.org email address belonging to a LEDE committer:


 bjorn@canardo:/usr/local/src/openwrt$ git grep 
'MAINTAINER:=.*<\(lynxis\|noltari\|dangole\|nbd\|hauke\|jow\|blogic\|neoraider\|rmilecki\|cyrus\|stintel\|thess\)@openwrt.org>' 
origin/master -- package/|wc -l

95
 bjorn@canardo:/usr/local/src/openwrt$ git grep 'MAINTAINER' 
origin/master -- package/|wc -l

145

I don't know if all these were disabled, but the package I tried to 
submit to after the split was one of these.  You don't seem to 
understand the devastating effect it has on OpenWrt if occasional 
contributors gets an email bounce from the published maintainer address. 
 There is no way you can blame those maintainers for this situation. 
The problem is solely the responsibility of whoever decided to disable 
those addresses.



Bjørn


--

Message: 2
Date: Wed, 25 May 2016 13:52:54 +0200
From: Rafał Miłecki 
To: mbm 
Cc: OpenWrt Development List ,  LEDE
Development List 
Subject: Re: [OpenWrt-Devel] OpenWrt / LEDE
Message-ID:

Content-Type: text/plain; charset=UTF-8

On 25 May 2016 at 10:09, mbm  wrote:

The hackers email address represents the primary point of contact for
OpenWrt, particularly in regards to donations. Following the surprise
LEDE announcement, forwarding rules for @openwrt.org email addresses
were disabled. This was done to mitigate further damage to OpenWrt due
to misrepresentation, intentional or otherwise.


Hackers e-mail address (mailing list) was also used for internal 
discussions. You not only disabled forwarding rules for @openwrt.org 

Re: [LEDE-DEV] [RFC 03/12] ath25: register button actions through board.d

2016-05-31 Thread Karl Palsson

Given that the existing default button handler didn't actually do
anything, I think it furthers the argument that they can just be
dropped entirely.

Jo-Philipp Wich  wrote:
> Register button actions through board.d and drop corresponding
> config sections from the /etc/config/system template.
> 
> Also rename `01_leds` to `01_system` now that it is doing more
> than just adding an led entry.
> 
> Signed-off-by: Jo-Philipp Wich 
> 
>  delete mode 100755 target/linux/ath25/base-files/etc/board.d/01_leds
>  create mode 100755 target/linux/ath25/base-files/etc/board.d/01_system
> 
> diff --git a/target/linux/ath25/base-files/etc/board.d/01_leds
> b/target/linux/ath25/base-files/etc/board.d/01_leds deleted
> file mode 100755 index e6ab4a7..000
> --- a/target/linux/ath25/base-files/etc/board.d/01_leds
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -#!/bin/sh
> -# Copyright 2012-2015 OpenWrt.org
> -#
> -
> -. /lib/functions/uci-defaults.sh
> -
> -board_config_update
> -
> -ucidef_set_led_netdev "wlan" "wlan" "wlan" "wlan0"
> -
> -board_config_flush
> -
> -exit 0
> diff --git
> a/target/linux/ath25/base-files/etc/board.d/01_system
> b/target/linux/ath25/base-files/etc/board.d/01_system new file
> mode 100755 index 000..eac16b5
> --- /dev/null
> +++ b/target/linux/ath25/base-files/etc/board.d/01_system
> @@ -0,0 +1,16 @@
> +#!/bin/sh
> +# Copyright 2012-2015 OpenWrt.org
> +#
> +
> +. /lib/functions/uci-defaults.sh
> +
> +board_config_update
> +
> +ucidef_set_led_netdev "wlan" "wlan" "wlan" "wlan0"
> +
> +ucidef_add_button "shortreset" "reset" "released" "logger
> reboot" "0" "4" +ucidef_add_button "longreset" "reset"
> "released" "logger factory default" "5" "30"
> +
> +board_config_flush
> +
> +exit 0
> diff --git a/target/linux/ath25/base-files/etc/config/system
> b/target/linux/ath25/base-files/etc/config/system index
> 1d29ad8..0834b52 100644
> --- a/target/linux/ath25/base-files/etc/config/system
> +++ b/target/linux/ath25/base-files/etc/config/system
> @@ -7,17 +7,3 @@ config timeserver ntp
>   list server 1.openwrt.pool.ntp.org
>   list server 2.openwrt.pool.ntp.org
>   list server 3.openwrt.pool.ntp.org
> -
> -config button
> - option button   reset
> - option action   released
> - option handler  "logger reboot"
> - option min  0
> - option max  4
> -
> -config button
> - option button   reset
> - option action   released
> - option handler  "logger factory default"
> - option min  5
> - option max  30
> -- 
> 2.1.4
> 
> 
> ___
> Lede-dev mailing list
> Lede-dev@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev

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] ImageBuilder generated image does not create LED entries in /etc/config/system on first boot, why?

2016-05-31 Thread Laurent GUERBY
On Tue, 2016-05-31 at 00:39 +0200, Laurent GUERBY wrote:
> Hi,
> 
> On a 841N v11 on current LEDE git with patch from (1) I'm trying to
> solve a puzzle:
> - when doing "make" the generated image in 
> bin/targets/ar71xx/generic/lede-ar71xx-generic-tl-wr841-v11-squashfs-sysupgrade.bin
> does create on first boot /etc/config/system 'led' entries and so
> the LED work as expected
> - whe using a script (2) based on the imagebuilder generated by the same
> "make" build (menuconfig activated)
> bin/targets/ar71xx/generic/LEDE-ImageBuilder-ar71xx-generic.Linux-x86_64.tar.bz2
> the image works but /etc/config/system is not populated with 'led'
> entries on first boot (or second boot I tried) so the LAN/WAN LED stay
> off (only power LED is on). If I populate manually /etc/config/system
> all works.
> 
> I couldn't find what script running on the router which generates
> the /etc/config/system led entries on first boot (where to look to debug
> this issue), I assume something is missing flag or package or kernel
> module in my imagebuilder (or make menuconfig) setup but I'm not able to
> find it. I did not have this issue with older versions of OpenWRT
> imagebuilder.
> 
> Any help appreciated,
> 
> Sincerely,
> 
> Laurent
> 
> (1) https://github.com/lede-project/source/pull/64
> (2)
> https://chiliproject.tetaneutral.net/projects/git-tetaneutral-net/repository/openwrt-tools/revisions/master/entry/quick_841n_ttn_lede.sh

Hi again,

Thanks to jow on IRC for pointing out /bin/board_detect which
has a test on /etc/config/network to decide wether or not to call
config_generate which creates the /etc/config/system
LED (amongst other things).

Since we use imagebuilder with FILES="..." to
generate /etc/config/network (and other things) for our WISP setup the
led configuration wasn't generated on first boot.

I assume a solution will be proposed soon.

Sincerely,

Laurent

root@lede:~# cat /bin/board_detect 
#!/bin/sh

[ -d "/etc/board.d/" -a ! -f "/etc/board.json" ] && {
for a in `ls /etc/board.d/*`; do
[ -x $a ] || continue;
$(. $a)
done
}

[ -f "/etc/board.json" ] || return 1
[ -f "/etc/config/network" ] || {
touch /etc/config/network
/bin/config_generate
}



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


[LEDE-DEV] [RFC 12/12] base-files: drop /etc/config/system

2016-05-31 Thread Jo-Philipp Wich
The board_detect framework is now able to create the entire system config from
scratch so we can finally drop the copy shipped by base-files.

Signed-off-by: Jo-Philipp Wich 

 delete mode 100644 package/base-files/files/etc/config/system

diff --git a/package/base-files/files/etc/config/system 
b/package/base-files/files/etc/config/system
deleted file mode 100644
index 80c3f9b..000
--- a/package/base-files/files/etc/config/system
+++ /dev/null
@@ -1,12 +0,0 @@
-config system
-   option hostname lede
-   option timezone UTC
-   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
-- 
2.1.4


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


[LEDE-DEV] [RFC 11/12] base-files: rework config generation logic

2016-05-31 Thread Jo-Philipp Wich
Now that config_generate is able to generate the entire /etc/config/system
from scratch we can apply the same logic as used for /etc/config/network;
when the configuration file exists already then do not do anything, else
generate it from the values provided by /etc/board.json .

In order to facilitate that move the file existance checking inside
/bin/config_generate and call it unconditionally from /bin/board_detect.

Signed-off-by: Jo-Philipp Wich 

diff --git a/package/base-files/files/bin/board_detect 
b/package/base-files/files/bin/board_detect
index ee04b9e..beb7f4e 100755
--- a/package/base-files/files/bin/board_detect
+++ b/package/base-files/files/bin/board_detect
@@ -8,7 +8,5 @@
 }
 
 [ -f "/etc/board.json" ] || return 1
-[ -f "/etc/config/network" ] || {
-   touch /etc/config/network
-   /bin/config_generate
-}
+
+/bin/config_generate
diff --git a/package/base-files/files/bin/config_generate 
b/package/base-files/files/bin/config_generate
index 6f04840..79a7fb8 100755
--- a/package/base-files/files/bin/config_generate
+++ b/package/base-files/files/bin/config_generate
@@ -5,6 +5,7 @@ CFG=/etc/board.json
 . /usr/share/libubox/jshn.sh
 
 [ -f $CFG ] || exit 1
+[ -f /etc/config/network -a -f /etc/config/system ] && exit 0
 
 generate_static_network() {
uci -q batch <<-EOF
@@ -419,27 +420,32 @@ generate_button() {
 json_init
 json_load "$(cat ${CFG})"
 
-generate_static_network
+if [ ! -f /etc/config/network ]; then
+   touch /etc/config/network
+   generate_static_network
 
-json_get_keys keys network
-for key in $keys; do generate_network $key; done
+   json_get_keys keys network
+   for key in $keys; do generate_network $key; done
 
-json_get_keys keys switch
-for key in $keys; do generate_switch $key; done
+   json_get_keys keys switch
+   for key in $keys; do generate_switch $key; done
+fi
 
+if [ ! -f /etc/config/system ]; then
+   touch /etc/config/system
+   generate_static_system
 
-generate_static_system
+   json_get_keys keys rssimon
+   for key in $keys; do generate_rssimon $key; done
 
-json_get_keys keys rssimon
-for key in $keys; do generate_rssimon $key; done
+   json_get_keys keys gpioswitch
+   for key in $keys; do generate_gpioswitch $key; done
 
-json_get_keys keys gpioswitch
-for key in $keys; do generate_gpioswitch $key; done
+   json_get_keys keys led
+   for key in $keys; do generate_led $key; done
 
-json_get_keys keys led
-for key in $keys; do generate_led $key; done
-
-json_get_keys keys button
-for key in $keys; do generate_button $key; done
+   json_get_keys keys button
+   for key in $keys; do generate_button $key; done
+fi
 
 uci commit
-- 
2.1.4


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


[LEDE-DEV] [RFC 09/12] adm5120: convert LED setup to board.d

2016-05-31 Thread Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich 

 create mode 100755 target/linux/adm5120/base-files/etc/board.d/01_leds

diff --git a/target/linux/adm5120/base-files/etc/board.d/01_leds 
b/target/linux/adm5120/base-files/etc/board.d/01_leds
new file mode 100755
index 000..f5cd778
--- /dev/null
+++ b/target/linux/adm5120/base-files/etc/board.d/01_leds
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+ucidef_set_led_portstate "lan1" "LAN1" "lan1" "link_act"
+ucidef_set_led_portstate "lan2" "LAN2" "lan2" "link_act"
+ucidef_set_led_portstate "lan3" "LAN3" "lan3" "link_act"
+ucidef_set_led_portstate "lan4" "LAN4" "lan4" "link_act"
+ucidef_set_led_portstate "wan"  "WAN"  "wan"  "link_act"
+
+ucidef_set_led_netdev "wlan" "WLAN" "wlan" "wlan0"
+
+board_config_flush
+
+exit 0
-- 
2.1.4


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


[LEDE-DEV] [RFC 10/12] adm5120: remove target specific /etc/config/system

2016-05-31 Thread Jo-Philipp Wich
Now that deviations to the default /etc/config/system are registered via
board.d we can drop the target specific copy.

Signed-off-by: Jo-Philipp Wich 

 delete mode 100644 target/linux/adm5120/base-files/etc/config/system

diff --git a/target/linux/adm5120/base-files/etc/config/system 
b/target/linux/adm5120/base-files/etc/config/system
deleted file mode 100644
index ea54ca1..000
--- a/target/linux/adm5120/base-files/etc/config/system
+++ /dev/null
@@ -1,40 +0,0 @@
-config system
-   option hostname OpenWrt
-   option timezone UTC
-
-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
-
-config led
-   option sysfslan1
-   option trigger  port_state
-   option port_state   link_act
-
-config led
-   option sysfslan2
-   option trigger  port_state
-   option port_state   link_act
-
-config led
-   option sysfslan3
-   option trigger  port_state
-   option port_state   link_act
-
-config led
-   option sysfslan4
-   option trigger  port_state
-   option port_state   link_act
-
-config led
-   option sysfswan
-   option trigger  port_state
-   option port_state   link_act
-
-config led
-   option sysfswlan
-   option trigger  netdev
-   option dev  wlan0
-
-- 
2.1.4


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


[LEDE-DEV] [RFC 08/12] base-files: support port_state LED types in board.d

2016-05-31 Thread Jo-Philipp Wich
Add support for handling port_state LEDs as used by ADM5120.

Signed-off-by: Jo-Philipp Wich 

diff --git a/package/base-files/files/bin/config_generate 
b/package/base-files/files/bin/config_generate
index 6fea2d8..6f04840 100755
--- a/package/base-files/files/bin/config_generate
+++ b/package/base-files/files/bin/config_generate
@@ -354,6 +354,14 @@ generate_led() {
EOF
;;
 
+   portstate)
+   local port_state
+   json_get_vars port_state
+   uci -q batch <<-EOF
+   set system.$cfg.port_state='$port_state'
+   EOF
+   ;;
+
timer|oneshot)
local delayon delayoff
json_get_vars delayon delayoff
diff --git a/package/base-files/files/lib/functions/uci-defaults.sh 
b/package/base-files/files/lib/functions/uci-defaults.sh
index e688588..765b089 100755
--- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -432,6 +432,25 @@ ucidef_set_led_switch() {
json_select ..
 }
 
+ucidef_set_led_portstate() {
+   local cfg="led_$1"
+   local name="$2"
+   local sysfs="$3"
+   local port_state="$4"
+
+   json_select_object led
+
+   json_select_object "$1"
+   json_add_string name "$name"
+   json_add_string type portstate
+   json_add_string sysfs "$sysfs"
+   json_add_string trigger port_state
+   json_add_string port_state "$port_state"
+   json_select ..
+
+   json_select ..
+}
+
 ucidef_set_led_default() {
local cfg="led_$1"
local name="$2"
-- 
2.1.4


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


[LEDE-DEV] [RFC 07/12] xburst: remove target specific /etc/config/system

2016-05-31 Thread Jo-Philipp Wich
Now that deviations to the default /etc/config/system are registered via
board.d we can drop the target specific copy.

Signed-off-by: Jo-Philipp Wich 

 delete mode 100644 target/linux/xburst/base-files/etc/config/system

diff --git a/target/linux/xburst/base-files/etc/config/system 
b/target/linux/xburst/base-files/etc/config/system
deleted file mode 100644
index e198966..000
--- a/target/linux/xburst/base-files/etc/config/system
+++ /dev/null
@@ -1,3 +0,0 @@
-config system
-   option hostname BenNanoNote 
-   option timezone UTC
-- 
2.1.4


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


[LEDE-DEV] [RFC 06/12] xburst: add /etc/config/system overrides via board.d

2016-05-31 Thread Jo-Philipp Wich
Use /etc/board.d/ to register hostname and ntp server overrides.

Signed-off-by: Jo-Philipp Wich 

 create mode 100755 target/linux/xburst/base-files/etc/board.d/01_system

diff --git a/target/linux/xburst/base-files/etc/board.d/01_system 
b/target/linux/xburst/base-files/etc/board.d/01_system
new file mode 100755
index 000..16f4987
--- /dev/null
+++ b/target/linux/xburst/base-files/etc/board.d/01_system
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+ucidef_set_hostname "BenNanoNote"
+ucidef_set_ntpserver
+
+board_config_flush
+
+exit 0
-- 
2.1.4


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


[LEDE-DEV] [RFC 05/12] base-files: support hostname and ntp servers through board.d

2016-05-31 Thread Jo-Philipp Wich
Add support for specifying hostname and NTP servers via /etc/board.d/ scripts.

Signed-off-by: Jo-Philipp Wich 

diff --git a/package/base-files/files/bin/config_generate 
b/package/base-files/files/bin/config_generate
index c59..6fea2d8 100755
--- a/package/base-files/files/bin/config_generate
+++ b/package/base-files/files/bin/config_generate
@@ -220,6 +220,50 @@ generate_switch() {
json_select ..
 }
 
+
+generate_static_system() {
+   uci -q batch <<-EOF
+   delete system.@system[0]
+   add system system
+   set system.@system[-1].hostname='lede'
+   set system.@system[-1].timezone='UTC'
+   set system.@system[-1].ttylogin='0'
+
+   delete system.ntp
+   set system.ntp='timeserver'
+   set system.ntp.enabled='1'
+   set system.ntp.enable_server='0'
+   add_list system.ntp.server='0.openwrt.pool.ntp.org'
+   add_list system.ntp.server='1.openwrt.pool.ntp.org'
+   add_list system.ntp.server='2.openwrt.pool.ntp.org'
+   add_list system.ntp.server='3.openwrt.pool.ntp.org'
+   EOF
+
+   if json_is_a system object; then
+   json_select system
+   local hostname
+   if json_get_var hostname hostname; then
+   uci -q set 
"system.@system[-1].hostname=$hostname"
+   fi
+
+   if json_is_a ntpserver array; then
+   local keys key
+   json_get_keys keys ntpserver
+   json_select ntpserver
+   uci -q delete "system.ntp.server"
+
+   for key in $keys; do
+   local server
+   if json_get_var server "$key"; 
then
+   uci -q add_list 
"system.ntp.server=$server"
+   fi
+   done
+   json_select ..
+   fi
+   json_select ..
+   fi
+}
+
 generate_rssimon() {
local key="$1"
local cfg="rssid_$key"
@@ -375,6 +419,9 @@ for key in $keys; do generate_network $key; done
 json_get_keys keys switch
 for key in $keys; do generate_switch $key; done
 
+
+generate_static_system
+
 json_get_keys keys rssimon
 for key in $keys; do generate_rssimon $key; done
 
diff --git a/package/base-files/files/lib/functions/uci-defaults.sh 
b/package/base-files/files/lib/functions/uci-defaults.sh
index c51a6da..e688588 100755
--- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -591,6 +591,26 @@ ucidef_add_button() {
json_select ..
 }
 
+ucidef_set_hostname() {
+   local hostname="$1"
+
+   json_select_object system
+   json_add_string hostname "$hostname"
+   json_select ..
+}
+
+ucidef_set_ntpserver() {
+   local server
+
+   json_select_object system
+   json_select_array ntpserver
+   for server in "$@"; do
+   json_add_string "" "$server"
+   done
+   json_select ..
+   json_select ..
+}
+
 board_config_update() {
json_init
[ -f ${CFG} ] && json_load "$(cat ${CFG})"
-- 
2.1.4


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


[LEDE-DEV] [RFC 00/12] Rework /etc/config/system generation

2016-05-31 Thread Jo-Philipp Wich
Instead of shipping a base /etc/config/system and amending it in-place with
board_generate generate the entire file from scratch, similar to how we handle
the /etc/config/network file already.

This change series solves multiple problems:

 - Currently the generation of /etc/config/system is skipped if an
   /etc/config/network file exists already, leading to a missing LED setup
   when an image is built which already embeds a network config

 - It makes it easier for config_generate to detect whether the system
   config parts are already processed yet

 - It paves the way for future support of in-place updates, e.g. to migrate
   LED settings while keeping the rest of the config intact

 - It allows us to get rid of various target specific system config copies

While doing this rework I decided to generalize the ath25 button config
framework but I am not yet sure whether we should drop it instead as there
is /etc/rc.button/$BUTTON available which allows users and targets to ship
their own specific button handlers.

Jo-Philipp Wich (12):
  ath25: generalize button hotplug
  base-files: support button actions through board.d
  ath25: register button actions through board.d
  ath25: remove target specific /etc/config/system
  base-files: support hostname and ntp servers through board.d
  xburst: add /etc/config/system overrides via board.d
  xburst: remove target specific /etc/config/system
  base-files: support port_state LED types in board.d
  adm5120: convert LED setup to board.d
  adm5120: remove target specific /etc/config/system
  base-files: rework config generation logic
  base-files: drop /etc/config/system

 package/base-files/files/bin/board_detect  |   6 +-
 package/base-files/files/bin/config_generate   | 107 ++---
 package/base-files/files/etc/config/system |  12 ---
 .../files/etc/hotplug.d/button/00-button   |  24 +
 .../base-files/files/lib/functions/uci-defaults.sh |  58 +++
 .../linux/adm5120/base-files/etc/board.d/01_leds   |  17 
 target/linux/adm5120/base-files/etc/config/system  |  40 
 target/linux/ath25/base-files/etc/board.d/01_leds  |  13 ---
 .../linux/ath25/base-files/etc/board.d/01_system   |  16 +++
 target/linux/ath25/base-files/etc/config/system|  23 -
 .../base-files/etc/hotplug.d/button/00-button  |  24 -
 .../linux/xburst/base-files/etc/board.d/01_system  |  12 +++
 target/linux/xburst/base-files/etc/config/system   |   3 -
 13 files changed, 225 insertions(+), 130 deletions(-)
 delete mode 100644 package/base-files/files/etc/config/system
 create mode 100644 package/base-files/files/etc/hotplug.d/button/00-button
 create mode 100755 target/linux/adm5120/base-files/etc/board.d/01_leds
 delete mode 100644 target/linux/adm5120/base-files/etc/config/system
 delete mode 100755 target/linux/ath25/base-files/etc/board.d/01_leds
 create mode 100755 target/linux/ath25/base-files/etc/board.d/01_system
 delete mode 100644 target/linux/ath25/base-files/etc/config/system
 delete mode 100644 target/linux/ath25/base-files/etc/hotplug.d/button/00-button
 create mode 100755 target/linux/xburst/base-files/etc/board.d/01_system
 delete mode 100644 target/linux/xburst/base-files/etc/config/system

-- 
2.1.4


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


[LEDE-DEV] [RFC 04/12] ath25: remove target specific /etc/config/system

2016-05-31 Thread Jo-Philipp Wich
The system config file shipped by ath25 is now equivalent to the generic one
in base files, so drop the target specific copy.

Signed-off-by: Jo-Philipp Wich 

 delete mode 100644 target/linux/ath25/base-files/etc/config/system

diff --git a/target/linux/ath25/base-files/etc/config/system 
b/target/linux/ath25/base-files/etc/config/system
deleted file mode 100644
index 0834b52..000
--- a/target/linux/ath25/base-files/etc/config/system
+++ /dev/null
@@ -1,9 +0,0 @@
-config system
-   option hostname OpenWrt
-   option timezone UTC
-
-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
-- 
2.1.4


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


[LEDE-DEV] [RFC 02/12] base-files: support button actions through board.d

2016-05-31 Thread Jo-Philipp Wich
Add support for specifying button actions via /etc/board.d/ scripts to utilize
the generic button config framework ported from the ath25 target.

Signed-off-by: Jo-Philipp Wich 

diff --git a/package/base-files/files/bin/config_generate 
b/package/base-files/files/bin/config_generate
index 345393c..c59 100755
--- a/package/base-files/files/bin/config_generate
+++ b/package/base-files/files/bin/config_generate
@@ -343,6 +343,27 @@ generate_gpioswitch() {
json_select ..
 }
 
+generate_button() {
+   local key="$1"
+   local cfg="btn_$key"
+
+   json_select button
+   json_select "$key"
+   local button action handler min max
+   json_get_vars button action handler min max
+   uci -q batch <<-EOF
+   delete system.$cfg
+   set system.$cfg='button'
+   set system.$cfg.button='$button'
+   set system.$cfg.action='$action'
+   set system.$cfg.handler='$handler'
+   set system.$cfg.min='$min'
+   set system.$cfg.max='$max'
+   EOF
+   json_select ..
+   json_select ..
+}
+
 json_init
 json_load "$(cat ${CFG})"
 
@@ -363,4 +384,7 @@ for key in $keys; do generate_gpioswitch $key; done
 json_get_keys keys led
 for key in $keys; do generate_led $key; done
 
+json_get_keys keys button
+for key in $keys; do generate_button $key; done
+
 uci commit
diff --git a/package/base-files/files/lib/functions/uci-defaults.sh 
b/package/base-files/files/lib/functions/uci-defaults.sh
index b097fba..c51a6da 100755
--- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -572,6 +572,25 @@ ucidef_add_gpio_switch() {
json_select ..
 }
 
+ucidef_add_button() {
+   local cfg="$1"
+   local button="$2"
+   local action="$3"
+   local handler="$4"
+   local min="$5"
+   local max="$6"
+
+   json_select_object button
+   json_select_object "$cfg"
+   json_add_string button "$button"
+   json_add_string action "$action"
+   json_add_string handler "$handler"
+   json_add_int min "$min"
+   json_add_int max "$max"
+   json_select ..
+   json_select ..
+}
+
 board_config_update() {
json_init
[ -f ${CFG} ] && json_load "$(cat ${CFG})"
-- 
2.1.4


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


[LEDE-DEV] [RFC 03/12] ath25: register button actions through board.d

2016-05-31 Thread Jo-Philipp Wich
Register button actions through board.d and drop corresponding config sections
from the /etc/config/system template.

Also rename `01_leds` to `01_system` now that it is doing more than just
adding an led entry.

Signed-off-by: Jo-Philipp Wich 

 delete mode 100755 target/linux/ath25/base-files/etc/board.d/01_leds
 create mode 100755 target/linux/ath25/base-files/etc/board.d/01_system

diff --git a/target/linux/ath25/base-files/etc/board.d/01_leds 
b/target/linux/ath25/base-files/etc/board.d/01_leds
deleted file mode 100755
index e6ab4a7..000
--- a/target/linux/ath25/base-files/etc/board.d/01_leds
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-# Copyright 2012-2015 OpenWrt.org
-#
-
-. /lib/functions/uci-defaults.sh
-
-board_config_update
-
-ucidef_set_led_netdev "wlan" "wlan" "wlan" "wlan0"
-
-board_config_flush
-
-exit 0
diff --git a/target/linux/ath25/base-files/etc/board.d/01_system 
b/target/linux/ath25/base-files/etc/board.d/01_system
new file mode 100755
index 000..eac16b5
--- /dev/null
+++ b/target/linux/ath25/base-files/etc/board.d/01_system
@@ -0,0 +1,16 @@
+#!/bin/sh
+# Copyright 2012-2015 OpenWrt.org
+#
+
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+ucidef_set_led_netdev "wlan" "wlan" "wlan" "wlan0"
+
+ucidef_add_button "shortreset" "reset" "released" "logger reboot" "0" "4"
+ucidef_add_button "longreset" "reset" "released" "logger factory default" "5" 
"30"
+
+board_config_flush
+
+exit 0
diff --git a/target/linux/ath25/base-files/etc/config/system 
b/target/linux/ath25/base-files/etc/config/system
index 1d29ad8..0834b52 100644
--- a/target/linux/ath25/base-files/etc/config/system
+++ b/target/linux/ath25/base-files/etc/config/system
@@ -7,17 +7,3 @@ config timeserver ntp
list server 1.openwrt.pool.ntp.org
list server 2.openwrt.pool.ntp.org
list server 3.openwrt.pool.ntp.org
-
-config button
-   option button   reset
-   option action   released
-   option handler  "logger reboot"
-   option min  0
-   option max  4
-
-config button
-   option button   reset
-   option action   released
-   option handler  "logger factory default"
-   option min  5
-   option max  30
-- 
2.1.4


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


Re: [LEDE-DEV] [PATCH] mac80211: respect user-set regulatory domain by default

2016-05-31 Thread Daniel Golle
Hi David,

On Thu, May 26, 2016 at 02:51:17AM -0700, David Lang wrote:
> On Thu, 26 May 2016, Daniel Golle wrote:
> 
> > Hi Daniel!
> > 
> > On Wed, May 25, 2016 at 09:29:23PM -0400, Daniel Dickinson wrote:
> > > ...
> > > If the FCC hadn't already completely knobbish and basically eliminated
> > > (or least required one to be much more determined and skilled) the
> > > ability to use OpenWrt/LEDE on new routers in the US anyway, I might
> > > have some objection (I'm not in the US but Canada will almost certainly
> > > adopt similar legislation since our government tends to do what the US
> > > wants, putzes that they are) on the grounds of leading to trouble.
> > > 
> > > As it is, for new wireless routers, the US, and probably soon Canada,
> > > are shut out from participating in OpenWrt/LEDE anyway, it's pretty much
> > > moot point for those of us here, and in sane parts of the world it makes
> > > sense.
> > 
> > As we have learned at BattleMesh, this whole lockdown madness was
> > actually started in some back-office of the European Comission back
> > in 2014 without anyone of us noticing. As usually, if things like
> > that happend, we Europeans are quick to blame others eventhough it
> > was out own governments making that decission and then encouraging
> > the FCC to do the same on the other side of the Atlantic.
> 
> It's also important to note that the FCC has not passed any rules requiring
> a lockdown. The posted some proposed rules that would require a lockdown,
> but after the backlash have made public statements that they do not intend
> to block OpenWRT or similar (and they started the 'free the settop box'
> project to break existing cable lockdowns)
> 
> Linksys would not be able to say that they are not going to lock down their
> devices if the FCC actually required it.

Well, Linksys (and others using mv88w8864 or ath10k) can opt for really
only locking the radio firmware and thereby create a niche-market for
'open-source-friendly' routers. However, this is obviously not possible
for ath9k and might be hard or even impossible to achieve using other
pure softmac (ie. firmware-less) chips as well.

> 
> 
> Back on topic, I think it's a good thing to default to world-wide and allow
> the user to set the proper country (they should not need to know what the
> codes are)

Ack. Imho the ISO country code is the right thing to store in UCI,
(translated) country names should be exposed to users on the
web-interface, but that's really only on the view-level.

It also doesn't make much sense to store the country-code for each
radio, it's a system-wide property and should thus go into
/etc/config/system (opinions?).

> 
> be sure to have the appropriate dire warnings about deliberatly setting it
> incorrectly and the trouble you could get into :-)

Obviously there should be warnings in the documentation and web-
interface as well as comments in the configuration file.


Cheers


Daniel

> 
> David Lang
> AG6AH

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


Re: [LEDE-DEV] [PATCH 2/2] Add script to build common platforms.

2016-05-31 Thread Conor O'Gorman



On 28/05/16 15:55, Ben Greear wrote:



On 05/27/2016 11:10 PM, David Lang wrote:

On Fri, 27 May 2016, Ben Greear wrote:


On 05/27/2016 02:46 AM, Karl Palsson wrote:


gree...@candelatech.com wrote:

From: Ben Greear 

The idea is to be able to allow newbies to easily build images
for common hardware. These images should be user-friendly,
including luci and other tools that may aid debugging and use
of the platform.

Signed-off-by: Ben Greear 
---
  buildme.sh| 76 
+++

  buildme_targets/x86_64/diffconfig.txt | 26 
  2 files changed, 102 insertions(+)
  create mode 100755 buildme.sh
  create mode 100644 buildme_targets/x86_64/diffconfig.txt




While I've written similar scripts for helping colleagues
bootstrap a build, I'm not entirely convinced that adding more
piles of shell script to the build tree is necessarily an
improvement, if the goal is helping people build an image that
suits them.


My goal is more to have an easy way to build a useful image
that should work for most people.  Lots of people and organizations
have their own forks and scripts, and it seems much of the changes 
are just

tweaks how to the core project is built.  If we can bring some
of this into the main tree maybe that will help everyone work
closer to upstream code.


rather than making a bunch of scripts for specific models, how about 
some scripts that will let you build from a downloaded .config (yes, 
you can do this manually, but it could be greatly simplified)


Then people can build the latest code from a much larger set of 
configs, and tweak a config and then use it over time to build newer 
versions.


My idea was to store these configs in the git repo and have an easy 
way for users

to find and use them.

The x86_64 is just a starting point.  I think there could be a large 
amount of different
configs, for different boards, different needs, etc.  Basically, 
everyone using openwrt has

a unique config...I think a lot of that could be re-used and shared.

Thanks,
Ben



The ImageBuilder should be covering this scenario.

Conor

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


Re: [LEDE-DEV] Adding support for Comfast CF-WR650AC

2016-05-31 Thread Gareth Parker
Thanks Jo

I'll do just that and create a fork.  I've been doing some testing with an
earlier version of openwrt trunk trying to find out what change and when
that has caused the switch problem on this router.

This revision seen to be fine:
http://git.openwrt.org/?p=openwrt.git;a=commit;h=5603e83223a4bd5b3c97e7168fa
69b3a3e215671

It's just anything Designated Driver related that causes this problem, but
what exactly I'm not sure.

Regards,

Gareth


-Original Message-
From: Lede-dev [mailto:lede-dev-boun...@lists.infradead.org] On Behalf Of
Jo-Philipp Wich
Sent: Monday, 30 May 2016 1:09 a.m.
To: lede-dev@lists.infradead.org
Subject: Re: [LEDE-DEV] Adding support for Comfast CF-WR650AC

Hi Gareth,

the CC patch you linked looks reasonably clean so I can't spot immediate
reasons that would prevent it from getting included into LEDE.

I suggest that you fork https://github.com/lede-project/source and integrate
the required changes into your clone, then open a PR based on it. You can of
course use git-send-email and patches too if you prefer that.

If you need help porting certain changes to master let me know, a few things
surrounding image building and default config changed compared to CC.

Regards,
Jo

___
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] brcm47xx legacy broken in trunk?

2016-05-31 Thread p . wassi
> What about:
> openwrt-brcm47xx-legacy-standard-squashfs.trx
> lede-brcm47xx-legacy-standard-squashfs.trx
> ? Can u try them?

That's what I meant with 
> the trx versions of these for the sysupgrade
None of them work. The WRT54GL refuses to boot.
I do a tftp recovery with Linksys' firmware then.
It doesn't matter whether I flash *-wrt54g-squashfs.bin directly
from trunk or first install some other release and do a sysupgrade
using the trx then. WRT54 won't boot on trunk (kernel 4.1.x).

The bootloader however passes control to the firmware, since the
checksums are ok.

Best regards,
P.Wassi

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


Re: [LEDE-DEV] brcm47xx legacy broken in trunk?

2016-05-31 Thread Rafał Miłecki
On 31 May 2016 at 09:22,   wrote:
> However, for me, the latest working image seems to be 15.05.1.
> I installed openwrt-15.05.1-brcm47xx-legacy-squashfs.trx which has kernel 
> 3.18.23 and can
> see this on the serial console during startup:
>
> (...)
>
> However, if I take
>   openwrt-brcm47xx-legacy-linksys-wrt54g-squashfs.bin, or
>   lede-brcm47xx-legacy-linksys-wrt54g-squashfs.bin, or
>   the trx versions of these for the sysupgrade, or
>   the generic (and not legacy), just in case...
> none of them work.

What about:
openwrt-brcm47xx-legacy-standard-squashfs.trx
lede-brcm47xx-legacy-standard-squashfs.trx
? Can u try them?

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


[LEDE-DEV] Netifd patch 8cb06c3efe734a521507cba7b5f0ba206e2476e0

2016-05-31 Thread Naresh Kumar Mehta
Felix,
I am trying to add wlan0 interface to bond interface but unable to add.
While digging further, I realized that below commit is not allowing me to
add.

http://git.openwrt.org/?p=project/netifd.git;a=commitdiff;h=8cb06c3efe734a52
1507cba7b5f0ba206e2476e0

I also noticed initial code was added by below commit
http://git.openwrt.org/?p=project/netifd.git;a=commitdiff;h=fe8a6dd2991d54c3
eb84cb12764c1316d19bac4e 

Can you please help me understand why
8cb06c3efe734a521507cba7b5f0ba206e2476e0 was added &  what issues I could
face, If remove 8cb06c3efe734a521507cba7b5f0ba206e2476e0?

Thanks,
Naresh


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


Re: [LEDE-DEV] [PATCH] kernel/mtd: Add support for Macronix mx25u25635f, used in Archer C2600 v1.1

2016-05-31 Thread A. Benz

Hi Rafał,

Will do. Thanks.

Regards,
A. Benz

On 05/31/16 04:56, Rafał Miłecki wrote:

On 30 May 2016 at 11:52, Ash Benz  wrote:

Signed-off-by: Ash Benz 
---
 .../475-mtd-spi-nor-add-macronix-mx25u25635f.patch | 10 ++
 1 file changed, 10 insertions(+)
 create mode 100644 
target/linux/generic/patches-3.18/475-mtd-spi-nor-add-macronix-mx25u25635f.patch

diff --git 
a/target/linux/generic/patches-3.18/475-mtd-spi-nor-add-macronix-mx25u25635f.patch
 
b/target/linux/generic/patches-3.18/475-mtd-spi-nor-add-macronix-mx25u25635f.patch
new file mode 100644
index 000..72c0832
--- /dev/null
+++ 
b/target/linux/generic/patches-3.18/475-mtd-spi-nor-add-macronix-mx25u25635f.patch
@@ -0,0 +1,10 @@
+--- a/drivers/mtd/spi-nor/spi-nor.c
 b/drivers/mtd/spi-nor/spi-nor.c
+@@ -532,6 +532,7 @@ static const struct spi_device_id spi_no
+   { "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) },
+   { "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) },
+   { "mx25l25635e", INFO(0xc22019, 0, 64 * 1024, 512, 0) },
++  { "mx25u25635f", INFO(0xc22539, 0, 64 * 1024, 512, 0) },
+   { "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) },
+   { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_QUAD_READ) 
},
+   { "mx66l1g55g",  INFO(0xc2261b, 0, 64 * 1024, 2048, SPI_NOR_QUAD_READ) 
},


This patch is so trivial there is no reason not to upstream it. Please
send it to the l2-mtd ML. I should've said it earlier, but I missed
it.



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


[LEDE-DEV] [PATCH] libpcap: remove unrecognized configure options

2016-05-31 Thread Dirk Neukirchen
Signed-off-by: Dirk Neukirchen 
---
 package/libs/libpcap/Makefile | 2 --
 1 file changed, 2 deletions(-)

diff --git a/package/libs/libpcap/Makefile b/package/libs/libpcap/Makefile
index 3943efa..1011ce6 100644
--- a/package/libs/libpcap/Makefile
+++ b/package/libs/libpcap/Makefile
@@ -54,9 +54,7 @@ CONFIGURE_VARS += \
 
 CONFIGURE_ARGS += \
--enable-shared \
-   --enable-static \
--disable-yydebug \
-   --with-build-cc="$(HOSTCC)" \
--with-pcap=linux \
--without-septel \
--without-dag \
-- 
2.8.3


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


[LEDE-DEV] [PATCH] xtables-addons: update to 2.11

2016-05-31 Thread Dirk Neukirchen
- fix compilation w. Kernel 4.6 due to
hash->shash crypto API
- remove a patch integrated upstream

- remove unrecognized configure option
removed upstream in 2010
commit 40d0345f1ed02de183b13a6ce38847bc1f4ac48e

Signed-off-by: Dirk Neukirchen 
---
 package/network/utils/xtables-addons/Makefile  |  5 +--
 ...-configure-compatiblity-with-POSIX-shells.patch | 51 --
 .../patches/002-fix-kernel-version-detection.patch | 12 ++---
 3 files changed, 8 insertions(+), 60 deletions(-)
 delete mode 100644 
package/network/utils/xtables-addons/patches/001-build-fix-configure-compatiblity-with-POSIX-shells.patch

diff --git a/package/network/utils/xtables-addons/Makefile 
b/package/network/utils/xtables-addons/Makefile
index da8058e..053840f 100644
--- a/package/network/utils/xtables-addons/Makefile
+++ b/package/network/utils/xtables-addons/Makefile
@@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=xtables-addons
-PKG_VERSION:=2.10
+PKG_VERSION:=2.11
 PKG_RELEASE:=1
-PKG_MD5SUM:=727bf0dd4a3d9c65724267bd0d5d80b0
+PKG_MD5SUM:=9f3123295db81a9d1bc08dabf075d0d6
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@SF/xtables-addons
@@ -39,7 +39,6 @@ endef
 
 CONFIGURE_ARGS+= \
--with-kbuild="$(LINUX_DIR)" \
-   --with-xtables="$(STAGING_DIR)/usr" \
--with-xtlibdir="/usr/lib/iptables" \
 
 define Build/Compile
diff --git 
a/package/network/utils/xtables-addons/patches/001-build-fix-configure-compatiblity-with-POSIX-shells.patch
 
b/package/network/utils/xtables-addons/patches/001-build-fix-configure-compatiblity-with-POSIX-shells.patch
deleted file mode 100644
index e0b11b5..000
--- 
a/package/network/utils/xtables-addons/patches/001-build-fix-configure-compatiblity-with-POSIX-shells.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From f07a0a5cb8b3c5e1aee8b30c7fa21ccfbf24a95a Mon Sep 17 00:00:00 2001
-Message-Id: 

-From: Matthias Schiffer 
-Date: Fri, 1 Apr 2016 22:24:00 +0200
-Subject: [PATCH] build: fix configure compatiblity with POSIX shells
-
-The kernel version detection code uses some bashisms, which makes the build
-fail on Debian systems where /bin/sh links to dash. Replace with POSIX-
-conforming commands at the cost of requiring awk.

- configure.ac | 24 +---
- 1 file changed, 9 insertions(+), 15 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 82a1355..5a5ea57 100644
 a/configure.ac
-+++ b/configure.ac
-@@ -44,21 +44,15 @@ regular_CFLAGS="-Wall -Waggregate-return 
-Wmissing-declarations \
- 
- if test -n "$kbuilddir"; then
-   AC_MSG_CHECKING([kernel version that we will build against])
--  krel="$(make -sC "$kbuilddir" M=$PWD kernelrelease)";
--  kmajor="${krel%%[[^0-9]]*}";
--  kmajor="$(($kmajor+0))";
--  krel="${krel:${#kmajor}}";
--  krel="${krel#.}";
--  kminor="${krel%%[[^0-9]]*}";
--  kminor="$(($kminor+0))";
--  krel="${krel:${#kminor}}";
--  krel="${krel#.}";
--  kmicro="${krel%%[[^0-9]]*}";
--  kmicro="$(($kmicro+0))";
--  krel="${krel:${#kmicro}}";
--  krel="${krel#.}";
--  kstable="${krel%%[[^0-9]]*}";
--  kstable="$(($kstable+0))";
-+  krel="$(make -sC "$kbuilddir" M=$PWD kernelrelease | $AWK -v 
'FS=[[^0-9.]]' '{print $1; exit}')";
-+  save_IFS=$IFS;
-+  IFS='.';
-+  set x $krel;
-+  IFS=$save_IFS;
-+  kmajor="$(($2+0))";
-+  kminor="$(($3+0))";
-+  kmicro="$(($4+0))";
-+  kstable="$(($5+0))";
-   if test -z "$kmajor" -o -z "$kminor" -o -z "$kmicro"; then
-   echo "WARNING: Version detection did not succeed. Continue at 
own luck.";
-   else
--- 
-2.8.0
-
diff --git 
a/package/network/utils/xtables-addons/patches/002-fix-kernel-version-detection.patch
 
b/package/network/utils/xtables-addons/patches/002-fix-kernel-version-detection.patch
index 6a7a099..775ccf6 100644
--- 
a/package/network/utils/xtables-addons/patches/002-fix-kernel-version-detection.patch
+++ 
b/package/network/utils/xtables-addons/patches/002-fix-kernel-version-detection.patch
@@ -1,11 +1,11 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -44,7 +44,7 @@ regular_CFLAGS="-Wall -Waggregate-return 
-Wmissing-declarations \
+@@ -44,7 +44,7 @@ regular_CFLAGS="-Wall -Waggregate-return
  
  if test -n "$kbuilddir"; then
AC_MSG_CHECKING([kernel version that we will build against])
--  krel="$(make -sC "$kbuilddir" M=$PWD kernelrelease | $AWK -v 
'FS=[[^0-9.]]' '{print $1; exit}')";
-+  krel="$(make -sC "$kbuilddir" M=$PWD kernelversion | $AWK -v 
'FS=[[^0-9.]]' '{print $1; exit}')";
-   save_IFS=$IFS;
-   IFS='.';
-   set x $krel;
+-  krel="$(make -sC "$kbuilddir" M=$PWD kernelrelease | $AWK -v 
'FS=[[^0-9.]]' '{print $1; exit}')"
++  krel="$(make -sC "$kbuilddir" M=$PWD kernelversion | $AWK -v 
'FS=[[^0-9.]]' 

[LEDE-DEV] brcm47xx legacy broken in trunk?

2016-05-31 Thread p . wassi
Hi there!

I've just revived an old WRT54GL and implanted 32MB RAM into it - it works
perfectly well :)

However, for me, the latest working image seems to be 15.05.1.
I installed openwrt-15.05.1-brcm47xx-legacy-squashfs.trx which has kernel 
3.18.23 and can
see this on the serial console during startup:
> (...)
> Device eth0:  hwaddr 68-7F-74-xx-xx-xx, ipaddr 192.168.1.1, mask 255.255.255.0
> gateway not set, nameserver not set
> Reading :: Failed.: Timeout occured
> Loader:raw Filesys:raw Dev:flash0.os File: Options:(null)
> Loading: .. 3712 bytes read
> Entry at 0x80001000
> Closing network.
> Starting program at 0x80001000
> [0.00] Linux version 3.18.23 (buildbot@builder1) (gcc version 4.8.3 
> (OpenWrt/Linaro GCC 4.8-2014.04 r48532) ) #1 Tue Mar 1 09:18:44 CET 2016
> [0.00] CPU0 revision is: 00029008 (Broadcom BMIPS3300)
> [0.00] bcm47xx: Using ssb bus
> [0.00] ssb: Found chip with id 0x5352, rev 0x00 and package 0x02
> (...)

However, if I take
  openwrt-brcm47xx-legacy-linksys-wrt54g-squashfs.bin, or
  lede-brcm47xx-legacy-linksys-wrt54g-squashfs.bin, or
  the trx versions of these for the sysupgrade, or
  the generic (and not legacy), just in case...
none of them work.
Serial console freezes at:
> (...)
> Device eth0:  hwaddr 68-7F-74-xx-xx-xx, ipaddr 192.168.1.1, mask 255.255.255.0
> gateway not set, nameserver not set
> Loader:raw Filesys:raw Dev:flash0.os File: Options:(null)
> Loading: .. 3800 bytes read
> Entry at 0x80001000
> Closing network.
> Starting program at 0x80001000

Maybe this is related to kernel switch 3.18.23 -> 4.1.x?
As the target images are still built, I guess support hasn't been dropped yet.
WRT54GL with 32MB: Er läuft und läuft und läuft... :)

Any thoughts on this?

Best regards,
P.Wassi

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