diff --git a/0001-arm-Provide-dummy-implementation-for-in-out-s-b-w-l.patch b/0001-arm-Provide-dummy-implementation-for-in-out-s-b-w-l.patch deleted file mode 100644 index 972114b075dcca41c2d299d7545308a57255ccb8..0000000000000000000000000000000000000000 --- a/0001-arm-Provide-dummy-implementation-for-in-out-s-b-w-l.patch +++ /dev/null @@ -1,129 +0,0 @@ -From c2226b3d1a4d9fc1daeb8dc6b9034d1fb46c1308 Mon Sep 17 00:00:00 2001 -From: Michael Brown -Date: Sun, 14 Jul 2019 15:27:01 +0100 -Subject: [PATCH] [arm] Provide dummy implementations for {in,out}[s]{b,w,l} - -It is currently not possible to build the all-drivers iPXE binaries -for ARM, since there is no implementation for inb(), outb(), etc. - -There is no common standard for accessing I/O space on ARM platforms, -and there are almost no ARM-compatible peripherals that actually -require I/O space accesses. - -Provide dummy implementations that behave as though no device is -present (i.e. ignore writes, return all bits high for reads). This is -sufficient to allow the all-drivers binaries to link, and should cause -drivers to behave as though no I/O space peripherals are present in -the system. - -Signed-off-by: Michael Brown ---- - src/arch/arm/include/ipxe/arm_io.h | 77 +++++++++++++++++++++++------- - 1 file changed, 59 insertions(+), 18 deletions(-) - -diff --git a/src/arch/arm/include/ipxe/arm_io.h b/src/arch/arm/include/ipxe/arm_io.h -index f8765af752..105f22bfbf 100644 ---- a/src/arch/arm/include/ipxe/arm_io.h -+++ b/src/arch/arm/include/ipxe/arm_io.h -@@ -43,42 +43,83 @@ IOAPI_INLINE ( arm, bus_to_phys ) ( unsigned long bus_addr ) { - * - */ - --#define ARM_READX( _api_func, _type, _insn_suffix, _reg_prefix ) \ -+#define ARM_READX( _suffix, _type, _insn_suffix, _reg_prefix ) \ - static inline __always_inline _type \ --IOAPI_INLINE ( arm, _api_func ) ( volatile _type *io_addr ) { \ -+IOAPI_INLINE ( arm, read ## _suffix ) ( volatile _type *io_addr ) { \ - _type data; \ - __asm__ __volatile__ ( "ldr" _insn_suffix " %" _reg_prefix "0, %1" \ - : "=r" ( data ) : "Qo" ( *io_addr ) ); \ - return data; \ - } - #ifdef __aarch64__ --ARM_READX ( readb, uint8_t, "b", "w" ); --ARM_READX ( readw, uint16_t, "h", "w" ); --ARM_READX ( readl, uint32_t, "", "w" ); --ARM_READX ( readq, uint64_t, "", "" ); -+ARM_READX ( b, uint8_t, "b", "w" ); -+ARM_READX ( w, uint16_t, "h", "w" ); -+ARM_READX ( l, uint32_t, "", "w" ); -+ARM_READX ( q, uint64_t, "", "" ); - #else --ARM_READX ( readb, uint8_t, "b", "" ); --ARM_READX ( readw, uint16_t, "h", "" ); --ARM_READX ( readl, uint32_t, "", "" ); -+ARM_READX ( b, uint8_t, "b", "" ); -+ARM_READX ( w, uint16_t, "h", "" ); -+ARM_READX ( l, uint32_t, "", "" ); - #endif - --#define ARM_WRITEX( _api_func, _type, _insn_suffix, _reg_prefix ) \ -+#define ARM_WRITEX( _suffix, _type, _insn_suffix, _reg_prefix ) \ - static inline __always_inline void \ --IOAPI_INLINE ( arm, _api_func ) ( _type data, volatile _type *io_addr ) { \ -+IOAPI_INLINE ( arm, write ## _suffix ) ( _type data, \ -+ volatile _type *io_addr ) { \ - __asm__ __volatile__ ( "str" _insn_suffix " %" _reg_prefix "0, %1" \ - : : "r" ( data ), "Qo" ( *io_addr ) ); \ - } - #ifdef __aarch64__ --ARM_WRITEX ( writeb, uint8_t, "b", "w" ); --ARM_WRITEX ( writew, uint16_t, "h", "w" ); --ARM_WRITEX ( writel, uint32_t, "", "w" ); --ARM_WRITEX ( writeq, uint64_t, "", "" ); -+ARM_WRITEX ( b, uint8_t, "b", "w" ); -+ARM_WRITEX ( w, uint16_t, "h", "w" ); -+ARM_WRITEX ( l, uint32_t, "", "w" ); -+ARM_WRITEX ( q, uint64_t, "", "" ); - #else --ARM_WRITEX ( writeb, uint8_t, "b", "" ); --ARM_WRITEX ( writew, uint16_t, "h", "" ); --ARM_WRITEX ( writel, uint32_t, "", "" ); -+ARM_WRITEX ( b, uint8_t, "b", "" ); -+ARM_WRITEX ( w, uint16_t, "h", "" ); -+ARM_WRITEX ( l, uint32_t, "", "" ); - #endif - -+/* -+ * Dummy PIO reads and writes up to 32 bits -+ * -+ * There is no common standard for I/O-space access for ARM, and -+ * non-MMIO peripherals are vanishingly rare. Provide dummy -+ * implementations that will allow code to link and should cause -+ * drivers to simply fail to detect hardware at runtime. -+ * -+ */ -+ -+#define ARM_INX( _suffix, _type ) \ -+static inline __always_inline _type \ -+IOAPI_INLINE ( arm, in ## _suffix ) ( volatile _type *io_addr __unused) { \ -+ return ~( (_type) 0 ); \ -+} \ -+static inline __always_inline void \ -+IOAPI_INLINE ( arm, ins ## _suffix ) ( volatile _type *io_addr __unused, \ -+ _type *data, unsigned int count ) { \ -+ memset ( data, 0xff, count * sizeof ( *data ) ); \ -+} -+ARM_INX ( b, uint8_t ); -+ARM_INX ( w, uint16_t ); -+ARM_INX ( l, uint32_t ); -+ -+#define ARM_OUTX( _suffix, _type ) \ -+static inline __always_inline void \ -+IOAPI_INLINE ( arm, out ## _suffix ) ( _type data __unused, \ -+ volatile _type *io_addr __unused ) { \ -+ /* Do nothing */ \ -+} \ -+static inline __always_inline void \ -+IOAPI_INLINE ( arm, outs ## _suffix ) ( volatile _type *io_addr __unused, \ -+ const _type *data __unused, \ -+ unsigned int count __unused ) { \ -+ /* Do nothing */ \ -+} -+ARM_OUTX ( b, uint8_t ); -+ARM_OUTX ( w, uint16_t ); -+ARM_OUTX ( l, uint32_t ); -+ - /* - * Slow down I/O - * diff --git a/0001-build-customize-configuration.patch b/0001-build-customize-configuration.patch index 03f3da1514ba53904edc225fbcd4c7a916cb3bd6..9763ba030b06db1f1b76896d04d7f9a98c279db8 100644 --- a/0001-build-customize-configuration.patch +++ b/0001-build-customize-configuration.patch @@ -1,17 +1,8 @@ -From: Paolo Bonzini -Date: Tue, 17 Nov 2015 11:56:06 -0500 -Subject: [PATCH ipxe] build: customize configuration - -diff --git a/src/config/local/general.h b/src/config/local/general.h -index 5814511..47d0e1a 100644 ---- a/src/config/local/general.h -+++ b/src/config/local/general.h -@@ -0,0 +1,5 @@ -+#undef ROM_BANNER_TIMEOUT -+#define ROM_BANNER_TIMEOUT 0 -+ +diff -rupN ipxe-20190125-git36a4c85f/src/config/local/general.h ipxe-20190125-git36a4c85f.new/src/config/local/general.h +--- ipxe-20190125-git36a4c85f/src/config/local/general.h 1970-01-01 01:00:00.000000000 +0100 ++++ ipxe-20190125-git36a4c85f.new/src/config/local/general.h 2019-02-01 16:40:42.725293033 +0000 +@@ -0,0 +1,4 @@ +/* Enable IPv6. */ +#define NET_PROTO_IPV6 --- -2.9.3 - ++/* Enable HTTPS */ ++#define DOWNLOAD_PROTO_HTTPS diff --git a/0001-efi-perform-cable-detection-at-NII-initialization-on-HPE-557SFP.patch b/0001-efi-perform-cable-detection-at-NII-initialization-on-HPE-557SFP.patch deleted file mode 100644 index 91385f1975b6a6fa999cc4745cbdd95fc7a449af..0000000000000000000000000000000000000000 --- a/0001-efi-perform-cable-detection-at-NII-initialization-on-HPE-557SFP.patch +++ /dev/null @@ -1,119 +0,0 @@ -From 2de005e9ac399f7064968a2611f266dc86a96700 Mon Sep 17 00:00:00 2001 -From: Laszlo Ersek -Date: Fri, 24 Jul 2020 19:15:28 +0200 -Subject: [PATCH] [efi] perform cable detection at NII initialization on HPE - 557SFP+ - -Commit c0b61bad99ba ("[efi] Work around bugs in Emulex NII driver", -2015-08-17) added PXE_OPFLAGS_INITIALIZE_DETECT_CABLE to nii_open() for -working around Emulex NII driver bugs. - -That broke some Mellanox drivers, so commit 6324227dcaa8 ("[efi] Skip -cable detection at initialisation where possible", 2017-03-19) predicated -PXE_OPFLAGS_INITIALIZE_DETECT_CABLE on the NII driver's *inability* to -report link status. - -This in turn breaks the NII driver on (some?) HPE 557SFP+ cards, as those -drivers are capable of reporting link status, but they still need cable -detection. - -So check for this card (through PCI vendor / device / subsys vendor / -subsys device identifiers), and opt for cable detection regardless of link -status reporting. - -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1740827 -Signed-off-by: Laszlo Ersek ---- - src/drivers/net/efi/nii.c | 43 ++++++++++++++++++++++++++++++++++++--- - 1 file changed, 40 insertions(+), 3 deletions(-) - -diff --git a/src/drivers/net/efi/nii.c b/src/drivers/net/efi/nii.c -index 2d87e0c63f14..0cf065e0818f 100644 ---- a/src/drivers/net/efi/nii.c -+++ b/src/drivers/net/efi/nii.c -@@ -193,6 +193,9 @@ struct nii_nic { - - /** Mapping list */ - struct list_head mappings; -+ -+ /** quirk needed for HPE 557SFP+ */ -+ int quirk_hpe557sfpp; - }; - - /** Maximum number of received packets per poll */ -@@ -219,6 +222,7 @@ static int nii_pci_open ( struct nii_nic *nii ) { - int bar; - EFI_STATUS efirc; - int rc; -+ uint16_t vid, did, subsys_vid, subsys_did; - - /* Locate PCI I/O protocol */ - if ( ( rc = efi_locate_device ( device, &efi_pci_io_protocol_guid, -@@ -255,7 +259,7 @@ static int nii_pci_open ( struct nii_nic *nii ) { - rc = -EEFI ( efirc ); - DBGC ( nii, "NII %s could not get BAR %d attributes: " - "%s\n", nii->dev.name, bar, strerror ( rc ) ); -- goto err_get_bar_attributes; -+ goto err_pci; - } - if ( desc.acpi->ResType == ACPI_ADDRESS_SPACE_TYPE_MEM ) { - nii->mem_bar = bar; -@@ -276,9 +280,36 @@ static int nii_pci_open ( struct nii_nic *nii ) { - DBGC ( nii, "no I/O BAR\n" ); - } - -+ /* Check if HPE 557SFP+ quirk is needed */ -+ if ( ( efirc = nii->pci_io->Pci.Read ( nii->pci_io, -+ EfiPciIoWidthUint16, -+ PCI_VENDOR_ID, 1, -+ &vid ) ) != 0 || -+ ( efirc = nii->pci_io->Pci.Read ( nii->pci_io, -+ EfiPciIoWidthUint16, -+ PCI_DEVICE_ID, 1, -+ &did ) ) != 0 || -+ ( efirc = nii->pci_io->Pci.Read ( nii->pci_io, -+ EfiPciIoWidthUint16, -+ PCI_SUBSYSTEM_VENDOR_ID, 1, -+ &subsys_vid ) ) != 0 || -+ ( efirc = nii->pci_io->Pci.Read ( nii->pci_io, -+ EfiPciIoWidthUint16, -+ PCI_SUBSYSTEM_ID, 1, -+ &subsys_did ) ) != 0 ) { -+ rc = -EEFI ( efirc ); -+ DBGC ( nii, "NII %s could not read PCI config space: %s\n", -+ nii->dev.name, strerror ( rc ) ); -+ goto err_pci; -+ } -+ -+ nii->quirk_hpe557sfpp = ( vid == 0x10df && -+ did == 0x0720 && -+ subsys_vid == 0x103c && -+ subsys_did == 0x803f ); - return 0; - -- err_get_bar_attributes: -+ err_pci: - bs->CloseProtocol ( pci_device, &efi_pci_io_protocol_guid, - efi_image_handle, device ); - err_open: -@@ -1144,8 +1175,14 @@ static int nii_open ( struct net_device *netdev ) { - * cable detection at this point if any only if the driver is - * not capable of reporting link status changes at runtime via - * PXE_OPCODE_GET_STATUS. -+ * -+ * HPE 557SFP+ seems to break with -+ * PXE_OPFLAGS_INITIALIZE_DO_NOT_DETECT_CABLE, but works with -+ * PXE_OPFLAGS_INITIALIZE_DETECT_CABLE, so ignore link status reporting -+ * for that NIC, and always request cable detection. - */ -- flags = ( nii->media ? PXE_OPFLAGS_INITIALIZE_DO_NOT_DETECT_CABLE -+ flags = ( ( ! nii->quirk_hpe557sfpp ) && nii->media -+ ? PXE_OPFLAGS_INITIALIZE_DO_NOT_DETECT_CABLE - : PXE_OPFLAGS_INITIALIZE_DETECT_CABLE ); - if ( ( rc = nii_initialise_flags ( nii, flags ) ) != 0 ) - goto err_initialise; - -base-commit: b76052335788d0ad2c4b0bded116c3b02dd4bbc2 --- -2.19.1.3.g30247aa5d201 - diff --git a/1001-ipxe-gcc10.patch b/1001-ipxe-gcc10.patch deleted file mode 100644 index 9df561f67badecdb163cebca00a63e2fa8a187d0..0000000000000000000000000000000000000000 --- a/1001-ipxe-gcc10.patch +++ /dev/null @@ -1,27 +0,0 @@ -From f982a712979619dbae2c6e0d741757e2ce94be11 Mon Sep 17 00:00:00 2001 -From: Bruce Rogers -Date: Wed, 6 May 2020 15:03:02 -0600 -Subject: [PATCH] [build] Be explicit about -fcommon compiler directive - -gcc10 switched default behavior from -fcommon to -fno-common. Since -"__shared" relies on the legacy behavior, explicitly specify it. - -Signed-off-by: Bruce Rogers -Modified-by: Michael Brown -Signed-off-by: Michael Brown ---- - src/Makefile.housekeeping | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping -index 66d6dd449..b6c61c112 100644 ---- a/src/Makefile.housekeeping -+++ b/src/Makefile.housekeeping -@@ -418,6 +418,7 @@ CFLAGS += -Os - CFLAGS += -g - ifeq ($(CCTYPE),gcc) - CFLAGS += -ffreestanding -+CFLAGS += -fcommon - CFLAGS += -Wall -W -Wformat-nonliteral - HOST_CFLAGS += -Wall -W -Wformat-nonliteral - endif diff --git a/download b/download index 4e060dc51bcec3b2979b3a50dbd5bc5e8e74c72d..e500af8d93cc2b1accb5e0b52ab1b25b20115b58 100644 --- a/download +++ b/download @@ -1 +1 @@ -54c170ba00b6e92fe7e78d31e36ca04e ipxe-20181214-git133f4c47.tar.xz +a3139682cab3383e7f7826f0d74fbe32 ipxe-20200823-git4bd064de.tar.xz diff --git a/ipxe-vlan-cmds.patch b/ipxe-Add-VLAN-tagging-support.patch similarity index 34% rename from ipxe-vlan-cmds.patch rename to ipxe-Add-VLAN-tagging-support.patch index c5dfa4322933bec91f29cbdc9b2351b0a242e4aa..8e5bbed3f677b67c9c95ea509f51bdc62243871b 100644 --- a/ipxe-vlan-cmds.patch +++ b/ipxe-Add-VLAN-tagging-support.patch @@ -1,6 +1,25 @@ -diff -up ./src/config/general.h.vlan ./src/config/general.h ---- ./src/config/general.h.vlan 2018-10-09 13:11:42.940904753 -0400 -+++ ./src/config/general.h 2018-10-09 13:12:03.258821711 -0400 +From 2a9170ed88dc55d601a70d34f2d93157dc30e307 Mon Sep 17 00:00:00 2001 +From: Miroslav Rezanina +Date: Mon, 2 Aug 2021 08:33:47 -0400 +Subject: [PATCH 2/5] Add VLAN tagging support + +RH-Author: Miroslav Rezanina +RH-MergeRequest: 6: Forwardport missing RHEL 8 downsteream changes +RH-Commit: [2/5] 3359f0d96c8743abefdf1b81857c84f4e7312f9d (mrezanin/centos-src-ipxe) +RH-Bugzilla: 1985658 + +RHEL 8 added support for VLAN tagging. We need to add it to RHEL 9 +so we are not regressing. + +Signed-off-by: Miroslav Rezanina +--- + src/config/general.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/config/general.h b/src/config/general.h +index 5adf6a35..a6df71b5 100644 +--- a/src/config/general.h ++++ b/src/config/general.h @@ -140,7 +140,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); //#define TIME_CMD /* Time commands */ //#define DIGEST_CMD /* Image crypto digest commands */ @@ -10,3 +29,6 @@ diff -up ./src/config/general.h.vlan ./src/config/general.h //#define PXE_CMD /* PXE commands */ //#define REBOOT_CMD /* Reboot command */ //#define POWEROFF_CMD /* Power off command */ +-- +2.27.0 + diff --git a/ipxe-ping-cmd.patch b/ipxe-Add-ping-command-support.patch similarity index 33% rename from ipxe-ping-cmd.patch rename to ipxe-Add-ping-command-support.patch index edbcbef0b7d6ba6498066f1b3d84862fbc2b25c2..018c17f17e83969e7344e7d31bc8ba718a4565dd 100644 --- a/ipxe-ping-cmd.patch +++ b/ipxe-Add-ping-command-support.patch @@ -1,5 +1,27 @@ ---- ./src/config/general.h.orig 2021-01-26 19:47:08.940559209 -0500 -+++ ./src/config/general.h 2021-01-26 19:47:15.739526567 -0500 +From 4d004e6a535c4f102c7b91c2f4d259cebaf1fb69 Mon Sep 17 00:00:00 2001 +From: Miroslav Rezanina +Date: Mon, 2 Aug 2021 08:11:12 -0400 +Subject: [PATCH 1/5] Add ping command support + +RH-Author: Miroslav Rezanina +RH-MergeRequest: 6: Forwardport missing RHEL 8 downsteream changes +RH-Commit: [1/5] f95713f55d7af7970d39462c94b866f833eedca1 (mrezanin/centos-src-ipxe) +RH-Bugzilla: 1985658 + +To allow trouble shooting ipxe issues, ping command were added to +RHEL 8 (see BZ 1913719). + +Adding this command to RHEL 9 to prevent regression from RHEL 8 functionality. + +Signed-off-by: Miroslav Rezanina +--- + src/config/general.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/config/general.h b/src/config/general.h +index 3c14a2cd..5adf6a35 100644 +--- a/src/config/general.h ++++ b/src/config/general.h @@ -148,7 +148,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); //#define PCI_CMD /* PCI commands */ //#define PARAM_CMD /* Form parameter commands */ @@ -9,3 +31,6 @@ //#define CONSOLE_CMD /* Console command */ //#define IPSTAT_CMD /* IP statistics commands */ //#define PROFSTAT_CMD /* Profiling commands */ +-- +2.27.0 + diff --git a/ipxe-Disable-SHA-1.patch b/ipxe-Disable-SHA-1.patch new file mode 100644 index 0000000000000000000000000000000000000000..e66cad1834cef26debacb2451207d9e4c04933d5 --- /dev/null +++ b/ipxe-Disable-SHA-1.patch @@ -0,0 +1,33 @@ +From e50ff50417dca26223b771d2a93cf57d4f627104 Mon Sep 17 00:00:00 2001 +From: Gerd Hoffmann +Date: Thu, 22 Jul 2021 15:49:51 +0200 +Subject: [PATCH 1/4] Disable SHA-1 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +RH-Author: Gerd Hoffmann +RH-MergeRequest: 5: Disable SHA-1 +RH-Commit: [1/1] 23f1cca1f3ac86958088c41e0f8122dde74c72cf (kraxel/ipxe) +RH-Bugzilla: 1935932 +RH-Acked-by: Daniel P. Berrangé +RH-Acked-by: Philippe Mathieu-Daudé + +Signed-off-by: Gerd Hoffmann +Signed-off-by: Miroslav Rezanina +--- + src/config/local/crypto.h | 2 ++ + 1 file changed, 2 insertions(+) + create mode 100644 src/config/local/crypto.h + +diff --git a/src/config/local/crypto.h b/src/config/local/crypto.h +new file mode 100644 +index 00000000..ff4a5b7f +--- /dev/null ++++ b/src/config/local/crypto.h +@@ -0,0 +1,2 @@ ++/** disable SHA-1 digest algorithm */ ++#undef CRYPTO_DIGEST_SHA1 +-- +2.27.0 + diff --git a/0003-Strip-802.1Q-VLAN-0-priority-tags.patch b/ipxe-netdevice-Strip-802.Q-VLAN-0-priority-tags.patch similarity index 56% rename from 0003-Strip-802.1Q-VLAN-0-priority-tags.patch rename to ipxe-netdevice-Strip-802.Q-VLAN-0-priority-tags.patch index e7289a682a0c976e522064cb49637fa65afb94e8..cf9c7983bb81765ecce29a0474aaf5e44bc79b33 100644 --- a/0003-Strip-802.1Q-VLAN-0-priority-tags.patch +++ b/ipxe-netdevice-Strip-802.Q-VLAN-0-priority-tags.patch @@ -1,16 +1,12 @@ -From 1a921ececb22bbc41d1fda34576564e84d124a83 Mon Sep 17 00:00:00 2001 -From: Ladi Prosek -Date: Mon, 11 Jul 2016 14:17:36 +0200 -Subject: Strip 802.1Q VLAN 0 priority tags +From ff3a5af3d7f78577899626b2f8b612369e051916 Mon Sep 17 00:00:00 2001 +From: Miroslav Rezanina +Date: Mon, 2 Aug 2021 08:32:33 -0400 +Subject: [PATCH 3/5] [netdevice] Strip 802.Q VLAN 0 priority tags -RH-Author: Ladi Prosek -Message-id: <1468246656-15560-1-git-send-email-lprosek@redhat.com> -Patchwork-id: 71112 -O-Subject: [RHEL7.3 ipxe PATCH] [netdevice] Strip 802.Q VLAN 0 priority tags -Bugzilla: 1316329 -RH-Acked-by: Stefan Hajnoczi -RH-Acked-by: Laszlo Ersek -RH-Acked-by: Xiao Wang +RH-Author: Miroslav Rezanina +RH-MergeRequest: 6: Forwardport missing RHEL 8 downsteream changes +RH-Commit: [3/5] 440560659da2028f365a71b4ed4991955022dce5 (mrezanin/centos-src-ipxe) +RH-Bugzilla: 1985658 iPXE was unable to receive priority tagged packets specified in the 802.1Q standard and supported by all major networking stacks. @@ -22,21 +18,24 @@ headers. Upstream patch: http://lists.ipxe.org/pipermail/ipxe-devel/2016-July/005099.html -There is a difference between the upstream patch and this patch in the -path prefix of "interface/pxe/pxe_undi.c" because we don't have upstream -commit f468f12b1eca. +Downstream changes: +Upstream commit fe680c822856 made vlan_find static. This prevents +it's usage int this patch. Reverting changes adding static for +vlan_find. Signed-off-by: Ladi Prosek Signed-off-by: Miroslav Rezanina --- - src/arch/x86/interface/pxe/pxe_undi.c | 6 +++++ - src/include/ipxe/netdevice.h | 2 ++ - src/interface/efi/efi_snp.c | 7 ++++++ - src/net/netdevice.c | 44 +++++++++++++++++++++++++++++++++++ - 4 files changed, 59 insertions(+) + src/arch/x86/interface/pxe/pxe_undi.c | 6 +++ + src/include/ipxe/netdevice.h | 2 + + src/include/ipxe/vlan.h | 2 + + src/interface/efi/efi_snp.c | 7 ++++ + src/net/netdevice.c | 57 +++++++++++++++++++++++++++ + src/net/vlan.c | 2 +- + 6 files changed, 75 insertions(+), 1 deletion(-) diff --git a/src/arch/x86/interface/pxe/pxe_undi.c b/src/arch/x86/interface/pxe/pxe_undi.c -index 2eb6817..2ea1451 100644 +index 2eb68178..2ea14515 100644 --- a/src/arch/x86/interface/pxe/pxe_undi.c +++ b/src/arch/x86/interface/pxe/pxe_undi.c @@ -976,6 +976,12 @@ static PXENV_EXIT_t pxenv_undi_isr ( struct s_PXENV_UNDI_ISR *undi_isr ) { @@ -53,10 +52,10 @@ index 2eb6817..2ea1451 100644 switch ( net_proto ) { case htons ( ETH_P_IP ): diff --git a/src/include/ipxe/netdevice.h b/src/include/ipxe/netdevice.h -index a1d207f..cea87f7 100644 +index d498ab69..27dda45d 100644 --- a/src/include/ipxe/netdevice.h +++ b/src/include/ipxe/netdevice.h -@@ -719,6 +719,8 @@ extern int net_tx ( struct io_buffer *iobuf, struct net_device *netdev, +@@ -726,6 +726,8 @@ extern int net_tx ( struct io_buffer *iobuf, struct net_device *netdev, extern int net_rx ( struct io_buffer *iobuf, struct net_device *netdev, uint16_t net_proto, const void *ll_dest, const void *ll_source, unsigned int flags ); @@ -65,11 +64,24 @@ index a1d207f..cea87f7 100644 extern void net_poll ( void ); extern struct net_device_configurator * find_netdev_configurator ( const char *name ); +diff --git a/src/include/ipxe/vlan.h b/src/include/ipxe/vlan.h +index 7f93439b..b82f3806 100644 +--- a/src/include/ipxe/vlan.h ++++ b/src/include/ipxe/vlan.h +@@ -61,6 +61,8 @@ struct vlan_header { + */ + #define VLAN_PRIORITY_IS_VALID( priority ) ( (priority) <= 7 ) + ++extern struct net_device * vlan_find ( struct net_device *trunk, ++ unsigned int tag ); + extern unsigned int vlan_tag ( struct net_device *netdev ); + extern int vlan_can_be_trunk ( struct net_device *trunk ); + extern int vlan_create ( struct net_device *trunk, unsigned int tag, diff --git a/src/interface/efi/efi_snp.c b/src/interface/efi/efi_snp.c -index e6388bf..d1a1a44 100644 +index d648700f..a8f2ac8e 100644 --- a/src/interface/efi/efi_snp.c +++ b/src/interface/efi/efi_snp.c -@@ -745,6 +745,13 @@ efi_snp_receive ( EFI_SIMPLE_NETWORK_PROTOCOL *snp, +@@ -813,6 +813,13 @@ efi_snp_receive ( EFI_SIMPLE_NETWORK_PROTOCOL *snp, goto out_bad_ll_header; } @@ -84,13 +96,15 @@ index e6388bf..d1a1a44 100644 if ( ll_header_len ) *ll_header_len = ll_protocol->ll_header_len; diff --git a/src/net/netdevice.c b/src/net/netdevice.c -index 9df2119..c53d5e3 100644 +index 3b02e64b..95803f26 100644 --- a/src/net/netdevice.c +++ b/src/net/netdevice.c -@@ -1028,6 +1028,44 @@ int net_rx ( struct io_buffer *iobuf, struct net_device *netdev, +@@ -1043,6 +1043,45 @@ int net_rx ( struct io_buffer *iobuf, struct net_device *netdev, + return -ENOTSUP; } - /** ++ ++/** + * Strip extra link-layer-independent tags from a received packet + * + * @v iobuf I/O buffer @@ -128,11 +142,10 @@ index 9df2119..c53d5e3 100644 + return 0; +} + -+/** + /** * Poll the network stack * - * This polls all interfaces for received packets, and processes -@@ -1078,6 +1116,12 @@ void net_poll ( void ) { +@@ -1094,6 +1133,12 @@ void net_poll ( void ) { continue; } @@ -145,6 +158,38 @@ index 9df2119..c53d5e3 100644 /* Hand packet to network layer */ if ( ( rc = net_rx ( iob_disown ( iobuf ), netdev, net_proto, ll_dest, +@@ -1125,6 +1170,18 @@ __weak unsigned int vlan_tag ( struct net_device *netdev __unused ) { + return 0; + } + ++/** ++ * Identify VLAN device (when VLAN support is not present) ++ * ++ * @v netdev Network device ++ * @v tag VLAN tag, or zero ++ * @v iobuf I/O buffer ++ */ ++__weak struct net_device * vlan_find ( struct net_device *trunk __unused, ++ unsigned int tag __unused ) { ++ return NULL; ++} ++ + /** + * Add VLAN tag-stripped packet to queue (when VLAN support is not present) + * +diff --git a/src/net/vlan.c b/src/net/vlan.c +index 90f2934d..0f234ea5 100644 +--- a/src/net/vlan.c ++++ b/src/net/vlan.c +@@ -199,7 +199,7 @@ static void vlan_sync ( struct net_device *netdev ) { + * @v tag VLAN tag + * @ret netdev VLAN device, if any + */ +-static struct net_device * vlan_find ( struct net_device *trunk, ++struct net_device * vlan_find ( struct net_device *trunk, + unsigned int tag ) { + struct net_device *netdev; + struct vlan_device *vlan; -- -1.8.3.1 +2.27.0 diff --git a/ipxe.spec b/ipxe.spec index c10be1da55037e5fddca6c9c2402e8253816fc94..71513baa6b9ccf89e9d16c29243b62190a1b5c81 100644 --- a/ipxe.spec +++ b/ipxe.spec @@ -1,18 +1,18 @@ -%define anolis_release .0.1 -# Resulting binary formats we want from iPXE -%global formats rom +# ROMS we want for QEMU with format PCIID:QEMUNAME +%global qemuroms \\\ + 8086100e:e1000 \\\ + 10ec8139:rtl8139 \\\ + 1af41000:virtio \\\ + 808610d3:e1000e -# 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 -# eepro100: 0x8086 0x1209 -# e1000e: 0x8086 0x10d3 -# vmxnet3: 0x15ad 0x07b0 -%global qemuroms 10222000 10ec8029 8086100e 10ec8139 1af41000 80861209 808610d3 15ad07b0 +%if 0%{?fedora} +# Fedora specific roms +%global qemuroms %{qemuroms} \\\ + 10222000:pcnet \\\ + 10ec8029:ne2k_pci \\\ + 80861209:eepro100 \\\ + 15ad07b0:vmxnet3 +%endif # 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 @@ -34,15 +34,14 @@ # # And then change these two: -%global hash 133f4c47 -%global date 20181214 +%global hash 4bd064de +%global date 20200823 Name: ipxe Version: %{date} -Release: 9.git%{hash}%{anolis_release}%{?dist} +Release: 9.git%{hash}%{?dist} Summary: A network boot loader -Group: System Environment/Base License: GPLv2 with additional permissions and BSD URL: http://ipxe.org/ @@ -53,24 +52,31 @@ Source1: script.ipxe # Sent upstream: http://lists.ipxe.org/pipermail/ipxe-devel/2015-November/004494.html Patch0001: 0001-build-customize-configuration.patch Patch0002: 0002-Use-spec-compliant-timeouts.patch -Patch0003: 0003-Strip-802.1Q-VLAN-0-priority-tags.patch -Patch0004: ipxe-vlan-cmds.patch -Patch0005: 0001-efi-perform-cable-detection-at-NII-initialization-on-HPE-557SFP.patch -Patch0006: ipxe-ping-cmd.patch -Patch0007: 0001-arm-Provide-dummy-implementation-for-in-out-s-b-w-l.patch +# For bz#1935932 - ipxe implements and/or uses the deprecated SHA-1 algorithm by default ( +Patch3: ipxe-Disable-SHA-1.patch +# For bz#1985658 - carry forward rhel8 ipxe packaging changes +Patch4: ipxe-Add-ping-command-support.patch +# For bz#1985658 - carry forward rhel8 ipxe packaging changes +Patch5: ipxe-Add-VLAN-tagging-support.patch +# For bz#1985658 - carry forward rhel8 ipxe packaging changes +Patch6: ipxe-netdevice-Strip-802.Q-VLAN-0-priority-tags.patch -# Begin: Anolis customized patches -Patch1001: 1001-ipxe-gcc10.patch -# End: Anolis customized patches +# Source-git patches %ifarch %{buildarches} BuildRequires: perl-interpreter BuildRequires: perl-Getopt-Long +%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9 +BuildRequires: perl-FindBin +BuildRequires: perl-lib +%endif BuildRequires: mtools -BuildRequires: mkisofs +BuildRequires: xorriso BuildRequires: edk2-tools BuildRequires: xz-devel +BuildRequires: gcc BuildRequires: binutils-devel +BuildRequires: make %endif %ifarch x86_64 BuildRequires: syslinux @@ -81,27 +87,23 @@ Obsoletes: gpxe <= 1.0.1 %ifarch x86_64 %package rhcert Summary: Redhat hwcert custom ipxe image -Group: Development/Tools BuildArch: noarch %package bootimgs-x86 -Summary: X86 Network boot loader images in bootable USB, CD, floppy and GRUB formats -Group: Development/Tools +Summary: Network boot loader images in bootable USB, CD, floppy and GRUB formats BuildArch: noarch Provides: %{name}-bootimgs = %{version}-%{release} -Obsoletes: %{name}-bootimgs < 20181214-9.git133f4c47 +Obsoletes: %{name}-bootimgs < %{version}-%{release} 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 @@ -188,7 +190,9 @@ make_ipxe ISOLINUX_BIN=/usr/share/syslinux/isolinux.bin \ # build roms with efi support for qemu mkdir bin-combined -for rom in %{qemuroms}; do +for romstr in %{qemuroms}; do + rom=$(echo "$romstr" | cut -d ":" -f 1) + make_ipxe CONFIG=qemu bin/${rom}.rom make_ipxe CONFIG=qemu bin-x86_64-efi/${rom}.efidrv vid="0x${rom%%????}" @@ -224,35 +228,41 @@ 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 +for img in *.rom; do + if [ -e $img ]; then + cp -a $img %{buildroot}/%{_datadir}/%{name}/ + echo %{_datadir}/%{name}/$img >> ../../rom.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 -cp -a src/bin-x86_64-efi/ipxe-rhcert.efi %{buildroot}/%{_datadir}/%{name}/ipxe-x86_64-rhcert.efi cp -a src/bin-x86_64-efi/snponly.efi %{buildroot}/%{_datadir}/%{name}/ipxe-snponly-x86_64.efi +cp -a src/bin-x86_64-efi/ipxe-rhcert.efi %{buildroot}/%{_datadir}/%{name}/ipxe-x86_64-rhcert.efi + +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) + sed -i -e "/\/${rom}.rom/d" rom.list + echo %{_datadir}/%{name}/${rom}.rom >> qemu.rom.list -# 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 -for rom in %{qemuroms}; do cp src/bin-combined/${rom}.rom %{buildroot}/%{_datadir}/%{name}.efi/ echo %{_datadir}/%{name}.efi/${rom}.rom >> qemu.rom.list + + # 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 done + +# endif buildarches %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 @@ -281,6 +291,7 @@ cp -a src/bin-arm64-efi/ipxe.efi %{buildroot}/%{_datadir}/%{name}/arm64-efi/ipxe %files roms-qemu -f qemu.rom.list %dir %{_datadir}/%{name} %dir %{_datadir}/%{name}.efi +%{_datadir}/%{name}/qemu %doc COPYING COPYING.GPLv2 COPYING.UBDL %files rhcert @@ -299,43 +310,92 @@ cp -a src/bin-arm64-efi/ipxe.efi %{buildroot}/%{_datadir}/%{name}/arm64-efi/ipxe %endif %changelog -* Mon May 16 2022 liuxiaoping - 20181214-9.git133f4c47.0.1 -- Fix gcc10 -fno-common compile issue for compatible with gcc10 build (geliwei@openanolis.org) - -* Tue Mar 01 2022 Yaakov Selkowitz - 20181214-9.git133f4c47 -- Add ARM 64 EFI artifacts (bz 2059350) - -* Fri Feb 19 2021 Jarod Wilson - 20181210-8.git133f4c47 -- combine BIOS and EFI roms using utils/catrom.pl [lersek] (bz 1926561) - -* Tue Jan 26 2021 Jarod Wilson - 20181210-7.git133f4c47 -- Build ping command (bz 1913719) - -* Mon Jul 27 2020 Neil Horman - 20181210-6.git133f4c47 -- Add quirk for link detect on HP 557SFP cards (bz 1740827) - -* Tue Jan 7 2020 Neil Horman - 20181210-5.git133f4c47 -- Add rhcert subpackage (bz 1756012) - -* Fri Dec 13 2019 Neil Horman - 20181210-4.git133f4c47 -- Add snponly.efi image (bz 1776929) - -* Tue Aug 13 2019 Danilo de Paula - 20181210-3.git133f4c47 -- Release bump - -* Thu Jul 25 2019 Danilo de Paula - 20181210-2.git133f4c47 -- Resolves rhbz#1723702 - (virtio rom near 256k boundary) - -* Fri Dec 14 2018 Neil Horman - 20181210-1.git133f4c47 -- Update to latest upstream -- Add vlan cmds - -* Fri Nov 16 2018 Danilo C. L. de Paula - 20170710-6.git0600d3ae -- rebuilt - -* Thu Jul 12 2018 Danilo - 20170710-5.git0600d3ae -- Bumping release number and rebuilding ipxe for RHEL-8.0 +* Tue Apr 05 2022 Jarod Wilson - 20200823-9.git4bd064de +- Fix Obsoletes: and changelog versioning + +* Tue Mar 15 2022 Yaakov Selkowitz - 20200823-8.git4bd064de +- Add ARM 64 EFI artifacts (bz 2059349) + +* Mon Aug 09 2021 Mohan Boddu - 20200823-7.git4bd064de +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Sat Aug 07 2021 Miroslav Rezanina - 20200823-6.git4bd064de +- ipxe-Add-ping-command-support.patch [bz#1985658] +- ipxe-Add-VLAN-tagging-support.patch [bz#1985658] +- ipxe-netdevice-Strip-802.Q-VLAN-0-priority-tags.patch [bz#1985658] +- ipxe-Provide-snponly.efi-rom.patch [bz#1985658] +- ipxe-Build-hwcert-subpackage.patch [bz#1985658] +- Resolves: bz#1985658 + (carry forward rhel8 ipxe packaging changes) + +* Mon Jul 26 2021 Miroslav Rezanina - 20200823-5.git4bd064de +- ipxe-Disable-SHA-1.patch [bz#1935932] +- ipxe-Replace-genisoimage-with-xorriso.patch [bz#1971981] +- ipxe-spec-Drop-disabled-efi-ia32-build-infrastructure.patch [bz#1980138] +- ipxe-spec-Generate-qemu-compatible-rom-filenames.patch [bz#1980138] +- Resolves: bz#1935932 + (ipxe implements and/or uses the deprecated SHA-1 algorithm by default () +- Resolves: bz#1971981 + (Please replace genisoimage with xorriso) +- Resolves: bz#1980138 + (install qemu rom symlinks so qemu doesn't have to) + +* Tue Jun 08 2021 Miroslav Rezanina - 20200823-4.git4bd064de +- ipxe-Skip-some-QEMU-ROMs-when-building-for-RHEL.patch [bz#1956931] +- ipxe-spec-combine-BIOS-and-EFI-roms-using-util-catrom.pl.patch [bz#1957246] +- Resolves: bz#1956931 + (ipxe-roms-qemu list: Clean out old ROMs) +- Resolves: bz#1957246 + (boot vm from pxe failed) + +* Fri Apr 16 2021 Mohan Boddu - 20200823-3.git4bd064de +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Tue Jan 26 2021 Fedora Release Engineering - 20200823-2.git4bd064de +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Sep 15 2020 Cole Robinson - 20200823-1.git4bd064de.git +- Update to newer git snapshot, synced with qemu.git +- Re-enable HTTPS support, with edk2 fix included (bz 1820836) + +* Fri Sep 04 2020 Merlin Mathesius - 20190125-9.git36a4c85f +- Workaound fatal GCC 9 compilation/link errors +- Fix conditionals for perl BuildRequires + +* Mon Aug 17 2020 Cole Robinson - 20190125-8.git36a4c85f +- Revert HTTPS support, causes boot hangs with UEFI (bz 1869102) + +* Tue Aug 11 2020 Cole Robinson - 20190125-7.git36a4c85f +- Enable HTTPS support (bug 1820836) + +* Wed Jul 29 2020 Richard W.M. Jones - 20190125-6.git36a4c85f +- Explicitly BR perl-FindBin and perl-lib. + +* Tue Jul 28 2020 Fedora Release Engineering - 20190125-5.git36a4c85f +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jan 29 2020 Fedora Release Engineering - 20190125-4.git36a4c85f +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 20190125-3.git36a4c85f +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue Jul 16 2019 Paolo Bonzini - 20190125-2.git36a4c85f +- Allow removing IA32 EFI images from combined oproms +- Check that the ROMs fit in 256K and pad them + +* Tue Feb 12 2019 Daniel P. Berrangé - 20190125-1.git36a4c85f +- Update to latest git snapshot + +* Fri Feb 01 2019 Fedora Release Engineering - 20170710-6.git0600d3ae +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Jul 23 2018 Daniel P. Berrangé - 20170710-5.git0600d3ae +- mkisofs tool moved to genisoimage RPM + +* Fri Jul 13 2018 Fedora Release Engineering - 20170710-4.git0600d3ae +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Wed Feb 07 2018 Fedora Release Engineering - 20170710-3.git0600d3ae - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/script.ipxe b/script.ipxe old mode 100755 new mode 100644