LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 07-24-2007, 10:25 AM   #1
ankit4u1
Member
 
Registered: Apr 2006
Distribution: Red Hat, Fedora
Posts: 97

Rep: Reputation: 15
how to load modules in kernel?


Hi,

I have RHEL 5 Server. I am pretty new to linux.

There is a dir. called /usr/src/kernels/2.6.18.8.../crypto/...

I installed Openswan 3.0.06 on linux box and so, after installing, i have a directory called ocf in /usr/src/kernels/2.6.18.8.../crypto/, which was not there before installing Openswan.

Now, I need to include Cryptographic modules. So, went to /usr/src/kernels/2.6.18.8../ and then did

make menuconfig

I saw a lot of options there, where I found out Cryptographic modules --> OCF --> and then selected the modules I wanted as <M> and saved the configuration.

Now, I went to /usr/src/kernels/2.6.18.8../crypto/ocf/ and did

make -C /lib/modules/2.6.18.8../build/ -M=`pwd` modules

, so that I can get .ko files in /usr/src/kernels/2.6.18.8../crypto/ocf/ directory. But I don't get anything... The output of the above make is as follows

Code:
make: Entering directory `/usr/src/kernels/2.6.18-8.el5-i686`
  Building Modules, stage 2.
  MODPOST
make: Leaving directory `/usr/src/kernels/2.6.18-8.el5-i686`

There should be .ko files in /crypto/ocf/ directory, which are not there....It seems I have committed some mistake including modules. Can you help me please? I would appreciate it. Thank you.

Regards,
Ankit
 
Old 07-24-2007, 11:34 AM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
If you reconfigured the kernel then you need to build the new kernel;

make
make modules_install
make install
 
Old 07-24-2007, 12:57 PM   #3
ankit4u1
Member
 
Registered: Apr 2006
Distribution: Red Hat, Fedora
Posts: 97

Original Poster
Rep: Reputation: 15
Its the default kernel with RHEL 5 package. I did not reconfigure it. How should I approach this problem?
 
Old 07-24-2007, 03:59 PM   #4
ankit4u1
Member
 
Registered: Apr 2006
Distribution: Red Hat, Fedora
Posts: 97

Original Poster
Rep: Reputation: 15
Thumbs up

Hey I solved the problem. Actually, this is how I approached the problem. May be it can help any1, if i describe it here:

In, make -C /lib/modules/2.6.18.8../build/ -M=`pwd` modules, I removed - from -M and run the command. i.e.

Code:
make -C /lib/modules/2.6.18.8../build/ M=`pwd` modules

I got a lot of errors....This is the first one I got

[root@localhost ocf]# make -C /lib/modules/2.6.18-8.el5/build/ M=`pwd` modules
make: Entering directory `/usr/src/kernels/2.6.18-8.el5-i686'
  CC [M]  /usr/src/kernels/2.6.18-8.el5-i686/crypto/ocf/crypto.o
In file included from /usr/src/kernels/2.6.18-8.el5-i686/crypto/ocf/crypto.c:30:
include/linux/config.h:6:2: warning: #warning Including config.h is deprecated.
/usr/src/kernels/2.6.18-8.el5-i686/crypto/ocf/crypto.c:120: error: expected ‘)’ before string constant
/usr/src/kernels/2.6.18-8.el5-i686/crypto/ocf/crypto.c:137: error: expected ‘)’ before string constant
/usr/src/kernels/2.6.18-8.el5-i686/crypto/ocf/crypto.c:148: error: expected ‘)’ before string constant
/usr/src/kernels/2.6.18-8.el5-i686/crypto/ocf/crypto.c:152: error: static declaration of ‘crypto_userasymcrypto’ follows non-static declaration
/usr/src/kernels/2.6.18-8.el5-i686/crypto/ocf/./cryptodev.h:381: error: previous declaration of ‘crypto_userasymcrypto’ was here
/usr/src/kernels/2.6.18-8.el5-i686/crypto/ocf/crypto.c:153: error: expected ‘)’ before string constant
/usr/src/kernels/2.6.18-8.el5-i686/crypto/ocf/crypto.c:157: error: static declaration of ‘crypto_devallowsoft’ follows non-static declaration
/usr/src/kernels/2.6.18-8.el5-i686/crypto/ocf/./cryptodev.h:382: error: previous declaration of ‘crypto_devallowsoft’ was here
/usr/src/kernels/2.6.18-8.el5-i686/crypto/ocf/crypto.c:158: error: expected ‘)’ before string constant
make[1]: *** [/usr/src/kernels/2.6.18-8.el5-i686/crypto/ocf/crypto.o] Error 1
make: *** [_module_/usr/src/kernels/2.6.18-8.el5-i686/crypto/ocf] Error 2
make: Leaving directory `/usr/src/kernels/2.6.18-8.el5-i686'
Then I applied some patches, after which I tried the same make command written above. So, I got few more errors...As it can be seen from the errors, that, the main errors were in files crypto.c and cryptodev.h. So, I commented some lines from both the files or in other words, patched the files.

and then finally did make again....and luckily everything worked fine !! Thank god !

Thanks for the help !!

Cheers,
Ankit
 
  


Reply

Tags
build, modules


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel Modules, to load or not to load VampireL0rd Linux - Software 3 07-24-2007 09:20 PM
How to load kernel modules ginda Linux - Software 2 01-12-2007 06:06 AM
How to Load Kernel Modules? binarybob0001 Linux - General 5 11-16-2005 10:15 AM
Custom kernel does not load modules Ankardo Linux - Newbie 2 06-10-2005 06:30 AM
new kernel 2.6.7 cant load modules short101 Debian 8 08-21-2004 09:59 PM


All times are GMT -5. The time now is 06:35 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration