blob: 87e5d8c4f098076b4acea07ddd08c73fc80c27cb [file] [log] [blame]
# 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 ==
obj-$(CONFIG_LIBABR) += \
abr_sysdeps.o \
firmware_sdk/pkg/abr/flow.o \
firmware_sdk/pkg/abr/util.o
# Global includes are added via symlinks in the top-level include/ dir.
#
# To match u-boot convention global includes don't use a lib/ prefix, but
# Fuchsia source does so we need some extra local include paths to compile
# these files without modification.
ccflags-$(CONFIG_LIBABR) += -Ilib/fuchsia/firmware_sdk/pkg/abr/include
# == libavb and libavb_atx ==
obj-$(CONFIG_LIBAVB) += \
avb_sysdeps.o \
firmware_sdk/pkg/avb/libavb/avb_chain_partition_descriptor.o \
firmware_sdk/pkg/avb/libavb/avb_cmdline.o \
firmware_sdk/pkg/avb/libavb/avb_crc32.o \
firmware_sdk/pkg/avb/libavb/avb_crypto.o \
firmware_sdk/pkg/avb/libavb/avb_descriptor.o \
firmware_sdk/pkg/avb/libavb/avb_footer.o \
firmware_sdk/pkg/avb/libavb/avb_hash_descriptor.o \
firmware_sdk/pkg/avb/libavb/avb_hashtree_descriptor.o \
firmware_sdk/pkg/avb/libavb/avb_kernel_cmdline_descriptor.o \
firmware_sdk/pkg/avb/libavb/avb_property_descriptor.o \
firmware_sdk/pkg/avb/libavb/avb_rsa.o \
firmware_sdk/pkg/avb/libavb/avb_sha512.o \
firmware_sdk/pkg/avb/libavb/avb_slot_verify.o \
firmware_sdk/pkg/avb/libavb/avb_util.o \
firmware_sdk/pkg/avb/libavb/avb_vbmeta_image.o \
firmware_sdk/pkg/avb/libavb/avb_version.o \
firmware_sdk/pkg/avb/libavb_atx/avb_atx_validate.o
ifndef CONFIG_LIBAVB_PREFER_HOST_SHA256
obj-$(CONFIG_LIBAVB) += pkg/avb/libavb/avb_sha256.o
endif
# 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 \
-ffunction-sections \
-DAVB_ENABLE_DEBUG \
-DAVB_COMPILATION
# Custom additions for Newman compilation.
# Use C99 for new syntax (e.g. declaring vars in for-loop) + GNU variant for
# non-standard extensions like asm().
ccflags-$(CONFIG_LIBAVB) += \
-std=gnu99
# == libzbi ==
obj-y += \
firmware_sdk/pkg/zbi/zbi.o
ccflags-y += -Ilib/fuchsia/firmware_sdk/pkg/zbi/include