Firmware: Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
m (some edits)
(adjust url of get_dvb_firmware)
 
(15 intermediate revisions by 5 users not shown)
Line 1: Line 1:
'''Firmware''' is specialised software that is both specific to some hardware and also integral for its proper functioning.
Modern chipsets move more and more functionality from fixed-function implementations in silicon to firmware or software. The chip becomes a more generic microcontroller or [[DSP]] that executes the Firmware and does the same jobs.


Modern chipsets have seen more and more functionality moved from fixed-function implementations in silicon to firmware or software. Consequently, in some respects, these chips behave more like a generic microcontroller or [[DSP]] that executes the firmware and then performs the tasks according to the firmware's programming.
Drawbacks are that this solution may consume more power than an optimized fixed-function design and that different firmware revisions can cause completely different behaviour of the chips.


The fact that the firmware can 'fix' bugs later has, in the case of some vendors, the effect that early firmware revisions are rarely usable. In contrast, fixed-function hardware is usually more carefully designed.
One of the major advantages held by chipset implementations that employ the use of a firmware is that 'bugs' can be corrected later on upon discovery; which, in the case of fixed-function silicon, is something that is impossible to do without a design & fabrication revision.

Some drawbacks of the firmware approach for a chipset are:
* such solutions may consume more power than what an optimized fixed-function chip design would
* different firmware revisions can cause completely different behaviour of the chips
* the fact that the use of firmware lends itself towards permitting future 'bug fixes' has, in the case of some vendors, the negative consequence/effect that early firmware revisions are rarely usable. In contrast, fixed-function hardware is usually more carefully designed.

If you are a vendor or chipset manufacturer and are interested on having your firmware distributed with Linux, you should know [[Development:_How_to_submit_patches#Firmware_submission|how to submit a firmware]].


==Firmware Auto-loading==
==Firmware Auto-loading==
Most people would like their system to load their DVB firmware at boot time/when the module is loaded. This can be done easily using [http://linux-hotplug.sourceforge.net hotplug].
For those devices that do require a firmware, most people would like their system to load it at boot time or when the applicable driver module is loaded. This can be done easily using [http://linux-hotplug.sourceforge.net hotplug]. By placing a copy of the firmware file in <code>/lib/firmware</code> (location where unchanged udev will look) or <code>/usr/lib/hotplug/firmware/</code> (the location will depend of your distro / hotplug version), when the appropriate driver module is loaded, the firmware file should be automatically loaded as well.


''' ''it would be nice to have some words explaining the linux firmware loader stuff. contributors?'' '''
First, do the following, where xxxxx is one of sp8870/sp887x/tda10045/tda10046/av7110/dec2000t/dec2540t/dec3000s/vp7041/dibusb etc etc supported by the get_dvb_firmware script (which is distributed along with kernel source):


{{Note|Although Sourceforge seems to indicate (on causual observation) that hotplug was last updated as recently as Oct/08, it is to the best of this authour's understanding that hotplug and devfs have been superceeded by [[wikipedia:udev|udev]].}}
:<code>perl /usr/src/linux/Documentation/dvb/get_dvb_firmware xxxxx</code>


==Acquiring the Firmware==
That will download to current directory a file and then extract the desired firmware. Copy the generated firmware file to <code>/lib/firmware</code> or <code>/usr/lib/hotplug/firmware/</code> (the location will depend of your distro / hotplug version).
In order for the automagic firmware loading, described in the above section, to occur, it should be obvious that one first needs to be in possession of the desired firmware.


'''1.''' The [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/scripts/get_dvb_firmware get_dvb_firmware] perl script (which is distributed along with kernel source) supports the downloading and extraction of several popular firmware. One need just run:
Now, when the appropriate driver module is loaded, the firmware file should be automatically loaded as well.
:<code># perl /usr/src/linux/scripts/get_dvb_firmware xxxxx</code>
where xxxxx is one of script supported ICs such as sp8870/sp887x/tda10045/tda10046/av7110/dec2000t/dec2540t/dec3000s/vp7041/dibusb etc etc. Note that above command will place the downloaded file and extracted firmware in the current directory. Copy the firmware (as describe in the section above) to the correct location expected by your disto's hotplug system.


'''2.''' Some distributions like Ubuntu have packaged some of these firmwares into a package like "linux-firmware-nonfree". Try
''Gentoo users'': A fresh minimal install of Gentoo installs the <code>sys-apps/hotplug-base</code> package. However to actually get the firmware loading, you will need to install <code>sys-apps/hotplug</code>, as well.
sudo apt-get install linux-firmware-nonfree


''' ''it would be nice to have some words explaining the linux firmware loader stuff. contributors?'' '''
'''3.''' Similarly, there are perl scripts for extracting the firmware necessary for recent Xceive tuners:
* for XC3028/XC2028 based devices, see [[Xceive_XC3028/XC2028|here]].
* for XC5000 based devices, see [http://www.steventoth.net/linux/xc5000/ here]


'''4.''' In addition to the above, the following sites host various device firmware files:
==Some Firmware Repositories==
The following sites host various device firmware files:
* http://linuxtv.org/downloads/firmware/
* http://linuxtv.org/downloads/firmware/
* http://thadathil.net:8000/dvb/fw/ ... link is likely dead; see next link instead
* http://thadathil.net:8000/dvb/fw/ ... link is likely dead; see next link instead
Line 27: Line 39:
* http://www.chandlerfamily.org.uk/files/firmware/
* http://www.chandlerfamily.org.uk/files/firmware/


'''5.''' In other cases, where you can't find a raw firmware file for your device, you may have to resort to manual extraction from a Windows driver file; see "[[Development: How to extract a firmware|How to extract a firmware]]". Once you successfully managed to extract a working file, you obviously ought to best ensure having this support submitted to the get_dvb_firmware script, too.
==Also See==

* [[Development: How to extract a firmware|How to extract a firmware]]

{{Note|Every so often someone will ask as to why LinuxTV doesn't just host all the firmware ([http://www.linuxtv.org/pipermail/linux-dvb/2008-January/022827.html e.g.]). The answer to such inquiries boils down to being simply a matter of distribution rights; specifically, our lack thereof.}}

There's a list of the [[firmwares_on_kernel_drivers | firmwares used]] on the kernel drivers, and where they are available.

==External Links==
* [[Wikipedia:Firmware|Wikipedia's article on firmware]]


[[Category:Technology]]
[[Category:Technology]]
[[Category:Software]]

Latest revision as of 08:33, 28 January 2017

Firmware is specialised software that is both specific to some hardware and also integral for its proper functioning.

Modern chipsets have seen more and more functionality moved from fixed-function implementations in silicon to firmware or software. Consequently, in some respects, these chips behave more like a generic microcontroller or DSP that executes the firmware and then performs the tasks according to the firmware's programming.

One of the major advantages held by chipset implementations that employ the use of a firmware is that 'bugs' can be corrected later on upon discovery; which, in the case of fixed-function silicon, is something that is impossible to do without a design & fabrication revision.

Some drawbacks of the firmware approach for a chipset are:

  • such solutions may consume more power than what an optimized fixed-function chip design would
  • different firmware revisions can cause completely different behaviour of the chips
  • the fact that the use of firmware lends itself towards permitting future 'bug fixes' has, in the case of some vendors, the negative consequence/effect that early firmware revisions are rarely usable. In contrast, fixed-function hardware is usually more carefully designed.

If you are a vendor or chipset manufacturer and are interested on having your firmware distributed with Linux, you should know how to submit a firmware.

Firmware Auto-loading

For those devices that do require a firmware, most people would like their system to load it at boot time or when the applicable driver module is loaded. This can be done easily using hotplug. By placing a copy of the firmware file in /lib/firmware (location where unchanged udev will look) or /usr/lib/hotplug/firmware/ (the location will depend of your distro / hotplug version), when the appropriate driver module is loaded, the firmware file should be automatically loaded as well.

it would be nice to have some words explaining the linux firmware loader stuff. contributors?

Note: Although Sourceforge seems to indicate (on causual observation) that hotplug was last updated as recently as Oct/08, it is to the best of this authour's understanding that hotplug and devfs have been superceeded by udev.

Acquiring the Firmware

In order for the automagic firmware loading, described in the above section, to occur, it should be obvious that one first needs to be in possession of the desired firmware.

1. The get_dvb_firmware perl script (which is distributed along with kernel source) supports the downloading and extraction of several popular firmware. One need just run:

# perl /usr/src/linux/scripts/get_dvb_firmware xxxxx

where xxxxx is one of script supported ICs such as sp8870/sp887x/tda10045/tda10046/av7110/dec2000t/dec2540t/dec3000s/vp7041/dibusb etc etc. Note that above command will place the downloaded file and extracted firmware in the current directory. Copy the firmware (as describe in the section above) to the correct location expected by your disto's hotplug system.

2. Some distributions like Ubuntu have packaged some of these firmwares into a package like "linux-firmware-nonfree". Try

sudo apt-get install linux-firmware-nonfree

3. Similarly, there are perl scripts for extracting the firmware necessary for recent Xceive tuners:

  • for XC3028/XC2028 based devices, see here.
  • for XC5000 based devices, see here

4. In addition to the above, the following sites host various device firmware files:

5. In other cases, where you can't find a raw firmware file for your device, you may have to resort to manual extraction from a Windows driver file; see "How to extract a firmware". Once you successfully managed to extract a working file, you obviously ought to best ensure having this support submitted to the get_dvb_firmware script, too.


Note: Every so often someone will ask as to why LinuxTV doesn't just host all the firmware (e.g.). The answer to such inquiries boils down to being simply a matter of distribution rights; specifically, our lack thereof.

There's a list of the firmwares used on the kernel drivers, and where they are available.

External Links