From eaf3d6f308094aca4f87ed111c2580e81b18f269 Mon Sep 17 00:00:00 2001 From: "coadde [Márcio Alexandre Silva Delgado]" Date: Sun, 27 Sep 2015 15:38:45 -0300 Subject: grub: add grub-10_linux-20_linux_xen-{detect-devicetree-dir,detect-parabola-initramfs,rebrand-free-distros}.patch, rm grub-10_linux-{detect-parabola-initramfs,rebrand-free-distros}.patch and parabola_grub_mkconfig_fixes.patch --- ...ux-20_linux_xen-detect-parabola-initramfs.patch | 108 +++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 libre/grub/grub-10_linux-20_linux_xen-detect-parabola-initramfs.patch (limited to 'libre/grub/grub-10_linux-20_linux_xen-detect-parabola-initramfs.patch') diff --git a/libre/grub/grub-10_linux-20_linux_xen-detect-parabola-initramfs.patch b/libre/grub/grub-10_linux-20_linux_xen-detect-parabola-initramfs.patch new file mode 100644 index 000000000..49ee47159 --- /dev/null +++ b/libre/grub/grub-10_linux-20_linux_xen-detect-parabola-initramfs.patch @@ -0,0 +1,108 @@ +diff -Nur a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in +--- a/util/grub.d/10_linux.in 2015-09-27 14:14:45.544730230 -0300 ++++ b/util/grub.d/10_linux.in 2015-09-27 14:44:29.727866307 -0300 +@@ -80,9 +80,11 @@ + if [ x$type != xsimple ] ; then + case $type in + recovery) +- title="$(gettext_printf "%s, with Linux %s (recovery mode)" "${os}" "${version}")" ;; ++ title="$(gettext_printf "%s, %s kernel (recovery mode)" "${os}" "${version}")" ;; ++ fallback) ++ title="$(gettext_printf "%s, %s kernel (fallback initramfs)" "${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')" +@@ -126,7 +128,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} +@@ -182,7 +184,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}" + +@@ -238,6 +240,18 @@ + + linux_entry "${OS}" "${version}" advanced \ + "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_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}" fallback \ ++ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" ++ fi ++ + if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then + linux_entry "${OS}" "${version}" recovery \ + "single ${GRUB_CMDLINE_LINUX}" +diff -Nur a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in +--- a/util/grub.d/20_linux_xen.in 2015-09-27 14:14:45.544730230 -0300 ++++ b/util/grub.d/20_linux_xen.in 2015-09-27 14:55:33.602636996 -0300 +@@ -88,9 +88,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}")" ++ if [ 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 +@@ -112,7 +114,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 +@@ -210,7 +212,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}" + +@@ -252,6 +254,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}" -- cgit v1.2.3