mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Marcin Niestroj <m.niestroj@grinn-global.com>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC PATCH 2/5] scripts: imx: Support CST version >= 2.3.2
Date: Fri, 8 Jun 2018 07:18:46 +0200	[thread overview]
Message-ID: <20180608051846.pqu3rkypqmcg3xpg@pengutronix.de> (raw)
In-Reply-To: <20180606160809.16233-3-m.niestroj@grinn-global.com>

On Wed, Jun 06, 2018 at 06:08:06PM +0200, Marcin Niestroj wrote:
> New versions of CST (starting from 2.3.2 according to Release Notes)
> require specifying '-i --input' option, instead of writing
> configuration to standard input. I see few possibilities here:
> 1) Simply add '-i /dev/fd/0' as a fix to current implementation
>    (this patch actually does that).
> 2) Reimplement code to save CSF content to file, instead of malloc'ed
>    buffer.
> 3) Above methods will only support CST tool >= 2.3.2. To keep
>    compatibility with older CST versions, we would need to check
>    'cst -h' output to see if '-i' option is supported or not (note,
>    that version returned by CST 2.3.3 is 'BLN_CST_MAIN_02.03.00').

You're kidding, no? My 2.3.1 also returns BLN_CST_MAIN_02.03.00. So they
managed to switch the tool to a completely incopatible API without even
increasing the version number. Great.

There's also:

4) Try both methods and see which one succeeds
5) evaluate a CST_VERSION environment variable, expect the new version
   if this is not given.

I think I am happy when we just do a hard switch to the new version like
done in your patch, but then the commit message should be reworded to
"require CST version >= 2.3.2", not "suppport". Also if the command
fails we should add a message like "CST failed, maybe it's too old. We
require at least CST-2.3.2"

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2018-06-08  5:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-06 16:08 [RFC PATCH 0/5] ARM: imx: HAB improvements Marcin Niestroj
2018-06-06 16:08 ` [RFC PATCH 1/5] scripts: imx: add optional argument to hab_blocks command Marcin Niestroj
2018-06-06 16:08 ` [RFC PATCH 2/5] scripts: imx: Support CST version >= 2.3.2 Marcin Niestroj
2018-06-08  5:18   ` Sascha Hauer [this message]
2018-06-06 16:08 ` [RFC PATCH 3/5] ARM: imx: Update default image certificate for CST tool Marcin Niestroj
2018-06-06 16:08 ` [RFC PATCH 4/5] scripts: imx: Support encrypted boot with HABv4 Marcin Niestroj
2018-06-06 16:08 ` [RFC PATCH 5/5] images: imx: Add targets for signed encrypted images Marcin Niestroj
2018-06-08  5:50 ` [RFC PATCH 0/5] ARM: imx: HAB improvements Sascha Hauer

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=20180608051846.pqu3rkypqmcg3xpg@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=m.niestroj@grinn-global.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox