Solved Device "atacard" is unknown

BabylonAS

New Member

Reaction score: 1
Messages: 8

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.
 

Crivens

Moderator
Staff member
Moderator

Reaction score: 1,606
Messages: 2,486

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.
 

k.jacker

Aspiring Daemon

Reaction score: 469
Messages: 740

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....
 
OP
B

BabylonAS

New Member

Reaction score: 1
Messages: 8

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.
 
Top