From: Marcin Niestroj <m.niestroj@grinn-global.com>
To: barebox@lists.infradead.org
Cc: Marcin Niestroj <m.niestroj@grinn-global.com>
Subject: [RFC PATCH 2/5] scripts: imx: Support CST version >= 2.3.2
Date: Wed, 6 Jun 2018 18:08:06 +0200 [thread overview]
Message-ID: <20180606160809.16233-3-m.niestroj@grinn-global.com> (raw)
In-Reply-To: <20180606160809.16233-1-m.niestroj@grinn-global.com>
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').
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
---
scripts/imx/imx-image.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/imx/imx-image.c b/scripts/imx/imx-image.c
index b241e8c4b..9688a8ce1 100644
--- a/scripts/imx/imx-image.c
+++ b/scripts/imx/imx-image.c
@@ -546,7 +546,7 @@ static int hab_sign(struct config_data *data)
}
}
- ret = asprintf(&command, "%s -o %s", cst, csffile);
+ ret = asprintf(&command, "%s -i /dev/fd/0 -o %s", cst, csffile);
if (ret < 0)
return -ENOMEM;
--
2.17.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2018-06-06 16:08 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 ` Marcin Niestroj [this message]
2018-06-08 5:18 ` [RFC PATCH 2/5] scripts: imx: Support CST version >= 2.3.2 Sascha Hauer
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=20180606160809.16233-3-m.niestroj@grinn-global.com \
--to=m.niestroj@grinn-global.com \
--cc=barebox@lists.infradead.org \
/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