1 Star 0 Fork 15

yu_boyun/ipxe

forked from src-openEuler/ipxe 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ipxe.spec 5.40 KB
一键复制 编辑 原始数据 按行查看 历史
compile_success 提交于 2020-06-23 10:16 . update
%global formats rom
%global qemuroms 10222000 10ec8029 8086100e 10ec8139 1af41000 80861209 808610d3 15ad07b0
%global buildarches x86_64
%global debug_package %{nil}
Name: ipxe
Version: 1.20.1
Release: 1
Summary: A network boot loader
Epoch: 1
License: GPLv2 with additional permissions and BSD
URL: http://ipxe.org/
Source0: https://github.com/ipxe/ipxe/archive/v%{version}.tar.gz
Patch0001: 0001-build-customize-configuration.patch
Patch0002: 0002-Use-spec-compliant-timeouts.patch
%ifarch %{buildarches}
BuildRequires: perl-interpreter perl-Getopt-Long syslinux mtools genisoimage edk2-devel
BuildRequires: xz-devel gcc binutils-devel
Obsoletes: gpxe <= 1.0.1
%package bootimgs
Summary: Network boot loader images in bootable USB, CD, floppy and GRUB formats
BuildArch: noarch
Obsoletes: gpxe-bootimgs <= 1.0.1
%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 bootimgs
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 boot images in USB, CD, floppy, and PXE
UNDI 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.
%endif
%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}
%autopatch -p1
%build
%ifarch %{buildarches}
cd src
rm -rf drivers/net/ath/ath9k
make_ipxe() {
make %{?_smp_mflags} \
NO_WERROR=1 V=1 \
GITVERSION=%{hash} \
"$@"
}
make_ipxe bin-i386-efi/ipxe.efi bin-x86_64-efi/ipxe.efi
make_ipxe ISOLINUX_BIN=/usr/share/syslinux/isolinux.bin \
bin/undionly.kpxe bin/ipxe.{dsk,iso,usb,lkrn} \
allroms
mkdir bin-combined
for rom in %{qemuroms}; do
make_ipxe CONFIG=qemu bin/${rom}.rom
make_ipxe CONFIG=qemu bin-i386-efi/${rom}.efidrv
make_ipxe CONFIG=qemu bin-x86_64-efi/${rom}.efidrv
vid="0x${rom%%????}"
did="0x${rom#????}"
EfiRom -f "$vid" -i "$did" --pci23 \
-b bin/${rom}.rom \
-ec bin-i386-efi/${rom}.efidrv \
-ec bin-x86_64-efi/${rom}.efidrv \
-o bin-combined/${rom}.rom
EfiRom -d bin-combined/${rom}.rom
truncate -s \>256K bin-combined/${rom}.rom
test $(stat -c '%s' bin-combined/${rom}.rom) -le $((256 * 1024))
done
%endif
%install
%ifarch %{buildarches}
mkdir -p %{buildroot}/%{_datadir}/%{name}/
mkdir -p %{buildroot}/%{_datadir}/%{name}.efi/
pushd src/bin/
cp -a undionly.kpxe ipxe.{iso,usb,dsk,lkrn} %{buildroot}/%{_datadir}/%{name}/
for fmt in %{formats};do
for img in *.${fmt};do
if [ -e $img ]; then
cp -a $img %{buildroot}/%{_datadir}/%{name}/
echo %{_datadir}/%{name}/$img >> ../../${fmt}.list
fi
done
done
popd
cp -a src/bin-i386-efi/ipxe.efi %{buildroot}/%{_datadir}/%{name}/ipxe-i386.efi
cp -a src/bin-x86_64-efi/ipxe.efi %{buildroot}/%{_datadir}/%{name}/ipxe-x86_64.efi
for fmt in rom ;do
for rom in %{qemuroms} ; do
sed -i -e "/\/${rom}.${fmt}/d" ${fmt}.list
echo %{_datadir}/%{name}/${rom}.${fmt} >> qemu.${fmt}.list
done
done
for rom in %{qemuroms}; do
cp src/bin-combined/${rom}.rom %{buildroot}/%{_datadir}/%{name}.efi/
echo %{_datadir}/%{name}.efi/${rom}.rom >> qemu.rom.list
done
%endif
%ifarch %{buildarches}
%files bootimgs
%defattr(-,root,root)
%license COPYING COPYING.GPLv2 COPYING.UBDL
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/ipxe.iso
%{_datadir}/%{name}/ipxe.usb
%{_datadir}/%{name}/ipxe.dsk
%{_datadir}/%{name}/ipxe.lkrn
%{_datadir}/%{name}/ipxe-i386.efi
%{_datadir}/%{name}/ipxe-x86_64.efi
%{_datadir}/%{name}/undionly.kpxe
%files roms -f rom.list
%defattr(-,root,root)
%license COPYING COPYING.GPLv2 COPYING.UBDL
%dir %{_datadir}/%{name}
%files roms-qemu -f qemu.rom.list
%defattr(-,root,root)
%license COPYING COPYING.GPLv2 COPYING.UBDL
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}.efi
%endif
%changelog
* Tue Jun 22 2020 zhujunhao <zhujunhao8@huawei.com> - 1.20.1-1
- update to 1.20.1
* Mon Jan 13 2020 openEuler Buildteam <buildteam@openeuler.org> - 20190125-5
- Type:bugfix
- Id:NA
- SUG:NA
- DESC: add bootimgs roms roms-qemu subpackages
* Fri Nov 29 2019 openEuler Buildteam <buildteam@openeuler.org> - 20190125-4
- Type:bugfix
- Id:NA
- SUG:NA
- DESC: fix build error on x86_64
* Sat Oct 19 2019 openEuler Buildteam <buildteam@openeuler.org> - 20190125-3
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:change the directory of the license files
* Thu Oct 10 2019 openEuler Buildteam <buildteam@openeuler.org> - 20190125-2
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:add requires
* Thu Sep 19 2019 openEuler Buildteam <buildteam@openeuler.org> - 20190125-1
- Package init
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yu_boyun/ipxe.git
git@gitee.com:yu_boyun/ipxe.git
yu_boyun
ipxe
ipxe
master

搜索帮助