Skip to content

sys/{suit,riotboot}: updates without riotboot header#22281

Open
fabian18 wants to merge 6 commits into
RIOT-OS:masterfrom
fabian18:pr/suit_no_header
Open

sys/{suit,riotboot}: updates without riotboot header#22281
fabian18 wants to merge 6 commits into
RIOT-OS:masterfrom
fabian18:pr/suit_no_header

Conversation

@fabian18
Copy link
Copy Markdown
Contributor

Contribution description

Allow firmware update without riotboot header.
The header can be generated by the current image.
This can prevent incompatibilities and reduces the firmware payload.
The bootloader is not OTA updateable. It relies on a riotboot header prepended to the image.
A new firmware must be shipped with a compatible header #21825 .
The producer of the new image may not now the currently running revision number which must be increasingly updated #21510 .

Testing procedure

With #21565.

DEVELHELP=1 USE_ETHOS=0 SUIT_COAP_SERVER_IFACE=enp1s0f0 BOARD=same54-xpro make -C examples/advanced/suit_update/ flash

DEVELHELP=1 USE_ETHOS=0 SUIT_COAP_SERVER_IFACE=enp1s0f0 BOARD=same54-xpro make -C examples/advanced/suit_update/ suit_coap_server

DEVELHELP=1 USE_ETHOS=0 SUIT_COAP_SERVER_IFACE=enp1s0f0 BOARD=same54-xpro make -C examples/advanced/suit_update/ term

Publish without boot header:

SUIT_PAYLOAD_IMAGE_ONLY=1 DEVELHELP=1 USE_ETHOS=0 SUIT_COAP_SERVER_IFACE=enp1s0f0 BOARD=same54-xpro make -C examples/advanced/suit_update/ suit/publish

2026-05-12 14:54:58,758 # suit fetch
2026-05-12 14:54:58,760 # suit_worker: started.
2026-05-12 14:54:58,769 # suit_worker: downloading "coap://[2001:db8::1]/fw/suit_update/same54-xpro/riot.suit.latest.bin"
> 2026-05-12 14:54:58,784 # suit_worker: got manifest with size 463
2026-05-12 14:54:58,787 # suit: verifying manifest signature
2026-05-12 14:54:59,930 # suit: validated manifest version
2026-05-12 14:54:59,935 # Manifest seq_no: 1778590437, highest available: 1778590322
2026-05-12 14:54:59,938 # suit: validated sequence number
2026-05-12 14:54:59,940 # Formatted component name: 
2026-05-12 14:54:59,945 # Comparing manifest offset 4000 with other slot offset
2026-05-12 14:54:59,947 # offset does not match
2026-05-12 14:54:59,952 # Comparing manifest offset 82000 with other slot offset
2026-05-12 14:54:59,954 # validating vendor ID
2026-05-12 14:54:59,962 # Comparing 547d0d74-6d3a-5a92-9662-4881afd9407b to 547d0d74-6d3a-5a92-9662-4881afd9407b from manifest
2026-05-12 14:54:59,965 # validating vendor ID: OK
2026-05-12 14:54:59,966 # validating class id
2026-05-12 14:54:59,975 # Comparing 50244518-6a7c-5ce7-932b-88b318336c82 to 50244518-6a7c-5ce7-932b-88b318336c82 from manifest
2026-05-12 14:54:59,977 # validating class id: OK
2026-05-12 14:54:59,982 # Comparing manifest offset 4000 with other slot offset
2026-05-12 14:54:59,984 # offset does not match
2026-05-12 14:54:59,989 # Comparing manifest offset 82000 with other slot offset
2026-05-12 14:54:59,991 # SUIT policy check OK.
2026-05-12 14:54:59,993 # Formatted component name: 
2026-05-12 14:54:59,998 # riotboot_flashwrite: initializing update to target slot 1
2026-05-12 14:55:00,038 # Fetching firmware |█████████████████████████| 100%
2026-05-12 14:55:22,965 # Finalizing payload store
2026-05-12 14:55:22,967 # Verifying image digest
2026-05-12 14:55:22,971 # Starting digest verification against image
2026-05-12 14:55:23,079 # Install correct payload
2026-05-12 14:55:23,084 # riotboot_flashwrite: riotboot flashing completed successfully
2026-05-12 14:55:23,086 # Verified installed payload
2026-05-12 14:55:23,088 # Verifying image digest
2026-05-12 14:55:23,092 # Starting digest verification against image
2026-05-12 14:55:23,201 # Verified installed payload
2026-05-12 14:55:23,203 # Image magic_number: 0x544f4952
2026-05-12 14:55:23,206 # Image Version: 0x6a0322e5
2026-05-12 14:55:23,208 # Image start address: 0x00082400
2026-05-12 14:55:23,211 # Header chksum: 0x6f214e92
2026-05-12 14:55:23,211 # 
2026-05-12 14:55:24,213 # suit_worker: update successful
2026-05-12 14:55:24,216 # suit_worker: rebooting...
2026-05-12 14:55:24,280 # main(): This is RIOT! (Version: 2026.07-devel-180-gb3b04a-pr/suit_no_header_test)
2026-05-12 14:55:24,284 # RIOT SUIT update example application
2026-05-12 14:55:24,285 # Running from slot 1
2026-05-12 14:55:24,288 # Image magic_number: 0x544f4952
2026-05-12 14:55:24,290 # Image Version: 0x6a0322e5
2026-05-12 14:55:24,293 # Image start address: 0x00082400
2026-05-12 14:55:24,295 # Header chksum: 0x6f214e92
2026-05-12 14:55:24,296 # 
2026-05-12 14:55:24,297 # Starting the shell

Publish with boot header:

SUIT_PAYLOAD_IMAGE_ONLY=0 DEVELHELP=1 USE_ETHOS=0 SUIT_COAP_SERVER_IFACE=enp1s0f0 BOARD=same54-xpro make -C examples/advanced/suit_update/ suit/publish

2026-05-12 14:55:55,913 # suit fetch
2026-05-12 14:55:55,915 # suit_worker: started.
2026-05-12 14:55:55,923 # suit_worker: downloading "coap://[2001:db8::1]/fw/suit_update/same54-xpro/riot.suit.latest.bin"
> 2026-05-12 14:55:55,934 # suit_worker: got manifest with size 485
2026-05-12 14:55:55,937 # suit: verifying manifest signature
2026-05-12 14:55:57,079 # suit: validated manifest version
2026-05-12 14:55:57,084 # Manifest seq_no: 1778590546, highest available: 1778590437
2026-05-12 14:55:57,087 # suit: validated sequence number
2026-05-12 14:55:57,089 # Formatted component name: 
2026-05-12 14:55:57,094 # Comparing manifest offset 4000 with other slot offset
2026-05-12 14:55:57,096 # validating vendor ID
2026-05-12 14:55:57,105 # Comparing 547d0d74-6d3a-5a92-9662-4881afd9407b to 547d0d74-6d3a-5a92-9662-4881afd9407b from manifest
2026-05-12 14:55:57,107 # validating vendor ID: OK
2026-05-12 14:55:57,109 # validating class id
2026-05-12 14:55:57,118 # Comparing 50244518-6a7c-5ce7-932b-88b318336c82 to 50244518-6a7c-5ce7-932b-88b318336c82 from manifest
2026-05-12 14:55:57,120 # validating class id: OK
2026-05-12 14:55:57,124 # Comparing manifest offset 4000 with other slot offset
2026-05-12 14:55:57,126 # SUIT policy check OK.
2026-05-12 14:55:57,129 # Formatted component name: 
2026-05-12 14:55:57,134 # riotboot_flashwrite: initializing update to target slot 0
2026-05-12 14:55:57,171 # Fetching firmware |█████████████████████████| 100%
2026-05-12 14:56:20,376 # Finalizing payload store
2026-05-12 14:56:20,378 # Verifying image digest
2026-05-12 14:56:20,382 # Starting digest verification against image
2026-05-12 14:56:20,491 # Install correct payload
2026-05-12 14:56:20,497 # riotboot_flashwrite: riotboot flashing completed successfully
2026-05-12 14:56:20,499 # Verified installed payload
2026-05-12 14:56:20,501 # Verifying image digest
2026-05-12 14:56:20,505 # Starting digest verification against image
2026-05-12 14:56:20,614 # Verified installed payload
2026-05-12 14:56:20,617 # Image magic_number: 0x544f4952
2026-05-12 14:56:20,619 # Image Version: 0x6a032352
2026-05-12 14:56:20,622 # Image start address: 0x00004400
2026-05-12 14:56:20,624 # Header chksum: 0xb0cd6ef7
2026-05-12 14:56:20,624 # 
2026-05-12 14:56:21,627 # suit_worker: update successful
2026-05-12 14:56:21,629 # suit_worker: rebooting...
2026-05-12 14:56:21,694 # main(): This is RIOT! (Version: 2026.07-devel-180-gb3b04a-pr/suit_no_header_test)
2026-05-12 14:56:21,698 # RIOT SUIT update example application
2026-05-12 14:56:21,699 # Running from slot 0
2026-05-12 14:56:21,702 # Image magic_number: 0x544f4952
2026-05-12 14:56:21,704 # Image Version: 0x6a032352
2026-05-12 14:56:21,707 # Image start address: 0x00004400
2026-05-12 14:56:21,709 # Header chksum: 0xb0cd6ef7
2026-05-12 14:56:21,710 # 
2026-05-12 14:56:21,711 # Starting the shell

Issues/PRs references

Declaration of AI-Tools / LLMs usage:

AI-Tools / LLMs that were used are:

  • none

@github-actions github-actions Bot added Area: build system Area: Build system Area: OTA Area: Over-the-air updates Area: sys Area: System labels May 12, 2026
@crasbe crasbe added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label May 12, 2026
@riot-ci
Copy link
Copy Markdown

riot-ci commented May 12, 2026

Murdock results

✔️ PASSED

1573fdd pkg/tinyusb/dfu: remove RIOTBOOT_FLASHWRITE_SKIPLEN

Success Failures Total Runtime
11108 0 11108 12m:17s

Artifacts

@github-actions github-actions Bot added the Area: tests Area: tests and testing framework label May 12, 2026
@fabian18 fabian18 added the CI: no fast fail don't abort PR build after first error label May 12, 2026
@fabian18 fabian18 requested a review from dylad as a code owner May 13, 2026 10:47
@github-actions github-actions Bot added the Area: USB Area: Universal Serial Bus label May 13, 2026
@fabian18 fabian18 force-pushed the pr/suit_no_header branch from de4695b to 1573fdd Compare May 13, 2026 13:24
@github-actions github-actions Bot added the Area: pkg Area: External package ports label May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: build system Area: Build system Area: OTA Area: Over-the-air updates Area: pkg Area: External package ports Area: sys Area: System Area: tests Area: tests and testing framework Area: USB Area: Universal Serial Bus CI: no fast fail don't abort PR build after first error CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants