I'm working on a project to create an Operating System primarily in Python. The idea is to use the Linux kernel (I've found one suitable for my target hardware) with a Python interpreter running at the highest process priority, and then build the rest of the OS—like the shell and GUI—using Python. I chose PyPy over CPython because it's reportedly 3-4 times faster, though it only supports libraries written for the Python Standard Library. I'm curious about the best way to set this up.
3 Answers
Just a note, you're mixing some OS layers here. PyPy can't run directly atop the Linux kernel since it operates in user space. A better approach would be to boot Linux and set PyPy as your main user space runtime through init. That way, everything that's running above can be done in Python. Just keep in mind, the kernel will still be responsible for handling drivers, scheduling, and memory management, while PyPy operates at the application level. If you're looking to prototype the higher-level stuff like the shell or UI, something like Runable could help speed up your iterations before you settle on a design.
You know, there’s already a bare metal Python implementation out there called MicroPython, which doesn’t need a Linux kernel at all. You might want to check that out!
If you’re set on using the Linux kernel, consider making your init program a Python one. This way, you can still take advantage of the kernel's features while running your higher-level routines in Python.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically