diff options
Diffstat (limited to 'sys-kernel')
-rw-r--r-- | sys-kernel/dracut/dracut-044-r9.ebuild (renamed from sys-kernel/dracut/dracut-044-r8.ebuild) | 1 | ||||
-rw-r--r-- | sys-kernel/dracut/files/sort-fixup-creating-early-microcode.patch | 31 |
2 files changed, 32 insertions, 0 deletions
diff --git a/sys-kernel/dracut/dracut-044-r8.ebuild b/sys-kernel/dracut/dracut-044-r9.ebuild index fad4090e..b53f4ab8 100644 --- a/sys-kernel/dracut/dracut-044-r8.ebuild +++ b/sys-kernel/dracut/dracut-044-r9.ebuild @@ -70,6 +70,7 @@ PATCHES=( ""${FILESDIR}"/"${P}"-preserve-xattrs-when-copying.patch" ""${FILESDIR}"/"${P}"-backport-fix-for-microcode-loading.patch" ""${FILESDIR}"/"${P}"-ext4-and-f2fs-need-crc32X-too.patch" + ""${FILESDIR}"/sort-fixup-creating-early-microcode.patch" ) # diff --git a/sys-kernel/dracut/files/sort-fixup-creating-early-microcode.patch b/sys-kernel/dracut/files/sort-fixup-creating-early-microcode.patch new file mode 100644 index 00000000..1dc95158 --- /dev/null +++ b/sys-kernel/dracut/files/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 |