Author: sandeep.sandos
MIT OCW Project
This is a long pending “to do item” of mine. Having a blog is a good way to keep notes of what i have learned. I plan to read each and every computer science graduate course from MIT and write notes about what I have understood. May be even about my own ramblings of the course. Hopefully I gain additional knowledge. It may not be perfect. But I am hoping that It does help me in reviewing my material later. I prefer reading than actually watching videos. I will read as much as possible and post summary here. Hopefully it is helpful to me and others.
India’s contribution to Open Source
I myself being an Indian developer is ashamed to say that not many of us write open source software ( myself included ) . To be brutally honest with myself and rest of you, I think I lack personal focus, I am trying my best to fight with it and build something great. Hopefully everything turns out well. Trovalds nailed it here.
Unless we have something on our own , something that is unique to India we will all be serving the west ( Europe and USA ) . I think this should change for our country’s benefit. Let me build knowledge when I am in US and then later go back to India and work on what I am most passionate about. Life in USA has taught me humility, taught me that I am quite a useless guy – I will learn good things from here and take it back to my country. I like the fact that people here are very disciplined and organized in work, polite and considerate in public places. Nevertheless , I am really sad here – My family is back in India and I really like it back home. Hopefully when I am done with my doctorate in Computer Science- I might get to do what I truly love. I must practice discipline, restraint ( talking, spending, activities , eating … ) and focus.
“Again, the kingdom of heaven is like a merchant seeking fine pearls, and upon finding one pearl of great value, he went and sold all that he had and bought it.”
“Do not store up for yourselves treasures on earth, where moth and rust destroy, and where thieves break in and steal. But store up for yourselves treasures in heaven, where neither moth nor rust destroys, and where thieves do not break in or steal;“.
This post is less on software engineering but more on my false sense of self worth at times.
AsciiDoc
I came to know about ascii doc recently , just edit your document in plain text files and publish it to multiple formats . Since ascii is plain text file , you can even use a normal text editor store it and the document remains largely readable 🙂 . Ascii doc FTW ! .
I am thinking of creating an e-learning website almost completely in ascii doc.
Android Programming Notes
Basic Application elements
- Views – TextBox etc ,
- GroupViews – LinerLayout etc
- Activity – Main Screen and other screens
- Intent – Communication mechanism between Activities
Android Activity Life Cycle ( Names are kind of self explanatory ! )
- OnCreate
- OnStart
- OnResume
- OnPause
- OnPause
- OnStop
- OnDestroy
findViewById(R.id.response) :- find the view by id in xml file , Cast it to appropriate class
Toast for displaying small messages
startActivity(intent) to create an new intent
Layouts
- Relative
- Absolute
- Lenier
- Table
- Grid
Log.* for logging (DDMS)
Its is actually very easy , Most of it it there in SDK documentation. I will read the SDK doc to get stuff done for the most part . Bye for now . This is not supposed to make sense for anyone other than myself gg 😀
Android device not regonized ?
Borrowed from Stackoverflow . Keeping it here for my ready reference
http://stackoverflow.com/questions/7594975/why-is-eclipse-and-adb-not-recognizing-my-android-device
First, check the kind of quotes you are using in your udev rules. It looks like you might be using non-ASCII double quotes. See the difference between the quotes around usb and usb_device, etc.
UBSYSTEM=="usb", SYSFS{idVendor}=="1bbb", MODE="0666"
SUBSYSTEM==”usb_device”, SYSFS{idVendor}==”1bbb”, MODE="0666"
You can also just use sudo with ADB, as suggested by @JeremyD. Doing that makes this file essentially irrelevant.
Second,
- Edit
~/.android/adb_usb.ini(or if you are running as root, check/root/.android) - Add
0x1bbbto the end of the file if it already exists, otherwise do:echo 0x1bbb >> adb_usb.ini adb kill-serveradb start-server- Check output of
adb devicesfor your device
Good video
http://www.scotthyoung.com/blog/mit-challenge/
Confession
Hey ,
my blog may contain lot of errors , i do not think many people ready my blog . I am therefore posting these as notes to myself , but if someone did bump into my blog , I still hope that they find this garbage useful !. Please understand that none of it is authoritative
Embedded Linux Development
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://www.linuxfromscratch.org/
- http://www.tldp.org/LDP/Pocket-Linux-Guide/html/
- http://www.linuxfromscratch.org/hints/downloads/files/uclibc-bootfloppy.txt
- http://freshmeat.net/projects/natld/
- http://www.xs4all.nl/~lennartb/installdisk/index.html
- http://modest-proposals.com/Hacklin.htm
- 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
- https://en.wikipedia.org/wiki/Comparison_of_boot_loaders
- http://lennartb.home.xs4all.nl/bootloaders/
- Network booting Linux :- http://www.sanitarium.net/golug/netboot.html
- http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch07_:_The_Linux_Boot_Process#.UbgNE_mRAkU
- 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
C Libraries:
- uclibc :- http://uclibc.org ( also look at busybox !)
- eglibc:- eglibc.org
- dietlibc
- klibc
- pdpc – public domain c library
Networking:
- dropbear -ssh
- webservers :- lighthttpd , boa , thttpd
- avahi , bind , iw tools
For Graphics :
- SDL – libSDL.org
- DirectFb – directfb.org
- Kdrive
- MicroWindows / NanoX – microwindows.org
- http://www.exploits.org/v4l/ – Video for linux
- TinyGL by fabrice bellard
Databases:
- 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 !
Fltk!
Fltk stands for FAST and Light Toolkit , it as an easy to use UI framework in C++ with a very short learning curve also you should be able to desgin by drag n drop using FLUID . I discovered this rather late !
