NetBSD Problem Report #7895
From Received: (qmail 15133 invoked from network); 2 Jul 1999 19:10:30 -0000
Received: from fb.sa.enteract.com (207.229.133.236)
by redmail.netbsd.org with SMTP; 2 Jul 1999 19:10:30 -0000
Message-Id: <199907021827.NAA26587@fb.sa.enteract.com>
Date: Fri, 2 Jul 1999 13:27:17 -0500 (CDT)
From: Frederick Bruckman <fb@enteract.com>
Reply-To: fb@enteract.com
To: gnats-bugs@gnats.netbsd.org
Subject: kernel build fails, netbsd-mac68k-1.4-release
X-Send-Pr-Version: 3.95
>Number: 7895
>Category: port-mac68k
>Synopsis: kernel build fails, netbsd-mac68k-1.4-release
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: port-mac68k-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jul 02 12:20:01 +0000 1999
>Closed-Date: Sat Aug 14 14:40:14 +0000 1999
>Last-Modified: Sat Aug 14 15:18:55 +0000 1999
>Originator: Frederick Bruckman
>Release: NetBSD-release, 07/02/1999 sup
>Organization:
>Environment:
System: NetBSD corwin.home 1.4 NetBSD 1.4 (CORWIN) #11:
Wed Jun 9 12:36:02 CDT 1999 root@:
/usr/src/sys/arch/mac68k/compile/CORWIN mac68k
>Description:
kernel make fails as follows:
cc -O2 -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-main -msoft-float -I. -I../../../../arch -I../../../.. -nostdinc -DHZ="0x3c" -DSETUIDSCRIPTS -DM68040 -DFPSP -DLKM -DDIAGNOSTIC -DMAXUSERS=16 -D_KERNEL -Dmac68k -c ../../../../arch/mac68k/mac68k/machdep.c
../../../../arch/mac68k/mac68k/machdep.c: In function `setmachdep':
../../../../arch/mac68k/mac68k/machdep.c:2210: `base' undeclared (first use in this function)
../../../../arch/mac68k/mac68k/machdep.c:2210: (Each undeclared identifier is reported only once
../../../../arch/mac68k/mac68k/machdep.c:2210: for each function it appears in.)
../../../../arch/mac68k/mac68k/machdep.c:2216: `sccA' undeclared (first use in this function)
../../../../arch/mac68k/mac68k/machdep.c: In function `mac68k_set_io_offsets':
../../../../arch/mac68k/mac68k/machdep.c:2313: `sccA' used prior to declaration
*** Error code 1
Stop.
>How-To-Repeat:
sup; config; make build
>Fix:
machdep.c v1.227.2.2 looks to be completely bogus, as if
an already applied patch was reapplied with fuzz. With the
machdep.c in the 1.4 release (v1.227.2.1) the kernel at
least builds, but still does not boot. (Hangs after
"On-board video at...", numbers all the same as good kernel.)
>Release-Note:
>Audit-Trail:
From: Allen Briggs <briggs@ninthwonder.com>
To: Frederick Bruckman <fb@enteract.com>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-mac68k/7895: kernel build fails, netbsd-mac68k-1.4-release
Date: Fri, 2 Jul 1999 18:51:30 -0400
> kernel make fails as follows:
> ../../../../arch/mac68k/mac68k/machdep.c: In function `setmachdep':
> ../../../../arch/mac68k/mac68k/machdep.c:2210: `base' undeclared (first use in this function)
> [...]
> *** Error code 1
>
> Stop.
It looks like one of the pullups was broken for some reason. Please try
the following patch. If it works for you, I will submit it as another
pullup for the branch.
Index: machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/mac68k/mac68k/machdep.c,v
retrieving revision 1.227.2.2
diff -c -r1.227.2.2 machdep.c
*** machdep.c 1999/07/01 15:37:09 1.227.2.2
--- machdep.c 1999/07/02 22:49:23
***************
*** 2204,2220 ****
mac68k_machine.zs_chip = 0;
/* Disable everything but PM; we need it. */
via_reg(VIA1, vIER) = 0x6f; /* disable VIA1 int */
-
- /* The following two may be overridden. */
- /* Are we disabling something important? */
- SCSIBase = base + 0xf000;
-
via_reg(VIA2, vIER) = 0x7f; /* disable VIA2 int */
if (cputype == CPU_68040)
mac68k_machine.sonic = 1;
break;
- sccA = (volatile u_char *)base + 0xc020;
- break;
case MACH_CLASSDUO:
/*
* The Duo definitely does not use a VIA2, but it looks
--- 2204,2213 ----
***************
*** 2329,2339 ****
--- 2322,2339 ----
switch (current_mac_model->class) {
case MACH_CLASSQ:
Via1Base = (volatile u_char *)base;
+
+ /* The following two may be overridden. */
+ /* Are we disabling something important? */
+ SCSIBase = base + 0xf000;
+
sccA = (volatile u_char *)base + 0xc000;
switch (current_mac_model->machineid) {
case MACH_MACQ900:
case MACH_MACQ950:
mac68k_machine.scsi96_2 = 1;
+ sccA = (volatile u_char *)base + 0xc020;
+ break;
case MACH_MACQ700:
break;
default:
From: Frederick Bruckman <fb@enteract.com>
To: Allen Briggs <briggs@ninthwonder.com>
Cc: Frederick Bruckman <fb@enteract.com>, gnats-bugs@gnats.netbsd.org
Subject: Re: port-mac68k/7895: kernel build fails, netbsd-mac68k-1.4-release
Date: Fri, 2 Jul 1999 18:01:08 -0500 (CDT)
On Fri, 2 Jul 1999, Allen Briggs wrote:
> > kernel make fails as follows:
> > ../../../../arch/mac68k/mac68k/machdep.c: In function `setmachdep':
> > ../../../../arch/mac68k/mac68k/machdep.c:2210: `base' undeclared (first use in this function)
> > [...]
> > *** Error code 1
> >
> > Stop.
>
> It looks like one of the pullups was broken for some reason. Please try
> the following patch. If it works for you, I will submit it as another
> pullup for the branch.
Well, I already blew that file away, but your patch looks like it
should at least let it build. I can't really test the Classic stuff
anyway. The 840AV not booting seems to be another thing altogether...
From: Allen Briggs <briggs@ninthwonder.com>
To: Frederick Bruckman <fb@enteract.com>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-mac68k/7895: kernel build fails, netbsd-mac68k-1.4-release
Date: Fri, 2 Jul 1999 23:24:59 -0400
> Well, I already blew that file away, but your patch looks like it
> should at least let it build. I can't really test the Classic stuff
> anyway. The 840AV not booting seems to be another thing altogether...
I'll try to compile a 1.4 branch kernel and submit any pullups necessary
to get it to build. I'm going on vacation, though, so I won't be able
to do more testing than this before leaving...
-allen
From: Frederick Bruckman <fb@enteract.com>
To: Allen Briggs <briggs@ninthwonder.com>
Cc: Frederick Bruckman <fb@enteract.com>, Scott Reynolds <scottr@og.org>,
gnats-bugs@gnats.netbsd.org
Subject: Re: port-mac68k/7895: kernel build fails, netbsd-mac68k-1.4-release
Date: Sat, 10 Jul 1999 06:38:36 -0500 (CDT)
On Fri, 2 Jul 1999, Allen Briggs wrote:
> I'll try to compile a 1.4 branch kernel and submit any pullups necessary
> to get it to build. I'm going on vacation, though, so I won't be able
> to do more testing than this before leaving...
OK, now it builds. Boot still hangs early. It looks like another patch
thing, this time in locore.s! The following fixes that...
*** locore.s.orig Fri Jul 2 07:24:37 1999
--- locore.s Sat Jul 10 05:29:42 1999
***************
*** 1488,1494 ****
Lm68881rdone:
frestore a0@ | restore state
rts
- rts
/*
* delay() - delay for a specified number of microseconds
--- 1488,1493 ----
***************
*** 1533,1538 ****
--- 1532,1538 ----
swap d0 | return the longword result
orl d1,d0
Ldelayexit:
+ rts
/*
* Handle the nitty-gritty of rebooting the machine.
From: Allen Briggs <briggs@ninthwonder.com>
To: Frederick Bruckman <fb@enteract.com>
Cc: Scott Reynolds <scottr@og.org>, gnats-bugs@gnats.netbsd.org
Subject: Re: port-mac68k/7895: kernel build fails, netbsd-mac68k-1.4-release
Date: Sat, 10 Jul 1999 10:43:29 -0400
Scott, can you take care of this? I'm leaving for a week-long camping
trip in a few minutes and can't take care of it until after the 18th.
He who screwed up the pullup for this and machdep.c wants a clean pullup
regenerated instead of a patch to the broken revision. At least, that's
what he wanted for machdep.c. I don't know how the pullups got messed
up. I generated a clean patch for machdep with
cvs diff -c -rrev1 -rrev2 machdep.c
where rev1 and rev2 were the revisions listed in the original pullup
request.
-allen
> OK, now it builds. Boot still hangs early. It looks like another patch
> thing, this time in locore.s! The following fixes that...
>
> *** locore.s.orig Fri Jul 2 07:24:37 1999
> --- locore.s Sat Jul 10 05:29:42 1999
> ***************
> *** 1488,1494 ****
> Lm68881rdone:
> frestore a0@ | restore state
> rts
> - rts
>
> /*
> * delay() - delay for a specified number of microseconds
> --- 1488,1493 ----
> ***************
> *** 1533,1538 ****
> --- 1532,1538 ----
> swap d0 | return the longword result
> orl d1,d0
> Ldelayexit:
> + rts
>
> /*
> * Handle the nitty-gritty of rebooting the machine.
State-Changed-From-To: open->closed
State-Changed-By: fredb
State-Changed-When: Sat Aug 14 09:40:14 CDT 1999
State-Changed-Why:
Fixed in time for 1.4.1. Thanks all!
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.