Gentoo Archives: gentoo-sparc

From: Ivan Kabaivanov <chepati@×××××.com>
To: gentoo-sparc@l.g.o
Subject: Re: [gentoo-sparc] QLA2xxx
Date: Thu, 21 Feb 2008 21:10:15
Message-Id: 200802211556.47439.chepati@yahoo.com
In Reply to: RE: [gentoo-sparc] QLA2xxx by Friedrich Oslage
1 On Thursday 21 February 2008 14:50, Friedrich Oslage wrote:
2 > Hi,
3 >
4 > > The problem comes from the fact that the firmware is in the disk at
5 > > /lib/firmware starting from kernel 2.6.18 or something. If you boot
6 > > the 2617 from the CD it will probably work fine.
7 > > Anyway even creating a proper initrd with that /lib/firmware the
8 > > kernel does not load it. Don't know why.
9 >
10 > Using an initrd works fine for me, you probably just forgot to put udev
11 > in it.
12 >
13 > My initrd basicly looks like this:
14 > /dev/console
15 > /dev/null
16 > /bin/busybox
17 > /bin/udevd
18 > /lib/udev/firmware.sh
19 > /lib/udev/udev.conf
20 > /lib/udev/rules.d/50-udev.rules
21 > /firmware/ql2200_fw.bin
22 > /lib/modules/`uname -r`/modules.dep
23 > /lib/modules/`uname -r`/kernel/drivers/scsi/qla2xxx/qla2xxx.ko
24 > /linuxrc
25 >
26 > The script I used to create it is available @
27 > http://porno-bullen.de/~bluebird/initrd-qla2xxx/ but don't blame me if
28 > it doesn't work ;)
29 >
30 > Cheers,
31 > bluebird
32
33
34 This is the preferred method -- to let udev handle the firmware loading.
35 However if you don't have udev in the initrd or it doesn't work, all is not
36 lost. There's a way to manually load the firmware, but it's tricky. It's
37 tricky because you have to be very quick -- you'll have maybe up to 4-5
38 seconds to load the firmware. Here's how:
39
40 1) boot the machine (either with an initrd from the hard drive or with an
41 installation cd.)
42 2) drop to a shell somehow -- I don't run gentoo so I don't know if the
43 installer has this option but debian does and so does ubuntu for sparc.
44 3) Load qla2xxx.ko (just modprobe qla2xxx)
45 4) Find out the device path in /sys (on my sunfire280r
46 it's /sys/devices/pci0001\:00/0001\:00\:04.0/) It might take you a few tries
47 to find out. Look for a file /sys/devices/pci0001:00/0001:00:04.0/obppath
48 with this line
49 /pci@8,600000/SUNW,qlc@4. (the numbers are not important. the important part
50 is the qlc bit)
51 5) Type this: echo 1 > /sys/devices/pci0001:00/0001:00:04.0/loading
52 6) Type cat /lib/firmware/ql2200_fw.bin
53 > /sys/devices/pci0001:00/0001:00:04.0/data (this is one line)
54 7) Type echo 0 > /sys/devices/pci0001:00/0001:00:04.0/loading
55
56 for 5), 6) and 7) you'll get error message file not found. It doesn't matter.
57 The point is to cache these three command into the shell history so you can
58 recall them quickly when you need them. Remember, you have a window of a few
59 seconds and regardless how fast you type you won't make it without using
60 cached commands.
61
62 8) Unload qla2xxx (rmmod qla2xxx)
63 9) Now load the kernel module again (modprobe qla2xxx). The clock starts
64 ticking now. The module tells the kernel that it needs a firmware before the
65 hardware can be initialized. The module creates a device path in /sys and
66 creates two files, loading and data.
67 10) Quickly recall from history the command from 5) and press enter
68 11) Quickly recall from history the command from 6) and press enter
69 12) Quickly recall from history the command from 7) and press enter
70
71 You'll see messages that the card was initialized. Now you can load sd_mod.
72 If you had to resort to this, then chances are you don't have udev running so
73 you may have to manually create the device nodes in /dev. For your
74 convenience:
75
76 brw-rw---- 1 root disk 8, 0 2008-02-21 15:03 /dev/sda
77 brw-rw---- 1 root disk 8, 1 2008-02-21 15:03 /dev/sda1
78 brw-rw---- 1 root disk 8, 2 2008-02-21 15:03 /dev/sda2
79 brw-rw---- 1 root disk 8, 3 2008-02-21 15:03 /dev/sda3
80 brw-rw---- 1 root disk 8, 4 2008-02-21 15:03 /dev/sda4
81 brw-rw---- 1 root disk 8, 5 2008-02-21 15:03 /dev/sda5
82 brw-rw---- 1 root disk 8, 16 2008-02-21 15:03 /dev/sdb
83 brw-rw---- 1 root disk 8, 17 2008-02-21 15:03 /dev/sdb1
84 brw-rw---- 1 root disk 8, 18 2008-02-21 15:03 /dev/sdb2
85 brw-rw---- 1 root disk 8, 19 2008-02-21 15:03 /dev/sdb3
86 brw-rw---- 1 root disk 8, 20 2008-02-21 15:03 /dev/sdb4
87
88 Once you have all the device nodes in /dev you can go back to the installer
89 and resume. Make sure you install udev and make sure you copy the binary
90 firmware into /lib/firmware.
91
92 If you're not fast enough the two files loading and data will disappear. If
93 this happens, don't worry, just unload qla2xxx and load it again, and this
94 time make sure you're faster :-)
95
96 I've done this in the past and I can guarantee that it works.
97
98 2.6.17 was the last kernel where the fimrware was built into the module and
99 you didn't have to load it separately. If you can live with that old kernel,
100 you can downgrade.
101
102 IvanK.
103
104 --
105 gentoo-sparc@l.g.o mailing list

Replies

Subject Author
Re: [gentoo-sparc] QLA2xxx BRM <bm_witness@×××××.com>