commit | 6fe8fa1f7cb309fd1abd65c48a368958cfde5485 | [log] [tgz] |
---|---|---|
author | Marti Bolivar <marti.bolivar@linaro.org> | Wed May 03 18:01:34 2017 -0400 |
committer | Marti Bolivar <marti.bolivar@linaro.org> | Tue May 09 13:16:25 2017 -0400 |
tree | 4c1ae5f74a3b544aee93f7a263a63e1feb2626bc | |
parent | fa264cbeb7266af2d5c9ea60456ff94b2e0a2087 [diff] |
bootutil: use flash_area_get_sectors() The flash map API has added a new routine, flash_area_get_sectors(). Use that instead of flash_area_to_sectors(), which is now deprecated. This exposed a bug in boot_swap_sectors() (a large sz would still lead to copying past the end of the area, including the trailer); fix it. This also exposed a bug in split_go(). Calling boot_read_sectors() there makes a potentially invalid assumption, namely: (loader_slot == FLASH_AREA_IMAGE_0 && split_slot == FLASH_AREA_IMAGE_1) We make this slightly better by making sure that loader_slot and split_slot in split_go() get placed into boot_data at indices mynewt-core currently sets LOADER_SLOT and SPLIT_SLOT to, but a real fix is left to future work. This patch also frees up about 650B of RAM, since struct flash_sector is smaller than struct flash_area. Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
MCUBoot is a secure bootloader for 32-bit MCUs. The goal of MCUBoot is to define a common infrastructure for the bootloader, system flash layout on microcontroller systems, and to provide a secure bootloader that enables easy software upgrade.
MCUboot is operating system and hardware independent, and relies on hardware porting layers from the operating system it works with. Currently mcuboot works with both the Apache Mynewt, and Zephyr operating systems, but more ports are planned in the future.
The MCUBoot project was originally taken from the Apache Mynewt operating system, which had secure boot and software upgrade functionality instrinsic to it. Currently development is heads down on a first release of MCUboot that works across both the Zephyr operating system and Apache Mynewt operating system.
For more information on what's being planned, and worked on, please visit:
https://runtimeco.atlassian.net/projects/MCUB/summary
Information and documentation on the bootloader is stored within the source, and on confluence:
https://runtimeco.atlassian.net/wiki/discover/all-updates
For more information in the source, here are some pointers:
Developers welcome! To join in the discussion, please join the developer mailing list:
http://lists.runtime.co/mailman/listinfo/dev-mcuboot_lists.runtime.co