diff options
author | Thomas Heijligen <thomas.heijligen@secunet.de> | 2021-06-01 16:22:14 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2021-06-10 12:53:31 +0000 |
commit | 732aafdfecf084cc4277a344ac26b4ea5d0dd3be (patch) | |
tree | 18dfe94b37e785f6ce5a5b865164417f222357c9 /Makefile | |
parent | bf0396a60081a508ff088c7374311eb170d6dbf1 (diff) | |
download | flashrom-732aafdfecf084cc4277a344ac26b4ea5d0dd3be.tar.gz flashrom-732aafdfecf084cc4277a344ac26b4ea5d0dd3be.tar.bz2 flashrom-732aafdfecf084cc4277a344ac26b4ea5d0dd3be.zip |
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>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -44,14 +44,12 @@ BUILD_DETAILS_FILE ?= build_details.txt # system attached to an external programmer while the default programmer is set to the internal programmer, and # you forget to use the -p parameter. This would (try to) overwrite the existing firmware of the computer # running flashrom). Please do not enable this without thinking about the possible consequences. Possible -# values are those specified in enum programmer in programmer.h (which depend on other CONFIG_* options -# evaluated below, namely those that enable/disable the various programmers). -# Compilation will fail for unspecified values. -CONFIG_DEFAULT_PROGRAMMER ?= PROGRAMMER_INVALID +# values can be found when running 'flashrom --list-supported' under the 'Supported programmers' section. +CONFIG_DEFAULT_PROGRAMMER_NAME ?= # The following adds a default parameter for the default programmer set above (only). -CONFIG_DEFAULT_PROGRAMMER_ARGS ?= '' +CONFIG_DEFAULT_PROGRAMMER_ARGS ?= # Example: compiling with -# make CONFIG_DEFAULT_PROGRAMMER=PROGRAMMER_SERPROG CONFIG_DEFAULT_PROGRAMMER_ARGS="dev=/dev/ttyUSB0:1500000" +# make CONFIG_DEFAULT_PROGRAMMER_NAME=serprog CONFIG_DEFAULT_PROGRAMMER_ARGS="dev=/dev/ttyUSB0:1500000" # would make executing './flashrom' (almost) equivialent to './flashrom -p serprog:dev=/dev/ttyUSB0:1500000'. # If your compiler spits out excessive warnings, run make WARNERROR=no @@ -868,7 +866,12 @@ CONFIG_INTERNAL_DMI ?= yes # Programmer drivers and programmer support infrastructure. # Depending on the CONFIG_* variables set and verified above we set compiler flags and parameters below. -FEATURE_CFLAGS += -D'CONFIG_DEFAULT_PROGRAMMER=$(CONFIG_DEFAULT_PROGRAMMER)' +ifdef CONFIG_DEFAULT_PROGRAMMER_NAME +FEATURE_CFLAGS += -D'CONFIG_DEFAULT_PROGRAMMER_NAME=&programmer_$(CONFIG_DEFAULT_PROGRAMMER_NAME)' +else +FEATURE_CFLAGS += -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' +endif + FEATURE_CFLAGS += -D'CONFIG_DEFAULT_PROGRAMMER_ARGS="$(CONFIG_DEFAULT_PROGRAMMER_ARGS)"' ifeq ($(CONFIG_INTERNAL), yes) |