Lines Matching refs:lkp
29 static LoadKernelParams lkp;
40 if (lba_start >= lkp.streaming_lba_count ||
41 lba_start + lba_count > lkp.streaming_lba_count) {
43 lba_start, lba_count, lkp.streaming_lba_count);
47 fseek(image_file, lba_start * lkp.bytes_per_lba, SEEK_SET);
48 if (1 != fread(buffer, lba_count * lkp.bytes_per_lba, 1, image_file)) {
60 if (lba_start >= lkp.streaming_lba_count ||
61 lba_start + lba_count > lkp.streaming_lba_count) {
63 lba_start, lba_count, lkp.streaming_lba_count);
70 fseek(image_file, lba_start * lkp.bytes_per_lba, SEEK_SET);
71 if (1 != fwrite(buffer, lba_count * lkp.bytes_per_lba, 1, image_file)) {
92 Memset(&lkp, 0, sizeof(LoadKernelParams));
93 lkp.bytes_per_lba = LBA_BYTES;
94 lkp.boot_flags = BOOT_FLAG_RECOVERY;
97 lkp.nv_context = &vnc;
107 lkp.boot_flags = strtoull(optarg, &e, 0);
159 lkp.gbb_size = sizeof(GoogleBinaryBlockHeader) + key_size;
160 lkp.gbb_data = (void*)malloc(lkp.gbb_size);
161 gbb = (GoogleBinaryBlockHeader*)lkp.gbb_data;
163 Memset(gbb, 0, lkp.gbb_size);
179 lkp.shared_data_blob = malloc(VB_SHARED_DATA_REC_SIZE);
180 lkp.shared_data_size = VB_SHARED_DATA_REC_SIZE;
181 shared = (VbSharedDataHeader*)lkp.shared_data_blob;
182 if (0 != VbSharedDataInit(shared, lkp.shared_data_size)) {
197 printf("bootflags = %" PRIu64 "\n", lkp.boot_flags);
207 lkp.streaming_lba_count = (ftell(image_file) / LBA_BYTES);
208 lkp.gpt_lba_count = lkp.streaming_lba_count;
210 printf("Streaming LBA count: %" PRIu64 "\n", lkp.streaming_lba_count);
213 lkp.kernel_buffer = malloc(KERNEL_BUFFER_SIZE);
214 if(!lkp.kernel_buffer) {
218 lkp.kernel_buffer_size = KERNEL_BUFFER_SIZE;
221 rv = LoadKernel(&lkp, &cparams);
225 printf("Partition number: %" PRIu64 "\n", lkp.partition_number);
226 printf("Bootloader address: %" PRIu64 "\n", lkp.bootloader_address);
227 printf("Bootloader size: %" PRIu64 "\n", lkp.bootloader_size);
231 lkp.partition_guid[3],
232 lkp.partition_guid[2],
233 lkp.partition_guid[1],
234 lkp.partition_guid[0],
235 lkp.partition_guid[5],
236 lkp.partition_guid[4],
237 lkp.partition_guid[7],
238 lkp.partition_guid[6],
239 lkp.partition_guid[8],
240 lkp.partition_guid[9],
241 lkp.partition_guid[10],
242 lkp.partition_guid[11],
243 lkp.partition_guid[12],
244 lkp.partition_guid[13],
245 lkp.partition_guid[14],
246 lkp.partition_guid[15]);
250 free(lkp.kernel_buffer);