summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Stein <alexander.stein@systec-electronic.com>2016-04-13 09:36:05 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-04-14 07:58:17 +0200
commit78118046b54872ad571fb19a5658a40c32cd25e0 (patch)
tree95b71e77240062d95eba1d1c929d1877fbd33442
parent97e553bc657efcb99b6a99fe93fd3b06d7f0f82a (diff)
downloadbarebox-78118046b54872ad571fb19a5658a40c32cd25e0.tar.gz
scripts: imx-image: Fix image size in flash header for i.MX35
The i.MX35 needs additional 0x1000 byte. This quirk moved to the wrong location during refactoring of imx-image for v2016.03.0. Fixes: adade597593442 ""scripts: imx: Allow to create signed images") Signed-off-by: Daniel Krueger <daniel.krueger@systec-electronic.com> Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--scripts/imx/imx.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/imx/imx.c b/scripts/imx/imx.c
index 82ef97f..ca65389 100644
--- a/scripts/imx/imx.c
+++ b/scripts/imx/imx.c
@@ -221,6 +221,10 @@ static int do_soc(struct config_data *data, int argc, char *argv[])
if (!strcmp(socs[i].name, soc)) {
data->header_version = socs[i].header_version;
data->cpu_type = socs[i].cpu_type;
+
+ if (data->cpu_type == 35)
+ data->load_size += HEADER_LEN;
+
return 0;
}
}
@@ -230,9 +234,6 @@ 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;
}