Subject: kern/30733: Atheros WiFi support is not included in the amd64 kernel configuration files
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <jking@deadpixi.com>
List: netbsd-bugs
Date: 07/12/2005 03:42:00
>Number:         30733
>Category:       kern
>Synopsis:       Atheros WiFi support is not included in the amd64 kernel configuration files
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 12 03:42:00 +0000 2005
>Originator:     Rob King
>Release:        3.0_BETA
>Organization:
>Environment:
NetBSD dustpuppy.deadpixi.com 3.99.7 NetBSD 3.99.7 (DUSTPUPPY) #1: Mon Jul 11 17:49:54 CDT 2005  root@dustpuppy.deadpixi.com:/usr/src/sys/arch/amd64/compile/DUSTPUPPY amd64


>Description:
The Atheros WiFi driver is available for NetBSD amd64 but is not included by default in the kernel configuration files.
>How-To-Repeat:
Install the system.
>Fix:
Use the following patch:

diff -Nurp conf.orig/Makefile.amd64 conf/Makefile.amd64
--- conf.orig/Makefile.amd64    2005-07-11 22:35:48.000000000 -0500
+++ conf/Makefile.amd64 2005-07-11 22:27:48.000000000 -0500
@@ -103,6 +103,25 @@ clock.o: config_time.h

 %RULES

+# XXX - Ugly, but make doesn't easily handle .o.uue (assumes it's a suffix)
+# XXX - Also, config has no simple was to just add foo.o to the Makefile.
+#       It needs a pathname of some sort for "object"
+.if !empty(OBJS:M\/athhal-x86_64-elf.hal.o)
+OBJS:=${OBJS:C/\/athhal-x86_64-elf.hal.o/athhal-x86_64-elf.hal.o/}
+
+.PATH: $S/contrib/arch/amd64/dev
+ATH_UUDEC?=    @${_MKSHMSG} "uudecode ${.CURDIR:T}/${.TARGET}"; \
+               ${_MKSHECHO}\
+               ${UUDECODE} -p $> \> ${.TARGET}; \
+               rm -f ${.TARGET}; \
+               ${UUDECODE} -p $> > ${.TARGET}
+athhal-x86_64-elf.hal.o: athhal-x86_64-elf.hal.o.uue
+       ${ATH_UUDEC}
+all depend:    opt_ah.h
+opt_ah.h:      athhal-x86_64-elf.opt_ah.h
+       ln -s ${.ALLSRC} ${.TARGET}
+.endif
+
 ##
 ## (9) port independent kernel machinery
 ##
diff -Nurp conf.orig/files.amd64 conf/files.amd64
--- conf.orig/files.amd64       2005-07-11 22:35:48.000000000 -0500
+++ conf/files.amd64    2005-07-11 22:28:11.000000000 -0500
@@ -179,4 +179,7 @@ include     "dev/ieee1394/files.ieee1394"
 include "dev/acpi/files.acpi"
 file   arch/amd64/acpi/acpi_wakeup.c   acpi

+# Atheros 5210/5211/5212 Hardware Abstraction Layer (HAL)
+object  /athhal-i386-elf.hal.o  ath
+
 include        "arch/amd64/conf/majors.amd64"