42 lines
1.9 KiB
Bash
Executable File
42 lines
1.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
|
|
# By this point, the dependencies are installed, so we just need to download
|
|
# IPXE and build our ISO
|
|
|
|
git clone git://git.ipxe.org/ipxe.git
|
|
cd ipxe
|
|
|
|
# Do we want to specify a specific commit to lock in??
|
|
git checkout HEAD
|
|
cd src
|
|
|
|
# Enable required IPXE features
|
|
sed -i 's/^\/\/\#define\ DOWNLOAD_PROTO_HTTPS/\#define\ DOWNLOAD_PROTO_HTTPS/g' config/general.h
|
|
sed -i 's/^\/\/\#define\ NSLOOKUP_CMD/\#define\ NSLOOKUP_CMD/g' config/general.h
|
|
sed -i 's/^\/\/\#define\ TIME_CMD/\#define\ TIME_CMD/g' config/general.h
|
|
sed -i 's/^\/\/\#define\ DIGEST_CMD/\#define\ DIGEST_CMD/g' config/general.h
|
|
sed -i 's/^\/\/\#define\ REBOOT_CMD/\#define\ REBOOT_CMD/g' config/general.h
|
|
sed -i 's/^\/\/\#define\ POWEROFF_CMD/\#define\ POWEROFF_CMD/g' config/general.h
|
|
sed -i 's/^\/\/\#define\ IMAGE_TRUST_CMD/\#define\ IMAGE_TRUST_CMD/g' config/general.h
|
|
sed -i 's/^\/\/\#define\ NTP_CMD/\#define\ NTP_CMD/g' config/general.h
|
|
sed -i 's/^\/\/\#define\ CERT_CMD/\#define\ CERT_CMD/g' config/general.h
|
|
|
|
sed -i 's/^\#undef\ DOWNLOAD_PROTO_HTTPS/\#define\ DOWNLOAD_PROTO_HTTPS/g' config/general.h
|
|
sed -i 's/^\#undef\ NSLOOKUP_CMD/\#define\ NSLOOKUP_CMD/g' config/general.h
|
|
sed -i 's/^\#undef\ TIME_CMD/\#define\ TIME_CMD/g' config/general.h
|
|
sed -i 's/^\#undef\ DIGEST_CMD/\#define\ DIGEST_CMD/g' config/general.h
|
|
sed -i 's/^\#undef\ REBOOT_CMD/\#define\ REBOOT_CMD/g' config/general.h
|
|
sed -i 's/^\#undef\ POWEROFF_CMD/\#define\ POWEROFF_CMD/g' config/general.h
|
|
sed -i 's/^\#undef\ IMAGE_TRUST_CMD/\#define\ IMAGE_TRUST_CMD/g' config/general.h
|
|
sed -i 's/^\#undef\ NTP_CMD/\#define\ NTP_CMD/g' config/general.h
|
|
sed -i 's/^\#undef\ CERT_CMD/\#define\ CERT_CMD/g' config/general.h
|
|
|
|
|
|
IPXE_EMBED_FILE_LOC="$(realpath $(dirname $(realpath $0))/../embed.ipxe)"
|
|
|
|
make bin/ipxe.iso EMBED="${IPXE_EMBED_FILE_LOC}" \
|
|
CERT="${IPXE_SIGNING_CERT},${IPXE_SIGNING_CA_CRT}" \
|
|
TRUST="${IPXE_SIGNING_CA_CRT}"
|
|
|