diff --git a/CHANGELOG.md b/CHANGELOG.md index 4808ae8f..816c326b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/docker/ledger/Dockerfile b/docker/ledger/Dockerfile index c91365fd..8cfe2f36 100644 --- a/docker/ledger/Dockerfile +++ b/docker/ledger/Dockerfile @@ -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 && \ @@ -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/ diff --git a/docker/ledger/os.h.patch b/docker/ledger/os.h.patch deleted file mode 100644 index dfa5e092..00000000 --- a/docker/ledger/os.h.patch +++ /dev/null @@ -1,5 +0,0 @@ -193c193,194 -< #define IO_APDU_BUFFER_SIZE (5 + 255) ---- -> //#define IO_APDU_BUFFER_SIZE (5 + 255) -> #define IO_APDU_BUFFER_SIZE (5 + 80) diff --git a/ledger/src/signer/Makefile b/ledger/src/signer/Makefile index 481b3e1b..ba7ce810 100755 --- a/ledger/src/signer/Makefile +++ b/ledger/src/signer/Makefile @@ -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 diff --git a/ledger/src/ui/Makefile b/ledger/src/ui/Makefile index 46717c3e..68d258b2 100755 --- a/ledger/src/ui/Makefile +++ b/ledger/src/ui/Makefile @@ -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