Currently, when passing meson -Dconfig_rayer_spi=false , compilation fails as the proper headers and defines are not available.
Added need_raw_access based on whichever files include hwaccess.h
Signed-off-by: Rosen Penev rosenp@gmail.com --- meson.build | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/meson.build b/meson.build index 5374e87..a756c8e 100644 --- a/meson.build +++ b/meson.build @@ -127,14 +127,17 @@ endif if config_atahpt srcs += 'atahpt.c' cargs += '-DCONFIG_ATAHPT=1' + need_raw_access = true endif if config_atapromise srcs += 'atapromise.c' cargs += '-DCONFIG_ATAPROMISE=1' + need_raw_access = true endif if config_atavia srcs += 'atavia.c' cargs += '-DCONFIG_ATAVIA=1' + need_raw_access = true endif if config_buspirate_spi srcs += 'buspirate_spi.c' @@ -160,6 +163,7 @@ endif if config_drkaiser srcs += 'drkaiser.c' cargs += '-DCONFIG_DRKAISER=1' + need_raw_access = true endif if config_dummy srcs += 'dummyflasher.c' @@ -174,6 +178,7 @@ endif if config_gfxnvidia srcs += 'gfxnvidia.c' cargs += '-DCONFIG_GFXNVIDIA=1' + need_raw_access = true endif if config_raiden srcs += 'raiden_debug_spi.c' @@ -196,6 +201,7 @@ if config_internal srcs += 'wbsio_spi.c' endif config_bitbang_spi = true + need_raw_access = true cargs += '-DCONFIG_INTERNAL=1' if get_option('config_internal_dmi') # Use internal DMI/SMBIOS decoder by default instead of relying on dmidecode. @@ -205,6 +211,7 @@ endif if config_it8212 srcs += 'it8212.c' cargs += '-DCONFIG_IT8212=1' + need_raw_access = true endif if config_linux_mtd srcs += 'linux_mtd.c' @@ -221,32 +228,39 @@ endif if config_nic3com srcs += 'nic3com.c' cargs += '-DCONFIG_NIC3COM=1' + need_raw_access = true endif if config_nicintel srcs += 'nicintel.c' cargs += '-DCONFIG_NICINTEL=1' + need_raw_access = true endif if config_nicintel_eeprom srcs += 'nicintel_eeprom.c' cargs += '-DCONFIG_NICINTEL_EEPROM=1' + need_raw_access = true endif if config_nicintel_spi srcs += 'nicintel_spi.c' config_bitbang_spi = true cargs += '-DCONFIG_NICINTEL_SPI=1' + need_raw_access = true endif if config_nicnatsemi srcs += 'nicnatsemi.c' cargs += '-DCONFIG_NICNATSEMI=1' + need_raw_access = true endif if config_nicrealtek srcs += 'nicrealtek.c' cargs += '-DCONFIG_NICREALTEK=1' + need_raw_access = true endif if config_ogp_spi config_bitbang_spi = true srcs += 'ogp_spi.c' cargs += '-DCONFIG_OGP_SPI=1' + need_raw_access = true endif if config_pickit2_spi srcs += 'pickit2_spi.c' @@ -267,6 +281,7 @@ endif if config_satamv srcs += 'satamv.c' cargs += '-DCONFIG_SATAMV=1' + need_raw_access = true endif if config_satasii srcs += 'satasii.c' @@ -276,6 +291,7 @@ if config_serprog srcs += 'serprog.c' cargs += '-DCONFIG_SERPROG=1' need_serial = true + need_raw_access = true endif if config_usbblaster_spi srcs += 'usbblaster_spi.c'
Fixes meson error:
meson.build:304:3: ERROR: Unknown variable "config_bitbang_spi".
Signed-off-by: Rosen Penev rosenp@gmail.com --- meson.build | 1 + meson_options.txt | 1 + 2 files changed, 2 insertions(+)
diff --git a/meson.build b/meson.build index a756c8e..24dd3ce 100644 --- a/meson.build +++ b/meson.build @@ -33,6 +33,7 @@ add_project_arguments('-DFLASHROM_VERSION="' + meson.project_version() + '"', la config_atahpt = get_option('config_atahpt') config_atapromise = get_option('config_atapromise') config_atavia = get_option('config_atavia') +config_bitbang_spi = get_option('config_bitbang_spi') config_buspirate_spi = get_option('config_buspirate_spi') config_ch341a_spi = get_option('config_ch341a_spi') config_dediprog = get_option('config_dediprog') diff --git a/meson_options.txt b/meson_options.txt index ac48e4e..4571b10 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -4,6 +4,7 @@ option('usb', type : 'boolean', value : true, description : 'use libusb1') option('config_atahpt', type : 'boolean', value : false, description : 'Highpoint (HPT) ATA/RAID controllers') option('config_atapromise', type : 'boolean', value : false, description : 'Promise ATA controller') option('config_atavia', type : 'boolean', value : true, description : 'VIA VT6421A LPC memory') +option('config_bitbang_spi', type : 'boolean', value : true, description : 'Bitbang') option('config_buspirate_spi', type : 'boolean', value : true, description : 'Bus Pirate SPI') option('config_ch341a_spi', type : 'boolean', value : true, description : 'Winchiphead CH341A') option('config_dediprog', type : 'boolean', value : true, description : 'Dediprog SF100')