{"id":19338204,"url":"https://github.com/jserv/littlefs-fuse","last_synced_at":"2026-03-07T02:33:56.411Z","repository":{"id":146557278,"uuid":"237583641","full_name":"jserv/littlefs-fuse","owner":"jserv","description":"A FUSE wrapper that puts the littlefs in user-space","archived":false,"fork":false,"pushed_at":"2023-02-08T07:06:09.000Z","size":241,"stargazers_count":20,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-12T07:21:54.990Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jserv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-01T08:14:02.000Z","updated_at":"2025-01-06T18:27:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"b6b7cd42-df18-4076-8513-421a6478bb2d","html_url":"https://github.com/jserv/littlefs-fuse","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jserv/littlefs-fuse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jserv%2Flittlefs-fuse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jserv%2Flittlefs-fuse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jserv%2Flittlefs-fuse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jserv%2Flittlefs-fuse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jserv","download_url":"https://codeload.github.com/jserv/littlefs-fuse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jserv%2Flittlefs-fuse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30206070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"online","status_checked_at":"2026-03-07T02:00:06.765Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T03:16:38.332Z","updated_at":"2026-03-07T02:33:56.391Z","avatar_url":"https://github.com/jserv.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## The little filesystem in user-space\n\nA FUSE wrapper that puts the littlefs in user-space.\n\n**FUSE** - https://github.com/libfuse/libfuse  \n**littlefs** - https://github.com/ARMmbed/littlefs\n\nThis project allows you to mount littlefs directly in a host PC.\nThis allows you to easily debug an embedded system using littlefs on\nremovable storage, or even debug littlefs itself, since the block device\ncan be viewed in a hex-editor simultaneously.\n\nlittlefs-fuse uses FUSE to interact with the host OS kernel, which means\nit can be compiled into a simple user program without kernel modifications.\nThis comes with a performance penalty, but works well for the littlefs,\nsince littlefs is intended for embedded systems.\n\nCurrently littlefs-fuse has been tested on the following OSs:\n- [Linux](#usage-on-linux)\n- [FreeBSD](#usage-on-freebsd)\n- [macOS](#usage-on-macos)\n\n## Usage on Linux\n\nlittlefs-fuse requires FUSE version 2.6 or higher, you can find your FUSE\nversion with:\n``` bash\nfusermount -V\n```\n\nIn order to build against FUSE, you will need the package `libfuse-dev`:\n``` bash\nsudo apt-get install libfuse-dev\n```\n\nOnce you have cloned littlefs-fuse, you can compile the program with make:\n``` bash\nmake\n```\n\nThis should have built the `lfs` program in the top-level directory.\n\nFrom here we will need a block device. If you don't have removable storage\nhandy, you can use a file-backed block device with Linux's loop devices:\n``` bash\nsudo chmod a+rw /dev/loop0                  # make loop device user accessible\ndd if=/dev/zero of=image bs=512 count=2048  # create a 1MB image\nlosetup /dev/loop0 image                    # attach the loop device\n```\n\nlittlefs-fuse has two modes of operation, formatting and mounting.\n\nTo format a block device, pass the `--format` flag. Note! This will erase any\ndata on the block device!\n``` bash\n./lfs --format /dev/loop0\n```\n\nTo mount, run littlefs-fuse with a block device and a mountpoint:\n``` bash\nmkdir mount\n./lfs /dev/loop0 mount\n```\n\nOnce mounted, the littlefs filesystem will be accessible through the\nmountpoint. You can now use the littlefs like you would any other filesystem:\n\n``` bash\ncd mount\necho \"hello\" \u003e hi.txt\nls\ncat hi.txt\n```\n\nAfter using littlefs, you can unmount and detach the loop device:\n``` bash\ncd ..\numount mount\nsudo losetup -d /dev/loop0\n```\n\n## Usage on FreeBSD\n\nlittlefs-fuse requires FUSE version 2.6 or higher, you can find your FUSE\nversion with:\n``` bash\npkg info fusefs-libs | grep Version\n```\n\nOnce you have cloned littlefs-fuse, you can compile the program with make:\n``` bash\ngmake\n```\n\nThis should have built the `lfs` program in the top-level directory.\n\nFrom here we will need a block device. If you don't have removable storage\nhandy, you can use a file-backed block device with FreeBSD's loop devices:\n``` bash\ndd if=/dev/zero of=imageBSD bs=1m count=1   # create a 1 MB image\nsudo mdconfig -at vnode -f image            # attach the loop device\nsudo chmod 666 /dev/mdX                     # make loop device user accessible,\n                                            # where mdX is device created with mdconfig command\n```\n\nlittlefs-fuse has two modes of operation, formatting and mounting.\n\nTo format a block device, pass the `--format` flag. Note! This will erase any\ndata on the block device!\n``` bash\n./lfs --format /dev/md0\n```\n\nTo mount, run littlefs-fuse with a block device and a mountpoint:\n``` bash\nmkdir mount\n./lfs /dev/md0 mount\n```\n\nOnce mounted, the littlefs filesystem will be accessible through the\nmountpoint. You can now use the littlefs like you would any other filesystem:\n``` bash\ncd mount\necho \"hello\" \u003e hi.txt\nls\ncat hi.txt\n```\n\nAfter using littlefs, you can unmount and detach the loop device:\n``` bash\ncd ..\numount mount\nsudo mdconfig -du 0\n```\n\n## Usage on macOS\n\nlittlefs-fuse requires [macFUSE](https://macfuse.io/) for macOS:\n```bash\nbrew install --cask macfuse\n```\n\nOnce you have cloned littlefs-fuse, you can compile the program with make:\n``` bash\nmake\n```\n\nThis should have built the `lfs` program in the top-level directory.\n\nFrom here we will need a block device. If you don't have removable storage\nhandy, you can use a file-backed block device with FreeBSD's loop devices:\n``` bash\ndd if=/dev/zero of=image bs=1m count=1                                  # create a 1 MB image\nhdiutil attach -imagekey diskimage-class=CRawDiskImage -nomount image   # attach the loop device\nsudo chmod 666 /dev/diskX                                               # make loop device user accessible,\n```\n\nlittlefs-fuse has two modes of operation, formatting and mounting.\n\nTo format a block device, pass the `--format` flag. Note! This will erase any\ndata on the block device!\n``` bash\n./lfs --format /dev/diskX\n```\n\nTo mount, run littlefs-fuse with a block device and a mountpoint:\n``` bash\nmkdir mount\n./lfs /dev/diskX mount\n```\n\nOnce mounted, the littlefs filesystem will be accessible through the\nmountpoint. You can now use the littlefs like you would any other filesystem:\n``` bash\ncd mount\necho \"hello\" \u003e hi.txt\nls\ncat hi.txt\n```\n\nAfter using littlefs, you can unmount and detach the loop device:\n``` bash\ncd ..\nhdiutil unmount /dev/diskX\nhdiutil detach /dev/diskX\n```\n\n## Limitations\n\nAs an embedded filesystem, littlefs is designed to be simple. By default,\nthis comes with a number of limitations compared to more PC oriented\nfilesystems:\n\n- No timestamps, this will cause some programs, such as make to fail\n- No user permissions, this is why all of the files show up bright green\n  in ls, all files are accessible by anyone\n- No symbolic links or special device files, currently only regular and\n  directory file-types are implemented\n\n## Tips\n\nIf the littlefs was formatted with different geometry than the physical block\ndevice, you can override what littlefs-fuse detects. `lfs -h` lists all\navailable options:\n``` bash\n./lfs --block_size=512 --format /dev/loop0\n./lfs --block_size=512 /dev/loop0 mount\n```\n\nYou can run littlefs-fuse in debug mode to get a log of the kernel interactions\nwith littlefs-fuse. Any printfs in the littlefs driver will end up here:\n``` bash\n./lfs -d /dev/loop0 mount\n```\n\nYou can even run littlefs-fuse in gdb to debug the filesystem under user\noperations. Note! When gdb is halted this will freeze any programs interacting\nwith the filesystem!\n``` bash\nmake DEBUG=1 clean all                # build with debug info\ngdb --args ./lfs -d /dev/loop0 mount  # run with gdb\n```\n\nUsing xxd or other hex-editory is very useful for inspecting the block\ndevice while debugging. You can even run xxd from inside gdb using gdb's\n`!` syntax:\n``` bash\ndd if=/dev/loop0 bs=512 count=1 skip=0 | xxd -g1\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjserv%2Flittlefs-fuse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjserv%2Flittlefs-fuse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjserv%2Flittlefs-fuse/lists"}