diff --git a/.gitmodules b/.gitmodules index 760fe34..8ccf72b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -90,3 +90,7 @@ path = apps/firmware-smmstore url = https://github.com/system76/firmware-smmstore.git branch = master +[submodule "tools/ipxe"] + path = tools/ipxe + url = https://github.com/ipxe/ipxe.git + branch = master diff --git a/scripts/pxestick.sh b/scripts/pxestick.sh index 1258e1f..bdb72ac 100755 --- a/scripts/pxestick.sh +++ b/scripts/pxestick.sh @@ -4,9 +4,11 @@ set -e rm -rf build/pxestick mkdir -p build/pxestick -cd build/pxestick -wget -O ipxe.efi http://boot.ipxe.org/ipxe.efi +make -C tools/ipxe/src bin-x86_64-efi/axge.efi +cp tools/ipxe/src/bin-x86_64-efi/axge.efi build/pxestick/ipxe.efi + +cd build/pxestick dd if=/dev/zero of=usb.img.partial bs=512 count=2048 mkfs.vfat usb.img.partial @@ -14,3 +16,8 @@ mmd -i usb.img.partial efi mmd -i usb.img.partial efi/boot mcopy -i usb.img.partial ipxe.efi ::efi/boot/bootx64.efi mv usb.img.partial usb.img + +if [ -b "$1" ] +then + sudo popsicle -u usb.img "$1" +fi diff --git a/tools/ipxe b/tools/ipxe new file mode 160000 index 0000000..18dc73d --- /dev/null +++ b/tools/ipxe @@ -0,0 +1 @@ +Subproject commit 18dc73d27edb55ebe9cb13c58d59af3da3bd374b