summaryrefslogtreecommitdiff
path: root/libre/grub
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-10-16 20:09:14 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-10-16 20:09:14 -0300
commitb479dafc509871ee269e0135498b97f4f9942523 (patch)
tree5064a057a8d28ccf01e7f6a2407732c5b21c8610 /libre/grub
parent6ee5c91369c2c7be03b08653a501e45ee7ff2786 (diff)
grub: add grub-omap3_beagle{,_xm,_xm_ab}
Diffstat (limited to 'libre/grub')
-rw-r--r--libre/grub/PKGBUILD242
-rw-r--r--libre/grub/grub-10_linux-20_linux_xen-detect-omap3_beagle-devicetree-file.patch58
-rw-r--r--libre/grub/grub-10_linux-20_linux_xen-detect-omap3_beagle_xm-devicetree-file.patch58
-rw-r--r--libre/grub/grub-10_linux-20_linux_xen-detect-omap3_beagle_xm_ab-devicetree-file.patch58
4 files changed, 412 insertions, 4 deletions
diff --git a/libre/grub/PKGBUILD b/libre/grub/PKGBUILD
index 3060f30f5..04abd0ab1 100644
--- a/libre/grub/PKGBUILD
+++ b/libre/grub/PKGBUILD
@@ -2,7 +2,7 @@
# Maintainer (Arch): Ronald van Haren <ronald.archlinux.org>
# Contributor (Arch): Keshav Amburay <(the ddoott ridikulus ddoott rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
# Maintainer: André Silva <emulatorman@parabola.nu>
-# Contributor: Márcio Silva <coadde@parabola.nu>
+# Maintainer: Márcio Silva <coadde@parabola.nu>
### ARM_UBOOT - loadaddr ###
@@ -164,7 +164,6 @@
# nyan-big
# odroid
# odroid-xu3
-# omap3_beagle
# omap3_cairo cairo
# omap3_evm
# omap3_evm_quick
@@ -368,10 +367,11 @@ _UNIFONT_VER='6.3.20131217'
pkgbase='grub'
pkgname=('grub')
-[[ $CARCH = armv7h ]] && pkgname+=('grub-am335x_bone' 'grub-udoo')
+[[ $CARCH = armv7h ]] && pkgname+=('grub-am335x_bone' 'grub-udoo' 'grub-omap3_beagle'
+ 'grub-omap3_beagle_xm' 'grub-omap3_beagle_xm_ab')
pkgdesc='GNU GRand Unified Bootloader (2), (Parabola rebranded)'
pkgver='2.02.beta2'
-pkgrel='5.parabola8'
+pkgrel='5.parabola9'
epoch='1'
url='https://www.gnu.org/software/grub/'
arch=('x86_64' 'i686' 'armv7h')
@@ -418,6 +418,9 @@ source=("grub-${_pkgver}::git+git://git.sv.gnu.org/grub.git#tag=${_GRUB_GIT_TAG}
'60_memtest86+'
'grub.default'
'grub-10_linux-20_linux_xen-detect-am335x_bone+am335x_boneblack-devicetree-file.patch'
+ 'grub-10_linux-20_linux_xen-detect-omap3_beagle-devicetree-file.patch'
+ 'grub-10_linux-20_linux_xen-detect-omap3_beagle_xm-devicetree-file.patch'
+ 'grub-10_linux-20_linux_xen-detect-omap3_beagle_xm_ab-devicetree-file.patch'
'grub-10_linux-20_linux_xen-detect-udoo-devicetree-file.patch'
'grub-10_linux-20_linux_xen-rebrand-free-distros.patch')
@@ -430,6 +433,9 @@ md5sums=('SKIP'
'be55eabc102f2c60b38ed35c203686d6'
'8d1dd54ae4a1b550c097e056892ce953'
'a46695e19b588a53b8bac9e3b3c56096'
+ '803f5b5f56ba6d74ca84aea67659116e'
+ 'b2c20ce3aa7944636b3ea499b40f2160'
+ '7e3245bdd30e291f44ab8a00b8a38f3e'
'95b721dfe74f42df52b7ae94e0e7c067'
'e0133ad89ab3014210d4599f396a556e')
@@ -908,6 +914,171 @@ _build_grub-uboot_am335x-bone() {
make
}
+_build_grub-uboot_omap3_beagle() {
+ msg "Copy the source for building the U-Boot (omap3_beagle) part"
+ cp -r "${srcdir}/grub-${_pkgver}" "${srcdir}/grub-${_pkgver}-uboot_omap3_beagle"
+ cd "${srcdir}/grub-${_pkgver}-uboot_omap3_beagle/"
+
+ msg 'Patch to detect omap3_beagle device tree blob file (dtb)'
+ patch -Np1 -i "${srcdir}/grub-10_linux-20_linux_xen-detect-omap3_beagle-devicetree-file.patch"
+
+ msg 'change memory adapted for omap3_beagle support'
+ sed -i '\|arm_uboot_ldflags| s|0x08000000|0x82000000|
+ \|GRUB_KERNEL_ARM_UBOOT_LINK_ADDR| s|0x08000000|0x82000000|
+ ' grub-core/Makefile.core.def \
+ include/grub/offsets.h
+
+ msg 'Unset all compiler FLAGS for U-Boot (omap3_beagle) build'
+ unset CFLAGS
+ unset CPPFLAGS
+ unset CXXFLAGS
+ unset LDFLAGS
+ unset MAKEFLAGS
+
+ cd "${srcdir}/grub-${_pkgver}-uboot_omap3_beagle/"
+
+ msg 'Run autogen.sh for U-Boot (omap3_beagle) build'
+ ./autogen.sh
+
+ msg 'Run ./configure for U-Boot (omap3_beagle) build'
+ ./configure \
+ --with-platform='uboot' \
+ --target='arm' \
+ --disable-efiemu \
+ --enable-mm-debug \
+ --enable-nls \
+ --enable-device-mapper \
+ --enable-cache-stats \
+ --enable-boot-time \
+ --enable-grub-mkfont \
+ --enable-grub-mount \
+ --prefix='/usr' \
+ --bindir='/usr/bin' \
+ --sbindir='/usr/bin' \
+ --mandir='/usr/share/man' \
+ --infodir='/usr/share/info' \
+ --datarootdir='/usr/share' \
+ --sysconfdir='/etc' \
+ --program-prefix='' \
+ --with-bootdir='/boot' \
+ --with-grubdir='grub' \
+ --disable-silent-rules \
+ --disable-werror
+
+ msg 'Run make for U-Boot (omap3_beagle) build'
+ make
+}
+
+_build_grub-uboot_omap3_beagle_xm() {
+ msg "Copy the source for building the U-Boot (omap3_beagle_xm) part"
+ cp -r "${srcdir}/grub-${_pkgver}" "${srcdir}/grub-${_pkgver}-uboot_omap3_beagle_xm"
+ cd "${srcdir}/grub-${_pkgver}-uboot_omap3_beagle_xm/"
+
+ msg 'Patch to detect omap3_beagle_xm device tree blob file (dtb)'
+ patch -Np1 -i "${srcdir}/grub-10_linux-20_linux_xen-detect-omap3_beagle_xm-devicetree-file.patch"
+
+ msg 'change memory adapted for omap3_beagle_xm support'
+ sed -i '\|arm_uboot_ldflags| s|0x08000000|0x82000000|
+ \|GRUB_KERNEL_ARM_UBOOT_LINK_ADDR| s|0x08000000|0x82000000|
+ ' grub-core/Makefile.core.def \
+ include/grub/offsets.h
+
+ msg 'Unset all compiler FLAGS for U-Boot (omap3_beagle_xm) build'
+ unset CFLAGS
+ unset CPPFLAGS
+ unset CXXFLAGS
+ unset LDFLAGS
+ unset MAKEFLAGS
+
+ cd "${srcdir}/grub-${_pkgver}-uboot_omap3_beagle_xm/"
+
+ msg 'Run autogen.sh for U-Boot (omap3_beagle_xm) build'
+ ./autogen.sh
+
+ msg 'Run ./configure for U-Boot (omap3_beagle_xm) build'
+ ./configure \
+ --with-platform='uboot' \
+ --target='arm' \
+ --disable-efiemu \
+ --enable-mm-debug \
+ --enable-nls \
+ --enable-device-mapper \
+ --enable-cache-stats \
+ --enable-boot-time \
+ --enable-grub-mkfont \
+ --enable-grub-mount \
+ --prefix='/usr' \
+ --bindir='/usr/bin' \
+ --sbindir='/usr/bin' \
+ --mandir='/usr/share/man' \
+ --infodir='/usr/share/info' \
+ --datarootdir='/usr/share' \
+ --sysconfdir='/etc' \
+ --program-prefix='' \
+ --with-bootdir='/boot' \
+ --with-grubdir='grub' \
+ --disable-silent-rules \
+ --disable-werror
+
+ msg 'Run make for U-Boot (omap3_beagle_xm) build'
+ make
+}
+
+_build_grub-uboot_omap3_beagle_xm_ab() {
+ msg "Copy the source for building the U-Boot (omap3_beagle_xm_ab) part"
+ cp -r "${srcdir}/grub-${_pkgver}" "${srcdir}/grub-${_pkgver}-uboot_omap3_beagle_xm_ab"
+ cd "${srcdir}/grub-${_pkgver}-uboot_omap3_beagle_xm_ab/"
+
+ msg 'Patch to detect omap3_beagle_xm_ab device tree blob file (dtb)'
+ patch -Np1 -i "${srcdir}/grub-10_linux-20_linux_xen-detect-omap3_beagle_xm_ab-devicetree-file.patch"
+
+ msg 'change memory adapted for omap3_beagle_xm_ab support'
+ sed -i '\|arm_uboot_ldflags| s|0x08000000|0x82000000|
+ \|GRUB_KERNEL_ARM_UBOOT_LINK_ADDR| s|0x08000000|0x82000000|
+ ' grub-core/Makefile.core.def \
+ include/grub/offsets.h
+
+ msg 'Unset all compiler FLAGS for U-Boot (omap3_beagle_xm_ab) build'
+ unset CFLAGS
+ unset CPPFLAGS
+ unset CXXFLAGS
+ unset LDFLAGS
+ unset MAKEFLAGS
+
+ cd "${srcdir}/grub-${_pkgver}-uboot_omap3_beagle_xm_ab/"
+
+ msg 'Run autogen.sh for U-Boot (omap3_beagle_xm_ab) build'
+ ./autogen.sh
+
+ msg 'Run ./configure for U-Boot (omap3_beagle_xm_ab) build'
+ ./configure \
+ --with-platform='uboot' \
+ --target='arm' \
+ --disable-efiemu \
+ --enable-mm-debug \
+ --enable-nls \
+ --enable-device-mapper \
+ --enable-cache-stats \
+ --enable-boot-time \
+ --enable-grub-mkfont \
+ --enable-grub-mount \
+ --prefix='/usr' \
+ --bindir='/usr/bin' \
+ --sbindir='/usr/bin' \
+ --mandir='/usr/share/man' \
+ --infodir='/usr/share/info' \
+ --datarootdir='/usr/share' \
+ --sysconfdir='/etc' \
+ --program-prefix='' \
+ --with-bootdir='/boot' \
+ --with-grubdir='grub' \
+ --disable-silent-rules \
+ --disable-werror
+
+ msg 'Run make for U-Boot (omap3_beagle_xm_ab) build'
+ make
+}
+
_build_grub-uboot_udoo() {
msg "Copy the source for building the U-Boot (udoo) part"
cp -r "${srcdir}/grub-${_pkgver}" "${srcdir}/grub-${_pkgver}-uboot_udoo"
@@ -1189,6 +1360,69 @@ package_grub-am335x_bone() {
install -D -m0644 "${srcdir}/grub.default" "${pkgdir}/etc/default/grub"
}
+package_grub-omap3_beagle() {
+ pkgdesc='GNU GRand Unified Bootloader (2) for BeagleBoard (omap3_beagle), (Parabola rebranded)'
+ provides+=('grub')
+ conflicts+=('grub')
+
+ cd "${srcdir}/grub-${_pkgver}-uboot_omap3_beagle/"
+
+ msg 'Package grub U-Boot stuff'
+
+ msg 'Run make install for U-Boot build'
+ make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install
+
+ msg 'Remove gdb debugging related files for U-Boot build'
+ rm -f "${pkgdir}/usr/lib/grub/arm-uboot"/*.module || true
+ rm -f "${pkgdir}/usr/lib/grub/arm-uboot"/*.image || true
+ rm -f "${pkgdir}/usr/lib/grub/arm-uboot"/{kernel.exec,gdb_grub,gmodule.pl} || true
+
+ msg 'Install /etc/default/grub (used by grub-mkconfig)'
+ install -D -m0644 "${srcdir}/grub.default" "${pkgdir}/etc/default/grub"
+}
+
+package_grub-omap3_beagle_xm() {
+ pkgdesc='GNU GRand Unified Bootloader (2) for BeagleBoard-xM (omap3_beagle_xm), (Parabola rebranded)'
+ provides+=('grub' 'grub-omap3_beagle')
+ conflicts+=('grub')
+
+ cd "${srcdir}/grub-${_pkgver}-uboot_omap3_beagle_xm/"
+
+ msg 'Package grub U-Boot stuff'
+
+ msg 'Run make install for U-Boot build'
+ make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install
+
+ msg 'Remove gdb debugging related files for U-Boot build'
+ rm -f "${pkgdir}/usr/lib/grub/arm-uboot"/*.module || true
+ rm -f "${pkgdir}/usr/lib/grub/arm-uboot"/*.image || true
+ rm -f "${pkgdir}/usr/lib/grub/arm-uboot"/{kernel.exec,gdb_grub,gmodule.pl} || true
+
+ msg 'Install /etc/default/grub (used by grub-mkconfig)'
+ install -D -m0644 "${srcdir}/grub.default" "${pkgdir}/etc/default/grub"
+}
+
+package_grub-omap3_beagle_xm_ab() {
+ pkgdesc='GNU GRand Unified Bootloader (2) for BeagleBoard-xM rev A/B (omap3_beagle_xm_ab), (Parabola rebranded)'
+ provides+=('grub' 'grub-omap3_beagle')
+ conflicts+=('grub')
+
+ cd "${srcdir}/grub-${_pkgver}-uboot_omap3_beagle_xm_ab/"
+
+ msg 'Package grub U-Boot stuff'
+
+ msg 'Run make install for U-Boot build'
+ make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install
+
+ msg 'Remove gdb debugging related files for U-Boot build'
+ rm -f "${pkgdir}/usr/lib/grub/arm-uboot"/*.module || true
+ rm -f "${pkgdir}/usr/lib/grub/arm-uboot"/*.image || true
+ rm -f "${pkgdir}/usr/lib/grub/arm-uboot"/{kernel.exec,gdb_grub,gmodule.pl} || true
+
+ msg 'Install /etc/default/grub (used by grub-mkconfig)'
+ install -D -m0644 "${srcdir}/grub.default" "${pkgdir}/etc/default/grub"
+}
+
package_grub-udoo() {
pkgdesc='GNU GRand Unified Bootloader (2) for UDOO (udoo), (Parabola rebranded)'
provides+=('grub')
diff --git a/libre/grub/grub-10_linux-20_linux_xen-detect-omap3_beagle-devicetree-file.patch b/libre/grub/grub-10_linux-20_linux_xen-detect-omap3_beagle-devicetree-file.patch
new file mode 100644
index 000000000..0e5bc382a
--- /dev/null
+++ b/libre/grub/grub-10_linux-20_linux_xen-detect-omap3_beagle-devicetree-file.patch
@@ -0,0 +1,58 @@
+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 18:43:26.911364096 -0300
+@@ -139,6 +139,14 @@
+ initrd ${rel_dirname}/${initrd}
+ EOF
+ fi
++ if test -d "${rel_dirname}/dtbs/${version}/omap3-beagle.dtb" ; 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 ${rel_dirname}/dtbs/${version}/omap3-beagle.dtb
++EOF
++ fi
+ sed "s/^/$submenu_indentation/" << EOF
+ }
+ EOF
+@@ -222,6 +230,10 @@
+ linux_root_device_thisversion=${GRUB_DEVICE}
+ fi
+
++ if test -d "${dirname}/dtbs/${version}/omap3-beagle.dtb" ; then
++ gettext_printf "Found device tree directory: %s\n" "${dirname}/dtbs/${version}/omap3-beagle.dtb" >&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 18:47:34.953427471 -0300
+@@ -132,6 +132,14 @@
+ module --nounzip ${rel_dirname}/${initrd}
+ EOF
+ fi
++ if test -d "${rel_dirname}/dtbs/${version}/omap3-beagle.dtb" ; 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 ${rel_dirname}/dtbs/${version}/omap3-beagle.dtb
++EOF
++ fi
+ sed "s/^/$submenu_indentation/" << EOF
+ }
+ EOF
+@@ -235,6 +243,10 @@
+ linux_root_device_thisversion=${GRUB_DEVICE}
+ fi
+
++ if test -d "${dirname}/dtbs/${version}/omap3-beagle.dtb" ; then
++ gettext_printf "Found device tree directory: %s\n" "${dirname}/dtbs/${version}/omap3-beagle.dtb" >&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}"
diff --git a/libre/grub/grub-10_linux-20_linux_xen-detect-omap3_beagle_xm-devicetree-file.patch b/libre/grub/grub-10_linux-20_linux_xen-detect-omap3_beagle_xm-devicetree-file.patch
new file mode 100644
index 000000000..387ebbcc5
--- /dev/null
+++ b/libre/grub/grub-10_linux-20_linux_xen-detect-omap3_beagle_xm-devicetree-file.patch
@@ -0,0 +1,58 @@
+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 18:43:26.911364096 -0300
+@@ -139,6 +139,14 @@
+ initrd ${rel_dirname}/${initrd}
+ EOF
+ fi
++ if test -d "${rel_dirname}/dtbs/${version}/omap3-beagle-xm.dtb" ; 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 ${rel_dirname}/dtbs/${version}/omap3-beagle-xm.dtb
++EOF
++ fi
+ sed "s/^/$submenu_indentation/" << EOF
+ }
+ EOF
+@@ -222,6 +230,10 @@
+ linux_root_device_thisversion=${GRUB_DEVICE}
+ fi
+
++ if test -d "${dirname}/dtbs/${version}/omap3-beagle-xm.dtb" ; then
++ gettext_printf "Found device tree directory: %s\n" "${dirname}/dtbs/${version}/omap3-beagle-xm.dtb" >&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 18:47:34.953427471 -0300
+@@ -132,6 +132,14 @@
+ module --nounzip ${rel_dirname}/${initrd}
+ EOF
+ fi
++ if test -d "${rel_dirname}/dtbs/${version}/omap3-beagle-xm.dtb" ; 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 ${rel_dirname}/dtbs/${version}/omap3-beagle-xm.dtb
++EOF
++ fi
+ sed "s/^/$submenu_indentation/" << EOF
+ }
+ EOF
+@@ -235,6 +243,10 @@
+ linux_root_device_thisversion=${GRUB_DEVICE}
+ fi
+
++ if test -d "${dirname}/dtbs/${version}/omap3-beagle-xm.dtb" ; then
++ gettext_printf "Found device tree directory: %s\n" "${dirname}/dtbs/${version}/omap3-beagle-xm.dtb" >&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}"
diff --git a/libre/grub/grub-10_linux-20_linux_xen-detect-omap3_beagle_xm_ab-devicetree-file.patch b/libre/grub/grub-10_linux-20_linux_xen-detect-omap3_beagle_xm_ab-devicetree-file.patch
new file mode 100644
index 000000000..31b59890e
--- /dev/null
+++ b/libre/grub/grub-10_linux-20_linux_xen-detect-omap3_beagle_xm_ab-devicetree-file.patch
@@ -0,0 +1,58 @@
+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 18:43:26.911364096 -0300
+@@ -139,6 +139,14 @@
+ initrd ${rel_dirname}/${initrd}
+ EOF
+ fi
++ if test -d "${rel_dirname}/dtbs/${version}/omap3-beagle-xm-ab.dtb" ; 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 ${rel_dirname}/dtbs/${version}/omap3-beagle-xm-ab.dtb
++EOF
++ fi
+ sed "s/^/$submenu_indentation/" << EOF
+ }
+ EOF
+@@ -222,6 +230,10 @@
+ linux_root_device_thisversion=${GRUB_DEVICE}
+ fi
+
++ if test -d "${dirname}/dtbs/${version}/omap3-beagle-xm-ab.dtb" ; then
++ gettext_printf "Found device tree directory: %s\n" "${dirname}/dtbs/${version}/omap3-beagle-xm-ab.dtb" >&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 18:47:34.953427471 -0300
+@@ -132,6 +132,14 @@
+ module --nounzip ${rel_dirname}/${initrd}
+ EOF
+ fi
++ if test -d "${rel_dirname}/dtbs/${version}/omap3-beagle-xm-ab.dtb" ; 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 ${rel_dirname}/dtbs/${version}/omap3-beagle-xm-ab.dtb
++EOF
++ fi
+ sed "s/^/$submenu_indentation/" << EOF
+ }
+ EOF
+@@ -235,6 +243,10 @@
+ linux_root_device_thisversion=${GRUB_DEVICE}
+ fi
+
++ if test -d "${dirname}/dtbs/${version}/omap3-beagle-xm-ab.dtb" ; then
++ gettext_printf "Found device tree directory: %s\n" "${dirname}/dtbs/${version}/omap3-beagle-xm-ab.dtb" >&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}"