Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Kernel can't load firmware
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
blackandwhite
n00b
n00b


Joined: 28 Dec 2017
Posts: 2

PostPosted: Thu Dec 28, 2017 9:12 pm    Post subject: [SOLVED] Kernel can't load firmware Reply with quote

Hello everyone!

This is my first physical Gentoo install and I have problem with kernel. I configured and compiled kernel, but it can't load firmware to Intel GPU (HD 520) and my Atheros Wireless Card (QCA9377). I have linux-firmware installed but kernel still can't load firmware. Here are logs:
dmesg | grep firmware
Code:
[    0.484679] i915 0000:00:02.0: Direct firmware load for i915/skl_dmc_ver1_26.bin failed with error -2
[    0.484683] i915 0000:00:02.0: Failed to load DMC firmware [https://01.org/linuxgraphics/downloads/firmware], disabling runtime power management.
[    0.716788] ath10k_pci 0000:02:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:02:00.0.bin failed with error -2
[    0.716794] ath10k_pci 0000:02:00.0: Direct firmware load for ath10k/cal-pci-0000:02:00.0.bin failed with error -2
[    0.716799] ath10k_pci 0000:02:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/firmware-6.bin failed with error -2
[    0.716804] ath10k_pci 0000:02:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/firmware-5.bin failed with error -2
[    0.716809] ath10k_pci 0000:02:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/firmware-4.bin failed with error -2
[    0.716814] ath10k_pci 0000:02:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/firmware-3.bin failed with error -2
[    0.716818] ath10k_pci 0000:02:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/firmware-2.bin failed with error -2
[    0.716820] ath10k_pci 0000:02:00.0: Failed to find firmware-N.bin (N between 2 and 6) from ath10k/QCA9377/hw1.0: -2
[    0.716820] ath10k_pci 0000:02:00.0: could not fetch firmware files (-2)


ls /lib/firmware/ath10k/QCA9377/hw1.0
Code:

board-2.bin
board.bin
firmware-5.bin
notice_ath10k_firmware-5.txt


zcat /proc/config.gz | grep FIRMWARE
Code:
CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_FIRMWARE_IN_KERNEL is not set
CONFIG_EXTRA_FIRMWARE=""
# CONFIG_CYPRESS_FIRMWARE is not set
# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
# CONFIG_FIRMWARE_EDID is not set
CONFIG_FIRMWARE_MEMMAP=y
# CONFIG_GOOGLE_FIRMWARE is not set
# CONFIG_TEST_FIRMWARE is not set


Where is the problem? Without firmware I can't use my WiFi card and finish installation. Thank You in advance for answer.


Last edited by blackandwhite on Fri Dec 29, 2017 1:12 am; edited 1 time in total
Back to top
View user's profile Send private message
Cyker
Veteran
Veteran


Joined: 15 Jun 2006
Posts: 1746

PostPosted: Thu Dec 28, 2017 9:25 pm    Post subject: Reply with quote

Oooh, I ran into this when I was trying to get my DVB-T2 adaptors working, hold on, let me check my notes....


Okay, right, under Device Drivers -> Generic Driver Options, my kernel has:

CONFIG_PREVENT_FIRMWARE_BUILD=n
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE=amd-ucode/microcode_amd.bin amd-ucode/microcode_amd_fam15h.bin amd-ucode/microcode_amd_fam16h.bin
CONFIG_EXTRA_FIRMWARE_DIR=/lib/firmware

I think the CONFIG_EXTRA_FIRMWARE_DIR=/lib/firmware is the key here, but you could put full paths of the firmwares you want in CONFIG_EXTRA_FIRMWARE as I've done with the CPU microcode ones to compile them into the kernel...
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Dec 28, 2017 9:30 pm    Post subject: Reply with quote

blackandwhite,

Welcome to Gentoo.

You didn't prowide the firmware to the kernel.

Code:
CONFIG_EXTRA_FIRMWARE=""
needs to list your firmware.
When you populate that a currently hidden option
Code:
CONFIG_EXTRA_FIRMWARE_DIR
for the firmware directory will appear. Populate that too.

Check that the firmware needed is in /lib/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
blackandwhite
n00b
n00b


Joined: 28 Dec 2017
Posts: 2

PostPosted: Fri Dec 29, 2017 1:12 am    Post subject: Reply with quote

I thought it will load automatically. Well, manually specifying firmware files like You said works, and now my WiFi is available after boot. The most important thing about it is that I learned how to properly compile kernel for my machine. Thank You very much for answers.
Back to top
View user's profile Send private message
Cyker
Veteran
Veteran


Joined: 15 Jun 2006
Posts: 1746

PostPosted: Fri Dec 29, 2017 12:14 pm    Post subject: Reply with quote

You're welcome! :)

It should load the firmwares automatically, but only once you specify the /lib/firmware directory - I only have the CPU microcode listed in mine, but it also loads firmwares for my USB DVB-T dongles too.

I'd forgotten that you can't actually enter a directory path until something is in the kernel extra firmware entry so kudos to NS for pointing out that very important point!

I don't know why it's like that tho' - Is a bit odd for sure!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Dec 29, 2017 12:34 pm    Post subject: Reply with quote

blackandwhite,

The firmware is loaded when your wifi module is initialised.

When its configured as <*>, its built into the kernel.
You must supply the firmware to the kernel too.

When its configured as <M> the wifi driver is loaded after root is mounted, so it can read /lib/firmware to load the firmware.

What counts is which side of root being mounted is the module being initialised?
Its not just wifi, its all things that need 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
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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