Tuesday, August 25, 2009

Embedded Linux - Pre-requisites

Lately I have been talking to people who are interested in learning Embedded Linux. Most of them are application developers or embedded software developers. Mostly this query is related to the fact that Embedded Linux professionals are in high demand in the market now and are also paid very well. So they want to learn Embedded Linux and upgrade themselves in the job market.

So, one of the basic questions that I am asked is: What is Embedded Linux? There can be several answers to this question but the simplest one is: Embedded Linux is a customised Linux kernel with minimal file system, applications, tools and utilities which is to run on an proprietary Embedded hardware. The Embedded hardware is typically designed for specific purpose like routers, ethernet switches, set-top boxes, mobile handsets, PDAs, etc. The aim of Embedded Linux is to run on the given hardware with maximum possible efficiency and stability, and minimum failures or faults.

If you have worked with any Linux distribution, say Fedora, Debian, Ubuntu, Suse, Mandriva or anything else, you may have noticed that each distribution offers you numerous application, tools and features to give you the best possible desktop working environment. Hence it inflates the size of the installation done on your h/disk, which goes easily beyond 4 GB for the most generic installation without special features enabled.

Now, if you know something about Embedded Systems, there are two things about it. One, its normally not generic and other is that you always have constraints on the memory - RAM and other non-volatile memory. The hardware used in Embedded Systems is also not generic, so you need specific changes done to your Operating System (OS) to work on the Embedded hardware. Also you need to tweak the OS to make it work within the RAM and non-volatile storage in the hardware. Lastly you need to leave out all the unnecessary applications and features of desktop that are not required by the end system.

Embedded Linux development should take care of the above three points.

1) Make the OS portable for the new hardware, including the bootloader software.

2) Optimise the size of the OS w.r.t to features and applications, and also device drivers.

3) Test the optimised OS for functionality and stability, just like any other OS.

Another variable is that several processors other than Intel x86 family are used in h/w design, so there is ample work done to port the Linux OS and device drivers to work with the other processors.

Like any other advanced skill set, Embedded Linux also has some pre-requisites that must be satisfied by the learners to understand it much better. In fact the list is quite long. Here goes:

. Bootloaders - U-Boot for example
. Excellent knowledge of C programming, shell script and Makefile, including C libraries
. In depth knowledge of Linux OS, including the Linux filesystem, tools, applications and various libraries that Linux uses
. Device driver development knowledge
. Sound knowledge on Data structures and Operating System (Schedulers and Processes). If possible Real-Time Operating Systems
. Software development processes and methodologies
. Familiarity with different processor architectures and their assembly instruction sets - x86, ARM9, ARM11, PowerPC, MIPS, Motorola
. Knowledge of compilers and cross-compilers and using them - GCC Tool-chain is mostly used
. Working with open-source code - understand, modify and compile
. System design and system knowledge to define what you need to have in your system

Last but not the least, you need a never-say-die attitude to work with Embedded Linux. Without that not much will be achieved.

So, general advice is that unless you are fluent with the above, you may face lots of hinderances in your learning process. You may be able to find solutions and resolutions on the Internet forums, but not always.

Its tough but not impossible. Its seems crazy at times but its possible to make good sense out of it. Its not for everyone but many have succeeded. So, take a shot at Embedded Linux and see what you are able to achieve.

Monday, August 17, 2009

Blogging Hiatus over

This blog has had a slow progress. In fact I observe that its exactly 11 months ago that I had posted my last Linux related mutterings. But as the previous blogs had mentioned, I am doing exactly that, earning my bread through Linux and related stuff. Butter is yet to show up.

Its been a tough year and I still haven't started looking out for a job. So, the initial hiccups are over and now I am in the process of stabilising my freelance career. I have had a good patch with corporate trainings, a bad patch with illness and then another good patch with my association with IIT Madras that is still running. I have had a bad patch with corporate trainings, thanks to the world-wide recession and short-sighted managers who think that saving on training expenses will 'actually' be good for their company. But I am still in the business of Linux based training and development which was my intention last year, first post. I wouldn't say that I have achieved success yet but I am progressing.

One of the best things that happened in last 11 months was that I got associated with IIT Madras for developing a Linux based DSP Training Program. I am working on a Embedded Linux platform based on Analog Devices' Blackfin DSP processor. I have contributed to the U-Boot and Device Driver (Audio codec AC'97) development of the training board Linux software. Now working on some DSP experiments on the Linux platform for signal processing.

In last few months several people have been enquiring about Linux based trainings, especially Embedded Linux. More on that in my next post. It will happen soon.