[PATCH 11/12] imx-usb-loader: verify correct image length

Sascha Hauer s.hauer at pengutronix.de
Thu Jul 14 00:27:21 PDT 2022


When verifying the uploaded file we may only check the already uploaded
part of the image, not the whole image.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 scripts/imx/imx-usb-loader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c
index 44ad7e3f0f..f3dcc61b9e 100644
--- a/scripts/imx/imx-usb-loader.c
+++ b/scripts/imx/imx-usb-loader.c
@@ -1409,7 +1409,7 @@ static int do_irom_download(struct usb_work *curr, int verify)
 	if (verify) {
 		printf("verifying file...\n");
 
-		ret = verify_memory(image, fsize, header_addr);
+		ret = verify_memory(image, firststage_len, header_addr);
 		if (ret < 0) {
 			printf("verifying failed\n");
 			goto cleanup;
-- 
2.30.2




More information about the barebox mailing list