[flashrom] DOS version of flashrom

Andrew Goodbody ajg02 at elfringham.co.uk
Thu May 20 00:12:18 CEST 2010


On 19/05/2010 20:59, Rudolf Marek wrote:
> Here is the binary which includes DOS extender support. I think you need
> flashrom.exe and dmidecode.exe.
>
> http://assembler.cz/flashrom

Thanks, I did not find that link.

>> I tried to build flashrom for DOS on Ubuntu 10.04 following the
>> instructions in the flashrom README. There are quite a few issues with
>> missing steps and stuff that simply does not work. I finally gave up
>> when it could not resolve _valloc.
>
> Hm it works here. I compile with the DJGPP. What have you used?

I followed the instructions in 
http://flashrom.org/trac/flashrom/browser/trunk/README

>> I would very much like to know the rest of the instructions for a
>> successful cross compile to DOS. I saw that Carl-Daniel Hailfinger has
>> offered to proved a tar ball of the cross compiler etc but it would be
>> really good to be able to fix the instructions in the README.
>
> Hm it works here. What exactly you want to improve?

OK from memory this is what I did so some things may be out of order. I 
installed the three rpms using alien as I was running Ubuntu. Downloaded 
and patched pciutils. Downloaded libgetopt and attempted to compile. I 
got errors due to missing header files, sys/version.h and sys/djtypes.h. 
After some investigation it seemed that I needed 
ftp://ftp.delorie.com/pub/djgpp/current/v2/djcrx203.zip but the 
installation instructions for that are for older versions of gcc. So the 
include files had to go into /usr/lib/gcc/.... instead of 
/usr/local/...., crt0.o was not in a lib directory. Then I was getting 
implicit declarations and then unresolved references to _snprintf. So I 
had to get an implementation of that off the net and edit the Makefile 
to add it to the link. Finally I had to go back and compile stubify and 
then libgetopt compiled! pciutils was much easier, I just had to get a 
copy of stdint.h from the djgpp website to make that compile. At last I 
could move on to actually compiling flashrom. Whereupon I got implicit 
declarations and unresolved references to _valloc and I gave up.

So I'd like to work out what went wrong for me that works for you. Also 
there was no mention of building dmidecode.exe.

>> I have now run this and apart from not being able to find 'dmidecode' it
>> managed to correctly identify the SPI device (a W25x32) on the system
>> behind an ICH9M-E which is in descriptor mode but not locked down.
>
> The dmidecode.exe is externally called. I included that on the above webpage too.
>
> Please tell if it works for you.

Thanks, I'll try it tomorrow.

Andrew




More information about the flashrom mailing list