2014-06-17 08:37:25 +00:00
|
|
|
|
|
|
|
.. _update:
|
|
|
|
|
|
|
|
Updating barebox
|
|
|
|
================
|
|
|
|
|
|
|
|
Updating barebox is potentially a dangerous task. When the update fails,
|
|
|
|
the board may not start anymore and must be recovered. barebox has a special
|
|
|
|
command to make updating barebox easier and safer: :ref:`command_barebox_update`.
|
|
|
|
A board can register an update handler to the update command. The handler can
|
|
|
|
do additional checks before trying an update, e.g. it's possible
|
|
|
|
to check whether the new image actually is a barebox image.
|
|
|
|
|
|
|
|
Updating barebox can be as easy as::
|
|
|
|
|
|
|
|
barebox_update /path/to/new/barebox.img
|
|
|
|
|
|
|
|
Multiple handlers can be registered to the update mechanism. Usually the device
|
|
|
|
barebox has been started from is registered as default (marked with a ``*``)::
|
|
|
|
|
2014-06-27 11:00:18 +00:00
|
|
|
barebox:/ barebox_update -l
|
2014-06-17 08:37:25 +00:00
|
|
|
registered update handlers:
|
|
|
|
* mmc -> /dev/mmc1
|
|
|
|
spinor -> /dev/m25p0
|
|
|
|
|
|
|
|
:ref:`command_barebox_update` requires board support, so it may not be
|
|
|
|
available for your board. It is recommended to implement it, but you can also
|
|
|
|
update barebox manually using :ref:`command_erase` and :ref:`command_cp`
|
|
|
|
commands. The exact commands are board specific.
|