mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 10:14:55 +00:00
Futility needs to link against both vboot1/vboot2.0 and vboot2.1 functions. This was easy in the past because it did (vboot1 + vboot2.1) and there's no overlap. In replacing vboot1 function calls and structs with vboot2.0, now there are symbol collisions between vboot2.0 and vboot2.1. For example, both of them use a struct called vb2_signature, but the structs are defined differently. Functions which operate on those structs also overload. Rename the vb2.1 structs to start with vb21_ instead of vb2_. Do the same for vb2.1 functions which operate on vb2.1 data. BUG=chromium:611535 BRANCH=none TEST=make runtests Change-Id: I24defd87cbd9ef64239faf1a8e98ab2372d27539 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/347458 Reviewed-by: Daisuke Nojiri <dnojiri@google.com>
36 lines
1.2 KiB
C
36 lines
1.2 KiB
C
/* Copyright (c) 2014 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 functions for firmware preamble
|
|
*/
|
|
|
|
#ifndef VBOOT_REFERENCE_HOST_FW_PREAMBLE2_H_
|
|
#define VBOOT_REFERENCE_HOST_FW_PREAMBLE2_H_
|
|
|
|
struct vb2_private_key;
|
|
struct vb21_fw_preamble;
|
|
struct vb21_signature;
|
|
/**
|
|
* Create and sign a firmware preamble.
|
|
*
|
|
* @param fp_ptr On success, points to a newly allocated preamble buffer.
|
|
* Caller is responsible for calling free() on this.
|
|
* @param signing_key Key to sign the preamble with
|
|
* @param hash_list Component hashes to include in the keyblock
|
|
* @param hash_count Number of component hashes
|
|
* @param fw_version Firmware version
|
|
* @param flags Flags for preamble
|
|
* @param desc Description for preamble, or NULL if none
|
|
* @return VB2_SUCCESS, or non-zero error code if failure.
|
|
*/
|
|
int vb21_fw_preamble_create(struct vb21_fw_preamble **fp_ptr,
|
|
const struct vb2_private_key *signing_key,
|
|
const struct vb21_signature **hash_list,
|
|
uint32_t hash_count,
|
|
uint32_t fw_version,
|
|
uint32_t flags,
|
|
const char *desc);
|
|
|
|
#endif /* VBOOT_REFERENCE_HOST_FW_PREAMBLE2_H_ */
|