Subject: port-hp300/610: hp300 swapgeneric too picky
To: None <gnats-admin@sun-lamp.cs.berkeley.edu>
From: Jason R. Thorpe <thorpej@mail.CS.ORST.EDU>
List: netbsd-bugs
Date: 12/03/1994 19:35:05
>Number:         610
>Category:       port-hp300
>Synopsis:       hp300 swapgeneric too picky
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec  3 19:35:02 1994
>Originator:     
>Organization:
--------------------------------------------------------------------------
Jason R. Thorpe               thorpej@cs.orst.edu                 758-2003
OJGSE NERO Project               CSWest Room 5                    737-5567
Shared Computing Environment Group         http://www.cs.orst.edu/~thorpej

>Release:        1.0
>Environment:
	
System: NetBSD helix 1.0 NetBSD 1.0 (HELIX) #48: Sun Nov 27 19:46:19 PST 1994 thorpej@helix:/usr/src/sys/arch/hp300/compile/HELIX hp300


>Description:
	The hp300 swapgeneric code requires that both rddriver and sddriver
	be included in the kernel.  This is wrong for any machine which
	may have only hpib or scsi, but would like the capability of
	mounting any disk as root and/or swapping to any disk.

	The problem manifests itself as an undefined symbol
	`sddriver' or `rddriver' when linking the kernel.

>How-To-Repeat:
	Configure only hpib or scsi disks in your kernel and try to use
	swapgeneric.
	
>Fix:
	Apply the following patch to .../hp300/hp300/swapgeneric.c

*** swapgeneric.c.1	Sat Dec  3 18:29:24 1994
--- swapgeneric.c	Sat Dec  3 18:29:38 1994
***************
*** 42,47 ****
--- 42,50 ----
  
  #include "../dev/device.h"
  
+ #include "sd.h"
+ #include "rd.h"
+ 
  /*
   * Generic configuration;  all in one
   */
***************
*** 55,62 ****
--- 58,69 ----
  };
  int	dmmin, dmmax, dmtext;
  
+ #if NRD > 0
  extern	struct driver rddriver;
+ #endif
+ #if NSD > 0
  extern	struct driver sddriver;
+ #endif
  extern struct hp_ctlr hp_cinit[];
  extern struct hp_device hp_dinit[];
  
***************
*** 65,72 ****
--- 72,83 ----
  	char	*gc_name;
  	dev_t	gc_root;
  } genericconf[] = {
+ #if NRD > 0
  	{ (caddr_t)&rddriver,	"rd",	makedev(2, 0),	},
+ #endif
+ #if NSD > 0
  	{ (caddr_t)&sddriver,	"sd",	makedev(4, 0),	},
+ #endif
  	{ 0 },
  };
  
>Audit-Trail:
>Unformatted: