mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 02:05:01 +00:00
kernel flags: Add flags field to kernel preamble.
1. Increase kernel preamble revision from 2.1 to 2.2. 2. Add flags field to kernel preamble. 3. Update futility to accept flags parameter for vbutil_kernel and cmd_sign for kernel. 4. Pass in an extra flags field to SignKernelBlob and CreateKernelPreamble. BUG=chrome-os-partner:35861 BRANCH=None TEST=1) "make runalltests" completes successfully. 2) vboot_reference compiles successfully for ryu. 3) Verified flags field in header using futility show. Change-Id: If9f06f98778a7339194c77090cbef4807d5e34e2 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/245950 Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
623d6c4744
commit
80e779d50b
@@ -41,6 +41,8 @@ enum {
|
||||
VBOOT_PREAMBLE_SIGNATURE,
|
||||
/* Shared data is invalid. */
|
||||
VBOOT_SHARED_DATA_INVALID,
|
||||
/* Kernel Preamble does not contain flags */
|
||||
VBOOT_KERNEL_PREAMBLE_NO_FLAGS,
|
||||
VBOOT_ERROR_MAX,
|
||||
};
|
||||
extern const char *kVbootErrors[VBOOT_ERROR_MAX];
|
||||
@@ -160,6 +162,15 @@ int VbGetKernelVmlinuzHeader(const VbKernelPreambleHeader *preamble,
|
||||
uint64_t *vmlinuz_header_address,
|
||||
uint64_t *vmlinuz_header_size);
|
||||
|
||||
/**
|
||||
* Checks if the kernel preamble has flags field. This is available only if the
|
||||
* Kernel Preamble Header version >=2.2. If give a header of 2.1 or lower, it
|
||||
* will return VBOOT_KERNEL_PREAMBLE_NO_FLAGS.
|
||||
*
|
||||
* Returns VBOOT_SUCCESS if version is >=2.2.
|
||||
*/
|
||||
int VbKernelHasFlags(const VbKernelPreambleHeader *preamble);
|
||||
|
||||
/**
|
||||
* Verify that the Vmlinuz Header is contained inside of the kernel blob.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user