diff options
author | Haoran.Wang <elven.wang@nxp.com> | 2018-09-13 12:41:36 +0800 |
---|---|---|
committer | Haoran.Wang <elven.wang@nxp.com> | 2018-09-13 14:51:00 +0800 |
commit | cf2a6c19c8fe7db54f49712b52175aca160c404f (patch) | |
tree | efc3e432eb2a6380a85c79cecdc8c24806659a9e /lib | |
parent | 0c6af83fedc7db4e7084c2ff0cddfba8090a6356 (diff) |
MA-12699 Refine libavb for security features
Assign security features to specific config.
Now, use AVB_RPMB to enable RPMB stored rollback
index.
After this refine,
for imx6/7/8 Android release, use no AVB_RPMB,
for imx6/7 AndroidThings, use AVB_RPMB.
This patch also fix below build error for imx6/7:
vendor/nxp-opensource/uboot-imx/lib/avb/fsl/fsl_avbkey.c:711:2: error:
implicit declaration of function 'fsl_fuse_read'
[-Werror=implicit-function-declaration]
if (fsl_fuse_read((uint32_t *)blob, RPMBKEY_FUSE_LENW,
RPMBKEY_FUSE_OFFSET)){
Change-Id: I734479f0627901f372f4b211b2e710bd103eb244
Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/avb/fsl/fsl_avbkey.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/avb/fsl/fsl_avbkey.c b/lib/avb/fsl/fsl_avbkey.c index 7c9d38932f..71a012906b 100644 --- a/lib/avb/fsl/fsl_avbkey.c +++ b/lib/avb/fsl/fsl_avbkey.c @@ -307,7 +307,7 @@ AvbIOResult fsl_read_permanent_attributes_hash( #endif /* CONFIG_AVB_ATX */ #endif /* CONFIG_SPL_BUILD */ -#ifndef CONFIG_FSL_CAAM_KB +#ifndef AVB_RPMB /* ARM64 won't avbkey and rollback index in this stage directly. */ int avbkey_init(uint8_t *plainkey, uint32_t keylen) { return 0; @@ -342,7 +342,7 @@ AvbIOResult fsl_read_rollback_index_rpmb(AvbOps* ops, size_t rollback_index_slot *out_rollback_index = 0; return AVB_IO_RESULT_OK; } -#else /* CONFIG_FSL_CAAM_KB */ +#else /* AVB_RPMB */ static int mmc_dev_no = -1; struct mmc *get_mmc(void) { @@ -356,7 +356,6 @@ struct mmc *get_mmc(void) { return mmc; } -#ifdef AVB_RPMB int rpmb_read(struct mmc *mmc, uint8_t *buffer, size_t num_bytes, int64_t offset); int rpmb_write(struct mmc *mmc, uint8_t *buffer, size_t num_bytes, int64_t offset); @@ -658,7 +657,6 @@ int init_avbkey(void) { fill_secure_keyslot_package(&kp); return RESULT_OK; } -#endif /* AVB_RPMB */ int rpmb_read(struct mmc *mmc, uint8_t *buffer, size_t num_bytes, int64_t offset) { @@ -1316,7 +1314,8 @@ fail: #endif /* CONFIG_IMX_TRUSTY_OS */ } #endif /* CONFIG_SPL_BUILD */ -#endif /* CONFIG_FSL_CAAM_KB */ +#endif /* AVB_RPMB */ + #if defined(AVB_RPMB) && defined(CONFIG_AVB_ATX) && !defined(CONFIG_SPL_BUILD) /* Provides the key version of a key used during verification. This may be |