LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   ITE RAID 8212 - compiling kernel modules (https://www.linuxquestions.org/questions/linux-software-2/ite-raid-8212-compiling-kernel-modules-207655/)

mr666white 07-20-2004 09:28 PM

ITE RAID 8212 - compiling kernel modules
 
I have an ITE 8212 raid card. I can get compiled kernel modules for it, but only for old 2.4 kernels, I have the maunfacture supplied source code, which consists of a makefile, iteraid.c and iteraid.h I've had a bit of a poke around with make and i've read the guide on LWN on compileinf kernel modules, but I cant get it to work, i get a lit of errors as long as, well, the lits of bill gate's enemies. I think the makefile may be wrong

Makefile:
------------

KERNEL_SRC = /usr/src/linux-2.6.5-1.358/

EXTRA_FLAGS += -I.

EXTRA_FLAGS += -Wno-cast-qual -Wno-strict-prototypes

obj-m += iteraid.o

iteraid-obj := iteraid.o

modules:
$(MAKE) -C $(KERNEL_SRC) SUBDIRS=$(PWD) modules

clean:
rm -rf iteraid.o iteraid.ko iteraid.mod.o iteraid.mod.c *~
--------------------

Originally KERNEL_SRC was usr/src/linux-2.6.1 but i changed that to reflect my collection of kernel source for my kernel.

Is anyone brave enough to help me with this?

----------------------------------------------------
FC2 on Athalon 800Mhz 256 Mb PC133 ram
Hercules Kyro graphics card (not working well)

osvaldomarques 07-20-2004 10:01 PM

Well Mr.,
From a kernel version to another there is a purpose to maintain the api compatibility. In other words, the way the applications see the kernel must be the same. But it is a black box. All the things under the surface may suffer change. It is the way evolution occurs. You are trying to work under the api. Get a module from 2.4 and migrate it to 2.6 needs deep understanding of what has changed. You have to look the module interface changes between both releases and try to alter your module to use the new structures of the 2.6. For starting, you could examine another kernel module which exists in both kernels, preferably another raid module, look for the similarities between your module and the other, then look what has changed from 2.4 to 2.6 and try to reproduce this changes in yours.

As my rule of thumb, all that is important in a failed compilation, is the first error. It may be the original sin. Sometimes, resolving the first error you resolve one hundred. Recompile again and look for the next first.

You accepted a great challenge, Mr. I admire you!

mr666white 07-20-2004 11:35 PM

Ah, it's not quite so hard as that, I neglected to mention the source code i have is ALLEGED to work withthe 2.6.5 kernel, it's just compiling the bastard. Is there a way to pipe the output from meke into a pager, my kterm doesn't store enough of the output for me to be able to scrol latt he way back!!!!

osvaldomarques 07-20-2004 11:38 PM

Easy!
make-command 2>&1 | less

mlp68 07-21-2004 10:50 PM

Maybe late than never...

There is some mixup with the way the include files are found in 2.6.x. I got a problem locating "scsi.h".

I poked around some, and I fixed it by adding

EXTRA_FLAGS += -I. -Idrivers/scsi

in the Makefile.

Also, have a look at the thread

http://www.linuxquestions.org/questi...hreadid=154256

where I posted a bug fix that I reported to the ITE folks but that doesn't seem to have made it into the package. Better check.

Good luck,
mlp

tho_x_tran 08-11-2004 08:45 PM

I could not compiler this iteraid module with 2.6.5-1.358 even after modifying the Makefile according to instructions in these threads which I quite understand why. However I was able to compile with 2.6.5 source that I still have and tried to use it to insmod into 2.6.5-1.358 but that did not work.

ANybody succeded in compilng it with 2.6.5-1.358 ??

mlp68 08-11-2004 09:40 PM

Can you post some error messages?

mlp

tho_x_tran 08-12-2004 12:26 AM

It's very long. But the key thing is when it entered the /usr/src/linux-2.6.5-1.358 the Makefile could not locate the .configure file and immediately after that is ton of errror;

I installed FC2 from the iso's

osvaldomarques 08-12-2004 12:32 AM

Hi tho_x_tran,
This file is generated by "make xconfig" or "make menuconfig".

tho_x_tran 08-12-2004 08:19 AM

..........
iteraid: no version magic, tainting kernel.
iteraid: Unknown symbol __copy_to_user_ll
iteraid: Unknown symbol __copy_from_user_ll
.............
Those are warning in dmesg when i did insmod iteraid.o

Follow are warning when I compiled ITERAID modules:
[root@localhost scsi]# make
make -C /root/linux-2.6.5 SUBDIRS=/root/linux-2.6.5/drivers/scsi modules
make[1]: Entering directory `/root/linux-2.6.5'
*** Warning: Overriding SUBDIRS on the command line can cause
*** inconsistencies
make[2]: `arch/i386/kernel/asm-offsets.s' is up to date.
CC [M] /root/linux-2.6.5/drivers/scsi/iteraid.o
/root/linux-2.6.5/drivers/scsi/iteraid.c: In function `itedev_open':
/root/linux-2.6.5/drivers/scsi/iteraid.c:5579: warning: `MOD_INC_USE_COUNT' is deprecated (declared at include/linux/module.h:515)
/root/linux-2.6.5/drivers/scsi/iteraid.c: In function `itedev_close':
/root/linux-2.6.5/drivers/scsi/iteraid.c:5816: warning: `MOD_DEC_USE_COUNT' is deprecated (declared at include/linux/module.h:527)
/root/linux-2.6.5/drivers/scsi/iteraid.c: At top level:
/root/linux-2.6.5/drivers/scsi/iteraid.c:4666: warning: `IdeMediaStatus' defined but not used
Building modules, stage 2.
MODPOST
LD [M] /root/linux-2.6.5/drivers/scsi/iteraid.ko
make[1]: Leaving directory `/root/linux-2.6.5'

I recompile 2.6.5 using make menuconfig, I did not do make xmenuconfig

tho_x_tran 08-12-2004 11:55 AM

Darn it. I recompiled 2.6.5 and try to use it. Boot up fine, insmod iteraid.o was fine until I reinstalled the Nvidia latest driver and it complained some module in 2.6.5 is not compatible !!!

If anyone can point me to where I can 2.6.5-1.358 source archive please ? I could not find it myself ??

I need to compile these ITERAID module to use RAID.

Thanks.

mosey 08-15-2004 11:45 AM

You can get Fedora 2's kernel sources from Fedora's installer system, just check the "kernel sources" box in system-config-packages ... if that's really what you're asking...

Any chance anybody's used this thing on Mandrake 10? I currently can't make any useful modules on Mandrake, they all give me unknown symbol in module errors when I try to insert them.

mr666white 08-15-2004 10:31 PM

If you really want to go hardcore and configure things yourself with linux the first thing to do is stop using mandrake. Give mandrake to your mum. Get a decent distro to play with...

RipperVanWinkle 08-16-2004 09:46 AM

Quote:

RAID controllers: most RAID controllers are supported, excepted for IDE and Serial-ATA. 3Ware IDE and Serial-ATA RAID controllers are supported though.
from Mandrake 10 Presentation & Features

(my italics)

Mandrake 10 Presentation and Features

It's the same for earlier versions and also for popular other distros. I struggled for a long time before finding out the bad news. So no IDE or S-ATA RAID. I believe/vaguely recall (though can't find the reference right now) that Mandrake and possibly other distros support certain IDE controllers only when integrated into a motherboard and not when based on a PCI card. The whole subject is poorly documented to the point of almost being swept under the carpet. I have 280 GB of stored data that is inaccessible unless I use NT.

Anyone hear a loud long sucking noise?

mr666white 08-16-2004 11:21 AM

Well we could go down the conspiricy theory and say it's not documented at all because it's how RHCEs and the like make thier money?


All times are GMT -5. The time now is 08:53 AM.