Abuse filter log

From Gentoo Wiki
Abuse Filter navigation (Home | Recent filter changes | Examine past edits | Abuse log)
Jump to:navigation Jump to:search
Details for log entry 4,950

03:49, 14 December 2024: Douglarek (talk | contribs) triggered filter 30, performing the action "edit" on User:Douglarek/Streamlining linux-firmware. Actions taken: Disallow; Filter description: Disable writing internal wiki links as external besides required links. If absolutely necessary, use wiki.g.o as a workaround. (examine)

Changes made in edit

 +
{{Note|This article assumes you are using modular firmware loading rather than built-in firmware when configuring your kernel.}}
  
 +
Optimizing {{Package|sys-kernel/linux-firmware}} is much simpler than customizing the kernel while providing significant benefits. If firmware is not built into the kernel (due to licensing issues), the linux-firmware package must be installed alongside the Linux kernel for system operation. However, this package contains all proprietary firmware binaries<ref>[https://wiki.gentoo.org/wiki/User:Douglarek/linux-firmware-20241110],https://wiki.gentoo.org/wiki/User:Douglarek/linux-firmware-20241110</ref> currently available for Linux, reaching a size of 1.2GB, while a typical desktop system only requires 3-5 files from this collection. Let's explore how to optimize it.
 +
 +
== Identifying Currently Loaded Firmware ==
 +
 +
{{Note|The firmware loading information output is a Gentoo-specific patch feature that requires enabling <code>_GENTOO_PRINT_FIRMWARE_INFO{{=}}y</code> in the kernel configuration. This feature is not available in vanilla-kernels. If you need to optimize firmware, a common approach is to boot with gentoo-kernel-bin first to collect the dmesg information.}}
 +
 +
{{RootCmd|collapse-output=false|dmesg {{!}} grep -i 'Loading firmware'|output=<pre>
 +
[    4.763489] Loading firmware: regulatory.db
 +
[    4.764642] Loading firmware: regulatory.db.p7s
 +
[    4.909102] Loading firmware: iwlwifi-9260-th-b0-jf-b0-46.ucode
 +
[    4.920791] Loading firmware: iwl-debug-yoyo.bin
 +
[    4.979257] Loading firmware: nvidia/565.57.01/gsp_tu10x.bin
 +
[    5.045129] Loading firmware: intel/ibt-18-16-1.sfi
 +
[    6.577898] Loading firmware: rtl_nic/rtl8168h-2.fw
 +
</pre>
 +
}}
 +
The output shows all firmware loaded during system boot. Not all of these firmware files are included in the linux-firmware package. In this example, only {{c|iwlwifi-9260-th-b0-jf-b0-46.ucode}}, {{c|intel/ibt-18-16-1.sfi}}, and {{c|rtl_nic/rtl8168h-2.fw}} are part of the package.
 +
 +
{{Tip|
 +
How to determine which firmware files are included in linux-firmware? Even without enabling the <code>savedconfig</code> USE flag for linux-firmware, the package installation creates a list of all firmware names in a file like {{Path|/etc/portage/savedconfig/sys-kernel/linux-firmware-20241110}}. We can compare our loaded firmware against this list.
 +
}}
 +
 +
== Customizing the Configuration ==
 +
 +
{{RootCmd|mkdir -p /etc/portage/savedconfig/sys-kernel # Optional if directory exists}}
 +
{{RootCmd|rm -f /etc/portage/savedconfig/sys-kernel/linux-firmware* # Optional if fresh install, may need to remove old configs}}
 +
{{RootCmd|dmesg {{!}} grep -i 'loading firmware' {{!}} sed 's/.*firmware: //' {{!}} while read fw; do
 +
    grep -q "^$fw\$" /etc/portage/savedconfig/sys-kernel/linux-firmware-20241110 && echo "$fw"
 +
done > /etc/portage/savedconfig/sys-kernel/linux-firmware}}
 +
{{RootCmd|mkdir -p /etc/portage/package.use/}}
 +
{{RootCmd|echo 'sys-kernel/linux-firmware savedconfig' > /etc/portage/package.use/linux-firmware}}
 +
 +
Replace {{Path|/etc/portage/savedconfig/sys-kernel/linux-firmware-20241110}} with your corresponding version.
 +
 +
== Building Custom linux-firmware ==
 +
 +
{{RootCmd|emerge -av sys-kernel/linux-firmware}}
 +
{{RootCmd|etc-update # -3}}
 +
 +
== Before and After Comparison ==
 +
 +
Build time:
 +
 +
<pre>
 +
Before: 2024-11-13T10:12:44 >>> sys-kernel/linux-firmware-20241110: 1 minute, 55 seconds
 +
After:  2024-11-19T15:53:06 >>> sys-kernel/linux-firmware-20241110: 31 seconds
 +
</pre>
 +
 +
Installation size:
 +
 +
<pre>
 +
Before: sys-kernel/linux-firmware: 4251 files, 380 non-files, 1.2G
 +
After:  sys-kernel/linux-firmware: 9 files, 19 non-files, 2.1M
 +
</pre>
 +
 +
== Troubleshooting ==
 +
 +
=== System won't boot after misconfiguration ===
 +
 +
This can occur and typically results in entering root emergency mode. Enter the root password, then remove {{Path|/etc/portage/savedconfig/sys-kernel/linux-firmware*}} and re-emerge linux-firmware to restore functionality.
 +
 +
 +
== See also ==
 +
 +
{{See also |Linux_firmware}}

Action parameters

VariableValue
Edit count of the user (user_editcount)
77
Name of the user account (user_name)
'Douglarek'
Age of the user account (user_age)
4310548
Page ID (page_id)
0
Page namespace (page_namespace)
2
Page title (without namespace) (page_title)
'Douglarek/Streamlining linux-firmware'
Full page title (page_prefixedtitle)
'User:Douglarek/Streamlining linux-firmware'
Action (action)
'edit'
Edit summary/reason (summary)
'Streamlining_linux-firmware init version'
Old content model (old_content_model)
''
New content model (new_content_model)
'wikitext'
Old page wikitext, before the edit (old_wikitext)
''
New page wikitext, after the edit (new_wikitext)
'{{Note|This article assumes you are using modular firmware loading rather than built-in firmware when configuring your kernel.}} Optimizing {{Package|sys-kernel/linux-firmware}} is much simpler than customizing the kernel while providing significant benefits. If firmware is not built into the kernel (due to licensing issues), the linux-firmware package must be installed alongside the Linux kernel for system operation. However, this package contains all proprietary firmware binaries<ref>[https://wiki.gentoo.org/wiki/User:Douglarek/linux-firmware-20241110],https://wiki.gentoo.org/wiki/User:Douglarek/linux-firmware-20241110</ref> currently available for Linux, reaching a size of 1.2GB, while a typical desktop system only requires 3-5 files from this collection. Let's explore how to optimize it. == Identifying Currently Loaded Firmware == {{Note|The firmware loading information output is a Gentoo-specific patch feature that requires enabling <code>_GENTOO_PRINT_FIRMWARE_INFO{{=}}y</code> in the kernel configuration. This feature is not available in vanilla-kernels. If you need to optimize firmware, a common approach is to boot with gentoo-kernel-bin first to collect the dmesg information.}} {{RootCmd|collapse-output=false|dmesg {{!}} grep -i 'Loading firmware'|output=<pre> [ 4.763489] Loading firmware: regulatory.db [ 4.764642] Loading firmware: regulatory.db.p7s [ 4.909102] Loading firmware: iwlwifi-9260-th-b0-jf-b0-46.ucode [ 4.920791] Loading firmware: iwl-debug-yoyo.bin [ 4.979257] Loading firmware: nvidia/565.57.01/gsp_tu10x.bin [ 5.045129] Loading firmware: intel/ibt-18-16-1.sfi [ 6.577898] Loading firmware: rtl_nic/rtl8168h-2.fw </pre> }} The output shows all firmware loaded during system boot. Not all of these firmware files are included in the linux-firmware package. In this example, only {{c|iwlwifi-9260-th-b0-jf-b0-46.ucode}}, {{c|intel/ibt-18-16-1.sfi}}, and {{c|rtl_nic/rtl8168h-2.fw}} are part of the package. {{Tip| How to determine which firmware files are included in linux-firmware? Even without enabling the <code>savedconfig</code> USE flag for linux-firmware, the package installation creates a list of all firmware names in a file like {{Path|/etc/portage/savedconfig/sys-kernel/linux-firmware-20241110}}. We can compare our loaded firmware against this list. }} == Customizing the Configuration == {{RootCmd|mkdir -p /etc/portage/savedconfig/sys-kernel # Optional if directory exists}} {{RootCmd|rm -f /etc/portage/savedconfig/sys-kernel/linux-firmware* # Optional if fresh install, may need to remove old configs}} {{RootCmd|dmesg {{!}} grep -i 'loading firmware' {{!}} sed 's/.*firmware: //' {{!}} while read fw; do grep -q "^$fw\$" /etc/portage/savedconfig/sys-kernel/linux-firmware-20241110 && echo "$fw" done > /etc/portage/savedconfig/sys-kernel/linux-firmware}} {{RootCmd|mkdir -p /etc/portage/package.use/}} {{RootCmd|echo 'sys-kernel/linux-firmware savedconfig' > /etc/portage/package.use/linux-firmware}} Replace {{Path|/etc/portage/savedconfig/sys-kernel/linux-firmware-20241110}} with your corresponding version. == Building Custom linux-firmware == {{RootCmd|emerge -av sys-kernel/linux-firmware}} {{RootCmd|etc-update # -3}} == Before and After Comparison == Build time: <pre> Before: 2024-11-13T10:12:44 >>> sys-kernel/linux-firmware-20241110: 1 minute, 55 seconds After: 2024-11-19T15:53:06 >>> sys-kernel/linux-firmware-20241110: 31 seconds </pre> Installation size: <pre> Before: sys-kernel/linux-firmware: 4251 files, 380 non-files, 1.2G After: sys-kernel/linux-firmware: 9 files, 19 non-files, 2.1M </pre> == Troubleshooting == === System won't boot after misconfiguration === This can occur and typically results in entering root emergency mode. Enter the root password, then remove {{Path|/etc/portage/savedconfig/sys-kernel/linux-firmware*}} and re-emerge linux-firmware to restore functionality. == See also == {{See also |Linux_firmware}}'
Unified diff of changes made by edit (edit_diff)
'@@ -1,0 +1,67 @@ +{{Note|This article assumes you are using modular firmware loading rather than built-in firmware when configuring your kernel.}} + +Optimizing {{Package|sys-kernel/linux-firmware}} is much simpler than customizing the kernel while providing significant benefits. If firmware is not built into the kernel (due to licensing issues), the linux-firmware package must be installed alongside the Linux kernel for system operation. However, this package contains all proprietary firmware binaries<ref>[https://wiki.gentoo.org/wiki/User:Douglarek/linux-firmware-20241110],https://wiki.gentoo.org/wiki/User:Douglarek/linux-firmware-20241110</ref> currently available for Linux, reaching a size of 1.2GB, while a typical desktop system only requires 3-5 files from this collection. Let's explore how to optimize it. + +== Identifying Currently Loaded Firmware == + +{{Note|The firmware loading information output is a Gentoo-specific patch feature that requires enabling <code>_GENTOO_PRINT_FIRMWARE_INFO{{=}}y</code> in the kernel configuration. This feature is not available in vanilla-kernels. If you need to optimize firmware, a common approach is to boot with gentoo-kernel-bin first to collect the dmesg information.}} + +{{RootCmd|collapse-output=false|dmesg {{!}} grep -i 'Loading firmware'|output=<pre> +[ 4.763489] Loading firmware: regulatory.db +[ 4.764642] Loading firmware: regulatory.db.p7s +[ 4.909102] Loading firmware: iwlwifi-9260-th-b0-jf-b0-46.ucode +[ 4.920791] Loading firmware: iwl-debug-yoyo.bin +[ 4.979257] Loading firmware: nvidia/565.57.01/gsp_tu10x.bin +[ 5.045129] Loading firmware: intel/ibt-18-16-1.sfi +[ 6.577898] Loading firmware: rtl_nic/rtl8168h-2.fw +</pre> +}} +The output shows all firmware loaded during system boot. Not all of these firmware files are included in the linux-firmware package. In this example, only {{c|iwlwifi-9260-th-b0-jf-b0-46.ucode}}, {{c|intel/ibt-18-16-1.sfi}}, and {{c|rtl_nic/rtl8168h-2.fw}} are part of the package. + +{{Tip| +How to determine which firmware files are included in linux-firmware? Even without enabling the <code>savedconfig</code> USE flag for linux-firmware, the package installation creates a list of all firmware names in a file like {{Path|/etc/portage/savedconfig/sys-kernel/linux-firmware-20241110}}. We can compare our loaded firmware against this list. +}} + +== Customizing the Configuration == + +{{RootCmd|mkdir -p /etc/portage/savedconfig/sys-kernel # Optional if directory exists}} +{{RootCmd|rm -f /etc/portage/savedconfig/sys-kernel/linux-firmware* # Optional if fresh install, may need to remove old configs}} +{{RootCmd|dmesg {{!}} grep -i 'loading firmware' {{!}} sed 's/.*firmware: //' {{!}} while read fw; do + grep -q "^$fw\$" /etc/portage/savedconfig/sys-kernel/linux-firmware-20241110 && echo "$fw" +done > /etc/portage/savedconfig/sys-kernel/linux-firmware}} +{{RootCmd|mkdir -p /etc/portage/package.use/}} +{{RootCmd|echo 'sys-kernel/linux-firmware savedconfig' > /etc/portage/package.use/linux-firmware}} + +Replace {{Path|/etc/portage/savedconfig/sys-kernel/linux-firmware-20241110}} with your corresponding version. + +== Building Custom linux-firmware == + +{{RootCmd|emerge -av sys-kernel/linux-firmware}} +{{RootCmd|etc-update # -3}} + +== Before and After Comparison == + +Build time: + +<pre> +Before: 2024-11-13T10:12:44 >>> sys-kernel/linux-firmware-20241110: 1 minute, 55 seconds +After: 2024-11-19T15:53:06 >>> sys-kernel/linux-firmware-20241110: 31 seconds +</pre> + +Installation size: + +<pre> +Before: sys-kernel/linux-firmware: 4251 files, 380 non-files, 1.2G +After: sys-kernel/linux-firmware: 9 files, 19 non-files, 2.1M +</pre> + +== Troubleshooting == + +=== System won't boot after misconfiguration === + +This can occur and typically results in entering root emergency mode. Enter the root password, then remove {{Path|/etc/portage/savedconfig/sys-kernel/linux-firmware*}} and re-emerge linux-firmware to restore functionality. + + +== See also == + +{{See also |Linux_firmware}} '
Old page size (old_size)
0
Lines added in edit (added_lines)
[ 0 => '{{Note|This article assumes you are using modular firmware loading rather than built-in firmware when configuring your kernel.}}', 1 => '', 2 => 'Optimizing {{Package|sys-kernel/linux-firmware}} is much simpler than customizing the kernel while providing significant benefits. If firmware is not built into the kernel (due to licensing issues), the linux-firmware package must be installed alongside the Linux kernel for system operation. However, this package contains all proprietary firmware binaries<ref>[https://wiki.gentoo.org/wiki/User:Douglarek/linux-firmware-20241110],https://wiki.gentoo.org/wiki/User:Douglarek/linux-firmware-20241110</ref> currently available for Linux, reaching a size of 1.2GB, while a typical desktop system only requires 3-5 files from this collection. Let's explore how to optimize it.', 3 => '', 4 => '== Identifying Currently Loaded Firmware ==', 5 => '', 6 => '{{Note|The firmware loading information output is a Gentoo-specific patch feature that requires enabling <code>_GENTOO_PRINT_FIRMWARE_INFO{{=}}y</code> in the kernel configuration. This feature is not available in vanilla-kernels. If you need to optimize firmware, a common approach is to boot with gentoo-kernel-bin first to collect the dmesg information.}}', 7 => '', 8 => '{{RootCmd|collapse-output=false|dmesg {{!}} grep -i 'Loading firmware'|output=<pre>', 9 => '[ 4.763489] Loading firmware: regulatory.db', 10 => '[ 4.764642] Loading firmware: regulatory.db.p7s', 11 => '[ 4.909102] Loading firmware: iwlwifi-9260-th-b0-jf-b0-46.ucode', 12 => '[ 4.920791] Loading firmware: iwl-debug-yoyo.bin', 13 => '[ 4.979257] Loading firmware: nvidia/565.57.01/gsp_tu10x.bin', 14 => '[ 5.045129] Loading firmware: intel/ibt-18-16-1.sfi', 15 => '[ 6.577898] Loading firmware: rtl_nic/rtl8168h-2.fw', 16 => '</pre>', 17 => '}}', 18 => 'The output shows all firmware loaded during system boot. Not all of these firmware files are included in the linux-firmware package. In this example, only {{c|iwlwifi-9260-th-b0-jf-b0-46.ucode}}, {{c|intel/ibt-18-16-1.sfi}}, and {{c|rtl_nic/rtl8168h-2.fw}} are part of the package.', 19 => '', 20 => '{{Tip|', 21 => 'How to determine which firmware files are included in linux-firmware? Even without enabling the <code>savedconfig</code> USE flag for linux-firmware, the package installation creates a list of all firmware names in a file like {{Path|/etc/portage/savedconfig/sys-kernel/linux-firmware-20241110}}. We can compare our loaded firmware against this list.', 22 => '}}', 23 => '', 24 => '== Customizing the Configuration ==', 25 => '', 26 => '{{RootCmd|mkdir -p /etc/portage/savedconfig/sys-kernel # Optional if directory exists}}', 27 => '{{RootCmd|rm -f /etc/portage/savedconfig/sys-kernel/linux-firmware* # Optional if fresh install, may need to remove old configs}}', 28 => '{{RootCmd|dmesg {{!}} grep -i 'loading firmware' {{!}} sed 's/.*firmware: //' {{!}} while read fw; do', 29 => ' grep -q "^$fw\$" /etc/portage/savedconfig/sys-kernel/linux-firmware-20241110 && echo "$fw"', 30 => 'done > /etc/portage/savedconfig/sys-kernel/linux-firmware}}', 31 => '{{RootCmd|mkdir -p /etc/portage/package.use/}}', 32 => '{{RootCmd|echo 'sys-kernel/linux-firmware savedconfig' > /etc/portage/package.use/linux-firmware}}', 33 => '', 34 => 'Replace {{Path|/etc/portage/savedconfig/sys-kernel/linux-firmware-20241110}} with your corresponding version.', 35 => '', 36 => '== Building Custom linux-firmware ==', 37 => '', 38 => '{{RootCmd|emerge -av sys-kernel/linux-firmware}}', 39 => '{{RootCmd|etc-update # -3}}', 40 => '', 41 => '== Before and After Comparison ==', 42 => '', 43 => 'Build time:', 44 => '', 45 => '<pre>', 46 => 'Before: 2024-11-13T10:12:44 >>> sys-kernel/linux-firmware-20241110: 1 minute, 55 seconds', 47 => 'After: 2024-11-19T15:53:06 >>> sys-kernel/linux-firmware-20241110: 31 seconds', 48 => '</pre>', 49 => '', 50 => 'Installation size:', 51 => '', 52 => '<pre>', 53 => 'Before: sys-kernel/linux-firmware: 4251 files, 380 non-files, 1.2G', 54 => 'After: sys-kernel/linux-firmware: 9 files, 19 non-files, 2.1M', 55 => '</pre>', 56 => '', 57 => '== Troubleshooting ==', 58 => '', 59 => '=== System won't boot after misconfiguration ===', 60 => '', 61 => 'This can occur and typically results in entering root emergency mode. Enter the root password, then remove {{Path|/etc/portage/savedconfig/sys-kernel/linux-firmware*}} and re-emerge linux-firmware to restore functionality.', 62 => '', 63 => '', 64 => '== See also ==', 65 => '', 66 => '{{See also |Linux_firmware}}' ]
Lines removed in edit (removed_lines)
[]
New page text, stripped of any markup (new_text)
' NoteThis article assumes you are using modular firmware loading rather than built-in firmware when configuring your kernel. Optimizing sys-kernel/linux-firmware is much simpler than customizing the kernel while providing significant benefits. If firmware is not built into the kernel (due to licensing issues), the linux-firmware package must be installed alongside the Linux kernel for system operation. However, this package contains all proprietary firmware binaries&#91;1&#93; currently available for Linux, reaching a size of 1.2GB, while a typical desktop system only requires 3-5 files from this collection. Let's explore how to optimize it. Contents 1 Identifying Currently Loaded Firmware 2 Customizing the Configuration 3 Building Custom linux-firmware 4 Before and After Comparison 5 Troubleshooting 5.1 System won't boot after misconfiguration 6 See also Identifying Currently Loaded Firmware[edit] NoteThe firmware loading information output is a Gentoo-specific patch feature that requires enabling _GENTOO_PRINT_FIRMWARE_INFO=y in the kernel configuration. This feature is not available in vanilla-kernels. If you need to optimize firmware, a common approach is to boot with gentoo-kernel-bin first to collect the dmesg information. root #dmesg | grep -i 'Loading firmware'[ 4.763489] Loading firmware: regulatory.db [ 4.764642] Loading firmware: regulatory.db.p7s [ 4.909102] Loading firmware: iwlwifi-9260-th-b0-jf-b0-46.ucode [ 4.920791] Loading firmware: iwl-debug-yoyo.bin [ 4.979257] Loading firmware: nvidia/565.57.01/gsp_tu10x.bin [ 5.045129] Loading firmware: intel/ibt-18-16-1.sfi [ 6.577898] Loading firmware: rtl_nic/rtl8168h-2.fw The output shows all firmware loaded during system boot. Not all of these firmware files are included in the linux-firmware package. In this example, only iwlwifi-9260-th-b0-jf-b0-46.ucode, intel/ibt-18-16-1.sfi, and rtl_nic/rtl8168h-2.fw are part of the package. TipHow to determine which firmware files are included in linux-firmware? Even without enabling the savedconfig USE flag for linux-firmware, the package installation creates a list of all firmware names in a file like /etc/portage/savedconfig/sys-kernel/linux-firmware-20241110. We can compare our loaded firmware against this list. Customizing the Configuration[edit] root #mkdir -p /etc/portage/savedconfig/sys-kernel # Optional if directory exists root #rm -f /etc/portage/savedconfig/sys-kernel/linux-firmware* # Optional if fresh install, may need to remove old configs root #dmesg | grep -i 'loading firmware' | sed 's/.*firmware: //' | while read fw; do grep -q "^$fw\$" /etc/portage/savedconfig/sys-kernel/linux-firmware-20241110 &amp;&amp; echo "$fw" done &gt; /etc/portage/savedconfig/sys-kernel/linux-firmware root #mkdir -p /etc/portage/package.use/ root #echo 'sys-kernel/linux-firmware savedconfig' &gt; /etc/portage/package.use/linux-firmware Replace /etc/portage/savedconfig/sys-kernel/linux-firmware-20241110 with your corresponding version. Building Custom linux-firmware[edit] root #emerge -av sys-kernel/linux-firmware root #etc-update # -3 Before and After Comparison[edit] Build time: Before: 2024-11-13T10:12:44 &gt;&gt;&gt; sys-kernel/linux-firmware-20241110: 1 minute, 55 seconds After: 2024-11-19T15:53:06 &gt;&gt;&gt; sys-kernel/linux-firmware-20241110: 31 seconds Installation size: Before: sys-kernel/linux-firmware: 4251 files, 380 non-files, 1.2G After: sys-kernel/linux-firmware: 9 files, 19 non-files, 2.1M Troubleshooting[edit] System won't boot after misconfiguration[edit] This can occur and typically results in entering root emergency mode. Enter the root password, then remove /etc/portage/savedconfig/sys-kernel/linux-firmware* and re-emerge linux-firmware to restore functionality. See also[edit] 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. ↑ [1],https://wiki.gentoo.org/wiki/User:Douglarek/linux-firmware-20241110'
Parsed HTML source of the new revision (new_html)
'<div class="mw-parser-output"><div class="alert alert-info gw-box" style="padding-top: 8px; padding-bottom: 8px;"><strong><i class="fa fa-sticky-note-o fa-rotate-180"></i> Note</strong><br />This article assumes you are using modular firmware loading rather than built-in firmware when configuring your kernel.</div> <p>Optimizing <span style="white-space: nowrap;" class="plainlinks" title="External link to https&#58;//packages.gentoo.org for the sys-kernel/linux-firmware package."><a rel="nofollow" class="external text" href="https://packages.gentoo.org/packages/sys-kernel/linux-firmware"><span style="font-family: monospace; font-size: 95%; color: MidnightBlue;">sys-kernel/linux-firmware</span></a><span style="color: grey; margin-left: 0.1em; font-size: 70%;" class="fa fa-hdd-o fa-fw"></span></span> is much simpler than customizing the kernel while providing significant benefits. If firmware is not built into the kernel (due to licensing issues), the linux-firmware package must be installed alongside the Linux kernel for system operation. However, this package contains all proprietary firmware binaries<sup id="cite_ref-1" class="reference"><a href="#cite_note-1">&#91;1&#93;</a></sup> currently available for Linux, reaching a size of 1.2GB, while a typical desktop system only requires 3-5 files from this collection. Let's explore how to optimize it. </p> <div id="toc" class="toc" role="navigation" aria-labelledby="mw-toc-heading"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2 id="mw-toc-heading">Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div> <ul> <li class="toclevel-1 tocsection-1"><a href="#Identifying_Currently_Loaded_Firmware"><span class="tocnumber">1</span> <span class="toctext">Identifying Currently Loaded Firmware</span></a></li> <li class="toclevel-1 tocsection-2"><a href="#Customizing_the_Configuration"><span class="tocnumber">2</span> <span class="toctext">Customizing the Configuration</span></a></li> <li class="toclevel-1 tocsection-3"><a href="#Building_Custom_linux-firmware"><span class="tocnumber">3</span> <span class="toctext">Building Custom linux-firmware</span></a></li> <li class="toclevel-1 tocsection-4"><a href="#Before_and_After_Comparison"><span class="tocnumber">4</span> <span class="toctext">Before and After Comparison</span></a></li> <li class="toclevel-1 tocsection-5"><a href="#Troubleshooting"><span class="tocnumber">5</span> <span class="toctext">Troubleshooting</span></a> <ul> <li class="toclevel-2 tocsection-6"><a href="#System_won.27t_boot_after_misconfiguration"><span class="tocnumber">5.1</span> <span class="toctext">System won't boot after misconfiguration</span></a></li> </ul> </li> <li class="toclevel-1 tocsection-7"><a href="#See_also"><span class="tocnumber">6</span> <span class="toctext">See also</span></a></li> </ul> </div> <h2><span class="mw-headline" id="Identifying_Currently_Loaded_Firmware">Identifying Currently Loaded Firmware</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=User:Douglarek/Streamlining_linux-firmware&amp;action=edit&amp;section=1" title="Edit section: Identifying Currently Loaded Firmware">edit</a><span class="mw-editsection-bracket">]</span></span></h2> <div class="alert alert-info gw-box" style="padding-top: 8px; padding-bottom: 8px;"><strong><i class="fa fa-sticky-note-o fa-rotate-180"></i> Note</strong><br />The firmware loading information output is a Gentoo-specific patch feature that requires enabling <code>_GENTOO_PRINT_FIRMWARE_INFO=y</code> in the kernel configuration. This feature is not available in vanilla-kernels. If you need to optimize firmware, a common approach is to boot with gentoo-kernel-bin first to collect the dmesg information.</div> <div class="cmd-box"><div><code style="color: #ef2929; font-weight: bold;">root <span style="color:royalblue;">#</span></code><span class="tripleclick-separator"></span><code>dmesg | grep -i 'Loading firmware'</code></div><pre>[ 4.763489] Loading firmware: regulatory.db [ 4.764642] Loading firmware: regulatory.db.p7s [ 4.909102] Loading firmware: iwlwifi-9260-th-b0-jf-b0-46.ucode [ 4.920791] Loading firmware: iwl-debug-yoyo.bin [ 4.979257] Loading firmware: nvidia/565.57.01/gsp_tu10x.bin [ 5.045129] Loading firmware: intel/ibt-18-16-1.sfi [ 6.577898] Loading firmware: rtl_nic/rtl8168h-2.fw </pre></div> <p>The output shows all firmware loaded during system boot. Not all of these firmware files are included in the linux-firmware package. In this example, only <span style="font-family: monospace; font-size: 95%; font-weight: bold;" class="tripleclick-separator">iwlwifi-9260-th-b0-jf-b0-46.ucode</span>, <span style="font-family: monospace; font-size: 95%; font-weight: bold;" class="tripleclick-separator">intel/ibt-18-16-1.sfi</span>, and <span style="font-family: monospace; font-size: 95%; font-weight: bold;" class="tripleclick-separator">rtl_nic/rtl8168h-2.fw</span> are part of the package. </p> <div class="alert alert-success gw-box" style="padding-top: 8px; padding-bottom: 8px;"><strong><i class="fa fa-check-circle"></i> Tip</strong><br />How to determine which firmware files are included in linux-firmware? Even without enabling the <code>savedconfig</code> USE flag for linux-firmware, the package installation creates a list of all firmware names in a file like <span style="font-family: monospace; font-size: 95%; color: #3c763d; font-weight: 600;">/etc/portage/savedconfig/sys-kernel/linux-firmware-20241110</span>. We can compare our loaded firmware against this list.</div> <h2><span class="mw-headline" id="Customizing_the_Configuration">Customizing the Configuration</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=User:Douglarek/Streamlining_linux-firmware&amp;action=edit&amp;section=2" title="Edit section: Customizing the Configuration">edit</a><span class="mw-editsection-bracket">]</span></span></h2> <div class="cmd-box"><div><code style="color: #ef2929; font-weight: bold;">root <span style="color:royalblue;">#</span></code><span class="tripleclick-separator"></span><code>mkdir -p /etc/portage/savedconfig/sys-kernel # Optional if directory exists</code></div></div> <div class="cmd-box"><div><code style="color: #ef2929; font-weight: bold;">root <span style="color:royalblue;">#</span></code><span class="tripleclick-separator"></span><code>rm -f /etc/portage/savedconfig/sys-kernel/linux-firmware* # Optional if fresh install, may need to remove old configs</code></div></div> <div class="cmd-box"><div><code style="color: #ef2929; font-weight: bold;">root <span style="color:royalblue;">#</span></code><span class="tripleclick-separator"></span><code>dmesg | grep -i 'loading firmware' | sed 's/.*firmware: //' | while read fw; do <pre> grep -q "^$fw\$" /etc/portage/savedconfig/sys-kernel/linux-firmware-20241110 &amp;&amp; echo "$fw" </pre> done &gt; /etc/portage/savedconfig/sys-kernel/linux-firmware</code></div></div> <div class="cmd-box"><div><code style="color: #ef2929; font-weight: bold;">root <span style="color:royalblue;">#</span></code><span class="tripleclick-separator"></span><code>mkdir -p /etc/portage/package.use/</code></div></div> <div class="cmd-box"><div><code style="color: #ef2929; font-weight: bold;">root <span style="color:royalblue;">#</span></code><span class="tripleclick-separator"></span><code>echo 'sys-kernel/linux-firmware savedconfig' &gt; /etc/portage/package.use/linux-firmware</code></div></div> <p>Replace <span style="font-family: monospace; font-size: 95%; color: #3c763d; font-weight: 600;">/etc/portage/savedconfig/sys-kernel/linux-firmware-20241110</span> with your corresponding version. </p> <h2><span class="mw-headline" id="Building_Custom_linux-firmware">Building Custom linux-firmware</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=User:Douglarek/Streamlining_linux-firmware&amp;action=edit&amp;section=3" title="Edit section: Building Custom linux-firmware">edit</a><span class="mw-editsection-bracket">]</span></span></h2> <div class="cmd-box"><div><code style="color: #ef2929; font-weight: bold;">root <span style="color:royalblue;">#</span></code><span class="tripleclick-separator"></span><code>emerge -av sys-kernel/linux-firmware</code></div></div> <div class="cmd-box"><div><code style="color: #ef2929; font-weight: bold;">root <span style="color:royalblue;">#</span></code><span class="tripleclick-separator"></span><code>etc-update # -3</code></div></div> <h2><span class="mw-headline" id="Before_and_After_Comparison">Before and After Comparison</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=User:Douglarek/Streamlining_linux-firmware&amp;action=edit&amp;section=4" title="Edit section: Before and After Comparison">edit</a><span class="mw-editsection-bracket">]</span></span></h2> <p>Build time: </p> <pre>Before: 2024-11-13T10:12:44 &gt;&gt;&gt; sys-kernel/linux-firmware-20241110: 1 minute, 55 seconds After: 2024-11-19T15:53:06 &gt;&gt;&gt; sys-kernel/linux-firmware-20241110: 31 seconds </pre> <p>Installation size: </p> <pre>Before: sys-kernel/linux-firmware: 4251 files, 380 non-files, 1.2G After: sys-kernel/linux-firmware: 9 files, 19 non-files, 2.1M </pre> <h2><span class="mw-headline" id="Troubleshooting">Troubleshooting</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=User:Douglarek/Streamlining_linux-firmware&amp;action=edit&amp;section=5" title="Edit section: Troubleshooting">edit</a><span class="mw-editsection-bracket">]</span></span></h2> <h3><span id="System_won&#39;t_boot_after_misconfiguration"></span><span class="mw-headline" id="System_won.27t_boot_after_misconfiguration">System won't boot after misconfiguration</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=User:Douglarek/Streamlining_linux-firmware&amp;action=edit&amp;section=6" title="Edit section: System won&#039;t boot after misconfiguration">edit</a><span class="mw-editsection-bracket">]</span></span></h3> <p>This can occur and typically results in entering root emergency mode. Enter the root password, then remove <span style="font-family: monospace; font-size: 95%; color: #3c763d; font-weight: 600;">/etc/portage/savedconfig/sys-kernel/linux-firmware*</span> and re-emerge linux-firmware to restore functionality. </p><p><br /> </p> <h2><span class="mw-headline" id="See_also">See also</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=User:Douglarek/Streamlining_linux-firmware&amp;action=edit&amp;section=7" title="Edit section: See also">edit</a><span class="mw-editsection-bracket">]</span></span></h2> <p><a href="/wiki/Linux_firmware" title="Linux firmware">Linux_firmware</a> — is a package distributed alongside the Linux kernel that contains firmware <a href="https://en.wikipedia.org/wiki/binary_blob" class="extiw" title="wikipedia:binary blob">binary blobs</a> necessary for partial or full functionality of certain hardware devices. </p> <div class="mw-references-wrap"><ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink"><a href="#cite_ref-1">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external autonumber" href="https://wiki.gentoo.org/wiki/User:Douglarek/linux-firmware-20241110">[1]</a>,<a rel="nofollow" class="external free" href="https://wiki.gentoo.org/wiki/User:Douglarek/linux-firmware-20241110">https://wiki.gentoo.org/wiki/User:Douglarek/linux-firmware-20241110</a></span> </li> </ol></div> '
Unix timestamp of change (timestamp)
1734148183