• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2
3set -e
4
5# Initialise the gnu-efi submodule and ensure the source is up-to-date.
6# Then build and install it for the given architecture.
7
8if [ $# -lt 2 ]; then
9cat <<EOF
10Usage: $0: <arch> <objdir>
11
12Build the <arch> gnu-efi libs and header files and install in <objdir>.
13
14  <arch>   - A gnu-efi \$ARCH argument, i.e. ia32, x86_64
15  <objdir> - The Syslinux object directory
16
17EOF
18    exit 1
19fi
20
21ARCH="$1"
22objdir=$(readlink -f "$2")
23
24(
25	cd ../..
26	git submodule update --init
27)
28
29if [ -d "$objdir/gnu-efi" ];then
30	cd "$objdir/gnu-efi"
31	EFIDIR="$(readlink -f "$objdir/../gnu-efi/gnu-efi-3.0")"
32	make SRCDIR="$EFIDIR" TOPDIR="$EFIDIR" -f "$EFIDIR/Makefile" ARCH=$ARCH clean
33fi
34
35cd "$objdir/efi"
36