Solved Device "atacard" is unknown

Hello everyone! (To admins: if you feel there is a better place for this thread, go ahead and move it.)

During my new attempt to recompile the kernel for my old ThinkPad X31 laptop I have left the following lines for minimal ATA support (without dozens of unneeded controllers):
Code:
device atacore
device atacard
device atapci
device ataintel
On compilation, the make command announces that “Device "atacard" is unknown” and fails, yet the “device atacard” instruction is present (if commented out) in /usr/src/sys/conf/NOTES, and there is source code at /usr/src/sys/dev/ata/ata-card.c. Removing the line makes reading CompactFlash cards (SD cards aren’t supported by my laptop directly, so I have to use an adapter) impossible. I’m recompiling the FreeBSD kernel not for the first time, but this is the first time I am meddling with modular ATA support instead of the all-encompassing “device ata” instruction.
 
The kernel build process will build all drivers no matter what. What impacts them is "option"s in the config file. When the device is not listed, it is still build but not linked into the kernel. You can still load what you want as a module, even the ata/ahci drivers, from the boot loader. I once tried to make a streamlined kernel, doing this, but gave up since the benefit is so small you barely notice.
 
IMHO most kernel build problems arise from removing apparently legacy buses for a device.
According to ata(4), device ata isn't a bus or device itself, but seems to be the base for all other ata devices to sit upon.
Code:
           ata_load="YES"

           atacard_load="YES"
           ataisa_load="YES"
           atapci_load="YES"

           ....
                      
     The first line is for the common hardware independent code, and is a prerequisite for
     the other modules.  The next three lines are generic bus-specific drivers....
 
yuripv said:
Guessing on the sys/conf/files contents, it should be atapccard instead.
Thank you! I have fixed that string, and the compilation (not counting other problems that I have managed to go over) has worked.
 
Back
Top