Home | History | Annotate | Download | only in mkbootimg

Lines Matching refs:hdr

97     boot_img_hdr hdr;
116 memset(&hdr, 0, sizeof(hdr));
119 hdr.kernel_addr = 0x10008000;
120 hdr.ramdisk_addr = 0x11000000;
121 hdr.second_addr = 0x10F00000;
122 hdr.tags_addr = 0x10000100;
144 hdr.kernel_addr = base + 0x00008000;
145 hdr.ramdisk_addr = base + 0x01000000;
146 hdr.second_addr = base + 0x00F00000;
147 hdr.tags_addr = base + 0x00000100;
160 hdr.page_size = pagesize;
183 strcpy(hdr.name, board);
185 memcpy(hdr.magic, BOOT_MAGIC, BOOT_MAGIC_SIZE);
191 strcpy((char*)hdr.cmdline, cmdline);
193 kernel_data = load_file(kernel_fn, &hdr.kernel_size);
201 hdr.ramdisk_size = 0;
203 ramdisk_data = load_file(ramdisk_fn, &hdr.ramdisk_size);
211 second_data = load_file(second_fn, &hdr.second_size);
222 SHA_update(&ctx, kernel_data, hdr.kernel_size);
223 SHA_update(&ctx, &hdr.kernel_size, sizeof(hdr.kernel_size));
224 SHA_update(&ctx, ramdisk_data, hdr.ramdisk_size);
225 SHA_update(&ctx, &hdr.ramdisk_size, sizeof(hdr.ramdisk_size));
226 SHA_update(&ctx, second_data, hdr.second_size);
227 SHA_update(&ctx, &hdr.second_size, sizeof(hdr.second_size));
229 memcpy(hdr.id, sha,
230 SHA_DIGEST_SIZE > sizeof(hdr.id) ? sizeof(hdr.id) : SHA_DIGEST_SIZE);
238 if(write(fd, &hdr, sizeof(hdr)) != sizeof(hdr)) goto fail;
239 if(write_padding(fd, pagesize, sizeof(hdr))) goto fail;
241 if(write(fd, kernel_data, hdr.kernel_size) != hdr.kernel_size) goto fail;
242 if(write_padding(fd, pagesize, hdr.kernel_size)) goto fail;
244 if(write(fd, ramdisk_data, hdr.ramdisk_size) != hdr.ramdisk_size) goto fail;
245 if(write_padding(fd, pagesize, hdr.ramdisk_size)) goto fail;
248 if(write(fd, second_data, hdr.second_size) != hdr.second_size) goto fail;
249 if(write_padding(fd, pagesize, hdr.ramdisk_size)) goto fail;