Hello.
I would like to build the sata_nv kernel module for AlmaLinux 10.1 but without building everything.
When I follow these steps it builds the sata_nv.ko file properly in drivers/ata from source root directory, but it takes 20GB and 5 hours of build to build everything:
cd /root
dnf group install “Development Tools” -y
dnf -y builddep kernel
#- Download and extract the kernel SRPM sources directory
dnf -y download --source kernel
rpm -ivh kernel-.src.rpm
cd /root/rpmbuild
rpmbuild -bp /root/rpmbuild/SPECS/kernel.spec
#- Change to newly extracted root source directory
cd /root/rpmbuild/BUILD/kernel-*/linux-*/
#- Take back current .config as working basis
cp /boot/config-$(uname -r) .config
make oldconfig
#- Make menuconfig and add the NVIDIA SATA driver in console menu
make menuconfig
#- Generate all modules listed in .config
make clean
make modules
This works fine.
But my aim is to generate the drivers/ata/sata_nv.ko module without the need to build everything, only the drivers/ata kernel modules, so it would be much quicker to build.
Hence I tried to do these following steps, which work fine on an already built rpmbuild directory of 20 GB with “make modules”:
make M=drivers/ata
But doing them without the whole “make modules” or “make bzImage” commands before, it does not work:
make clean
make prepare
make M=drivers/ata
As a result I get those errors:
CC [M] drivers/ata/ata_generic.o
CC [M] drivers/ata/pata_legacy.o
MODPOST drivers/ata/Module.symvers
WARNING: Module.symvers is missing.
Modules may not have dependencies or modversions.
You may get many unresolved symbol errors.
You can set KBUILD_MODPOST_WARN=1 to turn errors into warning
if you want to proceed at your own risk.
ERROR: modpost: “strncasecmp” [drivers/ata/libata.ko] undefined!
What am I doing wrong please, or what needs to be added for only the drivers/ata modules to be built without all the rest, so that it would be much quicker to build ?
