#Tendermint/Cosmos Apps for Ledger Nano S
Apart from cloning, be sure you get all the submodules, by calling:
git submodule update --init --recursive
This project requires ledger firmware 1.5.5
The current repository keeps track of Ledger's SDK but it is posible to override it by changing the git submodule.
CircleCI allows compiling BOLOS
firmware both in Linux and MacOS. The CLI will download a docker container ready to run.
To install, follow the instructions here:
CircleCI CLI should have instructed you to install Docker. Just in case, you can find instructions here too:
https://docs.docker.com/install/
Install the following packages:
sudo apt update && apt-get -y install build-essential git sudo wget cmake libssl-dev libgmp-dev autoconf libtool
It is recommended that you install brew and xcode.
Additionally you will need to:
brew install libusb
Ledger firmware 1.5.5 requires ledgerblue >= 0.1.21.
In most cases, make deps
should be able to install all dependencies:
make deps
There are different local builds:
- Generic C++ code and run unit tests
- BOLOS firmware
This is useful when you want to make changes to libraries, run unit tests, etc. It will build all common libraries and unit tests.
Compile
cmake . && make
Run unit tests
export GTEST_COLOR=1 && ctest -VV
In order to keep builds reproducible, a Makefile is provided.
The Makefile will build the firmware in a docker container and leave the binary in the correct directory.
Build
The following command will build the app firmware inside a container. All output will be available to the host.
make # Builds both Cosmos and Tendermint apps
Upload the app to the device The following command will upload the application to the ledger. Warning: The application will be deleted before uploading.
make load_cosmos # Loads Cosmos app (for users)
make load_tendermint # Loads Tendermint app (for validators)
This will build in a docker image identical to what CircleCI uses. This provides a clean, reproducible environment. It also can be helpful to debug CI issues.
To build in ubuntu 16.04 and run C++ unit tests
circleci build
To build BOLOS firmware
circleci build --job build_ledger_user
circleci build --job build_ledger_val