Renumber the TLV type values
In preparation for moving the signature related values out of the main
image header and into the TLV, renumber the existing TLV values to be
grouped together better.
The SHA256 is moved into the first group, at 0x10, and the signature
values themselves are moved to start with 0x20.
This change is the first in a series of changes toward the new v1.0
image format. The intermediate results are all internally consistent
(meaning that the simulator, and the builtin imgtool.py will all work
together), but until all patches are applied, the image format is not
valid with any external tools.
Based on work by Marko Kiiskila <marko@runtime.io>.
Signed-off-by: Marko Kiiskila <marko@runtime.io>
Signed-off-by: David Brown <david.brown@linaro.org>
diff --git a/scripts/imgtool/image.py b/scripts/imgtool/image.py
index 4cb6662..cd031be 100644
--- a/scripts/imgtool/image.py
+++ b/scripts/imgtool/image.py
@@ -20,10 +20,10 @@
'PKCS1_PSS_RSA2048_SHA256': 0x0000040, }
TLV_VALUES = {
- 'SHA256': 1,
- 'RSA2048': 2,
- 'ECDSA224': 3,
- 'ECDSA256': 4, }
+ 'SHA256': 0x10,
+ 'RSA2048': 0x20,
+ 'ECDSA224': 0x21,
+ 'ECDSA256': 0x22, }
TLV_HEADER_SIZE = 4