Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Firmware in Kernel Problem
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32315
Location: 56N 3W

PostPosted: Sat Oct 22, 2011 3:46 pm    Post subject: Firmware in Kernel Problem Reply with quote

Team,

I have a fanless diskless ASUS E35M1-I Motherboard for a media player.
The diskless bit is important here as the system must load its kernel over the network then mount root over the network.

Now, the r8169 module wants to load firmware for its
Code:
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)

and dmesg tells me its looking for
Code:
rtl_nic/rtl8168e-2.fw
It stalls the bootup for 60 seconds trying to load the firmware, then the boot proceeds normally.
Keep in mind that the network card is not started at this time, so root is not mounted, so /lib/firmware/rtl_nic/rtl8168e-2.fw can't be read.
By the time root is mounted, its too late, as the driver is no longer interested in its firmware.

Building the firmware into the kernel seems to be the way forward but r8169 always looks in rtl_nic/rtl8168e-2.fw which I can't get to exist inside the kernel.
The dirty hack I've employed for kernel 3.0.7 is to edit drivers/net/r8169.c to change the firmware defines from
Code:
#define FIRMWARE_8168D_1        "rtl_nic/rtl8168d-1.fw"
#define FIRMWARE_8168D_2        "rtl_nic/rtl8168d-2.fw"
#define FIRMWARE_8168E_1        "rtl_nic/rtl8168e-1.fw"
#define FIRMWARE_8168E_2        "rtl_nic/rtl8168e-2.fw"
#define FIRMWARE_8105E_1        "rtl_nic/rtl8105e-1.fw"

to
Code:
#define FIRMWARE_8168D_1        "rtl8168d-1.fw"
#define FIRMWARE_8168D_2        "rtl8168d-2.fw"
#define FIRMWARE_8168E_1        "rtl8168e-1.fw"
#define FIRMWARE_8168E_2        "rtl8168e-2.fw"
#define FIRMWARE_8105E_1        "rtl8105e-1.fw"
which works like a charm but its ugly as I need to patch the kernel for every new version.
I know I can make an initrd and have /lib/firmware/rtl_nic/rtl8168e-2.fw there, so normal userspace firmware loading works but that seems like overkill for one firmware blob.

How do I make this justwork with in kernel firmware?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 9125

PostPosted: Sat Oct 22, 2011 4:01 pm    Post subject: Reply with quote

I recently had to build radeon firmware directly into a kernel. Like with your NIC firmware, it lives in a subdirectory below the main firmware area. For me, I had to set KERNEL_FIRMWARE_DIR=/lib/firmware/, install the firmware on the build system (emerge sys-kernel/linux-firmware), and list radeon/FOO radeon/BAR in EXTRA_FIRMWARE. It sounds like you tried something similar to this and did not get the results you wanted. Could you post the output of find /lib/firmware ; grep FIRMWARE .config?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32315
Location: 56N 3W

PostPosted: Sat Oct 22, 2011 4:21 pm    Post subject: Reply with quote

Hu,

From my working patched kernel
Code:
roy@mediaplayer /usr/src/linux $ grep FIRMWARE .config
CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_FIRMWARE_IN_KERNEL is not set
CONFIG_EXTRA_FIRMWARE="rtl8168e-2.fw"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware/rtl_nic/"
CONFIG_FIRMWARE_EDID=y
CONFIG_FIRMWARE_MEMMAP=y
# CONFIG_GOOGLE_FIRMWARE is not set


find /lib/firmware is huge, so its at http://paste.pocoo.org/show/496510/

Hmm... I may not have tried
Code:
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware/"
CONFIG_EXTRA_FIRMWARE="rtl_nic/rtl8168e-2.fw"

which is what I think you are suggesting.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 9125

PostPosted: Sat Oct 22, 2011 4:46 pm    Post subject: Reply with quote

Yes, that last block is what I intended.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32315
Location: 56N 3W

PostPosted: Sat Oct 22, 2011 4:59 pm    Post subject: Reply with quote

Hu,

That works!

Thank you very much.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
codelad
n00b
n00b


Joined: 13 Oct 2011
Posts: 7

PostPosted: Wed Oct 26, 2011 2:22 pm    Post subject: Reply with quote

Hello,

I have a very similar (if not identical) issue. While my bootup does not visibly stall, dmesg still shows a message:
Code:
r8169 0000:04:00.0: eth0: unable to load firmware patch rtl_nic/rtl8168e-3.fw (-2)


My hardware is:
Code:
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)


On my manually configured kernel (3.1.0), the relevant kernel parameters, read:
Code:
/usr/src/linux $ grep 'FIRMWARE' .config
CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_FIRMWARE_IN_KERNEL is not set
CONFIG_EXTRA_FIRMWARE="radeon/JUNIPER_me.bin radeon/JUNIPER_pfp.bin radeon/JUNIPER_rlc.bin"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware/"
CONFIG_FIRMWARE_EDID=y
CONFIG_FIRMWARE_MEMMAP=y
# CONFIG_GOOGLE_FIRMWARE is not set


I was about to try the solution offered in the earlier post, but could not find the directory /lib/firmware/rtl_nic/. From looking around, I gather the rtl_nic firmware tree is part of the linux-firmware package. But I have trouble emerging it, since it appears to conflict with the radeon-ucode package.

Any pointers much appreciated. Thank you!
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 1678
Location: Berlin, Germany

PostPosted: Wed Oct 26, 2011 2:54 pm    Post subject: Reply with quote

linux-firmware package contains most of the individual firmware packages already, hence the block.
Back to top
View user's profile Send private message
codelad
n00b
n00b


Joined: 13 Oct 2011
Posts: 7

PostPosted: Wed Oct 26, 2011 3:18 pm    Post subject: Reply with quote

chithanh wrote:
linux-firmware package contains most of the individual firmware packages already, hence the block.


I'm actually trying to achieve the reverse - trying to emerge linux-firmware while radeon-ucode is already installed. Is radeon-ucode a subset of linux-firmware? If so, I could possibly unmerge radeon-ucode and replace it with linux-firmware.

Thank you.
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2643
Location: Slovenia

PostPosted: Wed Oct 26, 2011 5:36 pm    Post subject: Reply with quote

codelad wrote:
Is radeon-ucode a subset of linux-firmware?

Yep.

codelad wrote:
If so, I could possibly unmerge radeon-ucode and replace it with linux-firmware.

Yep, that's exactly what you should do.
Back to top
View user's profile Send private message
codelad
n00b
n00b


Joined: 13 Oct 2011
Posts: 7

PostPosted: Wed Oct 26, 2011 7:00 pm    Post subject: Reply with quote

Gusar, thanks a ton for the help! It works now and the error message is gone.

Strange though, that I've always used radeon-ucode and have never faced this problem before upgrading to the 3.1.0 kernel.
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2643
Location: Slovenia

PostPosted: Thu Oct 27, 2011 2:53 pm    Post subject: Reply with quote

A question: Did your network card not work without the firmware? I ask because I have a similar Realtek card and it works even without firmware. I get the error message, but network is working anyway.
Back to top
View user's profile Send private message
codelad
n00b
n00b


Joined: 13 Oct 2011
Posts: 7

PostPosted: Thu Oct 27, 2011 8:03 pm    Post subject: Reply with quote

Gusar wrote:
A question: Did your network card not work without the firmware? I ask because I have a similar Realtek card and it works even without firmware. I get the error message, but network is working anyway.


My network card seemed to work fine. I found the error message annoying, though.

FYI, I had previously faced issues with this same network hardware while on kernel 3.0.7, and had to "downgrade" to the r8168 drivers from the manufacturer to make it work.
Back to top
View user's profile Send private message
dewhite
n00b
n00b


Joined: 16 Mar 2003
Posts: 54
Location: Houston, Texas, USA

PostPosted: Sun Jan 20, 2013 4:22 pm    Post subject: Reply with quote

Hello All,

I too am getting a message in dmesg regarding the firmware not loading for my NIC:

Code:
black linux # dmesg | grep firmware
[   63.737690] r8169 0000:02:00.0: eth0: unable to load firmware patch rtl_nic/rtl8168e-3.fw (-2)


My Kernel is configured as some have suggested above:

Code:
black linux # grep 'FIRMWARE' /usr/src/linux/.config
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE="rtl_nic/rtl8168e-3.fw"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware/"
# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
CONFIG_FIRMWARE_EDID=y
CONFIG_FIRMWARE_MEMMAP=y
# CONFIG_GOOGLE_FIRMWARE is not set


The firmware blob seems to exist in the correct location:

Code:
black linux # ls -l /lib/firmware/rtl_nic/rtl8168*
-rw-r--r-- 1 root root 1492 Jan 20 09:37 /lib/firmware/rtl_nic/rtl8168d-1.fw
-rw-r--r-- 1 root root 1324 Jan 20 09:37 /lib/firmware/rtl_nic/rtl8168d-2.fw
-rw-r--r-- 1 root root 5500 Jan 20 09:37 /lib/firmware/rtl_nic/rtl8168e-1.fw
-rw-r--r-- 1 root root 3920 Jan 20 09:37 /lib/firmware/rtl_nic/rtl8168e-2.fw
-rw-r--r-- 1 root root 3872 Jan 20 09:37 /lib/firmware/rtl_nic/rtl8168e-3.fw
-rw-r--r-- 1 root root 3424 Jan 20 09:37 /lib/firmware/rtl_nic/rtl8168f-1.fw
-rw-r--r-- 1 root root 1232 Jan 20 09:37 /lib/firmware/rtl_nic/rtl8168f-2.fw
-rw-r--r-- 1 root root 4272 Jan 20 09:37 /lib/firmware/rtl_nic/rtl8168g-1.fw


This is a bit annoying as the driver is built-in, and needed for a custom initramfs that supports an early environment dropbear ssh server, to provide access to decrypt my LUKS root remotely. Waiting for the error message to come adds ~60 seconds to the boot-up that shouldn't need to be there...

Any thoughts, comments, questions, ideas, references, etc are always appreciated!
_________________
Work FS: X4 805 || 4Gb DDR2 || nVidia 7200GS || 5x 250Gb SATA Drives in RAID5

Home FS: C2Q Q6600 || 4Gb DDR2 || ATi x800pro || 4x 2TB SATA Drives in RAID5

Home Desktop: Phenom X6 1045T || 8Gb DDR3 || nVidia GTS 250 || Samsung 840Pro SSD w/ FDE
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 1678
Location: Berlin, Germany

PostPosted: Sun Jan 20, 2013 4:52 pm    Post subject: Reply with quote

.config may or may not be the config of your currently running kernel. Only for /proc/config.gz this is guaranteed (needs CONFIG_IKCONFIG_PROC enabled).
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32315
Location: 56N 3W

PostPosted: Sun Jan 20, 2013 6:24 pm    Post subject: Reply with quote

dewhite,

What does
Code:
 uname -a
show?
The #nnn is the number of times this kernel has been built and date/time is the build time of the running kernel.
Does that look right?

Also, compare the kernel version shown with the output of
Code:
readlink /usr/src/linux

If they show different kernel versions there is a good change that you are not running the kernel you think you are and you are posting a .config, from a kernel you are not actually running.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
dewhite
n00b
n00b


Joined: 16 Mar 2003
Posts: 54
Location: Houston, Texas, USA

PostPosted: Sun Jan 20, 2013 8:21 pm    Post subject: Reply with quote

Thank You both for the quick replies!

This is a new build I installed last night, and I'm fairly certain that the config options I posted are compiled into my currently running kernel, but I certainly don't mind confirming:

Code:
dan@black ~ $ uname -a && readlink /usr/src/linux
Linux black 3.6.11-gentoo #8 SMP Sun Jan 20 10:13:02 CST 2013 x86_64 AMD Phenom(tm) II X6 1045T Processor AuthenticAMD GNU/Linux
linux-3.6.11-gentoo


Further:

Code:
dan@black ~ $ cat /proc/config.gz | gunzip | grep 'FIRMWARE'
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE="rtl_nic/rtl8168e-3.fw"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware/"
# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
CONFIG_FIRMWARE_EDID=y
CONFIG_FIRMWARE_MEMMAP=y
# CONFIG_GOOGLE_FIRMWARE is not set


What else comes to mind?
_________________
Work FS: X4 805 || 4Gb DDR2 || nVidia 7200GS || 5x 250Gb SATA Drives in RAID5

Home FS: C2Q Q6600 || 4Gb DDR2 || ATi x800pro || 4x 2TB SATA Drives in RAID5

Home Desktop: Phenom X6 1045T || 8Gb DDR3 || nVidia GTS 250 || Samsung 840Pro SSD w/ FDE
Back to top
View user's profile Send private message
Jaglover
Advocate
Advocate


Joined: 29 May 2005
Posts: 4733
Location: Saint Amant, Acadiana

PostPosted: Sun Jan 20, 2013 8:28 pm    Post subject: Reply with quote

dmesg
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32315
Location: 56N 3W

PostPosted: Sun Jan 20, 2013 8:46 pm    Post subject: Reply with quote

dewhite,

Exactly when did the firmware get into /lib/firmware ?
Before or after Sun Jan 20 10:13:02 CST 2013 ?

To test that the firmware is found, build the NIC driver as a module. When it loads, it will load the firmware too and tell you whats happening in dmesg.
NIC drivers need to be listed in /etc/conf.d/modules as they are not auto loaded.

If that works, revert the change and rebuild your kernel starting with make clean
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2643
Location: Slovenia

PostPosted: Sun Jan 20, 2013 9:05 pm    Post subject: Reply with quote

NeddySeagoon wrote:
NIC drivers need to be listed in /etc/conf.d/modules as they are not auto loaded.

Err, of course they are. There are very, very few modules that aren't autoloaded. Virtualbox modules come to mind. But hardware drivers, they're all autoloaded.
Back to top
View user's profile Send private message
dewhite
n00b
n00b


Joined: 16 Mar 2003
Posts: 54
Location: Houston, Texas, USA

PostPosted: Sun Jan 20, 2013 9:16 pm    Post subject: Reply with quote

Jaglover wrote:
dmesg


http://bpaste.net/show/71627/
_________________
Work FS: X4 805 || 4Gb DDR2 || nVidia 7200GS || 5x 250Gb SATA Drives in RAID5

Home FS: C2Q Q6600 || 4Gb DDR2 || ATi x800pro || 4x 2TB SATA Drives in RAID5

Home Desktop: Phenom X6 1045T || 8Gb DDR3 || nVidia GTS 250 || Samsung 840Pro SSD w/ FDE
Back to top
View user's profile Send private message
dewhite
n00b
n00b


Joined: 16 Mar 2003
Posts: 54
Location: Houston, Texas, USA

PostPosted: Sun Jan 20, 2013 9:18 pm    Post subject: Reply with quote

NeddySeagoon wrote:
dewhite,

Exactly when did the firmware get into /lib/firmware ?
Before or after Sun Jan 20 10:13:02 CST 2013 ?

To test that the firmware is found, build the NIC driver as a module. When it loads, it will load the firmware too and tell you whats happening in dmesg.
NIC drivers need to be listed in /etc/conf.d/modules as they are not auto loaded.

If that works, revert the change and rebuild your kernel starting with make clean


I emerged sys-kernel/linux-firmware and checked the contents of the rtl_nic directory just before configuring the location into the kernel and recompiling, at 9:37am:

Code:
dan@black ~ $ ls -l /lib/firmware/rtl_nic/rtl8*
-rw-r--r-- 1 root root 2076 Jan 20 09:37 /lib/firmware/rtl_nic/rtl8105e-1.fw
-rw-r--r-- 1 root root 1856 Jan 20 09:37 /lib/firmware/rtl_nic/rtl8106e-1.fw
-rw-r--r-- 1 root root 1492 Jan 20 09:37 /lib/firmware/rtl_nic/rtl8168d-1.fw
-rw-r--r-- 1 root root 1324 Jan 20 09:37 /lib/firmware/rtl_nic/rtl8168d-2.fw
-rw-r--r-- 1 root root 5500 Jan 20 09:37 /lib/firmware/rtl_nic/rtl8168e-1.fw
-rw-r--r-- 1 root root 3920 Jan 20 09:37 /lib/firmware/rtl_nic/rtl8168e-2.fw
-rw-r--r-- 1 root root 3872 Jan 20 09:37 /lib/firmware/rtl_nic/rtl8168e-3.fw
-rw-r--r-- 1 root root 3424 Jan 20 09:37 /lib/firmware/rtl_nic/rtl8168f-1.fw
-rw-r--r-- 1 root root 1232 Jan 20 09:37 /lib/firmware/rtl_nic/rtl8168f-2.fw
-rw-r--r-- 1 root root 4272 Jan 20 09:37 /lib/firmware/rtl_nic/rtl8168g-1.fw
-rw-r--r-- 1 root root 1824 Jan 20 09:37 /lib/firmware/rtl_nic/rtl8402-1.fw
-rw-r--r-- 1 root root 2112 Jan 20 09:37 /lib/firmware/rtl_nic/rtl8411-1.fw


I'm going to try loading the driver as a module and will report back in a couple of minutes. Thanks!
_________________
Work FS: X4 805 || 4Gb DDR2 || nVidia 7200GS || 5x 250Gb SATA Drives in RAID5

Home FS: C2Q Q6600 || 4Gb DDR2 || ATi x800pro || 4x 2TB SATA Drives in RAID5

Home Desktop: Phenom X6 1045T || 8Gb DDR3 || nVidia GTS 250 || Samsung 840Pro SSD w/ FDE
Back to top
View user's profile Send private message
dewhite
n00b
n00b


Joined: 16 Mar 2003
Posts: 54
Location: Houston, Texas, USA

PostPosted: Sun Jan 20, 2013 9:39 pm    Post subject: Reply with quote

With the 8169 driver loaded as a module, dmesg declines to mention the firmware issue - I assume that means it was able to load it without issue:

Code:
dan@black ~ $ dmesg | grep 8169   
[   19.657751] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[   19.658007] r8169 0000:02:00.0: irq 44 for MSI/MSI-X
[   19.658198] r8169 0000:02:00.0: eth0: RTL8168evl/8111evl at 0xffffc9001338e000, 54:04:a6:d9:bd:36, XID 0c900800 IRQ 44
[   19.658200] r8169 0000:02:00.0: eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[   22.433001] r8169 0000:02:00.0: eth0: link down
[   22.433021] r8169 0000:02:00.0: eth0: link down
[   25.044400] r8169 0000:02:00.0: eth0: link up


For the entire output, please see: http://bpaste.net/show/71631/

After recompiling the 8169 driver directly back into the kernel the errors (and delay) are gone from dmesg:

Code:
dan@black ~ $ dmesg | grep 8169
[    2.226640] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    2.227348] r8169 0000:02:00.0: irq 44 for MSI/MSI-X
[    2.227536] r8169 0000:02:00.0: eth0: RTL8168evl/8111evl at 0xffffc90000c7e000, 54:04:a6:d9:bd:36, XID 0c900800 IRQ 44
[    2.228062] r8169 0000:02:00.0: eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[    3.311284] r8169 0000:02:00.0: eth0: link down
[    3.311297] r8169 0000:02:00.0: eth0: link down
[    5.866720] r8169 0000:02:00.0: eth0: link up


Full version: http://bpaste.net/show/71633/

I suppose it was the 'make clean' that was probably necessary to flush some loose? In any case - I VERY MUCH appreciate all of your taking the time to lead this horse to some water!

The bright side, is that with an X6 cpu, make clean && make -j6 && make modules_install && make install goes by pretty quickly... :D

BTW - should this thread be marked as 'solved', to encourage others with the same issue(s)?
_________________
Work FS: X4 805 || 4Gb DDR2 || nVidia 7200GS || 5x 250Gb SATA Drives in RAID5

Home FS: C2Q Q6600 || 4Gb DDR2 || ATi x800pro || 4x 2TB SATA Drives in RAID5

Home Desktop: Phenom X6 1045T || 8Gb DDR3 || nVidia GTS 250 || Samsung 840Pro SSD w/ FDE
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32315
Location: 56N 3W

PostPosted: Sun Jan 20, 2013 9:54 pm    Post subject: Reply with quote

dewhite,

Code:
[    2.226640] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded

is before
Code:
[    3.165286]  sda: sda1 sda2
which is your real HDD and the container for /lib/firmare, so its unlikely firmware is loaded.
Its also unlikely that the ethernet driver comes from /lib/modules/... as your real_root is not yet mounted.

Its perfectly possible to put all this stuff into your initrd ... but did you?
As far as I know, neither dracut nor genkernel are that clever.

I suspect something went wrong with your kernel install.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
dewhite
n00b
n00b


Joined: 16 Mar 2003
Posts: 54
Location: Houston, Texas, USA

PostPosted: Sun Jan 20, 2013 10:18 pm    Post subject: Reply with quote

NeddySeagoon wrote:
dewhite,

Code:
[    2.226640] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded

is before
Code:
[    3.165286]  sda: sda1 sda2
which is your real HDD and the container for /lib/firmare, so its unlikely firmware is loaded.
Its also unlikely that the ethernet driver comes from /lib/modules/... as your real_root is not yet mounted.

Its perfectly possible to put all this stuff into your initrd ... but did you?
As far as I know, neither dracut nor genkernel are that clever.

I suspect something went wrong with your kernel install.


In fact, I prefer to avoid things like genkernel and dracut, because when things break, you have no idea what 'not broken' was supposed to look/feel like. That, and maybe I'm a little OCD. :wink:

I wrote an init script and rolled my own initramfs around it.

I must have misunderstood what was taking place here. I was under the impression that, at compile time, make was looking for the firmware blob, in the specified location, to build into the kernel driver. Is the kernel actually trying to dynamically pull the firmware in each time it boots?

If so - what you're saying makes perfect sense. Why then, I wonder, after a recompile of the 8169 driver into the kernel, did the pause during boot and complaints about firmware disappear from dmesg?

Is there a tool that will probe the device or kernel driver and tell me if it has the enhanced functionality supported by loading the firmware?

I'm sure I could just create the /lib/firmware directory structure in my initramfs and drop in the firmware file, but I'd like to understand what's going on in the case that something like this comes up again...
_________________
Work FS: X4 805 || 4Gb DDR2 || nVidia 7200GS || 5x 250Gb SATA Drives in RAID5

Home FS: C2Q Q6600 || 4Gb DDR2 || ATi x800pro || 4x 2TB SATA Drives in RAID5

Home Desktop: Phenom X6 1045T || 8Gb DDR3 || nVidia GTS 250 || Samsung 840Pro SSD w/ FDE
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2643
Location: Slovenia

PostPosted: Sun Jan 20, 2013 10:22 pm    Post subject: Reply with quote

If the NIC driver is in the kernel (not a module), and so is the firmware, then /lib/firmware doesn't matter. The kernel does load the firmware at each boot, but this firmware is in the kernel image itself. Basically, your impression is correct.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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