If we are passed a plain i.MX v1 image without the usual 1K preamble - assume a special case and don't try to apply bbu_force() logic. This is useful in cases where a board specific quirk to make BBU work is needed. Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx> --- arch/arm/mach-imx/imx-bbu-internal.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/imx-bbu-internal.c b/arch/arm/mach-imx/imx-bbu-internal.c index 7735273b4..8c44d601d 100644 --- a/arch/arm/mach-imx/imx-bbu-internal.c +++ b/arch/arm/mach-imx/imx-bbu-internal.c @@ -133,9 +133,19 @@ err_close: static int imx_bbu_check_prereq(const char *devicefile, struct bbu_data *data) { + enum filetype type; int ret; - if (file_detect_type(data->image, data->len) != filetype_arm_barebox) { + type = file_detect_type(data->image, data->len); + + switch (type) { + case filetype_imx_image_v1: + pr_debug("Detected %s. Assuming special case\n", + file_type_to_string(type)); + break; + case filetype_arm_barebox: + break; + default: if (!bbu_force(data, "Not an ARM barebox image")) return -EINVAL; } -- 2.17.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox