Commit e93d389b authored by Luo Ji's avatar Luo Ji

MA-12124 [Android] Fix build warnings for u-boot

Fix build warnings in u-boot.

Change-Id: I1944657d2d89a03c0d2303a22a09538dfaa5fd2c
Signed-off-by: default avatarLuo Ji <ji.luo@nxp.com>
parent 8f049e69
......@@ -149,7 +149,6 @@ int power_init_board(void)
{
struct pmic *p;
int ret;
unsigned int reg;
ret = power_bd71837_init(I2C_PMIC);
if (ret)
......
......@@ -737,6 +737,7 @@ static int initr_check_fastboot(void)
#endif
#ifdef AVB_RPMB
int init_avbkey(void);
static int initr_avbkey(void)
{
return init_avbkey();
......@@ -744,6 +745,7 @@ static int initr_avbkey(void)
#endif
#ifdef CONFIG_IMX_TRUSTY_OS
void tee_setup(void);
static int initr_tee_setup(void)
{
tee_setup();
......
......@@ -1922,9 +1922,6 @@ int do_boota(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) {
bool is_recovery_mode = false;
char *slot = NULL;
#if defined (CONFIG_ARCH_IMX8) || defined (CONFIG_ARCH_IMX8M)
size_t lz4_len = DST_DECOMPRESS_LEN;
#endif
AvbABFlowResult avb_result;
AvbSlotVerifyData *avb_out_data;
AvbPartitionData *avb_loadpart;
......@@ -2017,6 +2014,7 @@ int do_boota(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) {
(void *)((ulong)hdr + hdr->page_size), hdr->kernel_size);
} else {
#ifdef CONFIG_LZ4
size_t lz4_len = DST_DECOMPRESS_LEN;
if (ulz4fn((void *)((ulong)hdr + hdr->page_size),
hdr->kernel_size, (void *)(ulong)hdr->kernel_addr, &lz4_len) != 0) {
printf("Decompress kernel fail!\n");
......@@ -2094,7 +2092,7 @@ int do_boota(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) {
fdt_size = be32_to_cpu(dt_entry.dt_size);
if (fsl_avb_ops.read_from_partition(&fsl_avb_ops, oemimage,
be32_to_cpu(dt_entry.dt_offset), fdt_size,
(void *)hdr->second_addr, &num_read) !=
(void *)(ulong)hdr->second_addr, &num_read) !=
AVB_IO_RESULT_OK && num_read != fdt_size) {
printf("boota: read fdt error\n");
}
......
......@@ -121,24 +121,25 @@ bool valid_tos() {
/*
* This will return FASTBOOT_LOCK, FASTBOOT_UNLOCK or FASTBOOT_ERROR
*/
#ifndef CONFIG_IMX_TRUSTY_OS
static FbLockState decrypt_lock_store(unsigned char* bdata) {
if (!strncmp(bdata, "locked", strlen("locked")))
if (!strncmp((const char *)bdata, "locked", strlen("locked")))
return FASTBOOT_LOCK;
else if (!strncmp(bdata, "unlocked", strlen("unlocked")))
else if (!strncmp((const char *)bdata, "unlocked", strlen("unlocked")))
return FASTBOOT_UNLOCK;
else
return FASTBOOT_LOCK_ERROR;
}
static inline int encrypt_lock_store(FbLockState lock, unsigned char* bdata) {
if (FASTBOOT_LOCK == lock)
strncpy(bdata, "locked", strlen("locked"));
strncpy((char *)bdata, "locked", strlen("locked"));
else if (FASTBOOT_UNLOCK == lock)
strncpy(bdata, "unlocked", strlen("unlocked"));
strncpy((char *)bdata, "unlocked", strlen("unlocked"));
else
return -1;
return 0;
}
#endif
#else
static int sha1sum(unsigned char* data, int len, unsigned char* output) {
......
......@@ -37,6 +37,7 @@ static struct trusty_ipc_dev *_ipc_dev;
static struct trusty_dev _tdev; /* There should only be one trusty device */
static void *rpmb_ctx;
void rpmb_storage_put_ctx(void *dev);
void trusty_ipc_shutdown(void)
{
(void)rpmb_storage_proxy_shutdown(_ipc_dev);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment