]> git.sur5r.net Git - u-boot/blobdiff - tools/mksunxiboot.c
tools: kwbimage: Refactor line parsing and fix error
[u-boot] / tools / mksunxiboot.c
index 54f4d0564ea5877167164b04d0eaa802f2ceae25..0f0b003a83728bd9510b775f50eea9ba1908e082 100644 (file)
@@ -15,7 +15,7 @@
 #include <errno.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include "asm/arch/spl.h"
+#include "../arch/arm/include/asm/arch-sunxi/spl.h"
 
 #define STAMP_VALUE                     0x5F0A6C39
 
@@ -118,6 +118,10 @@ int main(int argc, char *argv[])
                ALIGN(file_size + sizeof(struct boot_file_head), BLOCK_SIZE);
        img.header.b_instruction = cpu_to_le32(img.header.b_instruction);
        img.header.length = cpu_to_le32(img.header.length);
+
+       memcpy(img.header.spl_signature, SPL_SIGNATURE, 3); /* "sunxi" marker */
+       img.header.spl_signature[3] = SPL_HEADER_VERSION;
+
        gen_check_sum(&img.header);
 
        count = write(fd_out, &img, le32_to_cpu(img.header.length));