-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy .dtbo overlays from firmware repo as well #67
Conversation
Thanks for the PR! Unfortunately, something does not seem to be right in the FAT writer (or between the packer and the FAT writer):
Only the first 22 overlays are included for some reason? I think we should fix that before merging the PR. |
That is a very odd failure mode. I'll check it out tomorrow if I can see anything wrong. |
@stapelberg I wonder if this is maybe an issue with the FAT16 writer itself? I haven't worked with FAT16 FS internals too much recently. Are we running out of space in the directory entry table or something? Looking through the FAT file by hand with a hex editor, I can see that directory entries for the "missing" files are produced, but they seem to just not be correctly in the file table they belong... |
Yes, I think that’s correct: https://github.com/gokrazy/internal/blob/a645001f8b93c7ebd600649287314b65fb0165b2/fat/writer.go#L554-L559 is hard-coded to one sector. Let me see if I can fix that real quick. Update: it’s not that quick a fix. I think we need to change the recursion in writeDir() so that we can write first, then allocate the corresponding fat entries. The problem is that the '..' directory entry in FAT needs to point to the parent directory’s cluster, so we either need to pre-calculate that or fix it afterwards. |
This fixes writing out (for example) device tree overlay directory. We now write the directory entries twice: Once for figuring out the correct firstCluster values, then again for writing out the correct firstCluster values. related to gokrazy/gokrazy#216 related to gokrazy/tools#67
OK, the large directory issue should be fixed with gokrazy/internal@cb94242 |
Paired with gokrazy/firmware#309