[ipxe] Initial import after review (rhbz #804826)

Daniel P. Berrange berrange at fedoraproject.org
Wed Mar 28 15:29:38 UTC 2012


commit 3966610dc163f5679a3497b89af69e406cb44431
Author: Daniel P. Berrange <berrange at redhat.com>
Date:   Wed Mar 28 16:29:18 2012 +0100

    Initial import after review (rhbz #804826)

 .gitignore                |    4 +
 USAGE                     |   16 +++
 ipxe-banner-timeout.patch |   12 +++
 ipxe.spec                 |  240 +++++++++++++++++++++++++++++++++++++++++++++
 sources                   |    1 +
 5 files changed, 273 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..cc20952 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.tar.gz
+noarch/
+.build*.log
+*.src.rpm
diff --git a/USAGE b/USAGE
new file mode 100644
index 0000000..6b7f529
--- /dev/null
+++ b/USAGE
@@ -0,0 +1,16 @@
+To create a bootable floppy, type
+    cat /usr/share/gpxe/gpxe.dsk > /dev/fd0
+where /dev/fd0 is your floppy drive.  This will erase any
+data already on the disk.
+
+To create a bootable USB key, type
+    cat /usr/share/gpxe/gpxe.usb > /dev/sdX
+where /dev/sdX is your USB key, and is *not* a real hard
+disk on your system.  This will erase any data already on
+the USB key.
+
+To create a bootable CD-ROM, burn the ISO image
+/usr/share/gpxe/gpxe.iso to a blank CD-ROM.
+
+http://www.etherboot.org/wiki/pxechaining describes how to chain boot
+from PXE into gPXE using /usr/share/gpxe/undionly.kpxe.
diff --git a/ipxe-banner-timeout.patch b/ipxe-banner-timeout.patch
new file mode 100644
index 0000000..b63c948
--- /dev/null
+++ b/ipxe-banner-timeout.patch
@@ -0,0 +1,12 @@
+diff -rup gpxe-1.0.1.orig/src/config/general.h gpxe-1.0.1.new/src/config/general.h
+--- gpxe-1.0.1.orig/src/config/general.h	2010-06-29 20:31:33.000000000 +0100
++++ gpxe-1.0.1.new/src/config/general.h	2012-03-19 11:53:36.035138977 +0000
+@@ -31,7 +31,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
+  * Timer configuration
+  *
+  */
+-#define BANNER_TIMEOUT	20	/* Tenths of a second for which the shell
++#define BANNER_TIMEOUT	0	/* Tenths of a second for which the shell
+ 				   banner should appear */
+ 
+ /*
diff --git a/ipxe.spec b/ipxe.spec
new file mode 100644
index 0000000..2a3ca0a
--- /dev/null
+++ b/ipxe.spec
@@ -0,0 +1,240 @@
+
+# Resulting binary formats we want from iPXE
+%global formats rom
+
+# PCI IDs (vendor,product) of the ROMS we want for QEMU
+#
+#    pcnet32: 0x1022 0x2000
+#   ne2k_pci: 0x10ec 0x8029
+#      e1000: 0x8086 0x100e
+#    rtl8139: 0x10ec 0x8139
+# virtio-net: 0x1af4 0x1000
+%global qemuroms 10222000 10ec8029 8086100e 10ec8139 1af41000
+
+# We only build the ROMs if on an x86 build host. The resulting
+# binary RPM will be noarch, so other archs will still be able
+# to use the binary ROMs
+%global buildarches %{ix86} x86_64
+
+# debugging firmwares does not goes the same way as a normal program.
+# 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'`
+# $ date=`date '+%Y%m%d'`
+# $ git archive --output ipxe-${date}-git${hash}.tar.gz --prefix ipxe-${date}-git${hash}/ ${hash}
+#
+# And then change these two:
+
+%global date 20120328
+%global hash aac9718
+
+Name:    ipxe
+Version: %{date}
+Release: 1.git%{hash}%{?dist}
+Summary: A network boot loader
+
+Group:   System Environment/Base
+License: GPLv2 and BSD
+URL:     http://ipxe.org/
+
+Source0: %{name}-%{version}-git%{hash}.tar.gz
+Source1: USAGE
+# Remove 2 second startup wait. This patch is not intended to
+# go upstream. Modifying the general config header file is the
+# intended means for downstream customization.
+Patch1: %{name}-banner-timeout.patch
+
+%ifarch %{buildarches}
+BuildRequires: perl
+BuildRequires: syslinux
+BuildRequires: mtools
+BuildRequires: mkisofs
+Obsoletes: gpxe <= 1.0.1
+
+%package bootimgs
+Summary: Network boot loader images in bootable USB, CD, floppy and GRUB formats
+Group:   Development/Tools
+BuildArch: noarch
+Obsoletes: gpxe-bootimgs <= 1.0.1
+
+%package roms
+Summary: Network boot loader roms in .rom format
+Group:  Development/Tools
+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
+Group:  Development/Tools
+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}-git%{hash}
+%patch1 -p1
+cp -a %{SOURCE1} .
+
+%build
+%ifarch %{buildarches}
+ISOLINUX_BIN=/usr/share/syslinux/isolinux.bin
+cd src
+# ath9k drivers are too big for an Option ROM
+rm -rf drivers/net/ath/ath9k
+
+#make %{?_smp_mflags} bin/undionly.kpxe bin/ipxe.{dsk,iso,usb,lkrn} allroms \
+make bin/undionly.kpxe bin/ipxe.{dsk,iso,usb,lkrn} allroms \
+                   ISOLINUX_BIN=${ISOLINUX_BIN} NO_WERROR=1 V=1
+%endif
+
+%install
+%ifarch %{buildarches}
+mkdir -p %{buildroot}/%{_datadir}/%{name}/
+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
+
+# the roms supported by qemu will be packaged separatedly
+# remove from the main rom list and add them to qemu.list
+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
+%endif
+
+%ifarch %{buildarches}
+%files bootimgs
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/ipxe.iso
+%{_datadir}/%{name}/ipxe.usb
+%{_datadir}/%{name}/ipxe.dsk
+%{_datadir}/%{name}/ipxe.lkrn
+%{_datadir}/%{name}/undionly.kpxe
+%doc COPYING COPYRIGHTS USAGE
+
+%files roms -f rom.list
+%dir %{_datadir}/%{name}
+%doc COPYING COPYRIGHTS
+
+%files roms-qemu -f qemu.rom.list
+%dir %{_datadir}/%{name}
+%doc COPYING COPYRIGHTS
+%endif
+
+%changelog
+* Wed Mar 28 2012 Daniel P. Berrange <berrange at redhat.com> - 20120328-1.gitaac9718
+- Update to newer upstream
+
+* Fri Mar 23 2012 Daniel P. Berrange <berrange at redhat.com> - 20120319-3.git0b2c788
+- Remove more defattr statements
+
+* Tue Mar 20 2012 Daniel P. Berrange <berrange at redhat.com> - 20120319-2.git0b2c788
+- Remove BuildRoot & rm -rf of it in install/clean sections
+- Remove defattr in file section
+- Switch to use global, instead of define for macros
+- Add note about Patch1 not going upstream
+- Split BRs across lines for easier readability
+
+* Mon Feb 27 2012 Daniel P. Berrange <berrange at redhat.com> - 20120319-1.git0b2c788
+- Initial package based on gPXE
+
+* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.1-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Mon Feb 21 2011 Matt Domsch <mdomsch at fedoraproject.org> - 1.0.1-4
+- don't use -Werror, it flags a failure that is not a failure for gPXE
+
+* Mon Feb 21 2011 Matt Domsch <mdomsch at fedoraproject.org> - 1.0.1-3
+- Fix virtio-net ethernet frame length (patch by cra), fixes BZ678789
+
+* Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.1-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Thu Aug  5 2010 Matt Domsch <mdomsch at fedoraproject.org> - 1.0.1-1
+- New drivers: Intel e1000, e1000e, igb, EFI snpnet, JMicron jme,
+  Neterion X3100, vxge, pcnet32.
+- Bug fixes and improvements to drivers, wireless, DHCP, iSCSI,
+  COMBOOT, and EFI.
+* Tue Feb  2 2010 Matt Domsch <mdomsch at fedoraproject.org> - 1.0.0-1
+- bugfix release, also adds wireless card support
+- bnx2 builds again
+- drop our one patch
+
+* Tue Oct 27 2009 Matt Domsch <mdomsch at fedoraproject.org> - 0.9.9-1
+- new upstream version 0.9.9
+-- plus patches from git up to 20090818 which fix build errors and
+   other release-critical bugs.
+-- 0.9.9: added Attansic L1E and sis190/191 ethernet drivers.  Fixes
+   and updates to e1000 and 3c90x drivers.
+-- 0.9.8: new commands: time, sleep, md5sum, sha1sum. 802.11 wireless
+   support with Realtek 8180/8185 and non-802.11n Atheros drivers.
+   New Marvell Yukon-II gigabet Ethernet driver.  HTTP redirection
+   support.  SYSLINUX floppy image type (.sdsk) with usable file
+   system.  Rewrites, fixes, and updates to 3c90x, forcedeth, pcnet32,
+   e1000, and hermon drivers.
+
+* Mon Oct  5 2009 Matt Domsch <mdomsch at fedoraproject.org> - 0.9.7-6
+- move rtl8029 from -roms to -roms-qemu for qemu ne2k_pci NIC (BZ 526776)
+
+* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9.7-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Tue May 19 2009 Matt Domsch <mdomsch at fedoraproject.org> - 0.9.7-4
+- add undionly.kpxe to -bootimgs
+
+* Tue May 12 2009 Matt Domsch <mdomsch at fedoraproject.org> - 0.9.7-3
+- handle isolinux changing paths
+
+* Sat May  9 2009 Matt Domsch <mdomsch at fedoraproject.org> - 0.9.7-2
+- add dist tag
+
+* Thu Mar 26 2009 Matt Domsch <mdomsch at fedoraproject.org> - 0.9.7-1
+- Initial release based on etherboot spec
diff --git a/sources b/sources
index e69de29..f1fb2dd 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+6f6f6367cdcb9fcdae480e08955c77a1  ipxe-20120328-gitaac9718.tar.gz


More information about the scm-commits mailing list