From b3aec72f3536e6792ff639170bfa6d89d70ac177 Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Sun, 20 Aug 2017 13:21:46 +0200 Subject: [PATCH] Support also version v2 of TP-Link header This closes #167 --- u-boot/common/cmd_bootm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/u-boot/common/cmd_bootm.c b/u-boot/common/cmd_bootm.c index c848308..3c70b9d 100644 --- a/u-boot/common/cmd_bootm.c +++ b/u-boot/common/cmd_bootm.c @@ -418,6 +418,7 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) switch (ntohl(data)) { case TPL_IH_VERSION_V1: + case TPL_IH_VERSION_V2: tpl_type = 1; tpl_hdr = (tplink_image_header_t *)addr; @@ -430,7 +431,6 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) print_uboot_ih((image_header_t *)addr); memmove(&header, (char *)addr, sizeof(image_header_t)); break; - case TPL_IH_VERSION_V2: case TPL_IH_VERSION_V3: default: printf_err("unsupported image header\n"); @@ -591,6 +591,7 @@ int do_iminfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) switch (ntohl(data)) { case TPL_IH_VERSION_V1: + case TPL_IH_VERSION_V2: tpl_type = 1; tpl_hdr = (tplink_image_header_t *)addr; @@ -600,7 +601,6 @@ int do_iminfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) print_uboot_ih((image_header_t *)addr); memmove(&header, (char *)addr, sizeof(image_header_t)); break; - case TPL_IH_VERSION_V2: case TPL_IH_VERSION_V3: default: printf_err("unsupported image header\n"); -- 2.25.1