Title: [E2] Crosscompiling in Linux Post by: BlinK_ on June 04, 2008, 07:12:49 am As I succeeded to telnet to my E2 from linux, first thing to do, is to configure crosscompiler. (:
I ran into one problem. When I try to make, I get following error: Quote Assembler messages: Error: unknown cpu `iwmmxt' cc1plus: error: bad value (iwmmxt) for -mtune= switch cc1plus: error: bad value (iwmmxt) for -mcpu= switch I get the same error if I use blackhawk's or lasly's SDK. Does anyone know what is the problem? Title: Re: [E2] Crosscompiling in Linux Post by: NestorM on June 04, 2008, 07:27:25 am I have not any problem crosscompiling in linux, but I don't work in telnet.
Title: Re: [E2] Crosscompiling in Linux Post by: BlinK_ on June 04, 2008, 07:37:33 am Then how do you do it? Can you share your configured crosscompiler?
Title: Re: [E2] Crosscompiling in Linux Post by: ilove3d on June 05, 2008, 11:19:10 pm http://ezxdev.org/arm-linux.tar.bz2
Title: Re: [E2] Crosscompiling in Linux Post by: BlinK_ on June 06, 2008, 03:50:21 am Thank you very much. It worked with lasly's SDK.
Now when I have a binary file, I need to place it on my mobile. How can I do it on linux? I can telnet to my moblile, but I don't know how to put files in it. EDIT: Found out how to easily put files on E2 from linux. We have samba! (: In your linux box just type Quote smbclient //192.168.16.2/system and you are on your mobile. Commands for smbcleint are pretty much the same as in FTP client.If anyone knows another method of how to manage files on mobile through linux, please share. EDIT2: Even better. You can mount E2 system just like this: Quote sudo mount -t smbfs //192.168.16.2/system /mnt/system Title: Re: [E2] Crosscompiling in Linux Post by: BlinK_ on June 09, 2008, 02:00:17 am I have a problem compiling any sources with MyDialog object. I tried mkpgTool, VMemory and other sources and all of them failed to compile. Even this simple program:
Quote #include <E2_EZX_ZApplication.h> #include <E2_EZX_ZKbMainWidget.h> #include <stdio.h> class MyDialog : public ZKbMainWidget { Q_OBJECT public: MyDialog() : ZKbMainWidget((ZHeader::HEADER_TYPE)3, NULL, "ZMainWidget", 0) { printf("woohoo"); } }; int main(int argc, char **argv) { ZApplication* app = new ZApplication(argc, argv); MyDialog* dlg = new MyDialog(); app->setMainWidget(dlg); dlg->show(); app->exec(); delete dlg; delete app; return 0; } shows the same error when compiled. Quote martynas@martynas-desktop:~/e2sdk/lasly/band$ make -f Makefile /home/martynas/e2sdk/lasly/bin/moc band.cpp -o band.moc arm-linux-g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/home/martynas/e2sdk/lasly/include -o band.o band.cpp arm-linux-gcc -o makefile band.o -L/home/martynas/e2sdk/lasly/lib -lm -lqte-mt -lipp-codecJP -lezxappbase -lipp-miscGen -lezxpm -lipp-jp band.o(.text+0xd4): In function `main': : undefined reference to `vtable for MyDialog' collect2: ld returned 1 exit status make: *** [makefile] Error 1 martynas@martynas-desktop:~/e2sdk/lasly/band$ Can anyone help? Title: Re: [E2] Crosscompiling in Linux Post by: arctu on June 09, 2008, 04:13:06 am u didn't follow fully the instructions provided by lasly. that's all I can say. i'm not gonna spoon feed. =x
Title: Re: [E2] Crosscompiling in Linux Post by: NestorM on June 09, 2008, 05:30:18 am me too :)
Title: Re: [E2] Crosscompiling in Linux Post by: BlinK_ on June 09, 2008, 08:08:37 am Both of you are not acting nice. (: I guess, I am calling for help, not "spoon feed". If you do not have anything to say, then do NOT say it.
As for my problem, I guess it has something to do with a helloworld.moc file. It is included in every source file from lasly's SDK. I tried to generate moc file from my program source file, and then include it in the end. Then my program compiled but when I ran it, it gave me segmentation fault. Title: Re: [E2] Crosscompiling in Linux Post by: arctu on June 09, 2008, 09:12:12 am I told you... I do not want to spoon feed.. and I even gave you a hint.. u didn't follow fully the instructions provided by lasly =="
i first learn how to compile apps for E2 by COMPLETELY FOLLOWING HIS INSTRUCTIONS. hmm.. i wonder if you even read his readme? Title: Re: [E2] Crosscompiling in Linux Post by: BlinK_ on June 09, 2008, 10:55:52 am Yea. I read the readme file from lasly's SDK. I did everything what was said there.
There was not even a word about moc files. An I haven't found any moc file in SDK archive. Title: Re: [E2] Crosscompiling in Linux Post by: arctu on June 09, 2008, 06:40:39 pm then read on qt 2.3 next.. =p
oh well.. lasly provided 2 perl script with his sdk... progen and tmake. You only need to use those to create a Makefile which have instructions to create the moc file. if your source codes uses classes inhereting from qwidget and its variants, a *.moc file with the name of your source code will be generated at compilation. you can include the moc file in your source with "#include "nameofyourmoc.moc". That will fix the undefined table problem. and btw.. with lasly's sdk.. u don't do Quote martynas@martynas-desktop:~/e2sdk/lasly/band$ make -f Makefile you only need progen and tmake. follow lasly's instructions. if you use make, moc wont be generated. :PTitle: Re: [E2] Crosscompiling in Linux Post by: BlinK_ on June 09, 2008, 11:10:10 pm As I said, I followed lasly's HOWTO. And there is written about progen, tmake and make.
Progen generates pro file, which contains information about your source, header files and other. Tmake generates makefile from pro file. It doesn't compile anything, And then make compiles the program by following instructions from makefile. Including moc file fixed the vtable bug. But when compiled, this program spits out segmentation fault. Quote #define QT_NO_DRAGANDDROP #define QT_NO_PROPERTIES #include <E2_EZX_ZKbMainWidget.h> #include <E2_EZX_ZApplication.h> #include <stdio.h> class MyDialog : public ZKbMainWidget { Q_OBJECT public: MyDialog::MyDialog( ) : ZKbMainWidget((ZHeader::HEADER_TYPE)3, NULL, "ZMainWidget", 0) { printf("Woohoo"); } }; int main(int argc, char **argv) { ZApplication* app = new ZApplication(argc, argv); MyDialog* dlg = new MyDialog(); //app->setMainWidget(dlg); //dlg->show(); app->exec(); delete dlg; delete app; return 0; } #include "band.moc" Segmentation fould occurs when I uncomment Quote MyDialog* dlg = new MyDialog(); line. I also tried to compile mkpgTools by lasly, and it compiles with no problems. But when I tried to run it, it also gave me a seg fault.Title: Re: [E2] Crosscompiling in Linux Post by: arctu on June 09, 2008, 11:30:48 pm Ahh.. My mistake on the make part..
I tell u what... Try compiling a simple hello world program without qt stuff and see if the program could run on ur phone.. Title: Re: [E2] Crosscompiling in Linux Post by: BlinK_ on June 10, 2008, 12:26:30 am Yes it can. I wrote some classes without Qt and everything was fine. As I said, If i comment
Quote MyDialog* dlg = new MyDialog(); then everything is fine.Title: Re: [E2] Crosscompiling in Linux Post by: arctu on June 10, 2008, 01:22:51 am hmm... who's SDK did u use? blackhawk or lasly?
Title: Re: [E2] Crosscompiling in Linux Post by: BlinK_ on June 10, 2008, 02:03:16 am I was using lasly's SDK.
Now I tried blackhawk's, and everything is fine. Finally no seg faults. Thank you for help. I realise that the only difference between these SDK, are libraries and maybe some headers. So this is somewhat strange. But finally it works... Title: Re: [E2] Crosscompiling in Linux Post by: arctu on June 10, 2008, 04:00:10 am Ahh.. good for you. I thought so.
Well, I'm using a custom modified lasly's SDK. It should work fine. In lasly's SDK, you should have copied your own *.so files from the phone and then after progen and tmake, modify the Makefile manually to point to the correct libs. Did you do that? Title: Re: [E2] Crosscompiling in Linux Post by: BlinK_ on June 10, 2008, 04:25:18 am That was exactly what I did not do. It simply wasn't in lasly readme, and I didn't understand that by myself.
I copied libs from phone using blackhawk's SDK and thats why it works fine. Are these librariess all the same in different MP? If no, then compiled program may work at some mobiles, but not at all of them... Thank you again for help. I am playing right now with menus. Lasly's examples are very useful. However, I must stop playing as I have exam tomorrow, and I need to prepare for it. (: Title: Re: [E2] Crosscompiling in Linux Post by: arctu on June 10, 2008, 05:49:01 am Compiled programs works fine on all fw except for the prototype fw which uses quite a different libs.
Haha.. alright... hope you will contribute a lot to the e2 community with native programs. (: Title: Re: [E2] Crosscompiling in Linux Post by: 3-D on June 12, 2008, 01:04:08 am Has tried to write appendices by means of sdk by Lasly
Problems: 1 it is necessary to start not make and make-f [file] 2 after all operations file XXX.o which turns out is not started Please help me Title: Re: [E2] Crosscompiling in Linux Post by: fich on June 13, 2008, 06:35:24 am I compiled some simple cpp, jus helloworld, with lasly SDK
but when I tried run this app on shell, it show error ./coba: error while loading shared libraries: libqte-mt.so.2: cannot open shared object file: No such file or directory I used BlackStorm non kalei i found file libqte-mt.so.2 on /usr/lib/ezx/lib/ what I'm supposed to do? newbie here >.< Title: Re: [E2] Crosscompiling in Linux Post by: arctu on June 13, 2008, 06:57:18 am @3-D:
hmm.. I don't understand you.. can you explain more? @fich: u are probably experiencing linking error. check your makefile.. how did you link the libraries? Title: Re: [E2] Crosscompiling in Linux Post by: fich on June 13, 2008, 06:53:13 pm I've copied /usr/lib adn child folder from phone into /usr
in my Makefile LIBS = $(SUBLIBS) -L$(QTDIR)/lib -lm -lqte-mt -lipp-codecJP -lezxappbase -lipp-miscGen -lezxpm -lipp-jp -L/usr/lib/ezx/lib or LIBS = $(SUBLIBS) -L$(QTDIR)/lib -lm -lqte-mt -lipp-codecJP -lezxappbase -lipp-miscGen -lezxpm -lipp-jp -L/usr/lib/ezx/lib -lm -lqte-mt -lipp-codecJP -lezxappbase -lipp-miscGen -lezxpm -lipp-jp it still give me error like above Title: Re: [E2] Crosscompiling in Linux Post by: arctu on June 14, 2008, 04:35:01 am just this shoud do it..
LIBS = $(SUBLIBS) -L$(QTDIR)/lib -lm -lqte-mt -lipp-codecJP -lezxappbase -lipp-miscGen -lezxpm -lipp-jp or.. try the on lasly wrote in his readme Title: Re: [E2] Crosscompiling in Linux Post by: NestorM on June 14, 2008, 12:53:40 pm I need help, anybody can share with me the crosstool? My internet connection is so slow and a can't download it. when I type ./ build.sh ---- It stop in 8%. Can somebody compress in tar.gz your crosstool? and share with me?
help...! |