[flashrom] Fwd: Re: Cannot compile flashrom for windows

Bio zackwarrior at gmail.com
Tue Feb 9 15:31:20 CET 2016


Hello,

Did you get have time to check my last message ?
I was wondering if you know why i still get an error on last version 
when trying to open port B
And to make flashrom detect and read/write my flash, i know that i must 
add my flash into flashchips.c
After reading the data sheet of my flash MX25L25635F i understood that 
the 24 bit address protocol of Flash can only access up to 128Mb this is 
why 32bit is needed.
The thing is i only need to access the first 128Mb (in fact i really 
only need the first 32Mb to be exact), buy using the 24 bit adresse 
protocol i should be able to read that no ?

Sorry again for the questions, i'm doing a lot of reading and trying to 
understand all this and i just need someone to tell me if i'm going in 
the right direction or not


Best Regards,


-------- Message transféré --------
Sujet : 	Re: [flashrom] Cannot compile flashrom for windows
Date : 	Wed, 3 Feb 2016 02:31:54 +0100
De : 	Zak <zackwarrior at gmail.com>
Pour : 	flashrom at flashrom.org



Hi there,

First thanks for your reply, helped me out on where to look, it was libftdi
So after doing some research here and there, it looks like the libftdi 
was not installed right (even tho all the files were in the correct 
place), anyway by doing a libftdi.pc and pointing to the files i was 
able to compile the last version of flashrom
But i get the same thing problem...

Microsoft Windows [version 10.0.10240]
(c) 2015 Microsoft Corporation. Tous droits réservés.

C:\flashrom>flashrom
flashrom v0.9.8-r1888 on Windows 6.2 (x86)
flashrom is free software, get the source code at http://www.flashrom.org

Please select a programmer with the --programmer parameter.
Previously this was not necessary because there was a default set.
Valid choices are:
dummy, ft2232_spi, serprog, buspirate_spi, pony_spi, usbblaster_spi,
pickit2_spi.

C:\flashrom>flashrom -p ft2232_spi:type=2232H,port=A
flashrom v0.9.8-r1888 on Windows 6.2 (x86)
flashrom is free software, get the source code at http://www.flashrom.org

Calibrating delay loop... OK.
No EEPROM/flash device found.
Note: flashrom can never write if the flash chip isn't found automatically.

C:\flashrom>flashrom -p ft2232_spi:type=2232H,port=B
flashrom v0.9.8-r1888 on Windows 6.2 (x86)
flashrom is free software, get the source code at http://www.flashrom.org

Calibrating delay loop... OK.
Unable to reset FTDI device (USB device unavailable).
Unable to set latency timer (USB device unavailable).
Unable to set bitmode to SPI (USB device unavailable).
ftdi_write_data: -666, USB device unavailable
Error: Programmer initialization failed.

Anyway now that i got it compiled and since it looks like port A works 
and not port B? i guess ?
Could you give me advices on how to make flashrom work with my flash 
chip MACRONIX_MX25L25635F?
I need to modify and add the informations to flashchips.c? What about 
the 24 and 32bits difference?

Thanks again for your help
Best Regards

2016-02-02 21:01 GMT+01:00 Stefan Tauner 
<stefan.tauner at alumni.tuwien.ac.at 
<mailto:stefan.tauner at alumni.tuwien.ac.at>>:

    On Tue, 2 Feb 2016 19:43:26 +0100
    Bio <zackwarrior at gmail.com <mailto:zackwarrior at gmail.com>> wrote:

     > Hello,
     >
     > I'm having trouble with flashrom, i have a working ft2232 board and i
     > correctly connected a spi flash on it on port A
     > I also correctly installed the libusb drivers for the board
     > So i found a compiled version of flashrom for windows v0.9.6.1-r1705
     > I run it with this command
     > flashrom -p ft2232_spi:type=2232H,port=A
     > And i get this:
     > flashrom v0.9.6.1-r1704 on Windows 6.1 (x86)
     > flashrom is free software, get the source code at
    http://www.flashrom.org
     >
     > Calibrating delay loop... OK.
     > No EEPROM/flash device found.
     > Note: flashrom can never write if the flash chip isn't found
    automatically.

    That does not tell much... the suspicion you wrote further below is
    correct.

     > I then decided to try port B, so i wired the flash chip on port B and
     > used this command
     > flashrom -p ft2232_spi:type=2232H,port=B
     > And i get this:
     > flashrom v0.9.6.1-r1704 on Windows 6.1 (x86)
     > flashrom is free software, get the source code at
    http://www.flashrom.org
     >
     > Calibrating delay loop... OK.
     > Unable to reset FTDI device (USB device unavailable).
     > Unable to set latency timer (USB device unavailable).
     > Unable to set bitmode to SPI (USB device unavailable).
     > ftdi_write_data: -666, USB device unavailable
     > Error: Programmer initialization failed.

    That looks a bit fishy but might have been fixed in the meantime. I
    would like to see the output for the same command line with a current
    version...

     > The chip i'm trying to work with is a MACRONIX_MX25L25635F,
    specified in
     > the flashchips.h line 478 of the source code v0.9.8
     > #define MACRONIX_MX25L25635F    0x2019    /* Same as MX25L25639F, but
     > the latter seems to not support REMS */
     >
     > So i decided to cross compile the new version 0.9.8 for windows
    thinking
     > that maybe the v0.9.6.1 doesn't recognise my chip ?

    Yes, indeed. And the current one won't help you either. The problem is
    that this chip requires 32 bit addresses instead of the 24 bit address
    used up to now in SPI flash chips. flashrom does not support this yet
    and so supporting your chip is not feasibly right now. There exist some
    patches though that would make it work.

     > Anyway i installed mingw and used msys64 to get all the packages and
     > update everything correctly, i also put the libusb and libftdi in the
     > bin, lib and include directory, i think everything is installed
     > correctly but...
     > When i try to compileflashrom with make i get this error
    > $ make
     > Files don't seem to be under version control. Replacing all version
     > templates with 0.9.8-r1888.
     > Package libftdi was not found in the pkg-config search path.
     > Perhaps you should add the directory containing `libftdi.pc'
     > to the PKG_CONFIG_PATH environment variable
     > No package 'libftdi' found
     > Checking for a C compiler... found.
     > Target arch is x86
     > Target OS is MinGW
     > Checking for libusb-0.1/libusb-compat headers... found.
     > Checking if libusb-0.1 is usable... yes.
     > Checking for FTDI support... found.
     > Checking for FT232H support in libftdi... not found.
     > Checking for utsname support... not found.
     > make[1]: Entering directory `/c/flashrom/util/ich_descriptors_tool'
     > make[1]: Nothing to be done for `all'.
     > make[1]: Leaving directory `/c/flashrom/util/ich_descriptors_tool'

    I don't see an error. The pkgconfig message is not an error..

     > And if i try with make CC=i686-w64-mingw32-gcc i get this error
     > $ make CC=i686-w64-mingw32-gcc
     > Files don't seem to be under version control. Replacing all version
     > templates with 0.9.8-r1888.
     > Package libftdi was not found in the pkg-config search path.
     > Perhaps you should add the directory containing `libftdi.pc'
     > to the PKG_CONFIG_PATH environment variable
     > No package 'libftdi' found
     > Checking for a C compiler... found.
     > Target arch is x86
     > Target OS is MinGW
     > Checking for libusb-0.1/libusb-compat headers... In file included
    from
     > c:/MinGW/i686-w64-mingw32/include/stddef.h:7:0,
     >                   from
     > c:/MinGW/lib/gcc/i686-w64-mingw32/5.2.0/include/stddef.h:1,
     >                   from c:/MinGW/include/stdlib.h:22,
     >                   from c:/MinGW/include/lusb0_usb.h:4,
     >                   from .test.c:3:
     > c:/MinGW/i686-w64-mingw32/include/crtdefs.h:123:19: error:
    expected '=',
     > ',', ';', 'asm' or '__attribute__' before 'typedef'
     >   __MINGW_EXTENSION typedef __int64 __time64_t;
     >                     ^
     > c:/MinGW/i686-w64-mingw32/include/crtdefs.h:138:9: error: unknown
    type
     > name '__time64_t'
     >   typedef __time64_t time_t;
     >           ^
     > not found.
     >
     > Please install libusb-0.1 headers or libusb-compat headers.
     > See README for more information.
     >
     > make: *** [hwlibs] Error 1
     >
     > Could you help me out to compile le latest version of flashrom
    please ?

    Sounds like a bug in mingw or libusb to me... cross-compiling with
    mingw under Linux for Windows should work fine since a long time ago.

    --
    Kind regards/Mit freundlichen Grüßen, Stefan Tauner




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.flashrom.org/pipermail/flashrom/attachments/20160209/6bc349b2/attachment.html>


More information about the flashrom mailing list