Although having no real world experience in embedded Linux development, I was deeply interested about the subject. I therefore read many books on the subject and the sad part is there is nothing that cannot be found online. I basically wasted money on the book, I therefore present summary of what I read and plenty of web references so that you save money on those books !.
Step 1 – Learning how to develop a Linux distro by hand
There are plenty of projects that help you do this , only difference is that them most books make use of uclibc or newlib instead of the standard glibc . These are the set of resources that will help you get started on rolling a base linux system from scratch. Also vim is one true editor, learn to use vim – use vim as the IDE ,period.
- http://buildroot.uclibc.org/ – Buildroot website
The modulus of operandi is as follows
- Build a root file system structure with what you need
- Compile the kernel with barely enough features needed
- Installing the boot loader , In previous linux versions pre 2.6 i guess , you may get away without installing a boot loader . A summary linux bootloaders is given in following pages
- Network booting Linux :- http://www.sanitarium.net/golug/netboot.html
- Setting various configurations files like initab, fstab etc
NOTE: if you are completely new to linux environment , you should check out the guide and tutorials in tldp.org ( The Linux Documentation Project )
Step 2 – Learn and play around with POSIX API
Linux is after all a POSIX complaint system there are plenty of resources available to learn POSIX programming .
- http://tldp.org/LDP/lpg/index.html – Linux Programming Guide
- http://www.advancedlinuxprogramming.com/downloads.html – Advanced Linux Programming , available for download
Step 3- Learn various Linux File systems
Conventional ones include ext based on ones and those with journaling support brtfs , jfs ,xfs , ReisesFS . Linux supports something known as VFS – or virtual files system which provides a generic interface that is used across files systems . The concept is very similar to inheritance concept in C++ , although Linux kernel is written in C , VFS is a good example that shows that modularity can be attained even if the underlying language does not support it .
Linux includes support for various embedded file systems like f2fs , – file system optimized for nand flash , read only squashfs file system , tmpfs for storing stuff in ram. The mtd devices are found in /proc/mtd . Typical embedded file systems include jffs2 , yaffs2 , ubifs ,
Step4 Learn about device drivers and about the linux kernel
Programming device drivers : http://lwn.net/Kernel/LDD3/ . The best book on linux kernel in my opinion is by Bovet and Cesati. http://www.amazon.com/Understanding-Linux-Kernel-Third-Edition/dp/0596005652 . It is very well worth your money . But never hesitate to play around and tinker with stuff ! . After this you have probably gained mastery over all aspects !. I am listing few libraries that came to my head . The list is no where near complete.
Light Weight Libraries/Tools to look at
- uclibc :- http://uclibc.org ( also look at busybox !)
- eglibc:- eglibc.org
- pdpc – public domain c library
- dropbear -ssh
- webservers :- lighthttpd , boa , thttpd
- avahi , bind , iw tools
For Graphics :
- SDL – libSDL.org
- DirectFb – directfb.org
- MicroWindows / NanoX – microwindows.org
- http://www.exploits.org/v4l/ – Video for linux
- TinyGL by fabrice bellard
- sql lite
I summarize my bookish knowledge on embedded linux in general , if someone thinks more can be added , drop in a comment. I am almost sure no even a single soul reads my blog but i am hoping that some random soul will comment and suggest some improvemnts !