1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 22:43:17 +02:00

meson: Refactor the programmer selection

This implements a positive selection choice of which programmers should
be built.

- Each programmer is represented through an entry in the programmer
  dictionary
- The entry contains:
  - A list of systems and CPU families where the programmer can run on
  - A list of required dependencies
  - A list of sources needed to build the programmer
  - A list of compiler flags
  - A flag to determin if the programmer should be build on 'auto'
- If an entry is not given it is set to the default value
- If a programmer gets selected, an 'active' flag is added to the entry
  on runtime
- All programmers with an 'active' flag will be included in the build
- One or more programmers can be selected through '-Dprogrammer=<>'
  - 'auto' enables all programmers which are available, deps are found
    and have the 'default' flag
  - 'all' enables all programmers which are available and deps are found
  - 'group_***' enables all programmers which are available, deps are
    found and the programmer belongs to the selected group
  - '_programmer_name_' forces the programmer to be built or the build
    will fail.

Change-Id: Ib44b26e3748fc71f116184082b4aed0bb208b4c1
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/63724
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Thomas Heijligen
2022-08-18 12:16:29 +02:00
committed by Thomas Heijligen
parent 66dc554d7f
commit 3753d29b97
4 changed files with 467 additions and 346 deletions

View File

@ -1,47 +1,18 @@
option('pciutils', type : 'boolean', value : true, description : 'use pciutils')
option('usb', type : 'boolean', value : true, description : 'use libusb1')
option('classic_cli', type : 'feature', value : 'enabled', description : 'classic flashrom cli binary')
option('classic_cli_print_wiki', type : 'feature', value : 'disabled', description : 'Print Wiki')
option('default_programmer_name', type : 'string', description : 'default programmer')
option('default_programmer_args', type : 'string', description : 'default programmer arguments')
option('ich_descriptors_tool', type : 'feature', value : 'auto', description : 'Build ich_descriptors_tool')
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_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')
option('config_developerbox_spi', type : 'boolean', value : true, description : 'Developerbox emergency recovery')
option('config_digilent_spi', type : 'boolean', value : true, description : 'Digilent Development board JTAG')
option('config_jlink_spi', type : 'boolean', value : false, description : 'SEGGER J-Link and compatible devices')
option('config_drkaiser', type : 'boolean', value : true, description : 'Dr. Kaiser')
option('config_dummy', type : 'boolean', value : true, description : 'dummy tracing')
option('config_ft2232_spi', type : 'boolean', value : true, description : 'FT2232 SPI dongles')
option('config_gfxnvidia', type : 'boolean', value : true, description : 'NVIDIA graphics cards')
option('config_raiden_debug_spi', type : 'boolean', value : true, description : 'ChromiumOS Servo DUT debug board')
option('config_internal', type : 'boolean', value : true, description : 'internal/onboard')
option('config_internal_dmi', type : 'boolean', value : true, description : 'Use internal DMI parser')
option('config_it8212', type : 'boolean', value : true, description : 'ITE IT8212F PATA')
option('config_linux_mtd', type : 'boolean', value : true, description : 'Linux MTD interfaces')
option('config_linux_spi', type : 'boolean', value : true, description : 'Linux spidev interfaces')
option('config_mstarddc_spi', type : 'boolean', value : false, description : 'MSTAR DDC support')
option('config_nic3com', type : 'boolean', value : true, description : '3Com NICs')
option('config_nicintel_eeprom', type : 'boolean', value : true, description : 'EEPROM on Intel NICs')
option('config_nicintel_spi', type : 'boolean', value : true, description : 'SPI on Intel NICs')
option('config_nicintel', type : 'boolean', value : true, description : 'Intel NICs')
option('config_nicnatsemi', type : 'boolean', value : false, description : 'National Semiconductor NICs')
option('config_nicrealtek', type : 'boolean', value : true, description : 'Realtek NICs')
option('config_ogp_spi', type : 'boolean', value : true, description : 'SPI on OGP cards')
option('config_pickit2_spi', type : 'boolean', value : true, description : 'PICkit2 SPI')
option('config_pony_spi', type : 'boolean', value : true, description : 'PonyProg2000 SPI')
option('config_rayer_spi', type : 'boolean', value : true, description : 'RayeR SPIPGM')
option('config_satamv', type : 'boolean', value : true, description : 'Marvell SATA controllers')
option('config_satasii', type : 'boolean', value : true, description : 'SiI SATA controllers')
option('config_serprog', type : 'boolean', value : true, description : 'serprog')
option('config_usbblaster_spi', type : 'boolean', value : true, description : 'Altera USB-Blaster dongles')
option('config_stlinkv3_spi', type : 'boolean', value : true, description : 'STMicroelectronics STLINK-V3')
option('config_parade_lspcon', type : 'boolean', value : false, description : 'Parade USB-C to HDMI protocol translator')
option('config_mediatek_i2c_spi', type : 'boolean', value : false, description : 'MediaTek LCD controller')
option('config_realtek_mst_i2c_spi', type : 'boolean', value : true, description : 'Realtek MultiStream Transport MST')
option('tests', type : 'feature', value : 'auto', description : 'Build unit tests')
option('use_internal_dmi', type : 'boolean', value : 'true')
option('programmer', type : 'array', value : ['auto'], choices : [
'auto', 'all',
'group_internal', 'group_external',
'group_ftdi', 'group_i2c', 'group_jlink', 'group_pci', 'group_serial', 'group_usb',
'atahpt', 'atapromise', 'atavia', 'buspirate_spi', 'ch341a_spi', 'dediprog', 'developerbox_spi',
'digilent_spi', 'drkaiser', 'dummy', 'ft2232_spi', 'gfxnvidia', 'internal', 'it8212', 'jlink_spi',
'linux_mtd', 'linux_spi', 'mediatek_i2c_spi', 'mstarddc_spi', 'nic3com', 'nicintel',
'nicintel_eeprom', 'nicintel_spi', 'nicnatsemi', 'nicrealtek', 'ogp_spi', 'parade_lspcon',
'pickit2_spi', 'pony_spi', 'raiden_debug_spi', 'rayer_spi', 'realtek_mst_i2c_spi', 'satamv',
'satasii', 'serprog', 'stlinkv3_spi', 'usbblaster_spi',
], description: 'Active programmers')