Friday, July 20, 2007

dynamips in Mac OS X (PowerPC)

I already tried many time to rebuild dynamips from source in OS X with PowerPC processors, but still failed :(, but yesterday I read in ipflow.utc.fr blog mention in version 0.2.7 optimize PowerPC emmm this statement make me little happy but how rebuild it? all parameter configure using default? still confuse. Finally I try again step-by-step I repeat again, and sucess run dynamips in my iBook G4, oh this is make me very-very happy :)

This is my step

0.install XCode from OSX DVD or download from Apple site

1.install darwinports (MacPorts), download first using default internet get file like 'curl -O http://svn.macports.org/repository/macports/downloads/MacPorts-1.5.0/MacPorts-1.5.0-10.4.dmg', or you can wget if you already installed or using safari browser

2.run 'sudo port -d selfupdate'

3.run 'sudo port install libpcap'

4.download libelf package 'curl -O http://www.mr511.de/software/libelf-0.8.6.tar.gz', extract it 'tar -zxvf libelf-0.8.6.tar.gz' and build from source using '/configure --prefix=/usr/local' then 'make' and 'sudo make install'

5.download dynamips source code I using 0.2.7 version from http://www.ipflow.utc.fr/dynamips/dynamips-0.2.7.tar.gz, extract it using 'tar -zxvf dynamips-0.2.7.tar.gz', in directory source edit file 'Makefile' to use 'nojit' and change the line PCAP_LIB to 'PCAP_LIB=-L/opt/local/lib -lpcap'

6.run dynamips
- run as standalone router
./dynamips -X ios.bin (-X using to real memory not cache on hardisk)
- run as server
./dynamips -H 7200

First time I running still error
...
C7200 'R1': starting simulation (CPU0 PC=0xffffffffbfc00000), JIT enabled.
This function should not be called: void mips64_inc_cp0_count_reg(mips64_jit_tcb_t *b)
...
I think JIT cannot enabled, so I trick using ./dynamips -X -j ios.bin (-j disabled JIT)

this trick run normally if as standalone router but cannot run as server, there is no parameter use to disable JIT :(( I very stuck with this happen :(

I try to rebuild again from first step & what happen this is unbelievable, there is no error again JIT automatic disable without paramter -j oh, this great.

Now I can run dynamips on my iBook :D but I can't optimize idle-pc :(, I try to give idle-pc value from I ever use it just work (not absolutely well) on a IOS version :(

I still looking for to work well idle-pc and enable JIT, from information JIT can make faster process.

No comments: