mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-26 19:25:02 +00:00
This adds some tools to help us figure out why a particular kernel isn't booting. Often we suspect it's because it was signed with the wrong keys, or has flags restricting its use to certain boot modes. This change adds some tools to extract and display all the keys from the BIOS, and try them on the various kernels. We also display the sha1sum of all the keys we find, to make comparing them easier. Change-Id: I38e447bf95cb6c3a0b87aa949611bb135f2f94b4 BUG=chromeos-partner:888 TEST=manual To test, obtain a root shell, and run dev_debug_vboot. You should see lots of useful information go by. Review URL: http://codereview.chromium.org/3303018
31 lines
879 B
C
31 lines
879 B
C
/* Copyright (c) 2010 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.
|
|
*
|
|
* Host-side misc functions for verified boot.
|
|
*/
|
|
|
|
#ifndef VBOOT_REFERENCE_HOST_MISC_H_
|
|
#define VBOOT_REFERENCE_HOST_MISC_H_
|
|
|
|
#include "utility.h"
|
|
#include "vboot_struct.h"
|
|
|
|
|
|
/* Read data from [filename]. Store the size of returned data in [size].
|
|
*
|
|
* Returns the data buffer, which the caller must Free(), or NULL if
|
|
* error. */
|
|
uint8_t* ReadFile(const char* filename, uint64_t* size);
|
|
|
|
|
|
/* Writes [size] bytes of [data] to [filename].
|
|
*
|
|
* Returns 0 if success, 1 if error. */
|
|
int WriteFile(const char* filename, const void *data, uint64_t size);
|
|
|
|
/* Prints the sha1sum of the given VbPublicKey to stdout. */
|
|
void PrintPubKeySha1Sum(VbPublicKey* key);
|
|
|
|
#endif /* VBOOT_REFERENCE_HOST_MISC_H_ */
|