Subject: port-evbmips/31911: desire move of yamon from evbmips to master mips
To: None <port-evbmips-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <garrett_damore@tadpole.com>
List: netbsd-bugs
Date: 10/25/2005 00:08:01
>Number:         31911
>Category:       port-evbmips
>Synopsis:       desire move of yamon from evbmips to master mips
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-evbmips-maintainer
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 25 00:08:00 +0000 2005
>Originator:     Garrett D'Amore
>Release:        -current (3.99.10)
>Organization:
Tadpole Computer, Inc.
>Environment:
NetBSD cabernet 3.99.10 NetBSD 3.99.10 (PB1000) #17: Mon Oct 24 14:32:47 PDT 2005  garrett@zippy:/home/garrett/work/meteor/netbsd/src/sys/arch/evbmips/compile/obj/PB1000 evbmips

>Description:
Right now the yamon support is localized in the evbmips port.  However, other ports might like to use this, since the yamon code is basically just generic MIPS code.  I have a port called "aumips" (updated port for the Alchemy SoCs) that needs it.

It is much more convenient for other ports which use yamon if the yamon code is centralized.

>How-To-Repeat:

>Fix:
I'm not sure how to represent file moves using cvs diff, so here are the changes:

mkdir src/sys/arch/mips/yamon
mv src/sys/arch/evbmips/evbmips/yamon.c src/sys/arch/mips/yamon
mv src/sys/arch/evbmips/include/yamon.h src/sys/arch/mips/include

<cvs add/remove steps omitted>

You then have to replace evbmips/include/yamon.h with a file like this:
---> start <----
/*      $NetBSD$        */

#include <mips/yamon.h>
----> fini <----

I seem to recall that pretty much everything that needs to include yamon.h does it by <machine/yamon.h>, so this takes care of it.

The final step are diffs to the files.pb1000 and files.malta files in the src/sys/arch/evbmips/conf directories: the yamon.c file has moved, so they should each be changed to read:

file    arch/mips/yamon/yamon.c

(Hmm... perhaps there should be a files.yamon file that gets included, it might be "cleaner".  I leave that decision to the port maintainer.)