{"id":66,"date":"2014-01-01T23:53:02","date_gmt":"2014-01-01T18:23:02","guid":{"rendered":"http:\/\/openconsoles.org\/blog\/?p=66"},"modified":"2014-01-01T23:53:02","modified_gmt":"2014-01-01T18:23:02","slug":"embedded-linux-development","status":"publish","type":"post","link":"https:\/\/sandeepmathew.com\/index.php\/2014\/01\/01\/embedded-linux-development\/","title":{"rendered":"Embedded Linux Development"},"content":{"rendered":"<p>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 !.<\/p>\n<p><span style=\"text-decoration:underline;\"><strong>Step 1 &#8211; Learning how to develop a Linux distro by hand<\/strong> <\/span><\/p>\n<p>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 \u00a0system from scratch. Also vim is one true editor, learn to use vim &#8211; use vim as the IDE ,period.<\/p>\n<ol>\n<li>\u00a0<a href=\"http:\/\/www.linuxfromscratch.org\/\">http:\/\/www.linuxfromscratch.org\/<\/a><\/li>\n<li>\u00a0<a href=\"http:\/\/www.tldp.org\/LDP\/Pocket-Linux-Guide\/html\/\">http:\/\/www.tldp.org\/LDP\/Pocket-Linux-Guide\/html\/<\/a><\/li>\n<li>\u00a0<a href=\"http:\/\/www.linuxfromscratch.org\/hints\/downloads\/files\/uclibc-bootfloppy.txt\">http:\/\/www.linuxfromscratch.org\/hints\/downloads\/files\/uclibc-bootfloppy.txt<\/a><\/li>\n<li>\u00a0<!-- m --><a href=\"http:\/\/freshmeat.net\/projects\/natld\/\">http:\/\/freshmeat.net\/projects\/natld\/<\/a><\/li>\n<li><!-- m --><a href=\"http:\/\/www.xs4all.nl\/~lennartb\/installdisk\/index.html\">http:\/\/www.xs4all.nl\/~lennartb\/installdisk\/index.html<\/a><!-- m --><\/li>\n<li><!-- m --><a href=\"http:\/\/modest-proposals.com\/Hacklin.htm\">http:\/\/modest-proposals.com\/Hacklin.htm<\/a><\/li>\n<li><a href=\"http:\/\/buildroot.uclibc.org\/\">http:\/\/buildroot.uclibc.org\/<\/a>\u00a0 &#8211; Buildroot website<\/li>\n<\/ol>\n<p>The modulus of operandi is as follows<\/p>\n<ul>\n<li>Build a root file system structure with what you need<\/li>\n<li>Compile the\u00a0 kernel with barely enough features needed<\/li>\n<li>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<\/li>\n<\/ul>\n<ol>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Comparison_of_boot_loaders\">https:\/\/en.wikipedia.org\/wiki\/Comparison_of_boot_loaders<\/a><\/li>\n<li><a href=\"http:\/\/lennartb.home.xs4all.nl\/bootloaders\/\">http:\/\/lennartb.home.xs4all.nl\/bootloaders\/<\/a><\/li>\n<li>Network booting Linux :-\u00a0<a href=\"http:\/\/www.sanitarium.net\/golug\/netboot.html\">http:\/\/www.sanitarium.net\/golug\/netboot.html<\/a><\/li>\n<li><a href=\"http:\/\/www.linuxhomenetworking.com\/wiki\/index.php\/Quick_HOWTO_:_Ch07_:_The_Linux_Boot_Process#.UbgNE_mRAkU\">http:\/\/www.linuxhomenetworking.com\/wiki\/index.php\/Quick_HOWTO_:_Ch07_:_The_Linux_Boot_Process#.UbgNE_mRAkU<\/a><\/li>\n<\/ol>\n<ul>\n<li>Setting various configurations files like initab, fstab etc<\/li>\n<\/ul>\n<p><strong>NOTE: if you are completely new to linux environment , you should check out the guide and tutorials in tldp.org \u00a0( The Linux Documentation Project )\u00a0<\/strong><\/p>\n<p><span style=\"text-decoration:underline;\"><strong>Step 2 &#8211; Learn and play around with POSIX API<\/strong><\/span><\/p>\n<p>Linux is after all a POSIX complaint system there are plenty of resources available to learn \u00a0POSIX programming .<\/p>\n<ol>\n<li><a href=\"http:\/\/tldp.org\/LDP\/lpg\/index.html\">http:\/\/tldp.org\/LDP\/lpg\/index.html<\/a>\u00a0&#8211; Linux Programming Guide<\/li>\n<li><a href=\"http:\/\/www.advancedlinuxprogramming.com\/downloads.html\">http:\/\/www.advancedlinuxprogramming.com\/downloads.html<\/a>\u00a0 &#8211; Advanced Linux Programming , available for download<\/li>\n<\/ol>\n<p><span style=\"text-decoration:underline;\"><strong>Step 3- Learn various Linux File systems<\/strong><\/span><\/p>\n<p>Conventional ones include ext based on ones and those with journaling support \u00a0brtfs , jfs ,xfs , ReisesFS . Linux supports something known as VFS &#8211; 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 .<\/p>\n<p>Linux includes support for various embedded file systems like f2fs , &#8211; file system optimized for nand flash , read only squashfs file system \u00a0, tmpfs for storing stuff in ram. \u00a0The \u00a0mtd devices are found in \/proc\/mtd \u00a0. Typical embedded file systems include jffs2 \u00a0, yaffs2 , ubifs ,<\/p>\n<p><span style=\"text-decoration:underline;\"><strong>Step4 Learn about device drivers and about the linux kernel<\/strong><\/span><\/p>\n<p>Programming device drivers :\u00a0<a href=\"http:\/\/lwn.net\/Kernel\/LDD3\/\">http:\/\/lwn.net\/Kernel\/LDD3\/<\/a>\u00a0. \u00a0 The best book on linux kernel in my opinion is by Bovet and Cesati. <a href=\"http:\/\/www.amazon.com\/Understanding-Linux-Kernel-Third-Edition\/dp\/0596005652\">http:\/\/www.amazon.com\/Understanding-Linux-Kernel-Third-Edition\/dp\/0596005652<\/a>\u00a0. It is very well worth your money . But never hesitate to play around and tinker with stuff ! . \u00a0After this you have probably gained mastery over all aspects !. \u00a0I am listing few libraries that came to my head \u00a0. The list is no where near complete.<\/p>\n<p><strong><\/strong><span style=\"text-decoration:underline;\"><strong>Light Weight Libraries\/Tools to look at<\/strong><\/span><\/p>\n<p>C Libraries:<\/p>\n<ul>\n<li>uclibc :- http:\/\/uclibc.org ( also look at busybox !)<\/li>\n<li>eglibc:- eglibc.org<\/li>\n<li>dietlibc<\/li>\n<li>klibc<\/li>\n<li>pdpc &#8211; public domain c library<\/li>\n<\/ul>\n<p>Networking:<\/p>\n<ul>\n<li>dropbear \u00a0-ssh<\/li>\n<li>webservers :- lighthttpd \u00a0, boa , thttpd<\/li>\n<li>avahi , bind , iw tools<\/li>\n<\/ul>\n<p>For Graphics :<\/p>\n<ul>\n<li>SDL &#8211; libSDL.org<\/li>\n<li>DirectFb &#8211; directfb.org<\/li>\n<li>Kdrive<\/li>\n<li>MicroWindows \/ NanoX &#8211; microwindows.org<\/li>\n<li><a href=\"http:\/\/www.exploits.org\/v4l\/\">http:\/\/www.exploits.org\/v4l\/<\/a>\u00a0 &#8211; Video for linux<\/li>\n<li>TinyGL by fabrice bellard<\/li>\n<\/ul>\n<p>Databases:<\/p>\n<ul>\n<li>sql lite<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>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 !<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/sandeepmathew.com\/index.php\/wp-json\/wp\/v2\/posts\/66"}],"collection":[{"href":"https:\/\/sandeepmathew.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sandeepmathew.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sandeepmathew.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sandeepmathew.com\/index.php\/wp-json\/wp\/v2\/comments?post=66"}],"version-history":[{"count":0,"href":"https:\/\/sandeepmathew.com\/index.php\/wp-json\/wp\/v2\/posts\/66\/revisions"}],"wp:attachment":[{"href":"https:\/\/sandeepmathew.com\/index.php\/wp-json\/wp\/v2\/media?parent=66"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sandeepmathew.com\/index.php\/wp-json\/wp\/v2\/categories?post=66"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sandeepmathew.com\/index.php\/wp-json\/wp\/v2\/tags?post=66"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}