не компилится модуль ядра 2.6.10 Slackware10.1. Вот сам модуль: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //файл 1.с #include <linux/module.h> #include <linux/kernel.h> int init_module(void){ printk("<1>Hello, world\n"); return 0; }; void cleanup_module(void){ printk("<1>GoodBye, cruel world\n"); } MODULE_LICENSE("GPL"); +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ вот makefile для него под ядро 2.4: FLAGS = -c -Wall -D__KERNEL__ -DMODULE PARAM = -I/lib/modules/$(shell uname -r)/build/include hello_knz.o: hello_knz.c $(CC) $(FLAGS) $(PARAM) -o $@ $^ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Если его скомпилить, то получиться 1.о. При его компиляции никаких ошибок не выскакивает. Если же сделать makefile(см. ниже), чтобы скомпилить модуль 1.ко, то выскакивает куча ошибок ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //makefile для 2.6 obj-m := 1.o KDIR := /lib/modules/$(shell uname -r)/build PWD := $(shell pwd) default: $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules +++++++++++++++++++++++++++++++++++++++++++++++++ ошибки: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/signal.h: In function `sigfindinword': include/linux/signal.h:71: warning: implicit declaration of function `ffz' include/linux/signal.h: At top level: include/linux/signal.h:106: error: parse error before '*' token include/linux/signal.h:106: warning: function declaration isn't a prototype include/linux/signal.h: In function `sigorsets': include/linux/signal.h:106: error: `_NSIG_WORDS' undeclared (first use in this f include/linux/signal.h:106: error: `a' undeclared (first use in this function) include/linux/signal.h:106: error: `b' undeclared (first use in this function) include/linux/signal.h:106: error: `r' undeclared (first use in this function) include/linux/signal.h: At top level: include/linux/signal.h:109: error: parse error before '*' token include/linux/signal.h:109: warning: function declaration isn't a prototype include/linux/signal.h: In function `sigandsets': include/linux/aio_abi.h:76: error: parse error before "aio_reqprio" include/linux/aio_abi.h:76: warning: type defaults to `int' in declaration of `a include/linux/aio_abi.h:76: warning: data definition has no type or storage clas known include/linux/stat.h:68: error: storage size of `atime' isn't known include/linux/stat.h:69: error: storage size of `mtime' isn't known include/linux/stat.h:70: error: storage size of `ctime' isn't known make[2]: *** [/home/fuzz/Modules/1.o] Ошибка 1 make[1]: *** [_module_/home/fuzz/Modules] Ошибка 2 make[1]: Leaving directory `/usr/src/linux-2.6.10' make: *** [default] Ошибка 2 root@mops:/home/fuzz/Modules# ССылки все вроде правильно указаны. В чем же тогда дело?