mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-27 03:33:50 +00:00
Modifying the kernel_utility tool to create our magic blob.
For the --generate operation, the --in <file> option is gone and there are three new required options: --vmlinuz <file> Embedded kernel image --config <file> Embedded kernel command-line parameters --bootloader <file> Embedded bootloader stub This takes the specified kernel, extracts the 32-bit component, and combines that with the configuration file (essentially just the kernel cmdline string) and the bootstub image . The resulting blob is signed and ready to put in a kernel partition. There's also an optional --padding parameter, to specify how much extra (unsigned) space to leave between the signature header and the kernel blob. The default is 0x4000, which is about four times as much needed when using the largest signature size we currently support. Review URL: http://codereview.chromium.org/2283005
This commit is contained in:
@@ -63,6 +63,18 @@ int WriteKernelImage(const char* input_file,
|
||||
const KernelImage* image,
|
||||
int is_only_vblock);
|
||||
|
||||
/* Create a kernel_data blob from its components and fill
|
||||
* its length into blob_len, plus some information about the bootloader.
|
||||
*
|
||||
* Caller owns the returned pointer and must Free() it.
|
||||
*/
|
||||
uint8_t* GenerateKernelBlob(const char* vmlinuz_file,
|
||||
const char* config_file,
|
||||
const char* bootloader_file,
|
||||
uint64_t* blob_len,
|
||||
uint64_t* bootloader_offset,
|
||||
uint64_t* bootloader_size);
|
||||
|
||||
/* Pretty print the contents of [image]. Only headers and metadata information
|
||||
* is printed.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user