Last change
on this file since e16e8f2 was
e16e8f2,
checked in by Edwin Eefting <edwin@datux.nl>, 3 years ago
|
bootstuff
|
-
Property mode set to
100755
|
File size:
908 bytes
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | |
---|
3 | set -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 | |
---|
8 | if [ $# -lt 2 ]; then |
---|
9 | cat <<EOF |
---|
10 | Usage: $0: <arch> <objdir> |
---|
11 | |
---|
12 | Build 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 | |
---|
17 | EOF |
---|
18 | exit 1 |
---|
19 | fi |
---|
20 | |
---|
21 | ARCH="$1" |
---|
22 | objdir="$(readlink -f $2)" |
---|
23 | |
---|
24 | if [ ! -e ../version.h ]; then |
---|
25 | printf "build-gnu-efi.sh: Cannot be run outside Syslinux object tree\n" |
---|
26 | pwd |
---|
27 | exit 1 |
---|
28 | fi |
---|
29 | |
---|
30 | ( |
---|
31 | cd ../.. |
---|
32 | git submodule update --init |
---|
33 | ) |
---|
34 | |
---|
35 | mkdir -p "$objdir/gnu-efi" |
---|
36 | cd "$objdir/gnu-efi" |
---|
37 | |
---|
38 | EFIDIR="$(readlink -f "$objdir/../gnu-efi/gnu-efi-3.0")" |
---|
39 | |
---|
40 | make SRCDIR="$EFIDIR" TOPDIR="$EFIDIR" -f "$EFIDIR/Makefile" ARCH=$ARCH |
---|
41 | make SRCDIR="$EFIDIR" TOPDIR="$EFIDIR" -f "$EFIDIR/Makefile" ARCH=$ARCH PREFIX="$objdir" install |
---|
42 | |
---|
43 | cd "$objdir/efi" |
---|
Note: See
TracBrowser
for help on using the repository browser.