LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-17-2004, 02:42 AM   #1
7helix
LQ Newbie
 
Registered: Apr 2004
Posts: 11

Rep: Reputation: 0
How to built-in a driver when compiling the kernel


My config is double Xeon, double SATA 160 Gb in RAID 0, SiImage 3112A ctrl, Intel SE7505VB2, RH7.3 with 2.4.18-3smp kernel.
I need to built in a driver for RAID ctrl in the kernel when I compiling it ( I want install the 2.6.x kernel)
What I have to do that????
Thanks in advance
 
Old 06-17-2004, 03:07 AM   #2
bareego
Member
 
Registered: Nov 2003
Location: Brisbane, Australia
Distribution: Crux 2.0
Posts: 66

Rep: Reputation: 15
I use the command

make menuconfig

in the source directory of the kernel to configure what I want to be ciompiled into the kernel.
Now when you something in there to be inlcuded into the kernel it gets an asterisk *
That means it will be compiled into the kernel.
Alternatively some option can also be compiled as a module, in which case you can put a M.

Cheers
Bareego
 
Old 06-17-2004, 04:01 AM   #3
7helix
LQ Newbie
 
Registered: Apr 2004
Posts: 11

Original Poster
Rep: Reputation: 0
Sorry but my driver is not implemented in any kernel, I think I suppose that I need to put some files of my driver in a kernel source directory, or I'm raving???
thanks
 
Old 06-17-2004, 04:28 AM   #4
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 79
Download the new kernel. Put it in your Documents folder. That way You can follow these instructions.

Move a copy to the proper directory. Do this as root.

Code:
mv  /home/<user name>/Documents/<name of kernel>   /usr/src
That will put it in the right directory.

Type in this:

Code:
cd  /usr/src

ls -l
That is a lower case L, by the way. It should look something like this:

Code:
root@smoker /usr/src # ls  -l
total 8
lrwxrwxrwx   1 root root   11 Jun 14 03:43 linux -> linux-2.6.6
drwxr-xr-x  19 root root 1296 Feb 22 01:45 linux-2.6.0-test11
drwxr-xr-x  19 root root 1296 Jun 14 03:17 linux-2.6.1
drwxrwxr-x  19  500  500 1304 Jun 14 23:18 linux-2.6.6
drwxr-xr-x  19 root root 1264 May 11 03:47 linux-2.6.6-rc1
drwxr-xr-x  18 root root  720 May 11 03:30 linux-2.6.6-rc2
root@smoker /usr/src #
note the top one. That is a link. You need to remove the link you have pointing to your old kernel.

Code:
 rm linux
Then make new link:

Code:
ln -s linux-2.6<exact version here>   linux
Space between kernel version and the word linux.

Now type in

Code:
cd linux
Let's get off to a clean start.

Code:
 make mrproper
That cleans out any old trash that you don't want to mess up your kernel.

You are now ready to configure your new kernel. Type in

Code:
make menuconfig
and go through each screen picking what you want and removing what you don't. You need to go through each screen. Take nothing for granted in there. Nothing is really default.

A blank space means it is not included, a * means it is in the kernel, a M means it is a module. Some things like file systems types, must be built into the kernel. Example. Your root partition is reiserfs. You MUST have reiserfs built into the kernel, with a * not a M. If it is not there it cannot read the root partition and can not boot.

With 2.6 kernels the compile is easier. This is the command I use.

Code:
make all && make modules_install
After it gets compiled, you need to copy the new kernel over to the boot directory.

Code:
cp arch/i386/boot/bzImage    /boot/bzImage-2.6.test1
I do things a bit different. I name my kernels with the version and a test number. Helps keep them straight. You will need to also change your bootloader to point to the new kernel.

That should get you off to a start. I'm sure you'll have questions though. Kernels can be tricky that first time or two. Reminds me of women sometimes. Women know what to expect from us though.

Later



Note: If you copy and paste, there are extra spaces to make the spaces easier to see. You may need to remove the extras.
 
Old 06-17-2004, 08:00 AM   #5
7helix
LQ Newbie
 
Registered: Apr 2004
Posts: 11

Original Poster
Rep: Reputation: 0
.......I have followed your indication but at "make install"

CC drivers/md/linear.o
CC drivers/md/raid0.o
drivers/md/raid0.c: In function `create_strip_zones':
drivers/md/raid0.c:226: Unrecognizable insn:
(insn 1465 1464 2156 (parallel[
(set (reg:SI 0 eax)
(asm_operands ("") ("=a") 0[
(regI 1 edx)
]
[
(asm_inputI ("A"))
] ("drivers/md/raid0.c") 210))
(set (reg:SI 1 edx)
(asm_operands ("") ("=d") 1[
(regI 1 edx)
]
[
(asm_inputI ("A"))
] ("drivers/md/raid0.c") 210))
(clobber (reg:QI 19 dirflag))
(clobber (reg:QI 18 fpsr))
(clobber (reg:QI 17 flags))
] ) -1 (nil)
(nil))
drivers/md/raid0.c:226: confused by earlier errors, bailing out
make[2]: *** [drivers/md/raid0.o] Error 2
make[1]: *** [drivers/md] Error 2
make: *** [drivers] Error 2
[root@prozac linux]#


At "make menuconfig" I have selected the built-in for the RAID.....I don't know.
thanks
 
Old 06-17-2004, 01:33 PM   #6
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 79
You have a conflict somewhere. You need to go through the config
again and see what you can find. You may want to concentrate on the
RAID settings. It also says there were previous errors, you may want
to look back further to see what those errors are.

I have never used RAID so I'm not sure what to tell you to look for.
It may be that something was selected that you don't need and you
overlooked it, that is easy to do by the way. I would recheck
everything again and then recompile.

You only have to start at make menuconfig, then the make all && make
modules_install. Then copy the kernel over with a new test number.

I put NEW numbers on kernels that boot and are stable. If it does not
boot, then I replace the 'bad' kernel with the same number when I
recompile. I have several kernels in there to fall back on. If you
use grub, you can actually edit the bootloader at the bootloader
screen and change to whatever you want. I switched to grub a good
while back.

I hope some other guru will come along and know the exact reason for
the error. If not, you may want to start a new thread with the
subject 'compiling kernel 2.6 with raid fails'. That will get
somebodies attention. Include the drive type or some specific thing
that identifies the system if you can. There is likely someone here
with it to.

Like the name of the rig, 'prozac'. That's neat. he he he he

Later

 
Old 06-18-2004, 04:25 AM   #7
7helix
LQ Newbie
 
Registered: Apr 2004
Posts: 11

Original Poster
Rep: Reputation: 0
Ok, thank you very much,but the LAST question: if I recompile my old kernel with drivers installed, those drivers "go" in the new kernel, or I must re-install them????
thanks
 
Old 06-18-2004, 04:41 AM   #8
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 79
Each time you compile the kernel, it is a new kernel. It takes what is in the config file and rebuilds the whole kernel. When you type in make module_install, it installs the modules for you. You may need to modprobe to get them to load though. Modprobe tells the kernel to load the module.

Since I assume we are still talking about the RAID drivers, they should be built INTO the kernel. It should have a "*" in the config not a "M". If they are modules the kernel will be trying to find a drive it can not recognize because it doesn't know how to yet.

Rule of thumb. If it pertains to file systems or controller cards for drives, they need to be built into the kernel. You can build everything into the kernel, I do. The only drawback is you have to rebuild the kernel if you change hardware etc. It don't take long on this rig though.

Just out of curiosuty, what kernel version are you using? Does the above make sense? I can try to explain it differently if it doesn't.

Later

 
Old 06-18-2004, 08:19 AM   #9
7helix
LQ Newbie
 
Registered: Apr 2004
Posts: 11

Original Poster
Rep: Reputation: 0
I have 2.4.18-3smp, but I want (now I wish) to upgrade the kernel for several reasons.
I understood the difference between modules and built-in and when I need to use one or another. Yesterday, when I have compiled the kernel I didn't see anything about the driver for SiImage 3112A but only about the supporting for the systems RAID 0,1,3....
When I have installed RH73 in this system the first time, at the prompt window I have typed "linux dd" and the system has read the floppy where the drivers were. The system is not very stable for my pourposes, some windows manager like Konqueror sometimes crashes, I want to upgrade the KDE and install a DVD-burning software but they need a newer version of KDE. I can't install different distro because the software I use at work WORKS ONLY on RH7.3. Before re-installing linux I like to know how installing my ctrl RAID driver in the new kernel.
bye and have a good day
 
Old 06-18-2004, 02:17 PM   #10
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 79
I did a google search and there appears to be a driver problem with that controller. Look here. and look here.

I will admit, I have never used RAID. I am not familiar with them except with what I have read. If that link doesn't help I would start a new thread titled something like 'SiImage 3112A driver and Redhat 7.3' in the hardware section, here.. Someone will likely recognize that controller and can tell you exact instructions on how to make it work. They may have used one before, something I have never done.

I must confess, this is a example of the blind leading the blind. A new thread will likely get you the help you need. This really needs someone that has dealt with this before. The only other help may be getting another controller.

This is not because I don't want to help, it is because I don't know what to do. You need to get the attention of someone with more experience than me with that controller and RAID. They are here, they are just not seeing this thread.

I was going to give a link to start a new thread but I can't start one for some reason. It won't give me a button for new thread. Click on the link above for hardware section and then start a new thread there.

I wish I could be more help but it is really best to start a new thread since this thread has sort of changed from a kernel problem to a controller problem.

Hope you can get it going. I'll be watching for the new thread.

 
  


Reply



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
Compiling driver into kernel DDoS YourseLF Linux - General 1 08-07-2005 01:45 PM
Compiling Kernel Driver: ACPI mebaro Linux - Newbie 3 07-15-2005 08:03 AM
../testing/2.6.10 kernel and compiling mvidia driver justwantin Slackware 16 03-03-2005 05:54 AM
compiling kernel 2.6.10 and I need driver i915 EOHooligan Linux - General 1 02-01-2005 09:57 AM
Compiling Nvidia Driver on 2.6.0-test11 kernel... TheOneAndOnlySM Linux - General 6 12-20-2003 09:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:18 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration