Crates.io | libopenlipc-sys |
lib.rs | libopenlipc-sys |
version | 0.1.3 |
source | src |
created_at | 2021-01-03 21:37:59.423678 |
updated_at | 2022-07-31 11:59:34.065826 |
description | Wrapper around liblipc to interact with Kindle dbus-based LIPC events |
homepage | |
repository | https://github.com/DavidVentura/kindle-events-parser/tree/master/libopenlipc-sys |
max_upload_size | |
id | 331241 |
size | 2,556,337 |
Kindle liblipc wrapper in rust. Only a very small subset of functionality is exposed.
Used OpenLIPC headers and converted them with bindgen
. Docs are here.
Download the target
rustup target add armv7-unknown-linux-gnueabi
Get the toolchain
Configure it in your .cargo/config
:
[target.armv7-unknown-linux-gnueabi]
linker = "Amazon-Kindle-Cross-Toolchain/arm-kindle-linux-gnueabi/bin/arm-kindle-linux-gnueabi-cc"
Export the path to sysroot/lib before compiling:
export SYSROOT_LIB_DIR=~/git/Amazon-Kindle-Cross-Toolchain/arm-kindle-linux-gnueabi/arm-kindle-linux-gnueabi/sysroot/lib/
Copy the .so files from the repo to SYSROOT_LIB_DIR
(these I got from my kindle):
cp -vt $SYSROOT_LIB_DIR so/*
I tried to run the binaries with qemu-arm-static
but they segfault. No idea.
To pie_flavor
in the rust discord channel who explained to me the whole FFI thing.