Skip to content

Commit

Permalink
Using nanos SDK custom fork (#147)
Browse files Browse the repository at this point in the history
- Removing now unnecessary patches to the SDK in the Dockerfile
- Reduced number of max USB endpoints for UI and Signer
- Updated CHANGELOG
  • Loading branch information
amendelzon authored May 31, 2023
1 parent a59b8b5 commit a6fa4f1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [2.3.6] - 30/05/2023

### Features/enhancements

- Using Nanos SDK fork instead of local patches for Docker image build
- Reduce USB max endpoints

## [2.3.5] - 27/06/2022

### Fixes
Expand Down
10 changes: 3 additions & 7 deletions docker/ledger/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ RUN apt-get install -y clang-10=1:10.0.0-4ubuntu1 && \
apt-get install -y gcc-multilib=4:9.3.0-1ubuntu2 g++-multilib=4:9.3.0-1ubuntu2 && \
ln -s /usr/bin/clang-10 /usr/bin/clang

RUN curl -L -o nanos-1314.tar.gz https://github.com/LedgerHQ/nanos-secure-sdk/archive/nanos-1314.tar.gz && \
tar xzf nanos-1314.tar.gz && \
RUN curl -L -o nanos-1314.tar.gz https://github.com/rsksmart/rsk-powhsm-nanos-secure-sdk/archive/nanos-1314-powhsm.tar.gz && \
mkdir nanos-secure-sdk-nanos-1314 && \
tar xzf nanos-1314.tar.gz -C nanos-secure-sdk-nanos-1314 --strip-components=1 && \
rm -f nanos-1314.tar.gz

RUN apt install -y python2 && \
Expand All @@ -37,11 +38,6 @@ RUN mkdir /opt/hashapp && \
curl -L -o /opt/hashapp/hashApp.py \
https://raw.githubusercontent.com/LedgerHQ/blue-loader-python/0.1.31/ledgerblue/hashApp.py

# Patched version of os.h with APDU_BUFFER reduced from 255 to 80 bytes
COPY os.h.patch nanos-secure-sdk-nanos-1314/include/os.h.patch
RUN patch nanos-secure-sdk-nanos-1314/include/os.h nanos-secure-sdk-nanos-1314/include/os.h.patch
RUN rm -f nanos-secure-sdk-nanos-1314/include/os.h.patch

ENV BOLOS_SDK=/opt/nanos-secure-sdk-nanos-1314
ENV CLANGPATH=/usr/bin/
ENV GCCPATH=/opt/gcc-arm-none-eabi-9-2020-q2-update/bin/
Expand Down
5 changes: 0 additions & 5 deletions docker/ledger/os.h.patch

This file was deleted.

2 changes: 1 addition & 1 deletion ledger/src/signer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ DEFINES += OS_IO_SEPROXYHAL IO_SEPROXYHAL_BUFFER_SIZE_B=128
DEFINES += HAVE_BAGL HAVE_SPRINTF
DEFINES += PRINTF\(...\)=

DEFINES += HAVE_IO_USB HAVE_L4_USBLIB IO_USB_MAX_ENDPOINTS=7 IO_HID_EP_LENGTH=64 HAVE_USB_APDU
DEFINES += HAVE_IO_USB HAVE_L4_USBLIB IO_USB_MAX_ENDPOINTS=3 IO_HID_EP_LENGTH=64 HAVE_USB_APDU

# Compiler, assembler, and linker
CC := $(CLANGPATH)clang
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/ui/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ DEFINES += BOLOS_RELEASE
DEFINES += HAVE_BOLOS_UX
DEFINES += HAVE_BAGL HAVE_SPRINTF

DEFINES += HAVE_IO_USB HAVE_L4_USBLIB IO_USB_MAX_ENDPOINTS=2 IO_HID_EP_LENGTH=64 HAVE_USB_APDU
DEFINES += HAVE_IO_USB HAVE_L4_USBLIB IO_USB_MAX_ENDPOINTS=3 IO_HID_EP_LENGTH=64 HAVE_USB_APDU



Expand Down

0 comments on commit a6fa4f1

Please sign in to comment.