Reply
Thread Tools
Posts: 3 | Thanked: 0 times | Joined on Jul 2010
#31
Hy guys. I need help answering a question.

First of all let me say what I want to do: I have a rootfs, a toolchain and a device (not a Nokia device). I want to configure MADDE to help me crosscompile for ARM and create QT apps that I can run on my device. So far so good, but what if my toolchain / rootfs is x86 based? Can I setup MADDE to help me create x86 based QT apps, that I will then run on my x86 device? As far as I could find there is no way specifying that the target you create with mad-admin has a certain arch. I've tried to do that and used a x86 rootfs and a x86 cross toolchain. The target got created ok. When I try "mad gcc --version" I get the correct one, but when I try "mad gcc -Wall test.c" for eg, I get complains cause some ARM options get passed to gcc. I guess it expects to find an ARM compiler and does not bother to check it out. Am I right?

Thanks
 
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#32
Not sure I follow... If you have a X86 target, you don't need MADDE at all, just use the Qt SDK as you would on any other X86 device.
__________________
Blogging about mobile linux - The Penguin Moves!
Maintainer of PyQt (see introduction and docs), AppWatch, QuickBrownFox, etc
 
Posts: 3 | Thanked: 0 times | Joined on Jul 2010
#33
Well, I kind of do. Let me try to explain.

The x86 rootfs I'm trying to compile for is not a standard one. Is a rootfs created for embedded devices with a certain Qt version and I want to create Qt apps that will run on a device powered by this rootfs. So, if I build it on my x86 machine I have no guarantee that it will work on the x86 target.

Does it make sense?
Thanks
 
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#34
Still... Why not just add the Qt on that rootfs to the Qt versions in Qt Creator ? That way it would call the relevant qmake and include the corresponding headers...
__________________
Blogging about mobile linux - The Penguin Moves!
Maintainer of PyQt (see introduction and docs), AppWatch, QuickBrownFox, etc
 
Posts: 3 | Thanked: 0 times | Joined on Jul 2010
#35
Yes I can do that but what about compiling the app. It should get compiled with the toolchain in the rootfs, not the one on my machine. I want to be able to cross-compile the app so I can use it on that rootfs.
Does it make sense?
 
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#36
Originally Posted by andrewzro View Post
Yes I can do that but what about compiling the app. It should get compiled with the toolchain in the rootfs, not the one on my machine. I want to be able to cross-compile the app so I can use it on that rootfs.
Does it make sense?
Yes, it does, and this is exactly what Attila was talking about in his last post.
 

The Following User Says Thank You to Venemo For This Useful Post:
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#37
Originally Posted by andrewzro View Post
Yes I can do that but what about compiling the app. It should get compiled with the toolchain in the rootfs, not the one on my machine. I want to be able to cross-compile the app so I can use it on that rootfs.
Does it make sense?
I think you’re stretching the term cross-compile here. You’re still on a X86 linux platform, you can specify alternative compilers, libs or whatever you need in the .pro files or even QtCreator itself.
__________________
Blogging about mobile linux - The Penguin Moves!
Maintainer of PyQt (see introduction and docs), AppWatch, QuickBrownFox, etc
 
Posts: 62 | Thanked: 97 times | Joined on Dec 2009 @ Finland, Kerava
#38
Originally Posted by andrewzro View Post
Hy guys. I need help answering a question.

First of all let me say what I want to do: I have a rootfs, a toolchain and a device (not a Nokia device). I want to configure MADDE to help me crosscompile for ARM and create QT apps that I can run on my device. So far so good, but what if my toolchain / rootfs is x86 based? Can I setup MADDE to help me create x86 based QT apps, that I will then run on my x86 device? As far as I could find there is no way specifying that the target you create with mad-admin has a certain arch. I've tried to do that and used a x86 rootfs and a x86 cross toolchain. The target got created ok. When I try "mad gcc --version" I get the correct one, but when I try "mad gcc -Wall test.c" for eg, I get complains cause some ARM options get passed to gcc. I guess it expects to find an ARM compiler and does not bother to check it out. Am I right?

Thanks
Short answer is yes you can.
The real world is a little bit more complicated. I'll try to explain those details, but before that I answer your last question. MADDE should not expect ARM compiler. Did you replaced some of the ready made targets with your own?

There are two proper ways to to create a new target with MADDE.
You can create description of your target in madde.conf or you can create a target manually.

Manual way:

Code:
mad-admin create my_target  -tc my_toolchain -sr my sysroot  -qt my_qt
where
'my_target' is the name of your new target. Note that 'my_' prefix is needed, because the target is not configured via madde.conf
'my_toolchain' is the name of your gcc toolchain. It is expected that toolchain is zipped tarball and can be found from the cache/ directory under MADDE installation.
'my_sysroot' is the name of your sysroot. It is expected that sysroot is zipped tarball and can be found from the cache/ directory under MADDE installation.
'my_qt' is the name of your qt tools (qmake, uic, moc, etc..). It is expected that qt tools is zipped tarball and can be found from the cache/ directory under MADDE installation. Note that these tools need to be compatible with Qt version installed in sysroot.
Note that older qt-tools versions (< 4.5) were patched by me to work with MADDE in Windows and Mac. Actually qmake was patched to produce unix style Makefiles in Windows and Mac.

If the target is configured via madde.conf you should see your target by 'mad list' command. Then you just create your target by givining command, expecting that target name is 'newtarget'
Code:
mad-admin create newtarget
Please check madde.conf from the cache/ directory under MADDE installation. It shouldn't be very complicated.

Note that all pieces of the target should be found from cache/ directory.
 

The Following User Says Thank You to rontti For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 03:23.