tools: kwbimage: don't adjust for image_header for Armada MSYS
[project/bcm63xx/u-boot.git] / tools / kwbimage.c
index a88a3830c0c8d41c93765474622205f8b43c22d8..dffaf9043a040815efedac502338308e3228eb9d 100644 (file)
@@ -1273,6 +1273,13 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params,
        e = image_find_option(IMAGE_CFG_DEBUG);
        if (e)
                main_hdr->flags = e->debug ? 0x1 : 0;
+       e = image_find_option(IMAGE_CFG_BINARY);
+       if (e) {
+               char *s = strrchr(e->binary.file, '/');
+
+               if (strcmp(s, "/binary.0") == 0)
+                       main_hdr->destaddr = cpu_to_le32(params->addr);
+       }
 
 #if defined(CONFIG_KWB_SECURE)
        if (image_get_csk_index() >= 0) {