summaryrefslogtreecommitdiff
path: root/libre/grub/PKGBUILD
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-10-16 17:41:20 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-10-16 17:41:20 -0300
commitea0fa15b0a60539f29f0785fed9581c004e67115 (patch)
treecfba9c6111cabec07a458ef24617140af660b902 /libre/grub/PKGBUILD
parentb9c11b8528a906f60545b4713fa6ab9a91fe6d54 (diff)
downloadabslibre-ea0fa15b0a60539f29f0785fed9581c004e67115.tar.gz
abslibre-ea0fa15b0a60539f29f0785fed9581c004e67115.tar.bz2
abslibre-ea0fa15b0a60539f29f0785fed9581c004e67115.zip
grub: add grub-udoo
Diffstat (limited to 'libre/grub/PKGBUILD')
-rw-r--r--libre/grub/PKGBUILD82
1 files changed, 80 insertions, 2 deletions
diff --git a/libre/grub/PKGBUILD b/libre/grub/PKGBUILD
index fa15c1ee5..3060f30f5 100644
--- a/libre/grub/PKGBUILD
+++ b/libre/grub/PKGBUILD
@@ -38,6 +38,7 @@
# 0xa0800000 - imx27lite
# 0xc0000014 - davinci[ea20]
# 0xc0700000 - davinci[ea20]
+# 0x12000000 - udoo_dl udoo_quad
# alt
# am335x_igep0033
@@ -315,7 +316,6 @@
# tt01
# twister
# tx25
-# udoo udoo_quad
# uniphier-ph1-ld4-ref
# uniphier-ph1-pro4-ref
# uniphier-ph1-sld8-ref
@@ -368,7 +368,7 @@ _UNIFONT_VER='6.3.20131217'
pkgbase='grub'
pkgname=('grub')
-[[ $CARCH = armv7h ]] && pkgname+=('grub-am335x_bone')
+[[ $CARCH = armv7h ]] && pkgname+=('grub-am335x_bone' 'grub-udoo')
pkgdesc='GNU GRand Unified Bootloader (2), (Parabola rebranded)'
pkgver='2.02.beta2'
pkgrel='5.parabola8'
@@ -418,6 +418,7 @@ 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-udoo-devicetree-file.patch'
'grub-10_linux-20_linux_xen-rebrand-free-distros.patch')
md5sums=('SKIP'
@@ -429,6 +430,7 @@ md5sums=('SKIP'
'be55eabc102f2c60b38ed35c203686d6'
'8d1dd54ae4a1b550c097e056892ce953'
'a46695e19b588a53b8bac9e3b3c56096'
+ '95b721dfe74f42df52b7ae94e0e7c067'
'e0133ad89ab3014210d4599f396a556e')
validpgpkeys=('95D2E9AB8740D8046387FD151A09227B1F435A33') #Paul Hardy
@@ -906,6 +908,61 @@ _build_grub-uboot_am335x-bone() {
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"
+ cd "${srcdir}/grub-${_pkgver}-uboot_udoo/"
+
+ msg 'Patch to detect udoo device tree blob file (dtb)'
+ patch -Np1 -i "${srcdir}/grub-10_linux-20_linux_xen-detect-udoo-devicetree-file.patch"
+
+ msg 'change memory adapted for udoo support'
+ sed -i '\|arm_uboot_ldflags| s|0x08000000|0x12000000|
+ \|GRUB_KERNEL_ARM_UBOOT_LINK_ADDR| s|0x08000000|0x12000000|
+ ' grub-core/Makefile.core.def \
+ include/grub/offsets.h
+
+ msg 'Unset all compiler FLAGS for U-Boot (udoo) build'
+ unset CFLAGS
+ unset CPPFLAGS
+ unset CXXFLAGS
+ unset LDFLAGS
+ unset MAKEFLAGS
+
+ cd "${srcdir}/grub-${_pkgver}-uboot_udoo/"
+
+ msg 'Run autogen.sh for U-Boot (udoo) build'
+ ./autogen.sh
+
+ msg 'Run ./configure for U-Boot (udoo) 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 (udoo) build'
+ make
+}
+
build() {
cd "${srcdir}/grub-${_pkgver}/"
@@ -1131,3 +1188,24 @@ package_grub-am335x_bone() {
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')
+ conflicts+=('grub')
+
+ cd "${srcdir}/grub-${_pkgver}-uboot_udoo/"
+
+ 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"
+}