lug-bg: LKM compilation
- Subject: lug-bg: LKM compilation
- From: edac@xxxxxxxxxxx (Ilia Trendafilov)
- Date: Fri, 12 Apr 2002 14:18:49 +0300
Zdraveite,
Poslednite dni si namerih nova zanimavka - pisaneto na LKMs
Ne mi triabva za neshto seriozno, samo s poznavatelna cel. Obache imam
slednia problem: dolnia mnogo prost source:
------------------------------------------
#define MODVERSIONS
#include <linux/modversions.h>
#include <linux/kernel.h>
#include <linux/module.h>
int init_module()
{
printk("<1> Hello World Module Start\n");
return 0;
}
void cleanup_module()
{
printk("<1> Hello World Module Cleanup\n");
}
------------------------------------------
compiliram s komanden red:
------------------------------------------
[edac kmod]$ gcc -c -DMODULE -D__KERNEL__ -DLINUX m1hw.c
In file included from m1hw.c:3:
/usr/include/linux/kernel.h:73: parse error before `size_t'
/usr/include/linux/kernel.h:75: parse error before `size_t'
In file included from /usr/include/asm/page.h:16,
from /usr/include/asm/processor.h:13,
from /usr/include/linux/prefetch.h:13,
from /usr/include/linux/list.h:6,
from /usr/include/linux/module.h:12,
from m1hw.c:4:
/usr/include/asm/mmx.h:10: parse error before `size_t'
------------------------------------------
Rovih se iz .h files ama ne mojah da vidia neshto trevojno.
gcc 2.95.3,
kernel 2.4.18
/*
#define CONFIG_MODULES 1
#define CONFIG_MODVERSIONS 1
#define CONFIG_KMOD 1
*/
/usr/include/asm e symlink kym /usr/src/linux/include/asm, koeto
pyk e symlink kym /usr/src/linux/include/asm-i386
/usr/include/linux e symlink kum /usr/src/linux/include/linux
/* ako gornite neshta imat niakakvo znachenie */
Blagodaria predvaritelno i syjeliavam za leko dylgia mail
===========================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers)
http://www.linux-bulgaria.org/ Hosted by Internet Group Ltd. - Stara Zagora
|