Subject: Snapshot report - 12 Feb tar_files
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Simon J. Gerraty <sjg@zen.void.oz.au>
List: current-users
Date: 02/20/1994 23:16:54
Snapshot report.
================
This is _very_ brief as Alistair G. Crook has already said just about
all that is needed and I haven't finished upgrading yet :-)

I have just a couple of points that may be useful to others who have
not updated their -current in several weeks (I was running Nov20).

Source: tar_files, 12th February 1994, from agate.berkeley.edu
Upgrade from previous -current: yes, Nov 20 tar_files from
agate.berkeley.edu

Machine specifics: 486DX/33, 16MB RAM, 120Mb IDE, 380Mb SCSI, 535Mb SCSI, VGA card

Any problems during make:

Luke Mewburn mentioned a problem with lib/librpcsrv/src I had the same
thing.  I'm sure some one mentioned an alternative solution (I could
find a mail message containing it though).  In anycase Luke's got me
going.  For /bin/sh or ksh uers:

$ cd lib/librpcsrv/src
$ /bin/ls -1 *.x | sed 's,\(.*\)\.x,make -f ../Makefile \1.h,' | sh

I used the following script to build various directories (like
gas,gcc etc).


:
# buildem.sh
cmd="$1"; shift

for f in $*
do
  ( cd $f
    echo "$f ==> '$cmd'"
    eval $cmd
  )
done

example:

cd /usr/src
NOPROFILE=NOPROFILE
NOPIC=NOPIC
NOMAN=NOMAN
LDSTATIC=-static
MACHINE_ARCH=`uname -m`

export LDSTATIC NOMAN NOPIC NOPROFILE MACHINE_ARCH

buildem.sh "make && make install" include share/mk lib/libc gnu/lib/libmalloc 
buildem.sh "make && make install" usr.bin/make usr.bin/tsort
buildem.sh "make && make install" gnu/usr.bin/gas gnu/usr.bin/ld gnu/usr.bin/gcc2

note that the new tsort (newer than Nov20) was needed to be able to
link gcc.

Also with NOPIC set, we don't get a new ld.so so after unseting
LDSTATIC et al and installing the new shared libs you need to make in
ld again.

unset NOPIC LDSTATIC NOMAN NOPROFILE

buildem.sh "make && make install" lib gnu/lib
LDSTATIC=-static
buildem.sh "make && make install"  gnu/usr.bin/ld

Which will install a new ld.so to match the new shared libs -
otherwise nothing happens :-)

Then just back to normal build process. 

Oh yes, and I'm running a new kernel which is now clean except for my
LP_SIMPLE_PROBE hack (below for those that have trouble with
lptprobe())

*** sys/arch/i386/isa/lpt.c.orig	Thu Feb 10 22:13:40 1994
--- sys/arch/i386/isa/lpt.c	Sun Feb 20 21:13:22 1994
***************
*** 128,133 ****
--- 128,134 ----
  #define TOUT		(1<<5)	/* timeout while not selected	*/
  #define INIT		(1<<6)	/* waiting to initialize for open */
  
+ #ifndef LP_SIMPLE_PROBE
  /*
   * Internal routine to lptprobe to do port tests of one byte value
   */
***************
*** 215,220 ****
--- 216,271 ----
  	outb(dvp->id_iobase+lpt_control, 0);
  	return (status);
  	}
+ #else	/* LP_SIMPLE_PROBE */
+ 
+ /*
+  * lptprobe()
+  *	Probe for hardware
+  *	
+  *	This is the original lpt.c probe routine.
+  *	On many systems (possibly due to cheap cables :-) the more
+  *	complex probe above, fails to detect a printer.
+  *	If this happens, add
+  *	options "LP_SIMPLE_PROBE"
+  *	to your kernel config to get this one instead.
+  */
+ lptprobe(idp)
+ 	struct isa_device *idp;
+ {   
+ 	unsigned v, w, n = 0;
+ 
+ 	/* status */
+ 	do {
+ 		if (++n >= 4)
+ 			return (0);
+ 
+ 		/*
+ 		 * Status port should be read only,
+ 		 * so readback value may not change
+ 		 */
+ 		outb(idp->id_iobase+lpt_status,0xf0);
+ 		v = inb(idp->id_iobase+lpt_status);
+ 		outb(idp->id_iobase+lpt_status,0);
+ 		w = inb(idp->id_iobase+lpt_status);
+ 	} while (v != w);
+ 
+ 	/* control: the lower 5 bits of controlport should read back */
+ /*
+ 	outb(idp->id_iobase+lpt_control,0xff);
+ 	DELAY(100);
+ 
+ 	w = inb(idp->id_iobase+lpt_control);
+ 	if ((w ^ 0xff) & LPC_MASK) return(0);
+ 
+ 	outb(idp->id_iobase+lpt_control,0);
+ 	DELAY(100);
+ 	w = inb(idp->id_iobase+lpt_control);
+ 	if ((w ^ 0xe0) & LPC_MASK)
+ 		return(0);
+ */
+ 	return(1);
+ }
+ #endif
  
  lptattach(isdp)
  	struct isa_device *isdp;
*** sys/arch/i386/isa/lpa.c.orig	Thu Feb 10 22:13:40 1994
--- sys/arch/i386/isa/lpa.c	Sun Feb 20 21:16:53 1994
***************
*** 137,142 ****
--- 137,143 ----
  	 *sc_inbuf;
  } lpa_sc[NLPA];
  
+ #ifndef LP_SIMPLE_PROBE
  /*
   * Internal routine to lpaprobe to do port tests of one byte value
   */
***************
*** 225,230 ****
--- 226,282 ----
  	return (status);
  	}
  
+ #else	/* LP_SIMPLE_PROBE */
+ 
+ /*
+  * lpaprobe()
+  *	Probe for hardware
+  *	
+  *	This is the original lpt.c probe routine.
+  *	On many systems (possibly due to cheap cables :-) the more
+  *	complex probe above, fails to detect a printer.
+  *	If this happens, add
+  *	options "LP_SIMPLE_PROBE"
+  *	to your kernel config to get this one instead.
+  */
+ lpaprobe(idp)
+ 	struct isa_device *idp;
+ {   
+ 	unsigned v, w, n = 0;
+ 
+ 	/* status */
+ 	do {
+ 		if (++n >= 4)
+ 			return (0);
+ 
+ 		/*
+ 		 * Status port should be read only,
+ 		 * so readback value may not change
+ 		 */
+ 		outb(idp->id_iobase+lpt_status,0xf0);
+ 		v = inb(idp->id_iobase+lpt_status);
+ 		outb(idp->id_iobase+lpt_status,0);
+ 		w = inb(idp->id_iobase+lpt_status);
+ 	} while (v != w);
+ 
+ 	/* control: the lower 5 bits of controlport should read back */
+ /*
+ 	outb(idp->id_iobase+lpt_control,0xff);
+ 	DELAY(100);
+ 
+ 	w = inb(idp->id_iobase+lpt_control);
+ 	if ((w ^ 0xff) & LPC_MASK) return(0);
+ 
+ 	outb(idp->id_iobase+lpt_control,0);
+ 	DELAY(100);
+ 	w = inb(idp->id_iobase+lpt_control);
+ 	if ((w ^ 0xe0) & LPC_MASK)
+ 		return(0);
+ */
+ 	return(1);
+ }
+ #endif
+   	
  /*
   * lpaattach()
   *	Install device




------------------------------------------------------------------------------