From e4b96a2383849b12dbde7bee4acfd5c6f898c2c1 Mon Sep 17 00:00:00 2001 From: hugoender <6217175+hugoender@users.noreply.github.com> Date: Wed, 14 Jun 2023 22:38:49 -0400 Subject: [PATCH 1/2] Update DEVELOPMENT.md Edited text to reduce ambiguity/confusion and provide a more user friendly procedure to accommodate even the most noob of users such as myself. --- DEVELOPMENT.md | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index f2f2da782..fec396886 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -23,7 +23,7 @@ The instructions below assume you are installing into your home folder at `~/pas to install to a different folder, and just update command paths appropriately. cd ~/ - git clone git@github.com:Foundation-Devices/passport2.git + git clone https://github.com/Foundation-Devices/passport2.git ### Install Dependencies Several tools are required for building Passport. @@ -32,8 +32,13 @@ Several tools are required for building Passport. First install the `rustup` tool from [rustup.rs](https://rustup.rs/). +Then run the following commands: + rustup default 1.67.1 - rustup target add aarch64-unknown-none # For the simulator. Only if on macOS with an M1 CPU. + + # For the simulator. Only if on macOS with an M1 CPU. + rustup target add aarch64-unknown-none + rustup target add thumbv7em-none-eabihf rustup target add x86_64-unknown-none cargo install cbindgen @@ -63,17 +68,17 @@ OpenOCD is used to connect to the STLink V2 debug probe. Note that this is only ## Building Passport Firmware -Passport comes with a set of `Justfile` command scripts. Using these commands requires that you first install the `just` command runner by following the instructions here: - - https://github.com/casey/just#installation +Passport comes with a set of `Justfile` command scripts. Using these commands requires that you first install the `just` command runner by either following the instructions at [github.com/casey/just#installation](https://github.com/casey/just#installation) or using + + cargo install just Note that Python `Pillow` must be updated to `8.4.0` for all commands to work properly using the following command: pip install Pillow==8.4.0 -To build firmware for Passport, you can run the `just` commands in `ports/stm32/Justfile`. You'll typically want to be in the `ports/stm32` folder to run these commands. +`ports/stm32/Justfile` contains all the `just` commands you can run to build firmware for Passport. You'll typically want to be in the `ports/stm32` folder to run these commands. -To build and sign the firmware with a Developer Pubkey, use one of the following commands: +To build and sign the firmware with a Developer Pubkey, use one of the following commands. Note: you cannot sign with Developer Pubkey until you've completed the [code-signing](https://github.com/Foundation-Devices/passport2/blob/main/DEVELOPMENT.md#code-signing) steps: just sign 2.0.4 color just sign 2.0.4 mono @@ -116,12 +121,13 @@ First, you need to build the `cosign` tool and copy it somewhere in your `PATH`: make cp x86/release/cosign ~/.local/bin # You can run `echo $PATH` to see the list of possible places you can put this file -If you don't already have an openssl key, return to the repo root directory and generate a Pubkey using `tools/genkeys.sh`. This takes a key number as an argument. +If you don't already have an openssl key, return to the repo root directory (e.g. `~/passport2`) and generate a Pubkey using `tools/genkeys.sh`. This takes a key number as an argument. ./tools/genkeys.sh 1 Now, move the keys into `~/bin/keys/`, or look ahead a few steps for instructions on setting a custom `cosign_keypath`. Create the directory if it doesn't exist yet. If you already have keys here for another use, make sure not to overwrite them. Make sure not to commit these keys in the git repo. + mkdir ~/bin mkdir ~/bin/keys mv tools/1.pem ~/bin/keys/user.pem mv tools/1-pub.bin ~/bin/keys/user-pub.bin From 2fd96bdb071ad3ed87ec5223250d8397e825be5f Mon Sep 17 00:00:00 2001 From: hugoender <6217175+hugoender@users.noreply.github.com> Date: Wed, 14 Jun 2023 22:56:18 -0400 Subject: [PATCH 2/2] Update DEVELOPMENT.md --- DEVELOPMENT.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index fec396886..598f43dd7 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -127,8 +127,7 @@ If you don't already have an openssl key, return to the repo root directory (e.g Now, move the keys into `~/bin/keys/`, or look ahead a few steps for instructions on setting a custom `cosign_keypath`. Create the directory if it doesn't exist yet. If you already have keys here for another use, make sure not to overwrite them. Make sure not to commit these keys in the git repo. - mkdir ~/bin - mkdir ~/bin/keys + mkdir -p ~/bin/keys mv tools/1.pem ~/bin/keys/user.pem mv tools/1-pub.bin ~/bin/keys/user-pub.bin mv tools/1-pub.pem ~/bin/keys/user-pub.pem