# how to add source files into the kernel



## kingbear (Nov 18, 2016)

Hi, everybody

Recently, I have been trying to add a new folder which contain .c and .h files into the /sys directory, and I also modified the /sys/conf/files and /sys/conf/OPTIONS. However when I build the kernel, those files in the added folder were not compiled. I am looking for someone's help.

More specifically, I try to add the dynamic routing module into the kernel, the folder is named 'dsr'. I read this https://forums.freebsd.org/threads/3695/, and try to create the Makefile, but it does not work. I am not familiar to the kernel building and confused how to make the .c files in the dsr compiled

Thanks.


----------



## wblock@ (Nov 18, 2016)

Please be specific.  What were you trying to add?  Which files were modified and how?


----------

