Ubuntu Server Kernel 3.18 on Radxa Rock Pro

If you own a Radxa Rock Pro you have surely had enough trouble with the antiquated 3.0.36 kernel and the many hacked drivers to get it working somehow. Thanks to the work of Heiko Stübner and other kernel developers finally current kernels can be used on this great ARM development board. Keep in mind that video and audio drivers are not mainlined yet. Here is a howto:

Now determine the disk number of your microsd card, unmount the disk and flash the image with dd. Here are the instructions from an OS X perspective:

Make sure you use /dev/rdiskX as raw access is up to 20x faster. After unmounting, you can safely remove the microsd card and put it in your Radxa Rock Pro. You can login with rock/rock:

Next, expand the filesystem with this shell script or manually:


When the system is back up again, the filesystem has to be resized to the new partition sizes:

For me that didn’t work out because there were permission issues:

resize2fs 1.42.9 (4-Feb-2014)
Filesystem at /dev/mmcblk0p1 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 2
resize2fs: Permission denied to resize filesystem

To fix this on OS X install e2fsprogs to get resize2fs:

to avoid replacing some OS X provided files they are not linked into /usr/local.

Unmount the disk:

Check the partition for errors and resize:

For more details on the process see this guide:

First update your locales unless you want lots of locale warnings:

remove apache2 and mysql if you don’t need them:

then upgrade your system and install some frequently used tools:

Now Add a new user:

Log on as the new user an delete the old one:

To easily access all your computers you may want to authenticate yourself with certificates.

On a Mac, first install the missing ssh-copy-id:

Then you can copy your public key to the ssh hosts you frequently need by:

Now configure you ethernet in a way that your MAC won’t change with every restart:

The content should look like:

auto eth0
allow-hotplug eth0
iface eth0 inet dhcp
hwaddress ether 01:02:03:04:05:06

Make sure the hwadress is valid and unique.

To get wlan running:

and add:

ssid="your ssid name"
psk="your wireless password"

If you have several Radxa Rocks, you may want to change their hostnames:

Set up the correct time zone and get a ntp update:

this is important because otherwise the SSL certificates won’t work.

To set up git:

and copy the contents into the ssh keys section of the github preferences.

To configure zsh:

To get AFP filesharing:

Additional folders can be shared by editing AppleVolumes.default:

and adding a line like

/media/microsd/media “Media”

and restarting the netatalk service with:

Compile missing kernel modules for Radxa Rock Pro

If you want to use an Arduino with your Radxa Rock Pro Kernel 3.18 you will need to build some kernel modules by hand. Here is a short howto. Strangely this didn’t work directly on the Radxa Rock Pro so I had to cross compile on a Ubuntu 14.10 system:

Navigate to Device Drivers -> USB Support -> USB Serial Converter Support -> and select USB FTDI Single Port Serial Driver with „m“ and save to .config

Transfer the kernel model to your radxa with a method of your choice and and test them:

If everything works you can install the modules permanently:

then you can load the kernel modules with:

and/or add them permanently to /etc/modules:


You may get an error like:

with dmesg you see:

or you can get more information about the module with:

filename: /home/phoenix/ftdi_sio.ko
license: GPL
description: USB FTDI Serial Converters Driver
author: Greg Kroah-Hartman <@.>, Bill Ryder <@.>, Kuba Ober <@.>, Andreas Mohr, Johan Hovold <@.>
alias: usb:v0403pD012d*dc*dsc*dp*ic*isc*ip*in*
depends: usbserial
vermagic: 3.19.0-rc5+ SMP mod_unload ARMv7 p2v8
parm: ndi_latency_timer:NDI device latency timer override (int)

In my case you can see the problem was that the default kernel is only:

So I should have gotten an older source…

Persistent names for usb-serial devices

Many usb-serial devices appear as /dev/ttyUSBX or /dev/ttyACMX in the system, the link changing every time several of these devices are plugged in. This is unsatisfying if you want to access these devices from a script. One solution is to use a UDEV ruleset to make a symbolic link for each device. Here is how to do it.

Determine vendor and product id of the usb-serial device:

Determine serial number of the device:

Create a UDEV ruleset that makes a symbolic link for each device:

sudo nano /etc/udev/rules.d/99-usb-serial.rules

and add and adapt to your needs:

SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="DAE0011W", SYMLINK+="1wire"

after replugging the device, there will be a symbolic link ‚1wire‘ be created for your device.

Time Capsule Disk Upgrade

My Apple Time Capsule 1TB MC343Z/A 3rd Gen Model A1355 Firmware 7.6.4 has gotten too small for all the backups and files, so it was time for an upgrade. As Time Capsules are still terribly expensive in the larger versions, I went for the DIY upgrade. Judging from some forum posts, the Western Digital RED line for NAS is compatible and suitable. In the end I settled for the WD40EFRX. I went with this rough guide although there is a much more detailed iFixit guide available. The most complicated part is getting the rubber from the base (I ripped mine a little so take your time), the rest is just trivially done in 10 minutes. After everything is done, AirPort Utility will alert you with a warning that a drive needs a repair. Under drives select the partition and select delete. It will now reformat your drive and you are good to go.

Lautsprecher in Fhem einbinden

Hier ein kleines Tutorial wie ein Lautsprecher an einem Radaa Rock oder Raspberrypi in fhem eingebunden werden kann. Zuerst die alsa und Utilities installieren:

In der fhem.cfg einen Lautsprecherdummy und ein Notify darauf anlegen:

In der 99_myUtils.pm eine entsprechende Funktion anlegen:

Im fhem root ein Verzeichnis „media“ erstellen, gewünschte Wave Dateien einfügen und fhem zuordnen:

Eine Wave-Datei kann nun folgendermaßen abgespielt werden:

X11 forwarding over SSH

X11 forwarding allows the graphical interfaces of X11 application running on a remote Linux server to be displayed on your local machine. This can be very helpful for graphical linux tools such as gparted.

On the remote machine first install xauth:

and make sure X11 forwarding is enabled in the sshd_config:

If it is off:

ensure that is enabled:

X11Forwarding yes

and restart the sshd:

On a OS X machine you first have to install XQuartz.
Now you should be able to ssh into your machine and see its X11 display:

An error you may encounter is that the .Xauthority does not exist yet:

which can be mitigated simply by:

on the remote machine.