summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig1
-rw-r--r--lib/fwu_updates/fwu.c4
-rw-r--r--lib/fwu_updates/fwu_mtd.c6
-rw-r--r--lib/image-sparse.c3
4 files changed, 9 insertions, 5 deletions
diff --git a/lib/Kconfig b/lib/Kconfig
index c8b3ec1ec9c..3926652db63 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -508,6 +508,7 @@ config SHA256
config SHA512
bool "Enable SHA512 support"
+ default y if TI_SECURE_DEVICE && FIT_SIGNATURE
help
This option enables support of hashing using SHA512 algorithm.
The hash is calculated in software.
diff --git a/lib/fwu_updates/fwu.c b/lib/fwu_updates/fwu.c
index cd5c3b64773..4d0c8b84b9d 100644
--- a/lib/fwu_updates/fwu.c
+++ b/lib/fwu_updates/fwu.c
@@ -95,6 +95,8 @@ static int fwu_trial_count_update(void)
log_err("Unable to revert active_index\n");
ret = 1;
} else {
+ log_info("Trial State count: attempt %d out of %d\n",
+ trial_state_ctr, CONFIG_FWU_TRIAL_STATE_CNT);
ret = trial_counter_update(&trial_state_ctr);
if (ret)
log_err("Unable to increment TrialStateCtr variable\n");
@@ -666,8 +668,6 @@ static int fwu_boottime_checks(void *ctx, struct event *event)
ret = fwu_set_active_index(boot_idx);
if (!ret)
boottime_check = 1;
-
- return 0;
}
if (efi_init_obj_list() != EFI_SUCCESS)
diff --git a/lib/fwu_updates/fwu_mtd.c b/lib/fwu_updates/fwu_mtd.c
index b73111ae24d..69cd3d7001f 100644
--- a/lib/fwu_updates/fwu_mtd.c
+++ b/lib/fwu_updates/fwu_mtd.c
@@ -175,8 +175,10 @@ int fwu_gen_alt_info_from_mtd(char *buf, size_t len, struct mtd_info *mtd)
l = strlen(buf);
/* Replace the last ';' with '&' if there is another image. */
- if (i != CONFIG_FWU_NUM_IMAGES_PER_BANK - 1 && l)
- buf[l - 1] = '&';
+ if (i != CONFIG_FWU_NUM_IMAGES_PER_BANK - 1 && l) {
+ buf[l] = '&';
+ buf++;
+ }
len -= l;
buf += l;
}
diff --git a/lib/image-sparse.c b/lib/image-sparse.c
index 5ec0f94ab3e..8f8a67e1580 100644
--- a/lib/image-sparse.c
+++ b/lib/image-sparse.c
@@ -55,7 +55,8 @@ static lbaint_t write_sparse_chunk_raw(struct sparse_storage *info,
void *data,
char *response)
{
- lbaint_t n = blkcnt, write_blks, blks = 0, aligned_buf_blks = 100;
+ lbaint_t n = blkcnt, write_blks, blks = 0;
+ lbaint_t aligned_buf_blks = FASTBOOT_MAX_BLK_WRITE;
uint32_t *aligned_buf = NULL;
if (CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) {