Skip to content
GRENDELMAN.NET
  • Home
  • Photos
  • Projects & Pages
    • Projects
    • Files
    • Humor
    • Bookmarks
  • Login

Motorrit door de Drôme

Posted on: Monday 13 August 2012 /
Categories: Motor

Op woensdag 8 augustus 2008 heb ik deze route gereden vanaf Le Camping Moto. Op verzoek van een mede-rijder plaats ik ‘m hier:

 
Gebruik de map-controls om in/uit te zoomen en de kaart te verschuiven. Bekijk op Google Maps. Download KML.

De benodigde achtergrondinformatie: het KML bestand is met GPSBabel gemaakt van een originele, ongewijzigde GPX track uit een Garmin Zümo. Standaard levert dat een nogal lijvig KML bestand op, omdat GPSBabel ook 'placemarks' voor trackpunten genereert. Ten eerste heb je daar niet zoveel aan, en ten tweede wordt het bestand daardoor te groot om in Google Maps te kunnen laten zien. Door de optie 'points=0' mee te geven voor de KML output laat je de placemarks weg. De invocatie van GPSBabel wordt dan:

gpsbabel -t -i gpx -f 20120808-track.gpx -o kml,points=0 -F 20120808-track.kml

Ik heb de track ook geconverteerd naar een route op de manier die ik al eerder beschreef:

gpsbabel -i gpx -o gpx -f 20120808-track.gpx -x transform,rte=trk \
-x nuketypes,waypoints,tracks -x simplify,error=1k -F 20120808-route.gpx

Met 'error=1k' kreeg ik 24 routepunten; met 'error=0.2k' kreeg ik er 127. De eerste variant volstaat, en levert op een Garmin Zümo vrijwel helemaal de route op zoals we hem gereden hebben. Het enige verschil zit 'm in een stukje weg dat de Zümo weigert te gebruiken op de route, waardoor er een rare 'zijstraat' in komt te zitten. Dat zal wel een fout in het kaartmateriaal zijn. Download de GPX met de route.

Tags: gpsbabel, map

Cross-compiling kernel modules for Raspbian

Posted on: Wednesday 1 August 2012 /
Categories: Nerd Stuff

This is a follow-up post to my post about compiling out-of-tree kernel modules for Raspbian / Raspberry Pi from last week. In that post I talked about compiling a kernel module on the Raspberry Pi itself. This time, I did the same thing, but I did it on my i386 Ubuntu workstation, using a cross-compiler.

For this to work, you need the following software:

  • The kernel source
  • A cross-compiler, and it has to be the same version that your actual Raspbian-kernel was compiled with
  • A Module.symvers file, or the kernel and all modules built

The easiest thing is to create a directory that you keep all the Raspberry Pi stuff in. If you haven’t downloaded the kernel source yet, clone the Git repository; it allows you to stay up to date. Also download the pre-built compiler toolchain using Git:

[code]
mkdir ~/raspberrypi
cd ~/raspberrypi
git clone https://github.com/raspberrypi/linux.git
git clone https://github.com/raspberrypi/tools.git
[/code]

Just for fun & exercise, instead of using the downloaded Modules.symvers, build the kernel. See http://elinux.org/RPi_Kernel_Compilation#compiling for more detailed information.

[code]
cd linux
zcat /proc/config.gz > .config
make -j 6 ARCH=arm CROSS_COMPILE=$HOME/raspberrypi/tools/arm-bcm2708/arm-bcm2708-linux-gnueabi/bin/arm-bcm2708-linux-gnueabi- oldconfig
make -j 6 ARCH=arm CROSS_COMPILE=$HOME/raspberrypi/tools/arm-bcm2708/arm-bcm2708-linux-gnueabi/bin/arm-bcm2708-linux-gnueabi-
make -j 6 ARCH=arm CROSS_COMPILE=$HOME/raspberrypi/tools/arm-bcm2708/arm-bcm2708-linux-gnueabi/bin/arm-bcm2708-linux-gnueabi- modules
[/code]

Please note the ‘-j 6’, which sets the number of concurrent jobs to 6, which may be less than ideal if you have a slow (single/dual core) machine. If your computer has a quad-core processor or better, -j 6 should be fine. It will make your build go a whole lot faster.

Note: if you don’t feel like waiting for a kernel build to complete, you can also use the provided Module.symvers file, prepare and configure the kernel tree and build your module from there. Please see my previous post on how to do that; just add the cross-compilation flags.

Now, you are ready to cross-compile your out-of-tree kernel module:

[code]
cd /path/to/module/source
make -C $HOME/raspberrypi/linux ARCH=arm \
CROSS_COMPILE=$HOME/raspberrypi/tools/arm-bcm2708/arm-bcm2708-linux-gnueabi/bin/arm-bcm2708-linux-gnueabi- \
SUBDIRS=$PWD modules
[/code]

Tags: kernel, linux, pi, raspberry, raspberry pi

Compiling kernel modules for Raspbian / Raspberry Pi

Posted on: Thursday 26 July 2012 /
Categories: Nerd Stuff

I needed to compile an out-of-tree (vendor supplied) driver for a USB device, to use it on my Raspberry Pi. Since the process was less than obvious, I’ll document it here. Maybe it will be of use to anyone else.

Normally, for compiling kernel modules, you need the kernel headers available. They have to match the version of the kernel you are targeting. In case of the Raspberry Pi running the 2012-07-15 image of Raspbian, that would be 3.1.9+. On plain Debian you would install a ‘linux-headers-x.y.z-flavour’ package, but that doesn’t seem to be available on Raspbian (at least not the right version), so we use the full kernel source from Github.

The main problem with that, is the absence of a file named Module.symvers, that contains the symbol versions of the running kernel and all of its modules. That file would normally come in the linux-headers package, that I mentioned above. To get that file, and be able to build ‘good’ modules for the kernel, you would need to build the entire kernel and all its modules yourself. At the end of the build, the file will be created. However, if you want to do that on the Pi itself, make sure you have plenty of time, because a complete kernel build will take quite a few hours.

To spare you the trouble, you can download it here: Module.symvers. Please note: this file is for the 3.1.9 kernel from Raspbian-2012-07-15, and it will not work for other kernel versions.

Assuming you have downloaded the file to your home directory, you can now download the Linux kernel source and prepare it for building out-of-tree modules like this:

cd /usr/src
sudo wget -O raspberrypi-linux-3.1.9.tar.gz https://github.com/raspberrypi/linux/tarball/rpi-patches
sudo tar xzf raspberrypi-linux-3.1.9.tar.gz
sudo ln -s /usr/src/raspberrypi-linux-eab45cb /lib/modules/`uname -r`/build
cd /usr/src/raspberrypi-linux-eab45cb
sudo sh -c 'zcat /proc/config.gz  > .config'
sudo sed -i 's/EXTRAVERSION =.*/EXTRAVERSION = +/' Makefile
sudo cp ~/Module.symvers .
sudo make oldconfig
sudo make modules_prepare

A few notes:

  • The name of the source directory is probably different in your case, because it contains the ID of the latest commit in the Git repository and commits occur regularly.
  • The sed command on line 7 is to add a ‘+’ to the version in the source. The version should be 3.1.9+, while the version in the repository is just 3.1.9.

Now most well-maintained drivers should ship a proper Makefile for building them, but the usual command line for building such a module would be something like this:

[code]
make -C /lib/modules/`uname -r`/build SUBDIRS=$PWD modules
[/code]

Tags: kernel, linux, pi, raspberry, raspberry pi

Paper.js

Posted on: Monday 23 July 2012 /
Categories: Nerd Stuff

Check it out!

First steps with Arduino

Posted on: Friday 20 July 2012 /
Categories: Nerd Stuff

This is the second post in a series to come. Recently, I have taken on the challenge of building a quadcopter, and I will report about my progess on this blog.

Read the first post, about part of my plan, here.

My quadcopter will be an AeroQuad, a design which is based on the Arduino Mega 2560 microcontroller. The board arrived in the mail last Saturday, and since I haven’t owned an Arduino before, everything about it was kind of new to me. So, I did some small experiments.

My laptop runs Debian Wheezy these days, and the Arduino IDE is packaged for that, so installation was as easy as typing:

[code]apt-get install arduino[/code]

The Arduino IDE is a Java application, that has a simple code editor and some built-in tools for compiling your code and uploading it to the Arduino. It comes with some example programs, the simplest of which is called ‘Blink‘ and does little more than make a LED on the board blink on and off.

That worked nicely, and as a first-time Arduino user, it is fun to make the LED blink in a variety of patterns. That grows old quickly though, so on to more challenging tasks.

The next experiment was to download the AeroQuad software and see if I could get that built. It took me a while to figure out where to put the AeroQuad libraries so that the IDE can find them, because the installation instructions described two options, both of which I didn’t like, but in the end, it was obvious.

The default setting in the Arduino IDE for ‘sketchbook location’ (where you keep you Arduino sketches) is $HOME/sketchbook. This means that the AeroQuad libraries need to live in $HOME/sketchbook/libraries, and they will be found.

Something else noteworthy is, that you cannot change the name of the folder containing the AeroQuad software itself. When you unpack the archive, you get a directory named ‘AeroQuad’. I changed it to ‘AeroQuad-3.0.1’, but that doesn’t work. The IDE told me that ‘The file “AeroQuad.ino” needs to be in a sketch folder named “AeroQuad”‘, so I renamed it back.

Now, compiling the code is generally just a matter of clicking a button, but when I tried that with the AeroQuad project, the compiler crashed:

[code]collect2: error: ld terminated with signal 11 [Segmentation fault][/code]

I did try to find out why, but Googling around for a while didn’t give me anything useful, except that the Arduino IDE, when downloaded from the official website, ships with GCC version 4.3.2, while Debian Wheezy is at 4.7.0 at the moment. That’s a rather big difference.

I decided to try the easy way, and just get the official Arduino IDE and install it in /opt/arduino-1.0.1. Clearly a good choice, because compiling the software just worked now. I even uploaded it to the Arduino, but since I don’t have anything to connect to it yet, that was pretty pointless.

The next step will be to assemble the AeroQuad v2.1 Shield, which is a print board that will contain sensors like triple-axis gyroscope, accelerometer, magnetometer and barometric pressure sensor; all the neat stuff that will make the AeroQuad stay up in the air. Today, after being underway for almost three weeks, they arrived at my doorstep. Well, after paying 37 euros for VAT and customs handling costs…

Next stop: “Hardware Assembly 2.1 Shield“…

Continue here: Quadcopter Project Rebooted

 

Joepie, deel 2 van mijn quadcopter spullen zijn binnen! http://t.co/eeiHOeLH

— T̵̢̘̗͈̲̐̂͂͘ͅi̶̥͔̗͑̄̊̊͌̕n̴̙̺̈́͐ǘ̸̗̝͉̋̍z̷̥̬̻͉̗͎̎̄Z̵̓ (@tinuzzehv) July 20, 2012

 

Tags: aeroquad, arduino, quadcopter
« 1 … 9 10 11 12 13 … 27 »

Today's motto

There is a crack, a crack in everything. That’s how the light gets in.

— L. Cohen

Categories

Recent Posts

  • Web maps in 2025
  • Adele in Munich
  • Trackserver v5.0 released
  • Trackserver v4.0 released
  • Panoramas Chamrousse

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Tags

aeroquad android arduino backports camera cat debian Digikam docker garmin Google GPS gpsbabel KDE kernel launchpad linux lowlands maps multicopter Natty oracle oruxmaps osmand owntracks pannellum phishing photography photo sphere pi plugin policykit quadcopter raspberry raspberry pi shield software spam tracking trackme Ubuntu viking wheezy wordpress Zümo

Copyright GRENDELMAN.NET 2025 | Theme by Theme in Progress | Proudly powered by WordPress