Lines Matching refs:params
18 static struct image_tool_params params = { variable
77 params.cmdname); in usage()
89 params.cmdname); in usage()
93 params.cmdname); in usage()
114 params.cmdname); in usage()
129 if (params.content_tail) in add_content()
130 params.content_tail->next = cont; in add_content()
132 params.content_head = cont; in add_content()
133 params.content_tail = cont; in add_content()
149 params.addr = strtoull(optarg, &ptr, 16); in process_args()
152 params.cmdname, optarg); in process_args()
157 params.arch = genimg_get_arch_id(optarg); in process_args()
158 if (params.arch < 0) { in process_args()
167 params.cmdname, optarg); in process_args()
172 params.comment = optarg; in process_args()
175 params.comp = genimg_get_comp_id(optarg); in process_args()
176 if (params.comp < 0) { in process_args()
182 params.datafile = optarg; in process_args()
183 params.dflag = 1; in process_args()
186 params.dtc = optarg; in process_args()
189 params.ep = strtoull(optarg, &ptr, 16); in process_args()
192 params.cmdname, optarg); in process_args()
195 params.eflag = 1; in process_args()
198 params.external_data = true; in process_args()
202 params.auto_its = !strcmp(datafile, "auto"); in process_args()
209 params.type = IH_TYPE_FLATDT; in process_args()
210 params.fflag = 1; in process_args()
213 params.fit_ramdisk = optarg; in process_args()
216 params.keydir = optarg; in process_args()
219 params.keydest = optarg; in process_args()
222 params.lflag = 1; in process_args()
225 params.imagename = optarg; in process_args()
228 params.engine_id = optarg; in process_args()
231 params.os = genimg_get_os_id(optarg); in process_args()
232 if (params.os < 0) { in process_args()
238 params.external_offset = strtoull(optarg, &ptr, 16); in process_args()
241 params.cmdname, optarg); in process_args()
246 params.quiet = 1; in process_args()
249 params.require_keys = 1; in process_args()
256 params.imagename2 = optarg; in process_args()
259 params.skipcpy = 1; in process_args()
273 params.vflag++; in process_args()
279 params.xflag++; in process_args()
288 params.imagefile = argv[optind]; in process_args()
295 if (params.type == IH_TYPE_FLATDT) { in process_args()
296 params.fit_image_type = type ? type : IH_TYPE_KERNEL; in process_args()
298 if (!params.auto_its) in process_args()
299 params.datafile = datafile; in process_args()
300 else if (!params.datafile) in process_args()
303 if (type == IH_TYPE_SCRIPT && !params.datafile) in process_args()
305 params.type = type; in process_args()
308 if (!params.imagefile) in process_args()
322 params.cmdname = *argv; in main()
323 params.addr = 0; in main()
324 params.ep = 0; in main()
329 tparams = imagetool_get_type(params.type); in main()
332 params.cmdname, genimg_get_type_name(params.type)); in main()
341 if (tparams->check_params (¶ms)) in main()
344 if (!params.eflag) { in main()
345 params.ep = params.addr; in main()
347 if (params.xflag) in main()
348 params.ep += tparams->header_size; in main()
351 if (params.fflag){ in main()
359 retval = tparams->fflag_handle(¶ms); in main()
365 if (params.lflag || params.fflag) { in main()
366 ifd = open (params.imagefile, O_RDONLY|O_BINARY); in main()
368 ifd = open (params.imagefile, in main()
374 params.cmdname, params.imagefile, in main()
379 if (params.lflag || params.fflag) { in main()
385 params.cmdname, params.imagefile, in main()
393 params.cmdname, params.imagefile); in main()
400 params.cmdname, params.imagefile, in main()
412 tparams, ¶ms); in main()
420 if ((params.type != IH_TYPE_MULTI) && (params.type != IH_TYPE_SCRIPT)) { in main()
421 dfd = open(params.datafile, O_RDONLY | O_BINARY); in main()
424 params.cmdname, params.datafile, in main()
431 params.cmdname, params.datafile, in main()
436 params.file_size = sbuf.st_size + tparams->header_size; in main()
447 pad_len = tparams->vrec_header(¶ms, tparams); in main()
454 params.cmdname, params.imagefile, strerror(errno)); in main()
458 if (!params.skipcpy) { in main()
459 if (params.type == IH_TYPE_MULTI || in main()
460 params.type == IH_TYPE_SCRIPT) { in main()
461 char *file = params.datafile; in main()
474 params.cmdname, file, strerror(errno)); in main()
484 params.cmdname, params.imagefile, in main()
501 file = params.datafile; in main()
515 } else if (params.type == IH_TYPE_PBLIMAGE) { in main()
517 pbl_load_uboot(ifd, ¶ms); in main()
518 } else if (params.type == IH_TYPE_ZYNQMPBIF) { in main()
522 ret = zynqmpbif_copy_image(ifd, ¶ms); in main()
526 copy_file(ifd, params.datafile, pad_len); in main()
528 if (params.type == IH_TYPE_FIRMWARE_IVT) { in main()
530 uint32_t aligned_filesize = (params.file_size + 0x1000 in main()
533 params.addr, 0, 0, 0, params.addr in main()
536 params.addr + aligned_filesize in main()
539 int i = params.file_size; in main()
544 params.cmdname, in main()
545 params.imagefile, in main()
553 params.cmdname, in main()
554 params.imagefile, in main()
574 params.cmdname, params.imagefile, strerror(errno)); in main()
577 params.file_size = sbuf.st_size; in main()
582 params.cmdname, params.imagefile, strerror(errno)); in main()
588 tparams->set_header (ptr, &sbuf, ifd, ¶ms); in main()
591 params.cmdname, tparams->name, strerror(errno)); in main()
600 params.cmdname, tparams->name); in main()
618 params.cmdname, params.imagefile, strerror(errno)); in main()
636 struct image_type_params *tparams = imagetool_get_type(params.type); in copy_file()
640 if (params.vflag) { in copy_file()
646 params.cmdname, datafile, strerror(errno)); in copy_file()
652 params.cmdname, datafile, strerror(errno)); in copy_file()
659 params.cmdname, datafile, strerror(errno)); in copy_file()
663 if (params.xflag) { in copy_file()
674 params.cmdname, datafile); in copy_file()
682 params.cmdname, datafile); in copy_file()
693 params.cmdname, params.imagefile, strerror(errno)); in copy_file()
702 params.cmdname, params.imagefile, in copy_file()
714 params.cmdname, params.imagefile, in copy_file()