Subject: Binpatch [Was: NetBSD-current boot problems]
To: netbsd <amiga@NetBSD.ORG>
From: Michael L. Hitch <>
List: amiga
Date: 04/30/1995 10:42:14
On Apr 30,  6:21am, "'Most Excellent' Eric Mehlhaff" wrote:
> Berndt Josef Wulf <> recently wrote:
> >Also using the binpatch supplied in 
> >/sys/arch/amiga/stand/binpatch/binpatch doesn't seem to work.
> >After binpatch -s _retina_default_mon -r /netbsd the system
> >will crash on bootup with the following message:
> >
> >panic: config_attach: duplicate clock0
> >stopped at 0x80c6e: unlk a6
> >
> >I am able to binpatch the kernel when in ADOS!!!
> >
> I'd like to know the reason for this too.  It looks to me like binpatch
> hasn't worked except in ados since the off_t changes.     I tried to fix
> it myself, but couldn't get it working.   Of course, in netbsd you can hack
> the kernel source, and can thus patch things from there -- but in most cases
> binpatch can be a lot faster than a kernel recompile...

  When you compile binpatch under NetBSD, it uses the NetBSD include
files for the macros to determine the addresses/offsets in the
executable.  The NetBSD macros do not seem to generate the correct
values for the kernel (which is an NMAGIC executable).  I think the
separate binpath distribution (on & mirrors) has
it's own include files that appear to be modified so that binpatch works
correctly.  [The separate binpatch distribution should also include
a NetBSD executable that should work properly.]


Michael L. Hitch			INTERNET:
Computer Consultant
Office of Systems and Computing Services
Montana State University	Bozeman, MT	USA