summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJi Luo <ji.luo@nxp.com>2020-06-18 10:52:37 +0800
committerJi Luo <ji.luo@nxp.com>2020-06-18 15:25:35 +0800
commit85e0d429d19b8f9a62369a5f20e088644c488b1e (patch)
treee285cc481b57011ee435dce105c65a5ab45baac0 /lib
parent4030462cb99e1dc67f7ee28f391ddd5c21938878 (diff)
MA-17390 Clean build warnings for android
This commit eliminate the annoying build warning logs. Test: builds with buildman. Signed-off-by: Ji Luo <ji.luo@nxp.com> Change-Id: Ia335dafe3f4c0eab08e011215b9de5d2974b8d0c
Diffstat (limited to 'lib')
-rw-r--r--lib/avb/Makefile1
-rw-r--r--lib/avb/fsl/fsl_avb_ab_flow.c1
-rw-r--r--lib/avb/fsl/fsl_avbkey.c4
-rw-r--r--lib/libavb/avb_slot_verify.c6
-rw-r--r--lib/trusty/ql-tipc/hwcrypto.c2
-rw-r--r--lib/trusty/ql-tipc/libtipc.c1
6 files changed, 12 insertions, 3 deletions
diff --git a/lib/avb/Makefile b/lib/avb/Makefile
index 21af6a2029..0c5e2cf011 100644
--- a/lib/avb/Makefile
+++ b/lib/avb/Makefile
@@ -8,6 +8,7 @@ subdir-ccflags-y += -I./lib \
-Wno-type-limits \
-Wno-psabi \
-Wno-unused-parameter \
+ -Wno-sign-compare \
-ffunction-sections \
-std=gnu99
diff --git a/lib/avb/fsl/fsl_avb_ab_flow.c b/lib/avb/fsl/fsl_avb_ab_flow.c
index e56d350a0b..66b7b7c7fd 100644
--- a/lib/avb/fsl/fsl_avb_ab_flow.c
+++ b/lib/avb/fsl/fsl_avb_ab_flow.c
@@ -11,6 +11,7 @@
#include "utils.h"
#include "fsl_caam.h"
#include "fsl_avbkey.h"
+#include "hang.h"
#if defined(CONFIG_DUAL_BOOTLOADER) || !defined(CONFIG_SPL_BUILD)
static const char* slot_suffixes[2] = {"_a", "_b"};
diff --git a/lib/avb/fsl/fsl_avbkey.c b/lib/avb/fsl/fsl_avbkey.c
index 2ba373e26c..4c0dd94736 100644
--- a/lib/avb/fsl/fsl_avbkey.c
+++ b/lib/avb/fsl/fsl_avbkey.c
@@ -13,6 +13,8 @@
#include <mmc.h>
#include <hash.h>
#include <mapmem.h>
+#include <hang.h>
+#include <cpu_func.h>
#include <fsl_avb.h>
#include "trusty/avb.h"
@@ -791,7 +793,9 @@ int check_rpmb_blob(struct mmc *mmc)
int ret = 0;
char original_part;
struct keyslot_package kp;
+#if CONFIG_IS_ENABLED(BLK)
struct blk_desc *dev_desc = NULL;
+#endif
read_keyslot_package(&kp);
if (strcmp(kp.magic, KEYPACK_MAGIC)) {
diff --git a/lib/libavb/avb_slot_verify.c b/lib/libavb/avb_slot_verify.c
index 900b2ebf53..49d9feb517 100644
--- a/lib/libavb/avb_slot_verify.c
+++ b/lib/libavb/avb_slot_verify.c
@@ -294,7 +294,7 @@ static AvbSlotVerifyResult load_and_verify_hash_partition(
bool image_preloaded = false;
uint8_t* digest;
size_t digest_len;
- const char* found;
+ const char* found = NULL;
uint64_t image_size;
size_t expected_digest_len = 0;
uint8_t expected_digest_buf[AVB_SHA512_DIGEST_SIZE];
@@ -394,7 +394,9 @@ static AvbSlotVerifyResult load_and_verify_hash_partition(
// Although only one of the type might be used, we have to defined the
// structure here so that they would live outside the 'if/else' scope to be
// used later.
+#if !defined(CONFIG_IMX_TRUSTY_OS) || defined(CONFIG_AVB_ATX) || defined(CONFIG_XEN)
AvbSHA256Ctx sha256_ctx;
+#endif
AvbSHA512Ctx sha512_ctx;
size_t image_size_to_hash = hash_desc.image_size;
// If we allow verification error and the whole partition is smaller than
@@ -411,8 +413,6 @@ static AvbSlotVerifyResult load_and_verify_hash_partition(
ret = AVB_SLOT_VERIFY_RESULT_ERROR_OOM;
goto out;
}
- uint32_t round_buf_size = ROUND(hash_desc.salt_len + image_size_to_hash,
- ARCH_DMA_MINALIGN);
hash_buf = (void *)CONFIG_FASTBOOT_BUF_ADDR;
avb_memcpy(hash_buf, desc_salt, hash_desc.salt_len);
diff --git a/lib/trusty/ql-tipc/hwcrypto.c b/lib/trusty/ql-tipc/hwcrypto.c
index 051a505aa9..f638cf4368 100644
--- a/lib/trusty/ql-tipc/hwcrypto.c
+++ b/lib/trusty/ql-tipc/hwcrypto.c
@@ -28,6 +28,8 @@
#include <trusty/trusty_ipc.h>
#include <trusty/util.h>
#include "common.h"
+#include <cpu_func.h>
+#include <hang.h>
#define LOCAL_LOG 0
#define CAAM_KB_HEADER_LEN 48
diff --git a/lib/trusty/ql-tipc/libtipc.c b/lib/trusty/ql-tipc/libtipc.c
index 30d4bbf854..db001a8d31 100644
--- a/lib/trusty/ql-tipc/libtipc.c
+++ b/lib/trusty/ql-tipc/libtipc.c
@@ -31,6 +31,7 @@
#include <trusty/trusty_dev.h>
#include <trusty/trusty_ipc.h>
#include <trusty/util.h>
+#include <hang.h>
#define LOCAL_LOG 0