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 XXX] [-p PORT] [-b BAUD] [--timeout SECONDS] [--shared] [-h]
             [--version]

Interrupt U-Boot autoboot via the serial console

options:
  -s XXX, --string XXX  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.0.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.0-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ubtools-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 7a8b5d5a2e9d9a40c7b0af945c49a2ede2e290ab5e3f5b8a6c195dd1861c5fc5
MD5 dade690a32fca05ee1d09f4ef478e0bc
BLAKE2b-256 ab05d54f9fbd2f7624fc55ad96e85c5c9a8a962360b4a4e5cb4b585c974e8027

See more details on using hashes here.

Provenance

The following attestation bundles were made for ubtools-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: ubtools-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7dcfb17b24384cc2d5d779886f5313d71c71c0092d5176e72a05152a0c492de
MD5 105d7eae8f8608effc9f0ed52a089e28
BLAKE2b-256 83fb0104662f51291c5dbadce8b88ea7c37b8ae3c14c05beecbb76012c979478

See more details on using hashes here.

Provenance

The following attestation bundles were made for ubtools-0.1.0-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