[Ilugc] Kernal Compilation

  • From: bharathi@xxxxxxxxxx (bharathi)
  • Date: Fri May 20 16:23:39 2005

babu jayapaul wrote:

Dear Friends,

I had downloaded a driver for wireless card 802.11g.
They  had mentioned to copy the files (*.c , *.h &
Makefile) under kernal source tree (ie. to make a
directory /usr/src/linux.x.x/driver/net/wireless/xxx).

when Iam compiling the kernal. It compile all files in
../net/wireless/ except my directory 'xxx'.

Is there anything to add in Kernal Makefile ?.
 

Yes.You need edit the *Makefile* under the
/usr/src/linux.x.x/driver/net/wireless/ directory.Also You need to edit
the* Config.in* inside the same directory to get, "Module Enabling
option" when you do make menuconfig/xconfig. Then you can continue with
default steps from make dep.

Let me see one example like,In Linux-2.4.25 how Cisco/Aironet PCMCIA
802.11 wireless cards driver has implemented.

The driver source code should be placed as below.

*#cp  airo_cs.c  /usr/src/linux-2.4.25/drivers/net/wireless*

airo_cs.c is not using any seperate .h file. It just using kernel
existing headers like,<linux/netdevice.h>,<asm/io.h>,<pcmcia/cs.h>..etc.

Perhaps,If you have any seperate header files with your driver code, you
need to copy that header files,inside the /usr/src/linux-2.4.25/include/
directory.Then give apropriate path in the driver souce code ( example
if header file airo_cs.h is inside the  include/linux/drivers/wireless
directory, then you need to edit in source code as
#include<linux/drivers/wireless/airo_cs.h>)      

Edit /usr/src/linux-2.4.25/drivers/net/wireless/Makefile and add this
line as,

*obj-$(CONFIG_AIRO_CS)           += airo_cs.o airo.o

*Edit /usr/src/linux-2.4.25/drivers/net/wireless/Config.in and* *add
this lines as,*
 
# If Pcmcia is compiled in, offer Pcmcia cards...
if [ "$CONFIG_PCMCIA" != "n" ]; then
   comment 'Wireless Pcmcia cards support'

   dep_tristate '  Hermes PCMCIA card support' CONFIG_PCMCIA_HERMES
$CONFIG_HERMES
   tristate '  Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards' CONFIG_AIRO_CS
fi

*These line will help you to get "Cisco/Aironet 34X/35X/4500/4800 PCMCIA
cards" option when you do make menuconfig.

If you wish to provide help document associated with this driver when
you do make menuconfig then append your info in
/usr/src/linuc-2.4.25/Documentation/Configure.help file.

Select this module thru, make menuconfig -> Network device support ->
Wireless LAN -> Wireless PCMCIA support.
Finally use the default commands set to complete kernel compilation (
make dep bzImage install modules modules_install).    

Thanks,
bharthix.

-- 
    A  
   ?V?        
  /(_)\     http://bharthix.tk/     ;
   ^ ^    

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : 
http://www.ae.iitm.ac.in/pipermail/ilugc/attachments/20050520/6998f833/signature.bin

Other related posts: