[flashrom] [PATCH] Partial architecture support for alpha hppa m68k sh s390

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Thu Feb 25 21:04:43 CET 2016


On 25.02.2016 01:15, Stefan Tauner wrote:
> On Wed, 24 Feb 2016 00:45:07 +0100
> Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net> wrote:
>
>> > New version: Add S390/S390x support.
>> > 
>> > Only non-PCI non-rawaccess hardware is supported.
>> > 
>> > No idea if it even compiles. I don't have hardware to test, it's a blind
>> > port.
>> > 
>> > Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
> FWIW, I have just managed to compile all of these with libusb1 +
> -compat, libftdi1 theoretically libpci (not used actually) on the build
> bot with dynamic linking (ill fix static linking on the currently
> about a dozen failing configurations soonish).
>
> I have also verified the defines used to identify the new
> architectures. I have not checked the assignments of make variables. If
> you think this is enough to merge it then you may read this as an
> acked-by.

Thanks for the review! I'll gladly take that ack.


>> > +# Disable all hardware related drivers on architectures with unknown raw access properties.
> The phrase "hardware related drivers" has some great potential for
> improvement ;)

Fixed. New version.

Only non-PCI non-rawaccess hardware is supported.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>

Index: flashrom-architecture_support_lite/Makefile
===================================================================
--- flashrom-architecture_support_lite/Makefile	(Revision 1942)
+++ flashrom-architecture_support_lite/Makefile	(Arbeitskopie)
@@ -414,6 +414,107 @@
 endif
 endif
 
+# Disable all drivers needing raw access (memory, PCI, port I/O) on
+# architectures with unknown raw access properties.
+# Right now those architectures are alpha hppa m68k sh s390
+ifneq ($(ARCH),$(filter $(ARCH),x86 mips ppc arm sparc))
+ifeq ($(CONFIG_INTERNAL), yes)
+UNSUPPORTED_FEATURES += CONFIG_INTERNAL=yes
+else
+override CONFIG_INTERNAL = no
+endif
+ifeq ($(CONFIG_RAYER_SPI), yes)
+UNSUPPORTED_FEATURES += CONFIG_RAYER_SPI=yes
+else
+override CONFIG_RAYER_SPI = no
+endif
+ifeq ($(CONFIG_PONY_SPI), yes)
+UNSUPPORTED_FEATURES += CONFIG_PONY_SPI=yes
+else
+override CONFIG_PONY_SPI = no
+endif
+ifeq ($(CONFIG_NIC3COM), yes)
+UNSUPPORTED_FEATURES += CONFIG_NIC3COM=yes
+else
+override CONFIG_NIC3COM = no
+endif
+ifeq ($(CONFIG_GFXNVIDIA), yes)
+UNSUPPORTED_FEATURES += CONFIG_GFXNVIDIA=yes
+else
+override CONFIG_GFXNVIDIA = no
+endif
+ifeq ($(CONFIG_SATASII), yes)
+UNSUPPORTED_FEATURES += CONFIG_SATASII=yes
+else
+override CONFIG_SATASII = no
+endif
+ifeq ($(CONFIG_ATAHPT), yes)
+UNSUPPORTED_FEATURES += CONFIG_ATAHPT=yes
+else
+override CONFIG_ATAHPT = no
+endif
+ifeq ($(CONFIG_ATAVIA), yes)
+UNSUPPORTED_FEATURES += CONFIG_ATAVIA=yes
+else
+override CONFIG_ATAVIA = no
+endif
+ifeq ($(CONFIG_ATAPROMISE), yes)
+UNSUPPORTED_FEATURES += CONFIG_ATAPROMISE=yes
+else
+override CONFIG_ATAPROMISE = no
+endif
+ifeq ($(CONFIG_MSTARDDC_SPI), yes)
+UNSUPPORTED_FEATURES += CONFIG_MSTARDDC_SPI=yes
+else
+override CONFIG_MSTARDDC_SPI = no
+endif
+ifeq ($(CONFIG_DRKAISER), yes)
+UNSUPPORTED_FEATURES += CONFIG_DRKAISER=yes
+else
+override CONFIG_DRKAISER = no
+endif
+ifeq ($(CONFIG_NICREALTEK), yes)
+UNSUPPORTED_FEATURES += CONFIG_NICREALTEK=yes
+else
+override CONFIG_NICREALTEK = no
+endif
+ifeq ($(CONFIG_NICNATSEMI), yes)
+UNSUPPORTED_FEATURES += CONFIG_NICNATSEMI=yes
+else
+override CONFIG_NICNATSEMI = no
+endif
+ifeq ($(CONFIG_NICINTEL), yes)
+UNSUPPORTED_FEATURES += CONFIG_NICINTEL=yes
+else
+override CONFIG_NICINTEL = no
+endif
+ifeq ($(CONFIG_NICINTEL_SPI), yes)
+UNSUPPORTED_FEATURES += CONFIG_NICINTEL_SPI=yes
+else
+override CONFIG_NICINTEL_SPI = no
+endif
+ifeq ($(CONFIG_NICINTEL_EEPROM), yes)
+UNSUPPORTED_FEATURES += CONFIG_NICINTEL_EEPROM=yes
+else
+override CONFIG_NICINTEL_EEPROM = no
+endif
+ifeq ($(CONFIG_OGP_SPI), yes)
+UNSUPPORTED_FEATURES += CONFIG_OGP_SPI=yes
+else
+override CONFIG_OGP_SPI = no
+endif
+ifeq ($(CONFIG_SATAMV), yes)
+UNSUPPORTED_FEATURES += CONFIG_SATAMV=yes
+else
+override CONFIG_SATAMV = no
+endif
+ifeq ($(CONFIG_IT8212), yes)
+UNSUPPORTED_FEATURES += CONFIG_IT8212=yes
+else
+override CONFIG_IT8212 = no
+endif
+endif
+
 ###############################################################################
 # Flash chip drivers and bus support infrastructure.
 
Index: flashrom-architecture_support_lite/platform.h
===================================================================
--- flashrom-architecture_support_lite/platform.h	(Revision 1942)
+++ flashrom-architecture_support_lite/platform.h	(Arbeitskopie)
@@ -48,9 +48,24 @@
 #elif defined (__sparc__) || defined (__sparc)
 	#define __FLASHROM_ARCH__ "sparc"
 	#define IS_SPARC 1
+#elif defined (__alpha__)
+	#define __FLASHROM_ARCH__ "alpha"
+	#define IS_ALPHA 1
+#elif defined (__hppa__) || defined (__hppa)
+	#define __FLASHROM_ARCH__ "hppa"
+	#define IS_HPPA 1
+#elif defined (__m68k__)
+	#define __FLASHROM_ARCH__ "m68k"
+	#define IS_M68K 1
+#elif defined (__sh__)
+	#define __FLASHROM_ARCH__ "sh"
+	#define IS_SH 1
+#elif defined(__s390__) || defined(__s390x__) || defined(__zarch__)
+	#define __FLASHROM_ARCH__ "s390"
+	#define IS_S390 1
 #endif
 
-#if !(IS_X86 || IS_MIPS || IS_PPC || IS_ARM || IS_SPARC)
+#if !(IS_X86 || IS_MIPS || IS_PPC || IS_ARM || IS_SPARC || IS_ALPHA || IS_HPPA || IS_M68K || IS_SH || IS_S390)
 #error Unknown architecture
 #endif
 





More information about the flashrom mailing list