Forum Discussion
Altera_Forum
Honored Contributor
21 years agoIn the kernel tree ( should be something like "C:\altera\kits\nios2\bin\eclipse\plugins\com.microtronix.nios2linux.kernel_0.1.5\linux-2.6.x\drivers" but it depends on where you installed the NIOS IDE) add your driver code files to the appropriate directory (char for instance if you are writing a char driver).
In the makefile for that directory add the object file for your driver to the line "obj-y += ..." (eg if your code is in mydrv.c you should put mydrv.o at the end of that line). Compile your kernel as usual. This will get you going, but this will put your driver directly in the kernel (it will not be a module). To add modules or make your driver appear in the kernel configuration menu you will have to ask again. Tuck