Re: [OpenWrt-Devel] [PATCH] Add support for Netgear D7800

2016-01-19 Thread John Crispin
you patch collides with f177c2c2f956c938045bd53943e3f1c090b5db2b so you
will have to rebase/send it.



On 19/01/2016 09:26, Tathagata Das wrote:
> Hi John,
> 
> I sent the patch last time using git command and I even received an email
> from OpenWRT on 12th January 2016.
> 
> Regards,
> Tathagata
> 
> 
> -Original Message-
> From: John Crispin [mailto:blo...@openwrt.org] 
> Sent: 19 January 2016 13:45
> To: Tathagata Das; openwrt-devel@lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [PATCH] Add support for Netgear D7800
> 
> same as before, we are waiting on you to send a version that applies.
> 
> 
> patchwork 566597
> --2016-01-17 06:23:22--  http://patchwork.ozlabs.org/patch/566597/mbox/
> Resolving patchwork.ozlabs.org (patchwork.ozlabs.org)... 103.22.144.67
> Connecting to patchwork.ozlabs.org
> (patchwork.ozlabs.org)|103.22.144.67|:80... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: unspecified [text/plain]
> Saving to: `566597.patch'
> 
> [ <=>
>] 12,864  --.-K/s   in 0s
> 
> 2016-01-17 06:23:24 (115 MB/s) - `566597.patch' saved [12864]
> 
> Applying: Add support for Netgear D7800
> Using index info to reconstruct a base tree...
> :109: space before tab in indent.
>   qcom-ipq8064-ap148.dtb \
> :110: space before tab in indent.
>   qcom-ipq8064-db149.dtb \
> :111: space before tab in indent.
>   qcom-ipq8064-r7500.dtb \
> :113: space before tab in indent.
>   qcom-msm8660-surf.dtb \
> :114: space before tab in indent.
>   qcom-msm8960-cdp.dtb \
> warning: squelched 1 whitespace error
> warning: 6 lines add whitespace errors.
> Falling back to patching base and 3-way merge...
> Auto-merging target/linux/ipq806x/image/Makefile
> Auto-merging target/linux/ipq806x/base-files/lib/upgrade/platform.sh
> CONFLICT (content): Merge conflict in
> target/linux/ipq806x/base-files/lib/upgrade/platform.sh
> Failed to merge in the changes.
> Patch failed at 0001 Add support for Netgear D7800 When you have resolved
> this problem run "git am --resolved".
> If you would prefer to skip this patch, instead run "git am --skip".
> To restore the original branch and stop patching run "git am --abort".
> Unstaged changes after reset:
> M target/linux/ipq806x/base-files/etc/board.d/01_leds
> M target/linux/ipq806x/base-files/etc/board.d/02_network
> M target/linux/ipq806x/base-files/lib/ipq806x.sh
> M target/linux/ipq806x/base-files/lib/upgrade/platform.sh
> M target/linux/ipq806x/image/Makefile
> M target/linux/ipq806x/profiles/netgear.mk
> applying 566597 FAILED
> 
> 
> patchwork 569813
> --2016-01-17 06:22:13--  http://patchwork.ozlabs.org/patch/569813/mbox/
> Resolving patchwork.ozlabs.org (patchwork.ozlabs.org)... 103.22.144.67
> Connecting to patchwork.ozlabs.org
> (patchwork.ozlabs.org)|103.22.144.67|:80... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: unspecified [text/plain]
> Saving to: `569813.patch'
> 
> [ <=>
>] 13,088  --.-K/s   in 0s
> 
> 2016-01-17 06:22:14 (172 MB/s) - `569813.patch' saved [13088]
> 
> Applying: Add support for Netgear D7800
> fatal: patch fragment without header at line 130: @@ -0,0 +1,381 @@
> Repository lacks necessary blobs to fall back on 3-way merge.
> Cannot fall back to three-way merge.
> Patch failed at 0001 Add support for Netgear D7800 When you have resolved
> this problem run "git am --resolved".
> If you would prefer to skip this patch, instead run "git am --skip".
> To restore the original branch and stop patching run "git am --abort".
> applying 569813 FAILED
> 
> 
> 
> 
> On 19/01/2016 07:19, Tathagata Das wrote:
>> Any update about the patch?
>>
>> Regards,
>> Tathagata
>>
>>
>> -Original Message-
>> From: Tathagata Das [mailto:tathag...@alumnux.com]
>> Sent: 12 January 2016 20:47
>> To: openwrt-devel@lists.openwrt.org
>> Cc: Tathagata Das
>> Subject: [PATCH] Add support for Netgear D7800
>>
>> Signed-off-by: Tathagata Das 
>> ---
>>  .../linux/ipq806x/base-files/etc/board.d/01_leds   |   1 +
>>  .../ipq806x/base-files/etc/board.d/02_network  |   1 +
>>  target/linux/ipq806x/base-files/lib/ipq806x.sh |   3 +
>>  .../ipq806x/base-files/lib/upgrade/platform.sh |   2 +
>>  target/linux/ipq806x/image/Makefile|  13 +-
>>  ...dd-Netgear-Nighthawk-X4-D7800-device-tree.patch | 381
>> +
>>  target/linux/ipq806x/profiles/netgear.mk   |  13 +
>>  7 files changed, 413 insertions(+), 1 deletion(-)  create mode 100644
>> target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X
>> 4-D780
>> 0-device-tree.patch
>>
>> diff --git a/target/linux/ipq806x/base-files/etc/board.d/01_leds
>> b/target/linux/ipq806x/base-files/etc/board.d/01_leds
>> index 07b5b06..b32c1cc 100755
>> --- a/target/linux/ipq806x/base-files/etc/board.d/01_leds
>> +++ b/target/linux/ipq806x/base-files/etc/board.d/01_leds
>> @@ -11,6 +11,7 @@ board_config_update
>>  

Re: [OpenWrt-Devel] [PATCH] Add support for Netgear D7800

2016-01-19 Thread Tathagata Das
Done -- just prepared and sent it again.

Regards,
Tathagata


-Original Message-
From: John Crispin [mailto:blo...@openwrt.org] 
Sent: 19 January 2016 14:13
To: Tathagata Das; openwrt-devel@lists.openwrt.org
Subject: Re: [OpenWrt-Devel] [PATCH] Add support for Netgear D7800

please do that.

On 19/01/2016 09:38, Tathagata Das wrote:
> Do you mean to say that I have to prepare the patch against latest 
> code of trunk and send that it again?
> 
> Regards,
> Tathagata
> 
> 
> -Original Message-
> From: John Crispin [mailto:blo...@openwrt.org]
> Sent: 19 January 2016 14:07
> To: Tathagata Das; openwrt-devel@lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [PATCH] Add support for Netgear D7800
> 
> you patch collides with f177c2c2f956c938045bd53943e3f1c090b5db2b so 
> you will have to rebase/send it.
> 
> 
> 
> On 19/01/2016 09:26, Tathagata Das wrote:
>> Hi John,
>>
>> I sent the patch last time using git command and I even received an 
>> email from OpenWRT on 12th January 2016.
>>
>> Regards,
>> Tathagata
>>
>>
>> -Original Message-
>> From: John Crispin [mailto:blo...@openwrt.org]
>> Sent: 19 January 2016 13:45
>> To: Tathagata Das; openwrt-devel@lists.openwrt.org
>> Subject: Re: [OpenWrt-Devel] [PATCH] Add support for Netgear D7800
>>
>> same as before, we are waiting on you to send a version that applies.
>>
>>
>> patchwork 566597
>> --2016-01-17 06:23:22--
>> http://patchwork.ozlabs.org/patch/566597/mbox/
>> Resolving patchwork.ozlabs.org (patchwork.ozlabs.org)... 
>> 103.22.144.67 Connecting to patchwork.ozlabs.org 
>> (patchwork.ozlabs.org)|103.22.144.67|:80... connected.
>> HTTP request sent, awaiting response... 200 OK
>> Length: unspecified [text/plain]
>> Saving to: `566597.patch'
>>
>> [ <=>
>>] 12,864  --.-K/s   in 0s
>>
>> 2016-01-17 06:23:24 (115 MB/s) - `566597.patch' saved [12864]
>>
>> Applying: Add support for Netgear D7800 Using index info to 
>> reconstruct a base tree...
>> :109: space before tab in indent.
>>  qcom-ipq8064-ap148.dtb \
>> :110: space before tab in indent.
>>  qcom-ipq8064-db149.dtb \
>> :111: space before tab in indent.
>>  qcom-ipq8064-r7500.dtb \
>> :113: space before tab in indent.
>>  qcom-msm8660-surf.dtb \
>> :114: space before tab in indent.
>>  qcom-msm8960-cdp.dtb \
>> warning: squelched 1 whitespace error
>> warning: 6 lines add whitespace errors.
>> Falling back to patching base and 3-way merge...
>> Auto-merging target/linux/ipq806x/image/Makefile
>> Auto-merging target/linux/ipq806x/base-files/lib/upgrade/platform.sh
>> CONFLICT (content): Merge conflict in 
>> target/linux/ipq806x/base-files/lib/upgrade/platform.sh
>> Failed to merge in the changes.
>> Patch failed at 0001 Add support for Netgear D7800 When you have 
>> resolved this problem run "git am --resolved".
>> If you would prefer to skip this patch, instead run "git am --skip".
>> To restore the original branch and stop patching run "git am --abort".
>> Unstaged changes after reset:
>> Mtarget/linux/ipq806x/base-files/etc/board.d/01_leds
>> Mtarget/linux/ipq806x/base-files/etc/board.d/02_network
>> Mtarget/linux/ipq806x/base-files/lib/ipq806x.sh
>> Mtarget/linux/ipq806x/base-files/lib/upgrade/platform.sh
>> Mtarget/linux/ipq806x/image/Makefile
>> Mtarget/linux/ipq806x/profiles/netgear.mk
>> applying 566597 FAILED
>>
>>
>> patchwork 569813
>> --2016-01-17 06:22:13--
>> http://patchwork.ozlabs.org/patch/569813/mbox/
>> Resolving patchwork.ozlabs.org (patchwork.ozlabs.org)... 
>> 103.22.144.67 Connecting to patchwork.ozlabs.org 
>> (patchwork.ozlabs.org)|103.22.144.67|:80... connected.
>> HTTP request sent, awaiting response... 200 OK
>> Length: unspecified [text/plain]
>> Saving to: `569813.patch'
>>
>> [ <=>
>>] 13,088  --.-K/s   in 0s
>>
>> 2016-01-17 06:22:14 (172 MB/s) - `569813.patch' saved [13088]
>>
>> Applying: Add support for Netgear D7800
>> fatal: patch fragment without header at line 130: @@ -0,0 +1,381 @@ 
>> Repository lacks necessary blobs to fall back on 3-way merge.
>> Cannot fall back to three-way merge.
>> Patch failed at 0001 Add support for Netgear D7800 When you have 
>> resolved this problem run "git am --resolved".
>> If you would prefer to skip this patch, instead run "git am --skip".
>> To restore the original branch and stop patching run "git am --abort".
>> applying 569813 FAILED
>>
>>
>>
>>
>> On 19/01/2016 07:19, Tathagata Das wrote:
>>> Any update about the patch?
>>>
>>> Regards,
>>> Tathagata
>>>
>>>
>>> -Original Message-
>>> From: Tathagata Das [mailto:tathag...@alumnux.com]
>>> Sent: 12 January 2016 20:47
>>> To: openwrt-devel@lists.openwrt.org
>>> Cc: Tathagata Das
>>> Subject: [PATCH] Add support for Netgear D7800
>>>
>>> Signed-off-by: Tathagata Das 
>>> ---
>>>  .../linux/ipq806x/base-files/etc/board.d/01_leds   |   1 +
>>>  .../ipq806x/base-files/etc/board.d/02_network  |   1 +
>>>  

Re: [OpenWrt-Devel] [RFC v2] [zynq] Add new target zynq

2016-01-19 Thread John Crispin


On 19/01/2016 09:59, Felix Fietkau wrote:
> If you remove the zynq.sh, the variable will always be empty. So you can
> just do:
> case "$(cat /tmp/sysinfo/board_name)" in
>   ...
> esac
> 
> - Felix

dont we have a unified helper for this since jows cleanup 2 weeks ago ?
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Add support for Netgear D7800

2016-01-19 Thread Tathagata Das
Hi John,

Thank you for your help.

Please let me know your changes so that next time I can do that myself.

Regards,
Tathagata


-Original Message-
From: John Crispin [mailto:blo...@openwrt.org] 
Sent: 19 January 2016 14:31
To: Tathagata Das; openwrt-devel@lists.openwrt.org
Subject: Re: [OpenWrt-Devel] [PATCH] Add support for Netgear D7800

Hi,

i applied this now and made some formal changes. next time please add a
proper subject prefix and description.

John

On 19/01/2016 09:57, Tathagata Das wrote:
> Signed-off-by: Tathagata Das 
> ---
>  .../linux/ipq806x/base-files/etc/board.d/01_leds   |   1 +
>  .../ipq806x/base-files/etc/board.d/02_network  |   1 +
>  target/linux/ipq806x/base-files/lib/ipq806x.sh |   3 +
>  .../ipq806x/base-files/lib/upgrade/platform.sh |   2 +
>  target/linux/ipq806x/image/Makefile|  13 +-
>  ...dd-Netgear-Nighthawk-X4-D7800-device-tree.patch | 381
+
>  target/linux/ipq806x/profiles/netgear.mk   |  13 +
>  7 files changed, 413 insertions(+), 1 deletion(-)  create mode 100644 
> target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X
> 4-D7800-device-tree.patch
> 
> diff --git a/target/linux/ipq806x/base-files/etc/board.d/01_leds 
> b/target/linux/ipq806x/base-files/etc/board.d/01_leds
> index 07b5b06..b32c1cc 100755
> --- a/target/linux/ipq806x/base-files/etc/board.d/01_leds
> +++ b/target/linux/ipq806x/base-files/etc/board.d/01_leds
> @@ -11,6 +11,7 @@ board_config_update
>  board=$(ipq806x_board_name)
>  
>  case "$board" in
> +d7800 |\
>  r7500)
>   ucidef_set_led_usbdev "usb1" "USB 1" "r7500:white:usb1" "1-1"
>   ucidef_set_led_usbdev "usb2" "USB 2" "r7500:white:usb3" "3-1"
> diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network 
> b/target/linux/ipq806x/base-files/etc/board.d/02_network
> index 1302a55..6e18297 100755
> --- a/target/linux/ipq806x/base-files/etc/board.d/02_network
> +++ b/target/linux/ipq806x/base-files/etc/board.d/02_network
> @@ -13,6 +13,7 @@ board=$(ipq806x_board_name)
>  
>  case "$board" in
>  ap148 |\
> +d7800 |\
>  r7500)
>   ucidef_add_switch "switch0" \
>   "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
> diff --git a/target/linux/ipq806x/base-files/lib/ipq806x.sh 
> b/target/linux/ipq806x/base-files/lib/ipq806x.sh
> index 5b27bde..db22708 100644
> --- a/target/linux/ipq806x/base-files/lib/ipq806x.sh
> +++ b/target/linux/ipq806x/base-files/lib/ipq806x.sh
> @@ -17,6 +17,9 @@ ipq806x_board_detect() {
>   *"AP148")
>   name="ap148"
>   ;;
> + *"D7800")
> + name="d7800"
> + ;;
>   *"DB149")
>   name="db149"
>   ;;
> diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh 
> b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
> index 7fcf246..542b5ce 100644
> --- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
> @@ -7,6 +7,7 @@ platform_check_image() {
>  
>   case "$board" in
>   ap148 |\
> + d7800 |\
>   r7500)
>   nand_do_platform_check $board $1
>   return $?;
> @@ -21,6 +22,7 @@ platform_pre_upgrade() {
>  
>   case "$board" in
>   ap148 |\
> + d7800 |\
>   r7500)
>   nand_do_upgrade "$1"
>   ;;
> diff --git a/target/linux/ipq806x/image/Makefile 
> b/target/linux/ipq806x/image/Makefile
> index 58c4e1e..ff8b2c7 100644
> --- a/target/linux/ipq806x/image/Makefile
> +++ b/target/linux/ipq806x/image/Makefile
> @@ -104,6 +104,17 @@ define Device/AP148-legacy
>   BOARD_NAME := ap148
>  endef
>  
> +define Device/D7800
> + $(call Device/DniImage)
> + DEVICE_DTS := qcom-ipq8064-d7800
> + KERNEL_SIZE := 2097152
> + NETGEAR_BOARD_ID := D7800
> + NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4
> + BLOCKSIZE := 128KiB
> + PAGESIZE := 2048
> + BOARD_NAME := d7800
> +endef
> +
>  define Device/DB149
>   $(call Device/FitImage)
>   DEVICE_DTS := qcom-ipq8064-db149
> @@ -122,6 +133,6 @@ define Device/R7500
>   BOARD_NAME := r7500
>  endef
>  
> -TARGET_DEVICES += AP148 AP148-legacy DB149 R7500
> +TARGET_DEVICES += AP148 AP148-legacy D7800 DB149 R7500
>  
>  $(eval $(call BuildImage))
> diff --git 
> a/target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk
> -X4-D7800-device-tree.patch 
> b/target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk
> -X4-D7800-device-tree.patch
> new file mode 100644
> index 000..ecc1cff
> --- /dev/null
> +++ b/target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Night
> +++ hawk-X4-D7800-device-tree.patch
> @@ -0,0 +1,381 @@
> +--- a/arch/arm/boot/dts/Makefile 2015-09-22 18:30:09.033530282 +0530
>  b/arch/arm/boot/dts/Makefile 2015-09-23 17:06:44.892947581 +0530
> +@@ -362,6 +362,7 @@
> + qcom-ipq8064-ap148.dtb \
> + 

Re: [OpenWrt-Devel] [PATCH] dnsmasq: add dhcp relay option

2016-01-19 Thread John Crispin


On 08/01/2016 16:24, dbugnar wrote:
> Signed-off-by: dbugnar 
> ---
>  package/network/services/dnsmasq/files/dhcp.conf|  6 ++
>  package/network/services/dnsmasq/files/dnsmasq.init | 19 +++
>  2 files changed, 25 insertions(+)
> 
> diff --git a/package/network/services/dnsmasq/files/dhcp.conf 
> b/package/network/services/dnsmasq/files/dhcp.conf
> index 362b90a..7a66b44 100644
> --- a/package/network/services/dnsmasq/files/dhcp.conf
> +++ b/package/network/services/dnsmasq/files/dhcp.conf
> @@ -30,3 +30,9 @@ config dhcp lan
>  config dhcp wan
>   option interfacewan
>   option ignore   1
> +
> +config relay
> + option local_addr   '192.168.1.1'
> + option server_addr  '0.0.0.0'
> + option interface'eth0'


NAK on this part. you cannot add a static config for eth0/192.168.1.1 as
that is specific to your board and not generic.

JOhn

> +
> diff --git a/package/network/services/dnsmasq/files/dnsmasq.init 
> b/package/network/services/dnsmasq/files/dnsmasq.init
> index 3ef2b3d..ac45d1b 100644
> --- a/package/network/services/dnsmasq/files/dnsmasq.init
> +++ b/package/network/services/dnsmasq/files/dnsmasq.init
> @@ -538,6 +538,24 @@ dhcp_hostrecord_add() {
>   xappend "--host-record=$record"
>  }
>  
> +dhcp_relay_add() {
> + local cfg="$1"
> + local local_addr server_addr interface
> +
> + config_get local_addr "$cfg" local_addr
> + [ -n "$local_addr" ] || return 0
> +
> + config_get server_addr "$cfg" server_addr
> + [ -n "$server_addr" ] || return 0
> +
> + config_get interface "$cfg" interface
> + if [ -z "$interface" ]; then
> + xappend "--dhcp-relay=$local_addr,$server_addr"
> + else
> + xappend "--dhcp-relay=$local_addr,$server_addr,$interface"
> + fi
> +}
> +
>  service_triggers()
>  {
>   procd_add_reload_trigger "dhcp"
> @@ -597,6 +615,7 @@ start_service() {
>   config_foreach dhcp_subscrid_add subscrid
>   config_foreach dhcp_domain_add domain
>   config_foreach dhcp_hostrecord_add hostrecord
> + config_foreach dhcp_relay_add relay
>  
>   # add own hostname
>   local lanaddr
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] John, no permission to change patches even own

2016-01-19 Thread Daniel Dickinson

On 19/01/16 02:22 AM, Etienne Champetier wrote:

Hi

You should respond to the original mail and not create a new thread each
time


Sorry, didn't have it handy to reply to.


 >
 > Hi John,
 >
 > Contrary to what you believed it is not possible for the ordinary
users (of which I am one at the moment) to modify their own patches, so
I can't discard, archive, or otherwise do anything to patches even my own.

Maybe your patch email and your account email doesn't match exactly (+
filter or typo)?


Nope, but there was some funkiness with the original account creation, 
so I'm guessing there was perhaps cruft from when I used patchwork some 
years ago, that despite the username not reported as used and 
unavailable, may be a case of colliding with a defunct username (not 
password but the username I chose is one I often use).


Will contact the patchwork admin to sort this out, since it seems it 
*ought* to work from what you say below.


Regards,

Daniel



There is not a lot of fonctions, but you can change the state of a patch
to superseeded or rejected which should be enough.
I ve created my account without admin intervention and i'm a 'normal' user.

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/4] base-files: add option to specify netdev led mode in configuration generation

2016-01-19 Thread Jo-Philipp Wich
Hi,

see inline comments.

~ Jow

On 01/07/2016 01:40 AM, Tal Keren wrote:
> This is necessary for controlling leds of RJ45 port, when one indicate the 
> link
> status and the other indicate data transfer.
> 
> Signed-off-by: Tal Keren 
> ---
>  package/base-files/files/bin/config_generate   | 7 ---
>  package/base-files/files/lib/functions/uci-defaults.sh | 2 ++
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/package/base-files/files/bin/config_generate 
> b/package/base-files/files/bin/config_generate
> index 9218788..4f257e4 100755
> --- a/package/base-files/files/bin/config_generate
> +++ b/package/base-files/files/bin/config_generate
> @@ -257,11 +257,12 @@ generate_led() {
>   ;;
>  
>   netdev)
> - local device
> - json_get_vars device
> + local device mode
> + json_get_vars device mode
> + [ -n "$mode" ] || mode='link tx rx'

Remove this check/set.

>   uci -q batch <<-EOF
>   set system.$cfg.trigger='netdev'
> - set system.$cfg.mode='link tx rx'
> + set system.$cfg.mode='$mode'

Use "set system.$cfg.mode='${mode:-link tx rx}'" here.

>   set system.$cfg.dev='$device'
>   EOF
>   ;;
> diff --git a/package/base-files/files/lib/functions/uci-defaults.sh 
> b/package/base-files/files/lib/functions/uci-defaults.sh
> index de3f180..c0ff98a 100755
> --- a/package/base-files/files/lib/functions/uci-defaults.sh
> +++ b/package/base-files/files/lib/functions/uci-defaults.sh
> @@ -355,6 +355,7 @@ ucidef_set_led_netdev() {
>   local name="$2"
>   local sysfs="$3"
>   local dev="$4"
> + local mode="$5"
>  
>   json_select_object led
>  
> @@ -363,6 +364,7 @@ ucidef_set_led_netdev() {
>   json_add_string type netdev
>   json_add_string sysfs "$sysfs"
>   json_add_string device "$dev"
> + [ -n "$mode" ] && json_add_string mode "$mode"

Remove the [ -n ... ] test, empty values are ignored and do not result
in a set.

>   json_select ..
>  
>   json_select ..
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 3/4] firmware-utils: kernel image generator for TP-Link RE450

2016-01-19 Thread John Crispin
can this not be merged into one of the other tplink tools ?



On 07/01/2016 01:40, Tal Keren wrote:
> The firmware image that is used in TP-Link RE450 (and some more devices from
> the RE series) is tplink-safeloader.
> In the kernel partition, the kernel is compressed in a regular tp-link
> firmware that is just used for booting. Since it is only used for compressing
> and booting, only four fields are filled in the header:
> Vendor, version, kernel load address and kernel entry point.
> mktplinkfw-kernel is a simpler version of mktpolinkfw that generate such
> images. It also specifies the hardware id (as it is in the product info
> section), so when doing a sysupgrade - the existing code will check for
> hardware compatibility.
> 
> Signed-off-by: Tal Keren 
> ---
>  tools/firmware-utils/Makefile|   1 +
>  tools/firmware-utils/src/mktplinkfw-kernel.c | 352 
> +++
>  2 files changed, 353 insertions(+)
>  create mode 100755 tools/firmware-utils/src/mktplinkfw-kernel.c
> 
> diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile
> index dc922b0..db1c953 100644
> --- a/tools/firmware-utils/Makefile
> +++ b/tools/firmware-utils/Makefile
> @@ -42,6 +42,7 @@ define Host/Compile
>   $(call cc,mkplanexfw sha1)
>   $(call cc,mktplinkfw md5)
>   $(call cc,mktplinkfw2 md5)
> + $(call cc,mktplinkfw-kernel)
>   $(call cc,tplink-safeloader md5, -Wall)
>   $(call cc,pc1crypt)
>   $(call cc,osbridge-crc)
> diff --git a/tools/firmware-utils/src/mktplinkfw-kernel.c 
> b/tools/firmware-utils/src/mktplinkfw-kernel.c
> new file mode 100755
> index 000..1565e73
> --- /dev/null
> +++ b/tools/firmware-utils/src/mktplinkfw-kernel.c
> @@ -0,0 +1,352 @@
> +/*
> + * Copyright (C) 2009 Gabor Juhos 
> + * Copyright (C) 2016 Tal Keren 
> + *
> + * Stripped down version of the regular tplink firmware that is only used
> + * for compressing and booting the kernel.
> + *
> + * This tool was based on:
> + *   TP-Link WR941 V2 firmware checksum fixing tool.
> + *   Copyright (C) 2008,2009 Wang Jian 
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License version 2 as published
> + * by the Free Software Foundation.
> + *
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include  /* for unlink() */
> +#include 
> +#include  /* for getopt() */
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +#include 
> +
> +#define ALIGN(x,a) ({ typeof(a) __a = (a); (((x) + __a - 1) & ~(__a - 1)); })
> +
> +#define HEADER_VERSION_V10x0100
> +
> +#define MD5SUM_LEN   16
> +
> +struct file_info {
> + char*file_name; /* name of the file */
> + uint32_tfile_size;  /* length of the file */
> +};
> +
> +struct fw_header {
> + uint32_tversion;/* header version */
> + charvendor_name[24];
> + charfw_version[36];
> + uint32_thw_id;  /* hardware id */
> + uint32_thw_rev; /* hardware revision */
> + uint32_tunk1;
> + uint8_t md5sum1[MD5SUM_LEN];
> + uint32_tunk2;
> + uint8_t md5sum2[MD5SUM_LEN];
> + uint32_tunk3;
> + uint32_tkernel_la;  /* kernel load address */
> + uint32_tkernel_ep;  /* kernel entry point */
> + uint32_tfw_length;  /* total length of the firmware */
> + uint32_tkernel_ofs; /* kernel data offset */
> + uint32_tkernel_len; /* kernel data length */
> + uint32_trootfs_ofs; /* rootfs data offset */
> + uint32_trootfs_len; /* rootfs data length */
> + uint32_tboot_ofs;   /* bootloader data offset */
> + uint32_tboot_len;   /* bootloader data length */
> + uint16_tver_hi;
> + uint16_tver_mid;
> + uint16_tver_lo;
> + uint8_t pad[354];
> +} __attribute__ ((packed));
> +
> +
> +/*
> + * Globals
> + */
> +static char *ofname;
> +static char *progname;
> +static char *vendor = "TP-LINK Technologies";
> +static char *version = "ver. 1.0";
> +static char *fw_ver = "0.0.0";
> +static uint32_t hdr_ver = HEADER_VERSION_V1;
> +
> +static char *opt_hw_id;
> +static uint32_t hw_id = 0;
> +static struct file_info kernel_info;
> +static uint32_t kernel_la = 0;
> +static uint32_t kernel_ep = 0;
> +static uint32_t kernel_len = 0;
> +
> +/*
> + * Message macros
> + */
> +#define ERR(fmt, ...) do { \
> + fflush(0); \
> + fprintf(stderr, "[%s] *** error: " fmt "\n", \
> + progname, ## __VA_ARGS__ ); \
> +} while (0)
> +
> +#define ERRS(fmt, ...) do { \
> + int save = errno; \
> + fflush(0); \
> + fprintf(stderr, "[%s] *** error: " fmt ": %s\n", \
> + 

Re: [OpenWrt-Devel] [PATCH] Add support for Netgear D7800

2016-01-19 Thread Tathagata Das
Hi John,

I sent the patch last time using git command and I even received an email
from OpenWRT on 12th January 2016.

Regards,
Tathagata


-Original Message-
From: John Crispin [mailto:blo...@openwrt.org] 
Sent: 19 January 2016 13:45
To: Tathagata Das; openwrt-devel@lists.openwrt.org
Subject: Re: [OpenWrt-Devel] [PATCH] Add support for Netgear D7800

same as before, we are waiting on you to send a version that applies.


patchwork 566597
--2016-01-17 06:23:22--  http://patchwork.ozlabs.org/patch/566597/mbox/
Resolving patchwork.ozlabs.org (patchwork.ozlabs.org)... 103.22.144.67
Connecting to patchwork.ozlabs.org
(patchwork.ozlabs.org)|103.22.144.67|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
Saving to: `566597.patch'

[ <=>
   ] 12,864  --.-K/s   in 0s

2016-01-17 06:23:24 (115 MB/s) - `566597.patch' saved [12864]

Applying: Add support for Netgear D7800
Using index info to reconstruct a base tree...
:109: space before tab in indent.
qcom-ipq8064-ap148.dtb \
:110: space before tab in indent.
qcom-ipq8064-db149.dtb \
:111: space before tab in indent.
qcom-ipq8064-r7500.dtb \
:113: space before tab in indent.
qcom-msm8660-surf.dtb \
:114: space before tab in indent.
qcom-msm8960-cdp.dtb \
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging target/linux/ipq806x/image/Makefile
Auto-merging target/linux/ipq806x/base-files/lib/upgrade/platform.sh
CONFLICT (content): Merge conflict in
target/linux/ipq806x/base-files/lib/upgrade/platform.sh
Failed to merge in the changes.
Patch failed at 0001 Add support for Netgear D7800 When you have resolved
this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
Unstaged changes after reset:
M   target/linux/ipq806x/base-files/etc/board.d/01_leds
M   target/linux/ipq806x/base-files/etc/board.d/02_network
M   target/linux/ipq806x/base-files/lib/ipq806x.sh
M   target/linux/ipq806x/base-files/lib/upgrade/platform.sh
M   target/linux/ipq806x/image/Makefile
M   target/linux/ipq806x/profiles/netgear.mk
applying 566597 FAILED


patchwork 569813
--2016-01-17 06:22:13--  http://patchwork.ozlabs.org/patch/569813/mbox/
Resolving patchwork.ozlabs.org (patchwork.ozlabs.org)... 103.22.144.67
Connecting to patchwork.ozlabs.org
(patchwork.ozlabs.org)|103.22.144.67|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
Saving to: `569813.patch'

[ <=>
   ] 13,088  --.-K/s   in 0s

2016-01-17 06:22:14 (172 MB/s) - `569813.patch' saved [13088]

Applying: Add support for Netgear D7800
fatal: patch fragment without header at line 130: @@ -0,0 +1,381 @@
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Add support for Netgear D7800 When you have resolved
this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
applying 569813 FAILED




On 19/01/2016 07:19, Tathagata Das wrote:
> Any update about the patch?
> 
> Regards,
> Tathagata
> 
> 
> -Original Message-
> From: Tathagata Das [mailto:tathag...@alumnux.com]
> Sent: 12 January 2016 20:47
> To: openwrt-devel@lists.openwrt.org
> Cc: Tathagata Das
> Subject: [PATCH] Add support for Netgear D7800
> 
> Signed-off-by: Tathagata Das 
> ---
>  .../linux/ipq806x/base-files/etc/board.d/01_leds   |   1 +
>  .../ipq806x/base-files/etc/board.d/02_network  |   1 +
>  target/linux/ipq806x/base-files/lib/ipq806x.sh |   3 +
>  .../ipq806x/base-files/lib/upgrade/platform.sh |   2 +
>  target/linux/ipq806x/image/Makefile|  13 +-
>  ...dd-Netgear-Nighthawk-X4-D7800-device-tree.patch | 381
> +
>  target/linux/ipq806x/profiles/netgear.mk   |  13 +
>  7 files changed, 413 insertions(+), 1 deletion(-)  create mode 100644
> target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X
> 4-D780
> 0-device-tree.patch
> 
> diff --git a/target/linux/ipq806x/base-files/etc/board.d/01_leds
> b/target/linux/ipq806x/base-files/etc/board.d/01_leds
> index 07b5b06..b32c1cc 100755
> --- a/target/linux/ipq806x/base-files/etc/board.d/01_leds
> +++ b/target/linux/ipq806x/base-files/etc/board.d/01_leds
> @@ -11,6 +11,7 @@ board_config_update
>  board=$(ipq806x_board_name)
>  
>  case "$board" in
> +d7800 |\
>  r7500)
>   ucidef_set_led_usbdev "usb1" "USB 1" "r7500:white:usb1" "1-1"
>   ucidef_set_led_usbdev "usb2" "USB 2" "r7500:white:usb3" "3-1"
> diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network
> b/target/linux/ipq806x/base-files/etc/board.d/02_network

Re: [OpenWrt-Devel] [PATCH] Add support for Netgear D7800

2016-01-19 Thread John Crispin
please do that.

On 19/01/2016 09:38, Tathagata Das wrote:
> Do you mean to say that I have to prepare the patch against latest code of
> trunk and send that it again?
> 
> Regards,
> Tathagata
> 
> 
> -Original Message-
> From: John Crispin [mailto:blo...@openwrt.org] 
> Sent: 19 January 2016 14:07
> To: Tathagata Das; openwrt-devel@lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [PATCH] Add support for Netgear D7800
> 
> you patch collides with f177c2c2f956c938045bd53943e3f1c090b5db2b so you will
> have to rebase/send it.
> 
> 
> 
> On 19/01/2016 09:26, Tathagata Das wrote:
>> Hi John,
>>
>> I sent the patch last time using git command and I even received an 
>> email from OpenWRT on 12th January 2016.
>>
>> Regards,
>> Tathagata
>>
>>
>> -Original Message-
>> From: John Crispin [mailto:blo...@openwrt.org]
>> Sent: 19 January 2016 13:45
>> To: Tathagata Das; openwrt-devel@lists.openwrt.org
>> Subject: Re: [OpenWrt-Devel] [PATCH] Add support for Netgear D7800
>>
>> same as before, we are waiting on you to send a version that applies.
>>
>>
>> patchwork 566597
>> --2016-01-17 06:23:22--  
>> http://patchwork.ozlabs.org/patch/566597/mbox/
>> Resolving patchwork.ozlabs.org (patchwork.ozlabs.org)... 103.22.144.67 
>> Connecting to patchwork.ozlabs.org 
>> (patchwork.ozlabs.org)|103.22.144.67|:80... connected.
>> HTTP request sent, awaiting response... 200 OK
>> Length: unspecified [text/plain]
>> Saving to: `566597.patch'
>>
>> [ <=>
>>] 12,864  --.-K/s   in 0s
>>
>> 2016-01-17 06:23:24 (115 MB/s) - `566597.patch' saved [12864]
>>
>> Applying: Add support for Netgear D7800 Using index info to 
>> reconstruct a base tree...
>> :109: space before tab in indent.
>>  qcom-ipq8064-ap148.dtb \
>> :110: space before tab in indent.
>>  qcom-ipq8064-db149.dtb \
>> :111: space before tab in indent.
>>  qcom-ipq8064-r7500.dtb \
>> :113: space before tab in indent.
>>  qcom-msm8660-surf.dtb \
>> :114: space before tab in indent.
>>  qcom-msm8960-cdp.dtb \
>> warning: squelched 1 whitespace error
>> warning: 6 lines add whitespace errors.
>> Falling back to patching base and 3-way merge...
>> Auto-merging target/linux/ipq806x/image/Makefile
>> Auto-merging target/linux/ipq806x/base-files/lib/upgrade/platform.sh
>> CONFLICT (content): Merge conflict in
>> target/linux/ipq806x/base-files/lib/upgrade/platform.sh
>> Failed to merge in the changes.
>> Patch failed at 0001 Add support for Netgear D7800 When you have 
>> resolved this problem run "git am --resolved".
>> If you would prefer to skip this patch, instead run "git am --skip".
>> To restore the original branch and stop patching run "git am --abort".
>> Unstaged changes after reset:
>> Mtarget/linux/ipq806x/base-files/etc/board.d/01_leds
>> Mtarget/linux/ipq806x/base-files/etc/board.d/02_network
>> Mtarget/linux/ipq806x/base-files/lib/ipq806x.sh
>> Mtarget/linux/ipq806x/base-files/lib/upgrade/platform.sh
>> Mtarget/linux/ipq806x/image/Makefile
>> Mtarget/linux/ipq806x/profiles/netgear.mk
>> applying 566597 FAILED
>>
>>
>> patchwork 569813
>> --2016-01-17 06:22:13--  
>> http://patchwork.ozlabs.org/patch/569813/mbox/
>> Resolving patchwork.ozlabs.org (patchwork.ozlabs.org)... 103.22.144.67 
>> Connecting to patchwork.ozlabs.org 
>> (patchwork.ozlabs.org)|103.22.144.67|:80... connected.
>> HTTP request sent, awaiting response... 200 OK
>> Length: unspecified [text/plain]
>> Saving to: `569813.patch'
>>
>> [ <=>
>>] 13,088  --.-K/s   in 0s
>>
>> 2016-01-17 06:22:14 (172 MB/s) - `569813.patch' saved [13088]
>>
>> Applying: Add support for Netgear D7800
>> fatal: patch fragment without header at line 130: @@ -0,0 +1,381 @@ 
>> Repository lacks necessary blobs to fall back on 3-way merge.
>> Cannot fall back to three-way merge.
>> Patch failed at 0001 Add support for Netgear D7800 When you have 
>> resolved this problem run "git am --resolved".
>> If you would prefer to skip this patch, instead run "git am --skip".
>> To restore the original branch and stop patching run "git am --abort".
>> applying 569813 FAILED
>>
>>
>>
>>
>> On 19/01/2016 07:19, Tathagata Das wrote:
>>> Any update about the patch?
>>>
>>> Regards,
>>> Tathagata
>>>
>>>
>>> -Original Message-
>>> From: Tathagata Das [mailto:tathag...@alumnux.com]
>>> Sent: 12 January 2016 20:47
>>> To: openwrt-devel@lists.openwrt.org
>>> Cc: Tathagata Das
>>> Subject: [PATCH] Add support for Netgear D7800
>>>
>>> Signed-off-by: Tathagata Das 
>>> ---
>>>  .../linux/ipq806x/base-files/etc/board.d/01_leds   |   1 +
>>>  .../ipq806x/base-files/etc/board.d/02_network  |   1 +
>>>  target/linux/ipq806x/base-files/lib/ipq806x.sh |   3 +
>>>  .../ipq806x/base-files/lib/upgrade/platform.sh |   2 +
>>>  target/linux/ipq806x/image/Makefile|  13 +-
>>>  ...dd-Netgear-Nighthawk-X4-D7800-device-tree.patch | 381
>>> +
>>>  

[OpenWrt-Devel] [PATCH] Add support for Netgear D7800

2016-01-19 Thread Tathagata Das
Signed-off-by: Tathagata Das 
---
 .../linux/ipq806x/base-files/etc/board.d/01_leds   |   1 +
 .../ipq806x/base-files/etc/board.d/02_network  |   1 +
 target/linux/ipq806x/base-files/lib/ipq806x.sh |   3 +
 .../ipq806x/base-files/lib/upgrade/platform.sh |   2 +
 target/linux/ipq806x/image/Makefile|  13 +-
 ...dd-Netgear-Nighthawk-X4-D7800-device-tree.patch | 381 +
 target/linux/ipq806x/profiles/netgear.mk   |  13 +
 7 files changed, 413 insertions(+), 1 deletion(-)
 create mode 100644 
target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X4-D7800-device-tree.patch

diff --git a/target/linux/ipq806x/base-files/etc/board.d/01_leds 
b/target/linux/ipq806x/base-files/etc/board.d/01_leds
index 07b5b06..b32c1cc 100755
--- a/target/linux/ipq806x/base-files/etc/board.d/01_leds
+++ b/target/linux/ipq806x/base-files/etc/board.d/01_leds
@@ -11,6 +11,7 @@ board_config_update
 board=$(ipq806x_board_name)
 
 case "$board" in
+d7800 |\
 r7500)
ucidef_set_led_usbdev "usb1" "USB 1" "r7500:white:usb1" "1-1"
ucidef_set_led_usbdev "usb2" "USB 2" "r7500:white:usb3" "3-1"
diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network 
b/target/linux/ipq806x/base-files/etc/board.d/02_network
index 1302a55..6e18297 100755
--- a/target/linux/ipq806x/base-files/etc/board.d/02_network
+++ b/target/linux/ipq806x/base-files/etc/board.d/02_network
@@ -13,6 +13,7 @@ board=$(ipq806x_board_name)
 
 case "$board" in
 ap148 |\
+d7800 |\
 r7500)
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
diff --git a/target/linux/ipq806x/base-files/lib/ipq806x.sh 
b/target/linux/ipq806x/base-files/lib/ipq806x.sh
index 5b27bde..db22708 100644
--- a/target/linux/ipq806x/base-files/lib/ipq806x.sh
+++ b/target/linux/ipq806x/base-files/lib/ipq806x.sh
@@ -17,6 +17,9 @@ ipq806x_board_detect() {
*"AP148")
name="ap148"
;;
+   *"D7800")
+   name="d7800"
+   ;;
*"DB149")
name="db149"
;;
diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh 
b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
index 7fcf246..542b5ce 100644
--- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
@@ -7,6 +7,7 @@ platform_check_image() {
 
case "$board" in
ap148 |\
+   d7800 |\
r7500)
nand_do_platform_check $board $1
return $?;
@@ -21,6 +22,7 @@ platform_pre_upgrade() {
 
case "$board" in
ap148 |\
+   d7800 |\
r7500)
nand_do_upgrade "$1"
;;
diff --git a/target/linux/ipq806x/image/Makefile 
b/target/linux/ipq806x/image/Makefile
index 58c4e1e..ff8b2c7 100644
--- a/target/linux/ipq806x/image/Makefile
+++ b/target/linux/ipq806x/image/Makefile
@@ -104,6 +104,17 @@ define Device/AP148-legacy
BOARD_NAME := ap148
 endef
 
+define Device/D7800
+   $(call Device/DniImage)
+   DEVICE_DTS := qcom-ipq8064-d7800
+   KERNEL_SIZE := 2097152
+   NETGEAR_BOARD_ID := D7800
+   NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4
+   BLOCKSIZE := 128KiB
+   PAGESIZE := 2048
+   BOARD_NAME := d7800
+endef
+
 define Device/DB149
$(call Device/FitImage)
DEVICE_DTS := qcom-ipq8064-db149
@@ -122,6 +133,6 @@ define Device/R7500
BOARD_NAME := r7500
 endef
 
-TARGET_DEVICES += AP148 AP148-legacy DB149 R7500
+TARGET_DEVICES += AP148 AP148-legacy D7800 DB149 R7500
 
 $(eval $(call BuildImage))
diff --git 
a/target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X4-D7800-device-tree.patch
 
b/target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X4-D7800-device-tree.patch
new file mode 100644
index 000..ecc1cff
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X4-D7800-device-tree.patch
@@ -0,0 +1,381 @@
+--- a/arch/arm/boot/dts/Makefile   2015-09-22 18:30:09.033530282 +0530
 b/arch/arm/boot/dts/Makefile   2015-09-23 17:06:44.892947581 +0530
+@@ -362,6 +362,7 @@
+   qcom-ipq8064-ap148.dtb \
+   qcom-ipq8064-db149.dtb \
+   qcom-ipq8064-r7500.dtb \
++  qcom-ipq8064-d7800.dtb \
+   qcom-msm8660-surf.dtb \
+   qcom-msm8960-cdp.dtb \
+   qcom-msm8974-sony-xperia-honami.dtb
+--- a/arch/arm/boot/dts/qcom-ipq8064-d7800.dts 1970-01-01 05:30:00.0 
+0530
 b/arch/arm/boot/dts/qcom-ipq8064-d7800.dts 2015-09-23 17:06:45.336947567 
+0530
+@@ -0,0 +1,368 @@
++#include "qcom-ipq8064-v1.0.dtsi"
++
++#include 
++
++/ {
++  model = "Netgear Nighthawk X4 D7800";
++  compatible = "netgear,d7800", "qcom,ipq8064";
++
++  memory@0 {
++  reg = <0x4200 0xe00>;
++  device_type = "memory";
++  };
++
++  reserved-memory {
++ 

Re: [OpenWrt-Devel] Plans for CC 15.05.1 or DD 16.xx release?

2016-01-19 Thread John Crispin


On 11/01/2016 12:40, John Crispin wrote:
> 
> 
> On 11/01/2016 12:28, Hannu Nyman wrote:
>> Are there any plans for a CC 15.05.1 maintenance release? Or will DD
>> 16.xx be the next one?
>>
>> There have been so many fixes to 15.05 that personally I would like to
>> see a maintenance release 15.05.1. There have been both security fixes,
>> but also new/improved features that should be adopted more widely as
>> early as possible. One good example is r46848 (the backport of r46491),
>> that will ease any subsequent upgrade thanks to improved opkg behaviour
>> after sysupgrade with settings preserved.
>>
>> There have been some questions about 15.05.1 at the forum every now and
>> then, so it would be great if devs would publish some roadmap about the
>> plans.
> 
> 15.05.1 is almost ready built. i had to do a refresh build to get
> felix's fixes from last night included. base builds finished last night
> and i started the SDK builder this morning which normally takes 2-3
> days. with a bit of luck 15.05.1 is ready early next week.
> 
> I hope that we can do a DD in early spring, there are already plans for
> this but nothing definite yet. i have march as a rough date in mind to
> start working on it but take that with a large grain of salt please. we
> had already decided to do a release based on v4.4 a while back as it
> will be a LTS kernel.
> 
>   John
> 

there will be a delay. as usual 90% of tapi packages do not build aswell
as the other usual suspects. i wont have time to fix these till early
next week which will delay the 15.05.1 release by a few days. if anyone
wants to dig into these before next week then feel free.

John

ERROR: package/feeds/telephony/dahdi-linux failed to build.
   ERROR: package/feeds/packages/krb5 failed to build.
   ERROR: package/feeds/packages/mosquitto failed to build (build
variant: nossl).
   ERROR: package/feeds/packages/mosquitto failed to build (build
variant: nossl).
   ERROR: package/feeds/packages/mosquitto failed to build (build
variant: nossl).
   ERROR: package/feeds/packages/redsocks failed to build.
   ERROR: package/feeds/packages/sstp-client failed to build.
   ERROR: package/feeds/packages/tmux failed to build.
   ERROR: package/feeds/packages/umurmur failed to build (build variant:
polarssl).
   ERROR: package/feeds/packages/tor failed to build.
   ERROR: package/feeds/routing/cjdns failed to build.
   ERROR: package/feeds/telephony/dahdi-tools failed to build.
   ERROR: package/feeds/packages/node failed to build.
   ERROR: package/feeds/packages/node-serialport failed to build.
   ERROR: package/feeds/telephony/libpri failed to build.
   ERROR: package/feeds/telephony/asterisk-11.x failed to build.
   ERROR: package/feeds/telephony/asterisk-13.x failed to build.
   ERROR: package/feeds/telephony/kamailio-4.x failed to build.
   ERROR: package/feeds/telephony/asterisk-1.8.x failed to build.
   ERROR: package/feeds/telephony/yate failed to build.
   ERROR: package/feeds/packages/forked-daapd failed to build.
   ERROR: package/feeds/packages/libmraa failed to build.
   ERROR: package/feeds/packages/libupm failed to build.
   ERROR: package/feeds/telephony/freeswitch failed to build.
   ERROR: package/feeds/packages/seafile-ccnet failed to build.
   ERROR: package/feeds/telephony/asterisk-11.x-chan-dongle failed to build.
   ERROR: package/feeds/telephony/asterisk-g72x failed to build (build
variant: asterisk11).
   ERROR: package/feeds/telephony/asterisk-g72x failed to build (build
variant: asterisk13).
   ERROR: package/feeds/telephony/asterisk-g72x failed to build (build
variant: asterisk18).
   ERROR: package/feeds/telephony/chan-sccp-b failed to build (build
variant: asterisk11).
   ERROR: package/feeds/telephony/chan-sccp-b failed to build (build
variant: asterisk13).
   ERROR: package/feeds/telephony/chan-sccp-b failed to build (build
variant: asterisk18).
   ERROR: package/feeds/packages/seafile-server failed to build.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [RFC v2] [zynq] Add new target zynq

2016-01-19 Thread Felix Fietkau
On 2016-01-19 08:46, Jason Wu wrote:
> Hi Felix,
> 
> Thanks for reviewing the patch. please see my reply inline.
> 

>> If you adjust your other scripts to be able to deal with names like
>> "xlnx,zynq-zc702", you can drop this script and let the default sysinfo
>> script take care of things.
> Sorry for the newbie question, so the sysinfo get this board name base 
> on the dts root node's compatible binding?
Yes.

> This file will be removed and i will make the network script to read 
> /tmp/sysinfo/board_name if board variable is empty. e.g
> board=${board:-$(cat /tmp/sysinfo/board_name)}
If you remove the zynq.sh, the variable will always be empty. So you can
just do:
case "$(cat /tmp/sysinfo/board_name)" in
...
esac

- Felix
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Add support for Netgear D7800

2016-01-19 Thread John Crispin
Hi,

i applied this now and made some formal changes. next time please add a
proper subject prefix and description.

John

On 19/01/2016 09:57, Tathagata Das wrote:
> Signed-off-by: Tathagata Das 
> ---
>  .../linux/ipq806x/base-files/etc/board.d/01_leds   |   1 +
>  .../ipq806x/base-files/etc/board.d/02_network  |   1 +
>  target/linux/ipq806x/base-files/lib/ipq806x.sh |   3 +
>  .../ipq806x/base-files/lib/upgrade/platform.sh |   2 +
>  target/linux/ipq806x/image/Makefile|  13 +-
>  ...dd-Netgear-Nighthawk-X4-D7800-device-tree.patch | 381 
> +
>  target/linux/ipq806x/profiles/netgear.mk   |  13 +
>  7 files changed, 413 insertions(+), 1 deletion(-)
>  create mode 100644 
> target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X4-D7800-device-tree.patch
> 
> diff --git a/target/linux/ipq806x/base-files/etc/board.d/01_leds 
> b/target/linux/ipq806x/base-files/etc/board.d/01_leds
> index 07b5b06..b32c1cc 100755
> --- a/target/linux/ipq806x/base-files/etc/board.d/01_leds
> +++ b/target/linux/ipq806x/base-files/etc/board.d/01_leds
> @@ -11,6 +11,7 @@ board_config_update
>  board=$(ipq806x_board_name)
>  
>  case "$board" in
> +d7800 |\
>  r7500)
>   ucidef_set_led_usbdev "usb1" "USB 1" "r7500:white:usb1" "1-1"
>   ucidef_set_led_usbdev "usb2" "USB 2" "r7500:white:usb3" "3-1"
> diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network 
> b/target/linux/ipq806x/base-files/etc/board.d/02_network
> index 1302a55..6e18297 100755
> --- a/target/linux/ipq806x/base-files/etc/board.d/02_network
> +++ b/target/linux/ipq806x/base-files/etc/board.d/02_network
> @@ -13,6 +13,7 @@ board=$(ipq806x_board_name)
>  
>  case "$board" in
>  ap148 |\
> +d7800 |\
>  r7500)
>   ucidef_add_switch "switch0" \
>   "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
> diff --git a/target/linux/ipq806x/base-files/lib/ipq806x.sh 
> b/target/linux/ipq806x/base-files/lib/ipq806x.sh
> index 5b27bde..db22708 100644
> --- a/target/linux/ipq806x/base-files/lib/ipq806x.sh
> +++ b/target/linux/ipq806x/base-files/lib/ipq806x.sh
> @@ -17,6 +17,9 @@ ipq806x_board_detect() {
>   *"AP148")
>   name="ap148"
>   ;;
> + *"D7800")
> + name="d7800"
> + ;;
>   *"DB149")
>   name="db149"
>   ;;
> diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh 
> b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
> index 7fcf246..542b5ce 100644
> --- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
> @@ -7,6 +7,7 @@ platform_check_image() {
>  
>   case "$board" in
>   ap148 |\
> + d7800 |\
>   r7500)
>   nand_do_platform_check $board $1
>   return $?;
> @@ -21,6 +22,7 @@ platform_pre_upgrade() {
>  
>   case "$board" in
>   ap148 |\
> + d7800 |\
>   r7500)
>   nand_do_upgrade "$1"
>   ;;
> diff --git a/target/linux/ipq806x/image/Makefile 
> b/target/linux/ipq806x/image/Makefile
> index 58c4e1e..ff8b2c7 100644
> --- a/target/linux/ipq806x/image/Makefile
> +++ b/target/linux/ipq806x/image/Makefile
> @@ -104,6 +104,17 @@ define Device/AP148-legacy
>   BOARD_NAME := ap148
>  endef
>  
> +define Device/D7800
> + $(call Device/DniImage)
> + DEVICE_DTS := qcom-ipq8064-d7800
> + KERNEL_SIZE := 2097152
> + NETGEAR_BOARD_ID := D7800
> + NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4
> + BLOCKSIZE := 128KiB
> + PAGESIZE := 2048
> + BOARD_NAME := d7800
> +endef
> +
>  define Device/DB149
>   $(call Device/FitImage)
>   DEVICE_DTS := qcom-ipq8064-db149
> @@ -122,6 +133,6 @@ define Device/R7500
>   BOARD_NAME := r7500
>  endef
>  
> -TARGET_DEVICES += AP148 AP148-legacy DB149 R7500
> +TARGET_DEVICES += AP148 AP148-legacy D7800 DB149 R7500
>  
>  $(eval $(call BuildImage))
> diff --git 
> a/target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X4-D7800-device-tree.patch
>  
> b/target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X4-D7800-device-tree.patch
> new file mode 100644
> index 000..ecc1cff
> --- /dev/null
> +++ 
> b/target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X4-D7800-device-tree.patch
> @@ -0,0 +1,381 @@
> +--- a/arch/arm/boot/dts/Makefile 2015-09-22 18:30:09.033530282 +0530
>  b/arch/arm/boot/dts/Makefile 2015-09-23 17:06:44.892947581 +0530
> +@@ -362,6 +362,7 @@
> + qcom-ipq8064-ap148.dtb \
> + qcom-ipq8064-db149.dtb \
> + qcom-ipq8064-r7500.dtb \
> ++qcom-ipq8064-d7800.dtb \
> + qcom-msm8660-surf.dtb \
> + qcom-msm8960-cdp.dtb \
> + qcom-msm8974-sony-xperia-honami.dtb
> +--- a/arch/arm/boot/dts/qcom-ipq8064-d7800.dts   1970-01-01 
> 05:30:00.0 +0530
>  b/arch/arm/boot/dts/qcom-ipq8064-d7800.dts   2015-09-23 
> 

Re: [OpenWrt-Devel] Plans for CC 15.05.1 or DD 16.xx release?

2016-01-19 Thread alzhao
Hi John,

I have experience in fixing a number of these packages, but not all. I hope
I can try to submit the patches. As these are packages from github, should
I submit directly to github?

Also, may I ask if you can backport these patches to CC1505.1, including
target patch for AR71xx: GL-AR150, GL-AR300, GL-Domino.

Best,
Alfie

On Tue, Jan 19, 2016 at 4:57 PM, John Crispin  wrote:

>
>
> On 11/01/2016 12:40, John Crispin wrote:
> >
> >
> > On 11/01/2016 12:28, Hannu Nyman wrote:
> >> Are there any plans for a CC 15.05.1 maintenance release? Or will DD
> >> 16.xx be the next one?
> >>
> >> There have been so many fixes to 15.05 that personally I would like to
> >> see a maintenance release 15.05.1. There have been both security fixes,
> >> but also new/improved features that should be adopted more widely as
> >> early as possible. One good example is r46848 (the backport of r46491),
> >> that will ease any subsequent upgrade thanks to improved opkg behaviour
> >> after sysupgrade with settings preserved.
> >>
> >> There have been some questions about 15.05.1 at the forum every now and
> >> then, so it would be great if devs would publish some roadmap about the
> >> plans.
> >
> > 15.05.1 is almost ready built. i had to do a refresh build to get
> > felix's fixes from last night included. base builds finished last night
> > and i started the SDK builder this morning which normally takes 2-3
> > days. with a bit of luck 15.05.1 is ready early next week.
> >
> > I hope that we can do a DD in early spring, there are already plans for
> > this but nothing definite yet. i have march as a rough date in mind to
> > start working on it but take that with a large grain of salt please. we
> > had already decided to do a release based on v4.4 a while back as it
> > will be a LTS kernel.
> >
> >   John
> >
>
> there will be a delay. as usual 90% of tapi packages do not build aswell
> as the other usual suspects. i wont have time to fix these till early
> next week which will delay the 15.05.1 release by a few days. if anyone
> wants to dig into these before next week then feel free.
>
> John
>
> ERROR: package/feeds/telephony/dahdi-linux failed to build.
>ERROR: package/feeds/packages/krb5 failed to build.
>ERROR: package/feeds/packages/mosquitto failed to build (build
> variant: nossl).
>ERROR: package/feeds/packages/mosquitto failed to build (build
> variant: nossl).
>ERROR: package/feeds/packages/mosquitto failed to build (build
> variant: nossl).
>ERROR: package/feeds/packages/redsocks failed to build.
>ERROR: package/feeds/packages/sstp-client failed to build.
>ERROR: package/feeds/packages/tmux failed to build.
>ERROR: package/feeds/packages/umurmur failed to build (build variant:
> polarssl).
>ERROR: package/feeds/packages/tor failed to build.
>ERROR: package/feeds/routing/cjdns failed to build.
>ERROR: package/feeds/telephony/dahdi-tools failed to build.
>ERROR: package/feeds/packages/node failed to build.
>ERROR: package/feeds/packages/node-serialport failed to build.
>ERROR: package/feeds/telephony/libpri failed to build.
>ERROR: package/feeds/telephony/asterisk-11.x failed to build.
>ERROR: package/feeds/telephony/asterisk-13.x failed to build.
>ERROR: package/feeds/telephony/kamailio-4.x failed to build.
>ERROR: package/feeds/telephony/asterisk-1.8.x failed to build.
>ERROR: package/feeds/telephony/yate failed to build.
>ERROR: package/feeds/packages/forked-daapd failed to build.
>ERROR: package/feeds/packages/libmraa failed to build.
>ERROR: package/feeds/packages/libupm failed to build.
>ERROR: package/feeds/telephony/freeswitch failed to build.
>ERROR: package/feeds/packages/seafile-ccnet failed to build.
>ERROR: package/feeds/telephony/asterisk-11.x-chan-dongle failed to
> build.
>ERROR: package/feeds/telephony/asterisk-g72x failed to build (build
> variant: asterisk11).
>ERROR: package/feeds/telephony/asterisk-g72x failed to build (build
> variant: asterisk13).
>ERROR: package/feeds/telephony/asterisk-g72x failed to build (build
> variant: asterisk18).
>ERROR: package/feeds/telephony/chan-sccp-b failed to build (build
> variant: asterisk11).
>ERROR: package/feeds/telephony/chan-sccp-b failed to build (build
> variant: asterisk13).
>ERROR: package/feeds/telephony/chan-sccp-b failed to build (build
> variant: asterisk18).
>ERROR: package/feeds/packages/seafile-server failed to build.
> ___
> 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] Plans for CC 15.05.1 or DD 16.xx release?

2016-01-19 Thread John Crispin


On 19/01/2016 10:10, alzhao wrote:
> Hi John,
> 
> I have experience in fixing a number of these packages, but not all. I
> hope I can try to submit the patches. As these are packages from github,
> should I submit directly to github? 

cool, thanks for the help. please send them directly as a PR on github

> 
> Also, may I ask if you can backport these patches to CC1505.1, including
> target patch for AR71xx: GL-AR150, GL-AR300, GL-Domino. 
> 

we ca add them to the tree but the base images are already build so
those wont be part of the binaries. its already a week too late for them
i am afraid.

John

> Best,
> Alfie 
> 
> On Tue, Jan 19, 2016 at 4:57 PM, John Crispin  > wrote:
> 
> 
> 
> On 11/01/2016 12:40, John Crispin wrote:
> >
> >
> > On 11/01/2016 12:28, Hannu Nyman wrote:
> >> Are there any plans for a CC 15.05.1 maintenance release? Or will DD
> >> 16.xx be the next one?
> >>
> >> There have been so many fixes to 15.05 that personally I would like to
> >> see a maintenance release 15.05.1. There have been both security fixes,
> >> but also new/improved features that should be adopted more widely as
> >> early as possible. One good example is r46848 (the backport of r46491),
> >> that will ease any subsequent upgrade thanks to improved opkg behaviour
> >> after sysupgrade with settings preserved.
> >>
> >> There have been some questions about 15.05.1 at the forum every now and
> >> then, so it would be great if devs would publish some roadmap about the
> >> plans.
> >
> > 15.05.1 is almost ready built. i had to do a refresh build to get
> > felix's fixes from last night included. base builds finished last night
> > and i started the SDK builder this morning which normally takes 2-3
> > days. with a bit of luck 15.05.1 is ready early next week.
> >
> > I hope that we can do a DD in early spring, there are already plans for
> > this but nothing definite yet. i have march as a rough date in mind to
> > start working on it but take that with a large grain of salt please. we
> > had already decided to do a release based on v4.4 a while back as it
> > will be a LTS kernel.
> >
> >   John
> >
> 
> there will be a delay. as usual 90% of tapi packages do not build aswell
> as the other usual suspects. i wont have time to fix these till early
> next week which will delay the 15.05.1 release by a few days. if anyone
> wants to dig into these before next week then feel free.
> 
> John
> 
> ERROR: package/feeds/telephony/dahdi-linux failed to build.
>ERROR: package/feeds/packages/krb5 failed to build.
>ERROR: package/feeds/packages/mosquitto failed to build (build
> variant: nossl).
>ERROR: package/feeds/packages/mosquitto failed to build (build
> variant: nossl).
>ERROR: package/feeds/packages/mosquitto failed to build (build
> variant: nossl).
>ERROR: package/feeds/packages/redsocks failed to build.
>ERROR: package/feeds/packages/sstp-client failed to build.
>ERROR: package/feeds/packages/tmux failed to build.
>ERROR: package/feeds/packages/umurmur failed to build (build variant:
> polarssl).
>ERROR: package/feeds/packages/tor failed to build.
>ERROR: package/feeds/routing/cjdns failed to build.
>ERROR: package/feeds/telephony/dahdi-tools failed to build.
>ERROR: package/feeds/packages/node failed to build.
>ERROR: package/feeds/packages/node-serialport failed to build.
>ERROR: package/feeds/telephony/libpri failed to build.
>ERROR: package/feeds/telephony/asterisk-11.x failed to build.
>ERROR: package/feeds/telephony/asterisk-13.x failed to build.
>ERROR: package/feeds/telephony/kamailio-4.x failed to build.
>ERROR: package/feeds/telephony/asterisk-1.8.x failed to build.
>ERROR: package/feeds/telephony/yate failed to build.
>ERROR: package/feeds/packages/forked-daapd failed to build.
>ERROR: package/feeds/packages/libmraa failed to build.
>ERROR: package/feeds/packages/libupm failed to build.
>ERROR: package/feeds/telephony/freeswitch failed to build.
>ERROR: package/feeds/packages/seafile-ccnet failed to build.
>ERROR: package/feeds/telephony/asterisk-11.x-chan-dongle failed
> to build.
>ERROR: package/feeds/telephony/asterisk-g72x failed to build (build
> variant: asterisk11).
>ERROR: package/feeds/telephony/asterisk-g72x failed to build (build
> variant: asterisk13).
>ERROR: package/feeds/telephony/asterisk-g72x failed to build (build
> variant: asterisk18).
>ERROR: package/feeds/telephony/chan-sccp-b failed to build (build
> variant: asterisk11).
>ERROR: package/feeds/telephony/chan-sccp-b failed to build (build
>

Re: [OpenWrt-Devel] [RFC v2] [zynq] Add new target zynq

2016-01-19 Thread Felix Fietkau
On 2016-01-19 10:05, John Crispin wrote:
> 
> 
> On 19/01/2016 09:59, Felix Fietkau wrote:
>> If you remove the zynq.sh, the variable will always be empty. So you can
>> just do:
>> case "$(cat /tmp/sysinfo/board_name)" in
>>  ...
>> esac
>> 
>> - Felix
> 
> dont we have a unified helper for this since jows cleanup 2 weeks ago ?
I don't think so, at least I can't find one...

- Felix
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/4] base-files: add option to specify netdev led mode in configuration generation

2016-01-19 Thread John Crispin


On 07/01/2016 01:40, Tal Keren wrote:
> This is necessary for controlling leds of RJ45 port, when one indicate the 
> link
> status and the other indicate data transfer.
> 
> Signed-off-by: Tal Keren 
> ---
>  package/base-files/files/bin/config_generate   | 7 ---
>  package/base-files/files/lib/functions/uci-defaults.sh | 2 ++
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/package/base-files/files/bin/config_generate 
> b/package/base-files/files/bin/config_generate
> index 9218788..4f257e4 100755
> --- a/package/base-files/files/bin/config_generate
> +++ b/package/base-files/files/bin/config_generate
> @@ -257,11 +257,12 @@ generate_led() {
>   ;;
>  
>   netdev)
> - local device
> - json_get_vars device
> + local device mode
> + json_get_vars device mode
> + [ -n "$mode" ] || mode='link tx rx'

move this line to ucidef_set_led_netdev() and then always set the mode.
this will make the patch a lot simpler

John


>   uci -q batch <<-EOF
>   set system.$cfg.trigger='netdev'
> - set system.$cfg.mode='link tx rx'
> + set system.$cfg.mode='$mode'
>   set system.$cfg.dev='$device'
>   EOF
>   ;;
> diff --git a/package/base-files/files/lib/functions/uci-defaults.sh 
> b/package/base-files/files/lib/functions/uci-defaults.sh
> index de3f180..c0ff98a 100755
> --- a/package/base-files/files/lib/functions/uci-defaults.sh
> +++ b/package/base-files/files/lib/functions/uci-defaults.sh
> @@ -355,6 +355,7 @@ ucidef_set_led_netdev() {
>   local name="$2"
>   local sysfs="$3"
>   local dev="$4"
> + local mode="$5"
>  
>   json_select_object led
>  
> @@ -363,6 +364,7 @@ ucidef_set_led_netdev() {
>   json_add_string type netdev
>   json_add_string sysfs "$sysfs"
>   json_add_string device "$dev"
> + [ -n "$mode" ] && json_add_string mode "$mode"
>   json_select ..
>  
>   json_select ..
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] use NTP server received via DHCP

2016-01-19 Thread Bastian Bittorf
* amine ahd  [19.01.2016 10:12]:
>  start_service() {
> - local server enabled enable_server peer
> -
> + local server enabled enable_server peer ntpservers iface status 
> ntpserver dump
> + local dhcp_ifaces="$(uci -q get system.ntp.dhcp_ifaces)"
> + 

please remove whitespaces in the line above,
otherwise it looks fine to me.

bye, bastian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 4/4] a71xx: add support for TP-Link RE450

2016-01-19 Thread John Crispin
Hi,

again lots of changes all thrown into one patch.

changes like
> -define Image/Build/TPLINK-SAFELOADER
> +define Image/Build/TPLINK-SAFELOADER-ELF

need to be in their own patch.

and the following
> +# mktplinkfw-kernel   
> +define Build/mktplinkfw-kernel
> + $(STAGING_DIR_HOST)/bin/mktplinkfw-kernel \
> + -H $3 -N OpenWrt -V $(REVISION) \
> + -L $(KERNEL_LOADADDR) -E $(KERNEL_LOADADDR) \
> + -k $1 \
> + -o $2
> +endef
> +
should be part of the patch adding the tool rather than the board patch.
it might even qualify for its own patch.

John



On 07/01/2016 01:40, Tal Keren wrote:
> Add full support for TP-Link RE450.
> The wireless SoC is similiar to Archer C7: QCA9558 + QCA9880 (pci).
> The ethernet interface is AR8035, but the mdio is connected to the gpio and
> the chipset builtin mdio bus isn't used, which is unique (and weird), so the
> kernel gpio mdio module is used.
> The two ethernet leds are connected to the GPIO, so they are both configured,
> one to indicate link status and the other to indicate data transfer.
> 
> The generation of the image was added to the image Makefile.
> The return value of tplink-safeloader is not ignored anymore (to fail on 
> error)
> 
> The result factory image is flashable from the stock web ui.
> 
> Signed-off-by: Tal Keren 
> ---
>  target/linux/ar71xx/base-files/etc/board.d/01_leds |   9 +
>  .../linux/ar71xx/base-files/etc/board.d/02_network |   1 +
>  target/linux/ar71xx/base-files/etc/diag.sh |   3 +
>  .../etc/hotplug.d/firmware/11-ath10k-caldata   |   4 +
>  target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
>  .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
>  target/linux/ar71xx/config-4.1 |   3 +
>  .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  10 ++
>  target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
>  .../ar71xx/files/arch/mips/ath79/mach-re450.c  | 189 
> +
>  .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
>  target/linux/ar71xx/generic/profiles/tp-link.mk|  11 ++
>  target/linux/ar71xx/image/Makefile |  46 -
>  target/linux/ar71xx/mikrotik/config-default|   1 +
>  target/linux/ar71xx/nand/config-default|   1 +
>  15 files changed, 279 insertions(+), 5 deletions(-)
>  create mode 100755 target/linux/ar71xx/files/arch/mips/ath79/mach-re450.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 cfb42a5..88d1a9c 100755
> --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
> +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
> @@ -398,6 +398,15 @@ qihoo-c301)
>   ucidef_set_led_wlan "wlan2g" "WLAN2G" "qihoo:red:status" "phy1tpt"
>   ;;
>  
> +re450)
> + ucidef_set_led_netdev "lan_data" "LAN Data" "tp-link:green:lan_data" 
> "eth0" "tx rx"
> + ucidef_set_led_netdev "lan_link" "LAN Link" "tp-link:green:lan_link" 
> "eth0" "link"
> + ucidef_set_led_default "wps" "WPS" "tp-link:blue:wps" "0"
> + ucidef_set_led_default "wps_error" "WPS Error" "tp-link:red:wps" "0"
> + ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "tp-link:blue:wlan2g" 
> "phy1tpt"
> + ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "tp-link:blue:wlan5g" 
> "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/board.d/02_network 
> b/target/linux/ar71xx/base-files/etc/board.d/02_network
> index 6b6c6a4..8c16c53 100755
> --- a/target/linux/ar71xx/base-files/etc/board.d/02_network
> +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
> @@ -340,6 +340,7 @@ rb-912uag-2hpnd |\
>  rb-912uag-5hpnd |\
>  rb-sxt2n |\
>  rb-sxt5n |\
> +re450 |\
>  rocket-m-xw |\
>  tl-mr10u |\
>  tl-mr11u |\
> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
> b/target/linux/ar71xx/base-files/etc/diag.sh
> index 13a0a98..077a6a9 100644
> --- a/target/linux/ar71xx/base-files/etc/diag.sh
> +++ b/target/linux/ar71xx/base-files/etc/diag.sh
> @@ -245,6 +245,9 @@ get_status_led() {
>   rb-sxt5n)
>   status_led="rb:green:power"
>   ;;
> + re450)
> + status_led="tp-link:blue:system"
> + ;;
>   routerstation | routerstation-pro)
>   status_led="ubnt:green:rf"
>   ;;
> diff --git 
> a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
> b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> index 74c3417..88eb10a 100644
> --- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> +++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> @@ -75,6 +75,10 @@ case "$FIRMWARE" in
>   ath10kcal_extract "ART" 20480 

[OpenWrt-Devel] [PATCH] use NTP server received via DHCP

2016-01-19 Thread amine ahd
---
 package/utils/busybox/Makefile  |  3 ++
 package/utils/busybox/files/sysntpd | 33 +++---
 package/utils/busybox/files/sysntpd.hotplug | 54 +
 3 files changed, 86 insertions(+), 4 deletions(-)
 create mode 100644 package/utils/busybox/files/sysntpd.hotplug

diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile
index 5ca4363..3066a85 100644
--- a/package/utils/busybox/Makefile
+++ b/package/utils/busybox/Makefile
@@ -111,6 +111,9 @@ define Package/busybox/install
$(CP) $(PKG_INSTALL_DIR)/* $(1)/
$(INSTALL_BIN) ./files/cron $(1)/etc/init.d/cron
$(INSTALL_BIN) ./files/sysntpd $(1)/etc/init.d/sysntpd
+   $(INSTALL_DIR) $(1)/etc/hotplug.d
+   $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
+   $(INSTALL_BIN) ./files/sysntpd.hotplug 
$(1)/etc/hotplug.d/iface/30-sysntpd
$(INSTALL_BIN) ./files/ntpd-hotplug $(1)/usr/sbin/ntpd-hotplug
-rm -rf $(1)/lib64
 endef
diff --git a/package/utils/busybox/files/sysntpd 
b/package/utils/busybox/files/sysntpd
index f73bb83..118c3e3 100755
--- a/package/utils/busybox/files/sysntpd
+++ b/package/utils/busybox/files/sysntpd
@@ -1,6 +1,9 @@
 #!/bin/sh /etc/rc.common
 # Copyright (C) 2011 OpenWrt.org
 
+. /lib/functions.sh
+. /usr/share/libubox/jshn.sh
+
 START=98
 
 USE_PROCD=1
@@ -13,21 +16,43 @@ validate_ntp_section() {
 }
 
 start_service() {
-   local server enabled enable_server peer
-
+   local server enabled enable_server peer ntpservers iface status 
ntpserver dump
+   local dhcp_ifaces="$(uci -q get system.ntp.dhcp_ifaces)"
+   
+   config_load system
+   config_get_bool "use_dhcp" "ntp" "use_dhcp"
validate_ntp_section ntp || {
echo "validation failed"
return 1
}
 
[ $enabled = 0 ] && return
-
-   [ -z "$server" ] && return
+   [ -z "$server" ] && [ "$use_dhcp" = 0 ] && return
 
procd_open_instance
procd_set_param command "$PROG" -n
[ "$enable_server" = "1" ] && procd_append_param command -l
[ -x "$HOTPLUG_SCRIPT" ] && procd_append_param command -S 
"$HOTPLUG_SCRIPT"
+
+   [ "$use_dhcp" = 1 ] && {
+   if [ -z "$dhcp_ifaces" ]; then
+   dump="$(ubus call network.interface dump)"
+   ntpservers=$(jsonfilter -s "$dump" -e 
'$["interface"][*]["data"]["ntpserver"]')
+   else
+   for iface in $dhcp_ifaces; do
+   status="$(ubus call network.interface.$iface 
status)"
+   ntpserver=$(jsonfilter -s "$status" -e 
'$["data"]["ntpserver"]')
+   [ -n "$ntpserver" ] && \
+   ntpservers="$ntpservers $ntpserver"
+   done
+   fi
+   # add this data so we can use it in the sysntpd hotplug script.
+   procd_set_param data ntp_servers="$ntpservers $server"
+   for ntpserver in $ntpservers; do
+   procd_append_param command -p $ntpserver
+   done
+   }
+
for peer in $server; do
procd_append_param command -p $peer
done
diff --git a/package/utils/busybox/files/sysntpd.hotplug 
b/package/utils/busybox/files/sysntpd.hotplug
new file mode 100644
index 000..34a2f7a
--- /dev/null
+++ b/package/utils/busybox/files/sysntpd.hotplug
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+. /lib/functions.sh
+. /usr/share/libubox/jshn.sh
+
+is_valid_interface() {
+   local list="$(uci get system.ntp.dhcp_ifaces)"
+   [ -z "$list" ] && return 0
+
+   case " $list " in
+   *" $INTERFACE "*)
+   return 0
+   ;;
+   *)
+   return 1
+   ;;
+   esac
+}
+
+config_load system
+local proto="$(uci get network.$INTERFACE.proto)"
+config_get_bool "use_dhcp" "ntp" "use_dhcp"
+[ "$use_dhcp" = 1 ] && [ "$ACTION" = ifup ] && is_valid_interface && [ 
"$proto" = dhcp -o "$proto" = dhcp6 ] || exit 0
+
+handle_default_ntp_servers() {
+   local server="$1"
+   new_ntp_servers="$new_ntp_servers $server"
+}
+
+local dhcp_ntp_servers iface status ntpserver dump
+local dhcp_ifaces="$(uci -q get system.ntp.dhcp_ifaces)"
+if [ -z "$dhcp_ifaces" ]; then
+   dump="$(ubus call network.interface dump)"
+   dhcp_ntp_servers=$(jsonfilter -s "$dump" -e 
'$["interface"][*]["data"]["ntpserver"]')
+else
+   for iface in $dhcp_ifaces; do
+   status="$(ubus call network.interface.$iface status)"
+   ntpserver=$(jsonfilter -s "$status" -e '$["data"]["ntpserver"]')
+   [ -n "$ntpserver" ] && \
+   dhcp_ntp_servers="$dhcp_ntp_servers $ntpserver"
+   done
+fi
+
+new_ntp_servers="$dhcp_ntp_servers"
+#get the default list of ntp servers from the config file and append it to the 
new list

Re: [OpenWrt-Devel] [PATCH] Add support for Netgear D7800

2016-01-19 Thread John Crispin
same as before, we are waiting on you to send a version that applies.


patchwork 566597
--2016-01-17 06:23:22--  http://patchwork.ozlabs.org/patch/566597/mbox/
Resolving patchwork.ozlabs.org (patchwork.ozlabs.org)... 103.22.144.67
Connecting to patchwork.ozlabs.org
(patchwork.ozlabs.org)|103.22.144.67|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
Saving to: `566597.patch'

[ <=>
   ] 12,864  --.-K/s   in 0s

2016-01-17 06:23:24 (115 MB/s) - `566597.patch' saved [12864]

Applying: Add support for Netgear D7800
Using index info to reconstruct a base tree...
:109: space before tab in indent.
qcom-ipq8064-ap148.dtb \
:110: space before tab in indent.
qcom-ipq8064-db149.dtb \
:111: space before tab in indent.
qcom-ipq8064-r7500.dtb \
:113: space before tab in indent.
qcom-msm8660-surf.dtb \
:114: space before tab in indent.
qcom-msm8960-cdp.dtb \
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging target/linux/ipq806x/image/Makefile
Auto-merging target/linux/ipq806x/base-files/lib/upgrade/platform.sh
CONFLICT (content): Merge conflict in
target/linux/ipq806x/base-files/lib/upgrade/platform.sh
Failed to merge in the changes.
Patch failed at 0001 Add support for Netgear D7800
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
Unstaged changes after reset:
M   target/linux/ipq806x/base-files/etc/board.d/01_leds
M   target/linux/ipq806x/base-files/etc/board.d/02_network
M   target/linux/ipq806x/base-files/lib/ipq806x.sh
M   target/linux/ipq806x/base-files/lib/upgrade/platform.sh
M   target/linux/ipq806x/image/Makefile
M   target/linux/ipq806x/profiles/netgear.mk
applying 566597 FAILED


patchwork 569813
--2016-01-17 06:22:13--  http://patchwork.ozlabs.org/patch/569813/mbox/
Resolving patchwork.ozlabs.org (patchwork.ozlabs.org)... 103.22.144.67
Connecting to patchwork.ozlabs.org
(patchwork.ozlabs.org)|103.22.144.67|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
Saving to: `569813.patch'

[ <=>
   ] 13,088  --.-K/s   in 0s

2016-01-17 06:22:14 (172 MB/s) - `569813.patch' saved [13088]

Applying: Add support for Netgear D7800
fatal: patch fragment without header at line 130: @@ -0,0 +1,381 @@
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Add support for Netgear D7800
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
applying 569813 FAILED




On 19/01/2016 07:19, Tathagata Das wrote:
> Any update about the patch?
> 
> Regards,
> Tathagata
> 
> 
> -Original Message-
> From: Tathagata Das [mailto:tathag...@alumnux.com] 
> Sent: 12 January 2016 20:47
> To: openwrt-devel@lists.openwrt.org
> Cc: Tathagata Das
> Subject: [PATCH] Add support for Netgear D7800
> 
> Signed-off-by: Tathagata Das 
> ---
>  .../linux/ipq806x/base-files/etc/board.d/01_leds   |   1 +
>  .../ipq806x/base-files/etc/board.d/02_network  |   1 +
>  target/linux/ipq806x/base-files/lib/ipq806x.sh |   3 +
>  .../ipq806x/base-files/lib/upgrade/platform.sh |   2 +
>  target/linux/ipq806x/image/Makefile|  13 +-
>  ...dd-Netgear-Nighthawk-X4-D7800-device-tree.patch | 381
> +
>  target/linux/ipq806x/profiles/netgear.mk   |  13 +
>  7 files changed, 413 insertions(+), 1 deletion(-)  create mode 100644
> target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X4-D780
> 0-device-tree.patch
> 
> diff --git a/target/linux/ipq806x/base-files/etc/board.d/01_leds
> b/target/linux/ipq806x/base-files/etc/board.d/01_leds
> index 07b5b06..b32c1cc 100755
> --- a/target/linux/ipq806x/base-files/etc/board.d/01_leds
> +++ b/target/linux/ipq806x/base-files/etc/board.d/01_leds
> @@ -11,6 +11,7 @@ board_config_update
>  board=$(ipq806x_board_name)
>  
>  case "$board" in
> +d7800 |\
>  r7500)
>   ucidef_set_led_usbdev "usb1" "USB 1" "r7500:white:usb1" "1-1"
>   ucidef_set_led_usbdev "usb2" "USB 2" "r7500:white:usb3" "3-1"
> diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network
> b/target/linux/ipq806x/base-files/etc/board.d/02_network
> index 1302a55..6e18297 100755
> --- a/target/linux/ipq806x/base-files/etc/board.d/02_network
> +++ b/target/linux/ipq806x/base-files/etc/board.d/02_network
> @@ -13,6 +13,7 @@ board=$(ipq806x_board_name)
>  
>  case "$board" in
>  ap148 |\
> +d7800 |\
>  r7500)
>   ucidef_add_switch "switch0" \
>   "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" 

Re: [OpenWrt-Devel] [PATCH] use NTP server received via DHCP

2016-01-19 Thread John Crispin


On 19/01/2016 10:21, Bastian Bittorf wrote:
> * amine ahd  [19.01.2016 10:12]:
>>  start_service() {
>> -local server enabled enable_server peer
>> -
>> +local server enabled enable_server peer ntpservers iface status 
>> ntpserver dump
>> +local dhcp_ifaces="$(uci -q get system.ntp.dhcp_ifaces)"
>> +
> 
> please remove whitespaces in the line above,
> otherwise it looks fine to me.
> 
> bye, bastian


the subject prefix is also missing

John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] dnsmasq: add dhcp relay option

2016-01-19 Thread Dan Bugnar
Should I remove this part? Maybe comment it (to have a sample) or replace
with something else.

Dan Bugnar

On Tue, Jan 19, 2016 at 11:20 AM, Dan Bugnar  wrote:

> Should I remove this part? Maybe comment it (to have a sample) or replace
> with something else.
>
> Dan Bugnar
>
> On Tue, Jan 19, 2016 at 11:11 AM, John Crispin  wrote:
>
>>
>>
>> On 08/01/2016 16:24, dbugnar wrote:
>> > Signed-off-by: dbugnar 
>> > ---
>> >  package/network/services/dnsmasq/files/dhcp.conf|  6 ++
>> >  package/network/services/dnsmasq/files/dnsmasq.init | 19
>> +++
>> >  2 files changed, 25 insertions(+)
>> >
>> > diff --git a/package/network/services/dnsmasq/files/dhcp.conf
>> b/package/network/services/dnsmasq/files/dhcp.conf
>> > index 362b90a..7a66b44 100644
>> > --- a/package/network/services/dnsmasq/files/dhcp.conf
>> > +++ b/package/network/services/dnsmasq/files/dhcp.conf
>> > @@ -30,3 +30,9 @@ config dhcp lan
>> >  config dhcp wan
>> >   option interfacewan
>> >   option ignore   1
>> > +
>> > +config relay
>> > + option local_addr   '192.168.1.1'
>> > + option server_addr  '0.0.0.0'
>> > + option interface'eth0'
>>
>>
>> NAK on this part. you cannot add a static config for eth0/192.168.1.1 as
>> that is specific to your board and not generic.
>>
>> JOhn
>>
>> > +
>> > diff --git a/package/network/services/dnsmasq/files/dnsmasq.init
>> b/package/network/services/dnsmasq/files/dnsmasq.init
>> > index 3ef2b3d..ac45d1b 100644
>> > --- a/package/network/services/dnsmasq/files/dnsmasq.init
>> > +++ b/package/network/services/dnsmasq/files/dnsmasq.init
>> > @@ -538,6 +538,24 @@ dhcp_hostrecord_add() {
>> >   xappend "--host-record=$record"
>> >  }
>> >
>> > +dhcp_relay_add() {
>> > + local cfg="$1"
>> > + local local_addr server_addr interface
>> > +
>> > + config_get local_addr "$cfg" local_addr
>> > + [ -n "$local_addr" ] || return 0
>> > +
>> > + config_get server_addr "$cfg" server_addr
>> > + [ -n "$server_addr" ] || return 0
>> > +
>> > + config_get interface "$cfg" interface
>> > + if [ -z "$interface" ]; then
>> > + xappend "--dhcp-relay=$local_addr,$server_addr"
>> > + else
>> > + xappend "--dhcp-relay=$local_addr,$server_addr,$interface"
>> > + fi
>> > +}
>> > +
>> >  service_triggers()
>> >  {
>> >   procd_add_reload_trigger "dhcp"
>> > @@ -597,6 +615,7 @@ start_service() {
>> >   config_foreach dhcp_subscrid_add subscrid
>> >   config_foreach dhcp_domain_add domain
>> >   config_foreach dhcp_hostrecord_add hostrecord
>> > + config_foreach dhcp_relay_add relay
>> >
>> >   # add own hostname
>> >   local lanaddr
>> >
>>
>
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/4] base-files: add option to specify netdev led mode in configuration generation

2016-01-19 Thread Jo-Philipp Wich
Hi,

thought some more about it and we want to have the proper defaults in
board.json already, therefore disregard my previous comments and stick
to the ones below. Sorry for the bikeshedding here.

Thanks,
Jow

> On 01/07/2016 01:40 AM, Tal Keren wrote:
>> This is necessary for controlling leds of RJ45 port, when one indicate the 
>> link
>> status and the other indicate data transfer.
>>
>> Signed-off-by: Tal Keren 
>> ---
>>  package/base-files/files/bin/config_generate   | 7 ---
>>  package/base-files/files/lib/functions/uci-defaults.sh | 2 ++
>>  2 files changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/package/base-files/files/bin/config_generate 
>> b/package/base-files/files/bin/config_generate
>> index 9218788..4f257e4 100755
>> --- a/package/base-files/files/bin/config_generate
>> +++ b/package/base-files/files/bin/config_generate
>> @@ -257,11 +257,12 @@ generate_led() {
>>  ;;
>>  
>>  netdev)
>> -local device
>> -json_get_vars device
>> +local device mode
>> +json_get_vars device mode
>> +[ -n "$mode" ] || mode='link tx rx'

Still remove this check/set.

>>  uci -q batch <<-EOF
>>  set system.$cfg.trigger='netdev'
>> -set system.$cfg.mode='link tx rx'
>> +set system.$cfg.mode='$mode'

Keep as you proposed already.

>>  set system.$cfg.dev='$device'
>>  EOF
>>  ;;
>> diff --git a/package/base-files/files/lib/functions/uci-defaults.sh 
>> b/package/base-files/files/lib/functions/uci-defaults.sh
>> index de3f180..c0ff98a 100755
>> --- a/package/base-files/files/lib/functions/uci-defaults.sh
>> +++ b/package/base-files/files/lib/functions/uci-defaults.sh
>> @@ -355,6 +355,7 @@ ucidef_set_led_netdev() {
>>  local name="$2"
>>  local sysfs="$3"
>>  local dev="$4"
>> +local mode="$5"
>>  
>>  json_select_object led
>>  
>> @@ -363,6 +364,7 @@ ucidef_set_led_netdev() {
>>  json_add_string type netdev
>>  json_add_string sysfs "$sysfs"
>>  json_add_string device "$dev"
>> +[ -n "$mode" ] && json_add_string mode "$mode"

Still remove the [ -n ... ] test and replace the line with
  json_add_string mode "${mode:-link tx rx}"

> 
>>  json_select ..
>>  
>>  json_select ..
>>
> ___
> 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 01/13] build metadata: Allow to build a subset of profiles in a single build

2016-01-19 Thread Felix Fietkau
On 2016-01-19 03:50, open...@daniel.thecshore.com wrote:
> From: Daniel Dickinson 
> 
> Certain platforms have large numbers of possible images, and it can be
> desirable to build neither all images nor only a single image,
> therefore this patch makes selecting target profiles a menu instead of a
> single choice, which allows the user to build a specific subset of all
> possible images for a target.
> 
> This patch contains only the build machinery changes to support
> selecting multiple images and the .config generator, but does
> not include profile changes that are needed to make selecting
> multiple profiles possible in menuconfig.
> 
> This is done to isolate the changes as much as possible, although
> obviously this patch touches a greaty many files due to changing
> the image generation logic (which is necessary in order to
> eliminate the single-valued PROFILE variable, which gets in the
> way of allowing multiple images to be built at once.
> 
> Signed-off-by: Daniel Dickinson 
> ---
> diff --git a/include/image.mk b/include/image.mk
> index 4eee4ad..bb46bb9 100644
> --- a/include/image.mk
> +++ b/include/image.mk
> @@ -192,7 +191,7 @@ ifneq ($(CONFIG_NAND_SUPPORT),)
>  # $(1) board name
>  # $(2) ubinize-image options (e.g. --uboot-env and/or --kernel kernelimage)
>  # $(3) rootfstype (e.g. squashfs or ubifs)
> -# $(4) options to pass-through to ubinize (i.e. $($(PROFILE)_UBI_OPTS)))
> +# $(4) options to pass-through to ubinize (i.e. $(_UBI_OPTS)))
> define Image/Build/UbinizeImage
>   sh $(TOPDIR)/scripts/ubinize-image.sh $(2) \
>   "$(KDIR)/root.$(3)" \
> @@ -203,12 +202,13 @@ ifneq ($(CONFIG_NAND_SUPPORT),)
>  endif
>  
>  ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
> +# $(1) profile
>  define Image/mkfs/ubifs/generate
>   $(CP) ./ubinize$(1).cfg $(KDIR)
>   ( cd $(KDIR); \
>   $(STAGING_DIR_HOST)/bin/ubinize \
> - $(if $($(PROFILE)_UBI_OPTS), \
> - $(shell echo $($(PROFILE)_UBI_OPTS)), \
> + $(if $($(1)_UBI_OPTS), \
> + $(shell echo $($(1)_UBI_OPTS)), \
>   $(shell echo $(UBI_OPTS)) \
>   ) \
>   -o $(KDIR)/root$(1).ubi \
> @@ -216,12 +216,13 @@ ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
>   )
>  endef
>  
> +# $(1) profile
>  define Image/mkfs/ubifs
>  
> -ifneq ($($(PROFILE)_UBIFS_OPTS)$(UBIFS_OPTS),)
> +ifneq ($($(1)_UBIFS_OPTS)$(UBIFS_OPTS),)
>   $(STAGING_DIR_HOST)/bin/mkfs.ubifs \
> - $(if $($(PROFILE)_UBIFS_OPTS), \
> - $(shell echo $($(PROFILE)_UBIFS_OPTS)), \
> + $(if $($(1)_UBIFS_OPTS), \
> + $(shell echo $($(1)_UBIFS_OPTS)), \
>   $(shell echo $(UBIFS_OPTS)) \
>   ) \
>   $(if 
> $(CONFIG_TARGET_UBIFS_FREE_SPACE_FIXUP),--space-fixup) \
> @@ -233,13 +234,13 @@ ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
>   -o $(KDIR)/root.ubifs \
>   -d $(TARGET_DIR)
>  endif
> - $(call Image/Build,ubifs)
> + $(call Image/Build,ubifs,$(1))
>  
> -ifneq ($($(PROFILE)_UBI_OPTS)$(UBI_OPTS),)
> +ifneq ($($(1)_UBI_OPTS)$(UBI_OPTS),)
>   $(if $(wildcard ./ubinize.cfg),$(call 
> Image/mkfs/ubifs/generate,))
>   $(if $(wildcard ./ubinize-overlay.cfg),$(call 
> Image/mkfs/ubifs/generate,-overlay))
>  endif
> - $(if $(wildcard ./ubinize.cfg),$(call Image/Build,ubi))
> + $(if $(wildcard ./ubinize.cfg),$(call Image/Build,ubi,$(1)))
>  endef
>  endif
>
Please don't add extra abstractions to this code. The
$(PROFILE)_UBI_OPTS stuff is legacy crap and any target still using it
should just stay that way and not get multi-profile selection until it
is converted to the new code.

> @@ -248,7 +249,8 @@ define Image/mkfs/cpiogz
>  endef
>  
>  define Image/mkfs/targz
> - $(TAR) -czpf $(BIN_DIR)/$(IMG_PREFIX)$(if 
> $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED))-rootfs.tar.gz --numeric-owner 
> --owner=0 --group=0 --sort=name -C $(TARGET_DIR)/ .
> +# Move to Image/Build to eliminate profile from mkfs
> + touch $(KDIR)/root.targz
>  endef
>  
>  E2SIZE=$(shell echo $$(($(CONFIG_TARGET_ROOTFS_PARTSIZE)*1024*1024)))
> @@ -293,6 +295,11 @@ define BuildImage/mkfs
>  
>  endef
>  
> +# $(1) profile
> +define Image/Build/targz
> + $(TAR) -czpf $(BIN_DIR)/$(IMG_PREFIX)$(if $(call sanitize,$(1)),-$(call 
> sanitize,$(1)))-rootfs.tar.gz --numeric-owner --owner=0 --group=0 --sort=name 
> -C $(TARGET_DIR)/ .
> +endef
> +
>  # Build commands that can be called from Device/* templates
>  define Build/uImage
>   mkimage -A $(LINUX_KARCH) \
> @@ -547,6 +554,12 @@ define Device
>  
>  endef
>  
> +# $(1) macro
> +# $(2) macro parameter
> +define BuildForProfiles
> +  $(foreach profile,$(PROFILES_BUILD),$(call 

Re: [OpenWrt-Devel] [PATCH 01/13] build metadata: Allow to build a subset of profiles in a single build

2016-01-19 Thread Daniel Dickinson

On 19/01/16 05:04 AM, Felix Fietkau wrote:

[snip]

[legacy UBI_OPTS targets]




Please don't add extra abstractions to this code. The
$(PROFILE)_UBI_OPTS stuff is legacy crap and any target still using it
should just stay that way and not get multi-profile selection until it
is converted to the new code.


Okay.


+# $(1) macro
+# $(2) macro parameter
+define BuildForProfiles
+  $(foreach profile,$(PROFILES_BUILD),$(call $(1),$(2),$(profile)))
+endef

Please don't call all the legacy Image/* code once per profile.
This will generate unnecessary duplicate files and extra build time.
If you rework targets to just stop using $(PROFILE) and check the
profile enabled/disabled variables directly, you don't need this at all.


I think doing that, particularly on targets such as ar71xx, turns this 
into a much broader reworking of profile/image system than I had planned 
on undertaking, or thought belonged in a single patch series.  See below.



diff --git a/include/target.mk b/include/target.mk
index f129298..92e52db 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -70,6 +70,11 @@ define Profile
DUMPINFO += \
echo "Target-Profile: $(1)"; \
echo "Target-Profile-Name: $(NAME)"; \
+   echo "Target-Profile-Type: $(if $(filter All,$(1)),all,$(if $(filter 
Minimal,$(1)),minimal,normal))"; \
+   echo "Target-Profile-Skip: $(if $(filter Default,$(1)),$(if 
$(PROFILE_SKIP_DEFAULT),1,0),$(if $(PROFILE_SKIP),1,0))"; \
+   echo "Target-Profile-Skip-Single: $(if $(filter All,$(1)),$(if 
$(PROFILE_SKIP_SINGLE),1,0),0)"; \
+   echo "Target-Profile-Default: $(if $(filter All,$(1)),1,$(if $(filter 
Default,$(1)),1,0))"; \
+   echo "Target-Profile-Build-If-All: $(if $(filter All,$(1)),0,$(if $(filter 
Minimal,$(1)),0,1))"; \

Please get rid of the magic flag setting based on the profile name. Make
these explicit by setting variables in the appropriate profiles.


Ok.


Also, the types and flags are rather confusing here. From the metadata
processing point of view, there should be nothing special about profiles
named 'Default' and 'Minimal' aside from a few simple distinctions:
There should be one profile that is enable by default
There should be a distinction between device profiles and profiles that
build all (or most) devices.
If you write the code to clearly handle the above, this should make the
rest of your patch less confusing.

Now that I read your patches again, I get the sense that I disagree with
part of your changes on a conceptual level. I think giving the
impression that selecting multiple entries in the profile list will
'Build multiple profiles' seems wrong to me, making the description
'Build all profiles' even more wrong. The code is not doing that,
because that would imply having a different package selection for every
profile build, and the build system can't do that.

I think a cleaner description would be building for all devices or a
subset of the devices on the list, and just not feed the impression that
it has that much to do with 'profiles' at all.

Essentially, this is nothing but a simple way to make an image that is
compatible with a specific set of devices, and we should present it to
the user that way.


I the confusion stems from that fact that in the past selecting a 
profile was how you picked what images to build, and so I thought of a 
profile as an 'image-selector' rather as in terms of the package sets 
the profiles select.


In fact as I pointed out in another email the profiles on the targets 
that have 'Default' or 'Generic' targets that build images for all 
profiles for the arch_subtarget end up all using the same rootfs, but do 
still generate distinct images, or in the case of brcm47xx one has a few 
sets of generic profiles that build multiple images each.


There are actually other moving parts to the 'profile/image' equation 
(which is my on ar71xx most profiles correspond to a single device's 
images), which include the per-image kernel and bootloader 'magic' (and 
I think if the correct terminology is used, the kernel and 'magic' to 
get images accepted by the bootloader is a per-image (or image family) 
piece rather than a per-profile piece.


There perhaps should really be an additional tier in the build selection 
so that instead of only talking about selecting profiles, one selects 
from generic profiles and then makes a sub-selection of images to build 
for a particular profile, and to get rid of the number of board-specific 
'profiles' that are each the same as the other except they invoke the 
magic for a specific board.


Some care needs to be take with platforms such as sunxi because of e.g. 
board-specific u-boot.  There is no reason the uboots can't all be 
built, but one probably doesn't want to build uboot for boards one is 
not using.


Regards,

Daniel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org

Re: [OpenWrt-Devel] [PATCH 01/13] build metadata: Allow to build a subset of profiles in a single build

2016-01-19 Thread Felix Fietkau
On 2016-01-19 12:21, Daniel Dickinson wrote:
>>> +# $(1) macro
>>> +# $(2) macro parameter
>>> +define BuildForProfiles
>>> +  $(foreach profile,$(PROFILES_BUILD),$(call $(1),$(2),$(profile)))
>>> +endef
>> Please don't call all the legacy Image/* code once per profile.
>> This will generate unnecessary duplicate files and extra build time.
>> If you rework targets to just stop using $(PROFILE) and check the
>> profile enabled/disabled variables directly, you don't need this at all.
> 
> I think doing that, particularly on targets such as ar71xx, turns this 
> into a much broader reworking of profile/image system than I had planned 
> on undertaking, or thought belonged in a single patch series.  See below.
I don't think it takes that much reworking, especially since targets
like ar71xx push so many build aspects through a small number of templates.
Since selecting "Default" already builds all of those images in one run,
I don't see any reason for adding multiple Image/Build/* calls per
profile. It's just a matter of reworking the target specific templates
in the right way.

>> Also, the types and flags are rather confusing here. From the metadata
>> processing point of view, there should be nothing special about profiles
>> named 'Default' and 'Minimal' aside from a few simple distinctions:
>> There should be one profile that is enable by default
>> There should be a distinction between device profiles and profiles that
>> build all (or most) devices.
>> If you write the code to clearly handle the above, this should make the
>> rest of your patch less confusing.
>>
>> Now that I read your patches again, I get the sense that I disagree with
>> part of your changes on a conceptual level. I think giving the
>> impression that selecting multiple entries in the profile list will
>> 'Build multiple profiles' seems wrong to me, making the description
>> 'Build all profiles' even more wrong. The code is not doing that,
>> because that would imply having a different package selection for every
>> profile build, and the build system can't do that.
>>
>> I think a cleaner description would be building for all devices or a
>> subset of the devices on the list, and just not feed the impression that
>> it has that much to do with 'profiles' at all.
>>
>> Essentially, this is nothing but a simple way to make an image that is
>> compatible with a specific set of devices, and we should present it to
>> the user that way.
> 
> I the confusion stems from that fact that in the past selecting a 
> profile was how you picked what images to build, and so I thought of a 
> profile as an 'image-selector' rather as in terms of the package sets 
> the profiles select.
> 
> In fact as I pointed out in another email the profiles on the targets 
> that have 'Default' or 'Generic' targets that build images for all 
> profiles for the arch_subtarget end up all using the same rootfs, but do 
> still generate distinct images, or in the case of brcm47xx one has a few 
> sets of generic profiles that build multiple images each.
> 
> There are actually other moving parts to the 'profile/image' equation 
> (which is my on ar71xx most profiles correspond to a single device's 
> images), which include the per-image kernel and bootloader 'magic' (and 
> I think if the correct terminology is used, the kernel and 'magic' to 
> get images accepted by the bootloader is a per-image (or image family) 
> piece rather than a per-profile piece.
> 
> There perhaps should really be an additional tier in the build selection 
> so that instead of only talking about selecting profiles, one selects 
> from generic profiles and then makes a sub-selection of images to build 
> for a particular profile, and to get rid of the number of board-specific 
> 'profiles' that are each the same as the other except they invoke the 
> magic for a specific board.
I think that makes sense, but that kind of rework doesn't have to be
done as part of the patch series we're discussing here. Let's just defer
that piece of the discussion, since it would lead to much more intrusive
changes.

> Some care needs to be take with platforms such as sunxi because of e.g. 
> board-specific u-boot.  There is no reason the uboots can't all be 
> built, but one probably doesn't want to build uboot for boards one is 
> not using.
Then let's just leave out multi-profile selection for sunxi for now.
We should start simple and mostly stick to the platforms that matter
most, e.g. ar71xx, ramips, etc.
I think multi-profile selection should simply be opt-in per target.

- Felix
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [CC] ramips: HiLink HLK-RM04 image name typo (RM02 -> RM04)

2016-01-19 Thread John Clark
The image name for the HiLink HLK-RM04 module has a typo and should read "RM04" 
rather than "RM02"

Backport of r48355

Signed-off-by: John Clark 
---
 target/linux/ramips/image/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ramips/image/Makefile 
b/target/linux/ramips/image/Makefile
index 0dd46ca..0d762ba 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -546,7 +546,7 @@ define BuildFirmware/HLKRM04/initramfs
$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3),$(4))
mkhilinkfw -e -i$(call imgname,$(1),$(2))-uImage.bin -o $(call 
imgname,$(1),$(2))-factory.bin;
 endef
-Image/Build/Profile/HLKRM04=$(call 
BuildFirmware/HLKRM04/$(1),$(1),hlk-rm04,HLKRM04,HLK-RM02)
+Image/Build/Profile/HLKRM04=$(call 
BuildFirmware/HLKRM04/$(1),$(1),hlk-rm04,HLKRM04,HLK-RM04)
 
 Image/Build/Profile/HT-TM02=$(call 
BuildFirmware/Default8M/$(1),$(1),ht-tm02,HT-TM02)
 
-- 
2.4.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 3/4] firmware-utils: kernel image generator for TP-Link RE450

2016-01-19 Thread Tal Keren
On 19/01/2016 11:30, John Crispin wrote:
> can this not be merged into one of the other tplink tools ?
>
>

That is what I initially did, add a flag for this case. But then I had to 
disable about 3/4 of the original code with if/else for this case. It doesn't 
use most of the functionally that mktplinkfw provides (It doesn't search for 
and use the flash layout, it doesn't write the jffs section, it doesn't write 
most of the fields in the header, it ignores some of the flags because they are 
irrelevant for it).

So I think that creating a new and (very) stripped down version of it is 
simpler.

For reference, this is my original patch. What do you think that is better?


--- a/tools/firmware-utils/src/mktplinkfw.c
+++ b/tools/firmware-utils/src/mktplinkfw.c
@@ -154,6 +154,7 @@ static uint32_t rootfs_ofs = 0;
 static uint32_t rootfs_align;
 static struct file_info boot_info;
 static int combined;
+static int kernel_only;
 static int strip_padding;
 static int ignore_size;
 static int add_jffs2_eof;
@@ -518,6 +519,7 @@ static void usage(int status)
 "Options:\n"
 "  -B   create image for the board specified with \n"
 "  -c  use combined kernel image\n"
+"  -K  make image with only kernel\n"
 "  -E  overwrite kernel entry point with  (hexval prefixed 
with 0x)\n"
 "  -L  overwrite kernel load address with  (hexval prefixed 
with 0x)\n"
 "  -Huse hardware id specified with \n"
@@ -613,54 +615,61 @@ static int check_options(void)
 return -1;
 }
 
-if (board_id == NULL && opt_hw_id == NULL) {
-ERR("either board or hardware id must be specified");
-return -1;
-}
-
-if (board_id) {
-board = find_board(board_id);
-if (board == NULL) {
-ERR("unknown/unsupported board id \"%s\"", board_id);
+if (kernel_only) {
+if (!kernel_la || !kernel_ep) {
+ERR("kernel loading address and entry point must be specified");
 return -1;
 }
-if (layout_id == NULL)
-layout_id = board->layout_id;
-
-hw_id = board->hw_id;
-hw_rev = board->hw_rev;
 } else {
-if (layout_id == NULL) {
-ERR("flash layout is not specified");
+if (board_id == NULL && opt_hw_id == NULL) {
+ERR("either board or hardware id must be specified");
 return -1;
 }
-hw_id = strtoul(opt_hw_id, NULL, 0);
 
-if (opt_hw_rev)
-hw_rev = strtoul(opt_hw_rev, NULL, 0);
-else
-hw_rev = 1;
-}
+if (board_id) {
+board = find_board(board_id);
+if (board == NULL) {
+ERR("unknown/unsupported board id \"%s\"", board_id);
+return -1;
+}
+if (layout_id == NULL)
+layout_id = board->layout_id;
 
-layout = find_layout(layout_id);
-if (layout == NULL) {
-ERR("unknown flash layout \"%s\"", layout_id);
-return -1;
-}
+hw_id = board->hw_id;
+hw_rev = board->hw_rev;
+} else {
+if (layout_id == NULL) {
+ERR("flash layout is not specified");
+return -1;
+}
+hw_id = strtoul(opt_hw_id, NULL, 0);
 
-if (!kernel_la)
-kernel_la = layout->kernel_la;
-if (!kernel_ep)
-kernel_ep = layout->kernel_ep;
-if (!rootfs_ofs)
-rootfs_ofs = layout->rootfs_ofs;
+if (opt_hw_rev)
+hw_rev = strtoul(opt_hw_rev, NULL, 0);
+else
+hw_rev = 1;
+}
 
-if (reserved_space > layout->fw_max_len) {
-ERR("reserved space is not valid");
-return -1;
-}
+layout = find_layout(layout_id);
+if (layout == NULL) {
+ERR("unknown flash layout \"%s\"", layout_id);
+return -1;
+}
 
-fw_max_len = layout->fw_max_len - reserved_space;
+if (!kernel_la)
+kernel_la = layout->kernel_la;
+if (!kernel_ep)
+kernel_ep = layout->kernel_ep;
+if (!rootfs_ofs)
+rootfs_ofs = layout->rootfs_ofs;
+
+if (reserved_space > layout->fw_max_len) {
+ERR("reserved space is not valid");
+return -1;
+}
+
+fw_max_len = layout->fw_max_len - reserved_space;
+}
 
 if (kernel_info.file_name == NULL) {
 ERR("no kernel image specified");
@@ -673,50 +682,52 @@ static int check_options(void)
 
 kernel_len = kernel_info.file_size;
 
-if (combined) {
-exceed_bytes = kernel_info.file_size - (fw_max_len - sizeof(struct 
fw_header));
-if (exceed_bytes > 0) {
-if (!ignore_size) {
-ERR("kernel image is too big by %i bytes", exceed_bytes);
-return -1;
-}
-layout->fw_max_len = sizeof(struct fw_header) +
- kernel_info.file_size +
-   

[OpenWrt-Devel] [PATCH] lantiq: Enable the uImage mtd splitter

2016-01-19 Thread Martin Blumenstingl
Until linux 4.1 the lantiq target used CONFIG_MTD_UIMAGE_SPLIT=y. That
option however is only available until linux 4.3 - thus it was not added
to lantiq's 4.4 kernel config (in r48307). This results in broken images
for devices which are using uImages. This fixes #21652

Signed-off-by: Martin Blumenstingl 
---
 target/linux/lantiq/config-4.4 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/lantiq/config-4.4 b/target/linux/lantiq/config-4.4
index 8943c6f..08a1228 100644
--- a/target/linux/lantiq/config-4.4
+++ b/target/linux/lantiq/config-4.4
@@ -141,6 +141,7 @@ CONFIG_MTD_SPLIT_BRNIMAGE_FW=y
 CONFIG_MTD_SPLIT_EVA_FW=y
 CONFIG_MTD_SPLIT_FIRMWARE=y
 CONFIG_MTD_SPLIT_TPLINK_FW=y
+CONFIG_MTD_SPLIT_UIMAGE_FW=Y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_PER_CPU_KM=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
-- 
2.7.0
___
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 Netgear EX2700

2016-01-19 Thread Joseph C. Lehner
This patch adds support for the Netgear EX2700 and builds an approriate 
sysupgrade image. 

What's missing is the option to build a factory image flashable via the 
router's stock web interface, but this approach is hindered by the fact 
that u-boot operforms an additional integrity check, which expects a 
uImage header in the last 64 bytes of the "kernel" partition, which
the bootloader expects to be 960k, a size exceeded by the standard 
OpenWrt kernel.

Signed-off-by: Joseph C. Lehner 

---

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 c3a81a4..62478f0 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -121,6 +121,10 @@ dir-615-h1)
 dir-620-d1)
set_wifi_led "$board:green:wifi"
;;
+ex2700)
+   ucidef_set_led_default "power_r" "POWER (red)" "$board:red:power" "0"
+   set_wifi_led "$board:router:green"
+   ;;
 dir-810l|\
 mzk-dp150n)
ucidef_set_led_default "power" "power" "$board:green:power" "1"
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 dafa3e9..9853729 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -141,7 +141,8 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9@eth0"
;;
-   cf-wr800n)
+   cf-wr800n|\
+   ex2700)
ucidef_add_switch "switch0" \
"4:lan" "6t@eth0"
;;
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index acc500b..59c5965 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -34,6 +34,7 @@ get_status_led() {
a5-v11|\
d105|\
dcs-930l-b1|\
+   ex2700|\
hlk-rm04|\
mpr-a1|\
mpr-a2)
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 8025a40..aed8350 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -154,6 +154,9 @@ ramips_board_detect() {
*"ESR-9753")
name="esr-9753"
;;
+   *"EX2700")
+   name="ex2700";
+   ;;
*"F5D8235 v1")
name="f5d8235-v1"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 39b5f94..78edd22 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -51,6 +51,7 @@ platform_check_image() {
dir-810l|\
e1700|\
esr-9753|\
+   ex2700|\
f7c027|\
firewrt|\
fonera20n|\
diff --git a/target/linux/ramips/dts/EX2700.dts 
b/target/linux/ramips/dts/EX2700.dts
new file mode 100644
index 000..b63949a
--- /dev/null
+++ b/target/linux/ramips/dts/EX2700.dts
@@ -0,0 +1,153 @@
+/*
+ * Device Tree file for the Netgear EX2700
+ *
+ * Copyright (C) 2016 Joseph C. Lehner 
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+/dts-v1/;
+
+/include/ "mt7620a.dtsi"
+
+/ {
+   compatible = "ralink,mt7620a-soc";
+   model = "Netgear EX2700";
+
+   chosen {
+   bootargs = "console=ttyS0,57600";
+   };
+
+   palmbus@1000 {
+
+   gpio0: gpio@600 {
+   status = "okay";
+   };
+
+   gpio1: gpio@638 {
+   status = "okay";
+   };
+
+   spi@b00 {
+   status = "okay";
+
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "jedec,spi-nor";
+   reg = <0 0>;
+   linux,modalias = "m25p80", "mx25l3205d";
+   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;
+ 

[OpenWrt-Devel] [PATCH 2/3] kernel: video: add fbcon support

2016-01-19 Thread Tim Harvey
Signed-off-by: Tim Harvey 
---
v4: no changes
v3: no changes
v2:
- add fb dependency
- disable unsupported fb's
---
 package/kernel/linux/modules/video.mk | 49 ++-
 1 file changed, 48 insertions(+), 1 deletion(-)

diff --git a/package/kernel/linux/modules/video.mk 
b/package/kernel/linux/modules/video.mk
index 0fcacb2..b1a8532 100644
--- a/package/kernel/linux/modules/video.mk
+++ b/package/kernel/linux/modules/video.mk
@@ -15,7 +15,10 @@ define KernelPackage/fb
   SUBMENU:=$(VIDEO_MENU)
   TITLE:=Framebuffer support
   DEPENDS:=@DISPLAY_SUPPORT
-  KCONFIG:=CONFIG_FB
+  KCONFIG:= \
+   CONFIG_FB \
+   CONFIG_FB_MXS=n \
+   CONFIG_FB_SM750=n
   FILES:=$(LINUX_DIR)/drivers/video/fbdev/core/fb.ko
   AUTOLOAD:=$(call AutoLoad,06,fb)
 endef
@@ -31,6 +34,50 @@ endef
 
 $(eval $(call KernelPackage,fb))
 
+
+define KernelPackage/fbcon
+  SUBMENU:=$(VIDEO_MENU)
+  TITLE:=Framebuffer Console support
+  DEPENDS:=+kmod-fb
+  KCONFIG:= \
+   CONFIG_FRAMEBUFFER_CONSOLE \
+   CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y \
+   CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y \
+   CONFIG_FONTS=y \
+   CONFIG_FONT_8x8=y \
+   CONFIG_FONT_8x16=y \
+   CONFIG_FONT_6x11=n \
+   CONFIG_FONT_7x14=n \
+   CONFIG_FONT_PEARL_8x8=n \
+   CONFIG_FONT_ACORN_8x8=n \
+   CONFIG_FONT_MINI_4x6=n \
+   CONFIG_FONT_6x10=n \
+   CONFIG_FONT_SUN8x16=n \
+   CONFIG_FONT_SUN12x22=n \
+   CONFIG_FONT_10x18=n \
+   CONFIG_VT=y \
+   CONFIG_CONSOLE_TRANSLATIONS=y \
+   CONFIG_VT_CONSOLE=y \
+   CONFIG_VT_HW_CONSOLE_BINDING=y
+  $(call AddDepends/fb)
+  FILES:= \
+   $(LINUX_DIR)/drivers/video/console/bitblit.ko \
+   $(LINUX_DIR)/drivers/video/console/softcursor.ko \
+   $(LINUX_DIR)/drivers/video/console/fbcon.ko \
+   $(LINUX_DIR)/drivers/video/console/fbcon_rotate.ko \
+   $(LINUX_DIR)/drivers/video/console/fbcon_cw.ko \
+   $(LINUX_DIR)/drivers/video/console/fbcon_ud.ko \
+   $(LINUX_DIR)/drivers/video/console/fbcon_ccw.ko \
+   $(LINUX_DIR)/lib/fonts/font.ko
+  AUTOLOAD:=$(call AutoLoad,94,font softcursor tileblit fbcon_cw fbcon_ud 
fbcon_ccw fbcon_rotate bitblit fbcon)
+endef
+
+define KernelPackage/fbcon/description
+  Kernel support for framebuffer console
+endef
+
+$(eval $(call KernelPackage,fbcon))
+
 define KernelPackage/fb-cfb-fillrect
   SUBMENU:=$(VIDEO_MENU)
   TITLE:=Framebuffer software rectangle filling support
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v4 0/3] Add DRM video output support for IMX6

2016-01-19 Thread Tim Harvey
This series adds DRM based video output support for IMX6 HDMI and LVDS.

The first 2 patches are independent from the others and add some necessary
or useful deps for video display.

The 3rd patch adds drm core and drm-imx modules supporting LVDS/HDMI. Note
that currently you need to add modules for both hdmi and lvds for either to
work (not clear why yet).

These were tested on Gateworks Ventana boards, using the 4.4 kernel
using fbcon, psplash, and gstreamer1 with fbdevsink output.

Tim Harvey (3):
  kernel: add backlight kernel module support
  kernel: video: add fbcon support
  kernel: video: add DRM core and IMX DRM support for HDMI/LVDS

 package/kernel/linux/modules/backlight.mk |  49 +++
 package/kernel/linux/modules/video.mk | 224 +-
 2 files changed, 272 insertions(+), 1 deletion(-)
 create mode 100644 package/kernel/linux/modules/backlight.mk

-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] oxnas: finally make board names consistent

2016-01-19 Thread Daniel Golle
r48337 unfortunately incorrectly changed the boardname of the stg212
into stg-212 which is not the name of the image of DTS file or
boardname using sysupgrade, which is 'stg212' and imho should stay
that way.
The changes r48337 made for pogoplug-pro and pogoplug-v3 were correct,
thus this commit only partially reverts r48337.
Also properly set default for USB LED while already at it.

Signed-off-by: Daniel Golle 
---
 target/linux/oxnas/base-files/etc/board.d/01_leds | 4 ++--
 target/linux/oxnas/base-files/etc/diag.sh | 2 +-
 target/linux/oxnas/base-files/lib/oxnas.sh| 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/target/linux/oxnas/base-files/etc/board.d/01_leds 
b/target/linux/oxnas/base-files/etc/board.d/01_leds
index f29ccff..af565d7 100755
--- a/target/linux/oxnas/base-files/etc/board.d/01_leds
+++ b/target/linux/oxnas/base-files/etc/board.d/01_leds
@@ -7,9 +7,9 @@ board=$(oxnas_board_name)
 board_config_update
 
 case $board in
-   stg-212)
+   stg212)
ucidef_set_led_default "power" "power" "zyxel:blue:status" "1"
-   ucidef_set_led_usbdev "usb" "USB" "$1" "1-1"
+   ucidef_set_led_usbdev "usb" "USB" "zyxel:orange:copy" "1-1"
;;
kd20)
ucidef_set_led_default "power" "power" "kd20:blue:status" "1"
diff --git a/target/linux/oxnas/base-files/etc/diag.sh 
b/target/linux/oxnas/base-files/etc/diag.sh
index 8f484ae..5aec796 100644
--- a/target/linux/oxnas/base-files/etc/diag.sh
+++ b/target/linux/oxnas/base-files/etc/diag.sh
@@ -6,7 +6,7 @@
 
 get_status_led() {
case $(oxnas_board_name) in
-   stg-212)
+   stg212)
status_led="zyxel:blue:status"
;;
kd20)
diff --git a/target/linux/oxnas/base-files/lib/oxnas.sh 
b/target/linux/oxnas/base-files/lib/oxnas.sh
index 2a07928..8ae5fbb 100755
--- a/target/linux/oxnas/base-files/lib/oxnas.sh
+++ b/target/linux/oxnas/base-files/lib/oxnas.sh
@@ -14,7 +14,7 @@ oxnas_board_detect() {
 
case "$machine" in
*"MitraStar Technology Corp. STG-212"*)
-   name="stg-212"
+   name="stg212"
;;
*"Shuttle KD20"*)
name="kd20"
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/3] kernel: video: add DRM core and IMX DRM support for HDMI/LVDS

2016-01-19 Thread Tim Harvey
v4:
 - update depends for 4.4
 - fix submenu
 - add CONFIG_DRM_DW_HDMI_AHB_AUDIO for i.mx6 HDMI driver
 - add new dependency caused by above point to HDMI driver
v3:
 - updated for Linux 4.3
v2:
 - fixed whitespace
 - added TARGET_imx6 to imx6-drm

Signed-off-by: Tim Harvey 
---
 package/kernel/linux/modules/video.mk | 175 ++
 1 file changed, 175 insertions(+)

diff --git a/package/kernel/linux/modules/video.mk 
b/package/kernel/linux/modules/video.mk
index b1a8532..df7ff0a 100644
--- a/package/kernel/linux/modules/video.mk
+++ b/package/kernel/linux/modules/video.mk
@@ -11,6 +11,10 @@ VIDEO_MENU:=Video Support
 V4L2_DIR=v4l2-core
 V4L2_USB_DIR=usb
 
+#
+# Video Display
+#
+
 define KernelPackage/fb
   SUBMENU:=$(VIDEO_MENU)
   TITLE:=Framebuffer support
@@ -109,6 +113,10 @@ endef
 
 $(eval $(call KernelPackage,fb-cfb-copyarea))
 
+define AddDepends/fb-cfb-copyarea
+  DEPENDS+=kmod-fb-cfb-copyarea $(1)
+endef
+
 define KernelPackage/fb-cfb-imgblt
   SUBMENU:=$(VIDEO_MENU)
   TITLE:=Framebuffer software image blit support
@@ -124,6 +132,173 @@ endef
 
 $(eval $(call KernelPackage,fb-cfb-imgblt))
 
+define AddDepends/fb-cfb-imgblt
+  DEPENDS+=kmod-fb-cfb-imgblt $(1)
+endef
+
+
+define KernelPackage/fb-sys-fops
+  SUBMENU:=$(VIDEO_MENU)
+  TITLE:=Framebuffer software sys ops support
+  DEPENDS:=+kmod-fb
+  KCONFIG:=CONFIG_FB_SYS_FOPS
+  FILES:=$(LINUX_DIR)/drivers/video/fbdev/core/fb_sys_fops.ko
+  AUTOLOAD:=$(call AutoLoad,07,fbsysfops)
+endef
+
+define KernelPackage/fb-sys-fops/description
+ Kernel support for framebuffer sys ops
+endef
+
+$(eval $(call KernelPackage,fb-sys-fops))
+
+define AddDepends/fb-sys-fops
+  DEPENDS+=kmod-fb-sys-fops $(1)
+endef
+
+
+define KernelPackage/drm
+  SUBMENU:=$(VIDEO_MENU)
+  TITLE:=Direct Rendering Manager (DRM) support
+  KCONFIG:=CONFIG_DRM \
+   CONFIG_DRM_FBDEV_EMULATION=n \
+   CONFIG_DRM_LOAD_EDID_FIRMWARE=n \
+   CONFIG_DRM_IMX=n \
+   CONFIG_DRM_PTN3460=n \
+   CONFIG_DRM_PS8622=n \
+   CONFIG_DRM_TDFX=n \
+   CONFIG_DRM_R128=n \
+   CONFIG_DRM_RADEON=n \
+   CONFIG_DRM_AMDGPU=n \
+   CONFIG_DRM_NOUVEAU=n \
+   CONFIG_DRM_MGA=n \
+   CONFIG_DRM_VIA=n \
+   CONFIG_DRM_SAVAGE=n \
+   CONFIG_DRM_VGEM=n \
+   CONFIG_DRM_EXYNOS=n \
+   CONFIG_DRM_VMWGFX=n \
+   CONFIG_DRM_UDL=n \
+   CONFIG_DRM_AST=n \
+   CONFIG_DRM_MGAG200=n \
+   CONFIG_DRM_CIRRUS_QEMU=n \
+   CONFIG_DRM_ARMADA=n \
+   CONFIG_DRM_TILCDC=n \
+   CONFIG_DRM_QXL=n \
+   CONFIG_DRM_BOCHS=n \
+   CONFIG_DRM_FSL_DCU=n \
+   CONFIG_DRM_STI=n \
+   CONFIG_DRM_NXP_PTN3460=n \
+   CONFIG_DRM_PARADE_PS8622=n \
+   CONFIG_DRM_I2C_ADV7511=n \
+   CONFIG_DRM_I2C_CH7006=n \
+   CONFIG_DRM_I2C_SIL164=n \
+   CONFIG_DRM_I2C_NXP_TDA998X=n
+  FILES:=$(LINUX_DIR)/drivers/gpu/drm/drm.ko
+  AUTOLOAD:=$(call AutoLoad,05,drm)
+endef
+
+define KernelPackage/drm/description
+  Direct Rendering Manager (DRM) core support
+endef
+
+$(eval $(call KernelPackage,drm))
+
+define AddDepends/drm
+  DEPENDS+=kmod-drm $(1)
+endef
+
+define KernelPackage/drm-imx
+  SUBMENU:=$(VIDEO_MENU)
+  TITLE:=Freescale i.MX DRM support
+  DEPENDS:=@TARGET_imx6 +kmod-fb +kmod-fb-cfb-copyarea +kmod-fb-cfb-imgblt 
+kmod-fb-cfb-fillrect +kmod-fb-sys-fops
+  KCONFIG:=CONFIG_DRM_IMX=m \
+   CONFIG_DRM_FBDEV_EMULATION=y \
+   CONFIG_IMX_IPUV3_CORE=m \
+   CONFIG_RESET_CONTROLLER=y \
+   CONFIG_DRM_IMX_IPUV3 \
+   CONFIG_IMX_IPUV3 \
+   CONFIG_DRM_KMS_HELPER \
+   CONFIG_FB_SYS_FILLRECT \
+   CONFIG_FB_SYS_COPYAREA \
+   CONFIG_FB_SYS_IMAGEBLIT \
+   CONFIG_DRM_KMS_FB_HELPER=y \
+   CONFIG_DRM_GEM_CMA_HELPER=y \
+   CONFIG_DRM_KMS_CMA_HELPER=y \
+   CONFIG_DRM_IMX_FB_HELPER \
+   CONFIG_DRM_IMX_PARALLEL_DISPLAY=n \
+   CONFIG_DRM_IMX_TVE=n \
+   CONFIG_DRM_IMX_LDB=n \
+   CONFIG_DRM_IMX_HDMI=n
+  FILES:= \
+   $(LINUX_DIR)/drivers/gpu/drm/imx/imxdrm.ko \
+   $(LINUX_DIR)/drivers/gpu/ipu-v3/imx-ipu-v3.ko \
+   $(LINUX_DIR)/drivers/gpu/drm/imx/imx-ipuv3-crtc.ko \
+   $(LINUX_DIR)/drivers/video/fbdev/core/syscopyarea.ko \
+   $(LINUX_DIR)/drivers/video/fbdev/core/sysfillrect.ko \
+   $(LINUX_DIR)/drivers/video/fbdev/core/sysimgblt.ko \
+   $(LINUX_DIR)/drivers/gpu/drm/drm_kms_helper.ko
+  AUTOLOAD:=$(call AutoLoad,05,imxdrm imx-ipu-v3 imx-ipuv3-crtc)
+  $(call AddDepends/drm)
+endef
+
+define KernelPackage/drm-imx/description
+  Direct Rendering Manager (DRM) support for Freescale i.MX
+endef
+
+$(eval $(call KernelPackage,drm-imx))
+
+define AddDepends/drm-imx
+  DEPENDS+=kmod-drm-imx $(1)
+endef
+
+define KernelPackage/drm-imx-hdmi
+  SUBMENU:=$(VIDEO_MENU)
+  TITLE:=Freescale i.MX HDMI DRM support
+  DEPENDS:=+kmod-sound-core
+  KCONFIG:=CONFIG_DRM_IMX_HDMI=m \
+   CONFIG_DRM_DW_HDMI_AHB_AUDIO=m
+  FILES:= \
+   $(LINUX_DIR)/drivers/gpu/drm/bridge/dw_hdmi.ko \
+   

[OpenWrt-Devel] [PATCH 1/3] kernel: add backlight kernel module support

2016-01-19 Thread Tim Harvey
Signed-off-by: Tim Harvey 
---
v4: no changes
v3: added support for Linux 4.3 (new driver needs to be disabled by default)
v2: no changes
---
 package/kernel/linux/modules/backlight.mk | 49 +++
 1 file changed, 49 insertions(+)
 create mode 100644 package/kernel/linux/modules/backlight.mk

diff --git a/package/kernel/linux/modules/backlight.mk 
b/package/kernel/linux/modules/backlight.mk
new file mode 100644
index 000..62aedaa
--- /dev/null
+++ b/package/kernel/linux/modules/backlight.mk
@@ -0,0 +1,49 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+BACKLIGHT_MENU:=Video Support
+
+define KernelPackage/backlight
+   SUBMENU:=$(BACKLIGHT_MENU)
+   TITLE:=Backlight support
+   KCONFIG:=CONFIG_BACKLIGHT_CLASS_DEVICE=m \
+   CONFIG_BACKLIGHT_LCD_SUPPORT=y \
+   CONFIG_LCD_CLASS_DEVICE=n \
+   CONFIG_BACKLIGHT_PWM=n \
+   CONFIG_BACKLIGHT_GENERIC=n \
+   CONFIG_BACKLIGHT_ADP8860=n \
+   CONFIG_BACKLIGHT_ADP8870=n \
+   CONFIG_BACKLIGHT_PM8941_WLED=n
+   FILES:=$(LINUX_DIR)/drivers/video/backlight/backlight.ko
+   AUTOLOAD:=$(call AutoProbe,video backlight)
+endef
+
+define KernelPackage/backlight/description
+   Kernel module for Backlight support.
+endef
+
+$(eval $(call KernelPackage,backlight))
+
+define AddDepends/backlight
+   SUBMENU:=$(BACKLIGHT_MENU)
+   DEPENDS+=kmod-backlight $(1)
+endef
+
+define KernelPackage/backlight-pwm
+   TITLE:=PWM Backlight support
+   DEPENDS:=+kmod-pwm
+   KCONFIG:=CONFIG_BACKLIGHT_PWM=m
+   FILES:=$(LINUX_DIR)/drivers/video/backlight/pwm_bl.ko
+   AUTOLOAD:=$(call AutoProbe,video pwm_bl)
+   $(call AddDepends/backlight)
+endef
+
+define KernelPackage/backlight/backlight-pwm
+   Kernel module for PWM based Backlight support.
+endef
+
+$(eval $(call KernelPackage,backlight-pwm))
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] lantiq: Fix enabling CONFIG_MTD_UIMAGE_SPLIT

2016-01-19 Thread Martin Blumenstingl
r48381 added CONFIG_MTD_SPLIT_UIMAGE_FW=Y to the lantiq kernel
configuration. That unfortunately contains a typo since the "y" has to
be lower-case. This leads to the kernel asking whether the config
symbol should be enabled and thus breaking the build.

FIXES: r48381/feab990887b4: lantiq: Enable the uImage mtd splitter
Signed-off-by: Martin Blumenstingl 
---
 target/linux/lantiq/config-4.4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/lantiq/config-4.4 b/target/linux/lantiq/config-4.4
index 08a1228..5d4b7cc 100644
--- a/target/linux/lantiq/config-4.4
+++ b/target/linux/lantiq/config-4.4
@@ -141,7 +141,7 @@ CONFIG_MTD_SPLIT_BRNIMAGE_FW=y
 CONFIG_MTD_SPLIT_EVA_FW=y
 CONFIG_MTD_SPLIT_FIRMWARE=y
 CONFIG_MTD_SPLIT_TPLINK_FW=y
-CONFIG_MTD_SPLIT_UIMAGE_FW=Y
+CONFIG_MTD_SPLIT_UIMAGE_FW=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_PER_CPU_KM=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] qos-scripts: Fix classification of ingress traffic

2016-01-19 Thread Michael Marley
Set the save-mark mask for the qos_${cg} chain to 0xff instead of
0xf0.  With the old value, the nibble that was saved would be
masked during the restore, preventing ingress traffic from being
classified.  Thanks to nbd for recommending the fix.

Signed-off-by: Michael Marley 
---
 package/network/config/qos-scripts/files/usr/lib/qos/generate.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh 
b/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh
index 8d22b67..caa1125 100755
--- a/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh
+++ b/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh
@@ -427,7 +427,7 @@ ${iptrules:+${iptrules}${N}iptables -t mangle -A 
qos_${cg}_ct -j CONNMARK --save
 iptables -t mangle -A qos_${cg} -j CONNMARK --restore-mark --mask 0x0f
 iptables -t mangle -A qos_${cg} -m mark --mark 0/0x0f -j qos_${cg}_ct
 $pktrules
-${iptrules:+${iptrules}${N}iptables -t mangle -A qos_${cg} -j CONNMARK 
--save-mark --mask 0xf0}
+${iptrules:+${iptrules}${N}iptables -t mangle -A qos_${cg} -j CONNMARK 
--save-mark --mask 0xff}
 $up$N${down:+${down}$N}
 EOF
unset INSMOD
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] qos-scripts: Allow classification by the traffic's source interface

2016-01-19 Thread Michael Marley
This adds a "srciface" option that can be used on classification
rules in /etc/config/qos.  This is useful to allow prioritization
based on the local network from which the traffic originates, for
example to deprioritize traffic from a guest network.

Signed-off-by: Michael Marley 
---
 package/network/config/qos-scripts/files/usr/lib/qos/generate.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh 
b/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh
index 8d22b67..67988fa 100755
--- a/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh
+++ b/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh
@@ -141,6 +141,9 @@ parse_matching_rule() {
append "$var" "-i $device"
fi
;;
+   *:srciface)
+   append "$var" "-i $value"
+   ;;
1:pktsize)
value="$(echo "$value" | sed -e 's,-,:,g')"
add_insmod xt_length
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] build: mkits.sh: Add ramdsik support

2016-01-19 Thread Jason Wu
mkits.ssh helper currently does not support ramdisk node support. To add
ramdisk suppport, we add extra two additional options -r and -z to
specify the ramdisk image and compression type.

Signed-off-by: Jason Wu 

diff --git a/include/image.mk b/include/image.mk
index 4eee4ad..84307cf 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -126,7 +126,7 @@ endef
 define Image/BuildKernel/MkFIT
$(TOPDIR)/scripts/mkits.sh \
-D $(1) -o $(KDIR)/fit-$(1).its -k $(2) $(if $(3),-d $(3)) -C 
$(4) -a $(5) -e $(6) \
-   -A $(ARCH) -v $(LINUX_VERSION)
+   -A $(ARCH) -v $(LINUX_VERSION) $(if $(8),-r $(8)) $(if $(9),-z 
$(9))
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $(KDIR)/fit-$(1).its 
$(KDIR)/fit-$(1)$(7).itb
 endef
 
diff --git a/scripts/mkits.sh b/scripts/mkits.sh
index 6b5100e..2b00d0f 100755
--- a/scripts/mkits.sh
+++ b/scripts/mkits.sh
@@ -25,11 +25,13 @@ usage() {
echo -e "\t-k ==> include kernel image 'kernel'"
echo -e "\t-D ==> human friendly Device Tree Blob 'name'"
echo -e "\t-d ==> include Device Tree Blob 'dtb'"
+   echo -e "\t-r ==> include ramdisk"
+   echo -e "\t-z ==> ramdisk compression type"
echo -e "\t-o ==> create output file 'its_file'"
exit 1
 }
 
-while getopts ":A:a:C:D:d:e:k:o:v:" OPTION
+while getopts ":A:a:C:D:d:e:k:o:v:r:z:" OPTION
 do
case $OPTION in
A ) ARCH=$OPTARG;;
@@ -41,6 +43,8 @@ do
k ) KERNEL=$OPTARG;;
o ) OUTPUT=$OPTARG;;
v ) VERSION=$OPTARG;;
+   r ) RAMDISK=$OPTARG;;
+   z ) RD_COMPRESS=$OPTARG;;
* ) echo "Invalid option passed to '$0' (options:$@)"
usage;;
esac
@@ -72,6 +76,34 @@ if [ -n "${DTB}" ]; then
};
};
 "
+   CONF="  fdt = \"fdt@1\";"
+fi
+
+# Conditionally create ramdisk node
+if [ -n "${RAMDISK}" ]; then
+   RD_COMPRESS=${RD_COMPRESS:-none}
+   RD="
+   ramdisk@1 {
+   description = \"${ARCH_UPPER} OpenWrt ${DEVICE} 
ramdisk\";
+   data = /incbin/(\"${RAMDISK}\");
+   type = \"ramdisk\";
+   arch = \"${ARCH}\";
+   os = \"linux\";
+   compression = \"${RD_COMPRESS}\";
+   hash@1 {
+   algo = \"crc32\";
+   };
+   hash@2 {
+   algo = \"sha1\";
+   };
+   };
+"
+   if [ -z "${CONF}" ]; then
+   CONF="  ramdisk = \"ramdisk@1\";"
+   else
+   CONF="$CONF
+   ramdisk = \"ramdisk@1\";"
+   fi
 fi
 
 # Create a default, fully populated DTS file
@@ -99,6 +131,7 @@ DATA="/dts-v1/;
};
};
 
+${RD}
 ${FDT}
 
};
@@ -108,7 +141,7 @@ ${FDT}
config@1 {
description = \"OpenWrt\";
kernel = \"kernel@1\";
-   fdt = \"fdt@1\";
+${CONF}
};
};
 };"
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] qos-scripts: Add IPv6 support

2016-01-19 Thread Michael Marley
This adds IPv6 support to qos-scripts for both tc/qdisc and the
iptables classification rules.  The tc/qdisc part is accomplished
by removing "protocol ip" from the tc command line, causing the
rule to be applied to all protocols.  The iptables part is
accomplished by adding each rule using both iptables and ip6tables.

This patch is based on previous work by Ilkka Ollakka and
Dominique Martinet.

Signed-off-by: Michael Marley 
---
 .../qos-scripts/files/usr/lib/qos/generate.sh  | 86 +++---
 .../qos-scripts/files/usr/lib/qos/tcrules.awk  |  2 +-
 2 files changed, 62 insertions(+), 26 deletions(-)

diff --git a/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh 
b/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh
index caa1125..765926b 100755
--- a/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh
+++ b/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh
@@ -336,11 +336,11 @@ tc class add dev $dev parent 1: classid 1:1 hfsc sc rate 
${rate}kbit ul rate ${r
if [ -n "$halfduplex" ]; then
export dev_up="tc qdisc del dev $device root >&- 2>&-
 tc qdisc add dev $device root handle 1: hfsc
-tc filter add dev $device parent 1: protocol ip prio 10 u32 match u32 0 0 
flowid 1:1 action mirred egress redirect dev ifb$ifbdev"
+tc filter add dev $device parent 1: prio 10 u32 match u32 0 0 flowid 1:1 
action mirred egress redirect dev ifb$ifbdev"
elif [ -n "$download" ]; then
append dev_${dir} "tc qdisc del dev $device ingress >&- 2>&-
 tc qdisc add dev $device ingress
-tc filter add dev $device parent : protocol ip prio 1 u32 match u32 0 0 
flowid 1:1 action connmark action mirred egress redirect dev ifb$ifbdev" "$N"
+tc filter add dev $device parent : prio 1 u32 match u32 0 0 flowid 1:1 
action connmark action mirred egress redirect dev ifb$ifbdev" "$N"
fi
add_insmod cls_fw
add_insmod sch_hfsc
@@ -397,17 +397,23 @@ start_cg() {
local pktrules
local sizerules
enum_classes "$cg"
-   add_rules iptrules "$ctrules" "iptables -t mangle -A qos_${cg}_ct"
+   for command in $iptables; do
+   add_rules iptrules "$ctrules" "$command -t mangle -A 
qos_${cg}_ct"
+   done
config_get classes "$cg" classes
for class in $classes; do
config_get mark "$class" classnr
config_get maxsize "$class" maxsize
[ -z "$maxsize" -o -z "$mark" ] || {
add_insmod xt_length
-   append pktrules "iptables -t mangle -A qos_${cg} -m 
mark --mark $mark/0x0f -m length --length $maxsize: -j MARK --set-mark 0/0xff" 
"$N"
+   for command in $iptables; do
+   append pktrules "$command -t mangle -A 
qos_${cg} -m mark --mark $mark/0x0f -m length --length $maxsize: -j MARK 
--set-mark 0/0xff" "$N"
+   done
}
done
-   add_rules pktrules "$rules" "iptables -t mangle -A qos_${cg}"
+   for command in $iptables; do
+   add_rules pktrules "$rules" "$command -t mangle -A qos_${cg}"
+   done
for iface in $INTERFACES; do
config_get classgroup "$iface" classgroup
config_get device "$iface" device
@@ -416,18 +422,40 @@ start_cg() {
config_get download "$iface" download
config_get halfduplex "$iface" halfduplex
download="${download:-${halfduplex:+$upload}}"
+   append up "ip6tables -t mangle -A OUTPUT -o $device -j 
qos_${cg}" "$N"
+   append up "ip6tables -t mangle -A FORWARD -o $device -j 
qos_${cg}" "$N"
append up "iptables -t mangle -A OUTPUT -o $device -j 
qos_${cg}" "$N"
append up "iptables -t mangle -A FORWARD -o $device -j 
qos_${cg}" "$N"
done
cat <&- 2>&-
-iptables -t mangle -N qos_${cg}_ct >&- 2>&-
-${iptrules:+${iptrules}${N}iptables -t mangle -A qos_${cg}_ct -j CONNMARK 
--save-mark --mask 0xff}
-iptables -t mangle -A qos_${cg} -j CONNMARK --restore-mark --mask 0x0f
-iptables -t mangle -A qos_${cg} -m mark --mark 0/0x0f -j qos_${cg}_ct
+EOF
+  
+for command in $iptables; do
+   cat 

[OpenWrt-Devel] [PATCH] ramips: Setup missing gpio exports and fine-tune the memory model number.

2016-01-19 Thread John Clark
GPIO Changes

The HLK-RM04 uses i2c and the top half of the uartf port for gpio. HiLink has 
labeled the RT5350 gpio1 pin as gpio0 on the device pinout, so it seems to make 
sense to export it as "hlk-rm04:gpio0" to avoid confusing it with the 
microcontroller's designation.

  gpio   gpio0 gpio0  (pin 10, reset)

  i2ci2c_sdgpio1  (pin 8, hlk-rm04:gpio0)
  i2ci2c_sclk  gpio2  (pin 9, hlk-rm04:gpio1)

  uartf  dtr_n gpio11 (no pinout)
  uartf  dcd_n gpio12 (no pinout)
  uartf  dsr_n gpio13 (no pinout)
  uartf  rin   gpio14 (pin 25, wps)

reference:
  http://www.hlktech.net/product_detail.php?ProId=39
  http://cdn.sparkfun.com/datasheets/Wireless/WiFi/RT5350.pdf

Also note that there is no gpio to control the power led, so remove the 
incorrect mapping.

Memory Model Number (trivial)
~
The dts file references memory chip s25fl064k, which seems to have ever been 
used for the HiLink HLK-RM04. While it only causes a nag message in the kernel 
log, why not change it to the w25q32 which is commonly found on these devices.

Signed-off-by: John Clark 
---
 target/linux/ramips/dts/HLKRM04.dts | 46 ++---
 1 file changed, 32 insertions(+), 14 deletions(-)

diff --git a/target/linux/ramips/dts/HLKRM04.dts 
b/target/linux/ramips/dts/HLKRM04.dts
index f90a9ac..0a0705a 100644
--- a/target/linux/ramips/dts/HLKRM04.dts
+++ b/target/linux/ramips/dts/HLKRM04.dts
@@ -18,17 +18,17 @@
palmbus@1000 {
uart@500 {
status = "okay";
+   pinctrl-0;
};
 
spi@b00 {
status = "okay";
-
m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "jedec,spi-nor";
reg = <0 0>;
-   linux,modalias = "m25p80", "s25fl064k";
+   linux,modalias = "m25p80", "w25q32";
spi-max-frequency = <1000>;
 
partition@0 {
@@ -60,9 +60,13 @@
pinctrl {
state_default: pinctrl0 {
gpio {
-   ralink,group = "jtag";
+   ralink,group = "jtag", "i2c";
ralink,function = "gpio";
};
+   uartf_gpio {
+   ralink,group = "uartf";
+   ralink,function = "gpio uartf";
+   };
};
};
 
@@ -82,25 +86,39 @@
status = "okay";
};
 
+   gpio-export {
+   compatible = "gpio-export";
+   #size-cells = <0>;
+
+   /* I2C */
+   gpio1 {
+   /* I2C_I2C_SD */
+   gpio-export,name = "hlk-rm04:gpio0";
+   gpio-export,direction_may_change = <1>;
+   gpios = < 1 0>;
+   };
+   gpio2 {
+   /* I2C_I2C_SCLK */
+   gpio-export,name = "hlk-rm04:gpio1";
+   gpio-export,direction_may_change = <1>;
+   gpios = < 2 0>;
+   };
+   };
+
gpio-keys-polled {
compatible = "gpio-keys-polled";
#address-cells = <1>;
#size-cells = <0>;
poll-interval = <20>;
-
-   wps {
+   reset {
label = "reset";
-   gpios = < 14 1>;
+   gpios = < 0 1>;
linux,code = <0x198>;
};
-   };
-
-   gpio-leds {
-   compatible = "gpio-leds";
-
-   power {
-   label = "hlk-rm04:red:power";
-   gpios = < 0 1>;
+   wps {
+   label = "wps";
+   gpios = < 14 1>;
+   linux,code = <0x211>;
};
};
 };
-- 
2.4.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] package/config/netifd: Replace ifconfig/route with ip command

2016-01-19 Thread openwrt
From: Daniel Dickinson 

ip from busybox is now standard and carrying both
sets of commands is undesirale, therefore move
the only consumer of ifconfig/route still in base
to using ip command.

Signed-off-by: Daniel Dickinson 
---
 .../netifd/files/usr/share/udhcpc/default.script | 20 
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git 
a/package/network/config/netifd/files/usr/share/udhcpc/default.script 
b/package/network/config/netifd/files/usr/share/udhcpc/default.script
index ac765a6..9e002c8 100755
--- a/package/network/config/netifd/files/usr/share/udhcpc/default.script
+++ b/package/network/config/netifd/files/usr/share/udhcpc/default.script
@@ -5,30 +5,34 @@ set_classless_routes() {
local max=128
local type
while [ -n "$1" -a -n "$2" -a $max -gt 0 ]; do
-   [ ${1##*/} -eq 32 ] && type=host || type=net
echo "udhcpc: adding route for $type $1 via $2"
-   route add -$type "$1" gw "$2" dev "$interface"
+   ip route add "$1" via "$2" dev "$interface"
max=$(($max-1))
shift 2
done
 }
 
 setup_interface() {
-   echo "udhcpc: ifconfig $interface $ip netmask ${subnet:-255.255.255.0} 
broadcast ${broadcast:-+}"
-   ifconfig $interface $ip netmask ${subnet:-255.255.255.0} broadcast 
${broadcast:-+}
+   local prefix="$(
+   eval "$(ipcalc.sh 0.0.0.0 ${subnet:-255.255.255.0})"
+   echo -n $PREFIX
+   )"
+   
+   echo "udhcpc: ip address add $ip/${prefix:-24} ${broadcast:-+} dev 
$interface"
+   ip address add $ip/${prefix:-24} ${broadcast:-+} dev $interface"
 
[ -n "$router" ] && [ "$router" != "0.0.0.0" ] && [ "$router" != 
"255.255.255.255" ] && {
echo "udhcpc: setting default routers: $router"
 
local valid_gw=""
for i in $router ; do
-   route add default gw $i dev $interface
+   ip route add default via $i dev $interface
valid_gw="${valid_gw:+$valid_gw|}$i"
done

-   eval $(route -n | awk '
-   /^0.0.0.0\W{9}('$valid_gw')\W/ {next}
-   /^0.0.0.0/ {print "route del -net "$1" gw "$2";"}
+   eval $(ip route | awk '
+   /^default\Wvia\W('$valid_gw')/ {next}
+   /^default/ {print "ip route del "$1" via "$3";"}
')
}
 
-- 
2.4.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [CC] ramips: Setup missing gpio exports and fine-tune the memory model number.

2016-01-19 Thread John Clark
GPIO Changes

The HLK-RM04 uses i2c and the top half of the uartf port for gpio. HiLink has 
labeled the RT5350 gpio1 pin as gpio0 on the device pinout, so it seems to make 
sense to export it as "hlk-rm04:gpio0" to avoid confusing it with the 
microcontroller's designation.

  gpio   gpio0 gpio0  (pin 10, reset)

  i2ci2c_sdgpio1  (pin 8, hlk-rm04:gpio0)
  i2ci2c_sclk  gpio2  (pin 9, hlk-rm04:gpio1)

  uartf  dtr_n gpio11 (no pinout)
  uartf  dcd_n gpio12 (no pinout)
  uartf  dsr_n gpio13 (no pinout)
  uartf  rin   gpio14 (pin 25, wps)

reference:
  http://www.hlktech.net/product_detail.php?ProId=39
  http://cdn.sparkfun.com/datasheets/Wireless/WiFi/RT5350.pdf

Also note that there is no gpio to control the power led, so remove the 
incorrect mapping.

Memory Model Number (trivial)
~
The dts file references memory chips gd25q64 and s25fl064k, neither of which 
seem to have ever been used for the HiLink HLK-RM04. While it only causes a nag 
message in the kernel log, why not change it to the w25q32 which is commonly 
found on these devices.
[0.23] m25p80 spi32766.0: w25q32 (4096 Kbytes)

Signed-off-by: John Clark 
---
 target/linux/ramips/dts/HLKRM04.dts | 45 +++--
 1 file changed, 33 insertions(+), 12 deletions(-)

diff --git a/target/linux/ramips/dts/HLKRM04.dts 
b/target/linux/ramips/dts/HLKRM04.dts
index 13597dc..3c206b9 100644
--- a/target/linux/ramips/dts/HLKRM04.dts
+++ b/target/linux/ramips/dts/HLKRM04.dts
@@ -18,6 +18,7 @@
palmbus@1000 {
uart@500 {
status = "okay";
+   pinctrl-0;
};
 
spi@b00 {
@@ -25,9 +26,9 @@
m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
-   compatible = "gd25q64";
+   compatible = "w25q32";
reg = <0 0>;
-   linux,modalias = "m25p80", "s25fl064k";
+   linux,modalias = "m25p80", "w25q32";
spi-max-frequency = <1000>;
 
partition@0 {
@@ -59,9 +60,13 @@
pinctrl {
state_default: pinctrl0 {
gpio {
-   ralink,group = "jtag";
+   ralink,group = "jtag", "i2c";
ralink,function = "gpio";
};
+   uartf_gpio {
+   ralink,group = "uartf";
+   ralink,function = "gpio uartf";
+   };
};
};
 
@@ -81,23 +86,39 @@
status = "okay";
};
 
+   gpio-export {
+   compatible = "gpio-export";
+   #size-cells = <0>;
+
+   /* I2C */
+   gpio1 {
+   /* I2C_I2C_SD */
+   gpio-export,name = "hlk-rm04:gpio0";
+   gpio-export,direction_may_change = <1>;
+   gpios = < 1 0>;
+   };
+   gpio2 {
+   /* I2C_I2C_SCLK */
+   gpio-export,name = "hlk-rm04:gpio1";
+   gpio-export,direction_may_change = <1>;
+   gpios = < 2 0>;
+   };
+   };
+
gpio-keys-polled {
compatible = "gpio-keys-polled";
#address-cells = <1>;
#size-cells = <0>;
poll-interval = <20>;
-   wps {
+   reset {
label = "reset";
-   gpios = < 14 1>;
+   gpios = < 0 1>;
linux,code = <0x198>;
};
-   };
-
-   gpio-leds {
-   compatible = "gpio-leds";
-   power {
-   label = "hlk-rm04:red:power";
-   gpios = < 0 1>;
+   wps {
+   label = "wps";
+   gpios = < 14 1>;
+   linux,code = <0x211>;
};
};
 };
-- 
2.4.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] elfutils: bump to 0.165

2016-01-19 Thread Luiz Angelo Daros de Luca
Signed-off-by: Luiz Angelo Daros de Luca 
---
 package/libs/elfutils/Makefile  | 8 
 package/libs/elfutils/patches/003-libint-stub.patch | 2 +-
 package/libs/elfutils/patches/005-build_only_libs.patch | 4 ++--
 package/libs/elfutils/patches/006-libdw_LIBS.patch  | 6 +++---
 package/libs/elfutils/patches/100-musl-compat.patch | 4 ++--
 package/libs/elfutils/patches/101-no-fts.patch  | 4 ++--
 6 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile
index b1e52ba..fa7bc55 100644
--- a/package/libs/elfutils/Makefile
+++ b/package/libs/elfutils/Makefile
@@ -7,12 +7,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=elfutils
-PKG_VERSION:=0.164
+PKG_VERSION:=0.165
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://fedorahosted.org/releases/e/l/$(PKG_NAME)/$(PKG_VERSION)
-PKG_MD5SUM:=2e4536c1c48034f188a80789a59114d8
+PKG_MD5SUM:=c37fdbe18e848002b451562cba964679
 PKG_MAINTAINER:=Luiz Angelo Daros de Luca 
 PKG_LICENSE:=GPL-3.0+
 PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3
@@ -28,7 +28,6 @@ include $(INCLUDE_DIR)/nls.mk
 define Package/elfutils/Default
   SECTION:=libs
   CATEGORY:=Libraries
-  DEPENDS:=$(INTL_DEPENDS)
   TITLE:=ELF manipulation libraries
   URL:=https://fedorahosted.org/elfutils/
 endef
@@ -41,12 +40,13 @@ endef
 
 define Package/libdw
   $(call Package/elfutils/Default)
-  DEPENDS:=libelf1 +zlib +libbz2
+  DEPENDS:=libelf1 +libbz2
   TITLE+= (libdw)
 endef
 
 define Package/libelf1
   $(call Package/elfutils/Default)
+  DEPENDS:=$(INTL_DEPENDS) +zlib
   TITLE+= (libelf)
 endef
 
diff --git a/package/libs/elfutils/patches/003-libint-stub.patch 
b/package/libs/elfutils/patches/003-libint-stub.patch
index cf6539f..d6cc707 100644
--- a/package/libs/elfutils/patches/003-libint-stub.patch
+++ b/package/libs/elfutils/patches/003-libint-stub.patch
@@ -1,6 +1,6 @@
 --- a/libelf/libelfP.h
 +++ b/libelf/libelfP.h
-@@ -42,6 +42,9 @@
+@@ -43,6 +43,9 @@
  #include 
  #include 
  
diff --git a/package/libs/elfutils/patches/005-build_only_libs.patch 
b/package/libs/elfutils/patches/005-build_only_libs.patch
index 0077369..e39b395 100644
--- a/package/libs/elfutils/patches/005-build_only_libs.patch
+++ b/package/libs/elfutils/patches/005-build_only_libs.patch
@@ -1,6 +1,6 @@
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -372,8 +372,7 @@ ACLOCAL_AMFLAGS = -I m4
+@@ -378,8 +378,7 @@ AM_MAKEFLAGS = --no-print-directory
  pkginclude_HEADERS = version.h
  
  # Add doc back when we have some real content.
@@ -12,7 +12,7 @@
 COPYING COPYING-GPLV2 COPYING-LGPLV3
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -23,8 +23,7 @@ ACLOCAL_AMFLAGS = -I m4
+@@ -27,8 +27,7 @@ AM_MAKEFLAGS = --no-print-directory
  pkginclude_HEADERS = version.h
  
  # Add doc back when we have some real content.
diff --git a/package/libs/elfutils/patches/006-libdw_LIBS.patch 
b/package/libs/elfutils/patches/006-libdw_LIBS.patch
index bcea100..34c4447 100644
--- a/package/libs/elfutils/patches/006-libdw_LIBS.patch
+++ b/package/libs/elfutils/patches/006-libdw_LIBS.patch
@@ -1,11 +1,11 @@
 --- a/libdw/Makefile.in
 +++ b/libdw/Makefile.in
-@@ -994,7 +994,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map l
+@@ -996,7 +996,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map l
-Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
-Wl,--version-script,$<,--no-undefined \
-Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
--  -ldl $(argp_LDADD) $(zip_LIBS)
-+  -ldl $(argp_LDADD) $(zip_LIBS) $(LIBS)
+-  -ldl -lz $(argp_LDADD) $(zip_LIBS)
++  -ldl -lz $(argp_LDADD) $(zip_LIBS) $(LIBS)
@$(textrel_check)
$(AM_V_at)ln -fs $@ $@.$(VERSION)
  
diff --git a/package/libs/elfutils/patches/100-musl-compat.patch 
b/package/libs/elfutils/patches/100-musl-compat.patch
index 7427e9a..25e1504 100644
--- a/package/libs/elfutils/patches/100-musl-compat.patch
+++ b/package/libs/elfutils/patches/100-musl-compat.patch
@@ -151,7 +151,7 @@
  #include 
 --- a/src/ldlex.c
 +++ b/src/ldlex.c
-@@ -1099,7 +1099,7 @@ char *ldtext;
+@@ -1106,7 +1106,7 @@ char *ldtext;
  #include 
  #include 
  #include 
@@ -621,7 +621,7 @@
  #include 
 --- a/libcpu/i386_lex.c
 +++ b/libcpu/i386_lex.c
-@@ -571,7 +571,7 @@ char *i386_text;
+@@ -578,7 +578,7 @@ char *i386_text;
  #endif
  
  #include 
diff --git a/package/libs/elfutils/patches/101-no-fts.patch 
b/package/libs/elfutils/patches/101-no-fts.patch
index b1b2308..6a3e940 100644
--- a/package/libs/elfutils/patches/101-no-fts.patch
+++ b/package/libs/elfutils/patches/101-no-fts.patch
@@ -72,7 +72,7 @@
struct parse_opt *opt = state->hook;
 --- a/libdwfl/Makefile.in
 +++ b/libdwfl/Makefile.in
-@@ -121,7 +121,7 @@ am__libdwfl_a_SOURCES_DIST = dwfl_begin.
+@@ -120,7 +120,7 @@ am__libdwfl_a_SOURCES_DIST = dwfl_begin.

Re: [OpenWrt-Devel] [PATCH] package/config/netifd: Replace ifconfig/route with ip command

2016-01-19 Thread Bastian Bittorf
* open...@daniel.thecshore.com  [20.01.2016 
07:21]:
> @@ -5,30 +5,34 @@ set_classless_routes() {
>   local max=128
>   local type

thanks for that, i have it also on my todo-list.
please remove also the 'local type' here.

>   done
>  }
>  
>  setup_interface() {
> - echo "udhcpc: ifconfig $interface $ip netmask ${subnet:-255.255.255.0} 
> broadcast ${broadcast:-+}"
> - ifconfig $interface $ip netmask ${subnet:-255.255.255.0} broadcast 
> ${broadcast:-+}
> + local prefix="$(
> + eval "$(ipcalc.sh 0.0.0.0 ${subnet:-255.255.255.0})"
> + echo -n $PREFIX

dont use '-n'

> + )"
> + 
> + echo "udhcpc: ip address add $ip/${prefix:-24} ${broadcast:-+} dev 
> $interface"
> + ip address add $ip/${prefix:-24} ${broadcast:-+} dev $interface"

please dont double-fallback. It's ok to have it once default to '255.255.255.0',
so just use $prefix

maybe we can even have a function in /lib/functions.sh for that:

!#/bin/sh
mask2cidr()
{
local x=${1##*255.}
local allones=$(( (${#1} - ${#x}) * 2 ))
local tbl='0^^^128^192^224^240^248^252^254^'

x=${tbl%%${x%%.*}*}
export CIDR=$(( allones + (${#x}/4) ))
}

mask2cidr 255.255.255.224
echo $CIDR


>  
>   [ -n "$router" ] && [ "$router" != "0.0.0.0" ] && [ "$router" != 
> "255.255.255.255" ] && {
>   echo "udhcpc: setting default routers: $router"
>  
>   local valid_gw=""
>   for i in $router ; do
> - route add default gw $i dev $interface
> + ip route add default via $i dev $interface
>   valid_gw="${valid_gw:+$valid_gw|}$i"
>   done
>   
> - eval $(route -n | awk '
> - /^0.0.0.0\W{9}('$valid_gw')\W/ {next}
> - /^0.0.0.0/ {print "route del -net "$1" gw "$2";"}
> + eval $(ip route | awk '
> + /^default\Wvia\W('$valid_gw')/ {next}
> + /^default/ {print "ip route del "$1" via "$3";"}

the code leaves the default-gateway if already set and removes all other
default routes. i dont like the awk-approach, maybe something like:

root@box:~ ip route list exact '0.0.0.0/0'
default via 217.0.116.253 dev pppoe-wan  proto static 
default via 10.63.21.98 dev eth0.1  metric 7 

#!/bin/sh

replace_default_gw()
{
ip route list exact '0.0.0.0/0' | while read LINE; do
set -- $LINE
[ "$3" = "$valid_gw" ] || ip route del default via $3
done
}

the rest looks good! there are still a lot of other users
for route/ifconfig, but thats a good start!

bye, bastian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [RFC v2] [zynq] Add new target zynq

2016-01-19 Thread Jason Wu



On 19/01/2016 7:13 PM, Felix Fietkau wrote:

On 2016-01-19 10:05, John Crispin wrote:



On 19/01/2016 09:59, Felix Fietkau wrote:

If you remove the zynq.sh, the variable will always be empty. So you can
just do:
case "$(cat /tmp/sysinfo/board_name)" in
...
esac

- Felix


dont we have a unified helper for this since jows cleanup 2 weeks ago ?

I don't think so, at least I can't find one...

- Felix


ok, i will make another patch for the support.

I will send a RFC for adding ramdisk node support for mkfit.sh.

THanks,

Jason
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Brauche Hilfe

2016-01-19 Thread smilebef
ich könnte jemanden deutschsprachigen gebrauchen, der mir etwas
Nachhilfe in OpenWRT bietet und vielleicht auch bei meinem Problem
hilft.

Ich würde gern das Board RB433UL, welches bei mir versauert gangbar
machen, aber dazu fehlt mir noch etwas Wissen zu OpenWRT.

Momentaner Stand:

Ich lade den Kern für RB433U per tftpboot hoch und erhalte einen Log
über die serielle Schnittstelle.
Das Schreiben auf die Serielle Schnittstelle funktioniert noch nicht.
Der Bootloader unterstützt die Serielle Schnittstelle nicht.
Die Interfaces melden sich noch nicht mittels "netdiscover -i eth0 -r
192.168.0.0/16".
Demnach vermute ich die Interfaces werden nicht per Default hochgefahren.
Das Ein- und Ausstecken des Netzkabels wird allerdings auf der Console
angezeigt.

ToDo

Aktivieren der Interfaces.
Nachweis einer stabilen Funktion des Systems.
Lösung finden, wie mit dem Bootloader umzugehen ist.
Eine Meldung: "Nand not found" ist zu prüfen.
Eventuell GPIO9 für serielle Schnittstelle RXD hinzufügen/korrigieren.



Wer hat Lust???
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel