mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-26 01:37:24 +00:00
This CL adds a new function VerifyFirmwareDriver_f() means to be a part of the RO firmware which determine which copy of the firmware to boot from. It is meant to ensure that a particular firmware is only booted if 1) it verifies successfully, 2) its version is newer or equal to current stored version. In addition, the driver function also updates the stored version if needed. Currently I am using the TLCL API with stub calls, (in fact, most of the TPM interaction is done in rollback_index.c which implements the actual version query/update API) used by the firmware. Review URL: http://codereview.chromium.org/1241002
51 lines
1.7 KiB
Makefile
51 lines
1.7 KiB
Makefile
# 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.
|
|
|
|
CC ?= gcc
|
|
CXX ?= g++
|
|
CFLAGS ?= -Wall -DNDEBUG -O3 -Werror
|
|
INCLUDES ?= -I../include/
|
|
TOP ?= ../
|
|
|
|
LIBS = firmware_image.o kernel_image.o signature_digest.o file_keys.o \
|
|
rollback_index.o
|
|
|
|
FIRMWARELIBS = $(TOP)/crypto/libcrypto.a $(TOP)/common/libcommon.a
|
|
|
|
all: dumpRSAPublicKey verify_data file_keys.o signature_digest.o \
|
|
firmware_image.o kernel_image.o signature_digest.o \
|
|
signature_digest_utility firmware_utility kernel_utility \
|
|
rollback_index.o
|
|
|
|
dumpRSAPublicKey: dumpRSAPublicKey.c
|
|
$(CC) $(CFLAGS) $< -o $@ -lcrypto
|
|
|
|
verify_data: verify_data.c $(LIBS) $(FIRMWARELIBS)
|
|
$(CC) $(CFLAGS) $(INCLUDES) $< -o $@ $(LIBS) $(FIRMWARELIBS) -lcrypto
|
|
|
|
signature_digest_utility: signature_digest_utility.c $(LIBS) $(FIRMWARELIBS)
|
|
$(CC) $(CFLAGS) $(INCLUDES) $< -o $@ $(LIBS) $(FIRMWARELIBS) -lcrypto
|
|
|
|
firmware_utility: firmware_utility.cc $(LIBS) $(FIRMWARELIBS)
|
|
$(CXX) $(CFLAGS) $(INCLUDES) -ggdb -D__STDC_LIMIT_MACROS $< \
|
|
-o $@ $(FIRMWARELIBS) $(LIBS) $(TOP)/common/libcommon.a \
|
|
-lcrypto
|
|
|
|
kernel_utility: kernel_utility.cc $(LIBS) $(FIRMWARELIBS)
|
|
$(CXX) $(CFLAGS) $(INCLUDES) -ggdb -D__STDC_LIMIT_MACROS $< \
|
|
-o $@ $(FIRMWARELIBS) $(LIBS) $(TOP)/common/libcommon.a \
|
|
-lcrypto
|
|
|
|
.c.o:
|
|
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
|
|
|
|
firmware_image.o: firmware_image.c
|
|
$(CC) -ansi $(CFLAGS) $(INCLUDES) -c $< -o $@
|
|
|
|
kernel_image.o: kernel_image.c
|
|
$(CC) -ansi $(CFLAGS) $(INCLUDES) -c $< -o $@
|
|
clean:
|
|
rm -f dumpRSAPublicKey verify_data signature_digest firmware_utility \
|
|
kernel_utility signature_digest_utility $(LIBS)
|