June 15, 2010

Luca Luca
Ant Farmer
635 posts

Qt && BeagleBoard

Page  
1

Hi all,
I’m trying to develop some test application for beagleboard but I didn’t found how to install the tool-chain in my pc to cross-compile for beagleboard.
I installed the last Angstrom image into an SD card and it boot correctly. (I followed this http://elinux.org/BeagleBoardBeginners [elinux.org]).

Now, how do I must proceed to compile and use QT4-4.6.3 in beagleboard?
I didn’t found guide or how-to to do this…

Can you help me?

Thanks.

21 replies

June 15, 2010

jbarron jbarron
Lab Rat
48 posts

You should probably start with this blog post:

http://labs.trolltech.com/blogs/2009/11/20/building-qt-to-make-use-of-the-beagle-boards-sgx-gpu/ [labs.trolltech.com]

June 15, 2010

sbrandt sbrandt
Lab Rat
6 posts

The usual way … you need a complete cross compilation and development environment. So, have a look at the openembedded environment, and compile the angstrom distribution yourself on it.
http://elinux.org/BeagleBoard#Development_environments
http://elinux.org/BeagleBoardOpenEmbeddedDevelopment
http://elinux.org/BeagleBoardAndOpenEmbeddedGit
http://wiki.openembedded.net/index.php/Main_Page

Note that OE (openembedded) may need ~20GB of disk space for archives, compilation, image generation, etc.

Concerning qt, this is the X11 version, then, not the embedded version.

Good look,
Sebastian

June 16, 2010

Luca Luca
Ant Farmer
635 posts
sbrandt wrote:
Note that OE (openembedded) may need ~20GB of disk space for archives, compilation, image generation, etc.

20GB??? I need e new disk! :-)

I downloaded Angstrom from here [angstrom-distribution.org] .
Is there a way to find the environment they used to build it?

When I used another board (NGW100) with buildroot they also supplied the sdk.

June 17, 2010

sbrandt sbrandt
Lab Rat
6 posts

Luca wrote:

I downloaded Angstrom from here [angstrom-distribution.org] .
Is there a way to find the environment they used to build it?

When I used another board (NGW100) with buildroot they also supplied the sdk.

Yes, Openembedded …

I know, the initial start with developing on ngw100 is a bit easier. Main reason – the default ngw-image has a few megs, while on a beagle, you have a complete distribution with package manager, X11, mplayer, etc. Angstrom-Demo is 275M, and to compile it you need … well … the complete build env.
Just start with openembedded, configure for beagle and angstrom, and try to compile something simple, like nano. If that works, you already have the compiler and all. Then, you can try qt …

Concerning qt, IIRR, oe/angstrom compiles qt several times, you need it once native for the tools (moc, qmake, etc), and then you have the embedded and the x11-free variant. I’m not sure what version is current in OE, now, I updated to 4.5.3 some time ago. Oh, I use the x11 version b/c I want to run more stuff than just qt apps ….

Have fun,
Sebastian

June 17, 2010

Luca Luca
Ant Farmer
635 posts

Thanks for answer…

I found two alternative solution that I haven’t tried:
1) http://www.angstrom-distribution.org/narcissus/
2) http://www.angstrom-distribution.org/toolchains/

Solution 1 allow to obtain a pre-built system and an sdk while solution 2 allow to download the tool-chain (but there isn’t 32bit linux version).

I’ll try both solutions and I’ll tell you…

June 17, 2010

sbrandt sbrandt
Lab Rat
6 posts

Hi!
Yeah, there is the possibility of creating tool chains with openembedded … never tried it.
The second link seems to be really current, even, with 4.6.2. It’s the embedded version, though, not the x11 .. so it will probably collide with an x11 installed/running on the beagle, unless using qvfb …

There is angstrom-2010.4-test-20100422-i686-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.2.tar.bz2 which is linux 32bit …

Thanks, should keep the two links in mind for when I start transferring some of my knowledge to the rest of the company ;)

Yours,
Sebastian

June 17, 2010

Luca Luca
Ant Farmer
635 posts

why do you say angstrom-2010.4-test-20100422-i686-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.2.tar.bz2 is for 32 bit?

Now I’m downloading it… :-)

June 17, 2010

sbrandt sbrandt
Lab Rat
6 posts

Luca wrote:
why do you say angstrom-2010.4-test-20100422-i686-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.2.tar.bz2 is for 32 bit?

Hi!
Because i686 is a 32bit intel processor?
buildhost i686-linux, target armv7a-linux-gnueabi (beagleboard)

Sebastian

June 17, 2010

Luca Luca
Ant Farmer
635 posts

sbrandt wrote:

Because i686 is a 32bit intel processor

ok… don’t hear to me… :D

June 17, 2010

Luca Luca
Ant Farmer
635 posts

Ok, I downloaded and installed as said in:

I compiled a very simple main.cpp:

  1. #include <QtGui/QApplication>
  2. #include <QDebug>
  3. int main(int argc, char *argv[])
  4. {
  5.     QApplication a(argc, argv);
  6.     qDebug()<< "hello world";
  7.     return a.exec();
  8. }

but I get:

  1. root@beagleboard:~#
  2. ./example                                                                                                                                                  
  3. QWSSocket::connectToLocalFile could not connect:: No such file or directory                                                                                                        
  4. QWSSocket::connectToLocalFile could not connect:: No such file or directory                                                                                                        
  5. QWSSocket::connectToLocalFile could not connect:: No such file or directory                                                                                                        
  6. QWSSocket::connectToLocalFile could not connect:: No such file or directory                                                                                                        
  7. QWSSocket::connectToLocalFile could not connect:: No such file or directory                                                                                                        
  8. QWSSocket::connectToLocalFile could not connect:: No such file or directory                                                                                                        
  9. No Qt for Embedded Linux server appears to be running.

I think this is the right way but I must solve some problem… :-)

June 17, 2010

sbrandt sbrandt
Lab Rat
6 posts

Congrats!
To start qt embedded apps, you need to pass “-qws” as a parameter to the first app you start, to initialise and start the internal qws display server.

Sebastian

June 17, 2010

Luca Luca
Ant Farmer
635 posts

Ok, I’ll try tomorrow, my beagleboard is now at office and I’m at home… :-)

With NGW100 (buildroot) “-qws” wasn’t required but I think it was because there is no display and I always developed console application.

If I’ll develop a working qt application for beagleboard, I’ll write a wiki… ;-)

June 21, 2010

Luca Luca
Ant Farmer
635 posts

Finally I compiled QT successfully with Angstrom downloaded from both site:
http://www.angstrom-distribution.org/narcissus/
http://www.angstrom-distribution.org/demo/beagleboard/
Probably tomorrow I’ll explain how I’ve done…

Now I’m interested in using opengl but I read the link posted by jbarron and it seems complicated because it require to build an Angstrom.

Why doesn’t Angstrom put the SGX driver in the image they supply?

With the Angstrom sdk I downloaded, if I execute:

  1. ./configure -opensource -confirm-license -no-qt3support -release -nomake examples -nomake demos -static -embedded arm -little-endian -xplatform qws/linux-arm-g++

I get:
  1. ...
  2. ...
  3. OpenGL support ...... no
  4. EGL support ......... yes <EGL/egl.h>
  5. OpenVG support ...... no
  6. ...
  7. ...

so it only detect EGL.

June 22, 2010

Luca Luca
Ant Farmer
635 posts

Now I read in QT documentation the following sentence:

Qt for Embedded Linux provides support for integrating OpenGL ES for drawing into a QGLWidget. The current implementation supports OpenGL and 2D painting within a QGLWidget. Using OpenGL to accelerate regular widgets and compositing top-level windows with OpenGL are not currently supported.

So I think that I don’t need OpenGL integration for my application until I don’t use QGLWidget…

July 3, 2010

AlexBravo AlexBravo
Lab Rat
15 posts

Guys, I think we need to put this info on a Wiki. Any takers on doing this?
I wanted to do it here (I actually cross-compile Qt to QNX), but my method is outdated now that Qt Creator is available: http://developer.qt.nokia.com/wiki/Using_Qt_Creator_for_cross-compiling_Qt_applications_from_Windows_to_UNIX-like_OSs/edit/revision/184

So feel free to modify that that page. I’m sure many people will find it useful.

Page  
1

  ‹‹ QT && AVR32 embedded      SVG && fast update ››

You must log in to post a reply. Not a member yet? Register here!