I’m trying to compile the SATA support for the BPI-W2 as a loadable kernel module. I’ve modified the kconfig file to build the SATA mdoules (libata) and Realteck AHCI module (ahci_rtk) as loadable kernel modules. I’ve built the kernel and run it on my banana pi board, and when it boots, I can see that the modules have loaded with the lsmod command. When I power the attached SATA drives, though, they do not show up as block devices. Issuing the lsblk command does not return and SATA drives.
If I compile the kernel with those modules built in, everything seems to work, and I can see attached SATA drives have been enumerated as block devices when they are powered. If anyone has a possible solution for this, I would greatly appreciate it, before I have to get elbow deep in some kernel code.
Also, for the project I’m using the banana pi for, I do need to be able to unload and load the SATA support modules, so I can’t always have them built into the kernel.