mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 09:01:35 +00:00
The self signed images generated when running 'make BOARD=cr50' use constant default values for the epoch, major and minor image header fields. For the purposes of continuous testing we need the generated images have sensible values in those header fields. Since adding a full blown C++ based parser to the signer image is too much trouble, let's just have a very basic Python based parser, which pays attention only to the required fields from the current manifest. BRANCH=cr50 BUG=none TEST=built the new image and checked its version: $ make BOARD=cr50 ... $ ./extra/usb_updater/usb_updater -b build/cr50/ec.bin read 524288(0x80000) bytes from build/cr50/ec.bin RO_A:0.0.23 RW_A:0.0.23[00000000:00000000:00000000] RO_B:-1.-1.-1 ... Change-Id: I822475ed0a3c481b08e9268f9c13663b0b132d4a Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/651132 Reviewed-by: Marius Schilder <mschilder@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org>
24 lines
1.1 KiB
Makefile
24 lines
1.1 KiB
Makefile
# -*- makefile -*-
|
|
# Copyright 2015 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.
|
|
|
|
signer_LIBS := -lcrypto -lelf -lusb-1.0 -lxml2
|
|
signer_ROOT := util/signer
|
|
signer_INC := $(addprefix common/, aes.h ecdh.h gnubby.h \
|
|
image.h publickey.h signed_header.h)
|
|
signer_SRC := codesigner.cc publickey.cc image.cc gnubby.cc aes.cc ecdh.cc
|
|
SIGNER_DEPS := $(addprefix $(signer_ROOT)/, $(signer_SRC) $(signer_INC))
|
|
|
|
HOST_CXXFLAGS += -I/usr/include/libxml2 -I $(out)
|
|
$(out)/util/signer: $(SIGNER_DEPS) $(out)/pmjp.h
|
|
$(call quiet,cxx_to_host,HOSTCXX)
|
|
|
|
# When building self signed Cr50 images we still want the epoch/major/minor
|
|
# fields come from the dev manifest. Since a full blown JSON parser for C is
|
|
# not readily available, this rule generates a small .h file with only the
|
|
# fields of interest retrieved from the dev JSON file.
|
|
$(out)/pmjp.h: util/signer/pmjp.py util/signer/ec_RW-manifest-dev.json
|
|
@echo " PMJP $@"
|
|
$(Q)./util/signer/pmjp.py ./util/signer/ec_RW-manifest-dev.json > $@
|