Skip to content

Commit

Permalink
Merge pull request #336 from hugoender/hugoender-patch-1
Browse files Browse the repository at this point in the history
Update DEVELOPMENT.md
  • Loading branch information
jeandudey authored Jun 19, 2023
2 parents f16f9bf + ddeff46 commit eea29dd
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -32,7 +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

# For the simulator. Only if on macOS with an M1 CPU.
rustup target add aarch64-unknown-none

rustup target add thumbv7em-none-eabihf
cargo install cbindgen

Expand Down Expand Up @@ -61,17 +67,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
Expand Down Expand Up @@ -114,13 +120,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/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
Expand Down

0 comments on commit eea29dd

Please sign in to comment.