[OpenWrt-Devel] [PATCH] ramips: fix device-trees for AsiaRF awm002/3 evb
Revert some brain damage. The rx and tx LEDs on the eval board are not connected to the CPU, but to the FTDI chip instead. Therefore, they are not and cannot be under GPIO control. The LINK_0, LINK_1 LEDs are configured to be driven by the switch, and are not under GPIO control either, though they could be pinmux'd that way if needed. The WLAN LED is driven by the radio phy. Removes the completely fictitious ld1 and ld2 from AWM002.dtsi. Renames the remaining LED to a more generic "asiarf", rather than the module name, because it is on the eval board and not on either of the AWM002 or AWM003. Renamed the "reset_wps" button to just "reset", since it does not in practice function as a WPS button. This patch adds support for a "mode" event associated with the slider switch on the eval board, through the gpio-button-hotplug infrastructure. It also enables GPIO control of the second GPIO controller, in rt5350.dtsi, but does not use it. Signed-off-by: Russell Senior --- .../gpio-button-hotplug/src/gpio-button-hotplug.c | 1 + target/linux/ramips/base-files/etc/board.d/01_leds | 4 +++- target/linux/ramips/dts/AWM002-EVB-4M.dts | 18 +- target/linux/ramips/dts/AWM002-EVB-8M.dts | 18 +- target/linux/ramips/dts/AWM002.dtsi| 12 target/linux/ramips/dts/AWM003-EVB.dts | 18 +- target/linux/ramips/dts/rt5350.dtsi| 2 -- 7 files changed, 19 insertions(+), 54 deletions(-) diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c index c997e35..891dd96 100644 --- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c +++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c @@ -97,6 +97,7 @@ static struct bh_map button_map[] = { BH_MAP(KEY_RFKILL, "rfkill"), BH_MAP(KEY_WPS_BUTTON, "wps"), BH_MAP(KEY_WIMAX, "wwan"), + BH_MAP(BTN_MODE,"mode"), }; /* -*/ 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 01e2363..906769e 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -38,7 +38,9 @@ case $board in ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "all0256n:green:rssihigh" "wlan0" "70" "100" "-69" "8" set_wifi_led "rt2800pci-phy0::radio" ;; - awapn2403) + awapn2403|\ + awm002-evb|\ + awm003-evb) set_wifi_led "rt2800soc-phy0::radio" ;; ar725w) diff --git a/target/linux/ramips/dts/AWM002-EVB-4M.dts b/target/linux/ramips/dts/AWM002-EVB-4M.dts index 0738f04..77621dc 100644 --- a/target/linux/ramips/dts/AWM002-EVB-4M.dts +++ b/target/linux/ramips/dts/AWM002-EVB-4M.dts @@ -15,17 +15,9 @@ gpio-leds { compatible = "gpio-leds"; - tx { - label = "awm002-evb:green:tx"; - gpios = <&gpio0 15 1>; - }; - rx { - label = "awm002-evb:green:rx"; - gpios = <&gpio0 16 1>; - }; wps { - label = "awm002-evb:green:wps"; - gpios = <&gpio0 21 1>; + label = "asiarf-evb:green:wps"; + gpios = <&gpio0 21 0>; }; }; @@ -34,15 +26,15 @@ #address-cells = <1>; #size-cells = <0>; poll-interval = <20>; - reset_wps { - label = "reset_wps"; + reset { + label = "reset"; gpios = <&gpio0 0 1>; linux,code = <0x198>; }; mode { label = "mode"; gpios = <&gpio0 20 1>; - linux,code = <0x32>; + linux,code = <0x13c>; }; }; }; diff --git a/target/linux/ramips/dts/AWM002-EVB-8M.dts b/target/linux/ramips/dts/AWM002-EVB-8M.dts index ebc4085..a5a5e84 100644 --- a/target/linux/ramips/dts/AWM002-EVB-8M.dts +++ b/target/linux/ramips/dts/AWM002-EVB-8M.dts @@ -15,17 +15,9 @@ gpio-leds { compatible = "gpio-leds"; - tx { - label = "awm002-evb:green:tx"; - gpios = <&gpio0 15 1>; - }; - rx { - label = "awm002-evb:green:rx"; - gpios = <&gpio0 16 1>; - }; wps { - label = "awm002-evb:green:wps"; - gpios = <&gpio0 21 1>; +
Re: [OpenWrt-Devel] [PATCH] ramips: fix device-trees for AsiaRF awm002/3 evb
On 17/09/2014 09:24, Russell Senior wrote: > It also enables GPIO control of the second GPIO controller, in > rt5350.dtsi, but does not use it. that is why it is not enabled by default :) please resend without the change to rt5350.dtsi John ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCHv2] ramips: fix device-trees for AsiaRF awm002/3 evb
Revert some brain damage. The rx and tx LEDs on the eval board are not connected to the CPU, but to the FTDI chip instead. Therefore, they are not and cannot be under GPIO control. The LINK_0, LINK_1 LEDs are configured to be driven by the switch, and are not under GPIO control either, though they could be pinmux'd that way if needed. The WLAN LED is driven by the radio phy. Removes the completely fictitious ld1 and ld2 from AWM002.dtsi. Renames the remaining LED to a more generic "asiarf", rather than the module name, because it is on the eval board and not on either of the AWM002 or AWM003. Renamed the "reset_wps" button to just "reset", since it does not in practice function as a WPS button. This patch adds support for a "mode" event associated with the slider switch on the eval board, through the gpio-button-hotplug infrastructure. Signed-off-by: Russell Senior --- .../gpio-button-hotplug/src/gpio-button-hotplug.c | 1 + target/linux/ramips/base-files/etc/board.d/01_leds | 4 +++- target/linux/ramips/dts/AWM002-EVB-4M.dts | 18 +- target/linux/ramips/dts/AWM002-EVB-8M.dts | 18 +- target/linux/ramips/dts/AWM002.dtsi| 12 target/linux/ramips/dts/AWM003-EVB.dts | 18 +- 6 files changed, 19 insertions(+), 52 deletions(-) diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c index c997e35..891dd96 100644 --- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c +++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c @@ -97,6 +97,7 @@ static struct bh_map button_map[] = { BH_MAP(KEY_RFKILL, "rfkill"), BH_MAP(KEY_WPS_BUTTON, "wps"), BH_MAP(KEY_WIMAX, "wwan"), + BH_MAP(BTN_MODE,"mode"), }; /* -*/ 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 01e2363..906769e 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -38,7 +38,9 @@ case $board in ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "all0256n:green:rssihigh" "wlan0" "70" "100" "-69" "8" set_wifi_led "rt2800pci-phy0::radio" ;; - awapn2403) + awapn2403|\ + awm002-evb|\ + awm003-evb) set_wifi_led "rt2800soc-phy0::radio" ;; ar725w) diff --git a/target/linux/ramips/dts/AWM002-EVB-4M.dts b/target/linux/ramips/dts/AWM002-EVB-4M.dts index 0738f04..77621dc 100644 --- a/target/linux/ramips/dts/AWM002-EVB-4M.dts +++ b/target/linux/ramips/dts/AWM002-EVB-4M.dts @@ -15,17 +15,9 @@ gpio-leds { compatible = "gpio-leds"; - tx { - label = "awm002-evb:green:tx"; - gpios = <&gpio0 15 1>; - }; - rx { - label = "awm002-evb:green:rx"; - gpios = <&gpio0 16 1>; - }; wps { - label = "awm002-evb:green:wps"; - gpios = <&gpio0 21 1>; + label = "asiarf-evb:green:wps"; + gpios = <&gpio0 21 0>; }; }; @@ -34,15 +26,15 @@ #address-cells = <1>; #size-cells = <0>; poll-interval = <20>; - reset_wps { - label = "reset_wps"; + reset { + label = "reset"; gpios = <&gpio0 0 1>; linux,code = <0x198>; }; mode { label = "mode"; gpios = <&gpio0 20 1>; - linux,code = <0x32>; + linux,code = <0x13c>; }; }; }; diff --git a/target/linux/ramips/dts/AWM002-EVB-8M.dts b/target/linux/ramips/dts/AWM002-EVB-8M.dts index ebc4085..a5a5e84 100644 --- a/target/linux/ramips/dts/AWM002-EVB-8M.dts +++ b/target/linux/ramips/dts/AWM002-EVB-8M.dts @@ -15,17 +15,9 @@ gpio-leds { compatible = "gpio-leds"; - tx { - label = "awm002-evb:green:tx"; - gpios = <&gpio0 15 1>; - }; - rx { - label = "awm002-evb:green:rx"; - gpios = <&gpio0 16 1>; - }; wps { - label = "awm002-evb:green:wps"; - gpios = <&gpio0 21 1>; + label = "asiarf-evb:green:wps"; + gpios = <&gpio0 21 0>; }; }; @@ -34,15 +26,15 @@
Re: [OpenWrt-Devel] [PATCH] ramips: fix device-trees for AsiaRF awm002/3 evb
On 17/09/2014 09:24, Russell Senior wrote: > diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c > b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c > index c997e35..891dd96 100644 > --- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c > +++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c > @@ -97,6 +97,7 @@ static struct bh_map button_map[] = { > BH_MAP(KEY_RFKILL, "rfkill"), > BH_MAP(KEY_WPS_BUTTON, "wps"), > BH_MAP(KEY_WIMAX, "wwan"), > + BH_MAP(BTN_MODE,"mode"), > }; > This needs to be sent in a separate patch as it touches a different module. missed that ion my first review ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ramips: fix device-trees for AsiaRF awm002/3 evb
On 17/09/2014 09:39, John Crispin wrote: > On 17/09/2014 09:24, Russell Senior wrote: >> diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c >> b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c >> index c997e35..891dd96 100644 >> --- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c >> +++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c >> @@ -97,6 +97,7 @@ static struct bh_map button_map[] = { >> BH_MAP(KEY_RFKILL, "rfkill"), >> BH_MAP(KEY_WPS_BUTTON, "wps"), >> BH_MAP(KEY_WIMAX, "wwan"), >> +BH_MAP(BTN_MODE,"mode"), >> }; >> > This needs to be sent in a separate patch as it touches a different > module. missed that ion my first review > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ramips: fix device-trees for AsiaRF awm002/3 evb
> "John" == John Crispin writes: John> On 17/09/2014 09:24, Russell Senior wrote: >> It also enables GPIO control of the second GPIO controller, in >> rt5350.dtsi, but does not use it. John> that is why it is not enabled by default :) It could be used, which I did while testing. I don't understand the logic of disabling the second gpio controller for everyone that includes rt5350.dtsi. I don't understand the harm. Can you elaborate please? -- Russell Senior, President russ...@personaltelco.net ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ramips: fix device-trees for AsiaRF awm002/3 evb
narf ... fat fingered it ... sorry you need to send a v3 /me gets coffee On 17/09/2014 09:42, John Crispin wrote: > > On 17/09/2014 09:39, John Crispin wrote: >> On 17/09/2014 09:24, Russell Senior wrote: >>> diff --git >>> a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c >>> b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c >>> index c997e35..891dd96 100644 --- >>> a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c >>> +++ >>> b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c >>> @@ -97,6 +97,7 @@ static struct bh_map button_map[] = { >>> BH_MAP(KEY_RFKILL, "rfkill"), BH_MAP(KEY_WPS_BUTTON, "wps"), >>> BH_MAP(KEY_WIMAX, "wwan"), + BH_MAP(BTN_MODE,"mode"), }; >>> >> This needs to be sent in a separate patch as it touches a >> different module. missed that ion my first review >> ___ openwrt-devel >> mailing list openwrt-devel@lists.openwrt.org >> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > ___ openwrt-devel > mailing list openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ramips: fix device-trees for AsiaRF awm002/3 evb
On 17/09/2014 09:42, Russell Senior wrote: >> "John" == John Crispin writes: > > John> On 17/09/2014 09:24, Russell Senior wrote: >>> It also enables GPIO control of the second GPIO controller, in >>> rt5350.dtsi, but does not use it. > > John> that is why it is not enabled by default :) > > It could be used, which I did while testing. I don't understand > the logic of disabling the second gpio controller for everyone > that includes rt5350.dtsi. I don't understand the harm. Can you > elaborate please? > > if a router uses the 2nd gpio core it can enable it inside its own dts file. if the gpio core is not used then it does not need to be enabled. its like loading a wifi driver for a wifi card that does not get used. it will just eat up memory and power. we could argue whether it makes sense or not i guess, maybe a matter of personal taste .. for the sake of consistency i would like to keep it this way. John ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCHv3 1/3] ramips: fix device-trees for AsiaRF awm002/3 evb
Revert some brain damage. The rx and tx LEDs on the eval board are not connected to the CPU, but to the FTDI chip instead. Therefore, they are not and cannot be under GPIO control. The LINK_0, LINK_1 LEDs are configured to be driven by the switch, and are not under GPIO control either, though they could be pinmux'd that way if needed. The WLAN LED is driven by the radio phy. Removes the completely fictitious ld1 and ld2 from AWM002.dtsi. Renames the remaining LED to a more generic "asiarf", rather than the module name, because it is on the eval board and not on either of the AWM002 or AWM003. Renamed the "reset_wps" button to just "reset", since it does not in practice function as a WPS button. Signed-off-by: Russell Senior --- target/linux/ramips/base-files/etc/board.d/01_leds | 4 +++- target/linux/ramips/dts/AWM002-EVB-4M.dts | 16 target/linux/ramips/dts/AWM002-EVB-8M.dts | 16 target/linux/ramips/dts/AWM002.dtsi| 12 target/linux/ramips/dts/AWM003-EVB.dts | 16 5 files changed, 15 insertions(+), 49 deletions(-) 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 01e2363..906769e 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -38,7 +38,9 @@ case $board in ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "all0256n:green:rssihigh" "wlan0" "70" "100" "-69" "8" set_wifi_led "rt2800pci-phy0::radio" ;; - awapn2403) + awapn2403|\ + awm002-evb|\ + awm003-evb) set_wifi_led "rt2800soc-phy0::radio" ;; ar725w) diff --git a/target/linux/ramips/dts/AWM002-EVB-4M.dts b/target/linux/ramips/dts/AWM002-EVB-4M.dts index 0738f04..5884779 100644 --- a/target/linux/ramips/dts/AWM002-EVB-4M.dts +++ b/target/linux/ramips/dts/AWM002-EVB-4M.dts @@ -15,17 +15,9 @@ gpio-leds { compatible = "gpio-leds"; - tx { - label = "awm002-evb:green:tx"; - gpios = <&gpio0 15 1>; - }; - rx { - label = "awm002-evb:green:rx"; - gpios = <&gpio0 16 1>; - }; wps { - label = "awm002-evb:green:wps"; - gpios = <&gpio0 21 1>; + label = "asiarf-evb:green:wps"; + gpios = <&gpio0 21 0>; }; }; @@ -34,8 +26,8 @@ #address-cells = <1>; #size-cells = <0>; poll-interval = <20>; - reset_wps { - label = "reset_wps"; + reset { + label = "reset"; gpios = <&gpio0 0 1>; linux,code = <0x198>; }; diff --git a/target/linux/ramips/dts/AWM002-EVB-8M.dts b/target/linux/ramips/dts/AWM002-EVB-8M.dts index ebc4085..3f6b20f 100644 --- a/target/linux/ramips/dts/AWM002-EVB-8M.dts +++ b/target/linux/ramips/dts/AWM002-EVB-8M.dts @@ -15,17 +15,9 @@ gpio-leds { compatible = "gpio-leds"; - tx { - label = "awm002-evb:green:tx"; - gpios = <&gpio0 15 1>; - }; - rx { - label = "awm002-evb:green:rx"; - gpios = <&gpio0 16 1>; - }; wps { - label = "awm002-evb:green:wps"; - gpios = <&gpio0 21 1>; + label = "asiarf-evb:green:wps"; + gpios = <&gpio0 21 0>; }; }; @@ -34,8 +26,8 @@ #address-cells = <1>; #size-cells = <0>; poll-interval = <20>; - reset_wps { - label = "reset_wps"; + reset { + label = "reset"; gpios = <&gpio0 0 1>; linux,code = <0x198>; }; diff --git a/target/linux/ramips/dts/AWM002.dtsi b/target/linux/ramips/dts/AWM002.dtsi index e1579b5..5566d16 100644 --- a/target/linux/ramips/dts/AWM002.dtsi +++ b/target/linux/ramips/dts/AWM002.dtsi @@ -59,16 +59,4 @@ ohci@101c1000 { status = "okay"; }; - - gpio-leds { - compatible = "gpio-leds"; - ld1 { - label = "asiarf:green:ld1"; - gpios = <&gpio0 0 1>; - }; - ld2 { - label = "asiarf:green:ld2"; - gpios = <&gpio0 1 1>; - }; - }; }; diff --git a/target/linux/ramips/dts/AWM003-EVB.dts b/target/linux/ramips/dts/AWM003-E
[OpenWrt-Devel] [PATCHv3 2/3] [package] gpio-button-hotplug: Add a "mode" event
Signed-off-by: Russell Senior --- package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c | 1 + 1 file changed, 1 insertion(+) diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c index c997e35..891dd96 100644 --- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c +++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c @@ -97,6 +97,7 @@ static struct bh_map button_map[] = { BH_MAP(KEY_RFKILL, "rfkill"), BH_MAP(KEY_WPS_BUTTON, "wps"), BH_MAP(KEY_WIMAX, "wwan"), + BH_MAP(BTN_MODE,"mode"), }; /* -*/ -- 2.0.0 -- Russell Senior, President russ...@personaltelco.net ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCHv3 3/3] ramips: slider switch on asiarf evb, send mode event
Uses the new mode event in gpio-button-hotplug. Signed-off-by: Russell Senior --- target/linux/ramips/dts/AWM002-EVB-4M.dts | 2 +- target/linux/ramips/dts/AWM002-EVB-8M.dts | 2 +- target/linux/ramips/dts/AWM003-EVB.dts| 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target/linux/ramips/dts/AWM002-EVB-4M.dts b/target/linux/ramips/dts/AWM002-EVB-4M.dts index 5884779..77621dc 100644 --- a/target/linux/ramips/dts/AWM002-EVB-4M.dts +++ b/target/linux/ramips/dts/AWM002-EVB-4M.dts @@ -34,7 +34,7 @@ mode { label = "mode"; gpios = <&gpio0 20 1>; - linux,code = <0x32>; + linux,code = <0x13c>; }; }; }; diff --git a/target/linux/ramips/dts/AWM002-EVB-8M.dts b/target/linux/ramips/dts/AWM002-EVB-8M.dts index 3f6b20f..a5a5e84 100644 --- a/target/linux/ramips/dts/AWM002-EVB-8M.dts +++ b/target/linux/ramips/dts/AWM002-EVB-8M.dts @@ -34,7 +34,7 @@ mode { label = "mode"; gpios = <&gpio0 20 1>; - linux,code = <0x32>; + linux,code = <0x13c>; }; }; }; diff --git a/target/linux/ramips/dts/AWM003-EVB.dts b/target/linux/ramips/dts/AWM003-EVB.dts index bfb91b7..2303858 100644 --- a/target/linux/ramips/dts/AWM003-EVB.dts +++ b/target/linux/ramips/dts/AWM003-EVB.dts @@ -49,7 +49,7 @@ mode { label = "mode"; gpios = <&gpio0 20 1>; - linux,code = <0x32>; + linux,code = <0x13c>; }; }; }; -- 2.0.0 -- Russell Senior, President russ...@personaltelco.net ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCHv3 2/3] [package] gpio-button-hotplug: Add a "mode" event
diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c index c997e35..891dd96 100644 --- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c +++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c @@ -97,6 +97,7 @@ static struct bh_map button_map[] = { BH_MAP(KEY_RFKILL, "rfkill"), BH_MAP(KEY_WPS_BUTTON, "wps"), BH_MAP(KEY_WIMAX, "wwan"), + BH_MAP(BTN_MODE,"mode"), }; /* -*/ -- 2.0.0 Hmm. If we used KEY_M here instead of horribly abusing BTN_MODE, the third patch would be unnecessary. -- Russell Senior, President russ...@personaltelco.net ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel -- Russell Senior, President russ...@personaltelco.net ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Missing dependency on host sed?
On Wed, Sep 17, 2014 at 1:40 AM, Jonathan Bennett wrote: > I'll throw a couple thoughts out, and then defer to someone that understands > the openwrt build env better than I do. > First, you do have sed installed on your host system, right? I don't think > this is the issue, but best to check the easy things first. Also, a make > distclean sometimes clears up these problems. I'm starting from a clean workspace, and copying in the .config, feeds.conf, and a copy of the dl folder (just to keep OpenWRT from having to re-download anything). > Try compiling without a -j flag. I suspect that this is a parallel build > issue. If you can recreate it without -j, then the rest of this message is a > moot point. It's definitely a parallel build issue, but that's the problem I want to see fixed. :-) > Now, what I think is happening here is that we have a race between a couple > of compilation threads, one of which is the sed utility. What happens is > something that uses sed is trying to compile before sed has finished > compiling. The build env queues up a bunch of programs to compile, and > because sed takes quite a while to compile, it chews through that queue and > hits something that calls sed before sed exists. It would be helpful if we > could discern exactly which package is failing. It's actually more interesting then that. When sed is needed in the linux-headers prepare step, the staging area for the host isn't even set up yet. It looks to me like toolchain/prepare (or something like it) needs to depend on tools/install. > That said, I have put a "sleep 500" in my sed makefile, which basically > means that every other package that is allowed to do so will build and > install first, and I have been unable to reproduce. I'm fortunate in that I have one machine I'm consistently able to reproduce the issue on. > If it's not cleared up shortly, go ahead and open a ticket on > dev.openwrt.org Thanks for the tips. Hopefully, someone else can chime in and offer another fix. Thanks again! -John ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Missing dependency on host sed?
On Wed, Sep 17, 2014 at 1:40 AM, Jonathan Bennett wrote: [snip] > Now, what I think is happening here is that we have a race between a couple > of compilation threads, one of which is the sed utility. What happens is > something that uses sed is trying to compile before sed has finished > compiling. The build env queues up a bunch of programs to compile, and > because sed takes quite a while to compile, it chews through that queue and > hits something that calls sed before sed exists. It would be helpful if we > could discern exactly which package is failing. The following diff fixes the issue for me: --- a/toolchain/Makefile +++ b/toolchain/Makefile @@ -74,7 +74,7 @@ endif # prerequisites for the individual targets $(curdir)/ := .config prereq -$(curdir)//prepare = $(STAGING_DIR)/.prepared $(TOOLCHAIN_DIR)/info.mk +$(curdir)//prepare = $(STAGING_DIR)/.prepared $(TOOLCHAIN_DIR)/info.mk tools/install $(curdir)//compile = $(1)/prepare $(curdir)//install = $(1)/compile If I'm understanding things correctly, this will make the toolchain/prepare step depend on tools/install. It did appear that tools fully built before progressing to the toolchain compilation too, as expected. So I think it's the right idea, if not the right implementation. :-) Hopefully someone knowledgable about the build can chime in and say one way or another. -John ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] libubus: fix build; add _GNU_SOURCE for O_CLOEXEC
On 2014-09-15 13:26, Alexandru Ardelean wrote: > --- > CMakeLists.txt | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/CMakeLists.txt b/CMakeLists.txt > index cb2f420..2d322a6 100644 > --- a/CMakeLists.txt > +++ b/CMakeLists.txt > @@ -13,6 +13,7 @@ SET(UBUS_MAX_MSGLEN 1048576) > > ADD_DEFINITIONS( -DUBUS_UNIX_SOCKET="${UBUS_UNIX_SOCKET}") > ADD_DEFINITIONS( -DUBUS_MAX_MSGLEN=${UBUS_MAX_MSGLEN}) > +ADD_DEFINITIONS( -D_GNU_SOURCE ) Replaced by commit 4c4f35cf2230d70b9ddd87638ca911e8a563f2f3 - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [RFC] netifd-device: add support for promisc setting
On 2014-09-15 11:57, Martin Hundebøll wrote: > Signed-off-by: Martin Hundebøll > --- > device.c | 9 + > device.h | 3 +++ > system-linux.c | 10 ++ > 3 files changed, 22 insertions(+) Applied and pushed to git. Thanks, - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ramips: add support for Nexx WT1520
I removed the GPIOs block from the .dts file; there are no accessible GPIO pins on the board and the reset button does not change the status of any exportable pin. Also removed the commented li ne. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ramips: add support for Nexx WT1520
From: Roger Pueyo Centelles --- 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/NEXXWT1520.dts | 83 ++ target/linux/ramips/image/Makefile | 8 +++ target/linux/ramips/rt305x/profiles/nexx.mk| 17 + 8 files changed, 119 insertions(+) create mode 100644 target/linux/ramips/dts/NEXXWT1520.dts create mode 100644 target/linux/ramips/rt305x/profiles/nexx.mk 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 01e2363..1806ff2 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -112,6 +112,9 @@ case $board in hlk-rm04) set_wifi_led "rt2800pci-phy0::radio" ;; + nexx-wt1520) + set_wifi_led "rt2800pci-phy0::radio" + ;; all0239-3g|\ hw550-3g) set_usb_led "hw550-3g:green:usb" diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index e027b3b..765d398 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -103,6 +103,7 @@ ramips_setup_interfaces() dir-320-b1 | \ dir-615-h1 | \ hlk-rm04 | \ + nexx-wt1520 | \ mzk-w300nh2 | \ mzk-750dhp) ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index 9ad7ccb..472da4b 100755 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -63,6 +63,9 @@ get_status_led() { hlk-rm04) status_led="hlk-rm04:red:power" ;; + nexx-wt1520) + status_led="nexx-wt1520:white:power" + ;; all0239-3g|\ hw550-3g) status_led="hw550-3g:green:status" diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index bb42ace..0a09225 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -157,6 +157,9 @@ ramips_board_detect() { *"HILINK HLK-RM04") name="hlk-rm04" ;; + *"Nexx WT1520") + name="nexx-wt1520" + ;; *"HAME MPR-A1") name="mpr-a1" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 407c218..8ff2da6 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -52,6 +52,7 @@ platform_check_image() { hw550-3g | \ hg255d | \ hlk-rm04 | \ + nexx-wt1520 | \ ip2202 | \ m3 | \ m4 | \ diff --git a/target/linux/ramips/dts/NEXXWT1520.dts b/target/linux/ramips/dts/NEXXWT1520.dts new file mode 100644 index 000..dc0ad32 --- /dev/null +++ b/target/linux/ramips/dts/NEXXWT1520.dts @@ -0,0 +1,83 @@ +/dts-v1/; + +/include/ "rt5350.dtsi" + +/ { + compatible = "NEXXWT1520", "ralink,rt5350-soc"; + model = "Nexx WT1520"; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x200>; + }; + + chosen { + bootargs = "console=ttyS1,57600"; + }; + + palmbus@1000 { + uart@500 { + status = "okay"; + }; + + spi@b00 { + status = "okay"; + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "w25q32"; + reg = <0 0>; + linux,modalias = "m25p80", "s25fl064k"; + spi-max-frequency = <1000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x3>; + read-only; + }; + + partition@3 { + label = "u-boot-env"; + reg = <0x3 0x1>; + read-only; + }; + + factory: partition@4 { +
[OpenWrt-Devel] [PATCH] hostapd/netifd: fix missing htmode for wpa_supplicant
the variable is called htmode, not ht Signed-off-by: Arvid E. Picciani --- package/network/services/hostapd/files/netifd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh index 7cdcb52..c914795 100644 --- a/package/network/services/hostapd/files/netifd.sh +++ b/package/network/services/hostapd/files/netifd.sh @@ -575,7 +575,7 @@ wpa_supplicant_add_network() { } local ht_str - [ -n "$ht" ] && append network_data "htmode=$ht" "$N$T" + [ -n "$htmode" ] && append network_data "htmode=$htmode" "$N$T" cat >> "$_config"
[OpenWrt-Devel] [PATCH v3] dnsmasq: allow de-selecting features from -full variant.
Signed-off-by: Yousong Zhou --- v2 -> v3 - Let the kconfig menu items depend on actual build variant selected. - Make features of -full variant selectable. v1 -> v2 Rebase it on the lastest trunk. package/network/services/dnsmasq/Makefile | 26 ++-- .../network/services/dnsmasq/files/dnsmasq.init|5 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index 17af3c5..1dc3adf 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq PKG_VERSION:=2.71 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq @@ -72,6 +72,25 @@ define Package/dnsmasq/conffiles /etc/dnsmasq.conf endef +define Package/dnsmasq/config/Default + if PACKAGE_$(1)-$(2) + config PACKAGE_dnsmasq_$(2)_dhcpv6 +bool "Build with DHCPv6 support." +default y + config PACKAGE_dnsmasq_$(2)_dnssec +bool "Build with DNSSEC support." +default y + config PACKAGE_dnsmasq_$(2)_auth +bool "Build with the facility to act as an authoritative DNS server." +default y + config PACKAGE_dnsmasq_$(2)_ipset +bool "Build with ipset support." +default y + endif +endef + +Package/dnsmasq-full/config=$(call Package/dnsmasq/config/Default,dnsmasq,full) + Package/dnsmasq-dhcpv6/conffiles = $(Package/dnsmasq/conffiles) Package/dnsmasq-full/conffiles = $(Package/dnsmasq/conffiles) @@ -85,7 +104,10 @@ ifeq ($(BUILD_VARIANT),nodhcpv6) endif ifeq ($(BUILD_VARIANT),full) - COPTS += -DHAVE_DNSSEC + COPTS += $(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_dhcpv6),,-DNO_DHCP6) \ + $(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_dnssec),-DHAVE_DNSSEC) \ + $(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_auth),,-DNO_AUTH) \ + $(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_ipset),,-DNO_IPSET) COPTS += $(if $(CONFIG_LIBNETTLE_MINI),-DNO_GMP,) else COPTS += -DNO_AUTH -DNO_IPSET diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index 942acd7..209952b 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -85,6 +85,10 @@ append_address() { xappend "--address=$1" } +append_ipset() { + xappend "--ipset=$1" +} + append_interface() { local ifname=$(uci_get_state network "$1" ifname "$1") xappend "--interface=$ifname" @@ -135,6 +139,7 @@ dnsmasq() { append_parm "$cfg" "local" "--server" config_list_foreach "$cfg" "server" append_server config_list_foreach "$cfg" "address" append_address + config_list_foreach "$cfg" "ipset" append_ipset config_list_foreach "$cfg" "interface" append_interface config_list_foreach "$cfg" "notinterface" append_notinterface config_list_foreach "$cfg" "addnhosts" append_addnhosts -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v6] ppp: add new protocol PPPoSSH.
This patch adds protocol support for PPP over SSH. The protocol name is 'pppossh' with the following options. - server, SSH server name. Required - port, SSH server port. Defaults to 22. - sshuser, SSH login username. Required. - identity, list of client private key files. ~/.ssh/id_{rsa,dsa} will be used if no identity file was specified and at least one of them must be valid for the public key authentication to proceed. - ipaddr, local ip address to be assigned. - peeraddr, peer ip address to be assigned. - ssh_options, extra ssh client options. Because the protocol script file ppp.sh will be called with $HOME set to '/', we need to explicitly set it to the right value so that dropbear client can read '~/known_hosts' correctly. Signed-off-by: Yousong Zhou --- I can make this a standalone package (maybe in packages feeds) if that is more preferable. v5 -> v6 - Specify 'localip:peerip' directly without `ippair' variable. v4 -> v5 - Remove `acceptunknown' option. For dropbear client `-y' option can be used, and for OpenSSH client it's '-o StrictHostKeyChecking xx'. Both of them can be specified through the `ssh_options'. - Make variable `pty' local. v3 -> v4 - Use default identity files only when no explicit key files were specified. - Added a new option `ssh_options' which will be added as part of ssh client options. - Change the type of `port' option to int. - Change the type of `identity` option to array type. v2 -> v3 - Change type of acceptunknown to boolean. - Squeeze multiple calls to proto_config_add_string to one. v1 -> v2 - Use common option names as suggested by jow and nbd. - Default to using ~/.ssh/id_{rsa,dsa} as the identity file. - Set $HOME to correct value for the current user instead of unset it. package/network/services/ppp/files/ppp.sh | 54 + 1 file changed, 54 insertions(+) diff --git a/package/network/services/ppp/files/ppp.sh b/package/network/services/ppp/files/ppp.sh index f07b11f..6266cc4 100755 --- a/package/network/services/ppp/files/ppp.sh +++ b/package/network/services/ppp/files/ppp.sh @@ -212,10 +212,64 @@ proto_pptp_teardown() { ppp_generic_teardown "$@" } +proto_pppossh_init_config() { + ppp_generic_init_config + proto_config_add_string server sshuser ipaddr peeraddr ssh_options + proto_config_add_string 'identity:list(string)' + proto_config_add_int port + available=1 + no_device=1 +} + +proto_pppossh_setup() { + local config="$1" + local iface="$2" + local user="$(id -nu)" + local home=$(sh -c "echo ~$user") + local ip serv_addr errmsg + local opts pty + + json_get_vars port sshuser identity ipaddr peeraddr ssh_options + json_get_var server server && { + for ip in $(resolveip -t 5 "$server"); do + ( proto_add_host_dependency "$config" "$ip" ) + serv_addr=1 + done + } + [ -n "$serv_addr" ] || errmsg="${errmsg}Could not resolve $server.\n" + [ -n "$sshuser" ] || errmsg="${errmsg}Missing sshuser option.\n" + [ -z "$identity" ] && identity="'$home/.ssh/id_rsa' '$home/.ssh/id_dsa'" + { + local fn + for fn in $identity; do + [ -f "$fn" ] && opts="$opts -i $fn" + done + [ -n "$opts" ] || errmsg="${errmsg}Cannot find valid identity file.\n" + } + [ -n "$errmsg" ] && { + echo -ne "$errmsg" + sleep 5 + proto_setup_failed "$config" + exit 1 + } + opts="$opts ${port:+-p $port}" + opts="$opts ${ssh_options}" + opts="$opts $sshuser@$server" + pty="env 'HOME=$home' /usr/bin/ssh $opts pppd nodetach notty noauth" + + ppp_generic_setup "$config" \ + noauth pty "$pty" "$ipaddr:$peeraddr" +} + +proto_pppossh_teardown() { + ppp_generic_teardown "$@" +} + [ -n "$INCLUDE_ONLY" ] || { add_protocol ppp [ -f /usr/lib/pppd/*/rp-pppoe.so ] && add_protocol pppoe [ -f /usr/lib/pppd/*/pppoatm.so ] && add_protocol pppoa [ -f /usr/lib/pppd/*/pptp.so ] && add_protocol pptp + [ -x /usr/bin/ssh ] && add_protocol pppossh } -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Missing mpc83xx in BB-RC3
On 16.09.2014 18:45, Hauke Mehrtens wrote: > On 09/16/2014 02:52 PM, Claudio Thomas wrote: >> On 16.09.2014 14:44, Felix Fietkau wrote: >>> On 2014-09-16 13:47, Claudio Thomas wrote: Hi, I until now was still using the trunk for testing and working, but today I the first time checked out the 14.07/openwrt.git at git.openwrt.git. Is there a reason why MPC83xx is not included in BB-RC3? >>> It wasn't upgraded to Linux 3.10 in time, so it's not properly >>> maintained enough for this release. >>> >>> - Felix >> that's too bad. >> I'll go soon as possible to update this. >> Thanks, >> Claudio > Hi, > > If you have a device supported by the mpc83xx target please test OpenWrt > trunk with kernel 3.10. > > I ported the patches to kernel 3.10 but I do not have a device to test > and asked for help, see: > https://lists.openwrt.org/pipermail/openwrt-devel/2014-July/026547.html > > Just edit target/linux/mpc83xx/Makefile to make it build with kernel 3.10. > > I do not think this will help to bring it into BB. > > Hauke Hi Hauke, thanks for the work you've already done. I've read the email in July but I've not responded because I also don't have a "Routerboard 333" or "Routerboard 600" - this are actually the only two officially supported devices by OpenWrt. But I can offer you for testing purpose one of our routers (XM17xx), which are also based on mpc83xx (https://www.xmodus-systems.de/en/terminals/routers.html) It is being designed to be shipped with OpenWrt from stock, so that our customers can have full control over its device an adapt it fully to their needs. I must confess, that until this project I only was using OpenWrt as "normal" customer on my personal devices at home so I welcomed the decision here :-) I'm on the code review now and making myself familiar with the concepts of OpenWrt and the changes already done here. I (personally) would be glad to share the code in OpenWrt, so far the community is interested in another device running OpenWrt directly from trunk. Concerning the router, please contact me directly (by mail/phone) in case of interest. Claudio ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [RFC] Fix VLAN on Atheros AR8327N
On 08/31/2014 10:42 AM, Jiri Pirko wrote: > Sat, Jul 19, 2014 at 09:49:38PM CEST, nolt...@gmail.com wrote: >> Commit 40842 reverted the fix for tagged+untagged VLANs on AR8327: >> https://dev.openwrt.org/changeset/40777 >> https://dev.openwrt.org/changeset/40842 >> >> According to jow, some people experienced some "issues" on older devices. >> Can anyone tell me what were those issues? >> >> Anyway, that patch modified some parts of the ar8216/ar8236, so I suppose >> any device with those switches were affected. >> However, I've modified the patch keeping the ar8216/ar8236 as much untouched >> as possible. >> Could anyone test it on those devices? >> >> BTW, this works for me on a TP-Link WDR4300 (ar8327). > > > I tested the patch on TL-WR1043ND v2 with Atheros AR8327 rev. 4. Vlans > are working as expected. Please include this into BB (might need repost) > > Thanks! > > Tested-by: Jiri Pirko Unless there are further objections, we should probably just go ahead and apply this patch since it affects a bunch of users. > > >> >> Signed-off-by: Saverio Proto >> Signed-off-by: Álvaro Fernández >> --- >> diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c >> b/target/linux/generic/files/drivers/net/phy/ar8216.c >> index 3846159..9eae624 100644 >> --- a/target/linux/generic/files/drivers/net/phy/ar8216.c >> +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c >> @@ -78,7 +78,7 @@ struct ar8xxx_chip { >> u32 (*read_port_status)(struct ar8xxx_priv *priv, int port); >> int (*atu_flush)(struct ar8xxx_priv *priv); >> void (*vtu_flush)(struct ar8xxx_priv *priv); >> -void (*vtu_load_vlan)(struct ar8xxx_priv *priv, u32 vid, u32 port_mask); >> +void (*vtu_load_vlan)(struct ar8xxx_priv *priv, u32 vlan); >> >> const struct ar8xxx_mib_desc *mib_decs; >> unsigned num_mibs; >> @@ -112,7 +112,12 @@ struct ar8327_led { >> enum ar8327_led_pattern pattern; >> }; >> >> +struct ar8216_data { >> +u8 vlan_tagged; >> +}; >> + >> struct ar8327_data { >> +u8 vlan_tagged[AR8X16_MAX_VLANS]; >> u32 port0_status; >> u32 port6_status; >> >> @@ -138,6 +143,7 @@ struct ar8xxx_priv { >> u8 chip_rev; >> const struct ar8xxx_chip *chip; >> union { >> +struct ar8216_data ar8216; >> struct ar8327_data ar8327; >> } chip_data; >> bool initialized; >> @@ -159,7 +165,6 @@ struct ar8xxx_priv { >> bool vlan; >> u16 vlan_id[AR8X16_MAX_VLANS]; >> u8 vlan_table[AR8X16_MAX_VLANS]; >> -u8 vlan_tagged; >> u16 pvid[AR8X16_MAX_PORTS]; >> >> /* mirroring */ >> @@ -641,7 +646,7 @@ ar8216_mangle_rx(struct net_device *dev, struct sk_buff >> *skb) >> port = buf[0] & 0xf; >> >> /* no need to fix up packets coming from a tagged source */ >> -if (priv->vlan_tagged & (1 << port)) >> +if (priv->chip_data.ar8216.vlan_tagged & BIT(port)) >> return; >> >> /* lookup port vid from local table, the switch passes an invalid vlan >> id */ >> @@ -695,10 +700,13 @@ ar8216_vtu_flush(struct ar8xxx_priv *priv) >> } >> >> static void >> -ar8216_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vid, u32 port_mask) >> +ar8216_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vlan) >> { >> u32 op; >> >> +u32 vid = priv->vlan_id[vlan]; >> +u32 port_mask = priv->vlan_table[vlan]; >> + >> op = AR8216_VTU_OP_LOAD | (vid << AR8216_VTU_VID_S); >> ar8216_vtu_op(priv, op, port_mask); >> } >> @@ -1705,12 +1713,16 @@ ar8327_vtu_flush(struct ar8xxx_priv *priv) >> } >> >> static void >> -ar8327_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vid, u32 port_mask) >> +ar8327_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vlan) >> { >> u32 op; >> u32 val; >> int i; >> >> +u32 vid = priv->vlan_id[vlan]; >> +u32 port_mask = priv->vlan_table[vlan]; >> +u32 tagged = priv->chip_data.ar8327.vlan_tagged[vlan]; >> + >> op = AR8327_VTU_FUNC1_OP_LOAD | (vid << AR8327_VTU_FUNC1_VID_S); >> val = AR8327_VTU_FUNC0_VALID | AR8327_VTU_FUNC0_IVL; >> for (i = 0; i < AR8327_NUM_PORTS; i++) { >> @@ -1720,7 +1732,7 @@ ar8327_vtu_load_vlan(struct ar8xxx_priv *priv, u32 >> vid, u32 port_mask) >> mode = AR8327_VTU_FUNC0_EG_MODE_NOT; >> else if (priv->vlan == 0) >> mode = AR8327_VTU_FUNC0_EG_MODE_KEEP; >> -else if (priv->vlan_tagged & BIT(i)) >> +else if (tagged & BIT(i)) >> mode = AR8327_VTU_FUNC0_EG_MODE_TAG; >> else >> mode = AR8327_VTU_FUNC0_EG_MODE_UNTAG; >> @@ -1734,26 +1746,22 @@ static void >> ar8327_setup_port(struct ar8xxx_priv *priv, int port, u32 egress, u32 >> ingress, >>u32 members, u32 pvid) >> { >> -u32 t; >> -u32 mode; >> +u32 mode, t; >> + >> +if (priv->vlan) { >> +pvid = priv->vlan_id[priv->pvid[port]]; >> +mode = AR8327_PORT_VLAN1_OUT_MODE_UNMOD; >> +ingress = AR8
Re: [OpenWrt-Devel] [RFC] Fix VLAN on Atheros AR8327N
On 17/09/2014 19:47, Florian Fainelli wrote: > On 08/31/2014 10:42 AM, Jiri Pirko wrote: >> Sat, Jul 19, 2014 at 09:49:38PM CEST, nolt...@gmail.com wrote: >>> Commit 40842 reverted the fix for tagged+untagged VLANs on >>> AR8327: https://dev.openwrt.org/changeset/40777 >>> https://dev.openwrt.org/changeset/40842 >>> >>> According to jow, some people experienced some "issues" on >>> older devices. Can anyone tell me what were those issues? >>> >>> Anyway, that patch modified some parts of the ar8216/ar8236, so >>> I suppose any device with those switches were affected. >>> However, I've modified the patch keeping the ar8216/ar8236 as >>> much untouched as possible. Could anyone test it on those >>> devices? >>> >>> BTW, this works for me on a TP-Link WDR4300 (ar8327). >> >> >> I tested the patch on TL-WR1043ND v2 with Atheros AR8327 rev. 4. >> Vlans are working as expected. Please include this into BB (might >> need repost) >> >> Thanks! >> >> Tested-by: Jiri Pirko > > Unless there are further objections, we should probably just go > ahead and apply this patch since it affects a bunch of users. and then the other bunch complains, as we had before. we keep applying and reversing this i think. maybe we should just see what the real bug is ? John > >> >> >>> >>> Signed-off-by: Saverio Proto >>> Signed-off-by: Álvaro Fernández --- diff >>> --git a/target/linux/generic/files/drivers/net/phy/ar8216.c >>> b/target/linux/generic/files/drivers/net/phy/ar8216.c index >>> 3846159..9eae624 100644 --- >>> a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ >>> b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -78,7 >>> +78,7 @@ struct ar8xxx_chip { u32 (*read_port_status)(struct >>> ar8xxx_priv *priv, int port); int (*atu_flush)(struct >>> ar8xxx_priv *priv); void (*vtu_flush)(struct ar8xxx_priv >>> *priv); - void (*vtu_load_vlan)(struct ar8xxx_priv *priv, u32 >>> vid, u32 port_mask); + void (*vtu_load_vlan)(struct ar8xxx_priv >>> *priv, u32 vlan); >>> >>> const struct ar8xxx_mib_desc *mib_decs; unsigned num_mibs; @@ >>> -112,7 +112,12 @@ struct ar8327_led { enum ar8327_led_pattern >>> pattern; }; >>> >>> +struct ar8216_data { + u8 vlan_tagged; +}; + struct >>> ar8327_data { + u8 vlan_tagged[AR8X16_MAX_VLANS]; u32 >>> port0_status; u32 port6_status; >>> >>> @@ -138,6 +143,7 @@ struct ar8xxx_priv { u8 chip_rev; const >>> struct ar8xxx_chip *chip; union { + struct ar8216_data >>> ar8216; struct ar8327_data ar8327; } chip_data; bool >>> initialized; @@ -159,7 +165,6 @@ struct ar8xxx_priv { bool >>> vlan; u16 vlan_id[AR8X16_MAX_VLANS]; u8 >>> vlan_table[AR8X16_MAX_VLANS]; - u8 vlan_tagged; u16 >>> pvid[AR8X16_MAX_PORTS]; >>> >>> /* mirroring */ @@ -641,7 +646,7 @@ ar8216_mangle_rx(struct >>> net_device *dev, struct sk_buff *skb) port = buf[0] & 0xf; >>> >>> /* no need to fix up packets coming from a tagged source */ - >>> if (priv->vlan_tagged & (1 << port)) + if >>> (priv->chip_data.ar8216.vlan_tagged & BIT(port)) return; >>> >>> /* lookup port vid from local table, the switch passes an >>> invalid vlan id */ @@ -695,10 +700,13 @@ >>> ar8216_vtu_flush(struct ar8xxx_priv *priv) } >>> >>> static void -ar8216_vtu_load_vlan(struct ar8xxx_priv *priv, u32 >>> vid, u32 port_mask) +ar8216_vtu_load_vlan(struct ar8xxx_priv >>> *priv, u32 vlan) { u32 op; >>> >>> + u32 vid = priv->vlan_id[vlan]; +u32 port_mask = >>> priv->vlan_table[vlan]; + op = AR8216_VTU_OP_LOAD | (vid << >>> AR8216_VTU_VID_S); ar8216_vtu_op(priv, op, port_mask); } @@ >>> -1705,12 +1713,16 @@ ar8327_vtu_flush(struct ar8xxx_priv >>> *priv) } >>> >>> static void -ar8327_vtu_load_vlan(struct ar8xxx_priv *priv, u32 >>> vid, u32 port_mask) +ar8327_vtu_load_vlan(struct ar8xxx_priv >>> *priv, u32 vlan) { u32 op; u32 val; int i; >>> >>> + u32 vid = priv->vlan_id[vlan]; +u32 port_mask = >>> priv->vlan_table[vlan]; + u32 tagged = >>> priv->chip_data.ar8327.vlan_tagged[vlan]; + op = >>> AR8327_VTU_FUNC1_OP_LOAD | (vid << AR8327_VTU_FUNC1_VID_S); val >>> = AR8327_VTU_FUNC0_VALID | AR8327_VTU_FUNC0_IVL; for (i = 0; i >>> < AR8327_NUM_PORTS; i++) { @@ -1720,7 +1732,7 @@ >>> ar8327_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vid, u32 >>> port_mask) mode = AR8327_VTU_FUNC0_EG_MODE_NOT; else if >>> (priv->vlan == 0) mode = AR8327_VTU_FUNC0_EG_MODE_KEEP; - else >>> if (priv->vlan_tagged & BIT(i)) + else if (tagged & BIT(i)) >>> mode = AR8327_VTU_FUNC0_EG_MODE_TAG; else mode = >>> AR8327_VTU_FUNC0_EG_MODE_UNTAG; @@ -1734,26 +1746,22 @@ static >>> void ar8327_setup_port(struct ar8xxx_priv *priv, int port, u32 >>> egress, u32 ingress, u32 members, u32 pvid) { - u32 t; -u32 >>> mode; + u32 mode, t; + +if (priv->vlan) { + pvid = >>> priv->vlan_id[priv->pvid[port]]; + mode = >>> AR8327_PORT_VLAN1_OUT_MODE_UNMOD; + ingress = >>> AR8216_IN_SECURE; + } else { + pvid = port; + mode = >>> AR8
Re: [OpenWrt-Devel] overcommit memory/ratio
On Tue, 2014-09-16 at 22:29 +, Karl P wrote: > Alternatively, if you know which process it is, set it's oom_adj_score so > that > it gets killed first. > Some other people are kinda used to things behaving as > they are, for better or worse. (Turning off overcommit on an openwrt device > is > no different than turning off overcommit on a desktop as far as I'm > concerned. > Somethings will be better, lots of things less so) Well being used to something bad, doesn't mean things cannot get better. Routers (to which I have some experience at), rarely have processes running that wouldn't matter if they are randomly killed; on a desktop system you immediately notice an issue, and you can reboot, a router is typically running unattended. Being locked out of such a system because another process had a memory leak, can be an issue. regards, Nikos ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [RFC] Fix VLAN on Atheros AR8327N
Hi, Am 17.09.2014 19:50, schrieb John Crispin: > > > On 17/09/2014 19:47, Florian Fainelli wrote: >> On 08/31/2014 10:42 AM, Jiri Pirko wrote: >>> Sat, Jul 19, 2014 at 09:49:38PM CEST, nolt...@gmail.com wrote: Commit 40842 reverted the fix for tagged+untagged VLANs on AR8327: https://dev.openwrt.org/changeset/40777 https://dev.openwrt.org/changeset/40842 According to jow, some people experienced some "issues" on older devices. Can anyone tell me what were those issues? Anyway, that patch modified some parts of the ar8216/ar8236, so I suppose any device with those switches were affected. However, I've modified the patch keeping the ar8216/ar8236 as much untouched as possible. Could anyone test it on those devices? BTW, this works for me on a TP-Link WDR4300 (ar8327). >>> >>> >>> I tested the patch on TL-WR1043ND v2 with Atheros AR8327 rev. 4. >>> Vlans are working as expected. Please include this into BB (might >>> need repost) >>> >>> Thanks! >>> >>> Tested-by: Jiri Pirko >> >> Unless there are further objections, we should probably just go >> ahead and apply this patch since it affects a bunch of users. > > and then the other bunch complains, as we had before. we keep applying > and reversing this i think. maybe we should just see what the real bug > is ? > > John I'm interested in this feature. I tried to understand what the revoked patch changes and rewrote it. I submitted my changes two months ago: http://patchwork.openwrt.org/patch/5957/ http://patchwork.openwrt.org/patch/5958/ My patches attempt to minimize changes in non-ar8327-specific code. Neither the revert commit nor ticket #12181 describe the issues. So I'm not sure, if my patches have them too. Does anyone know details about the issues? - Valentin Spreckels > >> >>> >>> Signed-off-by: Saverio Proto Signed-off-by: Álvaro Fernández --- diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index 3846159..9eae624 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -78,7 +78,7 @@ struct ar8xxx_chip { u32 (*read_port_status)(struct ar8xxx_priv *priv, int port); int (*atu_flush)(struct ar8xxx_priv *priv); void (*vtu_flush)(struct ar8xxx_priv *priv); - void (*vtu_load_vlan)(struct ar8xxx_priv *priv, u32 vid, u32 port_mask); + void (*vtu_load_vlan)(struct ar8xxx_priv *priv, u32 vlan); const struct ar8xxx_mib_desc *mib_decs; unsigned num_mibs; @@ -112,7 +112,12 @@ struct ar8327_led { enum ar8327_led_pattern pattern; }; +struct ar8216_data { +u8 vlan_tagged; +}; + struct ar8327_data { +u8 vlan_tagged[AR8X16_MAX_VLANS]; u32 port0_status; u32 port6_status; @@ -138,6 +143,7 @@ struct ar8xxx_priv { u8 chip_rev; const struct ar8xxx_chip *chip; union { +struct ar8216_data ar8216; struct ar8327_data ar8327; } chip_data; bool initialized; @@ -159,7 +165,6 @@ struct ar8xxx_priv { bool vlan; u16 vlan_id[AR8X16_MAX_VLANS]; u8 vlan_table[AR8X16_MAX_VLANS]; -u8 vlan_tagged; u16 pvid[AR8X16_MAX_PORTS]; /* mirroring */ @@ -641,7 +646,7 @@ ar8216_mangle_rx(struct net_device *dev, struct sk_buff *skb) port = buf[0] & 0xf; /* no need to fix up packets coming from a tagged source */ - if (priv->vlan_tagged & (1 << port)) + if (priv->chip_data.ar8216.vlan_tagged & BIT(port)) return; /* lookup port vid from local table, the switch passes an invalid vlan id */ @@ -695,10 +700,13 @@ ar8216_vtu_flush(struct ar8xxx_priv *priv) } static void -ar8216_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vid, u32 port_mask) +ar8216_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vlan) { u32 op; + u32 vid = priv->vlan_id[vlan]; +u32 port_mask = priv->vlan_table[vlan]; + op = AR8216_VTU_OP_LOAD | (vid << AR8216_VTU_VID_S); ar8216_vtu_op(priv, op, port_mask); } @@ -1705,12 +1713,16 @@ ar8327_vtu_flush(struct ar8xxx_priv *priv) } static void -ar8327_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vid, u32 port_mask) +ar8327_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vlan) { u32 op; u32 val; int i; + u32 vid = priv->vlan_id[vlan]; +u32 port_mask = priv->vlan_table[vlan]; + u32 tagged = priv->chip_data.ar8327.vlan_tagged[vlan]; + op = AR8327_VTU_FUNC1_OP_LOAD | (vid << AR8327_VTU_FUNC1_VID_S); val = AR8327_VTU_FUNC0_VALID | AR8327_VTU_FUNC0_IVL; for (i = 0; i < AR8327_NUM_PORTS; i++) { @@ -1720,7 +1732,7 @@ ar8327_vtu_load_vlan(struct ar8xxx_priv *priv, u32 vid, u32 port_mask) mode = AR8327_VTU_FUNC0_EG_MODE_NOT; else if (priv->vlan == 0) mode = AR8327_VTU_FUNC0_EG_MODE_KEEP; - else if (p
[OpenWrt-Devel] [PATCH] [tools] gcc: don't clobber stamp-bits with a symlink to itself
Several versions of gcc have an issue in libstdc++v3 where the build may clobber stamp-bits with a link to itself. This doesn't manifest itself on all systems. On several Ubuntu systems, this doesn't appear to be a problem, but it is an issue on Fedora 16 systems. To fix the issue, we'll simply filter out stamp-bits from the symlinks to be generated. Signed-off-by: John Szakmeister --- .../gcc/patches/4.6-linaro/930-no-clobber-stamp-bits.patch| 11 +++ .../gcc/patches/4.8-linaro/930-no-clobber-stamp-bits.patch| 11 +++ toolchain/gcc/patches/4.8.0/930-no-clobber-stamp-bits.patch | 11 +++ 3 files changed, 33 insertions(+) create mode 100644 toolchain/gcc/patches/4.6-linaro/930-no-clobber-stamp-bits.patch create mode 100644 toolchain/gcc/patches/4.8-linaro/930-no-clobber-stamp-bits.patch create mode 100644 toolchain/gcc/patches/4.8.0/930-no-clobber-stamp-bits.patch diff --git a/toolchain/gcc/patches/4.6-linaro/930-no-clobber-stamp-bits.patch b/toolchain/gcc/patches/4.6-linaro/930-no-clobber-stamp-bits.patch new file mode 100644 index 000..9106a4a --- /dev/null +++ b/toolchain/gcc/patches/4.6-linaro/930-no-clobber-stamp-bits.patch @@ -0,0 +1,11 @@ +--- a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in +@@ -1326,7 +1326,7 @@ + @$(STAMP) stamp-bits + + stamp-bits-sup: stamp-bits ${bits_sup_headers} +- @-cd ${bits_builddir} && $(LN_S) $? . 2>/dev/null ++ @-cd ${bits_builddir} && $(LN_S) $(filter-out stamp-bits,$?) . 2>/dev/null + @$(STAMP) stamp-bits-sup + + stamp-c_base: ${c_base_headers} diff --git a/toolchain/gcc/patches/4.8-linaro/930-no-clobber-stamp-bits.patch b/toolchain/gcc/patches/4.8-linaro/930-no-clobber-stamp-bits.patch new file mode 100644 index 000..dbecef2 --- /dev/null +++ b/toolchain/gcc/patches/4.8-linaro/930-no-clobber-stamp-bits.patch @@ -0,0 +1,11 @@ +--- a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in +@@ -1342,7 +1342,7 @@ + @$(STAMP) stamp-bits + + stamp-bits-sup: stamp-bits ${bits_sup_headers} +- @-cd ${bits_builddir} && $(LN_S) $? . 2>/dev/null ++ @-cd ${bits_builddir} && $(LN_S) $(filter-out stamp-bits,$?) . 2>/dev/null + @$(STAMP) stamp-bits-sup + + stamp-c_base: ${c_base_headers} diff --git a/toolchain/gcc/patches/4.8.0/930-no-clobber-stamp-bits.patch b/toolchain/gcc/patches/4.8.0/930-no-clobber-stamp-bits.patch new file mode 100644 index 000..01a1000 --- /dev/null +++ b/toolchain/gcc/patches/4.8.0/930-no-clobber-stamp-bits.patch @@ -0,0 +1,11 @@ +--- a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in +@@ -1343,7 +1343,7 @@ stamp-bits: ${bits_headers} + @$(STAMP) stamp-bits + + stamp-bits-sup: stamp-bits ${bits_sup_headers} +- @-cd ${bits_builddir} && $(LN_S) $? . 2>/dev/null ++ @-cd ${bits_builddir} && $(LN_S) $(filter-out stamp-bits,$?) . 2>/dev/null + @$(STAMP) stamp-bits-sup + + stamp-c_base: ${c_base_headers} -- 2.1.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] [package] gdb: add zlib as a dependency for gdbserver
Signed-off-by: John Szakmeister --- package/devel/gdb/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/devel/gdb/Makefile b/package/devel/gdb/Makefile index 7663188..9038115 100644 --- a/package/devel/gdb/Makefile +++ b/package/devel/gdb/Makefile @@ -42,6 +42,7 @@ endef define Package/gdbserver $(call Package/gdb/Default) TITLE:=Remote server for GNU Debugger + DEPENDS+=+zlib endef define Package/gdbserver/description -- 2.1.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] [include] include: clear the line before outputting the progress message
Signed-off-by: John Szakmeister --- This doesn't necessarily fix anything that's "broken", but it's nice to actually be able to read the lines instead of them overwriting each other. include/scan.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/scan.mk b/include/scan.mk index 0998333..53676b0 100644 --- a/include/scan.mk +++ b/include/scan.mk @@ -13,7 +13,7 @@ FILELIST:=$(TMP_DIR)/info/.files-$(SCAN_TARGET)-$(SCAN_COOKIE) ifeq ($(IS_TTY),1) define progress - printf "\033[M\r$(1)" >&2; + printf "\033[2K\033[M\r$(1)" >&2; endef else define progress -- 2.1.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH/RFC] [tools] toolchain: ensure tools are built and staged before preparing toolchain
This fixes an issue where the toolchain/prepare step could run, but some of the necessary host tools might be missing. Signed-off-by: John Szakmeister --- I found that on two systems I could reliably make the build fail with multiple jobs. It turns out that some of the host tools being built are needed during the prepare step for the toolchain. So let's add tools/install as a dependency to that step to ensure all the tools are available for use. With this in place, I can see that the tools are all being built first, and then the build migrates to building the toolchain, as expected. I've marked this as RFC because I'm still wrapping my head around OpenWRT's build system. It could be there's a better way to state this dependency, but I'm unaware of what that way would be. -John toolchain/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolchain/Makefile b/toolchain/Makefile index 36c6ed3..f534cbc 100644 --- a/toolchain/Makefile +++ b/toolchain/Makefile @@ -74,7 +74,7 @@ endif # prerequisites for the individual targets $(curdir)/ := .config prereq -$(curdir)//prepare = $(STAGING_DIR)/.prepared $(TOOLCHAIN_DIR)/info.mk +$(curdir)//prepare = $(STAGING_DIR)/.prepared $(TOOLCHAIN_DIR)/info.mk tools/install $(curdir)//compile = $(1)/prepare $(curdir)//install = $(1)/compile -- 2.1.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] toolchain: uClibc: fix build with CONFIG_BUILD_NLS selected
Without this patch, selecting "Compile with full language support" results in the following question during build: ... Locale Support (UCLIBC_HAS_LOCALE) [Y/n/?] y Locale data > 1. All locales (UCLIBC_BUILD_ALL_LOCALE) (NEW) 2. Only selected locales (UCLIBC_BUILD_MINIMAL_LOCALE) (NEW) 3. Use Pre-generated Locale Data (UCLIBC_PREGENERATED_LOCALE_DATA) (NEW) choice[1-3]: Signed-off-by: Michael Heimpold --- toolchain/uClibc/common.mk |1 + toolchain/uClibc/config-0.9.33.2/common |3 +++ 2 files changed, 4 insertions(+) diff --git a/toolchain/uClibc/common.mk b/toolchain/uClibc/common.mk index 69ac470..e507dc6 100644 --- a/toolchain/uClibc/common.mk +++ b/toolchain/uClibc/common.mk @@ -79,6 +79,7 @@ define Host/Configure -e 's,^.*UCLIBC_HAS_SOFT_FLOAT.*,UCLIBC_HAS_SOFT_FLOAT=$(if $(CONFIG_SOFT_FLOAT),y,n),g' \ -e 's,^.*UCLIBC_HAS_SHADOW.*,UCLIBC_HAS_SHADOW=$(if $(CONFIG_SHADOW_PASSWORDS),y,n),g' \ -e 's,^.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=$(if $(CONFIG_BUILD_NLS),y,n),g' \ + -e 's,^.*UCLIBC_BUILD_ALL_LOCALE.*,UCLIBC_BUILD_ALL_LOCALE=$(if $(CONFIG_BUILD_NLS),y,n),g' \ $(HOST_BUILD_DIR)/.config.new cmp -s $(HOST_BUILD_DIR)/.config.new $(HOST_BUILD_DIR)/.config.last || { \ cp $(HOST_BUILD_DIR)/.config.new $(HOST_BUILD_DIR)/.config && \ diff --git a/toolchain/uClibc/config-0.9.33.2/common b/toolchain/uClibc/config-0.9.33.2/common index fce922e..c587b9a 100644 --- a/toolchain/uClibc/config-0.9.33.2/common +++ b/toolchain/uClibc/config-0.9.33.2/common @@ -132,6 +132,9 @@ UCLIBC_HAS_LIBNSL_STUB=y UCLIBC_HAS_LIBRESOLV_STUB=y UCLIBC_HAS_LIBUTIL=y # UCLIBC_HAS_LOCALE is not set +# UCLIBC_BUILD_ALL_LOCALE is not set +# UCLIBC_BUILD_MINIMAL_LOCALE is not set +# UCLIBC_PREGENERATED_LOCALE_DATA is not set UCLIBC_HAS_LONG_DOUBLE_MATH=y UCLIBC_HAS_NETWORK_SUPPORT=y UCLIBC_HAS_NFTW=y -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel