summaryrefslogtreecommitdiff
path: root/packages/sys-boot/dracut/files/0009-sort-fixup-creating-early-microcode.patch
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sys-boot/dracut/files/0009-sort-fixup-creating-early-microcode.patch')
-rw-r--r--packages/sys-boot/dracut/files/0009-sort-fixup-creating-early-microcode.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/packages/sys-boot/dracut/files/0009-sort-fixup-creating-early-microcode.patch b/packages/sys-boot/dracut/files/0009-sort-fixup-creating-early-microcode.patch
new file mode 100644
index 0000000..1dc9515
--- /dev/null
+++ b/packages/sys-boot/dracut/files/0009-sort-fixup-creating-early-microcode.patch
@@ -0,0 +1,31 @@
+diff -Naur dracut-047/dracut.sh dracut-047-microcode/dracut.sh
+--- dracut-047/dracut.sh 2018-02-19 10:00:33.000000000 +0100
++++ dracut-047-microcode/dracut.sh 2018-05-16 21:14:14.440286520 +0200
+@@ -1686,10 +1686,23 @@
+ break 2
+ done
+ for i in $_fwdir/$_fw/$_src; do
+- [[ -e "$i" ]] || continue
+- # skip gpg files
+- str_ends "$i" ".asc" && continue
+- cat "$i" >> $_dest_dir/${ucode_dest[$idx]}
++ ## match intel and amd ucode ignore other stuff
++ _i=$(echo $i | egrep "[0-9a-z]\w-[0-9a-z]\w-[0-9a-z]\w$|microcode_amd.*.bin$")
++ if [[ -n $_i ]]; then
++ j=$(file -bi $_i)
++ case $j in
++ *application/octet-stream*)
++ [[ -e "$_i" ]] || continue
++ ;;
++ *)
++ ## ignore also files matches names but are not data ( octet-stream )
++ dinfo " Ignoring '$(basename $_i)', matches ucode names but is not a data file."
++ continue
++ ;;
++ esac
++
++ cat "$_i" >> $_dest_dir/${ucode_dest[$idx]}
++ fi
+ done
+ create_early_cpio="yes"
+ fi