diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2022-09-06 17:18:29 +0200 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2023-02-17 17:23:42 +0100 |
commit | d7e9f738d7709c04c7c119c3572cfd7a09eb33b6 (patch) | |
tree | 3146c5ef5c685174532544e0d283265b499fb780 | |
parent | aedf4ffd7d16721b522df2d20b1f41f8574c3940 (diff) | |
download | hardware_replicant_libsamsung-ipc-d7e9f738d7709c04c7c119c3572cfd7a09eb33b6.tar.gz hardware_replicant_libsamsung-ipc-d7e9f738d7709c04c7c119c3572cfd7a09eb33b6.tar.bz2 hardware_replicant_libsamsung-ipc-d7e9f738d7709c04c7c119c3572cfd7a09eb33b6.zip |
[WIP] [DO NOT MERGE YET] README: Add tutorial for Replicant 11patches-todo/README-guix-static-builds-for-replicant-11
This doesn't work on Replicant 6.0 due to kernel headers mismatch:
Replicant 6.0 has a 3.0 kernel and Guix has more recent kernel
headers:
$ sudo adb shell /storage/ipc-modem start --debug --call=<local-number>
FATAL: kernel too old
Long time ago I tried to make it work by downgrading the kernel
headers, but Guix didn't build. It also requires a full rebuild of
everything.
For Replicant 11, binaries build with Guix work, but here the patches
supporting the Replicant 11 modem driver are not merged in the
libsamsung-ipc main branch, so we can't add the information it to the
README yet.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r-- | README | 36 |
1 files changed, 36 insertions, 0 deletions
@@ -19,3 +19,39 @@ Configure automatically searches for all required components and packages. To compile and install run: make && make install + +Running quick tests on Replicant 6.0 with Guix +============================================== +For testing libsamsung-ipc tools on a device, you can use Guix to +build fully static version of tools on an existing Android or +GNU/Linux distribution. + +Here's an example for Replicant 6.0. It assumes that you already have +adb and root through adb setup. + +First you need to stop the RIL daemon because ipc-modem currently +doesn't support running in parallel of the RIL or other programs that +talk to the modem: +$ sudo adb root +$ sudo adb shell stop ril-daemon + +Then we can tell Guix to build everything for us. +$ echo '(list libsamsung-ipc-static)' >> scripts/guix.scm +$ guix build --target=arm-linux-gnueabihf --file=scripts/guix.scm + +Note that adding '(list libsamsung-ipc-static)' scripts/guix.scm is +not only used to shorten the build time, but it is also necessary +because the Android packages in that file don't cross compile due to +some limitations in Guix. + +If the build succeeds, it will print the path where you can find the +result of the build, it will look like that: +/gnu/store/<some hash>-libsamsung-ipc-static-0.0-HEAD.<some hash> + +You can then copy the binary on the phone and test libsamsung-ipc: +$ sudo adb push \ + /gnu/store/<hash>-libsamsung-ipc-static-0.0-HEAD.<hash>/bin/ipc-modem \ + /storage/ + +And run it: +$ sudo adb shell /storage/ipc-modem start --debug --call=<local number to call>
\ No newline at end of file |