Skip to content

Instantly share code, notes, and snippets.

@lucidhz
Forked from papamoose/proxmox_ipxe_update
Last active September 10, 2022 22:20
Show Gist options
  • Save lucidhz/aa2eee7749b0ea8e31d16d8517c68dd2 to your computer and use it in GitHub Desktop.
Save lucidhz/aa2eee7749b0ea8e31d16d8517c68dd2 to your computer and use it in GitHub Desktop.
#!/bin/bash
# iPXE build depends
set -e
apt-get install -y liblzma-dev git build-essential
# clone iPXE
[ ! -d ./ipxe ] && git clone http://git.ipxe.org/ipxe.git
cd ipxe/src
make clean
sed -i 's/#undef\tDOWNLOAD_PROTO_HTTPS/#define\tDOWNLOAD_PROTO_HTTPS/' config/general.h
for m in 10ec8139 8086100e virtio-net; do
make -j bin/${m}.rom
make -j bin-x86_64-efi/${m}.efirom
done
# Backup old roms first
for m in pxe-e1000 pxe-virtio pxe-rtl8139 efi-e1000e efi-virtio efi-10ec8139; do
test ! -f /usr/share/kvm/${m}.rom.bak && cp -v /usr/share/kvm/${m}.rom /usr/share/kvm/${m}.rom.bak;
done
echo e1000e
cp -v bin/8086100e.rom /usr/share/kvm/pxe-e1000.rom
cp -v bin-x86_64-efi/8086100e.efirom /usr/share/kvm/efi-e1000e.rom
echo virtio
cp -v bin/virtio-net.rom /usr/share/kvm/pxe-virtio.rom
cp -v bin-x86_64-efi/virtio-net.efirom /usr/share/kvm/efi-virtio.rom
echo rtl8139
cp -v bin/10ec8139.rom /usr/share/kvm/pxe-rtl8139.rom
cp -v bin-x86_64-efi/10ec8139.efirom /usr/share/kvm/efi-10ec8139.rom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment