From 539e352051e2a76d8541abeb0c0e304b4baaf522 Mon Sep 17 00:00:00 2001 From: Stephen Holdaway Date: Sat, 12 Mar 2022 17:16:34 +1300 Subject: [PATCH] Add note on how to create a filesystem on Linux with identical geometry This is quite useful during debugging, and I've had to build it from scratch a few times now. --- src/usb.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/usb.c b/src/usb.c index 108222f..72f3367 100644 --- a/src/usb.c +++ b/src/usb.c @@ -96,6 +96,11 @@ const struct usb_config_descriptor config = { // Filesystem size is (SECTOR_COUNT * SECTOR_SIZE) in bytes // Note that sector size cannot be changed as usb_msc_init defines it +// +// An equivalent filesystem can be created as a file for reference on Linux using: +// +// mkfs.fat -F12 -i 55AA6922 -n SWITCH -s 1 -S 512 -g 64/32 -C example.bin 64 +// #define SECTOR_COUNT 128 #define SECTOR_SIZE 512 #define BYTES_PER_SECTOR 512