News from neo land

News from neo land

Basicly we have been busy with the ASU. I have a mobile phone contract now with a GPRS flatrate. This means I turned my neo into a router. Installing iptables and the various netfilter kernel modules, enabling forwarding and masquerading and thinks started to work. I would be interested in creating a special image with a GUI targeted for routing. Route everything out over GPRS and WiFi and allow to connect via usb and bnep. Or do it the other way around. Have some fancy GUI that allows you to configure the direction you want to route/masquerade…Sounds like fun.

The distro work continues. We continue polishing and now install the settings-daemon and the moko theme in the ASU. So if you install OM2007.2 apps or any other Gtk+ apps they get the right theme. Gtk+ has always been installed in the ASU images and it keeps being installed and now apps look right too. So guys be happy.

regina from our QA team is starting to test the Qtopia apps and I have fun fixing the various bugs she is finding.

and last but not least. I will be in Taipei the next couple of weeks, so if you are interested in talking about various things drop me a mail.

My two cents on the Openmoko April Software Update

My two cents on the Openmoko April Software Update

I have been involved in this project with the goal to create the April Software Update (ASU). Just by the name Update one can guess that the stuff shipped (factory image) on the image is not the April Software Update. The default factory image, for what I know, is the Gtk+ based stack as you know it.

So why did we start to create the ASU? We wanted to have a working phone on a short time frame and some of us believed that the current stack, specially the gsmd, is not close to be working properly. The most promising alternative was the Qtopia stack. So we started marching into this direction by porting it to Qt/X11. When I say Qtopia we mean the prediction of the keyboard, the dialer, the sms program, the various other phone apps. So I’m using my ASU powered gta02 as my primary phone and fix the issues I encounter where ever they are. There are quite some things left but it is looking promising. So guys, be happy that you will getting working hardware and working telephony software. If you are bored with stuff just working ™ the Gtk+ based stack is awaiting your patches.

So how does it fit into the platform strategy? This is not changing anything in regard to GNOME Mobile and Embedded (GMAE). Our SDK will support you in creating GMAE based applications. Our framework initiative will make sure that you can access the functionality you need. Due technical issues (before it would get political) our SDK will not contain Qtopia headers, libraries. The Gtk+ stack remains supported, patches are welcome.

So happy hacking and enjoy a working phone and more on how great EFL later.

z.

Slowly getting frustrated with Qtopia

Slowly getting frustrated with Qtopia

So I have been working on this Qtopia integration. Being a good Free Software citizen I report the issues (most of the time with patches) upstream. Because I don’t like non public tasks and prefer discussions on patches I had to decide to use the qtopia-interest mailinglist (note the increased volume since february). The amount of feedback, even on obvious issues is kind of low, admitingly disappointing. I understand creating a generic framework which is easy to customize for very different kind of devices is very hard. But this is what Trolltech decided to do with Qtopia, so I ask for advice how I can achieve my customisation as it is currently not possible, the feedback is zero, none, nada. This is something that engineers, creators of frameworks should love to discuss, use cases, approaches to API… no interest at all from Trolltechs side.

But where the frustration starts is copy and paste. Their approach to platform integration is, copy an existing platform, sed -i s/THEIR_NAME/YOUR_NAME/g, hack on it until it is working, copy code from the Qtopia libraries and change one line, add device specific code to the core Qtopia libraries, have five copies of yuv blending code (unaccelerated, bytewise…, we had to call the ambulance for raster…). So I have had to fix bugs/asserts/crashes on copy and pasted code where someone fixed the original code in qmodemsiminfo.cpp but forgot to update all places where they copy and pasted the whole class to. In this case certain modems send different responses when no simcard is inserted, a perfect example for abstraction (removal of copy and paste, fix without copy and paste).

With C and C++ you have languages where you can change/extend the behavior of so called “objects” (coming from Object Orientated Programming) with something called “subclassing”. You do not need to copy the sourcecode to achieve that.

With Linux we have gained generic input systems (started in 2.4, really used in 2.6), sysfs (2.6) and I’m specially proud that a couple of device classes (battery, backlight, led…) originated from our handhelds community and found their way into mainline. So instead of writing one class for one battery, you can create one class that is going to work for every battery, with a stable userspace interface. When raster saw that, he read the battery class specification and implemented it. And it doesn’t look like Qtopia will gain support for these ‘classes’ of devices anytime soon, instead you, as an integrator, have to manually parse your special device, no help is coming.

When doing hardware development, you don’t follow the waterfall model. You create hardware, write drivers, work on GUI stuff, have iterations on everything (new hardware, new kernel, new GUI). The kernel gets better suspend resume handling, the initialisation order of drivers change. The input device numbering in userspace change as well (/dev/input/eventX). Because the kernel developers knew that these numbers in userspace will be random, they added ioctl’s to get the vendor id, product id, version and name. So sane code would have a class/factory where you create an input device handler for a given Vendor and Product ID, or name of the device (e.g. “Neo1973 keyboard”), I would hide this behind a nice API where you only have to deal with the actual handling of keyboard data. Qtopia’s approach to this is… Right, Copy and Paste and using hardcoded device numbers. So in the neo case you have four copies of this code, they don’t include linux/input.h but duplicate the struct and use magic numbers instead of the defines..

You have to rush, you do mistakes, you do stupid things and this is kind of acceptable but what really frustrates me is that they justify their behavior. They justify copy and pasting the same code to four places (and changing the class name) as a way to avoid bloat (which the abstraction would add) and that hardcoding the random device number is the right thing to do and that finding the right device is bloat and not needed.

So dear people can someone explain me where the world of someone who has grown up in the Free Software world, started to program here, getting review and comments, creating patches, polishing them, reworking them due feedback is disjunct with the world of copy and paste. As a buddhist I know that my world is not better than their world, only different. So please can some one help me to understand how their world is different, how I could understand them, how one can help them to recognize that copy and paste and layering violations create more problems than they solve?

Qtopia progress

Qtopia progress

I safely returned from Taipei and was almost in time. As I don’t have a hitchhiker guide to transatlantic traveling I had to learn it the hard way. Don’t take the arrival time for granted and plan the evening. If anyone knows how to legally get a rental copy of I’m a Cyborg but that’s ok. please tell me.

Taipei is great and I hope this was my first visit in many to come. It was a pleasure to see the Openmoko offices, catch up with the local engineers (too many to name them and I would forget one and would feel really bad about it). My short-term goal for tick and jeremy is to make them start a blog, take videos of their apps (assassin, diversity) and expose themselves to the public. It was a pleasure to meet the other foreign engineers and I’m specially honored to have met Werner Almesberger, received a talk on kboot, and rasterman and enjoyed the training on the graphic pipeline, state of XRender and general musings on object orientated programming.

I have finally a result of the automatic build of Qtopia/X11 that is not segfaulting (yeah!) and the experience feels like wasting time. I think I have spent almost of the last week on this thing as the turnaround times are so heavy. E.g. I managed to compile Qt for the target without fontconfig and the apps were only able to display numbers but not any glyphs. So I had to pass -fontconfig and the includepath for fontconfig to the configure script. This results in a five hour penalty as Qt for the desktop (totally unrelated), Qt for the target (not only the two classes knowing of fontconfig) and then the full Qtopia stack (I assume the Qt with and without fontconfig is binary compatible… so another waste of time). Anyway I have a GTA02/Freerunner (with GPS, WiFi, GSM, without a working bluetooth) that is powered by enlightenment, which is of importance for buddhists, and Qtopia/X11. We need to polish the packages and configuration, make sure that qpe is launched as part of the Xsession start and then let our “black team”, allan, do the testing and secure my job by finding bugs. The modem gets powered on, Qtopia finds it, I see the PIN Dialog and once raster is finishing his keyboard we can enter stuff. Pal hurry up!

What is so cool about Openmoko? In contrast to many other companies, specially in the hardware industry, is that the relevant stuff is public, our failures with hardware, our stupidity, our brilliancy, our success, our progress, our vision. This allows you to track it and be part of it and contribute. We are open, and mean it, and this commitment to openness is important. This is showing with our platform strategy. We are not only a Gtk+ company, we are not only an EFL company, we are not only a Qt/Qtopia company. We have enough flash to make it possible for you to carry your favorite toolkit and language in your pocket, show it to your friends. So our platform strategy is different, it is toolkit and language neutral, in the current age this implies DBus and yes we are interested in reusing and creating DBus Interfaces around GSM/SIM, Networking, PIM, Journal, Location, Communication,… This effort is lead by former Opie colleague and close friend Dr. Michael ‘mickeyl’ Lauer who currently enjoys the sun in Recife and is attending the Bosa Conference with a bunch of other Openmoko people (raster, stefan, daniel).

So consider contributing, your open phone is waiting for you. And remember warranty is void when NOT opened.

QtWebKit, Illume and Diversity

QtWebKit, Illume and Diversity

I’m writing this on one of these roundtrips when waiting for the Qtopia buildsystem to finish. I changed the mediaengine from helix to gstreamer, this means in one library another implementation gets compiled and the library is linked, maybe the other part of Qtopia needs relinking after it and that would be fine. The truth is, I switch the engine now configure of Qt desktop, Qt target and Qtopia is ran and I’m compiling Qt for the desktop, Qt for the desktop and the Qtopia libraries and applications from scratch. If anyone knows how to stop these stupidity and get me acceptable roundtrips times for such minor changes please comment.

To everyone that say QWebKit, the Qt WebKit integration is called QtWebKit and please use that when referring to this module. As communication is done by blogs these days I have seen this workaround. If you experience a crash on exit with QWebView, please tell us, there is no need to add a workaround to your application, Qt4.4 is not final. So please write a small application that is crashing on exit and the Qt WebKit inside and outside of Trolltech will take a look and fix it. What did you make believe this is an bug in amarok and is needing fixing there? The cool thing with the Free Software world is you can fix the stuff where it has to be fixed and we should utilize this, so please show us the problem.

Urs, I’m glad you had a go at the QtWebKit KPart and yes QNetworkInterface is not present if you compile QtWebKit with Qt4.4. You want to look into the QNetworkManager and provide an implementation using KIO. If you need any help, I’m here to help and I’m sure Simon and thiago will help you too.

raster left taipei yesterday, he is probably packing and leaving to the bossa conference soon, he has been busy working on illume, our window manager module for the GTA02/Freerunner, tick has created a project for our EFL based installer application (using PackageKit) and last, but certainly not the least application we are going to develop in our GForge is diversity. This application is combining GPS, GeoClue, Jabber, your Journal with each other and providing a bling-bling interface using EFL. When walking around in a foreign city you can see where you friends are, were, where they haven taken their cool pictures that you have seen on flickr, get routing with OpenStreetmap to find your way, see people with the same interests as you, take a city tour people like you have enjoyed, let your Freerunner guide you through the city, go sight-seeing or just chat with your relatives back home (and certainly be able to control your privacy). I hope we will have some more videos up in the next couple of weeks.

I have been enjoying my time in Taipei, I’m definitely coming back soon and if we work hard Openmoko can have a bright future, we can start a Software Industry in Taiwan solely based around the concepts of Freedom and Free Software, this is really exciting!

Taipei, Qtopia on X11, and tracing memory allocations

Taipei, Qtopia on X11, and tracing memory allocations

I moved into the OpenMoko apartment yesterday and right to the backside of the apartment we have some kind of hill and I could not resist and had to walk up to get this city view:
03020055.JPG

raster has been working on a new launcher, window decoration and application navigation for the OpenMoko device, some things are pretty hot about it. It is called illume and can be found here. This launcher is using EFL, actually it is a module for e and the cool thing is edje. With this little file you define objects, their look and their behavior, e.g. if it gets clicked a signal is emitted, you can write mini programs, so on click you can get a transition, like sliding out the menu. edje is pretty powerful.

WebKit related I’m spending my spare time tracking allocations, stale data and memory fragmentation. I use spiegel.de as my test site and monitor heap usage and address space growing (due fragmentation?) and somehow lacked a good application for profiling. raster kindly pointed me to memprof and now I can do this (well memprof has some performance issues with WebKit when getting the profile, but it is performing better than Instruments.app for this job):

memprof

I see most of the memory was allocated by QImageData::create, when clicking on the create method I can see the callers and navigate through the backtraces. It is working with C++ and you can easily add qMalloc,qCalloc,qRealloc,WTF::fastMalloc to the list of functions to ‘ignore’.

Picking (a) Company

Picking (a) Company

Many people don’t know what my nickname means even german speaking ones. The direct translation would be tick, these animals that sit on leaves, bite people and suck the blood, the ones that can cary scary deseases. But there is another side to the word, a political one. In my youth this word was used to refer to punks and similar associates by right wing people, I was labeled this way. And this is nothing to be ashamed off, the view of kids with weird haircuts (or none), not washed hairs, broken and dirty clothes probably disrupted their lovely right wing world, but their world deserves disruption, change.

When joining irc I had to pick a nick and the most often used word for me not equal to holger or freyther was zecke so I settled with that. And looking at it now, as a discordian pope, it was a good choice.

Like many hackers I started to work from home, communiciated through irc, started to work on projects, collaborated, learned (thanks to a guy named tronical willing to answer any question), grew, got better, continued to make stupid mistakes. Saw Mr. Eilers and Lauer finishing their PhD. I believed an ideal FLOSS career would be to work remotely from home, little did I know, little do I know.

I started university, joined the RoboCup team, started internships and got hooked to the power of teams in one physical place. Having many brilliant people at the same place working together, sharing success and helping each other to recover from failure is the best way of working. At least I have not witnessed something better than an awesome team.

In december I decided to resign from my current part time job, we/they are an awesome team, because I wanted to work on FLOSS again. So my constraints for finding a new job are now FLOSS + awesome team.

I had the opportunity to visit the Oslo trolls (they do not live caves, in contrast they are close to the sky, the 5th floor to be exact) and it is an awesome team. Brilliant, international people, there is little more you can ask for. And even if you do ask, there are soft drinks (no Club Mate though), food and vegetables, and some people have chocolate… I started to verify if the requirements of FLOSS and awesome team are fulfilled and oh my god, they are. The only downer was. Oslo trolls live in Oslo, and I’m in Berlin (at least 2 to 4 more terms). After a lot of flirting, tears and counseling (or eating spaghetti at Berlin based usability experts) I was forced to accept that Oslo trolls live in Oslo and even with the power of the mind of fooling myself applied, Oslo is not another name for Berlin and is really not referring to the same place. Looking at the size of the universe the difference from Berlin to Oslo is really minor, but if you happen to be in one of the two cities you recognize that even this minor difference is significant. Specially working with simon would have been ueber cool, it looks like it has to wait some more years. So yes Trolltech has the simon factor and its weight is really really heavy.

To keep a long story short, there are two other companies that I really like because of doing FLOSS and having an awesome team and these are o-hand.com and OpenMoko. To stop the flirting and crying tears I’m going to do a project for OpenMoko, I want to see them finish the GTA02, ship it to the people and want to see OpenVG capable hardware with open drivers coming.

Harald Welte helped in drafting the NDA of OpenMoko and at no surprise there are exceptions for FLOSS. I agree with rms that NDAs have victims, like he was victim of a donated Xerox printer and not able to fix the driver for ITS (awesome book, a must read), this NDA is going to have victims as well, victims that need to know the pricing of hardware, business plans, and all the stuff I do not care about. There is no doubt that the software I write will be FLOSS, will be released on day one and I can talk and discuss about it as much as I want as it is definately not covered by the NDA! You certainly know when not to argue. Oh and on to the team. I had the pleasure to listen to a discussion of Werner Almesberger and raster yesterday, a bit disturbing but totally awesome! I’m looking forward to meet some of you after FOSDEM in Taipei! So let there be Qtopia, Qtopia on X11, next to Java,Gtk+,FLTK+,EFL,FooToolkit and any other Free Toolkit all buildable from OpenEmbedded!

Let us be productive, innovative and provide prior art for mobile computing for years to come! With all the cool people working at OpenMoko it is a pleasure to say… “Hello Moko” as well.

PS: Ironically almost one year after I considered joining initially.

Traveling, Planning, Failing

Traveling, Planning, Failing

It is almost a week ago that I left Eindhoven to visit Michael and Daniel and since Wednesday I’m back in Eindhoven, the tuesday was spent in Amsterdam and I stayed in a christian hostel (http://www.shelter.nl). I had planned/expected to be in the north (think of Finland, Denmark, Sweden) by this time but I’m somehow stuck at my family in Eindhoven, no idea if I will leave them before OEDEM, if I’m going to manage it to go to London/o-hand for a day or two as I’m somehow really stuck here.

I have been mostly doing janitor work on WebKit/Gtk+, killing the TemporaryLinkStubs.cpp, moving stubs to separate files, finally did the renaming from *Gdk.{h,cpp} to *Gtk.{h,cpp}, started on working drawing comboboxes and popupmenu support. I’m searching for a nice and easy way to bind GObject to JavaScript but it looks like I have to use h2def.py to extract the public methods. In this regard the Qt Object Model is just better as you have access to signals and slots (specially marked methods). So the moc creates are more pleasant experience in contrast to the m4 foobar the gtkmm bindings requires one to do… but I’m drifting away.

I spend most of the day reading books, publications and try to take care of my cousins, their dog and doing other physical work. I quite enjoy that and it helps me to relax.

I congratulate Trolltech for opening up Qtopia and as I have promised back then I will do the Qt4 dance now. I don’t know where, how and if some one is going to record it but some people at OEDEM will be forced to see me dancing.

Oh and btw there is Charon a web browser designed for the Neo, go and check that out.

WebKit, GSoC 2007 at an end prototyping

WebKit, GSoC 2007 at an end prototyping

Officially I’m on vacation. The plan is to travel a bit, prepare for at least one exam and hack on a new OpenMoko application. I hope to not really skip the traveling part but it will probably suffer due studying. I will be at least in Eindhoven on the 15th and in Frankfurt on the 16th of September 2007 but with the goal to go north. Hopefully visiting two friends one in Rostock one somewhere in Denmark and then hopefully going further north (e.g. sweden or finland) and return by crossing this one kingdom located on this island and hopefully to meet some old friends in Cambridge.

Currently I’m still in Berlin. As my flat is still rather empty I mostly hang out in the office. To make a difference I’m sitting in a different room with a different pile of books and papers on it. So my thoughts are divided between what to study, reading old GCC summit papers and other compiler related publications and thinking of a new application for OpenMoko. El, my usability master, kindly agreed to give me a hand in designing the interface and work flow and I hope this works out. I have prepared Neo1973 paper versiona paper version of the Neo and already wrote some stuff for the main tasks this application should do. I have a list of actions and settings this application has but as the space of the toolbar is rather limited I don’t really know what to do with it. Again I hope my usability master has some thoughts and that I’m, the Kode-Knecht, will be able to realize them.

Oh, I will hopefully be able to emulate Aaron and find a copy-shop and people to try the paper prototype…

What does that have to do with WebKit? No idea but as you are clever you will find that out. On a rather funny note Google asks the GSoC2007 students to create a Gmail Account and to upload the code to a code.google.com repository. Sadly they only allow to upload 20MB and my tarball is 105MB…. I have mailed LH and filed a ticket to request more quota…

Chaos Camp Update

Chaos Camp Update

Today is the fourth day of the camp. Before the camp started I was busy improving the feedreader, at the camp I have been busy preparing, splitting and merging patches for WebKit. So WebKit can now properly handle ScrollBar’s of div elements and such, we support multiple frames so Google maps, which recently introduced iframes, works again. You can select text and input non ascii charachters. So WebKit/Gtk+ is nicely improving. In a month or two we are most likely busy creating the API and have a rather complete WebCore implementation.

I will create screenshots at a later point.

z.