8 recovery mechanism, Recovery mechanism – Kontron COMe-bP5020 User Manual
Page 64

www.kontron.com
64
User Guide
COMe-bP5020
After the SD card is inserted, U-Boot should be stopped at the console after power-up. To manually start the update, enter the
following command:
In the case of a U-Boot update, only the standard SPI boot flash is updated.
The script “netupdate” tries to load a U-Boot script “update_d0c81/update” from the server. If found, it is loaded to memory
and executed as in the case of the SD card.
As the script “netupdate” requires access to a server, the environment variable “serverip” must be set correctly. Alternatively,
it is possible to use the “dhcp” or “bootp” commands.
An automatic run of the update script at every startup takes place if the update script is started in the preboot environment
variable:
6.8 Recovery Mechanism
There are two SPI boot flashes available with each device holding a copy of U-Boot. In the event the contents of the standard
SPI boot flash have been corrupted (e.g. as a result of a power failure during an update), the recovery SPI boot flash must be
selected. This is done by powering the system down, deinstalling the COMe-bP5020 module, setting switch 2 of the SW1 DIP
switch to the “on” position, reinstalling the COMe-bP5020 module and then restarting the system.
The board now starts from the recovery SPI boot flash. In this state, the standard SPI boot flash can be programmed again with
the “update” or “netupdate” scripts described in Chapter 6.7 Update.
The update scripts provided ensure that prior to the update the standard SPI boot flash is selected and the U-Boot update image
is available and correct. Once the update is completed, switch 2 of the SW1 DIP switch must be set to “off” to again allow boot-
ing from the standard SPI boot flash.
The contents of the recovery SPI boot flash should never be updated in order to avoid a completely inoperable system with no
accessing capability.
run update
setenv preboot 'run update'
saveenv