2010-06-02

Microway Sreamer, NetBSD Alpha, Xorg

I am playing a little bit with NetBSD alpha current (201005290000Z sets) on my Microway Sreamer and it has some interesting points you probably won't have with non-current (or maybe non alpha port) builds. Firstly, it is difficult to use binary packages from 2009Q3 branch. Packages will install without problems, however, I had problems to run them afterwards. Some applications won't run with missing library file errors (*.so._ files). In most cases I resolved that with symlinks to the newer versions of that libraries which existed on system (for example it can be missing library.so.5 but you can find library.so.7. I make ln -s library.so.7 library.so.5). Probably it is not very good solution but it works. As I wanted to avoid such workaround I downloaded current pkgsrc sources. Yes, 500 MHz DEC Alpha with 256 MB RAM is not very fast but it is not painfully slow as I though initially. Maybe I'll try to make cross-build environment on my AMD64 computer in the future to speed up this process (if that's possible). I recompiled kernel to make in even slimmer and to add isapnp* support as it is not enabled in kernel by default.

Xorg compilation notes 

I didn't install X11 sets as I planned to build X.org myself. NetBSD alpha still installs XFree86 by default. However, X11FLAVOUR=Xorg option appeared in NetBSD current (maybe it was earlier too). There are some steps which you need to make before compiling, otherwise you'll end up with errors (particularly with X11_TYPE = native and modular loop on pkgtools/x11-links dependency). My first mistake was that I didn't installed X11 base set (you shouldn't install all X11, but X11 base is required as pkgsrc uses libraries from /usr/X11R6 during compilation). If you made such mistake too, you just need to boot from install cd once more and choose "Re-install sets or install additional sets". Later you need to pick custom option and select only X11 base and clients option. Others must be deselected if you don't them to be reinstalled. You'll find on the web that you need to set up X11_TYPE=modular in /etc/mk.conf before compiling.  However, that is not enough. You also need to set MKX11=yes and X11FLAVOUR=Xorg in /etc/mk.conf too (as you compiling it from source). Only then you can expect a successful build. Without these two options you will stop at pkgtools/x11-links this error:

ERROR: This package has set PKG_FAIL_REASON:
ERROR: Do not include x11.buildlink3.mk for X11_TYPE
!= "native"

If you'll set up X11_TYPE=native then you'll get an error that you need to set up it as modular. I am building it now so I'll update this part later.

Update (2010-06-02): Build was unsuccessful. It stopped at libpciaccess which is not available to alpha port as error stated.

Update 2 (2010-06-03): I managed to fix or bypass various compiling errors, however, still stopped at linking. I give up for time being. I don't have a way to build xorg-server from source right now.

Update 3 (2010-06-26): I returned to compiling today and it turned out that I had needed only one small change in one Makefile (add -lalpha to XORG_SYS_LIBS). Xorg server compiled successfully. I made a mistake because I added make install clean and work folder was deleted but if you'll try to do this you can find most of tips in this two links:
http://old.nabble.com/X.org-1.3.0-server-on-NetBSD-alpha-td13057190.html
http://lists.freebsd.org/pipermail/freebsd-x11/2007-May/004317.html

There are some small changes from what is written in those links (there are some changes which files you need to change and where they are mostly, however changes are almost the same) but you always can make changes after you got an error. You don't need to recompile everything after that. Of course, you should read my tips earlier and follow "how to install modular xorg" document. What is more, you can add alpha platform to libpciaccess to bypass an error that it is not available in alpha port (look at Makefile and changes that added SPARC support). It compiles successfully too after that. Now I am compiling other xorg components. If everything will go ok I'll update if I can boot into X.

Update 3 (2010-07-01): The last update on this matter. It appeared that NetBSD alpha kernel had security level 1 by default(?) or after I recompiled it. There is no possibility to run X11 on this security level (ok, there are some ways but they aren't available or more complicated on Alpha platform). This was the reason I was always getting a memory access errors. So I recompiled kernel once again with less security level. After that X.org seemed to be started correctly however in the end I still didn't get the graphical environment working. AlphaPC always restarted after startx command. Error log didn't show anything as computer was unable to write it before crash correctly. I tried to start it even on XP1000, however NetBSD froze there after startx on any driver and graphic card (XP1000 has much better compatibility with current graphic cards). Error log didn't show any errors and it seemed by it that everything had started correctly. So I guess that it might be even more configuration problems (not Xorg but OS itself). However it might be that some X.org modules doesn't load/work correctly on Alpha too or just because I use development build. So I am making some rest from my AlphaPC for some time once again. But it was fun to solve such a bunch of problems. It will be much more easier in the future.

Srm-console and hardware support

Srm console on AlphaPC164 has lot of limitations with current hardware. It doesn't support most of IDE, SCSI controllers. It doesn't support any USB, SATA controllers. So you can boot operating system only from integrated primary IDE controller (secondary is not recognized too) or some SCSI controllers (look at NetBSD/alpha notes) and floppy controller (however, I broke one pin in it :( so I don't have this option now too).  As I don't have any compatible SCSI controller I use IDE controller. What is more you can have problems with some CD/DVD-ROMs. They can be recognized but if you'll try to boot from them you'll get lot of read errors. My current old hard drive works only PIO 4 mode.  Still you can add all expansion cards into PCI and ISA slots because they will be supported in operating systems. I mount /usr folder on other hard drive which is attached to SCSI controller on 64-bit PCI slot. I can use USB (though only two of four ports works on NetBSD on delock usb card with vt6214L USB controller. Debian doesn't have this problem). I even attached ISA sound card (crystal cx4235). It is not supported by NetBSD again (it works on Debian though). NIC is VIA VT6105 (D-Link DFE-520 if not mistaken). It works ok on both OSes. VT6421A SATA controller is supported on NetBSD and Debian too. As I mentioned earlier, graphics support is very limited on srm console. You will see blank screen with most graphics cards. Some cards will hang the system, others won't  (you can see progress through serial console) but result will be the same. Some cards will even show some output on monitor but it won't be recognizable (just some hieroglyphs). I use S3 Virge/DX currently. Unfortunately I wasn't able to boot into X until now (nor in Debian, nor in NetBSD. An old Ubuntu on i386 proved that this card can boot into X with s3virge driver and 800x600 resolution so I'll try a Xorg on NetBSD later if everything will install correctly).