Differences between revisions 98 and 99
Revision 98 as of 2022-10-06 14:25:43
Size: 9388
Editor: ?pixelpapst
Comment: Add an admonition on top informing users about the upcoming fluid situation in testing
Revision 99 as of 2023-04-25 17:24:50
Size: 10873
Comment:
Deletions are marked like this. Additions are marked like this.
Line 11: Line 11:
The Debian project has [[https://lists.debian.org/debian-devel-announce/2022/10/msg00001.html|taken the decision]] in 2022-10 to create a new repository component `non-free-firmware`, and include its content on installation media for the upcoming Debian release ''bookworm'' to make things easier for our users.<<BR>>
The information below still applies to the `oldstable` and `stable` releases (a.k.a. ''buster'' and ''bullseye''), but might be outdated for ''weekly'' and ''nightly'' media of testing published in the coming weeks, with the situation changing rapidly while the decision is being implemented.
The Debian project [[https://lists.debian.org/debian-devel-announce/2022/10/msg00001.html|took the decision]] in October 2022
to create a new repository component `non-free-firmware`, and include its content on installation media for the upcoming Debian 12 release (''bookworm'') to make things easier for our users. This change was implemented in time for the '''alpha 2''' release of debian-installer in February 2023, and all d-i releases and daily and weekly images since then all include firmware.
Line 14: Line 14:
Please bear with us until the situation has settled and can be documented here. And if you want to help out this transition, feel free to follow the [[https://lists.debian.org/debian-devel/2022/10/msg00020.html|mailing list thread]].
}}}
For information for older releases, see [[#older_releease|"Older releases"]] further down this page.
}}}

<<TableOfContents(3)>>

= What is firmware? =
Line 18: Line 22:
Firmware refers to embedded software which controls electronic devices. Well-defined boundaries between firmware and software do not exist, as both terms cover some of the same code. Typically, the term firmware deals with low-level operations in a device, without which the device would be completely non-functional ~-(read more on [[WikiPedia:Firmware|Wikipedia]])-~.

<<TableOfContents(3)>>

== Devices/Drivers Firmware ==

Many devices require firmware to operate. Historically, firmware would be built into the device's ROM or Flash memory, but more and more often, a firmware image has to be loaded into the device RAM by a device driver during device initialisation.

[[#open|A few]] firmware images are Free Software and Open Source but almost all of them are [[https://www.debian.org/doc/debian-policy/ch-archive#s-non-free|non-free]], which means that you need to add the {{{non-free}}} and {{{contrib}}} components to your [[SourcesList|APT sources]].

Firmware refers to embedded software which controls electronic
devices. Well-defined boundaries between firmware and software do not
exist, as both terms cover some of the same code. Typically, the term
firmware deals with low-level operations in a device, without which
the device would be completely non-functional ~-(read more on
[[WikiPedia:Firmware|Wikipedia]])-~.

Many devices require firmware to operate. Historically, firmware would
be built into the device's ROM or Flash memory, but more and more
often, a firmware image has to be loaded into the device RAM by a
device driver during device initialisation.

[[#open|A few]] firmware images are Free Software and Open Source but
almost all of them are
[[https://www.debian.org/doc/debian-policy/ch-archive#s-non-free|non-free]],
which means that we cannot include them as normal in the Debian
archive under '''main''' or '''contrib'''.

= Using non-free firmware on a Debian system =

== Debian 12 (bookworm) and later ==

For Debian 12 onwards, all the packaged non-free firmware binaries
that Debian can distribute have been moved to a new component in the
Debian archive, called '''non-free-firmware'''. If you're upgrading
from an older release of Debian and you need these firmware binaries,
you should update the apt '''sources.list''' on your system to use
this new. If you only had the '''non-free''' component enabled on your
system to be able to install firmware, you can safely remove that now.

Debian's installation and live images now include all of those
firmware packages. The system should automatically detect, load and
install the firmware available for your devices, where possible. There
are a ''small'' number of cases where we can't do this, typically
because we are not allowed to distribute the needed firmware binaries.

If you are booting the Debian installer over the network, that will
'''not''' include all the firmware packages in the initramfs. This is
a deliberate choice due to the extra space needed for all the firmware
here. Many/most users will already need to modify the initramfs when
setting up netboot, so an extra step here is reasonable. Adding the
firmware blobs to your initramfs is easy: simply grab the appropriate
cpio archive for your target release from
[[https://cdimage.debian.org/cdimage/firmware/]] and append it
directly to the initramfs file.

<<Anchor(older_releases)>>

== Older releases ==

For '''Debian 11 (bullseye) and older''', we did not include firmware
on official installation and live images. The following sections
should help you if you need firmware there.
Line 30: Line 79:
In some cases the installer detects the need for non-free firmware and prompts the user to make the firmware available to the installer to complete the installation. This can happen, for example, with wireless network cards which often require non-free firmware to function (see [[ipw2200]] for an example). In some cases the installer detects the need for non-free firmware and
prompts the user to make the firmware available to the installer to
complete the installation. This can happen, for example, with wireless
network cards which often require non-free firmware to function (see
[[ipw2200]] for an example).
Line 34: Line 87:
An easy method is to use an '''installer image''' that includes all non-free firmware packages directly. See [[https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/]] An easy method is to use an '''installer image''' that includes all
non-free firmware packages directly. See
[[https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/]]
Line 38: Line 93:
You can also '''download the firmware archive''' for your platform and unpack it into a directory named `firmware` in the root of a removable storage device (USB/CD drive). You can find firmware downloads for your Debian version at [[https://cdimage.debian.org/cdimage/unofficial/non-free/firmware/]]. When the installer starts, it will automatically find the firmware files in the directory on the removable storage and, if needed, install the required firmware.

In some cases, firmware supplied on removable media may not be detected automatically (e.g. DebianBug:740503). In these situations, drop to the console (`Ctrl+alt+F2`) and manually [[DebianMan:8/mount|mount(8)]] your removable storage on a temporary directory (e.g. `/media`).
You can also '''download the firmware archive''' for your platform and
unpack it into a directory named `firmware` in the root of a removable
storage device (USB/CD drive). You can find firmware downloads for
your Debian version at
[[https://cdimage.debian.org/cdimage/firmware/]]. When the installer
starts, it will automatically find the firmware files in the directory
on the removable storage and, if needed, install the required
firmware.


In some cases, firmware supplied on removable media may not be
detected automatically (e.g. DebianBug:740503). In these situations,
drop to the console (`Ctrl+alt+F2`) and manually
[[DebianMan:8/mount|mount(8)]] your removable storage on a temporary
directory (e.g. `/media`).
Line 44: Line 110:
It is also possible to bypass the installer's searching and installation process by [[DebianInstaller/Preseed|preseeding]] and providing the firmware files directly to the kernel: It is also possible to bypass the installer's searching and
installation process by [[DebianInstaller/Preseed|preseeding]] and
providing the firmware files directly to the kernel:
Line 47: Line 115:
Line 63: Line 130:
The DebianPackage:isenkram and other tools can prompt to install the appropriate firmware and other hardware support packages when the hardware is plugged in. This mostly [[USB/GadgetSetup|relies]] on packages declaring via AppStream what hardware they support. This might not work for all firmware, so read on for another solution.

If you still see missing firmware console messages when the initramfs is updated (for example whenever a kernel update is applied):
The DebianPackage:isenkram and other tools can prompt to install the
appropriate firmware and other hardware support packages when the
hardware is plugged in. This mostly [[USB/GadgetSetup|relies]] on
packages declaring via AppStream what hardware they support. This
might not work for all firmware, so read on for another solution.

If you still see missing firmware console messages when the initramfs
is updated (for example whenever a kernel update is applied):
Line 80: Line 152:
=== Firmware missing from Debian ===

If you the missing firmware is not a
vailable in Debian or if you still see missing firmware console messages even when you have the right firmware-* package installed, you can download and install the firmware from the [[https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git|linux-firmware]] repository, for eg for i915 firmware:
= Firmware missing from Debian =

If you the missing firmware is not available in
Debian or if you still
see missing firmware console messages e
ven when you have the right
firmware-* package installed, you can download and install the
firmware from the
[[https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git|linux-firmware]]
repository, for eg for i915 firmware:

Translation(s): English - Español - Français - Italiano


The Debian project took the decision in October 2022 to create a new repository component non-free-firmware, and include its content on installation media for the upcoming Debian 12 release (bookworm) to make things easier for our users. This change was implemented in time for the alpha 2 release of debian-installer in February 2023, and all d-i releases and daily and weekly images since then all include firmware.
For information for older releases, see "Older releases" further down this page.

What is firmware?

Firmware refers to embedded software which controls electronic devices. Well-defined boundaries between firmware and software do not exist, as both terms cover some of the same code. Typically, the term firmware deals with low-level operations in a device, without which the device would be completely non-functional (read more on Wikipedia).

Many devices require firmware to operate. Historically, firmware would be built into the device's ROM or Flash memory, but more and more often, a firmware image has to be loaded into the device RAM by a device driver during device initialisation.

A few firmware images are Free Software and Open Source but almost all of them are non-free, which means that we cannot include them as normal in the Debian archive under main or contrib.

Using non-free firmware on a Debian system

Debian 12 (bookworm) and later

For Debian 12 onwards, all the packaged non-free firmware binaries that Debian can distribute have been moved to a new component in the Debian archive, called non-free-firmware. If you're upgrading from an older release of Debian and you need these firmware binaries, you should update the apt sources.list on your system to use this new. If you only had the non-free component enabled on your system to be able to install firmware, you can safely remove that now.

Debian's installation and live images now include all of those firmware packages. The system should automatically detect, load and install the firmware available for your devices, where possible. There are a small number of cases where we can't do this, typically because we are not allowed to distribute the needed firmware binaries.

If you are booting the Debian installer over the network, that will not include all the firmware packages in the initramfs. This is a deliberate choice due to the extra space needed for all the firmware here. Many/most users will already need to modify the initramfs when setting up netboot, so an extra step here is reasonable. Adding the firmware blobs to your initramfs is easy: simply grab the appropriate cpio archive for your target release from https://cdimage.debian.org/cdimage/firmware/ and append it directly to the initramfs file.

Older releases

For Debian 11 (bullseye) and older, we did not include firmware on official installation and live images. The following sections should help you if you need firmware there.

Firmware during the installation

In some cases the installer detects the need for non-free firmware and prompts the user to make the firmware available to the installer to complete the installation. This can happen, for example, with wireless network cards which often require non-free firmware to function (see ipw2200 for an example).

Installation images with firmware

An easy method is to use an installer image that includes all non-free firmware packages directly. See https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/

Firmware on removable media

You can also download the firmware archive for your platform and unpack it into a directory named firmware in the root of a removable storage device (USB/CD drive). You can find firmware downloads for your Debian version at https://cdimage.debian.org/cdimage/firmware/. When the installer starts, it will automatically find the firmware files in the directory on the removable storage and, if needed, install the required firmware.

In some cases, firmware supplied on removable media may not be detected automatically (e.g. 740503). In these situations, drop to the console (Ctrl+alt+F2) and manually mount(8) your removable storage on a temporary directory (e.g. /media).

Firmware on removable media and preseeding

It is also possible to bypass the installer's searching and installation process by preseeding and providing the firmware files directly to the kernel:

  • The needed firmware files are assumed to be in a directory named firmware on a FAT partition formatted with mkfs.vfat and labelled FIRMWARE.

  • The following addition is made to the installer's kernel command line. It is a single command but has been broken here for readability. Press TAB when the installation choice is highlighted to make the command line visible. A variation on this technique is presented elsewhere.

Installation+Archive+USBStick
preseed/early_command="modprobe vfat ; sleep 2 ;
mount /dev/disk/by-label/FIRMWARE /media ;
cp -a /media/firmware /lib"

Once the network is configured, Debian-Installer can fetch firmware from Debian repositories.

Firmware after installation

The isenkram and other tools can prompt to install the appropriate firmware and other hardware support packages when the hardware is plugged in. This mostly relies on packages declaring via AppStream what hardware they support. This might not work for all firmware, so read on for another solution.

If you still see missing firmware console messages when the initramfs is updated (for example whenever a kernel update is applied):

W: Possible missing firmware /lib/firmware/i915/skl_guc_62.0.0.bin for module i915

Then you can use apt-file or the Debian package contents search to look for the package that contains the firmware files, install it and then update the initramfs:

$ apt-file search skl_guc_62.0.0.bin
firmware-misc-nonfree: /lib/firmware/i915/skl_guc_62.0.0.bin
$ sudo apt install firmware-misc-nonfree
$ sudo update-initramfs -c -k all

Firmware missing from Debian

If you the missing firmware is not available in Debian or if you still see missing firmware console messages even when you have the right firmware-* package installed, you can download and install the firmware from the linux-firmware repository, for eg for i915 firmware:

mkdir firmware
cd firmware
wget -r -nd -e robots=no -A '*.bin' --accept-regex '/plain/' https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915/
sudo mv *.bin /lib/firmware/i915/
sudo update-initramfs -c -k all

Location of firmware files

Debian 8 "Jessie" and newer

udev used in Debian Jessie and later, only checks one directory for firmware files: /lib/firmware. See 729252 for details.

Debian 7 "Wheezy", Debian 6.0 "Squeeze"

Firmware is sourced from the following places (see udev's /lib/udev/hotplug.functions and /lib/udev/firmware.agent)

  1. /lib/firmware/$(uname -r) - Firmware provided by a package, specific for a kernel.

  2. /lib/firmware/ - Firmware provided by a package, valid for all kernels.

  3. /usr/local/lib/firmware - Location for manually installed firmware.

  4. /usr/lib/hotplug/firmware - Firmware provided by a package, valid for all kernels

List of firmware in Debian

To find which package provides a given firmware file, you can use this search page:
https://www.debian.org/distrib/packages#search_contents

Firmware/List lists firmware distributed by Debian.

Computer Firmware

EFI/UEFI

Found on most modern x86 PCs and servers, along with some ARM boards - (wikipedia)

BIOS

Found on older "IBM-PC" machines, generally most regular PCs and servers that were manufactured before 2011 - (wikipedia)

OpenFirmware

also known as OpenBoot, Found on Sun SPARC systems, IBM Power, PowerPC-based Apple Macintosh, IEEE 1275-1994... (wikipedia)

Coreboot (LinuxBIOS)

Can be used on some boards and tested under emulators - (wikipedia)

PMON2000

Found on the Lemote Yeeloong and embedded devices

Updating firmware

Firmware can be updated using various methods.

Open firmware

There are a number of projects creating various kinds of open firmware, including for booting, WiFi and audio.


CategoryPermalink | CategoryHardware | CategoryProprietarySoftware