- How to Update Firmware on Ubuntu and Other Linux Distributions
- Method 1: Updating firmware in Ubuntu and other Linux via Software Center
- Method 2: Updating firmware in Ubuntu via command line
- Step 1: Check if your system is supported by LVFS
- Step 2: Using fwupd for updating fimrware
- Linux firmware
- Contents
- Installation
- Kernel
- Ubuntu what is linux firmware
- Точные совпадения
- Пакет linux-firmware
- Другие совпадения
- Пакет linux-firmware-raspi2
- Пакет linux-firmware-snapdragon
- Пакет linux-firmware-xilinx-vcu
- Ubuntu Wiki
- Firmware
- What is Firmware?
- Where Do You Get Firmware?
- How is Firmware Used?
- Debugging Firmware Loading
- Initial Step
- Kernel Event Sent to Udev
- Udev Sends Firmware to Kernel
- Kernel Reads the Firmware
- Kernel Gives Firmware to Driver
How to Update Firmware on Ubuntu and Other Linux Distributions
Last updated July 23, 2021 By Abhishek Prakash 66 Comments
You know how to update your Ubuntu system for all the software. You might wonder about updating firmware in Ubuntu.
Like the software, Ubuntu also provides firmware updates for all the supported hardware through various channels. Some firmware updates come through the manufacturer like Intel while some come from the community. This is what I have seen with my Dell XPS laptops.
Usually, the default software center in Ubuntu and other Linux distributions handle the update of the firmware of your system. But if you encounter errors with it, you can use fwupd command line tool for updating the firmware of your system.
I’ll show both methods to you in this tutorial.
Method 1: Updating firmware in Ubuntu and other Linux via Software Center
If you are using a laptop, keep it on AC power otherwise some firmware updates will refuse to be installed.
Open the Software Center application on your distribution and go to the Updates tab. You might see both software and firmware updates listed here. The firmware updates are under the ‘Device Firmware‘ section.
You just have to click on the Update button in front of the available firmware updates.
It takes some time to install the firmware updates and you may see errors like ‘unable to update’ or ‘device cannot be used’ or something similar.
Unable to update “Thunderbolt NVM for Xps Notebook 9360”: could not detect device after update: timed out while waiting for device
Please do not panic just yet. I have noticed that despite the error message, the firmware is updated.
Now, the important thing to know is that the firmware updates are installed when you restart your Linux system. You’ll see messages about firmware updates on the power on screen. If there were more than one firmware update, they will be installed one by one.
firmware update in progress ubuntu
Once it completes, your system should turn off. You can turn it on again afterwards and enjoy your systems with the latest firmware.
Method 2: Updating firmware in Ubuntu via command line
The software center in Ubuntu is capable of updating the firmware. But in situations when it fails for some reasons, you can use the command line tool fwupd .
fwupd is an open source daemon that handles firmware upgrades in Linux based systems. It is created by GNOME developer Richard Hughes. Developers from Dell also contributed to the development of this open source tool.
Basically, it utilizes the LVFS, Linux Vendor Firmware Service. Hardware vendors upload redistributable firmware to the LVFS site and thanks to fwupd, you can upgrade those firmware from inside the operating system itself. fwupd is supported by major Linux distributions like Ubuntu and Fedora.
Step 1: Check if your system is supported by LVFS
Since LVFS depends upon hardware vendors, it’s a good idea to check if your system manufacturer supports this feature or not.
Find out your system model and then go to this web page and see if it’s listed:
Step 2: Using fwupd for updating fimrware
Normally, fwupd should already be installed on your Linux system. If not, install it using the package manager of your distribution.
Open a terminal and update your system first (commands applicable for Debian and Ubuntu-based distributions):
After that you can use the following commands one by one to start the daemon, refresh the list of available firmware updates and install the firmware updates.
Once the daemon is running, check if there are any firmware updates available.
The output should look like this:
Fetching metadata https://cdn.fwupd.org/downloads/firmware.xml.gz
Downloading… [****************************]
Fetching signature https://cdn.fwupd.org/downloads/firmware.xml.gz.asc
After this, run the firmware update:
The output of the firmware update could be similar to this:
No upgrades for XPS 13 9360 TPM 2.0, current is 1.3.1.0: 1.3.1.0=same
No upgrades for XPS 13 9360 System Firmware, current is 0.2.8.1: 0.2.8.1=same, 0.2.7.1=older, 0.2.6.2=older, 0.2.5.1=older, 0.2.4.2=older, 0.2.3.1=older, 0.2.2.1=older, 0.2.1.0=older, 0.1.3.7=older, 0.1.3.5=older, 0.1.3.2=older, 0.1.2.3=older
Downloading 21.00 for XPS13 9360 Thunderbolt Controller…
Updating 21.00 on XPS13 9360 Thunderbolt Controller…
Decompressing… [***********]
Authenticating… [***********]
Restarting device… [***********]
This should handle the firmware update in Ubuntu. I hope this quick tip helped you with firmware updates in Linux.
If you have questions or suggestions, please feel free to use the comment section below.
Like what you read? Please share it with others.
Источник
Linux firmware
Linux firmware is a package distributed alongside the Linux kernel that contains firmware binary blobs necessary for partial or full functionality of certain hardware devices. These binary blobs are usually proprietary because some hardware manufacturers do not release source code necessary to build the firmware itself.
Modern graphics cards from AMD and NVIDIA almost certainly require binary blobs to be loaded for the hardware to operate correctly.
Starting at Broxton (a Skylake-based micro-architecture) Intel CPUs require binary blobs for additional low-power idle states (DMC), graphics workload scheduling on the various graphics parallel engines (GuC), and offloading some media functions from the CPU to GPU (HuC). [1]
Additionally, modern Intel Wi-Fi chipsets almost always require blobs. [2]
Contents
Installation
For security reasons, hotloading firmware into a running kernel has been shunned upon. Modern init systems such as systemd have strongly discouraged loading firmware from userspace.
Kernel
A few kernel options are important to consider when building in firmware support for certain devices in the Linux kernel:
For kernels before 4.18:
CONFIG_FIRMWARE_IN_KERNEL (DEPRECATED) Note this option has been removed as of versions v4.16 and above. [3] Enabling this option was previously necessary to build each required firmware blob specified by EXTRA_FIRMWARE into the kernel directly, where the request_firmware() function will find them without having to make a call out to userspace. On older kernels, it is necessary to enable it.
For kernels beginning with 4.18:
Firmware loading facility ( CONFIG_FW_LOADER ) This option is provided for the case where none of the in-tree modules require userspace firmware loading support, but a module built out-of-tree does. Build named firmware blobs into the kernel binary ( CONFIG_EXTRA_FIRMWARE ) This option is a string and takes the (space-separated) names of firmware files to be built into the kernel. These files will then be accessible to the kernel at runtime.
Источник
Ubuntu what is linux firmware
Вы искали пакеты, в именах которых есть linux-firmware. Были просмотрены все комплекты, все секции и все архитектуры. Количество подходящих пакетов: 4.
Точные совпадения
Пакет linux-firmware
- bionic (18.04LTS) (misc): Firmware for Linux kernel drivers
1.173.18 [ security]: all - bionic-updates (misc): Firmware for Linux kernel drivers
1.173.20: all - focal (20.04LTS) (misc): Firmware for Linux kernel drivers
1.187: all - focal-updates (misc): Firmware for Linux kernel drivers
1.187.17: all - groovy (20.10) (misc): Firmware for Linux kernel drivers
1.190: all - groovy-updates (misc): Firmware for Linux kernel drivers
1.190.6: all - hirsute (21.04) (misc): Firmware for Linux kernel drivers
1.197: all - hirsute-updates (misc): Firmware for Linux kernel drivers
1.197.3: all - impish (misc): Firmware for Linux kernel drivers
1.201: all
Другие совпадения
Пакет linux-firmware-raspi2
- bionic (18.04LTS) (misc): RaspberryPi2 GPU firmware and bootloaders [ multiverse]
1.20161020-0ubuntu1 [ ports]: armhf - bionic-updates (misc): Raspberry Pi 2/3/4 GPU firmware and bootloaders [ multiverse]
4-0ubuntu0
18.04.1 [ ports]: arm64 armhf
1.20200212-0ubuntu1 [ ports]: arm64 armhf
4-0ubuntu0
20.04.1 [ ports]: arm64 armhf
2-0ubuntu2 [ ports]: arm64 armhf
4-0ubuntu0
20.10.1 [ ports]: arm64 armhf
4-0ubuntu3 [ ports]: arm64 armhf
4-0ubuntu3 [ ports]: arm64 armhf
Пакет linux-firmware-snapdragon
- bionic (18.04LTS) (misc): DragonBoard410c wifi firmware [ multiverse]
1.3-0ubuntu3 [ ports]: arm64 - focal (20.04LTS) (misc): DragonBoard410c wifi firmware [ multiverse]
1.3-0ubuntu3 [ ports]: arm64 - groovy (20.10) (misc): DragonBoard410c wifi firmware [ multiverse]
1.3-0ubuntu3 [ ports]: arm64 - hirsute (21.04) (misc): DragonBoard410c wifi firmware [ multiverse]
1.3-0ubuntu3 [ ports]: arm64 - impish (misc): DragonBoard410c wifi firmware [ multiverse]
1.3-0ubuntu3 [ ports]: arm64
Пакет linux-firmware-xilinx-vcu
- focal-updates (graphics): Xilinx VCU firmware files [ multiverse]
2020.2-0ubuntu1
20.04.1: all
2020.2-0ubuntu1: all
2020.2-0ubuntu1: all
This page is also available in the following languages:
Авторские права © 2021 Canonical Ltd.; См. условия лицензии. Ubuntu это торговый знак компании Canonical Ltd. Об этом сайте.
Источник
Ubuntu Wiki
Firmware
What is Firmware?
Many devices have two essential software pieces that make them function in your operating system. The first is a working driver, which is the software that lets your system talk to the hardware. The second is firmware, which is usually a small piece of code that is uploaded directly to the device for it to function correctly. You can think of the firmware as a way of programming the hardware inside the device. In fact, in almost all cases firmware is treated like hardware in that it’s a black box; there’s no accompanying source code that is freely distributed with it.
Where Do You Get Firmware?
The firmware is usually maintained by the company that develops the hardware device. In Windows land, firmware is usually a part of the driver you install. It’s often not seen by the user. In Linux, firmware may be distributed from a number of sources. Some firmware comes from the Linux kernel sources. Others that have redistribution licenses come from upstream. Some firmware unfortunately do not have licenses allowing free redistribution.
In Ubuntu, firmware comes from one of the following sources:
- The linux-image package (which contains the Linux kernel and licensed firmware)
- The linux-firmware package (which contains other licensed firmware)
- The linux-firmware-nonfree package in multiverse (which contains firmware that are missing redistribution licenses)
- A separate driver package
- Elsewhere (driver CD, email attachment, website)
Note that the linux-firmware-nonfree package is not installed by default.
The firmware files are placed into /lib/firmware. If you look inside there on your Ubuntu installation you will see hundreds of firmware files that have been installed by these packages.
How is Firmware Used?
Each driver for devices that require firmware have some special logic to retrieve firmware from files in /lib/firmware. The basic process is:
- Driver requests firmware file «ar9170.fw»
- The kernel sends an event to udev asking for the firmware
- The udev program runs a script that shoves the data in the firmware file into a special file created by the kernel
- The kernel reads the firmware data from the special file it created and hands the data to the driver
- The driver then does what it needs to do to load the firmware into the device
If everything goes well you should see something like the following in your /var/log/syslog:
If there’s an issue, you may see something like the following:
Debugging Firmware Loading
Luckily, the firmware loading process is not too difficult to watch in action. Using the following debugging steps we can pin point what step in the process is failing.
Initial Step
First, ensure that the firmware file is present. If you are missing the firmware file, try searching on the web for a copy of it. If you find it, consider filing a bug against linux-firmware if the firmware has a redistribution license or against linux-firmware-nonfree otherwise.
If the file is present, check that it’s not empty using ‘ls -l’:
The size of the file is the number listed after the user and group owners («root» and «root» in this case). It should be non-zero. At this point, you may want to search the web for an md5sum hash of the file and compare it to this file, but it’s not likely that the file is corrupted. If the firmware is corrupted, you will likely see an error message from the driver stating that the firmware was invalid or failed to upload anyways.
At this point we’ve verified that the firmware file exists, but wasn’t uploaded. We need to figure out which of steps 2-4 mentioned above are failing. Let’s start with step 2.
Kernel Event Sent to Udev
The second step involves the kernel sending an event to the udev subsystem. Luckily, there’s a handy tool we can use for monitoring these event messages: udevadm. Start with your driver unloaded. Then execute:
Now load your driver. Sometimes loading the driver alone will cause a firmware request. Other times, as with the e100 driver, you will need to do something to initiate a firmware request. In the case of the e100 driver, the firmware is requested after the user tries to bring up the ethernet interface by running ‘ip link set eth0 up’.
Once you have initiated a firmware request you should see a udev event that looks like the following:
There are three key pieces of information in this event:
- ACTION=add: This means the event is for the addition of the devices, as opposed to the removal of the device
- SUBSYSTEM=firmware: This means the event is a firmware request event
FIRMWARE= : This is the filename of the firmware requested by the driver.
If you do not see an event with these three items, then the kernel request is not being propagated to udev. You should file a bug at this point against the udev package. If you do see this event, continue to the next step.
Udev Sends Firmware to Kernel
Now that udev has seen the firmware request, it has to decide how to process it. There should be a «rules» file in /lib/udev/rules.d/50-firmware.rules with a single udev rule:
9.10 (Karmic Koala) and earlier:
10.04 (Lucid Lynx) and later:
This rule tells udev to run the firmware program, which may be found in /lib/udev/, whenever it sees an event with both ACTION=add and SUBSYSTEM=firmware. In 9.10 and earlier, the firmware program will be passed the rest of the udev event information as environment variables. In 10.04 and later, the firmware filename and device path will be passed as parameters.
We can watch udev process the event by turning on extra logging:
When you initiate a firmware request, udev will log what it does with the event to /var/log/syslog. For example, you should see something like:
If you do not see firmware.sh get run, then you likely have an issue with your udev rules. Check for any custome udev rules you have in /etc/udev/rules.d. Any files in this directory will override files with the same name under /lib/udev/rules.d. Rules in /etc/udev/rules.d may also prevent the firmware rule from executing properly. If you have any issues at this step you should seek help from the community. If you believe you have found an issue in udev, feel free to open a bug.
After you have debugged udev execution, you should return the logging output to the normal level:
Kernel Reads the Firmware
If the firmware.sh script has been executed by udev, any errors it encounters should show up in your /var/log/syslog file. If you see any errors here they may be caused by the firmware.sh script (which is part of udev), or by the kernel. If you see the following error:
you should open a kernel bug. If you see any other error, you should open a bug against udev.
Kernel Gives Firmware to Driver
If the firmware loading process properly runs firmware.sh without an error, but the driver complains about the firmware, one of two things may be wrong. First, the firmware file may be incorrect or corrupted. You can try to reinstall the firmware or get the firmware from another source. Second, there may be an issue with the driver itself. If you have tried all the firmware versions you could find, you should open a kernel bug.
Kernel/Firmware (последним исправлял пользователь khadgaray 2013-12-11 08:01:04)
Источник