Commit Graph

6 Commits

Author SHA1 Message Date
Doug Zongker
22d79a5c5e make offsets in firmware update header not point to bad blocks
(This is being cherry-picked from master.)

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.

http://b/2358012 - passion: failure to flash hboot (bad blocks?)
2010-01-13 10:07:28 -08:00
Doug Zongker
17a47098d2 use MEMGETBADBLOCK to look for bad blocks when reading MTD partitions 2009-12-14 18:27:03 -08:00
Doug Zongker
bec02d57fb skip over all-zero blocks when reading MTD partition
We fail to detect certain bad blocks (marked in the factory as bad, I
think?) when reading mtd partitions.  These come back as a block of
all zeros.  Since it's fairly unlikely a legitimate boot or recovery
block will contain 128k of zeros, change mtdutils to skip over such
blocks.

Arve says https://review.source.android.com/10535 may be a long-term
fix for this, but he isn't yet sure.
2009-07-01 12:09:29 -07:00
The Android Open Source Project
c24a8e688a auto import from //depot/cupcake/@135843 2009-03-03 19:28:42 -08:00
The Android Open Source Project
ffb48f64fe auto import from //depot/cupcake/@135843 2009-03-03 18:28:14 -08:00
The Android Open Source Project
23580ca27a Initial Contribution 2008-10-21 07:00:00 -07:00