buildipxe.sh (fogproject-1.5.7) | : | buildipxe.sh (fogproject-1.5.8) | ||
---|---|---|---|---|
#!/bin/bash | #!/bin/bash | |||
if [[ -r $1 ]]; then | if [[ -r $1 ]]; then | |||
BUILDOPTS="TRUST=$1 CERT=$1" | BUILDOPTS="CERT=$1 TRUST=$1" | |||
elif [[ -r /opt/fog/snapins/ssl/CA/.fogCA.pem ]]; then | elif [[ -r /opt/fog/snapins/ssl/CA/.fogCA.pem ]]; then | |||
BUILDOPTS="TRUST=/opt/fog/snapins/ssl/CA/.fogCA.pem CERT=/opt/fog/snapins/ssl/ CA/.fogCA.pem" | BUILDOPTS="CERT=/opt/fog/snapins/ssl/CA/.fogCA.pem TRUST=/opt/fog/snapins/ssl/ CA/.fogCA.pem" | |||
fi | fi | |||
IPXEGIT="https://git.ipxe.org/ipxe.git" | IPXEGIT="https://github.com/ipxe/ipxe" | |||
# Change directory to base ipxe files | # Change directory to base ipxe files | |||
SCRIPT=$(readlink -f "$BASH_SOURCE") | SCRIPT=$(readlink -f "$BASH_SOURCE") | |||
FOGDIR=$(dirname $(dirname $(dirname "$SCRIPT") ) ) | FOGDIR=$(dirname $(dirname $(dirname "$SCRIPT") ) ) | |||
BASE=$(dirname "$FOGDIR") | BASE=$(dirname "$FOGDIR") | |||
if [[ -d ${BASE}/ipxe ]]; then | if [[ -d ${BASE}/ipxe ]]; then | |||
cd ${BASE}/ipxe | cd ${BASE}/ipxe | |||
git clean -fd | git clean -fd | |||
git reset --hard | git reset --hard | |||
skipping to change at line 34 | skipping to change at line 34 | |||
# Get current header and script from fogproject repo | # Get current header and script from fogproject repo | |||
echo "Copy (overwrite) iPXE headers and scripts..." | echo "Copy (overwrite) iPXE headers and scripts..." | |||
cp ${FOGDIR}/src/ipxe/src/ipxescript . | cp ${FOGDIR}/src/ipxe/src/ipxescript . | |||
cp ${FOGDIR}/src/ipxe/src/ipxescript10sec . | cp ${FOGDIR}/src/ipxe/src/ipxescript10sec . | |||
cp ${FOGDIR}/src/ipxe/src/config/general.h config/ | cp ${FOGDIR}/src/ipxe/src/config/general.h config/ | |||
cp ${FOGDIR}/src/ipxe/src/config/settings.h config/ | cp ${FOGDIR}/src/ipxe/src/config/settings.h config/ | |||
cp ${FOGDIR}/src/ipxe/src/config/console.h config/ | cp ${FOGDIR}/src/ipxe/src/config/console.h config/ | |||
# Build the files | # Build the files | |||
make EMBED=ipxescript ${BUILDOPTS} bin/ipxe.iso bin/{undionly,ipxe,intel,realtek }.{,k,kk}pxe bin/ipxe.lkrn bin/ipxe.usb | make EMBED=ipxescript bin/ipxe.iso bin/{undionly,ipxe,intel,realtek}.{,k,kk}pxe bin/ipxe.lkrn bin/ipxe.usb ${BUILDOPTS} | |||
# Copy files to repo location as required | # Copy files to repo location as required | |||
cp bin/ipxe.iso bin/{undionly,ipxe,intel,realtek}.{,k,kk}pxe bin/ipxe.lkrn bin/i pxe.usb ${FOGDIR}/packages/tftp/ | cp bin/ipxe.iso bin/{undionly,ipxe,intel,realtek}.{,k,kk}pxe bin/ipxe.lkrn bin/i pxe.usb ${FOGDIR}/packages/tftp/ | |||
cp bin/ipxe.lkrn ${FOGDIR}/packages/tftp/ipxe.krn | cp bin/ipxe.lkrn ${FOGDIR}/packages/tftp/ipxe.krn | |||
# Build with 10 second delay | # Build with 10 second delay | |||
make EMBED=ipxescript10sec ${BUILDOPTS} bin/ipxe.iso bin/{undionly,ipxe,intel,re altek}.{,k,kk}pxe bin/ipxe.lkrn bin/ipxe.usb | make EMBED=ipxescript10sec bin/ipxe.iso bin/{undionly,ipxe,intel,realtek}.{,k,kk }pxe bin/ipxe.lkrn bin/ipxe.usb ${BUILDOPTS} | |||
# Copy files to repo location as required | # Copy files to repo location as required | |||
cp bin/ipxe.iso bin/{undionly,ipxe,intel,realtek}.{,k,kk}pxe bin/ipxe.lkrn bin/i pxe.usb ${FOGDIR}/packages/tftp/10secdelay/ | cp bin/ipxe.iso bin/{undionly,ipxe,intel,realtek}.{,k,kk}pxe bin/ipxe.lkrn bin/i pxe.usb ${FOGDIR}/packages/tftp/10secdelay/ | |||
cp bin/ipxe.lkrn ${FOGDIR}/packages/tftp/10secdelay/ipxe.krn | cp bin/ipxe.lkrn ${FOGDIR}/packages/tftp/10secdelay/ipxe.krn | |||
# Change to the efi layout | # Change to the efi layout | |||
if [[ -d ${BASE}/ipxe-efi ]]; then | if [[ -d ${BASE}/ipxe-efi ]]; then | |||
cd ${BASE}/ipxe-efi/ | cd ${BASE}/ipxe-efi/ | |||
git clean -fd | git clean -fd | |||
git reset --hard | git reset --hard | |||
skipping to change at line 68 | skipping to change at line 68 | |||
# Get current header and script from fogproject repo | # Get current header and script from fogproject repo | |||
echo "Copy (overwrite) iPXE headers and scripts..." | echo "Copy (overwrite) iPXE headers and scripts..." | |||
cp ${FOGDIR}/src/ipxe/src-efi/ipxescript . | cp ${FOGDIR}/src/ipxe/src-efi/ipxescript . | |||
cp ${FOGDIR}/src/ipxe/src-efi/ipxescript10sec . | cp ${FOGDIR}/src/ipxe/src-efi/ipxescript10sec . | |||
cp ${FOGDIR}/src/ipxe/src-efi/config/general.h config/ | cp ${FOGDIR}/src/ipxe/src-efi/config/general.h config/ | |||
cp ${FOGDIR}/src/ipxe/src-efi/config/settings.h config/ | cp ${FOGDIR}/src/ipxe/src-efi/config/settings.h config/ | |||
cp ${FOGDIR}/src/ipxe/src-efi/config/console.h config/ | cp ${FOGDIR}/src/ipxe/src-efi/config/console.h config/ | |||
# Build the files | # Build the files | |||
make EMBED=ipxescript ${BUILDOPTS} bin-{i386,x86_64}-efi/{snp{,only},ipxe,intel, | make EMBED=ipxescript bin-{i386,x86_64}-efi/{snp{,only},ipxe,intel,realtek,ncm-- | |||
realtek}.efi | ecm--axge}.efi ${BUILDOPTS} | |||
[[ "x$armsupport" == "x1" ]] && make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 | ||||
EMBED=ipxescript bin-arm64-efi/{snp{,only},ipxe,intel,realtek,ncm--ecm--axge}.e | ||||
fi ${BUILDOPTS} | ||||
# Copy the files to upload | # Copy the files to upload | |||
cp bin-i386-efi/{snp{,only},ipxe,intel,realtek}.efi ${FOGDIR}/packages/tftp/i386 | [[ "x$armsupport" == "x1" ]] && cp bin-arm64-efi/{snp{,only},ipxe,intel,realtek, | |||
-efi/ | ncm--ecm--axge}.efi ${FOGDIR}/packages/tftp/arm64-efi/ | |||
cp bin-x86_64-efi/{snp{,only},ipxe,intel,realtek}.efi ${FOGDIR}/packages/tftp/ | cp bin-i386-efi/{snp{,only},ipxe,intel,realtek,ncm--ecm--axge}.efi ${FOGDIR}/pac | |||
kages/tftp/i386-efi/ | ||||
cp bin-x86_64-efi/{snp{,only},ipxe,intel,realtek,ncm--ecm--axge}.efi ${FOGDIR}/p | ||||
ackages/tftp/ | ||||
# Build with 10 second delay | # Build with 10 second delay | |||
make EMBED=ipxescript10sec ${BUILDOPTS} bin-{i386,x86_64}-efi/{snp{,only},ipxe,i | make EMBED=ipxescript10sec bin-{i386,x86_64}-efi/{snp{,only},ipxe,intel,realtek, | |||
ntel,realtek}.efi | ncm--ecm--axge}.efi ${BUILDOPTS} | |||
[[ "x$armsupport" == "x1" ]] && make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 | ||||
EMBED=ipxescript10sec bin-arm64-efi/{snp{,only},ipxe,intel,realtek,ncm--ecm--ax | ||||
ge}.efi ${BUILDOPTS} | ||||
# Copy the files to upload | # Copy the files to upload | |||
cp bin-i386-efi/{snp{,only},ipxe,intel,realtek}.efi ${FOGDIR}/packages/tftp/10se | [[ "x$armsupport" == "x1" ]] && cp bin-arm64-efi/{snp{,only},ipxe,intel,realtek, | |||
cdelay/i386-efi/ | ncm--ecm--axge}.efi ${FOGDIR}/packages/tftp/10secdelay/arm64-efi/ | |||
cp bin-x86_64-efi/{snp{,only},ipxe,intel,realtek}.efi ${FOGDIR}/packages/tftp/10 | cp bin-i386-efi/{snp{,only},ipxe,intel,realtek,ncm--ecm--axge}.efi ${FOGDIR}/pac | |||
secdelay/ | kages/tftp/10secdelay/i386-efi/ | |||
cp bin-x86_64-efi/{snp{,only},ipxe,intel,realtek,ncm--ecm--axge}.efi ${FOGDIR}/p | ||||
ackages/tftp/10secdelay/ | ||||
End of changes. 9 change blocks. | ||||
12 lines changed or deleted | 21 lines changed or added |