diff --git a/CHANGELOG.md b/CHANGELOG.md index 10636b5e..8f27b493 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.4.0] - 2023-09-15 + +### Changed + - Bump Stax SDK versions + - Bump Rust stable version to 1.72.0 + +### Added + - cargo-ledger version 1.1.0 + - llvm15 tools + ## [3.3.0] - 2023-09-01 ### Changed diff --git a/full/Dockerfile b/full/Dockerfile index 0ba16176..304df979 100644 --- a/full/Dockerfile +++ b/full/Dockerfile @@ -1,5 +1,11 @@ FROM ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest +ARG RUST_STABLE_VERSION=1.72.0 +ARG RUST_NIGHTLY_VERSION=nightly-2022-12-02 + +# Add curl for Rust buildchain +RUN apk add curl + # Define rustup/cargo home directories ENV RUSTUP_HOME=/opt/rustup \ CARGO_HOME=/opt/.cargo @@ -9,15 +15,17 @@ RUN apk add rustup # Adding cargo binaries to PATH ENV PATH=${CARGO_HOME}/bin:${PATH} -# Installing rustup and setting the default toolchain to the 1.67.0 stable channel. -RUN rustup-init --default-toolchain 1.67.0 -y +# Installing rustup and setting the default toolchain to the RUST_STABLE_VERSION stable channel. +RUN rustup-init --default-toolchain $RUST_STABLE_VERSION -y -# Installing nightly channel version 1.67.0 as well. -RUN rustup install nightly-2022-12-02 +# Installing nightly channel version RUST_NIGHTLY_VERSION as well. +RUN rustup install $RUST_NIGHTLY_VERSION # Adding ARMV6M target to the installed toolchains -RUN rustup target add thumbv6m-none-eabi --toolchain 1.67.0 -RUN rustup target add thumbv6m-none-eabi --toolchain nightly-2022-12-02 +RUN rustup target add thumbv6m-none-eabi --toolchain $RUST_NIGHTLY_VERSION # Adding rust-src component to nightly channel -RUN rustup component add rust-src --toolchain nightly-2022-12-02 +RUN rustup component add rust-src --toolchain $RUST_NIGHTLY_VERSION + +# Add cargo ledger (needs a version of Rust >= 1.70) +RUN cargo install --locked --git=https://github.com/LedgerHQ/cargo-ledger.git --rev 1.1.0 cargo-ledger diff --git a/legacy/Dockerfile b/legacy/Dockerfile index cfdfe58c..d35694d6 100644 --- a/legacy/Dockerfile +++ b/legacy/Dockerfile @@ -7,11 +7,17 @@ ARG DEBIAN_FRONTEND=noninteractive ARG LLVM_VERSION=12 +ARG RUST_STABLE_VERSION=1.72.0 +ARG RUST_NIGHTLY_VERSION=nightly-2022-12-02 + RUN apt-get update && apt-get upgrade -qy RUN apt-get install -qy \ clang-$LLVM_VERSION \ cmake \ curl \ + wget \ + gpg-agent \ + software-properties-common \ git \ lld-$LLVM_VERSION \ make \ @@ -43,19 +49,27 @@ ENV PATH=/opt/gcc-arm-none-eabi-10.3-2021.10/bin:$PATH \ # Adding cargo binaries to PATH ENV PATH=${CARGO_HOME}/bin:${PATH} -# Installing rustup to manage rust toolchains and setting the default toolchain to the 1.67.0 stable channel +# Installing rustup to manage rust toolchains and setting the default toolchain to the RUST_STABLE_VERSION stable channel RUN curl https://sh.rustup.rs -sSf | \ - sh -s -- --default-toolchain 1.67.0 -y + sh -s -- --default-toolchain $RUST_STABLE_VERSION -y -# Installing nightly channel version 1.67.0 as well. -RUN rustup install nightly-2022-12-02 +# Installing nightly channel version RUST_NIGHTLY_VERSION as well. +RUN rustup install $RUST_NIGHTLY_VERSION # Adding ARMV6M target to the installed toolchains -RUN rustup target add thumbv6m-none-eabi --toolchain 1.67.0 -RUN rustup target add thumbv6m-none-eabi --toolchain nightly-2022-12-02 +RUN rustup target add thumbv6m-none-eabi --toolchain $RUST_NIGHTLY_VERSION # Adding rust-src component to nightly channel -RUN rustup component add rust-src --toolchain nightly-2022-12-02 +RUN rustup component add rust-src --toolchain $RUST_NIGHTLY_VERSION + +# Add cargo ledger (needs a version of Rust >= 1.70) +RUN cargo install --locked --git=https://github.com/LedgerHQ/cargo-ledger.git --rev 1.1.0 cargo-ledger + +# Adding LLVM-15 APT repository and installing it +RUN wget --no-check-certificate -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - +RUN add-apt-repository -y "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main" +RUN apt-get update \ + && apt-get install -y --no-install-recommends llvm-15 # Python package to load app onto device RUN pip3 install ledgerblue diff --git a/lite/Dockerfile b/lite/Dockerfile index a6f636d7..cf4fc9c8 100644 --- a/lite/Dockerfile +++ b/lite/Dockerfile @@ -3,6 +3,13 @@ ENV LANG C.UTF-8 RUN apk update RUN apk upgrade + +# Adding LLVM-15 APT repository and installing it +# LLVM-15 is only present starting from the v3.17 Alpine version +RUN apk add --repository=http://dl-cdn.alpinelinux.org/alpine/v3.17/main llvm15 +RUN ln -s /usr/lib/llvm15/bin/llvm-objcopy /usr/bin/llvm-objcopy-15 +RUN ln -s /usr/lib/llvm15/bin/llvm-nm /usr/bin/llvm-nm-15 + RUN apk add \ bash \ clang \ @@ -76,9 +83,9 @@ ENV NANOSP_SDK=/opt/nanosplus-secure-sdk RUN git -C "$LEDGER_SECURE_SDK" worktree add "$NANOSP_SDK" v1.8.0 RUN echo nanos2 > $NANOSP_SDK/.target -# Latest Stax SDK (OS stax_1.3.0-rc3 => based on API_LEVEL 12) +# Latest Stax SDK (OS stax_1.3.0-rc4 => based on API_LEVEL 13) ENV STAX_SDK=/opt/stax-secure-sdk -RUN git -C "$LEDGER_SECURE_SDK" worktree add "$STAX_SDK" v12.3.0 +RUN git -C "$LEDGER_SECURE_SDK" worktree add "$STAX_SDK" v13.0.0 RUN echo stax > $STAX_SDK/.target # Default SDK