Skip to content
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

TODO: disk and root filesystem #6

Open
robertlipe opened this issue Feb 11, 2021 · 0 comments
Open

TODO: disk and root filesystem #6

robertlipe opened this issue Feb 11, 2021 · 0 comments

Comments

@robertlipe
Copy link
Owner

robertlipe commented Feb 11, 2021

Using the code from GD that handled all the SPI dma/interrupt stuff (tf_card.c) and a third-party library for the filesystem (ff.c) I've demonstrated reading the directory of a DOS-formatted SD card and displaying the contents. The filesystem code Is used by many Arduino class projects and the trans flash code provides a very reasonable looking disk_read() and disk_write services that shim the SCSI (sigh) that's used In these memory cards.

If we want to share an SD card with a DOS filesystem, we'd need a small partition driver that read the MBR, walked the partitions, identified a UNIX (which?) partition ID and a DOS one and calculated the saved cylinder edges of those partitions. (Half the system will want to deal in CHS and half will want to deal in SCSI command blocks and half will just make no sense when pairing VAX-era code to a "disk" that would fit in your eye.) The OS reads and writes just get offset by the partition boundaries.

I have no idea how we populate the memfs that's present when we boot or how we fill the memory card with the binaries we build. We probably need a "vaxcp" or "vaxformat" (surely these exists) that can just treat a raw bag of bytes and put a V7 filesystem onto them so we can write /etc/init and /bin/sh and /usr/games/fortune and such. Needs research.

Since even a slow SPIO transfer is surely faster than mechanical heads seeking on a disk pack, it might not be crazy to just spin-wait the sector reads and writes at least on a per-sector basis and letting that be preempt able. There's code for tfcard_timer_irq() but it seems to have no callers.

References: https://minnie.tuhs.org/PUPS/Setup/v7_setup.html (thumbs-up for "Recompile kernel and all apps when changing TZ...) The browsable source archives of historic distributions are a treasure trove.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant