From owner-freebsd-questions@FreeBSD.ORG Sun Aug 27 14:40:40 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8DFA816A4DA for ; Sun, 27 Aug 2006 14:40:40 +0000 (UTC) (envelope-from stapleton.41@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7829F43D72 for ; Sun, 27 Aug 2006 14:40:39 +0000 (GMT) (envelope-from stapleton.41@gmail.com) Received: by ug-out-1314.google.com with SMTP id m2so1464446uge for ; Sun, 27 Aug 2006 07:40:38 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Cv1cug5S+qryqk5hA/jCHdCzi4NPoftQoC4aFjBbVck0bsP3zoHq9fr84BEJ+EieCk0h0fik2TTI5etY6TTnifACvF4nKZDSUctlT/ocrh6wluWyBnsgoox5bRgTry93nLmmKiaCHb2U3d9RlneHsV/Ilpz8tmuDgDrlHzuWMBI= Received: by 10.66.216.6 with SMTP id o6mr3156694ugg; Sun, 27 Aug 2006 07:40:38 -0700 (PDT) Received: by 10.67.98.16 with HTTP; Sun, 27 Aug 2006 07:40:38 -0700 (PDT) Message-ID: <80f4f2b20608270740n5a37114fu94d4c2d93974f6d6@mail.gmail.com> Date: Sun, 27 Aug 2006 10:40:38 -0400 From: "Jim Stapleton" To: freebsd-questions@freebsd.org In-Reply-To: <80f4f2b20608252018x625b0ed6nb4f4e2dc977b57ee@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <80f4f2b20608251820s71e79b1ega357fb9e909cbc3f@mail.gmail.com> <6.0.0.22.2.20060825203026.026ed5b8@mail.computinginnovations.com> <80f4f2b20608252018x625b0ed6nb4f4e2dc977b57ee@mail.gmail.com> Subject: Re: driver source compilation question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Aug 2006 14:40:40 -0000 I found something I can use, but I have some errors, I've no clue how to deal with: Makefile: ============================================ .PATH: /usr/src/sys/dev/sound/pci;. KMOD = snd_hdac SRCS = device_if.h bus_if.h isa_if.h pci_if.h mixer_if.h SRCS += hdac.c #KMODDEPS = snd_pcm # Uncomment the KMODDEPS line on older 4.n and 5.n FreeBSD systems. .include ============================================ pre-compile directory contents: ============================================ sjss@aragorn 10:34:35 (0) ~/Desktop/hdac > ls -R .: @@ bus_if.h hda_reg.h hdac.c hdac_private.h isa_if.h mixer_if.h Makefile device_if.h hdac/ hdac.h hdac_reg.h machine@ pci_if.h ./hdac: hdac.h hdac_private.h ============================================ post-compile attempt contents ============================================ sjss@aragorn 10:35:40 (0) ~/Desktop/hdac > ls -lR .: total 196 lrwxr-xr-x 1 sjss wheel 12 Aug 27 10:32 @ -> /usr/src/sys/ -rw-r--r-- 1 sjss wheel 241 Aug 27 10:16 Makefile -rw-r--r-- 1 sjss wheel 25769 Aug 27 10:32 bus_if.h -rw-r--r-- 1 sjss wheel 10913 Aug 27 10:32 device_if.h -rw-r--r-- 1 sjss wheel 54518 Jul 5 12:49 hda_reg.h drwxr-xr-x 2 sjss wheel 512 Aug 27 10:16 hdac/ -rw-r--r-- 1 sjss wheel 62590 Jul 17 16:52 hdac.c -rw-r--r-- 1 sjss wheel 2688 Jun 8 14:26 hdac.h -rw-r--r-- 1 sjss wheel 9088 Jun 8 14:26 hdac_private.h -rw-r--r-- 1 sjss wheel 11065 Jun 8 14:26 hdac_reg.h -rw-r--r-- 1 sjss wheel 2022 Aug 27 10:32 isa_if.h lrwxr-xr-x 1 sjss wheel 25 Aug 27 10:32 machine -> /usr/src/sys/i386/include/ -rw-r--r-- 1 sjss wheel 2375 Aug 27 10:32 mixer_if.h -rw-r--r-- 1 sjss wheel 4641 Aug 27 10:32 pci_if.h ./hdac: total 14 -rw-r--r-- 1 sjss wheel 2688 Aug 27 10:16 hdac.h -rw-r--r-- 1 sjss wheel 9088 Aug 27 10:16 hdac_private.h ============================================ System info ============================================ sjss@aragorn 10:36:21 (0) ~/Desktop/hdac > uname -a FreeBSD aragorn.ameritech.net 6.1-STABLE FreeBSD 6.1-STABLE #1: Mon Jul 24 16:10:27 EDT 2006 root@:/usr/obj/usr/src/sys/JIMKERN i386 ============================================ Compile results: ============================================ sjss@aragorn 10:35:35 (0) ~/Desktop/hdac > make Warning: Object directory not changed from original /home/sjss/Desktop/hdac cc -O2 -msse -msse2 -msse3 -mfpmath=sse,387 -fomit-frame-pointer -ffloat-store -march=pentium-m -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I- -I. -I@ -I@/contrib/altq -I@/../include -finline-limit=8000 -fno-common -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -c hdac.c In file included from @/dev/sound/pcm/sound.h:93, from hdac.c:29: @/dev/sound/pcm/channel.h:69:24: channel_if.h: No such file or directory hdac.c:1857: error: `channel_init_desc' undeclared here (not in a function) hdac.c:1857: error: initializer element is not constant hdac.c:1857: error: (near initialization for `hdacchan_methods[0].desc') hdac.c:1857: error: initializer element is not constant hdac.c:1857: error: (near initialization for `hdacchan_methods[0]') hdac.c:1858: error: `channel_setformat_desc' undeclared here (not in a function) hdac.c:1858: error: initializer element is not constant hdac.c:1858: error: (near initialization for `hdacchan_methods[1].desc') hdac.c:1858: error: initializer element is not constant hdac.c:1858: error: (near initialization for `hdacchan_methods[1]') hdac.c:1859: error: `channel_setspeed_desc' undeclared here (not in a function) hdac.c:1859: error: initializer element is not constant hdac.c:1859: error: (near initialization for `hdacchan_methods[2].desc') hdac.c:1859: error: initializer element is not constant hdac.c:1859: error: (near initialization for `hdacchan_methods[2]') hdac.c:1860: error: `channel_setblocksize_desc' undeclared here (not in a function) hdac.c:1860: error: initializer element is not constant hdac.c:1860: error: (near initialization for `hdacchan_methods[3].desc') hdac.c:1860: error: initializer element is not constant hdac.c:1860: error: (near initialization for `hdacchan_methods[3]') hdac.c:1861: error: `channel_trigger_desc' undeclared here (not in a function) hdac.c:1861: error: initializer element is not constant hdac.c:1861: error: (near initialization for `hdacchan_methods[4].desc') hdac.c:1861: error: initializer element is not constant hdac.c:1861: error: (near initialization for `hdacchan_methods[4]') hdac.c:1862: error: `channel_getptr_desc' undeclared here (not in a function) hdac.c:1862: error: initializer element is not constant hdac.c:1862: error: (near initialization for `hdacchan_methods[5].desc') hdac.c:1862: error: initializer element is not constant hdac.c:1862: error: (near initialization for `hdacchan_methods[5]') hdac.c:1863: error: `channel_getcaps_desc' undeclared here (not in a function) hdac.c:1863: error: initializer element is not constant hdac.c:1863: error: (near initialization for `hdacchan_methods[6].desc') hdac.c:1863: error: initializer element is not constant hdac.c:1863: error: (near initialization for `hdacchan_methods[6]') hdac.c:1864: error: initializer element is not constant hdac.c:1864: error: (near initialization for `hdacchan_methods[7]') *** Error code 1 ============================================ Line 1587 of hdac.c: KOBJMETHOD(channel_init, hdacchan_init), channel_init is not described anywhere, but I noticed that several other driver files in the kernel tree use soemthing like this also - I'm assuming that I'm missing something in the makefile, but I cant figure out what. Any help is appreciated. Thank you, -Jim Stapleton