From 302e594f9e6e932c87d5592493aa756cb97f8d49 Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Mon, 9 Mar 2020 10:14:27 +0300 Subject: grub: add KISS patches --- core/grub/build | 18 +++++++++++++++++- core/grub/depends | 1 - 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/grub/build b/core/grub/build index d0cee821..c937d263 100755 --- a/core/grub/build +++ b/core/grub/build @@ -1,6 +1,21 @@ #!/bin/sh -e -# Grub is built in a function so the script argument needs to be stored. +# Grub expects Python but it isn't actually needed. Give +# it something fake so that configure passes. +export PYTHON=/bin/true + +# Disable the post-python mv calls as a means of disabling +# the Python tooling. The /bin/true above will create a +# blank file, this prevents the blank file from overwriting +# the existing one. +sed -i 's/mv $@.new $@/:/g' grub/Makefile.in + +# Strip '-march' from 'CFLAGS' as per advice from upstream. +# Fixes build fails on specific hardware. +CFLAGS=$(printf %s "$CFLAGS" | sed 's/-march=[^ ]*//g') + +# Grub is built in a function so the script argument +# needs to be stored. pkg_dir=$1 build_grub() ( @@ -12,6 +27,7 @@ build_grub() ( --sbindir=/usr/bin \ --sysconfdir=/etc \ --disable-werror \ + --disable-nls \ --disable-grub-mkfont \ --disable-grub-mount \ "$@" diff --git a/core/grub/depends b/core/grub/depends index 58223007..b37ce94a 100644 --- a/core/grub/depends +++ b/core/grub/depends @@ -2,5 +2,4 @@ binutils make bison make flex make linux-headers make -python make xz -- cgit v1.2.3