summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2026-03-24 17:25:56 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2026-03-24 17:25:56 +0000
commit106a44d9aed4bb845b2c9201903c4f2b90b67f7f (patch)
tree8526d9e84e3ef612720226a0641123e11d8feac8
parent0f62ff39a74f9d2588ac568c7982a15cc2d0558e (diff)
downloadmeta-virtualization-106a44d9aed4bb845b2c9201903c4f2b90b67f7f.tar.gz
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 <bruce.ashfield@gmail.com>
-rw-r--r--recipes-extended/ipxe/files/0001-build-Fix-typo-in-xenver.h-header-guard.patch25
-rw-r--r--recipes-extended/ipxe/files/0002-build-Fix-old-style-function-definition.patch25
-rw-r--r--recipes-extended/ipxe/files/0003-build-Prevent-the-use-of-reserved-words-in-C23.patch103
-rw-r--r--recipes-extended/ipxe/files/0004-build-Remove-unsafe-disable-function-wrapper-from-le.patch294
-rw-r--r--recipes-extended/ipxe/files/build-be-explicit-about-fcommon-compiler-directive.patch33
-rw-r--r--recipes-extended/ipxe/files/ipxe-fix-hostcc-nopie-cflags.patch16
-rw-r--r--recipes-extended/ipxe/files/ipxe-golan-Add-explicit-type-casts-for-nodnic_queue_pair_.patch45
-rw-r--r--recipes-extended/ipxe/files/ipxe-intel-Avoid-spurious-compiler-warning-on-GCC-10.patch91
-rw-r--r--recipes-extended/ipxe/ipxe_git.bb15
9 files changed, 14 insertions, 633 deletions
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 @@
1From e4795a590e3b708008a7bbd944370aef5337c561 Mon Sep 17 00:00:00 2001
2From: Michael Brown <mcb30@ipxe.org>
3Date: Sun, 27 Apr 2025 17:33:28 +0100
4Subject: [PATCH] [build] Fix typo in xenver.h header guard
5
6GCC 15 helpfully reports mismatched #ifdef and #define lines in header
7guards.
8
9Signed-off-by: Michael Brown <mcb30@ipxe.org>
10Upstream-Status: Backport [https://github.com/ipxe/ipxe/pull/1457]
11---
12 src/include/ipxe/xenver.h | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/src/include/ipxe/xenver.h b/src/include/ipxe/xenver.h
16index b29dfb321..5d820a6e7 100644
17--- a/src/include/ipxe/xenver.h
18+++ b/src/include/ipxe/xenver.h
19@@ -1,5 +1,5 @@
20 #ifndef _IPXE_XENVER_H
21-#define _IPXE_VENVER_H
22+#define _IPXE_XENVER_H
23
24 /** @file
25 *
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 @@
1From 0b5e26f82d3bb5dc49557b8c29d802911c050aaf Mon Sep 17 00:00:00 2001
2From: Michael Brown <mcb30@ipxe.org>
3Date: Sun, 27 Apr 2025 17:36:52 +0100
4Subject: [PATCH] [build] Fix old-style function definition
5
6Signed-off-by: Michael Brown <mcb30@ipxe.org>
7Upstream-Status: Backport [https://github.com/ipxe/ipxe/pull/1457]
8---
9 src/drivers/net/3c595.c | 3 +--
10 1 file changed, 1 insertion(+), 2 deletions(-)
11
12diff --git a/src/drivers/net/3c595.c b/src/drivers/net/3c595.c
13index 92d38cfc5..c3442946e 100644
14--- a/src/drivers/net/3c595.c
15+++ b/src/drivers/net/3c595.c
16@@ -342,8 +342,7 @@ eeprom_rdy()
17 * before
18 */
19 static int
20-get_e(offset)
21-int offset;
22+get_e(int offset)
23 {
24 if (!eeprom_rdy())
25 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 @@
1From 2f39451dbab215763c09465848b89dcf41eb71be Mon Sep 17 00:00:00 2001
2From: Miao Wang <shankerwangmiao@gmail.com>
3Date: Sun, 27 Apr 2025 17:30:49 +0100
4Subject: [PATCH] [build] Prevent the use of reserved words in C23
5
6GCC 15 defaults to C23, which reserves bool, true, and false as
7keywords. Avoid using these as parameter or variable names.
8
9Modified-by: Michael Brown <mcb30@ipxe.org>
10Signed-off-by: Michael Brown <mcb30@ipxe.org>
11Upstream-Status: Backport [https://github.com/ipxe/ipxe/pull/1457]
12---
13 .../infiniband/mlx_utils/src/public/mlx_pci_gw.c | 4 ++--
14 src/drivers/net/igbvf/igbvf_osdep.h | 7 ++-----
15 src/interface/efi/efi_hii.c | 12 ++++++------
16 3 files changed, 10 insertions(+), 13 deletions(-)
17
18diff --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
19index 30c1e644e..0b257ed22 100644
20--- a/src/drivers/infiniband/mlx_utils/src/public/mlx_pci_gw.c
21+++ b/src/drivers/infiniband/mlx_utils/src/public/mlx_pci_gw.c
22@@ -32,7 +32,7 @@ mlx_status
23 mlx_pci_gw_check_capability_id(
24 IN mlx_utils *utils,
25 IN mlx_uint8 cap_pointer,
26- OUT mlx_boolean *bool
27+ OUT mlx_boolean *result
28 )
29 {
30 mlx_status status = MLX_SUCCESS;
31@@ -41,7 +41,7 @@ mlx_pci_gw_check_capability_id(
32 status = mlx_pci_read(utils, MlxPciWidthUint8, offset,
33 1, &id);
34 MLX_CHECK_STATUS(utils, status, read_err,"failed to read capability id");
35- *bool = ( id == PCI_GW_CAPABILITY_ID );
36+ *result = ( id == PCI_GW_CAPABILITY_ID );
37 read_err:
38 return status;
39 }
40diff --git a/src/drivers/net/igbvf/igbvf_osdep.h b/src/drivers/net/igbvf/igbvf_osdep.h
41index 8ac179de0..dc65da6c1 100644
42--- a/src/drivers/net/igbvf/igbvf_osdep.h
43+++ b/src/drivers/net/igbvf/igbvf_osdep.h
44@@ -35,8 +35,9 @@ FILE_LICENCE ( GPL2_ONLY );
45 #ifndef _IGBVF_OSDEP_H_
46 #define _IGBVF_OSDEP_H_
47
48+#include <stdbool.h>
49+
50 #define u8 unsigned char
51-#define bool boolean_t
52 #define dma_addr_t unsigned long
53 #define __le16 uint16_t
54 #define __le32 uint32_t
55@@ -51,10 +52,6 @@ FILE_LICENCE ( GPL2_ONLY );
56 #define ETH_FCS_LEN 4
57
58 typedef int spinlock_t;
59-typedef enum {
60- false = 0,
61- true = 1
62-} boolean_t;
63
64 #define usec_delay(x) udelay(x)
65 #define msec_delay(x) mdelay(x)
66diff --git a/src/interface/efi/efi_hii.c b/src/interface/efi/efi_hii.c
67index 506fc8869..66f58affe 100644
68--- a/src/interface/efi/efi_hii.c
69+++ b/src/interface/efi/efi_hii.c
70@@ -147,13 +147,13 @@ void efi_ifr_end_op ( struct efi_ifr_builder *ifr ) {
71 */
72 void efi_ifr_false_op ( struct efi_ifr_builder *ifr ) {
73 size_t dispaddr = ifr->ops_len;
74- EFI_IFR_FALSE *false;
75+ EFI_IFR_FALSE *op;
76
77 /* Add opcode */
78- false = efi_ifr_op ( ifr, EFI_IFR_FALSE_OP, sizeof ( *false ) );
79+ op = efi_ifr_op ( ifr, EFI_IFR_FALSE_OP, sizeof ( *op ) );
80
81 DBGC ( ifr, "IFR %p false\n", ifr );
82- DBGC2_HDA ( ifr, dispaddr, false, sizeof ( *false ) );
83+ DBGC2_HDA ( ifr, dispaddr, op, sizeof ( *op ) );
84 }
85
86 /**
87@@ -462,13 +462,13 @@ void efi_ifr_text_op ( struct efi_ifr_builder *ifr, unsigned int prompt_id,
88 */
89 void efi_ifr_true_op ( struct efi_ifr_builder *ifr ) {
90 size_t dispaddr = ifr->ops_len;
91- EFI_IFR_TRUE *true;
92+ EFI_IFR_TRUE *op;
93
94 /* Add opcode */
95- true = efi_ifr_op ( ifr, EFI_IFR_TRUE_OP, sizeof ( *true ) );
96+ op = efi_ifr_op ( ifr, EFI_IFR_TRUE_OP, sizeof ( *op ) );
97
98 DBGC ( ifr, "IFR %p true\n", ifr );
99- DBGC2_HDA ( ifr, dispaddr, true, sizeof ( *true ) );
100+ DBGC2_HDA ( ifr, dispaddr, op, sizeof ( *op ) );
101 }
102
103 /**
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 @@
1From 1de32c9e11e727fe8c4eab68b331d862cb2f03e7 Mon Sep 17 00:00:00 2001
2From: Michael Brown <mcb30@ipxe.org>
3Date: Sun, 27 Apr 2025 17:37:44 +0100
4Subject: [PATCH] [build] Remove unsafe disable function wrapper from legacy
5 NIC drivers
6
7The legacy NIC drivers do not consistently take a second parameter in
8their disable function. We currently use an unsafe function wrapper
9that declares no parameters, and rely on the ABI allowing a second
10parameter to be silently ignored if not expected by the caller. As of
11GCC 15, this hack results in an incompatible pointer type warning.
12
13Fix by removing the hack, and instead updating all relevant legacy NIC
14drivers to take an unused second parameter in their disable function.
15
16Signed-off-by: Michael Brown <mcb30@ipxe.org>
17Upstream-Status: Backport [https://github.com/ipxe/ipxe/pull/1457]
18---
19 src/drivers/net/3c595.c | 2 +-
20 src/drivers/net/amd8111e.c | 2 +-
21 src/drivers/net/bnx2.c | 8 +++++++-
22 src/drivers/net/davicom.c | 4 ++--
23 src/drivers/net/depca.c | 2 +-
24 src/drivers/net/dmfe.c | 2 +-
25 src/drivers/net/epic100.c | 4 ++--
26 src/drivers/net/ns8390.c | 2 +-
27 src/drivers/net/prism2_pci.c | 2 +-
28 src/drivers/net/prism2_plx.c | 2 +-
29 src/drivers/net/sis900.c | 4 ++--
30 src/drivers/net/sundance.c | 2 +-
31 src/drivers/net/tlan.c | 2 +-
32 src/drivers/net/tulip.c | 4 ++--
33 src/drivers/net/w89c840.c | 2 +-
34 src/include/nic.h | 3 +--
35 16 files changed, 26 insertions(+), 21 deletions(-)
36
37diff --git a/src/drivers/net/3c595.c b/src/drivers/net/3c595.c
38index c3442946e..fbee739a2 100644
39--- a/src/drivers/net/3c595.c
40+++ b/src/drivers/net/3c595.c
41@@ -443,7 +443,7 @@ vxsetlink(void)
42 GO_WINDOW(1);
43 }
44
45-static void t595_disable ( struct nic *nic ) {
46+static void t595_disable ( struct nic *nic, void *hwdev __unused ) {
47
48 t595_reset(nic);
49
50diff --git a/src/drivers/net/amd8111e.c b/src/drivers/net/amd8111e.c
51index 693d77d1d..5ad55eea1 100644
52--- a/src/drivers/net/amd8111e.c
53+++ b/src/drivers/net/amd8111e.c
54@@ -609,7 +609,7 @@ static int amd8111e_poll(struct nic *nic, int retrieve)
55 return pkt_ok;
56 }
57
58-static void amd8111e_disable(struct nic *nic)
59+static void amd8111e_disable(struct nic *nic, void *hwdev __unused)
60 {
61 struct amd8111e_priv *lp = nic->priv_data;
62
63diff --git a/src/drivers/net/bnx2.c b/src/drivers/net/bnx2.c
64index 4ebcc52a9..60bef7711 100644
65--- a/src/drivers/net/bnx2.c
66+++ b/src/drivers/net/bnx2.c
67@@ -2671,6 +2671,12 @@ err_out_disable:
68 return 0;
69 }
70
71+static void
72+bnx2_remove(struct nic *nic, void *hwdev __unused)
73+{
74+ bnx2_disable(nic);
75+}
76+
77 static struct pci_device_id bnx2_nics[] = {
78 PCI_ROM(0x14e4, 0x164a, "bnx2-5706", "Broadcom NetXtreme II BCM5706", 0),
79 PCI_ROM(0x14e4, 0x164c, "bnx2-5708", "Broadcom NetXtreme II BCM5708", 0),
80@@ -2680,7 +2686,7 @@ static struct pci_device_id bnx2_nics[] = {
81
82 PCI_DRIVER ( bnx2_driver, bnx2_nics, PCI_NO_CLASS );
83
84-DRIVER ( "BNX2", nic_driver, pci_driver, bnx2_driver, bnx2_probe, bnx2_disable );
85+DRIVER ( "BNX2", nic_driver, pci_driver, bnx2_driver, bnx2_probe, bnx2_remove );
86
87 /*
88 static struct pci_driver bnx2_driver __pci_driver = {
89diff --git a/src/drivers/net/davicom.c b/src/drivers/net/davicom.c
90index 9d3d8b915..07c994573 100644
91--- a/src/drivers/net/davicom.c
92+++ b/src/drivers/net/davicom.c
93@@ -159,7 +159,7 @@ static void davicom_reset(struct nic *nic);
94 static void davicom_transmit(struct nic *nic, const char *d, unsigned int t,
95 unsigned int s, const char *p);
96 static int davicom_poll(struct nic *nic, int retrieve);
97-static void davicom_disable(struct nic *nic);
98+static void davicom_disable(struct nic *nic, void *hwdev);
99 static void davicom_wait(unsigned int nticks);
100 static int phy_read(int);
101 static void phy_write(int, u16);
102@@ -601,7 +601,7 @@ static int davicom_poll(struct nic *nic, int retrieve)
103 /*********************************************************************/
104 /* eth_disable - Disable the interface */
105 /*********************************************************************/
106-static void davicom_disable ( struct nic *nic ) {
107+static void davicom_disable ( struct nic *nic, void *hwdev __unused ) {
108
109 whereami("davicom_disable\n");
110
111diff --git a/src/drivers/net/depca.c b/src/drivers/net/depca.c
112index 016f28bb2..30e2fcb0a 100644
113--- a/src/drivers/net/depca.c
114+++ b/src/drivers/net/depca.c
115@@ -644,7 +644,7 @@ static void depca_transmit(
116 /**************************************************************************
117 DISABLE - Turn off ethernet interface
118 ***************************************************************************/
119-static void depca_disable ( struct nic *nic ) {
120+static void depca_disable ( struct nic *nic, void *hwdev __unused ) {
121 depca_reset(nic);
122
123 STOP_DEPCA(nic->ioaddr);
124diff --git a/src/drivers/net/dmfe.c b/src/drivers/net/dmfe.c
125index 2ea0d2b2b..ea14c462f 100644
126--- a/src/drivers/net/dmfe.c
127+++ b/src/drivers/net/dmfe.c
128@@ -435,7 +435,7 @@ static void dmfe_transmit(struct nic *nic,
129 /**************************************************************************
130 DISABLE - Turn off ethernet interface
131 ***************************************************************************/
132-static void dmfe_disable ( struct nic *nic __unused ) {
133+static void dmfe_disable ( struct nic *nic __unused, void *hwdev __unused ) {
134 /* Reset & stop DM910X board */
135 outl(DM910X_RESET, BASE + DCR0);
136 udelay(5);
137diff --git a/src/drivers/net/epic100.c b/src/drivers/net/epic100.c
138index 8e31a3bfa..01c0c43c9 100644
139--- a/src/drivers/net/epic100.c
140+++ b/src/drivers/net/epic100.c
141@@ -51,7 +51,7 @@ struct epic_tx_desc {
142
143 static void epic100_open(void);
144 static void epic100_init_ring(void);
145-static void epic100_disable(struct nic *nic);
146+static void epic100_disable(struct nic *nic, void *hwdev);
147 static int epic100_poll(struct nic *nic, int retrieve);
148 static void epic100_transmit(struct nic *nic, const char *destaddr,
149 unsigned int type, unsigned int len, const char *data);
150@@ -419,7 +419,7 @@ epic100_poll(struct nic *nic, int retrieve)
151 }
152
153
154-static void epic100_disable ( struct nic *nic __unused ) {
155+static void epic100_disable ( struct nic *nic __unused, void *hwdev __unused ) {
156 /* Soft reset the chip. */
157 outl(GC_SOFT_RESET, genctl);
158 }
159diff --git a/src/drivers/net/ns8390.c b/src/drivers/net/ns8390.c
160index 0ffc6216b..ffd05afdb 100644
161--- a/src/drivers/net/ns8390.c
162+++ b/src/drivers/net/ns8390.c
163@@ -597,7 +597,7 @@ static int ns8390_poll(struct nic *nic, int retrieve)
164 /**************************************************************************
165 NS8390_DISABLE - Turn off adapter
166 **************************************************************************/
167-static void ns8390_disable ( struct nic *nic ) {
168+static void ns8390_disable ( struct nic *nic, void *hwdev __unused ) {
169 ns8390_reset(nic);
170 }
171
172diff --git a/src/drivers/net/prism2_pci.c b/src/drivers/net/prism2_pci.c
173index 69ddf0fb0..b4ed0a728 100644
174--- a/src/drivers/net/prism2_pci.c
175+++ b/src/drivers/net/prism2_pci.c
176@@ -44,7 +44,7 @@ static int prism2_pci_probe ( struct nic *nic, struct pci_device *pci ) {
177 return prism2_probe ( nic, hw );
178 }
179
180-static void prism2_pci_disable ( struct nic *nic ) {
181+static void prism2_pci_disable ( struct nic *nic, void *hwdev __unused ) {
182 prism2_disable ( nic );
183 }
184
185diff --git a/src/drivers/net/prism2_plx.c b/src/drivers/net/prism2_plx.c
186index a73b0e087..b1c466de9 100644
187--- a/src/drivers/net/prism2_plx.c
188+++ b/src/drivers/net/prism2_plx.c
189@@ -99,7 +99,7 @@ static int prism2_plx_probe ( struct nic *nic, struct pci_device *pci ) {
190 return prism2_probe ( nic, hw );
191 }
192
193-static void prism2_plx_disable ( struct nic *nic ) {
194+static void prism2_plx_disable ( struct nic *nic, void *hwdev __unused ) {
195 prism2_disable ( nic );
196 }
197
198diff --git a/src/drivers/net/sis900.c b/src/drivers/net/sis900.c
199index 8a3ac01bc..c8fd3e9b5 100644
200--- a/src/drivers/net/sis900.c
201+++ b/src/drivers/net/sis900.c
202@@ -164,7 +164,7 @@ static void sis900_transmit(struct nic *nic, const char *d,
203 unsigned int t, unsigned int s, const char *p);
204 static int sis900_poll(struct nic *nic, int retrieve);
205
206-static void sis900_disable(struct nic *nic);
207+static void sis900_disable(struct nic *nic, void *hwdev);
208
209 static void sis900_irq(struct nic *nic, irq_action_t action);
210
211@@ -1238,7 +1238,7 @@ sis900_poll(struct nic *nic, int retrieve)
212 */
213
214 static void
215-sis900_disable ( struct nic *nic ) {
216+sis900_disable ( struct nic *nic, void *hwdev __unused ) {
217
218 sis900_init(nic);
219
220diff --git a/src/drivers/net/sundance.c b/src/drivers/net/sundance.c
221index 9127fa2cd..77567a5e8 100644
222--- a/src/drivers/net/sundance.c
223+++ b/src/drivers/net/sundance.c
224@@ -536,7 +536,7 @@ static void sundance_transmit(struct nic *nic, const char *d, /* Destination */
225 /**************************************************************************
226 DISABLE - Turn off ethernet interface
227 ***************************************************************************/
228-static void sundance_disable ( struct nic *nic __unused ) {
229+static void sundance_disable ( struct nic *nic __unused, void *hwdev __unused) {
230 /* put the card in its initial state */
231 /* This function serves 3 purposes.
232 * This disables DMA and interrupts so we don't receive
233diff --git a/src/drivers/net/tlan.c b/src/drivers/net/tlan.c
234index 0e85b35b6..7127c7373 100644
235--- a/src/drivers/net/tlan.c
236+++ b/src/drivers/net/tlan.c
237@@ -717,7 +717,7 @@ static void tlan_transmit(struct nic *nic, const char *d, /* Destination */
238 /**************************************************************************
239 DISABLE - Turn off ethernet interface
240 ***************************************************************************/
241-static void tlan_disable ( struct nic *nic __unused ) {
242+static void tlan_disable ( struct nic *nic __unused, void *hwdev __unused ) {
243 /* put the card in its initial state */
244 /* This function serves 3 purposes.
245 * This disables DMA and interrupts so we don't receive
246diff --git a/src/drivers/net/tulip.c b/src/drivers/net/tulip.c
247index e4e6ffa87..55e9747b4 100644
248--- a/src/drivers/net/tulip.c
249+++ b/src/drivers/net/tulip.c
250@@ -494,7 +494,7 @@ static void tulip_reset(struct nic *nic);
251 static void tulip_transmit(struct nic *nic, const char *d, unsigned int t,
252 unsigned int s, const char *p);
253 static int tulip_poll(struct nic *nic, int retrieve);
254-static void tulip_disable(struct nic *nic);
255+static void tulip_disable(struct nic *nic, void *hwdev);
256 static void nway_start(struct nic *nic);
257 static void pnic_do_nway(struct nic *nic);
258 static void select_media(struct nic *nic, int startup);
259@@ -1128,7 +1128,7 @@ static int tulip_poll(struct nic *nic, int retrieve)
260 /*********************************************************************/
261 /* eth_disable - Disable the interface */
262 /*********************************************************************/
263-static void tulip_disable ( struct nic *nic ) {
264+static void tulip_disable ( struct nic *nic, void *hwdev __unused ) {
265
266 whereami("tulip_disable\n");
267
268diff --git a/src/drivers/net/w89c840.c b/src/drivers/net/w89c840.c
269index 72ccf3a28..0c222214e 100644
270--- a/src/drivers/net/w89c840.c
271+++ b/src/drivers/net/w89c840.c
272@@ -579,7 +579,7 @@ static void w89c840_transmit(
273 /**************************************************************************
274 w89c840_disable - Turn off ethernet interface
275 ***************************************************************************/
276-static void w89c840_disable ( struct nic *nic ) {
277+static void w89c840_disable ( struct nic *nic, void *hwdev __unused ) {
278
279 w89c840_reset(nic);
280
281diff --git a/src/include/nic.h b/src/include/nic.h
282index 8b06e88f4..8e928beb4 100644
283--- a/src/include/nic.h
284+++ b/src/include/nic.h
285@@ -217,8 +217,7 @@ static inline void * legacy_isa_get_drvdata ( void *hwdev ) {
286 } \
287 static inline void \
288 _name ## _disable ( struct nic *nic, void *hwdev ) { \
289- void ( * _unsafe_disable ) () = _disable; \
290- _unsafe_disable ( nic, hwdev ); \
291+ _disable ( nic, hwdev ); \
292 } \
293 static inline int \
294 _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 @@
1From f982a712979619dbae2c6e0d741757e2ce94be11 Mon Sep 17 00:00:00 2001
2Message-Id: <f982a712979619dbae2c6e0d741757e2ce94be11.1602165412.git.bertrand.marquis@arm.com>
3From: Bruce Rogers <brogers@suse.com>
4Date: Wed, 6 May 2020 15:03:02 -0600
5Subject: [PATCH] [build] Be explicit about -fcommon compiler directive
6
7gcc10 switched default behavior from -fcommon to -fno-common. Since
8"__shared" relies on the legacy behavior, explicitly specify it.
9
10Upstream-Status: Backport
11
12Signed-off-by: Bruce Rogers <brogers@suse.com>
13Modified-by: Michael Brown <mcb30@ipxe.org>
14Signed-off-by: Michael Brown <mcb30@ipxe.org>
15---
16 src/Makefile.housekeeping | 1 +
17 1 file changed, 1 insertion(+)
18
19diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping
20index 66d6dd44..b6c61c11 100644
21--- a/Makefile.housekeeping
22+++ b/Makefile.housekeeping
23@@ -418,6 +418,7 @@ CFLAGS += -Os
24 CFLAGS += -g
25 ifeq ($(CCTYPE),gcc)
26 CFLAGS += -ffreestanding
27+CFLAGS += -fcommon
28 CFLAGS += -Wall -W -Wformat-nonliteral
29 HOST_CFLAGS += -Wall -W -Wformat-nonliteral
30 endif
31--
322.17.1
33
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 @@
1Upstream-Status: Inappropriate [embedded specific] 1Upstream-Status: Inappropriate [embedded specific]
2 2
3diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping 3Index: src/Makefile.housekeeping
4index 1dd1479..13f44dd 100644 4===================================================================
5--- a/Makefile.housekeeping 5--- src.orig/Makefile.housekeeping
6+++ b/Makefile.housekeeping 6+++ src/Makefile.housekeeping
7@@ -454,7 +454,7 @@ endif 7@@ -496,7 +496,7 @@ endif
8 CFLAGS += $(WORKAROUND_CFLAGS) $(EXTRA_CFLAGS) 8 CFLAGS += $(WORKAROUND_CFLAGS) $(EXTRA_CFLAGS)
9 ASFLAGS += $(WORKAROUND_ASFLAGS) $(EXTRA_ASFLAGS) 9 ASFLAGS += $(WORKAROUND_ASFLAGS) $(EXTRA_ASFLAGS)
10 LDFLAGS += $(WORKAROUND_LDFLAGS) $(EXTRA_LDFLAGS) 10 LDFLAGS += $(WORKAROUND_LDFLAGS) $(EXTRA_LDFLAGS)
11-HOST_CFLAGS += -O2 -g 11-HOST_CFLAGS += -O2 -g
12+HOST_CFLAGS += -O2 -g $(EXTRA_HOST_CFLAGS) 12+HOST_CFLAGS += -O2 -g $(EXTRA_HOST_CFLAGS)
13 HOST_EFI_CFLAGS += -fshort-wchar
13 14
14 # Inhibit -Werror if NO_WERROR is specified on make command line 15 # Inhibit -Werror if NO_WERROR is specified on make command line
15 # 16@@ -1488,7 +1488,7 @@ endif # defined(BIN)
16@@ -1379,7 +1379,7 @@ endif # defined(BIN)
17 # The compression utilities 17 # The compression utilities
18 # 18 #
19 19
20-ZBIN_LDFLAGS := -llzma 20-ZBIN_LDFLAGS := -llzma
21+ZBIN_LDFLAGS := -llzma $(EXTRA_HOST_LDFLAGS) 21+ZBIN_LDFLAGS := -llzma $(EXTRA_HOST_LDFLAGS)
22 22
23 $(ZBIN) : util/zbin.c $(MAKEDEPS) 23 $(ZBIN32) : util/zbin.c $(MAKEDEPS)
24 $(QM)$(ECHO) " [HOSTCC] $@" 24 $(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 @@
1From 8a1d66c7aec020f3e90254ed2fa55ecd9494fcc3 Mon Sep 17 00:00:00 2001
2From: Michael Brown <mcb30@ipxe.org>
3Date: Sat, 27 Jun 2020 20:43:32 +0100
4Subject: [PATCH] [golan] Add explicit type casts for nodnic_queue_pair_type
5
6GCC 10 emits warnings for implicit conversions of enumerated types.
7
8The flexboot_nodnic code defines nodnic_queue_pair_type with values
9identical to those of ib_queue_pair_type, and implicitly casts between
10them. Add an explicit cast to fix the warning.
11
12Upstream-Status: Inappropriate [embedded specific]
13
14Signed-off-by: Michael Brown <mcb30@ipxe.org>
15---
16 src/drivers/infiniband/flexboot_nodnic.c | 6 ++++--
17 1 file changed, 4 insertions(+), 2 deletions(-)
18
19diff --git a/src/drivers/infiniband/flexboot_nodnic.c b/src/drivers/infiniband/flexboot_nodnic.c
20index 93bb0544..7d039fff 100644
21--- a/drivers/infiniband/flexboot_nodnic.c
22+++ b/drivers/infiniband/flexboot_nodnic.c
23@@ -365,7 +365,8 @@ static int flexboot_nodnic_create_qp ( struct ib_device *ibdev,
24 goto qp_alloc_err;
25 }
26
27- status = nodnic_port_create_qp(&port->port_priv, qp->type,
28+ status = nodnic_port_create_qp(&port->port_priv,
29+ (nodnic_queue_pair_type) qp->type,
30 qp->send.num_wqes * sizeof(struct nodnic_send_wqbb),
31 qp->send.num_wqes,
32 qp->recv.num_wqes * sizeof(struct nodnic_recv_wqe),
33@@ -406,7 +407,8 @@ static void flexboot_nodnic_destroy_qp ( struct ib_device *ibdev,
34 struct flexboot_nodnic_port *port = &flexboot_nodnic->port[ibdev->port - 1];
35 struct flexboot_nodnic_queue_pair *flexboot_nodnic_qp = ib_qp_get_drvdata ( qp );
36
37- nodnic_port_destroy_qp(&port->port_priv, qp->type,
38+ nodnic_port_destroy_qp(&port->port_priv,
39+ (nodnic_queue_pair_type) qp->type,
40 flexboot_nodnic_qp->nodnic_queue_pair);
41
42 free(flexboot_nodnic_qp);
43--
442.17.1
45
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 @@
1From 28cf9806d1632d378485005babec295da0c77fcf Mon Sep 17 00:00:00 2001
2From: Michael Brown <mcb30@ipxe.org>
3Date: Sat, 27 Jun 2020 20:21:11 +0100
4Subject: [PATCH] [intel] Avoid spurious compiler warning on GCC 10
5
6GCC 10 produces a spurious warning about an out-of-bounds array access
7for the unsized raw dword array in union intelvf_msg.
8
9Avoid the warning by embedding the zero-length array within a struct.
10
11Upstream-Status: Inappropriate [embedded specific]
12
13Signed-off-by: Michael Brown <mcb30@ipxe.org>
14---
15 src/drivers/net/intelvf.c | 18 ++++++++++--------
16 src/drivers/net/intelvf.h | 8 +++++++-
17 2 files changed, 17 insertions(+), 9 deletions(-)
18
19diff --git a/src/drivers/net/intelvf.c b/src/drivers/net/intelvf.c
20index ac6fea74..0d48b417 100644
21--- a/drivers/net/intelvf.c
22+++ b/drivers/net/intelvf.c
23@@ -52,14 +52,15 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
24 */
25 static void intelvf_mbox_write ( struct intel_nic *intel,
26 const union intelvf_msg *msg ) {
27+ const struct intelvf_msg_raw *raw = &msg->raw;
28 unsigned int i;
29
30 /* Write message */
31 DBGC2 ( intel, "INTEL %p sending message", intel );
32- for ( i = 0 ; i < ( sizeof ( *msg ) / sizeof ( msg->dword[0] ) ) ; i++){
33- DBGC2 ( intel, "%c%08x", ( i ? ':' : ' ' ), msg->dword[i] );
34- writel ( msg->dword[i], ( intel->regs + intel->mbox.mem +
35- ( i * sizeof ( msg->dword[0] ) ) ) );
36+ for ( i = 0 ; i < ( sizeof ( *msg ) / sizeof ( raw->dword[0] ) ) ; i++){
37+ DBGC2 ( intel, "%c%08x", ( i ? ':' : ' ' ), raw->dword[i] );
38+ writel ( raw->dword[i], ( intel->regs + intel->mbox.mem +
39+ ( i * sizeof ( raw->dword[0] ) ) ) );
40 }
41 DBGC2 ( intel, "\n" );
42 }
43@@ -72,14 +73,15 @@ static void intelvf_mbox_write ( struct intel_nic *intel,
44 */
45 static void intelvf_mbox_read ( struct intel_nic *intel,
46 union intelvf_msg *msg ) {
47+ struct intelvf_msg_raw *raw = &msg->raw;
48 unsigned int i;
49
50 /* Read message */
51 DBGC2 ( intel, "INTEL %p received message", intel );
52- for ( i = 0 ; i < ( sizeof ( *msg ) / sizeof ( msg->dword[0] ) ) ; i++){
53- msg->dword[i] = readl ( intel->regs + intel->mbox.mem +
54- ( i * sizeof ( msg->dword[0] ) ) );
55- DBGC2 ( intel, "%c%08x", ( i ? ':' : ' ' ), msg->dword[i] );
56+ for ( i = 0 ; i < ( sizeof ( *msg ) / sizeof ( raw->dword[0] ) ) ; i++){
57+ raw->dword[i] = readl ( intel->regs + intel->mbox.mem +
58+ ( i * sizeof ( raw->dword[0] ) ) );
59+ DBGC2 ( intel, "%c%08x", ( i ? ':' : ' ' ), raw->dword[i] );
60 }
61 DBGC2 ( intel, "\n" );
62 }
63diff --git a/src/drivers/net/intelvf.h b/src/drivers/net/intelvf.h
64index ab404698..ffb18e04 100644
65--- a/drivers/net/intelvf.h
66+++ b/drivers/net/intelvf.h
67@@ -119,6 +119,12 @@ struct intelvf_msg_queues {
68 uint32_t dflt;
69 } __attribute__ (( packed ));
70
71+/** Raw mailbox message */
72+struct intelvf_msg_raw {
73+ /** Raw dwords */
74+ uint32_t dword[0];
75+} __attribute__ (( packed ));
76+
77 /** Mailbox message */
78 union intelvf_msg {
79 /** Message header */
80@@ -132,7 +138,7 @@ union intelvf_msg {
81 /** Queue configuration message */
82 struct intelvf_msg_queues queues;
83 /** Raw dwords */
84- uint32_t dword[0];
85+ struct intelvf_msg_raw raw;
86 };
87
88 /** Maximum time to wait for mailbox message
89--
902.17.1
91
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 @@
1DESCRIPTION = "Open source network boot firmware" 1DESCRIPTION = "Open source network boot firmware"
2HOMEPAGE = "http://ipxe.org" 2HOMEPAGE = "http://ipxe.org"
3LICENSE = "GPL-2.0-only" 3LICENSE = "GPL-2.0-only"
4DEPENDS = "binutils-native perl-native syslinux mtools-native cdrtools-native xz" 4DEPENDS = "binutils-native perl-native mtools-native xz coreutils-native"
5LIC_FILES_CHKSUM = "file://../COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263" 5LIC_FILES_CHKSUM = "file://../COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263"
6 6
7# syslinux has this restriction 7# syslinux has this restriction
@@ -16,13 +16,6 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
16SRC_URI = " \ 16SRC_URI = " \
17 git://github.com/ipxe/ipxe.git;protocol=https;branch=master \ 17 git://github.com/ipxe/ipxe.git;protocol=https;branch=master \
18 file://ipxe-fix-hostcc-nopie-cflags.patch \ 18 file://ipxe-fix-hostcc-nopie-cflags.patch \
19 file://ipxe-intel-Avoid-spurious-compiler-warning-on-GCC-10.patch \
20 file://ipxe-golan-Add-explicit-type-casts-for-nodnic_queue_pair_.patch \
21 file://build-be-explicit-about-fcommon-compiler-directive.patch \
22 file://0001-build-Fix-typo-in-xenver.h-header-guard.patch;patchdir=.. \
23 file://0002-build-Fix-old-style-function-definition.patch;patchdir=.. \
24 file://0003-build-Prevent-the-use-of-reserved-words-in-C23.patch;patchdir=.. \
25 file://0004-build-Remove-unsafe-disable-function-wrapper-from-le.patch;patchdir=.. \
26 " 19 "
27 20
28S = "${UNPACKDIR}/${BB_GIT_DEFAULT_DESTSUFFIX}/src" 21S = "${UNPACKDIR}/${BB_GIT_DEFAULT_DESTSUFFIX}/src"
@@ -30,7 +23,6 @@ S = "${UNPACKDIR}/${BB_GIT_DEFAULT_DESTSUFFIX}/src"
30FILES:${PN} = "/usr/share/firmware/*.rom" 23FILES:${PN} = "/usr/share/firmware/*.rom"
31 24
32EXTRA_OEMAKE = ' \ 25EXTRA_OEMAKE = ' \
33 ISOLINUX_BIN="${STAGING_DIR_TARGET}/usr/share/syslinux/isolinux.bin" \
34 CROSS_COMPILE="${TARGET_PREFIX}" \ 26 CROSS_COMPILE="${TARGET_PREFIX}" \
35 EXTRA_HOST_CFLAGS="${BUILD_CFLAGS}" \ 27 EXTRA_HOST_CFLAGS="${BUILD_CFLAGS}" \
36 EXTRA_HOST_LDFLAGS="${BUILD_LDFLAGS}" \ 28 EXTRA_HOST_LDFLAGS="${BUILD_LDFLAGS}" \
@@ -41,6 +33,11 @@ do_compile() {
41 # Makefile.housekeeping:111: GNU gold is unsuitable for building iPXE 33 # Makefile.housekeeping:111: GNU gold is unsuitable for building iPXE
42 # Makefile.housekeeping:112: Use GNU ld instead 34 # Makefile.housekeeping:112: Use GNU ld instead
43 sed -i 's#\(^LD.*$(CROSS_COMPILE)ld\)$#\1.bfd#g' -i ${S}/Makefile 35 sed -i 's#\(^LD.*$(CROSS_COMPILE)ld\)$#\1.bfd#g' -i ${S}/Makefile
36
37 # Skip ISO/USB image generation - only ROM files are needed for Xen
38 # and the ISO tools (genisoimage/xorrisofs) are not available
39 sed -i 's|bin/ipxe.iso||;s|bin/ipxe.usb||' ${S}/Makefile
40
44 oe_runmake 41 oe_runmake
45} 42}
46 43