This step is getting the plugin to compile. But first, we need to set up the working environment.
Base-path
Let’s now create a new directory to contain everything that is plugin related.
In a terminal:
mkdir plugin_dev
cd plugin_dev
Clone repositories
In the plugin_dev/
folder, clone the Ethereum-app:
git clone https://github.com/LedgerHQ/app-ethereum
cd app-ethereum
git checkout master
And the Plugin-tools (cd
back to the plugin_dev/
first):
cd ..
git clone https://github.com/LedgerHQ/plugin-tools
The plugin-tools repository contains tools for your plugin development,
Connect to the container
We have created docker images to start coding quickly rather than installing all the dependencies on your computer from scratch.
You need to install these if you don’t already have them:
- Docker: instructions here
- Docker-compose: instructions here
Important
Make sure you have correctly installed the tools above.
There is no need to launch Docker because docker-compose
(in the plugin-tools
repository) does all the magic.
In the same terminal, simply type:
cd plugin-tools
./start.sh
Tip
If you get this error:
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?
This means you either:
- Failed to install docker
.
- Need to add sudo
in front of sudo ./start.sh
You are now connected to the container. The plugin_dev
directory you see in the container is the one created in the steps above. (They are shared using volume
in docker-compose.)
At the prompt, ls
gives
app-ethereum plugin-tools
Compile the Ethereum app
Still in the terminal, compile the Ethereum app:
In the first compilation, you may come across:
- messages such as
BOLOS_ENV is not set: falling back to CLANGPATH and GCCPATH
. These are expected.
continue connecting
messages: type yes
.
- a few
gcc
or clang
warnings about the C code. This is (unfortunately) expected.
If everything goes well, you should end with:
Congratulations, you have successfully compiled the Ethereum app!
Now you are ready to walk through the Boilerplate plugin example.