[DRM] Build via.ko on FreeBSD

Hi!
I try building via.ko (from git) on FreeBSD (I try CURRENT and 7.2)
I have some errors:
Code:
router# make
Warning: Object directory not changed from original /root/drm/bsd-core/via
@ -> /usr/src/sys
machine -> /usr/src/sys/i386/include
awk -f @/tools/makeobjops.awk @/kern/device_if.m -h
awk -f @/tools/makeobjops.awk @/kern/bus_if.m -h
awk -f @/tools/makeobjops.awk @/dev/pci/pci_if.m -h
touch opt_drm.h
echo  >> opt_drm.h
echo "#define DRM_LINUX 1" >> opt_drm.h
cc -O2 -fno-strict-aliasing -pipe   -D_KERNEL -DKLD_MODULE -std=c99 -nostdinc  -I. -I.. -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -mno-align-long-strings -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c /root/drm/bsd-core/via/../via_dma.c
In file included from /root/drm/bsd-core/via/../via_dma.c:40:
/root/drm/bsd-core/via/../via_drv.h:27:22: error: drm_sman.h: No such file or directory
/root/drm/bsd-core/via/../via_dma.c:117:12: error: macro "msleep" requires 5 arguments, but only 1 given
/root/drm/bsd-core/via/../via_dma.c: In function 'via_cmdbuf_wait':
/root/drm/bsd-core/via/../via_dma.c:117: error: 'msleep' undeclared (first use in this function)
/root/drm/bsd-core/via/../via_dma.c:117: error: (Each undeclared identifier is reported only once
/root/drm/bsd-core/via/../via_dma.c:117: error: for each function it appears in.)
*** Error code 1

Stop in /root/drm/bsd-core/via.
router# find /root/ -name drm_sman.h
/root/drm/linux-core/drm_sman.h

need 2 files:
Code:
drm_sman.h
drm_hashtab.h

If I create symlinks from linux-core
Code:
cd ../
router# ln -s /root/drm/linux-core/drm_hashtab.h
router# ln -s /root/drm/linux-core/drm_sman.h

I have another error:
Code:
router# pwd
/root/drm/bsd-core/via
router# make
Warning: Object directory not changed from original /root/drm/bsd-core/via
awk -f @/tools/makeobjops.awk @/kern/device_if.m -h
awk -f @/tools/makeobjops.awk @/kern/bus_if.m -h
awk -f @/tools/makeobjops.awk @/dev/pci/pci_if.m -h
touch opt_drm.h
echo  >> opt_drm.h
echo "#define DRM_LINUX 1" >> opt_drm.h
cc -O2 -fno-strict-aliasing -pipe   -D_KERNEL -DKLD_MODULE -std=c99 -nostdinc  -I. -I.. -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -mno-align-long-strings -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c /root/drm/bsd-core/via/../via_dma.c
In file included from /root/drm/bsd-core/via/../drm_sman.h:43,
                 from /root/drm/bsd-core/via/../via_drv.h:27,
                 from /root/drm/bsd-core/via/../via_dma.c:40:
/root/drm/bsd-core/via/../drm_hashtab.h:41: error: field 'head' has incomplete type
/root/drm/bsd-core/via/../via_dma.c:117:12: error: macro "msleep" requires 5 arguments, but only 1 given
/root/drm/bsd-core/via/../via_dma.c: In function 'via_cmdbuf_wait':
/root/drm/bsd-core/via/../via_dma.c:117: error: 'msleep' undeclared (first use in this function)
/root/drm/bsd-core/via/../via_dma.c:117: error: (Each undeclared identifier is reported only once
/root/drm/bsd-core/via/../via_dma.c:117: error: for each function it appears in.)
*** Error code 1

Stop in /root/drm/bsd-core/via.
router#

How I can build it?
 
sorry, from freedesktop.org git
Code:
git clone git://anongit.freedesktop.org/git/mesa/drm
 
Code:
Warning: Object directory not changed from original /root/drm/bsd-core/via
??
==========
no chance for FreebSD?
very sadly...
In my company 70% vga cards - via.
It's very slow without drm =(
 
For future reference to anyone who might stumble upon this thread... The DRM drivers for FreeBSD are no longer maintained in the freedesktop git repo (nor are the DRM drivers for linux, for that matter). They are maintained directly in the FreeBSD svn repo, now.

This means that if FreeBSD doesn't have DRM available for a GPU, it's not going to be available in a separate tree.

Adam

EDIT: I just spoke with the BSD DRM maintainer on irc. He does not have any VIA hardware. The old via DRM is dead, and the new code requires TTM (a memory manager). It's unlikely the VIA DRM will make it to FreeBSD till he gets hardware to work with.
 
You will want to contact rnoland@ . He is the FreeBSD DRM maintainer. Youc an either e-mail him directly or often find him on the Freenode network on IRC, with the username 'rnoland' (on #dri-devel).
 
Back
Top