diff --git a/ipxe-update.sh b/ipxe-update.sh index d7f62d32..4b598cc9 100755 --- a/ipxe-update.sh +++ b/ipxe-update.sh @@ -1,4 +1,7 @@ #!/bin/sh +# Builds ipxe binaries from github sources or given tarball + +VERSION=v1.21.1 ARCH=x86_64 @@ -11,11 +14,17 @@ EFI_output=`pwd`/staticfiles/${ARCH}.efi set -xe -TMPDIR=`mktemp -d` -cd "$TMPDIR" +TMPDIR=`mktemp -d /tmp/ipxebuild.XXXXXX` +if [ -f "$1" ] ; then + WRKDIR=`pwd` + cd "$TMPDIR" + tar xzf $WRKDIR/$1 +else + cd "$TMPDIR" + git clone --depth 1 --branch $VERSION https://github.com/ipxe/ipxe.git +fi -git clone https://github.com/ipxe/ipxe.git -cd ipxe/src +cd ipxe*/src sed -i.bak \ -e 's,//\(#define.*CONSOLE_SERIAL.*\),\1,' \ diff --git a/staticfiles/README.md b/staticfiles/README.md new file mode 100644 index 00000000..8e0e8b34 --- /dev/null +++ b/staticfiles/README.md @@ -0,0 +1,2 @@ +# iPXE binaries +Binaries can be rebuild with the `ixpe-update.sh` script.