msm: msm7630/8660(emmc): Add secure boot support to appsbl
mkheader contains additional functionality to combine header+raw
appsbl(unsecure appsbl) or header+raw+signature+certificates
(secure appsbl).
Change-Id: I0acda1c57a64f653a51669a711ccb0301392e802
diff --git a/target/msm7630_surf/tools/mkheader.c b/target/msm7630_surf/tools/mkheader.c
index 1e9f2b6..29b0e18 100644
--- a/target/msm7630_surf/tools/mkheader.c
+++ b/target/msm7630_surf/tools/mkheader.c
@@ -137,6 +137,8 @@
base = 0;
#endif
+ printf("Image Destination Pointer: 0x%x\n", base);
+
magic[0] = 0x00000005; /* appsbl */
magic[1] = 0x00000003; //Flash_partition_version /* nand */
magic[2] = 0x00000000; //image source pointer
@@ -175,7 +177,6 @@
}
close(fd);
-
if (secure_boot && argc > 6){
FILE * input_file;
FILE * output_file;
@@ -190,6 +191,7 @@
perror("ERROR: Occured during fopen");
return -1;
}
+ printf("Certificate Chain Output File: %s\n", argv[6]);
for (i = 8; i < argc; i++){
if((input_file = fopen(argv[i], "rb"))==NULL){
@@ -223,6 +225,7 @@
perror("ERROR: Occured during fopen");
return -1;
}
+ printf("Image Output File: %s\n", argv[4]);
//Header
if((input_file = fopen(argv[2], "rb"))==NULL){
@@ -276,6 +279,7 @@
perror("ERROR: Occured during fopen");
return -1;
}
+ printf("Image Output File: %s\n", argv[4]);
//Header
if((input_file = fopen(argv[2], "rb"))==NULL){
@@ -299,5 +303,7 @@
fclose(output_file);
}
+ printf("Done execution\n");
+
return 0;
}