driver source compilation question
Jim Stapleton
stapleton.41 at gmail.com
Sun Aug 27 14:40:40 UTC 2006
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 <bsd.kmod.mk>
============================================
pre-compile directory contents:
============================================
sjss at 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 at 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 at 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 at 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
More information about the freebsd-questions
mailing list