#events #kindle #wrapper #header #target #lipc #liblipc

bin+lib libopenlipc-sys

Wrapper around liblipc to interact with Kindle dbus-based LIPC events

4 releases

0.1.3 Jul 31, 2022
0.1.2 Jan 3, 2021
0.1.1 Jan 3, 2021
0.1.0 Jan 3, 2021

#668 in Text processing

LGPL-3.0

2.5MB
1K SLoC

Contains (ELF lib, 1MB) so/libglib-2.0.so.0, (ELF lib, 1MB) so/libglib-2.0.so, (ELF lib, 170KB) so/libdbus-1.so, (ELF exe/lib, 170KB) so/libdbus-1.so.3, (ELF lib, 68KB) so/liblipc.so, (ELF lib, 68KB) so/liblipc.so.0 and 2 more.

LibOpenLIPC-sys

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/*

Misc

I tried to run the binaries with qemu-arm-static but they segfault. No idea.

Thanks

To pie_flavor in the rust discord channel who explained to me the whole FFI thing.

Dependencies