FreeBSD 8.4 and Adaptec 6405 driver

The problem is that FreeBSD 8.4 has no driver for Adaptec 6405. Now I can install the driver in the following steps:

  • Put the driver for Adaptec 6405 in installation disk (boot/modules and loader.conf). So I can boot from the install disk and start the installation.
  • After the installation is complete sysinstall will put on the system that driver for Adpatec Adapted that can see the disk with 6405. And in this case I have a solution with load aacu.ko after load kernel from Escape to Loader Prompt. And it is works fine.
But I think about creating my own installation disk, that will install the correct driver for Freebsd FreeBSD 8.4.
So, I take the Freebsd FreeBSD 8.4 installation disk:
  • cd /mnt/iso/8.4-RELEASE/src && ./install.sh all
  • cd /usr/src/sys/dev/aac && ls
    Code:
     aac.c
     aac_cam.c
     aac_debug.c
     aac_disk.c
     aac_linux.c
     aac_pci.c
     aac_tables.h
     aacreg.h
     aacvar.h
  • rm *
  • Download the driver from Adaptec at http://www.adaptec.com/en-us/speed/raid ... 42_tgz.htm
  • tar -xzf aac8x-amd64.tgz && ls
    Code:
     +CONTENTS
     +COMMENT
     +DESC
     +POST-INSTALL
     +POST-DEINSTALL
     aacu.ko
     aac.c
     aac_cam.c
     aac_compat.h
     aac_debug.c
     aac_ioctl.h
     aac_linux.c
     aac_pci.c
     aac_tables.h
     aacreg.h
     aacvar.h
     aac_fwdb.c
     aac_fwdb.h
  • In /usr/src/sys/conf/files
    Delet line:
    Code:
    dev/aac/aac_disk.c               optional aac
    Add:
    Code:
    dev/aac/aac_fwdb.c             optional aac
  • create a file for the new kernel named RAID (copy from GENERIC)
  • cd /usr/src/ && make buildkernel KERNCONF=RAID
    Code:
    rm -f .newdep
    make -V CFILES -V SYSTEM_CFILES -V GEN_CFILES |  MKDEP_CPP="cc -E" CC="cc" xargs mkdep -a -f .newdep -O2 -frename-registers -pipe -fno-strict-aliasing  -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/ipfilter -I/usr/src/sys/contrib/pf -I/usr/src/sys/dev/ath -I/usr/src/sys/dev/ath/ath_hal -I/usr/src/sys/contrib/ngatm -I/usr/src/sys/dev/twa -I/usr/src/sys/gnu/fs/xfs/FreeBSD -I/usr/src/sys/gnu/fs/xfs/FreeBSD/support -I/usr/src/sys/gnu/fs/xfs -I/usr/src/sys/dev/cxgb -I/usr/src/sys/dev/cxgbe -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector
    make -V SFILES |  MKDEP_CPP="cc -E" xargs mkdep -a -f .newdep -x assembler-with-cpp -DLOCORE -O2 -frename-registers -pipe -fno-strict-aliasing  -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/ipfilter -I/usr/src/sys/contrib/pf -I/usr/src/sys/dev/ath -I/usr/src/sys/dev/ath/ath_hal -I/usr/src/sys/contrib/ngatm -I/usr/src/sys/dev/twa -I/usr/src/sys/gnu/fs/xfs/FreeBSD -I/usr/src/sys/gnu/fs/xfs/FreeBSD/support -I/usr/src/sys/gnu/fs/xfs -I/usr/src/sys/dev/cxgb -I/usr/src/sys/dev/cxgbe -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector
    rm -f .depend
    mv .newdep .depend
    cd /usr/src/sys/modules; MAKEOBJDIRPREFIX=/usr/obj/usr/src/sys/RAID/modules KMODDIR=/boot/kernel DEBUG_FLAGS="-g" MACHINE=amd64 KERNBUILDDIR="/usr/obj/usr/src/sys/RAID" SYSDIR="/usr/src/sys" make  depend
    ===> aac (depend)
    @ -> /usr/src/sys
    machine -> /usr/src/sys/amd64/include
    make: don't know how to make aac_disk.c. Stop
    *** Error code 2
    
    Stop in /usr/src/sys/modules.
    *** Error code 1
    
    Stop in /usr/obj/usr/src/sys/RAID.
    *** Error code 1
    
    Stop in /usr/src.
    *** Error code 1
    
    Stop in /usr/src.
As I understand correctly, this driver can't be added in GENERIC with this method? Can I try to find another way?
 
Back
Top