From 3cf5270262e78aa2f33a4bdbe20ad2d478ac1b58 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sep 27 2022 10:37:27 +0000 Subject: import ipxe-20200823-9.git4bd064de.el9 --- diff --git a/SPECS/ipxe.spec b/SPECS/ipxe.spec index ef8ff5b..71513ba 100644 --- a/SPECS/ipxe.spec +++ b/SPECS/ipxe.spec @@ -1,7 +1,3 @@ -%if 0%{?fedora} -%global cross 1 -%endif - # ROMS we want for QEMU with format PCIID:QEMUNAME %global qemuroms \\\ 8086100e:e1000 \\\ @@ -18,17 +14,10 @@ 15ad07b0:vmxnet3 %endif -# We only build the ROMs if on an x86 build host. The resulting +# We only build the ROMs if on an EFI build host. The resulting # binary RPM will be noarch, so other archs will still be able # to use the binary ROMs. -# -# We do cross-compilation for 32->64-bit, but not for other arches -# because EDK II does not support big-endian hosts. -%if 0%{?cross} -%global buildarches %{ix86} x86_64 -%else -%global buildarches x86_64 -%endif +%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 @@ -50,7 +39,7 @@ Name: ipxe Version: %{date} -Release: 7.git%{hash}%{?dist} +Release: 9.git%{hash}%{?dist} Summary: A network boot loader License: GPLv2 with additional permissions and BSD @@ -81,28 +70,30 @@ BuildRequires: perl-Getopt-Long BuildRequires: perl-FindBin BuildRequires: perl-lib %endif -BuildRequires: syslinux BuildRequires: mtools BuildRequires: xorriso BuildRequires: edk2-tools BuildRequires: xz-devel BuildRequires: gcc - BuildRequires: binutils-devel -%if 0%{?cross} -BuildRequires: binutils-x86_64-linux-gnu gcc-x86_64-linux-gnu -%endif BuildRequires: make +%endif +%ifarch x86_64 +BuildRequires: syslinux +%endif Obsoletes: gpxe <= 1.0.1 +%ifarch x86_64 %package rhcert Summary: Redhat hwcert custom ipxe image BuildArch: noarch -%package bootimgs +%package bootimgs-x86 Summary: Network boot loader images in bootable USB, CD, floppy and GRUB formats BuildArch: noarch +Provides: %{name}-bootimgs = %{version}-%{release} +Obsoletes: %{name}-bootimgs < %{version}-%{release} Obsoletes: gpxe-bootimgs <= 1.0.1 %package roms @@ -119,7 +110,7 @@ Obsoletes: gpxe-roms-qemu <= 1.0.1 %description rhcert Custom ipxe image for use in hardware certification and validation -%description bootimgs +%description bootimgs-x86 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. @@ -134,7 +125,6 @@ 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 @@ -144,6 +134,20 @@ This package contains the iPXE ROMs for devices emulated by QEMU, in .rom format. %endif +%ifarch aarch64 +%package bootimgs-aarch64 +Summary: AArch64 Network boot loader images in bootable USB and GRUB formats +Group: Development/Tools +BuildArch: noarch + +%description bootimgs-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 ARM64 boot images in USB and GRUB formats. +%endif + %description iPXE is an open source network bootloader. It provides a direct replacement for proprietary PXE ROMs, with many extra features such as @@ -152,28 +156,28 @@ DNS, HTTP, iSCSI, etc. %prep %setup -q -n %{name}-%{version}-git%{hash} %autopatch -p1 - - -%build -%ifarch %{buildarches} -cd src - +pushd src # 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 drivers/net/ath/ath9k +cp %{SOURCE1} . +popd + + +%build +cd src + make_ipxe() { make %{?_smp_mflags} \ NO_WERROR=1 V=1 \ GITVERSION=%{hash} \ -%if 0%{?cross} - CROSS_COMPILE=x86_64-linux-gnu- \ -%endif "$@" } -cp %{SOURCE1} . +%ifarch x86_64 + make_ipxe bin-x86_64-efi/ipxe.efi EMBED=script.ipxe mv bin-x86_64-efi/ipxe.efi bin-x86_64-efi/ipxe-rhcert.efi @@ -209,8 +213,15 @@ done %endif +%ifarch aarch64 +make_ipxe bin-arm64-efi/snponly.efi +%if 0%{?fedora} +make_ipxe bin-arm64-efi/ipxe.efi +%endif +%endif + %install -%ifarch %{buildarches} +%ifarch x86_64 mkdir -p %{buildroot}/%{_datadir}/%{name}/ mkdir -p %{buildroot}/%{_datadir}/%{name}.efi/ pushd src/bin/ @@ -252,8 +263,16 @@ done %endif -%ifarch %{buildarches} -%files bootimgs +%ifarch aarch64 +mkdir -p %{buildroot}/%{_datadir}/%{name}/arm64-efi +cp -a src/bin-arm64-efi/snponly.efi %{buildroot}/%{_datadir}/%{name}/arm64-efi/snponly.efi +%if 0%{?fedora} +cp -a src/bin-arm64-efi/ipxe.efi %{buildroot}/%{_datadir}/%{name}/arm64-efi/ipxe.efi +%endif +%endif + +%ifarch x86_64 +%files bootimgs-x86 %dir %{_datadir}/%{name} %{_datadir}/%{name}/ipxe.iso %{_datadir}/%{name}/ipxe.usb @@ -280,7 +299,23 @@ done %{_datadir}/%{name}/ipxe-x86_64-rhcert.efi %endif +%ifarch aarch64 +%files bootimgs-aarch64 +%dir %{_datadir}/%{name} +%dir %{_datadir}/%{name}/arm64-efi +%if 0%{?fedora} +%{_datadir}/%{name}/arm64-efi/ipxe.efi +%endif +%{_datadir}/%{name}/arm64-efi/snponly.efi +%endif + %changelog +* Tue Apr 05 2022 Jarod Wilson - 20200823-9.git4bd064de +- Fix Obsoletes: and changelog versioning + +* Tue Mar 15 2022 Yaakov Selkowitz - 20200823-8.git4bd064de +- Add ARM 64 EFI artifacts (bz 2059349) + * Mon Aug 09 2021 Mohan Boddu - 20200823-7.git4bd064de - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688