Hi,
I have successfully used flashrom before and donated to the project.
However, I have stopped using Ubuntu because I was experimenting with overclocking and am now building a new PC and have to do a lot of restarts which was a pain with dual boot Windows/ Ubuntu.
Hence I am now trying to get flashrom working with windows 7.
Please can you help? I get the error message described in the attached .jpg file and cannot seem to install flashrom, despite downloading WinZip and Open Freely (http://www.winzip.com/win/en/index.htm and http://www.openfreely.com/ respectively.)
Chris Hudson Esq.
A non-text attachment has been stripped. Its content was:
flashrom.exe - System Error
The program can't start because libusb0.dll is missing from your
computer. Try reinstalling the program to fix this problem.
Am 10.07.2013 21:17 schrieb Stefan Tauner:
> With every newly supported programmer the information regarding reboots
> on failures becomes more ridiculous. With this patch it is only shown when
> the internal programmer module was selected.
>
> Example outputs for external programmers:
> 1) non-fatal:
> […]
> Reading current flash chip contents... done. FAILED at 0x00000000! Expected=0xff, Found=0x28, failed byte count from 0x00000000-0x0001ffff: 0x1fde7
> ERASE FAILED!
> FAILED!
> Uh oh. Erase/write failed. Checking if anything changed.
> Good. It seems nothing was changed.
> Writing to the flash chip apparently didn't do anything.
> Please check the connections (especially those to write protection pins) between
> the programmer and the flash chip. If you think the error is caused by flashrom
> please report this on IRC at chat.freenode.net (channel #flashrom) or
> mail flashrom(a)flashrom.org, thanks!
>
> 2) fatal:
> […]
> Verifying flash... FAILED at 0x00000000! Expected=0x0f, Found=0xff, failed byte count from 0x00000000-0x0001ffff: 0x1fde6
> Your flash chip is in an unknown state.
> Please report this on IRC at chat.freenode.net (channel #flashrom) or
> mail flashrom(a)flashrom.org, thanks!
>
> Signed-off-by: Stefan Tauner <stefan.tauner(a)student.tuwien.ac.at>
> Acked-by: David Hendricks <dhendrix(a)google.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
Author: stefanct
Date: Mon Jul 15 12:47:53 2013
New Revision: 1699
URL: http://flashrom.org/trac/flashrom/changeset/1699
Log:
Differentiate ultimate error messages depending on programmer used.
With every newly supported programmer the information regarding reboots
on failures becomes more ridiculous. With this patch it is only shown when
the internal programmer module was selected.
Example outputs for external programmers:
1) non-fatal:
[…]
Reading current flash chip contents... done. FAILED at 0x00000000! Expected=0xff, Found=0x28, failed byte count from 0x00000000-0x0001ffff: 0x1fde7
ERASE FAILED!
FAILED!
Uh oh. Erase/write failed. Checking if anything changed.
Good. It seems nothing was changed.
Writing to the flash chip apparently didn't do anything.
Please check the connections (especially those to write protection pins) between
the programmer and the flash chip. If you think the error is caused by flashrom
please report this on IRC at chat.freenode.net (channel #flashrom) or
mail flashrom(a)flashrom.org, thanks!
2) fatal:
[…]
Verifying flash... FAILED at 0x00000000! Expected=0x0f, Found=0xff, failed byte count from 0x00000000-0x0001ffff: 0x1fde6
Your flash chip is in an unknown state.
Please report this on IRC at chat.freenode.net (channel #flashrom) or
mail flashrom(a)flashrom.org, thanks!
Signed-off-by: Stefan Tauner <stefan.tauner(a)student.tuwien.ac.at>
Acked-by: David Hendricks <dhendrix(a)google.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Modified:
trunk/flashrom.c
Modified: trunk/flashrom.c
==============================================================================
--- trunk/flashrom.c Sun Jul 14 01:31:37 2013 (r1698)
+++ trunk/flashrom.c Mon Jul 15 12:47:53 2013 (r1699)
@@ -1493,26 +1493,37 @@
return ret;
}
-void nonfatal_help_message(void)
+static void nonfatal_help_message(void)
{
- msg_gerr("Writing to the flash chip apparently didn't do anything.\n"
- "This means we have to add special support for your board, "
- "programmer or flash chip.\n"
- "Please report this on IRC at irc.freenode.net (channel "
- "#flashrom) or\n"
- "mail flashrom(a)flashrom.org!\n"
- "-------------------------------------------------------------"
- "------------------\n"
- "You may now reboot or simply leave the machine running.\n");
-}
-
-void emergency_help_message(void)
-{
- msg_gerr("Your flash chip is in an unknown state.\n"
- "Get help on IRC at chat.freenode.net (channel #flashrom) or\n"
- "mail flashrom(a)flashrom.org with the subject \"FAILED: <your board name>\"!\n"
- "-------------------------------------------------------------------------------\n"
- "DO NOT REBOOT OR POWEROFF!\n");
+ msg_gerr("Writing to the flash chip apparently didn't do anything.\n");
+#if CONFIG_INTERNAL == 1
+ if (programmer == PROGRAMMER_INTERNAL)
+ msg_gerr("This means we have to add special support for your board, programmer or flash\n"
+ "chip. Please report this on IRC at chat.freenode.net (channel #flashrom) or\n"
+ "mail flashrom(a)flashrom.org, thanks!\n"
+ "-------------------------------------------------------------------------------\n"
+ "You may now reboot or simply leave the machine running.\n");
+ else
+#endif
+ msg_gerr("Please check the connections (especially those to write protection pins) between\n"
+ "the programmer and the flash chip. If you think the error is caused by flashrom\n"
+ "please report this on IRC at chat.freenode.net (channel #flashrom) or\n"
+ "mail flashrom(a)flashrom.org, thanks!\n");
+}
+
+static void emergency_help_message(void)
+{
+ msg_gerr("Your flash chip is in an unknown state.\n");
+#if CONFIG_INTERNAL == 1
+ if (programmer == PROGRAMMER_INTERNAL)
+ msg_gerr("Get help on IRC at chat.freenode.net (channel #flashrom) or\n"
+ "mail flashrom(a)flashrom.org with the subject \"FAILED: <your board name>\"!\n"
+ "-------------------------------------------------------------------------------\n"
+ "DO NOT REBOOT OR POWEROFF!\n");
+ else
+#endif
+ msg_gerr("Please report this on IRC at chat.freenode.net (channel #flashrom) or\n"
+ "mail flashrom(a)flashrom.org, thanks!\n");
}
/* The way to go if you want a delimited list of programmers */
@@ -1973,8 +1984,7 @@
"anything changed.\n");
if (!flash->chip->read(flash, newcontents, 0, size)) {
if (!memcmp(oldcontents, newcontents, size)) {
- msg_cinfo("Good. It seems nothing was "
- "changed.\n");
+ msg_cinfo("Good. It seems nothing was changed.\n");
nonfatal_help_message();
ret = 1;
goto out;
Am 10.07.2013 21:17 schrieb Stefan Tauner:
> - Use the reentrant tokenizer version strtok_r to break up vendor and model
> names in print.c
> - Add implementation of strtok_r for mingw (posix only)
Self-written or copied from a place with comptaible license?
> - Free allocated temporary memory again.
>
> Signed-off-by: Stefan Tauner <stefan.tauner(a)student.tuwien.ac.at>
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
Am 10.07.2013 21:17 schrieb Stefan Tauner:
> Signed-off-by: Stefan Tauner <stefan.tauner(a)student.tuwien.ac.at>
>
> diff --git a/flash.h b/flash.h
> index ba93245..9e787c0 100644
> --- a/flash.h
> +++ b/flash.h
> @@ -41,7 +41,8 @@
> #define ERROR_OOM -100
> #define TIMEOUT_ERROR -101
>
> -typedef unsigned long chipaddr;
> +/* TODO: check using code for correct usage of types */
> +typedef uintptr_t chipaddr;
This looks too good to be viable. I have a bad feeling about this in the
context of 64-bit resources on x86 (32bit), but drivers accessing
resources shouldn't be using chipaddr anyway.. That said, it should not
result in any breakage on 32bit platforms. We may see pretty explosions
once we start supporting the x32 pseudo-arch. But that will need an
audit of the codebase anyway.
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
Am 10.07.2013 21:17 schrieb Stefan Tauner:
> Improve compilation with libpayload (compiling flashrom.c and
> linking is still broken):
> - disable Ponyprog (which enforced serial.c compilation)
> - make errno available where it is needed
>
> Fix internal.c for non-x86 and enable cb parsing on ARM.
>
> Fix mingw builds by using its __USE_MINGW_ANSI_STDIO macro
> and gnu_printf definition for printf format style checking.
> See http://sourceforge.net/apps/trac/mingw-w64/wiki/gnu%20printf
> This requires inclusion of stdio.h in flash.h.
>
> Fix order of libraries in the Makefile:
> FEATURE_LIBS needs to come *after* PCILIBS in case ZLIB is needed by it.
>
> Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
> Signed-off-by: Stefan Tauner <stefan.tauner(a)student.tuwien.ac.at>
Apart from the library order, I'm happy with it.
>
> diff --git a/Makefile b/Makefile
> index 805290c..34bbab8 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -632,7 +641,7 @@ ifeq ($(ARCH), x86)
> endif
>
> $(PROGRAM)$(EXEC_SUFFIX): $(OBJS)
> - $(CC) $(LDFLAGS) -o $(PROGRAM)$(EXEC_SUFFIX) $(OBJS) $(FEATURE_LIBS) $(LIBS) $(PCILIBS) $(USBLIBS)
> + $(CC) $(LDFLAGS) -o $(PROGRAM)$(EXEC_SUFFIX) $(OBJS) $(LIBS) $(PCILIBS) $(USBLIBS) $(FEATURE_LIBS)
I believe this is partially wrong. AFAICS the order should be:
LIBS, PCILIBS, FEATURE_LIBS, USBLIBS.
Explanation: The linker doesn't remember defined symbols if they were
not on its list of needed symbols. This means you have to first specify
a library and then its dependencies.
LIBS is a misnomer (not generic libraries needed for everything, but
rather stuff like getopt and socket for some OS). This confused me
initially. The place of LIBS can be pretty much anywhere because it is
not needed by any other library.
FEATURE_LIBS can contain libftdi (so it needs to come before USBLIBS
which satisifies libftdi dependencies), but it also can contain libz (so
it needs to come after PCILIBS which may have libz as dependency).
To really get this in good shape, we should move libz into LIBS instead
of FEATURE_LIBS, but that breaks other parts of the Makefile. I really
really want a separate configure script to solve this.
>
> libflashrom.a: $(LIBFLASHROM_OBJS)
> $(AR) rcs $@ $^
> diff --git a/physmap.c b/physmap.c
> index 524f558..644ee35 100644
> --- a/physmap.c
> +++ b/physmap.c
> @@ -120,15 +120,6 @@ void *sys_physmap(unsigned long phys_addr, size_t len)
> void physunmap(void *virt_addr, size_t len)
> {
> }
> -
> -int setup_cpu_msr(int cpu)
> -{
> - return 0;
> -}
> -
> -void cleanup_cpu_msr(void)
> -{
> -}
> #elif defined(__MACH__) && defined(__APPLE__)
>
> #define MEM_DEV "DirectHW"
> @@ -568,6 +559,15 @@ int libpayload_wrmsr(int addr, msr_t msr)
> _wrmsr(addr, msr.lo | ((unsigned long long)msr.hi << 32));
> return 0;
> }
> +
> +int setup_cpu_msr(int cpu)
> +{
> + return 0;
> +}
> +
> +void cleanup_cpu_msr(void)
> +{
> +}
> #else
> /* default MSR implementation */
> msr_t rdmsr(int addr)
The two hunks above are what I wanted in patch 2 of this series. They
fit a lot better here, though, so don't change it. Sorry.
With the library order fixed, this is
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Regards,
Carl-Daniel
--
http://www.hailfinger.org/