Archive for August, 2006

Cross compiling with Gentoo Linux

August 20th, 2006 by tripledes

Everyday use to be more common the need to cross compile open source applications because the Linux Everywhere fever :) (which I do love!). Usually when someone first time tries to cross compile is not really that hard to find some pre-compiled tools or even a complete SDK but there we are again having binaries all around our filesystem without any control at all, so…what’s Gentoo offering to solve this? Crossdev.

Crossdev is really handy tool which allows you to create and manage cross compiling environments in a very easy way. The basic command to get a complete set of tools for a target is just passing the parameter -t ARCH-VENDOR-OS-LIBC, this will make ready an stage4 which adds binutils, gcc, kernel headers, etc. get more useful information just executing the command without arguments and passing -t help.

Crossdev gets little help Portage’s Overlay feature another really nice feature which deserves its own post to get explained :) .

Live sample:
user@localhost# vim /etc/make.conf

Here the PORTDIR_OVERLAY variable have to be defined before we start building the new tools, in this directory crossdev will create some links to the official portage tree in our system, more precisely, to the tools we need to compile but defining the arch, libc, etc we really want.

user@localhost# crossdev -t armeb-softfloat-linux-uclibc

Now crossdev will start to create the links and then compile the tools, progress can be watched at /var/log where some files are created as the tools compile. What do we get when it finishes?

user@localhost# ls -la /usr/armeb-softfloat-linux-uclibc/*

That will show a serie of binaries, headers, libraries, etc. making our system ready to compile sources for the armeb architecture, using uClibc and float point by software.

Motorola V3 and Gentoo Linux

August 13th, 2006 by tripledes

I’ve been playing a little to see what I could do with tools available at Gentoo’s portage system to manage mobile phones like my spare Motorola V3. I have tried Gnokii, Moto4Lin and KmobileTools.

Moto4Lin is quite the most useful but it has some lacks and requieres the phone be connected via USB, that makes it mostly useful at home cause I don’t usually carry on the cable. Take that apart it almost allow access to everything on the phone’s memory as any file browser would, audio files, pictures, videos, etc. also it’s seem editor, allowing to flash the phone and midlet downloader/uploader.

With KmobileTools I can browse the addressbook, can send SMS, can dial out, etc. but everything via USB, I tried the Bluetooth connection via RFCOMM but I got nothing. The documentation I found at KmobileTools’ site said Motorola V3 is supported via CDC ACM driver (provided by cdc-acm kernel module) so no Bluetooth either.

Finally with Gnokii I can do almost the most important things via Bluetooth, can send SMS, can browse the addressbook, see battery and signal levels, etc. I had to configure it to work with an AT phone model and giving the cell’s Bluetooth address as port.

Last application I’ve been trying is ussp-push, which from console is able to push files to the phone quite easily like this:

user@localhost$ sdptool browse
Inquiring ...
Browsing 00:0A:28:6D:25:DA ...
Service RecHandle: 0x0
Service Class ID List:
"SDP Server" (0x1000)
Protocol Descriptor List:
"L2CAP" (0x0100)
"SDP" (0x0001)
Profile Descriptor List:
"SDP Server" (0x1000)
Version: 0x0100
Service Name: Dial-up networking Gateway
Service Description: Dial-up networking Gateway
Service Provider: /a/mobile/system/cl.gif
Service RecHandle: 0x10001
Service Class ID List:
"Dialup Networking" (0x1103)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1

.....And the list continues.....

Here I found the Obex Object Push port which is need for transfering the files (also the Obex File Transfer should work), one of the following methods could be used:

user@localhost$ rfcomm bind /dev/rfcomm0 "bt addr" "channel"
user@localhost$ ussp-push /dev/rfcomm0 localfile remotefile
user@localhost$ rfcomm release /dev/rfcomm0

- or -

user@localhost$ ussp-push "bt addr","channel" localfile remotefile

Indexing everything, Beagle

August 8th, 2006 by tripledes

Lastly I’ve been playing around with Beagle and its integration with Gnome Desktop through the deskbar applet. Beagle is a search tool which works based on backends (for better understanding think about them as plugins), those are enabled during compiling time.

Beagle is divided on a daemon and a serie of tools which query the daemon in a way or another to get information. The daemon allows to set parameters in the command line enabling those backends we want activated, once the daemon starts indexing everything it’s time to ask it.

Starting the daemon from command line is just as easy as knowing which backends we want:

user@localhost:~$ beagled --list-backends
Current available backends:
User:
- EvolutionDataServer
- EvolutionMail
- KMail
- Files
- GaimLog
- IndexingService
- Tomboy
- Blam
- Liferea
- Akregator
- KonquerorHistory
- Kopete
System:
user@localhost:~$

I don’t use KDE so I won’t activate anything about it, I don’t use either a RSS aggregator, so my final command looks like:

user@localhost:~$ beagled --bg --backend +EvolutionDataServer --backend +Tomboy --backend +EvolutionMail --backend +Files --backend +GaimLog --backend +IndexingService

A log file to see what it is doing could be find at ${HOME}/.beagle/Log/current-Beagle. It’s important to let it running for awhile but it depends on how big your home is.

Now it’s time to start the searching tool called beagle-search, there are two ways to launch it:

user@localhost:~$ beagle-search [--icon] [query]

If –icon is used it sticks on the Gnome notification area so just a left-click will open the application in front of us, we also can specify the query on the command line to get the results as the application opens.

After learning this little set of features I found just one thing left, I wanted the sites I visit with Firefox indexed as well, Googleing I step on the answer a Firefox extension which can index everything (even pages with secure content).

Take a look to some basic actions one can do with Beagle:

After the needed CABs

August 3rd, 2006 by tripledes

Being a Linux user and owner of a device running WM5 sometimes I found myself wanting to install a program on that device which is inside of an .exe file, really useless from Linux one could say as I did so myself. That all was before I found Orange and Cabextract already in Gentoo’s portage repository.

Using these two applications almost all the content can be extracted from the initial exe file so once the CAB files needed to install software on the WM5 device are extracted just the easy part is left, transfer and execute them.