aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-bsp/flashrom/flashrom/meson-fixes.patch
blob: e45236ee07ca13d76f37ddf9cae591f42eecaecd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Add a ftdi option alongside USB and PCI to control the external dependency, and
ensure that the build is successful in all combinations of options.

Upstream-Status: Pending
Signed-off-by: Ross Burton <ross.burton@arm.com>

diff --git a/meson.build b/meson.build
index 375089c..0df9d69 100644
--- a/meson.build
+++ b/meson.build
@@ -91,6 +91,8 @@ else
   config_digilent_spi = false
   config_developerbox_spi = false
   config_pickit2_spi = false
+  config_stlinkv3_spi = false
+  config_usbblaster_spi = false
 endif
 
 # some programmers require libpci
@@ -118,6 +120,21 @@ else
   config_satasii = false
 endif
 
+# some programmers require libftdi
+if get_option('ftdi')
+  deps += dependency('libftdi1')
+else
+  config_ft2232_spi = false
+  config_usbblaster_spi = false
+endif
+
+if not (target_machine.cpu_family() == 'x86' or target_machine.cpu_family() == 'x86_64')
+  config_satamv = false
+  config_nic3com = false
+  config_rayer_spi = false
+  config_nicrealtek = false
+endif
+
 # set defines for configured programmers
 if config_atahpt
   srcs += 'atahpt.c'
@@ -163,7 +180,6 @@ endif
 if config_ft2232_spi
   srcs += 'ft2232_spi.c'
   cargs += '-DCONFIG_FT2232_SPI=1'
-  deps += dependency('libftdi1')
   cargs += '-DHAVE_FT232H=1'
 endif
 if config_gfxnvidia
@@ -216,6 +232,7 @@ endif
 if config_nicintel
   srcs += 'nicintel.c'
   cargs += '-DCONFIG_NICINTEL=1'
+  need_raw_access = true
 endif
 if config_nicintel_eeprom
   srcs += 'nicintel_eeprom.c'
diff --git a/meson_options.txt b/meson_options.txt
index ea87311..b6b842d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,5 +1,6 @@
 option('pciutils', type : 'boolean', value : true, description : 'use pciutils')
 option('usb', type : 'boolean', value : true, description : 'use libusb1')
+option('ftdi', type : 'boolean', value : true, description : 'use libftdi')
 
 option('config_atahpt', type : 'boolean', value : false, description : 'Highpoint (HPT) ATA/RAID controllers')
 option('config_atapromise', type : 'boolean', value : false, description : 'Promise ATA controller')