Home | History | Annotate | Download | only in mkbootimg

Lines Matching refs:hdr

96     boot_img_hdr hdr;
115 memset(&hdr, 0, sizeof(hdr));
118 hdr.kernel_addr = 0x10008000;
119 hdr.ramdisk_addr = 0x11000000;
120 hdr.second_addr = 0x10F00000;
121 hdr.tags_addr = 0x10000100;
123 hdr.page_size = pagesize;
145 hdr.kernel_addr = base + 0x00008000;
146 hdr.ramdisk_addr = base + 0x01000000;
147 hdr.second_addr = base + 0x00F00000;
148 hdr.tags_addr = base + 0x00000100;
176 strcpy(hdr.name, board);
178 memcpy(hdr.magic, BOOT_MAGIC, BOOT_MAGIC_SIZE);
184 strcpy((char*)hdr.cmdline, cmdline);
186 kernel_data = load_file(kernel_fn, &hdr.kernel_size);
194 hdr.ramdisk_size = 0;
196 ramdisk_data = load_file(ramdisk_fn, &hdr.ramdisk_size);
204 second_data = load_file(second_fn, &hdr.second_size);
215 SHA_update(&ctx, kernel_data, hdr.kernel_size);
216 SHA_update(&ctx, &hdr.kernel_size, sizeof(hdr.kernel_size));
217 SHA_update(&ctx, ramdisk_data, hdr.ramdisk_size);
218 SHA_update(&ctx, &hdr.ramdisk_size, sizeof(hdr.ramdisk_size));
219 SHA_update(&ctx, second_data, hdr.second_size);
220 SHA_update(&ctx, &hdr.second_size, sizeof(hdr.second_size));
222 memcpy(hdr.id, sha,
223 SHA_DIGEST_SIZE > sizeof(hdr.id) ? sizeof(hdr.id) : SHA_DIGEST_SIZE);
231 if(write(fd, &hdr, sizeof(hdr)) != sizeof(hdr)) goto fail;
232 if(write_padding(fd, pagesize, sizeof(hdr))) goto fail;
234 if(write(fd, kernel_data, hdr.kernel_size) != hdr.kernel_size) goto fail;
235 if(write_padding(fd, pagesize, hdr.kernel_size)) goto fail;
237 if(write(fd, ramdisk_data, hdr.ramdisk_size) != hdr.ramdisk_size) goto fail;
238 if(write_padding(fd, pagesize, hdr.ramdisk_size)) goto fail;
241 if(write(fd, second_data, hdr.second_size) != hdr.second_size) goto fail;
242 if(write_padding(fd, pagesize, hdr.ramdisk_size)) goto fail;