Вообщем решил в целях повышения образованности почитать ldd. Прочёв
первую часть, перешёл ко второй, где был самый простой модуль.
$ cat hello.c
#define MODULE
#include <linux/module.h>
int init_module(void)
{
printk("Hello, world\n");
return 0;
}
void cleanup_module(void)
{
printk("Goodbye cruel world\n");
}
Но вот собрать его не получилось:
$ gcc -Wall -DLINUX -c hello.c
In file included from /usr/include/asm/cputime.h:4,
from /usr/include/linux/sched.h:23,
from /usr/include/linux/module.h:10,
from hello.c:2:
/usr/include/asm-generic/cputime.h:21: error: parse error before "cputime64_t"
In file included from /usr/include/asm/siginfo.h:4,
from /usr/include/linux/signal.h:7,
from /usr/include/linux/sched.h:27,
from /usr/include/linux/module.h:10,
from hello.c:2:
/usr/include/asm-generic/siginfo.h:61: error: size of array `_pad' is too large
In file included from hello.c:2:
/usr/include/linux/module.h:50: error: field `attr' has incomplete type
/usr/include/linux/module.h:58: error: field `kobj' has incomplete type
/usr/include/linux/module.h:233: error: field `grp' has incomplete type
Пробовал без -DLINUX, результат такой же.
Вот собсно и вопрос что делать, и что не так?
Заранее спасибо!!!
Ответ на:
комментарий
от cyclon

Ответ на:
комментарий
от cyclon

Ответ на:
комментарий
от cyclon
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.
Похожие темы
- Форум Помогите скомпилить первый в жизни модуль. (2004)
- Форум компилирование модуля ядра (2004)
- Форум Compile error Linux-PAM-0.77 (2005)
- Форум проблема с компиляцией модулей (2005)
- Форум Kernel module (2004)
- Форум Не компилируется модуль ядра (2017)
- Форум «kernel modules» help !!!!! (2002)
- Форум срочно!! Проблема с компиляцией модуля в ядре 2.6.10 на slackware 9.1 (2005)
- Форум Ошибка компилирования модуля ядра (2004)
- Форум Модуль ядра (2003)