summaryrefslogtreecommitdiff
path: root/libre/grub
diff options
context:
space:
mode:
Diffstat (limited to 'libre/grub')
-rw-r--r--libre/grub/PKGBUILD159
1 files changed, 80 insertions, 79 deletions
diff --git a/libre/grub/PKGBUILD b/libre/grub/PKGBUILD
index 2ed63f33b..d0857b590 100644
--- a/libre/grub/PKGBUILD
+++ b/libre/grub/PKGBUILD
@@ -6,7 +6,7 @@
# Maintainer: Márcio Silva <coadde@parabola.nu>
## '1' to enable Xen support, '0' to disable
-_XEN='0' # disabled, due it's fail to build
+_XEN='1'
## '1' to enable IA32-EFI build in Arch x86_64, '0' to disable
_IA32_EFI_IN_ARCH_X64='1'
@@ -26,6 +26,7 @@ _UNIFONT_VER='9.0.06'
[[ "${CARCH}" = 'i686' ]] && _EFI_ARCH='i386'
[[ "${CARCH}" = 'x86_64' ]] && _XEN_ARCH='x86_64'
+[[ "${CARCH}" = 'i686' ]] && _XEN_ARCH='i386'
[[ "${CARCH}" = 'armv7h' ]] && _EMU_ARCH='arm'
[[ "${CARCH}" = 'x86_64' ]] && _EMU_ARCH='x86_64'
@@ -37,7 +38,7 @@ pkgname=('grub')
'grub-omap3_beagle_xm' 'grub-omap3_beagle_xm_ab')
pkgdesc='GNU GRand Unified Bootloader (2), (Parabola rebranded)'
pkgver='2.02'
-pkgrel='1.parabola1'
+pkgrel='1.parabola1.1'
epoch='2'
url='https://www.gnu.org/software/grub/'
arch=('x86_64' 'i686' 'armv7h')
@@ -50,9 +51,9 @@ depends=('sh' 'xz' 'gettext' 'device-mapper')
makedepends=('git' 'rsync' 'xz' 'freetype2' 'ttf-dejavu' 'python' 'autogen'
'texinfo' 'help2man' 'gettext' 'device-mapper' 'fuse')
-#if [[ "${CARCH}" = 'x86_64' ]] && [[ "${_XEN}" = '1' ]]; then
-# makedepends+=('xen')
-#fi
+if [[ "${CARCH}" = 'x86_64' ]] && [[ "${_XEN}" = '1' ]]; then
+ makedepends+=('xen')
+fi
if [[ "${_GRUB_EMU_BUILD}" = '1' ]]; then
makedepends+=('libusbx' 'sdl')
@@ -180,49 +181,49 @@ _build_grub-efi() {
make
}
-#_build_grub-xen() {
-# msg "Copy the source for building the ${_XEN_ARCH} XEN part"
-# cp -r "${srcdir}/grub-${pkgver}" "${srcdir}/grub-${pkgver}-xen-${_XEN_ARCH}"
-# cd "${srcdir}/grub-${pkgver}-xen-${_XEN_ARCH}"
-#
-# msg "Unset all compiler FLAGS for ${_XEN_ARCH} XEN build"
-# unset CFLAGS
-# unset CPPFLAGS
-# unset CXXFLAGS
-# unset LDFLAGS
-# unset MAKEFLAGS
-#
-# msg "Run autogen.sh for ${_XEN_ARCH} XEN build"
-# ./autogen.sh
-#
-# msg "Run ./configure for ${_XEN_ARCH} XEN build"
-# ./configure \
-# --with-platform='xen' \
-# --target="${_XEN_ARCH}" \
-# --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 ${_XEN_ARCH} XEN build"
-# make
-#}
+_build_grub-xen() {
+ msg "Copy the source for building the ${_XEN_ARCH} XEN part"
+ cp -r "${srcdir}/grub-${pkgver}" "${srcdir}/grub-${pkgver}-xen-${_XEN_ARCH}"
+ cd "${srcdir}/grub-${pkgver}-xen-${_XEN_ARCH}"
+
+ msg "Unset all compiler FLAGS for ${_XEN_ARCH} XEN build"
+ unset CFLAGS
+ unset CPPFLAGS
+ unset CXXFLAGS
+ unset LDFLAGS
+ unset MAKEFLAGS
+
+ msg "Run autogen.sh for ${_XEN_ARCH} XEN build"
+ ./autogen.sh
+
+ msg "Run ./configure for ${_XEN_ARCH} XEN build"
+ ./configure \
+ --with-platform='xen' \
+ --target="${_XEN_ARCH}" \
+ --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 ${_XEN_ARCH} XEN build"
+ make
+}
_build_grub-bios() {
msg 'Set ARCH dependent variables for BIOS build'
@@ -557,15 +558,15 @@ build() {
fi
if [[ "${CARCH}" = 'x86_64' ]] || [[ "${CARCH}" = 'i686' ]]; then
-# if [[ "${CARCH}" = 'x86_64' ]] && [[ "${_XEN}" = '1' ]]; then
-# msg "Build grub ${_XEN_ARCH} XEN stuff"
-# _build_grub-xen
-#
-# if [[ "${_IA32_XEN_IN_ARCH_X64}" = '1' ]]; then
-# msg 'Build grub i386 XEN stuff'
-# _XEN_ARCH='i386' _build_grub-xen
-# fi
-# fi
+ if [[ "${_XEN}" = '1' ]]; then
+ msg "Build grub ${_XEN_ARCH} XEN stuff"
+ _build_grub-xen
+
+ if [[ "${_IA32_XEN_IN_ARCH_X64}" = '1' ]]; then
+ msg 'Build grub i386 XEN stuff'
+ _XEN_ARCH='i386' _build_grub-xen
+ fi
+ fi
msg 'Build grub BIOS stuff'
_build_grub-bios
@@ -582,8 +583,8 @@ build() {
msg 'Build grub Multiboot stuff'
_build_grub-multiboot
-# msg "Build grub ${_XEN_ARCH} XEN stuff"
-# _build_grub-xen
+ msg "Build grub ${_XEN_ARCH} XEN stuff"
+ _build_grub-xen
elif [[ "${CARCH}" = 'armv7h' ]]; then
msg 'Build grub U-Boot stuff'
_build_grub-uboot
@@ -607,17 +608,17 @@ _package_grub-efi() {
rm -f "${pkgdir}/usr/lib/grub/${_EFI_ARCH}-efi"/{kernel.exec,gdb_grub,gmodule.pl} || true
}
-#_package_grub-xen() {
-# cd "${srcdir}/grub-${pkgver}-xen-${_XEN_ARCH}/"
-#
-# msg "Run make install for ${_XEN_ARCH} XEN build"
-# make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install
-#
-# msg "Remove gdb debugging related files for ${_XEN_ARCH} XEN build"
-# rm -f "${pkgdir}/usr/lib/grub/${_XEN_ARCH}-xen"/*.module || true
-# rm -f "${pkgdir}/usr/lib/grub/${_XEN_ARCH}-xen"/*.image || true
-# rm -f "${pkgdir}/usr/lib/grub/${_XEN_ARCH}-xen"/{kernel.exec,gdb_grub,gmodule.pl} || true
-#}
+_package_grub-xen() {
+ cd "${srcdir}/grub-${pkgver}-xen-${_XEN_ARCH}/"
+
+ msg "Run make install for ${_XEN_ARCH} XEN build"
+ make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install
+
+ msg "Remove gdb debugging related files for ${_XEN_ARCH} XEN build"
+ rm -f "${pkgdir}/usr/lib/grub/${_XEN_ARCH}-xen"/*.module || true
+ rm -f "${pkgdir}/usr/lib/grub/${_XEN_ARCH}-xen"/*.image || true
+ rm -f "${pkgdir}/usr/lib/grub/${_XEN_ARCH}-xen"/{kernel.exec,gdb_grub,gmodule.pl} || true
+}
_package_grub-bios() {
cd "${srcdir}/grub-${pkgver}-bios/"
@@ -732,15 +733,15 @@ package_grub() {
fi
if [[ "${CARCH}" = 'x86_64' ]] || [[ "${CARCH}" = 'i686' ]]; then
-# if [[ "${CARCH}" = 'x86_64' ]] && [[ "${_XEN}" = '1' ]]; then
-# msg "Package grub ${_XEN_ARCH} XEN stuff"
-# _package_grub-xen
-#
-# if [[ "${_IA32_XEN_IN_ARCH_X64}" = '1' ]]; then
-# msg 'Package grub i386 XEN stuff'
-# _XEN_ARCH='i386' _package_grub-xen
-# fi
-# fi
+ if [[ "${CARCH}" = 'x86_64' ]] && [[ "${_XEN}" = '1' ]]; then
+ msg "Package grub ${_XEN_ARCH} XEN stuff"
+ _package_grub-xen
+
+ if [[ "${_IA32_XEN_IN_ARCH_X64}" = '1' ]]; then
+ msg 'Package grub i386 XEN stuff'
+ _XEN_ARCH='i386' _package_grub-xen
+ fi
+ fi
msg 'Package grub BIOS stuff'
_package_grub-bios