LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-06-2005, 01:41 AM   #1
Borderline
LQ Newbie
 
Registered: Jan 2004
Posts: 6

Rep: Reputation: 0
RAIDCore BC4852 on Slackware 10.2 compile error


Hi, I have a iWill DK8X with a RAIDCore BC4852 running the stock Slackware 10.2 kernel sata.o 2.4.31.


My problem is that slackware reconizes my RAID card as a:

"04:02.0 RAID bus controller: Broadcom RAIDCore RC4000"

and uses a driver that will only allow me to see 4 of the 8 SATA drives that are connected.




So, in order to get all 8 drives working, I have to install the bcraid driver from Broadcom's website. From what I gather, on 2.4 kernels this driver can not be compiled externally, it must be patched into the kernel and compiled.

Well, after I patch the Makefile and the Config.in I run
. # cd /usr/src/linux
. # cp .config ~/
. # rm -rf /lib/modules/2.4.29
. # make mrproper
. # cp ~/.config ./
. # make menuconfig

I configure the kernel to use then new driver then make dependencies:
. # make dep

And finally I do a:
. # make clean bzImage modules modules_install

and I get the following compile error:

Quote:
make[2]: Entering directory `/usr/src/linux-2.4.31/drivers/scsi'
make -C bcraid
make[3]: Entering directory `/usr/src/linux-2.4.31/drivers/scsi/bcraid'
make all_targets
make[4]: Entering directory `/usr/src/linux-2.4.31/drivers/scsi/bcraid'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.31/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i486 -I/usr/src/linux-2.4.31/drivers/scsi -D__LINUX__=1 -nostdinc -iwithprefix include -DKBUILD_BASENAME=bc_init -c -o bc_init.o bc_init.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.31/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i486 -I/usr/src/linux-2.4.31/drivers/scsi -D__LINUX__=1 -nostdinc -iwithprefix include -DKBUILD_BASENAME=bc_msg -c -o bc_msg.o bc_msg.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.31/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i486 -I/usr/src/linux-2.4.31/drivers/scsi -D__LINUX__=1 -nostdinc -iwithprefix include -DKBUILD_BASENAME=bc_mem_ops -c -o bc_mem_ops.o bc_mem_ops.c
bc_mem_ops.c: In function `bc_kthread':
bc_mem_ops.c:265: error: `cpumask_t' undeclared (first use in this function)
bc_mem_ops.c:265: error: (Each undeclared identifier is reported only once
bc_mem_ops.c:265: error: for each function it appears in.)
bc_mem_ops.c:265: error: syntax error before "cpumask"
bc_mem_ops.c:285: error: `cpumask' undeclared (first use in this function)
bc_mem_ops.c: In function `bc_check_addr_one':
bc_mem_ops.c:750: warning: implicit declaration of function `pfn_valid'
make[4]: *** [bc_mem_ops.o] Error 1
make[4]: Leaving directory `/usr/src/linux-2.4.31/drivers/scsi/bcraid'
make[3]: *** [first_rule] Error 2
make[3]: Leaving directory `/usr/src/linux-2.4.31/drivers/scsi/bcraid'
make[2]: *** [_subdir_bcraid] Error 2
make[2]: Leaving directory `/usr/src/linux-2.4.31/drivers/scsi'
make[1]: *** [_subdir_scsi] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.31/drivers'
make: *** [_dir_drivers] Error 2
So I opened /usr/src/linux-2.4.31/drivers/scsi/bcraid/bc_mem_ops.c to have a look....

Code:
bc_kthread(void *bc_threadp)
{

        int             cpu, status, i;
        bc_thread_t     *tp;
        bc_mem_op_t     *mop;
        bc_softstate_t  *state;
        unsigned long   irql;
        cpumask_t       cpumask;

        state = &bc_state;

        tp = (bc_thread_t*)bc_threadp;

        cpu = tp - bc_thread;
This doesnt really mean anything to me but maybe it does to one of you?

Any help getting this binary to compile will be greatly appriciated.

Last edited by Borderline; 11-06-2005 at 11:25 AM.
 
Old 11-06-2005, 11:22 AM   #2
Borderline
LQ Newbie
 
Registered: Jan 2004
Posts: 6

Original Poster
Rep: Reputation: 0
I got some help from a generous admin at #linux-help on efnet last night.

We made some progress by opening /usr/src/linux-2.4.31/drivers/scsi/bcraid/bc_mem_ops.c and going to line 170

Code:
/* 2.4.22 added a typedef for cpumask_t, need to define it for earlier versions. */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
typedef unsigned long cpumask_t;
#endif
and commenting out the If statement to look like this

Code:
/* 2.4.22 added a typedef for cpumask_t, need to define it for earlier versions. */
/*#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)*/
typedef unsigned long cpumask_t;
/*#endif*/
This generated a new error that was fixed by symbolically linking bcblob.i386 to bcblob.unknown

Quote:
cd /usr/src/linux-2.4.31/drivers/scsi/bcraid
ln -s bcblob.i386 bcblob.unknown
However, yet another error occured.

Quote:
drivers/scsi/scsidrv.o(.text+0x10320): In function `kernel_fpu_begin':
: multiple definition of `kernel_fpu_begin'
arch/i386/kernel/kernel.o(.text+0x7210): first defined here
make: *** [vmlinux] Error 1
And this is were I sit.
 
Old 11-12-2005, 11:07 AM   #3
Borderline
LQ Newbie
 
Registered: Jan 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Heres an update:

I've managed to get it working on the 2.6 kernel but my ethernet card doesn't support 802.3ad on 2.6. So Ive decided to go with a different card.

I noticed the Promise SATAII150 SX8 driver come integrated in the 2.4 kernel and Promise claims it "Delivers more than 500MB/sec sustained throughput in sequential access" So I've ordered one and I'm going to try it.

The SX8 doesn't have driver RAID but I intend to use linux RAID instead anyway. Which is another reason for the switch, the BC4852 ONLY functions as a RAID controller. Devices are only visible when defined on its RAID array software.
 
  


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
Error trying to compile Eterm 0.9.3 in slackware 10.1 small_boy22 Linux - Software 3 10-27-2006 09:11 PM
compile error: #error unknown processor family kmack2001 Linux - Newbie 0 02-14-2004 11:52 AM
Alsa compile error, and a WINE error scheidel21 Linux - Software 1 12-08-2003 08:16 PM
Compile your own slackware? ppfundst Slackware 13 07-10-2003 06:11 AM
ciscoconf on slackware 9 compile error? hoffswell Linux - Software 0 05-27-2003 03:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:20 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