2021-07-07 15:02:43 +00:00
|
|
|
# ROMS we want for QEMU with format PCIID:QEMUNAME
|
|
|
|
%global qemuroms \\\
|
|
|
|
8086100e:e1000 \\\
|
|
|
|
10ec8139:rtl8139 \\\
|
|
|
|
1af41000:virtio \\\
|
2021-07-20 20:34:15 +00:00
|
|
|
808610d3:e1000e
|
|
|
|
|
|
|
|
%if 0%{?fedora}
|
|
|
|
# Fedora specific roms
|
|
|
|
%global qemuroms %{qemuroms} \\\
|
|
|
|
10222000:pcnet \\\
|
|
|
|
10ec8029:ne2k_pci \\\
|
2021-07-07 15:02:43 +00:00
|
|
|
80861209:eepro100 \\\
|
|
|
|
15ad07b0:vmxnet3
|
2021-07-20 20:34:15 +00:00
|
|
|
%endif
|
2012-03-28 15:29:18 +00:00
|
|
|
|
2022-03-01 03:15:45 +00:00
|
|
|
# We only build the ROMs if on an EFI build host. The resulting
|
2012-03-28 15:29:18 +00:00
|
|
|
# binary RPM will be noarch, so other archs will still be able
|
2013-05-20 11:38:17 +00:00
|
|
|
# to use the binary ROMs.
|
2022-03-01 03:15:45 +00:00
|
|
|
%global buildarches x86_64 aarch64
|
2012-03-28 15:29:18 +00:00
|
|
|
|
2014-03-04 00:36:13 +00:00
|
|
|
# debugging firmwares does not go the same way as a normal program.
|
2012-03-28 15:29:18 +00:00
|
|
|
# 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'`
|
2015-04-16 08:35:00 +00:00
|
|
|
# $ 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
|
2012-03-28 15:29:18 +00:00
|
|
|
#
|
|
|
|
# And then change these two:
|
|
|
|
|
2024-01-30 10:29:15 +00:00
|
|
|
%global hash de8a0821
|
|
|
|
%global date 20240119
|
2012-03-28 15:29:18 +00:00
|
|
|
|
|
|
|
Name: ipxe
|
|
|
|
Version: %{date}
|
2024-05-23 06:22:55 +00:00
|
|
|
Release: 4.git%{hash}%{?dist}
|
2012-03-28 15:29:18 +00:00
|
|
|
Summary: A network boot loader
|
|
|
|
|
2023-09-26 09:07:58 +00:00
|
|
|
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
|
2012-03-28 15:29:18 +00:00
|
|
|
URL: http://ipxe.org/
|
|
|
|
|
2015-04-16 08:35:00 +00:00
|
|
|
Source0: %{name}-%{version}-git%{hash}.tar.xz
|
2014-03-04 00:36:13 +00:00
|
|
|
|
2015-11-17 16:55:22 +00:00
|
|
|
# Enable IPv6 for qemu's config
|
|
|
|
# Sent upstream: http://lists.ipxe.org/pipermail/ipxe-devel/2015-November/004494.html
|
2017-11-21 12:38:30 +00:00
|
|
|
Patch0001: 0001-build-customize-configuration.patch
|
2017-11-21 12:35:04 +00:00
|
|
|
Patch0002: 0002-Use-spec-compliant-timeouts.patch
|
2012-03-28 15:29:18 +00:00
|
|
|
|
|
|
|
%ifarch %{buildarches}
|
2017-07-12 12:09:10 +00:00
|
|
|
BuildRequires: perl-interpreter
|
2015-11-17 18:03:44 +00:00
|
|
|
BuildRequires: perl-Getopt-Long
|
2020-09-04 19:34:52 +00:00
|
|
|
%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9
|
2020-07-29 09:43:35 +00:00
|
|
|
BuildRequires: perl-FindBin
|
2020-07-29 09:59:05 +00:00
|
|
|
BuildRequires: perl-lib
|
2020-08-11 18:41:57 +00:00
|
|
|
%endif
|
2022-03-01 03:15:45 +00:00
|
|
|
%ifarch x86_64
|
2012-03-28 15:29:18 +00:00
|
|
|
BuildRequires: syslinux
|
2022-03-01 03:15:45 +00:00
|
|
|
%endif
|
2012-03-28 15:29:18 +00:00
|
|
|
BuildRequires: mtools
|
2021-06-14 21:54:17 +00:00
|
|
|
BuildRequires: xorriso
|
2013-05-20 11:38:17 +00:00
|
|
|
BuildRequires: edk2-tools
|
2015-04-16 08:35:00 +00:00
|
|
|
BuildRequires: xz-devel
|
2018-07-23 11:17:39 +00:00
|
|
|
BuildRequires: gcc
|
2013-05-20 12:10:26 +00:00
|
|
|
BuildRequires: binutils-devel
|
2021-01-05 06:19:55 +00:00
|
|
|
BuildRequires: make
|
2013-05-20 12:10:26 +00:00
|
|
|
|
2012-03-28 15:29:18 +00:00
|
|
|
Obsoletes: gpxe <= 1.0.1
|
2022-03-01 03:15:45 +00:00
|
|
|
%endif
|
2012-03-28 15:29:18 +00:00
|
|
|
|
2022-03-01 03:15:45 +00:00
|
|
|
%ifarch x86_64
|
|
|
|
%package bootimgs-x86
|
2024-05-23 06:22:55 +00:00
|
|
|
Summary: X86 Network boot loader images
|
2012-03-28 15:29:18 +00:00
|
|
|
BuildArch: noarch
|
2022-03-01 03:15:45 +00:00
|
|
|
Provides: %{name}-bootimgs = %{version}-%{release}
|
|
|
|
Obsoletes: %{name}-bootimgs < 20200823-9.git4bd064de
|
2012-03-28 15:29:18 +00:00
|
|
|
Obsoletes: gpxe-bootimgs <= 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
|
|
|
|
|
2022-03-01 03:15:45 +00:00
|
|
|
%description bootimgs-x86
|
2024-05-23 06:22:55 +00:00
|
|
|
iPXE is an open source network bootloader.
|
2012-03-28 15:29:18 +00:00
|
|
|
|
2024-05-23 06:22:55 +00:00
|
|
|
This package contains iPXE x86 boot images for UEFI (snponly.efi) and
|
|
|
|
BIOS (undionly.kpxe).
|
2012-03-28 15:29:18 +00:00
|
|
|
|
|
|
|
%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.
|
|
|
|
%endif
|
|
|
|
|
2022-03-01 03:15:45 +00:00
|
|
|
%ifarch aarch64
|
|
|
|
%package bootimgs-aarch64
|
2024-05-23 06:22:55 +00:00
|
|
|
Summary: ARM Network boot loader images
|
2022-03-01 03:15:45 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description bootimgs-aarch64
|
2024-05-23 06:22:55 +00:00
|
|
|
iPXE is an open source network bootloader.
|
2022-03-01 03:15:45 +00:00
|
|
|
|
2024-05-23 06:22:55 +00:00
|
|
|
This package contains iPXE aarch64 boot images for UEFI (snponly.efi).
|
2022-03-01 03:15:45 +00:00
|
|
|
%endif
|
|
|
|
|
2012-03-28 15:29:18 +00:00
|
|
|
%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}
|
2017-11-21 12:35:04 +00:00
|
|
|
%autopatch -p1
|
2016-08-03 14:54:03 +00:00
|
|
|
# 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
|
2022-03-01 03:15:45 +00:00
|
|
|
rm -rf src/drivers/net/ath/ath9k
|
|
|
|
|
|
|
|
%build
|
|
|
|
cd src
|
2016-08-03 14:54:03 +00:00
|
|
|
|
2016-01-22 14:48:18 +00:00
|
|
|
make_ipxe() {
|
|
|
|
make %{?_smp_mflags} \
|
|
|
|
NO_WERROR=1 V=1 \
|
|
|
|
GITVERSION=%{hash} \
|
|
|
|
"$@"
|
|
|
|
}
|
|
|
|
|
2022-03-01 03:15:45 +00:00
|
|
|
%ifarch x86_64
|
|
|
|
|
2024-05-23 06:22:55 +00:00
|
|
|
make_ipxe bin-x86_64-efi/snponly.efi
|
2016-01-22 16:31:46 +00:00
|
|
|
|
2016-01-22 14:48:18 +00:00
|
|
|
make_ipxe ISOLINUX_BIN=/usr/share/syslinux/isolinux.bin \
|
2024-05-23 06:22:55 +00:00
|
|
|
bin/undionly.kpxe
|
2013-05-20 11:38:17 +00:00
|
|
|
|
|
|
|
# build roms with efi support for qemu
|
|
|
|
mkdir bin-combined
|
2021-07-07 15:02:43 +00:00
|
|
|
for romstr in %{qemuroms}; do
|
|
|
|
rom=$(echo "$romstr" | cut -d ":" -f 1)
|
|
|
|
|
2016-01-22 14:48:18 +00:00
|
|
|
make_ipxe CONFIG=qemu bin/${rom}.rom
|
|
|
|
make_ipxe CONFIG=qemu bin-x86_64-efi/${rom}.efidrv
|
2013-05-20 11:38:17 +00:00
|
|
|
vid="0x${rom%%????}"
|
|
|
|
did="0x${rom#????}"
|
|
|
|
EfiRom -f "$vid" -i "$did" --pci23 \
|
|
|
|
-ec bin-x86_64-efi/${rom}.efidrv \
|
spec: combine BIOS and EFI roms using "util/catrom.pl"
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1926561
When combining BIOS and EFI roms, the EfiRom utility from edk2-tools
clears the "last image indicator" in the BIOS ROM image header, and then
updates the checksum in the last byte of the BIOS ROM image. However,
EfiRom does not update any internal, iPXE-specific checksums in the BIOS
ROM image.
In the rare case when the checksum residing in the BIOS ROM's last byte
does not fall into such padding that was added previously by
"util/padimg.pl" -- that is, if the BIOS image is a whole multiple of 512
bytes even without padding --, then the recalculation of *only* the last
byte invalidates the LZMA stream and/or an internal CRC32 checksum that
are embedded elsewhere in the BIOS ROM. Consequently, iPXE fails to
LZMA-decompress itself when booted on SeaBIOS.
iPXE's own "util/catrom.pl" utility knows how to update internal
(iPXE-specific) checksums; use this tool for combining the BIOS and EFI
images.
(
In theory we could abandon EfiRom from edk2-tools altogether, and
prepare even the stand-alone EFI driver image with iPXE-internal
tooling. For this, we'd only have to build the
"bin-x86_64-efi/${rom}.efirom" target, in place of the
"bin-x86_64-efi/${rom}.efidrv" target. The iPXE build would
automatically convert the latter into the former with the "util/efirom"
program.
Unfortunately, "util/efirom" does not support "EFI compression", and
that would cause us to nearly exhaust our 256 KB "migration buffer".
Therefore, continue using EfiRom, but only for compressing the "efidrv"
binary to a single (not combined) EFI ROM image. Perform only the
combination step with "util/catrom.pl".
)
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
2021-02-18 03:16:46 +00:00
|
|
|
-o bin-combined/${rom}.eficrom
|
|
|
|
util/catrom.pl \
|
|
|
|
bin/${rom}.rom \
|
|
|
|
bin-combined/${rom}.eficrom \
|
|
|
|
> bin-combined/${rom}.rom
|
2013-05-20 11:38:17 +00:00
|
|
|
EfiRom -d bin-combined/${rom}.rom
|
2019-07-16 21:30:34 +00:00
|
|
|
# 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))
|
2013-05-20 11:38:17 +00:00
|
|
|
done
|
|
|
|
|
2012-03-28 15:29:18 +00:00
|
|
|
%endif
|
|
|
|
|
2022-03-01 03:15:45 +00:00
|
|
|
%ifarch aarch64
|
|
|
|
make_ipxe bin-arm64-efi/snponly.efi
|
|
|
|
%endif
|
|
|
|
|
2012-03-28 15:29:18 +00:00
|
|
|
%install
|
2022-03-01 03:15:45 +00:00
|
|
|
%ifarch x86_64
|
2012-03-28 15:29:18 +00:00
|
|
|
mkdir -p %{buildroot}/%{_datadir}/%{name}/
|
2013-05-20 11:38:17 +00:00
|
|
|
mkdir -p %{buildroot}/%{_datadir}/%{name}.efi/
|
2012-03-28 15:29:18 +00:00
|
|
|
|
2024-05-23 06:22:55 +00:00
|
|
|
pushd src/bin/
|
|
|
|
cp -a undionly.kpxe %{buildroot}/%{_datadir}/%{name}/
|
2012-03-28 15:29:18 +00:00
|
|
|
popd
|
|
|
|
|
2021-07-24 18:29:13 +00:00
|
|
|
cp -a src/bin-x86_64-efi/snponly.efi %{buildroot}/%{_datadir}/%{name}/ipxe-snponly-x86_64.efi
|
2016-01-22 16:31:46 +00:00
|
|
|
|
2021-07-07 15:02:43 +00:00
|
|
|
mkdir -p %{buildroot}%{_datadir}/%{name}/qemu/
|
|
|
|
|
|
|
|
for romstr in %{qemuroms}; do
|
|
|
|
# the roms supported by qemu will be packaged separatedly
|
|
|
|
# remove from the main rom list and add them to qemu.list
|
|
|
|
rom=$(echo "$romstr" | cut -d ":" -f 1)
|
|
|
|
qemuname=$(echo "$romstr" | cut -d ":" -f 2)
|
2020-08-11 18:45:53 +00:00
|
|
|
echo %{_datadir}/%{name}/${rom}.rom >> qemu.rom.list
|
|
|
|
|
2024-05-23 06:22:55 +00:00
|
|
|
cp src/bin/${rom}.rom %{buildroot}/%{_datadir}/%{name}/
|
2013-05-20 11:38:17 +00:00
|
|
|
cp src/bin-combined/${rom}.rom %{buildroot}/%{_datadir}/%{name}.efi/
|
|
|
|
echo %{_datadir}/%{name}.efi/${rom}.rom >> qemu.rom.list
|
2021-07-07 15:02:43 +00:00
|
|
|
|
|
|
|
# Set up symlinks with expected qemu firmware names
|
|
|
|
ln -s ../../ipxe/${rom}.rom %{buildroot}%{_datadir}/%{name}/qemu/pxe-${qemuname}.rom
|
|
|
|
ln -s ../../ipxe.efi/${rom}.rom %{buildroot}%{_datadir}/%{name}/qemu/efi-${qemuname}.rom
|
2013-05-20 11:38:17 +00:00
|
|
|
done
|
2021-07-07 15:02:43 +00:00
|
|
|
|
2022-03-01 03:15:45 +00:00
|
|
|
# endif x86_64
|
2012-03-28 15:29:18 +00:00
|
|
|
%endif
|
|
|
|
|
2022-03-01 03:15:45 +00:00
|
|
|
%ifarch aarch64
|
|
|
|
mkdir -p %{buildroot}/%{_datadir}/%{name}/arm64-efi
|
|
|
|
cp -a src/bin-arm64-efi/snponly.efi %{buildroot}/%{_datadir}/%{name}/arm64-efi/snponly.efi
|
|
|
|
%endif
|
2021-07-07 15:02:43 +00:00
|
|
|
|
2022-03-01 03:15:45 +00:00
|
|
|
%ifarch x86_64
|
|
|
|
%files bootimgs-x86
|
2012-03-28 15:29:18 +00:00
|
|
|
%dir %{_datadir}/%{name}
|
|
|
|
%{_datadir}/%{name}/undionly.kpxe
|
2021-07-24 18:29:13 +00:00
|
|
|
%{_datadir}/%{name}/ipxe-snponly-x86_64.efi
|
2015-11-17 16:38:33 +00:00
|
|
|
%doc COPYING COPYING.GPLv2 COPYING.UBDL
|
2012-03-28 15:29:18 +00:00
|
|
|
|
|
|
|
%files roms-qemu -f qemu.rom.list
|
|
|
|
%dir %{_datadir}/%{name}
|
2013-05-20 11:38:17 +00:00
|
|
|
%dir %{_datadir}/%{name}.efi
|
2021-07-07 15:02:43 +00:00
|
|
|
%{_datadir}/%{name}/qemu
|
2015-04-16 08:35:00 +00:00
|
|
|
%doc COPYING COPYING.GPLv2 COPYING.UBDL
|
2012-03-28 15:29:18 +00:00
|
|
|
%endif
|
|
|
|
|
2022-03-01 03:15:45 +00:00
|
|
|
%ifarch aarch64
|
|
|
|
%files bootimgs-aarch64
|
|
|
|
%dir %{_datadir}/%{name}
|
|
|
|
%dir %{_datadir}/%{name}/arm64-efi
|
|
|
|
%{_datadir}/%{name}/arm64-efi/snponly.efi
|
|
|
|
%endif
|
|
|
|
|
2012-03-28 15:29:18 +00:00
|
|
|
%changelog
|
2024-05-23 06:22:55 +00:00
|
|
|
* Tue Jul 16 2024 Gerd Hoffmann <kraxel@redhat.com> - 20240119-4.gitde8a0821
|
|
|
|
- Strip down package, remove drivers except qemu drivers.
|
|
|
|
- Resolves: RHEL-37610
|
|
|
|
|
2024-06-24 15:51:47 +00:00
|
|
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 20240119-3.gitde8a0821
|
|
|
|
- Bump release for June 2024 mass rebuild
|
|
|
|
|
2024-05-02 13:38:46 +00:00
|
|
|
* Fri Feb 23 2024 Konstantin Shalygin <shalygin.k@selectel.com> - 20240119-2.gitde8a0821
|
2024-02-24 12:23:19 +00:00
|
|
|
- Added iPXE 'reboot' & 'poweroff' commands
|
|
|
|
|
2024-01-30 10:29:15 +00:00
|
|
|
* Tue Jan 30 2024 Daniel P. Berrangé <berrange@redhat.com> - 20240119-1.gitde8a0821
|
|
|
|
- Update to latest git snapshot
|
|
|
|
|
2023-06-25 18:33:24 +00:00
|
|
|
* Thu Jan 25 2024 Stid Official <stidofficiel@gmail.com> - 20220210-8.git64113751
|
|
|
|
- Add support of NFS protocol
|
|
|
|
|
2024-01-24 22:55:18 +00:00
|
|
|
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 20220210-7.git64113751
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
2024-01-20 23:16:13 +00:00
|
|
|
* Sat Jan 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 20220210-6.git64113751
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
2023-12-19 16:48:26 +00:00
|
|
|
* Tue Dec 19 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 20220210-5.git64113751
|
|
|
|
- Fix build with binutils 2.41
|
|
|
|
|
2023-07-20 07:36:42 +00:00
|
|
|
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 20220210-4.git64113751
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
2023-01-19 13:20:36 +00:00
|
|
|
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 20220210-3.git64113751
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
2022-07-21 14:50:43 +00:00
|
|
|
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 20220210-2.git64113751
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
2022-04-10 20:08:32 +00:00
|
|
|
* Sun Apr 10 2022 Cole Robinson <crobinso@redhat.com> - 20220210-1.git64113751
|
|
|
|
- Update to newer git snapshot
|
|
|
|
|
2022-03-01 03:15:45 +00:00
|
|
|
* Tue Mar 01 2022 Yaakov Selkowitz <yselkowi@redhat.com> - 20200823-9.git4bd064de
|
|
|
|
- Add aarch64 EFI artifacts (bz 2058680)
|
|
|
|
|
2022-01-20 13:26:45 +00:00
|
|
|
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 20200823-8.git4bd064de
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|