Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
30 changes: 18 additions & 12 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on: [push]
jobs:
firmware:
name: Firmware
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

strategy:
matrix:
Expand All @@ -32,7 +32,7 @@ jobs:
- uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- uses: docker/build-push-action@v5
- uses: docker/build-push-action@v6
with:
push: true
context: .
Expand All @@ -41,7 +41,7 @@ jobs:
tags: localhost:5000/foundation-devices/passport2:latest
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.70.0
toolchain: 1.77.1
targets: thumbv7em-none-eabihf
- run: cargo install [email protected] --locked
- run: |
Expand All @@ -58,6 +58,12 @@ jobs:
env:
SIGNING_KEY: ${{ secrets.UserSigningKey }}

- name: Upload firmware ELF
uses: actions/upload-artifact@v4
with:
name: v${{env.version}}${{ matrix.build.suffix }}.elf
path: ports/stm32/build-Passport/firmware.elf

- name: Upload firmware (unsigned)
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -96,7 +102,7 @@ jobs:

bootloader:
name: Bootloader
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
needs: [firmware]

# TODO: SFT-1077.
Expand All @@ -117,7 +123,7 @@ jobs:
- uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- uses: docker/build-push-action@v5
- uses: docker/build-push-action@v6
with:
push: true
context: .
Expand All @@ -126,7 +132,7 @@ jobs:
tags: localhost:5000/foundation-devices/passport2:latest
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.70.0
toolchain: 1.77.1
targets: thumbv7em-none-eabihf
- run: cargo install [email protected] --locked
- run: |
Expand All @@ -145,7 +151,7 @@ jobs:

simulator:
name: Simulator
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
needs: [firmware]

strategy:
Expand All @@ -165,7 +171,7 @@ jobs:
- uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- uses: docker/build-push-action@v5
- uses: docker/build-push-action@v6
with:
push: true
context: .
Expand All @@ -174,7 +180,7 @@ jobs:
tags: localhost:5000/foundation-devices/passport2:latest
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.70.0
toolchain: 1.77.1
targets: thumbv7em-none-eabihf
- run: cargo install [email protected] --locked
- run: echo "DOCKER_IMAGE=localhost:5000/foundation-devices/passport2:latest" >> $GITHUB_ENV
Expand All @@ -184,7 +190,7 @@ jobs:

build-tools:
name: Tools
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

services:
registry:
Expand All @@ -199,7 +205,7 @@ jobs:
- uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- uses: docker/build-push-action@v5
- uses: docker/build-push-action@v6
with:
push: true
context: .
Expand All @@ -208,7 +214,7 @@ jobs:
tags: localhost:5000/foundation-devices/passport2:latest
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.70.0
toolchain: 1.77.1
targets: thumbv7em-none-eabihf
- run: cargo install [email protected] --locked
- run: echo "DOCKER_IMAGE=localhost:5000/foundation-devices/passport2:latest" >> $GITHUB_ENV
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: fsfe/reuse-action@v2
- uses: fsfe/reuse-action@v4

rust-code-compiles:
name: Rust code compiles?
Expand All @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.70.0
toolchain: 1.77.1
targets: thumbv7em-none-eabihf
- run: |
cargo check --manifest-path extmod/foundation-rust/Cargo.toml
Expand All @@ -36,7 +36,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.70.0
toolchain: 1.77.1
components: rustfmt
- run: |
cargo fmt --manifest-path extmod/foundation-rust/Cargo.toml \
Expand All @@ -58,7 +58,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.70.0
toolchain: 1.77.1
- run: cargo install cbindgen@^0.24 --locked
- run: |
cbindgen --config extmod/foundation-rust/cbindgen.toml \
Expand All @@ -74,7 +74,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.70.0
toolchain: 1.77.1
targets:
- run: |
cargo test --manifest-path extmod/foundation-rust/Cargo.toml \
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
SPDX-FileCopyrightText: © 2023 Foundation Devices, Inc. <hello@foundation.xyz>

SPDX-License-Identifier: GPL-3.0-or-later
-->
Expand Down
6 changes: 3 additions & 3 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!--
SPDX-FileCopyrightText: © 2021 Foundation Devices, Inc. <hello@foundationdevices.com>
SPDX-FileCopyrightText: © 2021 Foundation Devices, Inc. <hello@foundation.xyz>

SPDX-License-Identifier: GPL-3.0-or-later
-->

# Development

This document describes how to develop for Passport. The instructions below describe how to set up the development environment and build Passport on a system running **Ubuntu 20.04**. This OS is used for official Passport builds, as well as in the Dockerfile described below which creates reproducible builds.
This document describes how to develop for Passport. The instructions below describe how to set up the development environment and build Passport on a system running **Ubuntu 24.04**. This OS is used for official Passport builds, as well as in the Dockerfile described below which creates reproducible builds.

## Setup
In order to build the Passport firmware, you need to:
Expand Down Expand Up @@ -63,7 +63,7 @@ The makefiles used by MicroPython and Passport firmware use Autotools. Install
OpenOCD is used to connect to the STLink V2 debug probe. Note that this is only required for developers with a special Developer version of the Passport board. If all you want to do is build the firmware and install it with a Developer Pubkey over microSD, then you do not need to install OpenOCD.

cd ~/
git clone https://github.com/ntfreak/openocd.git
git clone --depth 1 --branch v0.12.0 https://github.com/ntfreak/openocd.git
cd ~/openocd/
./bootstrap
./configure --enable-stlink
Expand Down
12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# SPDX-FileCopyrightText: © 2021 Foundation Devices, Inc. <hello@foundationdevices.com>
# SPDX-FileCopyrightText: © 2021 Foundation Devices, Inc. <hello@foundation.xyz>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#

FROM ubuntu:20.04
FROM ubuntu:24.04

ARG DEBIAN_FRONTEND=noninteractive

Expand All @@ -23,18 +23,16 @@ RUN apt-get update && \
pkg-config \
pycodestyle \
python3 \
python3-pip && \
python3-pip \
reuse && \
rm -rf /var/lib/apt/lists/*

# Install reuse.
RUN pip3 install reuse

# Install rustup.
ENV RUSTUP_HOME="/rustup"
ENV CARGO_HOME="/cargo"
RUN mkdir -p /rustup /cargo && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
sh -s -- -y --profile minimal --default-toolchain 1.70.0
sh -s -- -y --profile minimal --default-toolchain 1.77.1
ENV PATH="/cargo/bin:${PATH}"

# Finish installation of Rust toolchain.
Expand Down
2 changes: 1 addition & 1 deletion Justfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: © 2021 Foundation Devices, Inc. <hello@foundationdevices.com>
# SPDX-FileCopyrightText: © 2021 Foundation Devices, Inc. <hello@foundation.xyz>
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Justfile - Root-level Justfile for Passport
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: © 2021 Foundation Devices, Inc. <hello@foundationdevices.com>
SPDX-FileCopyrightText: © 2021 Foundation Devices, Inc. <hello@foundation.xyz>

SPDX-License-Identifier: GPL-3.0-or-later
-->
Expand Down
6 changes: 3 additions & 3 deletions REPRODUCIBILITY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
SPDX-FileCopyrightText: © 2023 Foundation Devices, Inc. <hello@foundation.xyz>

SPDX-License-Identifier: GPL-3.0-or-later
-->
Expand Down Expand Up @@ -174,7 +174,7 @@ Hashes match!

This means that the binary we’ve built matches what we at Foundation have also built and published as the expected hash. Next, we’ll be sure that this built binary ****also**** matches the release binary you’d install on Passport directly.

If your hashes do not match for any reason, stop immediately and contact us at [hello@foundationdevices.com](mailto:hello@foundationdevices.com)! We’ll help you investigate the cause of this discrepancy and get to the bottom of the issue.
If your hashes do not match for any reason, stop immediately and contact us at [hello@foundation.xyz](mailto:hello@foundation.xyz)! We’ll help you investigate the cause of this discrepancy and get to the bottom of the issue.

If you’d like to validate exactly how the `verify-sha` command works and ensure it’s not lying to you about the hashes, you can see the source code here:

Expand Down Expand Up @@ -211,7 +211,7 @@ shasum -b -a 256 v2.1.2-passport-no-header.bin

If your hashes matched above, congratulations! You just successfully verified that the firmware you’re about to install on your Passport exactly matches the source code that is published on Github.

If your hashes do not match for any reason, stop immediately and contact us at [hello@foundationdevices.com](mailto:hello@foundationdevices.com)! We’ll help you investigate the cause of this discrepancy and get to the bottom of the issue.
If your hashes do not match for any reason, stop immediately and contact us at [hello@foundation.xyz](mailto:hello@foundation.xyz)! We’ll help you investigate the cause of this discrepancy and get to the bottom of the issue.

### Verifying the firmware header (optional)

Expand Down
2 changes: 1 addition & 1 deletion SECURITY/SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: © 2021 Foundation Devices, Inc. <hello@foundationdevices.com>
SPDX-FileCopyrightText: © 2021 Foundation Devices, Inc. <hello@foundation.xyz>

SPDX-License-Identifier: GPL-3.0-or-later
-->
Expand Down
20 changes: 10 additions & 10 deletions extmod/foundation-rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion extmod/foundation-rust/Cargo.lock.license

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions extmod/foundation-rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
# SPDX-FileCopyrightText: © 2023 Foundation Devices, Inc. <hello@foundation.xyz>
# SPDX-License-Identifier: GPL-3.0-or-later

[package]
Expand All @@ -12,7 +12,7 @@ name = "sizes"
required-features = ["std"]

[dependencies.bitcoin_hashes]
version = "0.14"
version = "0.15"
features = ["small-hash"]
default-features = false

Expand All @@ -29,11 +29,11 @@ version = "1"
default-features = false

[dependencies.foundation-firmware]
version = "0.1.2"
version = "0.2"
default-features = false

[dependencies.foundation-ur]
version = "0.3"
version = "0.4"
default-features = false

[dependencies.foundation-urtypes]
Expand All @@ -53,7 +53,7 @@ default-features = false
features = ["critical-section"]

[dependencies.secp256k1]
version = "0.29"
version = "0.30"
default-features = false
features = ["lowmemory", "rand"]

Expand All @@ -80,5 +80,5 @@ crate-type = ["lib", "staticlib"]
lto = "fat"
opt-level = "z"
codegen-units = 1
strip = true
strip = "none"
panic = "abort"
2 changes: 1 addition & 1 deletion extmod/foundation-rust/Justfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
# SPDX-FileCopyrightText: © 2023 Foundation Devices, Inc. <hello@foundation.xyz>
# SPDX-License-Identifier: GPL-3.0-or-later

alias g := generate
Expand Down
Loading
Loading