Skip to main content

Python package to create littleFS filesystem image binaries

Project description

littlefs-tools

Build Result PIP Version

Tools create, view and extract littleFS filesystem images.

Though distributed as a python module, these tools are intended to be executed as a command-line tool. Consequently, the code is written into a single python file without classes. The Invocation commands are provided below.

Attribution: littlefs_tools are built on top of littlefs-python. To use littlefs functionality within your python code, please use littlefs-python directly.

Installation

pip install littlefs_tools

Usage

littlefs_create

Tool to create a littleFS filesystem binary image. This tool recursively packages the contents of a source directory into a littlefs image.

usage: littlefs_create [-h] [-b BLOCKSIZE] [-c BLOCKCOUNT] [-i IMAGE] [-v] -s SOURCE

Tool to generate lfs images from a source folder

optional arguments:
  -h, --help            show this help message and exit
  -b BLOCKSIZE, --block_size BLOCKSIZE
                        block size of the LFS image (defaults to 4096)
  -c BLOCKCOUNT, --block_count BLOCKCOUNT
                        block Count of the LFS image (defaults to 64)
  -i IMAGE, --image IMAGE
                        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         Verbose

required arguments:
  -s SOURCE, --source SOURCE
                        source path

littlefs_list

Tool to list contents of a littleFS filesystem image as a tree.

usage: littlefs_list [-h] [-b BLOCKSIZE] [-c BLOCKCOUNT] [-o OFFSET] [-v] -i IMAGE

Tool to list files in a littlefs file image

optional arguments:
  -h, --help            show this help message and exit
  -b BLOCKSIZE, --block_size BLOCKSIZE
                        block size of the LFS image (defaults to 4096)
  -c BLOCKCOUNT, --block_count BLOCKCOUNT
                        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         Verbose

required arguments:
  -i IMAGE, --image IMAGE
                        image file name

littlefs_extract

Tool to extract contents of a littleFS filesystem image to a destination folder.

usage: littlefs_extract [-h] [-b BLOCKSIZE] [-c BLOCKCOUNT] [-f] [-o OFFSET] [-v] -i IMAGE -d DESTINATION

Tool to extract files from a littlefs file image

optional arguments:
  -h, --help            show this help message and exit
  -b BLOCKSIZE, --block_size BLOCKSIZE
                        block size of the LFS image (defaults to 4096)
  -c BLOCKCOUNT, --block_count BLOCKCOUNT
                        block Count of the LFS image (defaults to 64)
  -f, --force           Force extract even if destination folder is not empty
  -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         Verbose

required arguments:
  -i IMAGE, --image IMAGE
                        image file name
  -d DESTINATION, --destination DESTINATION
                        destination directory to extract the contents into

Building the package locally

Make sure that you have setuptools and wheel installed:

The tools package can be built locally using the following command:

python setup.py bdist_wheel --universal

And then installed with

pip install dist/littlefs_tools-1.0.0-py2.py3-none-any.whl  --force

Note: The wheel package must match the version of the package. The version of the package is determined by the version of the package in the setup.py file.

Source distribution is created with the following command:

python setup.py sdist

littlefs-tools | ലിറ്റിലെഫ്എസ്-ഉപകരണങ്ങൾ

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

littlefs_tools-1.1.5.tar.gz (5.8 kB view hashes)

Uploaded Source

Built Distribution

littlefs_tools-1.1.5-py2.py3-none-any.whl (6.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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