@@ -51,10 +51,10 @@ make clean && make wolfboot.bin && make test-app/image.bin
5151
5252# Function to sign image
5353sign_image () {
54- IMAGE_HEADER_SIZE=${IMAGE_HEADER_SIZE} \
55- WOLFBOOT_PARTITION_SIZE=${PARTITION_SIZE} \
56- WOLFBOOT_SECTOR_SIZE=${SECTOR_SIZE} \
57- ./tools/keytools/sign ${SIGN_ARG} ${HASH_ARG} test-app/image.bin wolfboot_signing_private_key.der " $1 "
54+ IMAGE_HEADER_SIZE=" ${IMAGE_HEADER_SIZE} " \
55+ WOLFBOOT_PARTITION_SIZE=" ${PARTITION_SIZE} " \
56+ WOLFBOOT_SECTOR_SIZE=" ${SECTOR_SIZE} " \
57+ ./tools/keytools/sign " ${SIGN_ARG} " " ${HASH_ARG} " test-app/image.bin wolfboot_signing_private_key.der " $1 "
5858}
5959
6060# Function to print summary
@@ -71,22 +71,22 @@ print_summary() {
7171}
7272
7373if [ " $MODE " = " clean" ]; then
74- sign_image ${VERSION}
74+ sign_image " ${VERSION} "
7575 dd if=/dev/zero of=blank_update.bin bs=1K count=108
7676 ./tools/bin-assemble/bin-assemble factory.bin 0x0 wolfboot.bin \
77- ${BOOT_ADDRESS} test-app/image_v${VERSION} _signed.bin \
78- ${UPDATE_ADDRESS} blank_update.bin
79- ${JLINK} -CommanderScript tools/scripts/va416x0/flash_va416xx.jlink
77+ " ${BOOT_ADDRESS} " test-app/image_v${VERSION} _signed.bin \
78+ " ${UPDATE_ADDRESS} " blank_update.bin
79+ " ${JLINK} " -CommanderScript tools/scripts/va416x0/flash_va416xx.jlink
8080 print_summary
8181else
82- TRIGGER_ADDRESS=$( printf " 0x%X" $(( ${UPDATE_ADDRESS} + ${PARTITION_SIZE} - 5 )) )
83- PREV_VERSION=$(( ${VERSION} - 1 ))
84- sign_image ${PREV_VERSION} && sign_image ${VERSION}
82+ TRIGGER_ADDRESS=$( printf " 0x%X" $(( " ${UPDATE_ADDRESS} " + " ${PARTITION_SIZE} " - 5 )) )
83+ PREV_VERSION=$(( " ${VERSION} " - 1 ))
84+ sign_image " ${PREV_VERSION} " && sign_image " ${VERSION} "
8585 echo -n " pBOOT" > trigger_magic.bin
8686 ./tools/bin-assemble/bin-assemble update.bin 0x0 wolfboot.bin \
87- ${BOOT_ADDRESS} test-app/image_v${PREV_VERSION} _signed.bin \
88- ${UPDATE_ADDRESS} test-app/image_v${VERSION} _signed.bin \
89- ${TRIGGER_ADDRESS} trigger_magic.bin
90- ${JLINK} -CommanderScript tools/scripts/va416x0/flash_va416xx_update.jlink
87+ " ${BOOT_ADDRESS} " test-app/image_v${PREV_VERSION} _signed.bin \
88+ " ${UPDATE_ADDRESS} " test-app/image_v${VERSION} _signed.bin \
89+ " ${TRIGGER_ADDRESS} " trigger_magic.bin
90+ " ${JLINK} " -CommanderScript tools/scripts/va416x0/flash_va416xx_update.jlink
9191 print_summary " ${TRIGGER_ADDRESS} " " ${PREV_VERSION} "
9292fi
0 commit comments