1 unstable release
Uses old Rust 2015
0.0.1 | Apr 6, 2018 |
---|
#7 in #tablet
1MB
1.5K
SLoC
reMarkable.rs - developing for the reMarkable tablet
Provenance Note
This project originally started as a fork of (https://github.com/canselcik/libremarkable).
Everything from low latency partial updates to the eInk display to at least minimal multitouch, physical button and Wacom Digitizer input is now understood and their minimal to complete implementations can be found in this repository.
The focus of this repository is now going to be the Rust library for providing these features.
In cases where Rust implementation seems to contradict with the C implementation, the former can be taken as the source of truth as the libremarkable
C implementation was the first-pass that came to being during the exploration stage.
For further documentation see the wiki.
Build Instructions
Setting up the toolchain
In order to build libremarkable
and the examples (spy.so
and demo
), you'll need the following configuration after having installed the proper toolchain to your $PATH
. The arm-linux-gnueabihf-gcc
toolchain is used to build both implementations.
The toolchain that would be acquired from either of these sources would be able to cross-compile for the Remarkable Tablet:
AUR:
https://aur.archlinux.org/packages/arm-linux-gnueabihf-gcc/
Remarkable:
https://remarkable.engineering/deploy/sdk/poky-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-2.1.3.sh
You can then set up your Rust toolchain for cross compilation with: rustup target add --toolchain=nightly armv7-unknown-linux-gnueabihf
.
Building libremarkable and the examples
A simple Makefile wrapper is created for convenience. It exposes the following verbs:
examples
: Builds exampleslibrary
: Builds libraryall
: library + examples
Testing libremarkable and the examples on the device
The provided Makefile
assumes the device is reachable at 10.11.99.1
and that SSH Key-Based Authentication is set up for SSH so that you won't be prompted a password every time. The following actions are available:
run
: Builds and runsdemo.rs
on the device after stoppingxochitl
start-xochitl
: Stops allxochitl
anddemo
instances and startsxochitl
normallyspy-xochitl
: Buildsspy.rs
andLD_PRELOAD
s it to a new instance ofxochitl
after stopping the current instance. This allows discovery of new enums used by official programs in calls toioctl
.
Further build instructions for manual builds
If you choose to skip the Makefile
and call cargo
yourself, make sure to include --release --target=armv7-unknown-linux-gnueabihf
in your arguments like:
➜ rust-poc git:(master) ✗ cargo build --release --target=armv7-unknown-linux-gnueabihf
...
Compiling libremarkable v0.1.0 (file:///home/main/Desktop/libremarkable)
Compiling rust-poc v0.1.0 (file:///home/main/Desktop/RemarkableFramebuffer/rust-poc)
Finished dev [unoptimized + debuginfo] target(s) in 24.85 secs
The --release
argument is important as this enables optimizations and without optimizations you'll be looking at ~70% CPU utilization even when idle. With optimizations, the framework runs really light, 0% CPU utilization when idle and 1-2% at peak.
Dependencies
~7–14MB
~186K SLoC