Comments

Here’s a pretty trivial script I wrote to inject packages into the openmoko images. sed does all the dirty work for me. I was feeling pretty lazy to edit the task-openmoko.bb each and everytime after it gets reverted after an svn update. So came up with this hack.

The trick is, task-openmoko.bb in oe/packages/tasks contains the list of the apps that will be included in the final image. If your app name is not present in it, your recipe will be parsed correctly and your app will build, but it wont make it to the final image.

Note: Bump up PR in task-openmoko.bb before using the script.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# Sudharshan "Sup3rkiddo" S
# inject, script that injects packages into the OpenMoko standard,
# The sed line does all the stuff, nothing elite...
# The package is grouped under TASK_OPENMOKO_LINUX..after rsync
# The bitbake recipes should be present in the proper place. OE docs for info
ARGS=1
E_BADARGS=65
if [ $# -ne "$ARGS" ]
then
echo "Usage: inject "
exit $E_BADARGS
fi
make update
make setup
cd oe/packages/tasks
mv task-openmoko.bb task-openmoko.bb_bakup
# search for rsync and append the package name after it..[KIDDISH HACK]
sed '/rsync \\/ a\ '$1' \\' >task-openmoko.bb
mv task-openmoko.bb_bakup ~/
cd ../../../
#make clean-package-$1
make build-package-$1
echo "Done injection..muhahah"

You still have to make sure you have the bitbake recipes in the proper place. As always I am not responsible for dead kittens caused due to the usage of the above script ;)

Links: http://bec-systems.com/web/content/view/59/9/

Comments

Not a die hard fan of Harry Potter, but still a fan of J.K’s work. Come July 20, and the last and final installment of Harry Potter, just made my friends all excited; that the three of us woke up at 4 in the morning and went to Landmark at Spencer’s wanting to get hold of the book first. I was riding my mom’s dependable krystal without a license (..and she didn’t know). We were in for a ride since there was a long queue outside the bookstore.

Some of the muggles, apparently had slept overnight in the cars parked overnight. We waited, solved the Puzzles and waited, had coffee, waited. Then the counters opened…Half an hour and some shuffles within the queue later we had the book. The dudes at Landmark gave us some burger, sandwich and some juice. But honestly, I would have preferred Mollaga Bajji with Tea.

The book begins with Snape and Yaxley reporting to Voldemort. And the ending….?

w00t, pymoko runs in the qemu. The shared object extension got installed after building the openmoko toolchain from scratch. It did take me a whole day, but at the end it was frigging worth it. Thanks to stefan for pointing me to the solution. Now its party time.

Heres the screenshot where I import the pymoko module, show the available functions by doing a ‘dir(pymoko)’, and try to call my number (which obviously wont work) with voice_out_init().

The function call is unsuccessful because the gsm daemon doesnt appear to be running.

works

So, Got myselves busy with Openmoko. Time will tell, if I would be able to get hold of the first device (neo1973) based on the platform. Anyway me and empty_mind had decided to bring our favourite programming, python to the platform. Of course OpenEmbedded, on which OpenMoko is based already provides python, but this time we are into customising the big snake for the Openmoko platform by writing language bindings, optimising runtimes. etc..No doubt fun times ahead.

I have even come up with an extension module that wraps up the Voice Out function of libgsmd. It works on my box but the damn thing isnt getting installed in the final image although it build just fine, so I couldnt really test it out if it works in the device (no..not the real device just the qemu stuff).

Have filed a bug report on this, hopefully it should be fixed.

Sigh, heres the screenshot of the error in qemu.

Links:

Dadu’s (empty_mind’s) blog: http://www.vivekkhurana.com/pymoko/ The neo1973 phone : http://rene.rebe.name/photos/?p=/Computex/2007/img_2208.jpg

Oh gawd, I Promise I will be good..Just send me one of those gadgets to hack and drool on..

Comments

Python is a rocking programming language. I was looking forward to try it on my old ngage qd..Sadly it didnt come with any MMC cards. My friend was kind enough to let me have his 64 meg card for a few days. I couldnt be happier :)

I had a few hiccups getting python on my phone. First the sourceforge page for s60 housed py60 ver 1.3.x, which refused to install in my phone. I finally found out the link to the version compatible (1.2) with the Symbian OS in my phone, but I had to register in that site, boy was the website crawling. In the end if you are looking to get python in you Ngage or Ngage QD, you will have to download “Python for Series 60 1.2 for S60 1st Edition FP1 Devices”[1]. Just Unzip the contents, keep the sis file in your mmc and install it like any other s60 application. The python is a pretty old version though, 2.2.2 to be exact.

Here are some screenshots

1.) The Python Interactive Console

scr-shot.jpg

2.) Main Menu?

scr-shotg01.jpg

3.) Sample Scripts

scr-shotg.jpg

4.) Keyviewer.py

scr-shotg03.jpg

Get Python for s60 here

Comments

Phew..Semesters on May 19 and lotsa stress beating upon me. I decided to cool off by paying a visit to my uncle’s house

My cousin had a copy of Digital Fortress..Read it..The hell, Dan Brown has written X11 as ‘X-Eleven’…Nice book though.

Had to wake up really early and attend the annual day function of Dad’s office. S Janaki, the playback singer was the chief guest along with Laxmanan, of MMA.

The fun part was in the evening when we paid a visit to the Marina. While having a hell of a time in the waves, My shorts tore where it shouldnt!. And Behold, there I was standing in the water wet, hot and sexy like a swimsuit model. It felt good when everyone was staring at me.

Thank god I was wearing my undies…

Comments

Got my Semester practicals on Visual Programming tomorrow and I know bollocks about it. There was an urgent need to work out the lab exercises and get comfy and cozy with the VC++ IDE (Not one of the favourite students around :)) I did have wine around in my box, but never quite used it. If you are wondering what WINE is; Wine is a Free and Open Source Software that allows you to run most Winblows applications on your Linux box, effectively a port of Win32 platform, not an emulator afaik. So in a sense free Windows (I didnt mean Pirated..).

Got an Old CD of VC++ from my friend, popped it in and installed it without a hitch. I did get errors about some DCOM98 crap, but who the hell cares. I am gonna keep it installed for only one day and will be busting it first time after I finish my practicals tomorrow.

WINE: http://www.winehq.com

Still dont believe me? Click on the thumbnail below..notice the terminal with the output of uname -r? LINUX PWNS!!!!

Comments

Forget the emacs vs vi (or vim) battles.

Vim has tabs in its latest 7.0 release. Quite simple actually. A new tab is as easy as doing a

:tabnew "filename"

Moving between tabs is easy too..

:tabp :tabn

for moving to the previous and the next tab respectively

For closing the tab

:tabclose "wahtever"

Heres a neat thing I learnt from the Inter-Web. You can map the “tabn” and “tabp” to keyboard shortcuts. For this open you .vimrc (..or create one if it doesnt exist), and add this,

nnoremap <silent> <C-n> :tabnext<CR> noremap <silent> <C-p> :tabprevious<CR>

Long live, the cult of vi…

Comments

So, one of my friends turned up today with his new moto v3i asking for help..Pretty simple, put music in his mobile and make it accessible through itunes software bundled with v3i.

With a sense of confidence I connected it to my box, and voila it was detected as a Mass Storage Device. He gave me the CDs that came with his mobile. I gave him a smirk in return and said “This is Linux..Linux doesnt need any steenking windows driver cd”.

I copied some songs over his mobile in the itunes folder. But no songs in itunes. After scratching my head for a while, I decided to give gtkpod a shot..So fired uo my trusty shell and did a “emerge gtkpod”.

In gtkpod in “Edit iPod Properties”, i selected the device as xmobile, connected the mobile and this time syncing the music worked…

He is now probably wondering whether to give gentoo a go..

Comments

I use glade to design UI for my project. So one day when I came to know that Glade3 has been released (rather late, actually) I decided to give it a shot. Glade 3 has its UI cranked so that you can efficiently create UI for your project..:|.. Anyway I dont know if it is just me but Glade 3 is slower than its predecessor and also crashed once in a while, especially when I was working with the design of the menu structure. On a happier note though, the crappy source code generation “feature” has been completely removed.. Yup…Glade2 had this feature wherein you could generate all the callback code..(That gave me nightmares..)

So with Glade, it is recommended to use libglade (and out of my own experience) to load the glade file during program execution. This has some advantages from the code generation.. First you carry less source code and somehow I felt it made my program clean. Secondly you dont have to recompile the entire project when you make changes to the UI. This is because the code generation in glade creates a separate source file called interface.c where all the UI code gets in by default as though you have hand coded them. But with libglade that doesnt exist since glade xml gets loaded during runtime kinda like in PyGTk if you know it.

Oh..and if you get the warning like libglade-WARNING: couldn't find the signal handler "some_signal_handler" This is because libglade couldnt find the symbols properly. Just add the “—export-dynamic” flag while compiling and you are done.

References: Glade UI Builder libglade