Qtopia everywhere 4.6.1

Marco
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
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
fatbrain

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

regards
 Janusz

cBSAn
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
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
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
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
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
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
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
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
Found it!
I had to make little changes to configure script and now I'm compiling Qt.
Thanks
paolo

Janusz
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
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
Does anyone try to run QT4.6.1 library on the QT2.2 image provided with the
board?

marco
Hi fatbrain,
I had always the same "illegal instruction" even following your
suggestions...
How can i solve this problem?

Sepp Bauer
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
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
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
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
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
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
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
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
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
Hi everyone,

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

Regards
 Janusz

Miklós Márton
Has anyone any ideas about the inverted touchscreen working?

paolo
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
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
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
Paolo,

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

Regards
 Janusz

paolo
Janusz,

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

Thankx
Paolo

SeppBauer
Hey Guys

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

paolo
@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
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
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
@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
Hi paolo, r u sing 7" screen?

Paul
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
Yes, I'm using 7" TS
paolo

SeppBauer
@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
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
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
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
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
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
Hi,

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

regards
 Janusz

deha
Hi Janusz

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

SeppBauer
http://mini2440.sv-design.at/

Janusz
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
@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
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
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
hi,

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

must i create /dev/input/ts ?

regards,
andromeda

Janusz
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
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
Hi SeepBauer

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


Regards
 Janusz

paolo
@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
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
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
@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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Quick update :

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

Ananthapadmanaban
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
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
Hi Dave, 
I can't post on the wiki so I'll make a new forum entry.
Cheers
Paul

Juni
Hi,

isn't there anyway to increase performance?

ambitious
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
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
@ MOHA

What OS of linux you use

MOHA
hi ambitious,

i have ubuntu 9.10 on my host

ambitious
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
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
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
@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
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
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
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
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
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
@ 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
@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
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
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
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
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
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
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
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
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
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
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
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
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
how can i kill that process?

Tom
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
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
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
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
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
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
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
tom, i tested what you tellme about the exports, it works well, thanks!!

dark_knight
Hi Ananthapadmanaban

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

Dark Knight

vevek
Hi guys,
I tried with the steps mentioned all above, i tried the method as mentioned
by ananth, my first problem is i could not able to compile tslib n i skip
that n compiled without tslib, i build qt successfully but if put that
application on board it is getting me error illegal instruction. i copied
all library files to board n set the envrmnt varialbe, but i still getting
the error some body help me please i'm trying this frm past 3 weeks.

regards
vevek

davef
Only 3 weeks!  Keep at it.

You need tslib cross-compiled BEFORE you cross-compile Qt.  Sounds like you
haven't seen this tutorial
http://billforums.station51.net/viewtopic.php?f=8&t=15 as page 1 states:
tslib first.

I couldn't get past the tslib stage either.

I cheated.

Go to http://billforums.station51.net/viewtopic.php?f=8&t=15&start=80 and
look for the jffs2.tgz file.  I mounted it on my host and copied the
QT/Webkit and tslib folders to my target.  I still have problems compiling
Qt applications (Arora), but I suspect it is something I am doing wrong. 
Beware there is a network problem with that image.

Back a page or two there is also a kernel that goes with the rootfs.

Still working at it after 5 weeks.

Good luck!

Dave

davef
Correction I copied those folders out of his <fs> directory, found when you
extract <filesys.tgz>, to my host at /usr/local.  They contain a
cross-compiled tslib.  The Qt files I assume are capable of cross-compiling
your applications, as they do not seem to be ARM binaries.  

When I said, "I mounted it (test.jffs2 in jffs2.tgz) on my host and copied
the QT/Webkit and tslib folders to my target", I really meant that I was
going to try that as I have run out of ideas.

vevek
thanks for ur quick reply dave,
are you using OE & bitbake to to make it work, can u please tell me how
these OE & bitbake help us on our developement i mean to say why we need
them. 'cos today i just went through those topics n i thought they will
help me to fix this problems.

please help me man i'm a newbee here.

Thanks in advance
vevek

davef
I am not using OE & bitbake, which is recommended in the tutorial.  Being
new to this stuff as well, I thought that I should as least be able compile
the tools required.

http://www.sereno-labs.com/qt-4-6-2-installation-procedure-for-friendlya...

doesn't use OE and bitbake.  But, he says there are problems with Ubuntu
9.04 which is what I am using :(  

There seem to be so many things that just have to right before one can get
through a successful compilation.

Good luck

Mos89
Dear all,
I try to cross compile tslib, without success
i alaways have this alarm message

:ts_test.o: In function `main':
ts_test.c:(.text+0x5d8): undefined reference to `rpl_malloc'
fbutils.o: In function `open_framebuffer':
fbutils.c:(.text+0xb55): undefined reference to `rpl_malloc'
collect2: ld returned 1 exit status
make[2]: *** [ts_test] Error 1
make[2]: Leaving directory `/home/mosnier/ARM/tslib/tests'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mosnier/ARM/tslib'
make: *** [all] Error 2

peter a
use this :-

export ac_cv_func_malloc_0_nonnull=yes

vevek
Hi dave,
 I again tried to compile the qt with tslib support and again the same
error functionality failed if i skip the switch -qt-mouse-tslib then it
will finish the configuration & make successfully,again i tried with
copying the qt lib to board but the result is same illegal instruction, i'm
not missing any single step modifying the all files as mentioned by many
blogs,i'm really blank now help me.

forgot to mention i'm using fedora12 & 13 on host..... & is this is 'cos of
the fedora shall i change my distro.

and can u tell me where exactly u r lagging with problems, i mean what all
the steps tht u completed.

vevek
dave,
 
 just hav a look at this blog here they mentioned like we can cross compile
qt without tslib support and while dumping those libs to mini board we can
link them do u hav any idea about this...
http://www.friendlyarm.net/forum/topic/72

davef
vevek,

Haven't tried that approach, but yes several people seemed to have done
this..

I actually tried going one step further and copy Qt/Webkit and tslib out of
these files 

http://billforums.station51.net/viewtopic.php?f=8&t=15&start=80

by mounting in on my host.  It is not a full Qt cross-compilation though.

And I still have problems!


<illegal instruction> have you got the oft quoted:

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

note the armv4t

 Ananthapadmanaban seems to have got through the process.

Are you following Paul's script?

peter a
I know what problems you are having it took me 2 week to get 4.6.3 to
compile with tslib and you have to cheat to make it compile .

I had to make a link to a tslib lib and place it in qt main lib dir or you
get a can`t find the tslib libs .

I found the main problem in compiling tslib was the command line used.
 if you use --host=arm-none-linux-gnueabi and from it make native and not
cross compiled code and used --target arm and host=arm-linux 
because arm-linux-g++ calls this in 4.3.2 

#!/bin/bash

exec arm-none-linux-gnueabi-g++ -march=armv4t $*

where arm-none-linux-gnueabi-g++ is direct to arm-none-linux-gnueabi-g++

vevek
Hi peter,
  can you share the steps that you followed, i would like to know "I had to
make a link to a tslib lib and place it in qt main lib dir or you
get a can`t find the tslib libs" how u do this can you jst give a hint how
to link them.....

with regards
Vevek Raj

peter a
Glad you made some sense of what I was saying, it was getting late for me.

I used winscp to make a symbolic link between :-
/qt-everywhere-opensource-src-4.6.3/lib/libts-0.0.so.0
And 
/usr/local/tslib/lib/libts-0.0.so.0.1.1

( THAT MY PLACE IT`S INSTALLED , CHANGE IF NEEDED )

Which I think the command is in linux :- 
ln -s /qt-everywhere-opensource-src-4.6.3/lib/libts-0.0.so.0
/usr/local/tslib/lib/libts-0.0.so.0.1.1

That the only way I could get passed the bit where it says " you should add
QMAKE_INCDIR and QMAKE_LIBDIR and your qmake.conf file
( Which I have ).

I used :-

./configure -embedded arm -xplatform qws/linux-arm-g++ -prefix
/usr/local/Qt -little-endian -opensource -no-cups -qt-zlib -qt-libtiff
-qt-libpng -qt-libjpeg

fot my command line .. I have problems with zlib and libpng and I just used
all the inbuilt ones.

davef
peter a,

Thanks for the added tips.

Your last line leaves me a bit confused.  I am new to this, but I would
have thought the inbuilt zlib would be only appropriate for the host
(80386).

I have been trying to cross-compile zlib on the understanding of that is
what is required to cross-compile Qt. I can see that you are suggesting
that you can include some built-in libraries, which are THEN cross-compiled
to ARM.  The scripts I have seen have never mentioned -qt-zlib.  However,
in the QT --help file I can see a reference to -qt-zlib

I'll give it a try.

Dave

peter a
Sorry , No Zlib is cross compiled like the rest of QT , But if you choose
to you the machine installed one , you get the problem of the lib in the
machine you are cross comiling is differant from the target machine.

So you get sorry can`t find version 3 of zlib can only find version 2.3 on
your system.

Luis
Hi,
I have cross-compiled qtopia correctly (following the steps of the tutorial
and without any error) and i've copied the lib directory into my mini2440.
I've introduced the following enviroment vars:
export TSLIB_TSEVENTTYPE=INPUT
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_CALIBFILE=/usr/local/etc/pointercal
export TSLIB_CONFFILE=/usr/local/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/local/lib/ts
export QTDIR=/usr/local/Qt
export QWS_MOUSE_PROTO=tslib:/dev/input/event0
export QWS_DISPLAY=LinuxFB:mmWidth=310:mmHeight=190
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH

but, when i'm going to run an application, i obtain that linuxFB cannot
connect. Could someone help me? sorry for my english, Thanks.

David D
Hi All,

Who is using the last QT release ( QT 4.7 ) ??

unknown
Hi Janusz

how did you solve the problem?


>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

jhonna
hi to all
i am able to install x86qtopia in my fedora10 running host pc, and able to
execute hello world example.please tell me how to use qtopia,to build new
gui applictions.

Slash
My board came with Qt-4.6.3 pre-installed in it. It also has the fluid
launcher app (called Qt embedded demo) in the friendlyArm pane of the
qtopia 2.2 desktop. I ran many apps from the fluid launcher -- concentric
circles, svg viewer, etc. and they all run fine. 

I set up a developer tool-chain for Qt 4.6.2 on my host using this
tutorial:
http://www.sereno-labs.com/qt-4-6-2-installation-procedure-for-friendlya...

I can compile/build programs on my host. But when I run them on the
mini2440, I get this error:"Transformation error: Driver not found.
Aborted".

Can anyone please help me?

The Qt library on the board is located
at:/usr/local/Trolltech/QtEmbedded-4.6.3-arm/lib

Thanks.

hdak
i have same problem with Slash please help

Slash
@hdak

Do you have fluid launcher installed in your board?
It will be in the FriendlyArm pane -> Start Qt 4.6.3

hdak
yes it is running correctly, but my app not

hdak
Hi Slash this is solution but it is unstable.
echo @QWS_DISPLAY
Transformed:Rot0:0
./test -qws
Transformed: driver not found Aborted

it must be "LinuxFB:mmWidth=310:mmHeight=190"
export QWS_DISPLAY=LinuxFB:mmWidth=310:mmHeight=190
./test -qws is running
but ./test says:
QWSDisplay::Data::init: Invalid argument
Client can't attach to main ram memory.
Aborted

this is unstable because if you click window, screen will mix.and after
reboot qtopia, QWS_DISPLAY returns Transformed:Rot0:0.have you any idea for
this?

Skala
Sorry for my bad english. I have the same problem @hdak. FriendlyArm panel
-> Start Qt 4.6.3, everything running corectly, but i can't run any app:

./test -qws

When I set:

export QWS_DISPLAY=LinuxFB:mmWidth=310:mmHeight=190

and reboot Qtopia I have:
Transformed:Rot0:0

I add this entry in my rcS file:

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

But when I reboot I always have the same env:
Transformed:Rot0:0 ,etc....

Slash
@hdak and skala

I figured out a way. 
The thing is, if you want to launch a Qt 4 app, you first need to start a
Qt4 UI server.
In the other way you can run the app as a server with the "-qws" argument.
When you launch the built in "Start Qt4 ..." you actually start the Qt 4
server with the appropriate resolution and rotation (if it shows up). 

Make a simple Hello World app and follow these steps:

1 - copy/transfer your app to any place on the board
2 - using the file manager on the board (FriendlyArm->File browser) go
here:
      /usr/local/Trolltech/QtEmbedded<version>/demos/embedded/fluidlauncher
3 - double-tap on the "config.xml" file. It should open in the text editor.
4 - in the "SVG Viewer" section of the file, edit the "filename" string to
point to your app. Write absolute path (do not use shortcuts like ~). Close
the file. It's automatically saved.
5 - restart the board
6 - Launch Start Qt4 and select the SVG app.
7 - If all went well, you should see your Hello World

All the best.

Skala
@Slash

Thanks for reply.

"In the other way you can run the app as a server with the "-qws" argument.
"

If I want run my app as standalone application ("as a server") (without use
fluidluncher) i use:
./test -qws

And:
Transformed: driver not found Aborted

Thanks,
Skala

Slash
@Skala

Well, to be frank I just needed this board to prototype an idea of mine.
And I used Qt just as a dummy UI, with the core functionality provided by
the underlying linux and C++. I actually used Qt to run shell scripts on
the board (!).

I was not able to run apps as the server, facing problems just like you. So
I went for the alternate method (as I described above), and it worked, and
so I stopped thinking about that stupid "-qws" :)

This may be of some help to you:
http://apidocs.meego.com/1.1/core/html/qt4/qt-embedded-running.html

hdak
thanks Slash good solution, but makeshift.i created .desktop file for my
app.clicked and it says: app due error 11

Tan
I successfully cross- compiled Qt 4.6.2 for mini 2440. The exec created for
the examples in Qt 4.6.2 are all exec for 32-bit ARM. The problem which I
am facing is running them on mini2440.For ex- I am running the exec for
analogclock :

./analogclock -qws

It says illegal instruction.

Please help
Regards

P.S : I have cross checked the path of QTDIR as well as my kernel is 2.6.29
which is configured for VGA 1024x768 display.
My host is ubuntu 10.04
Also when i check the properties of the exec on my host, it says:
ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses
shared libs), for GNU/Linux 2.6.14, not stripped

hdak
edit your qmake.conf as follows

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_RANLIB  = arm-none-linux-gnueabi-ranlib
QMAKE_INCDIR            +=/home/ham/apps/tslib_arm/include
QMAKE_LIBDIR            +=/home/ham/apps/tslib_arm/lib
load(qt_config)



and compile your code(no lib).and send the program in binary mode.enjoy :D

temazepam mg
http://www.formspring.me/chanelekgyd temazepam 15mg

tiennt
How to init a audio device in /dev when starting FriendlyArm.
I tried to change /etc/init.d/rcS... but not run..

Sushant
paolo How to solve illegal instruction error

my qmake file is

#
# 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
QMAKE_RANLIB    = arm-linux-ranlib

MAKE_INCDIR +=/usr/local/tslib/include
QMAKE_LIBDIR +=/usr/local/tslib/lib
load(qt_config)

sperez
The problem about Illegal Instruction is a compiler problem with the FPU
flags.

Checkout to select the correct flags (-mfpu and -mfloat-abi) and how your
compiler is configured. In my case, -mfpu=vfpv4 was making the error, and
solved with -mfpu=vfpv4-d16. With the correct option, the compilation and
running the application worked well with both -mfloat-abi options: hard and
soft). With -mfloat-abi=softfp, doesn't work, due to compiler
configuration.

Add the correct flags for your target and compiler and has to work!.

Thanks to all the people, made my target work although is a 3 years old
post!.

Regards