If you are using a classic version of Ubuntu 14.04, to work on Nachos, the only thing you should need are cross compilers. In this HowTo, I will quickly explain how you should install them.
Step 1 : Add new repositories
The cross compilers are not available in the default ubuntu 14.04 repositories. To install them, we could thus get the compiler sources and install manually. Thankfully, we won't have to do this since they are available in debian repositories. Since Ubuntu is based on Debian, we will be able to install those package even though they were not designed for Ubuntu.
To be able to use the debian repositories, we are going to modify the
apt sources. The idea is to add new servers on which to look for packages every time we use the
We are going to add 2 repositories by doing the following :
$ sudo su # echo "deb http://ftp.fr.debian.org/debian squeeze main " > /etc/apt/sources.list.d/debian.list # echo "deb http://www.emdebian.org/debian/ squeeze main " >> /etc/apt/sources.list.d/debian.list # exit
Add public keys
Now that the two repositories were added, it would be possible to update the available package list and install the cross compilers. But if you were to do that now, you'd get the following warnings.
W: Erreur de GPG : http://www.emdebian.org squeeze InRelease : Les signatures suivantes n'ont pas pu être vérifiées car la clé publique n'est pas disponible : NO_PUBKEY B5B7720097BB3B58 W: Erreur de GPG : http://ftp.fr.debian.org squeeze Release : Les signatures suivantes n'ont pas pu être vérifiées car la clé publique n'est pas disponible : NO_PUBKEY AED4B06F473041FA NO_PUBKEY 64481591B98321F9
That's because the public keys of these two repositories are not in the system yet. So it is not possible to check the integrity of the packages on these repositories. So we obviously are going to add them.
Usually, it is done using the
apt-key commands. But debian is quite nice and provides packages that install the keys on their own. So the only thing needed is to install two packages.
$ sudo apt-get install emdebian-archive-keyring debian-archive-keyring
You can now update the package information and you shouldn't have any warnings.
$ sudo apt-get update
Step 2 : Install cross compilers
Now, it's going to be easy. You just need to install the cross compilers.
$ sudo apt-get install gcc-4.4-mipsel-linux-gnu g++ g++-multilib
And that's it. You are now good to go and will be able to compile Nachos.