summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/imx/imx-image.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/imx/imx-image.c b/scripts/imx/imx-image.c
index 04c707cb7f..edff3580dd 100644
--- a/scripts/imx/imx-image.c
+++ b/scripts/imx/imx-image.c
@@ -781,7 +781,6 @@ int main(int argc, char *argv[])
int outfd;
int dcd_only = 0;
int now = 0;
- int i, header_copies;
int add_barebox_header;
uint32_t barebox_image_size = 0;
struct config_data data = {
@@ -978,9 +977,13 @@ int main(int argc, char *argv[])
exit(1);
}
- header_copies = (data.cpu_type == IMX_CPU_IMX35) ? 2 : 1;
-
- for (i = 0; i < header_copies; i++) {
+ if (data.cpu_type == IMX_CPU_IMX35) {
+ xwrite(outfd, add_barebox_header ? bb_header : buf,
+ sizeof_bb_header);
+ xwrite(outfd, buf + sizeof_bb_header,
+ header_len - sizeof_bb_header);
+ xwrite(outfd, buf, header_len);
+ } else {
xwrite(outfd, add_barebox_header ? bb_header : buf,
sizeof_bb_header);