Commit Graph

2330 Commits

Author SHA1 Message Date
Christopher Collins 2ae6c6ff8c This closes #2.
Merge remote-tracking branch 'd3zd3z/zephyr'

* d3zd3z/zephyr:
  zephyr: Include mbedtls config file
  zephyr: Move code under 'boot' directory
  zephyr: Move Zephyr build to top level
2017-01-10 10:41:18 -08:00
David Brown e7c66635cf zephyr: Include mbedtls config file
Rather than commit our specific mbedtls config file into the Zephyr
tree, include it here, and add a path early in the make process so that
it will get picked up when building the library.
2017-01-10 09:51:39 -07:00
David Brown 299245d7de zephyr: Move code under 'boot' directory
The Zephyr build systems makes some assumptions about the directory
layout, and encounters problems if the necessary path contains "../..".
To help this, place the zephyr directory next to the bootutil directory
so that the Makefile can just refer to "../bootutil".  This keeps all of
the build artifacts under the proper top-level directory.
2017-01-10 09:49:47 -07:00
David Brown 841d73aaf1 sim: Create a small README.rst
Describe how to build and run the simulator.
2017-01-09 12:28:11 -07:00
David Brown 4440af8f59 sim: Use logging to control output
Use the Rust logging so that normal messaging isn't overwhelmed by
messages printed.  The default level is 'error' which will only print
full errors (including the failures at the end).

To run with warnings:

   RUST_LOG=warn ./target/release/bootsim ...

This will print warnings, showing the particular failures in mind.
Using 'info' instead of 'warn' will print lots of progress as it runs.
2017-01-09 12:28:10 -07:00
David Brown de7729e6ec sim: Add simulator code
'sim' is a small simulator for the bootloader's update code.  It tests
untimely powerdowns to ensure that the bootloader will recover from a
power loss or reset at any time during the boot.

Note that, as of this commit, there are some failures in the test that
need to be investigated.

Also note that this build script does not output proper dependencies for
source files outside of the simulator directory, and won't rebuild the C
files if they or headers are modified.
2017-01-09 12:28:10 -07:00
David Brown c331967ae1 zephyr: Move Zephyr build to top level
The Zephyr build system does strange things if it refers to source
directories above the main Makefile (generating
outdir/<target>/../boot/... paths).  For now, fix this by moving the
Zephyr Makefile to the top-level in the tree.  This shouldn't have much
impact on Mynewt, as it doesn't use makefiles.
2017-01-09 10:37:20 -07:00
Christopher Collins 4c2662d811 This closes #1.
Merge remote-tracking branch 'd3zd3z/zephyr'
2017-01-06 14:02:06 -08:00
David Brown 5153bd6c61 zephyr: Bring in the Zephyr build
Add support for building mcuboot as a Zephyr application.  This is
copied from the iotboot repo with some minor reorganization to work with
the mcuboot directory layout.
2017-01-06 11:16:53 -07:00
David Brown 5315d50a0c bootutil: Create Zephyr Makefile
Create a small Makefile for the Zephyr build system to use.
2017-01-06 11:08:03 -07:00
David Brown db1d9d38e2 loader: Remove malloc dependency
Allocate a static tmpbuf instead of calling malloc.  This is the only
direct call to malloc in the code.
2017-01-06 11:07:54 -07:00
Marko Kiiskila bd14468fd8 bootutil; need to include string.h when building for native. 2017-01-05 17:57:51 -08:00
Marko Kiiskila 755daedde9 bootutil; fix issues in parsing signature with ECDSA256. 2017-01-05 17:57:51 -08:00
Marko Kiiskila 8eeba12f2a bootutil; add info about how to create keys for ECC 256. 2017-01-05 17:57:51 -08:00
Marko Kiiskila 351a0b231b boot; drop unnecessary include from image_ec.c. 2017-01-05 17:57:51 -08:00
Marko Kiiskila bf94339025 boot; first cut at adding support for signatures with ECSDA using NIST P-256. 2017-01-05 17:57:46 -08:00
Marko Kiiskila 919eaf4111 signed_images.md; include ECC key generation steps in the doc. 2017-01-05 17:56:50 -08:00
Christopher Collins 920fc16b89 boot - don't interpet end of image as trailer.
This fix handles the case where the image is so big that there is not
room for a trailer.  In this case, the boot loader always boots into
slot 0.
2017-01-05 17:56:50 -08:00
Christopher Collins fd7eb5cc5e MYNEWT-518 - Clean up previous commit.
The previous commit for this ticket left the code in a working state.
However, it was not possible for image management to distinguish between
the test and permanent states.

Now, these two states are indicated by the addition of a new swap type:
BOOT_SWAP_TYPE_PERMANENT.
2017-01-05 17:56:50 -08:00
Christopher Collins 553ba4feb2 MYNEWT-518 Update comments and design doc. 2017-01-05 17:56:50 -08:00
Christopher Collins 0ff3c6c033 MYNEWT-520 boot - Allow incompatible image slots 2017-01-05 17:56:50 -08:00
Christopher Collins 7835c1e4db MYNEWT-518 boot - Allow test+confirm as single act
Currently, to permanently run the alternate image, the boot loader
requires the following sequence:

1. image test <slot-01-hash>
2. reboot
3. image confirm

The new feature is to remove the need for the third step. The user
should be able to permanently switch images with this sequence:

1. image confirm <slot-01-hash>
2. reboot
2017-01-05 17:56:50 -08:00
Marko Kiiskila bf986da2c3 bootutil; update signed_images.md with the new location of bootutil. 2017-01-05 17:56:40 -08:00
Christopher Collins 3569c37894 bootutil tests - Don't assume min-write-sz==1. 2016-12-13 14:52:19 -08:00
Christopher Collins 874510ea54 Add project.yml. 2016-12-12 18:00:16 -08:00
Christopher Collins 40fb9270d8 Remove develop branch. 2016-12-12 17:59:22 -08:00
Christopher Collins 7244ed82fe Add repository.yml file. 2016-12-12 17:51:28 -08:00
Christopher Collins 39a5fa95c3 Move packages into "boot" top-level directory. 2016-12-12 17:51:23 -08:00
Christopher Collins 92ea77f068 mcuboot - Initial migration. 2016-12-12 15:59:26 -08:00
ccollins476ad fc6199ef29 Initial commit 2016-12-12 17:53:39 -06:00