summaryrefslogtreecommitdiffstats
path: root/common/bbu.c
Commit message (Collapse)AuthorAgeFilesLines
* bbu: parameters are inverted in error messageRenaud Barbier2016-08-181-2/+2
| | | | | | | | | The error message warning the user that the image is too big for the device has its parameters in the wrong order. Swap the two parameters so that the output makes sense. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/imx-bbu-nand-fcb'Sascha Hauer2016-04-081-1/+11
|\
| * bbu: Allow to refresh/repair imagesSascha Hauer2016-04-081-1/+11
| | | | | | | | | | | | | | | | | | | | Some SoCs allow to store multiple boot images on a device in order to improve robustness. This adds a -r option to barebox_update to indicate we do not want to make an update but instead repair/refresh an existing image. Handlers which want to support this feature must set the BBU_HANDLER_CAN_REFRESH flag during registration. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | bbu: print and evaluate image MetadataSascha Hauer2016-04-061-0/+78
|/ | | | | | | | | | | With imd we can store metadata in barebox images. Let's use this information to further verify that the image that is to be flashed is the correct one. This patch extracts the device tree compatible from the image and compares it with the one from the currently running barebox. If it doesn't match the update is aborted with a warning. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/bbu'Sascha Hauer2016-03-111-1/+33
|\
| * bbu: Add function to check if an update handler existsMarkus Pargmann2016-02-181-0/+14
| | | | | | | | | | | | | | | | This adds a function to check for the existence of an update handler based on the supplied bbu_data. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * bbu: Add barebox_update search by deviceMarkus Pargmann2016-02-181-1/+19
| | | | | | | | | | | | | | | | | | bbu_data includes a devicefile information. Add the possibility to make an update based on the given devicefile. This is in addition to the normal search for a barebox update handler by its name. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | bbu: use correct printf format specifier for size_tLucas Stach2016-03-041-1/+1
|/ | | | | Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bbu: Add a standard file-to-device-copy handlerSascha Hauer2015-07-011-0/+113
| | | | | | | | The most standard update handler will simply copy a file to a device. This can be shared across several users, so add a standard handler for this operation. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bbu: make bbu confirm a bit more verboseLucas Stach2015-03-041-1/+3
| | | | | | | It is a lot more user friendly if we give a bit more feedback. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* barebox update: fix finding default handlerSascha Hauer2012-12-031-5/+8
| | | | | | | It was not possible to register another handler when already a default handler is registered. Fix this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add in-system barebox update infrastructureSascha Hauer2012-10-171-0/+150
Currently in-system update means to write an arbitrary file to an arbitrary device. There is no sanity check if the flashed image is of the right type or will fit onto the device. Furthermore some SoCs need a special preparation step for their images before flashing them. This adds a barebox in-system update infrastructure. Boards can register update handlers which know how to make the board bootable. The available handlers can be listed to be able to select one, different force levels give the user the chance to know it better. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>