Lines Matching refs:gOpts

48 static OPT_T gOpts;  variable
113 } else if ((ulong)path != (ulong)gOpts.outPath && /* ignore output */ in fixPath()
130 gOpts.major = (uint16_t) d; in parseVersion()
136 gOpts.minor = (uint16_t) d; in parseVersion()
137 LOGD("major:%d, minor:%d\n", gOpts.major, gOpts.minor); in parseVersion()
152 pbl3x = &gOpts.bl3x[bl3x_id]; in parseBL3x()
222 if (fscanf(file, OPT_OUT_PATH "=%[^\r^\n]", gOpts.outPath) != 1) in parseOut()
225 printf("out:%s\n", gOpts.outPath); in parseOut()
232 fprintf(out, SEC_BL30 "\n" OPT_SEC "=%d\n", gOpts.bl3x[BL30_SEC].sec); in printOpts()
233 if (gOpts.bl3x[BL30_SEC].sec) { in printOpts()
234 fprintf(out, OPT_PATH "=%s\n", gOpts.bl3x[BL30_SEC].path); in printOpts()
235 fprintf(out, OPT_ADDR "=0x%08x\n", gOpts.bl3x[BL30_SEC].addr); in printOpts()
238 fprintf(out, SEC_BL31 "\n" OPT_SEC "=%d\n", gOpts.bl3x[BL31_SEC].sec); in printOpts()
239 if (gOpts.bl3x[BL31_SEC].sec) { in printOpts()
240 fprintf(out, OPT_PATH "=%s\n", gOpts.bl3x[BL31_SEC].path); in printOpts()
241 fprintf(out, OPT_ADDR "=0x%08x\n", gOpts.bl3x[BL31_SEC].addr); in printOpts()
244 fprintf(out, SEC_BL32 "\n" OPT_SEC "=%d\n", gOpts.bl3x[BL32_SEC].sec); in printOpts()
245 if (gOpts.bl3x[BL32_SEC].sec) { in printOpts()
246 fprintf(out, OPT_PATH "=%s\n", gOpts.bl3x[BL32_SEC].path); in printOpts()
247 fprintf(out, OPT_ADDR "=0x%08x\n", gOpts.bl3x[BL32_SEC].addr); in printOpts()
250 fprintf(out, SEC_BL33 "\n" OPT_SEC "=%d\n", gOpts.bl3x[BL33_SEC].sec); in printOpts()
251 if (gOpts.bl3x[BL33_SEC].sec) { in printOpts()
252 fprintf(out, OPT_PATH "=%s\n", gOpts.bl3x[BL33_SEC].path); in printOpts()
253 fprintf(out, OPT_ADDR "=0x%08x\n", gOpts.bl3x[BL33_SEC].addr); in printOpts()
256 fprintf(out, SEC_OUT "\n" OPT_OUT_PATH "=%s\n", gOpts.outPath); in printOpts()
347 memset(&gOpts, 0, sizeof(gOpts)); in initOpts()
349 gOpts.major = DEF_MAJOR; in initOpts()
350 gOpts.minor = DEF_MINOR; in initOpts()
352 memcpy(&gOpts.bl3x[BL30_SEC].id, gBl3xID[BL30_SEC], 4); in initOpts()
353 strcpy(gOpts.bl3x[BL30_SEC].path, DEF_BL30_PATH); in initOpts()
355 memcpy(&gOpts.bl3x[BL31_SEC].id, gBl3xID[BL31_SEC], 4); in initOpts()
356 strcpy(gOpts.bl3x[BL31_SEC].path, DEF_BL31_PATH); in initOpts()
358 memcpy(&gOpts.bl3x[BL32_SEC].id, gBl3xID[BL32_SEC], 4); in initOpts()
359 strcpy(gOpts.bl3x[BL32_SEC].path, DEF_BL32_PATH); in initOpts()
361 memcpy(&gOpts.bl3x[BL33_SEC].id, gBl3xID[BL33_SEC], 4); in initOpts()
362 strcpy(gOpts.bl3x[BL33_SEC].path, DEF_BL33_PATH); in initOpts()
364 strcpy(gOpts.outPath, DEF_OUT_PATH); in initOpts()
405 LOGD("index=%d,file=%s\n", index, gOpts.bl3x[index].path); in filter_elf()
407 if (!getFileSize(gOpts.bl3x[index].path, &file_size)) in filter_elf()
409 file = fopen(gOpts.bl3x[index].path, "rb"); in filter_elf()
411 LOGE("open file(%s) failed\n", gOpts.bl3x[index].path); in filter_elf()
441 pEntry->id = gOpts.bl3x[index].id; in filter_elf()
442 strcpy(pEntry->path, gOpts.bl3x[index].path); in filter_elf()
464 pEntry->id = gOpts.bl3x[index].id; in filter_elf()
465 strcpy(pEntry->path, gOpts.bl3x[index].path); in filter_elf()
555 if (gOpts.bl3x[i].sec) { in mergetrust()
557 LOGE("filter_elf %s file failed\n", gOpts.bl3x[i].path); in mergetrust()
562 pEntry->id = gOpts.bl3x[i].id; in mergetrust()
563 strcpy(pEntry->path, gOpts.bl3x[i].path); in mergetrust()
567 pEntry->addr = gOpts.bl3x[i].addr; in mergetrust()
569 LOGE("file %s too large.\n", gOpts.bl3x[i].path); in mergetrust()
588 pHead->version = (getBCD(gOpts.major) << 8) | getBCD(gOpts.minor); in mergetrust()
622 outFile = fopen(gOpts.outPath, "wb+"); in mergetrust()
624 LOGE("open out file(%s) failed\n", gOpts.outPath); in mergetrust()
641 if (gOpts.bl3x[i].sec) { in mergetrust()
642 FILE *inFile = fopen(gOpts.bl3x[i].path, "rb"); in mergetrust()
943 printf("merge success(%s)\n", gOpts.outPath); in main()