LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   curious about binary blobs (https://www.linuxquestions.org/questions/linux-software-2/curious-about-binary-blobs-4175639410/)

whjeon 09-29-2018 09:04 AM

curious about binary blobs
 
Dear Mentors.

While I'm studying Linux and CPU architectures, I already knew that there are lots of different cpu instructions between cpus.

Then how proprietary binary blobs (such as Nvidia Driver) install my cpu's instruction architecture?

I mean how do they exactly copy and install x86_64/i5-4690 instruction binary onto my pc?

Do they first detect my cpu? and have every different instruction's binaries on their DB?

hazel 09-29-2018 11:26 AM

If you look on the download page for the nvidia driver, you can see that there are general versions for 32-bit and 64-bit Intel and 32-bit arm. There are also some specific versions for particular distros and releases.

I assume these packages are built in the same way as the packages in any binary distribution. That is to say, they use only the general instruction set for that architecture and are not tuned to the precise foibles of particular processors.

zeebra 09-29-2018 06:03 PM

Damn, I was reading about this yesterday when I was dealing with a firmware issue. I apologise if I do not remember it correctly, but what I remember is that the software driver actually loads the firmware into the hardware space.

I am no expert, but the way I interpret this and simplify it to myself to try to understand it, is that this loading of the firmware into the hardware by the driver activates that hardware to work with the driver. To further simplify it in my head I liked to compare it to an encryption key facility, where the hardware only allows drivers signed with the particular key, and the loading of firmware into the hardware by the driver is that "handshake".

I could be grossly wrong. I was reading alot about firmware and Linux yesterday, but it went a bit over my head. So anyone feel free to correct my possibly idiotic and ridiculous interpretation of firmware.

hazel 09-30-2018 07:16 AM

I don't know about video cards but some wifi cards certainly work in that way. For example, if you have a broadcom card (as I once did), it needs certain code loaded into its own internal processor in order to work. The kernel's broadcom driver is instructed to perform this load and complains if it can't find the necessary file in /lib/firmware. But I don't know if it is an activation key or just a blob containing secret instructions that the manufacturer doesn't want to include in the kernel driver for reasons of commercial secrecy.

Habitual 09-30-2018 10:14 AM

When I was growing up on Computers, a blob was a "Binary Large OBject". Thanks Oracle.
IDK how they read every OS/arch/driver, I'm guessing there's some JavaScript involved. Lot of things exposed via the browser.
I supposed that would/could be an "open loop" or traversal into the system. [See graphic]
Check about:config (if such a feature exists on your chosen browser) and search for these items?

Found this (first)

Hope that helps.

ondoho 10-01-2018 01:25 AM

EVERY program is a binary blob (or at least a bob, refering to habitual's definition) once it is compiled.

but i guess you are refering to binary blobs as opposed to open source software?
in that case it just means "there's no source code available for this software. the manufacturers are keeping it secret". it does not mean that the program's functionality is fundamentally different.

zeebra 10-01-2018 06:53 AM

Quote:

Originally Posted by hazel (Post 5909402)
I don't know about video cards but some wifi cards certainly work in that way. For example, if you have a broadcom card (as I once did), it needs certain code loaded into its own internal processor in order to work. The kernel's broadcom driver is instructed to perform this load and complains if it can't find the necessary file in /lib/firmware. But I don't know if it is an activation key or just a blob containing secret instructions that the manufacturer doesn't want to include in the kernel driver for reasons of commercial secrecy.

In my particular case I was dealing with the iwlwifi. I downloaded the correct ucode from github. When looking at the file through github it kinda looks like a table of weird data. Have a look at some iwlwifi ucode files on github to see what I mean.

I personally have no clue what they actually do, but I think you are right in what you say. My problem was that my new custom kernel did not accept my old ucode file which was shipped with the distro and an older kernel. This ofcourse worked for that particular kernel, but the new kernel required a newer ucode file. This makes no sense, unless what you say is correct.

Anyways, I have not inspected alot of other firmware and I am by no means qualified to talk about firmware, but what I said is my impression and interpretation of it, and what you say fits with that too.

zeebra 10-01-2018 06:54 AM

Quote:

Originally Posted by ondoho (Post 5909635)
EVERY program is a binary blob (or at least a bob, refering to habitual's definition) once it is compiled.

but i guess you are refering to binary blobs as opposed to open source software?
in that case it just means "there's no source code available for this software. the manufacturers are keeping it secret". it does not mean that the program's functionality is fundamentally different.

ahh yah, this is ofcourse true too. but specifically about binary blobs related to the kernel, most people think of firmware, at least I did.


All times are GMT -5. The time now is 10:37 AM.