Subject: Re: Atheros .o-file placement
To: David Young <dyoung@pobox.com>
From: Jaromir Dolecek <jdolecek@NetBSD.org>
List: tech-kern
Date: 09/14/2003 10:02:45
Typical bikeshed discussion, but here it is :)

First of all, since the stuff goes to src/contrib/sys, you can
just use same layout as FreeBSD for files there, i.e. subdirectory
dev/ath/ with no further changes. If you are going to rename
files, please use 'ath' as prefix or something along 'athhal' if that's
more appropriate.

What I describe further would be normal layout for in-tree drivers.

All stuff describing HW structures and registers goes to FOOreg.h, so:

ah.h, ah_desc.h, ah_devid.h -> dev/ic/athhalreg.h

The code goes to FOO.c, i.e:
ah_osdep.c -> ic/athhal.c

Driver structures and defines go to FOOvar.h, i.e.:

ah_osdep.h, version.h -> ic/athhalvar.h

Rest of files:
opt_ah.h - should be just folded into ah_osdep.c - only used there
ah_if.m -> dev/ic/ath_if.m probably or perhaps dev/ic/athhal_if.m - don't
     what it's used for
i386-elf.hal.o.uu - given the function it would go to dev/microcode/ath/,
     perhaps as dev/microcode/ath/athhal.i386-elf.o (IMHO no uuencoding
     is necessary, just checkin with -kb)

Then the actual device driver files (from FreeBSD src/sys/dev/ath/)
should go like:
if_ath.c -> dev/ic/ath.c
if_ath_pci.c -> dev/pci/if_ath_pci.c
if_athvar.h -> dev/ic/athvar.h 
if_athioctl.h -> folded into dev/ic/athvar.h

Jaromir

David Young wrote:
> (This time w/o tabs.)
>  
> Thanks for the input. This new layout answers most concerns.
> 
> FreeBSD src/sys/contrib     -->     NetBSD src/contrib/sys
> -----------------------             ----------------------
> dev/ath/COPYRIGHT                   dev/ic/hal-COPYRIGHT
> dev/ath/README                      dev/ic/hal-README
> dev/ath/ah.h                        dev/ic/hal_ah.h   
> dev/ath/ah_desc.h                   dev/ic/hal_ah_desc.h 
> dev/ath/ah_devid.h                  dev/ic/hal_ah_devid.h
> dev/ath/version.h                   dev/ic/hal_version.h
> dev/ath/freebsd/ah_osdep.c          dev/ic/hal_ah_osdep.c
> dev/ath/freebsd/ah_osdep.h          dev/ic/hal_ah_osdep.h
> dev/ath/freebsd/ah_if.m             dev/ic/hal_ah_if.m
> dev/ath/freebsd/opt_ah.h            arch/i386/dev/elf.opt_ah.h
> dev/ath/freebsd/i386-elf.hal.o.uu   arch/i386/dev/elf.hal.o.uu
> 
> Just to be perfectly clear, the **FreeBSD layout** is in the left
> column, and the NetBSD layout is in the right column. Note that I add
> src/contrib/sys/ to NetBSD instead of src/sys/contrib/.
> 
> Dave
> 
> -- 
> David Young             OJC Technologies
> dyoung@ojctech.com      Urbana, IL * (217) 278-3933
> 

-- 
Jaromir Dolecek <jdolecek@NetBSD.org>            http://www.NetBSD.cz/
-=- We should be mindful of the potential goal, but as the tantric    -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow.   Do not let this distract you.''     -=-