Forum Discussion
Altera_Forum
Honored Contributor
20 years agoLittle Driver Module
Hello! I want to compile this little programm: #include <linux/module.h># include <linux/kernel.h># include <linux/init.h>
static int __init hello_init(void)
{
printk("---------...
Altera_Forum
Honored Contributor
20 years agoHi Lothar,
you nearly got it, you need to change it a little bit ifneq ($(KERNELRELEASE),)# kbuild part of makefile obj-m := driver.o else# Normal Makefile KERNELDIR := $(KERNEL_PLUGIN)/linux-2.6.x all:: $(MAKE) -C $(KERNELDIR) M=`pwd` endif KERNEL_PLUGIN is the installationpath of the linux distro Best Regards