Revision 0.01 – 12.Jul.01This documentation is provided as-is, with no guarantee as to the accuracy of the information within– use at your own risk (but ignore at your own peril!).
You are allowed to redistribute this document in whole or part, though it is requested that the copyright remain intact and all modifications be sent to the author for inclusion in future revisions.
I. Introduction
This document describes the current state of Linux support for the Sun Microsystems CP1400 and CP1500 boardsets. Note that the Netra-t1/105 boardset is identical to CP1500 with the addition of a Lights Out Management (LOM) module; this document should be generally applicable to the Netra-t1/105, but none was available for testing. If you can assist with testing and/or hardware availability, please contact the author.
II. Boardset support
For complete specifications and detailed documentation regarding these platforms reference the Sun Microelectronics website at www.sun.com/microelectronics
All onboard components are supported by the 2.4.x Linux kernel. The 2.2.x kernel supports all onboard components with the exception of the userflash devices.
Table 1 is a summary of onboard device support, with specific information available in following sections: Table 1. Onboard device support in the 2.2 and 2.4 series kernels
Device |
2.2.x |
2.4.x |
Driver |
7-Segment |
2.2.17 |
2.4.0 |
display7seg (d7s) |
Envctrl |
2.2.18 |
2.4.0 |
envctrl |
Watchdog |
2.2.19 |
2.4.1 |
cpwatchdog |
userflash |
N/A |
2.4.6 |
sun_uflash |
III. Device specific information
IIIa. 7-Segment Display
Both boardsets contain a face-mounted 7-segment display with alarm LED. Typically, this will display “b” during runtime and will cycle through the letters h, e, l, p if the system remains at the OBP for more than one minute. This is standard funtionality provided by the OBP.
The character displayed, decimal point and orientation (for upside-down mounted boards) are user-definable via the device interface /dev/d7s. See the device driver header file asm-sparc64/display7seg.h for descriptions.
The user-defined alarm LED can be toggled between green (default) and orange via the device driver ioctl interface.
IIIb. Envctrl
The environmental monitoring hardware, also referred to as Advanced Systems Monitoring (ASM) is supported in both the 2.2.x and 2.4.x kernel series. These boardsets provide the following ASM data:
Board |
CPU Temp |
VPP |
Global Address |
CP1400 |
yes |
no |
no |
CP1500 |
yes |
yes |
yes |
Netra T1 |
yes |
yes |
yes |
Device information can be retrieved from /dev/envctrl, using the ioctls defined in asm-sparc64/envctrl.h
At time of writing, information is not exported to the /proc filesystem. As well, there is no userland daemon to monitor ASM for out-of-range conditions. Also note that both boardsets lack onboard hardware required for programmatic power-down; the auxillary i2c bus is recommended as a means to incorporate this functionality.
IIIc. Watchdog Timer
Both boardsets provide triple watchdog timers in hardware. Each of the timers causes a different action upon expiration:
/dev/watchdogs/1 Timer 1: RIC reset - generates an interrupt
/dev/watchdogs/2 Timer 2: XIR reset - resets cpu only
/dev/watchdogs/3 Timer 3: POR reset - resets backplane, cpu
Each of the watchdogs can be set with a timeout value between 0 and 6553.5 seconds in 1/10th second increments. The ioctls defined in asm-sparc/cpwatchdog.h and linux/watchdog.h can be used for configuration and status.
Writing to the device files will reset the respective timer– this is standard behavior amongst Linux watchdog driver implementations.
IIId. Userflash modules
The CP1500 contains two 2MB user-programmable flash devices. An optional module is available for the CP1400. The userflash can be used for booting and/or during runtime, however the memory devices are not addressed contiguously so you cannot combine them into a single, larger block of storage without using LVM, RAID or similar software support.
These devices are supported in kernel 2.4.6 and onward. Previous versions of the 2.4.x series are supported as well, but will require patches to the MTD subsystem– visit http://linux-mtd.infradead.org for the latest information and patches. At the time of writing, the MTD subsystem has not been back-ported to the 2.2.x kernel series; if this is done userflash should be supported.
The current MTD implementation will allow access to userflash via char, block and readonly-block device nodes. You can access flash with the block device driver to mkfs and mount a filesystem or with the char device driver to use flash for general data storage.
The OBP treats userflash no differently than a normal disk for booting the OS. Consequently, a valid disklabel and bootblock is required to boot from userflash (it may be possible to use a bootable-CD image as well). Following is script output that demonstrates how to setup a flash device for booting.
--- BEGIN SCRIPT ---
[root@enjoy /root]# fdisk /dev/mtdblock1
Device contains neither a valid DOS partition table, nor Sun or SGI disklabel
Building a new sun disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Drive type ? auto configure 0 custom (with hardware detected defaults) a Quantum ProDrive 80S b Quantum ProDrive 105S c CDC Wren IV 94171-344 d SUN0104 e SUN0207 f SUN0327 g SUN0340 h SUN0424 i SUN0535 j SUN0669 k SUN1.0G l SUN1.05 m SUN1.3G n SUN2.1G o IOMEGA Jaz Select type (? for auto, 0 for custom): 0 Heads (1-1024): 1 Sectors/track (1-1024): 512 Cylinders (1-65535): 8 Alternate cylinders (0-65535, default 2): 0 Physical cylinders (0-65535, default 8): 8 Rotation speed (rpm) (1-100000, default 5400): Using default value 5400 Interleave factor (1-32, default 1): Using default value 1 Extra sectors per cylinder (0-512, default 0): Using default value 0 Command (m for help): p Disk /dev/mtdblock1 (Sun disk label): 1 heads, 512 sectors, 8 cylinders Units = cylinders of 512 * 512 bytes Device Flag Start End Blocks Id System /dev/mtdblock11 0 5 1280 83 Linux native /dev/mtdblock12 u 5 8 768 82 Linux swap /dev/mtdblock13 0 8 2048 5 Whole disk Command (m for help): d Partition number (1-8): 1 Command (m for help): d Partition number (1-8): 2 Command (m for help): n Partition number (1-8): 1 First cylinder (0-8): 0 Last cylinder or +size or +sizeM or +sizeK (0-8, default 8): +2M Command (m for help): t Partition number (1-8): 83 Value out of range. Partition number (1-8): 1 Hex code (type L to list codes): 83 Command (m for help): p Disk /dev/mtdblock1 (Sun disk label): 1 heads, 512 sectors, 8 cylinders Units = cylinders of 512 * 512 bytes Device Flag Start End Blocks Id System /dev/mtdblock11 0 8 2048 83 Linux native /dev/mtdblock13 0 8 2048 5 Whole disk Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Re-read table failed with error 22: Invalid argument. Reboot your system to ensure the partition table is updated. Syncing disks. [root@enjoy /root]# mke2fs /dev/mtdblock1 mke2fs 1.18, 11-Nov-1999 for EXT2 FS 0.5b, 95/08/09 Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) 256 inodes, 2048 blocks 102 blocks (4.98%) reserved for the super user First data block=1 1 block group 8192 blocks per group, 8192 fragments per group 256 inodes per group Writing inode tables: done Writing superblocks and filesystem accounting information: done [root@enjoy /root]# mount /dev/mtdblock1 /mnt [root@enjoy /root]# cd /mnt [root@enjoy /mnt]# ls lost+found [root@enjoy /mnt]# mkdir etc [root@enjoy /mnt]# mkdir boot [root@enjoy /mnt]# cd etc [root@enjoy etc]# cp /etc/silo.conf . [root@enjoy etc]# cd ../boot [root@enjoy boot]# cp /boot/first.b . [root@enjoy boot]# cp /boot/ultra.b . [root@enjoy boot]# cd ../etc [root@enjoy etc]# cat silo.conf partition=1 timeout=5 root=/dev/sda1 read-only image=/boot/vmlinuz label=linux [root@enjoy etc]# cd ../boot [root@enjoy boot]# cp ~ebrower/244/linux/vmlinux.gz . [root@enjoy boot]# ls second.b ultra.b vmlinux.gz [root@enjoy /mnt]# cd / [root@enjoy /]# silo -r /mnt [root@enjoy /]# umount /mnt — END SCRIPT —
IV. Sample kernel configuration TBD
V. Notes TBD |