Subject: port-newsmips/6657: kernel for NetBSD/newsmips can't be compiled due to undefined variable
To: None <gnats-bugs@gnats.netbsd.org>
From: None <h-masuda@jm3spa.felix.or.jp>
List: netbsd-bugs
Date: 12/27/1998 16:50:01
>Number:         6657
>Category:       port-newsmips
>Synopsis:       kernel for NetBSD/newsmips can't be compiled due to undefined variable
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 27 00:05:01 1998
>Last-Modified:
>Originator:     Hideo Masuda <h-masuda@jm3spa.felix.or.jp>
>Organization:
	Amature Radio Station "JM3SPA" & Future Engineering Laboratory of Internet conneXion
>Release:        NetBSD-current source 19981227
>Environment:
	
System: NetBSD kiyomi.jm3spa.felix.or.jp 1.3I NetBSD 1.3I (KIYOMI) #3: Sun Dec 27 16:22:54 JST 1998 h-masuda@kiyomi.jm3spa.felix.or.jp:/usr/src/sys/arch/newsmips/compile/KIYOMI newsmips

>Description:
	kernel for NetBSD/newsmips can't be compiled due to undefined variable.

ld -N -Ttext 80001000 -e start -G0 -T ../../conf/kern.ldscript -x -o netbsd ${SYSTEM_OBJ} vers.o
autoconf.o: In function `cpu_rootconf':
../../../../arch/newsmips/newsmips/autoconf.c(.text+0xd0): undefined reference to `dev_name2blk'
../../../../arch/newsmips/newsmips/autoconf.c(.text+0xd4): undefined reference to `dev_name2blk'
*** Error code 1

Stop.

>How-To-Repeat:
	cd sys/arch/newsmips/conf
	config GENERIC
	cd ../compile/GENERIC
	make depend ; make
>Fix:
	apply following patch, may be.

*** sys/arch/newsmips/newsmips/autoconf.c-dist	Fri Sep  4 20:12:02 1998
--- sys/arch/newsmips/newsmips/autoconf.c	Wed Dec 16 15:34:10 1998
***************
*** 81,86 ****
--- 81,94 ----
  
  void	findroot __P((struct device **, int *));
  
+ struct devnametobdevmaj newsmips_nam2blk[] = {
+ 	{ "sd",		0 },
+ #if	0
+ 	{ "md",		XXX },
+ #endif
+ 	{ NULL,		0 },
+ };
+ 
  /*
   * Determine mass storage and memory configuration for a machine.
   * Print cpu type, and then iterate over an array of devices
***************
*** 124,130 ****
  	printf("boot device: %s\n",
  	       booted_device ? booted_device->dv_xname : "<unknown>");
  
! 	setroot(booted_device, booted_partition, dev_name2blk);
  }
  
  u_long	bootdev = 0;		/* should be dev_t, but not until 32 bits */
--- 132,138 ----
  	printf("boot device: %s\n",
  	       booted_device ? booted_device->dv_xname : "<unknown>");
  
! 	setroot(booted_device, booted_partition, newsmips_nam2blk);
  }
  
  u_long	bootdev = 0;		/* should be dev_t, but not until 32 bits */
>Audit-Trail:
>Unformatted: