// vim:expandtab:autoindent:tabstop=4:shiftwidth=4:filetype=txt:

/*! \page bios_hdr Dell BIOS .HDR files

\section obtain OBTAINING BIOS HEADER (.HDR) FILES
\subsection hdr_tool Scripted extraction of BIOS .HDR files
Tools are available to automate the process of extracting .HDR data from
BIOS updates.  These tools can be downloaded here: <a href="http://linux.dell.com/libsmbios/download/tools/">http://linux.dell.com/libsmbios/download/tools/</a>.

To run these tools, follow these steps. Note that this example assumes that
the "~/bin/" directory is on the PATH. Some utilities need to be copied to a
directory on the $PATH to work properly.

 - install the "libsmbios-bin" RPM. 
    - see \ref yum  for instructions on setting up the repo
    - run the command "yum install libsmbios-bin"

 - Copy the extract_hdr.sh/dat files to a directory on your path. These are
   available from: http://linux.dell.com/libsmbios/download/tools/bios_hdr_extract/.

 - Copy the scripts and utils in the "/download/tools/bios" dir to a local
   directory. This directory is available from: http://linux.dell.com/libsmbios/download/tools/bios/.

 - Download the BIOS image you are intested in. You can download BIOS images
   from either http://support.dell.com/ or from the Dell FTP site at
   ftp://ftp.us.dell.com/bios/. The tools provided work for
   "Dell Update Packages" as well as "Non-Packaged". The Dell Update Package
   is a downloadable linux "shar" archive that is executable and contains an
   embedded tarball with the HDR file. The Non-Packaged file is a DOS/Windows
   .EXE file containing the BIOS update (NOTE: this is different from the
   self-extracting .EXE files that can be downloaded which contain floppy disk
   images.) 

 - Change directory to the downloaded "bios/" tools, and run the
   "get_hdr_files.sh" utility, like this:
\verbatim
./get_hdr_files.sh -i ~/downloaded/bios/dir/ -o ~/output/hdr/dir/
\endverbatim
    The "-i" parameter specifies the input directory. All files that are
    extractable are then placed in the output directory specified by "-o".

\subsection dup Extracting .hdr file from Dell Update Packages
There are two separate ways to obtain BIOS .hdr files for use with the
dellBiosUpdate utility. Available for download from http://support.dell.com/,
you can download BIOS update executables, and for some systems, you can
download Dell Update Packages. These instructions are for extracting the .hdr
files from Dell Update Packages. See the next section for directions on
extracting the .hdr file from BIOS update executables.

Extracting the .hdr file from a Dell Update Package (DUP) is relatively simple.
Download the Linux DUP, and use the "--extract" command line parameter. See
the example below:

\verbatim
# mkdir /var/tmp/PE6650 
# PE6650-BIOS-LX-A17.bin --extract /var/tmp/PE6650

# ls -la /var/tmp/PE6650/*.HDR
-r-xr-xr-x    1 root     root       524380 Jan 21  2005 PE6650-BIOSA17.HDR
\endverbatim


\subsection exe Manually Extracting .hdr file from BIOS update executable
There are two separate ways to obtain BIOS .hdr files for use with the
dellBiosUpdate utility. Available for download from http://support.dell.com/,
you can download BIOS update executables, and for some systems, you can
download Dell Update Packages. These instructions are for extracting the .hdr
files from update executables. See the previous section for directions on
extracting the .hdr file from Dell Update Packages.

- download dosemu: http://dosemu.sourceforge.net/stable/. You need these two tarballs: 
    - dosemu-1.2.2-bin.tgz
    - dosemu-freedos-b9r5a-bin.tgz
    - ... or the latest equivalent

- Follow the following instructions to extract the header file:

\verbatim

 # UNTAR THE DOSEMU SOURCES
    $ tar xvzf ./dosemu-1.2.2-bin.tgz
    dosemu/
    dosemu/README.bindist
    dosemu/COPYING
    ...
    
 # UNTAR THE FREEDOS SOURCES
    $ tar xvzf ./dosemu-freedos-b9r5a-bin.tgz
    dosemu/
    dosemu/freedos/
    dosemu/freedos/appinfo/
    ...
   
 # COPY BIOS .EXE FILE TO DOSEMU C:\> DRIVE
    $ cp ~/download/D500_A10.exe dosemu/freedos/
    $

 # RUN DOSEMU
    $ cd dosemu
    $ ./dosemu
      Creating symbolic link for bootdirectory as /home/username/.dosemu/drives/c


       DOSEMU will run on _this_ terminal.
       To exit you need to execute 'exitemu' from within DOS,
       because &lt;Ctrl>-C and 'exit' won't work!

       Now type ENTER to start DOSEMU or &lt;Ctrl>C to cancel

 # PRESS ENTER

    The Linux DOSEMU, Copyright (C) 2003 the 'DOSEMU-Development-Team'.
    This program is  distributed  in  the  hope that it will be useful,
    but  WITHOUT  ANY  WARRANTY;   without even the implied warranty of
    MERCHANTABILITY  or  FITNESS FOR A PARTICULAR PURPOSE. See the file
    COPYING for more details.  Use  this  program  at  your  own  risk!
    
    By continuing execution of this program,  you  are stating that you
    have read the file  COPYING  and the above liability disclaimer and
    that you accept these conditions.
    
    Enter 'yes' to confirm/continue: yes
    
    
    Linux DOS emulator 1.2.2.0 \$Date: 2004/07/11\$
    Last configured at Sun Jul 11 19:33:45 NZST 2004 on linux
    This is work in progress.
    Please test against a recent version before reporting bugs and problems.
    Submit Bug Reports, Patches & New Code to linux-msdos@vger.kernel.org or via
    the SourceForge tracking system at http://www.sourceforge.net/projects/dosemu
    
    DPMI-Server Version 0.9 installed
    
    FreeDOS kernel version 1.1.35 (Build 2035) [May 30 2004 22:09:36]
    Kernel compatibility 7.10 - WATCOMC - FAT32 support
    
    (C) Copyright 1995-2004 Pasquale J. Villani and The FreeDOS Project.
    All Rights Reserved. This is free software and comes with ABSOLUTELY NO
    WARRANTY; you can redistribute it and/or modify it under the terms of the
    GNU General Public License as published by the Free Software Foundation;
    either version 2, or (at your option) any later version.
    C: HD1, Pri[ 1], CHS=    0-1-1, start=     0 MB, size=   392 MB
    [dosemu EMS 4.0 driver installed]
    Kernel: allocated 39 Diskbuffers = 20748 Bytes in HMA
    
    FreeCom version 0.82 pl 3 XMS_Swap [Mar 06 2004 10:49:37]

    D: = LINUX\\FS/HOME/USERNAME  attrib = READ/WRITE
    "Welcome to dosemu 1.2.2.0!"
    C:\>

 # RUN THE DOWNLOADED BIOS TO CREATE .HDR FILE

    C:\>d500_a10 -writehdrfile

     Flash BIOS Update Program - Version A10
     Copyright 1990-2005 Dell Computer Corporation.  All Rights Reserved.

    Loading...

    D500_A10.HDR written.
    
    C:\>exitemu

 # DONE! COPY THE FILE (from Linux)

    $ cp freedos/d500_a10.hdr ~/
    $

\endverbatim



*/
