[RFC PATCH 2/5] scripts: imx: Support CST version >= 2.3.2

Sascha Hauer s.hauer at pengutronix.de
Thu Jun 7 22:18:46 PDT 2018

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"


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 |

More information about the barebox mailing list