Merge "Add support to sign boot images with vboot."
This commit is contained in:
commit
1c7151876a
|
@ -503,7 +503,22 @@ bootimage-nodeps: $(MKBOOTIMG) $(BOOT_SIGNER)
|
|||
$(BOOT_SIGNER) /boot $(INSTALLED_BOOTIMAGE_TARGET) $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VERITY_SIGNING_KEY).pk8 $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VERITY_SIGNING_KEY).x509.pem $(INSTALLED_BOOTIMAGE_TARGET)
|
||||
$(hide) $(call assert-max-image-size,$(INSTALLED_BOOTIMAGE_TARGET),$(BOARD_BOOTIMAGE_PARTITION_SIZE))
|
||||
|
||||
else # PRODUCT_SUPPORTS_VERITY != true
|
||||
else ifeq (true,$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VBOOT)) # PRODUCT_SUPPORTS_VERITY != true
|
||||
|
||||
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(VBOOT_SIGNER)
|
||||
$(call pretty,"Target boot image: $@")
|
||||
$(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@.unsigned
|
||||
$(VBOOT_SIGNER) $(FUTILITY) $@.unsigned $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VBOOT_SIGNING_KEY).vbpubk $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VBOOT_SIGNING_KEY).vbprivk $@.keyblock $@
|
||||
$(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE))
|
||||
|
||||
.PHONY: bootimage-nodeps
|
||||
bootimage-nodeps: $(MKBOOTIMG) $(VBOOT_SIGNER)
|
||||
@echo "make $@: ignoring dependencies"
|
||||
$(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $(INSTALLED_BOOTIMAGE_TARGET).unsigned
|
||||
$(VBOOT_SIGNER) $(FUTILITY) $(INSTALLED_BOOTIMAGE_TARGET).unsigned $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VBOOT_SIGNING_KEY).vbpubk $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VBOOT_SIGNING_KEY).vbprivk $(INSTALLED_BOOTIMAGE_TARGET).keyblock $(INSTALLED_BOOTIMAGE_TARGET)
|
||||
$(hide) $(call assert-max-image-size,$(INSTALLED_BOOTIMAGE_TARGET),$(BOARD_BOOTIMAGE_PARTITION_SIZE))
|
||||
|
||||
else # PRODUCT_SUPPORTS_VBOOT != true
|
||||
|
||||
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES)
|
||||
$(call pretty,"Target boot image: $@")
|
||||
|
|
|
@ -463,6 +463,8 @@ APPEND2SIMG := $(HOST_OUT_EXECUTABLES)/append2simg
|
|||
VERITY_SIGNER := $(HOST_OUT_EXECUTABLES)/verity_signer
|
||||
BUILD_VERITY_TREE := $(HOST_OUT_EXECUTABLES)/build_verity_tree
|
||||
BOOT_SIGNER := $(HOST_OUT_EXECUTABLES)/boot_signer
|
||||
FUTILITY := prebuilts/misc/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/futility/futility
|
||||
VBOOT_SIGNER := prebuilts/misc/scripts/vboot_signer/vboot_signer.sh
|
||||
|
||||
# ACP is always for the build OS, not for the host OS
|
||||
ACP := $(BUILD_OUT_EXECUTABLES)/acp$(BUILD_EXECUTABLE_SUFFIX)
|
||||
|
|
|
@ -97,10 +97,12 @@ _product_var_list := \
|
|||
PRODUCT_RESTRICT_VENDOR_FILES \
|
||||
PRODUCT_VENDOR_KERNEL_HEADERS \
|
||||
PRODUCT_BOOT_JARS \
|
||||
PRODUCT_SUPPORTS_VBOOT \
|
||||
PRODUCT_SUPPORTS_VERITY \
|
||||
PRODUCT_OEM_PROPERTIES \
|
||||
PRODUCT_SYSTEM_PROPERTY_BLACKLIST \
|
||||
PRODUCT_SYSTEM_SERVER_JARS \
|
||||
PRODUCT_VBOOT_SIGNING_KEY \
|
||||
PRODUCT_VERITY_SIGNING_KEY \
|
||||
PRODUCT_SYSTEM_VERITY_PARTITION \
|
||||
PRODUCT_VENDOR_VERITY_PARTITION \
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
#
|
||||
# Copyright (C) 2015 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# Provides dependencies necessary for verified boot
|
||||
|
||||
PRODUCT_SUPPORTS_VBOOT := true
|
||||
|
||||
# The dev key is used to sign boot and recovery images.
|
||||
# We expect this file to exist with the suffixes ".vbprivk" and ".vbpupk".
|
||||
# TODO: find a proper location for this
|
||||
PRODUCT_VBOOT_SIGNING_KEY := external/vboot_reference/tests/devkeys/kernel_data_key
|
Loading…
Reference in New Issue