Decided to create such instruction. Some people has a practice in blackrhino native compiling and they are know that it is "pretty slow". We can increase the speed of compilation using PC's mipsEEel cross compiler.
Conditions:
Blackrhino (or maybe Kit) to HDD installed (no way for SMB; also USB is not the way)
PC with linux (even in virtual machine)
Cross-cable
First, we need to compile mipsEEel cross-compiler.
mipsEEel cross-compiler building
Download next files:
headers.tar.gz
binutils-2.13.2.1.tar.gz
binutils-2.13.2.1-r5900-7.diff.gz
gcc-3.0.3-ps2linux-src.tgz
gcc-3.0.3-newbinutils+modern.zip
1. Uncompress the includes:
cd /usr/local
tar -zxvf headers.tar.gz
2. Uncompress, patch, and build binutils:
tar -zxvf binutils-2.13.2.1.tar.gz
cd binutils-2.13.2.1
patch -p 1 < binutils-2.13.2.1-r5900-7.diff
mkdir -p build && cd build
../configure --prefix=/usr/local/ps2 --target=mipsEEel-linux
make
make install
3. Uncompress, patch, and build gcc:
tar -zxvf gcc-3.0.3-r5900-src.tar.gz
cd gcc-3.0.3
patch -p 1 < gcc-3.0.3-r5900-newbinutils+modern.patch
rm -rf libstdc++-v3
mkdir -p build && cd build
../configure --prefix=/usr/local/ps2 --target=mipsEEel-linux --enable-shared --enable-languages=c,c++
make
make install
Second, we need to compile distcc both on PS2Linux and on PC
distcc compiling
This is the only program which had to be compiled native on PS2Linux. Both for PS2Linux and for PCLinux we using these:
Download distcc-x.yz.tar.bz2
tar -jxvf distcc-x.yz.tar.bz2
cd distcc-x.yz
./configure --prefix=/usr
make
make install
Third, we need to create additional symlinks
additional symlinks creation
cd /usr/local
mkdir {native,cross}
cd native
ln -s /usr/bin/gcc mipsEEel-linux-gcc
ln -s /usr/bin/g++ mipsEEel-linux-g++
cd ../cross
ln -s /usr/bin/distcc mipsEEel-linux-gcc
ln -s /usr/bin/distcc mmipsEEel-linux-g++
PS2Linux need to be loaded with ethernet cable inserted in PS2 and PC.
After both loaded, ping your PC:
ping 10.111.62.251 (ping IP of PC)
Ctrl+C
Now we need to choose the way of distcc using.
The simplest way
It is possible to compiling right now.
Execute on the PC:
distccd --daemon --allow 10.111.62.254 (10.111.62.254 is IP of PS2 example)
Execute on PS2:
export DISTCC_HOSTS="10.111.62.251" (my IP of PC example)
export PATH=/usr/local/native:$PATH
export PATH=/usr/local/cross:$PATH
and for configure we should use
CC=mipsEEel-linux-gcc CXX=mipsEEel-linux-g++ ./configure
The way of SSH is alternative to method described above. I tested no one of them and can't say if it work. If it not then we should use another harder way.
The way of SSH
It is unknown for me if such programs like ssh, scp and ssh-keygen are presented on PS2Linux. Suppose that they are. If not - then there is a problem to compile OpenSSH for PS2Linux first.
In PS2Linux:
cd /root/.ssh
ssh-keygen -d
scp id_dsa.pub root@10.111.62.251:/root/.ssh/
- 10.111.62.251 - IP of PC. The connection check at the same time
cd /usr/etc/distcc
vi distcc-ssh
Need to write here:
#!/bin/bash
exec /usr/bin/ssh -o GSSAPIAuthentication=no -i /root/.ssh/id_dsa "$@"
Save it and exit;
chmod a+x distcc-ssh
In PCLinux:
cd /root/.ssh
cat id_dsa.pub >> authorized_keys2
Now you can convince in no need the password while ssh connection.
Now, finally, the compiling part.
Execute on the PC:
distccd --daemon --allow 10.111.62.254 (10.111.62.254 is IP of PS2 example)
Execute on PS2:
export DISTCC_SSH="/usr/etc/distcc/distcc-ssh"
export DISTCC_HOSTS="root@10.111.62.251" (my IP of PC example)
export PATH=/usr/local/native:$PATH
export PATH=/usr/local/cross:$PATH
and for configure we should use
CC=mipsEEel-linux-gcc CXX=mipsEEel-linux-g++ ./configure


1Likes
LinkBack URL
About LinkBacks




