split - Don't read sector boundary info. The boot loader needs to read sector information so that it knows how to swap images in flash. The split startup sequence doesn't perform any image swap, so it doesn't need the sector information.
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/e136d089 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/e136d089 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/e136d089 Branch: refs/heads/develop Commit: e136d08966fcf74c7f8ee6d22e34358ef975b9b8 Parents: 8be888a Author: Christopher Collins <[email protected]> Authored: Mon Feb 6 14:44:08 2017 -0800 Committer: Christopher Collins <[email protected]> Committed: Mon Feb 6 14:44:08 2017 -0800 ---------------------------------------------------------------------- boot/bootutil/src/loader.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/e136d089/boot/bootutil/src/loader.c ---------------------------------------------------------------------- diff --git a/boot/bootutil/src/loader.c b/boot/bootutil/src/loader.c index e4c278c..1d9f71b 100644 --- a/boot/bootutil/src/loader.c +++ b/boot/bootutil/src/loader.c @@ -1088,13 +1088,6 @@ split_go(int loader_slot, int split_slot, void **entry) app_fap = NULL; loader_fap = NULL; - /* Determine the sector layout of the image slots and scratch area. */ - rc = boot_read_sectors(); - if (rc != 0) { - rc = SPLIT_GO_ERR; - goto done; - } - rc = boot_read_image_headers(); if (rc != 0) { goto done; @@ -1127,8 +1120,7 @@ split_go(int loader_slot, int split_slot, void **entry) goto done; } - entry_val = boot_data.slots[split_slot].area.fa_off + - boot_data.slots[split_slot].hdr.ih_hdr_size; + entry_val = app_fap->fa_off + boot_data.imgs[split_slot].hdr.ih_hdr_size; *entry = (void *) entry_val; rc = SPLIT_GO_OK;
