This message was posted on behalf of Intel Corporation
Thanks for your interest in the Intel® Galileo Platform.
That is a very challenging project and will need a lot of work on it. Currently, the kernel modifications are out of our support scope, however, we would like to suggest you to take a look at this thread: https://communities.intel.com/message/323424#323424, there you can find the instructions to build Vanilla kernel version 4, however, you can use that instructions to add any other kernel, remember, you will need to add all the dependencies (you can look at the BSP Build Guide, section 6, for it) and in order to add full functionality to the Galileo you have to append every driver needed and also any other additional drivers you may need.
Hope this information helps.