Difference between revisions of "DOS"

From flashrom
Jump to navigation Jump to search
(add howto)
Line 1: Line 1:
= HOWTO: Using precompiled binaries =
Howto use flashrom with FreeDOS instead of Linux (because of half broken bios or any other reasons):
# Get a USB memory drive with at least 1GB of memory available (or any other memory device you can boot from)
# Download FreeDOS Image form http://downloads.joelinoff.com/fdos11.tar.bz2 (more information here: http://joelinoff.com/blog/?p=431 )
# Extract the image
# Use dd to put the image on your prefered memory device (example: dd if=/extracted/image/fdos11.img of=/dev/sdX bs=4M)
# After it have been written to the usb device, remove it once and put it back again into your computer
# Download latest precompiled flashrom from here: http://buildbot.flashrom.org/buildresults/latest-build/dos/flashrom.exe
# Copy latest precompiled flashrom dos exe to the main directory of the usb device
# Download your bios file you would like to flash and copy it to the main directory of the usb device
# Unmount the USB drive and you can now boot from it and use flashrom as described here:
#* http://linux.die.net/man/8/flashrom
#* http://flashrom.org/Board_Testing_HOWTO
= Compilation =
To cross-compile on Linux for DOS:
To cross-compile on Linux for DOS:



Revision as of 16:33, 29 August 2015

HOWTO: Using precompiled binaries

Howto use flashrom with FreeDOS instead of Linux (because of half broken bios or any other reasons):

  1. Get a USB memory drive with at least 1GB of memory available (or any other memory device you can boot from)
  2. Download FreeDOS Image form http://downloads.joelinoff.com/fdos11.tar.bz2 (more information here: http://joelinoff.com/blog/?p=431 )
  3. Extract the image
  4. Use dd to put the image on your prefered memory device (example: dd if=/extracted/image/fdos11.img of=/dev/sdX bs=4M)
  5. After it have been written to the usb device, remove it once and put it back again into your computer
  6. Download latest precompiled flashrom from here: http://buildbot.flashrom.org/buildresults/latest-build/dos/flashrom.exe
  7. Copy latest precompiled flashrom dos exe to the main directory of the usb device
  8. Download your bios file you would like to flash and copy it to the main directory of the usb device
  9. Unmount the USB drive and you can now boot from it and use flashrom as described here:

Compilation

To cross-compile on Linux for DOS:

  1. Get RPMs of the cross compiler from the DJGPP site and install them (or use any other binary or source packages suitable for your distribution). You will need:
    • djcross-binutils
    • djcross-gcc
    • djcrx
  2. Download pciutils 3.1.5 and apply File:Pciutils.patch.gz (original source: http://assembler.cz/flashrom/pciutils.patch)
  3. Download and compile File:Libgetopt.tar.gz (original source: http://assembler.cz/flashrom/libgetopt/
  4. Compile pciutils, see README.DJGPP for instructions.
  5. Enter the flashrom directory.
  6. ../libpci should contain pciutils source and binaries.
  7. ../libgetopt should contain getopt.a from libgetopt.
  8. Run either (change settings where appropriate)
    make CC=i586-pc-msdosdjgpp-gcc STRIP=i586-pc-msdosdjgpp-strip
    or (above settings hardcoded)
    make djgpp-dos
  9. To run flashrom.exe, download and unpack File:Csdpmi7b.zip (original source: http://homer.rice.edu/~sandmann/cwsdpmi/csdpmi7b.zip, local mirror of source: File:Csdpmi7s.zip) and make sure CWSDPMI.EXE is in the current directory when running flashrom.exe.