rockchip: board: print DTB hash result

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Icc622b51b415f8aeaf1333dba1491426b906e806
This commit is contained in:
Joseph Chen 2019-12-03 13:08:25 +08:00
parent b554a8f003
commit 8226ac627b
1 changed files with 4 additions and 2 deletions

View File

@ -900,8 +900,6 @@ static int fdt_check_hash(void *fdt_addr, struct resource_file *file)
if (!file->hash_size)
return 0;
printf("Crypto: enable\n");
if (file->hash_size == 20)
crypto_csum(CRYPTO_SHA1, fdt_addr, file->f_size, hash);
else if (file->hash_size == 32)
@ -912,6 +910,8 @@ static int fdt_check_hash(void *fdt_addr, struct resource_file *file)
if (memcmp(hash, file->hash, file->hash_size))
return -EBADF;
printf("HASH: OK(c)\n");
return 0;
}
@ -933,6 +933,8 @@ static int fdt_check_hash(void *fdt_addr, struct resource_file *file)
if (memcmp(hash, file->hash, file->hash_size))
return -EBADF;
printf("HASH: OK(s)\n");
return 0;
}
#endif