Forum Discussion
Altera_Forum
Honored Contributor
20 years agoProblem creating external module
Hi!
I'm trying to build an external module, to use with insmod, and I'm getting some errors. I'm quite sure it is some type of Makefile error, but I haven't been able to find an example to follow it. My Makefile isTOPDIR = ..
include $(TOPDIR)/Rules.mak
PROJ_NAME = XXX_driver
INSTALL_DIR =
SRCDIR = $(TOPDIR)/drv
INCDIR = $(TOPDIR)/inc
OBJ = $(SRCDIR)/$(PROJ_NAME).o
CFLAGS += -I$(INCDIR) -D__KERNEL__ -DCONFIG_MODVERSIONS
all: $(OBJ)
clean:
-rm -f $(OBJ) *. and I'm getting include errors such: c:/altera/kits/nios2q50/bin/eclipse/plugins/com.microtronix.nios2linux.uClibc_1.4.0/include/linux/config.h:4:28: linux/autoconf.h: No such file or directory I've seen that the linux/autoconf.h is in the build directory, but I haven't been able to include it in any correct way. Does anybody have a working Makefile to generate external modules? Thank you Alex1 Reply
- Altera_Forum
Honored Contributor
It is sead before and I will say it again:
Developing Linux is done under Linux. Follow the guide at the nios wiki (http://nioswiki.jot.com) and make a nice development environment under linux. Developing a userspace program under Windoze is difficult, developing a kernel module is worse. You can simply download the binary toolchain and start programming. Search the forum for a the Makefile. I recently posted the Makefile (and method)I always use to write my kernel modules for the NiosII. Hope this helps!