From LinuxMIPS
Revision as of 18:11, 17 January 2006 by Skylark (talk | contribs) (path convention for ARCLoad)
Jump to navigationJump to search


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

Currently ARCLoad does not support any filesystems by itself. It can load the kernels (and also its configuration file) from any place the PROM can access. Therefore, kernels are not loadable from ext2 partitions; they are loadable from xfs/efs partitions on some machines (notably IP27); they 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.

The current proposition for supporting filesystems 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. It is not useful. It is just a side effect. :)

A file path will be defined as:

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

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


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 '' and loaded from the place pointed to by the 'SystemPartition' 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 'SystemPartition' 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 Skylark's site. 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.


As mentioned above, kernels are loaded from the location specified by the SystemPartition environment variable, and options are selected using the OSLoadFilename environment variable.

Suppose you have an 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)