The two are incompatible. The s390 port only runs on newer hardware; it i370 port does not use the new-fangled instruction set extensions, and thus should work on old hardware. The i370 port uses an assembly language style that is similar to the syntax used by HLASM, and thus should be almost trivial for regular mainframe programmers. The s390 assembly language is, well, strange to me.
The i370 port is essentially dormant. Almost no one is working on it. This is both good and bad: on the bad side, lots of things don't work. On the good side, you will learn incredible amounts by fixing things. And you will be able to make all of your own decisions, without having anyone to tell you you're wrong. Its a marvelous play-pen.
Below follow some very very brief instructions on how to get started.
When building gcc, build only the c compiler; you don't need c++ or objective-c or Fortran or Java. Besides, the i370 build always croaked on obj-c. You might run into some nasty error messages ignore them, then build binutils and install binutils. Then rebuild the compiler. I don't know why, but iterating like this should get rid of most error messages.
Compile the following program: main () { printf ("hello world\n"); } Study the assembly listing. You will eventually become intimately familiar with assembly listings.
The above two steps will take you at least several days.
When building glibc, you will need to disable -O2 optimization for some (about a dozen) files. There is something about the way the i370 instruction set is specified that causes a register allocation overflow (i.e. the compiler core dumps) It is due to some sort of mis-specification of the i370 instruction set, but I wasn't able to quite understand enough to fix it. Write me for details.
Redesigning the subroutine linkage involves some subtle and fascinating mental gymnastics, as you have to optimize performance and register usage while at the same time making sure the result actually works, e.g. making sure that its re-entrant/interruptible.
> ---------- > From: Martin Schwidefsky[SMTP:[email protected]] > Reply To: Linux on VM Port > Sent: Thursday, December 23, 1999 10:23 AM > To: [email protected] > Subject: Re: IBM 390 and Linux > > The following steps should provide you a cross build environment: > > 1) unpack all source packages > tar xfz binutils-2.9.1.tar.gz > tar xfz gcc-2.95.1.tar.gz > tar xfz glibc-2.1.2.tar.gz > cd glibc-2.1.2 > tar xfz ~/glibc-crypt-2.1.2.tar.gz > tar xfz ~/glibc-linuxthreads-2.1.2.tar.gz > cd .. > tar xfz linux-2.2.13.tar.gz > mv linux linux-2.2.13 > > 2) apply the patches > patch -sp0 < ~/binutils-2.9.1-s390.diff > patch -sp0 < ~/gcc-2.95.1-s390.diff > patch -sp0 < ~/glibc-2.1.2-s390.diff > cd glibc-2.1.2 > patch -sp0 < ~/glibc-linuxthreads-2.1.2-s390.diff > cd .. > patch -sp0 < ~/linux-2.2.13-s390.diff > > 3) configure, compile and install the binutils > mkdir binutils-build > cd binutils-build > ../binutils-2.9.1/configure --prefix=/usr/local --target=s390-ibm-linux > --host=i386-pc-linux-gnu > make > su (enter root password) > make install > exit > cd .. > > 4) configure, compile and install the C compiler > mkdir gcc-build > cd gcc-build > ../gcc-2.95.1/configure --prefix=/usr/local --target=s390-ibm-linux > --host=i386-pc-linux-gnu --enable-languages="c" --with-newlib > make (ignore the compile error in libiberty) > su (enter root password) > make install > exit > cd .. > > 5) configure the kernel > cd linux-2.2.13 > vi Makefile (set "ARCH := s390" and "CROSS_COMPILE=s390-ibm-linux-") > make menuconfig > cd .. > > 6) copy kernel header files > su (enter root password) > cp -ar linux-2.2.13/include/linux /usr/local/s390-ibm-linux/include/linux > cp -ar linux-2.2.13/include/asm-s390 /usr/local/s390-ibm-linux/include/asm > exit > > 7) configure, compile and install the glibc > mkdir glibc-build > cd glibc-build > ../glibc-2.1.2/configure --prefix=/usr/local/s390-ibm-linux > --host=s390-ibm-linux --build=i386-pc-linux-gnu > --enable-add-ons --disable-profile --enable-omitfp > make > su (enter root password) > make install > exit > cd .. > > 8) configure, compile and install all needed compilers > cd gcc-build > rm -fr * > ../gcc-2.95.1/configure --prefix=/usr/local --target=s390-ibm-linux > --host=i386-pc-linux-gnu --enable-languages="c,c++" > make > su (enter root password) > make install > exit > cd .. > > > MfG, > Martin Schwidefsky > > IBM Deutschland Entwicklung GmbH, Schvnaicherstr. 220, D-71032 Bvblingen > Telefon: 49 - (0)7031 - 16-2247, Internet-Mail: [email protected] > Lotus Notes: Martin Schwidefsky/Germany/IBM@IBMDE >
From Rob van der Heij Dec 23, 99 02:46:38 am EST Date: Thu, 23 Dec 1999 02:46:38 EST Reply-To: Linux on VM PortSubject: Re: VM requirement While waiting for DISPLAY and STORE being enhanced (that's beyond my my reach since I think it is delivered OCO) this program may be of some use. Use this only when you know what you're doing and you're the only user on your system! It replaces the translate table at HCPTBLHE with the ASCII printables in EBCDIC. At least DISPLAY T uses that table... With the new Dynamic Exit Points of VM/ESA 2.4.0 you should be able to call an exit to do the translate (based on a flag in your VMDBK) so a user can select between ASCII and EBCDIC. This is not difficult to do but it could break existing applications. /* ZAPASCII EXEC ZAP CP translate table to display ASCII */ 'PIPE (end \ name ZAPASCII.EXEC:2)', '\ cp LOCATE HCPTBLHE ', '| spec w1 x2d ', '| var a' 'PIPE (end \ name ZAPASCII.EXEC:7)', '\ xrange 20 7f', /* ASCII printable code points */ '| xlate a2e', '| spec 1-* 33', /* From x'20' */ '| pad 256', /* upto x'ff' */ '| fblock 4', /* Make words */ '| spec 1.4 c2x 2', /* in hex to store */ '| join 3 , ,', '| spec ,ST H, 1 pad 0 number from' a 'by 16 d2x n.8 ri 1-* n', '| cp' return rc