9
0
Fork 0
Commit Graph

11 Commits

Author SHA1 Message Date
Sascha Hauer fd50a8d758 Merge branch 'for-next/imx-bbu-nand-fcb' 2016-04-08 13:37:28 +02:00
Sascha Hauer fa61152d97 bbu: Allow to refresh/repair images
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>
2016-04-08 13:35:32 +02:00
Sascha Hauer 0e4f92570e bbu: print and evaluate image Metadata
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>
2016-04-06 15:41:15 +02:00
Markus Pargmann 7290110f1a bbu: Add function to check if an update handler exists
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>
2016-02-18 16:10:11 +01:00
Sascha Hauer c5438404db Merge branch 'for-next/imx-bbu-nand-fcb'
Conflicts:
	common/Kconfig
2015-07-03 08:37:36 +02:00
Sascha Hauer 74ac4489cf bbu: Add a standard file-to-device-copy handler
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>
2015-07-01 09:04:22 +02:00
Sascha Hauer 22f8077c39 imx-bbu-nand-fcb: make available for i.MX28 aswell
The code can be used with slight modifications on i.MX28 aswell.
Add a i.MX28 registration function and move the differences to
function callbacks.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-12 08:28:26 +02:00
Sascha Hauer a10366acd8 ARM: i.MX6: bbu nand: Move to common place
The code can be used on i.MX28 aswell, so move it to a common place.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-12 08:28:04 +02:00
Lucas Stach 6b73603f16 bbu: include necessary headers
Fixes compile errors due to undefined symbols.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-04 11:34:08 +01:00
Markus Pargmann ccdf13af24 include/bbu: Add missing include errno.h
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-29 08:22:31 +02:00
Sascha Hauer bed8fb6de1 Add in-system barebox update infrastructure
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>
2012-10-17 20:23:41 +02:00