by tomty89 » Wed Oct 02, 2019 9:29 am
I applied this to grub-git from AUR:
$this->bbcode_second_pass_code('', '
diff --git a/PKGBUILD b/PKGBUILD.new
index 65c67c0..01ef90e 100644
--- a/PKGBUILD
+++ b/PKGBUILD.new
@@ -12,15 +12,17 @@ _grub_emu_build="1"
[[ "${CARCH}" == "x86_64" ]] && _target_arch="x86_64"
[[ "${CARCH}" == "i686" ]] && _target_arch="i386"
-_build_platforms="i386-pc ${_target_arch}-efi"
-[[ "${CARCH}" == "x86_64" ]] && [[ "${_ia32_efi_in_arch_x64}" == "1" ]] && _build_platforms+=" i386-efi"
-[[ "${_grub_emu_build}" == "1" ]] && _build_platforms+=" ${_target_arch}-emu"
+#_build_platforms="i386-pc ${_target_arch}-efi"
+#[[ "${CARCH}" == "x86_64" ]] && [[ "${_ia32_efi_in_arch_x64}" == "1" ]] && _build_platforms+=" i386-efi"
+#[[ "${_grub_emu_build}" == "1" ]] && _build_platforms+=" ${_target_arch}-emu"
+
+_build_platforms="aarch64-efi"
pkgname="grub-git"
-pkgver=2.04.rc1.r19.g4e7b5bb3b
+pkgver=2.04.r17.gff3e91be9
pkgrel=1
pkgdesc="GNU GRand Unified Bootloader (2)"
-arch=('x86_64' 'i686')
+arch=('aarch64')
url="https://www.gnu.org/software/grub/"
license=('GPL3')
depends=('device-mapper' 'freetype2' 'fuse2' 'gettext')
@@ -113,15 +115,16 @@ build() {
# This results in an incorrect configuration and only by adding -O2
# to CPPFLAGS does this problem seem to be worked around.
../configure --with-platform="${_arch##*-}" \
- --target="${_arch%%-*}" \
+ --host="${_arch%%-*}-linux-gnu" \
+ --target="${_arch%%-*}-linux-gnu" \
--prefix="/usr" \
--sbindir="/usr/bin" \
--sysconfdir="/etc" \
--enable-boot-time \
--enable-cache-stats \
--enable-device-mapper \
- --enable-grub-mkfont \
- --enable-grub-mount \
+ --disable-grub-mkfont \
+ --disable-grub-mount \
--enable-mm-debug \
--enable-nls \
--disable-silent-rules \
')
and then
$this->bbcode_second_pass_code('', 'MAKEPKG_CONF=/home/tom/makepkg.conf makepkg -C -s')
worked. /home/tom/makepkg.conf is the copied from the ArchLinuxARM for rpi3.
P.S. This is for cross compiling on x86-64 btw. So get aarch64-linux-gnu-gcc. If you are building on the pi changes after the `arch=` line aren't even necessary.