40 lines
858 B
Bash
Executable file
40 lines
858 B
Bash
Executable file
#!/bin/sh
|
|
# Nico Schottelius, 2019-09-20, Seoul, Coffebean, 23:56
|
|
# Copying: GPLv3
|
|
|
|
if [ ! -e ipxe ]; then
|
|
git clone git://git.ipxe.org/ipxe.git
|
|
else
|
|
(cd ipxe; git pull)
|
|
fi
|
|
|
|
cd ipxe/src
|
|
|
|
sed -i -e 's/^#undef.*NET_PROTO_IPV6/#define NET_PROTO_IPV6/' \
|
|
-e 's/^#undef.*DOWNLOAD_PROTO_HTTPS/#define DOWNLOAD_PROTO_HTTPS/' \
|
|
-e 's,^//#define POWEROFF_CMD,#define POWEROFF_CMD,' \
|
|
-e 's,^//#define PING_CMD,#define PING_CMD,' \
|
|
-e 's,^//#define NTP_CMD,#define NTP_CMD,' config/general.h
|
|
|
|
set -x
|
|
set -e
|
|
|
|
mkdir -p output
|
|
|
|
make bin/undionly.kpxe
|
|
cp bin/undionly.kpxe output/
|
|
|
|
make bin/ipxe.usb
|
|
cp bin/ipxe.usb output/
|
|
|
|
make bin-x86_64-efi/ipxe.efi
|
|
cp bin-x86_64-efi/ipxe.efi output/
|
|
|
|
cat <<EOF
|
|
Outputs in
|
|
|
|
- PXE chain-loadable: undionly.kpxe (put on tftp server)
|
|
- USB loadable ipxe.usb (dd to usb stick)
|
|
- EFI loadable: ipxe.efi (put on vfat partition)
|
|
|
|
EOF
|