Skip to main content

Tiny little tools to interact with U-Boot via the serial console

Project description

ubtools

Tiny little tools to interact with U-Boot via the serial console

Also included is a simple yet robust Python 3.11 library to talk to U-Boot.

Usage

To install the tools:

pipx install ubtools

To run without installing:

cd src
python -m ubtools.cli.COMMAND ...

To build and test:

./build
./run-tests
pipx install -e .

Commands

Command Description
ubint Interrupt U-Boot autoboot via the serial console
ubcmd Send a command to U-Boot via the serial console and print the output
ubread Read from U-Boot memory via the serial console
ubwrite Write to U-Boot memory via the serial console

ubint

Interrupt U-Boot autoboot via the serial console

usage: ubint [-s STR] [-p PORT] [-b BAUD] [--timeout SECONDS] [--shared] [-h]
             [--version]

Interrupt U-Boot autoboot via the serial console

options:
  -s STR, --string STR  interrupt using custom string
  -p PORT, --port PORT  serial port device
  -b BAUD, --baud BAUD  baud rate
  --timeout SECONDS     timeout for read operations
  --shared              open serial port in shared mode
  -h, --help            show help message and exit
  --version             show version number and exit

ubcmd

Send a command to U-Boot via the serial console and print the output

usage: ubcmd [-q] [-p PORT] [-b BAUD] [--timeout SECONDS] [--shared] [-h]
             [--version]
             COMMAND ...

Send a command to U-Boot via the serial console and print the output

positional arguments:
  COMMAND               command to send
  ARGS                  arguments

options:
  -q, --quiet           do not show exit code
  -p PORT, --port PORT  serial port device
  -b BAUD, --baud BAUD  baud rate
  --timeout SECONDS     timeout for read operations
  --shared              open serial port in shared mode
  -h, --help            show help message and exit
  --version             show version number and exit

ubread

Read from U-Boot memory via the serial console

usage: ubread [-q] [-w BITS] [-p PORT] [-b BAUD] [--timeout SECONDS]
              [--shared] [-h] [--version]
              FILE ADDRESS LENGTH

Read from U-Boot memory via the serial console

positional arguments:
  FILE                  Output file (use '-' for stdout)
  ADDRESS               memory address (decimal or hex)
  LENGTH                number of bytes (decimal or hex)

options:
  -q, --quiet           do not show progress
  -w BITS, --word BITS  use reads of specified bit width
  -p PORT, --port PORT  serial port device
  -b BAUD, --baud BAUD  baud rate
  --timeout SECONDS     timeout for read operations
  --shared              open serial port in shared mode
  -h, --help            show help message and exit
  --version             show version number and exit

ubwrite

Write to U-Boot memory via the serial console

usage: ubwrite [-q] [-w BITS] [-p PORT] [-b BAUD] [--timeout SECONDS]
               [--shared] [-h] [--version]
               FILE ADDRESS

Write to U-Boot memory via the serial console

positional arguments:
  FILE                  input file (use '-' for stdin)
  ADDRESS               memory address (decimal or hex)

options:
  -q, --quiet           do not show progress
  -w BITS, --word BITS  use writes of specified bit width
  -p PORT, --port PORT  serial port device
  -b BAUD, --baud BAUD  baud rate
  --timeout SECONDS     timeout for read operations
  --shared              open serial port in shared mode
  -h, --help            show help message and exit
  --version             show version number and exit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ubtools-0.1.1.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ubtools-0.1.1-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file ubtools-0.1.1.tar.gz.

File metadata

  • Download URL: ubtools-0.1.1.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ubtools-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c9d1eccbd482e6cbf9dffe005f07bf6b22d76c89d42c7d50cf75967f22b1122d
MD5 1888eff99a9f9387990828e9381c9bdd
BLAKE2b-256 d8e38ce33d94621f3fba8a2ed5fb0cb728bf0a155a35b14d22f1faf451e0858d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ubtools-0.1.1.tar.gz:

Publisher: publish.yml on Lanchon/ubtools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ubtools-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ubtools-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 23.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ubtools-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a83cedbb8a10be81276ec167bb49d0163a214828368b6547314b575998e7d2d6
MD5 68b29045c458d0d6d65fb617d57e0c94
BLAKE2b-256 91234c4805689d274c3ffc54e9749ee0b07b35cfb7ef140e6e9d8f464e8891dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for ubtools-0.1.1-py3-none-any.whl:

Publisher: publish.yml on Lanchon/ubtools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page