Question of Windows based BIOS Flasher

Only for programmers and BIOS gurus with technical questions.
Post Reply
wangzhu020
New visitors - please read the rules.
Posts: 2
Joined: Tue Jul 08, 2008 3:09 am

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
maman
Master Flasher
Posts: 173
Joined: Sun Mar 31, 2002 2:08 pm
Location: Taka Bonerate National Park, Indonesia
Contact:

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.
wangzhu020
New visitors - please read the rules.
Posts: 2
Joined: Tue Jul 08, 2008 3:09 am

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/?
Last edited by wangzhu020 on Fri Jul 25, 2008 4:09 am, edited 1 time in total.
maman
Master Flasher
Posts: 173
Joined: Sun Mar 31, 2002 2:08 pm
Location: Taka Bonerate National Park, Indonesia
Contact:

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.
Post Reply