Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!hp4nl!phigate!prle!prles2!cstw68!meulenbr From: meulenbr@cstw68.prl.philips.nl (Frans Meulenbroeks) Newsgroups: comp.os.minix Subject: ST 1.5.0 part #0 (installation guide) Message-ID: <859@prles2.UUCP> Date: 16 Jan 90 21:01:32 GMT Sender: nobody@prles2.UUCP Reply-To: meulenbr@cst.prl.philips.nl () Organization: Centre for Software Technology, Philips Eindhoven Lines: 528 Minix ST 1.5.0 upgrade guide Frans Meulenbroeks. january 1990. To Ruud and Erik, whose early arrival delayed this project at least a month but it was (and is) worth every second. INTRODUCTION This document describes how to upgrade your out-of-the-box Minix ST 1.1 sources to the 1.5.0 version. The upgrade kit will not work with other ST kernels (e.g. gkernel, or the kernel with Poole fs). Since the new version is pretty compatible with PC 1.5.0 it is baptised ST 1.5.0 and not 1.2. Version 1.2, 1.3 and 1.4 are never distributed. ST 1.5.0 is as much compatible with PC 1.5.0 as possible. There are some differences though: - PC 1.5.0 supports Amoeba networking. Since I don't have an Ethernet card for the ST, and because I'm not aware of the existence of such a thing I did not look at this - ST 1.5.0 supports formatting of disks - ST 1.5.0 supports several hardware clocks. Note that since I do not have all those hardware not all stuff is tested by me. - several bug fixes were added in order to get things working on an ST. Things which always break code on the ST are assumptions that sizeof(char *) == sizeof(int), and dereferenced NULL pointers. - elle When typing these release notes, I noticed that elle is missing. Since I do not have elle sources this has been left out. - stterm The PC term program was terribly slow on the ST due to shadowing. Therefore I included another communications program, which I baptised stterm. It is based upon a program received through usenet (sorry, forgot the authors name), and is reworked by J.R. Bammi. The idea behind this upgrade is to get close to the PC version. For that reason I regretfully could not include several functional enhancements, which I really would like to see included. Fortunately at least some of these are rumored to be in future versions. WARNING This upgrade is not trivial. It can take several evenings to do the upgrade, especially if you have a floppy only system. It helps very much if you have already build a minix system in the past. If you haven't done so, you might consider trying that first before starting on this upgrade. Also some familiarity with the minix commands is needed. There might be one problem left in the kernel! I just got a crash yesterday, which I was unable to reproduce. If you encounter problems and discover either a fix, or a way to reproduce it, let me know. However, it is also quite possible that this problem is due to flaky hardware (you should have seen my system to know what I mean). I'll try to see if I can reproduce the problem. If I come up with something I'll let you know.... DISCLAIMER This version is not an official version. That is: most likely it will never be distributed by PH. A previous upgrade kit was sent to Johan Stevenson for official approval. Unfortunately he did not have the time to work on it. Therefore Johan agreed that I would distribute the stuff to a small beta test group, and then release it as a semi official release. Also ast encouraged me to work on this. After a lot of comments from the beta testers (thanks boys!) and a lot of changes based upon those comments, this upgrade kit is the result. The above means that this upgrade kit is *NOT* officially approved by Johan, but I think at the time this is as close as official as we (the net) can get it, and therefore I suggest to use this as THE 1.5.0 version until something official comes up. Note: Installing these changes will void your warranty. Installing the changes is *NOT* recommended if you haven't build a minix kernel before and/or if you have no C/Unix experience. Both me (Frans Meulenbroeks), the beta testers, and all persons that contributed code, do not grant any warranty, and will not be liable to any damage done to you or your system, either direct or indirect. If you cannot live with this, just discard this upgrade kit. (How is that for a change) COPYRIGHT NOTICE A number of the sources in this upgrade kit are copyrighted. See the various files for more details. The files have one thing in common: they are all snatched from Usenet and IMHO they may be distributed freely. As far as this upgrade kit concerns I want to make the following statement: "This upgrade kit carries a compilation copyright as far as the various source files concerns. This document is copyrighted by F. Meulenbroeks, 1989. Everyone is granted permission to redistribute both the upgrade kit and this document freely. However, it is explicitly forbidden to make money from this in any way. " Or in other words: feel free to share this with anyone else, but don't ask money for it. It is explicitly forbidden to make money off this. This implies that it is forbidden to put this in any PD library who sells software for a larger amount than is needed for media cost (and shipping if appropriate). To some of you the above statement may seem quite rigid. However, I hate to see other people make money out of my work. Explicit permission is granted to ast to use (parts of) this in future releases. HARDWARE REQUIREMENTS It might not be possible to install this upgrade if you have only 0.5 MB of memory, or only a single sided floppy drive. If you want to try with such a system I wish you good luck. If you succeed, I'd like to hear from you, and how you achieved this. Perhaps we can add a section to this document. If you have a bare 520 with a SS drive only, you will not be able to do this upgrade. HOW THINGS ARE ARRANGED The whole upgrade kit consist of 23 parts. These are: part 0: this installation guide part 1: include stuff (called inclshar) part 2: lib stuff (called libshar.uue) part 3-12: commands stuff (called comm1 - comm10) part 13: sttools stuff (called sttlsshar) part 14: test stuff (called testshar) part 15: tos stuff (called tos.arc) part 16-17: fs stuff (called fsshar1 - fsshar2) part 18: mm stuff (called mmshar) part 19-22: kernel stuff (called kernshr1 - kernshr4) Apart from part 0 (which is this document and is plain ascii text) and part 15 (which is a uuencoded arc file), all parts are send as uuencoded, compressed shar files. This means that you have to uudecode all parts first, then uncompress them using compress -d, and then extract them using sh. This format is equivalent to the format in which the PC 1.5.0 was posted. All the upgrades consist of either the complete files or a cdiff with the original out-of-the-box 1.1 sources. I have tacked a .cdif extension to all cdif files. Unfortunately due to the limit minix places on file names, sometimes the trailing .cdif may be truncated to .cdi or even .cd Note that in 1.5.0 the h directory does not exist any more, but has been renamed to /usr/include/minix. Also the lib directory has been split into pieces. For the ST the interesting subdirectories are atari ansi posix and other Sometimes you'll be asked to take stuff from the PC 1.5.0 distribution. This is done to avoid massive postings of stuff which is posted by ast less than a month ago. I twice suggested you'd save these postings. If you didn't do this bad luck to you. Try to find these postings on an archive server first. You'll need them! In one or two cases you're supplied with a patch to a PC posting. In that case you are encouraged to keep the PC original around as well. Future postings of ast will refer to the PC postings. I know ast will be incorporating the patch I post in the next version. With this release the PC and ST 1.5.0 are compatible (with a few small exceptions) with respect to lib/include/commands/fs/mm/test Part of sttools is also equivalent. Due to the different environments it is not possible to fully integrate PC and ST stuff in this area. The integration of the kernel is still in the works. This integration will also be only a partial integration. Due to different hardware most of the drivers cannot be integrated. Several other parts (e.g. proc.c system.c memory.c clock.c a lot of .h files and perhaps tty.c) can (and hopefully will) be shared between PC and ST. Finally there is the tos stuff. There is no equivalent PC directory, so there cannot be much integration. Since I develop minix under minix, I rarely use the tos stuff, and maintaining or updating it is not a high priority issue. Notice that in several cases the ST specific makefile is called something like st_makefile or Makefile.st. Be sure to use the proper makefile in those cases! SETTING UP YOUR SYSTEM Before starting the actual upgrade process some initial preparation is needed. First of all I would urge to to make a copy of your src disks! Do not apply this update on your original PH disks. There is a chance that the installation instructions are incorrect, or that you make a mistake while installing. Always be careful with your originals! If you have more than 1 MB of main memory you'll probably want to create a version of minix with a huge ram disk, so that the ram disk can accommodate both /bin and /usr/bin. This will speed up the compilation process incredibly. Refer to your manual on how to do this. If you have a hard disk it is wisest to dedicate a partition to minix and to put all the sources on that disk. Personally, I've stuffed all sources in /usr/src. Refer to the manual on how to set up this partition. Furthermore I recommend backing up the disk before starting. If you have a dual floppy system it is probably the best to make a floppy containing the compiler and some other useful utilities (e.g. make) If you have only one floppy drive and 1 MB of memory you'll have to put all important stuff from /usr/bin (e.g. cc and make) on the ram disk. If you have no hard disk you'll have to put the sources on floppies. It is best to put the sources for kernel mm fs and lib on a separate disk. You can put the sttools and test sources together on one disk. The sources for commands have to be split and must be placed on multiple floppies. The upgrades for commands alone would fill a disk. I think it is the best to put the subdirectories on a disk and the remaining stuff on a second disk. Note however, that I never attempted to build minix on a floppy based system. Beware that if you split the commands, you have to deal with the makefile as well. The installation process which is explained below is written for a hard disk user. If you are a floppy only user, you'll have to change disks between a lot of the steps. Also if you are low on disk space you might decide to remove the .o files after you're done with a step. Note that somewhere in the past I did this whole upgrade myself. Since then there have been some changes, so I cannot guarantee that it all works flawless. If you encounter any problems, sorry! If I had to retest the posting would be delayed by another two or three weeks. I've tried to be as explicit as possible so I hope all problems are solvable. CONFIGURING THE TOOLS Before starting the upgrade you should change the amount of memory that the various tools use. Values which are reported to work are: cc 3000 cpp 30000 cv 50000 as 50000 ld 100000 cem 100000 cg 30000 opt 40000 However, if you encounter problems because the compiler crashes you might want to increase some of these values. Use cc -v to detect in which pass the compiler crashes. INSTALLATION PROCESS Before starting with the installation process read this document very carefully. At the end you'll find a list of common problems, so it is important to read the document fully! After reading the document you might want to reconsider the fact that you want to do an upgrade. Most likely the upgrade will take several evenings! Still here? Ok, off we go: 1) go to the commands directory 2) mkdir make; cd make 3) unpack ST part #6 (comm4.uue) in this directory. 4) make -f makefile.st.1 5) (optionally) rm makefile && ln makefile.st makefile 6) install the new make in /usr/bin If you have the old make on another place as well (e.g. /bin) make sure to install it there as well. 7) make a subdirecotory commands/patch and unpack PC part #73 in this directory. 8) make -f st_makefile 9) install patch in /usr/bin 10) unpack ST part #7 (comm5.uue) 11) cc -o crc -O crc.c 12) chmem =10000 crc 13) cp crc /usr/bin 14) cd /usr 15) mv include oldinclude You can discard the oldinclude directory after doing the upgrade. 16) mkdir include 17) cd include 18) extract PC parts #15-#17 in this directory, followed by the ST include posting. See also the comments in the include posting. 19) extract ST part #1 (inclshar.uue) Examine and modify the files /usr/include/minix/config.h and /usr/include/minix/boot.h. Minimally you'll need to change the MACHINE definition in /usr/include/minix/config.h. 20) issue the command: patch