This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
netbsd_sun_pci [2013/06/10 21:14] – kdev | netbsd_sun_pci [2015/03/11 11:22] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== NetBSD on SunPCi-II HOWTO ===== | ||
+ | //Emmanuel Kasper// | ||
+ | //June 4, 2011// | ||
+ | |||
+ | {{http:// | ||
+ | |||
+ | This Mini-Howto was written in order to help people who want to run NetBSD on their [[http:// | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ====== 1. Copyright ====== | ||
+ | |||
+ | (c) 2007 Emmanuel Kasper ( emmanuel at libera dot cc )\\ | ||
+ | (c) 2001-2003 Richard van den Berg(< | ||
+ | |||
+ | This howto may be reproduced and distributed in whole or in part, in any medium physical or electronic, as long as this copyright notice is retained on all copies.\\ | ||
+ | All translations, | ||
+ | |||
+ | If you have anything to add to this Mini-Howto, please mail the author Emmanuel Kasper (emmanuel at libera removethis dot cc ) with the information. Any new relevant information would be appreciated. | ||
+ | |||
+ | ===== 1.1. Thanks ===== | ||
+ | |||
+ | This howto is heavily based on the [[http:// | ||
+ | |||
+ | ===== 1.2 Screenshot ===== | ||
+ | |||
+ | {{http:// | ||
+ | |||
+ | |||
+ | ====== 2. Preface ====== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== 2.1. General Overview ===== | ||
+ | |||
+ | The SunPCi card was meant to be used with either DOS (Caldera OpenDOS is shipped with it) or an OS from the Microsoft Windows family. However, since it has an Intel ship on it, NetBSD will run on it. Be aware that certain things will not work!\\ | ||
+ | |||
+ | * **Hard drive**: the Sun disks are presented to the PC card through special DOS and windows drivers drivers. Since NetBSD does not have this drivers, it was impossible to make NetBSD use the " | ||
+ | * **Floppy drive**: access to the floppy drive is emulated by the SunPCi software running on Solaris. NetBSD recognizes the internal Floppy Disk Controller (FDC) on the SunPCi card, but no connector on the board.\\ | ||
+ | * **CDROM drive**: access to the cdrom drive is emulated. In fact, Solaris gives access to the cdrom by creating a block-type special file in "/ | ||
+ | * **Graphics**: | ||
+ | |||
+ | Before I scare everyone away from reading further, let me quickly state what does work. | ||
+ | |||
+ | * **Console: **the sunpci proices a kind of vga emulation, drom which you can use DOS or NetBSD. I don't know type of emulation it exactly provides, but as a vt100 console it works very well with NetBSD. //(pc)// | ||
+ | |||
+ | * **Ethernet**: | ||
+ | |||
+ | * **COM1**: or tty00 if you wish. You'll have to connect the optional add-on backplate which gives you access to the serial port through a standard 9 pins male DSUB connector. This backplate is a standard one, so you can get one from an off-the-shell PC. //(com)// | ||
+ | * **Parallel port**: just in case you want to attach a printer or so. The optional Sun add-on backplate comes with a with a parallel connector. This port supports standards upto ECP/EPP. //(lpt)// | ||
+ | |||
+ | * **Sound**: the onboad SiS 7018 Audio chip is also supported by the NetBSD kernel, in case you want to use it //(autri)// | ||
+ | |||
+ | * **USB**: the Universal Serial Bus controller is fully functional. Attach things like camera' | ||
+ | * **Graphics**: | ||
+ | |||
+ | This Howto is based on setting up [[http:// | ||
+ | |||
+ | Sun released afterwards the SunPCi-III (based on a Mobile 1.4-GHz AMD Athlon XP 1600+ processor) with SUNWspci3 software, and GNU/Linux support for Redhat.\\ | ||
+ | You can download the latest version of the SunPCI-II and III software [[http:// | ||
+ | |||
+ | |||
+ | |||
+ | ====== 3. Creating the SunPCi root directory ====== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==== 3.1 NFS and DHCP server ==== | ||
+ | |||
+ | Since we cannot access any local disks, we need to boot over the network. This requires our root ("/" | ||
+ | |||
+ | For the server part, there is a very detailed [[http:// | ||
+ | |||
+ | |||
+ | < | ||
+ | host sunpci { hardware ethernet 00: | ||
+ | next-server bluetooth; option root-path "/ | ||
+ | </ | ||
+ | |||
+ | Note the use of the next-server option, which indicates the dhcp client where to find the NFS server. For the NFS server, I used the Sun Sparc Box with the following configuration in / | ||
+ | |||
+ | < | ||
+ | share -F nfs -o rw=@192.9.200.230/ | ||
+ | share -F nfs -o rw=@192.9.200.230/ | ||
+ | share -F nfs -o rw=@192.9.200.230/ | ||
+ | </ | ||
+ | |||
+ | Contrary to what the NetBSD Diskless howto says, it is possible to use numerical IP adresses in / | ||
+ | |||
+ | ==== 3.2 Kernel settings for the SunPCi-II | ||
+ | |||
+ | | ||
+ | < | ||
+ | sip* at pci? dev ? function ? # SiS 900/DP83815 Ethernet | ||
+ | </ | ||
+ | |||
+ | in the DISKLESS configuration file. You should also add | ||
+ | |||
+ | < | ||
+ | pseudo-device rnd # /dev/random and in-kernel generator | ||
+ | </ | ||
+ | |||
+ | to make ssh and sshd work. To get usb and sound working you need to add | ||
+ | |||
+ | < | ||
+ | audio* at audiobus? | ||
+ | midi* at midibus? | ||
+ | autri* at pci? dev ? function ? # Trident 4DWAVE based AC'97 Audio | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | ohci* at pci? dev ? function ? # Open Host Controller | ||
+ | usb* at ehci? | ||
+ | usb* at ohci? | ||
+ | usb* at uhci? | ||
+ | uhub* at usb? | ||
+ | </ | ||
+ | |||
+ | plus all the usb devices that you want. Remember that if you want to use usb storages devices you also have to add some hard disk device support. | ||
+ | |||
+ | |||
+ | ====== 4. Booting the SunPCi card with an NFS-Root ====== | ||
+ | |||
+ | ===== 4.1. Using " | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | |||
+ | |||
+ | ===== 4.2. First boot ===== | ||
+ | |||
+ | | ||
+ | < | ||
+ | F: | ||
+ | </ | ||
+ | provided you have dosboot and a kernel called netbsd in the same location. | ||
+ | |||
+ | As the boot procedure goes, you should see the kernel trying to ask the dhcp server whereis your nfs server. | ||
+ | |||
+ | < | ||
+ | boot device: < | ||
+ | root on sip0 | ||
+ | nfs_boot: trying DHCP/BOOTP | ||
+ | nfs_boot: DHCP next-server: | ||
+ | nfs_boot: my_domain=cocoontecs.priv | ||
+ | nfs_boot: my_addr=192.9.200.230 | ||
+ | nfs_boot: my_mask=255.255.255.0 | ||
+ | nfs_boot: gateway=192.9.200.1 | ||
+ | root on 192.9.200.138:/ | ||
+ | </ | ||
+ | |||
+ | If you get to there, bingo ! If not, check the look of your DHCP and NFS server ( use dmesg to get nfs logs in Solaris ) \\ | ||
+ | |||
+ | |||
+ | ===== 4.3. Automating the boot process ===== | ||
+ | |||
+ | Eventually you will want to boot NetBSD in a bit more automated way than running a batch file from DOS . A very fast way is to put the line " | ||
+ | |||
+ | < | ||
+ | # / | ||
+ | -i / | ||
+ | -s 512 -l -r 2 -b -d / | ||
+ | </ | ||
+ | |||
+ | |||
+ | This will create a 512MB netbsd.diskimage //sparse// file. This means that the file will only use as much real diskspace as actual data is inside it. \\ There is still a 512MB minimun size restriction, | ||
+ | |||
+ | < | ||
+ | |||
+ | Another option is to use the menu options of Windows 95/98 (and Millennium if you have resurrected the DOS mode for it). Since NetBSD does not see the diskimage, it is not possible to install NetBSD' | ||
+ | |||
+ | |||
+ | ===== 4.4. Booting SunPCi from remote ===== | ||
+ | |||
+ | The SunPCi card can only be booted by the X application named " | ||
+ | |||
+ | |||
+ | |||
+ | ==== 4.4.1. SunVNC connection ==== | ||
+ | |||
+ | The SunPCi drivers 2.3 and above come bundled with a modified version of [[http:// | ||
+ | |||
+ | The Solaris package you need to install to make use of VNC for the SunPCi card is called " | ||
+ | |||
+ | < | ||
+ | [vnc] | ||
+ | CmdLineArgs=-geometry " | ||
+ | DisplayNum=10 | ||
+ | StartupScript=/ | ||
+ | UID=root ;User ID | ||
+ | GID=root ;Group ID | ||
+ | HomeDir=/ | ||
+ | AutoStart=Enabled | ||
+ | </ | ||
+ | |||
+ | Now whenever " | ||
+ | |||
+ | < | ||
+ | $ export DISPLAY=localhost: | ||
+ | $ sunpci -C / | ||
+ | </ | ||
+ | |||
+ | You lose the access to the sunpci console, but if your netbsd system is properly setup, you don't need this console anymore, and you do not need to send a password over the network with a weakened VNC client. | ||
+ | |||
+ | A quick try with a standard VNC gives no hope. Starting the sunpci from a VNC session miserably fails with the message: | ||
+ | < | ||
+ | " | ||
+ | SunPC Assert: pData-> | ||
+ | *** SunPC Exit *** | ||
+ | 2347 Abort - core dumped | ||
+ | </ | ||
+ | |||
+ | Note that the sunpci source code[[http:// | ||
+ | |||
+ | |||
+ | ==== 4.4.2. X over ssh ==== | ||
+ | |||
+ | Tunneling a X connection into SSH is both relatively secure and easy to use. See this excellent [[http:// | ||
+ | < | ||
+ | ssh -X -C -c blowfish | ||
+ | </ | ||
+ | ( -X to enable X forwarding, -C to enable gzip compression, | ||
+ | |||
+ | However on your first connection to the sun box , launching the sunpci might failed with the error: | ||
+ | < | ||
+ | bombadil2: | ||
+ | Opening a SunPCi window... | ||
+ | Warning: Missing charsets in String to FontSet conversion | ||
+ | Warning: Cannot convert string " | ||
+ | bombadil2: | ||
+ | Warning: Cannot convert string " | ||
+ | </ | ||
+ | |||
+ | This message indicates that your local X server does not include the sun specific fonts required to run the sunpci program. To use this fonts from your local X server, you have to uncomment "fs stream tcp wait nobody / | ||
+ | |||
+ | < | ||
+ | < | ||
+ | |||
+ | This works correctly with a debian sarge XFree86 X server, and with a suse X.org. On a NetBSD 3.0 X server, the xset commands fails with the following message :\\ | ||
+ | < | ||
+ | xset: bad font path element (#96), possible causes are: | ||
+ | Directory does not exist or has wrong permissions | ||
+ | Directory missing fonts.dir | ||
+ | Incorrect font server address or syntax | ||
+ | </ | ||
+ | |||
+ | X guru advice welcome ! \\ | ||
+ | |||
+ | After shutting down your NetBSD system (using " | ||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | ====== 5. Where to go now ? ====== | ||
+ | |||
+ | ===== 5.1. Make XFree86 work ===== | ||
+ | |||
+ | A quick Xfree86 -configure left me with the following message : | ||
+ | < | ||
+ | Fatal server error | ||
+ | xf86OpenConsole: | ||
+ | Supported drivers: pccons (with X support), pcvt, wscons | ||
+ | Check your kernel' | ||
+ | </ | ||
+ | I guess it would not be too much to add the missing lines to the DISKLESS kernel. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== 5.2. Port Sunpci drivers on others OS / architecture | ||
+ | |||
+ | Brave linux hacker Chris Lalancette already started to investigate this in a quite interesting [[http:// | ||
+ | [[http:// | ||
+ | [[http:// | ||
+ | [[http:// | ||
+ | |||
+ | \\ That's it! Have fun with your netbsd-on-a-board and remember : | ||
+ | |||
+ | // Three dirs for the X11-build under usr/src, \\ Seven for the GPL in their halls of gnu, \\ Ninety-Nine for the usr-src, doomed to (s)bin. \\ One for the superuser in his root dir \\ in the land of usr where the sources lie. \\ One script to rule them all, one to compile them, \\ One script to bring them all and in slash obj bind them. \\ in the land of usr where the sources lie.// | ||
+ | |||
+ | Hubert Feyrer & Ignatios Souvatzis | ||
+ | ---- | ||