Comments (6)
I think I have finally found it. Comparing the dumped file to the description on Wikipedia, there are multiple problems:
- Volume label directory entry (EV3) does not have cluster number set to zero.
- The cluster corresponding to the
Projects
directory table has the next cluster ==0x0000
(FREE), instead it should be0xFFFF
(EOF). (however see below, this may be caused by Linux). - Linux requires a directory table to have at least two directory entries (https://github.com/torvalds/linux/blob/aeb542a1b5c507ea117d21c3e3e012ba16f065ac/fs/fat/inode.c#L497), which is not fulfilled there. The directory table contains only the
DEMO.UF2
directory entry, which is not enough. There should be also the.
and..
directories present. I think this may cause the issue above - when Linux detects this, it sets the next cluster pointer to zero. - The
dmesg.txt
file has 512 blocks allocated in the FAT, but its directory entry lists it as only 256 blocks long.
from uf2-linux.
Fixing just (2) and (3) in the dumped image is enough to make the drive mountable without problems. The solution is to add valid .
and ..
directory entries to the Projects
directory table.
from uf2-linux.
Problem no. 4 found:
Line 559 in c003d65
EDIT: I am likely wrong with this, as it seems that the block size is supposed to be 256 bytes for passthrough files:
Lines 334 to 337 in c003d65
from uf2-linux.
Problem no. 1 maybe spotted:
It would seem to me that startCluster
is what can be seen in the generated directory entry. Currently, it is set to the "current cluster", not to 0x0000.
It seems that UF2Daemon generates this correctly, but as soon as the Linux kernel mounts the FS, it sets the FAT entries to zero.
from uf2-linux.
when is this fixed? i have the same issue
from uf2-linux.
I'm sorry but I currently don't have much time to work on this. Also, fixing this here would fix the problem only for new releases of uf2d (which is the first step though); it would then have to be fixed with a firmware update for the problematic device (if your device is not fully under your control like with Raspberry Pi).
from uf2-linux.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uf2-linux.