LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Kernel-Firmware (https://www.linuxquestions.org/questions/linux-general-1/kernel-firmware-924467/)

theKbStockpiler 01-18-2012 01:27 PM

Kernel-Firmware
 
I can't find enough about this subject so I will field a few questions that I think are important.

-Firmware is actually data on a chip so what does the term "firmware" have to do with anything except BIOS?

-If this "firmware" is proprietary Drivers in binary, how does this work? Are they executed by an Interpreter? Why are they not disassembled and custom written for Linux?

Wikipedia is down for the day in protest btw.

Thanks in advance!

camorri 01-18-2012 01:46 PM

Quote:

-Firmware is actually data on a chip so what does the term "firmware" have to do with anything except BIOS?
Not necessarily so. Firmware is a term referring to code that simulates hardware. That can be BIOS, or the code needed to run a wifi card. The code can be stored in a memory chip, or it can be loaded to a device when the device is initialized.

Quote:

If this "firmware" is proprietary Drivers in binary, how does this work?
Not sure what you are asking here. I would expect most firmware is executed by hardware.

Quote:

Why are they not disassembled and custom written for Linux?
There are laws against that approach. The legal approach is to create a work alike piece of code to do the same function.

theKbStockpiler 01-18-2012 02:37 PM

I'm completely lost on this one. Thanks for the Reply!
 
It sounds as if firmware is the same as an emulator then?


To be made more understandable,
Quote:

proprietary Drivers (STORED) in binary,
:scratch: As if they would be stored any other way; ignorant on my part.

onebuck 01-18-2012 05:27 PM

Member response
 
Hi,

Quote:

Originally Posted by theKbStockpiler (Post 4578094)
I can't find enough about this subject so I will field a few questions that I think are important.

-Firmware is actually data on a chip so what does the term "firmware" have to do with anything except BIOS?

-If this "firmware" is proprietary Drivers in binary, how does this work? Are they executed by an Interpreter? Why are they not disassembled and custom written for Linux?

Wikipedia is down for the day in protest btw.

Thanks in advance!

Quote:

excerpt from firmware; Definition: Firmware is software that is embedded in a piece of hardware. You can think of firmware simply as "software for hardware." Devices that you might think of as strictly hardware such as optical drives, a network card, a router, or a scanner all have software that is programmed into special memory contained in the hardware itself.
Manufacturers of CD and DVD drives often release regular firmware updates to keep their hardware compatible with new media. Network router manufacturers often release updates to firmware on their devices to improve performance or add additional features.
Visit your hardware manufacturer's support website for more information on firmware updates.

Please do not confuse firmware with driver(module). A driver is the interface between the hardware and kernel. In fact the driver(module) does interface with firmware on the hardware.
:hattip:

camorri 01-18-2012 06:33 PM

Quote:

It sounds as if firmware is the same as an emulator then?
No, firmware is written to preform a specific set of tasks, acting like hardware. The reason, it is much cheaper to produce when a lot of the 'hardware' is code.

Think of firmware in this way. Say you wanted to build a printer. You could get all the necessary hardware, ( transistors, hardware modules, wires; real hardware, and build the printer. You would have a bill for lots of items. You start building thousands of these printer. The cost of production will never go down, since its all hardware, you have to buy or make.

To lower the cost, you realize a lot of the internal parts can be replaced with a processor, and some memory; plus the code to preform the hardware replaced functions. This is referred to as fireware; or in the school I worked in; micro-code. Once the code is written, your cost to produce more is near zero for the code. The added advantage, you can modify the code to add features at a very low cost, and distribute it, at low cost. If the printer was all hardware, the printer would have to be returned, rebuilt, and sent back. Much higher cost, and probably not acceptable to your customer.

If you want to say firmware 'emulates' hardware, I would agree.

theKbStockpiler 01-21-2012 02:15 PM

Thanks for the Replies!
 
So if I have a P.I.C and use it's correct meaning Of Peripheral Interface Controller such as a modem, the code that the PIC executes is Firmware?
Quote:

This is referred to as fireware; or in the school I worked in; micro-code
This is a typo and should be
Quote:

This is referred to as firMware; or in the school I worked in; micro-code
,correct?


So one processor is running code that is separate from another processor and the primary processor is using data supplied by the secondary processor as in a PCI card or Modem? :hattip:


I think a comparison to Hardwired and Micro Code Processors would work here but I still don't see a One Hundred percent connection. Where does the kernel fit in?

camorri 01-21-2012 02:29 PM

Quote:

Where does the kernel fit in?
The kernel is software, it is the operating system. It is not supplied to operate just one specific piece of hardware, it operates as a system on all the hardware. It is not supplied by any specific hardware vender; unless you are Apple. Their kernel, OSX, runs on their hardware.

Messy isn't it.

theKbStockpiler 01-21-2012 02:48 PM

I apologise for being too vague.
 
Could you please explain what specifically "Kernel-Firmware" is?

camorri 01-21-2012 03:19 PM

Quote:

Could you please explain what specifically "Kernel-Firmware" is?
Drivers are know as Kernel Loadable Modules, or KLM's for short. Drivers is a windoze term.

KLM's can be loaded with a modprobe command; or you can recompile a kernel, and build the KLM in the kernel.

If a particular hardware device needs firmware to work, and you build the kernel with the module in the kernel, then you have to load the firmware in the kernel. This is what they are calling kernel firmware.

You can read more about it here -->http://en.wikipedia.org/wiki/Linux_k...s_and_firmware

onebuck 01-21-2012 03:30 PM

Member response
 
Hi,

PIC-microcontroller may shed a little light towards understanding;
Quote:

PIC is a family of Harvard architecture microcontrollers made by Microchip Technology, derived from the PIC1650[1][2] originally developed by General Instrument's Microelectronics Division. The name PIC initially referred to "Peripheral Interface Controller".[3][4]
PICs are popular with both industrial developers and hobbyists alike due to their low cost, wide availability, large user base, extensive collection of application notes, availability of low cost or free development tools, and serial programming (and re-programming with flash memory) capability.
Microchip announced on September 2011 the shipment of its ten billionth PIC processor.[5]
Be sure to read the rest of the wiki. :)

Loadable Kernel module & firmware;
Quote:

Loadable kernel modules and firmware

It is debated whether loadable kernel modules (LKMs) should be considered derivative works under copyright law, and thereby fall under the terms of the GPL. Torvalds has stated his belief that LKMs using only a limited, "public" subset of the kernel interfaces can sometimes be non-derived works, thus allowing some binary-only drivers and other LKMs that are not licensed under the GPL. Not all Linux contributors agree with this interpretation, however, and even Torvalds agrees that many LKMs are clearly derived works, and indeed he writes that "kernel modules ARE derivative 'by default'".[24] On the other hand Torvalds has also said that "one gray area in particular is something like a driver that was originally written for another operating system (i.e. clearly not a derived work of Linux in origin). [...] THAT is a gray area, and _that_ is the area where I personally believe that some modules may be considered to not be derived works simply because they weren't designed for Linux and don't depend on any special Linux behaviour."[25] Proprietary graphics drivers, in particular, are heavily discussed. Ultimately, it is likely that such questions can only be resolved by a court.


One point of licensing controversy is Linux's use of firmware "binary blobs" to support some hardware devices. These files are under a variety of licenses, many of them restrictive and their exact underlying source code is usually unknown. Richard Stallman claims that these blobs make Linux partially non-free software, and that distributing Linux may even be violating the GPL (which requires "complete corresponding source code" to be available).[5] In response, the FSFLA started a project, Linux-libre, to create a completely free kernel without proprietary objects, which is used by some completely free distributions, such as those endorsed by the Free Software Foundation.[26][27] On December 15, 2010 the Debian Project announced that the next Debian stable version would come with a kernel "stripped of all non-free firmware bits".[28]
HTH!

theKbStockpiler 01-29-2012 02:54 AM

I found these links that might help others at some point.
 
http://wiki.debian.org/Firmware

And http://raphaelhertzog.com/2011/03/14...h-the-problem/


http://searchcio-midmarket.techtarge...ition/firmware


http://www.addictivetips.com/mobile/...lashing-guide/


Based on what I knew before hand, Firmware is Mirco Code. And in the sense of Kernel-Firmware ,the Firmware is loaded when the Driver is Initialized every time and not just burned to a ROM chip once. This can be done because software is loading the Firmware-Microcode and not a separate hardward device type flasher.

This thead has evolved to the next question as to ,If you are writing a Driver Why is this Driver NOT able to use the Original Microcode? How has this peripheral device changed?

Thanks again to all that have Posted on this thread!:hattip


All times are GMT -5. The time now is 04:00 PM.