Changeset 6e493187


Ignore:
Timestamp:
01/09/2020 04:18:14 PM (4 years ago)
Author:
Pierre Labastie <pieere@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 9.1, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, lazarus, lxqt, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
cce4984
Parents:
e3b66f3
Message:

Add early loading of microcode to the initramfs
Fix a bug in mkinitramfs, leading to a "cp" error

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@22557 af4574ff-66df-0310-9fd7-8a98e5e911e0

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • general.ent

    re3b66f3 r6e493187  
    11<!-- $LastChangedBy$ $Date$ -->
    22
    3 <!ENTITY day          "08">                   <!-- Always 2 digits -->
     3<!ENTITY day          "09">                   <!-- Always 2 digits -->
    44<!ENTITY month        "01">                   <!-- Always 2 digits -->
    55<!ENTITY year         "2020">
     
    77<!ENTITY copyholder   "The BLFS Development Team">
    88<!ENTITY version      "&year;-&month;-&day;">
    9 <!ENTITY releasedate  "January 8th, &year;">
     9<!ENTITY releasedate  "January 9th, &year;">
    1010<!ENTITY pubdate      "&year;-&month;-&day;"> <!-- metadata req. by TLDP -->
    1111<!ENTITY blfs-version "svn">                  <!-- svn|[release #] -->
  • introduction/welcome/changelog.xml

    re3b66f3 r6e493187  
    4343-->
    4444    <listitem>
     45      <para>January 9th, 2020</para>
     46      <itemizedlist>
     47        <listitem>
     48          <para>[pierre] - Add early microcode loading to the initramfs.</para>
     49        </listitem>
     50      </itemizedlist>
     51    </listitem>
     52
     53    <listitem>
    4554      <para>January 8th, 2020</para>
    4655      <itemizedlist>
     
    100109        <listitem>
    101110          <para>[bdubbs] - Update to seahorse-3.34.1. Fixes
    102           <ulink url="&blfs-ticket-root;12985">#12985</ulink>.</para>
     111          <ulink url="&blfs-ticket-root;12986">#12986</ulink>.</para>
    103112        </listitem>
    104113        <listitem>
  • postlfs/config/firmware.xml

    re3b66f3 r6e493187  
    309309
    310310      <para>If you are already booting with an initrd (see <xref
    311       linkend="initramfs"/>) you must specify the microcode initrd first, using
    312       a line such as <userinput>initrd /microcode.img
    313       /other-initrd.img</userinput> (adapt that as above if /boot is not a
    314       separate mountpoint).</para>
     311      linkend="initramfs"/>), you should run <command>mkinitramfs</command>
     312      again after putting the appropriate blob or container into <filename
     313      class="directory">/lib/firmware</filename> as explained above.
     314      Alternatively, you can have both initrd on the same line, such as
     315      <userinput>initrd /microcode.img /other-initrd.img</userinput> (adapt
     316      that as above if /boot is not a separate mountpoint).</para>
    315317
    316318      <para>You can now reboot with the added initrd, and then use the same
  • postlfs/filesystems/initramfs.xml

    re3b66f3 r6e493187  
    6969  fi
    7070
    71   if [ -n $file ] ; then
     71  if [ -n "$file" ] ; then
    7272    cp $file $WDIR/$2
    7373  else
     
    209209# Install libraries
    210210sort $unsorted | uniq | while read library ; do
    211   if [ "$library" == "linux-vdso.so.1" ] ||
    212      [ "$library" == "linux-gate.so.1" ]; then
     211# linux-vdso and linux-gate are pseudo libraries and do not correspond to a file
     212# libsystemd-shared is in /lib/systemd, so it is not found by copy, and
     213# it is copied below anyway
     214  if [[ "$library" == linux-vdso.so.1 ]] ||
     215     [[ "$library" == linux-gate.so.1 ]] ||
     216     [[ "$library" == libsystemd-shared* ]]; then
    213217    continue
    214218  fi
     
    244248( cd $WDIR ; find . | cpio -o -H newc --quiet | gzip -9 ) &gt; $INITRAMFS_FILE
    245249
    246 # Remove the temporary directory and file
     250# Prepare early loading of microcode if available
     251if ls /lib/firmware/intel-ucode/* &gt;/dev/null 2&gt;&amp;1 ||
     252   ls /lib/firmware/amd-ucode/*   &gt;/dev/null 2&gt;&amp;1; then
     253
     254# first empty WDIR to reuse it
     255  rm -r $WDIR/*
     256
     257  DSTDIR=$WDIR/kernel/x86/microcode
     258  mkdir -p $DSTDIR
     259
     260  if [ -d /lib/firmware/amd-ucode ]; then
     261    cat /lib/firmware/amd-ucode/microcode_amd*.bin &gt; $DSTDIR/AuthenticAMD.bin
     262  fi
     263
     264  if [ -d /lib/firmware/intel-ucode ]; then
     265    cat /lib/firmware/intel-ucode/* &gt; $DSTDIR/GenuineIntel.bin
     266  fi
     267
     268  ( cd $WDIR; find . | cpio -o -H newc --quiet ) &gt; microcode.img
     269  cat microcode.img $INITRAMFS_FILE &gt; tmpfile
     270  mv tmpfile $INITRAMFS_FILE
     271  rm microcode.img
     272fi
     273
     274# Remove the temporary directories and files
    247275rm -rf $WDIR $unsorted
    248276printf "done.\n"
     
    399427      <xref role="runtime" linkend="mdadm"/> must be installed before
    400428      generating the initramfs, if the system partition uses them.
    401 
    402429    </para>
    403430
     
    421448    current directory.</para>
    422449
     450    <para>If early loading of microcode is needed (see <xref
     451    linkend="cpu-microcode"/>), you can install the appropriate blob or
     452    container in <filename class="directory">/lib/firmware</filename>.
     453    It will be automatically added to the initrd when running
     454    <command>mkinitramfs</command>.</para>
     455
    423456    <para>After generating the initrd, copy it to the <filename
    424457    class='directory'>/boot</filename> directory.</para>
Note: See TracChangeset for help on using the changeset viewer.