commit | 7d4ef3fe65a9a83cc58e7bd973654ad235cc68bc | [log] [tgz] |
---|---|---|
author | Christopher Collins <ccollins@apache.org> | Tue Oct 15 15:16:33 2019 -0700 |
committer | ccollins476ad <ccollins476ad@gmail.com> | Tue Oct 15 16:22:42 2019 -0700 |
tree | 913d26612fe521cac1a254713c4179230c46de90 | |
parent | 9a05103892a35d44a3c15161181051109ee21245 [diff] |
Mcuboot hack to prevent `newt upgrade` failure For projects using mcuboot, `newt upgrade` has been failing. The error message is: Error: Error updating "mcuboot": error: The following untracked working tree files would be overwritten by checkout: ext/mbedtls/include/mbedtls/asn1.h ext/mbedtls/include/mbedtls/bignum.h ext/mbedtls/include/mbedtls/check_config.h ext/mbedtls/include/mbedtls/config.h ext/mbedtls/include/mbedtls/ecdsa.h ext/mbedtls/include/mbedtls/ecp.h ext/mbedtls/include/mbedtls/md.h ext/mbedtls/include/mbedtls/oid.h ext/mbedtls/include/mbedtls/pk.h ext/mbedtls/include/mbedtls/platform.h ext/mbedtls/include/mbedtls/platform_util.h ext/mbedtls/include/mbedtls/threading.h Please move or remove them before you switch branches. Aborting The problem is caused by a recent change to mcuboot - a normal directory was replaced with a submodule. Git is unable to transition from a post-replace commit to a pre-replace commit because some files in the submodule used to exist in the mcuboot repo itself. This commit implements a pair of hacks to workaround this problem. Upon performing a checkout operation on the mcuboot repo: 1. If newt detects the above error message, it removes the `ext/mbedtls` directory and tries again. 2. If newt detects a different warning message (`unable to rmdir 'sim/mcuboot-sys/mbedtls': Directory not empty`), it removes `sim/mcuboot-sys/mbedtls`. The second hack is required when transitioning from pre-replace to post-replace. In this case, the checkout operation succeeds, but an orphaned directory is left behind, making the repo look dirty. This is expected to be a short-term fix. When we have a general fix for this issue, this hack can be removed.
Apache Newt is a smart build and package management tool, designed for C and C++ applications in embedded contexts. Newt was developed as a part of the Apache Mynewt Operating System, more information on Apache Mynewt can be found at https://mynewt.apache.org/.
Newt is a build system that can read a directory tree, build a dependency tree, and emit the right build artifacts. It then allows you to do the following:
Newt is also a source management system that allows you to do the following:
When Newt sees a directory tree that contains a “project.yml” file, it recognizes it as the base directory of a project, and automatically builds a package tree. More information can be found in the “Newt Tool Manual” under Docs at https://mynewt.apache.org/.
To build Apache Newt, simply run the included build.sh script. For more information on building and installng Apache Newt, please read INSTALLING or the documentation on https://mynewt.apache.org/
Once you've installed newt, you can get started by creating a new project:
$ newt new your_project
For more information, and a tutorial for getting started, please take a look at the Apache Mynewt documentation.
Anybody who works with Apache Mynewt can be a contributing member of the community that develops and deploys it. The process of releasing an operating system for microcontrollers is never done: and we welcome your contributions to that effort.
Apache Mynewt welcomes pull request via Github. Discussions are done on Github, but depending on the topic, can also be relayed to the official Apache Mynewt developer mailing list dev@mynewt.apache.org.
Bugs can be filed as Github issues here. Where possible, please include a self-contained reproduction case!
If you are suggesting a new feature, please email the developer list directly with a description of the feature or submit a Github issue.
We love getting newt tests! Apache Mynewt is a huge undertaking, and improving code coverage is a win for every Apache Mynewt user.
Automated Newt tests are run in Travis. The test code can be found here.
Contributing to documentation (in addition to writing tests), is a great way to get involved with the Apache Mynewt project. The Newt documentation is found in /docs.
The best place to seek help is the Apache Mynewt slack channel
The Apache Mynewt developers mailing list is another good resource.