Skip to content

Latest commit

 

History

History
81 lines (68 loc) · 2.81 KB

Install.md

File metadata and controls

81 lines (68 loc) · 2.81 KB

Install Vite Ledger App into ledger-nano-s

Prerequisites

  • ledger-nano-s with firmwire version >= v2.1.0, refer to Update Firmware if your ledger doesn`t meet the requirement.

Build the application

  1. Create a virtualVM(ubuntu-20.04.4-desktop) on VirtualBox with Bridging network rather than NAT.
  2. Login to the VM, install git && docker
sudo apt install git docker.io
  1. Make app.elf, refer to Ledger Official Document
git clone https://github.com/LedgerHQ/ledger-app-builder && cd ledger-app-builder
sudo docker build -t ledger-app-builder:latest .
cd ../ && git clone https://github.com/vitelabs/ledger-app-vite.git && cd ledger-app-vite
sudo docker run --rm -ti -v "$(realpath .):/app" ledger-app-builder:latest
make
  1. The build is successfull if you see app.elf file in bin/app.elf in the docker container
  2. Exit the docker container.

Load the application

  • Define the udev rules
wget -q -O - https://raw.githubusercontent.com/LedgerHQ/udev-rules/master/add_udev_rules.sh | sudo bash

Load the application from inside the container

  1. Run docker with --privileged
cd ~/ledger-app-vite
sudo docker run --rm -ti -v "/dev/bus/usb:/dev/bus/usb" -v "$(realpath .):/app"
--privileged ledger-app-builder:latest
  1. Plug and unlock the Nano S
  2. In the container use make load to load the app to Ledger Nano S

Alternative: load the application with ledgerblue

  1. Load the application with ledgerblue, refer to Ledger Official Document
// python2.7
sudo apt install libudev-dev libusb-1.0-0-dev virtualenv python-dev

// python3
sudo apt install libudev-dev libusb-1.0-0-dev virtualenv
  1. Ledgerblue package Outside of the application folder of ledger-app-vite, install the ledgerblue package in a virtual environment
cd ~/ && virtualenv ledger
source ledger/bin/activate
pip install ledgerblue
  1. Load and delete
git clone https://github.com/LedgerHQ/nanos-secure-sdk.git nanos-secure-sdk
export BOLOS_SDK=~/nanos-secure-sdk
  1. Plug and unlock the Nano S
  2. activate the virtual environment
source ledger/bin/activate
  1. Use make load to load the app to the Nano S
cd ledger-app-vite && make load

Tips

  • If make load failed and prompt the err "Exception: No dongle found", you are recommended to install the Ledger Live in VirtualBox VM and plug and unlock the Nano S for some initialization.
cd ~/ && wget -c https://download.live.ledger.com/ledger-live-desktop-2.45.1-linux-x86_64.AppImage
./ledger-live-desktop-2.45.1-linux-x86_64.AppImage --no-sandox