diff options
author | Luke T. Shumaker <lukeshu@parabola.nu> | 2024-01-07 15:22:54 -0700 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@parabola.nu> | 2024-01-07 15:22:54 -0700 |
commit | b04dc7f90e0eab051f49d61637d33658e011b151 (patch) | |
tree | d63a8362bd7556dfe922bfedc2bd7ca36d1982df /libre/grub/0002-10_linux-20_linux_xen-detect-parabola-initramfs.patch | |
parent | 3588fef4dad7bbb21bc93b10757a61c41c733809 (diff) |
libre/grub: rename the patch files to have obvious ordering/purpose
Diffstat (limited to 'libre/grub/0002-10_linux-20_linux_xen-detect-parabola-initramfs.patch')
-rw-r--r-- | libre/grub/0002-10_linux-20_linux_xen-detect-parabola-initramfs.patch | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/libre/grub/0002-10_linux-20_linux_xen-detect-parabola-initramfs.patch b/libre/grub/0002-10_linux-20_linux_xen-detect-parabola-initramfs.patch new file mode 100644 index 000000000..3ae7d9546 --- /dev/null +++ b/libre/grub/0002-10_linux-20_linux_xen-detect-parabola-initramfs.patch @@ -0,0 +1,138 @@ +--- a/util/grub.d/10_linux.in 2021-06-17 03:06:45.912081000 -0500 ++++ b/util/grub.d/10_linux.in 2021-06-17 13:39:03.509682976 -0500 +@@ -91,10 +91,14 @@ + fi + if [ x$type != xsimple ] ; then + case $type in ++ booster) ++ title="$(gettext_printf "%s, %s kernel (booster initramfs)" "${os}" "${version}")" ;; ++ fallback) ++ title="$(gettext_printf "%s, %s kernel (fallback initramfs)" "${os}" "${version}")" ;; + recovery) +- title="$(gettext_printf "%s, with Linux %s (recovery mode)" "${os}" "${version}")" ;; ++ title="$(gettext_printf "%s, %s kernel (recovery mode)" "${os}" "${version}")" ;; + *) +- title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;; ++ title="$(gettext_printf "%s, %s kernel" "${os}" "${version}")" ;; + esac + if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then + replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')" +@@ -106,7 +110,7 @@ + else + echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/" + fi +- if [ x$type != xrecovery ] ; then ++ if [ x$type != xrecovery ] && [ x$type != xfallback ] ; then + save_default_entry | grub_add_tab + fi + +@@ -138,7 +142,7 @@ + fi + printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/" + fi +- message="$(gettext_printf "Loading Linux %s ..." ${version})" ++ message="$(gettext_printf "Loading %s kernel ..." ${version})" + sed "s/^/$submenu_indentation/" << EOF + echo '$(echo "$message" | grub_quote)' + linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} +@@ -198,7 +202,7 @@ + basename=`basename $linux` + dirname=`dirname $linux` + rel_dirname=`make_system_path_relative_to_its_root $dirname` +- version=`echo $basename | sed -e "s,^[^0-9]*-,,g"` ++ version=`echo $basename | sed -e "s,vmlinuz-,,g"` + alt_version=`echo $version | sed -e "s,\.old$,,g"` + linux_root_device_thisversion="${LINUX_ROOT_DEVICE}" + +@@ -285,6 +289,29 @@ + + linux_entry "${OS}" "${version}" advanced \ + "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" ++ ++ if test -e "${dirname}/initramfs-${version}-fallback.img" ; then ++ initrd="${initrd_early} initramfs-${version}-fallback.img" ++ ++ if test -n "${initrd}" ; then ++ gettext_printf "Found fallback initramfs image: %s\n" "${dirname}/${initrd}" >&2 ++ fi ++ ++ linux_entry "${OS}" "${version}" fallback \ ++ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" ++ fi ++ ++ if test -e "${dirname}/booster-${version}.img" ; then ++ initrd="${initrd_early} booster-${version}.img" ++ ++ if test -n "${initrd}" ; then ++ gettext_printf "Found booster initrd image(s) in %s:%s\n" "${dirname}" "${initrd_extra} ${initrd}" >&2 ++ fi ++ ++ linux_entry "${OS}" "${version}" booster \ ++ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" ++ fi ++ + if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then + linux_entry "${OS}" "${version}" recovery \ + "single ${GRUB_CMDLINE_LINUX}" +--- a/util/grub.d/20_linux_xen.in 2021-06-17 03:06:56.202081000 -0500 ++++ b/util/grub.d/20_linux_xen.in 2021-06-17 03:22:43.732079272 -0500 +@@ -117,9 +117,11 @@ + fi + if [ x$type != xsimple ] ; then + if [ x$type = xrecovery ] ; then +- title="$(gettext_printf "%s, with Xen %s and Linux %s (recovery mode)" "${os}" "${xen_version}" "${version}")" ++ title="$(gettext_printf "%s, with Xen %s and %s kernel (recovery mode)" "${os}" "${xen_version}" "${version}")" ++ elif [ x$type = xfallback ] ; then ++ title="$(gettext_printf "%s, with Xen %s and %s kernel (fallback initramfs)" "${os}" "${xen_version}" "${version}")" + else +- title="$(gettext_printf "%s, with Xen %s and Linux %s" "${os}" "${xen_version}" "${version}")" ++ title="$(gettext_printf "%s, with Xen %s and %s kernel" "${os}" "${xen_version}" "${version}")" + fi + replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')" + if [ x"Xen ${xen_version}>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then +@@ -132,7 +134,7 @@ + title="$(gettext_printf "%s, with Xen hypervisor" "${os}")" + echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'xen-gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/" + fi +- if [ x$type != xrecovery ] ; then ++ if [ x$type != xrecovery ] && [ x$type != xfallback ] ; then + save_default_entry | grub_add_tab | sed "s/^/$submenu_indentation/" + fi + +@@ -141,7 +143,7 @@ + fi + printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/" + xmessage="$(gettext_printf "Loading Xen %s ..." ${xen_version})" +- lmessage="$(gettext_printf "Loading Linux %s ..." ${version})" ++ lmessage="$(gettext_printf "Loading %s kernel ..." ${version})" + sed "s/^/$submenu_indentation/" << EOF + echo '$(echo "$xmessage" | grub_quote)' + if [ "\$grub_platform" = "pc" -o "\$grub_platform" = "" ]; then +@@ -275,7 +277,7 @@ + basename=`basename $linux` + dirname=`dirname $linux` + rel_dirname=`make_system_path_relative_to_its_root $dirname` +- version=`echo $basename | sed -e "s,^[^0-9]*-,,g"` ++ version=`echo $basename | sed -e "s,vmlinuz-,,g"` + alt_version=`echo $version | sed -e "s,\.old$,,g"` + linux_root_device_thisversion="${LINUX_ROOT_DEVICE}" + +@@ -341,6 +343,18 @@ + + linux_entry "${OS}" "${version}" "${xen_version}" advanced \ + "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}" ++ ++ if test -e "${dirname}/initramfs-${version}-fallback.img" ; then ++ initrd="initramfs-${version}-fallback.img" ++ ++ if test -n "${initrd}" ; then ++ gettext_printf "Found fallback initramfs image: %s\n" "${dirname}/${initrd}" >&2 ++ fi ++ ++ linux_entry "${OS}" "${version}" "${xen_version}" fallback \ ++ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}" ++ fi ++ + if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then + linux_entry "${OS}" "${version}" "${xen_version}" recovery \ + "single ${GRUB_CMDLINE_LINUX}" "${GRUB_CMDLINE_XEN}" |