Page 1 of 1

Question of Windows based BIOS Flasher

Posted: Tue Jul 08, 2008 6:56 am
by wangzhu020
Hello:
I need to develop a BIOS Flasher in Windows, but i don't hown how to start.
I have read something about this at http://www.wimsbios.com/phpBB2/topic9070.html, but i cann't download the source code . If anyone have the source code ,could PM it to me. Thanks !


PS : I have develop a Flash Utility by EFI,so I just want to hown the principle of coding in windows.


Edit - Removed e-mail addresses. KW

Posted: Thu Jul 10, 2008 12:22 am
by maman
The updated source code is at: http://google-summer-of-code-2007-coresystems.googlecode.com/files/DarmawanMappatutu_Salihun.tar.gz

And the explanation is at:
http://community.reverse-engineering.net/viewtopic.php?t=5511

If you understand mmap() in *NIX, you should recognize how this implementation of mine easily.

Posted: Fri Jul 11, 2008 3:29 am
by wangzhu020
Thankyou very much , I have download the source code and study it .The flash method I can understand ,but I confused with the mechanism about windows it used . :? I will try my best to understand it. :D
I have some problem in my compile process. There is something wrong ... :(

make -C libpci
make[1]: Entering directory `/home/new/winflashrom/libpci'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/new/winflashrom/libpci'
gcc -Os -Wall -Werror -DDISABLE_DOC -c -o udelay.o udelay.c
cc1.exe: warnings being treated as errors
udelay.c: In function `myusec_calibrate_delay':
udelay.c:24: warning: implicit declaration of function `gettimeofday'
make: *** [udelay.o] Error 1

If I deleted line 24 and 26 in udelay.c of `gettimeofday', the build process will success and create flashrom.exe.
How can i fix it ? I thought the fault is my version of the build environment .I don't honw why i couldn't download the latest version from http://mingw.sourceforge.net/?

Posted: Fri Jul 11, 2008 12:34 pm
by maman
wangzhu020 wrote:Thankyou very much , I have download the source code and study it .The flash method I can understand ,but I confused with the mechanism about windows it used . :? I will try my best to understand it. :D
I see. Just read the link to the forum I gave you in the previous post. If you have MSDN documentation with you, you should be OK. Or just read the online MSDN documentation directly.
wangzhu020 wrote: I have some problem in my compile process. My build environment is MinGW-3.1.0-1.exe MSYS-1.0.10.exe msysDTK-1.0.1.exe. There is something wrong ... :(

make -C libpci
make[1]: Entering directory `/home/new/winflashrom/libpci'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/new/winflashrom/libpci'
gcc -Os -Wall -Werror -DDISABLE_DOC -c -o udelay.o udelay.c
cc1.exe: warnings being treated as errors
udelay.c: In function `myusec_calibrate_delay':
udelay.c:24: warning: implicit declaration of function `gettimeofday'
make: *** [udelay.o] Error 1

If I deleted line 24 and 26 in udelay.c of `gettimeofday', the build process will success and create flashrom.exe.
How can i fix it ? I thought the fault is my version of the build environment .I don't honw why i couldn't download the latest version from http://mingw.sourceforge.net/?
This calibration routine is indeed quite error prone. The following link might help you:
http://www.openasthra.com/c-tidbits/get ... r-windows/

Otherwise use a compatible function in Windows API. The point is, you have to provide enough delay in writing into the BIOS chip(s) sectors. That's the reason it needs to be calibrated first.