Merge pull request #434 from gmkurtzer/4.3.0_PXE_update

4.3.0 pxe update
This commit is contained in:
Gregory M. Kurtzer
2022-06-02 20:51:15 -07:00
committed by GitHub
11 changed files with 51 additions and 26 deletions

View File

@@ -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

View File

@@ -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 }}
{{- end }}

View File

@@ -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}}

View File

@@ -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)

38
ipxe-update.sh Executable file
View File

@@ -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"

View File

@@ -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";
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
staticfiles/x86_64.efi Normal file

Binary file not shown.

BIN
staticfiles/x86_64.kpxe Normal file

Binary file not shown.