Tendermint/Antlia Apps for Ledger Nano S

Get source

Apart from cloning, be sure you get all the sub-modules, by calling:
1
git submodule update --init --recursive
Copied!

Dependencies

Ledger Nano S

This project requires ledger firmware 1.5.5
The current repository keeps track of Ledger's SDK but it is possible to override it by changing the git sub-module.

CircleCI CLI

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:
https://circleci.com/docs/2.0/local-cli/#installing-the-circleci-local-cli-on-macos-and-linux-distros

Docker CE

CircleCI CLI should have instructed you to install Docker. Just in case, you can find instructions here too:
https://docs.docker.com/install/

Ubuntu Dependencies

Install the following packages:
1
sudo apt-get update && sudo apt-get -y install build-essential git sudo wget cmake libssl-dev libgmp-dev autoconf libtool python-pip
Copied!

OSX Dependencies

It is recommended that you install brew and xcode.
Additionally you will need to:
1
brew install libusb
Copied!

Ledger Python Tools

Ledger firmware 1.5.5 requires ledgerblue >= 0.1.21.
In most cases, make deps should be able to install all dependencies:
1
make deps
Copied!

Building

There are different local builds:
  • Generic C++ code and run unit tests
  • BOLOS firmware

Generic C++ Code / Tests

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

1
cmake . && make
Copied!
In Case Above Command didn't work, use the command given below. It will compile local code but it will not try to cross compile the apps. Typically this is more efficient too.
1
cmake -DDISABLE_DOCKER_BUILDS=ON . && make
Copied!

Run unit tests

1
export GTEST_ANTLIA=1 && ctest -VV
Copied!

BOLOS / Ledger firmware

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.
1
make # Builds both Antlia and Tendermint apps
Copied!

Upload the app to the device

The following command will upload the application to the ledger. Warning: The application will be deleted before uploading.
1
make load_antlia # Loads Antlias app (for users)
2
make load_tendermint # Loads Tendermint app (for validators)
Copied!

Continuous Integration (Debugging CI Issues)

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
1
circleci build
Copied!
To build BOLOS firmware
1
circleci build --job build_ledger_user
2
circleci build --job build_ledger_val
Copied!
Last modified 1yr ago