S/390 Vintage: what I did.


When I start trying to ipl a linux on my s/390 I experienced many hangs, mainly caused by a wrong IOCDS configuration, but in those days I was unaware of that. Trying to bypass these problem I tried also the "Peter Schulte-Stracke"'s kernel (from "Vintage" for Linux/390).
Since I began to listen people saying "make sure to define to your linux LPAR only those resources it needs", things went straight.
Then my linux LPAR had only two chpid to 3990/3390, one chpid to 3172, one to tape device(s) shared; when i need a tape (to ipl from it), the corresponding chpid had to be varied offline from os/390 lpar(s); I had also to define a single cpu to linux LPAR, in order to avoid hangs during cpu detection (sure it see the "boot" cpu, at least).
I discovered also I don't need "vintage kernel" to ipl a linux on "my" machine, but I considered useful to collect and share all my notes.
And last: please remember "vintage" is still an experiment.


To test "vintage" I used a cross-compiler, a kernel 2.2.15+Peter's patch+my patch, and hercules to test it in a handy way.
I built my cross-compile platform under my linux/intel, but I suppose it might work good enough also on a MS/Windows platform using cygwin (http://cygwin.com).

Building the cross-compiler .

To build the cross-compiler I followed the instructions given at http://www10.software.ibm.com/developerworks/opensource/linux390/howto.shtml#CrossBuildEnv .

This site also holds all "-s390.diff" files; to speed-up the file retrieval, I jumped directly to http://www-124.ibm.com/developerworks/opensource/linux390/src/ and http://www-124.ibm.com/developerworks/opensource/linux390/alpha_src/.

I found all base packages with http://tuxfinder.com/ and the kernel sources at http://www.kernel.org.

Here I collected the package's list, direct links and some note; I suggest to create a ~/store directory where download all the following:
Base Package
binutils-2.10 binutils-2.10-s390.diff
Patches may be applied in any order.
gcc-2.95.2 gcc-
Patches MUST be applied in the given order.
glibc-2.1.3 glibc- I had to add a '--nfp' parm to "configure" command in order to avoid compile time errors
glibc-crypt-2.1.2 - I haven't found a more recent version
glibc-linuxthreads-2.1.3 glibc-linuxthreads-
linux-2.2.15 linux-2.2.15-s390.diff

After downloading all the pieces in the home directory, there we should find:


... besides all I forgot ...

To simplify the build process, I collected an _untested_ script here.
The script will ask for root password some times...

Modifications to kernel

During the build of cross-compile,the kernel tar-ball has been explosed and the patch "linux-2.2.15-s390.diff" has been applied.
Now it's time to apply the Peter Schulte-Stracke's 0.7 patch (download it from ftp://source.rfc822.org:/pub/mirror/s390-ibm-linux/Peter.Schulte-Stracke/vintage-0.7.tar.gz ) and all the modifications I made to get a bootable kernel.
(I tried also the 0.8 version and I feel it still buggy)

I tested and tested and tested and (at last!) i found a (pls shift+click) .config making kernel which seems to be able to run, at least under hercules.
You can find here a script to patch and build a kernel.
Modules haven't been installed yet; to install them you must "mount -o loop ..." the initrd file gunzipped, and make [...] INSTALL_MOD_PATH=<initrd mount point>; see losetup manpage for some example, or look at here for the usual script...
where what
ftp://source.rfc822.org:/pub/mirror/s390-ibm-linux/Peter.Schulte-Stracke/vintage-0.7.tar.gz Peter Schulte-Stracke patch
modifications I made to get a bootable kernel. My modifications...
.config my working .config
here sample script to build a kernel
here sample script to install modules into initrd.

Test environment.

In order to test the new "vintage" kernel, I installed hercules-2.11 (THE good s/390 emulator) on my linux/intel.
The site http://www.conmicro.cx/hercules/ contains the software and a good documentation explaining how to install and configure hercules. Unfortunately hercules doesn't offer any support for lcs devices (e.g. 3172) but it is good enugh to verify if your kernel is ipl'able and if it has all the ksysm the lcs.o module needs (sorry, no way to emulate different models of s/390).

The files needed to ipl a linux under hercules are (please shift+click on links to download the corresponding file):
where what
vintage.cnf my Hercules config file
vintage.image.0525 my tape boot image
vintage.parmline my parmline (kernel boot parms); take care of dasd address...
vintage.initrd initial root filesystem (taken from marist)
vintage.tdf my tape layout definition

Here there are some notes about vintage, hercules and my file's tree.

Now you can run hercules and try to ipl a "vintage" kernel.
Don't get depressed if, under hercules, it doesn't work at first shot; perhaps it will run at second attempt or later...
Of course, you can store together the image+(customized)parmline+initrd files on a tape and ipl vintage on a true S/390.

Good luck.

Please note: this is a draft document; all the scripts are to be tested; there are no warranty, blah blah blah...
Please excuse me for my poor english; all corrections are welcome.

If you like, contact me

Last update: Thu Apr 25 00:58:12 CEST 2002