summaryrefslogtreecommitdiff
path: root/libre/grub/grub-10_linux-20_linux_xen-detect-devicetree-dir.patch
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2015-09-27 15:38:45 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2015-09-27 15:40:47 -0300
commiteaf3d6f308094aca4f87ed111c2580e81b18f269 (patch)
tree0a1b82307b23700132f81735dcacbcd83c835136 /libre/grub/grub-10_linux-20_linux_xen-detect-devicetree-dir.patch
parent4204505a22ecdc7afbfd9ce7d0e3244e213c5eb1 (diff)
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
Diffstat (limited to 'libre/grub/grub-10_linux-20_linux_xen-detect-devicetree-dir.patch')
-rw-r--r--libre/grub/grub-10_linux-20_linux_xen-detect-devicetree-dir.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/libre/grub/grub-10_linux-20_linux_xen-detect-devicetree-dir.patch b/libre/grub/grub-10_linux-20_linux_xen-detect-devicetree-dir.patch
new file mode 100644
index 000000000..002bc4c02
--- /dev/null
+++ b/libre/grub/grub-10_linux-20_linux_xen-detect-devicetree-dir.patch
@@ -0,0 +1,56 @@
+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 15:15:26.759140186 -0300
+@@ -138,6 +138,13 @@
+ echo '$(echo "$message" | grub_quote)'
+ initrd ${rel_dirname}/${initrd}
+ EOF
++ if test -d "${dirname}/dtb/${version}" ; then
++ # TRANSLATORS: Device tree path isn't identifier. Should be translated.
++ message="$(gettext_printf "Loading devices tree path ...")"
++ sed "s/^/$submenu_indentation/" << EOF
++ echo '$(echo "$message" | grub_quote)'
++ devicetree ${dirname}/dtb/${version}
++EOF
+ fi
+ sed "s/^/$submenu_indentation/" << EOF
+ }
+@@ -222,6 +229,10 @@
+ linux_root_device_thisversion=${GRUB_DEVICE}
+ fi
+
++ if test -d "${dirname}/dtb/${version}" ; then
++ gettext_printf "Found device tree directory: %s\n" "${dirname}/dtb/${version}" >&2
++ fi
++
+ if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then
+ linux_entry "${OS}" "${version}" simple \
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
+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 15:15:26.760140194 -0300
+@@ -131,6 +131,13 @@
+ echo '$(echo "$message" | grub_quote)'
+ module --nounzip ${rel_dirname}/${initrd}
+ EOF
++ if test -d "${dirname}/dtb/${version}" ; then
++ # TRANSLATORS: Device tree path isn't identifier. Should be translated.
++ message="$(gettext_printf "Loading devices tree path ...")"
++ sed "s/^/$submenu_indentation/" << EOF
++ echo '$(echo "$message" | grub_quote)'
++ devicetree ${dirname}/dtb/${version}
++EOF
+ fi
+ sed "s/^/$submenu_indentation/" << EOF
+ }
+@@ -235,6 +242,10 @@
+ linux_root_device_thisversion=${GRUB_DEVICE}
+ fi
+
++ if test -d "${dirname}/dtb/${version}" ; then
++ gettext_printf "Found device tree directory: %s\n" "${dirname}/dtb/${version}" >&2
++ fi
++
+ if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then
+ linux_entry "${OS}" "${version}" "${xen_version}" simple \
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"