Have you ever wondered what happens when a software (MS Office, gimp, etc) are being installed on a system? Even a couple of moments thought would suggest that it would install(copy at a specific location) a couple (at times a lot) of binary (or script) files which can be executed. It would also copy certain configuration items that are useful for its execution and that can be used for changing the way it executes.

What comes up as a later realization that almost all programs don’t have everything they need to run in their installer packages. These things are generally known as dependencies.
Dependencies have a very big pro that if multiple programs share the same dependency then even after installing all those programs you just have 1 copy of the dependency i.e. unnecessary code bloat is avoided. (of course it does also mean that installer package is smaller…but I think one-time pains don’t count as much as living eternally with 2 copies)
But this also leads to a con. Breaking the dependency mean breaking 2 things at once. That is the reason you might hear someone saying this is very core component. Core component would inadvertently mean that it is being used at a lot of places (this _might_ also mean that it is doing something very important….but that is usually a secondary concern).
Also, dependencies mean that there would have to be installer program that executes and checks the target system if the dependencies are already there or not. After that its upto this installer program to maybe provide the dependency (programs) on its own (download it….or may be unpack it from its own body). This makes installer programs so useful and complicated (of course you can have installer which just copy the application and don’t care about dependencies…but then either you have to be smart enough to prepare your system or the program would simply not work)

Now imagine a program which doesn’t have *any* dependency, it has to be the simplest one to be installed. All it needs is a copy of its executables at particular places and a copy of its configuration at another set of particular places.
Notice I said imagine…but such programs do exist and I bet you are using at least one of them right now…the Operating System — its the most important piece of software that would be running on your system right now but still it is a stand-alone giant (well mostly….there can pluggable thing in OS as well….but those usually don’t render it useless in their absence).
Now moving our discussion of installers forward, OS installations have to be the simplest one to do. After all it just needs some hard disk space and some files to be kept on that place on the hard disk (and an initial config of bootloader to push the start button….but for now we’ll forget the boot-loader).
But thats not the picture of OS installer that is usually painted. I am sure you would have seen OS installers which feel too supreme in their own rights and always ask you to boot from the installation media (woah!! funky name ). They are now becoming lenient and allow you to start installation from an already running OS but even then the job is half done. Most of the OS installation still runs stand-alone.

I was always under the same impression that OS installation is a big thing until 2 weeks back when I planned to install another OS on my phone (yes, you read it right–on my phone…this is one of the coolest thing that I can do on my phone *without* voiding any warranties). Anyways, mostly I connect my phone on my laptop and do stuff because typing on small screen for long time is a real mess. But this time I was out of luck. This is when I got this crazy idea to do it all on my phone itself. When I started to think about it, I was able to enumerate exactly 4 steps in which this could be done:
* Make place on SD card
* download OS files
* copy them on the card
* configure boot-loader
* reboot (well this is fifth step but I don’t want to count it:)
I was perplexed that can it really be this simple? And it turned out that it was. I just connect my phone to Wifi at home, browsed to shr-unstable, downloaded the latest OS image (a simple .tar.gz…but for people on Windows, its something similar to a zip file). Then I fired up a shell (on my phone), created a partition, copied the the tar image to that partition and un-tarred (unzipped) it there.
For my case telling the boot-loader to load this OS was pretty easy, I just had to put a file named noboot-GTA02 on the first partition (from where the phone was currently running). Next step reboot and I was on.

BTW, I am over-simplifying the OS installation process a little bit here. In my case the hardware was fixed (the image of the OS is specifically built for my phone). But even then the steps of installing it on any modern machine has to be similar. All the installer can optimize upon is copying only specific files (depending upon the current platform). Nothing that cannot be done on an already running system.
I have heard that Debian with debootstrap and Gentoo do it already as Linux distributions. I know there are ways to make bootable pen-drives on fedora/ubuntu so I am pretty sure that method can be hacked to install fedora/ubuntu on another hard disk. I wonder when would Microsoft do it (I think they have already started doing most of the copying [copy all the media] and setup bootloader to reboot machine in OS installer from existing intallation). I don’t expect this to be done by Apple (they have their heads held too high to even think of these kind of petty stuff which excite the people in a geeky way).

To conclude, given the installation media (yes, I also use the grand terms :), one should be able to boot it right up to install on a bare system or do a manual copy kind of install.

PS: A note on bootloaders. I had (intentionally) skipped the complexity of boot-loaders for 3 reasons:
* they are not part of OS
* even including them doesn’t complicate the process so much that installers can’t do it.
* the discussion could have diluted the essence of the original topic

Powered by ScribeFire.

For around 2 weeks now, I have not been using my Freerunner and its not because I have started to like my older phone over it, but because I tried zhone+FSO+Debian and now I literally can’t go to Om2008.9. FSO is not complete yet, which is why I really don’t want to use it right now.
Anyways that gives me some time to jot down the Freerunner’s s/w structure.

This para is dedicated to the way I moved with different s/w on my phone. You can skip this para completely.
Freerunner ships with Om2007.2 which, although stable, has a completely unusable UI. It was so unusable that I didn’t hold onto it for long. IIRC, it was 1.5 days that I had switched to Qtopia. Even qtopia didn’t impress me much and then along came ASU (Om2008.8) which held onto my phone the longest. I gave FSO a try at each of their milestone but it didn’t look nice enough to go along. But this time they got enlightenment in. That is when I was impressed enough to not to go back to ASU. This time I tried Debian and installed xfce which I couldn’t get to work and was hit upon by this post which explained how to get enlightenment on debian. That worked like a charm. So, come to think of it, I got a setup where I had the whole repo of Debian (which is powered by FSO) and then enlightenment was also in. Of course the things missing in FSO are still missing, I can’t really start using it. But to me the setup looks really promising.

Hmm…so there are lots of terminologies in the previous paragraph (in case you read it). Lets see what it all means.
To start with, Freerunner essentially runs on mainstream linux kernel and the filesystem is also similar to any regular linux desktop installation. Its not loaded with infinite modules as it really doesn’t have as much resource as usual desktops have.
Then there are device nodes which applications use to access things like modem or gsm antenna. And there is really no defined way of accessing these in a shared way. Or should I say there are multiple ways of doing it and thats where the diversity is.
Lets say that there are a bunch of of softwares which assist in this shared access and this bunch forms a software stack.
Then there is the usual linux window-manager/X concept which is responsible of managing multiple windows (showing title bar, z-ordering, alt+tabing, etc).
These 2 basically form the system and rest all is done by applications. All this, as a complete package make up a distribution.

Now, lets look at some distributions and how they manage these stuff.

Om2007.2: I didn’t really use it for long and hence I don’t know for sure. But it had got different daemons (like gpsd, gsmd, etc) that made up the stack. It had its own desktop app which showed basic button for launching other app, currently running apps, and dialer. It was largely based on X I don’t think it really had a window manager.
Qtopia: This distribution is managed by Qt and comes for lots of systems. Qtopia has a monolithic process (qpe) which handles the stack stuff. Qtopia doesn’t have a X server, it works directly on the framebuffer. Only QT based apps are allowed. The runtime takes care of handling the Qtopia canvas.
ASU (Om2008.8): This is the second distribution from Openmoko itself. Its stack was mainly based on Qtopia and hence had qpe handling all the stuff. What was interesting here was that OM had still gone ahead and used X server. They had a runtime library which exported calls similar to those needed by QT apps. But this library used X server under the hood. Hence, one could have gtk based apps as well. In fact any other app which worked based on X server for UI could be run and QT based app were additional profit. IT also had a window manager — enlightenment and an app illume which showed the current apps. There is actually lots with illume which was never given with OM but was essentially a part of the distribution. Search for ‘Raster keyboard’ for a heated discussion for the keyboard app.
BTW, with updates it has been be renamed to Om2008.9 and Om2008.11 is expected soon.
FSO: The big deal about it is the framework (software stack). The stack is based upon DBus and exports everything at hardware level as service to the apps. All the hardware mangement is done by the framework. For UI, X and illume/enlightenment take care of everything. There is a an app names Zhone (Zen phone) which allows dialling, messaging, contact, etc)
Debian: By default fso makes up the software stack and comes with matchbox installed as window manager. But enlightenment and illume can be easily configured. This makes it as good as FSO but there is a very big additional advantage and that is the availability of all the apps that can be installed on a desktop Debian installation.

This essentially wraps the current distribution on Freerunner. Hope it gives you a fair idea of whats going on in the Freerunner software world. I have left out the links in this post specifically because interested people should rather look at wiki.openmoko.org.

Powered by ScribeFire.

Prelude: This post was started a year and a half ago when I was shedding off my SamsungC110 but could never be completed. I am revisiting it again now that I have moved on from my Sony Ericsson as well.
But just to keep the sanctity of my previous post, I would keep a chronological order and divide the post in 2 parts.

Part 1:

Reluctantly and with a blessing of a minor accident, I had to let go my Samsung C100. I had been using this phone for some 2-3 years and had grown an impression that this phone was all I need. After all this phone allowed me to make phone calls, send/receive sms, had phonebook features, a 16bit color display with 128×128 reso, gprs capability, IR port, basic java support. It could show me basic wap based websites and I thought internet on phone is unnecessary anyways.

But then I got my hands on my new phone Sony Ericsson w830i. This phone has all the feature of my previous phone except IR which was substituted by a better way–bluetooth. It flaunts of 262,144 colors with 240×320reso, awesome speaker set (well known for the w-series), first time slider from Sony (and hence the bulk as compared their later releases of the same), FM, 2MP camera with video recording, better java support.
This phone shattered my closed perspective of device convergence. I now just keep on listening to songs that I have loaded onto it (I am not too fond of FM)…I prefer this over television. With better java support I got Opera mini and an unlimited data plan for my connection…to get internet on my fingertips at all times.

Although, I am still of the opinion that sometimes manufacturers try to push too many unrelated things onto phone, but if we apply our needs and available models, we can definitely get something which is not just phone but a device worth carrying at all times as well.

Part 2:

I am still fond of my Sony Ericsson, but a couple of months back I got to know about Openmoko Freerunner. This phone would lose hands down in terms of stability and usability to any phone currently on the market. But what is awesome about this phone is its hardware.
To tell in few lines this is computer powered with AMDv4 processor @400MHz, 128 MB RAM, 256 MB Flash based non-volatile storage. Along with all this it has got, 640×480 touchscreen, 2 push buttons, a pair of 3D accelerometers, GPS (AGPS) chip, Wifi, bluetooth, minimalistic 3D acceleration card, SDHC enabled µSD card slot, and of course a GSM modem with GPRS (no EDGE or 3G). (btw, you might have noticed the absence of camera and FM….but I guess I can live without it).

Thats not all, its just not that it has got all this harware. The best part about all this is that the whole design/schematics of the phone are open. The CAD files are available freely and anyone can (and is invited to) change the model and create a phone of their own. I think Koolu is working on the same model.
Moreover, all the chips except glamo (graphics card) and ti’s gsm modem have completely open specification.  Glamo seems like a closed case and that they might not open their chip ever. Although, it seems that they are ready to share their doc under NDA and those NDA’ed guys can publish the doc under their name (Glamo won’t take any responsibility for the doc). With TI, they won’t open the chip’s spec but we do have it respond to standard AT commands and that should be nice. Moreover, TI has agreed to allow the end-user to flash the modem’s firmware to fix the issues.
Whoa, did you really read the last sentence. Did you notice that I just said ‘end-user’ can ‘flash’ ‘modem firmware’. Yeah, I know some of you would say that this should just not be necessary and I am sure it won’t be for later releases. But the main point is the end-user (I) CAN flash modem’s firmware.
To sum up the hardware, I guess we can see the analogy with opensource software working with propritary drivers. In fact freerunner is really about bringing open-source to hardware (Is it the first to do so??? I don’t know).

That was about the hardware, but it just doesn’t end there. The software feel is also cool. Do you remember that I said Freerunner is a computer. Well it is so, and like any other computer I can install other OS (apart from the ones that it shipped with or the ones provided by OEM), I can make it dual-boot. The OS that currently runs on it is of course Linux (current version is 2.6.24…so you see its the real mainline version). There are multiple distributions/sw-stack available and I can choose to get anyone. Did you see one of them is Android. Yes, I can be using Android without shelling $ for T-Mobile connection (that too if I was in US….for me, Freerunner is the only option).

Now, let me come back to the losing-hands-down-on-stability-and-usability part. The hardware for this phone is wonderful. But the software is still heavily under development. The development is so much in progress that sometimes the stable marked images (flashable OS) fail to register to the network. But the developers are not to be blamed for everything there. It rather an outcome of closely developed implementations of the GSM standard by the network providers. The software work fine where the developers are, but it fails to the job everywhere.
Nevertheless, since its all software that causes the stress mostly, it can be easily fixed. I am really optimistic of getting a neighbour’s-envy-owner’s-pride class image soon. In fact Openmoko recent initiative (FSO) have just released their 4th milestone and the community discussion suggest that its really promising. I would spend this weekend on it and see if it really holds for true.

To end up, I guess Freerunner is not really a product that can go on the shelf of a shop so as to be used out-of-the-box. But Openmoko has really convered a lot given its just their second released model.

Powered by ScribeFire.