You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
2.9 KiB

  1. # Flashrom variants
  2. define DefaultProgrammer
  3. MAKE_FLAGS += CONFIG_DEFAULT_PROGRAMMER=PROGRAMMER_$(1)
  4. endef
  5. define DefineConfig
  6. MAKE_FLAGS += NEED_$(1)=$(2)
  7. endef
  8. define DefineProgrammer
  9. # Selecting invalid programmers will fail
  10. # Only disable unwanted programmers and keep the default ones
  11. ifeq ($(2),no)
  12. MAKE_FLAGS += CONFIG_$(1)=$(2)
  13. endif
  14. endef
  15. ifeq ($(BUILD_VARIANT),full)
  16. $(eval $(call DefaultProgrammer,LINUX_SPI))
  17. FLASHROM_BASIC := yes
  18. FLASHROM_FTDI := yes
  19. FLASHROM_PCI := yes
  20. FLASHROM_SERIAL := yes
  21. FLASHROM_USB := yes
  22. endif
  23. ifeq ($(BUILD_VARIANT),pci)
  24. $(eval $(call DefaultProgrammer,INTERNAL))
  25. FLASHROM_BASIC := yes
  26. FLASHROM_FTDI := no
  27. FLASHROM_PCI := yes
  28. FLASHROM_SERIAL := no
  29. FLASHROM_USB := no
  30. endif
  31. ifeq ($(BUILD_VARIANT),spi)
  32. $(eval $(call DefaultProgrammer,LINUX_SPI))
  33. FLASHROM_BASIC := yes
  34. FLASHROM_FTDI := no
  35. FLASHROM_PCI := no
  36. FLASHROM_SERIAL := no
  37. FLASHROM_USB := no
  38. endif
  39. ifeq ($(BUILD_VARIANT),usb)
  40. $(eval $(call DefaultProgrammer,SERPROG))
  41. FLASHROM_BASIC := yes
  42. FLASHROM_FTDI := yes
  43. FLASHROM_PCI := no
  44. FLASHROM_SERIAL := yes
  45. FLASHROM_USB := yes
  46. endif
  47. # Misc
  48. $(eval $(call DefineProgrammer,LINUX_SPI,$(FLASHROM_BASIC)))
  49. #$(eval $(call DefineProgrammer,MSTARDDC_SPI,$(FLASHROM_BASIC)))
  50. $(eval $(call DefineProgrammer,DUMMY,$(FLASHROM_BASIC)))
  51. # FTDI
  52. $(eval $(call DefineConfig,FTDI,$(FLASHROM_FTDI)))
  53. $(eval $(call DefineProgrammer,FT2232_SPI,$(FLASHROM_FTDI)))
  54. $(eval $(call DefineProgrammer,USBBLASTER_SPI,$(FLASHROM_FTDI)))
  55. # PCI
  56. $(eval $(call DefineConfig,PCI,$(FLASHROM_PCI)))
  57. $(eval $(call DefineProgrammer,INTERNAL,$(FLASHROM_PCI)))
  58. $(eval $(call DefineProgrammer,RAYER_SPI,$(FLASHROM_PCI)))
  59. $(eval $(call DefineProgrammer,NIC3COM,$(FLASHROM_PCI)))
  60. $(eval $(call DefineProgrammer,GFXNVIDIA,$(FLASHROM_PCI)))
  61. $(eval $(call DefineProgrammer,SATASII,$(FLASHROM_PCI)))
  62. #$(eval $(call DefineProgrammer,ATAHPT,$(FLASHROM_PCI)))
  63. $(eval $(call DefineProgrammer,ATAVIA,$(FLASHROM_PCI)))
  64. $(eval $(call DefineProgrammer,IT8212,$(FLASHROM_PCI)))
  65. $(eval $(call DefineProgrammer,DRKAISER,$(FLASHROM_PCI)))
  66. $(eval $(call DefineProgrammer,NICREALTEK,$(FLASHROM_PCI)))
  67. #$(eval $(call DefineProgrammer,NICNATSEMI,$(FLASHROM_PCI)))
  68. $(eval $(call DefineProgrammer,NICINTEL,$(FLASHROM_PCI)))
  69. $(eval $(call DefineProgrammer,NICINTEL_SPI,$(FLASHROM_PCI)))
  70. $(eval $(call DefineProgrammer,NICINTEL_EEPROM,$(FLASHROM_PCI)))
  71. $(eval $(call DefineProgrammer,OGP_SPI,$(FLASHROM_PCI)))
  72. $(eval $(call DefineProgrammer,SATAMV,$(FLASHROM_PCI)))
  73. # Serial
  74. $(eval $(call DefineConfig,SERIAL,$(FLASHROM_SERIAL)))
  75. $(eval $(call DefineProgrammer,SERPROG,$(FLASHROM_SERIAL)))
  76. $(eval $(call DefineProgrammer,PONY_SPI,$(FLASHROM_SERIAL)))
  77. $(eval $(call DefineProgrammer,BUSPIRATE_SPI,$(FLASHROM_SERIAL)))
  78. # USB
  79. $(eval $(call DefineConfig,USB,$(FLASHROM_USB)))
  80. $(eval $(call DefineProgrammer,PICKIT2_SPI,$(FLASHROM_USB)))
  81. #$(eval $(call DefineProgrammer,DEDIPROG,$(FLASHROM_USB)))