Skip to content

Qt 4.5 on mini2440

Well, you didn’t bought this fresh mini2440 with a 3,5″ or 7″ touchscreen just for putting another dust receiver on your desk didn’t you ?

Framebuffer

If you compiled a kernel from the mini2440 kernel repository with the mini2440_defconfig, the framebuffer driver is loaded by default. You should see an “Armwork” logo when booting your board. If it’s not the case and you have a 7″ screen, you have to pass “mini2440=1tb” as a boot argument for the kernel ( 0 is for 320×240, 1 for 800×480 ). This has to be done in u-boot.

The framebuffer for the screen should be avaiable on device /dev/fb0, if that entry does not exist, you probably want to make it by using the following command “mknod /dev/fb0 c 29 0”. If you wonder why those numbers, well, the major “29” is from the /proc/devices file, there you can see that the major 29 is reserved for fb character devices, and as there is only one fb on the system, the minor is 0, but if you want to make sure of that, all character devices are listed on /sys/dev/char.

If you don’t have anything in /proc or /sys or both, you should mount them by doing:

mount /proc /proc -t proc
mount /sys /sys -t sysfs

If you don’t want to be bothered with than anymore, put them in /etc/fstab .

That should be it for the fb.

Touchscreen configuration

A nice “s3c2440-ts” driver should also be loaded when booting your board, it is responsible for providing the touchscreen input.

Char device

When booting, you can see that message: “input: s3c2410 TouchScreen as /devices/virtual/input/input1”. And indeed, if you go to the directory “/sys/devices/virtual/input/input1” (don’t forget to mount /sys), you’ll see some nice things.
In this folder, 2 directories have interesting names: event1 and mouse0, and both of them have a “dev” file in their content. They contain major:minor addresses of their character devices. Hu ?
event1 provide a “touchscreen” way to access to the touchscreen input while the mouse0 provide another abstraction that show the ts as a mice.
To access them, we have to make a node in /dev as following:

mkdir /dev/input
mknod /dev/input/ts c 13 65 # (from event1/dev)
mknod /dev/input/mice c 13 32 # (from mouse0/dev)

BTW, I kind of discovered the mouse input after doing what’s next, but I didn’t really had good results with that abstraction.

tslib

In order to exploit what’s coming from /dev/input/ts (if you do “cat /dev/input/ts”, you should see some weird characters when touching the screen Wink ), we can use the tslib library.
I followed that howto to cross-compile it.

After the installation, you should be careful with the configuration.
About the ts.conf, I just uncommented “module_raw input”.
About the env variables, I exported as follow at first:

export TSLIB_TSEVENTTYPE=INPUT
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/ts
export TSLIB_CALIBFILE=
export TSLIB_CONFFILE=/usr/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/lib/ts

As you can see “TSLIB_CALIBFILE” is empty, if you put something in it, all ts_* tools will quit with a nice Seg fault …
Then calibrate your screen with “ts_calibrate /usr/etc/ts.calib” and a stylus. After that, calibration information’s will be stored in /usr/etc/ts.calib, data that you should put in the “TSLIB_CALIBFILE” env var.

If you want a more reliable configuration, put all those vars in the /etc/profile file, this will be load along with bash.

Qt Embedded 4.5

While the qt lib is a nice and heavy piece of work, cross-compiling is actually quite easy.

First you need to download the sources from Qt: http://get.qt.nokia.com/qt/source/qt-embedded-linux-opensource-src-4.5.2.tar.gz (last version here).

Untar it and then go in the directory.

First we need to provide what tools you’re going to use for cross-compiling the thing. On my host I use the toolchain provided by my openembedded installation, thus all my tools are starting by “arm-angstrom-linux-gnueabi-“. You have to modify the file

mkspecs/qws/linux-arm-g++/qmake.conf

to express what tools you want to use to cross-compile. Of course you have to do that according to your toolchain.
BTW, if your toolchain is a path that’s only in your user PATH var, you might want to put the full path to your toolchain, otherwise there will be some problems when doing “sudo make install”.

Then, let’s configure:

./configure -embedded arm -xplatform qws/linux-arm-g++ -prefix /usr/local/Qt -qt-mouse-tslib -little-endian

The -prefix is telling Qt that it’s going to be installed in /usr/local/Qt : hu ? When I first compiled Qt, I had my sd card mounted on /media/disk, so I put -prefix /media/disk/usr/local/Qt as an option. While I had no problem for the installation, I had troubles running some examples, as they we’re looking for files in the prefix path and not the real path (which is /usr/local/Qt on the board). I played a bit with the options but didn’t find a nice way to do that, that’s why I did the really ugly hack that’s following. I’m looking for a better solution, so if anyone as any, please mail me …
I simply did a symbolic link from /usr/local/Qt to /media/disk/usr/local/Qt by doing :

sudo ln -sf /media/disk/usr/local/Qt /usr/local/Qt

That’s really ugly cause cross-compilation and virtual installation should be done nicely in userspace, while here I use a system wide path to do the trick.

Then you simply have to do :

make
sudo make install

It’s going to take a while so go drink a coffee and remember those nice times when you had fun installing a gentoo from stage1 on a k6-2 …

Then unmount your sd card and boot your board.

You first have to register the Qt lib dir, this two lines should do:

echo "/usr/local/Qt/lib" > /etc/ld.so.conf.d/qt.conf
ldconfig

Then, in order to configure QWS to use the tslib driver, you have to

export QWS_MOUSE_PROTO=tslib:/dev/input/ts

as mentioned in the Qt doc.

And … that should be all.
Have fun with Qt examples, starting by /usr/local/Qt/exemples/qws/mousecalibration in order to make sure that everything is all right.

Other ressources


Please comment this post, if you find any error or improvement I would be glad to take them in consideration Wink

75 Comments

  1. paperoga paperoga

    Ok… nice guide… but the Qt works directly on the frameuffer or it heeds a X server?!

    • cor cor

      thanks, I’m going to put it on the google source wiki any time soon, I just have to find some times to myself.

      About Qt, it works on framebuffer, there is no need for any X server (much better for an embedded system)

  2. Ok..I follow the instructions.
    I run successful ts_* tools, but i get “Segmentation fault” error when i run mousecalibration app and touch the screen. This error persists with all other qt apps, also.

  3. Markus Markus

    Hey I’ve some problems with compiling my own applications do you can make a short tutorial for that?

  4. Fabian Fabian

    I got the “Segmention fault” with 7″ display, no problem with 3.5 one.

  5. davide pasini davide pasini

    I’m looking for a small linux distribution for my mini2440+7″ with qt and qt framebuffer. I do not want to use Qtopia or a distribution with X11. Can anyone help me?
    Thank you

  6. cor cor

    I don’t have access to a Mini2440 anymore, but here are some answers:

    Markus)
    Sorry for the delay, but there is already plenty howto available on the Internet for learning how to compile your stuff, a few hints: cross-compiling is really close to compiling programs for your host system, you just have to use a toolchain aimed at your system (here it’s an arm), you also have to be careful with linked librairies. If you want to compile complex softwares, I guess you should give openembedded a try.

    Fabian)
    I had Segmentation fault when tslib was looking for an non-existing file (defined in your locales), you might want to make sure there is no problem about that, otherwise I don’t know where that’s coming from

    Davide)
    If you have an accurate vision about what you want, or if you want to build something “sur-mesure”, I guess the OpenEmbedded project is the way to go (buserror provide some information about it on is blog, http://bliterness.blogspot.com/, and you might want to check out the project homepage and wiki too). OE in itself is not a distro, Angstrom is and can be built with OE.
    If you want to explore things and build your distro using apt-get, Embdebian is really powerful.

    Those projects can provide lightweight distributions that might fill your needs, but OE is kinda heavy to learn (the thing is amazing, you can do mostly everything) while Embdebian can give you a kick-start, especially if you are already familiar with Debian or deviations (ubuntu …).

    About Qt, you will be able to use it without installing an heavy X11 in both case.

  7. Davide Pasini Davide Pasini

    hi cor
    thank you for your answer.
    I’m looking for a solution to run a simple Qt application on a arm device.
    My board is the mini2440. I’ve the linux kernel and the drivers but I don’t know how install the qws
    Thanks
    Davide

  8. davide pasini davide pasini

    Now I’ve a working linux distro. The next step is to compile QT for my mini2440 board. I’m working on a ubuntu9.04 on my laptop but I can’t compile QtEmbedded. Running ./configure and make with the options they returns 2 main errors:
    1) arm-linux-g++ : Command not found
    2) The tslib functionality test failed!
    You might need to modify the include and library search paths by editing
    QMAKE_INCDIR and QMAKE_LIBDIR in

  9. davide pasini davide pasini

    hi again, I’ve solved the previous problem. Was only a simple privileges problem on tha directory.
    But now, after compiled QtEmbedded, there is another problem. When I run a simple program qt on mini2440 the system returns: “Illegal instruction”.
    Any ideas?
    bye
    Davide

  10. sbc_user sbc_user

    Hi,

    I compiled everything as explained. However, when I try to execute ts_*, I get this message:

    -bash: /usr/bin/ts_calibrate: No such file or directory

    Any input would be appreciated.

    Thanks

    • cor cor

      Hi,

      The path is probably wrong, as the ts_* binaries should be in another directory, so it’s not a surprise that it can’t find it in /usr/bin .

      You should find the correct path for the bin and then add it to the PATH global var using export (session time) or /etc/bashrc (definitive).

  11. sbc_user sbc_user

    thanks for reply.

    that’s the point. I put everything in /usr/bin/ , as well as in /usr/local/bin. The executabile files are there. It’s just that when I execute ’em I get that message.

  12. Mankin Mankin

    I managed to compile a simple Hello World Gui application, but when i click (Touch screen or mouse) instead of staying in the application i ran it goes back to the background(qtopia), same happens when i run ts_calibrate.
    What do I need to do?

    • cor cor

      I’m sorry but I don’t think I will be able to bring you any help, my experience with QtEmbedded didn’t go much further the installation process because of time non-expendability problems.
      I guess you could try to ask your question on freenode @ #mini2440, or maybe on the Qt forum concerning the qt problem.

  13. Amino Amino

    Hello,

    I have managed to follow your instruction ,and compiled and run Qt examples on mini2440 with a manual built rootfs (not using qtopia),the output is:
    1- gui is displayed on screen
    2- pointer can move with touch screeen
    3- no interaction between the touch screen and Qt Gui (i.e: when I try to press button on gui, nothing happens !!)

  14. Goran Goran

    David,
    I’m getting the same erroron tslib:

    “The tslib functionality test failed!
    You might need to modify the include and library search paths by editing
    QMAKE_INCDIR and QMAKE_LIBDIR in”

    Can you please let me know how you resolved that.

    Thanks!

  15. vmlinz vmlinz

    @Goran
    maybe you didn’t provide the properly compiled tslib for qt4.5 to use when using “-qt-mouse-tslib” to compile it.
    you should first get compiled tslib which provide things needed to compile qt4.5 with.

  16. Hi, i think you are booting from sd card… if so may you tell
    me how do that ?
    thank you

  17. Thank you, now i can boot from sd card.
    I’ve compiled qt4.5.2 and mousecalibration works fine only the first time i run it.
    The second time i run it i get “segmentation fault”.
    If i reboot the board it works again.
    any help?

  18. I answer by my self… i compiled the Qt using -debug option and now works fine !!

  19. 0x815 0x815

    Hi,
    @cor Did you compile qt-embedded with phonon support?

    When I run ./configure -qt-gfx-qvfb -qt-kbd-qvfb -qt-mouse-qvfb -phonon -phonon-backend I end up with:
    Phonon support cannot be enabled due to functionality tests!

    I rellay want to use phonon though.

    Thanks for any advice

    • cor cor

      Hi, no I didn’t try to compile Qt with phonon.

      Hope you’ll manage to do it Wink

  20. Jonas Jonas

    Hello Cor,

    nice tutorial! I want to compile Qt for the mini2440 using the Codesourcery crosscompiler (i do not have another and this is working well).
    Now, if i compile Qt and execute some example on my mini2440, i get an “illegal instruction” error. Always getting this, when forgetting to compile other than armv4t architecture. Do you have a hint, how to tell Qt to compile with armv4t-setting? I tried ./configure -embedded armv4t… But maybe this was not very sophisticated, as it did not work (same problem). Maybe you have a hint? Thank you

  21. Jonas Jonas

    Hello, i solved above by adding armv4t arch option to my mkspecs/qconf-file… (CCFLAGS..)

  22. Jonas Jonas

    Hello Cor,
    i compiled tslib and Qt correctly, both can be run (means, i can start Qt apps and the ts_ apps). I can calibrate via ts_calibrate perfectly, but when starting a Qt app, screen does not seem calibrated, even “mousecalibration” will not do the trick. Now, thats all without export QWS_MOUSE_PROTO. If i export this pointing to /dev/input/ts (existing and having correct access rights), any Qt application will not start with an illegal instruction error. If i remove the export QWS_MOUSE_PROTO again, all apps start but not ts input possible (“weird calibration”). the ts_-apps still work fine and “are calibrated”. Any hints maybe? Thank you

    • cor cor

      Hello Jonas, sorry it took me so long to answer your comment, busy times
      I remember having a similar problem, after I wrote this tutorial. Somehow it was working fine at first, and I don’t remember exactly what I did or didn’t do but in the end I had such weird problems.
      Since the UI was not an important part of my project I kind of let go, but if you find any way to solve that problem, I would be glad if you can give me some feedbacks so I can update this post.
      Good luck

  23. Joachim Joachim

    Hi cor!
    I compiled Qt4.5 sucessfully and deployed the libs (libQtGui, libQtCore and libQtNetwork, I will never need the other stuff). I set the environment variables and can run Qt4.5 applications without graphic.
    As soon as i add graphics, the apps end with a simple “segmentation fault”.
    To see a bit more, I crosscompiled strace. It showed, that the segmentation fault accours just afte the app has opened /def/fb0.
    I copiled Qt4.5 with different configurations various times: no success.
    I compiled Qt3.8: same result.

    I used the original mini2440 image with Qtopia on it and just deployed the new libs and changed the environment to be able to use the new QT versions.
    Is it not possible to run Qt 4.5 on the Qtopia image?
    What did you use to run your Qt on?
    Could you provide the image for download?
    Best Regards
    Joachim

    • cor cor

      Hi Joachim,
      I just used the Qtopia image once when I first tried the board, everything on it is very outdated (the once I had in February though, I don’t know if they renew the bundle since).
      You should probably use images from here: Google Code @minI2440 as it is more recent, I don’t have mines anymore so I won’t be able to provide them.
      The image I was working on for this tutorial was build using OpenEmbedded, from the repositories you can find there.

      Concerning your seg fault problem, it is indeed probably coming from the framebuffer, but I don’t why nor if Qt or the driver is the problem. In either case, you should try with a newer version.
      Hope you will be able to get it working Wink

  24. I am writing below code as last
    “echo “/usr/local/Qt/lib” > /etc/ld.so.conf.d/qt.conf”
    “ldconfig”
    But Gave some errors.
    “root@mini2440:~# echo “/usr/local/Qt/lib” > /etc/ld.so.conf.d/qt.conf
    /usr/local/Qt/lib
    -sh: gt: not found
    -sh: /etc/ld.so.conf.d/qt.conf: not found
    [1] + Done echo “/usr/local/Qt/lib”
    root@mini2440:~#”

    moreover,gave the followig error when I write “ldconfig”
    “ldconfig: Can’t open configuration file /etc/ld.so.conf: No such file or directory”

    Can someone help me…

    • cor cor

      Maybe your distribution has another way to configure the library path, as the purpose of the line you describe is to allow the system to know where to look for Qt libraries.
      A solution would probably be to ask how to configure the LD path on the library IRC channel, or eventually mailing list/forum.

  25. Pankaj Pankaj

    Hi Jonas,

    Did you figure out the problem with the touchscreen misbehaving with QWS_MOUSE_PROTO unset and crashing when set. I am facing the exact same problem. If you found a solution can you please share it.

    Cheers

  26. imayoda imayoda

    Hi there… May I leave here a question?
    I’m actually using debian squeeze on mini2440 and I need to configure the TS thing Smile
    I noticed that tslib is already compiled in Deb packages + tools.. Should I compile support myself or can I just jump to the next move ???

    Thanks in advance

    • cor cor

      Hi, I guess you can simply use the packages and jump to the configuration steps Wink

  27. Dave Dave

    I just ordered the mini w/7″ that’s a Debian distribution correct? MINI2440-mark II is coming out with Ångström as the official Linux distribution.
    I want a graphic menu system. Since I’m just starting, I should ask you or your visitors, is there something out there that’s established the basis in either a picture and button or tree structure using the touch screen. I’m a windows programmer and the last time I did unix programming was 14 years ago. So I’m looking to start in the right direction. Which OS, tool chain and is there sample code for what I’m looking to do?

    • cor cor

      I believe Qt is exactly what you are looking for, you can use a touchscreen and the API is pretty straightforward (tree structure, with layout and widgets) and should be pretty close to what you experimented with the Windows API.
      Other solutions could be to work out something with DirectFB, or Java, but Qt would be much simpler and portable.
      Concerning the OS/toolchain, OpenEmbedded is a good place to start … and will provide you both, you might want to look at http://code.google.com/p/mini2440/wiki/OpenEmbedded for a quick start on OpenEmbedded and at that article to start using Qt with OpenEmbedded.
      By the way, good to know that the Mark II has Angstrom now, you can simply build packages with OpenEmbedded and then install them using opkg on the basic distribution.

  28. vinpa vinpa

    Hello!

    I managed to get the ts_* utils working, as well as my compiled QT libraries.

    My problem lies in the calibration of the touchscreen. I remember reading somewhere before that a source file may need to be tweaked for the touchscreen to properly function.

    It seems as if the Y-axis is inverted or something…regardless, it’s strange and the only thing holding me back from further development.

    If anyone has any ideas, please, do not hesitate to post! In the meantime I will try to dig up the doc I found and post my findings for whoever else is fighting with calibration.

    ——-

    FIXED:
    I was not running the correct command…

    ts_calibrate >/usr/etc/ts.calib

    is what I forgot in order to create the .calib file.

    ——-

    NEW ISSUE:
    This line…
    echo “/usr/local/Qt/lib” > /etc/ld.so.conf.d/qt.conf
    ldconfig

    I am getting the following error…
    # echo “/usr/local/Qt/lib/” > /etc/ld.so.conf.d/qt.conf
    /usr/local/Qt/lib/
    [1] 7405
    -bash: gt: command not found
    [1]+ Done echo “/usr/local/Qt/lib/”
    -bash: /etc/ld.so.conf.d/qt.conf: Permission denied

    Any ideas?

    Thanks,

    vinpa.

  29. vinpa vinpa

    Another problem when attempting…

    export QWS_MOUSE_PROTO=tslib:/dev/input/ts
    No mouse handler installed
    Aborted

    Could be because the previous step failed – not sure.

    When I attempt to launch FluidLauncher, I get…

    :/usr/local/Qt# demos/embedded/fluidlauncher/fluidlauncher -qws
    ERROR: Unable to open config file “config.xml”

    But a mouse hangs around and I can move it (uncalibrated).

    Thanks,

    vinpa.

  30. vinpa vinpa

    FIXED:
    cd …/fluidlauncher
    ./fluidlauncher -qws

    has to be launched from cd dir – solved problem.

  31. BullT BullT

    I make my Mini2440 programs with Qt Embedded, but I have problems with the installation:

    PC Operating System: Debian-Linux.

    Program installed on PC: Qt SDK.

    I want to install Qt-Embedded-Linux-4.5, but when you run “. / Configure-embedded arm-xplatform qws / linux-arm-g + +-prefix / usr / local / qt-qt-mouse-tslib-little-endian” I get the following weaknesses:
    The tslib functionality test failed!
    You might need to modify the include and library search paths by editing
    QMAKE_INCDIR and QMAKE_LIBDIR in
    / home/bullt/qt-embedded-linux-opensource-src-4.5.3/mkspecs/qws/linux-arm-g + +.

    Nor let me run the make:
    make: *** No target specified and no found no makefile. High.

    The file qmake.conf
    #
    # Qmake configuration for building with arm-linux-g + +
    #

    include (../../ common / g + +. conf)
    include (../../ common / linux.conf)
    include (../../ common / qws.conf)

    # Modifications to g + +. Conf
    QMAKE_CC = arm-linux-gcc
    QMAKE_CXX = arm-linux-g + +
    QMAKE_LINK = arm-linux-g + +
    QMAKE_LINK_SHLIB = arm-linux-g + +

    # Modifications to linux.conf
    QMAKE_AR = arm-linux-ar CQS
    QMAKE_OBJCOPY = arm-linux-objcopy
    QMAKE_STRIP = arm-linux-strip

    load (qt_config)

    Thanks for the help

  32. lim lim

    I failed to compile Qt4.5. Here are the error messages.g++ -fno-exceptions -Wl,-O1 -Wl,-rpath,/home/vikikivi/mini2440-bootstrap/output/qt45/lib -Wl,-rpath,/home/vikikivi/mini2440-bootstrap/output/qt45/lib -o ../../../bin/moc release-shared/moc.o release-shared/preprocessor.o release-shared/generator.o release-shared/parser.o release-shared/token.o release-shared/main.o -L/home/vikikivi/mini2440-bootstrap/output/tslib/lib -L../bootstrap -lbootstrap -L/home/vikikivi/mini2440-bootstrap/output/tslib/lib -ldl
    /usr/bin/ld: ../bootstrap/libbootstrap.a(compress.o): Relocations in generic ELF (EM: 40)
    ../bootstrap/libbootstrap.a: could not read symbols: File in wrong format
    collect2: ld returned 1 exit status
    make[1]: *** [../../../bin/moc] Error 1
    make[1]: Leaving directory `/home/vikikivi/mini2440-bootstrap/qt-embedded-linux-opensource-src-4.5.3/src/tools/moc’
    make: *** [sub-moc-install_subtargets-ordered] Error 2

    I’ve googled for so long but still not able to find any useful. Would someone please advise what went wrong?

    Thanks
    lim

    • cor cor

      For some reason, the libbootstrap.a file must be in some x86 format while your are trying to compile for ARM, or the opposite.
      You can easily check that the file has the right format using the “file” command, or using “objdump” with the right options (-X ?).

      However, it seems that you are using g++ to compile Qt4.5, while you should use some arm toolchain (cf codesourcery).

  33. lim lim

    I totally agree with you. Somehow, ld (instead of arm-linux-ld) appears in the error messages. Having seen that, I had confirmed many times that the cross-compiler is right. However I found out that arm-linux-ld is not set in qmake.conf. Is that needed? why it isn’t needed? how to set that if it is needed?

    Thanks

  34. lim lim

    I found out that no matter how I confiure, see below. The output is still using linux-x86-g++

    ./configure -embedded arm -xplatform qws/linux-arm-g++ -prefix /home/vikikivi/mini2440-bootstrap/output/qt45 -depths 4,8,16,32 -qt-mouse-tslib -little-endian

    The consequence is, it compiles using the arm-none-linux-arm-g++ with qws/linux-x86-g++.

    Would someone please advise how to make it using arm-linux-g++ instead.

    Thanks

  35. lim lim

    Still no lucks. I decided to remove the -prefix to make it use the default. However, I still get the following messages:Creating qmake. Creating qmake. Please wait…
    arm-none-linux-gnueabi-g++ -o “/home/vikikivi/mini2440-bootstrap/qt-embedded-linux-opensource-src-4.5.3/bin/qmake” project.o property.o main.o makefile.o unixmake2.o unixmake.o mingw_make.o option.o winmakefile.o projectgenerator.o meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o borland_bmake.o msvc_dsp.o msvc_vcproj.o msvc_nmake.o msvc_objectmodel.o qstring.o qtextstream.o qiodevice.o qmalloc.o qglobal.o qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlistdata.o qfile.o qfsfileengine_unix.o qfsfileengine_iterator_unix.o qfsfileengine.o qfsfileengine_iterator.o qregexp.o qvector.o qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o qfileinfo.o qdatetime.o qstringlist.o qabstractfileengine.o qtemporaryfile.o qmap.o qmetatype.o qsettings.o qlibraryinfo.o qvariant.o qvsnprintf.o qlocale.o qlinkedlist.o qurl.o qnumeric.o qcryptographichash.o qscriptasm.o qscriptast.o qscriptastvisitor.o qscriptcompiler.o qscriptecmaarray.o qscriptecmaboolean.o qscriptecmacore.o qscriptecmadate.o qscriptecmafunction.o qscriptecmaglobal.o qscriptecmamath.o qscriptecmanumber.o qscriptecmaobject.o qscriptecmaregexp.o qscriptecmastring.o qscriptecmaerror.o qscriptcontext_p.o qscriptengine.o qscriptengine_p.o qscriptextenumeration.o qscriptextvariant.o qscriptcontext.o qscriptfunction.o qscriptgrammar.o qscriptlexer.o qscriptclassdata.o qscriptparser.o qscriptprettypretty.o qscriptsyntaxchecker.o qscriptvalue.o qscriptvalueimpl.o qscriptvalueiterator.o qscriptvalueiteratorimpl.o qscriptclass.o qscriptclasspropertyiterator.o qscriptengineagent.o qscriptcontextinfo.o qscriptstring.o
    /home/vikikivi/mini2440-bootstrap/arm-2008q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: option.o: Relocations in generic ELF (EM: 3)
    […]
    /home/vikikivi/mini2440-bootstrap/arm-2008q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: option.o: Relocations in generic ELF (EM: 3)
    option.o: could not read symbols: File in wrong format
    collect2: ld returned 1 exit status
    make: *** [/home/vikikivi/mini2440-bootstrap/qt-embedded-linux-opensource-src-4.5.3/bin/qmake] Error 1
    + make
    make: *** No targets specified and no makefile found. Stop.
    + sudo make install
    make: *** No rule to make target `install’. Stop.

    You may see that, it uses the right g++ from the cross-compiler folder .

    Feel free to advise.
    Thanks

  36. Hi
    i have mini 7“ version . i followed all the steps above but stiil i get a segmentation fault. why is it said to run on 3.5“ without any problem. is the only problem size?

    is there anyone who make it work on 7“ LCD

    thanks
    Ethem

  37. Antonio Gabriele Antonio Gabriele

    Hi,
    I successfull build Qt + tslib. Test app (sliders) worked well for two weeks. Now (I modify nothing) app starts but when I touch the touchscreen, app hangs, and CPU goes 100%. Did you experience this problem?

    • cor cor

      Hi, I never experienced what you’re describing, and it seems like a very weird problem, I don’t know what you cause such problem.
      Maybe you should try to use your app against gdb, somehow the app must run into an infinite loop or something really close to that (+oo – 1 Wink ), maybe by looking were the application hang -in the code- you can find what it is causing it.

  38. Mahesh Mahesh

    Could you please upload your root fs and post the link as I am struggling to get it working.

  39. Hi
    i am using arm-linux-gcc v4.3.2. (came on the DVD) mini2440 7inch LCD.

    i dont use Qtopia or any other X on the board.

    i downloaded QT-4.5.3 embedded
    i followed the steps one by one
    i could make my ts_calibrate work. (it didnot work until i copied a pointercal file into /etc and specify it in the variables
    so now my tslib works
    then i came into Qt examples
    when compiling had no problems then copied into mmc (i boot from mmc) first tried the qws/framebuffer example and work perfect. second run ./mousecalibration but gave Segment Fault. i tried another example like Wiggly as ./wiggly it said QWSsocket couldnot connect to server try -qws option which resulted on Segment fault.

    iam realy confused. have been trying for compiling again and again. but nothing workout.

    what might be the problem? Please any idea. shall i change compiler or some library missing ?

    thanks
    Ethem

  40. BullT BullT

    Hi,

    I can not install except where indicated otherwise Embdded QT, nor make any program with MINI2440.

    The guide that you post is very useful, but for my case I’m not abituale linux user, I can not perform the installation.

    I hope you put a step by step guide, very detailed, of the steps needed to install the QT Embedded.

    Thanks

  41. lim lim

    Having tried a different approach by putting the full paths for the toolchain. The compilation just works. Hence, the would like to suggest anyone who has compilation error messages published earlier, please making sure you have the mkspecs/qws/linux-arm-g++/qmake.conf contents set correctly with full path to your toolchain.

    Thanks

  42. Hi
    I have a mini2440 too and need tslib for it. Thanks to your details, I have been able to compile it (with codesourcery’s toolchain and it seems to be generated fine for armv4t as confirmed from readelf) but when i try to run any of the utilities like ts_calibrate, ts_test etc, I always get a “ts_calibrate/ts_test not found” error. BTW, I am using my own minimal busybox based rootfs. Would it be possible for you to send me a copy of your compiled tslib so that I can check if there is something wrong with my compilation.
    Thanks

  43. Janusz Janusz

    Hi, I have created /dev/input directory but after restart there is no such directory. What is going on ?

    regards

  44. anf anf

    Hi all
    I have a touchscreen calibration problem, I have created a ts.calib file by
    ts_calibrate > /usr/etc/ts.calib. I have exported this file “export TSLIB_CALIBFILE=/usr/etc/ts.calib”

    But my applications are not working right. When I drag to X axis mouse promt go to Y-axis, When I drag to Y axis mouse promt go to X-axis, also calibration is not true. ts_test works very good.

    Also When I added
    ” export QWS_MOUSE_PROTO=tslib:/dev/input/ts ” this , touch screen is not working.

  45. Janusz Janusz

    ethem

    I have the same problem. Did you solve it ?

  46. Allan Allan

    ts_calibrate and ts_test working fine. When i run any QT demo/example app, as soon as I touch the screen i get a segmentation fault. Any ideas?

  47. Hi everybody,
    If you have any problem with /dev/input/ts, you should use /dev/input/event0 Wink

    For calib file, DON’T USE empty file!!!! use the existing one(before you have in qtopia)

  48. @Allan:
    I don’t know if this is related to your problem, but in case it could help, here is my experience.

    I got SegFaults when trying any demo I cross-compiled. After Googling a bit, I found that it seems to be a problem with the compiler optimisation. As suggested I recompiled the Qt libraries with optimisation off (-O0) by adding these lines :
    QMAKE_CFLAGS_RELEASE ~= s/-O[123s]/-O0/
    QMAKE_CXXFLAGS_RELEASE ~= s/-O[123s]/-O0/
    to mkspecs/qws/linux-arm-g++/qmake.conf

    After that no more SegFault, event if the application is itself compiled with optimisation.

    Since I’m quite newbie with Linux, Qt, Mini2440 et al. I leave true specialists comment on this.

    ${CROSS_COMPILE}gcc -v output :
    gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72)

  49. flux000 flux000

    Hello All,

    When a Qt application (e.g fluidlauncher) is started and i touch the screen, sometimes application in the background or desktop is activated. Is there a way to prevent the background apps from activating when running Qt application?

    My environment variables are shown below. I am using u-boot and GPE.

    export TSLIB_TSEVENTTYPE=INPUT
    export TSLIB_CONSOLEDEVICE=none
    export TSLIB_FBDEVICE=/dev/fb0
    export TSLIB_TSDEVICE=/dev/input/touchscreen0
    export TSLIB_CALIBFILE=/usr/local/tslib/etc/pointercal
    export TSLIB_CONFFILE=/usr/local/tslib/etc/ts.conf
    export TSLIB_PLUGINDIR=/usr/local/tslib/lib/ts
    export QWS_MOUSE_PROTO=tslib:/dev/input/touchscreen0

    Thanks,

    flux000

  50. JFMartel JFMartel

    Hi,
    Good work and thanks a lot. I succeeded to compile, install and develop a nice app for my mini2440.. thanks to your blog !

    I have a new question. Have you ever succeeded to launch your program at linux startup on the device ?
    I did succeed by adding the executable in the /etc/rcS file but the environment variables are not exported. And since the /etc/profile file is “loaded” only when a user logs in, I cannot figure out how to fire my app when device boots without having to log-in.

    Any advice would be greatly appreciated.

    Thanks again
    JF

    • cor cor

      Hi,
      I’m glad that you succedded.

      I think that you may want to make a short script that set your variables and then launch the app.
      For instance, something like that:

      #!/bin/sh

      export BLABLA = bla
      exec myApp

      A command like “source /etc/profile” might work too, I dunno.

      Good luck, please post a feedback telling how you managed to make it work, I’m interested Wink

  51. flux000 flux000

    Hi Cor,

    When an Qt app is running on mini2440 and the touch screen is touch, the background or desktop is displayed on the screen.

    Anyway to resolve this.

    Thanks,

    flux000

  52. JFMartel JFMartel

    Hi,

    I finally managed to make it work.
    I tried A LOT of things but the linux kernel/distro that comes installed on the mini2440 is very wierd. Being a newbie, it’s been a lot of googling, trial and error but finally the solution is quite simple.

    Everything is done in /etc/rcS.
    To declare environment variables such as QWS_MOUSE_PROTO, you have to do it in two parts, first assing a value, and then export.
    For instance:

    QWS_MOUSE_PROTO=tslib:/dev/input/touchscreen0
    export QWS_MOUSE_PROTO

    When you have exported all the env. variables useful for Qt to work, then you can invoke your app.

    Now when my device boots, my app is launched and the touchscreen works fine.

    Again, thanks for your good walkthrough for installing Qt.

    JF

  53. Matthias Matthias

    Hi,

    Thanks for the tutorial.
    I got a problem tough: I tried everything out what you said, but my calibration still doesn’t work…
    I only got that problem in Qt, out of Qt (while running a test) it works…
    But in Qt I got 2 possibilities:
    1. I don’t export: QWS_MOUSE_PROTO=tslib:/dev/input/ts
    => mouse isn’t moving the right way when touching the screen
    2. I do export it => mouse is blocking when touching the screen, it even doesn’t move anymore…

    can you plz help me out?

    Thanks

  54. ketan ketan

    hello.,
    i am working with mini2440 3.5″ LCD board
    i have successfully compiles Qtopia2.2.0 provided with the DVD or the download material.
    i want to install qtopia 4.5.2 or any version recent.
    i have referred to many forums but all says different. even i compiled once but i m not succeded.
    so any one please give me the full steps for that ?
    u can mail me even : ketanec2007@gmail.com

    thanks in advance
    ketan patel

  55. jeremy jeremy

    Hi,

    Thanks for your work, it really helpfull for beginer as me Smile

    I am working with ubuntu 10.10 and I installed emdebian grip lenny on my mini2440.

    I installed tslib, it seems to work well then I configure/make/make install Qt. Both I installed in the usr/local folder;

    Then I cross-compiled a demo application “mousecalibration” and when I want to execute it : /lib/libc.so.6: version `GLIBC_2.9′ not found …

    I didn’t compile Qt with “-static” but anyway I think it will be the same problem.

    Do you have any issue ?

    Thank you very much guys !!

    Jeremy from France

  56. Pavan Pavan

    Hi,

    Thanks a lot Cor. I have compiled my qt 4.6.3 and tslib successfully and loaded into mini2440 and run it from terminal by giving

    ./myapp -qws

    It run successfully. Now I want to launch from the desktop by creating an icon and by clicking on it.

    Please help me how to do it

  57. Afonso Afonso

    Hi,
    Thanks for this tutorial. I need help with Touchscreen.
    I compiled Qt and tslib successfully.
    Typing “cat /dev/input/ts” works as mentioned (weird chars when touched).
    ts_calibrate and ts_test work fine too (touch screen is working fine).

    If I use “export QWS_MOUSE_PROTO=tslib:/dev/input/ts” it shows “Segmentation fault”. When I replace this line by just “export QWS_MOUSE_PROTO=” (without :” the my “Hello World” shows perfectly, but no touch screen.

    Compiling Qt with “-no-freetype” generates the same result: “Segmentation fault”.

    I can’t find a way to work touch with my app.

    Any suggestion?
    Thank you.
    Afonso.

  58. Abhishek Abhishek

    Guys m a newbie to arm board and linux. I have compiled the tslib lib.I m having n error in configuring qr-source-everywhere where it gives error
    relocation in generic elf em 3 for the file option.o.
    Wasted many days and couldnt get over dis problem.]
    For cross compiling i strictly followed this forum
    http://mini2440vietnam.blogspot.com/2011/04/upgrade-qt462-in-mini2440.html
    could understand were i am at fault..
    HELP !!! ASAP…

    Thanks in Advance

  59. Sushant Sushant

    I create a hello application but its not run in embedded board its generate a error namely lib file is not find’

Leave a Reply

Your email address will not be published. Required fields are marked *

Click to Insert Smiley

SmileBig SmileGrinLaughFrownBig FrownCryNeutralWinkKissRazzChicCoolAngryReally AngryConfusedQuestionThinkingPainShockYesNoLOLSillyBeautyLashesCuteShyBlushKissedIn LoveDroolGiggleSnickerHeh!SmirkWiltWeepIDKStruggleSide FrownDazedHypnotizedSweatEek!Roll EyesSarcasmDisdainSmugMoney MouthFoot in MouthShut MouthQuietShameBeat UpMeanEvil GrinGrit TeethShoutPissed OffReally PissedMad RazzDrunken RazzSickYawnSleepyDanceClapJumpHandshakeHigh FiveHug LeftHug RightKiss BlowKissingByeGo AwayCall MeOn the PhoneSecretMeetingWavingStopTime OutTalk to the HandLoserLyingDOH!Fingers CrossedWaitingSuspenseTremblePrayWorshipStarvingEatVictoryCurseAlienAngelClownCowboyCyclopsDevilDoctorFemale FighterMale FighterMohawkMusicNerdPartyPirateSkywalkerSnowmanSoldierVampireZombie KillerGhostSkeletonBunnyCatCat 2ChickChickenChicken 2CowCow 2DogDog 2DuckGoatHippoKoalaLionMonkeyMonkey 2MousePandaPigPig 2SheepSheep 2ReindeerSnailTigerTurtleBeerDrinkLiquorCoffeeCakePizzaWatermelonBowlPlateCanFemaleMaleHeartBroken HeartRoseDead RosePeaceYin YangUS FlagMoonStarSunCloudyRainThunderUmbrellaRainbowMusic NoteAirplaneCarIslandAnnouncebrbMailCellPhoneCameraFilmTVClockLampSearchCoinsComputerConsolePresentSoccerCloverPumpkinBombHammerKnifeHandcuffsPillPoopCigarette