From 4c5f9f341665ac4c1474afca92863cc02d9e1a13 Mon Sep 17 00:00:00 2001 From: Doug Zongker Date: Tue, 12 Jan 2010 16:18:33 -0800 Subject: make offsets in firmware update header not point to bad blocks hboot will apparently fail to install if the first block of the image (the one pointed to by the offset in the block 0 header) is a bad block. (Hopefully it handles subsequent bad blocks.) This change makes the MTD write code keep track of the bad blocks it has skipped over, so that the offset in the header can be adjusted to be the address of the first successfully written block. Change-Id: I45d58e32a36d0c1dbc0a7f871bd5985b6c8ff524 http://b/2358012 - passion: failure to flash hboot (bad blocks?) --- mtdutils/mtdutils.h | 1 + 1 file changed, 1 insertion(+) (limited to 'mtdutils/mtdutils.h') diff --git a/mtdutils/mtdutils.h b/mtdutils/mtdutils.h index 8d2cb56..528a5bb 100644 --- a/mtdutils/mtdutils.h +++ b/mtdutils/mtdutils.h @@ -49,6 +49,7 @@ void mtd_read_close(MtdReadContext *); MtdWriteContext *mtd_write_partition(const MtdPartition *); ssize_t mtd_write_data(MtdWriteContext *, const char *data, size_t data_len); off_t mtd_erase_blocks(MtdWriteContext *, int blocks); /* 0 ok, -1 for all */ +off_t mtd_find_write_start(MtdWriteContext *ctx, off_t pos); int mtd_write_close(MtdWriteContext *); #endif // MTDUTILS_H_ -- cgit v1.1