compress firmware in /lib/firmware
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
firmware-sof (Ubuntu) | Status tracked in Mantic | |||||
Mantic |
Fix Released
|
Undecided
|
Unassigned | |||
initramfs-tools (Ubuntu) | Status tracked in Mantic | |||||
Mantic |
Fix Released
|
Undecided
|
Unassigned | |||
linux-firmware (Ubuntu) | Status tracked in Mantic | |||||
Mantic |
Fix Released
|
Undecided
|
Juerg Haefliger | |||
linux-firmware-raspi (Ubuntu) | Status tracked in Mantic | |||||
Mantic |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
-- initramfs-tools
[Impact]
* linux supports xz compressed linux-firmware which saves disk space. In focal, initramfs-tools only knows how to included uncompressed firmware files (even when kernel supports loading compressed ones). Newer releases of linux-firmware may use compressed firmware files only, in such cases it would be nice for focal's initramfs-tools to support compressed firmware files in case of partial or incomplete upgrades (i.e. linux-firmware force installed or upgraded, without newer initramfs-tools). The proposed changes to initramfs-tools are backwards and forwards compatible, they prefer to include uncompressed firmware files; and if missing, include compressed firmware files in their uncompressed form. Thus maintaining compatibility with any kernels, irrespective of compressed/
[Test Plan]
* Compress all files shipped by linux-firmware with xz
* Rebuild initrd
* Check that all the same firmware files are still included in the initramfs, in their uncompressed form as before
[Where problems could occur]
* This SRU is precautionary to prevent accidental installation of compressed linux-firmware from generating incorrect initramfs. It should be noted that whilst initramfs-tools would create a compatible initramfs with any kernels, pre-v5.3 kernels do not support xz compressed firmware files at runtime. Mixing this new initramfs with compressed firmwares and pre 5.3 kernels may lead to expectations of supporting compressed firmware files with them only working at initrd stage and not at runtime.
[Other Info]
Original bug report
Some facts:
- The linux kernel has supported loading xz compressed firmware since 5.3
- The size of /lib/firmware in impish is ~650Mb (and growing)
- The compressed size of firmware could be ~230Mb
It would be nice to install compressed firmware to save space.
Here are the plans from the Fedora project:
https:/
description: | updated |
tags: | added: bloat firmware |
tags: | added: patch |
Changed in linux-firmware (Ubuntu): | |
milestone: | none → ubuntu-23.10-beta |
Changed in linux-firmware-raspi2 (Ubuntu): | |
milestone: | none → ubuntu-23.10 |
Changed in linux-firmware (Ubuntu Mantic): | |
status: | Confirmed → In Progress |
assignee: | nobody → Juerg Haefliger (juergh) |
affects: | linux-firmware-raspi2 (Ubuntu Mantic) → linux-firmware-raspi (Ubuntu Mantic) |
Changed in linux-firmware-raspi (Ubuntu Mantic): | |
milestone: | ubuntu-23.10 → mantic-updates |
milestone: | mantic-updates → none |
This bug was fixed in the package initramfs-tools - 0.140ubuntu8
---------------
initramfs-tools (0.140ubuntu8) jammy; urgency=medium
* Cherry-pick merge request !26 to support xz compressed
firmware. Uncompressed firmware is preffered, with a fallback to use
compressed firmware files. LP: #1942260
* Cherry-pick merge request !51 to decompress compressed kernel modules
for boot speed performance. LP: #1932329
* Cherry-pick partially merge request !50 to fix ftbfs with new
shellcheck.
* Fix shellcheck issues in ubuntu patches.
-- Dimitri John Ledkov <email address hidden> Tue, 19 Oct 2021 11:49:38 +0100