The standard distribution of Linux for S/390 comes with a compiler that emits code that can only run on newer S/390 equipment, using in paarticular the 13 instructions comprising the so called Halfword Immediate and Relative Branch Feature. Machines so equipped are generally referred to as G2 or later.
There are basically two ways open if one wants to run Linux on pre-G2 equipment, viz. simulating the missing instructions by an extension to the Program Interrupt Handler, on the one hand, and modifying the code so as to avoid its use, on the other.
Of these ways, the first has priority, as it would be impractical to restrict oneself to running only a tiny subset of all programs, as long as the majority of binaries around are compiled for the newer machines (s390-g2). It should be added, that modifying the binary is particularly difficult in case of programs that are distributed as object code only, as it is the case with the OSA driver from IBM.
The resulting system is, however, so slow as to be unusable. So it is necessary to reduce the number of instructions that must be simulated. The following possibilities come to mind:
For the moment, the option of changing the output from the compiler is realized. For that purpose, a Perl-script (nqbtr.pl) is provided.
No standard kernel can execute on a pre-G2 machine, so you need a special kernel to begin. I make special kernels available for download. In addition you need a minimum of programs outside of the kernel, that are loaded as a Ramdisk, and are later complemented by a prepared filesystem, that you then load onto the disk that is you choose for this purpose. You can download these from the Marist site. There you can find also useful though dated documentation. Follow the steps detailed there unless specified otherwise in the following.
Download a kernel, and its associated mapfile, if you like, from the sites given below. In ddition you need a boot page, this is page 0 (bytes 0-4095) of the kernel image, and comes in two flavours:
Note that you need to prefix the appropiate boot-program to the kernel. Use a suitable command on your system (cat on an Unix system). It is important that the boot code is prepended to the kernel proper before being placed into the virtual card reader! Do not punch it separately, as the IPL will abend!
Prepare the IPL device by putting kernel, parmline and initrd file thereto, again with the appropiate commands for your system. (for a VM system it is detailed in the PDFs that you found on the Marist site).
In principle, this is one out of any number of kernel-patches, (as it is the case for Linux/390 in toto), given by an input file for Larry Wall's patch(1) program, but experience shows that many sites with a mainframe are ill-equipped for that sort of kernel-hacking; so it has been necessary to provide compiled kernels as well.
Download these files from the following sites:
As there is a great number of possible kernel configurations,
my attempts of making pre-compiled kernels available must by
necessity remain imperfect; the same could be said, of course,
of any standard Linux-distribution, such as Debian but in our case much is
still in flux, and in addition the usual recompile of the kernel
often impossible. I will try to help with anything I can
make(1). Feel free to ask me.
All kernels are presently compiled with the s390-gcc cross-compiler and my NQBTR postprocessor on an i386.
The kernels now come in two flavours: vanilla and flavoured. The latter are compiled with slight enhancements that I hope are so easier and more extensively tested. In addition I separated the IPL code from the rest, see above how to make your bootable kernel. The kernels are not compressed, so you'll need no program to unzip them.
Kernels are numbered to help identify them easily. A suffix letter may be used to indicate the compiler used, or similar variants. Similarly, dgb and fx are suffixed to indicate kernels with special debugging features enabled, and test variants with enhancements enabled.
Note that the B-compiler is much more recent and should work better (it only didn't work at all for some time).
This kernel corresponds to patch level 0.8.
Compiled with debugging output enabled for sys_munmap and for the network (CTC) driver.
The following are the checksums that you may use to control the integrity of your downloads.
601851689776973d2a644c69d223393d Uploads/IMAGE/index.html 7e5c4def92b2c4e5d9203642444c8056 Uploads/IMAGE/iplcard.boot 2e9dd297ef776abe50d0265f54cbab23 Uploads/IMAGE/ipltape.boot 3498e19925839a6a24e79545451cc142 Uploads/IMAGE/kernel-image-2.2.15-1.s390-12A 1239d7abf5a6f3a0ac6d1910a1eecbbc Uploads/IMAGE/kernel-image-2.2.15-1.s390-12B 99c5696be13c93c327734c2007819b1d Uploads/IMAGE/kernel-image-2.2.15-1.s390-12dbg1A f077bc56a1caedbf5da2651e5c094c18 Uploads/IMAGE/kernel-map-2.2.15-1.s390-12A 06778267fc111922649d365b941be377 Uploads/IMAGE/kernel-map-2.2.15-1.s390-12B f99fb120da90366330679ef59e814971 Uploads/IMAGE/kernel-map-2.2.15-1.s390-12dbg1A
The patches come as a
which the main part is the patch itself. If this work extends to
other sources, the patches thereto will here be added as well.
(Here's what you'll find in the
To apply them, you must extract the archive and then apply the patch(es) to the respective source trees. Example:
tar xvzf vintage-0.4.tar.gz cd linux-2.2.14 patch -p1 < ../vintage-0.4-kernel.patch
I will be very glad to discuss details with anyone. Contact me Peter Schulte-Stracke.
For general information, see Linas Vepstas' comprehensive Linux on the IBM ESA/390 Mainframe Architecture and the links given there; in particular Linux/390 at Princeton University, and Linux for S/390.
See also the Marist mailing list archives , to join the list say subscribe Linux-390 Your Name to join the mailing list.
There is no warranty, etc. as always. Please see the GNU General Public License for details (part of the Linux sources).