The Linux/MIPS HOWTO
Here you'll find answers to specific questions related to Linux/MIPS.
Please refer to the more general
Linux/MIPS FAQ
before reading this.
First make sure that your system really is powered by a Mips CPU.
Then check if your system is ARC compliant. ARC means "Advanced
Risc Computing" and is a standard for computer systems able to
run Windows NT.
In short, if you have Windows NT already running, your computer
probably conforms to the ARC standard. Chances to run Linux/MIPS on such
a system are quite good and you should continue with the section
How do I make a boot disk for my ARC compliant Mips box .
If you cannot run Windows NT on your computer, please refer to the section
What's about old Mips boxes with R3000 CPUs .
To top
An important step in checking Linux/MIPS on your computer is to
run
MILO,
the Linux/MIPS bootstrap loader. MILO is the link between the ARC BIOS
(a.k.a. firmware) and the Linux/MIPS kernel.
The ARC BIOS is usually able to read files from FAT (MSDOS) and ISO9660
(CD-ROM) file systems, so the easiest way to check MILO is to run it
from a MSDOS floppy.
Download the latest
MILO
distribution and unpack it using gzip and tar. Then get a DOS formatted
floppy and copy the files "milo" and "vmlinux" onto it. You may also
issue the command 'make disk'
to copy the files.
Users without access to a DOS box can also download an image of an
empty 1.44M floppy available as
floppy.gz.
Just do 'gzip -cd floppy.gz | dd of=/dev/fd0'
(or whatever
the floppy device is called on your box) to create a usable boot disk.
Please note that some systems, such as the Deskstation Tyne, refuse to
read from floppies formatted with Unix mtools.
Once you've created the floppy disk and put milo and vmlinux onto it, you
need to boot from this disk. Bring your NT box down to the BIOS prompt,
and have your BIOS run that program (or setup your bios to boot it).
Usually, you need to select the 'Run a program'
item of
the BIOS menu, and then enter `a:milo'
to start the loader.
You can also put Milo etc. onto the FAT partition that is used to boot NT,
if you desire.
After startup, MILO will try to figure out on what kind of system it
is running on. Besides many other information, such as the CPU type,
cache sizes etc., MILO will print a string like
"ARC system identified as: [Acer PICA-61]"
or something similar.
In case your system is not known to MILO, "not identified"
will be printed. In this case, please refer to the section
How to add a new system to MILO.
In case your system was sucessfully identified we're already working
on a port for your system -- congratulations! Please contact us at
linux-mips@fnet.fr to get
information about the state of this specific port of Linux/MIPS.
A final note for Mips Magnum 4000 owners: To run MILO on this machine
you need to reconfigure it to little endian mode. In case you are a
proud owner of a Magnum 4000, please read the
Mips Magnum 4000 HOWTO for further information.
To top
Adding a new system to MILO isn't that hard -- at a first glance.
We need all the information MILO printed to make MILO identifying
your system. If you don't want to do this yourself, contact us at
linux-mips@fnet.fr.
We will include your system in future MILO releases. However, we
cannot promise that Linux/MIPS or even MILO will run just after
adding these information. If you are really interested in having
Linux/MIPS running on your computer, you should consider to join
our development team.
In case you decided to start working on MILO and the Linux/MIPS
kernel, you need to install a cross compilation environment. Please
refer to the section
How to install the cross-development tools,
then continue reading here.
Take a look at the file `identify.c'
. Add your system
by filling in a C structure containing following elements:
bi.machtype
: The ID of your system. You need to
add this ID in the kernel include file bootinfo.h
.
bi.cputype
: Normally filled in automatically,
except when MILO had no knowledge of your specific processor.
bi.memlower
: The start address of the main memory.
Normally KSEG0
which equals to 0x8000000.
bi.memupper
: The end address of the main memory.
A common way to determine the main memory size hasn't been found yet,
so you need to hardcode this value.
bi.scache_size
: The size of a L2 cache, if present.
A common way to determine the L2 cache size hasn't been found yet,
so you need to hardcode this value.
bi.dma_cache_size
: The size of the DMA buffer, if
present. We have found DMA buffers only in Deskstation Tyne systems
yet, so you probably can hardcode this to 0x0. This will disable
DMA buffering.
bi.vram_base
: The start address of your video frame
buffer. This entry is very important since the Linux/MIPS console
driver needs to know where your video adaptor lives. A common way
to find the frame buffer location hasn't been found yet, so you need
to ask the manufacturer for details. You may also try to find it
by guessing. A usual place is the address range between 0xe0000000
and 0xe1000000.
bi.tlb_entries
: The number of TLB entries of the
memory management unit of your CPU. You can safely set this to 48,
which is valid for all R4x00 processor.
After filling in the numbers, you need to recompile MILO. If everything
went fine, MILO should at least know about your system now. Continue
the boot process and try to start the dummy kernel included in the
MILO package. If your guesses regarding the video card were correct,
the dummy kernel should print numerous "hello world"'s and then stop.
If not, well, then you should really get in touch with us.
Send a message to
linux-mips@fnet.fr and
don't hesitate to ask for help!
To top
Precompiled Cross-Dev tools are currently available only for
Linux/i386, SunOs 4.1.3 and Solaris2.3. Binaries are available from
following ftp sites:
Download the appropriate Compiler and Linker binaries plus
the latest kernel sources and the include- and library
patches. If you want to build your crossdevelopment tools yourself or
have a system for which no binaries are available, there is a more
detailed document about how to build crossdevelopment
tools.
Now unpack the compiler and linker archives. The default location
is /usr/mips-linux, so issue the commands
cd /
tar zxvf binutils-2.5.2.tar.gz
tar zxvf gcc-2.6.3.tar.gz
You may also install the packages in other locations, but
then you'll need to link these directories to the standard
locations.
Next, find a location for the Linux/MIPS kernel, include and library
sources. A directory somewhere in your home directory might be a good
choice. Unpack the include tree within the newly created directory
by issuing the commands
cd linux-dir
tar zxvf linux-1.2.0.tar.gz
(or any newer Linux/MIPS kernel)
tar zxvf libc-4.6.27.tar.gz
tar zxvf inc-4.6.27.tar.gz
mv usr/include include-4.6.27
rmdir usr
Finally you need to patch the library. Issue the commands
cd linux-dir
zcat libc-linux-4.6.27.diffs.gz | patch -p
zcat include-4.6.27.diffs.gz | patch -p
It might also be necessary to apply kernel diffs to upgrade
your source tree to the latest version.
Now you're ready to start working on Linux/MIPS.
First try to recompile MILO. If everything went fine, continue
with compiling the kernel. In case you have problems, please
carefully check each step as described above, and if everything
fails, contact us at
linux-mips@fnet.fr.
To top
Currently, there is no support for older R3000-based Mips systems.
However, we plan to support as many as possible of them. One of
the first things to do would be writing bootstrap loaders, as we
already have done for ARC systems.
Another major problem is that some of these older systems run in
native little endian mode (DEC), while others are fixed to big endian
mode (Mips, SGI). Some of them can be change the user-code endianess
on the fly, while other's can't.
We therefor must distuingish between three cases:
- fixed little endian (DECstations): Chances are quite good for
these systems, since the Linux/MIPS kernel already contains some
limited R3000/R2000 support. User code compatibility will also not
be a real problem as long R4000 specific instructions are avoided.
- big endian with "reverse endian" capability (R3000A only):
This is more complicated since all endian dependencies must be
removed from the Linux kernel. User code could be executed in
reverse endian mode.
- Fixed big endian (all others): As above, all kernel endian
dependencies must be removed first. User code must also be compiled
explicitely big-endian.
If you own a Mips RC3xxx, a DEC 3100, 5000 or similar, or even
a Sony or SGI machine, please let us know. We know of many other
owners of old R2000/3000 boxes interested in Linux/MIPS, and we
would appreciate any help.
To top
MIPS Computer Systems, Inc. was so friendly to give us permission to spread
the configuration disk that once was included with every Magnum 4000 system
under the license conditions below.
I should note that reconfiguring the Magnum is a little bit dangerous
procedure. During the reconfiguration process the entire content of the
FLASH EEPROM containing the firmware is replaced. If this process is
interrupted the machine will have an EEPROM with unusable contents. This
means that the EEPROMs will have to be removed and reprogrammed using an
EEPROM programmer. So try don't reload the firmware unnecessarily. I
suggest to be paranoid and do this only when the Magnum is connected to
a UPS. Just in case if power fails ...
LICENSE AGREEMENT
MIPS Computer Systems, Inc. manufactured Magnum 4000 workstations whose CPU is
a MIPS R4000(R) microprocessor, or other microprocessor based on the MIPS
architecture ("MIPS Chips"). MIPS Technologies, Inc. ("MTI") is the successor
in interest to this technology. By using and/or downloading the attached
freeware titled "setup.zip" (hereinafter, "Freeware"), which is a program
that reconfigures the Magnum 4000 workstation to run in little endian mode,
enabling the Magnum 4000 to accept a port of Linux to the MIPS architecture,
you and/or your company ("Licensee") are agreeing to be bound by the following
terms and conditions:
- Licensee is grated an internal, personal, royalty-free,
non-commercial right and license to use the Freeware only with computer systems
which use a MIPS Chip as a CPU, without the right to copy, distribute or
sublicense the Freeware. Licensee further agrees not to dissassemble,
decompile or otherwise reverse or reengineer the Freeware such that it performs
the same functions on machines which do not use a MIPS Chip as a CPU.
- Licensee acknowledges that the Freeware may contain trade secret
information which is proprietary to MTI and agrees to hold any such information
it may discover in confidence, and not to disseminate any such information in
any manner whatsoever.
- MTI MAKES NO WARRANTY, EXPRESS OR IMPLIED, AS TO THE ACCURACY OR
UTILITY OF THE FREEWARE, OR THAT THE USE OF THE FREEWARE WILL NOT INFRINGE ANY
UNITED STATES OR FOREIGN PATENT, COPYRIGHT OR TRADE SECRET. THE FREEWARE IS
MADE AVAILABLE ON AN "AS-IS" BASIS. MTI AND ITS AGENTS, OFFICERS AND EMPLOYEES
SHALL NOT BE LIABLE FOR ANY LOSS, INJURY OR OTHER DAMAGES OF ANY KIND
WHATSOEVER RESULTING FROM LICENSEE'S USE OF THE FREEWARE, AND LICENSEE AGREES
TO DEFEND, INDEMNIFY AND HOLD MTI AND ITS AFFILIATES HARMLESS FROM AND AGAINST
ALL CLAIMS, DEMANDS, SUITS OR ACTIONS INCURRED BY OR IMPOSED ON THE LICENSEE OR
ITS AFFILIATES IN CONNECTION WITH THE FREEWARE.
CLICK HERE TO CONFIRM AGREEMENT AND PROCEED TO DOWNLOAD SITE
To top
Last changed 3-Feb-1996 Ralf Bächle
powered by /usr/bin/vi