Hello community,

here is the log from the commit of package ucode-intel for openSUSE:Factory 
checked in at 2013-12-09 19:18:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ucode-intel (Old)
 and      /work/SRC/openSUSE:Factory/.ucode-intel.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ucode-intel"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ucode-intel/ucode-intel.changes  2013-11-27 
15:33:41.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ucode-intel.new/ucode-intel.changes     
2013-12-09 19:18:23.000000000 +0100
@@ -1,0 +2,16 @@
+Mon Dec  2 14:17:33 UTC 2013 - [email protected]
+
+- Add mkinitrd script to add Intel microcode to initrd.
+  This is needed because microcode driver is built in or gets loaded
+  automatically via udev early. Therefore the microcode has to be available
+  in initrd already.
+  This must not be mixed up with early micorcode loading. This feature will
+  not be implemented via mkinitrd. Dracut is doing early microcode loading.
+- bnc#847158
+- mkinitrd scripts:
+    - mkinitrd_setup-intel_microcode.sh
+      Adding microcode to the initrd
+    - mkinitrd_boot-intel_microcode.sh
+      Triggering the reload at boot
+
+-------------------------------------------------------------------

New:
----
  mkinitrd_boot-intel_microcode.sh
  mkinitrd_setup-intel_microcode.sh

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ucode-intel.spec ++++++
--- /var/tmp/diff_new_pack.YUYRyN/_old  2013-12-09 19:18:23.000000000 +0100
+++ /var/tmp/diff_new_pack.YUYRyN/_new  2013-12-09 19:18:23.000000000 +0100
@@ -28,6 +28,8 @@
 Source0:        microcode-%{version}.tgz
 Source1:        intel-microcode2ucode.c
 Source2:        LICENSE
+Source3:        mkinitrd_setup-intel_microcode.sh
+Source4:        mkinitrd_boot-intel_microcode.sh
 Supplements:    
modalias(x86cpu:vendor%3A0000%3Afamily%3A*%3Amodel%3A*%3Afeature%3A*)
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 ExclusiveArch:  %ix86 x86_64
@@ -44,6 +46,8 @@
 ./generate_microcode microcode.dat
 
 %install
+install -D -m 0755 %{SOURCE3} 
%{buildroot}/lib/mkinitrd/scripts/setup-intel_microcode.sh
+install -D -m 0755 %{SOURCE4} 
%{buildroot}/lib/mkinitrd/scripts/boot-intel_microcode.sh
 install -D -m 0755 generate_microcode %{buildroot}%{_bindir}/generate_microcode
 for file in intel-ucode/*; do
 install -D -m 0644 $file %{buildroot}/lib/firmware/$file
@@ -51,6 +55,13 @@
 
 %post
 #if this fails, the user must either reboot or reload manually.
+[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
+if [ -e /var/lib/no_initrd_recreation_by_suspend ]; then
+  echo "Skipping recreation of existing initial ramdisks, due"
+  echo "to presence of /var/lib/no_initrd_recreation_by_suspend"
+elif [ -x /sbin/mkinitrd ]; then
+  /sbin/mkinitrd
+fi
 test -f /sys/devices/system/cpu/microcode/reload && /bin/echo 1 > 
/sys/devices/system/cpu/microcode/reload || exit 0
 
 %files
@@ -58,5 +69,9 @@
 %doc LICENSE
 %{_bindir}/generate_microcode
 /lib/firmware/intel-ucode/
+%dir /lib/mkinitrd
+%dir /lib/mkinitrd/scripts
+/lib/mkinitrd/scripts/setup-intel_microcode.sh
+/lib/mkinitrd/scripts/boot-intel_microcode.sh
 
 %changelog

++++++ mkinitrd_boot-intel_microcode.sh ++++++
#!/bin/bash

#%stage: boot

if [ -w /sys/devices/system/cpu/microcode/reload ];then
        echo 1 >/sys/devices/system/cpu/microcode/reload
fi
++++++ mkinitrd_setup-intel_microcode.sh ++++++
#!/bin/bash

#%stage: boot
#
#  Adds Intel microcode to the initrd
#
#  If processor(s) are upgraded on the system, mkinitrd has to be re-called
#  manually to include a possible other needed firmware to the initrd
#
if grep -q -i intel /proc/cpuinfo; then
        echo -n "Microcode: "
        if [ ! -e /lib/firmware/intel-ucode ];then
            echo "Intel microcode not found, ucode-intel package not installed?"
            return 0
        fi
        # TBD: Shall we keep this check whether
        # /lib/firmware/intel-ucode/$family-$model-$stepping exists to avoid
        # per cpu file not found messages? Otherwise udev firmware loader rule
        # complaints about not found firmware files in /var/log/messages
        #
        TMP=$(grep -m1 "^cpu family" /proc/cpuinfo)
        # Convert cpu family from /proc/cpuinfo from decimal to a 2 digit hex
        cpu_family=$(printf "%02x" ${TMP#cpu family*: })
        TMP=$(grep -m1 "^model" /proc/cpuinfo)
        model=$(printf "%02x" ${TMP#model*: })
        TMP=$(grep -m1 "^stepping" /proc/cpuinfo)
        stepping=$(printf "%02x" ${TMP#stepping*: })
        if [ -e /lib/firmware/intel-ucode/${cpu_family}-${model}-${stepping} 
];then
            mkdir -p "$tmp_mnt"/lib/firmware/intel-ucode
            cp /lib/firmware/intel-ucode/${cpu_family}-${model}-${stepping}*    
                  "$tmp_mnt"/lib/firmware/intel-ucode
            echo "Adding Intel microcode ${cpu_family}-${model}-${stepping}"
        else
            echo "No microcode available for CPU model: 
${cpu_family}-${model}-${stepping}"
        fi
fi
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to