-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit bfa3bb5 Author: Bodong Yang <[email protected]> Date: Wed Jun 5 19:16:32 2024 +0900 refactor: project restruct phase2 (#311) Project restruct phase2, in this phase most of the changes are restructring the packages to make the project more modularized and decoupling each components as much as possible. 1. ota_metadata becomes a standalone package, current implementation is treated as the implementation for OTA image format legacy version. 2. create new otaclient_api, current version is v2 and all the protobuf pb2 generated code and proto wrappers are grouped under v2. 3. create new otaclient_common, all common shared libs, helper funcs and types are grouped under this package, categorized by functionality. 4. fix according to import paths changes. 5. restruct tests according to the new project layout. 1. cleanup bootstrap, refactor into samples, which provide sample ecu_info.yaml, proxy_info.yaml and otaclient.service for single ECU setup. 2. fix up tools/offline_ota_image_builder and status_monitor package. 3. not use relative imports anymore. commit 9f975ad Author: Bodong Yang <[email protected]> Date: Tue Jun 4 17:12:05 2024 +0900 chore(tools): remove out-of-date unmaintained tools (#313) This PR removes the unmaintained old tools, including tools.emulator, tools.test_utils and tools/build_image.sh. commit 0ce3cc9 Author: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue Jun 4 16:32:45 2024 +0900 [pre-commit.ci] pre-commit autoupdate (#312) * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/tox-dev/pyproject-fmt: 1.8.0 → 2.1.3](tox-dev/pyproject-fmt@1.8.0...2.1.3) - [github.com/igorshubovych/markdownlint-cli: v0.40.0 → v0.41.0](igorshubovych/markdownlint-cli@v0.40.0...v0.41.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
b4d068a
commit 56572fc
Showing
126 changed files
with
2,026 additions
and
2,817 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,26 +1,23 @@ | ||
# OTA client | ||
# OTAClient | ||
|
||
## Overview | ||
|
||
This OTA client is a client software to perform over-the-air software updates for linux devices. | ||
To enable updating of software at any layer (kernel, kernel module, user library, user application), the OTA client targets the entire rootfs for updating. | ||
When the OTA client receives an update request, it downloads a list from the OTA server that contains the file paths and the hash values of the files, etc., to be updated, and compares them with the files in its own storage and if there is a match, that file is used to update the rootfs. By this delta mechanism, it is possible to reduce the download size even if the entire rootfs is targeted and this mechanism does not require any specific server implementation, nor does it require the server to keep a delta for each version of the rootfs. | ||
OTAClient is software to perform over-the-air software updates for linux devices. | ||
It provides a set of APIs for user to start the OTA and monitor the progress and status. | ||
|
||
It is designed to work with web.auto FMS OTA component. | ||
|
||
## Feature | ||
|
||
- Rootfs updating | ||
- Delta updating | ||
- Redundant configuration with A/B partition update | ||
- Arbitrary files can be copied from A to B partition. This can be used to take over individual files. | ||
- No specific server implementation is required. The server that supports HTTP GET is only required. | ||
- TLS connection is also required. | ||
- Delta management is not required for server side. | ||
- To restrict access to the server, cookie can be used. | ||
- All files to be updated are verified by the hash included in the metadata, and the metadata is also verified by X.509 certificate locally installed. | ||
- Transfer data is encrypted by TLS | ||
- Multiple ECU(Electronic Control Unit) support | ||
- By the internal proxy cache mechanism, the cache can be used for the download requests to the same file from multiple ECU. | ||
- A/B partition update with support for generic x86_64 device, NVIDIA Jetson series based devices and Raspberry Pi device. | ||
- Full Rootfs update, with delta update support. | ||
- Local delta calculation, allowing update to any version of OTA image without the need of a pre-generated delta OTA package. | ||
- Support persist files from active slot to newly updated slot. | ||
- Verification over OTA image by digital signature and PKI. | ||
- Support for protected OTA server with cookie. | ||
- Optional OTA proxy support and OTA cache support. | ||
- Multiple ECU OTA supports. | ||
|
||
## License | ||
|
||
OTA client is licensed under the Apache License, Version 2.0. | ||
OTAClient is licensed under the Apache License, Version 2.0. |
This file was deleted.
Oops, something went wrong.
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,3 @@ | ||
# OTA Service API proto | ||
|
||
This folder includes the OTA service API proto file, and a set of tools to generate the python lib from the proto files. |
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,3 @@ | ||
# OTAClient configuration files samples | ||
|
||
This folder contains the sample otaclient configuration files **ecu_info.yaml**, **proxy_info.yaml** and systemd service unit file **otaclient.service** for a single ECU OTA setup. |
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,7 @@ | ||
# This is the sample ecu_info.yaml for a single x86_64 ECU setup. | ||
# Please check ecu_info.yaml spec for more details: https://tier4.atlassian.net/l/cp/AGmpqFFc. | ||
format_version: 1 | ||
ecu_id: autoware | ||
bootloader: grub | ||
available_ecu_ids: | ||
- autoware |
6 changes: 2 additions & 4 deletions
6
...root/etc/systemd/system/otaclient.service → samples/otaclient.service
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 |
---|---|---|
@@ -1,15 +1,13 @@ | ||
# otaclient.service | ||
|
||
[Unit] | ||
Description=OTA Client | ||
After=network-online.target nss-lookup.target | ||
Wants=network-online.target | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/bin/bash -c 'source /opt/ota/.venv/bin/activate && PYTHONPATH=/opt/ota python3 -m otaclient' | ||
ExecStart=/opt/ota/client/venv/bin/python3 -m otaclient | ||
Restart=always | ||
RestartSec=10 | ||
RestartSec=16 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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,9 @@ | ||
# This is the sample proxy_info.yaml for a single ECU setup. | ||
# Please check proxy_info.yaml spec for more details: https://tier4.atlassian.net/l/cp/qT4N4K0X. | ||
format_version: 1 | ||
enable_local_ota_proxy: true | ||
enable_local_ota_proxy_cache: true | ||
local_ota_proxy_listen_addr: 127.0.0.1 | ||
local_ota_proxy_listen_port: 8082 | ||
# if otaclient-logger is installed locally | ||
logging_server: "http://127.0.0.1:8083" |
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,3 @@ | ||
# OTA image metadata | ||
|
||
Libs for parsing OTA image. |
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
File renamed without changes.
File renamed without changes.
Oops, something went wrong.