View Single Post
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: