[U-Boot] [PATCH V2 1/9] Validate dtc is new enough

Gerhard Sittig gsi at denx.de
Tue Jun 25 19:22:57 CEST 2013


On Mon, Jun 24, 2013 at 09:43 -0600, Stephen Warren wrote:
> 
> +checkdtc:
> +	@if test $(call dtc-version) -lt 0104; then \
> +		echo '*** Your dtc is too old, please upgrade to dtc 1.4 or newer'; \
> +		false; \
> +	fi

... and ...

> --- /dev/null
> +++ b/tools/dtc-version.sh
> @@ -0,0 +1,20 @@
> +#!/bin/sh
> +#
> +# dtc-version dtc-command
> +#
> +# Prints the dtc version of `dtc-command' in a canonical 4-digit form
> +# such as `0222' for binutils 2.22
> +#

So the numbers get converted to something that's neatly aligned
and free of whitespace and can get sorted alphabetically.

But the numbers get passed to $SHELL and the builtin test(1)
command, and get compared numerically ('-lt' operator).

Does that mean that the test break with digits beyond seven, when
numbers no longer can get interpreted as valid octal numbers?


virtually yours
Gerhard Sittig
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de


More information about the U-Boot mailing list