1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 14:33:18 +02:00

CONFIG_DEFAULT_PROGRAMMER_NAME: Use programmer name instead of enum

CONFIG_DEFAULT_PROGRAMER_NAME replaces CONFIG_DEFAULT_PROGRAMMER.
It uses the name of the programmer for identification.
make CONFIG_DEFAULT_PROGRAMER_NAME=dummy and
meson -Ddefault_programmer_name=dummy will extend to
CONFIG_DEFAULT_PROGRAMER_NAME=&programmer_dummy in the code.

Change-Id: I976447787c6f6bfbdc0145d80d61e1ddcf97ac33
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/55123
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Thomas Heijligen
2021-06-01 16:22:14 +02:00
committed by Nico Huber
parent bf0396a600
commit 732aafdfec
5 changed files with 28 additions and 16 deletions

View File

@ -69,6 +69,8 @@ config_stlinkv3_spi = get_option('config_stlinkv3_spi')
config_lspcon_i2c_spi = get_option('config_lspcon_i2c_spi')
config_realtek_mst_i2c_spi = get_option('config_realtek_mst_i2c_spi')
config_print_wiki= get_option('print_wiki')
config_default_programmer_name = get_option('default_programmer_name')
config_default_programmer_args = get_option('default_programmer_args')
cargs = []
deps = []
@ -436,6 +438,14 @@ if config_print_wiki
cargs += '-DCONFIG_PRINT_WIKI=1'
endif
if config_default_programmer_name != ''
cargs += '-DCONFIG_DEFAULT_PROGRAMMER_NAME=&programmer_' + config_default_programmer_name
else
cargs += '-DCONFIG_DEFAULT_PROGRAMMER_NAME=NULL'
endif
cargs += '-DCONFIG_DEFAULT_PROGRAMMER_ARGS="' + config_default_programmer_args + '"'
# we can't just link_with libflashrom as we require all the internal symbols...
executable(
'flashrom',
@ -450,9 +460,7 @@ executable(
deps,
],
c_args : [
cargs,
'-DCONFIG_DEFAULT_PROGRAMMER=PROGRAMMER_INVALID',
'-DCONFIG_DEFAULT_PROGRAMMER_ARGS=""',
cargs
],
install : true,
install_dir : sbindir,