10. 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: barebox_update - update barebox to persistent media. 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 *):

barebox:/ barebox_update -l
registered update handlers:
* mmc         -> /dev/mmc1
  spinor      -> /dev/m25p0

barebox_update - update barebox to persistent media 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 erase - erase flash memory and cp - copy files commands. The exact commands are board specific.

Previous topic

9. Default environment version 2

Next topic

11. Devicetree support

This Page