cross compiling rust from linux to rpi0/alpine

If you read my previous posts, you should now have a raspberry-pi running alpine and docker. Resources are pretty limited on rpi0, so we are going to deploy programs using rust. Note: golang could have fit in there as well (and ofc all C and close to machine languages). Compiling from NOT a rpi0 Obviously, you don’t want to compile from a raspberry pi zero, unless you have all the time in the world and love waiting....

April 20, 2019 · 2 min · Me

installing docker on alpine linux

Prerequisites One raspberry pi zero W One sd card Enable all cgroups On you local linux, mount the partition containing alpine files. In the cmdline.txt, add the following: echo -ne " cgroup_enable=memory cgroup_enable=cpuset swapaccount=1" >> /run/media/youruser/xxx/cmdline.txt Docker needs all cgroups enabled, so this will do the trick On you rpi0 As simple as: sudo apk add docker sudo rc-update add docker boot sudo rc-service docker start To make sure your docker env doesn’t go in memory (512MB RAM won’t bring you far…), set it on mmcblk0p3 by editing /etc/docker/daemon....

April 16, 2019 · 1 min · Me

installing alpine linux on rpi0

Prerequisites One raspberry pi zero W One sd card Download Alpine linux We’ll use the almost latest version: 3.9.2 (3.9.3 would not work for some reason) The one to use for RPI is the raspberry pi (surprising :P) armhf. On your local computer (assuming you re using linux) Mount the sdcard (should be automated, if not, you probably know how to do that and you probably don’t need that tutorial)...

April 11, 2019 · 5 min · Me