How to get IDA running on Linux/PPC

$Revision: 1.4 $

This document describes how to run DataRescue's IDA (Interactive Disassembler) on non-x86 linux platforms.


Table of Contents
1. Disclaimer
2. Extracting ida.key
3. Prerequirements
4. Installing i386 glibc on your ppc machine
5. Building modified libtvision.so
6. Building modified qemu-i386
7. Running IDA
8. Final Remarks

1. Disclaimer

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.


2. Extracting ida.key

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.


3. Prerequirements

Before you can start, you need a couple of things:


4. Installing i386 glibc on your ppc machine

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.


5. Building modified libtvision.so

I hope datarescue applies my patch in one of the upcoming IDA versions, whic would render this step becoming obsolete.

  1. 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

  2. Compile libtvision.so by 'make' in the 'source' directory

  3. Copy the resulting libtvision.so to your ppc machine.


6. Building modified qemu-i386

I hope Fabrice or Rusty will accept my patch for enviroment-specification, which would render this step becoming obsolete.

  1. Untar the qemu source code, or check out qemu from CVS

  2. Apply the qemu-userspace-ldpreload.patch to the source

  3. Compile qemu as usual

  4. 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.


7. Running IDA

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

8. Final Remarks

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 .