mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Problems in compiling the module "/net/ieee80211"
@ 2006-09-18 20:44 Anuj Tripathi
  2006-09-18 21:41 ` Jesper Juhl
  2006-09-19 10:30 ` linux-os (Dick Johnson)
  0 siblings, 2 replies; 3+ messages in thread
From: Anuj Tripathi @ 2006-09-18 20:44 UTC (permalink / raw)
  To: linux-kernel

Hi

I am trying to compile the kernel source code of .c files in 
/linux-2.6.17.11/net/ieee80211 in  a standalone manner. My aim is to 
profile these files, especially the security functions, and to find the 
bottlenecks in the implementation and then to fine tune it.

While compiling them as

 gcc -D__KERNEL__ -I ../../kernel2/linux-2.6.17.11/include ieee80211_crypt.c

I initially got error with KBUILD but was able to remove it. Now 
following are the errors I am getting.


In file included from ../../kernel2/linux-2.6.17.11/include/asm/smp.h:18,
                 from ../../kernel2/linux-2.6.17.11/include/linux/smp.h:19,
                 from 
../../kernel2/linux-2.6.17.11/include/linux/sched.h:26,
                 from 
../../kernel2/linux-2.6.17.11/include/linux/module.h:12,
                 from ieee80211_crypt.c:15:
../../kernel2/linux-2.6.17.11/include/asm/mpspec.h:6:25: error: 
mach_mpspec.h: No such file or directory
In file included from ../../kernel2/linux-2.6.17.11/include/asm/smp.h:18,
                 from ../../kernel2/linux-2.6.17.11/include/linux/smp.h:19,
                 from 
../../kernel2/linux-2.6.17.11/include/linux/sched.h:26,
                 from 
../../kernel2/linux-2.6.17.11/include/linux/module.h:12,
                 from ieee80211_crypt.c:15:
../../kernel2/linux-2.6.17.11/include/asm/mpspec.h:8: error: 
'MAX_MP_BUSSES' undeclared here (not in a function)
../../kernel2/linux-2.6.17.11/include/asm/mpspec.h:22: error: 
'MAX_IRQ_SOURCES' undeclared here (not in a function)
In file included from ../../kernel2/linux-2.6.17.11/include/linux/smp.h:19,
                 from 
../../kernel2/linux-2.6.17.11/include/linux/sched.h:26,
                 from 
../../kernel2/linux-2.6.17.11/include/linux/module.h:12,
                 from ieee80211_crypt.c:15:
../../kernel2/linux-2.6.17.11/include/asm/smp.h:77:26: error: 
mach_apicdef.h: No such file or directory
In file included from ../../kernel2/linux-2.6.17.11/include/linux/irq.h:22,
                 from ../../kernel2/linux-2.6.17.11/include/asm/hardirq.h:6,
                 from 
../../kernel2/linux-2.6.17.11/include/linux/hardirq.h:7,
                 from 
../../kernel2/linux-2.6.17.11/include/linux/interrupt.h:11,
                 from 
../../kernel2/linux-2.6.17.11/include/asm/highmem.h:24,
                 from 
../../kernel2/linux-2.6.17.11/include/linux/highmem.h:24,
                 from 
../../kernel2/linux-2.6.17.11/include/linux/skbuff.h:27,
                 from 
../../kernel2/linux-2.6.17.11/include/linux/if_ether.h:111,
                 from 
../../kernel2/linux-2.6.17.11/include/net/ieee80211.h:28,
                 from ieee80211_crypt.c:19:
../../kernel2/linux-2.6.17.11/include/asm/irq.h:16:25: error: 
irq_vectors.h: No such file or directory
In file included from ../../kernel2/linux-2.6.17.11/include/asm/hardirq.h:6,
                 from 
../../kernel2/linux-2.6.17.11/include/linux/hardirq.h:7,
                 from 
../../kernel2/linux-2.6.17.11/include/linux/interrupt.h:11,
                 from 
../../kernel2/linux-2.6.17.11/include/asm/highmem.h:24,
                 from 
../../kernel2/linux-2.6.17.11/include/linux/highmem.h:24,
                 from 
../../kernel2/linux-2.6.17.11/include/linux/skbuff.h:27,
                 from 
../../kernel2/linux-2.6.17.11/include/linux/if_ether.h:111,
                 from 
../../kernel2/linux-2.6.17.11/include/net/ieee80211.h:28,
                 from ieee80211_crypt.c:19:
../../kernel2/linux-2.6.17.11/include/linux/irq.h:85: error: 'NR_IRQS' 
undeclared here (not in a function)
In file included from ../../kernel2/linux-2.6.17.11/include/linux/irq.h:94,
                 from ../../kernel2/linux-2.6.17.11/include/asm/hardirq.h:6,
                 from 
../../kernel2/linux-2.6.17.11/include/linux/hardirq.h:7,
                 from 
../../kernel2/linux-2.6.17.11/include/linux/interrupt.h:11,
                 from 
../../kernel2/linux-2.6.17.11/include/asm/highmem.h:24,
                 from 
../../kernel2/linux-2.6.17.11/include/linux/highmem.h:24,
                 from 
../../kernel2/linux-2.6.17.11/include/linux/skbuff.h:27,
                 from 
../../kernel2/linux-2.6.17.11/include/linux/if_ether.h:111,
                 from 
../../kernel2/linux-2.6.17.11/include/net/ieee80211.h:28,
                 from ieee80211_crypt.c:19:
../../kernel2/linux-2.6.17.11/include/asm/hw_irq.h:30: error: 
'NR_IRQ_VECTORS' undeclared here (not in a function)
In file included from 
../../kernel2/linux-2.6.17.11/include/linux/if_ether.h:111,
                 from 
../../kernel2/linux-2.6.17.11/include/net/ieee80211.h:28,
                 from ieee80211_crypt.c:19:
../../kernel2/linux-2.6.17.11/include/linux/skbuff.h: In function 
'skb_add_data':
../../kernel2/linux-2.6.17.11/include/linux/skbuff.h:1140: warning: 
pointer targets in passing argument 1 of 'csum_and_copy_from_user' 
differ in signedness


can someone tell me how can i get over with these errors ? Moreover is 
there any other way of profiling the specific module (/net/ieee802.11) 
through which i can find out the bottleneck ???

ThanX
-Anuj Tripathi
Mtech 05, IIT Bombay



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problems in compiling the module "/net/ieee80211"
  2006-09-18 20:44 Problems in compiling the module "/net/ieee80211" Anuj Tripathi
@ 2006-09-18 21:41 ` Jesper Juhl
  2006-09-19 10:30 ` linux-os (Dick Johnson)
  1 sibling, 0 replies; 3+ messages in thread
From: Jesper Juhl @ 2006-09-18 21:41 UTC (permalink / raw)
  To: Anuj Tripathi; +Cc: linux-kernel

On 18/09/06, Anuj Tripathi <anujt@it.iitb.ac.in> wrote:
> Hi
>
> I am trying to compile the kernel source code of .c files in
> /linux-2.6.17.11/net/ieee80211 in  a standalone manner.

What's wrong with :

$ make allyesconfig
$ make net/ieee80211/

 ???

-- 
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problems in compiling the module "/net/ieee80211"
  2006-09-18 20:44 Problems in compiling the module "/net/ieee80211" Anuj Tripathi
  2006-09-18 21:41 ` Jesper Juhl
@ 2006-09-19 10:30 ` linux-os (Dick Johnson)
  1 sibling, 0 replies; 3+ messages in thread
From: linux-os (Dick Johnson) @ 2006-09-19 10:30 UTC (permalink / raw)
  To: Anuj Tripathi; +Cc: linux-kernel


On Mon, 18 Sep 2006, Anuj Tripathi wrote:

> Hi
>
> I am trying to compile the kernel source code of .c files in
> /linux-2.6.17.11/net/ieee80211 in  a standalone manner. My aim is to
> profile these files, especially the security functions, and to find the
> bottlenecks in the implementation and then to fine tune it.
>
> While compiling them as
>
> gcc -D__KERNEL__ -I ../../kernel2/linux-2.6.17.11/include ieee80211_crypt.c
>
> I initially got error with KBUILD but was able to remove it. Now
> following are the errors I am getting.


THEY (whoever 'they' are) don't want you to build modules that way
anymore. THEY don't want you to use standard tools in standard ways.
The module build procedure has been obfuscated to punish people
like you who are obviously traditionalists. However, if you insist
upon building a module the traditional way, try this:

#
VRS := $(shell uname -r)
INC := $(shell gcc --print-file-name include)
NAME   = YOUR_MODULE_NAME
CC     = gcc -Wall -O2 -nostdinc -fomit-frame-pointer
INCL   = -I$(INC)
INCL  += -I/usr/src/linux-$(VRS)/include
INCL  += -I/usr/src/linux-$(VRS)/include/asm/mach-default
DEFS   = -D__KERNEL__ -DMODULE -DMAJOR_NR=$(MAJR) -DCONFIG_SMP=1
DEFS  += -DMODNAME=$(NAME) -DKBUILD_BASENAME=\"$(NAME)\"
CC    += $(DEFS) $(INCL) -fno-strict-aliasing

... After that, you are going to have to link your module with:


#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/compiler.h>
#define DEREF(x) (#x)
#define MKSTR(x) DEREF(x)
#include <linux/vermagic.h>
MODULE_INFO(vermagic, VERMAGIC_STRING);
struct module __attribute__((section(".gnu.linkonce.this_module")))
  __this_module = {
  .name = MKSTR(MODNAME),
  .init = init_module,
  .exit = cleanup_module,
};
static const char __attribute_used__ __attribute__((section(".modinfo")))
__module_depends[]="depends=";


... to make a ".ko" file. See! Isn't that fun?


Cheers,
Dick Johnson
Penguin : Linux version 2.6.16.24 on an i686 machine (5592.66 BogoMips).
New book: http://www.AbominableFirebug.com/
_
\x1a\x04

****************************************************************
The information transmitted in this message is confidential and may be privileged.  Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited.  If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-09-19 10:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-18 20:44 Problems in compiling the module "/net/ieee80211" Anuj Tripathi
2006-09-18 21:41 ` Jesper Juhl
2006-09-19 10:30 ` linux-os (Dick Johnson)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®