Re: [gentoo-user] Loading a Firmware Module By hand?

2017-12-18 Thread Adam Carter
That particular firmware does not exist. I am trying to figure how far

> back I need to rollback the kernel. Sabayon's live ISO is using
> 4.13.0, but that is no longer in the tree. Not sure if I need to go
> back to the 4.12 ebuilds, or if 4.13.5 will suit my needs; perhaps
> there is a bit of source code that I can look at to see what is being
> used for the firmware?
>

Are you thinking that there's some interoperability issues between kernel
versions and firmwares? My impression is that's generally not a problem, so
wouldn't be too worried about trying different kernel versions.

So the steps are just;
- identify the correct firmware
- verify its in /lib/firmware (typically just emerge linux-firmware, but
sometimes others from /usr/portage/sys-firmware/ )
- configure the kernel to load it (in this case follow Floyd's instructions)
- build and install new kernel
- reboot

FYI on one of my systems;
$ zgrep ^C.*FIRM /proc/config.gz
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE="i915/skl_dmc_ver1_26.bin i915/skl_guc_ver6_1.bin
intel-ucode/06-4e-03"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
CONFIG_FIRMWARE_MEMMAP=y
$ dmesg | egrep '(firm|microcode)'
[0.300096] [drm] Finished loading DMC firmware i915/skl_dmc_ver1_26.bin
(v1.26)
[0.321592] microcode: sig=0x406e3, pf=0x80, revision=0xba
[0.321679] microcode: Microcode Update Driver: v2.2.
$


Re: [gentoo-user] Loading a Firmware Module By hand?

2017-12-18 Thread Floyd Anderson


If you want to build into the kernel again, check 
‘/lib/firmware/ath10k/QCA6174/hw2.1/firmware-6.bin’ exists and set:


  CONFIG_FIRMWARE_IN_KERNEL=y
  CONFIG_EXTRA_FIRMWARE="ath10k/QCA6174/hw2.1/firmware-6.bin"
  CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"



I must correct myself. I’ve seen that the file ‘firmware-6.bin’ is 
located in ‘/lib/firmware/ath10k/QCA6174/hw3.0’ and ‘firmware-5.bin’ 
lives in ‘/lib/firmware/ath10k/QCA6174/hw2.1’, see [1].


That is where your firmware loading error comes from (and my wrong 
example for the CONFIG_EXTRA_FIRMWARE). So, the correct kernel 
configuration should be:


   CONFIG_FIRMWARE_IN_KERNEL=y
   CONFIG_EXTRA_FIRMWARE="ath10k/QCA6174/hw2.1/firmware-5.bin"
   CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"

or

   CONFIG_FIRMWARE_IN_KERNEL=y
   CONFIG_EXTRA_FIRMWARE="ath10k/QCA6174/hw3.0/firmware-6.bin"
   CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"


[1] 



--
Regards,
floyd




Re: [gentoo-user] Loading a Firmware Module By hand?

2017-12-18 Thread Hunter Jozwiak
On 12/18/17, Floyd Anderson  wrote:
> On Mon, 18 Dec 2017 19:15:04 +
> Hunter Jozwiak  wrote:
>>On 12/18/17, Mick  wrote:
>>> On Monday, 18 December 2017 05:11:20 GMT Hunter Jozwiak wrote:
 Hmm. I have kernel 4.14.7 and linux-firmware 20171206. I tried version
 9 as well, but that didn't help matters, either. Nor did
 compiling the firmware into the kernel; either 4.14 is too old, or it
 is too new.
>>>
>>> I'd think they are both too new?
>>>
 I tried copying the firmware my live iso was using, but
 that didn't help either.
>>>
>>> If the live iso works, start with using the same kernel release and
>>> linux-
>>> firmware version, to see if this works as expected on your installation.
>>> Then
>>> update kernel sources and firmware to the latest stable and see if this
>>> works
>>> too.
>>>
>>> From there on you can move into ~arch to find the version at which
>>> things
>>> break.
>>> --
>>> Regards,
>>> Mick
>>Okay, here are the dmesg messages:
>>https://paste.pound-python.org/show/nrNfBAEPfh9W7ZIeItJC/
>>The present kernel configuration, as of yesterday evening:
>>https://paste.pound-python.org/show/NmNB8nzLuEjmsz74kRVE/
>>Make and model of the offending card: Qualcomm 6174 revision 20.
>>Not exactly what the -2 error means, but I will try as Mick suggested
>>and work my way forwards to see what I can get working.
>>
>
> Hi,
>
> I was a little bit confused from your earlier mentioned
>
> /lib/firmware/ath10k/QCABLEFAGD/HW3.0
>
> I wonder where this firmware come from. I cannot find it, neither with
> the identifier ‘QCABLEFAGD’ nor an upper cased ‘HW3.0’ directory in
> [1][2][3][4].
>
> Your log tells an other story now. As far as I can tell:
>
> “Direct firmware load for […] failed with error -2”
>
> comes from _request_firmware and fw_get_filesystem_firmware functions in
> file [5]. The symbolic error name ENOENT, see `man 3 errno`, means
> something like ‘No such element’ or ‘No such file or directory’.
>
> Even CONFIG_EXTRA_FIRMWARE_DIR defaults to ‘/lib/firmware’, there should
> be whether an entry ‘# CONFIG_EXTRA_FIRMWARE_DIR is not set’ or
> something like ‘CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"’ in your
> config. Its unclear to me why it is not there.
>
> If you want to build into the kernel again, check
> ‘/lib/firmware/ath10k/QCA6174/hw2.1/firmware-6.bin’ exists and set:
>
> CONFIG_FIRMWARE_IN_KERNEL=y
> CONFIG_EXTRA_FIRMWARE="ath10k/QCA6174/hw2.1/firmware-6.bin"
> CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
>
> Hope that helps.
>
>
> [1]
> 
> [2]
> 
> [3] 
> [4] 
> [5]
> 
>
>
>
> --
> Regards,
> floyd
>
>
>
That particular firmware does not exist. I am trying to figure how far
back I need to rollback the kernel. Sabayon's live ISO is using
4.13.0, but that is no longer in the tree. Not sure if I need to go
back to the 4.12 ebuilds, or if 4.13.5 will suit my needs; perhaps
there is a bit of source code that I can look at to see what is being
used for the firmware?



Re: [gentoo-user] Loading a Firmware Module By hand?

2017-12-18 Thread Floyd Anderson

On Mon, 18 Dec 2017 19:15:04 +
Hunter Jozwiak  wrote:

On 12/18/17, Mick  wrote:

On Monday, 18 December 2017 05:11:20 GMT Hunter Jozwiak wrote:

Hmm. I have kernel 4.14.7 and linux-firmware 20171206. I tried version
9 as well, but that didn't help matters, either. Nor did
compiling the firmware into the kernel; either 4.14 is too old, or it
is too new.


I'd think they are both too new?


I tried copying the firmware my live iso was using, but
that didn't help either.


If the live iso works, start with using the same kernel release and linux-
firmware version, to see if this works as expected on your installation.
Then
update kernel sources and firmware to the latest stable and see if this
works
too.

From there on you can move into ~arch to find the version at which things
break.
--
Regards,
Mick

Okay, here are the dmesg messages:
https://paste.pound-python.org/show/nrNfBAEPfh9W7ZIeItJC/
The present kernel configuration, as of yesterday evening:
https://paste.pound-python.org/show/NmNB8nzLuEjmsz74kRVE/
Make and model of the offending card: Qualcomm 6174 revision 20.
Not exactly what the -2 error means, but I will try as Mick suggested
and work my way forwards to see what I can get working.



Hi,

I was a little bit confused from your earlier mentioned

   /lib/firmware/ath10k/QCABLEFAGD/HW3.0

I wonder where this firmware come from. I cannot find it, neither with 
the identifier ‘QCABLEFAGD’ nor an upper cased ‘HW3.0’ directory in 
[1][2][3][4].


Your log tells an other story now. As far as I can tell:

   “Direct firmware load for […] failed with error -2”

comes from _request_firmware and fw_get_filesystem_firmware functions in 
file [5]. The symbolic error name ENOENT, see `man 3 errno`, means 
something like ‘No such element’ or ‘No such file or directory’.


Even CONFIG_EXTRA_FIRMWARE_DIR defaults to ‘/lib/firmware’, there should 
be whether an entry ‘# CONFIG_EXTRA_FIRMWARE_DIR is not set’ or 
something like ‘CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"’ in your 
config. Its unclear to me why it is not there.


If you want to build into the kernel again, check 
‘/lib/firmware/ath10k/QCA6174/hw2.1/firmware-6.bin’ exists and set:


   CONFIG_FIRMWARE_IN_KERNEL=y
   CONFIG_EXTRA_FIRMWARE="ath10k/QCA6174/hw2.1/firmware-6.bin"
   CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"

Hope that helps.


[1] 

[2] 

[3] 
[4] 
[5] 




--
Regards,
floyd




Re: [gentoo-user] Loading a Firmware Module By hand?

2017-12-18 Thread Hunter Jozwiak
On 12/18/17, Mick  wrote:
> On Monday, 18 December 2017 05:11:20 GMT Hunter Jozwiak wrote:
>> Hmm. I have kernel 4.14.7 and linux-firmware 20171206. I tried version
>> 9 as well, but that didn't help matters, either. Nor did
>> compiling the firmware into the kernel; either 4.14 is too old, or it
>> is too new.
>
> I'd think they are both too new?
>
>> I tried copying the firmware my live iso was using, but
>> that didn't help either.
>
> If the live iso works, start with using the same kernel release and linux-
> firmware version, to see if this works as expected on your installation.
> Then
> update kernel sources and firmware to the latest stable and see if this
> works
> too.
>
> From there on you can move into ~arch to find the version at which things
> break.
> --
> Regards,
> Mick
Okay, here are the dmesg messages:
https://paste.pound-python.org/show/nrNfBAEPfh9W7ZIeItJC/
The present kernel configuration, as of yesterday evening:
https://paste.pound-python.org/show/NmNB8nzLuEjmsz74kRVE/
Make and model of the offending card: Qualcomm 6174 revision 20.
Not exactly what the -2 error means, but I will try as Mick suggested
and work my way forwards to see what I can get working.



Re: [gentoo-user] Loading a Firmware Module By hand?

2017-12-18 Thread Mick
On Monday, 18 December 2017 05:11:20 GMT Hunter Jozwiak wrote:
> Hmm. I have kernel 4.14.7 and linux-firmware 20171206. I tried version
> 9 as well, but that didn't help matters, either. Nor did
> compiling the firmware into the kernel; either 4.14 is too old, or it
> is too new. 

I'd think they are both too new?

> I tried copying the firmware my live iso was using, but
> that didn't help either.

If the live iso works, start with using the same kernel release and linux-
firmware version, to see if this works as expected on your installation.  Then 
update kernel sources and firmware to the latest stable and see if this works 
too.

>From there on you can move into ~arch to find the version at which things 
break.
-- 
Regards,
Mick

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Loading a Firmware Module By hand?

2017-12-17 Thread Floyd Anderson

On Mon, 18 Dec 2017 05:11:20 +
Hunter Jozwiak  wrote:

On 12/17/17, Andrey Utkin  wrote:

On Sun, Dec 17, 2017 at 12:34:14AM -0500, Hunter Jozwiak wrote:

Hi,

I have an ath10k_pci device that I'm trying to get hooked to the
Internet, but I'm having some strange issues. It is trying to load the
2.1 firmware, but I don't think that is the proper firmware for the
interface to have; I think it ought to be loading the 3.0 module, but
am not quite sure on that either, or how I could go about injecting
that into the modprobe; I wasn't able to pinpoint the firmware blob
the ISO was using, so that wasn't much of a pointer in the right
direction either. I see that the 3.0 blob does exist in
/lib/firmware/ath10k/QCABLEFAGD/HW3.0, but there are many bin files,


I have little to no idea about your actual case... But could it be that
you have a recent linux-firmware package (which provides /lib/firmware/
files) and not recent enough kernel? I think kernel is what decides
which firmware file to load.





!!! rearranged top-posting !!!


Hmm. I have kernel 4.14.7 and linux-firmware 20171206. I tried version
9 as well, but that didn't help matters, either. Nor did
compiling the firmware into the kernel; either 4.14 is too old, or it
is too new. I tried copying the firmware my live iso was using, but
that didn't help either.



I think you are a little bit too vague in your given info. If you don’t 
show your firmware related kernel settings (those lines posted by Mick 
earlier) nor what dmesg said about the firmware loading success of your 
specified config, people tends to think you know what you are doing and 
therefore may eliminate any errors based on syntactical mistakes or 
similar from their thoughts.


For instance, you wrote “It is trying to load the 2.1 firmware” but 
because trying != loaded successfully, nobody knows if 2.1 works or has 
been failed (and why), so you have a need to try the 3.0 blob.


As Mick pointed out, look what is in your dmesg log and communicate that 
(not only your own interpretation of it). Maybe there’s another module 
configured that also supports and loads the 2.1 blob so it must be 
blacklisted [1] or not built at all. Also the firmware must be available 
on boot and module load, so a probably used initramfs must include it as 
long as it is not built into the kernel.



[1] 


--
Regards,
floyd




Re: [gentoo-user] Loading a Firmware Module By hand?

2017-12-17 Thread Hunter Jozwiak
Hmm. I have kernel 4.14.7 and linux-firmware 20171206. I tried version
9 as well, but that didn't help matters, either. Nor did
compiling the firmware into the kernel; either 4.14 is too old, or it
is too new. I tried copying the firmware my live iso was using, but
that didn't help either.

On 12/17/17, Andrey Utkin  wrote:
> On Sun, Dec 17, 2017 at 12:34:14AM -0500, Hunter Jozwiak wrote:
>> Hi,
>>
>> I have an ath10k_pci device that I'm trying to get hooked to the
>> Internet, but I'm having some strange issues. It is trying to load the
>> 2.1 firmware, but I don't think that is the proper firmware for the
>> interface to have; I think it ought to be loading the 3.0 module, but
>> am not quite sure on that either, or how I could go about injecting
>> that into the modprobe; I wasn't able to pinpoint the firmware blob
>> the ISO was using, so that wasn't much of a pointer in the right
>> direction either. I see that the 3.0 blob does exist in
>> /lib/firmware/ath10k/QCABLEFAGD/HW3.0, but there are many bin files,
>
> I have little to no idea about your actual case... But could it be that
> you have a recent linux-firmware package (which provides /lib/firmware/
> files) and not recent enough kernel? I think kernel is what decides
> which firmware file to load.
>



Re: [gentoo-user] Loading a Firmware Module By hand?

2017-12-17 Thread Andrey Utkin
On Sun, Dec 17, 2017 at 12:34:14AM -0500, Hunter Jozwiak wrote:
> Hi,
> 
> I have an ath10k_pci device that I'm trying to get hooked to the
> Internet, but I'm having some strange issues. It is trying to load the
> 2.1 firmware, but I don't think that is the proper firmware for the
> interface to have; I think it ought to be loading the 3.0 module, but
> am not quite sure on that either, or how I could go about injecting
> that into the modprobe; I wasn't able to pinpoint the firmware blob
> the ISO was using, so that wasn't much of a pointer in the right
> direction either. I see that the 3.0 blob does exist in
> /lib/firmware/ath10k/QCABLEFAGD/HW3.0, but there are many bin files,

I have little to no idea about your actual case... But could it be that
you have a recent linux-firmware package (which provides /lib/firmware/
files) and not recent enough kernel? I think kernel is what decides
which firmware file to load.


signature.asc
Description: Digital signature


Re: [gentoo-user] Loading a Firmware Module By hand?

2017-12-17 Thread Mick
On Sunday, 17 December 2017 05:34:14 GMT Hunter Jozwiak wrote:
> Hi,
> 
> I have an ath10k_pci device that I'm trying to get hooked to the
> Internet, but I'm having some strange issues. It is trying to load the
> 2.1 firmware, but I don't think that is the proper firmware for the
> interface to have; I think it ought to be loading the 3.0 module, but
> am not quite sure on that either, or how I could go about injecting
> that into the modprobe; 

Usually the kernel will probe the device and load the appropriate firmware the 
device needs.  The output of dmesg will show if loading the firmware was 
successful, or complain if different firmware was needed and not found in your 
"/lib/firmware/" or whatever you have set up in your kernel as the directory 
for firmware blobs.


> I wasn't able to pinpoint the firmware blob
> the ISO was using, so that wasn't much of a pointer in the right
> direction either. I see that the 3.0 blob does exist in
> /lib/firmware/ath10k/QCABLEFAGD/HW3.0, but there are many bin files,
> so choosing the right one is a bit tricky by the looks of things.
> Earlier today, I had read the Gentoo wiki on the topic, which
> suggested that I compile the blob into the kernel itself, but the link
> they gave only described the advantages and disadvantages of modular
> kernels and how to drop kmod if you're using a moduleless kernel. Does
> anybody have any insight on this matter?
> 
> Thanks,
> 
> Hunter

Have a look in:

# Generic Driver Options

and then:

CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE="Put your firmware files in here, space separated"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware/"

I don't have your NIC to know the specifics, but the above ought to work.
-- 
Regards,
Mick

signature.asc
Description: This is a digitally signed message part.