LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 08-22-2016, 02:09 PM   #1
nocrazy
LQ Newbie
 
Registered: Aug 2016
Posts: 17

Rep: Reputation: Disabled
LFS - direct firmware load failed error -2


Good evening,
When I start the eth0, it works.
However I get Direct firmware load for rtl_nic/rtl8168g-2.fw failed with error -2
I downloaded the firmware and dropped it into /lib/firmware/, still the same.

Any idea...
 
Old 08-22-2016, 03:05 PM   #2
zk1234
4MLinux Maintainer
 
Registered: Oct 2010
Location: Poland
Distribution: 4MLinux, Slackware
Posts: 1,254

Rep: Reputation: 220Reputation: 220Reputation: 220
Please post the output of the following command:
Code:
ls /lib/firmware/rtl_nic
.
 
Old 08-22-2016, 03:53 PM   #3
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Also, if you built r8169 into kernel (not as a module) the firmware will not load because at the time kernel loads the root filesystem is not mounted yet.
 
Old 08-23-2016, 04:17 AM   #4
nocrazy
LQ Newbie
 
Registered: Aug 2016
Posts: 17

Original Poster
Rep: Reputation: Disabled
It's best if I put it in the right directory /lib/firmware/rtl_nic

Now I don't get any more the failed message.

ls /lib/firmware/rtl_nic return rtl8168g-2.fw

But LFS is still using the r8169 driver and if I compile the kernel without this device option, then I have no eth0, rtl8168g-2.fw is not running.

Last edited by nocrazy; 08-23-2016 at 04:26 AM.
 
Old 08-23-2016, 04:34 AM   #5
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Is that firmware for wifi device? as wired is working.
 
Old 08-23-2016, 06:02 AM   #6
zk1234
4MLinux Maintainer
 
Registered: Oct 2010
Location: Poland
Distribution: 4MLinux, Slackware
Posts: 1,254

Rep: Reputation: 220Reputation: 220Reputation: 220
What do you mean by "rtl8168g-2.fw is not running"? How do you know this?
What do you mean by "I have no eth0"? How do you know this?

.

Last edited by zk1234; 08-23-2016 at 06:17 AM.
 
Old 08-23-2016, 06:38 AM   #7
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
This is onboard wired NIC Realtek 8168, it works without firmware with kernel r8169 driver, but there is a firmware fix for 8168, kernel driver sees 8168 and tries to load the firmware. Thus, the r8169 kernel driver needs to be built as module, when built into kernel it won't have access to the firmware at the boot time as I explained in post #3 (and what apparently was ignored by OP).
 
1 members found this post helpful.
Old 08-23-2016, 09:29 AM   #8
nocrazy
LQ Newbie
 
Registered: Aug 2016
Posts: 17

Original Poster
Rep: Reputation: Disabled
I don't understand very well how to build as module.

I got the driver from realtek and did:
make clean modules
make install
depmod -a
modprobe r8169


now it's in /lib/modules/4.4.2/kernel/drivers/net/r8169.ko

But still not working

Also another question : is systemd a wrong choice ?

Last edited by nocrazy; 08-23-2016 at 09:38 AM.
 
Old 08-23-2016, 11:00 AM   #9
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
To build as a module <m>, instead of <*> which is built into kernel.

Code:
grep CONFIG_R8169 /boot/config-x.x.x
That will show what the driver is built as.

Last edited by spiky0011; 08-23-2016 at 11:32 AM.
 
Old 08-23-2016, 11:55 AM   #10
nocrazy
LQ Newbie
 
Registered: Aug 2016
Posts: 17

Original Poster
Rep: Reputation: Disabled
depmod -m ? deprecated
 
Old 08-23-2016, 02:47 PM   #11
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
There is no need to download r8169 driver from Realtek, it is already in kernel. You can download r8168 from Realtek, it would be exact match (and it is not in kernel).
 
Old 08-23-2016, 02:56 PM   #12
nocrazy
LQ Newbie
 
Registered: Aug 2016
Posts: 17

Original Poster
Rep: Reputation: Disabled
yes it's working from the kernel. Thank you.
I just need to have rtl_nic/rtl8168g-2.fw in /lib/firmware/rtl_nic to not have an error message.
Now I will look into the wifi

Last edited by nocrazy; 08-23-2016 at 03:00 PM.
 
  


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
[SOLVED] firmware: failed to load rtl_nic/rtl8168g-2.fw (-2) hack3rcon Debian 2 10-03-2015 01:16 PM
System No Longer Boots "Direct Firmware Load Failed" PasBern Linux - Newbie 3 06-05-2014 01:51 PM
[SOLVED] Failed to load firmware "radeon/R700_rlc.bin nicksmaddog Linux From Scratch 3 02-20-2012 11:04 AM
[SOLVED] r600_cp: Failed to load firmware "radeon/R600_rlc.bin" nocountryman Linux - Newbie 14 04-22-2011 09:58 AM
zd1211 failed to load firmware file h2gofast Linux - Wireless Networking 0 05-06-2006 10:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 09:15 PM.

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