From 78479de06572d4184640cbe8139d7560b60cb001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matt=C3=A9o=20Delabre?= Date: Sun, 29 Aug 2021 15:21:48 +0200 Subject: [PATCH] Update build guide to use the Toltec toolchain --- README.md | 4 ++-- docs/build.md | 56 ++++++++++++++++++++------------------------------- 2 files changed, 24 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 524eab7..a2cb5d7 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [VNC](https://en.wikipedia.org/wiki/Virtual_Network_Computing) client for the [reMarkable tablet](https://remarkable.com) allowing you to use the device as a second screen.\ (Previously called _rmvncclient_.) -Illustration of a reMarkable table connected to a computer, showing half of a terminal window through its E-Ink screen +Illustration of a reMarkable tablet connected to a computer, showing half of a terminal window through its E-Ink screen ## Disclaimer @@ -33,7 +33,7 @@ After installing Toltec, simply run `opkg install vnsee` and you should be all s To remove VNSee, run `opkg remove vnsee`. You can also install this program manually. -Download the latest build from the [releases page](https://github.com/matteodelabre/vnsee/releases) (or build the software yourself by following the [build guide](docs/build.md)), then copy the `vnsee` and `vnsee-gui` executables to the tablet [using SSH](https://remarkablewiki.com/tech/ssh). +Download the latest build from the [releases page](https://github.com/matteodelabre/vnsee/releases) (or build the binary yourself by following the [build guide](docs/build.md)), then copy the `vnsee` and `vnsee-gui` executables to the tablet [using SSH](https://remarkablewiki.com/tech/ssh). If you’re using a reMarkable 2, you’ll need to setup the [remarkable2-framebuffer](https://github.com/ddvk/remarkable2-framebuffer) before proceeding. To run `vnsee-gui`, you’ll also need to install [simple](https://rmkit.dev/apps/sas) and, optionally, [nmap](https://nmap.org/book/install.html). diff --git a/docs/build.md b/docs/build.md index f4b3c8e..85afbe7 100644 --- a/docs/build.md +++ b/docs/build.md @@ -1,56 +1,44 @@ # Build guide -**This build guide assumes you’re using a Linux system.** +_This build guide uses the [Toltec Docker toolchain](https://github.com/toltec-dev/toolchain), which requires a working Docker install._ -Download the [reMarkable toolchain](https://web.archive.org/web/20201129102245/https://remarkable.engineering/oecore-x86_64-cortexa9hf-neon-toolchain-zero-gravitas-1.8-23.9.2019.sh), install it and source it. - -```sh -curl https://web.archive.org/web/20201129102245/https://remarkable.engineering/oecore-x86_64-cortexa9hf-neon-toolchain-zero-gravitas-1.8-23.9.2019.sh -o install-toolchain.sh -chmod u+x install-toolchain.sh -./install-toolchain.sh -source /usr/local/oecore-x86_64/environment-setup-cortexa9hf-neon-oe-linux-gnueabi -``` - -Download the `OEToolchainConfig.cmake` file that is missing from the toolchain and install it in `/sysroots/x86_64-oesdk-linux/usr/share/cmake` directory of the toolchain. - -```sh -curl https://raw.githubusercontent.com/openembedded/openembedded-core/master/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake -o OEToolchainConfig.cmake -sudo mkdir -p /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/share/cmake -sudo mv OEToolchainConfig.cmake /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/share/cmake -``` - -Clone this repository with its dependencies and change directory into it. +Start by cloning this repository with its dependencies, then change directory into it. ```sh git clone --recursive https://github.com/matteodelabre/vnsee cd vnsee ``` -Create a directory for build artifacts. +Use the following command to spin up a container and run a build in the `build/Release` subdirectory. ```sh -mkdir -p build/Release -cd build/Release +docker container run -it --rm \ + --mount type=bind,src="$(realpath .)",dst=/src \ + ghcr.io/toltec-dev/base:v2.1 \ + bash -c "cmake \ + -DCMAKE_TOOLCHAIN_FILE=/usr/share/cmake/arm-linux-gnueabihf.cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -S /src -B /src/build/Release \ + && cmake --build /src/build/Release" ``` -Run CMake configuration. +This command will first run the CMake configuration command, which will automatically locate the appropriate compiler and determine flags. +This step should end with the following lines: -```sh -cmake ../.. -DCMAKE_BUILD_TYPE=Release ``` - -The output should not contain any error and should end with those lines: - -```txt +... -- Configuring done -- Generating done --- Build files have been written to: …/vnsee/build/Release +-- Build files have been written to: /src/build/Release ``` -Run build. +Right after the configuration step has finished, the command will start the actual build. +You should see CMake’s colorful output logging the files it compiles, with lines similar to this one: -```sh -make +``` +... +[ 16%] Building CXX object CMakeFiles/vnsee.dir/src/main.cpp.o +... ``` -You now have a `vnsee` executable ready to be executed on your reMarkable! +When this step completes, you should have a working `vnsee` executable in the `build/Release` subdirectory, ready to be executed on your reMarkable!