-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18045 from benpicco/suit/transport-vfs
suit/transport/vfs: add VFS as source for firmware updates
- Loading branch information
Showing
11 changed files
with
419 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright (C) 2022 ML!PA Consulting GmbH | ||
* | ||
* This file is subject to the terms and conditions of the GNU Lesser | ||
* General Public License v2.1. See the file LICENSE in the top level | ||
* directory for more details. | ||
*/ | ||
/** | ||
* @defgroup sys_suit_transport_vfs SUIT secure firmware OTA VFS transport | ||
* @ingroup sys_suit | ||
* @brief SUIT firmware VFS transport | ||
* | ||
* Allows to load firmware updates from the filesystem. | ||
* URL scheme: file://<path>/<to>/manifest.suit | ||
* | ||
* e.g. set `SUIT_COAP_ROOT` to `file:///sd0/fw` and place the | ||
* update files to the folder fw/ on the first SD card. | ||
* @{ | ||
* | ||
* @brief VFS transport backend definitions for SUIT manifests | ||
* @author Benjamin Valentin <benjamin.valentin@ml-pa.com> | ||
* | ||
*/ | ||
|
||
#ifndef SUIT_TRANSPORT_VFS_H | ||
#define SUIT_TRANSPORT_VFS_H | ||
|
||
#include "net/nanocoap.h" | ||
#include "suit.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief fetch a payload from the filesystem | ||
* | ||
* @param[in] manifest suit manifest context | ||
* @param[in] cb filesystem block callback | ||
* @param[in] ctx callback context | ||
* | ||
* @returns SUIT_OK if valid | ||
* @returns negative otherwise | ||
*/ | ||
int suit_transport_vfs_fetch(const suit_manifest_t *manifest, coap_blockwise_cb_t cb, void *ctx); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* SUIT_TRANSPORT_VFS_H */ | ||
/** @} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.