Qtopia everywhere 4.6.1

Marco NoUser 2010-02-03 18:29:46 Link
Hello,
I built the qt4.6.1 library following:
http://blog.cor-net.org/embedded/mini2440/qt-45-on-mini2440/

The tslib is already present in the qtopia 2.2 installed on my mini2440, so
I tried to simply copy the QT4.6.1 library and set the environmental
variable on the board.
I notice that QPE is not used in the QT-everywhere distribution is it true,
or I miss something? 
Anyway I also try to run some examples on the board but without any
success, the error was "illegal instruction" that seems like a wrong cross
compilation. 
But this is really strange
Please help me....

fatbrain User 2010-02-04 05:36:02 Link
Did you compile QT  with tslib switch, I configures with the following QT
switches

./configure -embedded arm -xplatform qws/linux-arm-g++ -prefix
/usr/local/Qt -qt-mouse-tslib -little-endian -no-webkit -no-qt3support
-no-cups -no-largefile -nomake examples -optimized-qmake -no-openssl
-nomake tools


regards
--fatbrain

Janusz User 2010-02-04 18:22:05 Link
fatbrain

Did you just copy libraries to the /usr/local/Qt or did you do something
else?

regards
 Janusz

cBSAn NoUser 2010-02-04 23:30:34 Link
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.
It seems coordinates are inverted. When I drag it over X axis mouse is
moving at Y axis  , When I drag it over Y axis mouse is moving at X axis.

and also when I export QWS_MOUSE_PROTO=tslib:/dev/input/ts , my application
is not responding.

marco NoUser 2010-02-05 00:33:45 Link
Hello,
I use a similar configuration as fatbrain, and copy the lib to new folder
on the board /opt/qt/ updating the env variable concerning QTDIR and
LD_LIBRARY_PATH.
I really do not know why I get the "illegal instruction" error while try to
execute a compiled example on the board.
Any suggestions?

fatbrain User 2010-02-05 04:26:13 Link
Janusz
After a successful build the QT libs are in /usr/local/Qt/lib , I copied
all the QT libs to my roots and then exported out the QT lib path to
LD_LIBRARY_PATH . Also make sure you use the -qws switch to launch your
apps.

macro 
As for getting the "illegal instruction" did you explicitly configure you
compiler to turn off floating point. 

-msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4 -mtune=arm920t

marco NoUser 2010-02-05 11:50:31 Link
Hi fatbrain,
I didn't use the -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4
-mtune=arm920t option while compiling since others programs cross-compiled
with gcc but without QT work well.
Anyway I will try with your precious suggestion. Thanks!
Since I have QT2.2.0 on my board I suspect that running QT4.6.1 program,
even after installing libs and setting the env variable, will be a problem
Does anyone try to sun QT4.6.1 on the QT2.2 image provided with the board?

Thanks.

paolo User 2010-02-05 16:59:46 Link
Hi all, 
I'd like to ask you which operating system do you run on your host
computer. I tried to compile Qt 4.6.1 on my Ubuntu 9.10 host but I received
a lot of strange compilation error, the same has happened when I tried to
compile the "old" QTopia 2.2.
I noticed this manual
http://microarmsystems.com/media/MINI2440_USER_MANUAL.zip
uses Fedora 9 as reference operating system for the host computer.
Is it necessary to use Fedora 9 (it sounds strange to me)

paolo User 2010-02-05 17:01:05 Link
Hi all, 
I'd like to ask you which operating system do you run on your host
computer. I tried to compile Qt 4.6.1 on my Ubuntu 9.10 host but I received
a lot of strange compilation error, the same has happened when I tried to
compile the "old" QTopia 2.2.
I noticed this manual
http://microarmsystems.com/media/MINI2440_USER_MANUAL.zip
uses Fedora 9 as reference operating system for the host computer.
Is it necessary to use Fedora 9 (it sounds strange to me)?
Thanks
paolo

Janusz User 2010-02-05 20:20:02 Link
Hi paolo,

I have Ubuntu 9.10 and I had no problems with compiling QT 4.6.1. What
errors do you have ?

regards
 Janusz

paolo User 2010-02-05 21:14:00 Link
Hi Janusz,

Thank you for your answer.
I tried both with Fedora 12 and Ubuntu 9.10 and I had different problems.
I'm starting to explain the first problem I have now:

I have my Gcc Arm toolchain; it is properly working (I compiled some basic
examples downloaded from this website and they works fine).

I did everything according to
http://blog.cor-net.org/embedded/mini2440/qt-45-on-mini2440/

then I start my ./configure and...problems

my configure output is:

: not found: 42: 
: not found: 46: 
cd: 51: can't cd to .
: not found: 54: 
./configure: 91: Syntax error: word unexpected (expecting "in")

it seems I have some trouble with relpath in configure script:

relpath=`dirname $0`


This is only the last problem of a long series I experienced during last
time.
I have to say, I was able to compile and run Qt 4.6.1 examples for Windows
CE 5.0 in few minutes, but I have really a lot of problems with Linux. I
don't want to give it up, sooner or later I will run some Qt 4.6.1 examples
on Linux with my mini 2440, but it seems it is not so easy.


I see you are using Ubuntu 9.10, did you follow the instructions of
http://blog.cor-net.org/embedded/mini2440/qt-45-on-mini2440/ or did you
change something in this procedure?

Thanks a lot
paolo

paolo User 2010-02-05 22:23:53 Link
Found it!
I had to make little changes to configure script and now I'm compiling Qt.
Thanks
paolo

Janusz User 2010-02-06 10:12:27 Link
paolo,

I have to say that it is strange. I have just download QT 4.6.1 from web,
unpack and thats all. No changes :)

Let me know if you run QT on board. 

regards
 Janusz

paolo User 2010-02-06 10:56:36 Link
Janusz,

I agree with you. It's strange too much strange. I had never done this with
previous Qt installation. I installed Qt since version 3.X on different
linux distribution (Red Hat, Suse etc...) and I never needed to modify the
configure script. But in this case it seems there are some errors inside
and my shaell complains.
I will investigate more...
Keep in touch
paolo

marco NoUser 2010-02-06 11:01:01 Link
Does anyone try to run QT4.6.1 library on the QT2.2 image provided with the
board?

marco NoUser 2010-02-06 17:06:10 Link
Hi fatbrain,
I had always the same "illegal instruction" even following your
suggestions...
How can i solve this problem?

Sepp Bauer NoUser 2010-02-09 14:13:42 Link
Hi there, i got all working fine on 7", using 4.6.1 Qt with tslib, com
piled on ubuntu 9.10

my proplem is that the performance is really bad of anything i do with qt
:( any suggestions?

paolo User 2010-02-09 15:26:14 Link
Janusz,

Now I can compile Qt, I can compile tslib and I can compile Qt 4.6.1
examples.
Everything is ok at compile time, but I have a segm-fault at run-time.
At the moment I can not run Qt on board.
I'll write you more as soon as I discover the problem.
Paolo

Sepp Bauer NoUser 2010-02-09 17:04:19 Link
hi pablo, make sure u disable compiler optimation

its a real PITA!

-O0 in mkspecs for g++

best regards Seppo,

PS: how is your performace (at 7")

Seppo

Erik L NoUser 2010-02-11 16:52:35 Link
Hi cBSAn.
I think i have exactly the same problem with:

"My problem lies in the calibration of the touchscreen.
It seems coordinates are inverted. When I drag it over X axis mouse is
moving at Y axis  , When I drag it over Y axis mouse is moving at X axis.
"

Did you find any solution to it?
ts_test workes just fine, its just in qtopia they are inverted.

Regards/Erik

paolo User 2010-02-12 10:14:02 Link
Hi Seppo,
I'll try your suggestion.
I have to say I've already compiled Qt 4.6.1 for Win CE on mini 2440 and it
was not so bad. Now I'm going to do the same for Linux so I can make
comparison. I'll let you know my results.
Thanks
paolo

sue NoUser 2010-02-12 11:50:31 Link
hi Sepp Bauer, plz guide me step by step 2 get qt4 working on my
mini2440...i have the tarballs qt-opensource downloaded with me. Also, wil
i be able 2 run the gui programs developed using qt4 creator on my board
then?

paolo User 2010-02-12 12:30:05 Link
It works!

Thanks seppo, finally I got it!
With the compilation option you wrote me I was able to compile and run the
mdi example.
Now I have to fix some problems with ts lib but is a minor problem.
As soon as I can make some "performance test" I will write here the
results.

Bye
paolo

Janusz User 2010-02-14 13:20:34 Link
paolo,

Can you tell me what have you done? I compiled QT 4.6.1,tslib and I created
simple application. Everything looks good but when I try to run my
application i get segmentation fault. :(

regards
 Janusz

p.s. I have MINI with 7".

Janusz User 2010-02-14 14:39:47 Link
Hi,

I have one more question. I turned off optimization and finally it starts
but how can I disable qtopia. If I start qt application using console and
qtopia is running, when I touch the touch screen -> qtopia is answering
(starting some application). If I turn off server
(settings->shutdown->terminate server) the pointer is dead. 

What can I do ?

Regards
 Janusz

Janusz User 2010-02-14 17:53:04 Link
Hi everyone,

Thanks for everything!! I finally ran qt 4.6.1 on my mini 7" hurraaayyy :)

Regards
 Janusz

Miklós Márton NoUser 2010-02-14 17:59:41 Link
Has anyone any ideas about the inverted touchscreen working?

paolo User 2010-02-14 18:43:19 Link
Janusz,

At the beginning I was happy because I fixed the segm fault error for sdi
example, but I tried to compile again this example and I had again the segm
fault :-(((
At the moment I'm trying to recompile Qt 4.5.2 and see the results.
I have to say  Qt 4.5.2 configure script does not have "strange" errors
like 4.6.1. 

Janusz, how did you fix your segm fault error?

Regards
paolo

Janusz User 2010-02-14 19:59:59 Link
Paolo,

I did what Sepp had said. In /mkspecs/common/g++.conf I changed
optimization flag from QMAKE_CFLAGS_RELEASE += -O2 to QMAKE_CFLAGS_RELEASE
+= -O0 and recompiled Qt(4.6.1)(To be sure that everything is ok I took
clear source code - untar from package). After that I recompiled my test
application (empty window), copied everything to the board (libraries) and
that's all. Each application which I tested (demo. examples) was working.
The only problem is the speed. On youtube you can find some demos with QT
and they look quite well. On my board animations have lags... I will work
on it.

Regards
 Janusz

paolo User 2010-02-14 20:33:35 Link
Janusz,

Thank you for your answer. I'm recompiling Qt 4.5.2 without optimization
from scratch.
I'll let you know the result and the performance on my build (I hope I will
be able to run some example sooner or later...)

Thankx
paolo

Janusz User 2010-02-14 20:41:05 Link
Paolo,

If, after compilation, you will still have problems, let me know. I will
send you compiled qt.

Regards
 Janusz

paolo User 2010-02-14 21:10:16 Link
Janusz,

That would be very kind!
I'm not yet ready, I'll let you know the result.

Thankx
Paolo

SeppBauer NoUser 2010-02-16 00:41:31 Link
Hey Guys

So how is the Performance on the 7"? anyone recived any good yet?

paolo User 2010-02-16 16:44:55 Link
@SeppBauer
For the moment I'm not using Linux and I'm working on WinCE only, I have to
say performance are not so bad (Qt 4.6.2)
Paolo

paolo User 2010-02-18 08:30:28 Link
I found the problem!!!
I'm using FileZilla to copy files to my FriendlyARM. FileZilla transfer
mode was automatic and every executable was transferred in ASCII instead.
Now I'm working to use the touchscreen with my apps (at the moment is not
working properly)
I hope this info is useful for someone...
paolo

SeppBauer NoUser 2010-02-18 13:18:56 Link
HAHHAHAA!!! ran over that proplem aswell.. tok me nearly 1 day to figure
filezilla is messing it up ;P quite funny proplem . makes me laght every
time i think abt it :)))

i use kasablanca .. works quite well

:)

paolo User 2010-02-18 15:23:29 Link
@SeppBauer
It's incredible how much time I wasted for such a stupid problem :-)

Now I'm performing some "performance tests" on Mini2440 using Qt 4.6.2 and
I have to say, I see different performance for WinCE and Linux.
This time (I'm afraid to say that) WinCE seems to be a little bit better.
Following a link on my YouTube aocount, I made a shot of collidingmice
example (Qt 4.6.2 for Linux) on mi mini2440.

Video:
http://www.youtube.com/watch?v=TcT8fxD5pPY

paolo

SeppBauer NoUser 2010-02-18 17:27:36 Link
Hi paolo, r u sing 7" screen?

Paul NoUser 2010-02-19 06:12:39 Link
Hi guys,
just joining the fun...
I am trying to use the Peep with the cmos camera.
Since I have been going mad using OE, I've tried to install QT 4.5 on the
existing qtopia 2.2, but the damn thing doesn't physically fit in memory!!
What have you done? Are all of you running it off SD card with uboot?
Thanks
Paul

paolo User 2010-02-19 07:54:06 Link
Yes, I'm using 7" TS
paolo

SeppBauer NoUser 2010-02-19 21:08:54 Link
@Paul 

u have to make a release build not a debug build.. it wil have like 15 megs
which fits very well into the memory

@paolo, could u make a video of the 7" with any qt app under linux to
compare performance?

u have 128 or 64 meg ram?

here is my vid:
http://www.youtube.com/watch?v=Z2gf2QfSs8g

andromeda User 2010-02-19 23:17:35 Link
hi,

when i compile QT 4.6.2 in ubuntu i have this following error

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

must i install tslib ?

thanks in advance.

andromeda User 2010-02-20 00:02:30 Link
sorry mini2440 has already tslib installed, where are the lib from qt4
compiled ? because i want to copy lib  qt4 from my pc host  to my mini2440.

thanks in advance.

Aleksander NoUser 2010-02-21 10:40:25 Link
I compiled openembedded with Qt 4.5 as instructed on:
http://code.google.com/p/mini2440/wiki/OpenEmbedded

qtdemo is working but touchscreen is not working properly. Some coordinates
are inverted and pointer is not responding properly. For small movement of
finger the pointer moves a lot.

I tried the same thing with Qt4.3 and it has the same problem.

When I export QWS_MOUSE_PROTO=tslib:/dev/input/XXXX touchscreen stops
responding. XXXX are all devices listed in /dev/input/ (touchscreen0,
mouse, ...). I tried them all with the same outcome. If I export
QWS_MOUSE_PROTO= , (empty , nada , zip) then touchscreen starts working
again in its messy way.

Anny suggestions?

andromeda User 2010-02-22 17:59:50 Link
hi

please,can you put library image (libQtCore, libQtGui,libQtNetwork) for my
board qt2.2.0  because i can't compile it, all version don't work i have
many errors for compile Qt,i have test more manual in the google and here
and it don't work

thanks in advance.

deha NoUser 2010-02-23 15:32:38 Link
Hello fellas

Can anyone post a link for compiled qt 4.5.x or higher?

It will take so long, and injure prone for my old pc, also if we think
about the fact that I could have some files missing it is possible to take
ages to build a compiled qt.

Janusz User 2010-02-23 17:02:41 Link
Hi,

Do you know any place where I can put (and share) my compiled libraries ?
I have everything compiled.

regards
 Janusz

deha NoUser 2010-02-23 19:52:27 Link
Hi Janusz

I have no idea about it, may be you can zip them and upload to rapidshare?

SeppBauer NoUser 2010-02-24 15:23:07 Link
http://mini2440.sv-design.at/

Janusz User 2010-02-24 20:09:40 Link
Deha,

As you have written - rapidshare link:

http://rapidshare.com/files/355305514/Qt.tar.bz2.html

I compressed everything from Qt directory (with demo and examples).

compilation options were:
./configure -embedded arm -xplatform qws/linux-arm-g++ -prefix
/usr/local/Qt -qt-mouse-tslib -little-endian -no-webkit -no-qt3support
-no-cups -no-largefile -optimized-qmake -no-openssl -nomake tools

Just copy the library directory (lib - directory) to the /usr/local/Qt/ on
your friendlyarm board. Do not forget about exports :) My exports are
(/etc/profile - file): 

export TSLIB_TSEVENTTYPE=INPUT
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/usr/input/ts
export TSLIB_CALIBFILE=/usr/etc/pointercal
export TSLIB_CONFFILE=/usr/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/lib/ts
export LD_LIBRARY_PATH=/usr/local/Qt/lib
export QTDIR=/usr/local/Qt
export QWS_MOUSE_PROTO=tslib:/usr/input/ts
export QWS_DISPLAY=LinuxFB:mmWidth=310:mmHeight=190

Look at the TSLIB_TSDEVICE. I put my "ts" file in the /usr/input directory.
The dev directory is overwritten every time after restart :) 
Let me know if everything is OK.

Regards 
 Janusz

deha NoUser 2010-02-25 12:28:56 Link
@Janusz

Thank you very much for tips and libs as well. I will immediately upload it
once I get home.Expect to hear from me soon.

Regards
Deha

Chu NoUser 2010-02-26 20:29:48 Link
Hi every one, same segmentation fault problem here...

Janusz,

I used the same configuration as you did:

./configure -embedded arm -xplatform qws/linux-arm-g++ -prefix
/usr/local/Qt -qt-mouse-tslib -little-endian -no-webkit -no-qt3support
-no-cups -no-largefile -optimized-qmake -no-openssl -nomake tools


but still with the same problem.

One strange thing is that while your lib folder had 34.9 Mb, mine had 34.2
Mb.

Maybe my arm-linux-gcc isn't working how it supposed to...

Which toolchain did you use? arm-linux-gcc or another one?

Another thing:

Whenever I use the export LD_LIBRARY_PATH=/usr/local/Qt/lib command, my
system can't find any more the libraries on /usr/local/lib.

so, I changed the command to 
export LD_LIBRARY_PATH=/usr/local/Qt/lib:/usr/local/lib , 
and although the libraries were found, I got segmentation fault again, and
when I reboot the kit, it couldn't boot anymore. 

One last thing:

I couldn't find any 'ts' file on the dev directory.

Regards,
Chu

Janusz User 2010-02-26 20:52:47 Link
Hi,

I am using arm-linux-gcc 4.3.2.

Have you read this blog ?
http://blog.cor-net.org/embedded/mini2440/qt-45-on-mini2440/. There is
information what to do with "ts"

I just wrote what I had done. I have no problems with QT 4.6.1. compilation
on my ubuntu 9.10. (But maybe my configuration is different)

I forget about one important thing!!!! Turn off optimization in your gcc
for QT compilation !!!!

in your qt directory in /mkspecs/common/g++.conf change flag 
QMAKE_CFLAGS_RELEASE  += -O2 to QMAKE_CFLAGS_RELEASE  += -O0

Regards 
 Janusz

andromeda User 2010-02-27 19:43:31 Link
hi,

in my device micro2440 i have /dev/input/event0 but no ts is normal ?

must i create /dev/input/ts ?

regards,
andromeda

Janusz User 2010-02-28 10:30:41 Link
Hi,

You have everything in the blog.
http://blog.cor-net.org/embedded/mini2440/qt-45-on-mini2440/

Yes you have to create it

Regards

SeppBauer NoUser 2010-02-28 18:41:34 Link
I finally managed to speed up Qt and got it optimized as far as possible.

IMO Angström is 100 times too overloaded for the needs of the Mini2440

Seppo

Janusz User 2010-03-01 09:13:34 Link
Hi SeepBauer

Can you tell me how did you speed up the QT?


Regards
 Janusz

paolo User 2010-03-01 11:05:33 Link
@SeppBauer
I have the same question. Qt 4.6.2 on Mini2440 seems to be very slow. How
did you speedup it?
Thankx
paolo

PJvG User 2010-03-01 13:48:40 Link
Hmm while cross compiling QT 4.6.2 I get the following error:

../../include/QtCore/qatomic_i386.h:176: error: impossible constraint in
'asm'

I did configure the same way as described in the blog
(http://blog.cor-net.org/embedded/mini2440/qt-45-on-mini2440/)

Yayati Ekbote User 2010-03-03 12:17:07 Link
hi, guys...

I am new to QT embedded. I have QT SDK 4.6.1 and i have prepared one
application on it. Also i have ARM9(S3C2440) based MINI device. I want to
put the application on ARM9 platform. What steps should i follow. As the
MINI device contains older version of Qtopia i.e. QT3. So if i have to
compile the application of 4.6.1, do i have to install QT embedded 4.6.1 on
ARM9?? Please tell a detailed method.
  I read the thing cross-compiling in reference documentation of QT but i
didn't understand anything useful. please guide....

Ray NoUser 2010-03-04 16:33:19 Link
@PJvG
Under very similar conditions, I'm seeing the same symptom as you are
(impossible constraint in 'asm').  Have you found a fix yet?  Any info
would be much appreciated!

PJvG User 2010-03-04 16:54:26 Link
Hi Ray,

No I'm sorry, I haven't found a fix yet..

I'm now going to try to cross compile it with Openembedded and Bitbake as
described here:
http://www.developmentboard.net/index.php/article/Creating+Qt4+project+w...

I ran out of disk space this week so today I've moved my Ubuntu partition
to a bigger disk and expanded it. So far I haven't been able to test if
it'll work with Bitbake, will try to do that tomorrow since my work shift
is almost over today. ;)

Regards,
 PJvG

Ray NoUser 2010-03-04 19:18:29 Link
PJvG,

Thanks for the quick feedback!

Based on my very limited understanding of what is going on, it *seems* like
the problem is related to the presence of qconfig.h files in both the
/include/Qt/ and /include/QtCore/ directories.  Once I removed those files,
the configure script created symbolic links to what appears to be the
correct version of qconfig.h in /src/corelib/global.  After making this
change, my build progressed further and is now getting hung up on what I
believe is an unrelated problem where C files are being compiled using a
compiler other than the one I specified in my qmake.conf file.  Arg.

Anyway, good luck with your build and I'll keep you posted on any other
solutions/issues I run into.

-Ray

PJvG User 2010-03-05 15:41:08 Link
After letting Bitbake run for over 6 hours I noticed it was only at task
381 of 2103!
And it had used up over 8 GB of disk space already!

I think I've possibly configured Bitbake wrong or did some other stupid
thing..

Anyway I feel like I'm back to zero again.

Next Monday I'll talk to an expert of Embedded Linux, hopefully he can help
me get further with my project.

Ray, please keep me posted on your progress. I'm very interested in how
you're doing it. Thank you!
I'll notify you when I manage to do a successful build or when I come
across more problems..

Good luck!

 PJvG

PJvG User 2010-03-08 11:58:55 Link
Hello everyone,

I've talked to an Embedded Linux Expert this morning and he gave me some
useful advice.

He told me cross compiling Qt could take from a week up to a month to get
through all the problems and doing a successful build.
He also told me I would really need a development environment like
Openembedded, Buildroot or Emdebian... Openembedded seems to be probably
still the hardest to use from these development environments, so I think
I'll look some more into Buildroot.

It's also really advisable to read "Building Embedded Linux Systems" and
"Embedded Linux Primer".

One final point; I was also directed to the following site:
http://free-electrons.com/ apparently this is a very helpful site, oddly
enough I hadn't heard of it before..

So now I'm going to do more research before I try cross compiling again.


Regards,

 PJvG

Trunks User 2010-03-14 14:57:08 Link
Hi everbody, 
I have a problem with Qt. I configured Qt as Janusz told. then compile.
then I copy the lib files on the board. and exports in etc/profile. I wrote
a simple app. 

#include <iostream>
int main()
{
std::cout<<"Hello Arm-Linux...\n";
return 0;
}

I compiled it with Qt. Its fine. 
 But I want to run it on the board, I get this error "Illegal Instruction".

can you help me please how to solve?

Stéphane NoUser 2010-03-15 14:53:05 Link
Same situation as Trunks...

 I have tried to add "-msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4
-mtune=arm920t", but it doesn't change the result, always the same "illegal
instruction" ...

If anyone as the solution...

Ananthapadmanaban NoUser 2010-03-15 17:54:12 Link
I have a solution for this 
use arm-linux-gcc in the 4.6.2 toolchain instead of
arm-none-linux-gnueabi-gcc

sample code 


#include <stdio.h>
main()
{
    float a,b,c;
    int a1;
    float d;
    a=4.3;
    b=3.2;
    c=a+b;
    a1=(int)c;
    d=(float)a1+c;
    printf("%f",c);
}   

With arm-none-linux-gnueabi-gcc 

Compilation procedure:

/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc -msoft-float
-D__GCC_FLOAT_NOT_NEEDED -march=armv4 -mtune=arm920t -O0 float.c -o
float_test_softfloat.elf

Execution of this code

root@mini2440:/# ./float_test_softfloat.elf
Illegal instruction
root@mini2440:/


with arm-linux-gcc

/usr/local/arm/4.3.2/bin/arm-linux-gcc -msoft-float
-D__GCC_FLOAT_NOT_NEEDED -march=armv4 -mtune=arm920t -O0 float.c -o
float_test_softfloat.elf

root@mini2440:/# ./float_test_softfloat.elf
7.500000root@mini2440:/


I think arm-linux-gcc in toolcahin is working good than
arm-none-linux-gnueabi-gcc


Thanks and regards
ananth

Paul NoUser 2010-03-16 04:17:31 Link
Hi guys, here after is a script I wrote to setup and bitbake stuff under
Ubuntu.
It is configured to use dual core processors which speeds things up a bit.
Just download and run the script, it will ask you where what folder you
want to make the main folder.

Once it has finished, if you go to 
cd ${OE_HOME}/build
source profile
bitbake -k <some image>

It took me weeks to setup OE the first time, so hopefully this will help.
Btw, has Qt 4.6.1 been implemented into OE yet?
Have a look at the script, it uses some stable releases of some stuff but
you can change those easily.

Cheers
-----------------------------
COPY THE FOLLOWING TO A FILE
-----------------------------

#!/bin/sh

echo "Cleaning up first..."
rm $OE_HOME/build/conf/local.conf
rm $OE_HOME/build/profile
rm $OE_HOME/openembedded/conf/machine/mini2440.conf

echo "OE_HOME=$OE_HOME"
echo "Is OE_HOME set above? (y,n): "
read x
if [ "$x" = "n" ] ; then
  echo "Enter path to OE_HOME: "
  read oepath
  export OE_HOME=$oepath
  echo export OE_HOME=$oepath >> $HOME/.bashrc
  gedit $HOME/.bashrc
  source $HOME/.bashrc
fi

mkdir -p $OE_HOME
mkdir -p $OE_HOME/build
mkdir -p $OE_HOME/build/conf
mkdir -p $OE_HOME/custom_recipies/

sudo apt-get install sed wget cvs subversion git-core \
   coreutils unzip texi2html texinfo libsdl1.2-dev docbook-utils \
   gawk python-pysqlite2 diffstat help2man make gcc build-essential g++ \
   texi2html libncurses5-dev python-dev python-psyco \
   gnome-doc-utils gettext automake docbook bison flex libxml2-utils xmlto
python-psyco

echo
echo "Please choose a repository:"
echo "1. STABLE git://repo.or.cz/openembedded/mini2440.git";
echo "2. DEV git://repo.or.cz/openembedded/mini2440.git";
echo "3. git://git.openembedded.org/openembedded";
read x
cd $OE_HOME
if [ "$x" = "1" ] ; then
  git clone git://repo.or.cz/openembedded/mini2440.git openembedded
  cd openembedded
  git checkout -b mini2440-stable --track origin/mini2440-stable
  git branch
elif [ "$x" = "2" ] ; then
  git clone git://repo.or.cz/openembedded/mini2440.git openembedded
elif [ "$x" = "3" ] ; then
  git clone git://git.openembedded.org/openembedded
else
  echo "defaulting to repo.or.cz stable"   
  git clone git://repo.or.cz/openembedded/mini2440.git openembedded
  cd openembedded
  git checkout -b mini2440-stable --track origin/mini2440-stable
  git branch
fi

echo "Downloading Bitbake 1.8"
cd $OE_HOME
git clone git://git.openembedded.org/bitbake.git
cd bitbake
git checkout -b 1.8 --track origin/1.8
git branch
cd ..

cp $OE_HOME/openembedded/conf/local.conf.sample
$OE_HOME/build/conf/local.conf 

################################################################################
################
echo "Generating $OE_HOME/build/profile"

cat > $OE_HOME/build/profile << ENDOFFILE
export OE_HOME="$OE_HOME"
export PATH=${OE_HOME}/bitbake/bin:$PATH
BBPATH=${OE_HOME}/:${OE_HOME}/build/:${OE_HOME}/openembedded/
PKGDIR=${OE_HOME}/build/ 
DL_DIR=${OE_HOME}/downloads
echo Setting up dev env for Angstrom

cd $PKGDIR

LD_LIBRARY_PATH=
export PATH LD_LIBRARY_PATH BBPATH
export LANG=C
export BB_ENV_EXTRAWHITE="MACHINE DISTRO OE_HOME ANGSTROM_MODE ANGSTROMLIBC
LIBC"

echo "Altered environment for OE Development"

umask 0002

if [ "\$PS1" ]; then
  if [ "\$BASH" ]; then
    export PS1="\[\033[01;32m\]OE:\$MY_OE_CONF\[\033[00m\] \${PS1}"
  fi
fi

cd ${OE_HOME}/build
ENDOFFILE
################################################################################
################
echo "Generating $OE_HOME/build/conf/local.conf"
# Local Configuration File
cat > $OE_HOME/build/conf/local.conf << ENDOFFILE
MACHINE = "mini2440"

DISTRO = "angstrom-2008.1"

# Where to store sources
DL_DIR = "${OE_HOME}/downloads"

# Removes work files
# INHERIT += " rm_work "

# Make sure you have these installed
ASSUME_PROVIDED += "gdk-pixbuf-csource-native imagemagick-native
librsvg-native"

# Which files do we want to parse:
BBFILES := "${OE_HOME}/openembedded/recipes/*/*.bb
${OE_HOME}/custom_recipies/*.bb ${OE_HOME}/custom_recipies/*/*.bb"
BBMASK = ""
 
# What kind of images do we want?
IMAGE_FSTYPES += " tar.bz2 "

# Set TMPDIR instead of defaulting it to $pwd/tmp
TMPDIR = "${OE_HOME}/build"

# Make use of SMP and fast disks
PARALLEL_MAKE = "-j2"
BB_NUMBER_THREADS = "2"

#tinderbox
#INHERIT += "oestats-client"
OESTATS_BUILDER      = "paulm"

ENDOFFILE
################################################################################
################
echo "sysctl vm.mmap_min_addr=0"
sudo sysctl vm.mmap_min_addr=0

echo "Adding mini2440 to ${OE_HOME}/build/conf/local.conf"
echo "MACHINE = \"mini2440\"" >> ${OE_HOME}/build/conf/local.conf

################################################################################
################
echo "Generating ${OE_HOME}/openembedded/conf/machine/mini2440.conf"
cat > ${OE_HOME}/openembedded/conf/machine/mini2440.conf << ENDOFFILE
#@TYPE: Machine
#@Name: Samsung MINI2440 Dev Board
#@DESCRIPTION: Machine configuration for MINI2440 Dev Board

TARGET_ARCH = "arm"

PREFERRED_VERSION_u-boot = "git"
UBOOT_ENTRYPOINT = "30008000"
PREFERRED_PROVIDER_virtual/kernel = "linux-mini2440"

# used by sysvinit_2
SERIAL_CONSOLE = "115200 ttySAC0"

IMAGE_DEVICE_TABLES = "files/device_table-minimal.txt \
                       files/device_table_add-s3c_serial.txt"

IMAGE_FSTYPES = "jffs2 ext3 tar.gz"

MACHINE_FEATURES = "kernel26 uboot touchscreen screen lcd rgb16"
MACHINE_FEATURES += "usbhost usbgadget"
MACHINE_FEATURES += "i2c spi"
MACHINE_FEATURES += "mmc mmcroot vfat"
MACHINE_FEATURES += "ethernet"
MACHINE_FEATURES += "sound alsa"

KERNEL_IMAGETYPE = "uImage"

require conf/machine/include/tune-arm920t.inc

MACHINE_EXTRA_RDEPENDS = "rt73-firmware"
EXTRA_IMAGEDEPENDS += "u-boot"
EXTRA_IMAGECMD_jffs2 = "--pad --little-endian --squash -s 0x200 -n -e
16KiB"
ENDOFFILE

sudo dpkg-reconfigure dash

davef NoUser 2010-03-16 05:05:22 Link
Paul,

Great work.

Would you consider either putting this on the Wiki or next week I could do
the typing and you check it?

Or do you want to publish this somewhere else and I'll link to it.

Cheers,
Dave

Stéphane NoUser 2010-03-16 08:44:36 Link
Thanks Ananthapadmanaban,
the arm-linux-gcc works fine with your example and with your compilation
procedure :

/usr/local/arm/4.3.2/bin/arm-linux-gcc -msoft-float
-D__GCC_FLOAT_NOT_NEEDED -march=armv4 -mtune=arm920t -O0 float.c -o
float_test_softfloat.elf

But if I do a make or a qmake, it will not work on the mini 2440, still the
"illegal instruction" error...
Do you have a idea, how to do a make and not have this error ?
Can I compile a project (.pro) with your procedure ??

Thanks you very much for your answer !

skip2816 NoUser 2010-03-16 09:36:45 Link
Hi Stéphane,

any weeks ago, I compiled a kernel and went thru menuconfig using the
config_mini2440_xxx as starting point. At the floatimg point emulation
step, there was no emulation activated. I assume the factory default kernel
has no floating point emulation. This means programs using floationg point
oprations runs in illegal intructions. Only programs compiled with
soft-float can calculate fp-operations.

What is the difference between arm-linux-gcc and arm-none-linux-gnueabi-gcc
?
The /usr/local/arm/4.3.2/bin/arm-linux-gcc is only a script, calling
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc with the parameter
-march=armv4t set.

skip

Ananthapadmanaban NoUser 2010-03-16 18:13:09 Link
Hi skip,
  For me if i compile my -march=armv4t then it is working with mini2440 if
i compile as -march=armv4 then i end with an error of illegal floating
point exception.

Hi Stéphane,

 Update the mkspecs/qws/linux-arm-g++/qmake.conf file like this then
proceed with make command.

please update the file 

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

# modifications to g++.conf
QMAKE_CC                =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc -msoft-float
-D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0 -lts
QMAKE_CXX               =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++ -msoft-float
-D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0 -lts
QMAKE_LINK              =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++ -msoft-float
-D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0 -lts
QMAKE_LINK_SHLIB        =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++ -msoft-float
-D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0 -lts

# modifications to linux.conf
QMAKE_AR                =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-ar cqs 
QMAKE_OBJCOPY           =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-objcopy
QMAKE_STRIP             =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-strip
QMAKE_INCDIR   
+=/media/disk/project/mini2440/testing/tslib/apps/tslib/build/include
QMAKE_LIBDIR   
+=/media/disk/project/mini2440/testing/tslib/apps/tslib/build/lib
load(qt_config)

Thanks and regards,
Ananth

Stéphane NoUser 2010-03-17 15:10:25 Link
Thanks for your help Ananthapadmanaban, I can now compile projects with
make !

But I have another error when executing a program on the board, I have :
QWSDisplay::Data::init: Invalid argument
Client can't attach to main ram memory.
Aborted
and the program doesn't execute.

I can run the program by doing :
./myapplication -qws
But it's very unstable, I have just the display of my app, and for instance
the buttons don't respond.

I think it's a problem with my libraries but I can't find where...

PJvG User 2010-03-17 16:01:37 Link
Cross compiling Qt 4.6 with Buildroot is actually very easy. ;)
If you can't do it manually I would suggest doing it the Buildroot way..

But now I'm having problems to actually getting the root file system on the
Mini2440. I will keep you posted when I get a Qt4 application to run on my
Mini2440.

Regards,
 PJvG

Ananthapadmanaban NoUser 2010-03-17 20:51:58 Link
Hi Stéphane,
  I too have the same problem, I tried two versions of qt 4.6.2 and
qt4.6.1, in both the gui, i can able to get my touch working (When i tap my
touch screen only my mouse pointer in the screen moves)

 But there is no response from touch events are getting executed like
(minimize, pushbutton events ,.... nothing). if i connect the mouse all the
events are getting executed properly.

And i have one more problem that my font size displayed in the mini2440 (
Qt4.6.2 and Qt4.6.1) are very small.

Thanks and regards,
Ananth.

Hi all,
 Any one got successful compilation of qt-4.6.2 (or) qt 4.6.1 verion in 3.2
inch lcd (240 x 320 ) provided by mini2440.

Following steps are the steps i followed.
-------------------------------------------------
1. compiling tslib for arm

Prerequisite
1. install automake and libtool in host development computer

Step followed
export CVSROOT=:pserver:anoncvs@cvs.handhelds.org:/cvs
cvs login
cvs co apps/tslib
cd apps/tslib
echo "ac_cv_func_malloc_0_nonnull=yes" > arm-linux.autogen
export CONFIG_SITE=arm-linux.autogen
export CC='/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc -msoft-float
-D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0'
export CXX='/usr/local/arm/4.3.2/bin/arm-linux-g++ -msoft-float
-D__GCC_FLOAT_NOT_NEEDED -march=armv4 -mtune=arm920t -O0'
. ./autogen.sh
./configure --build=i386-linux --host=arm-linux --target=arm
--disable-inputapi --prefix=$PWD/build

# edit config.h and comment rplmalloc line
make
make install
-------------------------------------------------
compiling qt-4.6.2 for arm
1. mkspecs/common/g++.conf
QMAKE_CFLAGS_RELEASE  += -O0

2. mkspecs/qws/linux-arm-g++/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                =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc -msoft-float
-D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0
QMAKE_CXX               =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++ -msoft-float
-D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0
QMAKE_LINK              =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++ -msoft-float
-D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0
QMAKE_LINK_SHLIB        =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++ -msoft-float
-D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0

# modifications to linux.conf
QMAKE_AR                =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-ar cqs 
QMAKE_OBJCOPY           =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-objcopy
QMAKE_STRIP             =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-strip
QMAKE_INCDIR   
+=/media/disk/project/mini2440/testing/tslib/apps/tslib/build/include
QMAKE_LIBDIR   
+=/media/disk/project/mini2440/testing/tslib/apps/tslib/build/lib
load(qt_config)


Configured the Qt-4.6.2 package like this

./configure -release -embedded arm -xplatform qws/linux-arm-g++ -prefix
/usr/local/Trolltech/Qt-4.6.2_arm -qt-mouse-tslib -little-endian -no-webkit
-no-qt3support -no-cups -no-largefile -nomake examples -optimized-qmake
-no-openssl -nomake tools

--------------------------------------------------------------------
Install in mini2440 board environment variables

export TSLIB_CONSOLEDEVICE="none"
export TSLIB_FBDEVICE="/dev/fb0"
export TSLIB_CALIBFILE="/etc/pointercal" 
export QWS_DISPLAY="LinuxFb:/dev/fb0"
export QWS_SIZE=240x320
export QWS_MOUSE_PROTO="tslib:/dev/input/event0"
export
LD_LIBRARY_PATH='/install/Qt-4.6.2/lib:/install/old_try/tslib/lib:/install/old_t
ry/tslib/lib/ts'
export  TSLIB_TSDEVICE='/dev/input/event0'
export TSLIB_CONFFILE=/install/tslib/etc/ts.conf
export TSLIB_PLUGINDIR=/install/tslib/lib/ts
--------------------------------------------------------------------

i dono where is the real problem is ... 
Please help me if you solved this puzzle ..... :-)

If i find the answer for this ... i will post that also in this forum.

Thanks and regards,
Ananth

Ananthapadmanaban NoUser 2010-03-17 21:13:45 Link
Quick update :

I can able to increase the font size by exporting macro
export QWS_DISPLAY="LinuxFb:mmWidth=160:mmHeight=100"

Ananthapadmanaban NoUser 2010-03-18 21:34:20 Link
I added some more debug messages in tslib read function and i have some
irrelevant output from tslib.

root@mini2440:/# ts_calibrate 
xres = 240, yres = 320
Took 35 samples...
Top left : X =  787 Y =  307
Took 42 samples...
Top right : X =  786 Y =  812
Took 36 samples...
Bot right : X =  219 Y =  810
Took 33 samples...
Bot left : X =  222 Y =  310
Took 36 samples...
Center : X =  504 Y =  561
-36.138245 0.000243 0.278599
356.609192 -0.388692 -0.001543
Calibration constants: -2368356 15 18258 23370740 -25473 -101 65536 


But when i run qtapplication as server
my minimum calibrated value is 

TS_READ----> x = 90, y = 187, pressure = 1
and my maximum value is 
TS_READ----> x = 925, y = 929, pressure = 1

My query
1. my lcd size is 240x320 the values should be lie in the range of x - 0 to
240 and y - 0 to 320 ? but i got some odd numbers here (but my mouse cusor
moving correctly how? (but no events are being executed))

2. what i need to do to make the events to work in qt-application ?

Ananthapadmanaban NoUser 2010-03-20 21:59:42 Link
I got my qt application working with touch.... :-)

Qt version : qt-embedded-linux-opensource-src-4.5.3
Compiler version : 4.2.4 from Armstrong distribution.

Now iam trying to do the same in qt-
--------------------------------------------------------------
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                =
/media/disk/project/mini2440/build/deploy_build/toolchain/armv4t/bin/arm-angstro
m-linux-gnueabi-gcc
-msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0 -lts
QMAKE_CXX               =
/media/disk/project/mini2440/build/deploy_build/toolchain/armv4t/bin/arm-angstro
m-linux-gnueabi-g++
-msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0 -lts
QMAKE_LINK              =
/media/disk/project/mini2440/build/deploy_build/toolchain/armv4t/bin/arm-angstro
m-linux-gnueabi-g++
-msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0 -lts
QMAKE_LINK_SHLIB        =
/media/disk/project/mini2440/build/deploy_build/toolchain/armv4t/bin/arm-angstro
m-linux-gnueabi-g++
-msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0 -lts

# modifications to linux.conf
QMAKE_AR                =
/media/disk/project/mini2440/build/deploy_build/toolchain/armv4t/bin/arm-angstro
m-linux-gnueabi-ar
cqs 
QMAKE_OBJCOPY           =
/media/disk/project/mini2440/build/deploy_build/toolchain/armv4t/bin/arm-angstro
m-linux-gnueabi-objcopy
QMAKE_STRIP             =
/media/disk/project/mini2440/build/deploy_build/toolchain/armv4t/bin/arm-angstro
m-linux-gnueabi-strip

QMAKE_INCDIR   
+=/media/disk/project/mini2440/build/deploy_build/tslib/apps/tslib/install/inclu
de
QMAKE_LIBDIR   
+=/media/disk/project/mini2440/build/deploy_build/tslib/apps/tslib/install/lib

QMAKE_CFLAGS    += -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4t
-mtune=arm920t
QMAKE_CXXFLAGS    += -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4t
-mtune=arm920t

load(qt_config)
===============================================

mkspecs/common/g++.conf
QMAKE_CFLAGS_RELEASE  += -O0

===============================================

But i have following issues 

1. Performance of qt application is poor compared to the demo show in the
you tube. i need help in optimizing the qt and speed up the application
performance...

Any one success in that ?

2. How to load the application in landscape mode (some demo applicaiton in
the you tube is having landscape mode)? How to change it dynamically also
(in the run time of the application)?

Paul NoUser 2010-03-22 01:09:27 Link
Hi Dave, 
I can't post on the wiki so I'll make a new forum entry.
Cheers
Paul

Juni NoUser 2010-03-22 14:24:18 Link
Hi,

isn't there anyway to increase performance?

ambitious User 2010-03-22 16:13:25 Link
Hi all,
      1 - I successfully crossed compiled the Qt 4.6.2 by runing the
following commands

$ tar -xzvf qt-everywhere-opensource-src-4.6.2.tar.gz
$ cd qt-everywhere-opensource-src-4.6.2
$ mkdir /usr/local/Qt
$ ./configure -embedded arm -xplatform qws/linux-arm-g++ -prefix =
/usr/local/Qt -qt-mouse-tslib -little-endian

$ make
$ sudo make install

2 - I succesfully crosed compile the tslib by runing this commands:

$ tar -xjvf tslib-1.0.tar.bz2
$ cd  tslib-1.0
$ ./autogen.sh
$ export ac_cv_func_malloc_0_nonnull=yes
$ ./configure --build=i386-linux --host=arm-linux --target=arm-linux
--disable-inoutapi --prefix=${TSLIBOUTPUT}

$ make
$ sudo make install

And till that point every thing gonna good
The questions now are

1 - what are the libraries required to be copied to the mini2440 board.
2 - what is the benefit of the tslib and where i can configure it, i
successfully crossed compile the tslib but i don't make any of the export
commands because I don't know what is the true configuration.

I have two configuration 
this is one:

   #haigang added this for tslib
   export TSLIB_TSEVENTTYPE=H3600
   export TSLIB_CONSOLEDEVICE=none
   export TSLIB_FBDEVICE=/dev/fb0
   export TSLIB_TSDEVICE=/dev/touchscreen/0
   export TSLIB_CALIBFILE=/usr/etc/pointercal
   export TSLIB_CONFFILE=/usr/etc/ts.conf
   export TSLIB_PLUGINDIR=/usr/lib/ts

And this is the another configuration

   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


3 - how to compile a new program using the PC.
4 - How i can run this program in the mini2440

Thanks
M.Hamed

MOHA NoUser 2010-03-22 23:46:27 Link
hi everyone 
i have compiled Qt4.6.2 without errors but when i tried to execute an
application on the board i have the "illegal instruction" error  
i tried to reconfigure it with the non floating point but every time i had
errors and i really got lost in all these different configurations you make

so can anyone post link to compiled qt4.6 with arm-none-linux-gnueabi
working well on qtopia 2.2 i have found one here
http://friendlyarm.net/forum/topic/439?lang=en#2533 
uploaded by Janusz but the rapidshare link doesn't work 

thanks in advance

ambitious User 2010-03-23 10:06:48 Link
@ MOHA

What OS of linux you use

MOHA NoUser 2010-03-23 12:11:30 Link
hi ambitious,

i have ubuntu 9.10 on my host

ambitious User 2010-03-23 12:58:30 Link
Hi Moha
you can follow this link to upgrade the Qt to 4.5
http://blog.cor-net.org/embedded/mini2440/qt-45-on-mini2440/

or you can use the x86-qtopia and the arm-qtopia by following this link 
http://equallybad.blogspot.com/2010/02/project-how-to-setup-default-dev-...

Best regards
M.Hamed

anafor2004 NoUser 2010-04-06 22:38:16 Link
Dear friends , I am trying for building tslib, but I am having the below
error message at make process. I followed Ananthapadmanaban's steps. Do you
have any suggestions? 



ts_test.c:125: undefined reference to `rpl_malloc'
fbutils.o: In function `open_framebuffer':
/home/cnbk/apps/tslib/tests/fbutils.c:139: undefined reference to
`rpl_malloc'
collect2: ld returned 1 exit status

flux000 NoUser 2010-04-17 17:48:41 Link
Hello anafor2004,

To resolve your problem, comment out '#define malloc rpl_malloc' in file
'config.h' in 'tslib-1.0/config.h'

Good Luck.

anafor2004 NoUser 2010-04-18 20:08:04 Link
@flux00,
Thank you flux00, I cross compiled, Qt and tslib succesfully. My Qt is
builded with tslib support. I copied tslib and qtlib files to rootfs.

But the problem is , I can calibarte ts with ts_calibrate, and my qt
applicaitons is working, but when i touch to T.S , aplication printf
Segmantation Fault and breaking. Do you have any suggestion?

flux000 NoUser 2010-04-23 18:21:35 Link
Hello anafor2004,

Did you cross compiled Qt on Ubuntu 9.10? If yes, would you please provide
some input because i am getting the following error message.

.....bin/qmake: 1: Syntax error: word unexpected (expecting ")")

You might need to modify the include and library search paths by editing
 QMAKE_INCDIR and QMAKE_LIBDIR in
 /home/mike/Downloads/qt-embedded-linux-opensource-src-4.5.3/mkspecs/qws/linux-a
rm-g++.

My config is 

./configure -embedded arm -xplatform qws/linux-arm-g++ -prefix
/usr/local/Qt -qt-mouse-tslib -little-endian -I/usr/local/tslib/include
-L/usr/local/tslib/lib -qt-zlib -no-optimized-qmake -opensource

also i include the following in qmake.conf

QMAKE_INCDIR +=/usr/local/tslib/include
QMAKE_LIBDIR +=/usr/local/tslib/lib
QMAKE_CFLAGS +=-I/usr/local/tslib/include
QMAKE_LFLAGS +=-L/usr/local/tslib/lib -Wl,-rpath-link=/usr/local/tslib/lib

and i change QMAKE_CFLAGS_RELEASE flag from 02 to -O0

Thanks..

flux000

pera NoUser 2010-05-05 18:43:18 Link
Hi everyone.
I have tried to build QTopia 4.6.2 and I have next problems:
1. I try to build tslib and it failed: 

./autogen.sh, OK!

./configure --build=i386-linux --host=arm-linux --target=arm-linux 
--disable-inoutapi --prefix=${TSLIBOUTPUT} 
=> checking command to parse link -dump -symbols output from gcc object...
failed 
and
configure: WARNING: unrecognized options: --disable-inoutapi
 
And if I try to run make(after comment out malloc rpl malloc in config.h)
it given to next errors:
In function ‘open’,
    inlined from ‘main’ at ts_calibrate.c:227:
/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’
declared with attribute error: open with O_CREAT in second argument needs 3
arguments
In function ‘open’,
    inlined from ‘main’ at ts_calibrate.c:229:
/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’
declared with attribute error: open with O_CREAT in second argument needs 3
arguments

What I can try to do?

Jay User 2010-06-01 21:52:25 Link
My command line for compiling QT 4.6.2 successfully was:
./configure -embedded arm -xplatform qws/linux-arm-g++ -prefix <the
directory, where you want to install QT> -qt-mouse-tslib -little-endian
-no-webkit -no-qt3support -no-cups -no-largefile -optimized-qmake
-no-openssl -nomake tools -qt-sql-sqlite -no-3dnow -system-zlib -qt-gif
-qt-libtiff -qt-libpng -qt-libmng -qt-libjpeg -no-opengl -gtkstyle
-no-openvg -no-xshape -no-xsync -no-xrandr -qt-freetype -qt-gfx-linuxfb
-qt-kbd-tty -qt-kbd-linuxinput -qt-mouse-tslib -qt-mouse-linuxinput

Jay User 2010-06-01 21:56:30 Link
The mkspecs/qws/linux-arm-g++/qmake.conf contains:
--------------------------------------------------
#
# 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-gnueabi-gcc
QMAKE_CXX               = arm-linux-gnueabi-g++
QMAKE_LINK              = arm-linux-gnueabi-g++
QMAKE_LINK_SHLIB        = arm-linux-gnueabi-g++

# modifications to linux.conf
QMAKE_AR                = arm-linux-gnueabi-ar cqs
QMAKE_OBJCOPY           = arm-linux-gnueabi-objcopy
QMAKE_STRIP    = arm-linux-gnueabi-strip
QMAKE_RANLIB    = arm-linux-gnueabi-ranlib
load(qt_config)
--------------------------------------------------

Also don't forget to set "QMAKE_CFLAGS_RELEASE  += -O0" in
mkspecs/common/g++.conf because optimizing isn't supported so well.

ilpaso NoUser 2010-06-24 08:58:00 Link
Hi all,
have anyone compiled Qt everywhere 4.6.2 for Mini2440 on a Ubuntu 10.04
host?

If yes please can you explain what is the right procedure?

My problem is: when I run a simple Qt application on mini2440 it returns
always an "illegal instruction" error.

I don't know why.
"QMAKE_CFLAGS_RELEASE  += -O0" in mkspecs/common/g++.conf is set

Thanks in advance

ilpaso

David James NoUser 2010-06-25 20:09:52 Link
@ Janusz
I just tried to download the tarball you posted on rapidshare, but it has
since been removed. Can you repost it. I'd like to try and install it on my
ARM board and see if it will run a sample Qt app.

Thanks,
David

FYI: I'm looking for someone who is good at Arm embedded development. I
have a paying project, and my skills are too limited for doing this myself.
Anyone interested, please contact me. djames@sepackagingsys.com

Tom User 2010-07-06 15:07:39 Link
@Janusz I'm guessing You're from Poland. Can I contact You somehow? I've
compilled QT but still got 'Illegal instruction' error. Maybe You can
upload again Your QT?

best regards
Tomasz

serg_io NoUser 2010-07-06 20:06:32 Link
First of all you sould specify -march=armv4 -mtune=arm920t compile option
to all builded applications and library. Only this can be reason of
"Illegal instruction" fault. Simple way to check if you application builded
for ARM920T with properly instruction set- run readelf program. For example
if used Codesourcery compiler you should type
"arm-none-linux-gnueabi-readelf -A <you_app_or_lib_name>", where
<you_app_or_lib_name> - is you application or shared library. Below dump of
right builded application:
  Tag_CPU_name: "4T"
  Tag_CPU_arch: v4T
  ..................
  Tag_ABI_optimization_goals: Aggressive Speed
Most important first two string, where displayed CPU name and arch.
If you application/library builded incorrect, then you will see:
  Tag_CPU_name: "ARM10TDMI"
  Tag_CPU_arch: v5TE
  ..................
  Tag_ABI_optimization_goals: Aggressive Speed

serg_io NoUser 2010-07-06 20:18:57 Link
Regarding QT: try to specify QMAKE_CFLAGS_RELEASE += -march=armv4
-mtune=arm920t in the qmake.conf. Also this shoul be specifeyd to  all
QMAKE_CFLAGS_XXX and QMAKE_CXXLAGS_XXX variables and may be( not sure) to
all QMAKE_LFLAGS_XXX. 

best regards,
serg_io

Tom User 2010-07-07 12:55:04 Link
So I should add:

QMAKE_CFLAGS_RELEASE += -march=armv4 -mtune=arm920t
QMAKE_CFLAGS_XXX += -march=armv4 -mtune=arm920t
QMAKE_CXXLAGS_XXX += -march=armv4 -mtune=arm920t (is it CXXLAGS or
CXXFLAGS?)
QMAKE_LFLAGS_XXX += -march=armv4 -mtune=arm920t

to qmake.conf? Or any other file?

best regards
Tomasz

ser_io NoUser 2010-07-07 14:53:28 Link
No, sorry. May be I not all clear, what I say. See, for example, there
http://doc.trolltech.com/4.1/qmake-variable-reference.html. A lot of
parameter can be defined in the qmake.conf, but for now we are interested 
only compliler and linker options. First one named QMAKE_CXXFLAGS_DEBUG,
QMAKE_CXXFLAGS_MT_DLLDBG and etc - for C++, and QMAKE_CFLAGS_DEBUG
,QMAKE_CFLAGS_MT_DLLDBG  for C compilers. When I say QMAKE_CFLAGS_XXX, I
mean ALL these variables, i.e. variables which starts with QMAKE_CFLAGS and
QMAKE_CXXFLAGS.

best regards,
serg_io

Tom User 2010-07-07 22:48:38 Link
Ok. I've added:

QMAKE_CFLAGS_RELEASE += -march=armv4 -mtune=arm920t
QMAKE_CFLAGS_DEBUG += -march=armv4t -mtune=arm920t
QMAKE_CFLAGS_MT += -march=armv4t -mtune=arm920t
QMAKE_CFLAGS_MT_DBG += -march=armv4t -mtune=arm920t
QMAKE_CFLAGS_MT_DLL += -march=armv4t -mtune=arm920t
QMAKE_CFLAGS_MT_DLLDBG += -march=armv4t -mtune=arm920t
QMAKE_CFLAGS_SHLIB += -march=armv4t -mtune=arm920t
QMAKE_CFLAGS_THREAD += -march=armv4t -mtune=arm920t
QMAKE_CFLAGS_WARN_OFF += -march=armv4t -mtune=arm920t
QMAKE_CFLAGS_WARN_ON += -march=armv4t -mtune=arm920t

QMAKE_CXXFLAGS_DEBUG += -march=armv4t -mtune=arm920t
QMAKE_CXXFLAGS_MT += -march=armv4t -mtune=arm920t
QMAKE_CXXFLAGS_MT_DBG += -march=armv4t -mtune=arm920t
QMAKE_CXXFLAGS_MT_DLL += -march=armv4t -mtune=arm920t
QMAKE_CXXFLAGS_MT_DLLDBG += -march=armv4t -mtune=arm920t
QMAKE_CXXFLAGS_RELEASE += -march=armv4t -mtune=arm920t
QMAKE_CXXFLAGS_SHLIB += -march=armv4t -mtune=arm920t
QMAKE_CXXFLAGS_THREAD += -march=armv4t -mtune=arm920t
QMAKE_CXXFLAGS_WARN_OFF += -march=armv4t -mtune=arm920t
QMAKE_CXXFLAGS_WARN_ON += -march=armv4t -mtune=arm920t

to my qmake.conf and everything compiled. I've copied all library files to
Mini2440, exported LD_LIBRARY_PATH and executed my application. It works...
but when i try to push button or do anything else qtopia is coming to
foreground and my application just disappears. What's wrong?

best regards
Tomasz

mobyfab NoUser 2010-07-22 01:17:56 Link
Hey guys,

You have to use -march=armv4t and NOT -march=armv4 !

In my case, using the toolchain provided by friendlyarm (the codesourcery
one) generates armv5 code for some reason... 
armv5 code runs in some cases, but is very slow.

for tslib is does run partially.

-march=armv4t generates the correct code.

-----

Incorrect:

Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "ARM10TDMI"
  Tag_CPU_arch: v5TE
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-1
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align8_needed: Yes
  Tag_ABI_align8_preserved: Yes, except leaf SP
  Tag_ABI_enum_size: int


-----

Correct:

Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "4T"
  Tag_CPU_arch: v4T
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-1
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align8_needed: Yes
  Tag_ABI_align8_preserved: Yes, except leaf SP
  Tag_ABI_enum_size: int

david NoUser 2010-07-22 18:46:52 Link
Tom what kind of applications could you put to run?? was it the examples
who comes after the compilation?? for this moment i have the illegal
instrution problem

david NoUser 2010-07-23 00:49:05 Link
Tom!! thanks that fix the illegal problem!!!

now im having troubles with the touch screen, i have the libraries on my
usb in this its my config lines:

export TSLIB_TSEVENTTYPE=INPUT
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/usr/input/ts
export TSLIB_CALIBFILE=/usr/etc/pointercal
export TSLIB_CONFFILE=/usr/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/lib/ts
export LD_LIBRARY_PATH=/udisk/tslib/lib
export QTDIR=/usr/local/Qt
export QWS_MOUSE_PROTO=tslib:/usr/input/ts
export QWS_DISPLAY=LinuxFB:mmWidth=310:mmHeight=190

what do i do to make it work well?? what is it the correct configuration

Tom User 2010-07-23 19:09:00 Link
Copy you libraries (change names from *.so.4.something to *.so.4) to
/usr/local/Qt/lib and export environment variables:

LD_LIBRARY_PATH='/usr/local/Qt/lib'
QTDIR='/usr/local/Qt'
QWS_DISPLAY='LinuxFB:mmWidth=60:mmHeight=80'
QWS_MOUSE_PROTO='tslib:/dev/input/event0'
TSLIB_CALIBFILE='/etc/pointercal'
TSLIB_CONFFILE='/usr/local/etc/ts.conf'
TSLIB_CONSOLEDEVICE='none'
TSLIB_FBDEVICE='/dev/fb0'
TSLIB_PLUGINDIR='/usr/local/lib/ts'
TSLIB_TSDEVICE='/usr/local/lib/ts'
TSLIB_TSEVENTTYPE='INPUT'

It worked for me.

best regards
Tom

david NoUser 2010-07-24 17:45:20 Link
thanks friend it worked for me too!! but im still have some troubles :

i appearsme some images from the system when i running my qt program, im
not sure if am i clear its kind of dificult to explain

david NoUser 2010-07-24 18:04:07 Link
if i click something on my qt program it touch too the interface of my
operating system, what other command line have i to add? thanks

Tom User 2010-07-24 18:09:36 Link
Do You have Your QTopia working while executing programs? If Yes just go to
/etc/init.d/rcS bash script and turn off the QTopia (write # at the
beginning of the line which starts QTopia) or just kill that process and
then execute Your program with '-qws'.

best regards
Tom

david NoUser 2010-07-24 18:41:51 Link
how can i kill that process?

Tom User 2010-07-24 21:54:28 Link
Just write 'ps' in console, next see what number has qtopia and write 'kill
-9 [qtopia process number]' and qtopia will be killed.

best regards
Tom

david NoUser 2010-07-26 21:57:02 Link
thanks it works with out mistakes!!! thanks a lot!

if you need something write me to andrewt12357@hotmail.com

i return you the favor ;) again thanks

david NoUser 2010-07-28 16:32:24 Link
Hi, i made a program in qt who connects to other computer and look on mysql
database some information, on my desktop pc it works well, but when i test
it on my mini2440 appears me this mistake:

driver not loaded, and on my console appears me this:

QSqlDatabase_ QMYSQL driver not loaded.

what do i have to do to it works well??

do i have to cross compile my qt-everywhere-opensource-src-4.6.2 package
again with other configuration??

again thanks for all your help

david NoUser 2010-07-29 22:25:12 Link
HI i deceded first start with the sqlite examples who comes with the
packages, it appearsed me the same mistake:

QslqlDatabase:qsqlite driver not loaded, i could solved that problem with
this configuration:

./configure -little-endian -embedded arm -static -no-webkit -prefix
/usr/local/Qt -qt-mouse-tslib -L /usr/local/tslib/lib -I
/usr/local/tslib/include -opensource -nomake demos -optimized-qmake
-qt-sql-sqlite

david NoUser 2010-07-30 00:29:12 Link
is there a way to execute this variables: 

LD_LIBRARY_PATH='/usr/local/Qt/lib'
QTDIR='/usr/local/Qt'
QWS_DISPLAY='LinuxFB:mmWidth=60:mmHeight=80'
QWS_MOUSE_PROTO='tslib:/dev/input/event0'
TSLIB_CALIBFILE='/etc/pointercal'
TSLIB_CONFFILE='/usr/local/etc/ts.conf'
TSLIB_CONSOLEDEVICE='none'
TSLIB_FBDEVICE='/dev/fb0'
TSLIB_PLUGINDIR='/usr/local/lib/ts'
TSLIB_TSDEVICE='/usr/local/lib/ts'
TSLIB_TSEVENTTYPE='INPUT'

on a file, that i can execute thatfile and with it all the variables, for
now i writing them every time and thats its not very usefull.

thanks for all your help!!

Tom User 2010-07-30 12:54:06 Link
You can export all of Your environment variables in /etc/profile file. Just
write there "export LD_LIBRARY_PATH=/usr/local/Qt/lib" and everything else
and reboot. You will have all variables set.

About Your SQL driver - I was using SQLite, and to make it work I had to
copy driver from compiled libraries. It's in the same folder as all QT
libraries but not in 'lib' but in 'plugins' then 'sqldrivers'. I have there
my SQLite driver. Just copy 'plugin' folder to the same place as You've
copied libraries (You will have two folders: lib and plugins). And You can
use Your SQLite databases. If You want to use MYSql You need t compile
driver if You don't have it.

good luck
best regards
Tom

david NoUser 2010-07-30 15:15:16 Link
thanks tom for now i am working with sqlite!, im going to do first the
exports. and later the mysql, thanks for all your advices, it has been very
useful for me

david NoUser 2010-07-30 15:56:22 Link
tom, i tested what you tellme about the exports, it works well, thanks!!

dark_knight NoUser 2010-09-01 12:23:22 Link
Hi Ananthapadmanaban

Can i get in touch with you.
can i get your email id or your contact number

Dark Knight

Reply

Name
eMail (not visible)
Subject (no text only in upper case; no HELP, URGENT...)
Text
HTML tags are not supported and links are generated automatically if they start with http or ftp.
Please submit long source code or log files as attachment (only registered users).
Please enter the number 1376