summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdisk/grub2/BUILD2
-rwxr-xr-xdisk/grub2/CONFIGURE18
-rw-r--r--disk/grub2/HISTORY5
3 files changed, 23 insertions, 2 deletions
diff --git a/disk/grub2/BUILD b/disk/grub2/BUILD
index e1391d4cc6..d764bddd25 100755
--- a/disk/grub2/BUILD
+++ b/disk/grub2/BUILD
@@ -1,5 +1,5 @@
OPTS="${OPTS} ${GRUB2_OPTS} -disable-werror" &&
-OPTS="$OPTS --with-platform=${GRUB2_PLATFORM%/*}" &&
+OPTS="$OPTS --with-platform=${GRUB2_PLATFORM/*-} --target=${GRUB2_PLATFORM%-*}" &&
CFLAGS=${CFLAGS//-m64/} &&
CFLAGS=$(echo ${CFLAGS} | sed -r "s;-O([0-9]|fast);-Os;g") &&
LDFLAGS=${LDFLAGS//-s /} &&
diff --git a/disk/grub2/CONFIGURE b/disk/grub2/CONFIGURE
index 62fff9efbd..c4d1ac0feb 100755
--- a/disk/grub2/CONFIGURE
+++ b/disk/grub2/CONFIGURE
@@ -19,5 +19,21 @@ config_query_option GRUB2_OPTS 'build and install the efiemu runtimes?' y \
'--enable-efiemu' \
'--disable-efiemu' &&
+# Conversion to match {target-cpu}-{target-platform} ./configure syntax
+case ${GRUB2_PLATFORM} in
+ pc/i386) GRUB2_PLATFORM='i386-pc' ;;
+ efi/i386) GRUB2_PLATFORM='i386-efi' ;;
+ efi/x86_64) GRUB2_PLATFORM='x86_64-efi' ;;
+ *) ;; # Do nothing
+esac &&
+
config_query_list GRUB2_PLATFORM "Select platform:" \
- pc/i386 efi/i386 efi/x86_64
+ i386-pc i386-efi x86_64-efi &&
+
+case ${GRUB2_PLATFORM} in
+ *-efi) message "${MESSAGE_COLOR}EFI emulation runtime not supported on platform ${GRUB2_PLATFORM}. Disabled.${DEFAULT_COLOR}" &&
+ list_remove GRUB2_OPTS '--enable-efiemu' &&
+ list_add GRUB2_OPTS '--disable-efiemu'
+ ;;
+ *) ;; # Do nothing
+esac
diff --git a/disk/grub2/HISTORY b/disk/grub2/HISTORY
index 5600876ae8..077a044e2c 100644
--- a/disk/grub2/HISTORY
+++ b/disk/grub2/HISTORY
@@ -1,3 +1,8 @@
+2016-11-23 Eric Sandall <sandalle@sourcemage.org>
+ * CONFIGURE: Match {target-cpu}-{target-platform} ./configure syntax.
+ Disable efiemu on EFI platforms.
+ * BUILD: Specify target platform and target CPU.
+
2016-03-02 Remko van der Vossen <wich@sourcemage.org>
* PREPARE, DETAILS, DEPENDS, PRE_BUILD:
add beta version 2.02-beta3