Lines Matching refs:tag

35 void int2tag(char *tag, uint32_t value) {
37 memcpy(tag, (char *)(&network), 4);
83 struct bcm_tag tag;
101 memset(&tag, 0, sizeof(struct bcm_tag));
132 /* Seek to the start of the file after tag */
133 fseek(binfile, sizeof(tag), SEEK_SET);
148 kerneloff = fwaddr + sizeof(tag);
239 rootfsoff = fwaddr + sizeof(tag);
286 imagecrc = compute_crc32(imagecrc, binfile, sizeof(tag), imagelen);
300 /* Build the tag */
301 strncpy(tag.tagVersion, args->tag_version_arg, sizeof(tag.tagVersion) - 1);
302 strncpy(tag.sig_1, args->signature_arg, sizeof(tag.sig_1) - 1);
303 strncpy(tag.sig_2, args->signature2_arg, sizeof(tag.sig_2) - 1);
304 strncpy(tag.chipid, args->chipid_arg, sizeof(tag.chipid) - 1);
305 strncpy(tag.boardid, args->boardid_arg, sizeof(tag.boardid) - 1);
306 strcpy(tag.big_endian, "1");
307 sprintf(tag.totalLength, "%lu", imagelen);
310 sprintf(tag.cfeAddress, "%" PRIu32, flash_start);
311 sprintf(tag.cfeLength, "%lu", cfelen);
314 strcpy(tag.cfeAddress, "0");
315 strcpy(tag.cfeLength, "0");
318 sprintf(tag.kernelAddress, "%lu", kerneloff);
319 sprintf(tag.kernelLength, "%lu", kernellen + rootfsoffpadlen);
322 sprintf(tag.flashImageStart, "%lu", rootfsoff);
323 sprintf(tag.flashRootLength, "%lu", rootfslen);
325 sprintf(tag.flashImageStart, "%lu", kerneloff);
326 sprintf(tag.flashRootLength, "%lu", rootfslen + sizeof(deadcode));
328 int2tag(tag.rootLength, oldrootfslen + sizeof(deadcode));
331 strncpy(tag.rsa_signature, args->rsa_signature_arg, RSASIG_LEN);
335 strncpy(tag.flashLayoutVer, args->layoutver_arg, TAGLAYOUT_LEN);
339 strncpy(tag.information1, args->info1_arg, TAGINFO1_LEN);
343 strncpy(tag.information2, args->info2_arg, TAGINFO2_LEN);
347 strncpy(tag.reserved2, args->reserved2_arg, 16);
351 strncpy(tag.information1, args->altinfo_arg, TAGINFO1_LEN);
356 strncpy(tag.dualImage, args->second_image_flag_arg, DUALFLAG_LEN);
362 strncpy(tag.inactiveFlag, args->second_image_flag_arg, INACTIVEFLAG_LEN);
374 int2tag(tag.imageCRC, kernelfscrc);
376 int2tag(tag.imageCRC, kernelcrc);
379 int2tag(&(tag.rootfsCRC[0]), rootfscrc);
380 int2tag(tag.kernelCRC, kernelcrc);
381 int2tag(tag.fskernelCRC, kernelfscrc);
382 int2tag(tag.headerCRC, cyg_crc32_accumulate(IMAGETAG_CRC_START, (uint8_t*)&tag, sizeof(tag) - 20));
385 fwrite(&tag, sizeof(uint8_t), sizeof(tag), binfile);