Topic: Qt 4.3.2 Chumby instructions + new video :)

I posted some instructions on how I got Qt running on the Chumby here:
http://www.jespersaur.com/drupal/node/30

The end result is being able to get a iTunes like coverflow program running on it written in Qt:
http://www.youtube.com/watch?v=v2yN0F7_YlI

Please post your questions and suggestions in this thread and I'll try to answer them. (though I'll be quite busy this weekend)

Re: Qt 4.3.2 Chumby instructions + new video :)

Nice work!!

May I copy your instructions onto the chumby wiki?

Re: Qt 4.3.2 Chumby instructions + new video :)

Sure, but please keep a link to the original as well smile

Re: Qt 4.3.2 Chumby instructions + new video :)

OK.  I know nothing of Qt (up until now I thought it was referring to QuickTime).

Could someone give a brief explanation of how this fits into the Chumby world?  Is it an alternative to using Flash to build widgets, or do they work together?

Thanks!

Re: Qt 4.3.2 Chumby instructions + new video :)

Qt is a GUI toolkit created by Trolltech.  It's commonly used by desktop Linux systems, but can also be used to create cross-platform applications (ie Mac, Windows, and Linux).  On Linux, it's also the basis for the K Desktop Environment (aka KDE).

What's been ported here is the lightweight embedded version of Qt (Qtopia), which would allow many Qt applications to be ported to chumby for someone so inclined.

Internally, we did a similar port a while back in order to see if we could get Konqueror/Embedded (a web browser) running on the chumby.  It worked, but unfortunately was quite sluggish and wouldn't properly handle many important web pages.

It's not really an alternative for doing widgets, but rather an entirely different UI for the device for the creation of native applications.

Re: Qt 4.3.2 Chumby instructions + new video :)

Great work.

"Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety."

Re: Qt 4.3.2 Chumby instructions + new video :)

I had to change the -L parameter on configure for Qt to point to a directory instead of the shared lib to get it to work.

Something like this:

./configure -embedded arm -pch -prefix /mnt/usb -qt-kbd-usb -qt-mouse-tslib -L/mnt/usb/lib/ -I/mnt/usb/include/ -nomake examples -nomake demos

Re: Qt 4.3.2 Chumby instructions + new video :)

orangerobot: Thanks for the find smile I'll update the page accordingly. Did the rest of the instructions work out otherwise?

Re: Qt 4.3.2 Chumby instructions + new video :)

We were just discussing this on IRC and someone pointed out that you guys had already done this work, very nice.

We were thinking of some sort of framework in QT that would let you write XML configuration files/templates/whatever and that would replace the flash player for the chumby. The general feeling from some folks on IRC is that flash is sort of worthless for the sort of thing we'd like to do.

So with that being said, I guess the sort of thing the QT chumby engine would do is this:

Read in XML configuration files

Ability to specify in the XML file things like, RSS feed, wget, custom data gathering operation, streaming audio, etc. So you have the ability to define the transport mechanism for getting the data off of the internet and onto your chumby.

Once you have the data, you need to tell the QT chumby engine how to display it. For instance, if it is in RSS mode, you might have a picture that goes along with the text, and the QT chumby engine would know that and display it properly.

It is hard for me to write the entire spec off the top of my head like this, but I just wanted to throw a few ideas out there and see if anyone was interested or thought this was a good idea.

Re: Qt 4.3.2 Chumby instructions + new video :)

I don't know if removing the flash player front end is such a great idea. Perhaps you should start off with baby steps, and try to make a sort of "native" application launcher widget. You should define a packaging format for your native apps, and make them installable/runnable from this widget. If you guys get enough high quality native applications available and working, then I would think that the Chumby folks would try to create some tighter integration with the current front end. Optimally, the flash and native software should run side by side, so that users get the best of both worlds smile

hint: Look into QtScript - then you can make some really neat stuff with ecma/javascript, and still get great performance smile

Good luck!

Re: Qt 4.3.2 Chumby instructions + new video :)

Hello
I'd already follow your instruction for build qtopia and all the compiling process works fine, but, when i run ts_calibrate the LCD don't show the crosshair. I set the environment variables as file:///home/cain/Desktop/chumby/qt_on_chumby.html say, but i can't see nothing  sad

If i run:

unzip -p /bitmap/chumby_logo.zip >/dev/fb1

some colored circles are shoen in LCD, why QT applications don't drive the LCD?
There are a environment variable that manage the QT framebuffer device?


Best regards

Re: Qt 4.3.2 Chumby instructions + new video :)

Hi

When i run:


/mnt/usb/examples/qtopiacore/framebuffer/framebuffer 

The framebuffer device was opened successfully.                                                             
                                                                                                             
Fixed screen info:                                                                                           
        id:          IMX                                                                                     
        smem_start:  0xc3d40000                                                                             
        smem_len:    153600                                                                                 
        type:        0                                                                                       
        type_aux:    0                                                                                       
        visual:      2                                                                                       
        xpanstep:    0                                                                                       
        ypanstep:    0                                                                                       
        ywrapstep:   0                                                                                       
        line_length: 640                                                                                     
        mmio_start:  0x0                                                                                     
        mmio_len:    0                                                                                       
        accel:       0                                                                                       
                                                                                                             
The framebuffer device was mapped to memory successfully.                                                   
                                                                                                             
Switch to graphics mode failed: Invalid argumentVariable screen info:                                       
        xres:           320                                                                                 
        yres:           240                                                                                 
        xres_virtual:   320                                                                                 
        yres_virtual:   240                                                                                 
        yoffset:        0                                                                                   
        xoffset:        0                                                                                   
        bits_per_pixel: 16                                                                                   
        grayscale: 0                                                                                         
        red:    offset:  8, length:  4, msb_right:  0                                                       
        green:  offset:  4, length:  4, msb_right:  0                                                       
        blue:   offset:  0, length:  4, msb_right:  0                                                       
        transp: offset:  0, length:  0, msb_right:  0                                                       
        nonstd:       0                                                                                     
        activate:     0                                                                                     
        height:       -1                                                                                     
        width:        -1                                                                                     
        accel_flags:  0x0                                                                                   
        pixclock:     62500                                                                                 
        left_margin:  15                                                                                     
        right_margin: 6                                                                                     
        upper_margin: 9                                                                                     
        lower_margin: 7                                                                                     
        hsync_len:    1                                                                                     
        vsync_len:    1                                                                                     
        sync:         0                                                                                     
        vmode:        0                                                                                     
                                                                                                             
Will draw 3 rectangles on the screen,                                                                       
they should be colored red, green and blue (in that order).                                                 
  Done.

Re: Qt 4.3.2 Chumby instructions + new video :)

I update my chumby this week, there are any change related with the framebuffer  in this release?

Re: Qt 4.3.2 Chumby instructions + new video :)

I managed to compile tslib and qtopia just fine, however I am having trouble transferring the results to my chumby. I am probably just missing a simple things somewhere along the line...

First problem i noticed was, that 'make install' failed for tslib when it tried to make a symlink from 'libts.so' to 'libts-0.0.so-0.1.1'. The same happened later on with Qt, which created links from 'libQtCore.so' to files with version numbers on them. When trying to put those on the USB-stick, that part failed because the stick was formatted with FAT, which doesn't support symlinks.

I tried to just ignore the symlinks, however running the compiled pictureflow fails because it can't find the libraries. Is there a way to tell configure, to not make symlinks? I could edit the makefile manually and change the ln command to cp...?

Next thing i tried was to reformat the USB stick with ext2. That part went fine. I could even 'make install' the whole of Qt onto the stick. Now I plug the USB stick into my chumby and it doesn't get mounted. I tried to mount it manually with 'mount -t ext2 /dev/sda1 /mnt/usb -o rw,exec', but this just doesn't work. I also noticed, that /etc/fstab contains an entry for sda1, which specifies vfat explicitly. Presumably, that fstab setting always overrides my manual mount options and there is no way to ignore fstab? Editing fstab doesn't work, because it sits in the ROM. I also tried to create a symlink for sda1, so it is available under a different name and fstab doesn't know about it, but this didn't work either.

So what am I missing here: Mounting options wrong? Is there a way to compile Qt and tslib without symlinks? Editing fstab via custom kernel?

Thanks, Stefan

Re: Qt 4.3.2 Chumby instructions + new video :)

I set the installation dir to  /mnt/usb2  ans i create this directory on my PC.

The original chumby's image kernel doesn't support ext3, Is necessary add ext3 support to the kernel and make an update:


http://wiki.chumby.com/mediawiki/index. … for_chumby

Re: Qt 4.3.2 Chumby instructions + new video :)

Thanks for your response. Did you also edit the /etc/fstab entry for usb2 to mount ext3? Does anyone know if the current kernel supports ext2 by default (as I would prefer to not use journalling on an USB stick). Anyone knows a route to solve my problem without flashing a new kernel?

Re: Qt 4.3.2 Chumby instructions + new video :)

the current kernel only support fat ypu need reflash a new kernel,

Re: Qt 4.3.2 Chumby instructions + new video :)

There is one option to add support to the factory kernel:

If you download the kernel and:

mkdir kernel
cd kernel
wget http://files.chumby.com/source/ironforg … 6/align.pl
wget http://files.chumby.com/source/ironforg … 1.2.tar.gz
tar zxvf linux-2.6.16-chumby-1.2.tar.gz
cd linux-2.6.16
ARCH=arm BOARD=mx21ads CROSS_COMPILE=arm-linux- make menuconfig

Under File Systems --> Select <M> on  Ext3 journalling file system support

Select exit

To the question:

Do you wish to save your new kernel configuration?   

answer   yes

and then type:

ARCH=arm BOARD=mx21ads CROSS_COMPILE=arm-linux- make

Then you can find under drivers the file ext3.ko

You can copy this file to a fat usb flash memory
and then type:

insmod /mnt/usb/ext3.ko

and ready

Re: Qt 4.3.2 Chumby instructions + new video :)

I got it running, found a way to use a FAT formatted USB stick through the whole process. Thanks for your suggestions cicamargoba, but I don't even have two USB sticks at the moment (to load the ext3 module from one and then use it with the other stick).

I originally used midnight commander for all my file handling, which complained about not being able to chmod on the FAT partition for every single file (which is why I gave up on that route originally). The 'cp' command doesn't do that! I then copied all the symlinks with the midnight commander, because it has the option to follow symlinks. Gets a bit bigger, but it works.

Pictureflow works just fine and is a really nice start for a local picture viewing app. Looking forward to more native applications on chumby.

Re: Qt 4.3.2 Chumby instructions + new video :)

cicamargoba wrote:

I update my chumby this week, there are any change related with the framebuffer  in this release?

I also pay attention for the question.

Re: Qt 4.3.2 Chumby instructions + new video :)

QT works fine with the last firmware. My problem was a instalation issue, At present i use ext2 on the usb memory and all works fine

Re: Qt 4.3.2 Chumby instructions + new video :)

Great stuff on getting QT onto Chumby.

Does anyone have any ideas about how one would get QT to send events when the Chumby's accelerometer and/or "squeeze" button are used?

Re: Qt 4.3.2 Chumby instructions + new video :)

You can get bend sensor info by polling /dev/switch; /dev/accel should be similar for the motion sensor, but I haven't actually used it.

Re: Qt 4.3.2 Chumby instructions + new video :)

Anyone Have It so theres no need to do anything
I run windows
cant use gnu toolchain

Re: Qt 4.3.2 Chumby instructions + new video :)

QT stuff worked great for me - worth noting that USB stick is a bit of a hassle especially if you have a real/virtual linux box on the same network.

Chumby ships by default with NFS client code, so one can also just map an NFS share instead which is a bit easier.

I use a VMWare server (on windows) running Red Hat. I have an NFS share /mnt/usb configured on that virtual server so
on the chumby I just mounted it over where a real USB stick would appear...

mount -t nfs -o nolock,tcp,intr my.server.ip:/mnt/usb /mnt/usb

yay simple