I'm trying to build driver for hpt374 raid controler on a new installation of contOS 4.2 followin the instroctions in this thread http://www.centos.org/modules/newbb/viewtopic.php?viewmode=flat&order=DE...
It says that I should run "yum install kernel-sourcecode" to get the files I need and it will create the path /usr/src/linux-2.6.9-5.0.3.EL which is needed. (guess it will be 2.6.9-22.EL in centOS 4.2)
But the output from yum is this: [root@localhost hpt374]# yum install kernel-sourcecode Setting up Install Process Setting up repositories update 100% |=========================| 951 B 00:00 base 100% |=========================| 1.1 kB 00:00 addons 100% |=========================| 951 B 00:00 extras 100% |=========================| 1.1 kB 00:00 Reading repository metadata in from local files primary.xml.gz 100% |=========================| 9.8 kB 00:00 update : ################################################## 28/28 Added 12 new packages, deleted 0 old in 0.15 seconds Parsing package install arguments No Match for argument: kernel-sourcecode Nothing to do
I tried using /usr/src/kernels/2.6.9-22.EL-i686 as KERNELDIR but that doesn't work.
I tried "yum search /usr/src/linux" and "yum provides /usr/src/linux" with no result.
I installed everything from the 4 centOS CD's but none of the scsi.h located on the system looks like the one I need as they don't define `SCSI_DISK0_MAJOR'.
--- /root/hpt374/hpt.c:38:18: scsi.h: No such file or directory /root/hpt374/hpt.c: In function `get_bdev': /root/hpt374/hpt.c:60: error: `SCSI_DISK0_MAJOR' undeclared (first use in this function) /root/hpt374/hpt.c:60: error: (Each undeclared identifier is reported only once /root/hpt374/hpt.c:60: error: for each function it appears in.) /root/hpt374/hpt.c:60: error: initializer element is not constant /root/hpt374/hpt.c:60: error: (near initialization for `major[0]') ---
What I'm I missing ? and SORRY if it is something obvious, this is the first time I'm trying to build a driver.
best regards Ulrik
On Tue, 2005-10-18 at 20:46 +0200, Ulrik S. Kofod wrote:
I'm trying to build driver for hpt374 raid controler on a new installation of contOS 4.2 followin the instroctions in this thread http://www.centos.org/modules/newbb/viewtopic.php?viewmode=flat&order=DE...
It says that I should run "yum install kernel-sourcecode" to get the files I need and it will create the path /usr/src/linux-2.6.9-5.0.3.EL which is needed. (guess it will be 2.6.9-22.EL in centOS 4.2)
But the output from yum is this: [root@localhost hpt374]# yum install kernel-sourcecode Setting up Install Process Setting up repositories update 100% |=========================| 951 B 00:00 base 100% |=========================| 1.1 kB 00:00 addons 100% |=========================| 951 B 00:00 extras 100% |=========================| 1.1 kB 00:00 Reading repository metadata in from local files primary.xml.gz 100% |=========================| 9.8 kB 00:00 update : ################################################## 28/28 Added 12 new packages, deleted 0 old in 0.15 seconds Parsing package install arguments No Match for argument: kernel-sourcecode Nothing to do
I tried using /usr/src/kernels/2.6.9-22.EL-i686 as KERNELDIR but that doesn't work.
I tried "yum search /usr/src/linux" and "yum provides /usr/src/linux" with no result.
I installed everything from the 4 centOS CD's but none of the scsi.h located on the system looks like the one I need as they don't define `SCSI_DISK0_MAJOR'.
/root/hpt374/hpt.c:38:18: scsi.h: No such file or directory /root/hpt374/hpt.c: In function `get_bdev': /root/hpt374/hpt.c:60: error: `SCSI_DISK0_MAJOR' undeclared (first use in this function) /root/hpt374/hpt.c:60: error: (Each undeclared identifier is reported only once /root/hpt374/hpt.c:60: error: for each function it appears in.) /root/hpt374/hpt.c:60: error: initializer element is not constant /root/hpt374/hpt.c:60: error: (near initialization for `major[0]')
What I'm I missing ? and SORRY if it is something obvious, this is the first time I'm trying to build a driver.
---- I would presume something more like
yum install kernel-src or yum install kernel-2.6.9-22.EL.src
but I would think all you need is kernel-devel
yum install kernel-devel
Craig
Craig White wrote:
yum install kernel-src or yum install kernel-2.6.9-22.EL.src
neither of which are correct.
but I would think all you need is kernel-devel
kernel-devel will give you the headers etc needed to build modules , if you still need the entire source tree - you need to manually install the .src.rpm from http://mirror.centos.org/centos/4/os/SRPMS/
- K
Karanbir Singh sagde:
kernel-devel will give you the headers etc needed to build modules , if you still need the entire source tree - you need to manually install the .src.rpm from http://mirror.centos.org/centos/4/os/SRPMS/
I already have kernel-devel installed, what I don't understand is that in the forum (see below) it says that "yum install kernel-sourcecode" should do the trick in centOS 4.0. Shouldn't it also work in 4.2 or have that changed?
------------------------------- from the forum ------------------------------- ------------------------------------------------------------------------------ To all:
Yes, this should work for CentOS 4.0. First, install kernel sources.
$ yum install kernel-sourcecode <----- this doesn't work for me in 4.2
This will also create the path /usr/src/linux-2.6.9-5.0.3.EL which is needed.
Next you will have to properly setup the kernel headers.
$ cd /usr/src/linux-2.6.9-5.0.3.EL $ make mrproper $ cp /boot/config-2.6.9-5.0.3.EL .config $ make bzImage
The last step will setup all the linking and headers correctly so that the hptxxx code will make properly.
$ cd /to/your/highpoint/source/path $ make KERNELDIR=/usr/src/linux-2.6.9-5.0.3.EL RR154X=0
and it should make properly with a few warnings. Follow the highpoint readme instructions after that. I have not tested the driver, but it does make.
Good luck jajiv ------------------------------------------------------------------------------
Ulrik S. Kofod wrote:
I already have kernel-devel installed, what I don't understand is that in the forum (see below) it says that "yum install kernel-sourcecode" should do the trick in centOS 4.0. Shouldn't it also work in 4.2 or have that changed?
$ yum install kernel-sourcecode <----- this doesn't work for me in 4.2
It wont work - since there is no such package in 4.2 - Look at the recent messages on the mailing list, another thread discussed alternatives and howto's for using / building from the kernel source.
- K