2017-03-31 15:18:46 +00:00
|
|
|
modules-$(CONFIG_FLASHROM) += flashrom
|
2017-03-30 18:35:30 +00:00
|
|
|
|
|
|
|
flashrom_depends := pciutils $(musl_dep)
|
|
|
|
|
2023-06-23 16:21:49 +00:00
|
|
|
flashrom_version := 1776bb46ba6ea3d1ab2ec3f0cd88158aabed7400
|
2017-03-30 18:35:30 +00:00
|
|
|
flashrom_dir := flashrom-$(flashrom_version)
|
2020-12-30 18:43:09 +00:00
|
|
|
flashrom_tar := $(flashrom_dir).tar.gz
|
|
|
|
flashrom_url := https://github.com/flashrom/flashrom/archive/$(flashrom_version).tar.gz
|
2023-06-23 16:21:49 +00:00
|
|
|
flashrom_hash := 65e262ca4428a0ceddd73f481ed0d8444393b73a78469f266a4457dfc834ecb7
|
2017-03-30 18:35:30 +00:00
|
|
|
|
2022-10-09 21:23:48 +00:00
|
|
|
# Default options for flashrom
|
|
|
|
flashrom_cfg := \
|
2017-03-30 21:12:22 +00:00
|
|
|
WARNERROR=no \
|
2020-10-18 14:17:34 +00:00
|
|
|
CONFIG_NOTHING=yes \
|
|
|
|
CONFIG_INTERNAL=yes \
|
2023-06-26 13:29:13 +00:00
|
|
|
CONFIG_INTERNAL_X86=yes \
|
2017-03-30 18:35:30 +00:00
|
|
|
|
2022-10-09 21:23:48 +00:00
|
|
|
ifeq "$(CONFIG_TARGET_ARCH)" "ppc64"
|
|
|
|
flashrom_cfg := \
|
|
|
|
WARNERROR=no \
|
|
|
|
CONFIG_NOTHING=yes \
|
2023-06-26 13:29:13 +00:00
|
|
|
CONFIG_LINUX_MTD=yes
|
2022-10-09 21:23:48 +00:00
|
|
|
endif
|
|
|
|
|
2023-06-26 13:29:13 +00:00
|
|
|
#Only enable AST1100 if requested per board configs
|
|
|
|
ifeq "$(CONFIG_FLASHROM_AST1100)" "y"
|
|
|
|
flashrom_cfg += CONFIG_AST1100=yes
|
|
|
|
endif
|
|
|
|
|
2022-10-09 21:23:48 +00:00
|
|
|
flashrom_target := \
|
|
|
|
$(MAKE_JOBS) \
|
2023-06-30 18:20:23 +00:00
|
|
|
CFLAGS="-Os -I$(INSTALL)/include/pci" \
|
|
|
|
DESTDIR="$(INSTALL)" \
|
|
|
|
INSTALL="$(INSTALL)" \
|
|
|
|
LDFLAGS="-L$(INSTALL)/lib" \
|
|
|
|
PREFIX="$(INSTALL)" \
|
2022-10-09 21:23:48 +00:00
|
|
|
$(CROSS_TOOLS) \
|
2023-06-23 16:21:49 +00:00
|
|
|
$(flashrom_cfg) \
|
|
|
|
flashrom
|
2022-10-09 21:23:48 +00:00
|
|
|
|
2017-03-30 18:35:30 +00:00
|
|
|
flashrom_output := \
|
|
|
|
flashrom
|
|
|
|
|
|
|
|
flashrom_libraries := \
|
|
|
|
|
|
|
|
flashrom_configure :=
|