sourcediver.org

about software and freediving

Running Arch Linux ARM With Xen on Cubieboard 2

Cubieboard

I recently bought a Cubieboard 2 to do some benchmarking for my bachelor’s thesis. I wanted to benchmark the software ethernet switching (also known as bridging) capabilities of a mid-range ARM platform. Since Xen 4.4 has full support for the Allwinner A20/A30 processors, the cubieboard was an obvious choice. There are not many instructions out there how to install Xen and Linux on the Cubieboard 2. One of the best is Running Xen on the Cubieboard 2, where I borrowed a lot of instructions. But since I am a big fan of Arch Linux ARM, I am going to demonstrate here how to get Arch Linux running as your dom0 and domU.

Alpengluehn 2

Alpengluehn 2

After finishing some projects using the original Alpengluehn LED controller, I came to the conclusion that the design was too complex and needed too much manual work to build. So I decided to design a new version of the controller since the overall performance of the design was quite good.

Using Subsurface for Freediving

Most freedivers I know analyse their dives only using the display of their dive computers or transfer the profiles using paper and pen. Subsurface is superior to all existing solutions out there I know of. This post will guide you how to use some features of Subsurface that are especially useful for freedivers.

Subsurface is a free, open source software solution (no cost at all) for divers of all kinds (Recreational, Tec-Diving, Teaching, Freediving…).
It runs on Windows, OS X and Linux and supports pretty much any dive computer out there.

In this post, I will use Subsurface version 4.0.3, which you can download (for free) from http://subsurface.hohndel.org/

Fixing Mosh on Arch Linux

I have been using mosh for quite some time, especially when using high latency/packet loss connections.

Error

However, mosh stopped working some time ago. The error message on the remote machine was something like this:

1
2
3
4
5
6
7
8
9
10
11
12
➜  ~ mosh-server new -v 

MOSH CONNECT 60001 VTFq5VGSoBtFl0DibKMrBw

mosh-server (mosh 1.2.4)
Copyright 2012 Keith Winstein <mosh-devel@mit.edu>
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

[mosh-server detached, pid = 6204]
forkpty: Operation not permitted

Fix

Notice the error message on the bottom. After some debugging I found out that the user needs to be in the tty group to perform forkpty() on Arch Linux. After executing sudo gpasswd -a $USER tty mosh worked again.

Other Problems

You should also make sure that you have the following line in your /etc/fstab

1
devpts                  /dev/pts      devpts    defaults            0      0

Subrender 0.2 Has Been Released

I tagged version 0.2 of subrender some days ago. I consider it now stable - however if you find bugs, please report them here.

Subrender 0.2 is also the first version that comes with a Windows installer.
If anyone wants to contribute a Mac OS X installer, specs for various {Linux, BSD} distributions, translations, features, feel free to fork subrender!

Subrender 0.2

Download

Windows Installer 32-bit Version 0.2

1
2
MD5: 99c7a7f46fae9089868ca02a372fb71a
SHA-1: 68741c51c02fe0e287e6d406898ee012c366f8ef

Source on github

Read more about subrender

Building Ethersex for Alpengluehn

This tutorial will walk you through the process of building Ethersex for the Alpengluehn target.

Getting Ethersex

Download the Ethersex sourcecode by cloning the git repository

git clone https://github.com/ethersex/ethersex.git

That’s it!

Configure Ethersex

Change to the Ethersex directory

cd ethersex

and start menuconfig

make menuconfig

Step1

Select the Alpengluehn Default Configuration

Step2

Now enter the submenu Network

If you want, you can change the Hostname to something else.

Step3

Now enter the submenu Ethernet (ENC28J60) support and change or randomize the MAC address. Here you can also change the IP address and the Netmask.

Step4

Press Exit two times to get back to the main menu.

Enter the submenu ApplicationsStarburst: Multichannel pwm

Step5

Change the channels to the number of LEDs you have connected to the Alpengluehn Controller.

Step6

Press Exit three times and select Yes.

Step7

You have now configured Ethersex for the Alpengluehn Controller.

Building the image

Enter make to start the build process. If everything went fine, you should see something like

1
2
3
4
5
6
7
8
9
10
=======The ethersex project========
Compiled for: atmega644p at 20000000Hz
Imagesize: 23076/65536 bytes (35.21%)
 [==========--------------------]

Program (.text + .data) : 23076 bytes
Data (.data + .bss)     :  1691 bytes

EEPROM usage: 55/2048 bytes (2.69%)
===================================

Setting the fuses

Connect your programmer to the 6-Pin ISP port to change the factory fuses.

This can be done with avrdude.

avrdude -v -p m644p -c stk500v2 -P /dev/ttyACM0 -U lfuse:w:0xf7:m -U hfuse:w:0xd8:m -U efuse:w:0xff:m

Adjust -c stk500v2 and -P /dev/ttyACM0 for your programmer.

Flashing the image

You need to flash the file ethersex.hex

avrdude -p m644p -c stk500v2 -P /dev/ttyACM0 -U flash:w:ethersex.hex

Lights out, Spot on

When you point your browser to the IP you have set in make menuconfig, you should see the Ethersex html interface.
You can now start controlling the Alpengluehn Controller using the web interface or using Artnet, ECMD etc.