Python tools to create, view, and extract littleFS filesystem images
Project description
littlefs-tools
Tools to create, view, and extract littleFS filesystem images.
Though distributed as a Python module, these tools are intended to be executed as command-line tools. The invocation commands are provided below.
Attribution: littlefs_tools is built on top of littlefs-python. To use littleFS functionality within your Python code, use littlefs-python directly.
Installation
pip install littlefs_tools
Requires Python 3.9 or later.
Usage
Unified CLI
All commands are available under a single littlefs command:
littlefs create -s <source_dir> -i <image_file> [-b BLOCK_SIZE] [-c BLOCK_COUNT] [-o OFFSET] [-v]
littlefs list -i <image_file> [-b BLOCK_SIZE] [-c BLOCK_COUNT] [-o OFFSET] [-v]
littlefs extract -i <image_file> -d <destination> [-b BLOCK_SIZE] [-c BLOCK_COUNT] [-o OFFSET] [-f] [-v]
Run littlefs --help for full usage, or littlefs <command> --help for command-specific help.
littlefs create
Package a directory into a littleFS binary image.
usage: littlefs create [-h] [-b BLOCK_SIZE] [-c BLOCK_COUNT] [-o OFFSET] [-v] -s SOURCE -i IMAGE
optional arguments:
-h, --help show this help message and exit
-b BLOCK_SIZE, --block_size BLOCK_SIZE
block size of the LFS image (defaults to 4096)
-c BLOCK_COUNT, --block_count BLOCK_COUNT
block count of the LFS image (defaults to 64)
-i IMAGE, --image IMAGE
output image file name
-o OFFSET, --offset OFFSET
offset (in bytes) from which the littlefs image starts
(defaults to 0). Hex values are supported (e.g. 0x80000)
-v, --verbose enable verbose/debug output
required arguments:
-s SOURCE, --source SOURCE
source directory path
littlefs list
Display the file tree of a littleFS binary image.
usage: littlefs list [-h] [-b BLOCK_SIZE] [-c BLOCK_COUNT] [-o OFFSET] [-v] -i IMAGE
optional arguments:
-h, --help show this help message and exit
-b BLOCK_SIZE, --block_size BLOCK_SIZE
block size of the LFS image (defaults to 4096)
-c BLOCK_COUNT, --block_COUNT BLOCK_COUNT
block count of the LFS image (defaults to 64)
-o OFFSET, --offset OFFSET
offset (in bytes) from which the littlefs image starts
(defaults to 0). Hex values are supported (e.g. 0x80000)
-v, --verbose enable verbose/debug output
required arguments:
-i IMAGE, --image IMAGE
image file name
littlefs extract
Extract all files from a littleFS binary image to a directory.
usage: littlefs extract [-h] [-b BLOCK_SIZE] [-c BLOCK_COUNT] [-o OFFSET] [-f] [-v] -i IMAGE -d DESTINATION
optional arguments:
-h, --help show this help message and exit
-b BLOCK_SIZE, --block_size BLOCK_SIZE
block size of the LFS image (defaults to 4096)
-c BLOCK_COUNT, --block_count BLOCK_COUNT
block count of the LFS image (defaults to 64)
-o OFFSET, --offset OFFSET
offset (in bytes) from which the littlefs image starts
(defaults to 0). Hex values are supported (e.g. 0x80000)
-f, --force force extract even if destination folder is not empty
-v, --verbose enable verbose/debug output
required arguments:
-i IMAGE, --image IMAGE
image file name
-d DESTINATION, --destination DESTINATION
destination directory to extract the contents into
Legacy Commands
The original standalone commands are still available for backward compatibility:
littlefs_create -s <source_dir> -i <image_file> [options]
littlefs_list -i <image_file> [options]
littlefs_extract -i <image_file> -d <destination> [options]
Building the Package Locally
Install build tools and build:
pip install build
python -m build
This produces both a source distribution and a wheel in the dist/ directory.
Install the built wheel:
pip install dist/littlefs_tools-*.whl
Contributing
See CONTRIBUTING.md for development setup, testing, and pull request guidelines.
Changelog
See CHANGELOG.md for a list of changes in each release.
littlefs-tools | ലിറ്റിലെഫ്എസ്-ഉപകരണങ്ങൾ
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file littlefs_tools-1.2.0.tar.gz.
File metadata
- Download URL: littlefs_tools-1.2.0.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
443a270a21971f31e32edad37c6dd9df61d3b3cbc46f33c4e2ca501de29892da
|
|
| MD5 |
64f4baf9e143b20edbf4ad04ffddfa0c
|
|
| BLAKE2b-256 |
99760fcd80ac68b1fc2cfb2a0f7f1e3f4359b1e5467cd7da5d56651641894cb9
|
Provenance
The following attestation bundles were made for littlefs_tools-1.2.0.tar.gz:
Publisher:
publish.yml on vppillai/littlefs_tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
littlefs_tools-1.2.0.tar.gz -
Subject digest:
443a270a21971f31e32edad37c6dd9df61d3b3cbc46f33c4e2ca501de29892da - Sigstore transparency entry: 1272640733
- Sigstore integration time:
-
Permalink:
vppillai/littlefs_tools@8f5303bd053f814fdc99ca5ad36e154647df1447 -
Branch / Tag:
refs/tags/1.2.0 - Owner: https://github.com/vppillai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8f5303bd053f814fdc99ca5ad36e154647df1447 -
Trigger Event:
push
-
Statement type:
File details
Details for the file littlefs_tools-1.2.0-py3-none-any.whl.
File metadata
- Download URL: littlefs_tools-1.2.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92d4ca8974e489c16234d0e95b7ff47845ff32423d7e201e720f2bc4ab872228
|
|
| MD5 |
2aa640b42e95c0322a8f7ede58e05040
|
|
| BLAKE2b-256 |
bc4fc1ff85528aae6f11e3ce540ee029cc2bf140b9e2578095a6d2e0324ca893
|
Provenance
The following attestation bundles were made for littlefs_tools-1.2.0-py3-none-any.whl:
Publisher:
publish.yml on vppillai/littlefs_tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
littlefs_tools-1.2.0-py3-none-any.whl -
Subject digest:
92d4ca8974e489c16234d0e95b7ff47845ff32423d7e201e720f2bc4ab872228 - Sigstore transparency entry: 1272640794
- Sigstore integration time:
-
Permalink:
vppillai/littlefs_tools@8f5303bd053f814fdc99ca5ad36e154647df1447 -
Branch / Tag:
refs/tags/1.2.0 - Owner: https://github.com/vppillai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8f5303bd053f814fdc99ca5ad36e154647df1447 -
Trigger Event:
push
-
Statement type: