diff --git a/cmd/amlogic/cmd_avb.c b/cmd/amlogic/cmd_avb.c index 948f7ed..df1b861 100644 --- a/cmd/amlogic/cmd_avb.c +++ b/cmd/amlogic/cmd_avb.c
@@ -381,13 +381,10 @@ printf("ab_suffix is %s\n", ab_suffix); AvbSlotVerifyFlags flags = AVB_SLOT_VERIFY_FLAGS_NONE; - char *upgradestep = NULL; avb_init(); - upgradestep = env_get("upgrade_step"); - - if (is_device_unlocked() || !strcmp(upgradestep, "3")) + if (is_device_unlocked()) flags |= AVB_SLOT_VERIFY_FLAGS_ALLOW_VERIFICATION_ERROR; if (!strcmp(ab_suffix, "")) { @@ -412,9 +409,6 @@ flags, AVB_HASHTREE_ERROR_MODE_RESTART_AND_INVALIDATE, out_data); - if (!strcmp(upgradestep, "3")) - result = AVB_SLOT_VERIFY_RESULT_OK; - return result; }
diff --git a/cmd/amlogic/cmd_bcb.c b/cmd/amlogic/cmd_bcb.c index 7315dda..bbe12bf 100644 --- a/cmd/amlogic/cmd_bcb.c +++ b/cmd/amlogic/cmd_bcb.c
@@ -44,21 +44,6 @@ char reserved[192]; }; - -static int clear_misc_partition(char *clearbuf, int size) -{ - char *partition = "misc"; - - memset(clearbuf, 0, size); - if (store_write((const char *)partition, - 0, size, (unsigned char *)clearbuf) < 0) { - printf("failed to clear %s.\n", partition); - return -1; - } - - return 0; -} - static int do_RunBcbCommand( cmd_tbl_t * cmdtp, int flag, @@ -174,25 +159,6 @@ return 0; } - if (!memcmp(command_mark, command, strlen(command_mark))) { - printf("%s\n", recovery); - if (run_command((char *)recovery, 0) < 0) { - printf("run_command for cmd:%s failed.\n", recovery); - goto ERR; - } - printf("run command successful.\n"); - - if (clear_misc_partition(clearbuf, sizeof(clearbuf)) < 0) { - printf("clear misc partition failed.\n"); - goto ERR; - } else { - printf("clear misc partition successful.\n"); - } - } else { - printf("command mark(%s) not match %s,don't execute.\n", - command_mark, command); - } - return 0; ERR:
diff --git a/cmd/bootm.c b/cmd/bootm.c index e58a595..e712302 100644 --- a/cmd/bootm.c +++ b/cmd/bootm.c
@@ -416,7 +416,7 @@ case IMAGE_FORMAT_FIT: puts(" FIT image found\n"); - if (!fit_check_format(hdr)) { + if (fit_check_format(hdr, IMAGE_SIZE_INVAL)) { puts("Bad FIT image format!\n"); return 1; } @@ -489,7 +489,7 @@ #endif #if defined(CONFIG_FIT) case IMAGE_FORMAT_FIT: - if (!fit_check_format(hdr)) + if (fit_check_format(hdr, IMAGE_SIZE_INVAL)) goto next_sector; printf("FIT Image at %08lX:\n", (ulong)hdr); @@ -569,7 +569,7 @@ return ret; } - if (!fit_check_format(imgdata)) { + if (fit_check_format(imgdata, IMAGE_SIZE_INVAL)) { free(imgdata); return 0; }
diff --git a/cmd/disk.c b/cmd/disk.c index dcc36a6..294fc11 100644 --- a/cmd/disk.c +++ b/cmd/disk.c
@@ -110,7 +110,7 @@ /* This cannot be done earlier, * we need complete FIT image in RAM first */ if (genimg_get_format((void *) addr) == IMAGE_FORMAT_FIT) { - if (!fit_check_format(fit_hdr)) { + if (fit_check_format(fit_hdr, IMAGE_SIZE_INVAL)) { bootstage_error(BOOTSTAGE_ID_IDE_FIT_READ); puts("** Bad FIT image format\n"); return 1;
diff --git a/cmd/fpga.c b/cmd/fpga.c index 88a8e3f..9093026 100644 --- a/cmd/fpga.c +++ b/cmd/fpga.c
@@ -325,7 +325,7 @@ return CMD_RET_FAILURE; } - if (!fit_check_format(fit_hdr)) { + if (fit_check_format(fit_hdr, IMAGE_SIZE_INVAL)) { puts("Bad FIT image format\n"); return CMD_RET_FAILURE; }
diff --git a/cmd/nand.c b/cmd/nand.c index 22a534d..069da99 100644 --- a/cmd/nand.c +++ b/cmd/nand.c
@@ -928,7 +928,7 @@ #if defined(CONFIG_FIT) /* This cannot be done earlier, we need complete FIT image in RAM first */ if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) { - if (!fit_check_format (fit_hdr)) { + if (fit_check_format(fit_hdr, IMAGE_SIZE_INVAL)) { bootstage_error(BOOTSTAGE_ID_NAND_FIT_READ); puts ("** Bad FIT image format\n"); return 1;
diff --git a/cmd/source.c b/cmd/source.c index 6d98a1c..897b970 100644 --- a/cmd/source.c +++ b/cmd/source.c
@@ -106,7 +106,7 @@ #if defined(CONFIG_FIT) case IMAGE_FORMAT_FIT: fit_hdr = buf; - if (!fit_check_format (fit_hdr)) { + if (fit_check_format(fit_hdr, IMAGE_SIZE_INVAL)) { puts ("Bad FIT image format\n"); return 1; }
diff --git a/cmd/ximg.c b/cmd/ximg.c index 6880c74..4fd1b26 100644 --- a/cmd/ximg.c +++ b/cmd/ximg.c
@@ -131,7 +131,7 @@ "at %08lx ...\n", uname, addr); fit_hdr = (const void *)addr; - if (!fit_check_format(fit_hdr)) { + if (fit_check_format(fit_hdr, IMAGE_SIZE_INVAL)) { puts("Bad FIT image format\n"); return 1; }