From 2940603f53be5a0a93583fc1d6d66a88f289df4a Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 13 Feb 2020 17:31:53 +0000 Subject: [PATCH] Build pxestick using ipxe source --- .gitmodules | 4 ++++ scripts/pxestick.sh | 11 +++++++++-- tools/ipxe | 1 + 3 files changed, 14 insertions(+), 2 deletions(-) create mode 160000 tools/ipxe 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