diff --git a/scripts/zep2newt.py b/scripts/zep2newt.py index 1b464650..e9904f86 100755 --- a/scripts/zep2newt.py +++ b/scripts/zep2newt.py @@ -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): diff --git a/sign.sh b/sign.sh index 269032d8..6fe08f51 100755 --- a/sign.sh +++ b/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