[U-Boot] [U-Boot, v2] Enable expression support for CONFIG_BOARD_SIZE_LIMIT
Simon Goldschmidt
simon.k.r.goldschmidt at gmail.com
Fri Mar 8 18:16:20 UTC 2019
Philipp Tomsich <philipp.tomsich at theobroma-systems.com> schrieb am Fr., 8.
März 2019, 18:53:
>
>
> > On 08.03.2019, at 18:28, Martin Husemann <martin at NetBSD.org> wrote:
> >
> > On Fri, Mar 08, 2019 at 12:17:09PM -0500, Tom Rini wrote:
> >> OK, so a few thoughts here.
> >> - What's the portable way to do hex-based math? If we really need it?
> >
> > Use printf(3) to convert to/from hex, and standard shell arithmetic
> > with $(( )).
> >
> > Looks horrible, but something like:
> >
> > v=$(( $( printf "%d\n" 0xa0 ) + $( printf "%d\n" 0x10 ) ))
> > printf "v = %d (%x)\n" $v $v
>
> Can we just assume that awk is available? After all, AWK is defined
> in the top-level Makefile...
>
I guess we can, but see Toms mail from mid of December: not all awk
flavours seem to supper hey numbers. So I guess the next round on this
patch should try to test different shells as well as different awk's...
Regards,
Simon
More information about the U-Boot
mailing list