Linux-Bulgaria.ORG
навигация

 

начало

пощенски списък

архив на групата

семинари ...

документи

как да ...

 

 

Предишно писмо Следващо писмо Предишно по тема Следващо по тема По Дата По тема (thread)

Re: lug-bg: LKM compilation


  • Subject: Re: lug-bg: LKM compilation
  • From: danchev@xxxxxxxxx (George Danchev)
  • Date: Fri, 12 Apr 2002 18:03:10 +0300



On Friday 12 April 2002 15:16, you wrote:
> On Fri, 12 Apr 2002 14:18:49 +0300
>
> "Ilia Trendafilov" <edac@xxxxxxxxxxx> wrote:
> >     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 <sys/types.h>

zasto da include-va types.h ? koq function ste polzva ot tam ... ??? Za da 
kompilira tazi programa koqto e napisal mozhe nisto da ne include-va, ama 
nisto. No posle kato izpylni "insmod hello.o" ste mu kazhe 4e ne mozhe da 
poznae za koq versiq na kernela e bil kompiliran tozi module, tova e ako ima 
kernel compiled s CONFIG_MODVERSION. Za tova ostava da include-va samo 
"module.h" i kompilira kakto kaza Angel. 

> > #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 */

Zna4i tova e nqkakva stara distrubuciq bazirana na kernel 2.0 ili 2.2 i v 
prehod ot libc5 kym libc6 (glibc 2) ili ti si si kompiliral sam glibc i 
linuxthreads i nqkude v stari docs si pro4el za tezi symlinks ot /usr/include 
kym /usr/src/linux.  Tova ne go pishe v docs na glibc, nito pyk v docs na 
linuxthreads !!! Ta:

 glibc 2 ne bi trqbvalo da imash symlinks 
ot /usr/include kym /usr/src/linux. 

A v /usr/src/linux/include/ syotvetno "asm" e symlink kym asm-<arch>, i tova 
e edinstveniq symlink v kernel source, kato arch se opredelq build time, da 
se znae za kakva arhitektura se kompilira kernela i da se vklu4i syotvetniq 
asm kod, koito e machinno zavisim. Tova e. 

REFERENCES:
http://www.uwsg.indiana.edu/hypermail/linux/kernel/0007.3/0587.html
http://eplip.hit.bg/ipx/ipx-build-mini-stupid-HOWTO.txt
Sigurno i na drugi mesta pishat podobni warnings.


-- 
Greets,
fr33zb1
===========================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers)
http://www.linux-bulgaria.org/ Hosted by Internet Group Ltd. - Stara Zagora




 

наши приятели

 

линукс за българи
http://linux-bg.org

FSA-BG
http://fsa-bg.org

OpenFest
http://openfest.org

FreeBSD BG
http://bg-freebsd.org

KDE-BG
http://kde.fsa-bg.org/

Gnome-BG
http://gnome.cult.bg/

проект OpenFMI
http://openfmi.net

NetField Forum
http://netField.ludost.net/forum/

 

 

Linux-Bulgaria.ORG

Mailing list messages are © Copyright their authors.