From 63a2bdbda95f8c62d6fc93c863a15fc9279daae2 Mon Sep 17 00:00:00 2001 From: Alvaro Prieto Date: Thu, 4 Jul 2019 12:18:49 -0700 Subject: [PATCH] Fix bug that prevents split images from working. There is a bug in split_go that never opens the loader image flash area, but opens the app/split image flash arta twice. This prevents split_image_check from passing and the app from ever loading. Signed-off-by: Alvaro Prieto --- boot/bootutil/src/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/bootutil/src/loader.c b/boot/bootutil/src/loader.c index d3aa891b..d7484398 100644 --- a/boot/bootutil/src/loader.c +++ b/boot/bootutil/src/loader.c @@ -1849,7 +1849,7 @@ split_go(int loader_slot, int split_slot, void **entry) loader_flash_id = flash_area_id_from_image_slot(loader_slot); rc = flash_area_open(loader_flash_id, - &BOOT_IMG_AREA(&boot_data, split_slot)); + &BOOT_IMG_AREA(&boot_data, loader_slot)); assert(rc == 0); split_flash_id = flash_area_id_from_image_slot(split_slot); rc = flash_area_open(split_flash_id,