[comp.os.minix] Upgrading 1.3 to 1.5.0 - Some tips for the beginners.

mcm@peach.ucsb.edu (Marcelo C. Mourier) (03/12/90)

Hi there!

    During the last couple of days I've been working on the 1.3 -> 1.5.0
upgrade of Minix.  Here is a brief description of how I did it, and of
the problems I ran into.  I haven't finished the upgrade myself, but I
think that these tips might be a helpful start off for first-time upgraders.
Good luck and hurry up, because you still need to go to 1.5.3 in order to
catch up with 1.5.5..!

- You should start by getting all (74 in total!) the 1.5.0 upgrade postings
  from any of the Minix archives.

- From posting #0 get the crc list of 1.3, which you should need to check
  that your current version is indeed 1.3.

- From posting #14 get the official 1.5.0 /usr directory tree, and the
  list showing the order of the 1.5.0 library functions.

- From posting #70 get the crc list of the first 69 postings.

- There are two programs that are needed to carry out the upgrade which
  are not part of PH's 1.3.  These programs are: crc.c and patch.c. You
  should get a copy of them from any of the archives.

- Now proceed by stripping off the mail headers from all the postings and
  checking the crc's of the resulting .uue files against the ones posted.

- Then obtain the compressed files by uudecoding all the .uue files.  Save
  the .Z files in a diskette, just in case...

- Use crc to check that your current version is indeed 1.3.  This step is
  *very important*, so make sure that everything is OK.

- At this stage you should rearrange your /usr directory tree according to
  the official 1.5.0 one.

- Now you're ready to start the upgrading process.  The procedure is very
  straightforward: you have to decompress the .Z files to obtain the co-
  rresponding shell archive.  In general this archive will contain a bunch
  of files (*.c, *.h, *.cdif, etc.) which go into the same directory of
  the tree.  For example, other_00.Z decompresses into other_00, which con-
  tains the first part of the library files that go into /usr/src/lib/other.
  Use shell scripts whenever possible; this way you'll save time and you'll
  be less prone to make mistakes.

- Start out by upgrading the include files using posting #15, #16, and #17.

- Then upgrade the library files using postings #18, #19, #20, and #21.
  Note that the library files are now divided into four subdirectories:
  ansi, ibm, other, and posix.  Posting #11 contains the new head.s, which
  goes in lib/ibm.  The other ibm specific files are the same ones used in
  1.3 (crtso.s, sendrec.s, end.s, etc.).

- Now it's time to build the new C library, which you'll need to recompile
  the commands and OS.  Here is where most people get stuck: getting the
  proper order for libc.a.  As I couldn't succeed using the simple command:
  ar q libc.a `lorder *.s | tsort`, I took a more pragmatic approach.  It's
  kind of greedy and it requires some considerable disk space, but it works!
  It is implemented as a shell script, and it is based on a similar one that
  came in PH's 1.2.  It uses the information about the library order provided
  in posting #14.  This listing was obtained with an ls -l command and so
  every line has a lot of leading junk.  Use gres to get rid of it, leaving a
  file (liborder.new) that contains just the names of the functions;e.g:

    gres 'rw-r?-r?-  8/3 ??????? Dec ?? ??:?? ' '' liborder > liborder.new

  Move liborder.new to the temporary empty directory /usr/tmp/lib.  Now edit
  the file and erase the lines corresponding to unget.s, memmove.s, strcoll.s
  and strxfrm.s.  These functions are not part of 1.5.0's libc.a; unget.s
  doesn't exists, and the other three were introduced in 1.5.3... Now use
  the script to create the new libc.a, based on the old /usr/lib/libc.a, the
  new sources, and liborder.new.

-------------------------------- cut here -------------------------------
#First compile all the library files and place them in /usr/tmp/lib.
cd /usr/src/lib/ansi
echo Compiling lib/ansi/*.c
sh run
mv *.s /usr/tmp/lib
cd ../ibm
echo Packing lib/ibm/*.s
for f in *.s
do
    libpack < $f > /usr/tmp/lib/$f
done
cd ../other
echo Compiling lib/other/*.c
sh run
mv *.s /usr/tmp/lib
cd ../posix
echo Compiling lib/posix/*.c
sh run
mv *.s /usr/tmp/lib

#Now construct the shell script that will create the library.
echo Constructing the shell script...
cd /usr/tmp/lib
rm -f buildnewlib
slpit -1 liborder.new
for f in x??
do
    echo ar ql libc.a `cat $f` >> buildnewlib
    rm $f
done

#Get the necessary files from the old library.
echo Extracting missing files from the old library...
ar r libc.a 2> /dev/null
sh buildnewlib > /dev/null 2> missing
gres 'Error: ar cannot find file ' '' missing > list
split -1 list
for f in x??
do
    ar xvl /usr/lib/libc.a `cat $f`
    rm $f
done
rm libc.a

#Now we have all the necessary *.s files.  Construct the new library.
echo Building the new libc.a ...
ar r libc.a 2> /dev/null
sh buildnewlib
echo -- libc.a created.
--------------------------------- cut here ---------------------------------

    If everything worked fine you should now have the new libc.a in the
working directory /usr/tmp/lib.  Save it on a diskette, just in case...

    You can now proceed with the upgrade.  Work on the commands first, then
on the kernel, mm, and fs.  Note that there're two commands that seem to
reject the patch files (I don't know why).  They are: ls.c and more.c.  You
should keep using the 1.3 ones.  Note also that the source of man.c assumes
that the manual pages are in /usr/src/man, whereas according to the official
directory tree they are in /usr/man.  In order to use the man command you'll
have to edit the /etc/termcap file and add the following two specifications:
al=\EE:dl=\ER: to the minix termcap entry (I copied them from the adm31).
After compiling all the commands remember to run the changemem script in the
tools directory, which takes care of adjusting the stack area of some of them.

    I cannot give you more tips because I haven't finished the upgrading
myself.  Anyway, I hope that this stuff could help somebody start out with
the upgrade.  Good luck and have fun!

Marcelo - mcm@cs.ucsb.edu

Albert Chin-A-Young <achin@m-net.ann-arbor.mi.us> (03/14/90)

This message is empty.