wolfssh/ide/Linux-FATFS
Andrew Hutchings 08759f1943 Add FATFS Linux example
This allows a file on the Linux filesystem to be used as a FATFS file.

It also fixes a bug in `port.h` when opening file on a FATFS filesystem.
2025-02-27 12:18:05 +00:00
..
.gitignore Add FATFS Linux example 2025-02-27 12:18:05 +00:00
Makefile Add FATFS Linux example 2025-02-27 12:18:05 +00:00
README.md Add FATFS Linux example 2025-02-27 12:18:05 +00:00
diskio.c Add FATFS Linux example 2025-02-27 12:18:05 +00:00
diskio.h Add FATFS Linux example 2025-02-27 12:18:05 +00:00
fatfs_example.c Add FATFS Linux example 2025-02-27 12:18:05 +00:00
ff.c Add FATFS Linux example 2025-02-27 12:18:05 +00:00
ff.h Add FATFS Linux example 2025-02-27 12:18:05 +00:00
ffconf.h Add FATFS Linux example 2025-02-27 12:18:05 +00:00
ffsystem.c Add FATFS Linux example 2025-02-27 12:18:05 +00:00
ffunicode.c Add FATFS Linux example 2025-02-27 12:18:05 +00:00

README.md

FATFS Linux Example

This is a FATFS example that uses a single file on the Linux filesystem as the FATFS file system.

Compiling Library

To compile the FATFS library simply run make.

Setup filesystem

The single file used for FATFS should be generated using:

dd if=/dev/zero of=fatfs_image.img bs=1M count=32
mkdosfs fatfs_image.img

Note that this file will need to be local to wherever you execute anything using the library.

Compiling wolfSSH and wolfSSL

wolfSSL

./configure --enable-wolfssh --enable-intelasm --disable-crl --disable-examples --disable-filesystem CFLAGS="-DNO_WOLFSSL_DIR"

wolfSSH

export LD_LIBRARY_PATH=ide/Linux-FATFS
./configure --enable-sftp CFLAGS="-DWOLFSSH_FATFS -Iide/Linux-FATFS -DSTDIN_FILENO=0 -DPRINTF=printf -lfatfs"