summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2015-10-14 09:54:34 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2015-10-14 09:55:53 -0300
commit36dd2c2fd417ecfd2b7b66eb6516e955528cc4f3 (patch)
tree681ac9c12b343334fd997bc0335d09922f028615 /libre
parentc42c5841c80e2181fcb12724784fbdae0324652b (diff)
downloadabslibre-36dd2c2fd417ecfd2b7b66eb6516e955528cc4f3.tar.gz
abslibre-36dd2c2fd417ecfd2b7b66eb6516e955528cc4f3.tar.bz2
abslibre-36dd2c2fd417ecfd2b7b66eb6516e955528cc4f3.zip
grub: fix device tree patch
Diffstat (limited to 'libre')
-rw-r--r--libre/grub/PKGBUILD12
-rw-r--r--libre/grub/grub-10_linux-20_linux_xen-detect-am335x_bone+am335x_boneblack-devicetree-file.patch90
-rw-r--r--libre/grub/grub-10_linux-20_linux_xen-detect-devicetree-dir.patch58
3 files changed, 97 insertions, 63 deletions
diff --git a/libre/grub/PKGBUILD b/libre/grub/PKGBUILD
index e7a5806b5..18b88f5c1 100644
--- a/libre/grub/PKGBUILD
+++ b/libre/grub/PKGBUILD
@@ -417,7 +417,7 @@ source=("grub-${_pkgver}::git+git://git.sv.gnu.org/grub.git#tag=${_GRUB_GIT_TAG}
'grub-add-GRUB_COLOR_variables.patch'
'60_memtest86+'
'grub.default'
- 'grub-10_linux-20_linux_xen-detect-devicetree-am335x_bone+am335x_boneblack.patch'
+ 'grub-10_linux-20_linux_xen-detect-am335x_bone+am335x_boneblack-devicetree-file.patch'
'grub-10_linux-20_linux_xen-rebrand-free-distros.patch')
md5sums=('SKIP'
@@ -428,7 +428,7 @@ md5sums=('SKIP'
'e506ae4a9f9f7d1b765febfa84e10d48'
'be55eabc102f2c60b38ed35c203686d6'
'8d1dd54ae4a1b550c097e056892ce953'
- ''
+ '36b2a7531b615d5b8658a709b8104148'
'e0133ad89ab3014210d4599f396a556e')
validpgpkeys=('95D2E9AB8740D8046387FD151A09227B1F435A33') #Paul Hardy
@@ -859,9 +859,11 @@ _build_grub-uboot_am335x-bone() {
msg 'Patch to detect am335x-bone device tree blob file (dtb)'
patch -Np1 -i "${srcdir}/grub-10_linux-20_linux_xen-detect-devicetree-dir.patch"
- msg 'change memory to am335x-bone support'
- sed -i 's|0x08000000|0x82000000|
- ' file
+ msg 'change memory adapted for am335x-bone 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 (am335x-bone) build'
unset CFLAGS
diff --git a/libre/grub/grub-10_linux-20_linux_xen-detect-am335x_bone+am335x_boneblack-devicetree-file.patch b/libre/grub/grub-10_linux-20_linux_xen-detect-am335x_bone+am335x_boneblack-devicetree-file.patch
new file mode 100644
index 000000000..bc5375e9e
--- /dev/null
+++ b/libre/grub/grub-10_linux-20_linux_xen-detect-am335x_bone+am335x_boneblack-devicetree-file.patch
@@ -0,0 +1,90 @@
+diff -Nur a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
+--- a/util/grub.d/10_linux.in 2015-10-14 09:21:23.009705345 -0300
++++ b/util/grub.d/10_linux.in 2015-10-14 09:49:42.279762099 -0300
+@@ -139,6 +139,24 @@
+ initrd ${rel_dirname}/${initrd}
+ EOF
+ fi
++ if [ "$(cat /sys/devices/platform/bone_capemgr/baseboard/board-name)" = 'A335BONE' ]; then
++ if test -f "${rel_dirname}/dtbs/${version}/am335x-bone.dtb" ; then
++ # TRANSLATORS: Device tree path isn't identifier. Should be translated.
++ message="$(gettext_printf "Loading devices tree file ...")"
++ sed "s/^/$submenu_indentation/" << EOF
++ echo '$(echo "$message" | grub_quote)'
++ devicetree ${rel_dirname}/dtbs/${version}/am335x-bone.dtb
++EOF
++ fi
++ elif [ "$(cat /sys/devices/platform/bone_capemgr/baseboard/board-name)" = 'A335BNLT' ]; then
++ if test -f "${rel_dirname}/dtbs/${version}/am335x-boneblack.dtb" ; then
++ # TRANSLATORS: Device tree path isn't identifier. Should be translated.
++ message="$(gettext_printf "Loading devices tree file ...")"
++ sed "s/^/$submenu_indentation/" << EOF
++ echo '$(echo "$message" | grub_quote)'
++ devicetree ${rel_dirname}/dtbs/${version}/am335x-boneblack.dtb
++EOF
++ fi
+ sed "s/^/$submenu_indentation/" << EOF
+ }
+ EOF
+@@ -222,6 +240,16 @@
+ linux_root_device_thisversion=${GRUB_DEVICE}
+ fi
+
++ if [ "$(cat /sys/devices/platform/bone_capemgr/baseboard/board-name)" = 'A335BONE' ]; then
++ if test -f "${dirname}/dtbs/${version}/am335x-bone.dtb" ; then
++ gettext_printf "Found device tree file: %s\n" "${dirname}/dtbs/${version}/am335x-bone.dtb" >&2
++ fi
++ elif [ "$(cat /sys/devices/platform/bone_capemgr/baseboard/board-name)" = 'A335BNLT' ]; then
++ if test -f "${dirname}/dtbs/${version}/am335x-boneblack.dtb" ; then
++ gettext_printf "Found device tree file: %s\n" "${dirname}/dtbs/${version}/am335x-boneblack.dtb" >&2
++ fi
++ 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-10-14 09:21:23.009705345 -0300
++++ b/util/grub.d/20_linux_xen.in 2015-10-14 09:49:53.814856968 -0300
+@@ -132,6 +132,24 @@
+ module --nounzip ${rel_dirname}/${initrd}
+ EOF
+ fi
++ if [ "$(cat /sys/devices/platform/bone_capemgr/baseboard/board-name)" = 'A335BONE' ]; then
++ if test -f "${rel_dirname}/dtbs/${version}/am335x-bone.dtb" ; then
++ # TRANSLATORS: Device tree path isn't identifier. Should be translated.
++ message="$(gettext_printf "Loading devices tree file ...")"
++ sed "s/^/$submenu_indentation/" << EOF
++ echo '$(echo "$message" | grub_quote)'
++ devicetree ${rel_dirname}/dtbs/${version}/am335x-bone.dtb
++EOF
++ fi
++ elif [ "$(cat /sys/devices/platform/bone_capemgr/baseboard/board-name)" = 'A335BNLT' ]; then
++ if test -f "${rel_dirname}/dtbs/${version}/am335x-boneblack.dtb" ; then
++ # TRANSLATORS: Device tree path isn't identifier. Should be translated.
++ message="$(gettext_printf "Loading devices tree file ...")"
++ sed "s/^/$submenu_indentation/" << EOF
++ echo '$(echo "$message" | grub_quote)'
++ devicetree ${rel_dirname}/dtbs/${version}/am335x-boneblack.dtb
++EOF
++ fi
+ sed "s/^/$submenu_indentation/" << EOF
+ }
+ EOF
+@@ -235,6 +253,16 @@
+ linux_root_device_thisversion=${GRUB_DEVICE}
+ fi
+
++ if [ "$(cat /sys/devices/platform/bone_capemgr/baseboard/board-name)" = 'A335BONE' ]; then
++ if test -f "${dirname}/dtbs/${version}/am335x-bone.dtb" ; then
++ gettext_printf "Found device tree file: %s\n" "${dirname}/dtbs/${version}/am335x-bone.dtb" >&2
++ fi
++ elif [ "$(cat /sys/devices/platform/bone_capemgr/baseboard/board-name)" = 'A335BNLT' ]; then
++ if test -f "${dirname}/dtbs/${version}/am335x-boneblack.dtb" ; then
++ gettext_printf "Found device tree file: %s\n" "${dirname}/dtbs/${version}/am335x-boneblack.dtb" >&2
++ fi
++ 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-devicetree-dir.patch b/libre/grub/grub-10_linux-20_linux_xen-detect-devicetree-dir.patch
deleted file mode 100644
index 6eeced53d..000000000
--- a/libre/grub/grub-10_linux-20_linux_xen-detect-devicetree-dir.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-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}" ; 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}
-+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}" ; then
-+ gettext_printf "Found device tree directory: %s\n" "${dirname}/dtbs/${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 18:47:34.953427471 -0300
-@@ -132,6 +132,14 @@
- module --nounzip ${rel_dirname}/${initrd}
- EOF
- fi
-+ if test -d "${rel_dirname}/dtbs/${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 ${rel_dirname}/dtbs/${version}
-+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}" ; then
-+ gettext_printf "Found device tree directory: %s\n" "${dirname}/dtbs/${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}"