| # Copyright 2020 The Fuchsia Authors. All rights reserved. |
| # |
| # Use of this source code is governed by a BSD-style |
| # license that can be found in the LICENSE file. |
| # SPDX-License-Identifier: BSD-3-Clause |
| |
| abr_dir=firmware_sdk/pkg/abr |
| obj-$(CONFIG_LIBABR) += $(abr_dir)/flow.o $(abr_dir)/util.o |
| ccflags-$(CONFIG_LIBABR) := -I$(srctree)/$(src)/$(abr_dir)/include |
| |
| # == libzbi == |
| zbi_dir=firmware_sdk/pkg/zbi |
| obj-y += $(zbi_dir)/zbi.o |
| ccflags-y += -I$(srctree)/$(src)/$(zbi_dir)/include |
| |
| # == zircon boot == |
| zboot_dir=firmware_sdk/pkg/zircon_boot |
| obj-y += $(zboot_dir)/zircon_boot.o $(zboot_dir)/zbi_utils.o $(zboot_dir)/zircon_vboot.o |
| ccflags-y += \ |
| -Wno-error=format \ |
| -DZIRCON_BOOT_CUSTOM_SYSDEPS_HEADER \ |
| -I$(srctree)/$(src)/$(zboot_dir)/include \ |
| -I$(srctree)/$(src)/firmware_sdk/pkg/avb |
| |
| # == libavb == |
| avb_dir=firmware_sdk/pkg/avb/libavb |
| # == libavb and libavb_atx == |
| obj-$(CONFIG_LIBAVB) += \ |
| ${avb_dir}/avb_chain_partition_descriptor.o \ |
| ${avb_dir}/avb_cmdline.o \ |
| ${avb_dir}/avb_crc32.o \ |
| ${avb_dir}/avb_crypto.o \ |
| ${avb_dir}/avb_descriptor.o \ |
| ${avb_dir}/avb_footer.o \ |
| ${avb_dir}/avb_hash_descriptor.o \ |
| ${avb_dir}/avb_hashtree_descriptor.o \ |
| ${avb_dir}/avb_kernel_cmdline_descriptor.o \ |
| ${avb_dir}/avb_property_descriptor.o \ |
| ${avb_dir}/avb_rsa.o \ |
| ${avb_dir}/avb_sha512.o \ |
| ${avb_dir}/avb_slot_verify.o \ |
| ${avb_dir}/avb_util.o \ |
| ${avb_dir}/avb_vbmeta_image.o \ |
| ${avb_dir}/avb_sysdeps_posix.o \ |
| ${avb_dir}/avb_version.o |
| |
| ifndef CONFIG_LIBAVB_PREFER_HOST_SHA256 |
| obj-$(CONFIG_LIBAVB) += ${avb_dir}/avb_sha256.o |
| endif |
| |
| # == libavb_atx == |
| avb_atx_dir=firmware_sdk/pkg/avb/libavb_atx |
| obj-$(CONFIG_LIBAVB) += $(avb_atx_dir)/avb_atx_validate.o |
| ccflags-y += -I$(srctree)/$(src)/firmware_sdk/pkg/avb |
| |
| # Flags from libavb's Android.bp build file. |
| ccflags-$(CONFIG_LIBAVB) += \ |
| -D_FILE_OFFSET_BITS=64 \ |
| -D_POSIX_C_SOURCE=199309L \ |
| -Wa,--noexecstack \ |
| -Werror \ |
| -Wall \ |
| -Wextra \ |
| -Wformat=2 \ |
| -Wmissing-prototypes \ |
| -Wno-psabi \ |
| -Wno-unused-parameter \ |
| -Wno-format \ |
| -Wno-error=maybe-uninitialized\ |
| -ffunction-sections \ |
| -DAVB_ENABLE_DEBUG \ |
| -DAVB_COMPILATION |