Copyright © 2004 Harald Welte <laforge@gnumonks.org>
This document is not a DataRescue publication. The author is not affiliated with DataRescue in any way, he is merely an IDA user who shares his experience. DataRescue does not support IDA on non-x86 Linux architectures.
This document is provided as-is, there is no waranty and no support. Reproduction in any form is allowed in it's unmodified form, provided the reference to the author remains intact.
This is actually nota non-x86 issue, but a non-windows issue. DataRescue unfortunately packs the ida.key file into the windows installer, so you first need to run the windows installer to access the key.
Luckily (at least if you have access to a Linux/x86 machine), there is wine, and the IDA installer runs smoothly in wine, leaving behind a ida.key file that you can copy to the ~/.idapro/ida.key location.
Before you can start, you need a couple of things:
A Linux/x86 machine with a C++ development enviroment for x++, including gpm and X11 include files (only temporarily to compile a library)
A Linux/PPC machine with a C development enviroment
The Source code to the TVision library Linux port, as made avaliable at the DataRescue Homepage.
A working legitimate copy of IDA Pro or IDA Advanced (4.7.0.831 was used by the author)
The source code of the QEMU CPU Emulator
A patch against the QEMU source, allowing the user to set a child-process specific environment variable
A patch against the TVision source, adding a fcntl-related bugfix and removing runtime dependencies to libgpm and libX11
You need a i386 glibc and libstd++.so.5 on your ppc machine. On a Debian system, you can use the command tpkg-install-libc i386 to install glibc into /usr/i386-linux. However, libstdc++.so.5 is not installed, since it's an old backwards-compatibility library (can somebody at IDA link against libstdc++.so.6, please?) In any case, you can just copy the libraries from your Linux/x86 box to /usr/i386-linux/lib on your ppc machine.
I hope datarescue applies my patch in one of the upcoming IDA versions, whic would render this step becoming obsolete.
Untar the tvision source (caution: it extracts to the current working directory!) on your x86 box, and apply the tvision_level_j-laforge-quemu.patch
Compile libtvision.so by 'make' in the 'source' directory
Copy the resulting libtvision.so to your ppc machine.
I hope Fabrice or Rusty will accept my patch for enviroment-specification, which would render this step becoming obsolete.
Untar the qemu source code, or check out qemu from CVS
Apply the qemu-userspace-ldpreload.patch to the source
Compile qemu as usual
copy the qemu-i386 executable to your idapro directory. This step is important, and it will not work if you skip it. IDA tries to locate plugins and CPU modules in the directory of the executable. It uses /proc/self/exe to do so. Unfortunately /proc/self/exe will be /where/ever/qemu-i386 - certainly not the same directory as your IDA installation.
Finally, we have all parts installed. The only thing missing is a small script that configures the enviroment and starts IDA:
#!/bin/sh IDADIR=$HOME/idaadv export TVOPT=noX11,noGPM export QEMU_LD_LIBRARY_PATH=/usr/i386-linux/lib:$IDADIR $IDADIR/qemu-i386 -L /usr/i386-linux $IDADIR/idal $1
Although I have tested this only with PPC so far, I am pretty confident that this will work with any other host architecture that qemu supports (at the moment, Alpha, Sparc, S.390 and PPC).
If you have any experience on running DIA on other host architectures, and/or
other suggestions / comments / extensions to this document, please email the
author at <laforge@gnumonks.org>.