scripts: Allow image version number
Add an --image-version argument to zep2newt.py to allow the major version number to be set. This helps make testing easier by having differing version numbers.
This commit is contained in:
parent
adec29ebe5
commit
06446dda2c
|
@ -63,6 +63,9 @@ def get_args():
|
|||
parser.add_argument('-f', required=False, action="store_true", \
|
||||
default=False, \
|
||||
help='Flash using JLinkExe')
|
||||
parser.add_argument('--image-version', dest='image_version',
|
||||
default=1,
|
||||
help='Major part of version number')
|
||||
|
||||
return parser.parse_args()
|
||||
|
||||
|
@ -189,7 +192,7 @@ class Convert():
|
|||
self.vtable_offs,
|
||||
image_size,
|
||||
sig.get_flags(),
|
||||
1, 0, 0, 0)
|
||||
int(self.args.image_version), 0, 0, 0)
|
||||
return hd
|
||||
|
||||
def add_trailer(self, pad):
|
||||
|
|
2
sign.sh
2
sign.sh
|
@ -9,6 +9,7 @@ source $(dirname $0)/target.sh
|
|||
--out shell.signed.bin \
|
||||
--vtoff 0x200 \
|
||||
--word-size 8 \
|
||||
--image-version 3 \
|
||||
--bit --pad 0x20000
|
||||
|
||||
./scripts/zep2newt.py \
|
||||
|
@ -17,4 +18,5 @@ source $(dirname $0)/target.sh
|
|||
--sig RSA \
|
||||
--vtoff 0x200 \
|
||||
--word-size 8 \
|
||||
--image-version 2 \
|
||||
--out hello.signed.bin
|
||||
|
|
Loading…
Reference in New Issue