AN7 External BIOS Update

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

Application Note

congatec Application Note #7

Affected Products x86 based products

Subject Updating the congatec Embedded BIOS from an external BIOS flash device

Confidential/Public public

Author GAD

Copyright © 2006 congatec AG AN7_External_BIOS_Update.docx 1/20


Printed versions of this document are not under revision control
Application Note

Revision History
Revision Date (yyyy-mm-dd) Author Changes

1.0 2006-05-31 OAL Initial release.


1.1 2006-08-06 HCH Expanded for all congatec XTX and COM Express
modules.
1.2 2013-02-18 CJR Added COM Express and Qseven modules, added
SPI flash update procedure, renamed AN to
AN7_External_BIOS_Update.
1.3 2015-01-13 GDA Added section on making a bootable FreeDOS USB
stick, added 128Mbit Winbond SPI flash chip.
1.4 2017-04-12 GAD Completely reworked and updated to new
template.

Copyright © 2006 congatec AG AN7_External_BIOS_Update.docx 2/20


Printed versions of this document are not under revision control
Application Note

Preface
This application note describes how to proceed if the congatec Embedded BIOS needs
to be updated from a SPI flash device when the image on the internal flash is corrupt
and no longer functioning.

Disclaimer
The information contained within this Application Note, including but not limited to any
product specification, is subject to change without notice.
congatec AG provides no warranty with regard to this Application Note or any other
information contained herein and hereby expressly disclaims any implied warranties of
merchantability or fitness for any particular purpose with regard to any of the foregoing.
congatec AG assumes no liability for any damages incurred directly or indirectly from any
technical or typographical errors or omissions contained herein or for discrepancies between
the product and the Application Note. In no event shall congatec AG be liable for any
incidental, consequential, special, or exemplary damages, whether based on tort, contract or
otherwise, arising out of or in connection with this Application Note or any other
information contained herein or the use thereof.

Intended Audience
This Application Note is intended for technically qualified personnel. It is not intended
for general audiences.

Electrostatic Sensitive Device


All congatec AG products are electrostatic sensitive devices and are packaged
accordingly. Do not open or handle a congatec AG product except at an
electrostatic-free workstation. Additionally, do not ship or store congatec AG products
near strong electrostatic, electromagnetic, magnetic, or radioactive fields unless the
device is contained within its original manufacturer’s packaging. Be aware that failure to
comply with these guidelines will void the congatec AG Limited Warranty.

Technical Support
congatec AG technicians and engineers are committed to providing the best possible
technical support for our customers so that our products can be easily used and
implemented. We request that you first visit our website at www.congatec.com for the
latest documentation, utilities and drivers, which have been made available to assist
you. If you still require assistance after visiting our website then contact our technical
support department by email at [email protected]

Copyright © 2006 congatec AG AN7_External_BIOS_Update.docx 3/20


Printed versions of this document are not under revision control
Application Note

Symbols
The following are symbols used in this application note.

Note

Notes call attention to important information that should be observed.

Caution

Cautions warn the user about how to prevent damage to hardware or loss of data.

Warning

Warnings indicate that personal injury can occur if the information is not observed.

Copyright Notice
Copyright © 2006, congatec AG. All rights reserved. All text, pictures and graphics are
protected by copyrights. No copying is permitted without written permission from
congatec AG.
congatec AG has made every attempt to ensure that the information in this document is
accurate yet the information contained within is supplied “as-is”.

Trademarks
Product names, logos, brands, and other trademarks featured or referred to within this
user’s guide, or the congatec website, are the property of their respective trademark
holders. These trademark holders are not affiliated with congatec AG, our products, or
our website.

Terminology
Term Description

UEFI Unified Extensible Firmware Interface

AMI American Megatrends, Inc - congatec’s BIOS partner

Apito AMIs UEFI Firmware product

COM Computer on Module

SBC Singel board computer

Copyright © 2006 congatec AG AN7_External_BIOS_Update.docx 4/20


Printed versions of this document are not under revision control
Application Note

Contents
1 Introduction ............................................................................................................................................................................................................................................................ 6
2 Required Equipment .................................................................................................................................................................................................................................... 7
2.1 Equipment for Modules Only ................................................................................................................................................................................................... 7
2.2 Equipment for Single Board Computers Only ............................................................................................................................................ 7
2.3 Additional Equipment ................................................................................................................................................................................................................. 7
3 Creating a Bootable USB Stick ...................................................................................................................................................................................................... 9
3.1 Creating a Bootable FreeDOS USB Stick .................................................................................................................................................................. 9
3.2 Creating a Bootable UEFI Shell USB Stick ..................................................................................................................................................... 10
4 Preprogramming the SPI Flash Device .............................................................................................................................................................................. 11
4.1 Programming with a Flash Programmer ............................................................................................................................................................ 11
4.2 Programming of External BIOS Flash with CGUTIL ............................................................................................................................. 11
5 Onboard BIOS Flash Update Procedure.......................................................................................................................................................................... 13
6 External BIOS Flash Location ......................................................................................................................................................................................................... 15
6.1 TEVAL .............................................................................................................................................................................................................................................................. 15
6.2 X7/EVAL .......................................................................................................................................................................................................................................................16
6.3 MEVAL............................................................................................................................................................................................................................................................ 17
6.4 QEVAL............................................................................................................................................................................................................................................................ 18
6.5 SEVAL .............................................................................................................................................................................................................................................................. 19
6.6 Mini ITX........................................................................................................................................................................................................................................................ 20

Copyright © 2006 congatec AG AN7_External_BIOS_Update.docx 5/20


Printed versions of this document are not under revision control
Application Note

1 Introduction
congatec embedded computer modules and single board computers use congatec
embedded BIOS stored in an onboard SPI flash device. It is based on AMIs Aptio UEFI
firmware solution.
This application note describes how to update a congatec BIOS from the external SPI
flash located on the evaluation carrier board for the respective module or on the debug
adapter for SBCs.
Updating from an external flash device may be necessary if the BIOS on the onboard
flash is corrupt and no longer bootable.
The conga-TS170 and the BIOS binary file BQSLR011.bin is used as an example.

Copyright © 2006 congatec AG AN7_External_BIOS_Update.docx 6/20


Printed versions of this document are not under revision control
Application Note

2 Required Equipment
The following equipment is required to perform a BIOS update from an external flash
device.

2.1 Equipment for Modules Only


• congatec evaluation carrier board
− conga-TEVAL for COM Express type 6 modules
− conga-X7/EVAL for COM Express type 7 modules
− conga-MEVAL for COM Express type 10 modules
− conga-QEVAL/Qseven 2.0 for Qseven modules
− conga-SEVAL for SMARC modules
• congatec CPU module

2.2 Equipment for Single Board Computers Only


• conga-MITX/debug card (PN047858)
• congatec Mini-ITX SBC

2.3 Additional Equipment


• Power Supply
• USB Keyboard
• Display
• SPI flash device with the current BIOS preprogrammed (see chapter 4 for
instruction on how to preprogram an external BIOS flash device)
− Examples of supported SPI flashes are
 Winbond W25Q128FV for 128Mbit (16MByte) 3.3V
 Winbond W25Q64CV for 64Mbit (8MByte) 3.3V
 Winbond W25Q32BV for 32Mbit (4MByte) 3.3V
 Winbond W25Q64FWSSIQ for 64Mbit (8Mbyte) 1.8V
− Check the module's user’s guide for the BIOS binary size, operating
voltage and additional parameters like SFDP.
Note

The external BIOS flash chip must be the same size as the BIOS .bin file. An external
flash chip larger than the BIOS file size might not work.

Copyright © 2006 congatec AG AN7_External_BIOS_Update.docx 7/20


Printed versions of this document are not under revision control
Application Note

• Bootable DOS or UEFI shell USB memory stick (please refer to section 3 )
• BIOS binary file (please contact the congatec technical support or visit the
restricted area on the congatec web page to get the latest BIOS revision for the
CPU product you are using.)
• Congatec System Utility, available for download at www.congatec.com
− cgutlcmd.exe (DOS command line version)
− cgutlcmd.efi (UEFI shell command line version)

Copyright © 2006 congatec AG AN7_External_BIOS_Update.docx 8/20


Printed versions of this document are not under revision control
Application Note

3 Creating a Bootable USB Stick


3.1 Creating a Bootable FreeDOS USB Stick
1. Download Rufus from http://rufus.akeo.ie/
2. Insert the USB stick.
3. Launch and set up Rufus as shown in the screenshot below:

4. Click Start.
5. Download the latest version of the congatec system utility (cgutil.zip) from
www.congatec.com
6. Copy the DOS command line version of the congatec system utility
(cgutlcmd.exe) from cgutil.zip to the root directory of this FreeDOS USB stick.
7. Copy the desired BIOS binary file (*.bin file) for your product to the root directory
of this FreeDOS USB stick.

Copyright © 2006 congatec AG AN7_External_BIOS_Update.docx 9/20


Printed versions of this document are not under revision control
Application Note

3.2 Creating a Bootable UEFI Shell USB Stick


Please refer to AN31_Creating_an_UEFI_Stick on how to create a bootable UEFI shell
stick.
After the UEFI shell stick is ready:
1. Download the latest version of the congatec system utility (cgutil.zip) from
www.congatec.com
2. Copy the expanded UEFI shell command line version of the congatec system utility
(cgutlcmd.efi) from cgutil.zip to the \efi directory of this UEFI shell USB stick.
3. Copy the desired BIOS binary file (*.bin file) for your product to the \efi directory of
this UEFI shell USB stick.

Copyright © 2006 congatec AG AN7_External_BIOS_Update.docx 10/20


Printed versions of this document are not under revision control
Application Note

4 Preprogramming the SPI Flash Device


There are two ways for pre-programming the external SPI flash device.

4.1 Programming with a Flash Programmer


This is a general overview of the key points you need to be aware of when
programming the SPI flash with a flash programmer.
The flash devices have a SO8W footprint and need the corresponding adapter. Please be
aware that there are different voltages for different products. The SPI interface on the
conga-SEVAL runs at 1.8V, while other evaluation carriers and the MITX debug card run
at 3.3V.

Caution

Applying 3.3V to a 1.8V SPI flash will destroy the chip.

Please refer to section 2.3 “Additional Equipment” for the required SPI flash device and
the correct BIOS binary file.
After making sure you got the right programmer and adapter for the SPI flash device,
program the BIOS binary onto the SPI flash.
If you do not have a flash programmer, use the update procedure described in the
following section.

4.2 Programming of External BIOS Flash with CGUTIL


In this step, a functioning product of the same type and with the same BIOS flash size is
used together with the evaluation carrier/MITX debug card to pre-program the external
SPI flash device. The procedure is similar to the actual flash update you will see in
chapter 5 “Onboard BIOS Flash Update Procedure”. We recommend a product with the
same part number to program the external flash. This way, it is not possible to accidently
program the wrong BIOS onto the working board.
1. Connect the necessary peripherals and power supply to the system (evaluation
carrier + working module or working Mini-ITX board + debug card).
2. Insert the empty SPI flash into the socket and set the DIP switch for internal BIOS
boot. Please refer to chapter 6 for the exact position.
3. Plug in the USB boot medium with FreeDos or UEFI shell containing the BIOS flash
tool cgutlcmd and the BIOS binary file. Both files should be in the same directory.
4. Start the system and boot into the operating system on the USB stick.
5. Navigate to the folder where cgutlcmd and the BIOS binary are located.

Copyright © 2006 congatec AG AN7_External_BIOS_Update.docx 11/20


Printed versions of this document are not under revision control
Application Note

Note

When using the UEFI shell in order to navigate to the files, you need to select the
right file system first. To do this, type “FSx:”, where x stands for the number of the
file system the shell gave to the USB stick.

6. Unlock the flash part by entering the following line:


cgutlcmd bflash /eu

If the flash part needs to be unlocked, the system will perform a power cycle in
order to unlock it. This is necessary to do a full update in the next step. A full update
means that not only the UEFI firmware content will be flashed to the flash part but
also any additional firmware that is required (for example ME and TXE binaries).
7. Navigate to the folder where cgutlcmd and the BIOS binary file are located and
enter the following line:
cgutlcmd bflash BIOSNAME.bin /ef /d

The parameter BIOSNAME stands for the name of the BIOS file, e.g. “BQSLR011.bin”

Note

The parameter “/ef” will force a full flash update (UEFI firmware + extended area).
Usually, it is sufficient to only use “/e” because the congatec system utility auto
detects if a full update is necessary and skips it when not, thereby saving much
time. However, it is safer to force the full update when an external update is done.

The parameter “/d” allows you to switch to another flash part, in order to program
the external SPI flash device.

When using a product with a different BIOS than the defective one for the external
update, the “/f” parameter is needed to program the BIOS. The “/f” parameters
bypasses the built-in protection mechanism that only allows the user to program
BIOS binary with the same 4 letter BIOS project name.

Please refer to AN1_BIOS_Update for more information about the different


parameters used.

8. After the prompt tells you that you may switch to another flash part, switch to the
off board BIOS with the DIP switch. Please refer to section 6 of this document for
the exact positon.
9. Confirm by pressing any key, the update process will now start. Once completed, the
message “BIOS successfully updated” will be displayed.
10. The system restarts. Your external SPI flash has been successfully prepared.
Copyright © 2006 congatec AG AN7_External_BIOS_Update.docx 12/20
Printed versions of this document are not under revision control
Application Note

5 Onboard BIOS Flash Update Procedure


In this section, the preprogrammed SPI flash device is used to boot up the product and
program the onboard BIOS flash.
1. Insert the pre-programmed SPI flash into the socket and set the DIP switch to external
boot. Refer to chapter 6 “External BIOS Flash Location” for the exact position.
2. Connect the necessary peripherals and power supply to the system (eval carrier +
non-booting module or Mini-ITX board + debug card).
3. Plug in the USB boot medium with FreeDOS or UEFI shell containing the BIOS flash
tool cgutlcmd and the BIOS binary file. Both files should be in the same directory.
4. Start the System and boot into the operating system on the USB stick.
5. Navigate to the folder where cgutlcmd and the BIOS binary are located.

Note

When using the UEFI shell in order to navigate to the files, you need to select the
right file system first. To do this type “FSx:”, where x stands for the number of the
file system the UEFI shell gave to the USB stick.

6. Unlock the flash part by entering following line:


cgutlcmd bflash /eu

If the flash part needs to be unlocked, the system will perform a power cycle in
order to unlock it. This is necessary to do a full update in the next step. A full update
means that not only the UEFI firmware content will be flashed to the flash part but
also any additional firmware that is required (for example ME and TXE binaries).
7. Navigate to the folder where cgutlcmd and the BIOS binary are located and enter
the following line:
cgutlcmd bflash BIOSNAME.bin /ef /d

The parameter BIOSNAME stands for the name of the BIOS file, e.g. “BQSLR011.bin”.

Note

The parameter “/ef” will force a full flash update (UEFI firmware + extended area).
Usually, it is sufficient to only use “/e” because the congatec system utility auto
detects if a full update is necessary and skips it when not, thereby saving much
time. However, it is safer to force the full update when an external update is done.
When the BIOS does not have an extended area, the tool will ignore this parameter.

The parameter “/d” allows you to switch to another flash part in order to program
the external SPI flash device.
Copyright © 2006 congatec AG AN7_External_BIOS_Update.docx 13/20
Printed versions of this document are not under revision control
Application Note

Please refer to AN1_BIOS_Update for more information about the different


parameters used

8. After the prompt tells you that you may switch to another flash part, switch to the
onboard BIOS with the DIP switch. Please refer to chapter 6 “External BIOS Flash
Location” of this document for the exact positon.
9. Confirm by pressing any key to start the update process. Once completed, the
message “BIOS successfully updated” will be displayed.
10. The system restarts. Your BIOS has been successfully updated and the product
should be able to boot again.

Copyright © 2006 congatec AG AN7_External_BIOS_Update.docx 14/20


Printed versions of this document are not under revision control
Application Note

6 External BIOS Flash Location


6.1 TEVAL

DIP Switch M13 Configuration External SPI flash socket

SW1(DIS0#) SW2(DIS1#)

OFF OFF Boot from on-module BIOS

OFF ON Boot from external BIOS

Copyright © 2006 congatec AG AN7_External_BIOS_Update.docx 15/20


Printed versions of this document are not under revision control
Application Note

6.2 X7/EVAL

DIP Switch M13 Configuration External SPI flash socket

SW1(DIS0#) SW2(DIS1#)

OFF OFF Boot from on-module BIOS

OFF ON Boot from external BIOS

Copyright © 2006 congatec AG AN7_External_BIOS_Update.docx 16/20


Printed versions of this document are not under revision control
Application Note

6.3 MEVAL

DIP Switch M13 Configuration External SPI flash socket

SW1(DIS0#) SW2(DIS1#)

OFF OFF Boot from on-module BIOS

OFF ON Boot from external BIOS

Copyright © 2006 congatec AG AN7_External_BIOS_Update.docx 17/20


Printed versions of this document are not under revision control
Application Note

6.4 QEVAL

DIP Switch M13 Configuration External SPI flash socket

SW1 SW2

OFF OFF Boot from on-module BIOS

ON OFF Boot from external BIOS

When the DIP switch is set to external the LED D4 is lit.

Copyright © 2006 congatec AG AN7_External_BIOS_Update.docx 18/20


Printed versions of this document are not under revision control
Application Note

6.5 SEVAL

DIP Switch M17 DIP Switch M18 Configuration External SPI flash

SW1 SW2 SW1


(BOOT_SEL0#) (BOOT_SEL1#) (BOOT_SEL2#)

OFF OFF OFF Boot from on-module BIOS

OFF OFF ON Boot from external BIOS

When the DIP switch is set to external, the LED D4 is lit.

Copyright © 2006 congatec AG AN7_External_BIOS_Update.docx 19/20


Printed versions of this document are not under revision control
Application Note

6.6 Mini ITX

DIP Switch M13 Configuration External SPI flash socket

SW1 SW2

OFF OFF Boot from on-board BIOS

ON OFF Boot from external BIOS

Copyright © 2006 congatec AG AN7_External_BIOS_Update.docx 20/20


Printed versions of this document are not under revision control

You might also like