Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shell command for zero #68

Merged
merged 3 commits into from
Nov 20, 2024

Conversation

sasataku
Copy link
Member

For the firmware update of Zero and Pico, it is necessary to execute
commands like rauc, mcumgr, and crc32, which are already included
in out Yocto environment. These commands will be used for file
uploads, CRC calculation, and firmware update processes.

The commands can accept strings up to 200 bytes in length, and the
command responses will be split into 240 byte segments when downlinked.
However, to avoid infinite downlinking, a limit is set on the number
of responses (50 responses per command).

Additionally, to account for potential command hang-ups, the timeout
duration can also be specified from the Ground.

While we understand that security considerations are necessary, we have
not implemented any restrictions in the first commit.

For the firmware update of Zero and Pico, it is necessary to execute
commands like `rauc`, `mcumgr`, and crc32, which are already included
in out Yocto environment. These commands will be used for file
uploads, CRC calculation, and firmware update processes.

The commands can accept strings up to 200 bytes in length, and the
command responses will be split into 240 byte segments when downlinked.
However, to avoid infinite downlinking, a limit is set on the number
of responses (50 responses per command).

Additionally, to account for potential command hang-ups, the timeout
duration can also be specified from the Ground.

While we understand that security considerations are necessary, we have
not implemented any restrictions in the first commit.

Signed-off-by: Takuya Sasaki <[email protected]>
@sasataku sasataku requested a review from yashi as a code owner November 20, 2024 23:43
This commit adds the patch for resolve issue below.

The Linux USART driver for libcsp calls `exit()` API the rx_thread if
a read operation fails. This behavior terminates the entire process,
even if communication via interfaces other than USART is still possible.
Therefore, the exit() code will be removed.

Signed-off-by: Takuya Sasaki <[email protected]>
When executing `mcumgr` using shell commands, the following error
occurs.

  Error: exec: "getent": executable file not found in $PATH

However, this error does not appear when logging directly into Zero
via SSH. The reason for this behavior is not yet understood, but to
expedite testing, we will add the `glibc-utils` package to install
`getent`.

Signed-off-by: Takuya Sasaki <[email protected]>
@sasataku sasataku force-pushed the add-shell-command-for-zero branch from 4b2fbe4 to befc4e7 Compare November 20, 2024 23:46
@sasataku sasataku merged commit cce18ce into spacecubics:main Nov 20, 2024
20 checks passed
@sasataku sasataku deleted the add-shell-command-for-zero branch November 20, 2024 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant