diff --git a/Makefile b/Makefile index 10d5f1ea..1dd5bb68 100644 --- a/Makefile +++ b/Makefile @@ -162,7 +162,6 @@ files: all install -d -m 0755 $(DESTDIR)$(WWPROVISIONDIR) install -d -m 0755 $(DESTDIR)$(WWOVERLAYDIR)/wwinit/$(WWCLIENTDIR) install -d -m 0755 $(DESTDIR)$(WWCONFIGDIR)/ipxe - install -d -m 0755 $(DESTDIR)$(WWTFTPDIR)/ipxe/ install -d -m 0755 $(DESTDIR)$(BASHCOMPDIR) install -d -m 0755 $(DESTDIR)$(MANDIR)/man1 install -d -m 0755 $(DESTDIR)$(WWDOCDIR) @@ -187,9 +186,8 @@ files: all cp bash_completion.d/warewulf $(DESTDIR)$(BASHCOMPDIR) cp man_pages/* $(DESTDIR)$(MANDIR)/man1/ install -m 0644 staticfiles/arm64.efi $(DESTDIR)$(WWDATADIR)/ipxe - install -m 0644 staticfiles/i386.efi $(DESTDIR)$(WWDATADIR)/ipxe - install -m 0644 staticfiles/i386.kpxe $(DESTDIR)$(WWDATADIR)/ipxe - install -m 0644 staticfiles/x86.efi $(DESTDIR)$(WWDATADIR)/ipxe + install -m 0644 staticfiles/x86_64.efi $(DESTDIR)$(WWDATADIR)/ipxe + install -m 0644 staticfiles/x86_64.kpxe $(DESTDIR)$(WWDATADIR)/ipxe init: systemctl daemon-reload diff --git a/etc/examples/static-dhcpd.conf.ww b/etc/examples/static-dhcpd.conf.ww index f1d3d3d0..a45815df 100644 --- a/etc/examples/static-dhcpd.conf.ww +++ b/etc/examples/static-dhcpd.conf.ww @@ -21,16 +21,10 @@ if exists user-class and option user-class = "iPXE" { } else { if option architecture-type = 00:0B { filename "/warewulf/arm64.efi"; - } elsif option architecture-type = 00:0A { - filename "/warewulf/arm32.efi"; } elsif option architecture-type = 00:09 { - filename "/warewulf/x86.efi"; - } elsif option architecture-type = 00:07 { - filename "/warewulf/x86.efi"; - } elsif option architecture-type = 00:06 { - filename "/warewulf/i386.efi"; + filename "/warewulf/x86_64.efi"; } elsif option architecture-type = 00:00 { - filename "/warewulf/i386.kpxe"; + filename "/warewulf/x86_64.kpxe"; } } @@ -46,4 +40,4 @@ host {{$nodes.Id.Get}} { } {{end}} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/etc/ipxe/default.ipxe b/etc/ipxe/default.ipxe index dc0fef07..279f2295 100644 --- a/etc/ipxe/default.ipxe +++ b/etc/ipxe/default.ipxe @@ -43,17 +43,17 @@ echo echo Image extract not supported in this iPXE, using standard initrd mode echo Downloading Container Image: -initrd --name container ${uri_base}&stage=container&compress=gz || goto reboot +initrd --name container ${uri_base}&stage=container || goto reboot echo Downloading System Overlay: -initrd --name system ${uri_base}&stage=system&compress=gz || goto reboot +initrd --name system ${uri_base}&stage=system || goto reboot echo Downloading Runtime Overlay: -initrd --name runtime ${uri_base}&stage=runtime&compress=gz || goto reboot +initrd --name runtime ${uri_base}&stage=runtime || goto reboot {{if ne .KernelOverride "" -}} echo Downloading Kernel Modules: -initrd --name kmods ${uri_base}&stage=kmods&compress=gz || goto reboot +initrd --name kmods ${uri_base}&stage=kmods || goto reboot {{- end}} diff --git a/internal/pkg/configure/tftp.go b/internal/pkg/configure/tftp.go index 710cd61f..b00f5928 100644 --- a/internal/pkg/configure/tftp.go +++ b/internal/pkg/configure/tftp.go @@ -27,7 +27,7 @@ func TFTP() error { } fmt.Printf("Writing PXE files to: %s\n", tftpdir) - for _, f := range [4]string{"x86.efi", "i386.efi", "i386.kpxe", "arm64.efi"} { + for _, f := range [4]string{"x86_64.efi", "x86_64.kpxe", "arm64.efi"} { err = util.SafeCopyFile(path.Join(buildconfig.DATADIR(), "warewulf", "ipxe", f), path.Join(tftpdir, f)) if err != nil { wwlog.Printf(wwlog.ERROR, "%s\n", err) diff --git a/ipxe-update.sh b/ipxe-update.sh new file mode 100755 index 00000000..22b750a1 --- /dev/null +++ b/ipxe-update.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +ARCH=x86_64 + +PCBIOS=bin-${ARCH}-pcbios/undionly.kpxe +EFI=bin-${ARCH}-efi/ipxe.efi + +PCBIOS_output=`pwd`/staticfiles/${ARCH}.kpxe +EFI_output=`pwd`/staticfiles/${ARCH}.efi + +set -xe + + +TMPDIR=`mktemp -d` +cd "$TMPDIR" + +git clone https://github.com/ipxe/ipxe.git +cd ipxe/src + +sed -i.bak \ + -e 's,//\(#define.*CONSOLE_SERIAL.*\),\1,' \ + -e 's,//\(#define.*CONSOLE_FRAMEBUFFER.*\),\1,' \ + config/console.h + +sed -i.bak \ + -e 's,//\(#define.*IMAGE_ZLIB.*\),\1,' \ + -e 's,//\(#define.*IMAGE_GZIP.*\),\1,' \ + config/general.h + +make -j 8 $PCBIOS +make -j 8 $EFI + + +cp $PCBIOS $PCBIOS_output +cp $EFI $EFI_output + + +rm -rf "$TMPDIR" diff --git a/overlays/host/etc/dhcp/dhcpd.conf.ww b/overlays/host/etc/dhcp/dhcpd.conf.ww index 51675c78..82b96cec 100644 --- a/overlays/host/etc/dhcp/dhcpd.conf.ww +++ b/overlays/host/etc/dhcp/dhcpd.conf.ww @@ -22,17 +22,12 @@ if exists user-class and option user-class = "iPXE" { } else { if option architecture-type = 00:0B { filename "/warewulf/arm64.efi"; -# } elsif option architecture-type = 00:0A { -# Still need to add this to staticfiles -# filename "/warewulf/arm32.efi"; } elsif option architecture-type = 00:09 { - filename "/warewulf/x86.efi"; + filename "/warewulf/x86_64.efi"; } elsif option architecture-type = 00:07 { - filename "/warewulf/x86.efi"; - } elsif option architecture-type = 00:06 { - filename "/warewulf/i386.efi"; + filename "/warewulf/x86_64.efi"; } elsif option architecture-type = 00:00 { - filename "/warewulf/i386.kpxe"; + filename "/warewulf/x86_64.kpxe"; } } diff --git a/staticfiles/i386.efi b/staticfiles/i386.efi deleted file mode 100644 index cd6535ba..00000000 Binary files a/staticfiles/i386.efi and /dev/null differ diff --git a/staticfiles/i386.kpxe b/staticfiles/i386.kpxe deleted file mode 100644 index 86fd875d..00000000 Binary files a/staticfiles/i386.kpxe and /dev/null differ diff --git a/staticfiles/x86.efi b/staticfiles/x86.efi deleted file mode 100644 index b3d69baa..00000000 Binary files a/staticfiles/x86.efi and /dev/null differ diff --git a/staticfiles/x86_64.efi b/staticfiles/x86_64.efi new file mode 100644 index 00000000..cbe74ed7 Binary files /dev/null and b/staticfiles/x86_64.efi differ diff --git a/staticfiles/x86_64.kpxe b/staticfiles/x86_64.kpxe new file mode 100644 index 00000000..bb33a275 Binary files /dev/null and b/staticfiles/x86_64.kpxe differ