Comments (12)
It's a great challenge and one that would create a whole world of possibilities on bare metal. I will have a look into the link you sent and whether it could accelerate this kind of work on the RPi4 for us. I'd be excited about getting USB up to enable access to the onboard Ethernet controller rather than relying on an SPI peripheral to do that (easier interface). Then there's obvious stuff like being able to connect a keyboard/pointing device etc.
It's been a while since I have updated the tutorial and so maybe this could be a good (but challenging) next step? 🤔
Let me write when I have some idea of feasibility!
Thanks for the inspiration/nudge...
from rpi4-osdev.
Agreed. I found this on OSDev which purports to be the concise explainer of USB 2.0 from the spec
https://wiki.osdev.org/Universal_Serial_Bus
I shall have a read and revert with findings.
from rpi4-osdev.
Also wonder if we couldn't mod this to support Raspberry Pi 4? https://github.com/rsta2/uspi
Edit: Seems not easy. "USB on the RPi 4 needs MMU LPAE support (for AArch32) and a driver for the PCIe host bridge too. And if one wants Ethernet access, this would be another separate driver. With the increasing variety of RPi hardware, [the repo owner] decided to focus on Circle and related projects."
from rpi4-osdev.
Agree and my aim is aligned with yours. Qemu supports the PI3 out of box (there are Pi4 versions out there that I will try in time). I just want to get to the point where I have a barebones OS running on QEMU with something Pi shaped enumerating the PCIe bus from my native code. The same code should in theory port to the Pi4 and once we can get the address of the USB root controller from the PCIe bus then we are off and running.
from rpi4-osdev.
Looks like tinyusb does not have support for xhci. It could be added though and there are people talking about how. This git was linked >> https://github.com/cherry-embedded/CherryUSB/tree/master/port/xhci
from rpi4-osdev.
Hmmmmnn, well USB 2.0 would be a great start - USB 3.0 is just the icing on the cake! 🍰
from rpi4-osdev.
So it appears we will need some memory management, chiefly spinlocks and dma. This can be implemented as separate chapters I would have thought and would then segue into the USB piece.
I also found this >> https://github.com/Chadderz121/csud/tree/master
from rpi4-osdev.
Yup - and actually I implement DMA in the sound tutorial and touch on the spinlock concept in the multi core tutorial, so we're not a million miles off...
from rpi4-osdev.
So far I am looking at building a Pi3 with usb support in Qemu. Then I am going to look at enumerating devices on the PCI Bus. I have also acquired a large book 978-1717425362 by Ben Lunt.
So far I have that you need to download the qemu code and some dependencies
For debian flavoured linux do this
sudo apt-get install libusb-1.0
sudo apt-get install libusbredirparser-dev
The compile from source like
git clone https://gitlab.com/qemu-project/qemu.git
cd qemu
git submodule init
git submodule update --recursive
./configure
make
The output from ./configure you are looking for is
libusb : YES 1.0.25
usb net redir : YES 0.11.0
More when I get it
from rpi4-osdev.
Nice! I have to say that I'm really targeting the Pi4 which has significant hardware differences... Seems non-trivial
from rpi4-osdev.
Fell at the second hurdle with Qemu. Link to issue >>
https://gitlab.com/qemu-project/qemu/-/issues/1845
from rpi4-osdev.
I think we close this for now. I am excited to see what will be possible with RPi5... ;)
from rpi4-osdev.
Related Issues (20)
- Will this tutorial work for Raspberry Pi 1 Model B (512MB RAM) HOT 1
- Error with Makefile on Windows HOT 5
- Errata - Part 3 - Reference to edit of config.txt for TV HOT 5
- Makefile path to LLVM differs HOT 2
- Typo - part 8 - "very my" HOT 2
- Typo - part 9 - "hz" HOT 4
- Link - part 11 - Not hypertext HOT 1
- Page number - part 14 - Incorrect page reference on datasheet HOT 1
- Explanation - part 14 - Active LOW HOT 1
- Typo - Part 14 - arp.c - random close comment HOT 1
- Raspberry Pi 4 kernel load address HOT 2
- Building to test on QEMU/KVM HOT 4
- Improve framebuffer drawing -- dual buffering or other technique? HOT 1
- Synchronous Exception at mmio_write() HOT 4
- External vs internal ethernet controller HOT 1
- Where is this stuff documented? HOT 1
- "Incorrect" mailbox protocol in part 5 HOT 2
- Timer 3 bar not fully painted in Part 13 (Interrupts) HOT 10
- Pull Up Pull down register is the wrong way around HOT 1
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 rpi4-osdev.