Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Experiment with alternate usb stacks #1109

Closed
floren opened this issue Apr 22, 2021 · 2 comments
Closed

Experiment with alternate usb stacks #1109

floren opened this issue Apr 22, 2021 · 2 comments
Labels

Comments

@floren
Copy link
Contributor

floren commented Apr 22, 2021

Our current /sys/src/cmd/usb originates from Nix and hasn't been touched in a long time.

Let's pull in USB code from 9legacy and 9front and see if they're a better fit. The kernel code seems pretty uniform, but the userland portions vary, so let's experiment with those.

Ideally, we should be able to copy in the source trees, apply some spatches, and then create build.json files to do the compilation.

#1106 has some build.json files that may be a helpful starting point.

QEMU is the most convenient way to do basic testing. For example, you can boot with a USB drive attached by adding -drive format=raw,file=/tmp/harvey.raw,id=stick,if=none -device usb-storage,drive=stick to the invocation. Make /tmp/harvey.raw an image with a single partition type 0B, format that partition vfat, and you can boot harvey and run usbfat:

@gmacd
Copy link
Member

gmacd commented Apr 23, 2021

lib differences:

  • dev.c
    • legacy: no real differences
    • front: some changes
  • devs.c
    • legacy: some changes (small)
    • front: doesn't exist
  • dump.c
    • legacy: some changes (small)?
    • front: some changes
  • fs.c
    • legacy: some changes (small)?
    • front: doesn't exist
  • fsdir.c
    • legacy: no real differences
    • front: doesn't exist
  • parse.c
    • legacy: no real differences
    • front: some differences

@github-actions
Copy link

Issue is outdated

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

No branches or pull requests

2 participants