How to build gpio-sim kernel module without build entire kernel

hello all,

i have a very specific build that does not have this kernel module but i need it, if compatible, so i can simulate gpio pin banks.

for modern fedora it’s already there, but i’ll need it for some older versions or even other red-hat compatible systesm.

anyone can point me the correct path on this? thanks in advance.

A web search for “how to build a linux kernel module” lead me this linux doc Building External Modules — The Linux Kernel documentation

Added f39, kernel-modules, rpm