This is necessary to pass additional information about whether firmware A or B is being run. This change also passes the GBB directly into LoadFirmware() and LoadKernel().

Change-Id: I976c11c82c3d665a4feb88226e919f16c2440f60

BUG=chrome-os-partner:1657
TEST=manual - see below

make && make runtests

Then test verifying a test image in both dev mode (-b1, no key specified) and recovery mode (key specified)

build/utility/load_kernel_test -b1 ~/b/USB_images/0.11.224.0-alex/chromiumos_test_image.bin

build/utility/load_kernel_test ~/b/USB_images/0.11.224.0-alex/chromiumos_test_image.bin tests/devkeys/recovery_key.vbpubk

And make sure the firmware with this change actually boots to USB and SSD.

NOTE: u-boot-next needs to change to work with this change.  will attempt a follow-up CL with that change

Review URL: http://codereview.chromium.org/6626045
This commit is contained in:
Randall Spangler
2011-03-09 15:54:16 -08:00
parent c324fbfb6d
commit 95c4031ce9
12 changed files with 278 additions and 71 deletions

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2010-2011 The Chromium OS Authors. All rights reserved.
/* Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
@@ -34,7 +34,15 @@
typedef struct LoadKernelParams {
/* Inputs to LoadKernel() */
void* header_sign_key_blob; /* Key blob used to sign the kernel header */
void* shared_data_blob; /* Buffer for data shared between
* LoadFirmware() and LoadKernel(). Pass the
* same buffer which was passed to
* LoadFirmware(). */
uint64_t shared_data_size; /* Size of shared data blob buffer, in bytes.
* On output, this will contain the actual
* data size placed into the buffer. */
void* gbb_data; /* Pointer to GBB data */
uint64_t gbb_size; /* Size of GBB data in bytes */
uint64_t bytes_per_lba; /* Bytes per lba sector on current device */
uint64_t ending_lba; /* Last addressable lba sector on current
* device */