Add aarch64 EFI artifacts (bz 2058680)

This commit is contained in:
Yaakov Selkowitz 2022-02-28 22:15:45 -05:00
parent 6b3073f560
commit 74282a850e

View File

@ -1,7 +1,3 @@
%if 0%{?fedora}
%global cross 1
%endif
# ROMS we want for QEMU with format PCIID:QEMUNAME # ROMS we want for QEMU with format PCIID:QEMUNAME
%global qemuroms \\\ %global qemuroms \\\
8086100e:e1000 \\\ 8086100e:e1000 \\\
@ -18,17 +14,10 @@
15ad07b0:vmxnet3 15ad07b0:vmxnet3
%endif %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 # binary RPM will be noarch, so other archs will still be able
# to use the binary ROMs. # to use the binary ROMs.
# %global buildarches x86_64 aarch64
# 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
# debugging firmwares does not go the same way as a normal program. # debugging firmwares does not go the same way as a normal program.
# moreover, all architectures providing debuginfo for a single noarch # moreover, all architectures providing debuginfo for a single noarch
@ -50,7 +39,7 @@
Name: ipxe Name: ipxe
Version: %{date} Version: %{date}
Release: 8.git%{hash}%{?dist} Release: 9.git%{hash}%{?dist}
Summary: A network boot loader Summary: A network boot loader
License: GPLv2 with additional permissions and BSD License: GPLv2 with additional permissions and BSD
@ -70,24 +59,26 @@ BuildRequires: perl-Getopt-Long
BuildRequires: perl-FindBin BuildRequires: perl-FindBin
BuildRequires: perl-lib BuildRequires: perl-lib
%endif %endif
%ifarch x86_64
BuildRequires: syslinux BuildRequires: syslinux
%endif
BuildRequires: mtools BuildRequires: mtools
BuildRequires: xorriso BuildRequires: xorriso
BuildRequires: edk2-tools BuildRequires: edk2-tools
BuildRequires: xz-devel BuildRequires: xz-devel
BuildRequires: gcc BuildRequires: gcc
BuildRequires: binutils-devel BuildRequires: binutils-devel
%if 0%{?cross}
BuildRequires: binutils-x86_64-linux-gnu gcc-x86_64-linux-gnu
%endif
BuildRequires: make BuildRequires: make
Obsoletes: gpxe <= 1.0.1 Obsoletes: gpxe <= 1.0.1
%endif
%package bootimgs %ifarch x86_64
Summary: Network boot loader images in bootable USB, CD, floppy and GRUB formats %package bootimgs-x86
Summary: X86 Network boot loader images in bootable USB, CD, floppy and GRUB formats
BuildArch: noarch BuildArch: noarch
Provides: %{name}-bootimgs = %{version}-%{release}
Obsoletes: %{name}-bootimgs < 20200823-9.git4bd064de
Obsoletes: gpxe-bootimgs <= 1.0.1 Obsoletes: gpxe-bootimgs <= 1.0.1
%package roms %package roms
@ -101,7 +92,7 @@ Summary: Network boot loader roms supported by QEMU, .rom format
BuildArch: noarch BuildArch: noarch
Obsoletes: gpxe-roms-qemu <= 1.0.1 Obsoletes: gpxe-roms-qemu <= 1.0.1
%description bootimgs %description bootimgs-x86
iPXE is an open source network bootloader. It provides a direct iPXE is an open source network bootloader. It provides a direct
replacement for proprietary PXE ROMs, with many extra features such as replacement for proprietary PXE ROMs, with many extra features such as
DNS, HTTP, iSCSI, etc. DNS, HTTP, iSCSI, etc.
@ -126,6 +117,19 @@ This package contains the iPXE ROMs for devices emulated by QEMU, in
.rom format. .rom format.
%endif %endif
%ifarch aarch64
%package bootimgs-aarch64
Summary: ARM Network boot loader images in bootable USB and GRUB formats
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 ARM boot images in USB and GRUB formats.
%endif
%description %description
iPXE is an open source network bootloader. It provides a direct iPXE is an open source network bootloader. It provides a direct
replacement for proprietary PXE ROMs, with many extra features such as replacement for proprietary PXE ROMs, with many extra features such as
@ -134,27 +138,23 @@ DNS, HTTP, iSCSI, etc.
%prep %prep
%setup -q -n %{name}-%{version}-git%{hash} %setup -q -n %{name}-%{version}-git%{hash}
%autopatch -p1 %autopatch -p1
%build
%ifarch %{buildarches}
cd src
# ath9k drivers are too big for an Option ROM, and ipxe devs say it doesn't # ath9k drivers are too big for an Option ROM, and ipxe devs say it doesn't
# make sense anyways # make sense anyways
# http://lists.ipxe.org/pipermail/ipxe-devel/2012-March/001290.html # http://lists.ipxe.org/pipermail/ipxe-devel/2012-March/001290.html
rm -rf drivers/net/ath/ath9k rm -rf src/drivers/net/ath/ath9k
%build
cd src
make_ipxe() { make_ipxe() {
make %{?_smp_mflags} \ make %{?_smp_mflags} \
NO_WERROR=1 V=1 \ NO_WERROR=1 V=1 \
GITVERSION=%{hash} \ GITVERSION=%{hash} \
%if 0%{?cross}
CROSS_COMPILE=x86_64-linux-gnu- \
%endif
"$@" "$@"
} }
%ifarch x86_64
make_ipxe bin-i386-efi/ipxe.efi bin-x86_64-efi/ipxe.efi \ make_ipxe bin-i386-efi/ipxe.efi bin-x86_64-efi/ipxe.efi \
bin-x86_64-efi/snponly.efi bin-x86_64-efi/snponly.efi
@ -187,8 +187,15 @@ done
%endif %endif
%ifarch aarch64
make_ipxe bin-arm64-efi/snponly.efi
%if 0%{?fedora}
make_ipxe bin-arm64-efi/ipxe.efi
%endif
%endif
%install %install
%ifarch %{buildarches} %ifarch x86_64
mkdir -p %{buildroot}/%{_datadir}/%{name}/ mkdir -p %{buildroot}/%{_datadir}/%{name}/
mkdir -p %{buildroot}/%{_datadir}/%{name}.efi/ mkdir -p %{buildroot}/%{_datadir}/%{name}.efi/
pushd src/bin/ pushd src/bin/
@ -225,12 +232,19 @@ for romstr in %{qemuroms}; do
ln -s ../../ipxe.efi/${rom}.rom %{buildroot}%{_datadir}/%{name}/qemu/efi-${qemuname}.rom ln -s ../../ipxe.efi/${rom}.rom %{buildroot}%{_datadir}/%{name}/qemu/efi-${qemuname}.rom
done done
# endif buildarches # endif x86_64
%endif %endif
%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 %{buildarches} %ifarch x86_64
%files bootimgs %files bootimgs-x86
%dir %{_datadir}/%{name} %dir %{_datadir}/%{name}
%{_datadir}/%{name}/ipxe.iso %{_datadir}/%{name}/ipxe.iso
%{_datadir}/%{name}/ipxe.usb %{_datadir}/%{name}/ipxe.usb
@ -253,7 +267,20 @@ done
%doc COPYING COPYING.GPLv2 COPYING.UBDL %doc COPYING COPYING.GPLv2 COPYING.UBDL
%endif %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 %changelog
* 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 * Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 20200823-8.git4bd064de
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild