From 106a44d9aed4bb845b2c9201903c4f2b90b67f7f Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Tue, 24 Mar 2026 17:25:56 +0000 Subject: ipxe: fix build with current toolchain Update ipxe for compatibility with the current OE toolchain: - Add coreutils-native to DEPENDS for cksum (used by build system to generate checksums embedded in binary images) - Drop syslinux and cdrtools-native from DEPENDS, remove ISOLINUX_BIN from EXTRA_OEMAKE - Skip ISO and USB image generation from the ALL target - only ROM files are needed for Xen HVM and the ISO tools (genisoimage/xorrisofs) are not compatible with cdrtools' mkisofs - Drop patches applied upstream: gcc-10 warning fix, golan type casts, fcommon directive, xenver.h typo, old-style function definition, C23 reserved words, and unsafe function wrapper - Refresh ipxe-fix-hostcc-nopie-cflags.patch for new line numbers Signed-off-by: Bruce Ashfield --- ...1-build-Fix-typo-in-xenver.h-header-guard.patch | 25 -- ...2-build-Fix-old-style-function-definition.patch | 25 -- ...-Prevent-the-use-of-reserved-words-in-C23.patch | 103 -------- ...e-unsafe-disable-function-wrapper-from-le.patch | 294 --------------------- ...explicit-about-fcommon-compiler-directive.patch | 33 --- .../ipxe/files/ipxe-fix-hostcc-nopie-cflags.patch | 16 +- ...xplicit-type-casts-for-nodnic_queue_pair_.patch | 45 ---- ...Avoid-spurious-compiler-warning-on-GCC-10.patch | 91 ------- recipes-extended/ipxe/ipxe_git.bb | 15 +- 9 files changed, 14 insertions(+), 633 deletions(-) delete mode 100644 recipes-extended/ipxe/files/0001-build-Fix-typo-in-xenver.h-header-guard.patch delete mode 100644 recipes-extended/ipxe/files/0002-build-Fix-old-style-function-definition.patch delete mode 100644 recipes-extended/ipxe/files/0003-build-Prevent-the-use-of-reserved-words-in-C23.patch delete mode 100644 recipes-extended/ipxe/files/0004-build-Remove-unsafe-disable-function-wrapper-from-le.patch delete mode 100644 recipes-extended/ipxe/files/build-be-explicit-about-fcommon-compiler-directive.patch delete mode 100644 recipes-extended/ipxe/files/ipxe-golan-Add-explicit-type-casts-for-nodnic_queue_pair_.patch delete mode 100644 recipes-extended/ipxe/files/ipxe-intel-Avoid-spurious-compiler-warning-on-GCC-10.patch diff --git a/recipes-extended/ipxe/files/0001-build-Fix-typo-in-xenver.h-header-guard.patch b/recipes-extended/ipxe/files/0001-build-Fix-typo-in-xenver.h-header-guard.patch deleted file mode 100644 index 089a8143..00000000 --- a/recipes-extended/ipxe/files/0001-build-Fix-typo-in-xenver.h-header-guard.patch +++ /dev/null @@ -1,25 +0,0 @@ -From e4795a590e3b708008a7bbd944370aef5337c561 Mon Sep 17 00:00:00 2001 -From: Michael Brown -Date: Sun, 27 Apr 2025 17:33:28 +0100 -Subject: [PATCH] [build] Fix typo in xenver.h header guard - -GCC 15 helpfully reports mismatched #ifdef and #define lines in header -guards. - -Signed-off-by: Michael Brown -Upstream-Status: Backport [https://github.com/ipxe/ipxe/pull/1457] ---- - src/include/ipxe/xenver.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/include/ipxe/xenver.h b/src/include/ipxe/xenver.h -index b29dfb321..5d820a6e7 100644 ---- a/src/include/ipxe/xenver.h -+++ b/src/include/ipxe/xenver.h -@@ -1,5 +1,5 @@ - #ifndef _IPXE_XENVER_H --#define _IPXE_VENVER_H -+#define _IPXE_XENVER_H - - /** @file - * diff --git a/recipes-extended/ipxe/files/0002-build-Fix-old-style-function-definition.patch b/recipes-extended/ipxe/files/0002-build-Fix-old-style-function-definition.patch deleted file mode 100644 index 7edafd0d..00000000 --- a/recipes-extended/ipxe/files/0002-build-Fix-old-style-function-definition.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 0b5e26f82d3bb5dc49557b8c29d802911c050aaf Mon Sep 17 00:00:00 2001 -From: Michael Brown -Date: Sun, 27 Apr 2025 17:36:52 +0100 -Subject: [PATCH] [build] Fix old-style function definition - -Signed-off-by: Michael Brown -Upstream-Status: Backport [https://github.com/ipxe/ipxe/pull/1457] ---- - src/drivers/net/3c595.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/src/drivers/net/3c595.c b/src/drivers/net/3c595.c -index 92d38cfc5..c3442946e 100644 ---- a/src/drivers/net/3c595.c -+++ b/src/drivers/net/3c595.c -@@ -342,8 +342,7 @@ eeprom_rdy() - * before - */ - static int --get_e(offset) --int offset; -+get_e(int offset) - { - if (!eeprom_rdy()) - return (0xffff); diff --git a/recipes-extended/ipxe/files/0003-build-Prevent-the-use-of-reserved-words-in-C23.patch b/recipes-extended/ipxe/files/0003-build-Prevent-the-use-of-reserved-words-in-C23.patch deleted file mode 100644 index fb93d96f..00000000 --- a/recipes-extended/ipxe/files/0003-build-Prevent-the-use-of-reserved-words-in-C23.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 2f39451dbab215763c09465848b89dcf41eb71be Mon Sep 17 00:00:00 2001 -From: Miao Wang -Date: Sun, 27 Apr 2025 17:30:49 +0100 -Subject: [PATCH] [build] Prevent the use of reserved words in C23 - -GCC 15 defaults to C23, which reserves bool, true, and false as -keywords. Avoid using these as parameter or variable names. - -Modified-by: Michael Brown -Signed-off-by: Michael Brown -Upstream-Status: Backport [https://github.com/ipxe/ipxe/pull/1457] ---- - .../infiniband/mlx_utils/src/public/mlx_pci_gw.c | 4 ++-- - src/drivers/net/igbvf/igbvf_osdep.h | 7 ++----- - src/interface/efi/efi_hii.c | 12 ++++++------ - 3 files changed, 10 insertions(+), 13 deletions(-) - -diff --git a/src/drivers/infiniband/mlx_utils/src/public/mlx_pci_gw.c b/src/drivers/infiniband/mlx_utils/src/public/mlx_pci_gw.c -index 30c1e644e..0b257ed22 100644 ---- a/src/drivers/infiniband/mlx_utils/src/public/mlx_pci_gw.c -+++ b/src/drivers/infiniband/mlx_utils/src/public/mlx_pci_gw.c -@@ -32,7 +32,7 @@ mlx_status - mlx_pci_gw_check_capability_id( - IN mlx_utils *utils, - IN mlx_uint8 cap_pointer, -- OUT mlx_boolean *bool -+ OUT mlx_boolean *result - ) - { - mlx_status status = MLX_SUCCESS; -@@ -41,7 +41,7 @@ mlx_pci_gw_check_capability_id( - status = mlx_pci_read(utils, MlxPciWidthUint8, offset, - 1, &id); - MLX_CHECK_STATUS(utils, status, read_err,"failed to read capability id"); -- *bool = ( id == PCI_GW_CAPABILITY_ID ); -+ *result = ( id == PCI_GW_CAPABILITY_ID ); - read_err: - return status; - } -diff --git a/src/drivers/net/igbvf/igbvf_osdep.h b/src/drivers/net/igbvf/igbvf_osdep.h -index 8ac179de0..dc65da6c1 100644 ---- a/src/drivers/net/igbvf/igbvf_osdep.h -+++ b/src/drivers/net/igbvf/igbvf_osdep.h -@@ -35,8 +35,9 @@ FILE_LICENCE ( GPL2_ONLY ); - #ifndef _IGBVF_OSDEP_H_ - #define _IGBVF_OSDEP_H_ - -+#include -+ - #define u8 unsigned char --#define bool boolean_t - #define dma_addr_t unsigned long - #define __le16 uint16_t - #define __le32 uint32_t -@@ -51,10 +52,6 @@ FILE_LICENCE ( GPL2_ONLY ); - #define ETH_FCS_LEN 4 - - typedef int spinlock_t; --typedef enum { -- false = 0, -- true = 1 --} boolean_t; - - #define usec_delay(x) udelay(x) - #define msec_delay(x) mdelay(x) -diff --git a/src/interface/efi/efi_hii.c b/src/interface/efi/efi_hii.c -index 506fc8869..66f58affe 100644 ---- a/src/interface/efi/efi_hii.c -+++ b/src/interface/efi/efi_hii.c -@@ -147,13 +147,13 @@ void efi_ifr_end_op ( struct efi_ifr_builder *ifr ) { - */ - void efi_ifr_false_op ( struct efi_ifr_builder *ifr ) { - size_t dispaddr = ifr->ops_len; -- EFI_IFR_FALSE *false; -+ EFI_IFR_FALSE *op; - - /* Add opcode */ -- false = efi_ifr_op ( ifr, EFI_IFR_FALSE_OP, sizeof ( *false ) ); -+ op = efi_ifr_op ( ifr, EFI_IFR_FALSE_OP, sizeof ( *op ) ); - - DBGC ( ifr, "IFR %p false\n", ifr ); -- DBGC2_HDA ( ifr, dispaddr, false, sizeof ( *false ) ); -+ DBGC2_HDA ( ifr, dispaddr, op, sizeof ( *op ) ); - } - - /** -@@ -462,13 +462,13 @@ void efi_ifr_text_op ( struct efi_ifr_builder *ifr, unsigned int prompt_id, - */ - void efi_ifr_true_op ( struct efi_ifr_builder *ifr ) { - size_t dispaddr = ifr->ops_len; -- EFI_IFR_TRUE *true; -+ EFI_IFR_TRUE *op; - - /* Add opcode */ -- true = efi_ifr_op ( ifr, EFI_IFR_TRUE_OP, sizeof ( *true ) ); -+ op = efi_ifr_op ( ifr, EFI_IFR_TRUE_OP, sizeof ( *op ) ); - - DBGC ( ifr, "IFR %p true\n", ifr ); -- DBGC2_HDA ( ifr, dispaddr, true, sizeof ( *true ) ); -+ DBGC2_HDA ( ifr, dispaddr, op, sizeof ( *op ) ); - } - - /** diff --git a/recipes-extended/ipxe/files/0004-build-Remove-unsafe-disable-function-wrapper-from-le.patch b/recipes-extended/ipxe/files/0004-build-Remove-unsafe-disable-function-wrapper-from-le.patch deleted file mode 100644 index 6598882d..00000000 --- a/recipes-extended/ipxe/files/0004-build-Remove-unsafe-disable-function-wrapper-from-le.patch +++ /dev/null @@ -1,294 +0,0 @@ -From 1de32c9e11e727fe8c4eab68b331d862cb2f03e7 Mon Sep 17 00:00:00 2001 -From: Michael Brown -Date: Sun, 27 Apr 2025 17:37:44 +0100 -Subject: [PATCH] [build] Remove unsafe disable function wrapper from legacy - NIC drivers - -The legacy NIC drivers do not consistently take a second parameter in -their disable function. We currently use an unsafe function wrapper -that declares no parameters, and rely on the ABI allowing a second -parameter to be silently ignored if not expected by the caller. As of -GCC 15, this hack results in an incompatible pointer type warning. - -Fix by removing the hack, and instead updating all relevant legacy NIC -drivers to take an unused second parameter in their disable function. - -Signed-off-by: Michael Brown -Upstream-Status: Backport [https://github.com/ipxe/ipxe/pull/1457] ---- - src/drivers/net/3c595.c | 2 +- - src/drivers/net/amd8111e.c | 2 +- - src/drivers/net/bnx2.c | 8 +++++++- - src/drivers/net/davicom.c | 4 ++-- - src/drivers/net/depca.c | 2 +- - src/drivers/net/dmfe.c | 2 +- - src/drivers/net/epic100.c | 4 ++-- - src/drivers/net/ns8390.c | 2 +- - src/drivers/net/prism2_pci.c | 2 +- - src/drivers/net/prism2_plx.c | 2 +- - src/drivers/net/sis900.c | 4 ++-- - src/drivers/net/sundance.c | 2 +- - src/drivers/net/tlan.c | 2 +- - src/drivers/net/tulip.c | 4 ++-- - src/drivers/net/w89c840.c | 2 +- - src/include/nic.h | 3 +-- - 16 files changed, 26 insertions(+), 21 deletions(-) - -diff --git a/src/drivers/net/3c595.c b/src/drivers/net/3c595.c -index c3442946e..fbee739a2 100644 ---- a/src/drivers/net/3c595.c -+++ b/src/drivers/net/3c595.c -@@ -443,7 +443,7 @@ vxsetlink(void) - GO_WINDOW(1); - } - --static void t595_disable ( struct nic *nic ) { -+static void t595_disable ( struct nic *nic, void *hwdev __unused ) { - - t595_reset(nic); - -diff --git a/src/drivers/net/amd8111e.c b/src/drivers/net/amd8111e.c -index 693d77d1d..5ad55eea1 100644 ---- a/src/drivers/net/amd8111e.c -+++ b/src/drivers/net/amd8111e.c -@@ -609,7 +609,7 @@ static int amd8111e_poll(struct nic *nic, int retrieve) - return pkt_ok; - } - --static void amd8111e_disable(struct nic *nic) -+static void amd8111e_disable(struct nic *nic, void *hwdev __unused) - { - struct amd8111e_priv *lp = nic->priv_data; - -diff --git a/src/drivers/net/bnx2.c b/src/drivers/net/bnx2.c -index 4ebcc52a9..60bef7711 100644 ---- a/src/drivers/net/bnx2.c -+++ b/src/drivers/net/bnx2.c -@@ -2671,6 +2671,12 @@ err_out_disable: - return 0; - } - -+static void -+bnx2_remove(struct nic *nic, void *hwdev __unused) -+{ -+ bnx2_disable(nic); -+} -+ - static struct pci_device_id bnx2_nics[] = { - PCI_ROM(0x14e4, 0x164a, "bnx2-5706", "Broadcom NetXtreme II BCM5706", 0), - PCI_ROM(0x14e4, 0x164c, "bnx2-5708", "Broadcom NetXtreme II BCM5708", 0), -@@ -2680,7 +2686,7 @@ static struct pci_device_id bnx2_nics[] = { - - PCI_DRIVER ( bnx2_driver, bnx2_nics, PCI_NO_CLASS ); - --DRIVER ( "BNX2", nic_driver, pci_driver, bnx2_driver, bnx2_probe, bnx2_disable ); -+DRIVER ( "BNX2", nic_driver, pci_driver, bnx2_driver, bnx2_probe, bnx2_remove ); - - /* - static struct pci_driver bnx2_driver __pci_driver = { -diff --git a/src/drivers/net/davicom.c b/src/drivers/net/davicom.c -index 9d3d8b915..07c994573 100644 ---- a/src/drivers/net/davicom.c -+++ b/src/drivers/net/davicom.c -@@ -159,7 +159,7 @@ static void davicom_reset(struct nic *nic); - static void davicom_transmit(struct nic *nic, const char *d, unsigned int t, - unsigned int s, const char *p); - static int davicom_poll(struct nic *nic, int retrieve); --static void davicom_disable(struct nic *nic); -+static void davicom_disable(struct nic *nic, void *hwdev); - static void davicom_wait(unsigned int nticks); - static int phy_read(int); - static void phy_write(int, u16); -@@ -601,7 +601,7 @@ static int davicom_poll(struct nic *nic, int retrieve) - /*********************************************************************/ - /* eth_disable - Disable the interface */ - /*********************************************************************/ --static void davicom_disable ( struct nic *nic ) { -+static void davicom_disable ( struct nic *nic, void *hwdev __unused ) { - - whereami("davicom_disable\n"); - -diff --git a/src/drivers/net/depca.c b/src/drivers/net/depca.c -index 016f28bb2..30e2fcb0a 100644 ---- a/src/drivers/net/depca.c -+++ b/src/drivers/net/depca.c -@@ -644,7 +644,7 @@ static void depca_transmit( - /************************************************************************** - DISABLE - Turn off ethernet interface - ***************************************************************************/ --static void depca_disable ( struct nic *nic ) { -+static void depca_disable ( struct nic *nic, void *hwdev __unused ) { - depca_reset(nic); - - STOP_DEPCA(nic->ioaddr); -diff --git a/src/drivers/net/dmfe.c b/src/drivers/net/dmfe.c -index 2ea0d2b2b..ea14c462f 100644 ---- a/src/drivers/net/dmfe.c -+++ b/src/drivers/net/dmfe.c -@@ -435,7 +435,7 @@ static void dmfe_transmit(struct nic *nic, - /************************************************************************** - DISABLE - Turn off ethernet interface - ***************************************************************************/ --static void dmfe_disable ( struct nic *nic __unused ) { -+static void dmfe_disable ( struct nic *nic __unused, void *hwdev __unused ) { - /* Reset & stop DM910X board */ - outl(DM910X_RESET, BASE + DCR0); - udelay(5); -diff --git a/src/drivers/net/epic100.c b/src/drivers/net/epic100.c -index 8e31a3bfa..01c0c43c9 100644 ---- a/src/drivers/net/epic100.c -+++ b/src/drivers/net/epic100.c -@@ -51,7 +51,7 @@ struct epic_tx_desc { - - static void epic100_open(void); - static void epic100_init_ring(void); --static void epic100_disable(struct nic *nic); -+static void epic100_disable(struct nic *nic, void *hwdev); - static int epic100_poll(struct nic *nic, int retrieve); - static void epic100_transmit(struct nic *nic, const char *destaddr, - unsigned int type, unsigned int len, const char *data); -@@ -419,7 +419,7 @@ epic100_poll(struct nic *nic, int retrieve) - } - - --static void epic100_disable ( struct nic *nic __unused ) { -+static void epic100_disable ( struct nic *nic __unused, void *hwdev __unused ) { - /* Soft reset the chip. */ - outl(GC_SOFT_RESET, genctl); - } -diff --git a/src/drivers/net/ns8390.c b/src/drivers/net/ns8390.c -index 0ffc6216b..ffd05afdb 100644 ---- a/src/drivers/net/ns8390.c -+++ b/src/drivers/net/ns8390.c -@@ -597,7 +597,7 @@ static int ns8390_poll(struct nic *nic, int retrieve) - /************************************************************************** - NS8390_DISABLE - Turn off adapter - **************************************************************************/ --static void ns8390_disable ( struct nic *nic ) { -+static void ns8390_disable ( struct nic *nic, void *hwdev __unused ) { - ns8390_reset(nic); - } - -diff --git a/src/drivers/net/prism2_pci.c b/src/drivers/net/prism2_pci.c -index 69ddf0fb0..b4ed0a728 100644 ---- a/src/drivers/net/prism2_pci.c -+++ b/src/drivers/net/prism2_pci.c -@@ -44,7 +44,7 @@ static int prism2_pci_probe ( struct nic *nic, struct pci_device *pci ) { - return prism2_probe ( nic, hw ); - } - --static void prism2_pci_disable ( struct nic *nic ) { -+static void prism2_pci_disable ( struct nic *nic, void *hwdev __unused ) { - prism2_disable ( nic ); - } - -diff --git a/src/drivers/net/prism2_plx.c b/src/drivers/net/prism2_plx.c -index a73b0e087..b1c466de9 100644 ---- a/src/drivers/net/prism2_plx.c -+++ b/src/drivers/net/prism2_plx.c -@@ -99,7 +99,7 @@ static int prism2_plx_probe ( struct nic *nic, struct pci_device *pci ) { - return prism2_probe ( nic, hw ); - } - --static void prism2_plx_disable ( struct nic *nic ) { -+static void prism2_plx_disable ( struct nic *nic, void *hwdev __unused ) { - prism2_disable ( nic ); - } - -diff --git a/src/drivers/net/sis900.c b/src/drivers/net/sis900.c -index 8a3ac01bc..c8fd3e9b5 100644 ---- a/src/drivers/net/sis900.c -+++ b/src/drivers/net/sis900.c -@@ -164,7 +164,7 @@ static void sis900_transmit(struct nic *nic, const char *d, - unsigned int t, unsigned int s, const char *p); - static int sis900_poll(struct nic *nic, int retrieve); - --static void sis900_disable(struct nic *nic); -+static void sis900_disable(struct nic *nic, void *hwdev); - - static void sis900_irq(struct nic *nic, irq_action_t action); - -@@ -1238,7 +1238,7 @@ sis900_poll(struct nic *nic, int retrieve) - */ - - static void --sis900_disable ( struct nic *nic ) { -+sis900_disable ( struct nic *nic, void *hwdev __unused ) { - - sis900_init(nic); - -diff --git a/src/drivers/net/sundance.c b/src/drivers/net/sundance.c -index 9127fa2cd..77567a5e8 100644 ---- a/src/drivers/net/sundance.c -+++ b/src/drivers/net/sundance.c -@@ -536,7 +536,7 @@ static void sundance_transmit(struct nic *nic, const char *d, /* Destination */ - /************************************************************************** - DISABLE - Turn off ethernet interface - ***************************************************************************/ --static void sundance_disable ( struct nic *nic __unused ) { -+static void sundance_disable ( struct nic *nic __unused, void *hwdev __unused) { - /* put the card in its initial state */ - /* This function serves 3 purposes. - * This disables DMA and interrupts so we don't receive -diff --git a/src/drivers/net/tlan.c b/src/drivers/net/tlan.c -index 0e85b35b6..7127c7373 100644 ---- a/src/drivers/net/tlan.c -+++ b/src/drivers/net/tlan.c -@@ -717,7 +717,7 @@ static void tlan_transmit(struct nic *nic, const char *d, /* Destination */ - /************************************************************************** - DISABLE - Turn off ethernet interface - ***************************************************************************/ --static void tlan_disable ( struct nic *nic __unused ) { -+static void tlan_disable ( struct nic *nic __unused, void *hwdev __unused ) { - /* put the card in its initial state */ - /* This function serves 3 purposes. - * This disables DMA and interrupts so we don't receive -diff --git a/src/drivers/net/tulip.c b/src/drivers/net/tulip.c -index e4e6ffa87..55e9747b4 100644 ---- a/src/drivers/net/tulip.c -+++ b/src/drivers/net/tulip.c -@@ -494,7 +494,7 @@ static void tulip_reset(struct nic *nic); - static void tulip_transmit(struct nic *nic, const char *d, unsigned int t, - unsigned int s, const char *p); - static int tulip_poll(struct nic *nic, int retrieve); --static void tulip_disable(struct nic *nic); -+static void tulip_disable(struct nic *nic, void *hwdev); - static void nway_start(struct nic *nic); - static void pnic_do_nway(struct nic *nic); - static void select_media(struct nic *nic, int startup); -@@ -1128,7 +1128,7 @@ static int tulip_poll(struct nic *nic, int retrieve) - /*********************************************************************/ - /* eth_disable - Disable the interface */ - /*********************************************************************/ --static void tulip_disable ( struct nic *nic ) { -+static void tulip_disable ( struct nic *nic, void *hwdev __unused ) { - - whereami("tulip_disable\n"); - -diff --git a/src/drivers/net/w89c840.c b/src/drivers/net/w89c840.c -index 72ccf3a28..0c222214e 100644 ---- a/src/drivers/net/w89c840.c -+++ b/src/drivers/net/w89c840.c -@@ -579,7 +579,7 @@ static void w89c840_transmit( - /************************************************************************** - w89c840_disable - Turn off ethernet interface - ***************************************************************************/ --static void w89c840_disable ( struct nic *nic ) { -+static void w89c840_disable ( struct nic *nic, void *hwdev __unused ) { - - w89c840_reset(nic); - -diff --git a/src/include/nic.h b/src/include/nic.h -index 8b06e88f4..8e928beb4 100644 ---- a/src/include/nic.h -+++ b/src/include/nic.h -@@ -217,8 +217,7 @@ static inline void * legacy_isa_get_drvdata ( void *hwdev ) { - } \ - static inline void \ - _name ## _disable ( struct nic *nic, void *hwdev ) { \ -- void ( * _unsafe_disable ) () = _disable; \ -- _unsafe_disable ( nic, hwdev ); \ -+ _disable ( nic, hwdev ); \ - } \ - static inline int \ - _name ## _pci_legacy_probe ( struct pci_device *pci ) { \ diff --git a/recipes-extended/ipxe/files/build-be-explicit-about-fcommon-compiler-directive.patch b/recipes-extended/ipxe/files/build-be-explicit-about-fcommon-compiler-directive.patch deleted file mode 100644 index d4a2c732..00000000 --- a/recipes-extended/ipxe/files/build-be-explicit-about-fcommon-compiler-directive.patch +++ /dev/null @@ -1,33 +0,0 @@ -From f982a712979619dbae2c6e0d741757e2ce94be11 Mon Sep 17 00:00:00 2001 -Message-Id: -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. - -Upstream-Status: Backport - -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 66d6dd44..b6c61c11 100644 ---- a/Makefile.housekeeping -+++ b/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 --- -2.17.1 - diff --git a/recipes-extended/ipxe/files/ipxe-fix-hostcc-nopie-cflags.patch b/recipes-extended/ipxe/files/ipxe-fix-hostcc-nopie-cflags.patch index 9db7b6a1..60a25c86 100644 --- a/recipes-extended/ipxe/files/ipxe-fix-hostcc-nopie-cflags.patch +++ b/recipes-extended/ipxe/files/ipxe-fix-hostcc-nopie-cflags.patch @@ -1,24 +1,24 @@ Upstream-Status: Inappropriate [embedded specific] -diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping -index 1dd1479..13f44dd 100644 ---- a/Makefile.housekeeping -+++ b/Makefile.housekeeping -@@ -454,7 +454,7 @@ endif +Index: src/Makefile.housekeeping +=================================================================== +--- src.orig/Makefile.housekeeping ++++ src/Makefile.housekeeping +@@ -496,7 +496,7 @@ endif CFLAGS += $(WORKAROUND_CFLAGS) $(EXTRA_CFLAGS) ASFLAGS += $(WORKAROUND_ASFLAGS) $(EXTRA_ASFLAGS) LDFLAGS += $(WORKAROUND_LDFLAGS) $(EXTRA_LDFLAGS) -HOST_CFLAGS += -O2 -g +HOST_CFLAGS += -O2 -g $(EXTRA_HOST_CFLAGS) + HOST_EFI_CFLAGS += -fshort-wchar # Inhibit -Werror if NO_WERROR is specified on make command line - # -@@ -1379,7 +1379,7 @@ endif # defined(BIN) +@@ -1488,7 +1488,7 @@ endif # defined(BIN) # The compression utilities # -ZBIN_LDFLAGS := -llzma +ZBIN_LDFLAGS := -llzma $(EXTRA_HOST_LDFLAGS) - $(ZBIN) : util/zbin.c $(MAKEDEPS) + $(ZBIN32) : util/zbin.c $(MAKEDEPS) $(QM)$(ECHO) " [HOSTCC] $@" diff --git a/recipes-extended/ipxe/files/ipxe-golan-Add-explicit-type-casts-for-nodnic_queue_pair_.patch b/recipes-extended/ipxe/files/ipxe-golan-Add-explicit-type-casts-for-nodnic_queue_pair_.patch deleted file mode 100644 index 8a78e7af..00000000 --- a/recipes-extended/ipxe/files/ipxe-golan-Add-explicit-type-casts-for-nodnic_queue_pair_.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 8a1d66c7aec020f3e90254ed2fa55ecd9494fcc3 Mon Sep 17 00:00:00 2001 -From: Michael Brown -Date: Sat, 27 Jun 2020 20:43:32 +0100 -Subject: [PATCH] [golan] Add explicit type casts for nodnic_queue_pair_type - -GCC 10 emits warnings for implicit conversions of enumerated types. - -The flexboot_nodnic code defines nodnic_queue_pair_type with values -identical to those of ib_queue_pair_type, and implicitly casts between -them. Add an explicit cast to fix the warning. - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Michael Brown ---- - src/drivers/infiniband/flexboot_nodnic.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/src/drivers/infiniband/flexboot_nodnic.c b/src/drivers/infiniband/flexboot_nodnic.c -index 93bb0544..7d039fff 100644 ---- a/drivers/infiniband/flexboot_nodnic.c -+++ b/drivers/infiniband/flexboot_nodnic.c -@@ -365,7 +365,8 @@ static int flexboot_nodnic_create_qp ( struct ib_device *ibdev, - goto qp_alloc_err; - } - -- status = nodnic_port_create_qp(&port->port_priv, qp->type, -+ status = nodnic_port_create_qp(&port->port_priv, -+ (nodnic_queue_pair_type) qp->type, - qp->send.num_wqes * sizeof(struct nodnic_send_wqbb), - qp->send.num_wqes, - qp->recv.num_wqes * sizeof(struct nodnic_recv_wqe), -@@ -406,7 +407,8 @@ static void flexboot_nodnic_destroy_qp ( struct ib_device *ibdev, - struct flexboot_nodnic_port *port = &flexboot_nodnic->port[ibdev->port - 1]; - struct flexboot_nodnic_queue_pair *flexboot_nodnic_qp = ib_qp_get_drvdata ( qp ); - -- nodnic_port_destroy_qp(&port->port_priv, qp->type, -+ nodnic_port_destroy_qp(&port->port_priv, -+ (nodnic_queue_pair_type) qp->type, - flexboot_nodnic_qp->nodnic_queue_pair); - - free(flexboot_nodnic_qp); --- -2.17.1 - diff --git a/recipes-extended/ipxe/files/ipxe-intel-Avoid-spurious-compiler-warning-on-GCC-10.patch b/recipes-extended/ipxe/files/ipxe-intel-Avoid-spurious-compiler-warning-on-GCC-10.patch deleted file mode 100644 index c76fe1ce..00000000 --- a/recipes-extended/ipxe/files/ipxe-intel-Avoid-spurious-compiler-warning-on-GCC-10.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 28cf9806d1632d378485005babec295da0c77fcf Mon Sep 17 00:00:00 2001 -From: Michael Brown -Date: Sat, 27 Jun 2020 20:21:11 +0100 -Subject: [PATCH] [intel] Avoid spurious compiler warning on GCC 10 - -GCC 10 produces a spurious warning about an out-of-bounds array access -for the unsized raw dword array in union intelvf_msg. - -Avoid the warning by embedding the zero-length array within a struct. - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Michael Brown ---- - src/drivers/net/intelvf.c | 18 ++++++++++-------- - src/drivers/net/intelvf.h | 8 +++++++- - 2 files changed, 17 insertions(+), 9 deletions(-) - -diff --git a/src/drivers/net/intelvf.c b/src/drivers/net/intelvf.c -index ac6fea74..0d48b417 100644 ---- a/drivers/net/intelvf.c -+++ b/drivers/net/intelvf.c -@@ -52,14 +52,15 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - */ - static void intelvf_mbox_write ( struct intel_nic *intel, - const union intelvf_msg *msg ) { -+ const struct intelvf_msg_raw *raw = &msg->raw; - unsigned int i; - - /* Write message */ - DBGC2 ( intel, "INTEL %p sending message", intel ); -- for ( i = 0 ; i < ( sizeof ( *msg ) / sizeof ( msg->dword[0] ) ) ; i++){ -- DBGC2 ( intel, "%c%08x", ( i ? ':' : ' ' ), msg->dword[i] ); -- writel ( msg->dword[i], ( intel->regs + intel->mbox.mem + -- ( i * sizeof ( msg->dword[0] ) ) ) ); -+ for ( i = 0 ; i < ( sizeof ( *msg ) / sizeof ( raw->dword[0] ) ) ; i++){ -+ DBGC2 ( intel, "%c%08x", ( i ? ':' : ' ' ), raw->dword[i] ); -+ writel ( raw->dword[i], ( intel->regs + intel->mbox.mem + -+ ( i * sizeof ( raw->dword[0] ) ) ) ); - } - DBGC2 ( intel, "\n" ); - } -@@ -72,14 +73,15 @@ static void intelvf_mbox_write ( struct intel_nic *intel, - */ - static void intelvf_mbox_read ( struct intel_nic *intel, - union intelvf_msg *msg ) { -+ struct intelvf_msg_raw *raw = &msg->raw; - unsigned int i; - - /* Read message */ - DBGC2 ( intel, "INTEL %p received message", intel ); -- for ( i = 0 ; i < ( sizeof ( *msg ) / sizeof ( msg->dword[0] ) ) ; i++){ -- msg->dword[i] = readl ( intel->regs + intel->mbox.mem + -- ( i * sizeof ( msg->dword[0] ) ) ); -- DBGC2 ( intel, "%c%08x", ( i ? ':' : ' ' ), msg->dword[i] ); -+ for ( i = 0 ; i < ( sizeof ( *msg ) / sizeof ( raw->dword[0] ) ) ; i++){ -+ raw->dword[i] = readl ( intel->regs + intel->mbox.mem + -+ ( i * sizeof ( raw->dword[0] ) ) ); -+ DBGC2 ( intel, "%c%08x", ( i ? ':' : ' ' ), raw->dword[i] ); - } - DBGC2 ( intel, "\n" ); - } -diff --git a/src/drivers/net/intelvf.h b/src/drivers/net/intelvf.h -index ab404698..ffb18e04 100644 ---- a/drivers/net/intelvf.h -+++ b/drivers/net/intelvf.h -@@ -119,6 +119,12 @@ struct intelvf_msg_queues { - uint32_t dflt; - } __attribute__ (( packed )); - -+/** Raw mailbox message */ -+struct intelvf_msg_raw { -+ /** Raw dwords */ -+ uint32_t dword[0]; -+} __attribute__ (( packed )); -+ - /** Mailbox message */ - union intelvf_msg { - /** Message header */ -@@ -132,7 +138,7 @@ union intelvf_msg { - /** Queue configuration message */ - struct intelvf_msg_queues queues; - /** Raw dwords */ -- uint32_t dword[0]; -+ struct intelvf_msg_raw raw; - }; - - /** Maximum time to wait for mailbox message --- -2.17.1 - diff --git a/recipes-extended/ipxe/ipxe_git.bb b/recipes-extended/ipxe/ipxe_git.bb index 74ab8086..7aeca83c 100644 --- a/recipes-extended/ipxe/ipxe_git.bb +++ b/recipes-extended/ipxe/ipxe_git.bb @@ -1,7 +1,7 @@ DESCRIPTION = "Open source network boot firmware" HOMEPAGE = "http://ipxe.org" LICENSE = "GPL-2.0-only" -DEPENDS = "binutils-native perl-native syslinux mtools-native cdrtools-native xz" +DEPENDS = "binutils-native perl-native mtools-native xz coreutils-native" LIC_FILES_CHKSUM = "file://../COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263" # syslinux has this restriction @@ -16,13 +16,6 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:" SRC_URI = " \ git://github.com/ipxe/ipxe.git;protocol=https;branch=master \ file://ipxe-fix-hostcc-nopie-cflags.patch \ - file://ipxe-intel-Avoid-spurious-compiler-warning-on-GCC-10.patch \ - file://ipxe-golan-Add-explicit-type-casts-for-nodnic_queue_pair_.patch \ - file://build-be-explicit-about-fcommon-compiler-directive.patch \ - file://0001-build-Fix-typo-in-xenver.h-header-guard.patch;patchdir=.. \ - file://0002-build-Fix-old-style-function-definition.patch;patchdir=.. \ - file://0003-build-Prevent-the-use-of-reserved-words-in-C23.patch;patchdir=.. \ - file://0004-build-Remove-unsafe-disable-function-wrapper-from-le.patch;patchdir=.. \ " S = "${UNPACKDIR}/${BB_GIT_DEFAULT_DESTSUFFIX}/src" @@ -30,7 +23,6 @@ S = "${UNPACKDIR}/${BB_GIT_DEFAULT_DESTSUFFIX}/src" FILES:${PN} = "/usr/share/firmware/*.rom" EXTRA_OEMAKE = ' \ - ISOLINUX_BIN="${STAGING_DIR_TARGET}/usr/share/syslinux/isolinux.bin" \ CROSS_COMPILE="${TARGET_PREFIX}" \ EXTRA_HOST_CFLAGS="${BUILD_CFLAGS}" \ EXTRA_HOST_LDFLAGS="${BUILD_LDFLAGS}" \ @@ -41,6 +33,11 @@ do_compile() { # Makefile.housekeeping:111: GNU gold is unsuitable for building iPXE # Makefile.housekeeping:112: Use GNU ld instead sed -i 's#\(^LD.*$(CROSS_COMPILE)ld\)$#\1.bfd#g' -i ${S}/Makefile + + # Skip ISO/USB image generation - only ROM files are needed for Xen + # and the ISO tools (genisoimage/xorrisofs) are not available + sed -i 's|bin/ipxe.iso||;s|bin/ipxe.usb||' ${S}/Makefile + oe_runmake } -- cgit v1.2.3-54-g00ecf