This section is basically the equivalent of a FAQ right now. As it grows, a FAQ will become a separate document and only ``general'' things will stay here.
The current kernels only support Sun4c and Sun4m machines (e.g. Sparc 1, 1+, 2, IPC, IPX, SLC, ELC, Sparc Classic, LX, 5, 10, 20, etc.). SMP Sparcs are also working pretty well, too. Sun4 arch machines will probably not be supported, but anyone with a Sun4 and some time will certainly receive net.help from the community should they choose to try it. The Sun-3 machines are not expected to be supported until someone volunteers their time towards that architecture although most of the underlying generic sparc code is there.
The Sun-3 is based on a completely different processor (the Motorola 680x0) and should most likely be done in concert with the 680x0 Linux port people. The thing to know now is that the linux-m68k project is only working on code for machines that use the Motorola MMU. Most Sun 3 machines (except for sun3x arch machines like the 3/80) have a sparc-like MMU. So, a decent hacker should be able to get the m68k core code and combine it with the MMU stuff from the sparc port.
ext2fs
tools!Because of how large the disk label is on the Sun, the ext2 filesystem on the first partition of a scsi disk will overwrite the label. This is lethal and will probably spam your entire scsi drive. (personally after I format a disk for testing and make out the partitions I do a:
dd if=/dev/sd3 of=~davem/diskblah.label bs=1024 count=8192
so I can recover if I fall for this problem). So my advice is:
You have been warned. When we get linux fdisk working we can forget about this, but for now just be careful.
There is a MAKEDEV script at tools/MAKEDEV
on the FTP sites.
While preparing a root filesystem for your system, just place the
above script in dev/MAKEDEV
, make it executable and run it
while dev/
is your current working directory.
I've managed to get it to work under SunOS/Solaris while making nfs
root directories, it gives lots of error messages due to unknown
groups/users and the fact that it can't look at certain /proc
files
under those OS's. I usually just go:
cd /my/nfs/root/directory/dev
MAKEDEV generic
That should do the trick. You may want to trim things down if this is for a floppy (anyone who needs 60 or so ptys on a root floppy is crazy) ;-).
Shared SunOS executables work if you put /usr/lib/ld.so
/etc/ld.so.cache
and /usr/lib/lib*.so.*
onto your
root partition. For the getpwd()
library call to work using
the sun shared libc, a self contained static /bin/pwd
is
necessary on the system. It is recommended to use the native SparcLinux
executable from the sh-utils package:
vger.rutgers.edu:/pub/linux/Sparc/userland/sh-*.SPARC.tar.gz
A good way to see what the kernel is up to is to type:
(The following was donated by Jim Nance.)
Right now, there are two bugs in this process. When I receive an updated version of this without the bugs, I will change it. The two bugs are:
The following instructions apply to building an environment where one can cross compile SparcLinux binaries from an Intel machine running Linux. Currently this method does not include building any libraries, so you can only compile the kernel.
Before you can actually build a cross compiler, you have to first build and install a cross assembler and a cross linker. The source for these programs are in the binutils package. You can obtain the latest binutils via anonymous ftp from prep.ai.mit.edu in the directory /pub/gnu.
To compile, untar the binutils tarfile in a directory, and cd into the top level binutils directory. Now configure, make, and install the binutils packages by typing:
./configure --target=sun4
make
su
make install
Just to make sure everything worked, look in /usr/local/sun4/bin and see if you have some files in there, particularly ar and ld.
Now that these packages are installed, you can build the actual cross compiler. To do this, get the latest gcc source (its  7 Megs!), and untar it into a directory and then cd into the top level gcc directory. You can configure and build the cross compiler by typing:
./configure --target=sun4
make CFLAGS='-O -s' tooldir=/usr/local/sun4
This make will actually fail because there is no way to build libgcc.a. This is not a problem. It has actually build all the things we need by the time it fails. You can now su to root, and install the compiler by typing:
cp gcc-cross /usr/local/bin/gcc-sparc
make CFLAGS='-O -s' tooldir=/usr/local/sun4 install
We now need to make a few symbolic links to make everything run. Assuming that you are compiling gcc-2.7.2, the commands to do this as root are:
cd /usr/lib/gcc-lib/sun4/2.7.2
ln -s /usr/local/sun4/bin/ld
ln -s /usr/local/sun4/bin/ar
Finally, you need to get a copy of libgcc.a and put it in this directory. If you have access to a machine running SunOS, one way to do this is to build gcc on that machine with the commands:
tar xzvf gcc-2.7.2.tar.gz
cd gcc-2.7.2
./configure
make
and then copy the libgcc.a file produced into /usr/lib/gcc-lib/sun4/2.7.2 on your linux machine. If you can not do this, there is a libgcc.a file in the sparc-libc package which may work.
At this point you have a functional cross compiler, but no libraries. This means that you should be able to compile the kernel, but no user programs.