💾 Archived View for calcuode.com › gemlog › 2021-06-21_gmni-kobo.gmi captured on 2023-01-29 at 02:30:00. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

-=-=-=-=-=-=-

Running gmni on a Kobo e-reader

I haven't got a full Gemini browser available on the e-paper display, but I have managed to cross compile gmni for my Kobo and use it from a shell script.

gmni

Cross compilation

These steps are for the Kobo Glo HD, but should be adaptable to other Kobo devices. I found that I needed a GNU system, but you might be able to do it without.

Get the toolchain

Download the toolchain from Linaro. You probably want gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf.tar.xz. Doing this from a terminal is a bit tricky but you can use lynx.

https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/arm-linux-gnueabihf/

Extract the archive and add the toolchain's bin directory to your PATH. Check it works with:

$ which arm-linux-gnueabihf-gcc

Compile BearSSL

gmni uses the BearSSL TLS library. Download the BearSSL source and extract it.

https://www.bearssl.org/bearssl-0.6.tar.gz

Download this config file to BearSSL's conf directory.

kobo-glo-hd.mk

Compile the BearSSL library:

$ make CONF=kobo-glo-hd

Compile gmni

First you need to put the BearSSL header files and libbearssl.a in the toolchain directory:

$ mkdir -p $toolchain/usr/include
$ mkdir -p $toolchain/usr/lib
$ cp bearssl-0.6/kobo-glo-hd/libbearssl.a $toolchain/usr/lib
$ cp bearssl-0.6/inc/* $toolchain/usr/include

Get the gmni source:

$ git https://git.sr.ht/~sircmpwn/gmni

Apply this patch:

gmni-kobo.patch

Use this shell script to build gmni, setting toolchain_path to the correct value:

build-gmni-for-kobo-glo-hd.sh

Copy the resulting binaries onto the Kobo.

Use gmni

Currently gmni doesn't work with HOME=/ (which it is for the Kobo's root user), so before using it remember to set it to /root or something. I use KOReader which has dropbear built in so I tested over SSH to start with. KOReader also lets you run shell scripts, so I wrote one which downloads posts from my gmisub aggregate:

kobo-download-gmisub.sh

---------------------------

Callum Brown, 2021-06-21

Licensed under CC BY-SA 4.0

Gemlog index