Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Easy way of creating an ql2200 fw loader initrd for SB2000?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc
View previous topic :: View next topic  
Author Message
obmun
n00b
n00b


Joined: 17 Jan 2004
Posts: 66
Location: Europe (Spain)

PostPosted: Sun May 13, 2007 8:23 pm    Post subject: Easy way of creating an ql2200 fw loader initrd for SB2000? Reply with quote

I've been playing around some time (a year) with some Sun Blade boxes (1000 and 2000). Both use the same FC-AL controller from Qlogic. And both kind of boxes have been running Gentoo linux without problem, using 2.6.16 kernel with old qlogicfc driver and its integrated firmware [no X; they're being used for server tasks].

Recently I decided to upgrade the kernel. The new qlogic driver (qla2xxx) works nicely, at least when tested from a debian netboot sparc image => module loaded after kernel launch, firmware in /lib/firmware loaded thru the typical hotplug event.

Creating an initrd image for firmware loading would require a specific compile of udev to generate a statically linked version, the needed scripts ... to sum up, more work than a mere "mkinitrd". I've seen that in the initrd of some distros (like Fedora), udev is already included (as they do some kind of "early" population of /dev from the initrd). Do they have tweaked mkinitrd tool? Is there some kind of automatic tool (other than mkinitrd) to include udev support in the initrd?
Back to top
View user's profile Send private message
obmun
n00b
n00b


Joined: 17 Jan 2004
Posts: 66
Location: Europe (Spain)

PostPosted: Sun May 13, 2007 11:58 pm    Post subject: Reply with quote

Of course, my current method for kernel building is by hand (no Genkernel), and I would like it to keep it that way. Esentially from what I've already seen, Genkernel is not of my taste: no control of what modules I want to preload on the initrd (maybe doable thru callbacks?), no auto-detection disabling [I've never used Genkernel, just studied its documentation; I could be very wrong on this one]. Genkernel could be useful [planned integration of firmware loading, as .20 is getting into stable], but is this ready now? Is it the tool I should be using?
Back to top
View user's profile Send private message
Ixar
n00b
n00b


Joined: 02 May 2007
Posts: 15

PostPosted: Mon May 14, 2007 7:17 am    Post subject: Reply with quote

From what I have seen of Genkernel, You can do pretty much what you want with it. It's in the gentoo spirit ;)
You are still able to tweak the kernel config using menuconfig for example. There are a lot of other options allowing fine tuning.

I had to tune the initrd once in order to get software raid working on the root fs.
I did it manually after having the initrd build by genkernel.

Of course you can do the initrd yourself, but personally I prefer to use the good work that has already been done by gentoo devs ;)
Back to top
View user's profile Send private message
gust4voz
Retired Dev
Retired Dev


Joined: 09 Sep 2003
Posts: 373
Location: Buenos Aires, Argentina

PostPosted: Mon May 14, 2007 1:18 pm    Post subject: Reply with quote

Genkernel is being fixed to get the firmware issue solved, i've already made a new busybox with mdev firmware loading available for it. It used to ship with udev a long time ago but it was too problematic so it was decided to switch to mdev for the initramfs.
It's not yet shipping since it requires a lot of testing and some more patching to get it right (to incorporate the firmware the firmware files into the initramfs) but it's getting there. I'd like to get this out faster but my hardware porfolio doesn't include a Blade 1000/2000 or other machines that might use this so testing on my part cannot happen.
_________________
Gustavo Zacarias
Gentoo/SPARC monkey
Back to top
View user's profile Send private message
obmun
n00b
n00b


Joined: 17 Jan 2004
Posts: 66
Location: Europe (Spain)

PostPosted: Mon May 14, 2007 3:41 pm    Post subject: Reply with quote

I can test it then. One of my Blades is completely stopped right now and I can do whatever you want with it. Is the Genkernel dev repo online?
Back to top
View user's profile Send private message
rvalles
Tux's lil' helper
Tux's lil' helper


Joined: 19 Feb 2003
Posts: 119

PostPosted: Thu Jul 19, 2007 5:31 pm    Post subject: Anything new on that matter? Reply with quote

I'm having the same problem with a blade 2000. I do not like initrds in general; I just build the / fs and whatever is needed for the kernel to boot inside the kernel, and everything else as a module.

If we had an initrd that did only load the ql module and firmware, while doing nothing else, it'd be perfect.
Back to top
View user's profile Send private message
rvalles
Tux's lil' helper
Tux's lil' helper


Joined: 19 Feb 2003
Posts: 119

PostPosted: Thu Jul 19, 2007 7:20 pm    Post subject: 2.6.17.14 driver in 2.6.22.1 kernel Reply with quote

As a workaround for now, I've ported 2.6.17.14's driver to work in 2.6.22.1. For whoever finds this useful:
Code:

diff -Naur qla2xxx-old/ql2200.c qla2xxx/ql2200.c
--- qla2xxx-old/ql2200.c        2007-07-19 19:12:35.000000000 +0000
+++ qla2xxx/ql2200.c    2007-07-19 18:57:30.000000000 +0000
@@ -73,7 +73,7 @@
 static int __init
 qla2200_init(void)
 {
-       return pci_module_init(&qla2200_pci_driver);
+       return pci_register_driver(&qla2200_pci_driver);
 }
 
 static void __exit
diff -Naur qla2xxx-old/qla_init.c qla2xxx/qla_init.c
--- qla2xxx-old/qla_init.c      2007-07-19 19:12:35.000000000 +0000
+++ qla2xxx/qla_init.c  2007-07-19 18:39:36.000000000 +0000
@@ -8,6 +8,7 @@
 
 #include <linux/delay.h>
 #include <linux/vmalloc.h>
+#include <linux/workqueue.h>
 
 #include "qla_devtbl.h"
 
@@ -1731,8 +1732,8 @@
        fcport->flags = FCF_RLC_SUPPORT;
        fcport->supported_classes = FC_COS_UNSPECIFIED;
        spin_lock_init(&fcport->rport_lock);
-       INIT_WORK(&fcport->rport_add_work, qla2x00_rport_add, fcport);
-       INIT_WORK(&fcport->rport_del_work, qla2x00_rport_del, fcport);
+       INIT_WORK(&fcport->rport_add_work, qla2x00_rport_add);
+       INIT_WORK(&fcport->rport_del_work, qla2x00_rport_del);
 
        return (fcport);
 }


Just copy qla2xxx from 2.6.17.14 to 2.6.22.1 and apply the patch in that directory. While it works fine for me, I can't ensure it won't melt your data, so be warned.
Back to top
View user's profile Send private message
Ferris
Retired Dev
Retired Dev


Joined: 13 Jan 2003
Posts: 426
Location: N. Virginia (USA)

PostPosted: Fri Feb 08, 2008 7:09 pm    Post subject: Reply with quote

Just as a side note for those who might be interested. For me, at least, this patch fails on my SB1000. However, an abbreviated version does work on my SB1000 to bring it up to 2.6.19-gentoo-r7-SB1000 ---

Use exactly the same patch up to the last modification. With this kernel, the INIT_WORK macro still requires 3 arguments, so don't make the INIT_WORK changes. You still must make the change to ql2200.c, and you must
#include <linux/workqueue.h>
in qla_init.c . Thus, to bring 2.6.17 up to 2.6.19 is really just a two line change. I have no idea why the kernel people feel the need to change the interfaces, but if you care, you can probably poke around and find it.

Regards,
Back to top
View user's profile Send private message
VinzC
Advocate
Advocate


Joined: 17 Apr 2004
Posts: 4663
Location: Theux (Belgium)

PostPosted: Wed Feb 20, 2008 1:43 pm    Post subject: Reply with quote

May I ask if the current state of genkernel-3.4.10_pre2/busybox-1.8.2 allows for loading drivers with their firmware? (I've got a qla2xxx driver that I'd like to load with its firmware from an initramfs.)
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
GNU/Linux user #369763
“Wow! I feel root”
Back to top
View user's profile Send private message
Ferris
Retired Dev
Retired Dev


Joined: 13 Jan 2003
Posts: 426
Location: N. Virginia (USA)

PostPosted: Mon Mar 10, 2008 2:05 pm    Post subject: Reply with quote

Keep checking in the freenode IRC #gentoo-sparc channel. People are getting closer, but I don't think an easy way yet.

Regards,
Ferris
Back to top
View user's profile Send private message
VinzC
Advocate
Advocate


Joined: 17 Apr 2004
Posts: 4663
Location: Theux (Belgium)

PostPosted: Mon Mar 10, 2008 9:23 pm    Post subject: Reply with quote

In fact I've succeeded in loading qla2xxx firmware with busybox but using a custom init script in the initramfs. I've also had to fix a bug in genkernel's init script where sysfs was mounted after loading modules. I've written a more detailed post.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
GNU/Linux user #369763
“Wow! I feel root”
Back to top
View user's profile Send private message
mightyhal
n00b
n00b


Joined: 30 Jan 2006
Posts: 15

PostPosted: Sun Mar 23, 2008 3:32 pm    Post subject: Reply with quote

Bluebird on the freenode #gentoo-sparc channel has created a script that puts together everything you need for the initramfs to get a QLA2*** to boot (it will even identify which firmware you need).

Last night he solved the last bug that let me, at least, get 2.6.24-r3 up and running on my Blade 1000 (QLA2200).
_________________
MightyHal
---
Sun Blade 1000 dual 900 MHz...
Back to top
View user's profile Send private message
armin76
Developer
Developer


Joined: 24 Apr 2006
Posts: 173

PostPosted: Sat Apr 19, 2008 5:53 pm    Post subject: Reply with quote

http://dev.gentoo.org/~armin76/qla2xxx.xml
Back to top
View user's profile Send private message
VinzC
Advocate
Advocate


Joined: 17 Apr 2004
Posts: 4663
Location: Theux (Belgium)

PostPosted: Sat Apr 19, 2008 8:18 pm    Post subject: Reply with quote

armin76 wrote:
http://dev.gentoo.org/~armin76/qla2xxx.xml

That means genkernel has been modified to support firmware loading :-) . Great!
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
GNU/Linux user #369763
“Wow! I feel root”
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum