Difference between revisions of "ARCLoad"

From LinuxMIPS
Jump to: navigation, search
(Downloading and building)
m (SGI Category)
(One intermediate revision by one user not shown)
Line 1: Line 1:
== General ==
== General ==
ARCLoad was built to load any Linux kernel on any SGI/ARCS machine. Therefore, it currently supports:
ARCLoad was built to load any Linux kernel on any SGI/ARCS machine. It currently supports:
* SGI [[IP22|Indy]]
* [[IP22|IP22]]: SGI Indy, SGI Indigo2, SGI Challenge S
* SGI [[IP27|Origin]]
* [[IP27|IP27]]: SGI Origin200, SGI Origin2000, Onyx2
* SGI [[IP28|Indigo2 R10000]]
* [[IP28|IP28]]: SGI Indigo2 R10000
* SGI [[IP30|Octane]]
* [[IP30|IP30]]: SGI Octane, SGI Octane2
* SGI [[IP32|O2]]
* [[IP32|IP32]]: SGI O2
== Paths and filesystems ==
== Paths and filesystems ==
Line 134: Line 134:

Latest revision as of 10:58, 18 October 2010


ARCLoad was built to load any Linux kernel on any SGI/ARCS machine. It currently supports:

  • IP22: SGI Indy, SGI Indigo2, SGI Challenge S
  • IP27: SGI Origin200, SGI Origin2000, Onyx2
  • IP28: SGI Indigo2 R10000
  • IP30: SGI Octane, SGI Octane2
  • IP32: SGI O2

Paths and filesystems

Filesystem support in ARCLoad is based on GNU GRUB filesystem code. The approach taken is somewhat more general than the common one (disk - filesystem - file), namely there is no difference between a partition and a file. This means that filesystems can be nested (e.g. loading kernels from ISO images). Kernels and configuration files are also loadable from the DVH (Disk Volume Header). ARCLoad can also load kernels from a TFTP server, so a network-based install is possible.

A file path is defined as:

<file path> := <arc path> | <file path> '[' <fs name> ']' <fs path>

where possible values for the filesystem name are: ext2, fat, iso9660, jfs, minix, ufs, xfs (not all have been tested, ext2 is the best bet). There is also an [*arcfs] pseudo-filesystem that maps directly onto the ARC firmware path space, and is automatically used when no filesystem name is supplied.

Therefore, an kernel on the root partition can be accessed by:


It is possible to load a kernel directly from the DVH:


A surprising, but very useful feature is netbooting via TFTP:


ARCLoad is always built into a relocatable binary: ELF64 on 64-bit platforms, ECOFF on 32-bit platforms. ARCLoad has its own ELF32 to ECOFF converter in the source package.

Configuration file

The text configuration file is named 'arc.cf' and loaded from the place pointed to by the OSLoadPartition environment variable. ARCLoad reads the file and executes it in order. The configuration file is structured into options that can be nested. Comments begin with a '#' and are discarded (duh). Options are selected by the OSLoadFilename environment variable.

An option looks like this:

feature1 feature2 {
    # code for any of the features

The code inside the braces will be executed only if any of the features listed are found in the current feature set. Think of the option as an alternate syntax of a conditional statement. Therefore,

feature1 {
     feature2 {
         # code for both features

realizes an AND Boolean operator.

There are several statements allowed both inside the options and outside them. All statements are terminated with a semicolon (';'). They will be executed in-order. The list of valid statements is given below:


Performs hardware autodetection. The current feature set will be replaced with the autodetected one. Detected features include: software architecture (ip22, ip27, ip28, ip30, ip32), SMP-ness (smp, up), console type (serial, video), video resolution for graphics console (video=AAAxBBB) and CPU (r4000, r4600, r4700, r5000, rm5200, rm7000, r10000, r12000).

comment "Something to be displayed...\r\n";

Comments are displayed when the list option is given. They allow writing self-documenting ARCLoad configuration files.

description "Option description";

Descriptions are displayed with the names of respective options when the list option is given.

image "filename";
image system "/filename";
image absolute "filename";

Sets the kernel image to be loaded. If "filename" is empty (""), the option is deemed to be unsupported. The system option directs ARCLoad to prepend the contents of OSLoadPartition to the filename, while the absolute option exists only for completeness as it is the same as default.

append "arg1" "arg2";

Appends arguments to the kernel command line.

options "arg1" "arg2";

Replaces the kernel command line with the given arguments.

If any kernel image is assigned during the configuration file parsing, ARCLoad will attempt to load the image. Otherwise, it will signal an error and return to the interactive PROM command line.

Downloading and building

ARCLoad can be found at Linux-MIPS. Building it requires only a single setting in the Makefile: the MODE. If it is set to M64, a 64-bit ARCLoad binary will be built (for ip27, ip28 and ip30). If it is set to M32, a 32-bit ARCLoad binary will be built (for ip22 and ip32). It is possible to place those binaries under the names of 'sash64' and 'sashARCS', respectively; in this case, it will be possible to use the Install New Software option in ARCS PROM to run the appropriate binary on any SGI machine.

There is a patch for gcc < 4.2 (see also GCC PR 25871), that causes ARCLoad to skip the warning message on startup on M64 machines. It is related to a particularly obscure bug in GCC that affected nested function calls by function variable on 64-bit MIPS systems which don't use compatibility segments. This bug has been fixed in gcc >= 4.2.


As mentioned above, kernels are loaded from the location specified by the OSLoadPartition environment variable (if image system is used), and options are selected using the OSLoadFilename environment variable. The loaders mentioned above ('sash64' or 'sashARCS') needs to also be set in the OSLoader environment variable, this should be default, however if it could have changed.

Suppose you have an arc.cf like the following:

 append  "root=/dev/sda3";
 append  "ro";
 append  "console=ttyS0,9600";
 ip28 {
   working {
     description  "Known Working Kernel";
     image system "/working";
   new {
     description  "Freshly Built Kernel";
     image system "/new";
   debug {
     description  "Debug Shell";
     append "init=/bin/bash";

To boot the "working" option, this would be done in the PROM like so:

 setenv OSLoadFilename ip28(working)

Or for the "new" option

 setenv OSLoadFilename ip28(new)

Multiple options may be selected... e.g.

 setenv OSLoadFilename ip28(new,debug)

See also

  • Load64 ARCLoad's now obsolete ancestor.