I am trying to compile a Kernel with SATA_AHCI and MARVELL Support for Ubuntu 20.04lts to run on a Raspberry Pi Compute Module 4. I have succeeded in doing this using RaspiOS. My SATA PCI Card with a 4 disk ZFS RaidZ2 Pool works fine.

sda           8:0    1  1.8T  0 disk 
├─sda1        8:1    1  1.8T  0 part 
└─sda9        8:9    1    8M  0 part 
sdb           8:16   1  1.8T  0 disk 
├─sdb1        8:17   1  1.8T  0 part 
└─sdb9        8:25   1    8M  0 part 
sdc           8:32   1  1.8T  0 disk 
├─sdc1        8:33   1  1.8T  0 part 
└─sdc9        8:41   1    8M  0 part 
sdd           8:48   1  1.8T  0 disk 
├─sdd1        8:49   1  1.8T  0 part 
└─sdd9        8:57   1    8M  0 part 
mmcblk0     179:0    0   29G  0 disk 
├─mmcblk0p1 179:1    0  256M  0 part /boot
└─mmcblk0p2 179:2    0 28.7G  0 part /

I have been using Gentoo for a good 20 years, so very familiar with building Kernels. I followed this excellent plan. I have enabled CONFIG_ATA_GENERIC, CONFIG_SATA_AHCI, CONFIG_SATA_MV in the config. The build fails with a missing libahci module:

Debug: module-check-raspi
II: Checking modules for raspi...
   reading new modules...read 4271 modules.
   reading old modules...
      MISS: libahci
      read 4272 modules : new(0)  missing(1)
EE: Missing modules (start begging for mercy)
make: *** [debian/rules.d/4-checks.mk:10: module-check-raspi] Error 1

I cannot find why this has failed. The drivers seem to be there as shown by this:

**find ~/kbuild/ -iname libahci***


Any ideas much appreciated.

----------------------------- EDIT ---------------------------------

By chance I have discovered that the latest 64bit RaspiOS has built in SATA support. This is the 2021-05-07-raspios-buster-arm64-lite image. Therefore I am able to rescue my ZFS Pool and get going without messing about trying to compile kernels!

1 Answer 1


I had this same problem and after a lot of trial and error I think I know what fixed it for me. I was following the ubuntu Build Your Own Kernel wiki that made use of the fakeroot debian/rules editconfigs command which brings up a GUI for editing the config. I used this to enable CONFIG_SATA_AHCI but what I didn't know was that there are different methods for "enabling" it. I initially picked Y to "include" the module and during compile I had the same error: MISS: libahci.

When I compared my config changes to the PR that enabled SATA in the raspberry pi kernel I noticed that they used M to "modularize" include it. I started over and picked M in the GUI and then my kernel compiled without errors.

I believe it's possible to edit the configs without using the editconfigs GUI and if that's the case just make sure you use m instead of y.

I noticed the OP didn't mention what value they picked for their configs, just that they "have enabled ... CONFIG_SATA_AHCI ... in the config" so maybe this was also the issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .