mirror of
https://github.com/Antynea/grub-btrfs.git
synced 2026-08-24 09:13:15 +08:00
Enhance microcode detection (#105)
Add all default stock images listed by "grub" See [GRUB_EARLY_INITRD_LINUX_STOCK](https://www.gnu.org/software/grub/manual/grub/html_node/Simple-configuration.html) for more informations.
This commit is contained in:
@@ -201,7 +201,7 @@ make_menu_entries()
|
|||||||
else continue ;
|
else continue ;
|
||||||
fi
|
fi
|
||||||
for u in "${name_microcode[@]}"; do
|
for u in "${name_microcode[@]}"; do
|
||||||
if [[ -f "${boot_dir}"/"${u}" && "${i}" != "${prefix_i}-${kversion}-${alt_suffix_i}" ]] ; then
|
if [[ "${name_microcode}" != "x" ]] ; then
|
||||||
entry "
|
entry "
|
||||||
menuentry '"${k}" & "${i}" & "${u}"' ${CLASS} "\$menuentry_id_option" 'gnulinux-snapshots-$boot_uuid' {"
|
menuentry '"${k}" & "${i}" & "${u}"' ${CLASS} "\$menuentry_id_option" 'gnulinux-snapshots-$boot_uuid' {"
|
||||||
else
|
else
|
||||||
@@ -222,7 +222,7 @@ make_menu_entries()
|
|||||||
echo 'Loading Snapshot: "${snap_date_time}" "${snap_dir_name}"'
|
echo 'Loading Snapshot: "${snap_date_time}" "${snap_dir_name}"'
|
||||||
echo 'Loading Kernel: "${k}" ...'
|
echo 'Loading Kernel: "${k}" ...'
|
||||||
linux \"${boot_dir_root_grub}/"${k}"\" root="${LINUX_ROOT_DEVICE}" rw ${kernel_parameters} rootflags=subvol=\""${snap_dir_name}"\""
|
linux \"${boot_dir_root_grub}/"${k}"\" root="${LINUX_ROOT_DEVICE}" rw ${kernel_parameters} rootflags=subvol=\""${snap_dir_name}"\""
|
||||||
if [[ -f "${boot_dir}"/"${u}" && "${i}" != "${prefix_i}-${kversion}-${alt_suffix_i}" ]] ; then
|
if [[ "${name_microcode}" != "x" ]] ; then
|
||||||
entry "\
|
entry "\
|
||||||
echo 'Loading Microcode & Initramfs: "${u}" "${i}" ...'
|
echo 'Loading Microcode & Initramfs: "${u}" "${i}" ...'
|
||||||
initrd \"${boot_dir_root_grub}/"${u}"\" \"${boot_dir_root_grub}/"${i}"\""
|
initrd \"${boot_dir_root_grub}/"${u}"\" \"${boot_dir_root_grub}/"${i}"\""
|
||||||
@@ -385,8 +385,14 @@ detect_initramfs()
|
|||||||
detect_microcode()
|
detect_microcode()
|
||||||
{
|
{
|
||||||
list_ucode=()
|
list_ucode=()
|
||||||
# Original intel microcode
|
# Original intel/amd microcode (auto-detect)
|
||||||
for oiucode in "${boot_dir}"/intel-ucode.img ; do
|
# See "https://www.gnu.org/software/grub/manual/grub/html_node/Simple-configuration.html"
|
||||||
|
for oiucode in "${boot_dir}"/intel-uc.img \
|
||||||
|
"${boot_dir}"/intel-ucode.img \
|
||||||
|
"${boot_dir}"/amd-uc.img \
|
||||||
|
"${boot_dir}"/amd-ucode.img \
|
||||||
|
"${boot_dir}"/early_ucode.cpio \
|
||||||
|
"${boot_dir}"/microcode.cpio; do
|
||||||
[[ ! -f "${oiucode}" ]] && continue;
|
[[ ! -f "${oiucode}" ]] && continue;
|
||||||
list_ucode+=("$oiucode")
|
list_ucode+=("$oiucode")
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user