diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-01-29 09:52:40 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-02-04 08:29:16 +0100 |
commit | adade59759344274d24a53263194e5ed5e6c17a5 (patch) | |
tree | 00205b2044ccb76456459d5a264270025e7a05e8 /scripts/imx/imx.c | |
parent | 3b4db3851b9713dc4df515e560940c6426c38b00 (diff) | |
download | barebox-adade59759344274d24a53263194e5ed5e6c17a5.tar.gz barebox-adade59759344274d24a53263194e5ed5e6c17a5.tar.xz |
scripts: imx: Allow to create signed images
This patch allows to call CST directly from imx-image to create signed
images. CST is called whenever the config file contains the hab <str>
commands which means a CSF is generated.
Calling CST requires some quirks. First of all CST returns successfully
whenever a CSF exists, no matter is the CSF actually contains something
sensible or not. So to detect if CST has been called successfully we
have to check if it generated output, not if it returned successfully.
Then CST uses csfsig.bin as a temporary file which breaks when the tool
is called multiple times at once, something which often happens in
parallel builds. We therefore have to lock accesses to this file using
flock().
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts/imx/imx.c')
-rw-r--r-- | scripts/imx/imx.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/imx/imx.c b/scripts/imx/imx.c index 6b397fc473..82ef97f80c 100644 --- a/scripts/imx/imx.c +++ b/scripts/imx/imx.c @@ -230,6 +230,9 @@ static int do_soc(struct config_data *data, int argc, char *argv[]) fprintf(stderr, "%s ", socs[i].name); fprintf(stderr, "\n"); + if (data->cpu_type == 35) + data->load_size += HEADER_LEN; + return -EINVAL; } |