[OpenWrt-Devel] [PATCH v2] lantiq: fall back to a more appropriate default dsl firmware

John Crispin blogic at openwrt.org
Fri Dec 11 04:36:11 EST 2015



On 07/12/2015 19:59, Andre Heider wrote:
> ---
> 
> v2: use annex b firmware for annex j too
> 
>  package/network/config/ltq-vdsl-app/files/dsl_control | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>  mode change 100644 => 100755 package/network/config/ltq-vdsl-app/files/dsl_control
> 
> diff --git a/package/network/config/ltq-vdsl-app/files/dsl_control b/package/network/config/ltq-vdsl-app/files/dsl_control
> old mode 100644
> new mode 100755
> index d7eb4cd..0186ee0
> --- a/package/network/config/ltq-vdsl-app/files/dsl_control
> +++ b/package/network/config/ltq-vdsl-app/files/dsl_control
> @@ -18,12 +18,14 @@ EXTRA_HELP="	status  Get DSL status information
>  # G.992.5 Annex A
>  # G.993.2 Annex A/B/C
>  xtse_adsl_a="04 01 04 01 00 01 00 00"
> +fw_adsl_a="adsl-a.bin"
>  
>  # G.992.1 Annex B
>  # G.992.3 Annex B
>  # G.992.5 Annex B
>  # G.993.2 Annex A/B/C
>  xtse_adsl_b="10 00 10 00 00 04 00 00"
> +fw_adsl_b="adsl-b.bin"
>  
>  # G.992.1 Annex B
>  # G.992.3 Annex B
> @@ -32,6 +34,7 @@ xtse_adsl_b="10 00 10 00 00 04 00 00"
>  # G.992.5 Annex J
>  # G.993.2 Annex A/B/C
>  xtse_adsl_j="10 00 10 40 00 04 01 00"
> +fw_adsl_j="adsl-b.bin"
>  
>  xtse_vdsl="00 00 00 00 00 00 00 07"
>  
> @@ -69,11 +72,12 @@ start_service() {
>  	eval "xtse_adsl=\"\${xtse_adsl_$annex}\""
>  	if [ "${xtse_adsl}" ]; then
>  		xtse=$xtse_adsl
> +		[ -z "${firmware}" ] && eval "firmware=/lib/firmware/\${fw_adsl_$annex}"

do we need an eval here ? firmware=/lib/firmware/\${fw_adsl_${annex}}
should work just aswell without spawning a subshell. ... (does eval
spawn a subshell these days ?)

	John

>  	else
>  		xtse=$xtse_vdsl
> +		[ -z "${firmware}" ] && firmware=/lib/firmware/vdsl.bin
>  	fi
>  
> -	[ -z "${firmware}" ] && firmware=/lib/firmware/vdsl.bin
>  	[ -f "${firmware}" ] || {
>  		echo failed to find $firmware
>  		return 1
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list