From Compulab Mediawiki
Jump to: navigation, search

BIOS Revision Notes



  • Initial Release

BIOS Update

Updating using external USB


  1. Insert removable disk-on-key into USB slot (ensure that you don't have any other USB mass storage devices connected).
  2. Run the ImUpdate.exe utility and select as "Target" the desired disk (by letter/size).
  3. Choose 128MBDOS.img as the "Source image".
  4. Press the "Start Restore" key to proceed and wait for completion.
  5. Reinsert a bootable USB device with the preinstalled image
  6. Copy to the root directory files SFlash16.exe and the BIOS image (biosx.rom-1045k image)

Writing the BIOS

  1. Insert a USB disk and power on the system
  2. Boot to DOS
  3. Type SFlash16.exe biosx.rom /Force
  4. Wait for completion
  5. Restart

Updating Using Ethernet Link

This method of BIOS update is available only if the BIOS version currently installed on the module is dated 1-Dec-2009 or later.

  • Connect the ethernet port (P4 on SB-iAM baseboard) to the LAN.
  • Ensure that no SATA disk is connected to the module.
  • The Host PC requires a TFTP server supporting TFTP options and large files (>32Mb). Read the Etherlink installation section for details.
  • Set c:\bios_upd\ as the TFTP server base directory. For Windows TFTPD32 choose "Settings" and browse for "Base directory". Choose standard TFTP security.
  • On the host Enter BIOS[F2] , go to the "Advanced" submenu and select "Start EtherLink" .
  • Configure EtherLink by pressing 1 (Configure) in the main menu. Carefully read the Etherlink section of this document to accomplish the configuration.
  • Ensure that the BIOS image name (specified in the 5th line of Etherlink menu or the 6th line of Config menu) is the same as in the c:\bios_upd\ folder (i.e., "bios.bin" – 1MB image). If not, change the BIOS image name by pressing '6' in the Config menu.
  • Return to the Etherlink main menu by pressing 0. Review the TFTP server parameters at the end of the 5th line.
  • Start a secure BIOS update by pressing 5 (Download bios image) and then press "Y". Wait for process completion. It takes about 30-40 sec.
Admolition warning.png Do not interrupt the host PC and CM-iAM until the process has been completed!
  • Return to the main menu by pressing any key.

After Update

Reboot the CM-iAM by pressing the RESET button. Verify that the BIOS revision date has been updated, according to the revision date of the BIOS you installed. The BIOS date is specified in the bottom left-hand corner of the BIOS configuration box displayed upon startup. If the BIOS date has not been changed - you probably missed something during the installation process and are still using the previous version of BIOS. In such a case, please repeat the installation steps correctly.

CompuLab-specific features

Saving default setup



EtherLink enables fast binary transfers between a host computer and a target Computer-on-Module, through an Ethernet link. The network communication is based on the TFTP protocol.
EtherLink can write or read back contents of the NAND flash for the purpose of an o/s package’s installation/duplication, as well as write/read BIOS and Configuration Block.
Host system: any computer with an Ethernet port and a TFTP server supporting large files (>32MB).
Target System: CM-iAM


The EtherLink utility is an integrated part of BIOS and resides in the boot flash device.
The Host side requires the installation of a TFTP server supporting TFTP options and large files (>32MB).
Recommended TFTP servers:

  • “tftpd32 by Ph.Jounin” TFTP server for a Windows-based host (
  • tftpd package for your distribution on a Linux-based host. For example, tftp-server-0.34-1mdk on Mandrake.
Admolition note.png TFTPD file names are case-sensitive, therefore the file name typed in EtherLink must be in the same case as the file name of the NAND or BIOS image.


Interactive activation through BIOS [F2] >>Advanced>> Start EtherLink menu.


The EtherLink menus are self-explanatory. The full menu tree of EtherLink is presented below. The value in brackets specifies the meaning of the parameter which should be provided and its default value.

─┐─1   Configure
 ├─1.1    Use DHCP to obtain ip address for the device (Yes)
 ├─1.2    Set static ip address for the device (
 ├─1.3    Set subnet mask for the device (
 ├─1.4    Set ip address of the tftp server (server-ip-address)
 ├─1.5    Set NAND image file name (NAND-image-filename)
 ├─1.6    Set BIOS image file name (bios-image-filename)
 ├─1.7    Set configblock file name (configblock-image-filename)
 ├─1.8    Set NAND image start sector (00000000h)
 ├─1.9    Set NAND image end sector (ffffffffh)
 └─1.A    Enable split (for nand size >2Gb)
──3    Download NAND image (from tftp://server-ip-address/NAND-image-filename - full image)
──4    Upload NAND image (to tftp://server-ip-address/NAND-image-filename - full image)
──5    Download BIOS image (from tftp://server-ip-address/bios-image-filename)
──6    Download configblock (from tftp://server-ip-address/bios-image-filename)
──7    Upload configblock (to tftp://server-ip-address/configblock-image-filename)
──8    Upload BIOS image (to tftp://server-ip-address/configblock-image-filename)
──9    Save configurations
──10   Quit EtherLink and reboot

The operation of the EtherLink includes the following steps:

Setup network and remote host (Configure menu)

  • The user is asked to use DHCP (automatic) settings or to specify network parameters manually. The relevant parameters are: target system IP address and subnet mask.
Admolition note.png The utility is not intended to work with different subnets or to make any sort of name resolution; therefore, parameters such as default gateway and DNS server IP are not relevant.
  • The user has to provide the TFTP server’s IP address and for an image, a filename for each supported image type (menus 1.4 - 1.7).
  • The partial NAND Flash image can be specified by the start and end sector parameters. For the download, the remote file image will be updated on the NAND Flash starting from the start sector until the end sector or the end of the remote file. For the upload, the remote file image will be updated with NAND Flash data read from the start sector until the end sector or until the NAND Flash’s last sector (if the end sector is not specified - 0xffffffff) (Menus 1.8 - 1.9).

Accepting commands

  • Download NAND image - The contents of the remote image file from the TFTP server are written into the NAND Flash.
  • Upload NAND image - The contents of the NAND Flash are read back into the remote image file on the TFTP server. For files >2Gb, the “Enable split“ option should be enabled(default) – it will automatically split an image into 2 files adding *_01,*_02 extensions to the file name. The ”Enable split“ option is mutually exclusive with the NAND image start/end custom sector. Disable this option for a 1Gb NAND flash or for files less than 2Gb.
  • Download BIOS image (with confirmation) – The BIOS is updated with the contents of the remote BIOS image file from the TFTP server. The remote BIOS image is downloaded twice and only if the images are identical, will the actual update take place. An additional check for image size and contents is performed in order to ensure that the BIOS image is valid for the module (expected image size is about 1MB). The configuration block isn’t changed during this operation.
  • Download configblock - The configblock is updated with the contents of the remote configblock image file on the TFTP server. The configblock contains BIOS factory defaults and EtherLink settings and APCC code. The update is performed in two phases like in the BIOS’ case (expected image size is 64 KB).
  • Upload configblock - The contents of configblock are read back into the remote configblock image file on the TFTP server.
  • Upload BIOS image - The BIOS is read back (including config block) into the remote BIOS image file on the TFTP server.

Loading/Saving EtherLink configuration

The EtherLink configurations can be saved into the BIOS configblock for later use.
At each activalion, the EtherLink performs an automatic load of stored configurations. If the configurations are not found or are corrupted, the following default configurations are used:

Use DHCP for automatic IP address assignment. 
Remote TFTP server IP address –
Remote NAND image filename – disk.dat
Remote BIOS filename – bios.raw    
Remote configblock filename – config.raw 
NAND partial image start sector – 00h 
NAND partial image end sector – ffffffffh 
Enable split - Yes

Atom Pre-boot Chipset Configuration (APCC)

APCC allows the user to configure CM-iAM hardware or to perform any other action before booting the operating system. The user can load his own code into the FWH flash and the BIOS will execute it right before calling the O/S bootstrap routine. When user code is placed in the flash, the module startup sequence is: [Powerup] >> [BIOS] >> [APCC code] >> [Operating System] APCC provides an alternative method to run user code prior to O/S launch.

User Code Definitions

User code must be in the following format:

Property Description
Mode 16-bit real mode. If high memory or flash access is required - use BIOS interrupt calls to access the required locations.
Stack Initialized, 4000 bytes only. If you need a larger stack - define your own.
Memory organization Code is loaded starting from address 9000:0002 (segment:offset, in Hex).
Available BIOS services All:INT13h – disk services, INT10h – console outputetc.
Code size Less than 16383 bytes
Registers that can be used All
Return from code to BIOS Far return (retf)

An example satisfying all the above requirements is provided and can be used as a template for your program.

Coding Guidelines

  • The standard library functions are not available, since no operating system is running.
  • All hardware access code must be written in assembler.
  • See the APCC.c file for an example of chipset configuration.

Building Instructions

Admolition caution.png User code must be written in file APCC.c. Do not make changes in gskel.asm unless you are proficient in assembler code.
  1. Insert your source code into APCC.c.
  2. Open the file MK_BL.BAT and provide the relevant path to the Borland C compiler binaries.
  3. Run MK_BL.BAT from the command prompt. Ensure that the build process is finished without errors or warnings.

As a result of the build process, you will have two files:

  • APCC.bin – compiled executable (<16k)
  • userbl.bin – 16kB block patched with the code (used for upload) and padded with FF

Loading the Binary Image to the CM-iAM

  1. Preparing a bootable DOS USB image:
    • Insert a removable disk-on-key into the USB slot (ensure that you don't have any other USB mass storage devices connected)
    • Run the ImUpdate.exe utility and select as the "Target" the desired disk (by letter/size)
    • Choose 128MBDOS.img as the "Source image"
    • Press the "Start Restore" key to proceed and wait for completion
    • Reinsert a bootable USB device with the pre-installed image
  2. Copy the executable file apcc_up.exe and the prepared userbl.bin into the USB root directory
  3. For upload, run apcc_up.exe /A userbl.bin and wait for completion
  4. Reboot the CM-iAM
  5. Enter bios->”Advanced” and choose “On” for the “Load and run APCC code” and then “Exit Saving Changes”
  6. Reboot and enjoy

Removing APCC from the CM-iAM

You can simply enter bios ->”Exit” and choose “Off” for the “Load and run APCC code” and then “Exit Saving Changes”.
To remove the APCC code completely, run “apcc_up.exe /R” after booting to DOS.


Enabling the watchdog feature in BIOS allows the monitoring of an O/S boot process and allows rebooting the system in case the boot process hangs. To enable the watchdog, go to BIOS Setup [F2] >> [Advanced] and you will find a "Watchdog" menu. The timeout should be long enough to ensure that the O/S is booted before the watchdog reboots the system.

Admolition caution.png The watchdog should be enabled in BIOS only after the watchdog driver is installed in the main O/S running on the module. If the driver is not installed, the system will be rebooted after the timeout expires.