2017-03-05

For about six months I’ve been using a Raspberry Pi 3 as my desktop computer at home.

The overall experience is fine, but I had to do a few adjustments.

First was to use KeePass, the second to compile gcc for cross-compilation (ie use buildroot).

KeePass

I’m using KeePass + KeeFox to maintain my passwords on the various websites (and avoid reusing the same everywhere).

For this to work on the Raspberry Pi, one need to use mono from Xamarin:

The install instruction comes from mono-project and the initial pointer was found on raspberrypi forums, stackoverflow and Benny Michielsen’s blog.

And for some plugin to work I think I had to apt-get install mono-complete.

Compiling gcc

Using the Raspberry Pi 3, I recovered an old project based on buildroot for the raspberry pi 2. And just for building the tool-chain I had a few issues.

First the compilation would stop during mnp compilation:

I Googled the error and found this post on the Raspberry Pi forum not really helpful…

But I finally found an explanation on Jan Hrach’s page on the subject.

The raspbian distribution is still optimized for the first Raspberry Pi so basically the compiler is limited to the old raspberypi instructions. While I was compiling gcc for a Raspberry Pi 2 so needed the extra ones.

The proposed solution is to basically update raspbian to debian proper.

While this is a neat idea, I still wanted to get some raspbian specific packages (like the kernel) but wanted to be sure that everything else comes from debian. So I did some apt pinning.

First I experienced that pinning is not sufficient so when updating source.list with plain debian Jessie, make sure to add theses lines before the raspbian lines:

Then run the following to get the debian gpg keys, but don’t yet upgrade your system:

Now, let’s add the pinning.

First if you were using APT::Default-Release "stable"; in your apt.conf (as I did) remove it. It does not mix well with fine grained pinning we will then implement.

Then, fill your /etc/apt/preferences file with the following:

Note: You can use apt-cache policy (no parameter) to debug pinning.

The pinning above is mainly based on the origin field of the repositories (o=)

Finally you can upgrade your system:

Note: Removing the cache ensure we download the packages from debian as raspbian is using the exact same naming but we now they are not compiled with a real armhf tool-chain.

Second issue with gcc

The build stopped on recipe for target 's-attrtab' failed. There are many references on the web, that one was easy, it ‘just’ need more memory, so I added some swap on the external SSD I was already using to work on buildroot.

Conclusion

That’s it for today, not bad considering my last post was more that 3 years ago…

Show more