Created by Mrwho 12:11, 17 January 2010 (UTC)
I decided to write a small guide on how to setup your own little development virtual machine. I spend several hours figuring out the steps, so I guess I may save some other people the time. At the end of this tutorial you should have a working Toolchain for Xtreamer.
Preparing the Machine
Start by fetching the virtual machine we will be working with - debian is my distribution of choice, so we will get that one. I chose to use a small image and download whatever packets we will be needing once the machine is running.
Of course you can choose any other Debian - or Debian based, like Ubuntu - distribution and follow these instructions. You may have some of the packets I will tell you to install, but that shouldn't be a problem.
Unzip and start the virtual machine in your VMPlayer of choice. Done? Good, now you can login and start the procedure. In case you're using my same virtual machine the user you can use to login is notroot with password thoughtpolice. Once in make sure you become root:
In my image the password for root is the same as the one for notroot. That is: thoughtpolice.
Getting the packets
If you are using a netinstall image - as I am - you have to update the sources for your apt packets. You do that by modifying
Just cut and paste the following:
cat >> /etc/apt/sources.list<<EOF ## France sources because I am now in Paris deb http://ftp.fr.debian.org/debian/ lenny main contrib non-free deb-src http://ftp.fr.debian.org/debian/ lenny main contrib non-free EOF
Press enter a couple of times, just to be on the safe side, and then update your package information:
Finally we can install all the packets we need!
apt-get install samba smbclient imagemagick gcc openssh-server git-core alien libgtk2.0-dev
Samba and Samba client for transferring files around, gcc to compile, git to get the sources of helloworld, openssh server to login to the machine via ssh, imagemagick because it brings some of the programs needed to compile the resources of helloworld and finally alien to play around with our RPMs.
Setting up the environment
Now, let's create the directory were we will be working and share it with samba, so that we can browse to it if we need, ok?
mkdir /opt/develop # make it wide open to attack! :) chmod 777 /opt/develop cat >> /etc/samba/smb.conf <<EOF [development] comment = Development Directory path = /opt/develop guest ok = yes read only = no browseable = yes create mask = 0600 directory mask = 0700 EOF # restart samba /etc/init.d/samba restart
Don't you feel already better? If you're on a windows platform you should be able to browse to the newly created share. Eventually.
Now, go back into
and lets start downloading things, shall we?
cd /opt/develop ## Get the latest sources from the repository git clone git://opensphd.git.sourceforge.net/gitroot/opensphd/helloworld helloworld ## Get the toolchain wget -c ftp://download.conceptronic.net/Conceptronic/GNU-GPL/CM3Gxx/toolchain/sdelinux-5.03.06-1.i386.rpm ## And the libraries wget -c ftp://download.conceptronic.net/Conceptronic/GNU-GPL/CM3Gxx/toolchain/inc_lib0808.tar.bz2 ## Convert the RPM to something more Debian friendly alien --scripts sdelinux-5.03.06-1.i386.rpm
Now we are ready to install the whole wizzabang!
dpkg -i sdelinux_5.03.06-2_i386.deb ## Check that it is installed mipsel-linux-gcc --version
The last command should give you something in the lines of:
Now we put the libraries and headers in:
cd /usr/local/mipsel-linux tar jxvf /opt/develop/inc_lib0808.tar.bz2
Now, before you start compiling: I had to change a few bits in the rpcgen, because it failed to parse one of their own scripts. Plus there were a couple of syntax errors (namely: they spelled strcpy as stpcpy). And a directory was botched... and some more. You can get more by looking at the patch itself.
So, download the patch that I attached to this post, and save it under /opt/develop. Then:
cd /opt/develop gunzip mrwho-patch.ptc.gz cd /opt/develop/helloworld patch -p1 < ../mrwho-patch.ptc
At this point from inside the directory where you are sitting just run:
do take a leak, eat something, be nice to you girlfriend - I may not have one left once I'm done here - and at the end of long listing of warnings you should have your binaries under:
There are three directories, with three different set of programs. Now, you're on your own.
Happy hacking! MrWHO