Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using nanos SDK custom fork #147

Merged
merged 1 commit into from
May 31, 2023
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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