Roma’s eBook on Baby Food Recipes

March 12, 2012

My eBook on Baby Food Recipes.


Hacks to reduce PokyLinux build time

June 30, 2008

PokyLinux is a very powerful build tool for embedded Linux platform. We have struggled in the past to cross compile various components to make our embedded Linux device usable. PokyLinux provides just the same. All you need to do is configure the components you want to build and it fetches them from all our the places, patches them, configures them, builds the required dependencies and in the end just gives you a filesystem which you can install on your device and ready to go.

The main drawback however we encountered with PokyLinux was the time it takes to build. Leaving aside the download time, the build time itself was quite huge. I tried to look at the individual components taking unnecessary or redundant dependency and wasting time building that. Hence came the following list of quick patches which can significantly reduce your build time.


Package dbus-glib has a dependency on dbus-glib-native. If we examine its recipe file we find that there are two files dbus-glib-bindings.h and dbus-glib-introspenct.xml that are needed by dbus-glib which dbus-glib-native provides. dbus-glib-native itself has a dependency on glib-2.0-native. glib-2.0-native cannot be set in ASSUME_PROVIDED because then the build of dbus-glib-native fails. And glib-2.0 is a huge package. It takes considerable amount of time to compile it. Hence the solution is to patch dbus-glib with the extra files needed and avoid the unnecessary build. This makes build of glib-2.0-native and dbus-glib-native (both i686 packages) unnecessary.

Index: packages/dbus/
— packages/dbus/
+++ packages/dbus/ (working copy)
@@ -3,11 +3,13 @@
DESCRIPTION = “message bus system for applications to talk to one another”
-DEPENDS = “expat glib-2.0 virtual/libintl dbus-glib-native dbus”
+# removed dependency on dbus-glib-native
+DEPENDS = “expat glib-2.0 virtual/libintl dbus”

SRC_URI = “${PV}.tar.gz \
file://no-examples.patch;patch=1 \
– file://no-introspect.patch;patch=1″
+ file://no-introspect.patch;patch=1\
+ file://dbus-glib-files.patch;patch=1”

inherit autotools pkgconfig gettext

@@ -15,8 +17,8 @@
FILES_${PN}-dev += “${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool”

– do_configure_prepend() {
– install -m 0644 ${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml ${S}/tools/
– install -m 0644 ${STAGING_DATADIR_NATIVE}/dbus/dbus-glib-bindings.h ${S}/tools/
– }

do_stage () {


In one of the build sequence, dbus was failing to build. The reason was that the sm library that dbus needs was not yet compiled. The issue was that the dependency on dbus was only on libx11 and not on sm. Adding the dependency fixed the problem.

Index: packages/dbus/
— packages/dbus/
+++ packages/dbus/ (working copy)
@@ -3,7 +3,7 @@
DESCRIPTION = “Message bus system for applications to talk to one another”
-DEPENDS = “expat glib-2.0 virtual/libintl virtual/libx11”
+DEPENDS = “expat glib-2.0 virtual/libintl virtual/libx11 libsm”



apt-native was a tricky issue. We cannot rely on host apt as it uses the host database and needs super user permissions for running. If we go ahead using it inspite of this reason there is a possibility of it corrupting host installed packages. This will render your PC useless. Hence we cannot put this in ASSUME_PROVIDED. But we can definitely get rid of some of its dependencies.

One such dependency is curl. curl is needed for fetching the code which has https uri. We do not use the apt in poky to download a package, hence this feature is anyway redundant. Building curl also as part of the dependency is totally useless. Hence we removed building of modules which uses curl in apt. This required editing the modules/makefile to remove hppts related module from being built.

Index: packages/apt/
— packages/apt/
+++ packages/apt/ (working copy)
@@ -1,12 +1,14 @@
inherit native

-DEPENDS = “dpkg-native curl-native db-native”
+DEPENDS = “dpkg-native db-native”
FILESDIR = “${@os.path.dirname(‘FILE’,d,1))}/apt-${PV}”
USE_NLS = “no”

SRC_URI += “file://db_linking_hack.patch;patch=1”
+SRC_URI += “file://apt-remove-https.patch;patch=1”

python do_stage () {‘do_stage_base’, d)

Index: packages/apt/files/apt-remove-https.patch
— packages/apt/files/apt-remove-https.patch
+++ packages/apt/files/apt-remove-https.patch
@@ -0,0 +1,21 @@
+Index: apt-0.7.3/methods/makefile
+— apt-0.7.3.orig/methods/makefile 2008-05-24 13:07:49.000000000 +0530
++++ apt-0.7.3/methods/makefile 2008-05-24 13:08:08.000000000 +0530
+@@ -53,11 +53,11 @@
+ include $(PROGRAM_H)
+ # The https method
+-SLIBS = -lapt-pkg -lcurl
+-LIB_MAKES = apt-pkg/makefile
+-include $(PROGRAM_H)
++#SLIBS = -lapt-pkg -lcurl
++#LIB_MAKES = apt-pkg/makefile
++#include $(PROGRAM_H)
+ # The ftp method

apt using db2

apt uses libdb4.2. Hence it tries to put db-native as a dependency. But db-native can be installed on the host (libdb4.2). But that does not help with the build of apt. And hence an application called apt-ftparchive fails to build. That is ok since apt is anyway installed on host and apt-ftparchive of host can be used when needed. But to complete the build this application has to be removed from installation.

Index: packages/apt/
— packages/apt/
+++ packages/apt/ (working copy)
@@ -1,12 +1,14 @@
inherit native

-DEPENDS = “dpkg-native curl-native db-native”
+#DEPENDS = “dpkg-native curl-native db-native”
+DEPENDS = “dpkg-native”
FILESDIR = “${@os.path.dirname(‘FILE’,d,1))}/apt-${PV}”

@@ -37,7 +39,7 @@
install -m 0755 bin/apt-get ${bindir}/
install -m 0755 bin/apt-config ${bindir}/
install -m 0755 bin/apt-cache ${bindir}/
– install -m 0755 bin/apt-ftparchive ${bindir}/
+ #install -m 0755 bin/apt-ftparchive ${bindir}/
install -m 0755 bin/apt-sortpkgs ${bindir}/
install -m 0755 bin/apt-extracttemplates ${bindir}/


gconf-dbus has dependency on intltool-native. When i removed this dependency (or rather made it part of ASSUME_PROVIDED) the configuration step of the build failed. This failed because the staging directory did not have intltool.m4 provided by intltool package. Hence i added an extra line in configure_prepend to copy this file from /usr/share/aclocal.

Index: packages/gnome/
— packages/gnome/
+++ packages/gnome/ (working copy)
@@ -1,5 +1,6 @@
SECTION = “x11/utils”
-DEPENDS = “intltool-native virtual/libintl glib-2.0 dbus dbus-glib libxml2 popt gtk-doc-native”
+DEPENDS = “virtual/libintl glib-2.0 dbus dbus-glib libxml2 popt gtk-doc-native”
DESCRIPTION = “Settings daemon using DBUS for communication.”
PROVIDES = “gconf”
@@ -22,6 +23,7 @@

do_configure_prepend() {
+ cp /usr/share/aclocal/intltool.m4 ${STAGING_DATADIR}/aclocal/
touch gtk-doc.make


This one was quite ridiculous. fontconfig had a dependency on both freetype as well as freetype-native. For the build of fontconfig for some reason it was taking the freetype-native’s header files instead of freetype (arm) header file. After i changed this dependency i could remove freetype-native from fontconfig’s dependency

Index: packages/fontconfig/
— packages/fontconfig/
+++ packages/fontconfig/ (working copy)
@@ -1,7 +1,8 @@
SECTION = “libs”
DESCRIPTION = “A library for configuring and customizing font access.”
-DEPENDS = “expat freetype freetype-native zlib”
+DEPENDS = “expat freetype zlib”

SRC_URI = “${PV}.tar.gz”

@@ -44,7 +45,8 @@
for i in ${S}/fontconfig/*.h; do install -m 0644 $i ${STAGING_INCDIR}/fontconfig/; done


do_configure_append () {
sed -i ‘s|LDFLAGS =.*|LDFLAGS =|’ fc-case/Makefile

xserver using xcalibrate

xcalibrate’s source is not present in the tar.gz format. Instead it is present as git. Hence there is a dependency on either host having git or git-native being built. Both are quite redundant. Moreover xcalibrate is needed by xserver. But our xserver actually uses tslib and hence there is no need to build xcalibrate.

Index: packages/xserver-mbx/
— packages/xserver-mbx/
+++ packages/xserver-mbx/ (working copy)
@@ -1,6 +1,7 @@

-DEPENDS += “libxkbfile libxcalibrate”
+# removed xcalibrate dependecy
+DEPENDS += “libxkbfile ”

PE = “1”
PR = “r18″
@@ -17,9 +18,7 @@
file://optional-xkb.patch;patch=1 \
file://enable-epson.patch;patch=1 \
file://enable-tslib.patch;patch=1 \
– file://enable-xcalibrate.patch;patch=1 \
file://hide-cursor-and-ppm-root.patch;patch=1 \
– file://xcalibrate_coords.patch;patch=1 \

S = “${WORKDIR}/xorg-server-${PV}”
Index: packages/xserver-mbx/
— packages/xserver-mbx/
+++ packages/xserver-mbx/ (working copy)
@@ -98,7 +98,7 @@
–disable-xevie –disable-xprint –disable-xtrap \
–disable-dmx \
–with-default-font-path=built-ins \
– –enable-tslib –enable-xcalibrate \
+ –enable-tslib \

do_configure_prepend() {

China, Travel and growing wiser

January 13, 2008

I have been in Thailand for almost 8 hours now. I am sitting in a cafe called Coffee world, having a veg sandwich and chocolate coffee for 250 Bhatts. The sandwich had a lot of mayonnaise. Feeling a little edgy for quite some time. The coffee was excellent. One of the best chocolate coffee i had.

I have just completed a small trip to Shanghai where i had to do some rampup on multimedia on Linux platform. Initial plan was for two weeks, but managed to complete the work within a week. Apart from my work i did some reading on the current affairs in local magazines and newspapers.

China is undergoing an increase in birth defects. According to a statistics, defects in Chinese infants rose from 104.9 per 10000 births in 2001 to 145.5 in 2006. Which is a 40 percent increase. The birth defects are related to environment pollution. For example a coal producing region called Shanxi recorded 189.86 defects in 1996. The government is taking this as a serious issue and is planning to take a number of steps. It plans to introduce pre-marital health checkup mandatory so that people can come to know of problems earlier and take actions about them before they have the baby.

China signed a 12 billion dollar agreement with France to buy two nuclear reactors and fuel from Areva(France). There was not much fanfare about this deal, and it did not really draw much attention. But it caught mine, why? Because in India we have been struggling for more than a year to sign a similar deal with US. The Left is opposing the deal as it would make us dependent on the powerful USA. Two things come up to my mind. Why is Left making such a big deal back in India? If it is about nuclear deal, then i am sure they can learn some lesson from communist china. If the deal is about USA, then what about other countries like France? By the way china has been part of WTO only recently.

Then there is some interesting political stuff from Thailand. Thailand recently concluded its parliament elections, and todays newspaper in Thailand carried some information on how politics work here. The rules somehow seem quite reasonable and if implemented in India for example can bring a great deal of sanity in the whole process of democracy.

  • Election Commission is empowered to strip the seat from a MP within 30 days if it finds out that the person did not follow election code of conduct. This results in a bye election.
  • The government is formed only if the number of bye elections to happen is less than 5%. Else the formation of government is postponed till the bye election happen.
  • The prime minister is elected by the elected MP’s. Each PM candidate has to be seconded by atleast 1/5’th MP’s. Each MP can vote for any candidate irrespective of his/her party. The party does not issue a whip to it’s MP’s to vote for a particular candidate.

Sitting here in the cafe, i suddenly realize how much more aware i am of what is happening around me. The fact that i am not in my own country, and that i am alone (not having to see if raina is having her meal or now) has in a way forced me to be aware of what is going around me. As they say, you grow wise as you travel more.

Doing more with iPhone

January 17, 2007

I watched Steve Jobs keynote at this years Macworld the other day where he announced the iPhone. There are so many good things about this product that you wouldn’t know where to start. It is truly a revolutionary product as Steve Jobs himself puts it and definitely way ahead of current mobile phones. One feature that I really liked was the way iPhones display would automatically change from portrait mode to landscape mode the moment you place the phone in landscape mode. This as Steve pointed out was determined by the accelerometer that iPhone has. Accelerometer is one technology i am quite fascinated about. You can use this technology to sense motion and do a lot of cool things with it. We had created a device where we were using the Accelerometer to know the user feedback by just shaking the device. If they shook the device vertically, the input would be a ‘Yes’, and if they shook it horizontally the input would be a ‘No’ (similar to shaking your head for a Yes/No answer). Though it would be futile to suggest some enhancement to iPhone which already is full with so many features, there is one thing i can’t help but observe.

Accelerometer can sense the motion in any of the three axis (x,y and z). It gives you these values as and when the device is moved. Something similar to a mouse, only that it gives you change in position in only a plane. Now if you can take this input from the accelerometer and feed it to the device(iPhone) as a mouse input, you have got yourself an input device for iPhone without actually attaching anything.

Now look how beautifully this can be used in iPhone. You are holding the iPhone in your (right) hand and are browsing lets say the songs in the iPod mode. You tilt the iPhone slightly by twisting your hand (in clockwise manner). Accelerometer senses the motion, gives an input to the iPhone to scroll up, and your playlist scrolls up. You tilt the iPhone the other way (twist your hand slightly counter clockwise) and the playlist scrolls down automatically. You are scrolling the playlist without actually giving any input to the iPhone (I can hear Steve saying “Isn’t this awesome ??”). Again imagine you are browsing the cover art. A slight tilt to the left and the cover arts starts moving to the left. A sligt tilt to the right and they start moving towards right.

Same use case can be demonstrated while browsing the google maps on the iPhone. Any motion (tilt) in the plane in which iPhone belongs can be taken as an input to pan the map you are viewing. Without having to touch the iPhone. Imagine you are driving in your car and you need to browse/scroll the map to see your current location. Without taking your other hand off the steering wheel, you can scroll the map just by tilting iPhone. Isn’t that amazing?

Though iPhone is a very cool device without any keypad inputs, i think it will affect it when they would want to put some cool games. You can do away without proper keys for dialing phone, browsing and listening to music. But when you are playing a game, it requires a quick response from the game which cannot really be given from a tochpad. Again by using the motion sensor of the iPhone, you can use it to play most of the games. Infact many cooler games which are restricted because of the keypad can be played on iPhone using its motion sensor as an input. One particular game that i like is the Neverball, where you move the ball by tilting the game world. You guide the ball through a path by tilting the game world so that the ball moves due to gravity. With iPhone in your hand you can actually tilt the iPhone and guide the ball. That would be truly amazing.

Infact Amit Singh (Author of the book Mac OS X Internals) has demonstrated this ability to take the motion sensor input back as HID input on his Macbook which has a motion sensor (I believe the reason why MacBook has the motion sensor is that so that it can sense when the MacBook is falling and can safely park the hard drive before it gets the shock when it hits the floor). He also has a quicktime movie where he shows how he has used this to play the Neverball game. Its really awesome. Once you watch the movie you just feel like playing that game on the iPhone.

Lets hope Apple uses the accelerometer in much more cooler way than to just change the screen from portrait mode to landscape and vice versa.

technorati tags:, , , , , , , ,


August 14, 2006

Yesterday I took my wife to watch Othello, a play in black and white at rangashankara. Recently i have begun a liking to Shakespeare’s plays. I got hold of a copy of all the Shakespeare’s play in its original archaic English. Once you get the hang of the language its actually a good read. Its not really the Shakespeare play as such, but the adaptation of it that i have begun to like. Its quite easy to take the script and present it in its original form (rather difficult to memorize those lines). The first adaptation i saw was Footsbarn’s Perchance to Dream. It was a journey of man from his birth until his death presented in the form of various plays from the bard. The next was Hamlet by neeraj kabi. An amazing mix of hindi/English and Dhrupad/Yakshgana. And now Othello.

The play is about these set of actors who get together to stage Othello. They invite a guest director (Roysten) to direct their play. The actors come to the audition thinking that they will be cast with the roles they have in mind. Bary, the oldest of all and the most experienced believes he is the perfect suit for Othello. He even paints his face black during the audition and enacts the first scene as Othello. Vivek with an air of superiority around him hopes to be casted as Iago. And then there are Dilip and Katherine (was that her name ?) who would take Cassio and Desdemona’s part. But surprise comes in form of Adil. He is not sure what part he will play. He is not quite conversant in English, is quite shy to even speak up. Just talks in whispers and always remains in the sidelines too shy to occupy the center stage. But the director sees something in him, and casts him as the Othello. The director asks him and finds out that he is an NSD graduate and has been learning Kathakalli. An interesting mix (This is where the director describes him as ‘a typical NSD guy’). Bary is made Iago amidst protest that Iago should be someone young and not old. Vivek lands up in multiple roles of Roderigo, Lodovicio. And this is where the theater enters the real life of these actors.

Bary is hurt that the part of Othello that he has been playing all his life has been stripped off him. He becomes Iago in actual life and colludes with Vivek to teach the director a lesson. Vivek, the proud know it all actor is hurt that he has none of the leading roles in the play. Instead he has been degraded to filler roles. He joins up with Bary hoping to dismantle Adil and steal his role of hamletOthello. Here he becomes Lodovicio in real life whose Desdemona (symbolizing the main role in the play) has been stolen by Adil(Othello in the play).

The story of Othello meanwhile flows as the actors rehearse their lines. Adil starts falling in love with Desdemona and grows a bitter animosity with Dilip who is her heartthrob. Practice sessions of Adil become more and more personal as he throws around Bary acting as Iago and passing scathing remarks to dilip. In one of the final rehearsal the anger in adil overcomes him and he actually attempts killing Desdemona. At this time the director asks Adil to leave. But Bary who is the producer of the play resents the move, saying that the final play is in a weeks time and that they cannot afford to lose a main actor. Bary wins his personal battle with the director by showing him the door.

This kind of story telling in which the story invades the lives of the actors is slightly remenisant of Rang De Basanti. But that is where the similarity between them ends. I think Roysten has done an amazing job in conceptualizing and putting the play in this form. After the play i browsed on the Internet searching for Roysten abel. He has shot a film on this theme called In Othello. While browsing the official site of In Othello, i thought that maybe the play presented in Rangashankara was stripped of its set decoration and costumes. In the play the set consisted of only chairs and all the characters were in black dress (A typical NSD play i am sure Roy :-)). It talked a lot of kathakali but there was no costume or the kathakali actually happening in the play (Only towards the end and even that cannot pass of as kathakali).

The actors, each one of them were brilliant. Adil was individually outstanding. The way he was bringing out his love for desdemona in real life, and his animosity against Dilip through the lines of Othello was just too good for words. He was supposedly rehersing the role of Othello, but the pain and the anguish he was going through seemed so real. Bary himself is a vetern at acting, having acted in Gandhi, Shatranj ke Khiladi etc. The way he cunningly plots differences between Adil and the director, and instigates Adil against Dilip was so typical of Iago. He was the one person who did total justice to his role.

The play itself, since it was almost completely delivered in original shakespearan archaic english was not quite easy to follow unless either you knew the language quite well or are aware of the plot. Thanks to Vishal Bharadwaj’s adaptation of Othello as Omkara i had little problem understanding the plot. I have a lot to say about Omkara as well, but i guess i’ll save it for next time.

technorati tags:, , , , , ,

Another Cheap Trick

June 25, 2006

Yesterday we had another meeting at the site with the AGM. I met surendra who apprised me on the registration process. Finally after giving in to RHDPL's demand and signing the agreement Mr. KK of RHDPL got everyone to the registrar's office for getting the flats registered. It turned out that RHDPL had another cheap trick up their sleeves. I don't know how it exactly happened, but they got another paper slipped in the agreement which was signed by RHDPL and the flat owners. It was done so stealthily that most of the owners could not even detect the anamoly. And those who realized the trick, didn't really have time to go through the extra page. But still if they would have read it what could they do ?

All the other's are signing the paper and nobody likes to be singled out. Even if he wants to raise his voice for his own good. This reminds me of an article i read long time ago by Subroto Bagchi. It said, how we Indians find it easy to do things in a group. If one of us is singled out and asked for an individual opinion, we would rather give a group opinion with proper disclaimers.

How much can one put up with such behavior ? It just seems that RHDPL is testing the waters and checking if we would resent. The moment it see's we don't resent, it pulls up another trick. When they see that we have not even resented to that trick, they bring another one, until we are striped of all our rights to the apartment complex.

The extra clause that RHDPL has added was something to the affect of the land owner having the right of passage to the driveway that is being built for the flat owners. The owner of the land on which the apartment complex is being constructed stay's adjacent to the apartment complex. He must have had some understanding with RHDPL to allow him to use our complex's facilities even though he does not own an apartment. RHDPL wouldn't mind acceding to it's demand. All it has to do is to cheat us once again. And we who no longer mind getting stripped again would happily accept the demand.

I am seriously considering pulling out of this project. The tax implication's would be rather heavy if i plan to sell my house immediately. So i may not be able to sell it off immediately. But let's see how the project turns out.

technorati tags:, , , , ,

Riya and my personal thoughts

June 18, 2006

The other day while browsing through a friend's blog i happened to stumble upon Riya. Riya is an online photo organizer, where you can upload your photo's and share them with the world. But there are so many in the world that do the same thing, so whats special about Riya ? Well there is one area of categorization where Riya excels among it's competitor's. That's photo recognition and searching/categorizing your photo's based on who is there in your photo.

I myself had this idea about categorizing photo's based on the person in the photo. With thousand's of photo's in my laptop, i always had difficulty looking out for specific photo. For example i wanted to see all the photo's of Ishita when we had gone to the mysore trip. First of all i had to organize all my photo's in a folder, and then go one by one to see where is ishita's photo. That's when i thought about indexing photo's based on the people present in the photo. I did not think of face recognition, but i was thinking more on the lines of tagging the photo based on the people present in the photo. Again tagging is also widely used. But i don't know why tagging is not built into the images themselves. With the EXIF format, it is possibly to insert any meta data in the photo. It's like your MP3 collection. You have meta information about artist/album/genre etc.. Then you can use your music playing application (iTunes for example) and easily search for your music based on your criteria (artist/album/genre). Simillary with each image if we can insert the meta information about the people in the photo, the place where the photo was clicked, date and time (if it is not present), the occasion. It will be so easy to categorize the photo's.

The reason for storing these meta information in the images itself is so that the information resides totally with the image and you can use any third party application that you like to categorize them according to your tastes. But apparently there will be an iTunes like application which will become the defacto application :).

About Riya itself, i personally liked the website quite a lot. The people behind Riya seems quite a passionate lot of people, working day in and day out to get this cool application out. Munjal Shah, CEO of Riya himself maintains a decent blog of Riya's activities which is an interesting read. But as he mention's himself, Riya is two year old baby. Riya has got an amazing technology at hand, but somehow the delivery has not really been upto the mark. I personally find Flickr's interface much more better. Riya is not as restrictive as Flickr (non-pro) is, but still i think it will take Riya some time to reach that level.

Riya themselves realize this shortcoming and they are trying to fix this. The other day i happened to saw Munjal's blog holding an informal competition to redesign the web site. Or atleast the structure of the website. Now personally i am not sure how good is this idea of asking someone to redesign the website. Designing a website would require lot of brainstorming between the designer and people at Riya, ideas thrown back and forth until something good comes out. How can you collect some hundred different design's and chose the best out of them ? Anyway it will be interesting to watch what Munjal's competition yield's. Now i am not an expert on web technologies or how exactly these competition work's. But i have personal reservation against such methods.

technorati tags:, , , , ,