Subject: Re: kernel compilation problems
To: Chris Jones <jones@cs.montana.edu>
From: Dave Leonard <d@s160828.slip.cc.uq.edu.au>
List: macbsd-general
Date: 04/17/1995 18:39:09
> Well, I finally broke down and decided to compile my own kernel. But
> it doesn't like me.
>
> # make
> [...]
>
> loading netbsd
> locore.o: Undefined symbol `bsun' referenced from text segment
> *** Error code 1
>
> Stop.
>
>
> Did I forget to get something important?
Don't know if its anything you did, but if you are using the -current(?)
stuff read the READMEs in the supkit distribution and you'll find a
clause that reads something like "the dist you get is not guaranteed to work
or even compile"
On a different tack, I compiled up my own gcc and have been buidling the
mac68k kernel and get "Undefined symbol '_memcpy'", which I fixed with the
following patch. ALthough its old, it still does the job. A similar patch
was found in the sparc distribution (I think), and the reason it occurs
is because gcc does structure assignments using memcpy(). (and structure
passing too I think)
d
--begin-memcpy.patch--------------------------------------------------
Patch to add memcpy() to locore so that gcc will compile
the NetBSD/mac68k kernel
Dave Leonard Sun Feb 19 07:54:09 EST 1995 d@fnarg.net.au
*** sys/arch/mac68k/mac68k/locore.s.orig Wed Feb 8 21:12:56 1995
--- sys/arch/mac68k/mac68k/locore.s Sun Feb 19 07:12:36 1995
***************
*** 2358,2363 ****
--- 2355,2364 ----
Lcmpdone:
rts
+ ENTRY(memcpy)
+ movl sp@(4),a1
+ movl sp@(8),a0
+ bra Lmembcopy
/*
* {ov}bcopy(from, to, len)
*
***************
*** 2365,2374 ****
*/
ALTENTRY(ovbcopy, _bcopy)
ENTRY(bcopy)
- movl sp@(12),d0 | get count
- jeq Lcpyexit | if zero, return
movl sp@(4),a0 | src address
movl sp@(8),a1 | dest address
cmpl a1,a0 | src before dest?
jlt Lcpyback | yes, copy backwards (avoids overlap)
movl a0,d1
--- 2366,2376 ----
*/
ALTENTRY(ovbcopy, _bcopy)
ENTRY(bcopy)
movl sp@(4),a0 | src address
movl sp@(8),a1 | dest address
+ Lmembcopy:
+ movl sp@(12),d0 | get count
+ jeq Lcpyexit | if zero, return
cmpl a1,a0 | src before dest?
jlt Lcpyback | yes, copy backwards (avoids overlap)
movl a0,d1
--end-memcpy.patch------------------------------------------
--
David Leonard BE(Comp)/BCompSc 5th year student
The University of Queensland s160828@student.uq.edu.au