Windows

From flashrom
Revision as of 16:43, 10 May 2012 by Idwer (talk | contribs)
Jump to: navigation, search

Before you set up a MinGW/MSYS build environment, you can find snapshot downloads at http://ra.openbios.org/~idwer/flashrom/mingw/



This is a tutorial on how to build flashrom on Windows using MinGW/MSYS.

Requirements

MinGW/MSYS

In order to build flashrom and various of its dependencies, we need a UNIX-like environment on Windows, which is provided by MinGW/MSYS.

  • Download the latest version (20110530 currently) of the automated MinGW installer named mingw-get-inst (double-click the installer *.exe, which will download and install all components).
    • Make sure you enable "MinGW Compiler Suite", "C++ compiler", "MSYS Basic System", and "MinGW Developer Toolkit" in the installer.
    • For simplicity it's recommended to leave the default install location of c:\MinGW unchanged.

Now open a MinGW shell via Start/Programs/MinGW/MinGW Shell and do the following:

$ mingw-get update
$ mingw-get install msys-wget msys-unzip

libusb-win32

libftdi

  • Install libftdi. The easiest method is probably to use the libftdi-0.18_mingw32.zip binaries from here.
    • Extract the ZIP file into a temporary directory.
    • Copy dll/libftdi.dll to /usr/local/bin.
    • Copy lib/libftdi.a and lib/libftdi.dll.a to /usr/local/lib.
    • Copy include/ftdi.h to /usr/local/include.

Building flashrom

Checkout the flashrom source code from svn (e.g. using TortoiseSVN), then:

$ cd flashrom
$ make