r982 - trunk

tushar at linuxfromscratch.org tushar at linuxfromscratch.org
Thu Aug 11 21:20:54 PDT 2005


Author: tushar
Date: 2005-08-11 22:20:53 -0600 (Thu, 11 Aug 2005)
New Revision: 982

Modified:
   trunk/lfss390.txt
Log:
Updated Hint: lfss390

Modified: trunk/lfss390.txt
===================================================================
--- trunk/lfss390.txt	2005-08-10 18:37:33 UTC (rev 981)
+++ trunk/lfss390.txt	2005-08-12 04:20:53 UTC (rev 982)
@@ -1,6 +1,6 @@
 AUTHOR:		John Gnew <john dot gnew at verizon dot net>
 
-DATE:		2004-11-05
+DATE:		2005-08-11
 
 LICENSE:	Public Domain
 
@@ -9,11 +9,11 @@
 PRIMARY URL:	http://www.linuxfromscratch.org/hints/
 
 DESCRIPTION:
-For some unknown reason, I had the urge to install Linux from scratch version 5.0 on a 
-IBM S/390 mainframe. I was able to take the 5.0 install guide, with some minor 
+This hint should help to install Linux from scratch version 6.0 on a 
+IBM S/390 mainframe. I was able to take the 6.0 install guide, with some minor 
 modifications and three additional packages, and complete the install.
 
-This LFS system was installed on a 3390-3 but my starter SUSe system was on a 3390-3.
+This LFS system was installed on a 3390-3, my starter LFS 5.0 system was on a 3390-3.
 I also had a 3390-9 to use for general storage of files.
 
 At the compleation, I was able to IPL my LFS system as a VM guest.
@@ -25,48 +25,71 @@
 recommend checking for patches prior to compiling different versions of the kernel.
 
 The IBM site for obtaining various patches is located at:
-(http://www10.software.ibm.com/developerworks/opensource/linux390/index.shtml)
+(http://www-128.ibm.com/developerworks/linux/linux390/index.html)
 
 
 PREREQUISITES: 
 None
 
-REQUIRED SOFTWARE:
-mingetty-1.06
-net-snmp-5.1.1
-s390-tools-1.2.4-june2003.tar.gz
+REQUIRED ADDITIONAL SOFTWARE:
+mingetty-1.06 (version 1.07-1 in now available)
+s390-tools-1.4.0
 
 HINT: 
-I followed the documentation for the LFS 5.0 install with the following exceptions:
+I followed the documentation for the LFS 6.0 install with the following exceptions:
 
-glibc 2.3.2
-I initially received the following error:
+The first addition was to upgrade the 2.4 kernel in LFS 5. GCC was already at 
+level 3.3. I needed to be at the 2.6 level. This upgrade caused changes in the 
+networking so it took a few attempts before I got everything back in place.
+
+Install module-init-tools-3.0.tar.bz2
+./configure --prefix=/
+make moveold
+make
+make install
+./generate-modprobe.conf /etc/modprobe.conf
+copy the modprobe.devfs file into /etc.
+
+Upgrade kernel to 2.6.8.1 (or any 2.6 kernel)
+Create /sys dir and update fstab for sysfs entry
+    I had problems with CTC network without /sys dir
+
+Set up CTC with the commands similar to the following:
+
+# device must be offline and should be by default
+echo 0.0.2000,0.0.2001 > /sys/bus/ccwgroup/drivers/ctc/group
+# echo 0 > /sys/bus/ccwgroup/drivers/ctc/0.0.2000/online
+echo 0 > /sys/bus/ccwgroup/drivers/ctc/0.0.2000/protocol
+echo 1 > /sys/bus/ccwgroup/drivers/ctc/0.0.2000/online
+
+The following is the command to freate your file system:
+mkfs.ext3 /dev/dasda1
+
+
+linux-libc-headers needs to change the copy asm-i386 to asm-s390 
+in chapter 5 and chapter 6
+
+glibc 2.3.4
+touch /tools/glibc-kernheaders/autoconf.h
+And I initially received the following error:
 In file included from sys/ustat.h:30,
                  from ../sysdeps/unix/sysv/linux/ustat.c:21:
 ../sysdeps/generic/bits/ustat.h:26: error: redefinition of `struct ustat'
-make[2]: *** [/LFS50/sources/glibc-build/misc/ustat.o] Error 1
-make[2]: Leaving directory `/LFS50/sources/glibc-2.3.2/misc'
+make[2]: *** [/LFS60/sources/glibc-build/misc/ustat.o] Error 1
+make[2]: Leaving directory `/LFS60/sources/glibc-2.3.4/misc'
 
-To correct the problem I edited ./sysdeps/unix/sysv/linux/ustat.c by commenting 
+To correct this problem I edited ./sysdeps/unix/sysv/linux/ustat.c by commenting 
 #include <sys/ustat.h> and then adding #include <sys/statfs.h>.
-
+The following SED command will accomplish the same.
+    sed -i 's at sys/ustat.h at sys/statfs.h@' \
+      '../glibc-2.3.4/sysdeps/unix/sysv/linux/ustat.c'
 The problem was related to a file including an obsolete header file. 
 
 
-GLIBC CHECK
-Timed out: killed the child process but it exited 0
-make[2]: *** [/LFS50/sources/glibc-build/rt/tst-aio7.out] Error 1
-make[2]: Leaving directory `/LFS50/sources/glibc-2.3.2/rt'
-make[1]: *** [rt/tests] Error 2
-make[1]: Leaving directory `/LFS50/sources/glibc-2.3.2'
-make: *** [check] Error 2
-
-
 Chapter 5 Locking in GLIBC
 The next thing to do is to amend our GCC specs file so that it points to the new dynamic linker. 
 A simple sed will accomplish this:
 
-
 SPECFILE=/tools/lib/gcc-lib/*/*/specs &&
 sed -e 's@ /lib/ld-linux.so.2@ /tools/lib/ld-linux.so.2 at g' \
     $SPECFILE > tempspecfile &&
@@ -78,71 +101,19 @@
 
 There does not seem to be a ld-linux.so.2 in the /tools/lib.
 
-BINUTILS
+In chapter 6 I had to remove the coreutils patch for uname. Had a problem with asm: 
+Besides, patch is for intel not 390.
+Gettext 0.14.3 check failed on msgfmt-6. This also failed on 0.14.4. 
+I found a comment on problems with this test and AIX.
 
-FAIL: bootstrap
-FAIL: bootstrap with strip
-FAIL: bootstrap with --static
-FAIL: bootstrap with --traditional-format
-FAIL: bootstrap with --no-keep-memory
-FAIL: bootstrap with -relax
++#ifdef linux
++#define cpuid(in,a,b,c,d)\
++  asm("cpuid": "=a" (a), "=b" (b), "=c" (c), "=d" (d) : "a" (in));
++int has_sse( void );
++#endif
+Besides, this patch is for intel type boxes not s390. Guess I’ll just have to
+live with uname -1 and uname -p displaying unknown.
 
-                === ld Summary ===
-
-# of expected passes            152
-# of unexpected failures        6
-# of expected failures          1
-/source/src/binutils-build/ld/ld-new 20030612
-
-make[4]: *** [check-DEJAGNU] Error 1
-make[4]: Leaving directory `/source/src/binutils-build/ld'
-make[3]: *** [check-am] Error 2
-make[3]: Leaving directory `/source/src/binutils-build/ld'
-make[2]: *** [check-recursive] Error 1
-make[2]: Leaving directory `/source/src/binutils-build/ld'
-make[1]: *** [check-ld] Error 2
-make[1]: Leaving directory `/source/src/binutils-build'
-make: *** [check] Error 2
-
-Looks like these tests failed because the tests are linked against crt1 or 2 and 
-should have been linked against crt0.
-
-
-MODUTILS
-Had to go to modutils-2.4.27. Version 25 would not compile correctly.
-make[1]: Entering directory `/usr/src/modutils-2.4.25/obj'
-gcc -O2 -Wall -I./../include -D_GNU_SOURCE  -DCONFIG_ROOT_CHECK_OFF=0   -DCOMMON
-_3264 -DELF_MACHINE_H='"elf_s390.h"' -DARCH_s390 -DONLY_32 -c -o obj_s390.o obj_
-s390.c
-In file included from obj_s390.c:31:
-../include/util.h:42: warning: built-in function `log' declared as non-function
-obj_s390.c: In function `obj32_arch_apply_relocation':
-obj_s390.c:207: error: `R_390_GOTOFF' undeclared (first use in this function)
-obj_s390.c:207: error: (Each undeclared identifier is reported only once
-obj_s390.c:207: error: for each function it appears in.)
-obj_s390.c: In function `obj32_arch_create_got':
-obj_s390.c:267: error: `R_390_GOTOFF' undeclared (first use in this function)
-make[1]: *** [obj_s390.o] Error 1
-make[1]: Leaving directory `/usr/src/modutils-2.4.25/obj'
-make: *** [all] Error 2
-
-gcc-2.95.3
-Requires the patch from IBM in file gcc-2.95.3-s390.tar.gz.
-(http://www10.software.ibm.com/developerworks/opensource/linux390/current2_4_x-august2001.shtml)
-I then followed the directions in Beyond Linux from scratch. This created the nessary 
-library links required by some packages like Tivoli storage manager.
-
-Without the IBM patch, you will get the following errors:
-root:/# cd /usr/src/gcc-2-build/
-root:/usr/src/gcc-2-build# ../gcc-2.95.3/configure --prefix=/opt/gcc-2.95.3 \
->     --enable-shared --enable-languages=c \
->     --enable-threads=posix
-Configuring for a s390-unknown-linux-gnu host.
-Invalid configuration `s390-unknown-linux-gnu': machine `s390-unknown' not recognized
-Invalid configuration `s390-unknown-linux-gnu': machine `s390-unknown' not recognized
-Unrecognized host system name s390-unknown-linux-gnu.
-
-
 mingetty-1.06 (http://packages.qa.debian.org/m/mingetty.html)
 mingetty is required for non serial consoles. This had to be installed with "make&&make install" 
 which puts mingetty in /sbin.
@@ -166,120 +137,12 @@
 are/kbd/keymaps/defkeymap.map.gz
 
 KERNEL GEN
-make mrproper (first time to clean source tree)
-make menuconfig - configure what you want
-make dep
-make image 
-make modules
-make modules_install
-cp arch/s390/boot/image /boot/newname
-cp System.map /boot/System.map
+For the install the kernel, the kernel is not under arch/i386/boot/BzImage but 
+rather arch/s390/boot/image
 
-("make vmlinux" only creates the image, make image creates a binary file. 
-If you do a make vmlinux you will get the following error when you boot)
-HCPGIR453W CP entered; program interrupt loop 
+s390-tools-1.4.0
 
-
-MAKEDEV - There is a different MAKEDEV script in 5.1 and this might not be an issue.
-MAKEDEV needs to be modified to allocate the mdx and dasdx devices. 
-There should be 32 mdx devices and dasd should have a-z with 3 partition each. 
-The MAKEDEV script in /dev should have the two following lines added:
-
-major_md=9
-
-The md) section should be changed
-        md)
-                major=`Major md` || continue
-                for part in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 \
-                    16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
-                do
-                        makedev md$part b $major $part $disk
-                done
-Add the section:
-        s390)
-                $0 $opts dasda dasdb dasdc dasdd dasde dasdf dasdg dasdh
-                $0 $opts dasdi dasdj dasdk dasdl dasdm dasdn dasdo dasdp
-                $0 $opts dasdq dasdr dasds dasdt dasdu dasdv dasdw dasdx
-                $0 $opts dasdy dasdz
-                ;;
-Add the section:
-        dasd[a-z])
-                major=`Major dasd 64`
-                unit=`suffix $arg dasd`
-                base=`index ab $unit`
-                base=`index abcdefghijklmnopqrstuvwxyz $unit`
-                base=`math $base \* 4`
-                makedev dasd$unit b $major $base $disk
-                for part in 1 2 3
-                do
-            makedev dasd$unit$part b $major `math $base + $part` $disk
-                done
-                ;;
-Then run MAKEDEV -v md
-and      MAKEDEV -v s390
-
-MKINITRD
-root:/# cat mkinitrc
-#! /bin/sh
-dd if=/dev/zero of=/boot/initrd-2.4.22 bs=1M count=16
-/sbin/mke2fs -F -m 0 -b 1024 /boot/initrd-2.4.22
-mkdir /mnt/initrd-2.4.22
-mount -t ext2 -o loop /boot/initrd-2.4.22 /mnt/initrd-2.4.22
-cd /mnt/initrd-2.4.22
-mkdir bin dev lib
-cd /bin
-cp -a sh /mnt/initrd-2.4.22/bin
-cd /sbin
-cp -a insmod /mnt/initrd-2.4.22/bin
-mkdir /mnt/initrd-2.4.22/lib/modules
-(cd /lib/modules; tar -c 2.4.22/) | (cd /mnt/initrd-2.4.22/lib/modules; tar -x)
-cd /dev
-cp -a console /mnt/initrd-2.4.22/dev
-cp -a null /mnt/initrd-2.4.22/dev
-cp -a md* /mnt/initrd-2.4.22/dev
-cp -a ram* /mnt/initrd-2.4.22/dev
-cp -a zero /mnt/initrd-2.4.22/dev
-cd /
-cat > /mnt/initrd-2.4.22/linuxrc << "EOF"
-#! /bin/sh
-
-export PATH=/bin
-
-echo 'Loading module dasd_mod dasd=$dasd ...'
-insmod dasd_mod dasd=$dasd
-
-echo 'Loading module dasd_eckd_mod ...'
-insmod dasd_eckd_mod
-EOF
-umount /mnt/initrd-2.4.22
-rm -rf /mnt/initrd-2.4.22
-gzip /boot/initrd-2.4.22
-
-
-
-net-snmp-5.1.1
-Turns out that net-snmp-5.1.1 is required for the s390 tools.
-./configure -prefix=/usr
-make
-make install
-
-
-s390-tools-1.2.4-june2003.tar.gz
-
-In order to get zipl to make I modified the zipl/src/Makefile by adding -DCONFIG_SMP
-
-In file included from /usr/include/linux/fs.h:26,
-                 from disk.c:26:
-/usr/include/asm/bitops.h:42:2: #error "bitops won't work without CONFIG_SMP"
-make[2]: *** [disk.o] Error 1
-
-
-CFLAGS := -I../include -I../boot -O2 -Wall -DZFCPDUMP_DIR=$(ZFCPDUMP_DIR) \
-          -DZFCPDUMP_IMAGE=$(ZFCPDUMP_IMAGE) -DZFCPDUMP_RD=$(ZFCPDUMP_RD) \
-          -DCONFIG_SMP \
-          -DS390_TOOLS_RELEASE=$(S390_TOOLS_RELEASE)
-
-Tools were built as follows
+Tools that were built as follows:
 cd zipl
 make
 make install
@@ -289,58 +152,28 @@
 cd ../dasdfmt
 make
 make install
-cd ../dasdview
-make
-make install
-cd ../zdump
-make
-make install
-cd ../tape390
-make
-make install
-cd ../qetharp
-make
-make install
-cd ../qethconf
-make
-make install
-cd ../ip_watcher
-make
-make install
-I still need to look at osasnmpd and zfcpdump need to be looked at. Bad compiles.
 
-
 PROBLEMS TODO
 
 During boot the console will display messages that have ascii control characters.
 This make it hard to read. Especialy during a disk check.
+To correct this make sure bashrc has something similar to the following:
+# Provides a colored /bin/ls command.  Used in conjunction with code in
+# /etc/profile.
 
-./loadkeys
-Loading keymap...Loading /usr/share/kbd/keymaps/defkeymap.map.gz
-Couldnt get a file descriptor referring to the console
+if [ $TERM = "dumb" ]; then
+    alias ls='ls --color=never'
+else
+    alias ls='ls --color=auto'
+fi
 
-./setclock
-Setting clock...DISABLED
-Cannot access the Hardware Clock via any known method.
-Use the --debug option to see the details of our search for an access method.
+To prevent the console from displaying weird lines during a filesystem check,
+change in /etc/rc.d/init.d/checkfs
 
-hwclock --hctosys --localtime --debug
-hwclock from util-linux-2.12
-hwclock: Open of /dev/rtc failed, errno=19: No such device.
-No usable clock interface found.
-Cannot access the Hardware Clock via any known method.
+#               fsck $options -a -A -C -T
+                fsck $options -a -A -T
 
-/usr/src/s390-tools-1.2.4/zfcpdump
-zfcpdump would not compile. Dependancies were not found.
-* ERROR: 'extern/linux-2.4.19.tar.bz2' missing
-* ERROR: 'extern/busybox-0.60.5.tar.bz2' missing
-* ERROR: 'extern/e2fsprogs-1.32.tar.gz' missing
-* Call 'get_files.sh' to get the required tarballs from the internet!
 
-/usr/src/s390-tools-1.2.4/osasnmpd
-osasnmpd did not compile
-
-
 ACKNOWLEDGMENTS:
 
 
@@ -349,5 +182,7 @@
 * Initial post
 [2004-11-05]
 * Corrected install for GCC-2.95.3
+[2005-08-11]
+* Changed install to represent LFS 6
 
 




More information about the hints mailing list