diff options
author | CoprDistGit <infra@openeuler.org> | 2025-09-30 08:46:39 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2025-09-30 08:46:39 +0000 |
commit | 5a5245fd641e12f204db32f27424ce9f6cf0f2a7 (patch) | |
tree | 2a64f18834d2740cb7922cec55b1727b52f1502e | |
parent | e744c1b12896e8d62fff833eab46ce79ae759b44 (diff) |
automatic import of ipxeopeneuler24.03_LTS_SP2
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | 0001-build-customize-configuration.patch | 9 | ||||
-rw-r--r-- | 0002-Use-spec-compliant-timeouts.patch | 98 | ||||
-rw-r--r-- | ipxe.spec | 320 | ||||
-rw-r--r-- | sources | 1 |
5 files changed, 429 insertions, 0 deletions
@@ -0,0 +1 @@ +/ipxe-20240119-gitde8a0821.tar.xz diff --git a/0001-build-customize-configuration.patch b/0001-build-customize-configuration.patch new file mode 100644 index 0000000..8a9a3ea --- /dev/null +++ b/0001-build-customize-configuration.patch @@ -0,0 +1,9 @@ +diff -rupN ipxe-20190125-git36a4c85f/src/config/local/general.h ipxe-20190125-git36a4c85f.new/src/config/local/general.h +--- ipxe-20190125-git36a4c85f/src/config/local/general.h 1970-01-01 01:00:00.000000000 +0100 ++++ ipxe-20190125-git36a4c85f.new/src/config/local/general.h 2019-02-01 16:40:42.725293033 +0000 +@@ -0,0 +1,5 @@ ++/* Enable IPv6. */ ++#define NET_PROTO_IPV6 ++/* Enable HTTPS */ ++#define DOWNLOAD_PROTO_HTTPS ++#define DOWNLOAD_PROTO_NFS diff --git a/0002-Use-spec-compliant-timeouts.patch b/0002-Use-spec-compliant-timeouts.patch new file mode 100644 index 0000000..f1a4d50 --- /dev/null +++ b/0002-Use-spec-compliant-timeouts.patch @@ -0,0 +1,98 @@ +From bc252caa54fcfb2e9fd0ddb01ebaa50192e85c38 Mon Sep 17 00:00:00 2001 +From: Alex Williamson <alex.williamson@redhat.com> +Date: Wed, 21 Oct 2015 11:18:40 +0200 +Subject: Use spec compliant timeouts + +Message-id: <20150428212403.31299.29391.stgit@gimli.home> +Patchwork-id: 64951 +O-Subject: [RHEL7.2 ipxe PATCH 2/2] [dhcp][RHEL-only] Use spec compliant timeouts +Bugzilla: 1196352 +RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com> +RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com> +RH-Acked-by: Laszlo Ersek <lersek@redhat.com> + +Use local config to override iPXE's abbreviated DHCP timeouts using +the recommended values for spec compliance. This matches the state +of RHEL6 gPXE DHCP timeouts after bz968474 + bz1206042 + +Signed-off-by: Alex Williamson <alex.williamson@redhat.com> +Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com> +(cherry picked from commit 7038f41c0131d263de5165b416500009acdbf550) +--- + src/config/local/.gitignore | 1 - + src/config/local/dhcp.h | 62 +++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 62 insertions(+), 1 deletion(-) + delete mode 100644 src/config/local/.gitignore + create mode 100644 src/config/local/dhcp.h + +diff --git a/src/config/local/dhcp.h b/src/config/local/dhcp.h +new file mode 100644 +index 0000000..83df5b8 +--- /dev/null ++++ b/src/config/local/dhcp.h +@@ -0,0 +1,62 @@ ++/* ++ * Downstream localization ++ * ++ * For RHEL, use spec compliant DHCP timeouts (bz1196352) ++ */ ++ ++/* ++ * PXE spec defines timeouts of 4, 8, 16, 32 seconds ++ */ ++#undef DHCP_DISC_START_TIMEOUT_SEC ++#define DHCP_DISC_START_TIMEOUT_SEC 4 ++#undef DHCP_DISC_END_TIMEOUT_SEC ++#define DHCP_DISC_END_TIMEOUT_SEC 32 ++ ++/* ++ * Elapsed time used for early break waiting for ProxyDHCP, this therefore ++ * needs to be less than the cumulative time for the first 2 timeouts. ++ */ ++#undef DHCP_DISC_PROXY_TIMEOUT_SEC ++#define DHCP_DISC_PROXY_TIMEOUT_SEC 11 ++ ++/* ++ * Approximate PXE spec requirement using minimum timeout (0.25s) for ++ * timeouts of 0.25, 0.5, 1, 2, 4 ++ */ ++#undef DHCP_REQ_START_TIMEOUT_SEC ++#define DHCP_REQ_START_TIMEOUT_SEC 0 ++#undef DHCP_REQ_END_TIMEOUT_SEC ++#define DHCP_REQ_END_TIMEOUT_SEC 4 ++ ++/* ++ * Same as normal request phase, except non-fatal, so we extend the timer ++ * to 8 and set the early timeout to an elapsed time value that causes a ++ * break after the 4 second timeout. At least that's what we'd like to do, ++ * but our timer operates at 18Hz and has a minimum resolution of 7 cycles. ++ * Therefore the above quarter-second starting timeout looks more like ++ * 0.39s, 0.78s, 1.56s, 3.11s, 6.22s. If we had an ideal timer, we could ++ * set the timeout to 7s (0.25 + 0.5 + 1 + 2 + 4 = 7.75s) and exit without ++ * failure when the timer rolls over to 8s. With our timer, we get 0.39 + ++ * 0.78 + 1.56 + 3.11 = 5.84s. The next timeout would take us to 12.06s ++ * (+6.22). That seems like a long time to wait for an optional reply, so ++ * we reduce the early timeout to 5s to exit before the timer exceeds the ++ * max and causes a failure. This still adds one extra cycle vs the ++ * upstream defaults. ++ */ ++#undef DHCP_PROXY_START_TIMEOUT_SEC ++#define DHCP_PROXY_START_TIMEOUT_SEC 0 ++#undef DHCP_PROXY_END_TIMEOUT_SEC ++#define DHCP_PROXY_END_TIMEOUT_SEC 8 ++#undef DHCP_REQ_PROXY_TIMEOUT_SEC ++#define DHCP_REQ_PROXY_TIMEOUT_SEC 5 ++ ++/* ++ * Same as above, retry each server using our approximation of standard ++ * timeouts and exit before timer induced failure. ++ */ ++#undef PXEBS_START_TIMEOUT_SEC ++#define PXEBS_START_TIMEOUT_SEC 0 ++#undef PXEBS_END_TIMEOUT_SEC ++#define PXEBS_END_TIMEOUT_SEC 8 ++#undef PXEBS_MAX_TIMEOUT_SEC ++#define PXEBS_MAX_TIMEOUT_SEC 5 +-- +1.8.3.1 + diff --git a/ipxe.spec b/ipxe.spec new file mode 100644 index 0000000..5748abf --- /dev/null +++ b/ipxe.spec @@ -0,0 +1,320 @@ +# ROMS we want for QEMU with format PCIID:QEMUNAME +%global qemuroms \\\ + 8086100e:e1000 \\\ + 10ec8139:rtl8139 \\\ + 1af41000:virtio \\\ + 808610d3:e1000e + +%if 0%{?fedora} +# Fedora specific roms +%global qemuroms %{qemuroms} \\\ + 10222000:pcnet \\\ + 10ec8029:ne2k_pci \\\ + 80861209:eepro100 \\\ + 15ad07b0:vmxnet3 +%endif + +# Enable cross-architecture building on all supported hosts +%global buildarches x86_64 aarch64 + +# debugging firmwares does not go the same way as a normal program. +# moreover, all architectures providing debuginfo for a single noarch +# package is currently clashing in koji, so don't bother. +%global debug_package %{nil} + +# Upstream don't do "releases" :-( So we're going to use the date +# as the version, and a GIT hash as the release. Generate new GIT +# snapshots using the folowing commands: +# +# $ hash=`git log -1 --format='%h'` +# $ date=`git log -1 --format='%cd' --date=short | tr -d -` +# $ git archive --prefix ipxe-${date}-git${hash}/ ${hash} | xz -7e > ipxe-${date}-git${hash}.tar.xz +# +# And then change these two: + +%global hash de8a0821 +%global date 20240119 + +Name: ipxe +Version: %{date} +Release: 2.git%{hash}%{?dist} +Summary: A network boot loader + +License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND (GPL-2.0-only OR MPL-1.1) AND GPL-2.0-or-later AND GPL-2.0-or-later WITH UBDL-exception AND ISC AND MIT +URL: http://ipxe.org/ + +Source0: %{name}-%{version}-git%{hash}.tar.xz + +# Enable IPv6 for qemu's config +# Sent upstream: http://lists.ipxe.org/pipermail/ipxe-devel/2015-November/004494.html +Patch0001: 0001-build-customize-configuration.patch +Patch0002: 0002-Use-spec-compliant-timeouts.patch + +%ifarch %{buildarches} +BuildRequires: perl-interpreter +BuildRequires: perl-Getopt-Long +%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9 +BuildRequires: perl-FindBin +BuildRequires: perl-lib +%endif +BuildRequires: syslinux +BuildRequires: mtools +BuildRequires: xorriso +BuildRequires: edk2-devel +BuildRequires: xz-devel +BuildRequires: gcc +BuildRequires: binutils-devel +BuildRequires: make + +Obsoletes: gpxe <= 1.0.1 +%endif + +# Define architecture-specific boot image packages +%package bootimg-x86_64 +Summary: x86_64 Network boot loader images in bootable USB, CD, floppy and GRUB formats +BuildArch: noarch +Provides: %{name}-bootimgs = %{version}-%{release} +Obsoletes: %{name}-bootimgs < 20200823-9.git4bd064de +Obsoletes: gpxe-bootimgs <= 1.0.1 + +%package bootimg-aarch64 +Summary: AArch64 Network boot loader images in bootable USB and GRUB formats +BuildArch: noarch + +%package roms +Summary: Network boot loader roms in .rom format +Requires: %{name}-roms-qemu = %{version}-%{release} +BuildArch: noarch +Obsoletes: gpxe-roms <= 1.0.1 + +%package roms-qemu +Summary: Network boot loader roms supported by QEMU, .rom format +BuildArch: noarch +Obsoletes: gpxe-roms-qemu <= 1.0.1 + +%description bootimg-x86_64 +iPXE is an open source network bootloader. It provides a direct +replacement for proprietary PXE ROMs, with many extra features such as +DNS, HTTP, iSCSI, etc. + +This package contains the iPXE x86_64 boot images in USB, CD, floppy, and PXE +UNDI formats. + +%description bootimg-aarch64 +iPXE is an open source network bootloader. It provides a direct +replacement for proprietary PXE ROMs, with many extra features such as +DNS, HTTP, iSCSI, etc. + +This package contains the iPXE AArch64 boot images in USB and GRUB formats. + +%description roms +iPXE is an open source network bootloader. It provides a direct +replacement for proprietary PXE ROMs, with many extra features such as +DNS, HTTP, iSCSI, etc. + +This package contains the iPXE roms in .rom format. + +%description roms-qemu +iPXE is an open source network bootloader. It provides a direct +replacement for proprietary PXE ROMs, with many extra features such as +DNS, HTTP, iSCSI, etc. + +This package contains the iPXE ROMs for devices emulated by QEMU, in +.rom format. + +%description +iPXE is an open source network bootloader. It provides a direct +replacement for proprietary PXE ROMs, with many extra features such as +DNS, HTTP, iSCSI, etc. + +%prep +%setup -q -n %{name}-%{version}-git%{hash} +%autopatch -p1 +# ath9k drivers are too big for an Option ROM, and ipxe devs say it doesn't +# make sense anyways +# http://lists.ipxe.org/pipermail/ipxe-devel/2012-March/001290.html +rm -rf src/drivers/net/ath/ath9k + +%build +cd src + +make_ipxe() { + make %{?_smp_mflags} \ + NO_WERROR=1 V=1 \ + "$@" +} + +# Define build targets based on host architecture (QEMU-style cross-building) +%ifarch x86_64 +build_targets="bin-i386-efi/ipxe.efi bin-x86_64-efi/ipxe.efi bin-x86_64-efi/snponly.efi" +cross_targets="bin-arm64-efi/snponly.efi bin-arm64-efi/ipxe.efi" +%endif + +%ifarch aarch64 +build_targets="bin-arm64-efi/snponly.efi bin-arm64-efi/ipxe.efi" +cross_targets="bin-i386-efi/ipxe.efi bin-x86_64-efi/ipxe.efi bin-x86_64-efi/snponly.efi" +%endif + +# Build native architecture targets +echo "Building native architecture targets..." +make_ipxe $build_targets + +# Build cross-architecture targets +echo "Building cross-architecture targets..." +make_ipxe $cross_targets + +# Build x86_64 specific traditional boot images (needed on all architectures) +echo "Building x86_64 traditional boot images..." +make_ipxe ISOLINUX_BIN=/usr/share/syslinux/isolinux.bin \ + bin/undionly.kpxe bin/ipxe.{dsk,iso,usb,lkrn} \ + allroms + +# Build x86_64 QEMU ROMs (needed on all architectures) +echo "Building x86_64 QEMU ROMs..." +mkdir bin-combined +for romstr in %{qemuroms}; do + rom=$(echo "$romstr" | cut -d ":" -f 1) + + make_ipxe CONFIG=qemu bin/${rom}.rom + make_ipxe CONFIG=qemu bin-x86_64-efi/${rom}.efidrv + vid="0x${rom%%????}" + did="0x${rom#????}" + EfiRom -f "$vid" -i "$did" --pci23 \ + -ec bin-x86_64-efi/${rom}.efidrv \ + -o bin-combined/${rom}.eficrom + util/catrom.pl \ + bin/${rom}.rom \ + bin-combined/${rom}.eficrom \ + > bin-combined/${rom}.rom + EfiRom -d bin-combined/${rom}.rom + # truncate to at least 256KiB + truncate -s \>256K bin-combined/${rom}.rom + # verify rom fits in 256KiB + test $(stat -c '%s' bin-combined/${rom}.rom) -le $((256 * 1024)) +done + +%install +# Create architecture-specific directory structure +mkdir -p %{buildroot}/%{_datadir}/%{name}/x86_64/ +mkdir -p %{buildroot}/%{_datadir}/%{name}/aarch64/ +mkdir -p %{buildroot}/%{_datadir}/%{name}.efi/x86_64/ + +# Install x86_64 traditional boot images (built on all architectures) +echo "Installing x86_64 boot images..." +pushd src/bin/ +cp -a undionly.kpxe ipxe.{iso,usb,dsk,lkrn} %{buildroot}/%{_datadir}/%{name}/x86_64/ +popd + +# Install x86_64 EFI images +echo "Installing x86_64 EFI images..." +cp -a src/bin-i386-efi/ipxe.efi %{buildroot}/%{_datadir}/%{name}/x86_64/ipxe-i386.efi +cp -a src/bin-x86_64-efi/ipxe.efi %{buildroot}/%{_datadir}/%{name}/x86_64/ipxe-x86_64.efi +cp -a src/bin-x86_64-efi/snponly.efi %{buildroot}/%{_datadir}/%{name}/x86_64/ipxe-snponly-x86_64.efi + +# Install aarch64 EFI images +echo "Installing aarch64 EFI images..." +cp -a src/bin-arm64-efi/snponly.efi %{buildroot}/%{_datadir}/%{name}/aarch64/snponly.efi +cp -a src/bin-arm64-efi/ipxe.efi %{buildroot}/%{_datadir}/%{name}/aarch64/ipxe.efi + +# Install ROM files (x86_64 specific) +echo "Installing ROM files..." +for img in src/bin/*.rom; do + if [ -e "$img" ]; then + baseimg=$(basename "$img") + cp -a "$img" %{buildroot}/%{_datadir}/%{name}/x86_64/ + echo %{_datadir}/%{name}/x86_64/$baseimg >> x86_64.rom.list + fi +done + +# Install QEMU ROMs and create symlinks +echo "Installing QEMU ROMs..." +mkdir -p %{buildroot}%{_datadir}/%{name}/x86_64/qemu/ +for romstr in %{qemuroms}; do + rom=$(echo "$romstr" | cut -d ":" -f 1) + qemuname=$(echo "$romstr" | cut -d ":" -f 2) + + # Remove QEMU ROMs from main ROM list + sed -i -e "/\/x86_64\/${rom}.rom/d" x86_64.rom.list + + # Copy ROM files + cp src/bin-combined/${rom}.rom %{buildroot}/%{_datadir}/%{name}.efi/x86_64/ + echo %{_datadir}/%{name}.efi/x86_64/${rom}.rom >> x86_64.qemu.rom.list + + # Create QEMU symlinks + ln -s ../../ipxe/x86_64/${rom}.rom %{buildroot}%{_datadir}/%{name}/x86_64/qemu/pxe-${qemuname}.rom + ln -s ../../ipxe.efi/x86_64/${rom}.rom %{buildroot}%{_datadir}/%{name}/x86_64/qemu/efi-${qemuname}.rom +done + +%files bootimg-x86_64 +%dir %{_datadir}/%{name} +%dir %{_datadir}/%{name}/x86_64 +%{_datadir}/%{name}/x86_64/ipxe.iso +%{_datadir}/%{name}/x86_64/ipxe.usb +%{_datadir}/%{name}/x86_64/ipxe.dsk +%{_datadir}/%{name}/x86_64/ipxe.lkrn +%{_datadir}/%{name}/x86_64/ipxe-i386.efi +%{_datadir}/%{name}/x86_64/ipxe-x86_64.efi +%{_datadir}/%{name}/x86_64/undionly.kpxe +%{_datadir}/%{name}/x86_64/ipxe-snponly-x86_64.efi +%doc COPYING COPYING.GPLv2 COPYING.UBDL + +%files bootimg-aarch64 +%dir %{_datadir}/%{name} +%dir %{_datadir}/%{name}/aarch64 +%{_datadir}/%{name}/aarch64/ipxe.efi +%{_datadir}/%{name}/aarch64/snponly.efi +%doc COPYING COPYING.GPLv2 COPYING.UBDL + +%files roms -f x86_64.rom.list +%dir %{_datadir}/%{name} +%dir %{_datadir}/%{name}/x86_64 +%doc COPYING COPYING.GPLv2 COPYING.UBDL + +%files roms-qemu -f x86_64.qemu.rom.list +%dir %{_datadir}/%{name} +%dir %{_datadir}/%{name}.efi +%dir %{_datadir}/%{name}.efi/x86_64 +%{_datadir}/%{name}/x86_64/qemu +%doc COPYING COPYING.GPLv2 COPYING.UBDL + +%changelog +* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 20240119-2.gitde8a0821 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Tue Jan 30 2024 Your Name <your.email@example.com> - 20240119-2.gitde8a0821 +- Implement QEMU-style cross-architecture building for iPXE +- Generate both ipxe-bootimg-x86_64 and ipxe-bootimg-aarch64 noarch packages +- Enable building all architectures on any supported build host + +* Tue Jan 30 2024 Daniel P. Berrangé <berrange@redhat.com> - 20240119-1.gitde8a0821 +- Update to latest git snapshot + +* Thu Jan 25 2024 Stid Official <stidofficiel@gmail.com> - 20220210-8.git64113751 +- Add support of NFS protocol + +* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 20220210-7.git64113751 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jan 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 20220210-6.git64113751 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Tue Dec 19 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 20220210-5.git64113751 +- Fix build with binutils 2.41 + +* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 20220210-4.git64113751 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 20220210-3.git64113751 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 20220210-2.git64113751 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sun Apr 10 2022 Cole Robinson <crobinso@redhat.com> - 20220210-1.git64113751 +- Update to newer git snapshot + +* Tue Mar 01 2022 Yaakov Selkowitz <yselkowi@redhat.com> - 20200823-9.git4bd064de +- Add aarch64 EFI artifacts (bz 2058680) + +* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 20200823-8.git4bd064de +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild @@ -0,0 +1 @@ +4259f615cfc116e8c15e8a0f4ab75f46 ipxe-20240119-gitde8a0821.tar.xz |