You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/10/11 18:18:28 UTC
incubator-mynewt-core git commit: bootutil - Another
slot-idx/flash-area-id mismatch
Repository: incubator-mynewt-core
Updated Branches:
refs/heads/develop 944243141 -> 5ee5f8362
bootutil - Another slot-idx/flash-area-id mismatch
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/5ee5f836
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/5ee5f836
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/5ee5f836
Branch: refs/heads/develop
Commit: 5ee5f8362050f66b4795bb9534ef3d6c2aa0c995
Parents: 9442431
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Oct 11 11:17:49 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Oct 11 11:17:49 2016 -0700
----------------------------------------------------------------------
boot/bootutil/src/loader.c | 2 +-
boot/bootutil/test/src/boot_test.c | 21 +++++++++++----------
2 files changed, 12 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5ee5f836/boot/bootutil/src/loader.c
----------------------------------------------------------------------
diff --git a/boot/bootutil/src/loader.c b/boot/bootutil/src/loader.c
index b3bfde8..54a1e0c 100644
--- a/boot/bootutil/src/loader.c
+++ b/boot/bootutil/src/loader.c
@@ -299,7 +299,7 @@ boot_select_image_slot(void)
* Copied the image successfully, but image was not confirmed as good.
* We need to go back to another image.
*/
- boot_vect_write_test(FLASH_AREA_IMAGE_1);
+ boot_vect_write_test(1);
}
for (i = 1; i < BOOT_NUM_SLOTS; i++) {
b = &boot_img[i];
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5ee5f836/boot/bootutil/test/src/boot_test.c
----------------------------------------------------------------------
diff --git a/boot/bootutil/test/src/boot_test.c b/boot/bootutil/test/src/boot_test.c
index a04635b..82ea15f 100644
--- a/boot/bootutil/test/src/boot_test.c
+++ b/boot/bootutil/test/src/boot_test.c
@@ -24,6 +24,7 @@
#include <string.h>
#include <inttypes.h>
#include "syscfg/syscfg.h"
+#include "sysflash/sysflash.h"
#include "testutil/testutil.h"
#include "hal/hal_flash.h"
#include "flash_map/flash_map.h"
@@ -439,7 +440,7 @@ TEST_CASE(boot_test_nv_ns_01)
boot_test_util_write_image(&hdr, 1);
boot_test_util_write_hash(&hdr, 1);
- boot_vect_write_test(FLASH_AREA_IMAGE_1);
+ boot_vect_write_test(1);
rc = boot_go(&req, &rsp);
TEST_ASSERT(rc == 0);
@@ -563,7 +564,7 @@ TEST_CASE(boot_test_vm_ns_01)
boot_test_util_write_image(&hdr, 1);
boot_test_util_write_hash(&hdr, 1);
- rc = boot_vect_write_test(FLASH_AREA_IMAGE_1);
+ rc = boot_vect_write_test(1);
TEST_ASSERT(rc == 0);
rc = boot_go(&req, &rsp);
@@ -662,7 +663,7 @@ TEST_CASE(boot_test_vm_ns_11_b)
boot_test_util_write_image(&hdr1, 1);
boot_test_util_write_hash(&hdr1, 1);
- rc = boot_vect_write_test(FLASH_AREA_IMAGE_1);
+ rc = boot_vect_write_test(1);
TEST_ASSERT(rc == 0);
rc = boot_go(&req, &rsp);
@@ -713,7 +714,7 @@ TEST_CASE(boot_test_vm_ns_11_2areas)
boot_test_util_write_image(&hdr1, 1);
boot_test_util_write_hash(&hdr1, 1);
- rc = boot_vect_write_test(FLASH_AREA_IMAGE_1);
+ rc = boot_vect_write_test(1);
TEST_ASSERT(rc == 0);
rc = boot_go(&req, &rsp);
@@ -813,7 +814,7 @@ TEST_CASE(boot_test_nv_bs_11)
boot_test_util_write_hash(&hdr0, 0);
boot_test_util_write_image(&hdr1, 1);
boot_test_util_write_hash(&hdr1, 1);
- rc = boot_vect_write_test(FLASH_AREA_IMAGE_1);
+ rc = boot_vect_write_test(1);
boot_test_util_copy_area(5,
BOOT_TEST_AREA_IDX_SCRATCH);
@@ -873,7 +874,7 @@ TEST_CASE(boot_test_nv_bs_11_2areas)
boot_test_util_write_hash(&hdr0, 0);
boot_test_util_write_image(&hdr1, 1);
boot_test_util_write_hash(&hdr1, 1);
- rc = boot_vect_write_test(FLASH_AREA_IMAGE_1);
+ rc = boot_vect_write_test(1);
boot_test_util_swap_areas(2, 5);
@@ -946,7 +947,7 @@ TEST_CASE(boot_test_vb_ns_11)
rc = flash_area_write(fap, fap->fa_size - sizeof(bit), &bit, sizeof(bit));
TEST_ASSERT(rc == 0);
- rc = boot_vect_write_test(FLASH_AREA_IMAGE_1);
+ rc = boot_vect_write_test(1);
TEST_ASSERT(rc == 0);
/* First boot should use the test image. */
@@ -1010,7 +1011,7 @@ TEST_CASE(boot_test_no_hash)
boot_test_util_write_hash(&hdr0, 0);
boot_test_util_write_image(&hdr1, 1);
- rc = boot_vect_write_test(FLASH_AREA_IMAGE_1);
+ rc = boot_vect_write_test(1);
TEST_ASSERT(rc == 0);
rc = boot_go(&req, &rsp);
@@ -1058,7 +1059,7 @@ TEST_CASE(boot_test_no_flag_has_hash)
boot_test_util_write_image(&hdr1, 1);
boot_test_util_write_hash(&hdr1, 1);
- rc = boot_vect_write_test(FLASH_AREA_IMAGE_1);
+ rc = boot_vect_write_test(1);
TEST_ASSERT(rc == 0);
rc = boot_go(&req, &rsp);
@@ -1113,7 +1114,7 @@ TEST_CASE(boot_test_invalid_hash)
&tlv, sizeof(tlv));
TEST_ASSERT(rc == 0);
- rc = boot_vect_write_test(FLASH_AREA_IMAGE_1);
+ rc = boot_vect_write_test(1);
TEST_ASSERT(rc == 0);
rc = boot_go(&req, &rsp);