Monday, August 29, 2011

Moving to wordpress

I revamped my homepage  by moving it to a hosting provider and migrating to joomla. Fortunetly or unfortunately, Joomla has very good plugins for wordpress and not for blogspot. These plugins allow me to post at my wordpress blog while updates will be made available instantaneously at my home page. I have pulled all the content from flyingtux.blogspot.com to yetanothertux.wordpress.com. Do continue to visit me at

http://yetanothertux.wordpress.com
http://sarin.net.in

Friday, June 24, 2011

QT keyboard events

I am here to make a quick post. I searched for this at many places but could not get the exact solutions. Every message I could read sounded cryptic.

Scenario:
I want to generate fake keyboard events and send to QWebView class.

Solution:
Extend this class to have slots for signals. Connect it to a signal that can pass an ascii character.

Issue:
Keyboard does not have 'a' and 'A'. It only has an 'A'. That means, I cannot directly send any lower case characters using the event (Which is not correct)

Solution:
The solution is simple. The constructor of QKeyEvent can take QString as one of its argument. The signature is as follows:

QKeyEvent ( Type type, int key, Qt::KeyboardModifiers modifiers, const QString & text = QString(), bool autorep = false, ushort count = 1 )





Even if we don't pass the QString, it will work. However, by passing the QString, we can control exactly what will be displayed.
This is how I create my QKeyEvent:


void MyWebView::rcvKeys(int k)
{

char str[2];
str[0]=k;
str[1]='\0';

QKeyEvent *k=new QKeyEvent(QEvent::KeyPress,k,Qt::NoModifier,QtString(str),false,0)

//-----------Pass it to postevent etc
}
}

Sunday, April 24, 2011

Google fined USD 5 million for using patented code in Linux kernel


http://www.bbc.co.uk/news/technology-13168296

Very interesting news. I am still not really sure if this is part of mainline. However, considering the fact that the holder was able to analyse the code and ascertain that it was there in the Google's server's kernel indicates it was surely there on the public domain whether it was a custom piece of code written by Google engineers or not. This is surely something very interesting thing to happen and it would be very interesting to see if Google takes it beyond district court and what exactly happens to this case at the end

/. link: http://linux.slashdot.org/story/11/04/21/2140249/Google-Loses-Bedrock-Suit-All-Linux-May-Infringe

Wednesday, April 13, 2011

Build error on Android rowboat

I was building the code for TI omap3evm and I found that on FC14, I was getting the error from the make file of kernel. It told "Mixed implicit and normal rules". On a bit of googling, I found http://www.mail-archive.com/bug-make@gnu.org/msg06220.html

The file "hardware/ti/sgx/GFX_Linux_KM/eurasiacon/build/linux/omap3630_android/kbuild/../../kbuild/Makefile.kbuild" need to be modified as follows:

Change "all %:" to
all:
    (Build command)
%::
    (Build command)

Sunday, March 6, 2011

Fips opessl

http://olex.openlogic.com/packages/opensslfips

I was cross compiling this. The strangest thing about this is that it cannot be cross compiled. Because, they generate programs, run them, get signature from the programs and use that signature to compile them again!

I did that by little bit effort. What I am now looking at is the possibility of having it compiled inside qemu. Anyway, this is what I did
1. Configure for linux-ppc with compiler, prefix and ranlib specified during this step
2. Find and replace ar using powerpc ar in all makefiles
3. Make and when it breaks during sha1 calculation, replace the binary that does sha1 caculation with an x86 equivalent and complete this step
4. Make again and when it tries to execute openssl/tests, replace the necessary statements in fipsld with read function and supply the signatures for each program after taking them to target and running them there once
Well, another issue that I noticed with this package is that it does not behave well with parallel builds. I will post here again if I can compile this in Qemu. I am planning to use FC12 ARM/PPC for this.