All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, v2] Enable expression support for CONFIG_BOARD_SIZE_LIMIT
Date: Fri, 8 Mar 2019 14:55:45 -0500	[thread overview]
Message-ID: <20190308195545.GK5026@bill-the-cat> (raw)
In-Reply-To: <E40B08BD-B5BF-441E-AC55-000024CD5B4B@theobroma-systems.com>

On Fri, Mar 08, 2019 at 06:53:28PM +0100, Philipp Tomsich wrote:
> 
> 
> > On 08.03.2019, at 18:28, Martin Husemann <martin@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...

No, we can't exactly.  In sum, gawk and mawk behave differently and mawk
doesn't do hex and yes, we run into that in the wild.  Whatever we do
here needs to be POSIX shell happy (or something more strict than that?)
as it needs to work on macOS and Free/Net/OpenBSD and anything else that
we can otherwise be building on.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190308/9587c88d/attachment.sig>

  parent reply	other threads:[~2019-03-08 19:55 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-30 14:52 [U-Boot] [PATCH v4] pico-imx7d: Increase the CONFIG_ENV_OFFSET size Fabio Estevam
2018-11-30 15:17 ` Otavio Salvador
2018-11-30 15:33 ` Wolfgang Denk
2018-11-30 16:28   ` Fabio Estevam
2018-12-03 15:52     ` Wolfgang Denk
2018-12-03 16:53       ` Fabio Estevam
2018-12-03 17:39         ` Otavio Salvador
2018-12-04  9:40           ` Wolfgang Denk
2018-12-04  9:37         ` Wolfgang Denk
2018-12-04 10:41           ` Fabio Estevam
2018-12-04 13:03             ` Wolfgang Denk
2018-12-04 13:18               ` Fabio Estevam
2018-12-04 13:35                 ` Wolfgang Denk
2018-12-04 14:15                   ` Fabio Estevam
2018-12-04 15:40                     ` [U-Boot] [PATCH] Enable expression support for CONFIG_BOARD_SIZE_LIMIT Wolfgang Denk
2018-12-04 15:42                       ` Otavio Salvador
2018-12-04 16:15                       ` Fabio Estevam
2018-12-05  9:52                         ` Wolfgang Denk
2018-12-06 13:04                           ` Fabio Estevam
2018-12-06 14:23                             ` Wolfgang Denk
2018-12-06 14:41                               ` Fabio Estevam
2018-12-06 14:44                                 ` Andy Pont
2018-12-06 14:58                                   ` Fabio Estevam
2018-12-06 15:01                                     ` Fabio Estevam
2018-12-06 14:50                                 ` Philipp Tomsich
2018-12-06 15:06                                   ` Fabio Estevam
2018-12-06 15:17                                 ` Fabio Estevam
2018-12-07 15:21                                   ` Wolfgang Denk
2018-12-07 15:37                                     ` Fabio Estevam
2018-12-07 19:28                                       ` Wolfgang Denk
2018-12-07 19:27                       ` [U-Boot] [PATCH v2] " Wolfgang Denk
2018-12-14 19:16                         ` [U-Boot] [U-Boot, " Tom Rini
2019-03-06 20:54                           ` Simon Goldschmidt
2019-03-08 17:17                             ` Tom Rini
2019-03-08 17:28                               ` Martin Husemann
2019-03-08 17:53                                 ` Philipp Tomsich
2019-03-08 18:16                                   ` Simon Goldschmidt
2019-03-08 19:55                                   ` Tom Rini [this message]
2019-03-15 10:13                                 ` Ismael Luceno Cortes
2018-12-17 14:13 ` [U-Boot] [PATCH v4] pico-imx7d: Increase the CONFIG_ENV_OFFSET size Fabio Estevam
2018-12-17 14:47   ` Stefano Babic
2018-12-17 14:50     ` Fabio Estevam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190308195545.GK5026@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.