Build Ledger Live components in an isolated Docker environment with persistence between sessions.
A GNU Make Makefile
with a number of targets is included to simplify building some of the Ledger components, but be aware that the supported component range is very limited at the moment. Truth to be told, this entire project began with the goal of building just the Ledger Live desktop application for a Raspberry Pi 4, which is an ARM64 device that did not get any official support from @LedgerHQ at the time.
At this point only ARM64 Linux is supported out of the box.
With some tinkering you should be able to make it work for other platforms. Consider submitting a pull request, if you manage to also come up with a good workflow for multiple platforms.
- Docker (tested with v18.09.1+)
- A POSIX compliant shell
Once you have the LeDoBE source code (that is available at https://github.com/antichris/ledobe), either
-
run
bin/build
-
or build an image from the included
docker
directory:docker build -t ledobe docker
You can replace
ledobe
with a tag of your choosing, just be consistent in all invocations from here on.
bin/run make
If you find that your builds are taking a flippin' forever, have a look-see at the section on jobs.
The bin/run
creates directories to persist your build data and spins up and attaches to a container. You can also do this manually:
mkdir home build
docker run -it --rm \
-v"$(readlink -f home):/mnt/ledobe" \
-v"$(readlink -f build):/build" \
ledobe
Containers run bash shell by default, which is where you would execute
make
to start building Ledger Live components. A bunch of make targets have recipes to make it way easier to build them, see the relevant section below.
Concurrent execution can speed up things tremendously. If you have sufficient memory (both physical and swap), you should increase make
jobs up to the max threads that your device can handle. On a Raspberry Pi 4B that would be 4:
make -j4
If you don't have enough memory, but you decide to run with increased jobs anyway, expect crashes as the kernel OOM killer kicks in.
Here is an article on increasing the swap size on a Raspberry Pi.
By default make
is going to build the Ledger Live desktop application, but you can specify it a different target to build, e.g.:
make coreNPM
The following sections contain a brief overview of the explicit targets currently supported by the included Makefile
.
-
The Ledger Live desktop application. (GitHub)
This is likely the one you are most interested in building. It having no official binaries for ARM64 (and ARM in general) served as the primary motivation for this project.
-
Ledger Core Library used by Ledger applications. (GitHub)
-
Ledger Core Library cross-platform C++ bindings for NodeJS. (GitHub)
The source code of this project is released under Mozilla Public License Version 2.0. See LICENSE.