source: postlfs/config/firmware.xml@ bd78d011

10.1 11.0 11.1 lazarus qt5new trunk upgradedb xry111/intltool xry111/test-20220226
Last change on this file since bd78d011 was bd78d011, checked in by Ken Moffat <ken@…>, 18 months ago

Firmware - update details for intel microcode-20201112.

git-svn-id: svn:// af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 29.0 KB
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
8<sect1 id="postlfs-firmware" xreflabel="About Firmware">
9 <?dbhtml filename="firmware.html"?>
11 <sect1info>
12 <othername>$LastChangedBy$</othername>
13 <date>$Date$</date>
14 </sect1info>
16 <title>About Firmware</title>
18 <indexterm zone="postlfs-firmware">
19 <primary sortas="e-lib-firmware">/lib/firmware</primary>
20 </indexterm>
22 <para>
23 On some recent PCs it can be necessary, or desirable, to load firmware
24 to make them work at their best. There is a directory, <filename
25 class="directory">/lib/firmware</filename>, where the kernel or kernel
26 drivers look for firmware images.
27 </para>
29 <para>
30 Currently, most firmware can be found at a <userinput>git</userinput>
31 repository: <ulink url=
32 ""/>.
33 For convenience, the LFS Project has created a mirror, updated daily, where
34 these firmware files can be accessed via <userinput>wget</userinput> or a
35 web browser at <ulink url="&sources-anduin-http;/linux-firmware/"/>.
36 </para>
38 <para>
39 To get the firmware, either point a browser to one of the above
40 repositories and then download the item(s) which you need, or install
41 <xref linkend="git"/> and clone that repository.
42 </para>
44 <para>
45 For some other firmware, particularly for Intel microcode and certain
46 wifi devices, the needed firmware is not available in the above repository.
47 Some of this will be addressed below, but a search of the Internet for
48 needed firmware is sometimes necessary.
49 </para>
51 <para>
52 Firmware files are conventionally referred to as blobs because you cannot
53 determine what they will do. Note that firmware is distributed under
54 various different licenses which do not permit disassembly or
55 reverse-engineering.
56 </para>
58 <para>
59 Firmware for PCs falls into four categories:
60 </para>
62 <itemizedlist spacing="compact">
63 <listitem>
64 <para>
65 Updates to the CPU to work around errata, usually referred to as
66 microcode.
67 </para>
68 </listitem>
69 <listitem>
70 <para>
71 Firmware for video controllers. On x86 machines this is required for
72 ATI devices (Radeon and AMDGPU chips) and may be useful for Intel (Skylake
73 and later) and Nvidia (Kepler and later) GPUs.
74 </para>
76 <para>
77 ATI Radeon and AMGPU devices all require firmware to be able to use KMS
78 (kernel modesetting - the preferred option) as well as for Xorg. For
79 old radeon chips (before the R600), the firmware is still in the
80 kernel source.
81 </para>
83 <para>
84 Intel integrated GPUs from Skylake onwards can use firmware for GuC
85 (the Graphics microcontroller), and also for the HuC (HEVC/H265
86 microcontroller which offloads to the GPU) and the DMC (Display
87 Microcontroller) to provide additional low-power states. The GuC and
88 HuC have had a chequered history in the kernel and updated firmware
89 may be disabled by default, depending on your kernel version. Further
90 details may be found at <ulink
91 url=""></ulink>
92 and <ulink
93 url="">Arch
94 linux</ulink>.
95 </para>
97 <para>
98 Nvidia GPUs from Kepler onwards require signed firmware, otherwise the
99 nouveau driver is unable to provide hardware acceleration. Nvidia has
100 now released firmware up to Turing (most, maybe all, GTX16xx and RTX20xx
101 GPUs) to linux-firmware, and kernels from linux-5.6 should support it,
102 although Mesa support may require a development version until Mesa-20.2
103 is released. Note that faster clocks than the default are not enabled
104 by the released firmware.
105 </para>
106 </listitem>
107 <listitem>
108 <para>
109 Firmware updates for wired network ports. Mostly they work even
110 without the updates, but probably they will work better with
111 the updated firmware. For some modern laptops, firmware for both
112 wired ethernet (e.g. rtl_nic) and also for bluetooth devices (e.g. qca)
113 is <emphasis>required</emphasis> before the wired network can be used.
114 </para>
115 </listitem>
116 <listitem>
117 <para>
118 Firmware for other devices, such as wifi. These devices are not
119 required for the PC to boot, but need the firmware before these devices
120 can be used.
121 </para>
122 </listitem>
123 </itemizedlist>
125 <note>
126 <para>
127 Although not needed to load a firmware blob, the following
128 tools may be useful for determining, obtaining, or preparing the needed
129 firmware in order to load it into the system:
130 <xref linkend="cpio"/>,
131 <xref linkend="git"/>,
132 <xref linkend="pciutils"/>, and
133 <xref linkend="wget"/>
134 </para>
135 </note>
137 <para condition="html" role="usernotes">User Notes:
138 <ulink url="&blfs-wiki;/aboutfirmware"/></para>
140 <sect2 id="cpu-microcode">
141 <title>Microcode updates for CPUs</title>
143 <para>
144 In general, microcode can be loaded by the BIOS or UEFI, and it might be
145 updated by upgrading to a newer version of those. On linux, you can also
146 load the microcode from the kernel if you are using an AMD family 10h or
147 later processor (first introduced late 2007), or an Intel processor from
148 1998 and later (Pentium4, Core, etc), if updated microcode has been
149 released. These updates only last until the machine is powered off, so
150 they need to be applied on every boot.
151 </para>
153 <para>
154 Intel provide updates of their microcode for Skylake and later
155 processors as new vulnerabilities come to light, and have in the past
156 provided updates for processors from SandyBridge onwards, although those
157 are no-longer supported for new fixes. New versions of AMD
158 firmware are rare and usually only apply to a few models, although
159 motherboard manufacturers get extra updates which maybe update microcode
160 along with the changes to support newer CPUs and faster memory.
161 </para>
163 <para>
164 There are two ways of loading the microcode, described as 'early' and
165 'late'. Early loading happens before userspace has been started, late
166 loading happens after userspace has started. Not surprisingly, early
167 loading is preferred, (see e.g. an explanatory comment in a kernel
168 commit noted at <ulink url="">
169 x86/microcode: Early load microcode</ulink> on LWN.) Indeed, it
170 is needed to work around one particular erratum in early Intel Haswell
171 processors which had TSX enabled. (See <ulink url=
172 "">
173 Intel Disables TSX Instructions: Erratum Found in Haswell,
174 Haswell-E/EP, Broadwell-Y
175 </ulink>.) Without this update glibc can do the wrong thing in uncommon
176 situations.
177 </para>
179 <para>
180 It is still possible to manually force late loading of microcode, either
181 for testing or to prevent having to reboot. You will need to reconfigure
182 your kernel for either method. The instructions here will create a
183 kernel <filename>.config</filename> to suite early loading, before
184 forcing late loading to see if there is any microcode. If there is,
185 the instructions then show you how to create an initrd for early loading.
186 </para>
188 <para>
189 To confirm what processor(s) you have (if more than one, they will be
190 identical) look in /proc/cpuinfo.
191 </para>
193 <para>
194 If you are creating an initrd to update firmware for different machines,
195 as a distro would do, go down to 'Early loading of microcode' and cat all
196 the Intel blobs to GenuineIntel.bin or cat all the AMD blobs to
197 AuthenticAMD.bin. This creates a larger initrd - for all Intel machines in
198 the 20200609 update the size is 3.0 MB compared to typically 24 KB for one
199 machine.
200 </para>
202 <sect3 id="intel-microcode">
203 <title>Intel Microcode for the CPU</title>
205 <para>
206 The first step is to get the most recent version of the Intel
207 microcode. This must be done by navigating to <ulink url=
208 ''/>
209 and downloading the latest file there. As of this writing the most
210 secure version of the microcode, for those machines which can boot it,
211 is microcode-20201112.<!-- If you have a Skylake machine, please read the
212 Caution in the 'Early loading of microcode' section below.--> Extract this
213 file in the normal way, the microcode is in the <filename>intel-ucode
214 </filename> directory, containing various blobs with names in the form
215 XX-YY-ZZ. There are also various other files, and a releasenote.
216 </para>
218 <para>
219 In the past, intel did not provide any details of which blobs had
220 changed versions, but now the release note details this.
221 </para>
223 <para>
224 The recent firmware for older processors is provided to deal with
225 vulnerabilities which have now been made public, and for some of these
226 such as Microarchitectural Data Sampling (MDS) you might wish to
227 increase the protection by disabling hyperthreading, or alternatively
228 to disable the kernel's default mitigation because of its impact on
229 compile times. Please read the online documentation at <ulink url=
230 ''/>.
231 </para>
233 <!-- commented, I don't think there is a new listed item for 2011-11 vulns
234 (platypus etc : intel-sa-00381 and 0389)
235 and anyway the very latest stable releases have backports : ken
236 <para>
237 The documentation on the latest SRBDS (Special Register Buffer Data
238 Sampling) vulnerabilities/fixes will be documented in kernels 5.4.46,
239 5.6.18, 5.7.2, 5.8.0 and later.
240 </para>-->
242 <para>
243 Now you need to determine your processor's identity to see if there
244 is any microcode for it. Determine the decimal values of the cpu family,
245 model and stepping by running the following command (it will also report
246 the current microcode version):
247 </para>
249<screen><userinput>head -n7 /proc/cpuinfo</userinput></screen>
251 <para>
252 Convert the cpu family, model and stepping to pairs of hexadecimal
253 digits. For a Skylake i3 6100 (described as Intel(R) Core(TM) i3-6100
254 CPU) the relevant values are cpu family 6, model 94, stepping 3 so in
255 this case the required identification is 06-5e-03. A look at the blobs
256 will show that there is one for this CPU (although for older issues it
257 might have already been applied by the BIOS). If there is a blob for
258 your system then test if it will be applied by copying it (replace
259 &lt;XX-YY-ZZ&gt; by the identifier for your CPU) to where the
260 kernel can find it:
261 </para>
263<screen><userinput>mkdir -pv /lib/firmware/intel-ucode
264cp -v intel-ucode/&lt;XX-YY-ZZ&gt; /lib/firmware/intel-ucode</userinput></screen>
266 <para>
267 Now that the Intel microcode has been prepared, use the following
268 options when you configure the kernel to load Intel microcode:
269 </para>
271<screen><literal>General Setup ---&gt;
272 [y] Initial RAM filesystem and RAM disk (initramfs/initrd) support [CONFIG_BLK_DEV_INITRD]
273Processor type and features ---&gt;
274 [y] CPU microcode loading support [CONFIG_MICROCODE]
275 [y] Intel microcode loading support [CONFIG_MICROCODE_INTEL]</literal></screen>
277 <para>
278 After you have successfully booted the new system, force late loading
279 by using the command:
280 </para>
282<screen><userinput>echo 1 > /sys/devices/system/cpu/microcode/reload</userinput></screen>
284 <para>
285 Then use the following command to see if anything was loaded:
286 (N.B. the dates when microcode was created may be months ahead of when
287 it was released.)
288 </para>
290<screen><userinput>dmesg | grep -e 'microcode' -e 'Linux version' -e 'Command line'</userinput></screen>
292 <para>
293 This reformatted example for a machine with old microcode in its BIOS
294 was created by temporarily booting without
295 microcode, to show the current Firmware Bug messages, then the late load
296 shows it being updated to revision 0xec.
297 </para>
299<screen><literal>[ 0.000000] Linux version 5.9.8 (ken@leshp) (gcc (GCC) 10.2.0,
300 GNU ld (GNU Binutils) 2.35)
301 #1 SMP PREEMPT Mon Nov 16 20:42:42 GMT 2020
302[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-5.9.8-sda11 root=/dev/sda11 ro
303[ 0.028715] [Firmware Bug]: TSC_DEADLINE disabled due to Errata;
304 please update microcode to version: 0xb2 (or later)
305[ 0.111874] SRBDS: Vulnerable: No microcode
306[ 0.111984] MDS: Vulnerable: Clear CPU buffers attempted, no microcode</literal></screen>
308 <para>
309 If the microcode was not updated, there is no new microcode for this
310 system's processor. If it did get updated, you can now proceed to
311 <xref linkend='early-microcode'/>.
312 </para>
314 </sect3>
316 <sect3 id="amd-microcode">
317 <title>AMD Microcode for the CPU</title>
319 <para>
320 Begin by downloading a container of firmware for your CPU family
321 from <ulink url=
322 '&sources-anduin-http;/linux-firmware/amd-ucode/'/>.
323 The family is always specified in hex. Families 10h to 14h (16 to 20)
324 are in microcode_amd.bin. Families 15h, 16h and 17h have their own
325 containers. Create the required directory and put the firmware you
326 downloaded into it as the <systemitem
327 class="username">root</systemitem> user:
328 </para>
330<screen><userinput>mkdir -pv /lib/firmware/amd-ucode
331cp -v microcode_amd* /lib/firmware/amd-ucode</userinput></screen>
333 <para>
334 When you configure the kernel, use the following options
335 to load AMD microcode:
336 </para>
338<screen><literal>General Setup ---&gt;
339 [y] Initial RAM filesystem and RAM disk (initramfs/initrd) support [CONFIG_BLK_DEV_INITRD]
340Processor type and features ---&gt;
341 [y] CPU microcode loading support [CONFIG_MICROCODE]
342 [y] AMD microcode loading support [CONFIG_MICROCODE_AMD]</literal></screen>
344 <para>
345 After you have successfully booted the new system, force late loading
346 by using the command:
347 </para>
349<screen><userinput>echo 1 > /sys/devices/system/cpu/microcode/reload</userinput></screen>
351 <para>
352 Then use the following command to see if anything was loaded:
353 </para>
355<screen><userinput>dmesg | grep -e 'microcode' -e 'Linux version' -e 'Command line'</userinput></screen>
356 <para>
357 This historic example from an old Athlon(tm) II X2 shows it has been
358 updated. At that time, all CPUs were still reported in the microcode
359 details on AMD machines (the current position for AMD machines where
360 newer microcode is available is unknown) :
361 </para>
363<screen><literal>[ 0.000000] Linux version 4.15.3 (ken@testserver) (gcc version 7.3.0 (GCC))
364 #1 SMP Sun Feb 18 02:08:12 GMT 2018
365[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-4.15.3-sda5 root=/dev/sda5 ro
366[ 0.307619] microcode: CPU0: patch_level=0x010000b6
367[ 0.307671] microcode: CPU1: patch_level=0x010000b6
368[ 0.307743] microcode: Microcode Update Driver: v2.2.
369[ 187.928891] microcode: CPU0: new patch_level=0x010000c8
370[ 187.928899] microcode: CPU1: new patch_level=0x010000c8</literal></screen>
372 <para>
373 If the microcode was not updated, there is no new microcode for
374 this system's processor. If it did get updated, you can now proceed to
375 <xref linkend='early-microcode'/>.
376 </para>
378 </sect3>
380 <sect3 id="early-microcode">
381 <title>Early loading of microcode</title>
383 <para>
384 If you have established that updated microcode is available for
385 your system, it is time to prepare it for early loading. This requires
386 an additional package, <xref linkend='cpio'/> and the creation of an
387 initrd which will need to be added to grub.cfg.
388 </para>
390 <para>
391 It does not matter where you prepare the initrd, and once it is
392 working you can apply the same initrd to later LFS systems or newer
393 kernels on this same machine, at least until any newer microcode is
394 released. Use the following commands:
395 </para>
397<screen><userinput>mkdir -p initrd/kernel/x86/microcode
398cd initrd</userinput></screen>
400 <para>
401 For an AMD machine, use the following command (replace
402 &lt;MYCONTAINER&gt; with the name of the container for your CPU's
403 family):
404 </para>
406<screen><userinput>cp -v /lib/firmware/amd-ucode/&lt;MYCONTAINER&gt; kernel/x86/microcode/AuthenticAMD.bin</userinput></screen>
408 <para>
409 Or for an Intel machine copy the appropriate blob using this command:
410 </para>
412<screen><userinput>cp -v /lib/firmware/intel-ucode/&lt;XX-YY-ZZ&gt; kernel/x86/microcode/GenuineIntel.bin</userinput></screen>
414<!-- new version from 20201110 release onwards, assumed to work on all skylakes
415 But complaints about previous version took some days to appear, so keep as a comment for now.
416 <caution>
417 <para>
418 On some Skylake machines with hex Model Number '4e' (78 decimal) the
419 upgrade to microcode version '0xdc' is reported to cause the machine to
420 hang in early boot, and the fix is to revert to version 0xd6 which was
421 first shipped in the 20191115 microcode release.
422 </para>
424 <para>
425 At least one model '5e' Skylake does boot successfully with version
426 0xdc, but Intel has now shipped a 20200616 release which is intended for
427 distros which need an initrd that will boot on everyone's machine: it
428 reverts both Skylake variants ('4e' and '5e') to the old 0xd6.
429 </para>
431 <para>
432 For a Skylake which does not boot with 0xdc, reverting to 0xd6 will make
433 the machine usable, but without the SRBDS mitigations.
434 </para>
435 </caution>-->
437 <para>
438 Now prepare the initrd:
439 </para>
441<screen><userinput>find . | cpio -o -H newc &gt; /boot/microcode.img</userinput></screen>
443 <para>
444 You now need to add a new entry to /boot/grub/grub.cfg and
445 here you should add a new line after the linux line within the stanza.
446 If /boot is a separate mountpoint:
447 </para>
449<screen><userinput>initrd /microcode.img</userinput></screen>
451 <para>
452 or this if it is not:
453 </para>
455<screen><userinput>initrd /boot/microcode.img</userinput></screen>
457 <para>
458 If you are already booting with an initrd (see <xref
459 linkend="initramfs"/>), you should run <command>mkinitramfs</command>
460 again after putting the appropriate blob or container into <filename
461 class="directory">/lib/firmware</filename> as explained above.
462 Alternatively, you can have both initrd on the same line, such as
463 <userinput>initrd /microcode.img /other-initrd.img</userinput> (adapt
464 that as above if /boot is not a separate mountpoint).
465 </para>
467 <para>
468 You can now reboot with the added initrd, and then use the same
469 command to check that the early load worked:
470 </para>
472<screen><userinput>dmesg | grep -e 'microcode' -e 'Linux version' -e 'Command line'</userinput></screen>
474 <para>
475 If you updated to address vulnerabilities, you can look at <filename
476 class="directory">/sys/devices/system/cpu/vulnerabilities/</filename>
477 to see what is now reported.
478 </para>
480 <para>
481 The places and times where early loading happens are very different
482 in AMD and Intel machines. First, an Intel (Skylake) example with early loading:
483 </para>
485<screen><literal>[ 0.000000] microcode: microcode updated early to revision 0xe2, date = 2020-07-14
486[ 0.000000] Linux version 5.9.8 (ken@leshp) (gcc (GCC) 10.2.0,
487 GNU ld (GNU Binutils) 2.35)
488 #1 SMP PREEMPT Mon Nov 16 20:42:42 GMT 2020
489[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-5.9.8-sda11 root=/dev/sda11 ro
490[ 0.378287] microcode: sig=0x506e3, pf=0x2, revision=0xe2
491[ 0.378315] microcode: Microcode Update Driver: v2.2.
495 <para>
496 A historic AMD example:
497 </para>
499<screen><literal>[ 0.000000] Linux version 4.15.3 (ken@testserver) (gcc version 7.3.0 (GCC))
500 #2 SMP Sun Feb 18 02:32:03 GMT 2018
501[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-4.15.3-sda5 root=/dev/sda5 ro
502[ 0.307619] microcode: microcode updated early to new patch_level=0x010000c8
503[ 0.307678] microcode: CPU0: patch_level=0x010000c8
504[ 0.307723] microcode: CPU1: patch_level=0x010000c8
505[ 0.307795] microcode: Microcode Update Driver: v2.2.</literal></screen>
507 </sect3>
509 </sect2>
511 <sect2 id="video-firmware">
512 <title>Firmware for Video Cards</title>
514 <sect3 id="ati-video-firmware">
515 <title>Firmware for ATI video chips (R600 and later)</title>
517 <para>
518 These instructions do NOT apply to old radeons before the R600
519 family. For those, the firmware is in the kernel's <filename
520 class='directory'>/lib/firmware/</filename> directory. Nor do they
521 apply if you intend to avoid a graphical setup such as Xorg and are
522 content to use the default 80x25 display rather than a framebuffer.
523 </para>
525 <para>
526 Early radeon devices only needed a single 2K blob of firmware. Recent
527 devices need several different blobs, and some of them are much bigger.
528 The total size of the radeon firmware directory is over 500K &mdash;
529 on a large modern system you can probably spare the space, but it is
530 still redundant to install all the unused files each time you build
531 a system.
532 </para>
534 <para>
535 A better approach is to install <xref linkend='pciutils'/> and then
536 use <userinput>lspci</userinput> to identify which VGA controller is
537 installed.
538 </para>
540 <para>
541 With that information, check the RadeonFeature page of the Xorg wiki
542 for <ulink url="">Decoder
543 ring for engineering vs marketing names</ulink> to identify the family
544 (you may need to know this for the Xorg driver in BLFS &mdash;
545 Southern Islands and Sea Islands use the radeonsi driver) and the
546 specific model.
547 </para>
549 <para>
550 Now that you know which controller you are using, consult the
551 <ulink url="">
552 Radeon</ulink> page of the Gentoo wiki which has a table listing
553 the required firmware blobs for the various chipsets. Note that
554 Southern Islands and Sea Islands chips use different firmware for
555 kernel 3.17 and later compared to earlier kernels. Identify and
556 download the required blobs then install them:
557 </para>
559<screen><userinput>mkdir -pv /lib/firmware/radeon
560cp -v &lt;YOUR_BLOBS&gt; /lib/firmware/radeon</userinput></screen>
562 <para>
563 There are actually two ways of installing this firmware. BLFS, in the
564 'Kernel Configuration for additional firmware' section part of the
565 <xref linkend="xorg-ati-driver"/> section gives an example of
566 compiling the firmware into the kernel - that is slightly faster to
567 load, but uses more kernel memory. Here we will use the alternative
568 method of making the radeon driver a module. In your kernel config
569 set the following:
570 </para>
572<screen><literal>Device Drivers ---&gt;
573 Graphics support ---&gt;
574 Direct Rendering Manager ---&gt;
575 &lt;*&gt; Direct Rendering Manager (XFree86 ... support) [CONFIG_DRM]
576 &lt;m&gt; ATI Radeon [CONFIG_DRM_RADEON]</literal></screen>
578 <para>
579 Loading several large blobs from /lib/firmware takes a noticeable
580 time, during which the screen will be blank. If you do not enable the
581 penguin framebuffer logo, or change the console size by using a bigger
582 font, that probably does not matter. If desired, you can slightly
583 reduce the time if you follow the alternate method of specifying 'y'
584 for CONFIG_DRM_RADEON covered in BLFS at the link above &mdash; you
585 must specify each needed radeon blob if you do that.
586 </para>
588 </sect3>
590 <sect3 id="nvidia-video-firmware">
591 <title>Firmware for Nvidia video chips</title>
593 <para>
594 Some Nvidia graphics chips need firmware updates to take advantage
595 of all the card's capability. These are generally the GeForce 8, 9,
596 9300, and 200-900 series chips. For more exact information, see
597 <ulink url=
598 ""/>.
599 </para>
601 <para>
602 First, the kernel Nvidia driver must be activated:
603 </para>
605<screen><literal>Device Drivers ---&gt;
606 Graphics support ---&gt;
607 Direct Rendering Manager ---&gt;
608 &lt;*&gt; Direct Rendering Manager (XFree86 ... support) [CONFIG_DRM]
609 &lt;*/m&gt; Nouveau (NVIDIA) cards [CONFIG_DRM_NOUVEAU]</literal></screen>
611 <para>
612 The steps to install the Nvidia firmware are:
613 </para>
617sh --extract-only
619mkdir -p /lib/firmware/nouveau
620cp -d nv* vuc-* /lib/firmware/nouveau/</userinput></screen>
622 </sect3>
623 </sect2>
625 <sect2 id="nic-firmware">
626 <title>Firmware for Network Interfaces</title>
628 <para>
629 The kernel likes to load firmware for some network drivers, particularly
630 those from Realtek (the /lib/linux-firmware/rtl_nic/) directory, but
631 they generally appear to work without it. Therefore, you can boot the
632 kernel, check dmesg for messages about this missing firmware, and if
633 necessary download the firmware and put it in the specified directory in
634 <filename class="directory">/lib/firmware</filename> so that it will
635 be found on subsequent boots. Note that with current kernels this
636 works whether or not the driver is compiled in or built as a module,
637 there is no need to build this firmware into the kernel.
638 Here is an example where the R8169 driver has been compiled in but the
639 firmware was not made available. Once the firmware had been provided,
640 there was no mention of it on later boots.
641 </para>
643<screen><literal>dmesg | grep firmware | grep r8169
644[ 7.018028] r8169 0000:01:00.0: Direct firmware load for rtl_nic/rtl8168g-2.fw failed with error -2
645[ 7.018036] r8169 0000:01:00.0 eth0: unable to load firmware patch rtl_nic/rtl8168g-2.fw (-2)</literal></screen>
647 </sect2>
649 <sect2 id="other-firmware">
650 <title>Firmware for Other Devices</title>
652 <para>
653 Identifying the correct firmware will typically require you to install
654 <xref linkend='pciutils'/>, and then use <userinput>lspci</userinput>
655 to identify the device. You should then search online to check which
656 module it uses, which firmware, and where to obtain the firmware &mdash;
657 not all of it is in linux-firmware.
658 </para>
660 <para>
661 If possible, you should begin by using a wired connection when you first
662 boot your LFS system. To use a wireless connection you will need to
663 use a network tools such as <xref linkend='wireless_tools'/> and <xref
664 linkend='wpa_supplicant'/>.
665 </para>
667 <para>
668 Different countries have different regulations on the radio spectrum
669 usage of wireless devices. You can install a firmware to make the
670 wireless devices obey local spectrum regulations, so you won't be
671 inquired by local authority or find your wireless NIC jamming the
672 frequencies of other devices (for example, remote controllers).
673 The regulatory database firmware can be downloaded from
674 <ulink url = ''/>.
675 To install it, simply extract <filename>regulatory.db</filename> and
676 <filename>regulatory.db.p7s</filename> from the tarball into
677 <filename class="directory">/lib/firmware</filename>.
678 The access point would send a country code to your wireless NIC,
679 and <xref linkend='wpa_supplicant'/> would tell the kernel to load
680 the regulation of this country from
681 <filename>regulatory.db</filename>, and enforce it.
682 </para>
684 <para>
685 Firmware may also be needed for other devices such as some SCSI
686 controllers, bluetooth adaptors, or TV recorders. The same principles
687 apply.
688 </para>
690 </sect2>
Note: See TracBrowser for help on using the repository browser.