OLD | NEW |
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
4 * | 4 * |
5 * API definitions for a generating and manipulating verified boot kernel images
. | 5 * API definitions for a generating and manipulating verified boot kernel images
. |
6 * (Userland portion.) | 6 * (Userland portion.) |
7 */ | 7 */ |
8 | 8 |
9 #ifndef VBOOT_REFERENCE_KERNEL_IMAGE_H_ | 9 #ifndef VBOOT_REFERENCE_KERNEL_IMAGE_H_ |
10 #define VBOOT_REFERENCE_KERNEL_IMAGE_H_ | 10 #define VBOOT_REFERENCE_KERNEL_IMAGE_H_ |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 */ | 47 */ |
48 uint8_t* GetKernelConfigBlob(const KernelImage* image); | 48 uint8_t* GetKernelConfigBlob(const KernelImage* image); |
49 | 49 |
50 /* Get a verified kernel binary blob from an [image] and fill | 50 /* Get a verified kernel binary blob from an [image] and fill |
51 * its length into blob_len. | 51 * its length into blob_len. |
52 * | 52 * |
53 * Caller owns the returned pointer and must Free() it. | 53 * Caller owns the returned pointer and must Free() it. |
54 */ | 54 */ |
55 uint8_t* GetKernelBlob(const KernelImage* image, uint64_t* blob_len); | 55 uint8_t* GetKernelBlob(const KernelImage* image, uint64_t* blob_len); |
56 | 56 |
| 57 |
57 /* Write kernel data from [image] to a file named [input_file]. | 58 /* Write kernel data from [image] to a file named [input_file]. |
58 * If [is_only_vblock] is non-zero, only the verification block is output. | 59 * If [is_only_vblock] is non-zero, only the verification block is output. |
59 * | 60 * |
60 * Return 1 on success, 0 on error. | 61 * Return 1 on success, 0 on error. |
61 */ | 62 */ |
62 int WriteKernelImage(const char* input_file, | 63 int WriteKernelImage(const char* input_file, |
63 const KernelImage* image, | 64 const KernelImage* image, |
64 int is_only_vblock); | 65 int is_only_vblock, |
| 66 int is_subkey_out); |
65 | 67 |
66 /* Create a kernel_data blob from its components and fill | 68 /* Create a kernel_data blob from its components and fill |
67 * its length into blob_len, plus some information about the bootloader. | 69 * its length into blob_len, plus some information about the bootloader. |
68 * | 70 * |
69 * Caller owns the returned pointer and must Free() it. | 71 * Caller owns the returned pointer and must Free() it. |
70 */ | 72 */ |
71 uint8_t* GenerateKernelBlob(const char* vmlinuz_file, | 73 uint8_t* GenerateKernelBlob(const char* vmlinuz_file, |
72 const char* config_file, | 74 const char* config_file, |
73 const char* bootloader_file, | 75 const char* bootloader_file, |
74 uint64_t* blob_len, | 76 uint64_t* blob_len, |
(...skipping 30 matching lines...) Expand all Loading... |
105 * using the private signing key in file [kernel_sigining_key_file]. | 107 * using the private signing key in file [kernel_sigining_key_file]. |
106 * | 108 * |
107 * Return 1 on success, 0 on failure. | 109 * Return 1 on success, 0 on failure. |
108 */ | 110 */ |
109 int AddKernelSignature(KernelImage* image, | 111 int AddKernelSignature(KernelImage* image, |
110 const char* kernel_sigining_key_file); | 112 const char* kernel_sigining_key_file); |
111 | 113 |
112 void PrintKernelEntry(kernel_entry* entry); | 114 void PrintKernelEntry(kernel_entry* entry); |
113 | 115 |
114 #endif /* VBOOT_REFERENCE_KERNEL_IMAGE_H_ */ | 116 #endif /* VBOOT_REFERENCE_KERNEL_IMAGE_H_ */ |
OLD | NEW |