Funtoo Linux Installation on SPARC
Funtoo Linux supports any machine based on a SPARC v9 compliant processor, ranging from the UltraSPARC I to the latest UltraSPARC T2/T2+ and beyond. Older SPARC processors are not supported.
Note that OpenVZ is not supported on processors older than UltraSPARC T1 (and equivalent) processors.
This section assumes you are a bit familiar with SPARC machines and the SPARC architecture in general. Before diving a bit deeper, bear in mind that more than 95% of a Funtoo SPARC System behaves in exactly the same way as what you have on x86 system. Once installed, you should see a near-nothing difference between a Funtoo SPARC machine and a classic Funtoo x86/amd64 machine, same tools, same way to manage common tasks, etc.
 Initial boot
Funtoo does not provide an official media kit or netboot images for the moment. We plan to in the future but not for the moment, so the best would be to use one a CD/DVD-ROM or a SPARC netboot image provided by another project (Debian, Gentoo...). In the case of the second option, you can build your own if you have a bit of patience, see our article "Netboot image creation for SPARC machines".
 RARP/DHCP TFTP
Aka The traditional way :-) TBC
Some OpenBoot revisions (notably 4.25) have problems with RARP/TFTP. Fortunately they support a more modern mechanism known as Wanboot. Wanboot enables a SPARC machine to retrieve a netboot image either via TFTP or via HTTP. To use wanboot, you must set feed the network-boot-arguments variable with the IP address/netmask/gateway of your SPARC machine (replace 'tftp' with 'http' if you use a web server):
Typically it will be something like:
network-boot-arguments = host-ip=192.168.1.235,subnet-mask=255.255.255.0,file=tftp://192.168.1.1/mynetbootsparcimage.img
 Differences in the SPARC world vs the PC world
 Disk partitioning
SPARC machines use a set of data structures which describes the disk geometry and how is it is divided in partitions which is placed at the very first sector of an hard drive. This structure is known as a Sun disklabel and is not to confuse with the assignation of a label to partition with e2label or xfs_admin. Traditionally a disk can contain up to eight partitions referenced through letters from a to h (Linux will see those partitions in the same way as on PC machines, i.e. with a number) and some partitions deserve special purposes:
- 1st : Contains the boot files and designate the root partition (the Linux kernel is able to use another partition for the root of the VFS, so this partitions only contain the bootfiles, i.e. what will be visible under /boot).
- This partition MUST start at the start of the disk (block 0) if you intend to boot on it.
- It is highly recommended to keep this partition to a size below 1G to circumvent some OpenBoot limits.
- Altough ext2/ufs tools are smart enough to not overwrite the first sector of a partition, thus leaving alone the Sun disklabel untouched, LVM won't be so smart and as a consequence will overwrite the Sun disklabel if a LVM Partition is created starting at block 0. If you create a LVM partition, do not make it start at block 0.
- 2nd slice : traditionnally tagged as being a swap area
- 3rd : must be tagged as whole disk
- 4th to 8th : at your own usage
 make.conf or make.defaults (unified path)
- On SPARC machines, use mcpu instead of march, the GCC manual page will describe what valid values are. If you use a non generic stage 3 (i.e. anything other than generic_sparcv9), CHOST is already set to the right value for mcpu.
- If you are the lucky owner of a Oracle/fujitsu SPARC T3 server, use niagara2 for the value of mcpu
- Anything else will work exactly like like the PC platform, and don't forget to put the right value for -j in MAKEOPTS
 A few hints
- UltraSPARC III (not functionnal on UltraSPARC IIIi) supports CPUfreq. With the on-demand governor enabled by default, your SPARC CPU will run, when idle, at 37.5 Mhz instead of 750-1.2 Ghz or more.
- Machine and CPU fans are not drivable by the Linux kernel, at least to our knowledge
- When building, use the 64 bits kernel cross-compiler (sys-devel/kgcc64 which is included in the stage 3 archive) you can invoke it in two different ways:
- In the kernel configuration in itself, enter sparc64-unknown-linux-gnu- for Cross-compiler tool prefix in General setup
- From the command line do:
# make .... CROSS_COMPILE=sparc64-unknown-linux-gnu-
- To install the kernel, assuming you are in /usr/src/linux
# cp arch/sparc/boot/image /boot/afilenameofyourchoice && make modules_install
 Network (on-board Ethernet NIC)
- Many Sun Workstations (e.g. Sun Blade 150, Sun Blade 2000) uses a Sun GEM chipset
- Some Sun machines (e.g. Sun Blade 2500 red workstation, Sun Fire T1000 server) uses a Tigeon 3 chipset (tg3).
 Hard Drive Controller
- Sun Blade 150 are fully IDE machines. Their IDE controller is an Ali 5229 which support is enabled by ALi PATA Support in ATA BMDMA support (see Serial ATA and Parallel ATA drivers in Device Drivers). Note that this controller does not seems to support LBA48 addressing.
- Sun Blade 2000 and similar models like the Sun Fire V280R uses a QLogic 2200 Fibre Channel Arbitrary Loop (FC-AL). This not only requires to enable QLogic QLA2XXX Fibre Channel Support in SCSI low-level drivers but also to deploy a firmware (ql2200_fw.bin) in /usr/lib. Such a firmware is installed with the package sys-block/qla-fc-firmware and must be included in the kernel image or put in the initramfs image if you use one.
- Sun Blade 2500 (Red) uses a Symbios Logic 53c1010 SCSI controller, this one is supported with two drivers:
- SYM53C8XX Version 2 SCSI support (see SCSI low-level drivers) but at half-speed (i.e. Ultra160 instead of Ultra320)
- MPT Fusion at full-speed (i.e. Ultra320)
- Sun Blade 2500 (Red) also uses an IDE ALi chipset (enable ALi PATA Support in ATA BMDMA support (see Serial ATA and Parallel ATA drivers in Device Drivers) for its IDE Bus on which the DVD-ROM drive is connected.
- Sun Fire T1000 uses a LSI Logic / Symbios Logic SAS1064 PCI-X Fusion-MPT SAS Controller. The right driver to use is Fusion MPT ScsiHost drivers for SAS (see Fusion MPT device support in Device drivers).
Do not use LSI MPT Fusion SAS 2.0 Device Driver in SCSI low-level drivers, it won't see the machine SAS controller.
 Sound cards
- Sun Blade 2xxx (2000/2500) uses a Sun CS4231 chipset (see Sparc sound devices in Advanced Linux Sound Architecture)
- Sun Blade 100/150 uses an ALi M5451 chipset (see PCI sound devices in Advanced Linux Sound Architecture)
SPARC Machine uses a special boot loader named SILO. Silo is deployed by the package sys-boot/silo and its latest revision (1.4.14_p20100228) now incorporates the necessary to work with sys-libs/e2fsprogs-libs 1.41.14. To install Silo just do:
# silo /etc/silo.conf appears to be valid #
Silo will check if /etc/silo.conf has a valid syntax and then, install the bootstrap code in the hard drive disklabel. Remmber to change the value given for partition to match the partition number where your kernel image is (typically this is 1, as the first partition of the bootable hard drive is dedicated to /boot). For the record here is a typical configuration:
# Example of how can be silo.conf set up partition = 1 root = /dev/sda4 timeout = 30 image = /vmlinux-2.6.38-rc5 label = linux image = /vmlinux-2.6.38-rc6 label = new image = /vmlinux-debian-2.6.32 label = debian initrd=/initramfs-debian-2.6.32
 Day to day operation
 Setup issues
Q: Why after having created an ext2 filesystem with BusyBox mkfs.ext2 applet on /dev/sd?1 my partitions are not seen anymore by fdisk?
A: This tool overwrites the first 1024 bytes (2 sectors) of your partition. If your partition is the very first of the disk and if it starts at block 0. the consequence is that your Sun disklabel is overwritten with zeroes. This behavior as been seen with BB up to revision 1.18.3 (later revision can be affected).
Q: I have killed my Sun disklabel, is my hard drive dead?
A: No, fdisk will create a brand new one for you (use option 's' ).
 OpenBoot issues
Q: Is it possible to update OpenBoot from a Linux machine ?
A: Yes, absolutely. OBP updates are provided in a statically linked and standalone program and contrary to a urban legend you do not need to have Solaris installed. You have several choices :
- Use the flash device (kernel option to activate) from a live Linux system but unfortunately this procedure is not clearly documented on the Internet.
- Put the update image on the machine (boot disk /the-OBP-update-file) and boot on it. It is required that this image resides in the very first harddrive gigabyte and, of course, that the filesystem used is readable by OBP (UFS, EXT2...). How warrant the first condition ? Simply have a partition at the beginning of the hard drive which size is less than 1 GB. Is is also required to put the image directly in the root of the partition and not in a subdirectory.
- Put the update on a TFTP server and "netboot" it from there (boot net /the-OpenPROM-update-file)
Q: When netbooting the machine with a remote TFTP/RARP server, the machine grabs its IP address but then... nothing. It just says "TFTP transfert timeout".
A: This is a known issue with some OBP versions (most notably OBP 4.17.1). Network traffic sniffing shows that the TFTP session is initiated by the SPARC machine but OBP TFTP client seems to not listen anymore on its client, thus generating "Destination port unreachable" ICMP messages on the network. Solution, if your machine support it, try to wanboot it or try to netboot with DHCP requests instead of RARP (type : boot net:dhcp at the OpenBoot prompt).
Q: I do not see my on-board ethernet controller with lspci in Linux and OpenBoot shows that the net device has been disabled. Is there a way to enable it again ?
A: It could happen for some reason (like a buggy driver which leaves the Ethernet controller in a bogus state), OpenBoot consider the onboard Ethernet as defective and disable it. This is very easy to see : pay attention to what is displayed when the machine is powered-on.
.... Copyright 2005 Sun Microsystems, Inc. All rights reserved. OpenBoot 4.17.1, 4096 MB memory installed, Serial ********* ERROR: The following devices are disabled: net
The answer lies in the ASR (Automatic System Recovery), so at the OpenBoot prompt type the following commands notice the dot in the first command, 'ok' is the OpenBoot prompt) :
ok .asr ok asr-clear ok reset-all
Q: Why OpenBoot report an invalid magic number?
A: The partitioning tool you have used to create the Sun disklabel wrote some invalid data in the disklabel and OpenBoot does not recognize your disk as a valid on to boot on. The trouble has been seen with BusyBox fdisk applet.
Q: If I do an update of the POST/OBP, why OpenBoot reports it can't see the firmware file?
A: The information is not very easy to find but OpenBoot seems to be able to access to the first gigabyte of the harddrive (this is the reason why you must size /dev/sda1 below 1G), your file is beyond this limit.
Q: Altough my TFTP server setup seems correct, I have a bunch of xinetd[xxxx]: START: tftp pid=x from=x.x.x.y immediately followed by xinetd[xxxx]: FAIL: tftp address from x.z.x.x and OpenBoot reports Timed out waiting for TFTP reply
A: /etc/xinetd.conf restricts services to localhost/127.0.0.1. That restriction comes from the line only_from = localhost in /etc/xinetd.conf which is not commented by default when installing sys-apps/xinetd. Just adjust (or comment) that line and ask xinetd to reload its settings via sending it a SIGHUP.
Q: Is true that OpenBoot is written in Forth?
A: Yes, absolutely! OpenBoot lives on a Forth virtual machine :-) For your information, Sun released OpenBoot under the BSD licence and you can get its source code at Source Forge
 Various questions with regards to Funtoo SPARC
Q: Is Funtoo SPARC official ?
A: Yes, Funtoo SPARC has an official existence in the Funtoo project :-)
Q: How often a year do you update SPARC stages ?
A: It depends, Funtoo SPARC has limited available time and resources but we try to publish stage archive at least twice a month.
Q: Does the stages include multilib support?
A: Actually no. However some packages like grub2 seems to not be happy without it.
Q: Do you use the same package tree than x86/amd64 ?
A: Yes absolutely, Funtoo SPARC stages are build on the exact same portage tree as the other architectures with absolutely no modifications.
 Quality Assurance (QA)
Q: What is your consideration for a QA process ?
A: Quality Assurance is very important for Funtoo SPARC and Funtoo in general because it engages what is at the core of many open source projects, either done by a commercial entity or by the community itself : credibility. We do our best to serve this goal but we rely for the moment on Gentoo, so quality reflect (partly) what they do on their side. In the case of a major issue would happen on the Gentoo side, we do our best to catch the issue and "shut it down" before catastrophic situations appear. Funtoo is like many thing in so imperfect world : imperfect. Don't expect Funtoo to be 100% troubles free, troubles exists but are rare. The same is true for other Linux projects as well.
Q: Is some QA (Quality Assurance) being done on the stages ?
A: We do QA but keep in mind that Funtoo relies on thousands of packages (more than 13,000 ebuilds as of January 2011). It is not possible to test everything in every configuration but we do QA on regular basis. Of course you are are a key point in the QA process. If something goes wrong, please report it in the forums.
Q: What kind of control do you perform ?
A: The very first control is to check if all stages build successfully and we do Funtoo installations from the scratch on regular basis to see if major issues appears. We emerge major packages on a regular basis to see if they build and run correctly.