I have a Librem13 laptop and so have the need (and interest) to compile the latest - not yet upstreamed - Linux work that Purism is doing to get the Librem13's trackpads to work.
The above-mentioned work seems to mostly be a Linux driver by Richard Pospeselr based on a lot of reverse engineering efforts.
If your trackpad isn't working, just do the following and ignore the other sections of this document:
git clone https://github.com/kylerankin/psmouse-byd-dkms/ &&
cd psmouse-byd-dkms/ &&
./install.sh
I first got an error about a package i needed, which was only available on Purism's self-hosted repositories:
# ensure these lines are in your /etc/apt/sources.list:
deb http://repo.pureos.net/pureosrepo pureos main
deb http://repo.pureos.net/purism stretch main
source
(and apt-get update
, obvs).
If you still want to poke around and see what you can change/fix/test, keep reading.
tl;dr understand and run step 2, below
disclaimer: I'll assume you've read Debian's "compiling a
kernel",
or not, but you've at least done: sudo apt-get install libncurses5-dev
git clone https://github.com/pospeselr/linux-purism pospeselr-linux-purism
cd pospeselr-linux-purism/data
(... because root directory is uninteresting, skip straight to data/)
$EDITOR drivers/input/mouse/byd.c
protip: 1st time, just skip to step #2
cp /boot/config-4.2.3purism-rc2 ./.config &&
make olddefconfig &&
time {
CONCURRENCY_LEVEL=4 \
make deb-pkg LOCALVERSION=-pospeselrzacsh KDEB_PKGVERSION=$(make kernelversion)-1
} 2>&1 |
tee -a ../../kernel-build$(printf '_%s' $(date --iso && date +%s)).log
# took me 52 minutes on the first clean[1] build
Warning on the above script:
- replace
LOCALVERSION=
's value with something meaningful to you... (eg:trying-jzacsh-instructions
) - increment
-1
onKDEB_PKGVERSION
each time you run this - below assumes
pwd
is[richard's repo]/data/
, per step 0
sudo dpkg -i ../[pkg of your choice].deb
# eg: linux-image-4.2.0-rc6-gnupurism-rc2-pospeselrzacsh_4.2.0-rc6-gnu-1_amd64.deb
Most of my information is copy/pasted from these three places:
- forum post: "tracking Purism's eng efforts"
- forum post: "right-click 2 finger click ontrackpad"
- irc chats: IRC chats with pospeselr himself, in #purism on freenode.net
- forum post: "opening librem13, ... distro what is pureos"
If, like me, you're only familiar with the
kerel.org's
and debian docs
than ./data/
folder is confusing. However, pospeselr has explained that he
just CDs into it and follows general "how to compile linux" instructions, which
is what this readme does. Also, the ./build.sh
script may seem simple, but for
some reason always fails for me. cd
ing into the original ./data/
dir -
as my instructions do - results in successful builds for me.
[1]: Note: make distclean
picks up changes that seem to be committed to the
repository for some reason. It's unclear to me if this is a normal
linux-libre fork pattern or not.
Maybe you could add these lines in the Troubleshooting Missing Pieces section so that one can copy/paste directly the lines being root (since by default user is not in
suoders
file andcurl
is not installed) :