Configuring the kernel is the hard part. The Gentoo Handbook used to be (and probably still is) a good first documentation on the topic: https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Kernel#Default:_Manual_configuration (forget about all blocks but those marked with "KERNEL").
Compiling is (quite) easy:
https://trisquel.info/en/wiki/compiling-gnu-linux-libre-kernel
- [Trisquel-users] kernel compiling dgosborn
- [Trisquel-users] Re : kernel compiling lcerf