File tree Expand file tree Collapse file tree 6 files changed +75
-10
lines changed Expand file tree Collapse file tree 6 files changed +75
-10
lines changed Original file line number Diff line number Diff line change @@ -546,3 +546,15 @@ jobs:
546546 run : |
547547 tools/scripts/sim-sunnyday-update.sh
548548
549+ - name : Run sunny day LMS update test
550+ run : |
551+ tools/scripts/sim-pq-sunnyday-update.sh config/examples/sim-lms.config
552+
553+ - name : Run sunny day XMSS update test
554+ run : |
555+ tools/scripts/sim-pq-sunnyday-update.sh config/examples/sim-xmss.config
556+
557+ - name : Run sunny day ML-DSA update test
558+ run : |
559+ tools/scripts/sim-pq-sunnyday-update.sh config/examples/sim-ml-dsa.config
560+
Original file line number Diff line number Diff line change @@ -27,15 +27,15 @@ ARCH=sim
2727TARGET=sim
2828SIGN?=LMS
2929HASH?=SHA256
30- LMS_LEVELS=2
31- LMS_HEIGHT=5
30+ LMS_LEVELS=1
31+ LMS_HEIGHT=10
3232LMS_WINTERNITZ=8
33+ IMAGE_SIGNATURE_SIZE=1456
34+ IMAGE_HEADER_SIZE=4096
3335WOLFBOOT_SMALL_STACK=0
3436SPI_FLASH=0
3537DEBUG=0
3638DELTA_UPDATES=0
37- IMAGE_SIGNATURE_SIZE=2644
38- IMAGE_HEADER_SIZE?=5288
3939
4040# sizes should be multiple of system page size
4141WOLFBOOT_PARTITION_SIZE=0x40000
Original file line number Diff line number Diff line change @@ -38,12 +38,12 @@ DELTA_UPDATES=0
3838# Category 2:
3939ML_DSA_LEVEL=2
4040IMAGE_SIGNATURE_SIZE=2420
41- IMAGE_HEADER_SIZE?=4840
41+ IMAGE_HEADER_SIZE?=8192
4242#
4343# Category 3:
4444# ML_DSA_LEVEL=3
4545# IMAGE_SIGNATURE_SIZE=3309
46- # IMAGE_HEADER_SIZE?=6618
46+ # IMAGE_HEADER_SIZE?=8192
4747#
4848# Category 5:
4949# ML_DSA_LEVEL=5
@@ -53,7 +53,7 @@ IMAGE_HEADER_SIZE?=4840
5353
5454# sizes should be multiple of system page size
5555WOLFBOOT_PARTITION_SIZE=0x40000
56- WOLFBOOT_SECTOR_SIZE=0x1000
56+ WOLFBOOT_SECTOR_SIZE=0x2000
5757WOLFBOOT_PARTITION_BOOT_ADDRESS=0x20000
5858# if on external flash, it should be multiple of system page size
5959WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x60000
Original file line number Diff line number Diff line change @@ -17,11 +17,11 @@ SPI_FLASH=0
1717DEBUG=0
1818DELTA_UPDATES=0
1919IMAGE_SIGNATURE_SIZE=2500
20- IMAGE_HEADER_SIZE?=5000
20+ IMAGE_HEADER_SIZE?=8192
2121
2222# sizes should be multiple of system page size
2323WOLFBOOT_PARTITION_SIZE=0x40000
24- WOLFBOOT_SECTOR_SIZE=0x1000
24+ WOLFBOOT_SECTOR_SIZE=0x2000
2525WOLFBOOT_PARTITION_BOOT_ADDRESS=0x20000
2626# if on external flash, it should be multiple of system page size
2727WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x60000
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ #
3+ # For PQ methods the keytools must be built to match the alg.
4+ #
5+
6+ print_usage_and_die () {
7+ echo " usage:"
8+ echo " ./tools/scripts/sim-pq-sunnyday-update.sh <path to sim-pq dot config>"
9+ echo " "
10+ echo " example:"
11+ echo " ./tools/scripts/sim-pq-sunnyday-update.sh config/examples/sim-ml-dsa.config"
12+ exit 1
13+ }
14+
15+ err_and_die () {
16+ echo " error: $1 "
17+ exit 1
18+ }
19+
20+ if [ $# -ne 1 ]; then
21+ print_usage_and_die
22+ fi
23+
24+ sim_pq=$1
25+
26+ if [ ! -f $sim_pq ]; then
27+ err_and_die " file not found: $sim_pq "
28+ fi
29+
30+ cp $sim_pq .config || err_and_die " cp $sim_pq "
31+
32+ make distclean; make clean;
33+
34+ make keytools || err_and_die " keytools build failed"
35+
36+ make test-sim-internal-flash-with-update || err_and_die " make sim failed"
37+
38+ V=` ./wolfboot.elf update_trigger get_version 2> /dev/null`
39+ if [ " x$V " != " x1" ]; then
40+ echo " Failed first boot with update_trigger"
41+ exit 1
42+ fi
43+
44+ V=` ./wolfboot.elf success get_version 2> /dev/null`
45+ if [ " x$V " != " x2" ]; then
46+ echo " Failed update (V: $V )"
47+ exit 1
48+ fi
49+
50+ echo Test successful.
51+ exit 0
52+
53+
You can’t perform that action at this time.
0 commit comments