You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `mfg split` command separates an mfgimg binary into several files,
one for each flash area.
Prior to this commit, imgmod would strip all trailing erase-val bytes
(0xff) from each file. Usually this was the correct behavior, but if
the contents of a flash area legitimately ended with an erase-val byte,
then the file would be corrupted during this step.
The problem is that `newt` was throwing away information when it created
mfgimages. It embedded the specified binaries into a single mfgimage
and filled in the gaps with erase-val bytes, and it did this without
leaving any indication of the sizes of the binaries used as input.
Newt was recently changed to include the sizes of these binaries in the
`manifest.json` file that accompanies an mfgimage. This commit changes
imgmod to read these sizes from the manifest file so that it knows how
many erase-val bytes it can safely strip.
If the manifest does not contain size information (backwards
compatibility), imgmod falls back to the old behavior or stripping all
trailing erase-val bytes.
0 commit comments