adafruit / Adafruit_Mynewt

Apache Mynewt documentation and test project for the nRF5x family of BLE SoCs
MIT License
8 stars 3 forks source link

Update bootloader for mcuboot compat #34

Open microbuilder opened 7 years ago

microbuilder commented 7 years ago

The bootloader is being spun out into 'mcuboot', a separate project that will be used by several RTOSes including Zephyr. As such, we should make the small changes required to use mcuboot while maintaining backward compatibility with mynewt boot, as described here: https://github.com/runtimeco/mcuboot/blob/master/README-mynewt.rst

microbuilder commented 7 years ago

Note that this also requires a change to the create-image command since the image headers will change:

Also, mcuboot uses a different image header struct as well as slightly different TLV structure, so images created by newt have to be generated in this new format. That is done by passing the extra parameter -2 as in:

newt create-image <target> <version> <pubkey> -2
hathach commented 7 years ago

Things change quiclkly !! Did mynewt has an official release that solve the image issue ?

microbuilder commented 7 years ago

You can keep using the older mynewt (v1) bootloader, but I think future versions will use the new mcuboot release and headers. This isn't urgent, but I wanted to file it as an issue for a future board revision.

microbuilder commented 7 years ago

To clarify ... the benefit to us to migrate is that if we support the mcuboot (v2) bootloader, we can also flash Zephyr and potentially other binary images to the same HW.