intel-ucode.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
  2. index de9044c..f5d3e78 100644
  3. --- a/util/grub.d/10_linux.in
  4. +++ b/util/grub.d/10_linux.in
  5. @@ -133,13 +133,15 @@ linux_entry ()
  6. echo '$(echo "$message" | grub_quote)'
  7. linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
  8. EOF
  9. - if test -n "${initrd}" ; then
  10. + if test -n "${initrd}" -o -n "${initrd_extra}" ; then
  11. # TRANSLATORS: ramdisk isn't identifier. Should be translated.
  12. message="$(gettext_printf "Loading initial ramdisk ...")"
  13. - sed "s/^/$submenu_indentation/" << EOF
  14. - echo '$(echo "$message" | grub_quote)'
  15. - initrd ${rel_dirname}/${initrd}
  16. -EOF
  17. + printf ' %s\n' "echo '$(echo "$message" | grub_quote)'" | sed "s/^/$submenu_indentation/"
  18. + printf ' %s ' 'initrd' | sed "s/^/$submenu_indentation/"
  19. + for i in ${initrd_extra} ${initrd}; do
  20. + printf ' %s/%s' "${rel_dirname}" "${i}"
  21. + done
  22. + printf '\n'
  23. fi
  24. sed "s/^/$submenu_indentation/" << EOF
  25. }
  26. @@ -202,6 +204,12 @@ while [ "x$list" != "x" ] ; do
  27. break
  28. fi
  29. done
  30. + initrd_extra=
  31. + for i in intel-ucode.img; do
  32. + if test -e "${dirname}/${i}" ; then
  33. + initrd_extra="${initrd_extra} ${i}"
  34. + fi
  35. + done
  36. config=
  37. for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do
  38. @@ -216,8 +224,8 @@ while [ "x$list" != "x" ] ; do
  39. initramfs=`grep CONFIG_INITRAMFS_SOURCE= "${config}" | cut -f2 -d= | tr -d \"`
  40. fi
  41. - if test -n "${initrd}" ; then
  42. - gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2
  43. + if test -n "${initrd}" -o -n "${initrd_extra}" ; then
  44. + gettext_printf "Found initrd image(s) in %s:%s\n" "${dirname}" "${initrd_extra} ${initrd}" >&2
  45. elif test -z "${initramfs}" ; then
  46. # "UUID=" and "ZFS=" magic is parsed by initrd or initramfs. Since there's
  47. # no initrd or builtin initramfs, it can't work here.
  48. --
  49. 2.9.2