<?xml version='1.0' encoding="UTF-8"?>
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-mips-faq.xml,v 1.2 2005/09/08 12:18:45 yoswink Exp $ -->

<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
<guide link="/doc/en/gentoo-mips-faq.xml">

<title>Gentoo Linux/MIPS Frequently Asked Questions</title>

<author title="Author">
  <mail link="redhatter@gentoo.org">Stuart Longland</mail>
</author>

<abstract>
This FAQ is intended to answer some of the most frequently asked questions 
relating to Gentoo/MIPS and Linux/MIPS in general.
</abstract>

<!-- The content of this document is licensed under the CC-BY-SA license -->
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>

<version>1.1</version>
<date>2005-09-08</date>

<chapter>
<title>About this document</title>
<section>
<title>Introduction</title>
<body>

<p>
This FAQ is intended to answer frequently asked questions about Gentoo/MIPS and
Linux/MIPS that we receive from various users.  It's aimed at both new users
and experienced users alike.  It has been split into a number of categories 
to make navigation easier.
</p>

<p>
If you have anything to contribute to the FAQ or, having read this guide, you
still have questions that are left unanswered, feel free to
<uri link="http://mips.gentoo.org">drop us a line</uri>.
</p>

</body>
</section>
<section>
<title>Content</title>
<body>

<p>
<b>About the Gentoo/MIPS project</b>
</p>

<ul>
  <li><uri link="#what">What is Gentoo/MIPS?</uri></li>
  <li><uri link="#why">Why install Gentoo Linux on MIPS?</uri></li>
  <li>
    <uri link="#port">Why don't you port Gentoo to NetBSD/MIPS or IRIX?</uri>
  </li>
</ul>

<p>
<b>MIPS Hardware FAQs</b>
</p>

<ul>
  <li><uri link="#hw-what">What is MIPS?</uri></li>
  <li>
    <uri link="#hardware">What sort of hardware uses MIPS processors?</uri>
  </li>
  <li><uri link="#supported">Is my machine supported?</uri></li>
  <li><uri link="#support_X">Why don't you support machine X</uri></li>
</ul>

<p>
<b>MIPS Software FAQs</b>
</p>

<ul>
  <li><uri link="#stage">Which stage tarball do I use?</uri></li>
  <li>
    <uri link="#chroot">I got told "illegal instruction" or "Cannot Execute
    Binary File" when chrooting. What did I do wrong?</uri>
  </li>
</ul>

<p>
<b>Silicon Graphics Specific FAQs</b>
</p>

<ul>
  <li><uri link="#netboot">Why doesn't my SGI machine netboot?</uri></li>
  <li>
    <uri link="#serial">The machine downloads the kernel, but then "hangs"
    (using a monitor and keyboard -- not serial console)</uri>
  </li>
</ul>

<p>
<b>Cobalt Specific FAQs</b>
</p>

<ul>
  <li><uri link="#cobaltboot">Why won't my Cobalt machine boot?</uri></li>
  <li><uri link="#qube2700">Why don't you support the Qube 2700?</uri></li>
</ul>
    
  
</body>
</section>
</chapter>

<chapter>
<title>About the Gentoo/MIPS Project</title>
<section id="what">
<title>What is Gentoo/MIPS?</title>
<body>

<p>
Gentoo/MIPS is a small project within the Gentoo Foundation, responsible for
looking after the MIPS port of Gentoo Linux.  We currently look after two main
sub architectures of the MIPS family specifically: Silicon Graphics systems and
MIPS-based Cobalt servers.
</p>

</body>
</section>
<section id="why">
<title>Why install Gentoo Linux on MIPS?</title>
<body>

<p>
Okay, sure, some MIPS machines aren't the fastest boxes on the block these days.
However, despite the age of some of these beasts, they still can make very
functional, useful machines.  A Cobalt Qube 2 could make a very nice broadband
Internet router, capable of hosting websites, email, IRC and numerous other
tasks.  There are a number of reasons why you'd want to install Linux on this
sort of hardware.
</p>

<ul>
  <li>
    It teaches you a lot about computer hardware by giving you an alternate
    frame of reference
  </li>
  <li>
    It allows you to turn what would otherwise be useless junk into a very
    functional system
  </li>
  <li>
    Status Symbol: Linux on x86 is so common these days it's not funny.
    However, Linux on MIPS is a lot less common and quite a talking point.
  </li>
</ul>

</body>
</section>
<section id="port">
<title>Why don't you port Gentoo to NetBSD/MIPS or IRIX?</title>
<body>

<p>
Hey, great idea.  Unfortunately, a lot of the Gentoo/MIPS team already have
their hands full looking after Linux/MIPS as well as other commitments.
However, you're welcome to give it a try.  May I suggest raising this on the
<uri link="http://forums.gentoo.org/viewforum-f-32.html">Gentoo Forums</uri> and
see what the interest is first.  Also, have a look at some of the other threads
on porting Gentoo to other architectures such as
<uri link="http://forums.gentoo.org/viewtopic-t-113387.html">Solaris/SPARC</uri>, 
<uri link="http://forums.gentoo.org/viewtopic-t-319607.html">IBM OS/2</uri> and
<uri link="http://forums.gentoo.org/viewtopic-t-319691.html">Microsoft Services
For Unix</uri> for hints on how to proceed.  If after some hacking you get
something useful out of it... chances are a few developers will pick up on this
and help you get it to the next stage.
</p>

</body>
</section>
</chapter>

<chapter>
<title>MIPS Hardware FAQs</title>
<section id="hw-what">
<title>What is MIPS?</title>
<body>

<p>
<uri link="http://www.mips.com">MIPS Technologies</uri> is a company that
produce a number of RISC CPU cores which implement the MIPS Instruction Set
Architecture.  These processors appear in all sorts of hardware ranging from
small embedded devices to large servers.
</p>

<p>
It also happens to be an acronym; <b>M</b>illions of <b>I</b>nstructions
<b>P</b>er <b>S</b>econd.
</p>

</body>
</section>
<section id="hardware">
<title>What sort of hardware uses MIPS processors?</title>
<body>

<p>
Good question.  In short... Heaps.  MIPS Processors see use inside all sorts
of machines, ranging from small PDAs (such as the early Windows CE powered Casio
PDAs), X Terminals (e.g. Tektronix TekXPress XP330 series), through to
workstations such as the Silicon Graphics Indy and O2 and even high end servers
such as the Silicon Graphics Origin 2000.
</p>

<p>
Here is a list of some of the more famous MIPS-based systems in use.  A more
comprehensive list can be found on the
<uri link="http://www.linux-mips.org/wiki/index.php/Systems">Linux/MIPS website</uri>
</p>

<table>
<tr>
  <th>Sony Game Consoles</th>
  <ti>
    <uri link="http://www.linux-mips.org/wiki/index.php/PS1">
    PlayStation</uri><br />
    <uri link="http://www.linux-mips.org/wiki/index.php/PS2">
    PlayStation 2</uri><br />
    <uri link="http://www.linux-mips.org/wiki/index.php/PSP">
    PlayStation Pocket</uri>
  </ti>
</tr>
<tr>
  <th>Nintendo Game Consoles</th>
  <ti>
    <uri link="http://www.linux-mips.org/wiki/index.php/Nintendo_64">
      Nintendo 64
    </uri>
  </ti>
</tr>
<tr>
  <th>Silicon Graphics Machines</th>
  <ti>
    <uri link="http://www.linux-mips.org/wiki/index.php/IP12">
    Iris Indigo</uri><br />
    <uri link="http://www.linux-mips.org/wiki/index.php/IP19">
    Challenge</uri><br />
    <uri link="http://www.linux-mips.org/wiki/index.php/IP19">
    Onyx</uri><br />
    <uri link="http://www.linux-mips.org/wiki/index.php/IP22">
    Indy</uri><br />
    <uri link="http://www.linux-mips.org/wiki/index.php/IP22">
    Indigo 2</uri><br />
    <uri link="http://www.linux-mips.org/wiki/index.php/IP22">
    Challenge S</uri><br />
    <uri link="http://www.linux-mips.org/wiki/index.php/IP27">
    Origin 200</uri><br />
    <uri link="http://www.linux-mips.org/wiki/index.php/IP27">
    Origin 2000</uri><br />
    <uri link="http://www.linux-mips.org/wiki/index.php/IP27">
    Onyx 2</uri><br />
    <uri link="http://www.linux-mips.org/wiki/index.php/IP30">
    Octane</uri><br />
    <uri link="http://www.linux-mips.org/wiki/index.php/IP30">
    Octane 2</uri><br />
    <uri link="http://www.linux-mips.org/wiki/index.php/IP32">
    O2</uri><br />
    <uri link="http://www.linux-mips.org/wiki/index.php/IP34">
    Fuel</uri><br />
    <uri link="http://www.linux-mips.org/wiki/index.php/IP35">
    Origin 3000</uri><br />
    <uri link="http://www.linux-mips.org/wiki/index.php/IP45">
    Origin 300</uri><br />
    <uri link="http://www.linux-mips.org/wiki/index.php/IP53">
    Origin 350</uri><br />
    <uri link="http://www.linux-mips.org/wiki/index.php/IP53">
    Tezro</uri>
  </ti>
</tr>
<tr>
  <th>DECStations</th>
  <ti>
    <uri link="http://www.linux-mips.org/wiki/index.php/Deskstation_rPC44">
    rPC44</uri><br />
    <uri link="http://www.linux-mips.org/wiki/index.php/Deskstation_Tyne">
    Tyne</uri>
  </ti>
</tr>
<tr>
  <th>Cobalt Microservers</th>
  <ti>
    <uri link="http://www.linux-mips.org/wiki/index.php/Cobalt">
    Qube 2700</uri><br />
    <uri link="http://www.linux-mips.org/wiki/index.php/Cobalt">
    Qube 2800</uri><br />
    <uri link="http://www.linux-mips.org/wiki/index.php/Cobalt">
    RaQ</uri><br />
    <uri link="http://www.linux-mips.org/wiki/index.php/Cobalt">
    RaQ 2</uri>
  </ti>
</tr>
<tr>
  <th>
    Broadcom-based 802.11g<br />
    Broadband Internet Routers
  </th>
  <ti>
    <uri link="http://openwrt.org/">Linksys WRT54G</uri>
  </ti>
</tr>
</table>

<p>
... and that's only just scratching the surface.  These machines are wide and
varied.  Many of them do not currently run Linux.  Of those that do, we only
support a handful, although you're welcome to port Gentoo/MIPS to any MIPS
machine if you so wish.  Some of these machines are also the focus of the <uri
link="http://embedded.gentoo.org">Embedded Gentoo Project</uri> such as the
Linksys WRT54G.
</p>

</body>
</section>
<section id="supported">
<title>Is my machine supported?</title>
<body>

<p>
This question is difficult to answer.  Your machine could fall into one of three
different baskets:
</p>

<ul>
  <li>Your machine is supported by Gentoo/MIPS</li>
  <li>Your machine is supported by Linux/MIPS, but not by Gentoo/MIPS (yet)</li>
  <li>Your machine is not supported by Linux/MIPS</li>
</ul>

<p>
For the first one an easy way to find out is to have a look at the
<uri link="/doc/en/mips-requirements.xml">Gentoo/MIPS
requirements page</uri>.  This will tell you if the system you've got can
theoretically run Gentoo/MIPS.  Stuart has also written a
<uri link="http://stuartl.longlandclan.hopto.org/gentoo/mips/">hardware support
database</uri> in which users may contribute their experiences.  This can help
measure how well Gentoo/MIPS runs on a particular machine.
</p>

<p>
If you don't find your machine listed there, you may wish to have a look on the
<uri link="http://www.linux-mips.org/wiki/index.php/Systems">Linux/MIPS
website</uri> to find it there.  Installation won't be straightforward however,
as the actual process of producing a kernel and suitable boot media for your
hardware will have to be done largely by yourself.  Naturally though, we'll try
to help where we can.
</p>

</body>
</section>
<section id="support_X">
<title>Why don't you support machine X</title>
<body>

<p>
If you've looked at the Gentoo/MIPS Hardware Requirements page, you've probably
noticed there are a LOT of machines we don't support.  In the case of SGI
hardware, very little is known about some of them, not enough
to successfully port Linux to them.
</p>

<p>
If you managed to get Linux working on a box currently listed as
<e>unsupported</e> however, feel free to tell us.  We'd be interested to know.
</p>

</body>
</section>
</chapter>

<chapter>
<title>MIPS Software FAQs</title>
<section id="stage">
<title>Which stage tarball do I use?</title>
<body>

<p>
This will depend on the CPU type running in your system.  The stage filename is
named as follows:
</p>

<pre caption="Stage Tarball Naming Scheme">
  stage3-mipsel4-2005.0.tar.bz2
  \____/ \_____/ \____/
     |      |       |
     |      |       `--- Gentoo Release (e.g. 1.4, 2004.3, 2005.0)
     |      |
     |      `----------- Endianness and ISA Level
     |                     mips   ==> Big Endian
     |                     mipsel ==> Little Endian
     |
     |                     R3xxx and earlier: ISA Level 1
     |                     R4xxx series:      ISA Level 3
     |                     R5000 and above:   ISA Level 4
     |
     `------------------ Stage Tarball type: 1, 2 or 3.
</pre>

<p>
So for those of you who are running R4000-class CPUs, try a <c>mips3</c> or
<c>mipsel3</c> stage tarball.
</p>

<p>
For those running R5000-class or later CPUs, try a <c>mips4</c> or
<c>mipsel4</c> stage tarball.
</p>

<p>
Sometimes the filename will have <c>n32</c> or <c>n64</c> in the filename as
well.  These refer to 64-bit userland images.  At the moment, support for 64-bit
userlands is still quite flaky and a lot of packages are broken.  I'd suggest
leaving these alone unless you're particularly brave and don't mind a rather
bumpy ride.
</p>

</body>
</section>
<section id="chroot">
<title>I got told "Illegal Instruction" or "Cannot Execute Binary
File" when chrooting.  What did I do wrong?</title>
<body>

<p>
This is generally caused by using the wrong stage tarball.  If you try to run a
<c>mips4</c> userland on a <c>mips3</c> CPU, you'll get an <e>illegal
instruction</e> error message.  Likewise, if you have a Big Endian CPU and you
try running Little Endian code on it, you'll get told <e>cannot execute binary
file</e>.
</p>

<p>
The fix is simple... clean out your partition, then unpack the correct tarball.
Which one is that I hear you ask?  Have a read of the previous FAQ entry.
</p>

</body>
</section>
</chapter>

<chapter>
<title>Silicon Graphics Specific FAQs</title>
<section id="netboot">
<title>Why doesn't my SGI machine netboot?</title>
<body>

<p>
This could be for any number of reasons, ranging from cabling issues, through to
issues on the server.  The best way to troubleshoot any problem is a 
step-by-step approach...
</p>

<ol>
  <li>
    <b>Have you got the SGI machine (and server) plugged into the right
    network ports?</b><br />
    Make sure the network is cabled correctly.  Also note that some machines
    have special needs. For instance the Challenge S cannot obtain network 
    connectivity under Linux via its UTP port, you need to use the AUI port 
    via a transceiver.
  </li>
  <li>
    <b>Are there any firewalls in use?</b><br />
    Make sure your firewall is not blocking DHCP/BOOTP requests (ports 67 and
    68 on UDP) or TFTP (port 69 on UDP).<br />
    <c>iptables -I INPUT 1 -p udp --dport 67:69 -j ACCEPT</c> should get things
    rolling.
  </li>
  <li>
    <b>Have you disabled packet MTU discovery and set the port range?</b><br />
    SGI boxes require <path>/proc/sys/net/ipv4/ip_no_pmtu_disc</path> = 1 and
    <path>/proc/sys/net/ipv4/ip_local_port_range</path> = "2048 32767".  See <uri
    link="/doc/en/handbook/handbook-mips.xml?part=1&amp;chap=2#doc_chap4">the
    Gentoo/MIPS handbook</uri>.
  </li>
  <li>
    <b>Is the server giving out the correct details via BOOTP?</b><br />
    Double check your <path>/etc/dhcp/dhcpd.conf</path>.  ISC's dhcpd won't dish
    out addressing information via BOOTP unless the machine has been statically
    defined with a fixed address.
  </li>
  <li>
    <b>Which TFTP server are you using?</b><br />
    <c>tftp-hpa</c> and <c>netkit-tftp</c> are known to work.  <c>atftp</c> is a
    lot more advanced, this can cause problems.  If in doubt, try installing
    <c>tftp-hpa</c> and see if the problem clears up.
  </li>
  <li>
    <b>Are the daemons running?</b><br />
    <c>dhcpd</c> should show up when typing <c>ps ax</c>.  As for TFTP, it'll
    largely depend on whether its a standalone server, or if its running from
    <c>(x)inetd</c>.  <c>tftp-hpa</c> runs as a process called <c>in.tftpd</c>.
    Look for that in the <c>ps ax</c> output and start any services not
    currently running.
  </li>
  <li>
    <b>Does the kernel exist in <path>/tftpboot</path>?</b><br />
    Make sure you place the kernel image to be booted in this directory and
    that it is world-readable.  (<c>chmod 644 /tftpboot/foo</c>)  Also, in your
    <path>/etc/dhcp/dhcpd.conf</path>, note that the path to the kernel will be
    relative to the <path>/tftpboot</path> directory if you're using
    <c>tftp-hpa</c>.
  </li>
  <li>
    <b>Have you unset the <c>netaddr</c> and <c>dlserver</c> PROM
    variables?</b><br />
    Try running <c>unsetenv netaddr</c> and <c>unsetenv dlserver</c>.
  </li>
</ol>

</body>
</section>
<section id="serial">
<title>The machine downloads the kernel, but then "hangs" (using a monitor and
keyboard -- not serial console)</title>
<body>

<p>
Unfortunately, not all graphics frame buffers are supported under Linux yet.
This doesn't mean you can't use the machine... it just means you'll need a
null-modem serial cable to interact with it.  It is quite possible that the
machine is in fact running, however, the system is outputting to the serial
console rather than the screen.
</p>

</body>
</section>
</chapter>

<chapter>
<title>Cobalt Specific FAQs</title>
<section id="cobaltboot">
<title>Why won't my Cobalt machine boot?</title>
<body>

<p>
This could be for a number of reasons.  Our easiest bet however is to run
through a checklist and make sure everything is correct.
</p>

<ol>
  <li>
    <b>Have you got the Cobalt machine (and server) plugged into the right
    network ports?</b><br />
    Make sure the network is cabled correctly.  Please note, the Cobalt firmware
    will only boot via the Primary network port.
  </li>
  <li>
    <b>Are there any firewalls in use?</b><br />
    Make sure your firewall is not blocking DHCP/BOOTP requests (ports 67 and
    68 on UDP) or RPC/Portmap (port 111 on UDP and TCP).<br />
    <c>iptables -I INPUT 1 -p udp --dport 67:68 -j ACCEPT</c><br />
    <c>iptables -I INPUT 1 -p udp --dport 111 -j ACCEPT</c><br />
    <c>iptables -I INPUT 1 -p tcp --dport 111 -j ACCEPT</c>
    should get things rolling.
  </li>
  <li>
    <b>Is the server giving out the correct details via BOOTP?</b><br />
    Double check your <path>/etc/dhcp/dhcpd.conf</path>.  ISCs dhcpd won't dish
    out addressing information via BOOTP unless the machine has been statically
    defined with a fixed address.
  </li>
  <li>
    <b>Are you exporting <path>/nfsroot</path> in your
    <path>/etc/exports</path>?</b><br />
    Make sure you are exporting that to the Cobalt machine.  It only needs
    read-only access.  Also remember to run <c>exportfs -av</c> after you edit
    the file.
  </li>
  <li>
    <b>Are the daemons running?</b><br />
    <c>dhcpd</c> should show up when typing <c>ps ax</c>.  Likewise with
    <c>portmap</c> and the other RPC daemons.  The following commands should
    look after this for you:<br />
    <c>/etc/init.d/dhcp start</c><br />
    <c>/etc/init.d/nfs start</c>
  </li>
  <li>
    <b>Does the kernel exist in <path>/nfsroot</path>?</b><br />
    Make sure you place the kernel image to be booted in this directory and
    that it is world-readable.  (<c>chmod 644 /nfsroot/foo</c>)
  </li>
</ol>

</body>
</section>
<section id="qube2700">
<title>Why don't you support the Qube 2700?</title>
<body>

<p>
The Qube 2700 was the first of the Cobalt servers.  While they are very nice
machines, unfortunately, they lack a serial port.  In other words, any
interaction with the machine has to be done through a network.  At present, our
netboot images do not support this, although plans are in the works that may
enable support for this machine.
</p>

</body>
</section>

</chapter>
</guide>
