aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGene Cumm <gene.cumm@gmail.com>2014-01-12 15:20:38 -0500
committerGene Cumm <gene.cumm@gmail.com>2014-01-12 15:20:38 -0500
commit937991d598efbe3e2764343d2dc73ff35866f56b (patch)
tree4502c213c0fdd909078601289db9c99c449f2d86
parent73d08a58f59f746e810bf30e0d767f656ccd3333 (diff)
downloadsyslinux-gnuefi-script-for-wferi-test.tar.gz
syslinux-gnuefi-script-for-wferi-test.tar.xz
syslinux-gnuefi-script-for-wferi-test.zip
efi: make build slightly more verbose and inlinegnuefi-script-for-wferi-test
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
-rwxr-xr-xefi/build-gnu-efi.sh12
-rwxr-xr-xefi/check-gnu-efi.sh2
-rw-r--r--mk/efi.mk15
3 files changed, 22 insertions, 7 deletions
diff --git a/efi/build-gnu-efi.sh b/efi/build-gnu-efi.sh
index 707c4c89..2736fc38 100755
--- a/efi/build-gnu-efi.sh
+++ b/efi/build-gnu-efi.sh
@@ -36,17 +36,19 @@ fi
srcdir=`$REALPATH $2`
objdir=`$REALPATH $3`
-do_build()(
+do_build() (
+ echo Building gnu-efi for $ARCH on $HOSTARCH from $srcdir to $objdir
cd $srcdir
- git submodule init
- git submodule update
+ git submodule update --init
cd gnu-efi/gnu-efi-3.0/
+ echo Building gnu-efi: make
make ARCH=$ARCH HOSTARCH=$HOSTARCH
+ echo Built gnu-efi, installing
make ARCH=$ARCH HOSTARCH=$HOSTARCH PREFIX=$objdir install
- make ARCH=$ARCH HOSTARCH=$HOSTARCH clean )
+ make ARCH=$ARCH HOSTARCH=$HOSTARCH clean
+)
-# (do_build)
do_build
diff --git a/efi/check-gnu-efi.sh b/efi/check-gnu-efi.sh
index d4ecb511..2879e2c9 100755
--- a/efi/check-gnu-efi.sh
+++ b/efi/check-gnu-efi.sh
@@ -36,7 +36,7 @@ if [ ! -f $objdir/include/efi/$ARCH/efibind.h ]; then
export MAKEFLAGS=
build=$srcdir/efi/build-gnu-efi.sh
- $build $ARCH $srcdir $objdir &> /dev/null
+ $build $ARCH $srcdir $objdir > /dev/null
if [ $? -ne 0 ]; then
printf "Failed to build gnu-efi. "
printf "Execute the following command for full details: \n\n"
diff --git a/mk/efi.mk b/mk/efi.mk
index 3080530d..dd5fda0d 100644
--- a/mk/efi.mk
+++ b/mk/efi.mk
@@ -45,9 +45,22 @@ SFLAGS = $(GCCOPT) $(GCCWARN) $(SARCHOPT) \
-nostdinc -iwithprefix include \
-I$(com32)/libutil/include -I$(com32)/include -I$(com32)/include/sys $(GPLINCLUDE)
+ifeq ($(EFI_SUBARCH),ia32)
+ EFIELFARCH=elf32-i386
+else
+ ifeq ($(EFI_SUBARCH),x86_64)
+ EFIELFARCH=elf64-x86-64
+ else
+ EFIELFARCH=BADARCH
+ endif
+endif
+
lib/libefi.a:
@echo Building gnu-efi for $(EFI_SUBARCH)
- $(topdir)/efi/check-gnu-efi.sh $(EFI_SUBARCH) $(topdir) $(objdir)
+ $(shell $(topdir)/efi/check-gnu-efi.sh $(EFI_SUBARCH) $(topdir) $(objdir) )
+ objdump -a $(objdir)/lib/libefi.a|grep 'file format'|head -n 1|grep $(EFIELFARCH)
+
+libefi.a: lib/libefi.a
%.o : %.c # Cancel previous rule