Forum Discussion
Altera_Forum
Honored Contributor
21 years agoMakefile for simple linux device driver
Hello everyone, i'm trying to write a device driver. It is an external driver. It should be load with insmod in an running system. My problem is, that i cannot build the module (I sta...
Altera_Forum
Honored Contributor
21 years agooh geez... I'm so sorry... I didn't even see the -O in the example Makefile I gave. That was a mistake on my part. Sorry for that.
The line should read: $(MAKE) -C $(KERNELDIR) M=`pwd` O=$(BUILDDIR) modules aie. That should be what you need. The MODPOST error is due to "dos linefeeds" in the Modules.symvers file (in your kernel build directory). So you'll need to run the file through dos2unix.