| # 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 | |
| # == libabr == | |
| abr_dir=firmware_sdk/pkg/abr | |
| obj-y += $(abr_dir)/flow.o $(abr_dir)/util.o | |
| ccflags-y := -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 | |
| # == zbi-format headers == | |
| zbi_format_dir=firmware_sdk/pkg/zbi-format | |
| ccflags-y += -I$(srctree)/$(src)/$(zbi_format_dir)/include | |
| # == zircon boot == | |
| zboot_dir=firmware_sdk/pkg/zircon_boot | |
| obj-y += \ | |
| $(zboot_dir)/android_boot_image.o \ | |
| $(zboot_dir)/zbi_utils.o \ | |
| $(zboot_dir)/zircon_boot.o \ | |
| $(zboot_dir)/zircon_ramboot.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-y += \ | |
| ${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_sha256.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 \ | |
| # == libavb_atx == | |
| avb_atx_dir=firmware_sdk/pkg/avb/libavb_atx | |
| obj-y += $(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-y += \ | |
| -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 |