[U-Boot] [PATCH] mkimage: fix argument parsing on BSD systems

Simon Glass sjg at chromium.org
Sun May 1 21:35:48 CEST 2016


Hi Andreas,

On 30 April 2016 at 19:01, Andreas Bießmann
<andreas.devel at googlemail.com> wrote:
> The getopt(3) optstring '-' is a GNU extension which is not available on BSD
> systems like OS X.
>
> Remove this dependency by implementing argument parsing in another way. This
> will also change the lately introduced '-b' switch behaviour.
>
> Signed-off-by: Andreas Bießmann <andreas.devel at googlemail.com>
> ---
>
>  Makefile        |  2 +-
>  doc/mkimage.1   |  6 +++---
>  tools/mkimage.c | 33 ++++++++++++---------------------
>  3 files changed, 16 insertions(+), 25 deletions(-)

This looks good to me and the code is cleaner but I'm a bit worried
about the -b flag change. It makes it impossible to do something like

mkimage ... -b *.dtb output.fit

Perhaps this is a small price to pay?

Reviewed-by: Simon Glass <sjg at chromium.org>

Regards,
Simon


More information about the U-Boot mailing list