Can not build kernel with modular ata and ATA_CAM

Mitya mitya at cabletv.dp.ua
Mon Jun 25 09:38:09 UTC 2012


My kernel options:

# Bus support.
device          acpi
device          pci

# Modular ATA
device          atadisk         # ATA disk drives
device          atacore         # Core ATA functionality
device          atapci          # PCI bus support; only generic chipset 
support
device          ataintel        # Intel

options         ATA_CAM         # Handle legacy controllers with CAM
options         ATA_STATIC_ID   # Static device numbering

# ATA/SCSI peripherals
device          scbus           # SCSI bus (required for ATA/SCSI)
device          da              # Direct Access (disks)
device          pass            # Passthrough device (direct ATA/SCSI 
access)

make's output:

ata-disk.o: In function `ad_init':
ata-disk.c:(.text+0x7d): undefined reference to `ata_setmode'
ata-disk.c:(.text+0x95): undefined reference to `ata_wc'
ata-disk.c:(.text+0xc9): undefined reference to `ata_controlcmd'
ata-disk.c:(.text+0x11b): undefined reference to `ata_controlcmd'
ata-disk.c:(.text+0x16d): undefined reference to `ata_controlcmd'
ata-disk.c:(.text+0x1b6): undefined reference to `ata_controlcmd'
ata-disk.o: In function `ad_shutdown':
ata-disk.c:(.text+0x258): undefined reference to `ata_controlcmd'
ata-disk.o: In function `ad_detach':
ata-disk.c:(.text+0x479): undefined reference to `ata_fail_requests'
ata-disk.o: In function `ad_dump':
ata-disk.c:(.text+0x861): undefined reference to `ata_drop_requests'
ata-disk.c:(.text+0x921): undefined reference to `ata_controlcmd'
ata-disk.o: In function `ad_attach':
ata-disk.c:(.text+0xa40): undefined reference to `ata_setmax'
ata-disk.c:(.text+0xb62): undefined reference to `ata_satarev2str'
ata-disk.c:(.text+0xba7): undefined reference to `ata_unit2str'
ata-disk.c:(.text+0xfff): undefined reference to `ata_queue_request'
ata-disk.c:(.text+0x131e): undefined reference to `ata_queue_request'
ata-disk.c:(.text+0x1340): undefined reference to `ata_getparam'
ata-disk.o: In function `ad_spindown':
ata-disk.c:(.text+0x539): undefined reference to `ata_queue_request'
ata-disk.o: In function `ad_ioctl':
ata-disk.c:(.text+0x5a4): undefined reference to `ata_device_ioctl'
ata-disk.o: In function `ad_strategy':
ata-disk.c:(.text+0x6c7): undefined reference to `ata_queue_request'
*** [kernel] Error code 1

I found differences in ata-all.c and ata-all.h

In ata-all.c:
#ifndef ATA_CAM
void
ata_setmode(device_t dev)
{

But, in ata-all.h:
void ata_setmode(device_t dev);

without any #ifdef or #ifndef









More information about the freebsd-stable mailing list