-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add write support for source/vdev/sdcard.c #20
Comments
I just pushed my current progress with it @ https://github.com/linux-3ds/arm9linuxfw/tree/sd-write-support, for some reason arm9linuxfw never gets the write cmd (at least not how I expect it) last time I worked on it was maybe a week or two ago, because real life™️ got in the way, but I just wanna put this out there to let other people know I at least tried if anyone has more info on this whole thing please make a PR to the branch? currently writes seem to be discarded (if you write to a mount and sync the filesystems, it's as if the write never happened, and if I put a debug abort in the code that writes to SD it's never triggered) |
I think I at least somewhat understand the cause:
Its declared as a read-only device. |
nope... that's for the configuration space much like PCI, some devices might have internal configuration bytes you can read/write to, in fact part of it is the block size (always hardcoded to 512 bytes) and the device total size in sectors it makes sense to read from it, but at no point anything needs to be written to it (at least from what I can glance in the official spec), so the write operation is just stubbed previously it was actually marked as a read-only device with you can see more information here https://docs.oasis-open.org/virtio/virtio/v1.1/csprd01/virtio-v1.1-csprd01.html#x1-2390002 |
That makes sence. |
Any chance that there might be write support soon? |
check the main repo, there's an experimental branch where SD card read and write work pretty well, you need the custom arm9linuxfw too |
The simple or the sd write support one? |
simple |
nice. thnx |
Great, I can finally run DOOM on my 3DS now! Still need to try it though. |
@Wolfvak One question: what /dev device is the SD card on now? It isn't at /dev/vda anymore. |
|
@Wolfvak |
Is that the wrong constellation of versions or why isn't it working? |
I found out what the issue was: |
@Wolfvak the new kernel seems to have a different architecture because my rootfs gives a lot of illegal instruction and segmentation faults. uname -a is reporting armv6l as usual but the pi zero build of debian errors out a ton and none of my apps work. |
the pi zero is probably built for softfp and not hardfp this is also way off-topic for this issue |
ik. its just the rootfs i still had for testing. btw, the sd card driver works without problems. only issue is the rootfs that worked with the old kernel doesnt work anymore. |
I had the same issue. building the initrd with multiarch and mounting the main partition and then an ext4 image on it fixed it for me. not the most elegant workaround but it works and i can play doom. |
that works but i did it a bit differently. instead of having a ext4 image file on a partition i just looped the partition with losetup and mounted the loopback device. i would like a proper fix at some point for this but this works for now |
@spike11302000 this is more of a buildroot/kernel issue, can you open a new one there and describe this problem? it's not really related to the SD card support afaik |
This topic was talked about before but noone actually ever finished it. I tried doing it myself but I suck at C so the only thing I actually did was causing a kernel panic whenever a write event got started. Would be nice if someone that actually knows how to work with C would add this functionality.
The text was updated successfully, but these errors were encountered: