zhashfs: write first block last

James Cameron quozl at laptop.org
Thu May 5 03:57:10 EDT 2011

On Wed, Apr 13, 2011 at 04:03:25PM -0600, Daniel Drake wrote:
> As for zhashfs, writing block 0 as all-zero was unnecessary as the
> entire SD card gets blanked at the start of fs-update. (tweaked this
> locally)

Q3A65 removed this blanking, because it interfered with NANDblaster,
which stores the received blocks of the .zd file in the SD card before
fs-update begins.  On extending the blanking to the whole device, the
.zd file being read by fs-update was also erased from about line 68
of os860.zd generating "/nb-updater:68: Missing newline after zdata".

So I think writing block 0 as all-zero will be needed.

On Sun, Mar 20, 2011 at 04:49:31PM +0000, Daniel Drake wrote:
> To fix this, I've modified zhashfs to create .zd files that ... write
> the whole image starting at block 1, then at the very end write block
> 0 ...

Do you have a corresponding patch to zdextract in bios-crypto?  Your
change to zhashfs has broken zdextract.  We don't use zdextract in the
tool chain, but it was a surprise to find it no longer works correctly.

zdextract does not yet handle sparse input correctly.  I'd like to fix
that, but not if you've already fixed it for zero block first.

James Cameron

More information about the Devel mailing list