mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 02:05:01 +00:00
Make LoadKernel() pass back the kernel partition's UniqueGuid.
LoadKernel already returns the partition number for the selected kernel. This change makes it also return the GPT Entry's UniqueGuid, which will eventually be passed to the kernel itself, so the kernel can determine which of several possible devices it has booted from. It doesn't know for certain because the BIOS and the kernel may enumerate the devices in a different order. BUG=chromium-os:4984 Review URL: http://codereview.chromium.org/3056014
This commit is contained in:
@@ -10,12 +10,12 @@
|
||||
|
||||
#include "boot_device.h"
|
||||
#include "cgptlib.h"
|
||||
#include "cgptlib_internal.h"
|
||||
#include "load_kernel_fw.h"
|
||||
#include "rollback_index.h"
|
||||
#include "utility.h"
|
||||
#include "vboot_common.h"
|
||||
|
||||
|
||||
#define KBUF_SIZE 65536 /* Bytes to read at start of kernel partition */
|
||||
|
||||
|
||||
@@ -131,7 +131,6 @@ int LoadKernel(LoadKernelParams* params) {
|
||||
|
||||
/* Sanity Checks */
|
||||
if (!params ||
|
||||
!params->header_sign_key_blob ||
|
||||
!params->bytes_per_lba ||
|
||||
!params->ending_lba ||
|
||||
!params->kernel_buffer ||
|
||||
@@ -350,6 +349,7 @@ int LoadKernel(LoadKernelParams* params) {
|
||||
* Adjust here, until cgptlib is fixed. */
|
||||
good_partition = gpt.current_kernel + 1;
|
||||
params->partition_number = gpt.current_kernel + 1;
|
||||
GetCurrentKernelUniqueGuid(&gpt, ¶ms->partition_guid);
|
||||
params->bootloader_address = preamble->bootloader_address;
|
||||
params->bootloader_size = preamble->bootloader_size;
|
||||
/* If we're in developer or recovery mode, there's no rollback
|
||||
|
||||
Reference in New Issue
Block a user