Fight with mobile linux for a bit
This commit is contained in:
36
README.md
36
README.md
@@ -95,6 +95,42 @@ This creates a 32-bit executable at `target/i686-unknown-linux-gnu/release/telep
|
||||
|
||||
I don't have a 32-bit machine to test this on, but happy to take fixes for it.
|
||||
|
||||
### Cross-compiling amd64 -> aarch64
|
||||
|
||||
This is a handy thing to do for linux phones, most of which use telepathy. Rust
|
||||
is quite heavy to compile - it's a pain even on a pinebook pro, which is the
|
||||
same architecture:
|
||||
|
||||
```
|
||||
$ dpkg --print-architecture
|
||||
amd64
|
||||
# dpkg --add-architecture arm64
|
||||
$ dpkg --print-foreign-architectures
|
||||
arm64
|
||||
# apt update
|
||||
# apt install libdbus-1-dev:arm64 libssl-dev:arm64 gcc-aarch64-linux-gnu
|
||||
$ rustup target install aarch64-unknown-linux-gnu
|
||||
$ RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc" PKG_CONFIG_ALLOW_CROSS=1 cargo build --target=aarch64-unknown-linux-gnu --release
|
||||
```
|
||||
|
||||
We have to specify the linker because of [this bug](https://github.com/rust-lang/cargo/issues/4133).
|
||||
|
||||
Note that this doesn't create a static binary, so you'll need to match versions
|
||||
for the shared libraries that are on the phone. In theory we can create static
|
||||
binaries with musl, but openssl makes it hard. If you get it working, tell me
|
||||
how!
|
||||
|
||||
UBTouch uses an ancient version of OpenSSL: 1.0.2g. KDE Neon does much better
|
||||
with 1.1.1, so is easier to compile against. PostmarketOS is probably easiest of
|
||||
all.
|
||||
|
||||
An alternative approach to using multiarch (as above) is to use `debootstrap`
|
||||
(or a similar tool) to get a sysroot containing libraries of all the right
|
||||
versions. E.g. You can then add `-C link-args=--sysroot=/path/to/sysroot` to
|
||||
`RUSTFLAGS` to use those libraries. Ufff. I've not got this working yet either.
|
||||
|
||||
...I'm compiling it directly on the phone. Not ideal. Add swap.
|
||||
|
||||
### Installing
|
||||
|
||||
There is a `share/` directory in this project that contains a bunch of files.
|
||||
|
@@ -5,7 +5,6 @@ BusName=org.freedesktop.Telepathy.ConnectionManager.padfoot
|
||||
ObjectPath=/org/freedesktop/Telepathy/ConnectionManager/padfoot
|
||||
|
||||
[Protocol delta]
|
||||
Interfaces=org.freedesktop.Telepathy.Protocol.Interface.Presence;
|
||||
param-account=s required
|
||||
param-password=s required secret
|
||||
status-available=2 settable
|
||||
|
Reference in New Issue
Block a user