beagleboard

Das Beagleboard ist ein kostengünstiger, kompakter, sparsamer, leiser und ziemlich freier Computer, der auf OMAP3530 basiert.

erste Schritte

Ich habe mal ein Beagleboard C4 gekauft und zusammen mit Georg standardmäßig die Ångström Linux Distribution aufgesetzt. Bild und Ton sind da. Alles ein wenig instabil. Das pralle GUI bräuchten wir eigentlich nicht.

Als nächstes werde ich versuchen Java zum Laufen zu bekommen - vielleicht mit JamVM - und dann das Ganze auf Brauchbarkeit testen (vergl.: "everything's as slow as a dead dog").

Überlegenswert wäre auch Android auf einer zweiten SD Karte zu installieren - 0xdroid?

Offene Fragen: Stabilität? Performance? Komfort? Noch zu experimentell? Welches OS? Welche Programmiersprache? Welches SDK?

0xdroid installiert

Habe testweise das beagle-eclair-0x5-sgx 0xdroid release installiert - entspricht einem Android 2 Eclair mit einem 2.6.29 Linux Kernel. Sieht bis jetzt ganz gut aus.

Android Debug Bridge

Habe heute Zeit gefunden, das Beagleboard via USB und adb mit Eclipse unter OS X zu verbinden (hint: das bb muss natürlich als Peripherie laufen; also den Mini-USB Port verwenden). Jetzt lässt sich also schon etwas komfortabler programmieren.

Ubuntu

Der Media Tablet 14000U Stylus wird durch das Schwellpapier hindurch getrackt. 0xdroid erkennt die Hardware aber erstmal nicht. Bevor ich mich näher mit den Treibern auseinander setze, wollte ich noch einmal Ubuntu am Beagle Board testen.

Die canonical OMAP3/4 Maverick images nutzen Gnome - auf dem C4 BB kann man das erstmal vergessen. Sobald ich einen usb-ethernet Adapter aufgetrieben habe, werde ich mich noch mit einem minimal prebuilt image und xfce4 spielen.

Wenn ich an Bootzeit und Performanz denke, glaube ich aber immer mehr an eine Lösung, die vollkommen auf ein GUI verzichtet und sich die Koordinaten aus /dev/input (bzw. über eine TUIO Bridge) holt.

Java, Python, …

Wenn wir uns anstatt Android ein console-only Linux zusammenstellen, müssen wir auch nicht unbedingt mit Java arbeiten. Zur Wahl stehen dann u.a. all die momentan hippen Skriptsprachen; Python zum Beispiel.

Ohne Android Application Framework (und damit ohne OpenCORE/OpenMAX) fehlt uns natürlich die Mp3-Decodierung. Das pyogg repository ist seit 3 Jahren "temporarily down". Pymedia, pymad und py-fastaudio sehen auch nicht mehr ganz fit aus. PyFFmpeg (basiert auf libavbin, genauso wie PyGame) und pyaudiere leben aber noch. Wie sieht's aus? Irgendwelche Vorlieben?

nur so als querdings

pure data a.k.a. pd

Debian

Auf dem BB läuft jetzt Debian Lenny. Ausserdem hab ich für mpg123 hab ich einen kleinen Python Wrapper geschrieben. Die Koordinaten des Tablets werden wie geplant von /dev/input/eventX geholt.

Squeeze

Um besser mit Festival arbeiten zu können habe ich Lenny auf Squeeze aktualisiert und dann auch noch auf "testing". Aufgrund von Soundproblemen wird jetzt auch der 2.6.38 Kernel verwendet. Danke für die Aufmerksamkeit.

Beagleboard Hacks

Also am Beagleboard läuft jetzt sshd, und außerdem haben wir meinen gepatchten wide-area bonjour server installiert, d.h. das board hat jetzt einen globalen hostnamen, den wir hier aber nicht verraten. der wird auch immer angepasst, wenn/falls sich die IP adresse des boards ändert – yay, bonjour, awesome.

Außerdem hab ich folgende mount-options für die root-partition des beagleboards gesetzt, damit die SD karte nicht soviele schreibzyklen abbekommt

noatime – keine access times mitschreiben, sonst wird jeder read auch ein write
commit=60 - normalerweise committet ext3fs das journal alle 5 sekunden, aber alle 60 sollte auch reichen

ich hab auch noch ein paar andere options probiert, aber die brauchen kernel support, d.h. da müsste man den kernel nochmal kompilieren. aber egal, SD karten sind billig, trotzdem sollten wir immer ein backup der SD karte haben, für den fall der fälle.

Python

Habe jetzt einmal Python 3.1.3 am BB kompiliert. Next: TUIO Output für Visuals

Cython

Brauchbare Python 3.x TUIO Module gibt es noch nicht. Habe jetzt Cython 0.14 am BB kompiliert und schicke mit einem ziemlich schlanken OSC Binding die "rohen" Koordinaten an einen Processing Sketch. Das sollte für das visuelle Debugging erstmal ausreichen.

Prototyp 1 "cat trap"

  • Beagleboard C4
  • USB HUB
  • Apple USB Ethernet Adapter
  • Waltop (Aiptek) 14000U Media Tablet
  • RFID USB Reader, ISO 15693 (13.56MHz)
  • Debian Squeeze, 2.6.38.2 kernel from rcn-ee.net (fixed sound issues)
AttachmentSize
cattrap1.jpg 61.33 KB
cattrap2.jpg 59.35 KB

issues

issues:

important things currently missing:

  • power down button and scripts
  • ui buttons…
  • additional internal speakers
  • multitouch -> different tracking solution

things todo later: batteries, wlan, better layout, minaturization, etc.

BeagleBone

Beaglebone: USB, Ethernet, 3.3V I/Os on the expansion headers with 0.1" spacing, expected retail price of $89. Interesting.

sound on the BeagleBone running Ubuntu

Our Beaglebone (currently running Ubuntu 12.04) comes without any onboard sound, so I attached usb speakers which function as an external sound card (logitech z305). The sound quality was rather disappointing. My first guess was that this might be the result of some alsa/pulseaudio misconfiguration, but it's actually an USB DMA issue. Top shows how kworker consumes all the resources during mp3 playback.

Improved USB DMA support is still on the official beaglebone to-do list and the current workaround (when using Ubuntu) is to cross-compile a PIO_ONLY kernel.

So for future reference… here are the steps to compile a non-DMA kernel for the BeagleBone:


apt-get install ccache gnu-arm-linux-gnueabi
mkdir beaglebone-kernel
cd beaglebone-kernel
git clone git://github.com/RobertNelson/linux-dev.git
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
cd linux-dev
# only the "am33x-v3.2" branch supports the BeagleBone
git checkout origin/am33x-v3.2 -b am33x-v3.2
cp system.sh.sample system.sh
vi system.sh
# change LINUX_GIT to LINUX_GIT=~/beaglebone-kernel/linux-stable/
# uncomment the cross compiler settings
# uncomment the MMC line and point it to the beaglebone SSD card, e.g.: MMC=/dev/sdb (check with fdisk -l)
# uncomment ZRELADDR=0x80008000
./build_kernel.sh
# when a menu pops up, disable DMA: device drivers>usb support>musb dma mode>disable dma (always use pio)
./install_image.sh

compiling libmad and mpg321 (because of seg fault)

Unfortunately my favorite player (which I'm using as a workaround for the missing mp3 support in Py3k) keeps crashing with a seg fault (see debian bug #687182). Strace showed me that libmad might be the culprit here (compare: Ubuntu bug #989846 ) so I decided to deinstall all related packages and compile the 0.15.1b version myself. Some notes:

cc1: error: unrecognized command line option '-fforce-mem'

fforce-mem is a deprecated gcc optimization option (see: gcc 4.3 changes). I had to remove the corresponding line (optimize="$optimize -fforce-addr) in the configure file.

A few lines above the architecture gets selected. Here I inserted the following line:

armv7*) arch="-marm" ;;

If you don't do this you will get an "selected processor does not support Thumb mode" error (thanks to Nikolai for this hint) Afterwards I also used the configure --disable-aso parameter … just to be on the save side.

After successfully compiling libmad I compiled madplay. The "error: id3tag.h was not found" error made me install the libid3tag0-dev package.

And the mpg321 configuration stopped with the following message:

checking for snd_mixer_selem_get_playback_volume in -lasound... no
configure: error: "ALSA lib is required to compile mpg321."

Of course alsalib is installed, but the dev package is missing: sudo apt-get install libasound2-dev

Testing mpg321 brought up the following error: "ALSA lib confmisc.c:768:(parse_card) cannot find card '0'". I have to specify the audio device. aplay -l helps here:

**** List of PLAYBACK Hardware Devices ****
card 1: Z305 [ Logitech Z305], device 0: USB Audio [USB Audio]

mpg321 -o alsa -a hw:1,0 scelsi.mp3

It works. Finally.

AttachmentSize
mpg321_on_beaglebone.png 99.4 KB
Syndicate content