Created
June 13, 2021 14:09
-
-
Save tecnovert/86733cd6db038612e03d2705aa9dba01 to your computer and use it in GitHub Desktop.
Compile Particl Ledger App from dev repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://ledger.readthedocs.io/en/latest/userspace/setup.html | |
cat << EOF > Dockerfile | |
from ubuntu:bionic | |
RUN apt-get update && \ | |
apt-get upgrade -y && \ | |
apt-get install -y wget bzip2 xz-utils git make libc6-dev-i386 usbutils python3-setuptools zlib1g-dev python3-pip libusb-1.0-0-dev libudev-dev gcc-multilib g++-multilib libjpeg8-dev zlib1g-dev | |
RUN mkdir /home/bolos_env && cd /home/bolos_env && \ | |
wget https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 && \ | |
tar xvf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 | |
RUN cd /home/bolos_env && \ | |
wget https://releases.llvm.org/9.0.0/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz && \ | |
tar xvf clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz && \ | |
ln -s clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04 clang-arm-fropi | |
RUN cd /home && \ | |
git clone https://github.com/LedgerHQ/nanos-secure-sdk.git && \ | |
cd /home/nanos-secure-sdk && \ | |
git checkout 2.0.0-1 | |
ENV LIBPATH="${LIBPATH}:/usr/lib/x86_64-linux-gnu/" \ | |
BOLOS_SDK=/home/nanos-secure-sdk \ | |
COIN=particl | |
# Or COIN=particl_testnet | |
RUN ln -s /usr/bin/python3 /usr/bin/python && \ | |
cd /home && \ | |
git clone https://github.com/ledgerhq/blue-loader-python && \ | |
cd /home/blue-loader-python && \ | |
pip3 install pillow==3.4.0 && \ | |
pip3 install Cython && \ | |
pip3 install websocket_client python-u2flib-host ecpy future pycryptodomex protobuf && \ | |
python3 setup.py install | |
RUN cd /home && \ | |
git clone https://github.com/tecnovert/ledger-app-particl.git ledger-app-particl_tv | |
EOF | |
docker build -t particl_ledger_1.2.14 . | |
docker run -it --privileged -v /dev/bus/usb:/dev/bus/usb particl_ledger_1.2.14 /bin/bash | |
export BOLOS_SDK=/home/nanos-secure-sdk COIN=particl | |
export CLANGPATH=/home/bolos_env/clang-arm-fropi/bin/ | |
export GCCPATH=/home/bolos_env/gcc-arm-none-eabi-10-2020-q4-major/bin/ | |
cd /home/ledger-app-particl_tv | |
git pull | |
make clean | |
make -B | |
Should end with: | |
[LINK] bin/app.elf | |
Connect Ledger Nano S and input pin no. | |
lsusb | |
... ID 2c97:1011 | |
Remove old app if installed | |
make delete | |
make load | |
Application full hash : 086eb399b3164134a688d3943a1abba995e8d11ac1c7d582a2206a28a56ef6f5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment