Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>lilik-openwrt-22.03
@ -1,279 +0,0 @@ | |||
menu "Flashrom configuration" | |||
depends on PACKAGE_flashrom | |||
choice | |||
prompt "Default Programmer" | |||
default DEFPROG_INTERNAL if FLASHROM_PCI | |||
default DEFPROG_LINUX_SPI | |||
config DEFPROG_INTERNAL | |||
depends on FRPROG_INTERNAL | |||
bool "Internal" | |||
config DEFPROG_LINUX_SPI | |||
depends on FRPROG_LINUX_SPI | |||
bool "Linux SPI" | |||
config DEFPROG_SERPROG | |||
depends on FRPROG_SERPROG | |||
bool "Serial" | |||
config DEFPROG_RAYER_SPI | |||
depends on FRPROG_RAYER_SPI | |||
bool "Rayer SPI" | |||
config DEFPROG_PONY_SPI | |||
depends on FRPROG_PONY_SPI | |||
bool "Pony SPI" | |||
config DEFPROG_NIC3COM | |||
depends on FRPROG_NIC3COM | |||
bool "NIC3Com" | |||
config DEFPROG_GFXNVIDIA | |||
depends on FRPROG_GFXNVIDIA | |||
bool "GFX Nvidia" | |||
config DEFPROG_SATASII | |||
depends on FRPROG_SATASII | |||
bool "SATASII" | |||
# config DEFPROG_ATAHPT | |||
# depends on FRPROG_ATAHPT | |||
# bool "Highpoint (HPT) ATA/RAID" | |||
config DEFPROG_ATAVIA | |||
depends on FRPROG_ATAVIA | |||
bool "ATAVIA" | |||
config DEFPROG_FT2232_SPI | |||
depends on FRPROG_FT2232_SPI | |||
bool "FT2232 SPI" | |||
config DEFPROG_USBBLASTER_SPI | |||
depends on FRPROG_USBBLASTER_SPI | |||
bool "USBBlaster SPI" | |||
# config DEFPROG_MSTARDDC_SPI | |||
# depends on FRPROG_MSTARDDC_SPI | |||
# bool "MSTAR DDC SPI" | |||
config DEFPROG_PICKIT2_SPI | |||
depends on FRPROG_PICKIT2_SPI | |||
bool "PICkit2 SPI" | |||
config DEFPROG_DUMMY | |||
depends on FRPROG_DUMMY | |||
bool "Dummy" | |||
config DEFPROG_DRKAISER | |||
depends on FRPROG_DRKAISER | |||
bool "Dr. Kaiser" | |||
config DEFPROG_NICREALTEK | |||
depends on FRPROG_NICREALTEK | |||
bool "Realtek NICs" | |||
# config DEFPROG_NICNATSEMI | |||
# depends on FRPROG_NICNATSEMI | |||
# bool "National Semiconductor NICs" | |||
config DEFPROG_NICINTEL | |||
depends on FRPROG_NICINTEL | |||
bool "Intel NICs" | |||
config DEFPROG_NICINTEL_SPI | |||
depends on FRPROG_NICINTEL_SPI | |||
bool "Intel NICs SPI" | |||
config DEFPROG_NICINTEL_EEPROM | |||
depends on FRPROG_NICINTEL_EEPROM | |||
bool "Intel NICs EEPROM" | |||
config DEFPROG_OGP_SPI | |||
depends on FRPROG_OGP_SPI | |||
bool "OGP SPI" | |||
config DEFPROG_BUSPIRATE_SPI | |||
depends on FRPROG_BUSPIRATE_SPI | |||
bool "SPI BUS Pirate" | |||
# config DEFPROG_DEDIPROG | |||
# depends on FRPROG_DEDIPROG | |||
# bool "Dediprog SF100" | |||
config DEFPROG_SATAMV | |||
depends on FRPROG_SATAMV | |||
bool "Marvell SATA" | |||
config DEFPROG_IT8212 | |||
depends on FRPROG_IT8212 | |||
bool "ITE IT8212F PATA" | |||
endchoice | |||
menu "Misc Programmers" | |||
config FRPROG_LINUX_SPI | |||
bool "Linux SPI" | |||
default y | |||
# config FRPROG_MSTARDDC_SPI | |||
# bool "MSTAR DDC" | |||
# default n | |||
config FRPROG_DUMMY | |||
bool "Dummy" | |||
default y | |||
endmenu | |||
config FLASHROM_FTDI | |||
bool "FTDI Support" | |||
default y | |||
menu "FTDI Programmers" | |||
depends on FLASHROM_FTDI | |||
config FRPROG_FT2232_SPI | |||
depends on FLASHROM_FTDI | |||
bool "FT2232 SPI" | |||
default y | |||
config FRPROG_USBBLASTER_SPI | |||
depends on FLASHROM_FTDI | |||
bool "USBBlaster SPI" | |||
default y | |||
endmenu | |||
config FLASHROM_PCI | |||
bool "PCI Support" | |||
default y if (TARGET_x86||TARGET_x86_64) | |||
menu "PCI Programmers" | |||
depends on FLASHROM_PCI | |||
config FRPROG_INTERNAL | |||
depends on FLASHROM_PCI | |||
bool "Internal" | |||
default y | |||
config FRPROG_RAYER_SPI | |||
depends on FLASHROM_PCI | |||
bool "Rayer SPI" | |||
default y | |||
config FRPROG_NIC3COM | |||
depends on FLASHROM_PCI | |||
bool "NIC3Com" | |||
default y | |||
config FRPROG_GFXNVIDIA | |||
depends on FLASHROM_PCI | |||
bool "GFX Nvidia" | |||
default y | |||
config FRPROG_SATASII | |||
depends on FLASHROM_PCI | |||
bool "SATASII" | |||
default y | |||
# config FRPROG_ATAHPT | |||
# depends on FLASHROM_PCI | |||
# bool "Highpoint (HPT) ATA/RAID" | |||
# default n | |||
config FRPROG_ATAVIA | |||
depends on FLASHROM_PCI | |||
bool "ATAVIA" | |||
default y | |||
config FRPROG_IT8212 | |||
depends on FLASHROM_PCI | |||
bool "ITE IT8212F PATA" | |||
default y | |||
config FRPROG_DRKAISER | |||
depends on FLASHROM_PCI | |||
bool "Dr. Kaiser" | |||
default y | |||
config FRPROG_NICREALTEK | |||
depends on FLASHROM_PCI | |||
bool "Realtek NICs" | |||
default y | |||
# config FRPROG_NICNATSEMI | |||
# depends on FLASHROM_PCI | |||
# bool "National Semiconductor NICs" | |||
# default n | |||
config FRPROG_NICINTEL | |||
depends on FLASHROM_PCI | |||
bool "Intel NICs" | |||
default y | |||
config FRPROG_NICINTEL_SPI | |||
depends on FLASHROM_PCI | |||
bool "Intel NICs SPI" | |||
default y | |||
config FRPROG_NICINTEL_EEPROM | |||
depends on FLASHROM_PCI | |||
bool "Intel NICs EEPROM" | |||
default y | |||
config FRPROG_OGP_SPI | |||
depends on FLASHROM_PCI | |||
bool "OGP SPI" | |||
default y | |||
config FRPROG_SATAMV | |||
depends on FLASHROM_PCI | |||
bool "Marvell SATA" | |||
default y | |||
endmenu | |||
config FLASHROM_SERIAL | |||
bool "Serial Support" | |||
default y | |||
menu "Serial Programmers" | |||
depends on FLASHROM_SERIAL | |||
config FRPROG_SERPROG | |||
depends on FLASHROM_SERIAL | |||
bool "Serial" | |||
default y | |||
config FRPROG_PONY_SPI | |||
depends on FLASHROM_SERIAL | |||
bool "Pony SPI" | |||
default y | |||
config FRPROG_BUSPIRATE_SPI | |||
depends on FLASHROM_SERIAL | |||
bool "SPI BUS Pirate" | |||
default y | |||
endmenu | |||
config FLASHROM_USB | |||
bool "USB Support" | |||
default y | |||
menu "USB Programmers" | |||
depends on FLASHROM_USB | |||
config FRPROG_PICKIT2_SPI | |||
depends on FLASHROM_USB | |||
bool "PICkit2 SPI" | |||
default y | |||
# config FRPROG_DEDIPROG | |||
# depends on FLASHROM_USB | |||
# bool "Dediprog SF100" | |||
# default n | |||
endmenu | |||
endmenu |
@ -1,54 +1,88 @@ | |||
# Flashrom configuration | |||
# Flashrom variants | |||
define DefaultProgrammer | |||
MAKE_FLAGS += CONFIG_DEFAULT_PROGRAMMER=PROGRAMMER_$(1) | |||
endef | |||
define DefineConfig | |||
ifeq ($(CONFIG_FLASHROM_$(1)),) | |||
MAKE_FLAGS += NEED_$(1)=0 | |||
endif | |||
MAKE_FLAGS += NEED_$(1)=$(2) | |||
endef | |||
define DefineProgrammer | |||
ifeq ($(CONFIG_FRPROG_$(1)),) | |||
MAKE_FLAGS += CONFIG_$(1)=0 | |||
endif | |||
ifneq ($(CONFIG_DEFPROG_$(1)),) | |||
MAKE_FLAGS += CONFIG_DEFAULT_PROGRAMMER=CONFIG_$(1) | |||
# Selecting invalid programmers will fail | |||
# Only disable unwanted programmers and keep the default ones | |||
ifeq ($(2),no) | |||
MAKE_FLAGS += CONFIG_$(1)=$(2) | |||
endif | |||
endef | |||
ifeq ($(BUILD_VARIANT),full) | |||
$(eval $(call DefaultProgrammer,LINUX_SPI)) | |||
FLASHROM_BASIC := yes | |||
FLASHROM_FTDI := yes | |||
FLASHROM_PCI := yes | |||
FLASHROM_SERIAL := yes | |||
FLASHROM_USB := yes | |||
endif | |||
ifeq ($(BUILD_VARIANT),pci) | |||
$(eval $(call DefaultProgrammer,INTERNAL)) | |||
FLASHROM_BASIC := yes | |||
FLASHROM_FTDI := no | |||
FLASHROM_PCI := yes | |||
FLASHROM_SERIAL := no | |||
FLASHROM_USB := no | |||
endif | |||
ifeq ($(BUILD_VARIANT),spi) | |||
$(eval $(call DefaultProgrammer,LINUX_SPI)) | |||
FLASHROM_BASIC := yes | |||
FLASHROM_FTDI := no | |||
FLASHROM_PCI := no | |||
FLASHROM_SERIAL := no | |||
FLASHROM_USB := no | |||
endif | |||
ifeq ($(BUILD_VARIANT),usb) | |||
$(eval $(call DefaultProgrammer,SERPROG)) | |||
FLASHROM_BASIC := yes | |||
FLASHROM_FTDI := yes | |||
FLASHROM_PCI := no | |||
FLASHROM_SERIAL := yes | |||
FLASHROM_USB := yes | |||
endif | |||
# Misc | |||
$(eval $(call DefineProgrammer,LINUX_SPI)) | |||
#$(eval $(call DefineProgrammer,MSTARDDC_SPI)) | |||
$(eval $(call DefineProgrammer,DUMMY)) | |||
$(eval $(call DefineProgrammer,LINUX_SPI,$(FLASHROM_BASIC))) | |||
#$(eval $(call DefineProgrammer,MSTARDDC_SPI,$(FLASHROM_BASIC))) | |||
$(eval $(call DefineProgrammer,DUMMY,$(FLASHROM_BASIC))) | |||
# FTDI | |||
$(eval $(call DefineConfig,FTDI)) | |||
$(eval $(call DefineProgrammer,FT2232_SPI)) | |||
$(eval $(call DefineProgrammer,USBBLASTER_SPI)) | |||
$(eval $(call DefineConfig,FTDI,$(FLASHROM_FTDI))) | |||
$(eval $(call DefineProgrammer,FT2232_SPI,$(FLASHROM_FTDI))) | |||
$(eval $(call DefineProgrammer,USBBLASTER_SPI,$(FLASHROM_FTDI))) | |||
# PCI | |||
$(eval $(call DefineConfig,PCI)) | |||
$(eval $(call DefineProgrammer,INTERNAL)) | |||
$(eval $(call DefineProgrammer,RAYER_SPI)) | |||
$(eval $(call DefineProgrammer,NIC3COM)) | |||
$(eval $(call DefineProgrammer,GFXNVIDIA)) | |||
$(eval $(call DefineProgrammer,SATASII)) | |||
#$(eval $(call DefineProgrammer,ATAHPT)) | |||
$(eval $(call DefineProgrammer,ATAVIA)) | |||
$(eval $(call DefineProgrammer,IT8212)) | |||
$(eval $(call DefineProgrammer,DRKAISER)) | |||
$(eval $(call DefineProgrammer,NICREALTEK)) | |||
#$(eval $(call DefineProgrammer,NICNATSEMI)) | |||
$(eval $(call DefineProgrammer,NICINTEL)) | |||
$(eval $(call DefineProgrammer,NICINTEL_SPI)) | |||
$(eval $(call DefineProgrammer,NICINTEL_EEPROM)) | |||
$(eval $(call DefineProgrammer,OGP_SPI)) | |||
$(eval $(call DefineProgrammer,SATAMV)) | |||
$(eval $(call DefineConfig,PCI,$(FLASHROM_PCI))) | |||
$(eval $(call DefineProgrammer,INTERNAL,$(FLASHROM_PCI))) | |||
$(eval $(call DefineProgrammer,RAYER_SPI,$(FLASHROM_PCI))) | |||
$(eval $(call DefineProgrammer,NIC3COM,$(FLASHROM_PCI))) | |||
$(eval $(call DefineProgrammer,GFXNVIDIA,$(FLASHROM_PCI))) | |||
$(eval $(call DefineProgrammer,SATASII,$(FLASHROM_PCI))) | |||
#$(eval $(call DefineProgrammer,ATAHPT,$(FLASHROM_PCI))) | |||
$(eval $(call DefineProgrammer,ATAVIA,$(FLASHROM_PCI))) | |||
$(eval $(call DefineProgrammer,IT8212,$(FLASHROM_PCI))) | |||
$(eval $(call DefineProgrammer,DRKAISER,$(FLASHROM_PCI))) | |||
$(eval $(call DefineProgrammer,NICREALTEK,$(FLASHROM_PCI))) | |||
#$(eval $(call DefineProgrammer,NICNATSEMI,$(FLASHROM_PCI))) | |||
$(eval $(call DefineProgrammer,NICINTEL,$(FLASHROM_PCI))) | |||
$(eval $(call DefineProgrammer,NICINTEL_SPI,$(FLASHROM_PCI))) | |||
$(eval $(call DefineProgrammer,NICINTEL_EEPROM,$(FLASHROM_PCI))) | |||
$(eval $(call DefineProgrammer,OGP_SPI,$(FLASHROM_PCI))) | |||
$(eval $(call DefineProgrammer,SATAMV,$(FLASHROM_PCI))) | |||
# Serial | |||
$(eval $(call DefineConfig,SERIAL)) | |||
$(eval $(call DefineProgrammer,SERPROG)) | |||
$(eval $(call DefineProgrammer,PONY_SPI)) | |||
$(eval $(call DefineProgrammer,BUSPIRATE_SPI)) | |||
$(eval $(call DefineConfig,SERIAL,$(FLASHROM_SERIAL))) | |||
$(eval $(call DefineProgrammer,SERPROG,$(FLASHROM_SERIAL))) | |||
$(eval $(call DefineProgrammer,PONY_SPI,$(FLASHROM_SERIAL))) | |||
$(eval $(call DefineProgrammer,BUSPIRATE_SPI,$(FLASHROM_SERIAL))) | |||
# USB | |||
$(eval $(call DefineConfig,USB)) | |||
$(eval $(call DefineProgrammer,PICKIT2_SPI)) | |||
#$(eval $(call DefineProgrammer,DEDIPROG)) | |||
$(eval $(call DefineConfig,USB,$(FLASHROM_USB))) | |||
$(eval $(call DefineProgrammer,PICKIT2_SPI,$(FLASHROM_USB))) | |||
#$(eval $(call DefineProgrammer,DEDIPROG,$(FLASHROM_USB))) |