FreeBSD 8.2-RELEASE-p7 and HighPoint RR3***/4*** series controllers

Status
Not open for further replies.

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
SOAB - In the middle of /usr/src/sys/amd64/conf/GENERIC is:

Code:
device     hptiop     #Highpoint RocketRaid 3*** series


Can I just comment out the line? :D Do I have to do a compile or anything after I make the change?

Edit: Ok.. I've heard of compiling the Kernel and Kernel drivers. I'm guessing this is a Kernel driver and I have to compile a new kernel.

Per a google search I'm going to do the following after commenting out the line:

1. cd /usr/src
2. make buildkernel KERNCONF=GENERIC
3. make installkernel KERNCONF=GENERIC

Then i'll try a reboot and see if I can get the biznatch to load ;)

I'm currently on step 2 and my life is flashing before my eyes. Glad I installed FreeBSD to a spare SSD. :D
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Yes, you can just comment it out, but then things get time consuming and complicated.

You need to make a new kernel and install it, it can take a couple/few hours to build.

cd /usr/src

make buildkernel

after that finishes

make installkernel

reboot

If you look at /usr/src/Makefile, you can see your different build options
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
LOL. You replied at the same time I did. So here's my next question.. assuming this works. How do I get rid if the hptiop.ko driver from FreeNAS?

Can I just change the makefile entry for KMOD=Noobsauce? :D Wouldn't that let the driver load on FreeNAS without having to interfere with the kernel mode driver on FreeNAS? :D

If you say yes I think i'm gonna cry. 12 hours and I'm getting a crash course on kernel drivers and recompiling kernels... what did I get myself into!

I'm installing FreeBSD in a Virtual box. I'm gonna try this out on my virtual machine and see what happens.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
So here's my next question.. assuming this works. How do I get rid if the hptiop.ko driver from FreeNAS?

I would start by going to the HowTo section of the forums. There's a section there on downloading and building FreeNAS from source. Once you download the source, look at the kernel config "FREENAS.amd64", see if the module is built into the kernel and if it is, rebuild without it. Rebuilding FreeNAS from source takes about 6 hours on my Core i5. Building a freaking plugin takes about 14.... really.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Finished compiling, installed, and rebooted. After reboot I did a "kldload hptiop.ko":

Code:
hptiop0: adapter at PCI 3:0:0, IRQ 16
hptiop0: <RocketRAID 3560 SATA controller> mem 0xfa800000-0xfaffffff irq 16 at device 0.0 on pci3
hptiop0: 0 RocketRAID 3***/4*** controller driver v1.3 (010208)
hptiop0: [GIANT-LOCKED]
hptiop0: [ITHREAD]
#da0 at hptiop0 bus 0 scbus1 target 20 lun 0
da0: <HPT DISK 1_20 4.00 Fixed Direct Access SCSI-5 device
da0: 114472MB (234439535 512 byte sectors: 255H 63S/T 14593C)


I then did a zpool import because I had previously used the 120GB drive as a zpool in FreeNAS. Da0p2 is now online :D

So now to figure out how to get this to work in FreeNAS. :P I was hoping to be able to just provide a .ko file and give direction on how to install it. But if a kernel compile will be necessary that's a bit much to try to put in a forum and have people swallow.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Looking back, it might not be built into FreeNAS. If you do a kldstat and it lists a separate module, then it's not built it. You'd just need to hunt down all the occurances of the existing module and replace them with yours and reboot.

But your test was on 8.3 right? I still think that module might have issues on 8.2, not positive though.

Just about time for me to sleep and give the generator a break too ;)
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
You are correct. If it is compiled on 8.3 it won't play on 8.2 :(. I get a version not supported error.

I'm going to install 8.2 on a virtual machine, compile my file again and try this whole thing again. Then copy the file to my 8.2 FreeNAS and try to kldload it. Should take an hour or so to do all of this. LOL.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Bad news.. hptiop.ko is a kernel driver for FreeNAS :(. I compiled the driver in FreeBSD 8.2 and when i try to load it with kldload I get the error "already exists".

So I figured I'd try recompiling it changing the KMOD to something else (I used Noobsauce). After it finished I copied to FreeNAS. When I do a kldload I get the following:

Code:
kldload: /boot/kernel/Noobsauce80.ko: file has no contents
linker_load_file: Unsupported file type
kldload: Can't load Noobsauce80.ko: Exec format error.


I guess I'm going to have to try compiling FreeNAS without the kernel driver and then try the 8.2 compiled driver. It's looking less and less likely that I'll be able to just post a file with some easy directions.

So after I get this all figured out how do I get these changes implemented into the FreeNAS official build? I'd prefer this stuff be included on the regular distro of FreeNAS than compile a separate ISO for each update to FreeNAS. :P
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
So.. what's the big deal whether it's a kernel driver or not? The way I see it there's 2 ways to solve this problem. Recompile FreeNAS but leave the hptiop.ko driver as a kernel driver or remove it as a kernel driver. Obviously either way the hptiop.c will have to be updates with FreeNAS and recompiled into the new improved hptiop.ko.

Why would someone want one instead of the other?

Now that I've got all the kinks worked out. I haven't done a test with FreeNAS yet (still having trouble compiling FreeNAS, it complains when I start editing files because the are no longer in sync with the svn. I can't figure out how to fix it). but since I got it working on FreeBSD it's trivial to get it to work on FreeNAS.

And lastly how do I get these changes implemented back into FreeNAS for future builds? I just assume add these changes to the regular build to help other noobs. :P
 
Status
Not open for further replies.
Top