Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootloader infrastructure and main logic #404

Merged
merged 4 commits into from
Mar 3, 2022

Conversation

kaczmarczyck
Copy link
Collaborator

This is the first PR containing the bootloader code. Compared to the full code, this PR misses the SHA256 computation using the Cryptocell.

It includes the full setup and infrastructure, including:

  • desktop checks
  • workflow checks
  • docs updates
  • linker script
  • deploy code
  • main logic

The bootloader directory is self-sufficient, it's basically independent from OpenSK. Therefore, I decided to give it its own rust-toolchain file. They currently run with the same toolchain for convenience, but an OpenSK toolchain upgrade should not necessarily burden is with also upgrading the bootloader toolchain (even though we can, of course).

  • Tests pass
  • Appropriate changes to README are included in PR

bootloader/.cargo/config Outdated Show resolved Hide resolved
bootloader/rust-toolchain Show resolved Hide resolved
docs/install.md Outdated
@@ -54,6 +54,7 @@ following:
* python3 and pip (can be installed with the `python3-pip` package on Debian)
* the OpenSSL command line tool (can be installed and configured with the
`libssl-dev` and `pkg-config` packages on Debian)
* `gcc-arm-none-eabi` from Debian packages if you want an upgradable board
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not using LLVM tools which are part of installed rust toolchain?
That's what Tock does.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me, it looks like I always need to install something, either

  1. apt install gcc-arm-none-eabi
  2. apt install llvm
  3. cargo install cargo-binutils && rustup component add llvm-tools (for calling cargo objcopy --)

In Tock, I find usage examples of options 1 and 2. So maybe the change in the latest commit is better?

@kaczmarczyck
Copy link
Collaborator Author

I'm waiting for the documentation PR to #408 land, and then modify this PR to add its documentation to the right places.

@kaczmarczyck
Copy link
Collaborator Author

Rebase on top of the documentation changes, and added more context.

@kaczmarczyck
Copy link
Collaborator Author

Maybe the documentation should live in customization.md. Or link to the bootloader README. I'm taking opinions on that!

@coveralls
Copy link

coveralls commented Feb 24, 2022

Coverage Status

Coverage increased (+0.5%) to 91.697% when pulling cfbcb4b on kaczmarczyck:submit-bootloader into c401216 on google:develop.

bootloader/README.md Outdated Show resolved Hide resolved
deploy.py Show resolved Hide resolved
docs/boards/nrf52840dk.md Outdated Show resolved Hide resolved
docs/install.md Outdated Show resolved Hide resolved
docs/install.md Outdated Show resolved Hide resolved
@kaczmarczyck kaczmarczyck merged commit 187111f into google:develop Mar 3, 2022
@kaczmarczyck kaczmarczyck deleted the submit-bootloader branch March 3, 2022 21:01
@jmichelp jmichelp mentioned this pull request Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants