[LEDE-DEV] Kodi

2017-03-15 Thread Stijn Tintel
Last week I managed to get Kodi to build for LEDE, and I am running it
on my Raspberry Pi Zero W. It's mostly quick and dirty, definitely not
ready to push to the repository, and in its current form it will only
work on Raspberry Pi. My main question now is: is there any interest in
having Kodi for LEDE at all, or should I not bother preparing it for
submission.

Posted a few screenshots of the "System info" section on Twitter:
https://twitter.com/stintel/status/840501146343084032

Thanks,
Stijn


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


Re: [LEDE-DEV] Kodi

2017-03-15 Thread Stijn Tintel
On 15-03-17 10:20, Bastian Bittorf wrote:
> * Stijn Tintel  [15.03.2017 10:03]:
>> work on Raspberry Pi. My main question now is: is there any interest in
>> having Kodi for LEDE at all, or should I not bother preparing it for
>> submission.
> i like it...any repo where we can see your changes?
>
Unfortunately not, everything is currently in a local directory on my
workstation.

Stijn


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


Re: [LEDE-DEV] Kodi

2017-03-15 Thread Stijn Tintel
On 15-03-17 11:57, Daniel Engberg wrote:
> Hi,
Hi Daniel,

Can you please check why your mail client breaks up the mailing-list
thread each time you reply? This is quite annoying as it breaks the flow
of conversation. It's even worse than top-posting, please fix this.

Thanks,
Stijn

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


Re: [LEDE-DEV] Kodi

2017-03-15 Thread Stijn Tintel
On 15-03-17 13:45, Mirko Vogt wrote:
> On 03/15/2017 11:57 AM, Daniel Engberg wrote:
>> Hi,
> Huhu,
>
>> While I applaud your achievement I'd don't see such projects viable in
>> terms of maintainability and longevity.
> Applauds from me as well! I started doing so with XBMC a couple of years
> ago and eventually gave up..
Thanks! Took me about a week, mostly because I only fixed the issue
breaking make -jN with N > 1 near the end of that week. Parallel build
works fine now, and I'm actually impressed with how fast it builds.
>> Pulling in Kodi will result in lots of external packages and
>> dependencies to make it usable in a reasonable way.
> Sorry, but I totally disagree.
> I always saw (and still see) OpenWrt/LEDE as a toolchain and Linux
> embedded distribution - *not* just for routers.
This is even mentioned in the very first section on
https://lede-project.org/
>
> Me and few others already started very early to get it running on rather
> unusual devices (landline phones, mobile phones, digital picture frames,
> even (mini) notebooks (OLPC, Qi NanoNote, etc.)).
>
> Almost a decade ago by now we ported Xorg and all it's dependencies to
> OpenWrt/LEDE. Later on GTK, enlightenment and its EFL stack, Qt and what
> else. Although the xorg-feed is not in a good shape anymore (and I
> rather discourage anybody from using Xorg if there's no real need for a
> windowing system), lot's of stuff remained, is still maintained and used.
> The new video feed is supposed to be kind of a reincarnation of the
> outdated xorg feed.
Where can I find this Xorg feed? I looked for it but was unable to find
it. Probably didn't look hard enough.
> I highly encourage approaches like those and don't see any need for
> forcing OpenWrt/LEDE being only a router distribution.
> This only counts of course, if one approach doesn't interfere with the
> other. So let's come to your concrete issues:
>
>> There are several issues with this:
>>
>> * In general binary size > performance and/or functionality pretty much
>> always takes priority, this is a major issue when it comes to multimedia
>> (ffmpeg and friends comes mind).
> I fail to see in which way additional packages - in this case:
> dependencies for Kodi - do add size/performance issues the existing
> device configurations.
>
>> * It's more or less duplicating work already done by projects like
>> LibreELEC, OSMC etc.
> Then all work for OpenWrt / LEDE is duplicated work already done by
> Gentoo (emerge build instructions), Debian (deb rules-file),
> OpenEmbedded, you name it...
I tried OpenELEC in the past, and while it worked without much issues, I
didn't quite like the fact that it runs everything as root, and that
it's near impossible to do anything else than kodi with the device.
Haven't tried LibreELEC, but it looks like it still has the same
limitations. I have no experience with OSMC.

In fact, I did not intend to use my RPi0W as a media player at all, but
then I figured using HDMI would much improve the sound quality compared
to A2DP (which is currently my only other option at this location).
Sure, if it's just for audio I can use mpd as well, but I would still
have to watch stuff on my tablet.

For me it is all about using my favorite embedded distro with all its
awesomeness, and running my favorite media center software on top of it,
while still being able to use the device for something else.

>
>> * You'll need to import a lot more of 3rd party libs and applications to
>> make it a viable/reasonable user experience and there's a overall
>> concern about build performance of the buildbots.
> I heard that buildbot performance argument quite often. Back then, I
> eventually gave up, excluded the xorg-feed from the default feeds.conf
> and problem solved.
> Funny enough however, the discussion comes up every now and then again.
> Last time - without me re-initiating it nor taking sides - quite a few
> people who're participating at OpenWrt/LEDE for a long time by now,
> tried to encourage me to migrate the video feed into the packages feed.
>
> Right now I'm fine with having the extra video feed and maybe will open
> up the discussion about having it enabled by default some day. So, no
> additional build time (for now).
I feel there's enough interest in having Kodi on LEDE, so I'll try to
clean up my work and publish it at least somewhere. Whether it will
eventually end up in packages or somewhere else, is a decision that can
be made when it is ready. Personally I don't like having too many
different feeds, as I think it is confusing for users, and it seems to
give people the idea that maintaining their own feed is a good idea.
Seen too many feeds already with a few packages that would be
interesting to have in the packages feed, but people never bothered
submitting them. I'd rather have a few feeds with a well defined set of
rules, and a lot of people working on them, than having packages
scattered over numerous mini feeds, many of which people don't even know
about

[LEDE-DEV] Kodi feed

2017-03-21 Thread Stijn Tintel
Hi all,

After a minor cleanup, I published [0] Kodi and dependencies for running
on the brcm2708 target (Raspberry Pi). Dependencies for this are in the
kodi branches of my LEDE staging tree [1], and my fork of the packages
feed [2].

I am currently working on x86 support, but it's taking longer than
expected so I decided to already post what's working. If you want to
contribute, please contact me first (preferably on IRC), to avoid
duplicate effort.

Several packages have a hard dependency on libstdcpp. This is either due
to uClibc++ not supporting shared_ptr (kodi, libcec), or to avoid
linking problems (taglib, tinyxml).
The Kodi patch 900-musl-compat.patch is ugly, especially the "iofile.h"
part. Unfortunately the Kodi patch from Alpine that addresses this issue
[3] doesn't apply to Kodi 17, so I went for a quick & dirty fix.
Suggestions for a clean fix that can be submitted upstream are very welcome.

Thanks,
Stijn

[0] https://github.com/stintel/lede-wip.git
[1] https://git.lede-project.org/lede/stintel/staging.git
[2] https://github.com/stintel/openwrt-packages.git
[3]
http://git.alpinelinux.org/cgit/aports/tree/community/kodi/fix-fileemu.patch



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


[LEDE-DEV] [PATCH] rules.mk: disable CXX11 ABI with uClibc++

2017-03-21 Thread Stijn Tintel
GCC 5.1 introduced a new library ABI to conform to the 2011 C++
standard. This new ABI is enabled by default. This causes compatibility
issues between libraries compiled against libstdc++ and libraries
compiled against uClibc++, as the latter doesn't support this new ABI.

Solve this by disabling the _GLIBCXX_USE_CXX11_ABI macro when uClibc++
is selected as the preferred standard C++ library.

Signed-off-by: Stijn Tintel 
---
 rules.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules.mk b/rules.mk
index ed796a5..bf051b7 100644
--- a/rules.mk
+++ b/rules.mk
@@ -164,7 +164,7 @@ TARGET_PATH:=$(subst $(space),:,$(filter-out .,$(filter-out 
./,$(subst :,$(space
 TARGET_INIT_PATH:=$(call qstrip,$(CONFIG_TARGET_INIT_PATH))
 TARGET_INIT_PATH:=$(if 
$(TARGET_INIT_PATH),$(TARGET_INIT_PATH),/usr/sbin:/sbin:/usr/bin:/bin)
 TARGET_CFLAGS:=$(TARGET_OPTIMIZATION)$(if $(CONFIG_DEBUG), -g3) $(call 
qstrip,$(CONFIG_EXTRA_OPTIMIZATION))
-TARGET_CXXFLAGS = $(TARGET_CFLAGS)
+TARGET_CXXFLAGS = $(TARGET_CFLAGS) $(if $(CONFIG_USE_UCLIBCXX), 
-D_GLIBCXX_USE_CXX11_ABI=0)
 TARGET_ASFLAGS_DEFAULT = $(TARGET_CFLAGS)
 TARGET_ASFLAGS = $(TARGET_ASFLAGS_DEFAULT)
 TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include
-- 
2.10.2


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


Re: [LEDE-DEV] [PATCH] brcm2708: rename all patches from raspberrypi git tree to use 999 prefix

2017-03-23 Thread Stijn Tintel
On 23-03-17 19:49, Rafał Miłecki wrote:
> On 23 March 2017 at 18:57, Álvaro Fernández Rojas  wrote:
>> El 23/03/2017 a las 18:38, Rafał Miłecki escribió:
>>> On 2017-03-23 18:29, Felix Fietkau wrote:
>>>> On 2017-03-22 21:36, Rafał Miłecki wrote:
>>>>> From: Rafał Miłecki 
>>>>>
>>>>> Right now all brcm2708 patches are extracted from the non-mainline
>>>>> raspberrypi/linux git tree. Many of them are hacks and/or are unneeded
>>>>> in LEDE. Raspberry Pi is getting better and better mainline support so
>>>>> it would be nice to finally start maintaining patches in a cleaner way:
>>>>> 1) Backport patches accepted in upstream tree
>>>>> 2) Start using upstream drivers
>>>>> 3) Pick only these patches that are needed for more complete support
>>>>>
>>>>> Handling above tasks requires grouping patches - ideally using the same
>>>>> prefixes as generic ones. It means we should rename existing patches to
>>>>> use some high prefix. This will allow e.g. use 0xx for backported code.
>>>> I agree with the split, but could you please use a number much lower
>>>> than 999? ;)
>> I also agree with the split, but I have to warn you that I may not be able 
>> to achieve this right now since I haven't got much free time lately...
>>
>>> I'd like to have "access" to all standard prefixes:
>>>
>>> 0xx - upstream backports
>>> 1xx - code awaiting upstream merge
>>> 2xx - kernel build / config / header patches
>>> 3xx - architecture specific patches
>>> 4xx - mtd related patches (subsystem and drivers)
>>> 5xx - filesystem related patches
>>> 6xx - generic network patches
>>> 7xx - network / phy driver patches
>>> 8xx - other drivers
>>> 9xx - uncategorized other patches
>> I think those patches fit into the "uncategorized other patches" category so 
>> why don't we use 900-?
> I'd also like to have space for "uncategorized other patches" added
> before patches backported from raspberrypi/linux. 950 would allow
> using 900-949 numbers for such stuff. And in case we need patches on
> top of raspberrypi/linux (as Felix suggested) we may use 951-999.
>
950 sounds good to me.

Acked-by: Stijn Tintel 

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


Re: [LEDE-DEV] CPU locked at lowest frequency on BCM2078 targets

2017-05-13 Thread Stijn Tintel
On 13-05-17 14:48, Bryan Mayland wrote:
> Hello, I work on an open source project which uses the Raspberry Pi
> with LEDE as the host board. I've noticed that the kernel config does
> not include the BCM2835 cpufreq driver and therefore the CPU remains
> locked at the frequency set by the bootloader. This severely degrades
> the performance of these devices as the bootloader sets the CPU at the
> lowest frequency. I've run some nbench-byte benchmarks on bcm2708 and
> bcm2709 (32-bit) platforms:
>
Hi, thanks for pointing that out.
> Can we get cpufreq, ondemand scaler, and default=ondemand for this
> platform / two targets? If needed I can submit a patch / signoff, or
> if there is a reason this should not be done I'd love to start a
> discussion about it.
Please test a build from my staging tree:
https://git.lede-project.org/?p=lede/stintel/staging.git;a=summary

Thanks,
Stijn

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


Re: [LEDE-DEV] [RFC 1/1] Revert "build: fix regression on running make kernel_menuconfig"

2017-05-14 Thread Stijn Tintel
On 15-05-17 00:20, Sergey Ryazanov wrote:
> This reverts commit 86c966a8ae9c4e74b912a16a760aaed17c68eb32.
>
> This patch caused the segmentation fault in mconf during
> "make kernel_menuconfig" due to a mess with ncurses/ncursesw libraries
> (forced linking with ncurses, while binary compiled with headers of
> ncursesw).
>
> Fixes: FS#366 (make kernel_menuconfig: Segmentation fault)
>
> Signed-off-by: Sergey Ryazanov 
> ---
>  include/kernel-build.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/kernel-build.mk b/include/kernel-build.mk
> index 7d1e23c..a4d12ec 100644
> --- a/include/kernel-build.mk
> +++ b/include/kernel-build.mk
> @@ -159,7 +159,7 @@ define BuildKernel
>   rm -f $(LINUX_DIR)/.config.prev
>   rm -f $(STAMP_CONFIGURED)
>   $(LINUX_RECONF_CMD) > $(LINUX_DIR)/.config
> - $(_SINGLE)$(MAKE) -C $(LINUX_DIR) $(KERNEL_MAKEOPTS) 
> HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib -lncurses" $$@
> + $(_SINGLE)$(MAKE) -C $(LINUX_DIR) $(KERNEL_MAKEOPTS) $$@
>   $(LINUX_RECONF_DIFF) $(LINUX_DIR)/.config > $(LINUX_RECONFIG_TARGET)
>  
>install: $(LINUX_DIR)/.image

This fixes FS #366 for me. Thanks a lot!

Tested-by: Stijn Tintel 


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


Re: [LEDE-DEV] [OpenWrt-Devel] openwrt and lede - remerge proposal V3

2017-05-29 Thread Stijn Tintel
On 29-05-17 09:03, John Crispin wrote:
> (resend, this time as plain text)
>
> Hi,
>
> here is a V3 of the remerge proposal, I tried to fold all the comments
> people made into it, if anything is missing let me know. Please
> remeber that post remerge anything can be voted on, so cluttering the
> proposal with many details will delay the remerge even more.
>
> Ideally we manage to vote during this week.
>
Full ACK from me.

Thanks,
Stijn

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


Re: [LEDE-DEV] [PATCH] hostapd: configure NAS ID regardless of encryption

2017-06-26 Thread Stijn Tintel
On 14-06-17 14:51, Yury Shvedov wrote:
> RADIUS protocol could be used not only for authentication but for
> accounting too. Accounting could be configured for any type of networks.
> However there no way to configure NAS Identifier for non-WPA-EAP
> networks without this patch.
The patch is broken. Please use git send-email or create a PR on Github.
> Signed-off-by: Yury Shvedov 
> ---
>  package/network/services/hostapd/files/hostapd.sh | 9 ++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/package/network/services/hostapd/files/hostapd.sh 
> b/package/network/services/hostapd/files/hostapd.sh
> index 9514f919ee..8920c51eb7 100644
> --- a/package/network/services/hostapd/files/hostapd.sh
> +++ b/package/network/services/hostapd/files/hostapd.sh
> @@ -370,11 +370,9 @@ hostapd_set_bss_options() {
>   network_get_device ifname "$iapp_interface" || ifname = 
> "$iapp_interface"
>   append bss_conf "iapp_interface=$ifname" "$N"
>   }
> -
>   if [ "$wpa" -ge "1" ]; then
> - json_get_vars nasid ieee80211r
> + json_get_vars ieee80211r
>   set_default ieee80211r 0
> - [ -n "$nasid" ] && append bss_conf "nas_identifier=$nasid" "$N"
>   if [ "$ieee80211r" -gt "0" ]; then
>   json_get_vars mobility_domain r0_key_lifetime 
> r1_key_holder \
> @@ -433,6 +431,11 @@ hostapd_set_bss_options() {
>   esac
>   fi
>  +if [ -n "$acct_server" -o "$wpa" -ge "1" ]; then
> + json_get_vars nasid
> + [ -n "$nasid" ] && append bss_conf "nas_identifier=$nasid" "$N"
> + fi
> +
Since we are moving this directive, I would put it right before the code
that adds acct_server_addr to the config. I would even consider dropping
the if around it entirely, adding the directive doesn't break anything
with wpa and accounting disabled. In this case you can use the
json_get_vars at the beginning of hostapd_set_bss_options.
>   _macfile="/var/run/hostapd-$ifname.maclist"
>   case "$macfilter" in
>   allow)

Thanks,
Stijn

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


Re: [LEDE-DEV] [PATCH] Adding acct_interval to wireless configuration

2017-06-26 Thread Stijn Tintel
On 29-05-17 14:04, Yury Shvedov wrote:
> Hi, I'm new here and I wonder why there is still no UCI option to configure 
> Radius-Accounting-Interim-Interval. 
> I've made a patch to fix that and like to share it to others and ask is there 
> any serious reason for lack of such
> option?
>
> Make an ability to configure Accounting-Interim-Interval via UCI

The patch is broken. Please use git send-email or create a PR on Github.

>
> Signed-off-by: Yury Shvedov 
> ---
>  package/network/services/hostapd/files/hostapd.sh | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/package/network/services/hostapd/files/hostapd.sh 
> b/package/network/services/hostapd/files/hostapd.sh
> index 6fb902e376..e6bccef39b 100644
> --- a/package/network/services/hostapd/files/hostapd.sh
> +++ b/package/network/services/hostapd/files/hostapd.sh
> @@ -151,6 +151,7 @@ hostapd_common_add_bss_config() {
>   config_add_string acct_server
>   config_add_string acct_secret
>   config_add_int acct_port
> + config_add_int acct_interval
>   config_add_string dae_client
>   config_add_string dae_secret
> @@ -208,7 +209,7 @@ hostapd_set_bss_options() {
>   wps_independent wps_device_type wps_device_name 
> wps_manufacturer wps_pin \
>   macfilter ssid wmm uapsd hidden short_preamble rsn_preauth \
>   iapp_interface eapol_version acct_server acct_secret acct_port \
> - dynamic_vlan ieee80211w
> + acct_interval dynamic_vlan ieee80211w
Please group the 4 acct_* directives on the same line, and combine the
resulting 2 short lines.
>   set_default isolate 0
>   set_default maxassoc 0
> @@ -249,6 +250,8 @@ hostapd_set_bss_options() {
>   append bss_conf "acct_server_port=$acct_port" "$N"
>   [ -n "$acct_secret" ] && \
>   append bss_conf 
> "acct_server_shared_secret=$acct_secret" "$N"
> + [ -n "$acct_interval" ] && \
> + append bss_conf 
> "radius_acct_interim_interval=$acct_interval" "$N"
>   }
>   local vlan_possible=""
Thanks,
Stijn

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


Re: [LEDE-DEV] [PATCH] Adding acct_interval to wireless configuration

2017-06-26 Thread Stijn Tintel
On 27-06-17 08:23, Yury Shvedov wrote:
> Like that?
No, the patch is still mangled, and it is not sent with git send-email,
but with Thunderbird. Please have a look at
https://www.kernel.org/pub/software/scm/git/docs/git-send-email.html,
you can pass your SMTP server credentials to it. Alternatively, create a
PR on Github.

Thanks,
Stijn

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


Re: [LEDE-DEV] [PATCH] Adding acct_interval to wireless configuration

2017-06-27 Thread Stijn Tintel
On 27-06-17 09:34, yshve...@wimarksystems.com wrote:
> From: Yury Shvedov 
>
> Sorry, I've tried to configure my thunderbird properly to use it as
> patch sender. But it seems unsuccessfully. Do I understand you
> correctly about grouping acct_* values?
>
No worries, it's OK now. Added to my staging tree:
https://git.lede-project.org/22697b7ccffc7302d8b2febd1fde97f6b668764c

Thanks,
Stijn

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


Re: [LEDE-DEV] [PATCH] hostapd: configure NAS ID regardless of encryption

2017-06-27 Thread Stijn Tintel
On 27-06-17 10:21, Yury Shvedov wrote:
> RADIUS protocol could be used not only for authentication but for
> accounting too. Accounting could be configured for any type of networks.
> However there no way to configure NAS Identifier for non-WPA-EAP
> networks without this patch.
The patch is not mangled now, but no longer applies cleanly due to the
changes in your previous patch. Please rebase it on master and resend.

Thanks,
Stijn

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


Re: [LEDE-DEV] [PATCH] hostapd: configure NAS ID regardless of encryption

2017-06-27 Thread Stijn Tintel
On 27-06-17 10:43, Yury Shvedov wrote:
> Fixed with acct_interval patch (your changes was not appeared at github
> for now).
>
> By the way, I believe, that configuring RADIUS, (even AUTH) without
> WPA-EAP will not break anything at all (that is not definitely).
> But I definitely saw the piece of code in hostapd which uses RADIUS-AUTH
> on the 802.11-AUTH stage before 802.11-ACCT without EAP.
>
> RADIUS protocol could be used not only for authentication but for
> accounting too. Accounting could be configured for any type of networks.
> However there no way to configure NAS Identifier for non-WPA-EAP
> networks without this patch.
>
Added to my staging tree:
https://git.lede-project.org/2a25140cebfc6c5058a03ab9089ec2a1c77f5394

Thanks,
Stijn

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


Re: [LEDE-DEV] [PATCH 1/2] dropbear: server support option '-T' max auth tries

2017-06-27 Thread Stijn Tintel
On 25-06-17 22:40, Kevin Darbyshire-Bryant wrote:
> Add support for '-T n' for a run-time specification for maximum number
> of authentication attempts where 'n' is between 1 and compile time
> option MAX_AUTH_TRIES.
>
> A default number of tries can be specified at compile time using
> 'DEFAULT_AUTH_TRIES' which itself defaults to MAX_AUTH_TRIES for
> backwards compatibility.
>
Merged into my staging tree:
https://git.lede-project.org/4a13c79fb88834537faae8129e97464a8f107a1a

Thanks,
Stijn

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


Re: [LEDE-DEV] [PATCH 2/2] dropbear: limit max auth tries from 10 to 3

2017-06-27 Thread Stijn Tintel
On 25-06-17 22:40, Kevin Darbyshire-Bryant wrote:
> 10 attempts at login before dropping connection is too many, 3 tries and
> you're out.
>
As we are changing a default, it might annoy users for whatever reason.
Since this is done at compile time, there is no easy way to revert to
the old behaviour. I decided to add a UCI option instead:
https://git.lede-project.org/eb22143b08f908c15035be563c111cd866638566

Thanks,
Stijn

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


Re: [LEDE-DEV] [PATCH] ACS channel list support

2017-07-31 Thread Stijn Tintel
On 31-07-17 13:20, Yury Shvedov wrote:
> From: Vadim Balakhanov 
>
> This patch implements channel list support in UCI. This functionality
> already supported in hostapd.
>
NAK. This is already supported by the 'channels' option.

Stijn

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


Re: [LEDE-DEV] [RFC] kernel patches cleanup

2017-07-31 Thread Stijn Tintel
On 31-07-17 18:11, John Crispin wrote:
> Hi,
>
> I rebased my ages old kernel patch cleanup series. It can be found
> here [1].
>
> the series annotates all patches and splits them up into 3 folders
> backports/pending/hacks. 

I would prefer to keep the patches-X.Y directory and use backport, hack
and pending subdirectories instead.

Also, target/linux/generic/PATCHES should probably be modified to
reflect this change?

Thanks,
Stijn


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


Re: [LEDE-DEV] Recent issues w/ sysupgrade

2017-08-29 Thread Stijn Tintel
On 29-08-17 09:09, Philip Prindeville wrote:
> Hi all,
>
> I don’t know if sysupgrade is the problem, or if this is where things 
> manifest.
>
> But I recently (within the last week, but I only rebase once or twice a week) 
> started seeing issues with doing sysupgrade on x86_64 hardware.
>
> The sysupgrade will appear to go okay, but then when the machine reboots, I 
> see:
>
> ...
> Press the [f] key and hit [enter] to enter failsafe mode
> Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
> [6.322701] mount_root: loading kmods from internal overlay
> [6.331183] kmodloader: loading kernel modules from //etc/modules-boot.d/*
> [6.339194] kmodloader: done loading kernel modules from 
> //etc/modules-boot.d/*
> [6.470650] block: attempting to load /etc/config/fstab
> [6.483431] block: extroot: not configured
> [6.488267] random: procd: uninitialized urandom read (4 bytes read)
> [6.506070] mount_root: rootdisk overlay filesystem has not been formatted 
> yet
>
>
> Is this related to the mk.f2f changes on Thursday?
I doubt this will be related. The only real change is
https://git.lede-project.org/cdb494fd, and on little endian systems
cpu_to_le64 is a noop. Additionaly I tested this on x86/64 and didn't
notice any isses. Just look a bit further and you should see this:

Tue Aug 29 07:12:57 2017 user.info kernel: [    5.607837] mount_root:
overlay filesystem has not been fully initialized yet
Tue Aug 29 07:12:57 2017 user.info kernel: [    5.608986] mount_root:
switching to f2fs overlay

root@LEDE:~# mount  | grep overlay
/dev/loop0 on /overlay type f2fs
(rw,lazytime,noatime,background_gc=on,user_xattr,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6)
overlayfs:/overlay on / type overlay
(rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)

Stijn

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


Re: [LEDE-DEV] [PATCH] hostapd: update to version 2017-08-24

2017-09-04 Thread Stijn Tintel
On 04-09-17 18:07, Koen Vandeputte wrote:
> - Deleted upstreamed patches & parts
> - Refreshed all
>
> Compile tested: full-option package + tools (hostapd + wpa_supplicant)
>
Does this actually compile without modifying libubox? I have a similar
update queued in my staging tree [1], but it fails to compile [2].
Solved by [3] and [4], as suggested by jow on #lede-dev.

Kind regards,
Stijn

[1]
https://git.lede-project.org/?p=lede/stintel/staging.git;a=shortlog;h=refs/heads/hostapd
[2] https://gist.github.com/stintel/39cd77c0ad38f2d85def26a6846ca656
[3] https://gist.github.com/stintel/01547c518bb95427ec720ac8b82f9226
[4] https://gist.github.com/stintel/55bdac47ff8a9bdfb4045607d5ec4bfc

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


Re: [LEDE-DEV] [PATCH] hostapd: update to version 2017-08-24

2017-09-05 Thread Stijn Tintel
On 05-09-17 10:22, Koen Vandeputte wrote:
>
> On 2017-09-05 08:23, Stijn Tintel wrote:
>> On 04-09-17 18:07, Koen Vandeputte wrote:
>>> - Deleted upstreamed patches & parts
>>> - Refreshed all
>>>
>>> Compile tested: full-option package + tools (hostapd + wpa_supplicant)
>>>
>> Does this actually compile without modifying libubox? I have a similar
>> update queued in my staging tree [1], but it fails to compile [2].
>> Solved by [3] and [4], as suggested by jow on #lede-dev.
>>
>> Kind regards,
>> Stijn
>>
>> [1]
>> https://git.lede-project.org/?p=lede/stintel/staging.git;a=shortlog;h=refs/heads/hostapd
>>
>> [2] https://gist.github.com/stintel/39cd77c0ad38f2d85def26a6846ca656
>> [3] https://gist.github.com/stintel/01547c518bb95427ec720ac8b82f9226
>> [4] https://gist.github.com/stintel/55bdac47ff8a9bdfb4045607d5ec4bfc
>
> Hi Stijn,
>
> Yes it does [1] 
Your patch fails in the same way for me, even with wpad-mini (I normally
use wpad).
@Felix, can you comment on [3] and [4]?

Thanks,
Stijn

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


Re: [LEDE-DEV] [PATCH] hostapd: update to version 2017-08-24

2017-09-05 Thread Stijn Tintel
On 05-09-17 10:37, Stijn Tintel wrote:
> On 05-09-17 10:22, Koen Vandeputte wrote:
>> On 2017-09-05 08:23, Stijn Tintel wrote:
>>> On 04-09-17 18:07, Koen Vandeputte wrote:
>>>> - Deleted upstreamed patches & parts
>>>> - Refreshed all
>>>>
>>>> Compile tested: full-option package + tools (hostapd + wpa_supplicant)
>>>>
>>> Does this actually compile without modifying libubox? I have a similar
>>> update queued in my staging tree [1], but it fails to compile [2].
>>> Solved by [3] and [4], as suggested by jow on #lede-dev.
>>>
>>> Kind regards,
>>> Stijn
>>>
>>> [1]
>>> https://git.lede-project.org/?p=lede/stintel/staging.git;a=shortlog;h=refs/heads/hostapd
>>>
>>> [2] https://gist.github.com/stintel/39cd77c0ad38f2d85def26a6846ca656
>>> [3] https://gist.github.com/stintel/01547c518bb95427ec720ac8b82f9226
>>> [4] https://gist.github.com/stintel/55bdac47ff8a9bdfb4045607d5ec4bfc
>> Hi Stijn,
>>
>> Yes it does [1] 
> Your patch fails in the same way for me, even with wpad-mini (I normally
> use wpad).
> @Felix, can you comment on [3] and [4]?
Actually, better to check [5] and [6], sorry.

Thanks,
Stijn

[5] https://git.lede-project.org/be21935a
[6] https://git.lede-project.org/c1ad412b

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


Re: [LEDE-DEV] [PATCH] uci/file: replace mktemp() with mkstemp()

2017-09-17 Thread Stijn Tintel
On 17-09-17 07:05, Maxim Gorbachyov wrote:
> Because mktemp() is evil.
>
Hi, please add a reference when making such claims.

Thanks,
Stijn

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


Re: [LEDE-DEV] [PATCH] kernel: update to 3.18.71

2017-09-17 Thread Stijn Tintel
On 17-09-17 11:49, Hauke Mehrtens wrote:
> On 09/17/2017 01:41 AM, Florian Fainelli wrote:
>> Delete a bunch of fixes that are already included.
>> Refresh patches.
>> Compile-tested on malta/mipsel
>> Runtime-tested on malta/mipsel
>>
>> Signed-off-by: Florian Fainelli 
> Acked-by: Hauke Mehrtens 
>
I'd NAK this because we do not support this kernel version for a while,
but kernel.org is also bumping EOL kernels, so let's just be nice here
and do the same. Merged into my staging tree.

Thanks,
Stijn

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


Re: [LEDE-DEV] [PATCH 5/5] rb532: add myself as maintainer

2017-09-18 Thread Stijn Tintel
On 17-09-17 21:35, Roman Yeryomin wrote:
> Signed-off-by: Roman Yeryomin 
> ---

Hi Roman,

I have merged your series in my staging tree, but the commit author
doesn't match the SoB line. Do you prefer to use the address above, or
leroi.li...@gmail.com in both?

Thanks,
Stijn


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


Re: [LEDE-DEV] [PATCH 5/5] rb532: add myself as maintainer

2017-09-18 Thread Stijn Tintel
On 18-09-17 15:06, Roman Yeryomin wrote:
> On 18 September 2017 at 12:27, Stijn Tintel  wrote:
>> On 17-09-17 21:35, Roman Yeryomin wrote:
>>> Signed-off-by: Roman Yeryomin 
>>> ---
>> Hi Roman,
>>
>> I have merged your series in my staging tree, but the commit author
>> doesn't match the SoB line. Do you prefer to use the address above, or
>> leroi.li...@gmail.com in both?
>>
> Short answer is: I prefer SoB address to be used in commits. Thanks for 
> asking.
> I will change sender address as soon as I have time to rebuild my
> server but I doubt it will be soon :/
>
I'll modify the commits for you, but would be nice if you can send
future patches with author == SoB, as this is checked on the git server
in the pre-receive hook:

stijn@taz ~/Development/LEDE/source $ git push upstream
Counting objects: 48, done.
Delta compression using up to 12 threads.
Compressing objects: 100% (47/47), done.
Writing objects: 100% (48/48), 10.55 KiB | 10.55 MiB/s, done.
Total 48 (delta 27), reused 0 (delta 0)
remote: No matching SoB line found for author Roman Yeryomin

remote:  in commit a58be4a825697ddd9ee365e393593b88991d926f
remote:
To git.lede-project.org:source.git
 ! [remote rejected]   master -> master (pre-receive hook declined)
error: failed to push some refs to 'g...@git.lede-project.org:source.git'

Thanks,
Stijn

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


Re: [LEDE-DEV] [PATCH] scripts/download.pl: fail loudly if provided hash is unsupported

2017-09-24 Thread Stijn Tintel
On 03-09-17 15:01, Baptiste Jonglez wrote:
> From: Baptiste Jonglez 
>
> Currently, if the provided hash is unsupported (length different from 32
> or 64 bytes), we happily download the requested file without any kind of
> checksum verification.
>
> This is quite dangerous and may provide a false sense of security, because
> a single typo in the hash (e.g. one character deleted by mistake) may skip
> checksum verification entirely.
>
> Instead, fail immediately if we don't support the provided hash.
> In particular, if an external package repository decides to change the
> hash algorithm one day, we will now fail loudly instead of skipping
> checksum verification without complaints.
>
> Note: if some users of scripts/download.pl knowingly provide an empty hash
> because they don't need checksum verification, this change will break
> them.  This does not seem to be the case currently, but if this feature is
> ever needed, an option should be added to download.pl instead of relying
> on the hash being empty.
Unfortunately this change breaks the make/foo/download feature, and
because of this also the script we use to update kernel versions and
refresh patches for all targets. This has been discussed in #lede-dev a
few times, but we never agreed on a solution. Today, this is biting me
once again, and therefore I suggest to revert this change until we can
agree on a solution that is both secure and doesn't break something some
of use rather frequently.

Stijn

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


Re: [LEDE-DEV] [PATCH] scripts/download.pl: fail loudly if provided hash is unsupported

2017-09-24 Thread Stijn Tintel
On 24-09-17 23:57, Baptiste Jonglez wrote:
> Hi,
>
> On 24-09-17, Stijn Tintel wrote:
>> On 03-09-17 15:01, Baptiste Jonglez wrote:
>>> Note: if some users of scripts/download.pl knowingly provide an empty hash
>>> because they don't need checksum verification, this change will break
>>> them.  This does not seem to be the case currently, but if this feature is
>>> ever needed, an option should be added to download.pl instead of relying
>>> on the hash being empty.
>> Unfortunately this change breaks the make/foo/download feature,
> Can you elaborate on this?  It seems to work fine here:
>
> $ make package/dnsmasq/download V=s
> make[1]: Entering directory '/lede/tmp/lede-project'
> make[2]: Entering directory 
> '/lede/tmp/lede-project/package/network/services/dnsmasq'
> mkdir -p /lede/tmp/lede-project/dl
> SHELL= flock /lede/tmp/lede-project/tmp/.dnsmasq-2.77.tar.xz.flock -c '   
> /lede/tmp/lede-project/scripts/download.pl "/lede/tmp/lede-project/dl" 
> "dnsmasq-2.77.tar.xz" 
> "6eac3b1c50ae25170e3ff8c96ddb55236cf45007633fdb8a35b1f3e02f5f8b8a" "" 
> "http://thekelleys.org.uk/dnsmasq/";'
> + curl -f --connect-timeout 20 --retry 5 --location --insecure 
> http://thekelleys.org.uk/dnsmasq/dnsmasq-2.77.tar.xz
>   % Total% Received % Xferd  Average Speed   TimeTime Time  
> Current
>  Dload  Upload   Total   SpentLeft  
> Speed
> 100  475k  100  475k0 0   237k  0  0:00:02  0:00:02 --:--:--  
> 232k
> make[2]: Leaving directory 
> '/lede/tmp/lede-project/package/network/services/dnsmasq'
> make[1]: Leaving directory '/lede/tmp/lede-project'
My bad. When we update a package, we bump the version in the Makefile
and remove the current hash, then run "make package/foo/dowload; make
package/foo/check FIXUP=1". This downloads the tarbal for the new
version, and FIXUP writes its hash to the Makefile. This is what's
broken since the change.

Stijn


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


[LEDE-DEV] [PATCH] gdb: bump to 8.0.1

2017-09-25 Thread Stijn Tintel
Since version 8.0, there is a dependency on libstdc++, and gdb does not
build against uClibc++. Disable building of the libstdc++-v3, instead of
adding a hard dependency on libstdcpp. Adding a ~350KB dependency to
gdbserver will make it hard for people to use it on 4MB flash devices.

Fixes CVE-2017-9778.

Signed-off-by: Stijn Tintel 
---
This patch is also in my staging tree:
https://git.lede-project.org/f3d16da8

 package/devel/gdb/Makefile   |  7 ---
 package/devel/gdb/patches/110-shared_libgcc.patch| 12 ++--
 package/devel/gdb/patches/120-sigprocmask-invalid-call.patch |  5 -
 3 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/package/devel/gdb/Makefile b/package/devel/gdb/Makefile
index 23039910ce..5342211715 100644
--- a/package/devel/gdb/Makefile
+++ b/package/devel/gdb/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gdb
-PKG_VERSION:=7.12.1
-PKG_RELEASE:=3
+PKG_VERSION:=8.0.1
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/gdb
-PKG_HASH:=4607680b973d3ec92c30ad029f1b7dbde3876869e6b3a117d8a7e90081113186
+PKG_HASH:=3dbd5f93e36ba2815ad0efab030dcd0c7b211d7b353a40a53f4c02d7d56295e3
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
@@ -55,6 +55,7 @@ CONFIGURE_ARGS+= \
--with-system-readline \
--without-expat \
--without-lzma \
+   --disable-libstdcxx \
--disable-sim \
--disable-werror
 
diff --git a/package/devel/gdb/patches/110-shared_libgcc.patch 
b/package/devel/gdb/patches/110-shared_libgcc.patch
index e44616f4a2..929a5ae977 100644
--- a/package/devel/gdb/patches/110-shared_libgcc.patch
+++ b/package/devel/gdb/patches/110-shared_libgcc.patch
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1406,13 +1406,13 @@ if test -z "$LD"; then
+@@ -1300,13 +1300,13 @@ if test -z "$LD"; then
fi
  fi
  
@@ -17,7 +17,7 @@
AC_LANG_PUSH(C++)
AC_LINK_IFELSE([
  #if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
-@@ -1740,7 +1740,7 @@ AC_ARG_WITH(stage1-ldflags,
+@@ -1632,7 +1632,7 @@ AC_ARG_WITH(stage1-ldflags,
   # if supported.  But if the user explicitly specified the libraries to use,
   # trust that they are doing what they want.
   if test "$stage1_libs" = "" -a "$have_static_libs" = yes; then
@@ -26,7 +26,7 @@
   fi])
  AC_SUBST(stage1_ldflags)
  
-@@ -1769,7 +1769,7 @@ AC_ARG_WITH(boot-ldflags,
+@@ -1661,7 +1661,7 @@ AC_ARG_WITH(boot-ldflags,
   # statically.  But if the user explicitly specified the libraries to
   # use, trust that they are doing what they want.
   if test "$poststage1_libs" = ""; then
@@ -37,7 +37,7 @@
  
 --- a/configure
 +++ b/configure
-@@ -5109,14 +5109,14 @@ if test -z "$LD"; then
+@@ -5005,14 +5005,14 @@ if test -z "$LD"; then
fi
  fi
  
@@ -56,7 +56,7 @@
ac_ext=cpp
  ac_cpp='$CXXCPP $CPPFLAGS'
  ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-@@ -5902,7 +5902,7 @@ else
+@@ -5795,7 +5795,7 @@ else
   # if supported.  But if the user explicitly specified the libraries to use,
   # trust that they are doing what they want.
   if test "$stage1_libs" = "" -a "$have_static_libs" = yes; then
@@ -65,7 +65,7 @@
   fi
  fi
  
-@@ -5938,7 +5938,7 @@ else
+@@ -5831,7 +5831,7 @@ else
   # statically.  But if the user explicitly specified the libraries to
   # use, trust that they are doing what they want.
   if test "$poststage1_libs" = ""; then
diff --git a/package/devel/gdb/patches/120-sigprocmask-invalid-call.patch 
b/package/devel/gdb/patches/120-sigprocmask-invalid-call.patch
index 7090db170a..8afa8ccf81 100644
--- a/package/devel/gdb/patches/120-sigprocmask-invalid-call.patch
+++ b/package/devel/gdb/patches/120-sigprocmask-invalid-call.patch
@@ -25,8 +25,6 @@ gdb/ChangeLog:
  gdb/common/signals-state-save-restore.c | 2 +-
  2 files changed, 6 insertions(+), 1 deletion(-)
 
-diff --git a/gdb/common/signals-state-save-restore.c 
b/gdb/common/signals-state-save-restore.c
-index d11a9ae..734335c 100644
 --- a/gdb/common/signals-state-save-restore.c
 +++ b/gdb/common/signals-state-save-restore.c
 @@ -41,7 +41,7 @@ save_original_signals_state (void)
@@ -38,6 +36,3 @@ index d11a9ae..734335c 100644
if (res == -1)
  perror_with_name (("sigprocmask"));
  
--- 
-2.6.4
-
-- 
2.13.5


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


Re: [LEDE-DEV] [PATCH] gdb: bump to 8.0.1

2017-09-25 Thread Stijn Tintel
On 25-09-17 14:38, Stijn Tintel wrote:
> Since version 8.0, there is a dependency on libstdc++, and gdb does not
> build against uClibc++. Disable building of the libstdc++-v3, instead of
> adding a hard dependency on libstdcpp. Adding a ~350KB dependency to
> gdbserver will make it hard for people to use it on 4MB flash devices.
>
Please ignore this patch. I must have looked at the wrong terminal
window, even with --disable-libstdcxx gdbserver still depends on
libstdc++. After reading the changelog again, I don't think we can make
the C++ part optional, so it'll have to be a hard dependency on libstdc++.

Stijn

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


[LEDE-DEV] [PATCH v2] gdb: bump to 8.0.1

2017-09-25 Thread Stijn Tintel
Since version 8.0, gdbserver seems to have a hard dependency on
libstdc++, even with --disable-libstdcxx.

Fixes CVE-2017-9778.

Signed-off-by: Stijn Tintel 
---
V2: add hard dependency on libstdc++

Also in my staging tree: https://git.lede-project.org/a96fc0d9

 package/devel/gdb/Makefile   |  7 ---
 package/devel/gdb/patches/110-shared_libgcc.patch| 12 ++--
 package/devel/gdb/patches/120-sigprocmask-invalid-call.patch |  5 -
 3 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/package/devel/gdb/Makefile b/package/devel/gdb/Makefile
index 23039910ce..e0c0207802 100644
--- a/package/devel/gdb/Makefile
+++ b/package/devel/gdb/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gdb
-PKG_VERSION:=7.12.1
-PKG_RELEASE:=3
+PKG_VERSION:=8.0.1
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/gdb
-PKG_HASH:=4607680b973d3ec92c30ad029f1b7dbde3876869e6b3a117d8a7e90081113186
+PKG_HASH:=3dbd5f93e36ba2815ad0efab030dcd0c7b211d7b353a40a53f4c02d7d56295e3
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
@@ -43,6 +43,7 @@ endef
 define Package/gdbserver
 $(call Package/gdb/Default)
   TITLE:=Remote server for GNU Debugger
+  DEPENDS+=+libstdcpp
 endef
 
 define Package/gdbserver/description
diff --git a/package/devel/gdb/patches/110-shared_libgcc.patch 
b/package/devel/gdb/patches/110-shared_libgcc.patch
index e44616f4a2..929a5ae977 100644
--- a/package/devel/gdb/patches/110-shared_libgcc.patch
+++ b/package/devel/gdb/patches/110-shared_libgcc.patch
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1406,13 +1406,13 @@ if test -z "$LD"; then
+@@ -1300,13 +1300,13 @@ if test -z "$LD"; then
fi
  fi
  
@@ -17,7 +17,7 @@
AC_LANG_PUSH(C++)
AC_LINK_IFELSE([
  #if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
-@@ -1740,7 +1740,7 @@ AC_ARG_WITH(stage1-ldflags,
+@@ -1632,7 +1632,7 @@ AC_ARG_WITH(stage1-ldflags,
   # if supported.  But if the user explicitly specified the libraries to use,
   # trust that they are doing what they want.
   if test "$stage1_libs" = "" -a "$have_static_libs" = yes; then
@@ -26,7 +26,7 @@
   fi])
  AC_SUBST(stage1_ldflags)
  
-@@ -1769,7 +1769,7 @@ AC_ARG_WITH(boot-ldflags,
+@@ -1661,7 +1661,7 @@ AC_ARG_WITH(boot-ldflags,
   # statically.  But if the user explicitly specified the libraries to
   # use, trust that they are doing what they want.
   if test "$poststage1_libs" = ""; then
@@ -37,7 +37,7 @@
  
 --- a/configure
 +++ b/configure
-@@ -5109,14 +5109,14 @@ if test -z "$LD"; then
+@@ -5005,14 +5005,14 @@ if test -z "$LD"; then
fi
  fi
  
@@ -56,7 +56,7 @@
ac_ext=cpp
  ac_cpp='$CXXCPP $CPPFLAGS'
  ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-@@ -5902,7 +5902,7 @@ else
+@@ -5795,7 +5795,7 @@ else
   # if supported.  But if the user explicitly specified the libraries to use,
   # trust that they are doing what they want.
   if test "$stage1_libs" = "" -a "$have_static_libs" = yes; then
@@ -65,7 +65,7 @@
   fi
  fi
  
-@@ -5938,7 +5938,7 @@ else
+@@ -5831,7 +5831,7 @@ else
   # statically.  But if the user explicitly specified the libraries to
   # use, trust that they are doing what they want.
   if test "$poststage1_libs" = ""; then
diff --git a/package/devel/gdb/patches/120-sigprocmask-invalid-call.patch 
b/package/devel/gdb/patches/120-sigprocmask-invalid-call.patch
index 7090db170a..8afa8ccf81 100644
--- a/package/devel/gdb/patches/120-sigprocmask-invalid-call.patch
+++ b/package/devel/gdb/patches/120-sigprocmask-invalid-call.patch
@@ -25,8 +25,6 @@ gdb/ChangeLog:
  gdb/common/signals-state-save-restore.c | 2 +-
  2 files changed, 6 insertions(+), 1 deletion(-)
 
-diff --git a/gdb/common/signals-state-save-restore.c 
b/gdb/common/signals-state-save-restore.c
-index d11a9ae..734335c 100644
 --- a/gdb/common/signals-state-save-restore.c
 +++ b/gdb/common/signals-state-save-restore.c
 @@ -41,7 +41,7 @@ save_original_signals_state (void)
@@ -38,6 +36,3 @@ index d11a9ae..734335c 100644
if (res == -1)
  perror_with_name (("sigprocmask"));
  
--- 
-2.6.4
-
-- 
2.13.5


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


Re: [LEDE-DEV] [PATCH] scripts/download.pl: fail loudly if provided hash is unsupported

2017-09-25 Thread Stijn Tintel
On 25-09-17 00:20, Baptiste Jonglez wrote:
> On 24-09-17, Stijn Tintel wrote:
>> My bad. When we update a package, we bump the version in the Makefile
>> and remove the current hash, then run "make package/foo/dowload; make
>> package/foo/check FIXUP=1". This downloads the tarbal for the new
>> version, and FIXUP writes its hash to the Makefile. This is what's
>> broken since the change.
> Ok, I see the issue now.
>
> As mentioned in the commit message, we definitely should add an explicit
> option to download.pl to skip hash verification, and then implement
> something like this:
>
> $ make package/foo/download SKIPHASH=1
>
> What do you think?

We were thinking in that direction on #lede-dev, not sure why we
couldn't agree. Let's wait a bit if anybody else chimes in?

Stijn


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


Re: [LEDE-DEV] [PATCH v2] gdb: bump to 8.0.1

2017-09-26 Thread Stijn Tintel
On 25-09-17 20:18, Felix Fietkau wrote:
> On 2017-09-25 15:36, Stijn Tintel wrote:
>> Since version 8.0, gdbserver seems to have a hard dependency on
>> libstdc++, even with --disable-libstdcxx.
>>
>> Fixes CVE-2017-9778.
>>
>> Signed-off-by: Stijn Tintel 
>> ---
>> V2: add hard dependency on libstdc++
>>
>> Also in my staging tree: https://git.lede-project.org/a96fc0d9
> I think it's worth adding -static-libstdc++ to LDFLAGS. With a bit of
> luck, gdbserver does not need much of libstdc++.
That seems to work. Sizes on x86/64:
gdbserver 151K
libstdcpp 335K

With TARGET_LDFLAGS+=-static-libstdc++:
gdbserver 320K

But as gdb 8.0.1 doesn't compile on the buildbot master due to it still
running gcc 4.7, the buildbot will need to be upgraded first.

Stijn

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


Re: [LEDE-DEV] [PATCH v2] gdb: bump to 8.0.1

2017-09-27 Thread Stijn Tintel
On 27-09-17 10:31, Felix Fietkau wrote:
> On 2017-09-26 17:10, Stijn Tintel wrote:
>> On 25-09-17 20:18, Felix Fietkau wrote:
>>> On 2017-09-25 15:36, Stijn Tintel wrote:
>>>> Since version 8.0, gdbserver seems to have a hard dependency on
>>>> libstdc++, even with --disable-libstdcxx.
>>> I think it's worth adding -static-libstdc++ to LDFLAGS. With a bit of
>>> luck, gdbserver does not need much of libstdc++.
>> That seems to work. Sizes on x86/64:
>> gdbserver 151K
>> libstdcpp 335K
>>
>> With TARGET_LDFLAGS+=-static-libstdc++:
>> gdbserver 320K
> Please add -Wl,--gc-sections as well. It seems to bring the package size
> down to 146K on MIPS.
Have this queued in my staging tree. I'll push it when the buildbot is
upgraded: https://git.lede-project.org/9eb0ccfe

Size of gdbserver on x86/64: 171K

Thanks,
Stijn

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


Re: [LEDE-DEV] Compile failure after pulling today: rpcd-mod-rrdns dependency

2017-09-27 Thread Stijn Tintel
On 28-09-17 03:14, Ben Greear wrote:
> Any idea what might be causing this?
>
> 
> Configuring kmod-i2c-algo-bit.
> Configuring kmod-igb.
> Configuring ath10k-firmware-qca6174.
> Configuring ppp-mod-pppoe.
> Collected errors:
>  * satisfy_dependencies_for: Cannot satisfy the following dependencies
> for luci:
>  * rpcd-mod-rrdns * 
./scripts/feeds/update; ./scripts/feeds/install rpcd-mod-rrdns ?

Stijn

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


[LEDE-DEV] [PATCH] iw: fix build on musl host

2017-09-28 Thread Stijn Tintel
The empty version.sh script causes a problem when run by make:
make[3]: /usr/bin/env bash: Shell program not found

Adding a shebang line in version.sh seems to solve it.

Fixes FS#977.

Signed-off-by: Stijn Tintel 
---
 package/network/utils/iw/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/network/utils/iw/Makefile 
b/package/network/utils/iw/Makefile
index a578ddc98c..9b3c12beca 100644
--- a/package/network/utils/iw/Makefile
+++ b/package/network/utils/iw/Makefile
@@ -30,8 +30,7 @@ endef
 
 define Build/Configure
echo "const char iw_version[] = \"$(PKG_VERSION)\";" > 
$(PKG_BUILD_DIR)/version.c
-   rm -f $(PKG_BUILD_DIR)/version.sh
-   touch $(PKG_BUILD_DIR)/version.sh
+   echo "#!/bin/sh" > $(PKG_BUILD_DIR)/version.sh
chmod +x $(PKG_BUILD_DIR)/version.sh
 endef
 
-- 
2.13.6


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


[LEDE-DEV] [PATCH] hostapd: escape double quoutes in wpad CFLAGS

2017-09-29 Thread Stijn Tintel
A recent commit in hostapd added a build option to specify the default
TLS ciphers. This build option is passed via CFLAGS. Due to the way
CFLAGS are handled when building wpad, the compiler tries to expand
TLS_DEFAULT_CIPHERS, resulting in the following error:

../src/crypto/tls_openssl.c: In function 'tls_init':
:0:21: error: 'DEFAULT' undeclared (first use in this function)
../src/crypto/tls_openssl.c:1028:13: note: in expansion of macro 
'TLS_DEFAULT_CIPHERS'
   ciphers = TLS_DEFAULT_CIPHERS;
 ^

Escape double quotes in the .cflags file to avoid this.

Fixes: 3bcbf3d133f7 ("hostapd: update to version 2017-08-24")
Signed-off-by: Stijn Tintel 
---
 package/network/services/hostapd/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/network/services/hostapd/Makefile 
b/package/network/services/hostapd/Makefile
index 2558f2da0b..344896ca62 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -299,6 +299,7 @@ define Build/Compile/wpad
$(call Build/RunMake,wpa_supplicant,-s MULTICALL=1 dump_cflags) 
| \
sed -e 's,-n ,,g' -e 's^$(TARGET_CFLAGS)^^' \
` > $(PKG_BUILD_DIR)/.cflags
+   sed -i 's/"/\\"/g' $(PKG_BUILD_DIR)/.cflags
+$(call Build/RunMake,hostapd, \
CFLAGS="(cat $(PKG_BUILD_DIR)/.cflags)" \
MULTICALL=1 \
-- 
2.13.6


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


Re: [LEDE-DEV] [PATCH] base-files: create /etc/config/ directory

2017-09-30 Thread Stijn Tintel
On 30-09-17 14:56, Hauke Mehrtens wrote:
> The /bin/config_generate script and some other scripts are assuming the
> /etc/config directory exists in the image. This is true in case for
> example the package firewall, dropbear or dnsmasq are included, which
> are adding the files under /etc/config/. Without any of these package
> the system will not boot up fully because the /etc/config/ directory is
> missing and some init scripts just fail.
>
> Make sure all images with the base-files contain a /etc/config/
> directory.
>
> Signed-off-by: Hauke Mehrtens 
> ---
>  package/base-files/Makefile | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/package/base-files/Makefile b/package/base-files/Makefile
> index 0c0c1cee30..33092a77cc 100644
> --- a/package/base-files/Makefile
> +++ b/package/base-files/Makefile
> @@ -149,6 +149,7 @@ define Package/base-files/install
>   mkdir -p $(1)/CONTROL
>   mkdir -p $(1)/dev
>   mkdir -p $(1)/etc/crontabs
> + mkdir -p $(1)/etc/config
Minor nit: config comes before crontabs in the alphabet ;-)

Stijn

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


Re: [LEDE-DEV] kernel 4.9 migration for next release

2017-10-03 Thread Stijn Tintel
On 03-10-17 03:31, David Lang wrote:
> note that the kernel currently under development (4.14) is tagged to
> be a LTS kernel (6 years of support), so it would be good to work on
> that if possible.
I would prefer to have a release based on 4.9 first. Many targets have
already received extensive testing with 4.9 by users running master.
Targetting a new kernel will delay a new major release too long to my
liking.

Stijn

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


[LEDE-DEV] LEDE v17.01.3 service release

2017-10-04 Thread Stijn Tintel
The LEDE Community is proud to announce the third service release of
stable LEDE 17.01 series.

LEDE 17.01.3 “Reboot” incorporates a fair number of fixes back ported
from the development branch during the last sixteen weeks.

---

Some selected highlights of the service release are:

* Linux kernel updated to version 4.4.89 (from 4.4.71 in v17.01.2)
* Numerous security fixes to curl, dnsmasq, mbedtls, tcpdump and the
Linux kernel
* Assorted platform fixes for ar7, ar71xx, bcm53xx, brcm63xx, imx6,
ipq806x, lantiq, ramips, sunxi and x86

For a detailed list of changes since 17.01.2 refer to
https://lede-project.org/releases/17.01/changelog-17.01.3

---

For latest information about the 17.01 series, refer to the wiki at:
https://lede-project.org/releases/17.01/

To download the v17.01.3 images, navigate to:
https://downloads.lede-project.org/releases/17.01.3/

---

As always, a big thank you goes to all our active package maintainers,
testers, documenters and supporters.

Have fun!

The LEDE Community


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


Re: [LEDE-DEV] ipset-dns - does anybody actually use this?

2017-10-08 Thread Stijn Tintel
On 08-10-17 16:20, Jason A. Donenfeld wrote:
> On Sun, Oct 8, 2017 at 3:04 PM, Jason A. Donenfeld  wrote:
>> In that case, I'll take a closer look at the patches LEDE ships for
>> the package and merging them into the upstream repo.
> If you don't wind up removing that, future packages won't need to
> include that patch any longer:
> https://git.zx2c4.com/ipset-dns/commit/?id=ade2cf88e933f4f90451e0a6171f0aa4a523f989
Updated in my staging tree: https://git.lede-project.org/ffd778ea

Thanks,
Stijn

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


Re: [LEDE-DEV] [PATCH] scripts/download.pl: fail loudly if provided hash is unsupported

2017-10-08 Thread Stijn Tintel
On 25-09-17 18:43, Stijn Tintel wrote:
> On 25-09-17 00:20, Baptiste Jonglez wrote:
>> On 24-09-17, Stijn Tintel wrote:
>>> My bad. When we update a package, we bump the version in the Makefile
>>> and remove the current hash, then run "make package/foo/dowload; make
>>> package/foo/check FIXUP=1". This downloads the tarbal for the new
>>> version, and FIXUP writes its hash to the Makefile. This is what's
>>> broken since the change.
>> Ok, I see the issue now.
>>
>> As mentioned in the commit message, we definitely should add an explicit
>> option to download.pl to skip hash verification, and then implement
>> something like this:
>>
>> $ make package/foo/download SKIPHASH=1
>>
>> What do you think?
> We were thinking in that direction on #lede-dev, not sure why we
> couldn't agree. Let's wait a bit if anybody else chimes in?
Maybe just send an RFC patch with the suggested change, as nobodoy seems
to be responding.

Thanks,
Stijn


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


Re: [LEDE-DEV] Kernel version in next major release

2017-10-08 Thread Stijn Tintel
On 07-10-17 14:43, Hauke Mehrtens wrote:
> What is your opinion on this topic? Am I missing some arguments?
> Currently I would prefer solution 3 going with kernel 4.9 and 4.14.
I actually preferred to have a 2nd major release in 2017, using only
kernel 4.9, and then a 3rd major release early 2018 using only kernel
4.14. Unfortunately we seem to lack the manpower to get this done, so I
am fine with exploring option 3. My only concern with this, is that it
will increase the workload for service releases.

Either way, as I said on IRC, I think we should give option 3 a try for
our next major release, and revert back to supporting a single kernel
version per release if that proves to be too difficult to maintain.

For > 4.9, please have a look at
https://git.lede-project.org/?p=lede/stintel/staging.git;a=shortlog;h=refs/heads/kernel
This was in perfect shape, but I messed up when reworking after the
split of patches directory to {backport,hack,pending}. Nonetheless it
should be easier to start from there than to redo everything from scratch.

Stijn


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


Re: [LEDE-DEV] KRACK (Key Reinstallation Attacks), now patched upstream in hostapd

2017-10-16 Thread Stijn Tintel
On 16-10-17 13:12, Koen Vandeputte wrote:
>
>
> On 2017-10-16 11:48, Nick Lowe wrote:
>> Referencing https://www.krackattacks.com/
>>
>> Patches can be found at: https://w1.fi/security/2017-1/ and an
>> advisory at http://seclists.org/oss-sec/2017/q4/83
>>
>> Patches can also be found committed at https://w1.fi/cgit/hostap/log/
>>
>> I think we need to get these patches integrated in to LEDE asap, or
>> move to the hostapd development branch where there are currently
>> committed.
> I'm currently updating my patch-in-transit to incorporate these fixes.
> http://patchwork.ozlabs.org/patch/823136/ 
Felix already has the patches in his staging tree [1], and we are
preparing the 17.01 branch for releasing 17.01.4.

Stijn

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


Re: [LEDE-DEV] KRACK (Key Reinstallation Attacks), now patched upstream in hostapd

2017-10-16 Thread Stijn Tintel
On 16-10-17 13:15, Stijn Tintel wrote:
> On 16-10-17 13:12, Koen Vandeputte wrote:
>>
>> On 2017-10-16 11:48, Nick Lowe wrote:
>>> Referencing https://www.krackattacks.com/
>>>
>>> Patches can be found at: https://w1.fi/security/2017-1/ and an
>>> advisory at http://seclists.org/oss-sec/2017/q4/83
>>>
>>> Patches can also be found committed at https://w1.fi/cgit/hostap/log/
>>>
>>> I think we need to get these patches integrated in to LEDE asap, or
>>> move to the hostapd development branch where there are currently
>>> committed.
>> I'm currently updating my patch-in-transit to incorporate these fixes.
>> http://patchwork.ozlabs.org/patch/823136/ 
> Felix already has the patches in his staging tree [1], and we are
> preparing the 17.01 branch for releasing 17.01.4.
>
Sorry, hit sent too soon and forgot to add the URL. Anyway, both master
and the lede-17.01 branch now contain these fixes.

Stijn

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


Re: [LEDE-DEV] KRACK (Key Reinstallation Attacks), now patched upstream in hostapd

2017-10-17 Thread Stijn Tintel
On 18-10-17 01:40, Aaron Z wrote:
> On Tue, Oct 17, 2017 at 3:24 AM, Felix Fietkau  wrote:
>> On 2017-10-17 01:53, Jim Gettys wrote:
>>> Will this require a upgrade of the base image, or can we just upgrade
>>> packages?  If so,
>>> which ones?
>>>   - Jim
>> Updating wpad(-mini) should be enough.
> Is the base image now updated, or would one still need to update wpad
> after installing a freshly downloaded 17.01.3 image?
> I ask because the packages have an edit date of today while the base
> image is dated 4 Oct.
> If the base image hasn't been updated, I would think that it should be
> so that fresh installs are protected going forward.
>
>
Updating release binaries is very bad practice and should never be done.
Please wait for 17.01.4, which will include the fixes.

Stijn

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


Re: [LEDE-DEV] KRACK (Key Reinstallation Attacks), now patched upstream in hostapd

2017-10-18 Thread Stijn Tintel
On 18-10-17 14:20, Aaron Z wrote:
> On Tue, Oct 17, 2017 at 10:28 PM, Stijn Tintel  wrote:
>> On 18-10-17 01:40, Aaron Z wrote:
>>> On Tue, Oct 17, 2017 at 3:24 AM, Felix Fietkau  wrote:
>>>> On 2017-10-17 01:53, Jim Gettys wrote:
>>>>> Will this require a upgrade of the base image, or can we just upgrade
>>>>> packages?  If so,
>>>>> which ones?
>>>>>   - Jim
>>>> Updating wpad(-mini) should be enough.
>>> Is the base image now updated, or would one still need to update wpad
>>> after installing a freshly downloaded 17.01.3 image?
>>> I ask because the packages have an edit date of today while the base
>>> image is dated 4 Oct.
>>> If the base image hasn't been updated, I would think that it should be
>>> so that fresh installs are protected going forward.
>> Updating release binaries is very bad practice and should never be done.
>> Please wait for 17.01.4, which will include the fixes.
> Is there a projected release date for 17.01.4? If not, IMO there
> should be a banner for the LEDE Wiki (and the download page?) letting
> people know that they need to update wpad ASAP after a new install.
17.01.4 is building. I expect it to be ready in ~4h.

Stijn

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


Re: [LEDE-DEV] [PATCH netifd 1/2] proto: add point-to-point IPv4 address config support (FS#1037)

2017-10-18 Thread Stijn Tintel
On 17-10-17 23:16, Hans Dedecker wrote:
> Add config support support for point-to-point IPv4 addresses by providing
> the uci parameter ptpaddr. This allows to support a gateway being in a
> different subnet than the assigned IP by modeling the local IP having a
> point-to-point address.
> This is similar to the point-to-point IPv4 address support already present
> for the protocol handlers.
Hey Hans, thanks a lot for this. I tested it on my LEDE VM running @
OVH, and this works fine with the following config:

config interface 'wan'
    option ifname 'eth1'
    option proto 'static'
    option ipaddr '52.36.x.x'
    option gateway '176.31.101.254'
    option ptpaddr '176.31.101.254'

Maybe we could automatically add the gateway as peer in case it is in a
different subnet than the ipaddr, so that we don't have to specify the
same address for two different options? Or is that too much assumption?

Either way:
Tested-by: Stijn Tintel 

Stijn

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


[LEDE-DEV] LEDE v17.01.4 service release

2017-10-18 Thread Stijn Tintel
The LEDE Community is proud to announce the fourth service release of
stable LEDE 17.01 series.

LEDE 17.01.4 “Reboot” incorporates a fair number of fixes back ported
from the development branch during the last two weeks.
---

Some selected highlights of the service release are:

    Linux kernel updated to version 4.4.92 (from 4.4.89 in v17.01.3)
    Security fixes to brcmfmac, hostapd, mac80211, toolchain/gdb and the
Linux kernel
    Assorted platform fixes for ar71xx, bcm53xx, ramips and x86

While this release includes fixes for the bugs in the WPA Protocol
disclosed earlier this week, these fixes do not fix the problem on the
client-side. You still need to update all your client devices. As some
client devices might never receive an update, an optional AP-side
workaround was introduced in hostapd to complicate these attacks,
slowing them down. Please note that this does not fully protect you from
them, especially when running older versions of wpa_supplicant
vulnerable to CVE-2017-13086, which the workaround does not address. As
this workaround can cause interoperability issues and reduced robustness
of key negotiation, this workaround is disabled by default.

Due to the version bump of toolchain/gdb to 8.0.1, at least GCC 4.8 is
now required to build LEDE.

For a detailed list of changes since 17.01.3 refer to
https://lede-project.org/releases/17.01/changelog-17.01.4

---

For latest information about the 17.01 series, refer to the wiki at:
https://lede-project.org/releases/17.01/

To download the v17.01.4 images, navigate to:
https://downloads.lede-project.org/releases/17.01.4/

---

As always, a big thank you goes to all our active package maintainers,
testers, documenters and supporters.

Have fun!

The LEDE Community



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


Re: [LEDE-DEV] [PATCH 2/2] download.mk: introduce a new variable SKIPHASH

2017-11-29 Thread Stijn Tintel
On 08-11-17 12:14, Baptiste Jonglez wrote:
> Hi Stijn,
>
> What is your opinion on this patch?  There has been a bit of feedback, but
> you were the one requesting the change in the first place :)
It seems most feedback simply ignores the part where b30ba14e actually
broke existing functionality. I keep running into this breakage when
using the script to bump kernel version, or when bumping packages I
maintain. While I agree that adding another knob seems cumbersome, I
would like to be able to use the broken functionality, so

Acked-by: Stijn Tintel 


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


Re: [LEDE-DEV] [PATCH 1/2] scripts/download.pl: Add a --skip-hash option

2017-11-29 Thread Stijn Tintel
On 26-10-17 11:50, Baptiste Jonglez wrote:
> When the new "--skip-hash" option is passed to scripts/download.pl, hash
> verification of the downloaded files is completely skipped.  This can be
> useful when bumping package version, since the hash may not be known in
> advance.
>
>
Acked-by: Stijn Tintel 


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


Re: [LEDE-DEV] [PATCH resend 3/3] hostapd: bump PKG_RELEASE

2017-12-06 Thread Stijn Tintel
On 14-11-17 21:41, Timo Sigurdsson wrote:
> Increase PKG_RELEASE after latest changes to hostapd, so downstream
> users can fetch updates via opkg.
>
You should have bumped PKG_RELEASE in the previous commit. I've done
that in my staging tree.

Thanks,
Stijn

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


Re: [LEDE-DEV] [PATCH resend 3/3] hostapd: bump PKG_RELEASE

2017-12-07 Thread Stijn Tintel
On 07-12-17 12:04, Timo Sigurdsson wrote:
> Hi,
>
> Stijn Tintel schrieb am 07.12.2017 01:35:
>
>> On 14-11-17 21:41, Timo Sigurdsson wrote:
>>> Increase PKG_RELEASE after latest changes to hostapd, so downstream
>>> users can fetch updates via opkg.
>>>
>> You should have bumped PKG_RELEASE in the previous commit. I've done
>> that in my staging tree.
>>
> thanks for the fixup. I'll send patches later tonight backporting these two 
> commits
> to the 17.04 branch.
>
If they can be cherry-picked that is the preferred method, then there is
no need to send patches. I can look into it tonight.

Stijn

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


Re: [LEDE-DEV] [PATCH 2/2] download.mk: introduce a new variable SKIPHASH

2017-12-07 Thread Stijn Tintel
On 07-12-17 15:56, Jo-Philipp Wich wrote:
> Hi Baptiste,
>
> we've been discussing this patch again on IRC today and I came up with
> an alternate suggestion that does not require a new variable.
>
> -- 8< --
> diff --git a/scripts/download.pl b/scripts/download.pl
> index 775408934a..ad9c480c67 100755
> --- a/scripts/download.pl
> +++ b/scripts/download.pl
> @@ -88,7 +88,7 @@ sub download_cmd($) {
>  }
>
>  my $hash_cmd = hash_cmd();
> -$hash_cmd or die "Cannot find appropriate hash command, ensure the
> provided hash is either a MD5 or SHA256 checksum.\n";
> +$hash_cmd or ($file_hash eq "none") or die "Cannot find appropriate
> hash command, ensure the provided hash is either a MD5 or SHA256
> checksum.\n";
>
>  sub download
>  {
> -- >8 --
>
> Using the change above one can issue a
>
>   "make package/mypackage/download PKG_HASH=none"
>
> to download ignoring the Makefile checksum while preserving the error
> semantics of unset PKG_HASH cases.
>
> Ideally I'd like to push the "none" variant but wanted to share the idea
> on the list first to see what others think about it.
>
I prefer this over using an extra variable.

Acked-by: Stijn Tintel 


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


Re: [LEDE-DEV] [PATCH] netifd: always send DHCPv4 hostname

2017-12-08 Thread Stijn Tintel
On 08-12-17 09:35, Mathias Kresin wrote:
> udhcpc doesn't send a hostname by default. Use the system hostname if
> nothing else is specified, to always send a hostname.
>
> It syncs the behaviour to odhcpc, which always sends a hostname.
>
> Signed-off-by: Mathias Kresin 
> ---
>  package/network/config/netifd/files/lib/netifd/proto/dhcp.sh | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh 
> b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
> index ea02d68..143e445 100755
> --- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
> +++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
> @@ -40,6 +40,7 @@ proto_dhcp_setup() {
>   append dhcpopts "-x $opt"
>   done
>  
> + [ -z "$hostname" ] && hostname="$(cat /proc/sys/kernel/hostname)"
>   [ "$broadcast" = 1 ] && broadcast="-B" || broadcast=
>   [ "$release" = 1 ] && release="-R" || release=
>   [ -n "$clientid" ] && clientid="-x 0x3d:${clientid//:/}" || 
> clientid="-C"
Acked-by: Stijn Tintel 

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


Re: [LEDE-DEV] [OpenWrt-Devel] Enable DCO check on Github OpenWrt organisation

2018-01-21 Thread Stijn Tintel
On 19-01-18 15:02, Piotr Dymacz wrote:
>
>
> On 19.01.2018 13:09, Etienne Champetier wrote:
>
>> We can also make it mandatory (show "required" on the fail test line)
>> Also this is a good minimum check to have on ALL repo
>> There are many ways to do it, enabling DCO is a 2 minutes job (if
>> someone want to do a similar script and host it that's totally fine
>> with me)
>
> I'm OK with DCO enabled for all repos. We should probably give some
> time others to comment and if there are no objections, we can enable it.
>
ACK to enable it for packages, not sure if it makes sense for core as we
enforce this in the project git repo already, and Github is just a mirror.

Stijn


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


Re: [LEDE-DEV] [OpenWrt-Devel] Enable DCO check on Github OpenWrt organisation

2018-01-21 Thread Stijn Tintel
On 21-01-18 19:21, Jo-Philipp Wich wrote:
> Hi,
>
> ACK from me as well.
>
>> ACK to enable it for packages, not sure if it makes sense for core as we
>> enforce this in the project git repo already, and Github is just a mirror.
> It does make sense to provide immediate feedback on Github pull requests
> I assume.
You're right, let's enable it everywhere.

Stijn

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


Re: [LEDE-DEV] [PATCH v1 1/1] openssh: disable passwords for openssh server

2018-02-17 Thread Stijn Tintel
On 09-02-18 01:28, Philip Prindeville wrote:
> From: Philip Prindeville 
>
> Allowing password logins leaves you vulnerable to dictionary
> attacks.  We disable password-based authentication, limiting
> authentication to keys only which are more secure.
>
> Note: You'll need to pre-populate your image with some initial
> keys. To do this:
>
> 1. Create the appropriate directory as "mkdir -p files/root/.ssh"
>from your top-level directory;
> 2. Copy your "~/.ssh/id_rsa.pub" (or as appropriate) into
>"files/root/.ssh/authorized_keys" and indeed, you can collect
>keys from several sources this way by concatenating them;
> 3. Set the permissions on "authorized_keys" to 644 or 640.
>
>
NAK. This is going to bite people. It takes much more time and effort to
recover from a device you can no longer access due to this change, than
to manually disable password authentication in OpenSSH.


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


[LEDE-DEV] [PATCH V2 1/7] firmware-utils: mkwrggimg: new tool for D-Link DAP-2695

2016-10-21 Thread Stijn Tintel
Based on mkwrgimg.c.

Signed-off-by: Stijn Tintel 
---
 tools/firmware-utils/Makefile|   1 +
 tools/firmware-utils/src/mkwrggimg.c | 282 +++
 2 files changed, 283 insertions(+)
 create mode 100644 tools/firmware-utils/src/mkwrggimg.c

diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile
index 803ada4..320d1db 100644
--- a/tools/firmware-utils/Makefile
+++ b/tools/firmware-utils/Makefile
@@ -57,6 +57,7 @@ define Host/Compile
$(call cc,buffalo-tag buffalo-lib, -Wall)
$(call cc,buffalo-tftp buffalo-lib, -Wall)
$(call cc,mkwrgimg md5, -Wall)
+   $(call cc,mkwrggimg md5, -Wall)
$(call cc,mkedimaximg)
$(call cc,mkbrncmdline)
$(call cc,mkbrnimg)
diff --git a/tools/firmware-utils/src/mkwrggimg.c 
b/tools/firmware-utils/src/mkwrggimg.c
new file mode 100644
index 000..a224b25
--- /dev/null
+++ b/tools/firmware-utils/src/mkwrggimg.c
@@ -0,0 +1,282 @@
+/*
+ *  Copyright (C) 2011 Gabor Juhos 
+ *  Copyright (C) 2016 Stijn Tintel 
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ *
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "md5.h"
+
+#define ERR(fmt, ...) do { \
+   fflush(0); \
+   fprintf(stderr, "[%s] *** error: " fmt "\n", \
+   progname, ## __VA_ARGS__ ); \
+} while (0)
+
+#define ERRS(fmt, ...) do { \
+   int save = errno; \
+   fflush(0); \
+   fprintf(stderr, "[%s] *** error: " fmt ", %s\n", \
+   progname, ## __VA_ARGS__, strerror(save)); \
+} while (0)
+
+#define WRGG03_MAGIC   0x20080321
+
+struct wrgg03_header {
+   charsignature[32];
+   uint32_tmagic1;
+   uint32_tmagic2;
+   charversion[16];
+   charmodel[16];
+   uint32_tflag[2];
+   uint32_treserve[2];
+   charbuildno[16];
+   uint32_tsize;
+   uint32_toffset;
+   chardevname[32];
+   chardigest[16];
+} __attribute__ ((packed));
+
+static char *progname;
+static char *ifname;
+static char *ofname;
+static char *signature;
+static char *version;
+static char *model;
+static uint32_t flag = 0;
+static uint32_t reserve = 0;
+static char *buildno;
+static uint32_t offset;
+static char *devname;
+static int big_endian;
+
+void usage(int status)
+{
+   FILE *stream = (status != EXIT_SUCCESS) ? stderr : stdout;
+
+   fprintf(stream, "Usage: %s [OPTIONS...]\n", progname);
+   fprintf(stream,
+"\n"
+"Options:\n"
+"  -b  create image in big endian format\n"
+"  -B build number\n"
+"  -iread input from the file \n"
+"  -dset device name to \n"
+"  -m   model name\n"
+"  -owrite output to the file \n"
+"  -O  set offset to \n"
+"  -s set image signature to \n"
+"  -h  show this screen\n"
+   );
+
+   exit(status);
+}
+
+static void put_u32(void *data, uint32_t val, int swap)
+{
+   unsigned char *p = data;
+
+   if (swap) {
+   p[0] = (val >> 24) & 0xff;
+   p[1] = (val >> 16) & 0xff;
+   p[2] = (val >> 8) & 0xff;
+   p[3] = val & 0xff;
+   } else {
+   p[3] = (val >> 24) & 0xff;
+   p[2] = (val >> 16) & 0xff;
+   p[1] = (val >> 8) & 0xff;
+   p[0] = val & 0xff;
+   }
+}
+
+static void get_digest(struct wrgg03_header *header, char *data, int size)
+{
+   MD5_CTX ctx;
+
+   MD5_Init(&ctx);
+
+   MD5_Update(&ctx, (char *)&header->offset, sizeof(header->offset));
+   MD5_Update(&ctx, (char *)&header->devname, sizeof(header->devname));
+   MD5_Update(&ctx, data, size);
+
+   MD5_Final(header->digest, &ctx);
+}
+
+int main(int argc, char *argv[])
+{
+   struct wrgg03_header *header;
+   char *buf;
+   struct stat st;
+   int buflen;
+   int err;
+   int res = EXIT_FAILURE;
+
+   FILE *outfile, *infile;
+
+   progname = basename(argv[0]);
+
+   while ( 1 ) {
+   int c;
+
+   c = getopt(argc, argv, "bd:i:m:o:s:v:B:O:h");
+   if (c == -1)
+   break;
+
+   switch (c) {
+   case 'b':
+   big_endian = 1;
+   break;
+   case 'B':
+   buildno = optarg;
+   break;
+ 

[LEDE-DEV] [PATCH V2 0/7] add support for D-Link DAP-2695 rev. A1

2016-10-21 Thread Stijn Tintel
This patch series adds support for D-Link DAP-2695 rev. A1.

Both the factory and the sysupgrade can be used to flash the device from
the bootloader. When flashing via the web interface of the stock
firmware, only the factory image can be used.

With the stock firmware, this device is only usable as a dumb AP. With
LEDE, it is configured as a router by default. The LAN1(PoE) port is
configured as the LAN port, the LAN2 port is configured as the WAN port.

The only thing that doesn't work, is the 5GHz LED, as it does not seem
to be connected to any of the SoC's GPIOs.

The WRGG naming comes from the D-Link GPL code. The mkwrggimg utility
also works for the D-Link DAP-2553. For more info, see
https://forum.openwrt.org/viewtopic.php?id=52048

Changes since v1:
Remove physical address of the FSF from wrgg.c
Fix endianness detection on musl in mtd
Build relocate stub for generic and legacy images
Remove ucidef_set_interfaces_lan_wan

Stijn Tintel (7):
  firmware-utils: mkwrggimg: new tool for D-Link DAP-2695
  kernel: mtdsplit: add support for WRGG images
  mtd: fix endianness detection on musl
  mtd: add fixwrgg command
  ar71xx/base-files: rename 09_fix-trx-header 09_fix-checksum
  ar71xx: build relocate stub for generic and legacy images
  ar71xx: add support for D-Link DAP-2695 rev. A1

 package/boot/uboot-envtools/files/ar71xx   |   1 +
 package/system/mtd/src/Makefile|   3 +-
 package/system/mtd/src/mtd.c   |  29 ++-
 package/system/mtd/src/mtd.h   |   1 +
 package/system/mtd/src/seama.c |   1 +
 package/system/mtd/src/wrgg.c  | 190 ++
 package/system/mtd/src/wrgg.h  |  20 ++
 target/linux/ar71xx/base-files/etc/board.d/01_leds |   5 +
 .../linux/ar71xx/base-files/etc/board.d/02_network |   3 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata   |   4 +
 .../base-files/etc/uci-defaults/09_fix-checksum|  28 ++
 .../base-files/etc/uci-defaults/09_fix-trx-header  |  19 --
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |  13 +
 target/linux/ar71xx/config-4.4 |   2 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |   9 +
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../files/arch/mips/ath79/mach-dap-2695-a1.c   | 191 ++
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/image/Makefile |   5 +-
 target/linux/ar71xx/image/generic.mk   |  29 +++
 target/linux/ar71xx/image/legacy.mk|   6 -
 target/linux/generic/config-3.18   |   1 +
 target/linux/generic/config-4.1|   1 +
 target/linux/generic/config-4.4|   1 +
 .../generic/files/drivers/mtd/mtdsplit/Kconfig |   5 +
 .../generic/files/drivers/mtd/mtdsplit/Makefile|   1 +
 .../files/drivers/mtd/mtdsplit/mtdsplit_wrgg.c | 109 
 tools/firmware-utils/Makefile  |   1 +
 tools/firmware-utils/src/mkwrggimg.c   | 282 +
 30 files changed, 936 insertions(+), 29 deletions(-)
 create mode 100644 package/system/mtd/src/wrgg.c
 create mode 100644 package/system/mtd/src/wrgg.h
 create mode 100644 
target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum
 delete mode 100644 
target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-trx-header
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-dap-2695-a1.c
 create mode 100644 
target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_wrgg.c
 create mode 100644 tools/firmware-utils/src/mkwrggimg.c

-- 
2.7.3


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


[LEDE-DEV] [PATCH V2 4/7] mtd: add fixwrgg command

2016-10-21 Thread Stijn Tintel
Based on fixseama.

Signed-off-by: Stijn Tintel 
---
 package/system/mtd/src/Makefile |   3 +-
 package/system/mtd/src/mtd.c|  28 +-
 package/system/mtd/src/mtd.h|   1 +
 package/system/mtd/src/wrgg.c   | 190 
 package/system/mtd/src/wrgg.h   |  20 +
 5 files changed, 239 insertions(+), 3 deletions(-)
 create mode 100644 package/system/mtd/src/wrgg.c
 create mode 100644 package/system/mtd/src/wrgg.h

diff --git a/package/system/mtd/src/Makefile b/package/system/mtd/src/Makefile
index 70c61e5..4e39a89 100644
--- a/package/system/mtd/src/Makefile
+++ b/package/system/mtd/src/Makefile
@@ -4,7 +4,8 @@ LDFLAGS += -lubox
 
 obj = mtd.o jffs2.o crc32.o md5.o
 obj.seama = seama.o md5.o
-obj.ar71xx = trx.o $(obj.seama)
+obj.wrgg = wrgg.o md5.o
+obj.ar71xx = trx.o $(obj.seama) $(obj.wrgg)
 obj.brcm = trx.o
 obj.brcm47xx = $(obj.brcm)
 obj.bcm53xx = $(obj.brcm) $(obj.seama)
diff --git a/package/system/mtd/src/mtd.c b/package/system/mtd/src/mtd.c
index 702ed3d..2f4aea2 100644
--- a/package/system/mtd/src/mtd.c
+++ b/package/system/mtd/src/mtd.c
@@ -54,6 +54,7 @@
 
 #define TRX_MAGIC  0x48445230  /* "HDR0" */
 #define SEAMA_MAGIC0x5ea3a417
+#define WRGG03_MAGIC   0x20080321
 
 #if !defined(__BYTE_ORDER)
 #error "Unknown byte order"
@@ -62,9 +63,11 @@
 #if __BYTE_ORDER == __BIG_ENDIAN
 #define cpu_to_be32(x) (x)
 #define be32_to_cpu(x) (x)
+#define le32_to_cpu(x) bswap_32(x)
 #elif __BYTE_ORDER == __LITTLE_ENDIAN
 #define cpu_to_be32(x) bswap_32(x)
 #define be32_to_cpu(x) bswap_32(x)
+#define le32_to_cpu(x)  (x)
 #else
 #error "Unsupported endianness"
 #endif
@@ -73,6 +76,7 @@ enum mtd_image_format {
MTD_IMAGE_FORMAT_UNKNOWN,
MTD_IMAGE_FORMAT_TRX,
MTD_IMAGE_FORMAT_SEAMA,
+   MTD_IMAGE_FORMAT_WRGG03,
 };
 
 static char *buf = NULL;
@@ -201,6 +205,8 @@ image_check(int imagefd, const char *mtd)
imageformat = MTD_IMAGE_FORMAT_TRX;
else if (be32_to_cpu(magic) == SEAMA_MAGIC)
imageformat = MTD_IMAGE_FORMAT_SEAMA;
+   else if (le32_to_cpu(magic) == WRGG03_MAGIC)
+   imageformat = MTD_IMAGE_FORMAT_WRGG03;
 
switch (imageformat) {
case MTD_IMAGE_FORMAT_TRX:
@@ -209,6 +215,8 @@ image_check(int imagefd, const char *mtd)
break;
case MTD_IMAGE_FORMAT_SEAMA:
break;
+   case MTD_IMAGE_FORMAT_WRGG03:
+   break;
default:
 #ifdef target_brcm
if (!strcmp(mtd, "firmware"))
@@ -677,6 +685,10 @@ resume:
if (mtd_fixseama)
mtd_fixseama(mtd, 0, 0);
break;
+   case MTD_IMAGE_FORMAT_WRGG03:
+   if (mtd_fixwrgg)
+   mtd_fixwrgg(mtd, 0, 0);
+   break;
default:
break;
}
@@ -722,6 +734,10 @@ static void usage(void)
fprintf(stderr,
"fixseamafix the checksum in a seama header on 
first boot\n");
}
+   if (mtd_fixwrgg) {
+   fprintf(stderr,
+   "fixwrgg fix the checksum in a wrgg header on 
first boot\n");
+   }
fprintf(stderr,
"Following options are available:\n"
"-q  quiet mode (once: no [w] on writing,\n"
@@ -739,9 +755,9 @@ static void usage(void)
fprintf(stderr,
"-o offset   offset of the image header in the 
partition(for fixtrx)\n");
}
-   if (mtd_fixtrx || mtd_fixseama) {
+   if (mtd_fixtrx || mtd_fixseama || mtd_fixwrgg) {
fprintf(stderr,
-   "-c datasize amount of data to be used for checksum 
calculation (for fixtrx / fixseama)\n");
+   "-c datasize amount of data to be used for checksum 
calculation (for fixtrx / fixseama / fixwrgg)\n");
}
fprintf(stderr,
 #ifdef FIS_SUPPORT
@@ -782,6 +798,7 @@ int main (int argc, char **argv)
CMD_JFFS2WRITE,
CMD_FIXTRX,
CMD_FIXSEAMA,
+   CMD_FIXWRGG,
CMD_VERIFY,
CMD_DUMP,
CMD_RESETBC,
@@ -896,6 +913,9 @@ int main (int argc, char **argv)
} else if (((strcmp(argv[0], "fixseama") == 0) && (argc == 2)) && 
mtd_fixseama) {
cmd = CMD_FIXSEAMA;
device = argv[1];
+   } else if (((strcmp(argv[0], "fixwrgg") == 0) && (argc == 2)) && 
mtd_fixwrgg) {
+   cmd = CMD_FIXWRGG;
+   device = argv[1];
} else if ((strcmp(argv[0], "verify") == 0) && (argc == 3)) {
cmd = CMD_VERIFY;

[LEDE-DEV] [PATCH V2 2/7] kernel: mtdsplit: add support for WRGG images

2016-10-21 Thread Stijn Tintel
Support splitting WRGG images, found in some D-Link devices (e.g.
DAP-2695).

Signed-off-by: Stijn Tintel 
---
 target/linux/ar71xx/config-4.4 |   1 +
 target/linux/generic/config-3.18   |   1 +
 target/linux/generic/config-4.1|   1 +
 target/linux/generic/config-4.4|   1 +
 .../generic/files/drivers/mtd/mtdsplit/Kconfig |   5 +
 .../generic/files/drivers/mtd/mtdsplit/Makefile|   1 +
 .../files/drivers/mtd/mtdsplit/mtdsplit_wrgg.c | 109 +
 7 files changed, 119 insertions(+)
 create mode 100644 
target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_wrgg.c

diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index 77a5949..d6ed7b7 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -351,6 +351,7 @@ CONFIG_MTD_SPLIT_FIRMWARE=y
 CONFIG_MTD_SPLIT_LZMA_FW=y
 CONFIG_MTD_SPLIT_SEAMA_FW=y
 CONFIG_MTD_SPLIT_UIMAGE_FW=y
+CONFIG_MTD_SPLIT_WRGG_FW=y
 CONFIG_MTD_TPLINK_PARTS=y
 CONFIG_MYLOADER=y
 CONFIG_NEED_DMA_MAP_STATE=y
diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18
index 0ccd9ac..8b70c7d 100644
--- a/target/linux/generic/config-3.18
+++ b/target/linux/generic/config-3.18
@@ -2282,6 +2282,7 @@ CONFIG_MTD_SPLIT_SUPPORT=y
 # CONFIG_MTD_SPLIT_TRX_FW is not set
 # CONFIG_MTD_SPLIT_TPLINK_FW is not set
 # CONFIG_MTD_SPLIT_UIMAGE_FW is not set
+# CONFIG_MTD_SPLIT_WRGG_FW is not set
 # CONFIG_MTD_SST25L is not set
 # CONFIG_MTD_SWAP is not set
 # CONFIG_MTD_TESTS is not set
diff --git a/target/linux/generic/config-4.1 b/target/linux/generic/config-4.1
index fc7359e..68bd849 100644
--- a/target/linux/generic/config-4.1
+++ b/target/linux/generic/config-4.1
@@ -2375,6 +2375,7 @@ CONFIG_MTD_SPLIT_SUPPORT=y
 # CONFIG_MTD_SPLIT_TRX_FW is not set
 # CONFIG_MTD_SPLIT_TPLINK_FW is not set
 # CONFIG_MTD_SPLIT_UIMAGE_FW is not set
+# CONFIG_MTD_SPLIT_WRGG_FW is not set
 # CONFIG_MTD_SST25L is not set
 # CONFIG_MTD_SWAP is not set
 # CONFIG_MTD_TESTS is not set
diff --git a/target/linux/generic/config-4.4 b/target/linux/generic/config-4.4
index 687c183..32b291f 100644
--- a/target/linux/generic/config-4.4
+++ b/target/linux/generic/config-4.4
@@ -2365,6 +2365,7 @@ CONFIG_MTD_SPLIT_SUPPORT=y
 # CONFIG_MTD_SPLIT_TPLINK_FW is not set
 # CONFIG_MTD_SPLIT_TRX_FW is not set
 # CONFIG_MTD_SPLIT_UIMAGE_FW is not set
+# CONFIG_MTD_SPLIT_WRGG_FW is not set
 # CONFIG_MTD_SST25L is not set
 # CONFIG_MTD_SWAP is not set
 # CONFIG_MTD_TESTS is not set
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/Kconfig 
b/target/linux/generic/files/drivers/mtd/mtdsplit/Kconfig
index 131a74f..7e653e7 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/Kconfig
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/Kconfig
@@ -25,6 +25,11 @@ config MTD_SPLIT_SEAMA_FW
depends on MTD_SPLIT_SUPPORT
select MTD_SPLIT
 
+config MTD_SPLIT_WRGG_FW
+   bool "WRGG firmware parser"
+   depends on MTD_SPLIT_SUPPORT
+   select MTD_SPLIT
+
 config MTD_SPLIT_UIMAGE_FW
bool "uImage based firmware partition parser"
depends on MTD_SPLIT_SUPPORT
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/Makefile 
b/target/linux/generic/files/drivers/mtd/mtdsplit/Makefile
index acf799e..c843025 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/Makefile
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/Makefile
@@ -8,3 +8,4 @@ obj-$(CONFIG_MTD_SPLIT_TPLINK_FW) += mtdsplit_tplink.o
 obj-$(CONFIG_MTD_SPLIT_TRX_FW) += mtdsplit_trx.o
 obj-$(CONFIG_MTD_SPLIT_BRNIMAGE_FW) += mtdsplit_brnimage.o
 obj-$(CONFIG_MTD_SPLIT_EVA_FW) += mtdsplit_eva.o
+obj-$(CONFIG_MTD_SPLIT_WRGG_FW) += mtdsplit_wrgg.o
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_wrgg.c 
b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_wrgg.c
new file mode 100644
index 000..c1fbccb
--- /dev/null
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_wrgg.c
@@ -0,0 +1,109 @@
+/*
+ *  Copyright (C) 2013 Gabor Juhos 
+ *  Copyright (C) 2014 Felix Fietkau 
+ *  Copyright (C) 2016 Stijn Tintel 
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ *
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "mtdsplit.h"
+
+#define WRGG_NR_PARTS  2
+#define WRGG_MIN_ROOTFS_OFFS   0x8 /* 512KiB */
+#define WRGG03_MAGIC   0x20080321
+
+struct wrgg03_header {
+   charsignature[32];
+   uint32_tmagic1;
+   uint32_tmagic2;
+   charversion[16];
+   charmodel[16];
+   uint32_tflag[2];
+   uint32_treserve[2];
+   charbuildno[16];
+   uint32_tsize;
+   uint32

[LEDE-DEV] [PATCH V2 7/7] ar71xx: add support for D-Link DAP-2695 rev. A1

2016-10-21 Thread Stijn Tintel
Signed-off-by: Stijn Tintel 
---
 package/boot/uboot-envtools/files/ar71xx   |   1 +
 target/linux/ar71xx/base-files/etc/board.d/01_leds |   5 +
 .../linux/ar71xx/base-files/etc/board.d/02_network |   3 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata   |   4 +
 .../base-files/etc/uci-defaults/09_fix-checksum|   9 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |  13 ++
 target/linux/ar71xx/config-4.4 |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |   9 +
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../files/arch/mips/ath79/mach-dap-2695-a1.c   | 191 +
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/image/generic.mk   |  29 
 13 files changed, 270 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-dap-2695-a1.c

diff --git a/package/boot/uboot-envtools/files/ar71xx 
b/package/boot/uboot-envtools/files/ar71xx
index a075020..45f1f45 100644
--- a/package/boot/uboot-envtools/files/ar71xx
+++ b/package/boot/uboot-envtools/files/ar71xx
@@ -54,6 +54,7 @@ om2p-lc)
 dr531)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x1"
;;
+dap-2695-a1 | \
 wzr-hp-ag300h)
ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x1" "0x1"
;;
diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds 
b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index 5011af6..2a655cd 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -168,6 +168,11 @@ rb-2011uias-2hnd)
ucidef_set_led_switch "eth9" "ETH9" "rb:green:eth9" "switch1" "0x04"
ucidef_set_led_switch "eth10" "ETH10" "rb:green:eth10" "switch1" "0x02"
;;
+dap-2695-a1)
+   ucidef_set_led_default "power" "POWER" "d-link:green:power" "1"
+   ucidef_set_led_default "diag" "DIAG" "d-link:red:power" "0"
+   ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "d-link:green:wlan2g" 
"phy1tpt"
+   ;;
 dhp-1565-a1)
ucidef_set_led_switch "wan" "WAN" "d-link:green:planet" "switch0" "0x20"
;;
diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network 
b/target/linux/ar71xx/base-files/etc/board.d/02_network
index b7b91d0..c9cdd6e 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -229,6 +229,9 @@ ar71xx_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
;;
+   dap-2695-a1)
+   ucidef_add_switch "switch0" "0@eth0" "2:lan" "3:wan" "6@eth1"
+   ;;
db120|\
rb-2011l|\
rb-2011uas|\
diff --git 
a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index a0a111b..c700644 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -47,6 +47,10 @@ board=$(ar71xx_board_name)
 case "$FIRMWARE" in
 "ath10k/cal-pci-:00:00.0.bin")
case $board in
+   dap-2695-a1)
+   ath10kcal_extract "radiocfg" 20480 2116
+   ath10kcal_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac_a)
+   ;;
dlan-pro-1200-ac)
ath10kcal_extract "art" 20480 2116
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum 
b/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum
index 1bfd525..057afe0 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum
@@ -11,9 +11,18 @@ fixtrx() {
mtd -o 32 fixtrx firmware
 }
 
+fixwrgg() {
+   local kernel_size=$(sed -n 's/mtd[0-9]*: 
\([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd)
+
+   [ "$kernel_size" ] && mtd -c 0x$kernel_size fixwrgg firmware
+}
+
 case "$board" in
 mynet-rext |\
 wrt160nl)
fixtrx
;;
+dap-2695-a1)
+   fixwrgg
+   ;;
 esac
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 1492b50..1a2e324 100755
--- a/target/li

Re: [LEDE-DEV] [PATCH V2 0/7] add support for D-Link DAP-2695 rev. A1

2016-10-21 Thread Stijn Tintel
On 21-10-16 18:34, Stijn Tintel wrote:
> This patch series adds support for D-Link DAP-2695 rev. A1.
>
>
FYI, this series is also available in my staging tree at
https://git.lede-project.org/?p=lede/stintel/staging.git;a=shortlog;h=refs/heads/dap-2695-a1

Stijn

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


[LEDE-DEV] [PATCH V2 3/7] mtd: fix endianness detection on musl

2016-10-21 Thread Stijn Tintel
Signed-off-by: Stijn Tintel 
---
 package/system/mtd/src/mtd.c   | 1 +
 package/system/mtd/src/seama.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/package/system/mtd/src/mtd.c b/package/system/mtd/src/mtd.c
index 0d5ad22..702ed3d 100644
--- a/package/system/mtd/src/mtd.c
+++ b/package/system/mtd/src/mtd.c
@@ -23,6 +23,7 @@
 
 #define _GNU_SOURCE
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/package/system/mtd/src/seama.c b/package/system/mtd/src/seama.c
index bcda321..1f66adc 100644
--- a/package/system/mtd/src/seama.c
+++ b/package/system/mtd/src/seama.c
@@ -22,6 +22,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
+#include 
 #include 
 #include 
 #include 
-- 
2.7.3


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


[LEDE-DEV] [PATCH V2 6/7] ar71xx: build relocate stub for generic and legacy images

2016-10-21 Thread Stijn Tintel
Signed-off-by: Stijn Tintel 
---
 target/linux/ar71xx/image/Makefile  | 5 -
 target/linux/ar71xx/image/legacy.mk | 6 --
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/target/linux/ar71xx/image/Makefile 
b/target/linux/ar71xx/image/Makefile
index 56e07d8..26e9558 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -79,8 +79,11 @@ define Build/loader-okli
 endef
 
 define Build/relocate-kernel
+   rm -rf $(KDIR)/relocate
+   $(CP) ../../generic/image/relocate $(KDIR)
+   $(MAKE) -C $(KDIR)/relocate KERNEL_ADDR=$(KERNEL_LOADADDR) 
CROSS_COMPILE=$(TARGET_CROSS)
( \
-   dd if=$(KDIR)/relocate.bin bs=32 conv=sync && \
+   dd if=$(KDIR)/relocate/loader.bin bs=32 conv=sync && \
perl -e '@s = stat("$@"); print pack("N", @s[7])' && \
cat "$@" \
) > "$@.new"
diff --git a/target/linux/ar71xx/image/legacy.mk 
b/target/linux/ar71xx/image/legacy.mk
index 14de229..58a65d4d 100644
--- a/target/linux/ar71xx/image/legacy.mk
+++ b/target/linux/ar71xx/image/legacy.mk
@@ -1101,12 +1101,6 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
$(call Image/BuildLoader,generic,elf,,,-initramfs)
 endif
$(call Image/BuildLoader,generic,elf)
-
-   # Note: not only used for legacy images
-   rm -rf $(KDIR)/relocate
-   $(CP) ../../generic/image/relocate $(KDIR)
-   $(MAKE) -C $(KDIR)/relocate KERNEL_ADDR=$(KERNEL_LOADADDR) 
CROSS_COMPILE=$(TARGET_CROSS)
-   $(CP) $(KDIR)/relocate/loader.bin $(KDIR)/relocate.bin
 endef
 
 define Image/Prepare/Profile
-- 
2.7.3


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


[LEDE-DEV] [PATCH V2 5/7] ar71xx/base-files: rename 09_fix-trx-header 09_fix-checksum

2016-10-21 Thread Stijn Tintel
Signed-off-by: Stijn Tintel 
---
 .../base-files/etc/uci-defaults/09_fix-checksum   | 19 +++
 .../base-files/etc/uci-defaults/09_fix-trx-header | 19 ---
 2 files changed, 19 insertions(+), 19 deletions(-)
 create mode 100644 
target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum
 delete mode 100644 
target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-trx-header

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum 
b/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum
new file mode 100644
index 000..1bfd525
--- /dev/null
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# Copyright (C) 2010 OpenWrt.org
+#
+
+. /lib/ar71xx.sh
+
+board=$(ar71xx_board_name)
+
+fixtrx() {
+   mtd -o 32 fixtrx firmware
+}
+
+case "$board" in
+mynet-rext |\
+wrt160nl)
+   fixtrx
+   ;;
+esac
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-trx-header 
b/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-trx-header
deleted file mode 100644
index 1bfd525..000
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-trx-header
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2010 OpenWrt.org
-#
-
-. /lib/ar71xx.sh
-
-board=$(ar71xx_board_name)
-
-fixtrx() {
-   mtd -o 32 fixtrx firmware
-}
-
-case "$board" in
-mynet-rext |\
-wrt160nl)
-   fixtrx
-   ;;
-esac
-- 
2.7.3


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


Re: [LEDE-DEV] DirtyCOW backport

2016-10-23 Thread Stijn Tintel
On 24-10-16 02:37, James Feeney wrote:
> What are thoughts about backporting the DirtyCOW patch to the Lede kernels?  I
> did not see any mention in the Lede-dev Archives.
>
Most targets use kernel 4.4. As the 4.4 kernel has been updated to
4.4.26 on Friday [0], these targets are no longer vulnerable. I will
update 3.18 and 4.1 ASAP, as new versions have been released upstream.

Stijn

[0] https://git.lede-project.org/32c28a78

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


Re: [LEDE-DEV] DirtyCOW backport

2016-10-23 Thread Stijn Tintel
On 24-10-16 03:10, Stijn Tintel wrote:
> On 24-10-16 02:37, James Feeney wrote:
>> What are thoughts about backporting the DirtyCOW patch to the Lede kernels?  
>> I
>> did not see any mention in the Lede-dev Archives.
>>
> Most targets use kernel 4.4. As the 4.4 kernel has been updated to
> 4.4.26 on Friday [0], these targets are no longer vulnerable. I will
> update 3.18 and 4.1 ASAP, as new versions have been released upstream.
Pushed 3.18.43 and 4.1.34 + CVE-2016-5195 fixes to my staging tree:
https://git.lede-project.org/?p=lede/stintel/staging.git;a=shortlog;h=refs/heads/kernel
If the tarballs for for 3.18.44 and 4.1.35 don't appear on kernel.org by
tomorrow, I'll push this to the main tree as-is.

Stijn

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


Re: [LEDE-DEV] [PATCH] kernel: update kernel 4.4 to version 4.4.30

2016-11-02 Thread Stijn Tintel
On 02-11-16 10:45, p.wa...@gmx.at wrote:
>> I find it quite odd that it doesnt apply cleanly to my LEDE tree at git rev
> I've just gone throgh the changes, and there is definitely more than just
> 'refreshing' the line numbers/offsets. This is seen at [1]. Have a special 
> look
> at [2] at the bottom of this mail, the line containing the caiman target is
> completely removed! This is not patch refreshing!
>
> Looking through the upstream changes 4.4.29->4.4.30 and the list of local
> LEDE/OpenWrt patches, the only thing required for a bump to 4.4.30 is
> the change in kernel-version.mk
>
> Best regards,
> P. Wassi
>
> [1]
> Add a space in an empty line:
This is likely due to git whitespace fixing. If you have this in your
.gitconfig:

[core]
whitespace = trailing-space
[apply]
whitespace = fix


If you create a patch with diff or quilt, the first character of each
line is either +, - or a space. So an empty line in the original file,
will be in the diff as an empty line, but starting with a single space.
This is completely normal. But when you have enabled whitespace fixing
in git for trailing-space, git apply (and git am) will strip that
whitespace. If you refresh patches with make ... refresh, quilt will add
that space again.

>> diff --git 
>> a/target/linux/generic/patches-4.4/051-0002-ovl-override-creds-with-the-ones-from-the-superblock.patch
>>  
>> b/target/linux/generic/patches-4.4/051-0002-ovl-override-creds-with-the-ones-from-the-superblock.patch
>> index f985ff3..eed7bb2 100644
>> --- 
>> a/target/linux/generic/patches-4.4/051-0002-ovl-override-creds-with-the-ones-from-the-superblock.patch
>> +++ 
>> b/target/linux/generic/patches-4.4/051-0002-ovl-override-creds-with-the-ones-from-the-superblock.patch
>> @@ -105,7 +105,7 @@ Signed-off-by: Miklos Szeredi 
>>  -out_free_link:
>>  if (link)
>>  free_page((unsigned long) link);
>> -
>> + 
>>  --- a/fs/overlayfs/dir.c
>>  +++ b/fs/overlayfs/dir.c
>>  @@ -408,28 +408,13 @@ static int ovl_create_or_link(struct den
> Remove the file timestamp:
This is due to the --no-timestamps option given to quilt, in
include/quilt.mk:
QUILT_DIFF_OPTS="-p" $(QUILT_CMD) refresh -p ab --no-index --no-timestamps;
What happened here is that the patch was originally added with
timestamps, and quilt simply removes them during make ... refresh.

>> diff --git 
>> a/target/linux/generic/patches-4.4/477-mtd-add-spi-nor-add-mx25u3235f.patch 
>> b/target/linux/generic/patches-4.4/477-mtd-add-spi-nor-add-mx25u3235f.patch
>> index 45533e1..eb99b28 100644
>> --- 
>> a/target/linux/generic/patches-4.4/477-mtd-add-spi-nor-add-mx25u3235f.patch
>> +++ 
>> b/target/linux/generic/patches-4.4/477-mtd-add-spi-nor-add-mx25u3235f.patch
>> @@ -1,5 +1,5 @@
>>  a/drivers/mtd/spi-nor/spi-nor.c 2016-10-09 00:34:19.206155838 +0200
>> -+++ b/drivers/mtd/spi-nor/spi-nor.c 2016-10-09 00:37:11.048495602 +0200
>> +--- a/drivers/mtd/spi-nor/spi-nor.c
>>  b/drivers/mtd/spi-nor/spi-nor.c
>>  @@ -721,6 +721,7 @@ static const struct flash_info spi_nor_i
>>  { "mx25l3205d",  INFO(0xc22016, 0, 64 * 1024,  64, SECT_4K) },
>>  { "mx25l3255e",  INFO(0xc29e16, 0, 64 * 1024,  64, SECT_4K) },
> Remove an empty line:
Similar to [1], git apply will strip lines at the end of a file if they
solely consist of whitespaces, when whitespace fixing is enabled. Or it
could be quilt, when the user has strip-trailing-whitespace enabled in
.quiltrc.
>> diff --git a/target/linux/lantiq/patches-4.4/0153-lantiq-VPE-softdog.patch 
>> b/target/linux/lantiq/patches-4.4/0153-lantiq-VPE-softdog.patch
>> index 2f5572a..eb76a24 100644
>> --- a/target/linux/lantiq/patches-4.4/0153-lantiq-VPE-softdog.patch
>> +++ b/target/linux/lantiq/patches-4.4/0153-lantiq-VPE-softdog.patch
>> @@ -157,7 +157,6 @@
>>  +MODULE_AUTHOR("LXDB");
>>  +MODULE_DESCRIPTION("Software Watchdog For VPE1");
>>  +MODULE_LICENSE("GPL");
>> -
>>  --- a/arch/mips/lantiq/Makefile
>>  +++ b/arch/mips/lantiq/Makefile
>>  @@ -6,6 +6,8 @@
> [2]
You are misinterpreting the change below. Apply the patch, and check
target/linux/mvebu/patches-4.4/053-ARM-dts-Add-SolidRun-Armada-388-Clearfog-A1-DT-file.patch
afterwards. You will notice that armada-385-linksys-caiman.dtb wasn't
removed. You are looking at a diff of a diff, and this can be confusing.
It's simply the offset that changes by 1 line.
>> diff --git 
>> a/target/linux/mvebu/patches-4.4/053-ARM-dts-Add-SolidRun-Armada-388-Clearfog-A1-DT-file.patch
>>  
>> b/target/linux/mvebu/patches-4.4/053-ARM-dts-Add-SolidRun-Armada-388-Clearfog-A1-DT-file.patch
>> index abf2a63..b25d710 100644
>> --- 
>> a/target/linux/mvebu/patches-4.4/053-ARM-dts-Add-SolidRun-Armada-388-Clearfog-A1-DT-file.patch
>> +++ 
>> b/target/linux/mvebu/patches-4.4/053-ARM-dts-Add-SolidRun-Armada-388-Clearfog-A1-DT-file.patch
>> @@ -24,9 +24,9 @@ Signed-off-by: Gregory CLEMENT > free-electrons.com>
>>  
>>  --- a/arch/arm/boot/dts/Makefile
>>  +++ b/arch/arm/boot/dts/Makefile
>> -@@ -749,6 +749,7 @@ dtb-$(CONFI

Re: [LEDE-DEV] [PATCH] kernel: update kernel 4.4 to version 4.4.31

2016-11-16 Thread Stijn Tintel
On 16-11-16 09:54, Koen Vandeputte wrote:
> Hi Paul,
>
> First of all, thank you for reviewing and testing the patch.
>
>
> Let me share in detail how I prepare the kernel update patch:
>
> - Pull the latest git state 3 times
> - On two of them, I apply my custom .config and feeds for the hardware
> targets I use (1 for cns3xxx, 1 for imx6)
> - On each of the 2 targets: Adapt the kernel-version.mk file to
> include the new kernel
> - Do a full build (tools, toolchain, packages, ...)
> - Run the following command: |"make target/linux/refresh V=s"|
> --> which is instructed here:
> https://wiki.openwrt.org/doc/devel/patches#refreshing_patches
> - From one of the build, copy all pathes from
> "target/linux/generic/patches-4.4" to the unused git source clone
> - From each seperate build, copy all pathes from
> target/linux/"target"/patches-4.4 to the unused git source clone
> ("target" being cns3xxx or imx6)
> - Read all changes in git
> - Commit + clearly specifiy it has been compiled/tested only on my 2
> targets.
>
> (If anyone thinks this is not the correct approach, please provide
> feedback by all means!)
>
>
> To be honest .. I share your opinion that it sometimes feels ..
> dangerous.
> - Will it build on other targets except my 2?
> - As some patches appear to lack refreshes, is something wrong with
> the refresh system? (I followed the previous discussion with the jump
> to kernel .30 extensively)
>
You should use the script, and trust the refresh mechanism over yourself.
>
>
> Personal thoughts regarding possible solutions:
>
> 1)
> - Having a separate staging tree which is a copy of the main Source
> tree, but only used for updating/testing kernel updates.
> This way different people using different targets could easily test a
> kernel update on their targets and reply if it's working or not. (and
> supply refresh-patches for target-specific kernel patches)
> If all major targets are refreshed, tested & confirmed, it should be
> safer to merge it to main.
>
> 2)
> - An alternate approach would be to create a script which auto-builds
> & refresh every possible target.

We already have this script, it was mentioned in a previous thread about
the subject.
> --> Huge workload for 1 person
> --> Would still leave some targets untested (unless someone has all
> the time + hardware? :) )
I've done this before, https://git.lede-project.org/8072264b. It took a
long time, but it's doable.
>
> 3)
> - When a kernel update patch is posted, it requires at least 2
> additional "tested-by"'s on different targets before it can be
> considered for merging. (Covering 5 .. 6 targets in total)
>
>
> Any other ideas? anyone?
>
>
>
> Thanks again,
>
> Koen
>
>
>
> On 2016-11-16 08:00, p.wa...@gmx.at wrote:
>> As I've just sent in 4.4.32, I came across other changes from which
>> I think they should have already been done in 4.4.31:
>> /apm821xx/patches-4.4/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch
>>
>> /apm821xx/patches-4.4/802-usb-xhci-force-msi-renesas-xhci.patch
>>
>> Changes to xhci-pci.c were made upstream during release of 4.4.31
>> [1], which introduce
>> two lines offset. Of course I know, that missing this refreshing
>> doesn't break anything.
>> However, it's not clear for me why some patches are refreshed, while
>> others are not. This
>> looks so indeterministic to me. Or am I still producing false positives?
>>
>> Best regards,
>> P. Wassi
>>
>> [1]:
>> https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/diff/?id=v4.4.31&id2=v4.4.30&dt=2
>>
>>
>>> + Refresh patches
>>> compile/run-tested on cns3xxx & imx6.
>>>
>>> Signed-off-by: Koen Vandeputte 
>>> ---
>>>   include/kernel-version.mk  |  4 ++--
>>>   ...-override-creds-with-the-ones-from-the-superblock.patch |  6
>>> +++---
>>>   .../patches-4.4/052-01-ubifs-Implement-O_TMPFILE.patch |  2 +-
>>>   .../052-02-ubifs-Implement-RENAME_WHITEOUT.patch   | 14
>>> +++---
>>>   .../052-03-ubifs-Implement-RENAME_EXCHANGE.patch   |  6
>>> +++---
>>>   ...ac-stop-clearing-DMA-receive-control-register-rig.patch |  9
>>> ++---
>>>   .../linux/generic/patches-4.4/201-extra_optimization.patch |  4 ++--
>>>   7 files changed, 20 insertions(+), 25 deletions(-)
>
I started the script to do this for 4.4.31, and I already have more
changes than you, so NAK. While I appreciate the effort, I would like to
ask you to not send these kind of patches anymore until you are sure you
completely understand what you are doing.

Thanks,
Stijn


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


Re: [LEDE-DEV] [PATCH] kernel: update kernel 4.4 to version 4.4.32

2016-11-16 Thread Stijn Tintel
On 16-11-16 07:43, p.wa...@gmx.at wrote:
> From: Paul Wassi 
>
> Refresh patches for all targets that support kernel 4.4.
> compile/run-tested on kirkwood, ar71xx, brcm47xx.
>
> Signed-off-by: Paul Wassi 
> ---
> This patch is meant to be applied upon 4.4.31!
> Apply https://patchwork.ozlabs.org/patch/694032/ first.
Running the script to update to 4.4.32 on top of the patch above, and
already have more changed files, so NAK here as well.
As you used the script, I suspect it is because you are not using the
same quilt configuration:
https://wiki.openwrt.org/doc/devel/patches#prepare_quilt_configuration

Stijn

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


[LEDE-DEV] [PATCH 3/3] hostapd/wpa_supplicant: require SHA256-based algorithms for ieee80211w=2

2016-12-27 Thread Stijn Tintel
While the standard does not require SHA256-based algorithms when PFM is
mandatory, there's not much of a point in keeping the old algorithms
enabled.

See http://lists.shmoo.com/pipermail/hostap/2014-November/031283.html

Signed-off-by: Stijn Tintel 
---
 package/network/services/hostapd/files/netifd.sh | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/network/services/hostapd/files/netifd.sh 
b/package/network/services/hostapd/files/netifd.sh
index a6049fd..359a264 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -257,7 +257,7 @@ hostapd_set_bss_options() {
 
wps_possible=1
[ "$ieee80211w" -gt 0 ] && append wpa_key_mgmt 
"WPA-PSK-SHA256"
-   append wpa_key_mgmt "WPA-PSK"
+   [ "$ieee80211w" -lt 2 ] && append wpa_key_mgmt "WPA-PSK"
;;
eap)
json_get_vars \
@@ -293,7 +293,7 @@ hostapd_set_bss_options() {
append bss_conf "eapol_key_index_workaround=1" "$N"
append bss_conf "ieee8021x=1" "$N"
[ "$ieee80211w" -gt 1 ] && append wpa_key_mgmt 
"WPA-EAP-SHA256"
-   append wpa_key_mgmt "WPA-EAP"
+   [ "$ieee80211w" -lt 2 ] && append wpa_key_mgmt "WPA-EAP"
 
[ "$eapol_version" -ge "1" -a "$eapol_version" -le "2" 
] && append bss_conf "eapol_version=$eapol_version" "$N"
;;
@@ -617,7 +617,7 @@ wpa_supplicant_add_network() {
local passphrase
 
[ "$ieee80211w" -gt 1 ] && append wpa_key_mgmt 
"WPA-PSK-SHA256"
-   append wpa_key_mgmt "WPA-PSK"
+   [ "$ieee80211w" -lt 2 ] && append wpa_key_mgmt "WPA-PSK"
[ "$ieee80211r" -gt 0 ] && append wpa_key_mgmt "FT-PSK"
key_mgmt="$wpa_key_mgmt"
 
@@ -630,7 +630,7 @@ wpa_supplicant_add_network() {
;;
eap)
[ "$ieee80211w" -gt 1 ] && append wpa_key_mgmt 
"WPA-EAP-SHA256"
-   append wpa_key_mgmt "WPA-EAP"
+   [ "$ieee80211w" -lt 2 ] && append wpa_key_mgmt "WPA-EAP"
[ "$ieee80211r" -gt 0 ] && append wpa_key_mgmt "FT-EAP"
key_mgmt="$wpa_key_mgmt"
 
-- 
2.10.2


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


[LEDE-DEV] [PATCH 1/3] wpa_supplicant: rework wpa_key_mgmt handling

2016-12-27 Thread Stijn Tintel
Rework wpa_key_mgmt handling for wpa_supplicant to be consistent with
how it is done for hostapd.

Signed-off-by: Stijn Tintel 
---
 package/network/services/hostapd/files/netifd.sh | 17 +
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/package/network/services/hostapd/files/netifd.sh 
b/package/network/services/hostapd/files/netifd.sh
index a24a5c30..b87672c 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -573,11 +573,8 @@ wpa_supplicant_add_network() {
local network_data=
local T="   "
 
-   local wpa_key_mgmt="WPA-PSK"
local scan_ssid="scan_ssid=1"
-   local freq
-
-   [ "$ieee80211r" -gt 0 ] && wpa_key_mgmt="FT-PSK $wpa_key_mgmt"
+   local freq wpa_key_mgmt
 
[[ "$_w_mode" = "adhoc" ]] && {
append network_data "mode=1" "$N$T"
@@ -589,7 +586,7 @@ wpa_supplicant_add_network() {
 
scan_ssid="scan_ssid=0"
 
-   [ "$_w_driver" = "nl80211" ] || wpa_key_mgmt="WPA-NONE"
+   [ "$_w_driver" = "nl80211" ] || append wpa_key_mgmt "WPA-NONE"
}
 
[[ "$_w_mode" = "mesh" ]] && {
@@ -601,7 +598,7 @@ wpa_supplicant_add_network() {
freq="$(get_freq "$phy" "$channel")"
append network_data "frequency=$freq" "$N$T"
}
-   wpa_key_mgmt="SAE"
+   append wpa_key_mgmt "SAE"
scan_ssid=""
}
 
@@ -617,7 +614,10 @@ wpa_supplicant_add_network() {
psk)
local passphrase
 
+   append wpa_key_mgmt "WPA-PSK"
+   [ "$ieee80211r" -gt 0 ] && append wpa_key_mgmt "FT-PSK"
key_mgmt="$wpa_key_mgmt"
+
if [ ${#key} -eq 64 ]; then
passphrase="psk=${key}"
else
@@ -626,8 +626,9 @@ wpa_supplicant_add_network() {
append network_data "$passphrase" "$N$T"
;;
eap)
-   key_mgmt='WPA-EAP'
-   [ "$ieee80211r" -gt 0 ] && key_mgmt="FT-EAP $key_mgmt"
+   append wpa_key_mgmt "WPA-EAP"
+   [ "$ieee80211r" -gt 0 ] && append wpa_key_mgmt "FT-EAP"
+   key_mgmt="$wpa_key_mgmt"
 
json_get_vars eap_type identity anonymous_identity 
ca_cert
[ -n "$ca_cert" ] && append network_data 
"ca_cert=\"$ca_cert\"" "$N$T"
-- 
2.10.2


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


[LEDE-DEV] [PATCH 2/3] hostapd/wpa_supplicant: enable SHA256-based algorithms

2016-12-27 Thread Stijn Tintel
Enable support for stronger SHA256-based algorithms in hostapd and
wpa_supplicant when using WPA-EAP or WPA-PSK with 802.11w enabled.

We cannot unconditionally enable it, as it requires hostapd to be
compiled with 802.11w support, which is disabled in the -mini variants.

Signed-off-by: Stijn Tintel 
---
 package/network/services/hostapd/files/netifd.sh | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/files/netifd.sh 
b/package/network/services/hostapd/files/netifd.sh
index b87672c..a6049fd 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -187,7 +187,7 @@ hostapd_set_bss_options() {
wps_device_type wps_device_name wps_manufacturer wps_pin \
macfilter ssid wmm uapsd hidden short_preamble rsn_preauth \
iapp_interface eapol_version acct_server acct_secret acct_port \
-   dynamic_vlan
+   dynamic_vlan ieee80211w
 
set_default isolate 0
set_default maxassoc 0
@@ -256,6 +256,7 @@ hostapd_set_bss_options() {
[ "$eapol_version" -ge "1" -a "$eapol_version" -le "2" 
] && append bss_conf "eapol_version=$eapol_version" "$N"
 
wps_possible=1
+   [ "$ieee80211w" -gt 0 ] && append wpa_key_mgmt 
"WPA-PSK-SHA256"
append wpa_key_mgmt "WPA-PSK"
;;
eap)
@@ -291,6 +292,7 @@ hostapd_set_bss_options() {
[ -n "$ownip" ] && append bss_conf "own_ip_addr=$ownip" 
"$N"
append bss_conf "eapol_key_index_workaround=1" "$N"
append bss_conf "ieee8021x=1" "$N"
+   [ "$ieee80211w" -gt 1 ] && append wpa_key_mgmt 
"WPA-EAP-SHA256"
append wpa_key_mgmt "WPA-EAP"
 
[ "$eapol_version" -ge "1" -a "$eapol_version" -le "2" 
] && append bss_conf "eapol_version=$eapol_version" "$N"
@@ -614,6 +616,7 @@ wpa_supplicant_add_network() {
psk)
local passphrase
 
+   [ "$ieee80211w" -gt 1 ] && append wpa_key_mgmt 
"WPA-PSK-SHA256"
append wpa_key_mgmt "WPA-PSK"
[ "$ieee80211r" -gt 0 ] && append wpa_key_mgmt "FT-PSK"
key_mgmt="$wpa_key_mgmt"
@@ -626,6 +629,7 @@ wpa_supplicant_add_network() {
append network_data "$passphrase" "$N$T"
;;
eap)
+   [ "$ieee80211w" -gt 1 ] && append wpa_key_mgmt 
"WPA-EAP-SHA256"
append wpa_key_mgmt "WPA-EAP"
[ "$ieee80211r" -gt 0 ] && append wpa_key_mgmt "FT-EAP"
key_mgmt="$wpa_key_mgmt"
-- 
2.10.2


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


Re: [LEDE-DEV] [PATCH 3/3] hostapd/wpa_supplicant: require SHA256-based algorithms for ieee80211w=2

2016-12-27 Thread Stijn Tintel
On 27-12-16 12:57, Stijn Tintel wrote:
> While the standard does not require SHA256-based algorithms when PFM is
> mandatory, there's not much of a point in keeping the old algorithms
> enabled.
>
> See http://lists.shmoo.com/pipermail/hostap/2014-November/031283.html
Please ignore this patch, I am going to drop it for the following reasons:

- When ieee80211w is not defined, wpa_key_mgmt is not added to the
hostapd config at all. While I am still able to associate like that,
this might cause unexpected behaviour with future hostapd releases.

- When ieee80211w=2 and only WPA-PSK-SHA256 is enabled, my OnePlus 2
(Android 6.0.1) is unable to associate. When WPA-PSK is also enabled, it
associates fine. So this change has the potential to break existing
setups with ieee80211w=2. While it might not make much sense to have
WPA-PSK with PMK required, it does protect against a simple deauth attack.

Stijn


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


[LEDE-DEV] [PATCH 0/3] hostapd: support SHA256-based algorithms

2016-12-28 Thread Stijn Tintel
This series adds support for SHA256-based key management algorithms in
hostapd and wpa_supplicant. The algorithms are part of the 802.11w standard,
so they are only enabled when 802.11w is enabled. Due to this, they are
not available in the -mini build variants.

While it is recommended to only allow SHA256-based algorithms when 802.11w is
required, the standard does not require this. It also breaks existings setups
with ieee80211w=2 for clients that do not support SHA256-based algorithms,
so leave SHA1-based enabled algorithms for now. It might not make much sense,
but it does protect against simple deauth attacks.

Tested with WPA-PSK on ath5k AP with ath9k STA, and vice versa. When both the
hostapd and wpa_supplicant config have (wpa_)key_mgmt=WPA-PSK WPA-PSK-SHA256,
the SHA256 variant is used.

Series is also available in my staging tree:
https://git.lede-project.org/?p=lede/stintel/staging.git;a=summary

Stijn Tintel (3):
  wpa_supplicant: rework wpa_key_mgmt handling
  hostapd: add function to handle wpa_key_mgmt
  hostapd: enable SHA256-based algorithms

 package/network/services/hostapd/files/netifd.sh | 32 +---
 1 file changed, 17 insertions(+), 15 deletions(-)

-- 
2.10.2


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


[LEDE-DEV] [PATCH 1/3] wpa_supplicant: rework wpa_key_mgmt handling

2016-12-28 Thread Stijn Tintel
Rework wpa_key_mgmt handling for wpa_supplicant to be consistent with
how it is done for hostapd.

Signed-off-by: Stijn Tintel 
---
 package/network/services/hostapd/files/netifd.sh | 17 +
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/package/network/services/hostapd/files/netifd.sh 
b/package/network/services/hostapd/files/netifd.sh
index a24a5c30..b87672c 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -573,11 +573,8 @@ wpa_supplicant_add_network() {
local network_data=
local T="   "
 
-   local wpa_key_mgmt="WPA-PSK"
local scan_ssid="scan_ssid=1"
-   local freq
-
-   [ "$ieee80211r" -gt 0 ] && wpa_key_mgmt="FT-PSK $wpa_key_mgmt"
+   local freq wpa_key_mgmt
 
[[ "$_w_mode" = "adhoc" ]] && {
append network_data "mode=1" "$N$T"
@@ -589,7 +586,7 @@ wpa_supplicant_add_network() {
 
scan_ssid="scan_ssid=0"
 
-   [ "$_w_driver" = "nl80211" ] || wpa_key_mgmt="WPA-NONE"
+   [ "$_w_driver" = "nl80211" ] || append wpa_key_mgmt "WPA-NONE"
}
 
[[ "$_w_mode" = "mesh" ]] && {
@@ -601,7 +598,7 @@ wpa_supplicant_add_network() {
freq="$(get_freq "$phy" "$channel")"
append network_data "frequency=$freq" "$N$T"
}
-   wpa_key_mgmt="SAE"
+   append wpa_key_mgmt "SAE"
scan_ssid=""
}
 
@@ -617,7 +614,10 @@ wpa_supplicant_add_network() {
psk)
local passphrase
 
+   append wpa_key_mgmt "WPA-PSK"
+   [ "$ieee80211r" -gt 0 ] && append wpa_key_mgmt "FT-PSK"
key_mgmt="$wpa_key_mgmt"
+
if [ ${#key} -eq 64 ]; then
passphrase="psk=${key}"
else
@@ -626,8 +626,9 @@ wpa_supplicant_add_network() {
append network_data "$passphrase" "$N$T"
;;
eap)
-   key_mgmt='WPA-EAP'
-   [ "$ieee80211r" -gt 0 ] && key_mgmt="FT-EAP $key_mgmt"
+   append wpa_key_mgmt "WPA-EAP"
+   [ "$ieee80211r" -gt 0 ] && append wpa_key_mgmt "FT-EAP"
+   key_mgmt="$wpa_key_mgmt"
 
json_get_vars eap_type identity anonymous_identity 
ca_cert
[ -n "$ca_cert" ] && append network_data 
"ca_cert=\"$ca_cert\"" "$N$T"
-- 
2.10.2


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


[LEDE-DEV] [PATCH 3/3] hostapd: enable SHA256-based algorithms

2016-12-28 Thread Stijn Tintel
Enable support for stronger SHA256-based algorithms in hostapd and
wpa_supplicant when using WPA-EAP or WPA-PSK with 802.11w enabled.

We cannot unconditionally enable it, as it requires hostapd to be
compiled with 802.11w support, which is disabled in the -mini variants.

Signed-off-by: Stijn Tintel 
---
 package/network/services/hostapd/files/netifd.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/services/hostapd/files/netifd.sh 
b/package/network/services/hostapd/files/netifd.sh
index a339e44..a7a6a64 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -41,6 +41,7 @@ hostapd_append_wpa_key_mgmt() {
 
append wpa_key_mgmt "WPA-$auth_type"
[ "$ieee80211r" -gt 0 ] && append wpa_key_mgmt "FT-${auth_type}"
+   [ "$ieee80211w" -gt 0 ] && append wpa_key_mgmt "WPA-${auth_type}-SHA256"
 }
 
 hostapd_add_log_config() {
@@ -194,7 +195,7 @@ hostapd_set_bss_options() {
wps_device_type wps_device_name wps_manufacturer wps_pin \
macfilter ssid wmm uapsd hidden short_preamble rsn_preauth \
iapp_interface eapol_version acct_server acct_secret acct_port \
-   dynamic_vlan
+   dynamic_vlan ieee80211w
 
set_default isolate 0
set_default maxassoc 0
@@ -400,7 +401,6 @@ hostapd_set_bss_options() {
[ "$auth_cache" = 0 ] && append bss_conf 
"disable_pmksa_caching=1" "$N"
 
# RSN -> allow management frame protection
-   json_get_var ieee80211w ieee80211w
case "$ieee80211w" in
[012])
json_get_vars ieee80211w_max_timeout 
ieee80211w_retry_timeout
-- 
2.10.2


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


[LEDE-DEV] [PATCH 2/3] hostapd: add function to handle wpa_key_mgmt

2016-12-28 Thread Stijn Tintel
Now that wpa_key_mgmt handling for hostapd and wpa_supplicant are
consistent, we can move parts of it to a dedicated function.

Signed-off-by: Stijn Tintel 
---
 package/network/services/hostapd/files/netifd.sh | 19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/package/network/services/hostapd/files/netifd.sh 
b/package/network/services/hostapd/files/netifd.sh
index b87672c..a339e44 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -36,6 +36,13 @@ hostapd_append_wep_key() {
esac
 }
 
+hostapd_append_wpa_key_mgmt() {
+   local auth_type="$(echo $auth_type | tr 'a-z' 'A-Z')"
+
+   append wpa_key_mgmt "WPA-$auth_type"
+   [ "$ieee80211r" -gt 0 ] && append wpa_key_mgmt "FT-${auth_type}"
+}
+
 hostapd_add_log_config() {
config_add_boolean \
log_80211 \
@@ -256,7 +263,6 @@ hostapd_set_bss_options() {
[ "$eapol_version" -ge "1" -a "$eapol_version" -le "2" 
] && append bss_conf "eapol_version=$eapol_version" "$N"
 
wps_possible=1
-   append wpa_key_mgmt "WPA-PSK"
;;
eap)
json_get_vars \
@@ -291,7 +297,6 @@ hostapd_set_bss_options() {
[ -n "$ownip" ] && append bss_conf "own_ip_addr=$ownip" 
"$N"
append bss_conf "eapol_key_index_workaround=1" "$N"
append bss_conf "ieee8021x=1" "$N"
-   append wpa_key_mgmt "WPA-EAP"
 
[ "$eapol_version" -ge "1" -a "$eapol_version" -le "2" 
] && append bss_conf "eapol_version=$eapol_version" "$N"
;;
@@ -376,11 +381,9 @@ hostapd_set_bss_options() {
for kh in $r1kh; do
append bss_conf "r1kh=${kh//,/ }" "$N"
done
-
-   [ "$wpa_key_mgmt" != "${wpa_key_mgmt/EAP/}" ] && append 
wpa_key_mgmt "FT-EAP"
-   [ "$wpa_key_mgmt" != "${wpa_key_mgmt/PSK/}" ] && append 
wpa_key_mgmt "FT-PSK"
fi
 
+   hostapd_append_wpa_key_mgmt
[ -n "$wpa_key_mgmt" ] && append bss_conf 
"wpa_key_mgmt=$wpa_key_mgmt" "$N"
fi
 
@@ -614,8 +617,7 @@ wpa_supplicant_add_network() {
psk)
local passphrase
 
-   append wpa_key_mgmt "WPA-PSK"
-   [ "$ieee80211r" -gt 0 ] && append wpa_key_mgmt "FT-PSK"
+   hostapd_append_wpa_key_mgmt
key_mgmt="$wpa_key_mgmt"
 
if [ ${#key} -eq 64 ]; then
@@ -626,8 +628,7 @@ wpa_supplicant_add_network() {
append network_data "$passphrase" "$N$T"
;;
eap)
-   append wpa_key_mgmt "WPA-EAP"
-   [ "$ieee80211r" -gt 0 ] && append wpa_key_mgmt "FT-EAP"
+   hostapd_append_wpa_key_mgmt
key_mgmt="$wpa_key_mgmt"
 
json_get_vars eap_type identity anonymous_identity 
ca_cert
-- 
2.10.2


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


Re: [LEDE-DEV] [RFC PATCH odhcpd] config: respect ignore uci option

2017-01-04 Thread Stijn Tintel
On 03-01-17 14:09, Jo-Philipp Wich wrote:
> The odhcpd documentation currently implies that "option ignore 1" in a section
> of type "dhcp" will disable any services on the referenced interface while the
> code actually ignores the setting when initializing referenced interfaces.
>
> This commonly leads to situations where users think that "option disabled"
> will prevent any server activity on a given interface while in reality odhcpd
> effectively acts as rogue DHCPv6 server in its default configuration.
>
> To fully inhibit any activity, one has to specify both "option ignore 1" as
> well as "option ra disabled", "option ndp disabled" and
> "option dhcpv6 disabled" which is highly counter intuitive at best.
>
> A previous commit (5f425ed Respect interface "ignore" settings as documented.)
> attempted to address the problem by observing the value of i->ignore instead
> of unconditionally enabling all protocols but broke the ability to use DHCPv6
> relay mode while having DHCPv4 disabled.
>
> This patch changes ...
>
>  - the enabling of services on an interface to use the value of the ignore
>option as default choice instead of hardcoding "true"
>
>  - the options "ra", "ndp", "dhcpv4" and "dhcpv6" to take precedence over the
>default "ignore" state to allow selectively enabling services on ignored
>interfaces
>
>  - the README to clarify the fact that "ra", "ndp", "dhcpv4" and "dhcpv6" can
>now override "option ignore"
>
> Signed-off-by: Jo-Philipp Wich 
Tested-by: Stijn Tintel 

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


Re: [LEDE-DEV] [OpenWrt-Devel] [PATCH oldpackage/eventlog oldpackage/syslog-ng3] version bump to latest

2017-01-06 Thread Stijn Tintel
On 06-01-17 20:38, Hauke Mehrtens wrote:
> Please do not send a mail with just an attachment, oldpackage is frozen
> since some years, please send add the package to the official openwrt
> package repository, add yourself as a maintainer and send a pull request
> on github.
There are PRs for this already, which I have merged just a few moments ago.

Stijn

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


Re: [LEDE-DEV] MikroTik RouterBoard ar71xx changes

2017-01-08 Thread Stijn Tintel
On 08-01-17 14:54, Felix Fietkau wrote:
> Hi all,
>
> I've just pushed the code for converting ar71xx routerboard support to
> UBI + sysupgrade to my staging tree at:
> https://git.lede-project.org/?p=lede/nbd/staging.git;a=summary
>
> So far I've only managed to test it on RB 912UAG-5HPnD, other devices
> are still untested. If you have any affected hardware, please test the
> new code with a fresh build from that tree (make sure you reset your
> config) and let me know if it works.
>
> Installation is now done only over sysupgrade (from the initramfs
> image), the old wget2nand script and rootfs tarballs are gone.
>
Tested sysupgrade on RB2011L-IN while booted from the initramfs image,
and then again after booting from flash.
Thanks!

Tested-by: Stijn Tintel 

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


Re: [LEDE-DEV] [PATCH] wpa_supplicant: Fix mesh encryption config

2017-01-10 Thread Stijn Tintel
On 10-01-17 11:22, Sujith wrote:
> wpa_supplicant allows only SAE as the key management
> type for mesh mode. The recent key_mgmt rework unconditionally
> added WPA-PSK - this breaks interface bringup and wpa_s
> throws this error message:
>
> Line 10: key_mgmt for mesh network should be open or SAE
> Line 10: failed to parse network block.
> Failed to read or parse configuration '/var/run/wpa_supplicant-wlan0.conf
Sorry about that.
>
> Fix this by making sure that only SAE is used for mesh.
>
> Signed-off-by: Sujith 
Please use your full name in SoB.

Thanks,
Stijn

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


[LEDE-DEV] 17.01 patches

2017-02-05 Thread Stijn Tintel
Hi all,

As we prefer cherry-picking commits from master into the lede-17.01
branch, please don't send changes that can be cherry-picked as a patch.
If you want a commit from master in lede-17.01, please send a mail
requesting to cherry-pick them, with the commit(s) you want in a list in
the same format as 'git log --oneline'.

I am going to reject patches in patchwork for changes that can be
cherry-picked, and cherry-pick them instead.

Thanks,
Stijn



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


Re: [LEDE-DEV] [PATCH] Kernel: bump LEDE 17.01 kernel to 4.4.47

2017-02-05 Thread Stijn Tintel
On 05-02-17 17:49, Stijn Segers wrote:
> Bumps kernel from .46 to .47. 
>
This has to be done in master first, then cherry-picked into lede-17.01.

Stijn

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


Re: [LEDE-DEV] impressed by progress on odhcpd and procd and elsewhere.

2017-02-11 Thread Stijn Tintel
On 10-02-17 18:11, Dave Taht wrote:
> About the biggest request from the field seems to be supplying RA and
> dhcpv6 dns on a more real IPv6 address than fe80 to make android users
> happier (https://github.com/dtaht/dnsmasq-lede/issues/11).
Is this only a problem for Android users? I ran into a bug a couple of
times where dnsmasq simply did not reply to queries sent to IPv6
link-local addresses. I had this problem on my ERLs, it went away at
some point, then it came back, and while testing now, it seems to work
fine again. So unfortunately I have no idea why it happened, but that is
the only reason I configured a non-ULA DNS server on these devices.

It wasn't really a problem on my Linux clients, but using Android with
IPv6 DNS servers that don't reply just isn't usable, even if the IPv4
DNS servers work just fine. Each connection attempt had a ~12 second
delay or so.

Stijn


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


[LEDE-DEV] Backport dropbear SHA256 HMAC to 17.01

2017-02-14 Thread Stijn Tintel
Hi,

I would like to cherry-pick the following commit to lede-17.01:
0bf85ef dropbear: enable SHA256 HMACs

Please ACK/NAK.

Thanks,
Stijn



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


[LEDE-DEV] [PATCH 1/2] brcm2708-gpu-fw: update to latest version

2017-03-02 Thread Stijn Tintel
Signed-off-by: Stijn Tintel 
---
 package/kernel/brcm2708-gpu-fw/Makefile | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/package/kernel/brcm2708-gpu-fw/Makefile 
b/package/kernel/brcm2708-gpu-fw/Makefile
index 2a5a043..7e80530 100644
--- a/package/kernel/brcm2708-gpu-fw/Makefile
+++ b/package/kernel/brcm2708-gpu-fw/Makefile
@@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=brcm2708-gpu-fw
-PKG_VERSION:=2017-02-05
-PKG_RELEASE:=eba0fa58add5aa548d18ae436d2f0be93cdfbbe3
+PKG_VERSION:=2017-03-02
+PKG_RELEASE:=f5446ba0b3bbd4241bf0ad35a2c9f299f5c447d5
 
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_RELEASE)
 
@@ -33,7 +33,7 @@ define Download/bootcode_bin
   FILE:=$(RPI_FIRMWARE_FILE)-bootcode.bin
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=bootcode.bin
-  HASH:=e68fafc606a1e8ee6ccd4cbc5d9c7ca3b322c37bf65389a2ea011eb59cc96bbd
+  HASH:=d990031baec20fe2cd5e24d9f3d6fc34891afdb128838d010d9a0249ae29ea6b
 endef
 $(eval $(call Download,bootcode_bin))
 
@@ -41,7 +41,7 @@ define Download/fixup_dat
   FILE:=$(RPI_FIRMWARE_FILE)-fixup.dat
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=fixup.dat
-  HASH:=4032c5de826ca3bc6294b2da713849486c290d83553895e1162cd2a7309861e8
+  HASH:=38b69384f62bc7b64f17dcedc03c5582af6b4f8dfc25fe5904d4eb3181a3387b
 endef
 $(eval $(call Download,fixup_dat))
 
@@ -49,7 +49,7 @@ define Download/fixup_cd_dat
   FILE:=$(RPI_FIRMWARE_FILE)-fixup_cd.dat
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=fixup_cd.dat
-  HASH:=b3b6983fd781cfc4b6fc0ba3d7f7242d7fef66fa6a27faf817572faf3165e02a
+  HASH:=05c682ffcc74cd1356f1b9a32a7034763bfea94e5cb54eaaa2e69affc1cd33d7
 endef
 $(eval $(call Download,fixup_cd_dat))
 
@@ -57,7 +57,7 @@ define Download/start_elf
   FILE:=$(RPI_FIRMWARE_FILE)-start.elf
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=start.elf
-  HASH:=18717d43450e75926c929058ace530f76520a9dcc603d5c5953d08138c73a2c0
+  HASH:=59b9d26b463a84f017fae186493bb54e642de6c7e0376b3cbe3375df6132edc0
 endef
 $(eval $(call Download,start_elf))
 
@@ -65,7 +65,7 @@ define Download/start_cd_elf
   FILE:=$(RPI_FIRMWARE_FILE)-start_cd.elf
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=start_cd.elf
-  HASH:=d4d09b015b0376b37b22c108c01095a1c35ff1943e227a3f428edc57ed26670f
+  HASH:=fb9aea03eb6790062c100166444bf7d2b8a6cea605bd041f905fcacefacbbae2
 endef
 $(eval $(call Download,start_cd_elf))
 
-- 
2.10.2


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


[LEDE-DEV] [PATCH 2/2] brcm2708: add Raspberry Zero W support

2017-03-02 Thread Stijn Tintel
Signed-off-by: Stijn Tintel 
---
 .../brcm2708/base-files/etc/board.d/02_network |   3 +
 target/linux/brcm2708/base-files/etc/diag.sh   |   3 +-
 target/linux/brcm2708/base-files/lib/brcm2708.sh   |   3 +
 target/linux/brcm2708/image/Makefile   |   7 +-
 .../0152-BCM270X_DT-Add-bcm2708-rpi-0-w.dts.patch  | 233 +
 5 files changed, 247 insertions(+), 2 deletions(-)
 create mode 100644 
target/linux/brcm2708/patches-4.9/0152-BCM270X_DT-Add-bcm2708-rpi-0-w.dts.patch

diff --git a/target/linux/brcm2708/base-files/etc/board.d/02_network 
b/target/linux/brcm2708/base-files/etc/board.d/02_network
index 7642c06..0679c24 100755
--- a/target/linux/brcm2708/base-files/etc/board.d/02_network
+++ b/target/linux/brcm2708/base-files/etc/board.d/02_network
@@ -11,6 +11,9 @@ board_config_update
 board=$(brcm2708_board_name)
 
 case "$board" in
+rpi-0-w)
+   ucidef_set_interface_lan "wlan0"
+   ;;
 rpi-b |\
 rpi-b-plus |\
 rpi-2-b |\
diff --git a/target/linux/brcm2708/base-files/etc/diag.sh 
b/target/linux/brcm2708/base-files/etc/diag.sh
index 2a866e4..dfcda54 100644
--- a/target/linux/brcm2708/base-files/etc/diag.sh
+++ b/target/linux/brcm2708/base-files/etc/diag.sh
@@ -8,7 +8,8 @@ set_state() {
case "$(brcm2708_board_name)" in
rpi-b |\
rpi-cm |\
-   rpi-zero)
+   rpi-zero |\
+   rpi-0-w)
status_led="led0"
;;
rpi-b-plus |\
diff --git a/target/linux/brcm2708/base-files/lib/brcm2708.sh 
b/target/linux/brcm2708/base-files/lib/brcm2708.sh
index ab7a23d..156d706 100644
--- a/target/linux/brcm2708/base-files/lib/brcm2708.sh
+++ b/target/linux/brcm2708/base-files/lib/brcm2708.sh
@@ -21,6 +21,9 @@ brcm2708_detect() {
"Raspberry Pi Zero Rev"*)
board_name="rpi-zero"
;;
+   "Raspberry Pi Zero W Rev"*)
+   board_name="rpi-0-w"
+   ;;
"Raspberry Pi 2 Model B Rev"*)
board_name="rpi-2-b"
;;
diff --git a/target/linux/brcm2708/image/Makefile 
b/target/linux/brcm2708/image/Makefile
index 0b3f6a7..357bb5e 100644
--- a/target/linux/brcm2708/image/Makefile
+++ b/target/linux/brcm2708/image/Makefile
@@ -58,8 +58,13 @@ define Device/rpi
   DEVICE_TITLE := Raspberry Pi B/B+/CM/Zero
   DEVICE_DTS := bcm2708-rpi-b bcm2708-rpi-b-plus bcm2708-rpi-cm
 endef
+define Device/rpi-0-w
+  DEVICE_TITLE := Raspberry Pi Zero W
+  DEVICE_DTS := bcm2708-rpi-0-w
+  DEVICE_PACKAGES := brcmfmac-firmware-43430-sdio kmod-brcmfmac wpad-mini
+endef
 ifeq ($(SUBTARGET),bcm2708)
-  TARGET_DEVICES += rpi
+  TARGET_DEVICES += rpi rpi-0-w
 endif
 
 define Device/rpi-2
diff --git 
a/target/linux/brcm2708/patches-4.9/0152-BCM270X_DT-Add-bcm2708-rpi-0-w.dts.patch
 
b/target/linux/brcm2708/patches-4.9/0152-BCM270X_DT-Add-bcm2708-rpi-0-w.dts.patch
new file mode 100644
index 000..e1b8af5
--- /dev/null
+++ 
b/target/linux/brcm2708/patches-4.9/0152-BCM270X_DT-Add-bcm2708-rpi-0-w.dts.patch
@@ -0,0 +1,233 @@
+From 935c7ce84c982a26f567a03a58a1537424569938 Mon Sep 17 00:00:00 2001
+From: Phil Elwell 
+Date: Tue, 24 May 2016 16:30:05 +0100
+Subject: [PATCH] BCM270X_DT: Add bcm2708-rpi-0-w.dts
+
+Add DT support for the Pi Zero W. N.B. It will not be loaded
+automatically without a corresponding change to the firmware.
+
+Signed-off-by: Phil Elwell 
+---
+ arch/arm/boot/dts/Makefile|   1 +
+ arch/arm/boot/dts/bcm2708-rpi-0-w.dts | 197 ++
+ 2 files changed, 198 insertions(+)
+ create mode 100644 arch/arm/boot/dts/bcm2708-rpi-0-w.dts
+
+diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
+index c697c48..46228af 100644
+--- a/arch/arm/boot/dts/Makefile
 b/arch/arm/boot/dts/Makefile
+@@ -4,6 +4,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
+   bcm2708-rpi-b.dtb \
+   bcm2708-rpi-b-plus.dtb \
+   bcm2708-rpi-cm.dtb \
++  bcm2708-rpi-0-w.dtb \
+   bcm2709-rpi-2-b.dtb \
+   bcm2710-rpi-3-b.dtb \
+   bcm2710-rpi-cm3.dtb
+diff --git a/arch/arm/boot/dts/bcm2708-rpi-0-w.dts 
b/arch/arm/boot/dts/bcm2708-rpi-0-w.dts
+new file mode 100644
+index 000..db0f99d
+--- /dev/null
 b/arch/arm/boot/dts/bcm2708-rpi-0-w.dts
+@@ -0,0 +1,197 @@
++/dts-v1/;
++
++#include "bcm2708.dtsi"
++
++/ {
++  model = "Raspberry Pi Zero W";
++};
++
++&gpio {
++  sdhost_pins: sdhost_pins {
++  brcm,pins = <48 49 50 51 52 53>;
++  brcm,function = <4>; /* alt0 */
++  };
++
++  spi0_pins: spi0_pins {
++  brcm,pins = <9 10 11>;
++  brcm,function = <4>; /* alt0 */
++  };
++
++  spi0_cs_pins: spi0_cs_pins {
++  brcm,pins = <8 7>;
++  brcm,function = <1>; /* output */
++  };
++
++  i2c0_pins: i2c0 {
++  brcm,pins = <0 1>;
++   

[LEDE-DEV] [PATCH 2/2] brcm2708: detect Raspberry Pi Zero W

2017-03-05 Thread Stijn Tintel
Signed-off-by: Stijn Tintel 
---
 target/linux/brcm2708/base-files/etc/board.d/02_network | 3 +++
 target/linux/brcm2708/base-files/etc/diag.sh| 3 ++-
 target/linux/brcm2708/base-files/lib/brcm2708.sh| 3 +++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/target/linux/brcm2708/base-files/etc/board.d/02_network 
b/target/linux/brcm2708/base-files/etc/board.d/02_network
index e554b73..1093c9d 100755
--- a/target/linux/brcm2708/base-files/etc/board.d/02_network
+++ b/target/linux/brcm2708/base-files/etc/board.d/02_network
@@ -17,6 +17,9 @@ rpi-b |\
 rpi-b-plus)
ucidef_set_interface_lan "eth0"
;;
+rpi-zero-w)
+   ucidef_set_interface_lan "wlan0"
+   ;;
 esac
 
 board_config_flush
diff --git a/target/linux/brcm2708/base-files/etc/diag.sh 
b/target/linux/brcm2708/base-files/etc/diag.sh
index 0f34a53..9ebdd16 100644
--- a/target/linux/brcm2708/base-files/etc/diag.sh
+++ b/target/linux/brcm2708/base-files/etc/diag.sh
@@ -12,7 +12,8 @@ set_state() {
;;
rpi-b |\
rpi-cm |\
-   rpi-zero)
+   rpi-zero |\
+   rpi-zero-w)
status_led="led0"
;;
esac
diff --git a/target/linux/brcm2708/base-files/lib/brcm2708.sh 
b/target/linux/brcm2708/base-files/lib/brcm2708.sh
index 3e7c30f..54d30f8 100644
--- a/target/linux/brcm2708/base-files/lib/brcm2708.sh
+++ b/target/linux/brcm2708/base-files/lib/brcm2708.sh
@@ -27,6 +27,9 @@ brcm2708_detect() {
"Raspberry Pi Zero Rev"*)
board_name="rpi-zero"
;;
+   "Raspberry Pi Zero W Rev"*)
+   board_name="rpi-zero-w"
+   ;;
*)
board_name="unknown"
;;
-- 
2.10.2


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


[LEDE-DEV] [PATCH 1/2] brcm2708: order boards and models alphabetically

2017-03-05 Thread Stijn Tintel
Signed-off-by: Stijn Tintel 
---
 .../linux/brcm2708/base-files/etc/board.d/02_network |  6 +++---
 target/linux/brcm2708/base-files/etc/diag.sh |  8 
 target/linux/brcm2708/base-files/lib/brcm2708.sh | 20 ++--
 .../lib/preinit/05_set_preinit_iface_brcm2708|  6 +++---
 4 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/target/linux/brcm2708/base-files/etc/board.d/02_network 
b/target/linux/brcm2708/base-files/etc/board.d/02_network
index 7642c06..e554b73 100755
--- a/target/linux/brcm2708/base-files/etc/board.d/02_network
+++ b/target/linux/brcm2708/base-files/etc/board.d/02_network
@@ -11,10 +11,10 @@ board_config_update
 board=$(brcm2708_board_name)
 
 case "$board" in
-rpi-b |\
-rpi-b-plus |\
 rpi-2-b |\
-rpi-3-b)
+rpi-3-b |\
+rpi-b |\
+rpi-b-plus)
ucidef_set_interface_lan "eth0"
;;
 esac
diff --git a/target/linux/brcm2708/base-files/etc/diag.sh 
b/target/linux/brcm2708/base-files/etc/diag.sh
index ecc6242..0f34a53 100644
--- a/target/linux/brcm2708/base-files/etc/diag.sh
+++ b/target/linux/brcm2708/base-files/etc/diag.sh
@@ -6,15 +6,15 @@
 
 set_state() {
case "$(brcm2708_board_name)" in
+   rpi-2-b |\
+   rpi-b-plus)
+   status_led="led1"
+   ;;
rpi-b |\
rpi-cm |\
rpi-zero)
status_led="led0"
;;
-   rpi-b-plus |\
-   rpi-2-b)
-   status_led="led1"
-   ;;
esac
 
case "$1" in
diff --git a/target/linux/brcm2708/base-files/lib/brcm2708.sh 
b/target/linux/brcm2708/base-files/lib/brcm2708.sh
index ab7a23d..3e7c30f 100644
--- a/target/linux/brcm2708/base-files/lib/brcm2708.sh
+++ b/target/linux/brcm2708/base-files/lib/brcm2708.sh
@@ -8,25 +8,25 @@ brcm2708_detect() {
 
model=$(cat /proc/device-tree/model)
case "$model" in
-   "Raspberry Pi Model B Rev"*)
-   board_name="rpi-b"
+   "Raspberry Pi 2 Model B Rev"*)
+   board_name="rpi-2-b"
+   ;;
+   "Raspberry Pi 3 Model B Rev"*)
+   board_name="rpi-3-b"
+   ;;
+   "Raspberry Pi Compute Module Rev"*)
+   board_name="rpi-cm"
;;
"Raspberry Pi Model B Plus Rev"* |\
"Raspberry Pi Model B+ Rev"*)
board_name="rpi-b-plus"
;;
-   "Raspberry Pi Compute Module Rev"*)
-   board_name="rpi-cm"
+   "Raspberry Pi Model B Rev"*)
+   board_name="rpi-b"
;;
"Raspberry Pi Zero Rev"*)
board_name="rpi-zero"
;;
-   "Raspberry Pi 2 Model B Rev"*)
-   board_name="rpi-2-b"
-   ;;
-   "Raspberry Pi 3 Model B Rev"*)
-   board_name="rpi-3-b"
-   ;;
*)
board_name="unknown"
;;
diff --git 
a/target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708 
b/target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708
index 578172e..c5756be 100644
--- a/target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708
+++ b/target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708
@@ -5,10 +5,10 @@
 
 set_preinit_iface() {
case "$(brcm2708_board_name)" in
-   rpi-b |\
-   rpi-b-plus |\
rpi-2-b |\
-   rpi-3-b)
+   rpi-3-b |\
+   rpi-b |\
+   rpi-b-plus)
ifname=eth0
;;
esac
-- 
2.10.2


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


Re: [LEDE-DEV] [PATCH RFC 2/2] x86: lift generic x86-32 target

2016-05-18 Thread Stijn Tintel
On 17-05-16 23:37, Felix Fietkau wrote:
> On 2016-05-17 23:12, Daniel Golle wrote:
>> * build for pentium4 instead of i486
>> * enable PAE
>> * enable EFI support
>> * enable KVM guest and host support
Is anyone running KVM on a 32bit host? I would leave out KVM host
support here.
> I like this change, but I think I'll wait a bit before applying it to
> see if anybody else has some comments about it.
>
I too think x86 and subtargets need some love, but let's not rush
things. Maybe now is a good time to discus other things related to x86
as well.

E.g., a while ago I created a profile for x86/64 for the PCEngines APU2,
but never submitted it, so I put it at [1] now. Last year, on
OpenWrt-Devel, Felix suggested [2] instead. I would like to hear others'
opinions about this too.

And if any else has other ideas... Looking forward to hear them.

Stijn

[1]
https://git.lede-project.org/?p=lede/stintel/staging.git;a=shortlog;h=refs/heads/apu2
[2]
https://lists.openwrt.org/pipermail/openwrt-devel/2015-November/037035.html



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


Re: [LEDE-DEV] [RFC v3 1/2] x86: enable DMI and DMI_SYSFS

2016-06-02 Thread Stijn Tintel
On 01-06-16 17:14, Jo-Philipp Wich wrote:
> Enable support for DMI decoding in the kernel so that we can access
> manufacturer and model information via sysfs.
>
> Signed-off-by: Jo-Philipp Wich 
> ---
>  target/linux/x86/config-4.4 | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/target/linux/x86/config-4.4 b/target/linux/x86/config-4.4
> index 5b54031..bb6ef65 100644
> --- a/target/linux/x86/config-4.4
> +++ b/target/linux/x86/config-4.4
> @@ -98,7 +98,8 @@ CONFIG_DECOMPRESS_BZIP2=y
>  CONFIG_DECOMPRESS_GZIP=y
>  CONFIG_DEFAULT_IO_DELAY_TYPE=0
>  # CONFIG_DELL_RBU is not set
> -# CONFIG_DMI is not set
> +CONFIG_DMI=y
> +CONFIG_DMI_SYSFS=y
>  CONFIG_DNOTIFY=y
>  CONFIG_DUMMY_CONSOLE=y
>  CONFIG_EARLY_PRINTK=y
This change causes missing symbols for x86/64, possibly other subtargets:
DMIID
LEDS_CLEVO_MAIL

And I think we should enable this for all x86 subtargets.

Stijn

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


Re: [LEDE-DEV] [PATCH v2] ct-bugcheck: Add tools to poll for and report certain bugs.

2016-08-12 Thread Stijn Tintel
Hi Ben,

On 12-08-16 16:19, Ben Greear wrote:
>
>
> On 08/11/2016 11:36 PM, John Crispin wrote:
>> Hi,
>>
>> the V2 does not address the changes i request in V1. these were
>>
>> * explain why we need this and what it does. right now we only know it
>> "reports certain bugs" which is really very vague
>
> We need this because ath10k firmware will sometimes crash, and if
> users have
> a good way to generate reports, maybe they will and I can fix them so
> that
> ath10k firmware will crash less.  I thought this part was pretty self
> evident.
I agree that this can be useful.
>
> If you read the commit description, and the Makefile description, v2
> specifies
> that it checks for ath10k firmware crashes.
>
> So, I am not really sure how you want the patch modified to meet your
> requests.
Please describe it like this in the commit message. The current one
(what I didn't cut below) isn't that clear.
>
>>> From: Ben Greear 
>>>
>>> This first release is all about checking for ath10k firmware
>>> crashes.  Could be extended later for other modules/bugs/etc.
Thanks,
Stijn


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


[LEDE-DEV] [PATCH 2/4] omap: rename patches directory to patches-4.4

2016-08-14 Thread Stijn Tintel
Signed-off-by: Stijn Tintel 
---
 .../linux/omap/patches-4.4/001-omap4_pandaboard-wlan_fix.patch |  9 +
 target/linux/omap/patches/001-omap4_pandaboard-wlan_fix.patch  | 10 --
 2 files changed, 9 insertions(+), 10 deletions(-)
 create mode 100644 
target/linux/omap/patches-4.4/001-omap4_pandaboard-wlan_fix.patch
 delete mode 100644 
target/linux/omap/patches/001-omap4_pandaboard-wlan_fix.patch

diff --git a/target/linux/omap/patches-4.4/001-omap4_pandaboard-wlan_fix.patch 
b/target/linux/omap/patches-4.4/001-omap4_pandaboard-wlan_fix.patch
new file mode 100644
index 000..cc8b7f4
--- /dev/null
+++ b/target/linux/omap/patches-4.4/001-omap4_pandaboard-wlan_fix.patch
@@ -0,0 +1,9 @@
+--- a/arch/arm/mach-omap2/twl-common.c
 b/arch/arm/mach-omap2/twl-common.c
+@@ -368,6 +368,7 @@ static struct regulator_init_data omap4_
+ static struct regulator_init_data omap4_clk32kg_idata = {
+   .constraints = {
+   .valid_ops_mask = REGULATOR_CHANGE_STATUS,
++  .always_on  = true,
+   },
+ };
diff --git a/target/linux/omap/patches/001-omap4_pandaboard-wlan_fix.patch 
b/target/linux/omap/patches/001-omap4_pandaboard-wlan_fix.patch
deleted file mode 100644
index 5a6f76f..000
--- a/target/linux/omap/patches/001-omap4_pandaboard-wlan_fix.patch
+++ /dev/null
@@ -1,10 +0,0 @@
 a/arch/arm/mach-omap2/twl-common.c
-+++ b/arch/arm/mach-omap2/twl-common.c
-@@ -368,6 +368,7 @@ static struct regulator_init_data omap4_
- static struct regulator_init_data omap4_clk32kg_idata = {
-   .constraints = {
-   .valid_ops_mask = REGULATOR_CHANGE_STATUS,
-+  .always_on  = true,
-   },
- };
- 
-- 
2.7.3


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


[LEDE-DEV] [PATCH 1/4] au1000: rename patches directory to patches-3.18

2016-08-14 Thread Stijn Tintel
Signed-off-by: Stijn Tintel 
---
 .../au1000/patches-3.18/002-openwrt_rootfs.patch   | 11 +
 .../au1000/patches-3.18/003-au1000_eth_ioctl.patch | 16 +
 .../patches-3.18/004-watchdog_low_init.patch   | 12 ++
 target/linux/au1000/patches-3.18/006-codec.patch   | 26 ++
 .../linux/au1000/patches/002-openwrt_rootfs.patch  | 11 -
 .../au1000/patches/003-au1000_eth_ioctl.patch  | 17 --
 .../au1000/patches/004-watchdog_low_init.patch | 12 --
 target/linux/au1000/patches/006-codec.patch| 26 --
 8 files changed, 65 insertions(+), 66 deletions(-)
 create mode 100644 target/linux/au1000/patches-3.18/002-openwrt_rootfs.patch
 create mode 100644 target/linux/au1000/patches-3.18/003-au1000_eth_ioctl.patch
 create mode 100644 target/linux/au1000/patches-3.18/004-watchdog_low_init.patch
 create mode 100644 target/linux/au1000/patches-3.18/006-codec.patch
 delete mode 100644 target/linux/au1000/patches/002-openwrt_rootfs.patch
 delete mode 100644 target/linux/au1000/patches/003-au1000_eth_ioctl.patch
 delete mode 100644 target/linux/au1000/patches/004-watchdog_low_init.patch
 delete mode 100644 target/linux/au1000/patches/006-codec.patch

diff --git a/target/linux/au1000/patches-3.18/002-openwrt_rootfs.patch 
b/target/linux/au1000/patches-3.18/002-openwrt_rootfs.patch
new file mode 100644
index 000..3fd2d84
--- /dev/null
+++ b/target/linux/au1000/patches-3.18/002-openwrt_rootfs.patch
@@ -0,0 +1,11 @@
+--- a/arch/mips/alchemy/board-mtx1.c
 b/arch/mips/alchemy/board-mtx1.c
+@@ -169,7 +169,7 @@ static struct platform_device mtx1_gpio_
+
+ static struct mtd_partition mtx1_mtd_partitions[] = {
+   {
+-  .name   = "filesystem",
++  .name   = "rootfs",
+   .size   = 0x01C0,
+   .offset = 0,
+   },
diff --git a/target/linux/au1000/patches-3.18/003-au1000_eth_ioctl.patch 
b/target/linux/au1000/patches-3.18/003-au1000_eth_ioctl.patch
new file mode 100644
index 000..590d8c2
--- /dev/null
+++ b/target/linux/au1000/patches-3.18/003-au1000_eth_ioctl.patch
@@ -0,0 +1,16 @@
+--- a/drivers/net/ethernet/amd/au1000_eth.c
 b/drivers/net/ethernet/amd/au1000_eth.c
+@@ -1113,10 +1113,14 @@ static void au1000_multicast_list(struct
+   writel(reg, &aup->mac->control);
+ }
+
++#define AU1000_KNOWN_PHY_IOCTLS(SIOCGMIIPHY & 0xfff0)
+ static int au1000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
+ {
+   struct au1000_private *aup = netdev_priv(dev);
+
++  if((cmd & AU1000_KNOWN_PHY_IOCTLS) != AU1000_KNOWN_PHY_IOCTLS)
++  return -EINVAL;
++
+   if (!netif_running(dev))
+   return -EINVAL;
diff --git a/target/linux/au1000/patches-3.18/004-watchdog_low_init.patch 
b/target/linux/au1000/patches-3.18/004-watchdog_low_init.patch
new file mode 100644
index 000..b1d2af5
--- /dev/null
+++ b/target/linux/au1000/patches-3.18/004-watchdog_low_init.patch
@@ -0,0 +1,12 @@
+--- a/arch/mips/alchemy/board-mtx1.c
 b/arch/mips/alchemy/board-mtx1.c
+@@ -98,6 +98,9 @@ void __init board_setup(void)
+   alchemy_gpio_direction_output(211, 1);  /* green on */
+   alchemy_gpio_direction_output(212, 0);  /* red off */
+
++  /* Set watchdog pin low */
++  alchemy_gpio_direction_output(215, 0);
++
+   pm_power_off = mtx1_power_off;
+   _machine_halt = mtx1_power_off;
+   _machine_restart = mtx1_reset;
diff --git a/target/linux/au1000/patches-3.18/006-codec.patch 
b/target/linux/au1000/patches-3.18/006-codec.patch
new file mode 100644
index 000..45537c6
--- /dev/null
+++ b/target/linux/au1000/patches-3.18/006-codec.patch
@@ -0,0 +1,26 @@
+--- a/arch/mips/alchemy/devboards/db1300.c
 b/arch/mips/alchemy/devboards/db1300.c
+@@ -712,6 +712,7 @@ static struct platform_device db1300_lcd
+
+ /**/
+
++#ifdef CONFIG_TOUCHSCREEN_WM97XX
+ static void db1300_wm97xx_irqen(struct wm97xx *wm, int enable)
+ {
+   if (enable)
+@@ -744,6 +745,15 @@ static int db1300_wm97xx_probe(struct pl
+   return wm97xx_register_mach_ops(wm, &db1300_wm97xx_ops);
+ }
+
++#else
++
++static int db1300_wm97xx_probe(struct platform_device *pdev)
++{
++  return -1;
++}
++
++#endif
++
+ static struct platform_driver db1300_wm97xx_driver = {
+   .driver.name= "wm97xx-touch",
+   .driver.owner   = THIS_MODULE,
diff --git a/target/linux/au1000/patches/002-openwrt_rootfs.patch 
b/target/linux/au1000/patches/002-openwrt_rootfs.patch
deleted file mode 100644
index 1de8236..000
--- a/target/linux/au1000/patches/002-openwrt_rootfs.patch
+++ /dev/null
@@ -1,11 +0,0 @@
 a/arch/mips/alchemy/board-mtx1.c
-+++ b/arch/mips/alchemy/board-mtx1.c
-@@ -169,7 +169,7 @@ static struct platform_device mtx1_gpio_
- 
- static struct mtd_partition mtx1_mtd_partitions[] = {
-   {
--   

[LEDE-DEV] [PATCH 4/4] rb532: rename patches directory to patches-4.1

2016-08-14 Thread Stijn Tintel
Signed-off-by: Stijn Tintel 
---
 .../linux/rb532/patches-4.1/001-cmdline_hack.patch | 20 +
 .../rb532/patches-4.1/002-rb532_nand_fixup.patch   | 45 +
 ...tion_info-rename-rootfs-to-rootfs_onboard.patch | 11 +
 target/linux/rb532/patches/001-cmdline_hack.patch  | 20 -
 .../linux/rb532/patches/002-rb532_nand_fixup.patch | 47 --
 ...tion_info-rename-rootfs-to-rootfs_onboard.patch | 11 -
 6 files changed, 76 insertions(+), 78 deletions(-)
 create mode 100644 target/linux/rb532/patches-4.1/001-cmdline_hack.patch
 create mode 100644 target/linux/rb532/patches-4.1/002-rb532_nand_fixup.patch
 create mode 100644 
target/linux/rb532/patches-4.1/004-rb532_partition_info-rename-rootfs-to-rootfs_onboard.patch
 delete mode 100644 target/linux/rb532/patches/001-cmdline_hack.patch
 delete mode 100644 target/linux/rb532/patches/002-rb532_nand_fixup.patch
 delete mode 100644 
target/linux/rb532/patches/004-rb532_partition_info-rename-rootfs-to-rootfs_onboard.patch

diff --git a/target/linux/rb532/patches-4.1/001-cmdline_hack.patch 
b/target/linux/rb532/patches-4.1/001-cmdline_hack.patch
new file mode 100644
index 000..2429b1b
--- /dev/null
+++ b/target/linux/rb532/patches-4.1/001-cmdline_hack.patch
@@ -0,0 +1,20 @@
+--- a/arch/mips/rb532/prom.c
 b/arch/mips/rb532/prom.c
+@@ -67,6 +67,7 @@ static inline unsigned long tag2ul(char
+   return simple_strtoul(num, 0, 10);
+ }
+
++extern char __image_cmdline[];
+ void __init prom_setup_cmdline(void)
+ {
+   static char cmd_line[COMMAND_LINE_SIZE] __initdata;
+@@ -108,6 +109,9 @@ void __init prom_setup_cmdline(void)
+   }
+   *(cp++) = ' ';
+
++  strcpy(cp,(__image_cmdline));
++  cp += strlen(__image_cmdline);
++
+   i = strlen(arcs_cmdline);
+   if (i > 0) {
+   *(cp++) = ' ';
diff --git a/target/linux/rb532/patches-4.1/002-rb532_nand_fixup.patch 
b/target/linux/rb532/patches-4.1/002-rb532_nand_fixup.patch
new file mode 100644
index 000..5b1dd51
--- /dev/null
+++ b/target/linux/rb532/patches-4.1/002-rb532_nand_fixup.patch
@@ -0,0 +1,45 @@
+--- a/arch/mips/rb532/devices.c
 b/arch/mips/rb532/devices.c
+@@ -140,6 +140,19 @@ static struct platform_device cf_slot0 =
+ };
+
+ /* Resources and device for NAND */
++
++/*
++ * We need to use the OLD Yaffs-1 OOB layout, otherwise the RB bootloader
++ * will not be able to find the kernel that we load.  So set the oobinfo
++ * when creating the partitions
++ */
++static struct nand_ecclayout rb532_nand_ecclayout = {
++  .eccbytes   = 6,
++  .eccpos = { 8, 9, 10, 13, 14, 15 },
++  .oobavail   = 9,
++  .oobfree= { { 0, 4 }, { 6, 2 }, { 11, 2 }, { 4, 1 } }
++};
++
+ static int rb532_dev_ready(struct mtd_info *mtd)
+ {
+   return gpio_get_value(GPIO_RDY);
+@@ -254,6 +267,16 @@ static struct platform_device *rb532_dev
+ /* NAND definitions */
+ #define NAND_CHIP_DELAY 25
+
++static int rb532_nand_fixup(struct mtd_info *mtd)
++{
++  struct nand_chip *chip = mtd->priv;
++
++  if (mtd->writesize == 512)
++  chip->ecc.layout = &rb532_nand_ecclayout;
++
++  return 0;
++}
++
+ static void __init rb532_nand_setup(void)
+ {
+   switch (mips_machtype) {
+@@ -272,6 +295,7 @@ static void __init rb532_nand_setup(void
+   rb532_nand_data.chip.nr_partitions = ARRAY_SIZE(rb532_partition_info);
+   rb532_nand_data.chip.partitions = rb532_partition_info;
+   rb532_nand_data.chip.chip_delay = NAND_CHIP_DELAY;
++  rb532_nand_data.chip.chip_fixup = &rb532_nand_fixup;
+ }
diff --git 
a/target/linux/rb532/patches-4.1/004-rb532_partition_info-rename-rootfs-to-rootfs_onboard.patch
 
b/target/linux/rb532/patches-4.1/004-rb532_partition_info-rename-rootfs-to-rootfs_onboard.patch
new file mode 100644
index 000..2ef9e51
--- /dev/null
+++ 
b/target/linux/rb532/patches-4.1/004-rb532_partition_info-rename-rootfs-to-rootfs_onboard.patch
@@ -0,0 +1,11 @@
+--- a/arch/mips/rb532/devices.c
 b/arch/mips/rb532/devices.c
+@@ -202,7 +202,7 @@ static struct mtd_partition rb532_partit
+   .offset = 0,
+   .size = 4 * 1024 * 1024,
+   }, {
+-  .name = "rootfs",
++  .name = "rootfs_onboard",
+   .offset = MTDPART_OFS_NXTBLK,
+   .size = MTDPART_SIZ_FULL,
+   }
diff --git a/target/linux/rb532/patches/001-cmdline_hack.patch 
b/target/linux/rb532/patches/001-cmdline_hack.patch
deleted file mode 100644
index a39da9c..000
--- a/target/linux/rb532/patches/001-cmdline_hack.patch
+++ /dev/null
@@ -1,20 +0,0 @@
 a/arch/mips/rb532/prom.c
-+++ b/arch/mips/rb532/prom.c
-@@ -67,6 +67,7 @@ static inline unsigned long tag2ul(char
-   return simple_strtoul(num, 0, 10);
- }
- 
-+extern char __image_cmdline[];
- void __init prom_setup_cmdline(void)
- {
-   static char cmd_line[COMMAND_LINE_SIZE] __initdata;
-@@ -108,6 +109,9 @@

  1   2   >