[coreboot] [PATCH 2/4] Libflashrom: Fix libflashrom building

Łukasz Dmitrowski lukasz.dmitrowski at gmail.com
Fri Aug 14 08:45:35 CET 2015


Anton Kochkov's fixes for libflashrom building

Signed-off-by: Lukasz Dmitrowski <lukasz.dmitrowski at gmail.com>

---
  Makefile   | 2 +-
  flashrom.c | 8 ++++----
  2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index d18de09..2c7fccd 100644
--- a/Makefile
+++ b/Makefile
@@ -726,7 +726,7 @@ FEATURE_CFLAGS += $(shell LC_ALL=C grep -q "UTSNAME := yes" .features && printf
  # We could use PULLED_IN_LIBS, but that would be ugly.
  FEATURE_LIBS += $(shell LC_ALL=C grep -q "NEEDLIBZ := yes" .libdeps && printf "%s" "-lz")
  
-LIBFLASHROM_OBJS = $(CHIP_OBJS) $(PROGRAMMER_OBJS) $(LIB_OBJS)
+LIBFLASHROM_OBJS = $(CHIP_OBJS) $(PROGRAMMER_OBJS) $(LIB_OBJS) udelay.o
  OBJS = $(CLI_OBJS) $(LIBFLASHROM_OBJS)
  
  all: hwlibs features $(PROGRAM)$(EXEC_SUFFIX) $(PROGRAM).8
diff --git a/flashrom.c b/flashrom.c
index 9b82d4c..0bc821a 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -622,7 +622,7 @@ static unsigned int count_usable_erasers(const struct flashctx *flash)
  	return usable_erasefunctions;
  }
  
-static int compare_range(const uint8_t *wantbuf, const uint8_t *havebuf, unsigned int start, unsigned int len)
+int compare_range(const uint8_t *wantbuf, const uint8_t *havebuf, unsigned int start, unsigned int len)
  {
  	int ret = 0, failcount = 0;
  	unsigned int i;
@@ -1563,7 +1563,7 @@ int erase_and_write_flash(struct flashctx *flash, uint8_t *oldcontents, uint8_t
  	return ret;
  }
  
-static void nonfatal_help_message(void)
+void nonfatal_help_message(void)
  {
  	msg_gerr("Good, writing to the flash chip apparently didn't do anything.\n");
  #if CONFIG_INTERNAL == 1
@@ -1581,7 +1581,7 @@ static void nonfatal_help_message(void)
  			 "mail flashrom at flashrom.org, thanks!\n");
  }
  
-static void emergency_help_message(void)
+void emergency_help_message(void)
  {
  	msg_gerr("Your flash chip is in an unknown state.\n");
  #if CONFIG_INTERNAL == 1
@@ -1605,7 +1605,7 @@ void list_programmers(const char *delim)
  		if (p < PROGRAMMER_INVALID - 1)
  			msg_ginfo("%s", delim);
  	}
-	msg_ginfo("\n");	
+	msg_ginfo("\n");
  }
  
  void list_programmers_linebreak(int startcol, int cols, int paren)
-- 
2.1.4





More information about the coreboot mailing list