Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
3b620f6db9
!34 enable make check
From: @zhangqiumiao 
Reviewed-by: @anonymous_z 
Signed-off-by: @anonymous_z
2023-03-09 13:32:04 +00:00
Qiumiao Zhang
03c69b4eb3 enable make check
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
2023-03-09 21:14:33 +08:00
openeuler-ci-bot
0d0b6d2330 !16 round community patches fix Avoid infinite loop on allocation failure
From: @kerongw
Reviewed-by: @yanan-rock
Signed-off-by: @yanan-rock
2021-06-09 15:01:32 +08:00
wangkerong
321cc180e6 round community patche 2021-06-09 10:08:04 +08:00
openeuler-ci-bot
b12f6a3120 !8 add epoch for roms-qemu when required by roms
Merge pull request !8 from sherlock2010/openEuler-20.03-LTS
2020-09-03 15:07:07 +08:00
sherlock2010
1f1cb698a7 add epoch for roms-qemu when required by roms 2020-09-03 11:38:49 +08:00
openeuler-ci-bot
29d39abe94 !6 【LTS升级】update ipxe to 1.20.1
Merge pull request !6 from yu_boyun/openEuler-20.03-LTS
2020-08-29 17:51:55 +08:00
yu_boyun
fdcd521d36 update 2020-08-29 16:29:09 +08:00
openeuler-ci-bot
d04efe34de !1 add bootimgs roms roms-qemu subpackages
Merge pull request !1 from t.feng/master
2020-02-10 15:12:02 +08:00
t_feng
253a97aaa6 add bootimgs roms roms-qemu subpackages 2020-01-13 20:56:41 +08:00
3 changed files with 166 additions and 16 deletions

View File

@ -0,0 +1,69 @@
From 614d99eba149d0fafc64dfdddc7ef04970e0d86c Mon Sep 17 00:00:00 2001
From: Michael Brown <mcb30@ipxe.org>
Date: Tue, 20 Apr 2021 13:28:57 +0100
Subject: [PATCH] [xen] Avoid infinite loop on allocation failure in
xenstore_response()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Conflict:NA
Reference:https://github.com/ipxe/ipxe/commit/614d99eba149d0fafc64dfdddc7ef04970e0d86c
---
src/interface/xen/xenstore.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/interface/xen/xenstore.c b/src/interface/xen/xenstore.c
index a14881f..c2da532 100644
--- a/src/interface/xen/xenstore.c
+++ b/src/interface/xen/xenstore.c
@@ -68,14 +68,14 @@ static void xenstore_send ( struct xen_hypervisor *xen, const void *data,
XENSTORE_RING_IDX cons;
XENSTORE_RING_IDX idx;
const char *bytes = data;
- size_t offset = 0;
+ size_t offset;
size_t fill;
DBGCP ( intf, "XENSTORE raw request:\n" );
DBGCP_HDA ( intf, MASK_XENSTORE_IDX ( prod ), data, len );
/* Write one byte at a time */
- while ( offset < len ) {
+ for ( offset =0 ; offset < len ; offset++ ) {
/* Wait for space to become available */
while ( 1 ) {
@@ -90,7 +90,7 @@ static void xenstore_send ( struct xen_hypervisor *xen, const void *data,
/* Write byte */
idx = MASK_XENSTORE_IDX ( prod++ );
- writeb ( bytes[offset++], &intf->req[idx] );
+ writeb ( bytes[offset], &intf->req[idx] );
}
/* Update producer counter */
@@ -125,13 +125,13 @@ static void xenstore_recv ( struct xen_hypervisor *xen, void *data,
XENSTORE_RING_IDX prod;
XENSTORE_RING_IDX idx;
char *bytes = data;
- size_t offset = 0;
+ size_t offset;
size_t fill;
DBGCP ( intf, "XENSTORE raw response:\n" );
/* Read one byte at a time */
- while ( offset < len ) {
+ for ( offset = 0 ; offset < len ; offset++ ) {
/* Wait for data to be ready */
while ( 1 ) {
@@ -147,7 +147,7 @@ static void xenstore_recv ( struct xen_hypervisor *xen, void *data,
/* Read byte */
idx = MASK_XENSTORE_IDX ( cons++ );
if ( data )
- bytes[offset++] = readb ( &intf->rsp[idx] );
+ bytes[offset] = readb ( &intf->rsp[idx] );
}
if ( data )
DBGCP_HDA ( intf, MASK_XENSTORE_IDX ( cons - len ), data, len );
--
2.23.0

113
ipxe.spec
View File

@ -2,35 +2,73 @@
%global qemuroms 10222000 10ec8029 8086100e 10ec8139 1af41000 80861209 808610d3 15ad07b0
%global buildarches x86_64
%global debug_package %{nil}
%global hash 3fe683e
Name: ipxe
Version: 20190930
Version: 1.20.1
Release: 4
Summary: A network boot loader
Epoch: 1
License: GPLv2 with additional permissions and BSD
URL: http://ipxe.org/
Source0: https://git.ipxe.org/ipxe.git/snapshot/%{name}-%{hash}.tar.bz2
Source0: https://github.com/ipxe/ipxe/archive/v%{version}.tar.gz
Patch0001: 0001-build-customize-configuration.patch
Patch0002: 0002-Use-spec-compliant-timeouts.patch
Patch6000: backport-avoid-infinite-loop-on-allocation-failure-in.patch
%ifarch %{buildarches}
BuildRequires: perl-interpreter perl-Getopt-Long syslinux mtools genisoimage edk2-devel
BuildRequires: xz-devel gcc binutils-devel
Obsoletes: gpxe-bootimgs gpxe-roms gpxe-roms-qem
Provides: %{name}-bootimgs %{name}-roms %{name}-roms-qemu
Obsoletes: %{name}-bootimgs %{name}-roms %{name}-roms-qemu
%endif
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 = %{epoch}:%{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}-%{hash}
%setup -q -n %{name}-%{version}
%autopatch -p1
@ -47,7 +85,7 @@ make_ipxe() {
"$@"
}
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-linux/tests.linux
make_ipxe ISOLINUX_BIN=/usr/share/syslinux/isolinux.bin \
bin/undionly.kpxe bin/ipxe.{dsk,iso,usb,lkrn} \
@ -56,11 +94,13 @@ make_ipxe ISOLINUX_BIN=/usr/share/syslinux/isolinux.bin \
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
@ -99,16 +139,21 @@ for fmt in rom ;do
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 -f rom.list
%check
%ifarch %{buildarches}
cd src/bin-x86_64-linux/
./tests.linux
%endif
%ifarch %{buildarches}
%files bootimgs
%defattr(-,root,root)
%doc README
%license COPYING COPYING.GPLv2 COPYING.UBDL
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}.efi
%{_datadir}/%{name}/ipxe.iso
%{_datadir}/%{name}/ipxe.usb
%{_datadir}/%{name}/ipxe.dsk
@ -116,11 +161,47 @@ done
%{_datadir}/%{name}/ipxe-i386.efi
%{_datadir}/%{name}/ipxe-x86_64.efi
%{_datadir}/%{name}/undionly.kpxe
%{_datadir}/%{name}/*.rom
%{_datadir}/%{name}.efi/*.rom
%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
* Thu Mar 09 2023 zhangqiumiao <zhangqiumiao1@huawei.com> - 1:1.20.1-4
- Type:testcode
- ID:NA
- SUG:NA
- DESC:enable make check
* Wed Jun 09 2021 wangkerong <wangkerong@huawei.com> - 1:1.20.1-3
- Type:bugfix
- Id:NA
- SUG:NA
- DESC: round community patch
* Thu Sep 03 2020 zhouyihang <zhouyihang3@huawei.com> - 1:1.20.1-2
- Type:bugfix
- Id:NA
- SUG:NA
- DESC: add epoch for roms-qemu when required by roms
* Wed Aug 19 2020 yuboyun <yuboyun@huawei.com> - 1: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

BIN
v1.20.1.tar.gz Normal file

Binary file not shown.