README.FreeBSD

1) Change the 'OS=linux' line in Makefile to 'OS=FreeBSD'

2) gmake

3) gmake install

4) Compile the kernel mode driver into your FreeBSD Kernel:
- cd /sys/i386/conf
- Append 'device vpb' to your kernel configuration file (e.g. MYKERNEL)
- Create a file: /sys/i386/conf/files.youkernelname, e.g. files.MYKERNEL.  Add
the text 'pci/vpb.c      optional vpb' to this file.
- /usr/sbin/config MYKERNEL 
- cd ../../compile/MYKERNEL
- make depend
- make
- make install
- reboot 
- check 'dmseg | more' - you should see "V4PCI 0 found!"

5) 'mknod /dev/vpb0 c 201 0'

6) cd to unittest, gmake, try ./echo (V4PCI) - see echo.cpp for instructions


David Rowe
12/12/01

Additional notes on compiling and using the driver with FreeBSD.

1) See:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-building

for better info on building the FreeBSD kernel.

2) When building a new kernel, the convention is to copy GENERIC to another
file, such as MYKERNEL (/sys/i386/conf).  When you copy the file, don't
forget to change the line:

ident GENERIC 

to:

ident MYKERNEL

and then add:

device vpb

3) If the new kernel wont boot, you can boot an old kernel from the boot loader
command line, e.g.:

boot kernel.GENERIC

if you have saved your generic kernel as kernel.GENERIC

or

boot kernel.old

which is the default name the FreeBSD kernel build process uses for the
previous kernel.

4) Use:

pciconf -l

to see a list of PCI devices and drivers.  The V4PCI driver will come up as 
"nonex" where x is a number (0,1,23, etc).  The device ID should be 0x10b5.

5) Don't forget to use gmake rather than make.  Note that gmake is not 
installed by default on many FreeBSD systems.
 
