Blame SOURCES/0394-Disable-early-microcode-for-non-x86-architecures.patch

712866
From ced0638e2c0d8805551b1153b9e153241c646262 Mon Sep 17 00:00:00 2001
712866
From: Harald Hoyer <harald@redhat.com>
712866
Date: Wed, 29 Jun 2016 10:45:22 +0200
712866
Subject: [PATCH] Disable early microcode for non-x86 architecures
712866
712866
---
712866
 dracut.sh | 28 +++++++++++++++++++++-------
712866
 1 file changed, 21 insertions(+), 7 deletions(-)
712866
712866
diff --git a/dracut.sh b/dracut.sh
5c6c2a
index 6bbde70b..b85d42dd 100755
712866
--- a/dracut.sh
712866
+++ b/dracut.sh
712866
@@ -819,13 +819,6 @@ readonly initdir="$(mktemp --tmpdir="$TMPDIR/" -d -t initramfs.XXXXXX)"
712866
     exit 1
712866
 }
712866
 
712866
-if [[ $early_microcode = yes ]] || ( [[ $acpi_override = yes ]] && [[ -d $acpi_table_dir ]] ); then
712866
-    readonly early_cpio_dir="$(mktemp --tmpdir="$TMPDIR/" -d -t early_cpio.XXXXXX)"
712866
-    [ -d "$early_cpio_dir" ] || {
712866
-        printf "%s\n" "dracut: mktemp --tmpdir=\"$TMPDIR/\" -d -t early_cpio.XXXXXX failed." >&2
712866
-        exit 1
712866
-    }
712866
-fi
712866
 # clean up after ourselves no matter how we die.
712866
 trap '
712866
     ret=$?;
712866
@@ -879,6 +872,26 @@ fi
712866
 dracutfunctions=$dracutbasedir/dracut-functions.sh
712866
 export dracutfunctions
712866
 
712866
+
712866
+
712866
+case "$(arch)" in
712866
+    i686|x86_64)
712866
+        ;;
712866
+    *)
712866
+        early_microcode=no
712866
+        dinfo "Disabling early microcode for $(arch)"
712866
+        ;;
712866
+esac
712866
+
712866
+if [[ $early_microcode = yes ]] || ( [[ $acpi_override = yes ]] && [[ -d $acpi_table_dir ]] ); then
712866
+    readonly early_cpio_dir="$(mktemp --tmpdir="$TMPDIR/" -d -t early_cpio.XXXXXX)"
712866
+    [ -d "$early_cpio_dir" ] || {
712866
+        printf "%s\n" "dracut: mktemp --tmpdir=\"$TMPDIR/\" -d -t early_cpio.XXXXXX failed." >&2
712866
+        exit 1
712866
+    }
712866
+fi
712866
+
712866
+
712866
 if (( ${#drivers_l[@]} )); then
712866
     drivers=''
712866
     while pop drivers_l val; do
712866
@@ -1470,6 +1483,7 @@ if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then
712866
 
712866
     dinfo "*** Stripping files done ***"
712866
 fi
712866
+
712866
 if [[ $early_microcode = yes ]]; then
712866
     dinfo "*** Generating early-microcode cpio image ***"
712866
     ucode_dir=(amd-ucode intel-ucode)