summaryrefslogtreecommitdiff
path: root/utils/imxtools/sbtools/crypto.h
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2017-01-01 20:46:16 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2017-01-16 19:49:07 +0100
commit2df6b1fc43ab3cc7b07688a7c8d18f377a754c82 (patch)
tree385ecac7957387e3fdedb50f1faf62b841631ec3 /utils/imxtools/sbtools/crypto.h
parent4f7fea2addf4a5bc7c301e78f53d9080eaf43fb6 (diff)
downloadrockbox-2df6b1fc43ab3cc7b07688a7c8d18f377a754c82.tar.gz
rockbox-2df6b1fc43ab3cc7b07688a7c8d18f377a754c82.zip
imxtools: rework sb file production
The old code had some annoying way of dealing with padding by adding explicit instructions to the stream, which is 1) ugly 2) not in par with freescale tools. The trick, which this new version implements, is to put the useful length of the section in the section header, and the actual (with padding) length in the boot tag. This way the tools can just ignore padding instruction by reading the section header, and the bootloader can still load the image because it uses the boot tags. Also correctly handle the case where the first section does not start right after the header (there is a bug in freescale tools for this case by the way). There is an ambiguity in the way the padding instructions should be encrypted: the bootloader should logically treat them as regular instruction of the section stream, but it appears the freescale tools do not generate them as part of the stream and instead encrypt them like boot tags, which is stupid because there is no way the bootloader could decrypt them, and anyway we don't care because the bootloader doesn't decrypt them at all. Change-Id: Iabdc1d1f9f82d374779bf03efb75c2c3998f5b5d
Diffstat (limited to 'utils/imxtools/sbtools/crypto.h')
0 files changed, 0 insertions, 0 deletions