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

Golang and Oracle

Which library To this day, the most up to date library seems to be rana/ora How to install (linux & macosx) Download Oracle Instant Client for linux x64: both packages Basic and SDK Unzip each of them in the same folder /opt/oracle mkdir -p /opt/oracle cd /opt/oracle unzip ~/Downloads/instantclient-basiclite-linux.x64-12.2.0.1.0.zip unzip ~/Downloads/instantclient-sdk-linux.x64-12.2.0.1.0.zip cd /opt/oracle/instantclient_12_1 Add the necessary env variables and paths: # Oracle export LD_LIBRARY_PATH=/opt/oracle/instantclient_12_2:$LD_LIBRARY_PATH export PKG_CONFIG_PATH=/opt/oracle export ORACLE_HOME=$LD_LIBRARY_PATH copy from the go package ....

December 27, 2016 · 1 min · Me