mirror of
https://github.com/netbootxyz/netboot.xyz.git
synced 2026-01-23 02:34:26 +00:00
Restructuring ipxe compiles, adding some error checks
This commit is contained in:
parent
524b376851
commit
cf75295172
1 changed files with 25 additions and 6 deletions
|
|
@ -1,6 +1,17 @@
|
|||
#!/bin/bash
|
||||
# prep release for upload to production container
|
||||
|
||||
function error_check()
|
||||
{
|
||||
|
||||
if [ $? -eq 1 ]
|
||||
then
|
||||
echo "Error encountered... failing..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
# make ipxe directory to store ipxe disks
|
||||
mkdir -p build/ipxe
|
||||
|
||||
|
|
@ -16,22 +27,30 @@ cd ipxe_build/src
|
|||
# get current iPXE hash
|
||||
IPXE_HASH=`git log -n 1 --pretty=format:"%H"`
|
||||
|
||||
# generate iPXE disks
|
||||
# generate standard iPXE disks
|
||||
for ipxe_config in `ls ../../ipxe/disks/`
|
||||
do
|
||||
make EMBED=../../ipxe/disks/$ipxe_config
|
||||
make bin/ipxe.kpxe EMBED=../../ipxe/disks/$ipxe_config
|
||||
# EFI doesn't like COMBOOT so turn it off before compile
|
||||
sed -i s/#define IMAGE_COMBOOT/#undef IMAGE_COMBOOT/g config/local/general.h
|
||||
make bin-x86_64-efi/ipxe.efi EMBED=../../ipxe/disks/$ipxe_config
|
||||
make bin/ipxe.dsk bin/ipxe.iso bin/ipxe.lkrn bin/ipxe.usb bin/ipxe.kpxe bin/undionly.kpxe EMBED=../../ipxe/disks/$ipxe_config
|
||||
error_check
|
||||
mv bin/ipxe.dsk ../../build/ipxe/$ipxe_config.dsk
|
||||
mv bin/ipxe.iso ../../build/ipxe/$ipxe_config.iso
|
||||
mv bin/ipxe.lkrn ../../build/ipxe/$ipxe_config.lkrn
|
||||
mv bin/ipxe.usb ../../build/ipxe/$ipxe_config.usb
|
||||
mv bin/ipxe.kpxe ../../build/ipxe/$ipxe_config.kpxe
|
||||
mv bin/undionly.kpxe ../../build/ipxe/$ipxe_config-undionly.kpxe
|
||||
done
|
||||
|
||||
# generate EFI iPXE disks
|
||||
for ipxe_config in `ls ../../ipxe/disks/`
|
||||
do
|
||||
# Remove general.h options for testing, doesn't like COMBOOT
|
||||
rm config/local/general.h
|
||||
make bin-x86_64-efi/ipxe.efi EMBED=../../ipxe/disks/$ipxe_config
|
||||
error_check
|
||||
mv bin/ipxe.efi ../../build/ipxe/$ipxe_config.efi
|
||||
done
|
||||
|
||||
# return to root
|
||||
cd ../..
|
||||
|
||||
# generate header for sha256-checksums file
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue