Return to BSD News archive
Newsgroups: comp.unix.bsd Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!uwm.edu!zaphod.mps.ohio-state.edu!rpi!think.com!ames!sun-barr!decwrl!csus.edu!netcom.com!alm From: alm@netcom.com (Andrew Moore) Subject: Re: [386BSD] Configuring a new Kernel Message-ID: <1992Nov8.224721.22770@netcom.com> Organization: Netcom - Online Communication Services (408 241-9760 guest) References: <BxEztt.7z5@acsu.buffalo.edu> Date: Sun, 8 Nov 1992 22:47:21 GMT Lines: 180 In article <BxEztt.7z5@acsu.buffalo.edu> visnurpk@ubvmsb.cc.buffalo.edu (Rich Kernin) writes: > I've installed the src01 package recently, and want to upgrade the >kernel, using the patchkit, so I may keep current. The problem is that >I haven't found out how to do this yet... :-( I've read the man page for If you also have etc01 installed and all you want is to install the patch kit, it is very easy (otherwise you currently need to selectively apply patches that don't patch etc01 stuff...). I'll assume that you have seen Terry Lambert's FAQ and Nate William's FAQ (both on agate and gatekeeper). Install the _whole_ kit (iALL - currently 58 patches ) as per the instructions. Some patches cause problems on some systems, hopefully yours it not one of them... Ignore Terry's warning because you have to put an option line in your config file to enable code like the Danpex patch. You might want to first recompile /usr/src/bin/csh since it crashes easily as distributed: # su # cd /usr/src/bin/csh && make && make install # exit <=== re-login with new csh # su # cd /usr/src/usr.sbin/config # make && make install # cd /usr/src/sbin/init # vi init.c [add a semicolon at end of line 234, so it reads: "while (wait(&status) != pid);"] # make && make install # cd /sys/i386/conf # vi GENERICISA <=== or use SYSTEM_NAME [change com1 to com0 and com2 to com1 - I also change IO_COM[12] to IO_COM[01] here and in /sys/i386/isa/isa.h as well (?) To run X, add "options XSERVER" near the top; you might also want to increase the number of pty's (one per xterm). To use the kernel debugger, add the line: "pseudo-device ddb"] # config GENERICISA # cd /sys/compile/GENERICISA # make depend # make # cp 386bsd /386bsd.pl58 # mv /386bsd.pl58 /386bsd # cksum 386bsd /386bsd <=== verify copied OK # chown root /386bsd # chgrp wheel /386bsd # chmod 755 /386bsd # sync; sync # shutdown -r now # cd /sys/compile/GENERICISA # make clean # make <=== recompile to correctly install the math_emulate.c patch (?) # cp 386bsd /386bsd.pl58 # mv /386bsd.pl58 /386bsd etc and reboot At this point, might want to look at /sys/ROADMAP. You should also rebuild /usr/src. Adrian Hall's procedure (below) works for me. If in addition you fix the HUGE constant in math.h from 1e500 to: #define HUGE_VAL 1.79769313486231570e+308 you can recompile awk. Hope that's all... -Andrew Moore <alm@netcom.com> Here are Adrian's instructions: From: adrian@ibmpcug.co.uk (Adrian Hall) Newsgroups: comp.unix.bsd Subject: Getting /usr/src to compile on 386BSD Message-ID: <Bv1xpz.IKx@ibmpcug.co.uk> Date: 23 Sep 92 22:13:10 GMT Organization: The IBM PC User Group, UK. Lines: 94 This is a list of things I had to do so that make works from /usr/src. It is not comprehensive, and by no means authoritive, and not in any particular order. You are advised to read the entire list if you are going to use it. (1) Remove the references to lib and include in /usr/src/Makefile. They need to be made before the programs, so either put them at the start or remove them. (2) Edit /usr/share/mk/*.mk so that install does a install -c instead of an install without a -c. You will find re-compiles a whole lot quicker :) (3) Do not re-compile libg++, g++, gcc, gas, gdb or groff. (1) Its a waste of time, and (2) they come up with errors when you compile them. (e.g. try (cd lib/libg++ ; make depend ; make ; make install) to see what I mean). [These seem to compile OK if you don't run make depend, but I don't know the implications of not doing so... -AM] (4) Similarly, dont compile tn3270. It has bugs in the makefiles that I dont want to fiddle with, and there are no patches to it (yet.) [Again, seems to compile if you don't run make depend and change reference in api/makefile from <386bsd.lib.mak> to <bsd.lib.mak> -AM] (5) When doing a 'make depend', keep it in the foreground, since when it comes to 'expr', you have to press ctrl-D to get it to continue. (6) BEFORE DOING ANYTHING, type the following line :- mkdir -p `find /usr/src -exec ls -l {} \; | awk '{print $10}'` This makes all the obj directories that are missing. (7) You need to link /usr/include/vm to /sys/vm in order to compile ktrace (and possibly a couple of others). (8) I also moved all manual pages to /usr/share/man/man* and removed the manual page creation stuff from the /usr/share/mk/* files. You can then use catman (grabbed from one of the /usr/othersrc/public catman files and slightly modified) to create the cat* files if you so desire. If you are short on space, this might be a good idea. (9) Dont forget to add in netstat and tset to the list [netstat is installed by the patch kit, but not tset - get this from agate, for instance - AM] of subdirs in usr.bin/Makefile to get these made as well (The sources are on agate in one of the unofficial subdirectories). (10) Dont forget to apply all the patches :) (11) I got the message 'Program cc1 got fatal signal 6.' when compiling awk, so I left that out as well. If anyone has a fix for this, let me know, and I will put it in. [The math.h patch above fixes this -AM] (12) Make sure you have put in the DES code if you want it in (/usr/386bsd.errata/crypt.instructions explains how to get the crypt code into your library. Remember you are going to be re-compiling it though!). Once all these have been done, it is a case of typing :- cd /usr/src make depend (go get a pizza, preferably in another coutry). make (go get another pizza, preferably on another continent). make install (see make depend). On my system, crond and crontab came up with lots of warnings. They dont seem to have suffered as a consequence, so I guess you can ignore them. How rachel.ibmpcug.co.uk anonymous ftp is laid out. I have put my entire source tree and share tree up for anonymous ftp. In addition my current kernel (all drivers included and fully patched), and configuration are in the top level directory. Anything that I have installed for local use is kept in src/local (sources only). If you think looking at any other files will be useful, please let me know. A dist.fs and fixit.fs with fully patched kernels will appear sometime in the very near future.